diff options
author | René Scharfe <rene.scharfe@lsrfire.ath.cx> | 2009-01-17 16:50:34 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-01-17 18:30:37 -0800 |
commit | 8cc32992624ed4140fb136d98675f0f19b20ba09 (patch) | |
tree | 4b6b3164c5fd4dce658f5b08c86cc337853d7373 /git-compat-util.h | |
parent | c841aa8b903200f5d7830c7c4ab8d62b5ef44c5c (diff) | |
download | git-8cc32992624ed4140fb136d98675f0f19b20ba09.tar.gz |
Change NUL char handling of isspecial()
Replace isspecial() by the new macro is_glob_special(), which is more,
well, specialized. The former included the NUL char in its character
class, while the letter only included characters that are special to
file name globbing.
The new name contains underscores because they enhance readability
considerably now that it's made up of three words. Renaming the
function is necessary to document its changed scope.
The call sites of isspecial() are updated to check explicitly for NUL.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-compat-util.h')
-rw-r--r-- | git-compat-util.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/git-compat-util.h b/git-compat-util.h index e20b1e858c..7c925881d9 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -327,13 +327,13 @@ 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 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 tolower(x) sane_case((unsigned char)(x), 0x20) #define toupper(x) sane_case((unsigned char)(x), 0) |