path-list.hon commit git-p4: Unset P4DIFF environment variable when using 'p4 -du diff' (67abd41)
   1#ifndef PATH_LIST_H
   2#define PATH_LIST_H
   3
   4struct path_list_item {
   5        char *path;
   6        void *util;
   7};
   8struct path_list
   9{
  10        struct path_list_item *items;
  11        unsigned int nr, alloc;
  12        unsigned int strdup_paths:1;
  13};
  14
  15void print_path_list(const char *text, const struct path_list *p);
  16void path_list_clear(struct path_list *list, int free_util);
  17
  18/* Use these functions only on sorted lists: */
  19int path_list_has_path(const struct path_list *list, const char *path);
  20struct path_list_item *path_list_insert(const char *path, struct path_list *list);
  21struct path_list_item *path_list_lookup(const char *path, struct path_list *list);
  22
  23/* Use these functions only on unsorted lists: */
  24struct path_list_item *path_list_append(const char *path, struct path_list *list);
  25void sort_path_list(struct path_list *list);
  26int unsorted_path_list_has_path(struct path_list *list, const char *path);
  27
  28#endif /* PATH_LIST_H */