version 1.2, 2015/04/20 18:10:09
|
version 1.3, 2015/04/20 18:19:49
|
|
|
| |
#include "naming.h" | #include "naming.h" |
| |
MI_Boolean LegalName(const MI_Char* name) |
MI_Boolean LegalName(const ZChar* name) |
{ | { |
/* Table for determining whether character is [A-Za-z_] */ | /* Table for determining whether character is [A-Za-z_] */ |
static const MI_Uint8 _FirstChar[256] = | static const MI_Uint8 _FirstChar[256] = |
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, |
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, |
}; | }; |
const MI_Char* p = name; |
const ZChar* p = name; |
| |
/* Check the 1st character */ | /* Check the 1st character */ |
if (!_FirstChar[(MI_Uint8)*p]) | if (!_FirstChar[(MI_Uint8)*p]) |