Browse Source

ctype: make sane_ctype[] const array

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Nguyễn Thái Ngọc Duy 12 years ago committed by Junio C Hamano
parent
commit
ca5ab7d1e8
  1. 2
      ctype.c
  2. 2
      git-compat-util.h

2
ctype.c

@ -14,7 +14,7 @@ enum { @@ -14,7 +14,7 @@ enum {
P = GIT_PATHSPEC_MAGIC /* other non-alnum, except for ] and } */
};

unsigned char sane_ctype[256] = {
const unsigned char sane_ctype[256] = {
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, P, P, P, R, P, P, P, R, R, G, R, P, P, R, P, /* 32.. 47 */

2
git-compat-util.h

@ -470,7 +470,7 @@ extern const char tolower_trans_tbl[256]; @@ -470,7 +470,7 @@ extern const char tolower_trans_tbl[256];
#undef isupper
#undef tolower
#undef toupper
extern unsigned char sane_ctype[256];
extern const unsigned char sane_ctype[256];
#define GIT_SPACE 0x01
#define GIT_DIGIT 0x02
#define GIT_ALPHA 0x04

Loading…
Cancel
Save