| www.delorie.com/djgpp/doc/libc-2.01/libc_275.html | search |
#include <sys/stat.h> void _fixpath(const char *in_path, char *out_path);
This function canonicalizes the input path in_path and stores the result in the buffer pointed to by out_path.
The path is fixed by removing consecutive and trailing slashes, making the path absolute if it's relative, removing "." components, collapsing ".." components, adding a drive specifier if needed, and converting all slashes to '/'. DOS-style 8+3 names of directories which are part of the pathname, as well as its final filename part, are returned lower-cased in out_path, but long filenames are left intact. See section _preserve_fncase, for more details on letter-case conversions in filenames.
None.
char oldpath[100], newpath[100];
scanf(oldpath);
_fixpath(oldpath, newpath);
printf("that really is %s\n", newpath);
Go to the first, previous, next, last section, table of contents.
| prev next webmaster | delorie software privacy |
| Copyright © 1997 | Updated Apr 1997 |