Changed all toupper, tolower, isupper, islower and isalpha to internal defined function. Case insensitive regexp should work on Win9x now.

This commit is contained in:
Ianos Gnatiuc
2005-10-31 22:18:26 +00:00
parent ad8b2a9d36
commit 21b44b65d2
69 changed files with 228 additions and 192 deletions

View File

@@ -220,8 +220,8 @@ void gareafile::ReadCrashmailCfg(const char* file) {
if(jbstrcpy(tmp, buf, 100, &jbcpos)) {
if(isdigit(tmp[0]))
aa.groupid = 0x8000+atoi(tmp);
else if(isalpha(tmp[0]))
aa.groupid = toupper(tmp[0]);
else if(g_isalpha(tmp[0]))
aa.groupid = g_toupper(tmp[0]);
}
break;
}

View File

@@ -66,7 +66,7 @@ void gareafile::ReadDB130(char* tag, char* dbpath) {
if(AA1.allocated and strchr("QFqf", AA2.msgbase)) {
aa.reset();
switch(toupper(AA2.msgbase)) {
switch(g_toupper(AA2.msgbase)) {
case 'Q':
aa.basetype = "HUDSON";
aa.board = AA2.board;
@@ -76,7 +76,7 @@ void gareafile::ReadDB130(char* tag, char* dbpath) {
aa.setpath(STRNP2C(AA2.path));
break;
}
switch(toupper(AA2.kind)) {
switch(g_toupper(AA2.kind)) {
case 'N':
aa.type = GMB_NET;
aa.attr = attribsnet;
@@ -127,7 +127,7 @@ void gareafile::ReadDB1046(char* file, char* tag) {
while(fread(ADF, sizeof(DB1046_ADF), 1, fp) == 1) {
if(ADF->allocated and strchr("QFqf", ADF->msgbase)) {
aa.reset();
switch(toupper(ADF->msgbase)) {
switch(g_toupper(ADF->msgbase)) {
case 'Q':
aa.basetype = "HUDSON";
aa.board = ADF->board;
@@ -137,7 +137,7 @@ void gareafile::ReadDB1046(char* file, char* tag) {
aa.setpath(STRNP2C(ADF->path));
break;
}
switch(toupper(ADF->kind)) {
switch(g_toupper(ADF->kind)) {
case 'N':
aa.type = GMB_NET;
aa.attr = attribsnet;
@@ -190,7 +190,7 @@ void gareafile::ReadDB1047A22(char* file, int reclen, char* tag) {
while(fread(ADF, reclen, 1, fp) == 1) {
if(ADF->allocated and strchr("QFqf", ADF->msgbase)) {
aa.reset();
switch(toupper(ADF->msgbase)) {
switch(g_toupper(ADF->msgbase)) {
case 'Q':
aa.basetype = "HUDSON";
aa.board = ADF->board;
@@ -200,7 +200,7 @@ void gareafile::ReadDB1047A22(char* file, int reclen, char* tag) {
aa.setpath(STRNP2C(ADF->path));
break;
}
switch(toupper(ADF->kind)) {
switch(g_toupper(ADF->kind)) {
case 'N':
aa.type = GMB_NET;
aa.attr = attribsnet;
@@ -254,7 +254,7 @@ void gareafile::ReadDB2011(char* file, int reclen, char* tag) {
while(fread(ADF, reclen, 1, fp) == 1) {
if(ADF->allocated and strchr("QFqf", ADF->msgbase)) {
aa.reset();
switch(toupper(ADF->msgbase)) {
switch(g_toupper(ADF->msgbase)) {
case 'Q':
if(ADF->board < 1 or ADF->board > 200)
continue; // Bad area number
@@ -266,7 +266,7 @@ void gareafile::ReadDB2011(char* file, int reclen, char* tag) {
aa.setpath(STRNP2C(ADF->path));
break;
}
switch(toupper(ADF->kind)) {
switch(g_toupper(ADF->kind)) {
case 'N':
aa.type = GMB_NET;
aa.attr = attribsnet;
@@ -342,7 +342,7 @@ void gareafile::ReadDBridge(char* tag) {
// Read netmail storage method etc
for(line=1; line <= 2; line++)
fgets(buf, 255, fp);
type = (char)toupper(*buf);
type = (char)g_toupper(*buf);
// Fido-style netmail path
line++;

View File

@@ -185,7 +185,7 @@ void gareafile::ReadFMail098(FILE* fp, char* path, char* file, char* options) {
grp >>= 1;
}
//aa.groupid = (char)toupper((char)ar->group);
//aa.groupid = (char)g_toupper((char)ar->group);
aa.aka = cfg->akaList[ar->address].nodeNum;
if(ar->options.local) {
aa.type = GMB_LOCAL;

View File

@@ -189,7 +189,7 @@ void gareafile::ReadFMail116(FILE* fp, char* path, char* file, char* options) {
grp >>= 1;
}
//aa.groupid = (char)toupper((char)ar->group);
//aa.groupid = (char)g_toupper((char)ar->group);
aa.aka = cfg->akaList[ar->address].nodeNum;
if(ar->options.local) {
aa.type = GMB_LOCAL;

View File

@@ -318,8 +318,8 @@ void gareafile::ReadHPTFile(char* path, char* file, char* origin, int group) {
if(isdigit(*key))
aa.groupid = 0x8000+atoi(key);
else if(isalpha(*key))
aa.groupid = toupper(*key);
else if(g_isalpha(*key))
aa.groupid = g_toupper(*key);
}
else if (strieql(opt, "d")) {
@@ -395,13 +395,13 @@ void gareafile::ReadHPT(char* tag) {
if(*ptr != '-')
strcpy(file, ptr);
else {
if(toupper(*(++ptr)) == 'G') {
if(g_toupper(*(++ptr)) == 'G') {
if(*(++ptr) == '=')
ptr++;
if(*ptr == '#')
defaultgroup = (word)(atoi(ptr+1)+0x8000u);
else
defaultgroup = (word)(isupper(*ptr) ? *ptr : 0);
defaultgroup = (word)(g_isupper(*ptr) ? *ptr : 0);
}
}
ptr = strtok(NULL, " \t");

View File

@@ -137,7 +137,7 @@ void gareafile::ReadIMail160(char* options, char* file, char* impath) {
if(AR.o_addr)
aa.aka = CAST(ftn_addr, CF->aka[AR.o_addr-1]);
aa.groupid = (char)toupper(AR.group);
aa.groupid = (char)g_toupper(AR.group);
aa.setdesc(AR.comment);
aa.setechoid(AR.aname);

View File

@@ -52,8 +52,8 @@ void gareafile::ReadQEchoFile(char* file, char* options, char* origin) {
if(isdigit(*ptr))
aa.groupid = 0x8000+atoi(ptr);
else if(isalpha(*ptr))
aa.groupid = toupper(*ptr);
else if(g_isalpha(*ptr))
aa.groupid = g_toupper(*ptr);
if((ptr = strtok(NULL, " \t")) != NULL) {
if(*ptr == '*') {

View File

@@ -141,8 +141,8 @@ void gareafile::ReadSpaceAr(const char* file) {
case CRC_GROUP:
if(isdigit(*val))
aa.groupid = 0x8000+atoi(val);
else if(isalpha(*val))
aa.groupid = toupper(*val);
else if(g_isalpha(*val))
aa.groupid = g_toupper(*val);
break;
case CRC_ENDAREA:
if(aa.basetype[0] != '\0')

View File

@@ -118,13 +118,13 @@ void gareafile::ReadSquishFile(char* path, char* file, char* options, char* orig
if(strnieql(p, "-$", 2)) {
aa.basetype = "SQUISH";
p += 2;
if((tolower(*p) == 'g') and isalpha(p[1])) {
if((g_tolower(*p) == 'g') and g_isalpha(p[1])) {
if(isdigit(p[1]))
aa.groupid = 0x8000+atoi(p+1);
else if(isalpha(p[1]))
aa.groupid = toupper(p[1]);
else if(g_isalpha(p[1]))
aa.groupid = g_toupper(p[1]);
}
else if(tolower(*p) == 'n') {
else if(g_tolower(*p) == 'n') {
key = ++p;
getkeyval(&key, &p);
aa.setdesc(key);
@@ -190,13 +190,13 @@ void gareafile::ReadSquish(char* tag) {
}
}
else {
if(toupper(*(++ptr)) == 'G') {
if(g_toupper(*(++ptr)) == 'G') {
if(*(++ptr) == '=')
ptr++;
if(*ptr == '#')
defaultgroup = (word)(atoi(ptr+1)+0x8000u);
else
defaultgroup = (word)(isupper(*ptr) ? *ptr : 0);
defaultgroup = (word)(g_isupper(*ptr) ? *ptr : 0);
}
}
ptr = strtok(NULL, " \t");

View File

@@ -234,7 +234,7 @@ void gareafile::ReadTimed(char* tag) {
AddBackslash(strcpy(path, ptr));
}
else {
if(toupper(*(++ptr)) == 'C') {
if(g_toupper(*(++ptr)) == 'C') {
if(*(++ptr) == '=')
ptr++;
strcpy(timedcfg, ptr);

View File

@@ -130,7 +130,7 @@ void gareafile::ReadTmail(char* tag) {
AddBackslash(strcpy(path, ptr));
}
else {
if(toupper(*(++ptr)) == 'C') {
if(g_toupper(*(++ptr)) == 'C') {
if(*(++ptr) == ':')
ptr++;
strcpy(tmailcfg, ptr);

View File

@@ -122,7 +122,7 @@ void gareafile::ReadTosScan(char* tag) {
while(fread(areafile, sizeof(TS_Areafile), 1, fp) == 1) {
if(not (areafile->deleted or areafile->passthru) and not strblank(areafile->echoname) and (areafile->board ? areafile->board < 201 : 1)) {
aa.reset();
aa.groupid = (char)toupper(areafile->groupid);
aa.groupid = (char)g_toupper(areafile->groupid);
aa.aka = shared->aka[areafile->akano];
aa.type = GMB_ECHO;
aa.attr = attribsecho;