src/stdlib/path.c
/*===========================================
 * zero_separate_path -- Zero separate dirs in path
 * (Also appends extra zero at end)
 * Assumes there are no empty directory entries.
 * Returns count of directories.
 *=========================================*/
- Zero separate dirs in path
(Also appends extra zero at end)
Assumes there are no empty directory entries.
Returns count of directories.
- Zero separate dirs in path ( Also appends extra zero at end ) Assumes there are no empty directory entries . Returns count of directories .
static INT
zero_separate_path (STRING path)
{
	INT c=0, dirs=0;
	if (!path[0]) {
		path[1] = 0;
		return 0;
	}
	++dirs;
	while ((c = (uchar)*path)) {
		if (is_path_sep((uchar)c)) {
			*path = 0;
			++dirs;
		}
		++path;
	}
	path[1] = 0;
	return dirs;
}
static INT zero_separate_path ( STRING path ) { INT c = 0 , dirs = 0 ; if ( ! path [ 0 ] ) { path [ 1 ] = 0 ; return 0 ; } ++ dirs ; while ( ( c = ( uchar ) * path ) ) { if ( is_path_sep ( ( uchar ) c ) ) { * path = 0 ; ++ dirs ; } ++ path ; } path [ 1 ] = 0 ; return dirs ; }
zero_separate_path -- Zero separate dirs in path
 (Also appends extra zero at end)
 Assumes there are no empty directory entries.
zero_separate_path -- Zero separate dirs in path ( Also appends extra zero at end ) Assumes there are no empty directory entries .