]> git.ipfire.org Git - thirdparty/git.git/blame - ctype.c
Reformat ctype.c
[thirdparty/git.git] / ctype.c
CommitLineData
4546738b
LT
1/*
2 * Sane locale-independent, ASCII ctype.
3 *
4 * No surprises, and works with signed and unsigned chars.
5 */
6#include "cache.h"
7
c841aa8b
RS
8enum {
9 S = GIT_SPACE,
10 A = GIT_ALPHA,
11 D = GIT_DIGIT,
12 G = GIT_SPECIAL, /* \0, *, ?, [, \\ */
13};
4546738b
LT
14
15unsigned char sane_ctype[256] = {
c841aa8b
RS
16 G, 0, 0, 0, 0, 0, 0, 0, 0, S, S, 0, 0, S, 0, 0, /* 0.. 15 */
17 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 16.. 31 */
18 S, 0, 0, 0, 0, 0, 0, 0, 0, 0, G, 0, 0, 0, 0, 0, /* 32.. 47 */
19 D, D, D, D, D, D, D, D, D, D, 0, 0, 0, 0, 0, G, /* 48.. 63 */
20 0, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, /* 64.. 79 */
21 A, A, A, A, A, A, A, A, A, A, A, G, G, 0, 0, 0, /* 80.. 95 */
22 0, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, /* 96..111 */
23 A, A, A, A, A, A, A, A, A, A, A, 0, 0, 0, 0, 0, /* 112..127 */
4546738b
LT
24 /* Nothing in the 128.. range */
25};