|
Lines 166-171
Link Here
|
| 166 |
|
166 |
|
| 167 |
#define whitespace(c) (spacetab[(unsigned char)c] != 0) |
167 |
#define whitespace(c) (spacetab[(unsigned char)c] != 0) |
| 168 |
|
168 |
|
|
|
169 |
static const char invalidtab[] = { |
| 170 |
1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, /* 0x00 - 0x0f */ |
| 171 |
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x10 - 0x1f */ |
| 172 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 - 0x2f */ |
| 173 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 - 0x3f */ |
| 174 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 - 0x4f */ |
| 175 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 - 0x5f */ |
| 176 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 - 0x8f */ |
| 177 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, /* 0x70 - 0x7f */ |
| 178 |
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x80 - 0x8f */ |
| 179 |
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x90 - 0x9f */ |
| 180 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 - 0xaf */ |
| 181 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 - 0xbf */ |
| 182 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 - 0xcf */ |
| 183 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 - 0xdf */ |
| 184 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xe0 - 0xef */ |
| 185 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /* 0xf0 - 0xff */ |
| 186 |
}; |
| 187 |
|
| 169 |
static char *rcs_lockfile = NULL; |
188 |
static char *rcs_lockfile = NULL; |
| 170 |
static int rcs_lockfd = -1; |
189 |
static int rcs_lockfd = -1; |
| 171 |
|
190 |
|
|
Lines 1107-1115
Link Here
|
| 1107 |
{ |
1126 |
{ |
| 1108 |
register const char * const my_spacetab = spacetab; |
1127 |
register const char * const my_spacetab = spacetab; |
| 1109 |
register char *ptr, *ptrend; |
1128 |
register char *ptr, *ptrend; |
|
|
1129 |
register const char * const my_invalidtab = invalidtab; |
| 1110 |
char c; |
1130 |
char c; |
| 1111 |
|
1131 |
|
| 1112 |
#define my_whitespace(c) (my_spacetab[(unsigned char)c] != 0) |
1132 |
#define my_whitespace(c) (my_spacetab[(unsigned char)c] != 0) |
|
|
1133 |
#define my_invalid(c) (my_invalidtab[(unsigned char)c] != 0) |
| 1113 |
|
1134 |
|
| 1114 |
rcsbuf->vlen = 0; |
1135 |
rcsbuf->vlen = 0; |
| 1115 |
rcsbuf->at_string = 0; |
1136 |
rcsbuf->at_string = 0; |
|
Lines 1186-1191
Link Here
|
| 1186 |
c = *ptr; |
1207 |
c = *ptr; |
| 1187 |
if (c == ';' || my_whitespace (c)) |
1208 |
if (c == ';' || my_whitespace (c)) |
| 1188 |
break; |
1209 |
break; |
|
|
1210 |
/* Sanity check: is this character invalid for a key (and not whitespace)? */ |
| 1211 |
if (my_invalid (c)) |
| 1212 |
return 0; |
| 1189 |
} |
1213 |
} |
| 1190 |
} |
1214 |
} |
| 1191 |
|
1215 |
|