src/gedlib/lloptions.c
/*==========================================
 * dir_from_file -- return directory of file
 * heap-allocated
 *========================================*/
- return directory of file
heap-allocated
- return directory of file heap - allocated
static STRING
dir_from_file (STRING file)
{
	STRING thisdir = strdup(file);
	STRING ptr;
	for (ptr=thisdir+strlen(thisdir)-1; ptr>thisdir; --ptr) {
		if (is_dir_sep(*ptr))
			break;
	}
	*ptr = 0;
	return thisdir;
}
static STRING dir_from_file ( STRING file ) { STRING thisdir = strdup ( file ) ; STRING ptr ; for ( ptr = thisdir + strlen ( thisdir ) - 1 ; ptr > thisdir ; -- ptr ) { if ( is_dir_sep ( * ptr ) ) break ; } * ptr = 0 ; return thisdir ; }
dir_from_file -- return directory of file
 heap-allocated
dir_from_file -- return directory of file heap - allocated