diff options
| author | Junio C Hamano <gitster@pobox.com> | 2009-01-21 16:51:03 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2009-01-21 16:51:03 -0800 |
| commit | d9fde065bd808fbbad3b53e10e160c8f8193b577 (patch) | |
| tree | aeae85b30e694dd7d23a7eb120a499055f147038 /git-compat-util.h | |
| parent | 1afcde6da1221bdb85a3630d995f9ca384042cb9 (diff) | |
| parent | f9b7cce61cbd19c99e89b859b5909f0741111185 (diff) | |
| download | git-d9fde065bd808fbbad3b53e10e160c8f8193b577.tar.xz | |
Merge branch 'rs/ctype'
* rs/ctype:
Add is_regex_special()
Change NUL char handling of isspecial()
Reformat ctype.c
Add ctype test
Conflicts:
Makefile
Diffstat (limited to 'git-compat-util.h')
| -rw-r--r-- | git-compat-util.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/git-compat-util.h b/git-compat-util.h index e20b1e858c..079cbe9440 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -327,13 +327,15 @@ extern unsigned char sane_ctype[256]; #define GIT_SPACE 0x01 #define GIT_DIGIT 0x02 #define GIT_ALPHA 0x04 -#define GIT_SPECIAL 0x08 +#define GIT_GLOB_SPECIAL 0x08 +#define GIT_REGEX_SPECIAL 0x10 #define sane_istest(x,mask) ((sane_ctype[(unsigned char)(x)] & (mask)) != 0) #define isspace(x) sane_istest(x,GIT_SPACE) #define isdigit(x) sane_istest(x,GIT_DIGIT) #define isalpha(x) sane_istest(x,GIT_ALPHA) #define isalnum(x) sane_istest(x,GIT_ALPHA | GIT_DIGIT) -#define isspecial(x) sane_istest(x,GIT_SPECIAL) +#define is_glob_special(x) sane_istest(x,GIT_GLOB_SPECIAL) +#define is_regex_special(x) sane_istest(x,GIT_GLOB_SPECIAL | GIT_REGEX_SPECIAL) #define tolower(x) sane_case((unsigned char)(x), 0x20) #define toupper(x) sane_case((unsigned char)(x), 0) |
