Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRené Scharfe <rene.scharfe@lsrfire.ath.cx>2009-01-17 18:50:34 +0300
committerJunio C Hamano <gitster@pobox.com>2009-01-18 05:30:37 +0300
commit8cc32992624ed4140fb136d98675f0f19b20ba09 (patch)
tree4b6b3164c5fd4dce658f5b08c86cc337853d7373 /ctype.c
parentc841aa8b903200f5d7830c7c4ab8d62b5ef44c5c (diff)
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 'ctype.c')
-rw-r--r--ctype.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ctype.c b/ctype.c
index 6528687000..9de187c812 100644
--- a/ctype.c
+++ b/ctype.c
@@ -9,11 +9,11 @@ enum {
S = GIT_SPACE,
A = GIT_ALPHA,
D = GIT_DIGIT,
- G = GIT_SPECIAL, /* \0, *, ?, [, \\ */
+ G = GIT_GLOB_SPECIAL, /* *, ?, [, \\ */
};
unsigned char sane_ctype[256] = {
- G, 0, 0, 0, 0, 0, 0, 0, 0, S, S, 0, 0, S, 0, 0, /* 0.. 15 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, S, S, 0, 0, S, 0, 0, /* 0.. 15 */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 16.. 31 */
S, 0, 0, 0, 0, 0, 0, 0, 0, 0, G, 0, 0, 0, 0, 0, /* 32.. 47 */
D, D, D, D, D, D, D, D, D, D, 0, 0, 0, 0, 0, G, /* 48.. 63 */