diff options
| author | frosty <frostinator33@airmail.cc> | 2026-10-03 13:30:21 -0400 |
|---|---|---|
| committer | frosty <frostinator33@airmail.cc> | 2026-10-03 13:30:21 -0400 |
| commit | 65500761a632d22057d3b3e709b91dde168e125b (patch) | |
| tree | 0ff30abf8de4120e5ed8db296688e0d85b65736b /src/Pattern/Pattern.h | |
| parent | cb716af752fb0b46aa8f78d3cbd5189a09642f39 (diff) | |
feat: add --exclude/--include
Diffstat (limited to 'src/Pattern/Pattern.h')
| -rw-r--r-- | src/Pattern/Pattern.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/Pattern/Pattern.h b/src/Pattern/Pattern.h new file mode 100644 index 0000000..52b817f --- /dev/null +++ b/src/Pattern/Pattern.h @@ -0,0 +1,27 @@ +#ifndef YAPSSG_PATTERN_H +#define YAPSSG_PATTERN_H + +#include <stddef.h> + +typedef enum { PATTERN_INCLUDE, PATTERN_EXCLUDE } PatternKind; + +typedef struct { + PatternKind kind; + char *pattern; + int directory_only; +} Pattern; + +typedef struct { + Pattern *items; + size_t length; + size_t capacity; +} PatternList; + +int pattern_list_append(PatternList *list, PatternKind kind, + const char *pattern); +void pattern_list_clear(PatternList *list); +PatternKind pattern_list_default_kind(const PatternList *list); +PatternKind pattern_list_resolve(const PatternList *list, const char *path, + int is_directory, PatternKind fallback); + +#endif
\ No newline at end of file |
