| iMatix home page | << | < | > | >> |
SFL Version 2.11 |
#include "sflfile.h" char *strip_file_path ( char *name)
Removes the leading path from the filename, if any path was present. Returns name. The path can be specified using the local operating system syntax; under MS-DOS, / and \ are interchangeable.
{ char *path_end; ASSERT (name); path_end = strrchr (name, PATHEND); /* Find end of path, if any */ #if (defined (MSDOS_FILESYSTEM)) if (path_end == NULL) path_end = strrchr (name, '/'); #endif if (path_end != NULL) memmove (name, path_end + 1, strlen (path_end)); return (name); }
| << | < | > | >> | Copyright © 1996-2000 iMatix Corporation |