tcc-stupidos/libtcc/include/tcc/path.h

19 lines
471 B
C
Raw Normal View History

2025-02-11 12:07:04 +00:00
#ifndef TCC_PATH_H
# define TCC_PATH_H 1
#ifdef _WIN32
# define IS_DIRSEP(c) (c == '/' || c == '\\')
# define IS_ABSPATH(p) (IS_DIRSEP(p[0]) || (p[0] && p[1] == ':' && IS_DIRSEP(p[2])))
# define PATHCMP stricmp
# define PATHSEP ";"
#else
# define IS_DIRSEP(c) (c == '/')
# define IS_ABSPATH(p) IS_DIRSEP(p[0])
# define PATHCMP strcmp
# define PATHSEP ":"
#endif
char *tcc_basename(const char *name);
char *tcc_fileextension (const char *name);
#endif /* !TCC_PATH_H */