2005-10-13 20:03:18 +02:00
|
|
|
/*
|
|
|
|
* Sane locale-independent, ASCII ctype.
|
|
|
|
*
|
|
|
|
* No surprises, and works with signed and unsigned chars.
|
|
|
|
*/
|
|
|
|
#include "cache.h"
|
|
|
|
|
2008-08-28 01:14:22 +02:00
|
|
|
/* Just so that no insane platform contaminate namespace with these symbols */
|
|
|
|
#undef SS
|
|
|
|
#undef AA
|
|
|
|
#undef DD
|
2008-08-29 00:47:22 +02:00
|
|
|
#undef GS
|
2008-08-28 01:14:22 +02:00
|
|
|
|
2005-10-13 20:03:18 +02:00
|
|
|
#define SS GIT_SPACE
|
|
|
|
#define AA GIT_ALPHA
|
|
|
|
#define DD GIT_DIGIT
|
2008-08-29 00:47:22 +02:00
|
|
|
#define GS GIT_SPECIAL /* \0, *, ?, [, \\ */
|
2005-10-13 20:03:18 +02:00
|
|
|
|
|
|
|
unsigned char sane_ctype[256] = {
|
2008-08-29 00:47:22 +02:00
|
|
|
GS, 0, 0, 0, 0, 0, 0, 0, 0, SS, SS, 0, 0, SS, 0, 0, /* 0-15 */
|
2005-10-13 20:03:18 +02:00
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 16-15 */
|
2008-08-29 00:47:22 +02:00
|
|
|
SS, 0, 0, 0, 0, 0, 0, 0, 0, 0, GS, 0, 0, 0, 0, 0, /* 32-15 */
|
|
|
|
DD, DD, DD, DD, DD, DD, DD, DD, DD, DD, 0, 0, 0, 0, 0, GS, /* 48-15 */
|
2005-10-13 20:03:18 +02:00
|
|
|
0, AA, AA, AA, AA, AA, AA, AA, AA, AA, AA, AA, AA, AA, AA, AA, /* 64-15 */
|
2008-08-29 00:47:22 +02:00
|
|
|
AA, AA, AA, AA, AA, AA, AA, AA, AA, AA, AA, GS, GS, 0, 0, 0, /* 80-15 */
|
2005-10-13 20:03:18 +02:00
|
|
|
0, AA, AA, AA, AA, AA, AA, AA, AA, AA, AA, AA, AA, AA, AA, AA, /* 96-15 */
|
|
|
|
AA, AA, AA, AA, AA, AA, AA, AA, AA, AA, AA, 0, 0, 0, 0, 0, /* 112-15 */
|
|
|
|
/* Nothing in the 128.. range */
|
|
|
|
};
|