| iMatix home page
| << | < | > | >>
SFL Logo SFL
Version 2.11

 

strip_file_path

#include "sflfile.h"
char
*strip_file_path (
    char *name)

Synopsis

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.

Source Code - (sflfile.c)

{
    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);
}

| << | < | > | >> iMatix Copyright © 1996-2000 iMatix Corporation