2 * Sane locale-independent, ASCII ctype.
4 * No surprises, and works with signed and unsigned chars.
6 #include "git-compat-util.h"
12 G
= GIT_GLOB_SPECIAL
, /* *, ?, [, \\ */
13 R
= GIT_REGEX_SPECIAL
, /* $, (, ), +, ., ^, {, | */
14 P
= GIT_PATHSPEC_MAGIC
, /* other non-alnum, except for ] and } */
17 Z
= GIT_CNTRL
| GIT_SPACE
20 const unsigned char sane_ctype
[256] = {
21 X
, X
, X
, X
, X
, X
, X
, X
, X
, Z
, Z
, X
, X
, Z
, X
, X
, /* 0.. 15 */
22 X
, X
, X
, X
, X
, X
, X
, X
, X
, X
, X
, X
, X
, X
, X
, X
, /* 16.. 31 */
23 S
, P
, P
, P
, R
, P
, P
, P
, R
, R
, G
, R
, P
, P
, R
, P
, /* 32.. 47 */
24 D
, D
, D
, D
, D
, D
, D
, D
, D
, D
, P
, P
, P
, P
, P
, G
, /* 48.. 63 */
25 P
, A
, A
, A
, A
, A
, A
, A
, A
, A
, A
, A
, A
, A
, A
, A
, /* 64.. 79 */
26 A
, A
, A
, A
, A
, A
, A
, A
, A
, A
, A
, G
, G
, U
, R
, P
, /* 80.. 95 */
27 P
, A
, A
, A
, A
, A
, A
, A
, A
, A
, A
, A
, A
, A
, A
, A
, /* 96..111 */
28 A
, A
, A
, A
, A
, A
, A
, A
, A
, A
, A
, R
, R
, U
, P
, X
, /* 112..127 */
29 /* Nothing in the 128.. range */