Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- libc - <b>_fixpath</b> http://www.ousob.com [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
_fixpath
========

Syntax
------

     #include <sys/stat.h>
     
     void _fixpath(const char *in_path, char *out_path);

Description
-----------

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.  *Note
_preserve_fncase::, for more details on letter-case conversions in
filenames.

Return Value
------------

None.

Example
-------

     char oldpath[100], newpath[100];
     scanf(oldpath);
     _fixpath(oldpath, newpath);
     printf("that really is %s\n", newpath);


Online resources provided by: http://www.ousob.com --- NG 2 HTML conversion by Dave Pearson