1 #ifndef WIN32_PATH_UTILS_H
2 #define WIN32_PATH_UTILS_H
4 int win32_has_dos_drive_prefix(const char *path
);
5 #define has_dos_drive_prefix win32_has_dos_drive_prefix
7 int win32_skip_dos_drive_prefix(char **path
);
8 #define skip_dos_drive_prefix win32_skip_dos_drive_prefix
9 #define is_dir_sep is_xplatform_dir_sep
10 static inline char *win32_find_last_dir_sep(const char *path
)
14 if (is_dir_sep(*path
))
18 #define find_last_dir_sep win32_find_last_dir_sep
19 static inline int win32_has_dir_sep(const char *path
)
22 * See how long the non-separator part of the given path is, and
23 * if and only if it covers the whole path (i.e. path[len] is NUL),
24 * there is no separator in the path---otherwise there is a separator.
26 size_t len
= strcspn(path
, "/\\");
29 #define has_dir_sep(path) win32_has_dir_sep(path)
30 int win32_offset_1st_component(const char *path
);
31 #define offset_1st_component win32_offset_1st_component