]> git.ipfire.org Git - thirdparty/git.git/blame - ctype.c
fast-import: close pack before unlinking it
[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
c67b1fa3
JH
8/* Just so that no insane platform contaminate namespace with these symbols */
9#undef SS
10#undef AA
11#undef DD
12
4546738b
LT
13#define SS GIT_SPACE
14#define AA GIT_ALPHA
15#define DD GIT_DIGIT
16
17unsigned char sane_ctype[256] = {
18 0, 0, 0, 0, 0, 0, 0, 0, 0, SS, SS, 0, 0, SS, 0, 0, /* 0-15 */
19 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 16-15 */
20 SS, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 32-15 */
21 DD, DD, DD, DD, DD, DD, DD, DD, DD, DD, 0, 0, 0, 0, 0, 0, /* 48-15 */
22 0, AA, AA, AA, AA, AA, AA, AA, AA, AA, AA, AA, AA, AA, AA, AA, /* 64-15 */
23 AA, AA, AA, AA, AA, AA, AA, AA, AA, AA, AA, 0, 0, 0, 0, 0, /* 80-15 */
24 0, AA, AA, AA, AA, AA, AA, AA, AA, AA, AA, AA, AA, AA, AA, AA, /* 96-15 */
25 AA, AA, AA, AA, AA, AA, AA, AA, AA, AA, AA, 0, 0, 0, 0, 0, /* 112-15 */
26 /* Nothing in the 128.. range */
27};