FANDOM


このページを編集する際は,編集に関する方針に従ってください. 編集

概要 編集

引数 編集

  • c (charを想定)

実装 編集

29: #if defined(__MSDOS__) || defined(_WIN32) || defined(__OS2__) || defined (__CYGWIN__)
30: 
31: #ifndef HAVE_DOS_BASED_FILE_SYSTEM
32: #define HAVE_DOS_BASED_FILE_SYSTEM 1
33: #endif
34: 
35: #define IS_DIR_SEPARATOR(c)     ((c) == '/' || (c) == '\\')
 36: /* Note that IS_ABSOLUTE_PATH accepts d:foo as well, although it is
 37:    only semi-absolute.  This is because the users of IS_ABSOLUTE_PATH
 38:    want to know whether to prepend the current working directory to
 39:    a file name, which should not be done with a name like d:foo.  */
40: #define IS_ABSOLUTE_PATH(f)     (IS_DIR_SEPARATOR((f)[0]) || (((f)[0]) && ((f)[1] == ':')))
41: #define FILENAME_CMP(s1, s2)    strcasecmp(s1, s2)
42: 
43: #else  /* not DOSish */
44: 
45: #define IS_DIR_SEPARATOR(c)     ((c) == '/')
46: #define IS_ABSOLUTE_PATH(f)     (IS_DIR_SEPARATOR((f)[0]))
47: #define FILENAME_CMP(s1, s2)    strcmp(s1, s2)
48: 
49: #endif /* not DOSish */


リンク元