return_path - A string that will hold the resulting directory
portion of the string. If this parameter is
NULL, it will automatically malloc space for
the result.
RETURN VALUE
directory component of pathname, NULL on error
DESCRIPTION
This routine searches an input pathname for the final
occurance of a '/', and returns the string existing
before the '/'. If a '/' is not found, it looks for
a '~', as in ~username. If neither a '/' or a '~' are
found, it will assume the pathname does not have a
directory component, and returns the string ".".
ADDITIONAL INFORMATION
none
EXAMPLES
none
SIDE EFFECTS
This routine kmalloc's the return string, and will remove
whitespace (as defined by isspace()) from the end of the input
string
RESTRICTIONS
none
MODIFICATION
none
FILES
$BOOTSTRAP/objects/library/kutils/src/dir.c
SEE ALSO
kutils(3)
COPYRIGHT
Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.