compat / win32 / path-utils.hon commit Merge branch 'nd/diff-parseopt-2' (4ab0f13)
   1#define has_dos_drive_prefix(path) \
   2        (isalpha(*(path)) && (path)[1] == ':' ? 2 : 0)
   3int win32_skip_dos_drive_prefix(char **path);
   4#define skip_dos_drive_prefix win32_skip_dos_drive_prefix
   5static inline int win32_is_dir_sep(int c)
   6{
   7        return c == '/' || c == '\\';
   8}
   9#define is_dir_sep win32_is_dir_sep
  10static 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
  19int win32_offset_1st_component(const char *path);
  20#define offset_1st_component win32_offset_1st_component