Merge branch 'jc/denoise-rm-to-resolve' into maint
[git] / compat / win32 / path-utils.h
1 #define has_dos_drive_prefix(path) \
2         (isalpha(*(path)) && (path)[1] == ':' ? 2 : 0)
3 int win32_skip_dos_drive_prefix(char **path);
4 #define skip_dos_drive_prefix win32_skip_dos_drive_prefix
5 static inline int win32_is_dir_sep(int c)
6 {
7         return c == '/' || c == '\\';
8 }
9 #define is_dir_sep win32_is_dir_sep
10 static inline char *win32_find_last_dir_sep(const char *path)
11 {
12         char *ret = NULL;
13         for (; *path; ++path)
14                 if (is_dir_sep(*path))
15                         ret = (char *)path;
16         return ret;
17 }
18 #define find_last_dir_sep win32_find_last_dir_sep
19 int win32_offset_1st_component(const char *path);
20 #define offset_1st_component win32_offset_1st_component