From 8cc32992624ed4140fb136d98675f0f19b20ba09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Scharfe?= Date: Sat, 17 Jan 2009 16:50:34 +0100 Subject: 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 Signed-off-by: Junio C Hamano --- ctype.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ctype.c') 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 */ -- cgit v1.2.3