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:
parent
ad8b2a9d36
commit
21b44b65d2
@ -10,6 +10,8 @@ ______________________________________________________________________
|
|||||||
Notes for GoldED+ 1.1.5, /snapshot/
|
Notes for GoldED+ 1.1.5, /snapshot/
|
||||||
______________________________________________________________________
|
______________________________________________________________________
|
||||||
|
|
||||||
|
- Case insensitive regexp should work on Win9x now.
|
||||||
|
|
||||||
+ New config file token LatinToLocal.
|
+ New config file token LatinToLocal.
|
||||||
Used to translate latin A-Za-z to local charset if one of neighbours
|
Used to translate latin A-Za-z to local charset if one of neighbours
|
||||||
is from local charset too.
|
is from local charset too.
|
||||||
|
@ -281,7 +281,7 @@ void AreaList::WriteAreaDef(const char* file) {
|
|||||||
maxpath = MaxV(maxpath, tmp);
|
maxpath = MaxV(maxpath, tmp);
|
||||||
if((*aa)->groupid() & 0x8000u)
|
if((*aa)->groupid() & 0x8000u)
|
||||||
sprintf(groupid, "#%u", (*aa)->groupid()&0x7FFF);
|
sprintf(groupid, "#%u", (*aa)->groupid()&0x7FFF);
|
||||||
else if(isupper((*aa)->groupid()))
|
else if(g_isupper((*aa)->groupid()))
|
||||||
*groupid = (char)(*aa)->groupid(), groupid[1] = NUL;
|
*groupid = (char)(*aa)->groupid(), groupid[1] = NUL;
|
||||||
else
|
else
|
||||||
*groupid = '0', groupid[1] = NUL;
|
*groupid = '0', groupid[1] = NUL;
|
||||||
@ -301,7 +301,7 @@ void AreaList::WriteAreaDef(const char* file) {
|
|||||||
sprintf(desc, "\"%s\"", (*aa)->desc());
|
sprintf(desc, "\"%s\"", (*aa)->desc());
|
||||||
if((*aa)->groupid() & 0x8000u)
|
if((*aa)->groupid() & 0x8000u)
|
||||||
sprintf(groupid, "#%u", (*aa)->groupid()&0x7FFF);
|
sprintf(groupid, "#%u", (*aa)->groupid()&0x7FFF);
|
||||||
else if(isupper((*aa)->groupid()))
|
else if(g_isupper((*aa)->groupid()))
|
||||||
*groupid = (char)(*aa)->groupid(), groupid[1] = NUL;
|
*groupid = (char)(*aa)->groupid(), groupid[1] = NUL;
|
||||||
else
|
else
|
||||||
*groupid = '0', groupid[1] = NUL;
|
*groupid = '0', groupid[1] = NUL;
|
||||||
|
@ -474,7 +474,7 @@ void AreaList::GetArea(char* def) {
|
|||||||
StripQuotes(desc); // Copy description, stripping quotes ("")
|
StripQuotes(desc); // Copy description, stripping quotes ("")
|
||||||
aa.setdesc(desc);
|
aa.setdesc(desc);
|
||||||
|
|
||||||
switch(toupper(*base)) { // Store area info
|
switch(g_toupper(*base)) { // Store area info
|
||||||
|
|
||||||
case '-':
|
case '-':
|
||||||
aa.basetype = "SEPARATOR";
|
aa.basetype = "SEPARATOR";
|
||||||
@ -859,7 +859,7 @@ void AreaList::ReadEcholist(char* val) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if(is_dz) {
|
else if(is_dz) {
|
||||||
if(not isalpha(*val) and (*val != ','))
|
if(not g_isalpha(*val) and (*val != ','))
|
||||||
continue;
|
continue;
|
||||||
tok(&key, &val);
|
tok(&key, &val);
|
||||||
}
|
}
|
||||||
@ -877,7 +877,7 @@ void AreaList::ReadEcholist(char* val) {
|
|||||||
}
|
}
|
||||||
for(area_iterator ap = idx.begin(); ap != idx.end(); ap++) {
|
for(area_iterator ap = idx.begin(); ap != idx.end(); ap++) {
|
||||||
if(strieql(key, (*ap)->echoid())) {
|
if(strieql(key, (*ap)->echoid())) {
|
||||||
(*ap)->set_groupid(toupper(*grp));
|
(*ap)->set_groupid(g_toupper(*grp));
|
||||||
if(desc)
|
if(desc)
|
||||||
(*ap)->set_desc(desc);
|
(*ap)->set_desc(desc);
|
||||||
break;
|
break;
|
||||||
|
@ -42,7 +42,7 @@ int getgroup(const char *key)
|
|||||||
if(*key == '#')
|
if(*key == '#')
|
||||||
return atoi(key+1)+0x8000u;
|
return atoi(key+1)+0x8000u;
|
||||||
else
|
else
|
||||||
return (isupper(*key) ? *key : 0);
|
return (g_isupper(*key) ? *key : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ int SwitchCfg(word crc, char k, char* v) {
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
// Switch the first letter of the keyword
|
// Switch the first letter of the keyword
|
||||||
switch(toupper(k)) {
|
switch(g_toupper(k)) {
|
||||||
case 'A': goto SwitchA;
|
case 'A': goto SwitchA;
|
||||||
case 'B': goto SwitchB;
|
case 'B': goto SwitchB;
|
||||||
case 'C': goto SwitchC;
|
case 'C': goto SwitchC;
|
||||||
@ -742,7 +742,7 @@ int ReadCfg(const char* cfgfile, int ignoreunknown) {
|
|||||||
|
|
||||||
val = strskip_wht(val);
|
val = strskip_wht(val);
|
||||||
|
|
||||||
if(isalpha(*val)) {
|
if(g_isalpha(*val)) {
|
||||||
|
|
||||||
// Extract key and val
|
// Extract key and val
|
||||||
crc = getkeyvalcrc(&key, &val);
|
crc = getkeyvalcrc(&key, &val);
|
||||||
|
@ -137,7 +137,7 @@ void CfgNodev7flags() {
|
|||||||
char* flagstring = t.First(val);
|
char* flagstring = t.First(val);
|
||||||
char* flagvals = t.Next();
|
char* flagvals = t.Next();
|
||||||
uint flagval;
|
uint flagval;
|
||||||
if(tolower(*flagvals) == 'b')
|
if(g_tolower(*flagvals) == 'b')
|
||||||
flagval = atoi(flagvals+1);
|
flagval = atoi(flagvals+1);
|
||||||
else {
|
else {
|
||||||
flagval = atoi(flagvals);
|
flagval = atoi(flagvals);
|
||||||
@ -168,7 +168,7 @@ void CfgNodev7modem() {
|
|||||||
char* modemstring = t.First(val);
|
char* modemstring = t.First(val);
|
||||||
char* modemvals = t.Next();
|
char* modemvals = t.Next();
|
||||||
int modemval;
|
int modemval;
|
||||||
if(tolower(*modemvals) == 'b')
|
if(g_tolower(*modemvals) == 'b')
|
||||||
modemval = atoi(modemvals+1);
|
modemval = atoi(modemvals+1);
|
||||||
else {
|
else {
|
||||||
modemval = atoi(modemvals);
|
modemval = atoi(modemvals);
|
||||||
|
@ -407,7 +407,7 @@ void CfgSeqOutRun() {
|
|||||||
CfgSeqOutRun_Error();
|
CfgSeqOutRun_Error();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
switch(tolower(*p)) {
|
switch(g_tolower(*p)) {
|
||||||
case 'y':
|
case 'y':
|
||||||
s *= 365;
|
s *= 365;
|
||||||
case 'd':
|
case 'd':
|
||||||
|
@ -966,7 +966,7 @@ static void SetKeybDefaults() {
|
|||||||
int k = 0;
|
int k = 0;
|
||||||
while(k < keys) {
|
while(k < keys) {
|
||||||
if(tmp->key <= 0xFF)
|
if(tmp->key <= 0xFF)
|
||||||
tmp->key = (gkey)tolower(tmp->key);
|
tmp->key = (gkey)g_tolower(tmp->key);
|
||||||
KeyCmdAdd(tmp->cmd, tmp->key, tmp->type);
|
KeyCmdAdd(tmp->cmd, tmp->key, tmp->type);
|
||||||
tmp++;
|
tmp++;
|
||||||
k++;
|
k++;
|
||||||
@ -1037,7 +1037,7 @@ int ReadKeysCfg(int force) {
|
|||||||
keyval = (gkey)_keyval;
|
keyval = (gkey)_keyval;
|
||||||
}
|
}
|
||||||
else if(strlen(ptr2) == 1)
|
else if(strlen(ptr2) == 1)
|
||||||
keyval = (gkey)tolower(*ptr2); // Always convert to lowercase internally
|
keyval = (gkey)g_tolower(*ptr2); // Always convert to lowercase internally
|
||||||
else {
|
else {
|
||||||
keycmd = SwitchKeyDefs(strCrc16(strupr(ptr2)), &keytype);
|
keycmd = SwitchKeyDefs(strCrc16(strupr(ptr2)), &keytype);
|
||||||
if(not keycmd or keytype) {
|
if(not keycmd or keytype) {
|
||||||
|
@ -658,7 +658,7 @@ void LoadLanguage(const char* file) {
|
|||||||
while(fgets((ptr=buf), sizeof(buf), fp)) {
|
while(fgets((ptr=buf), sizeof(buf), fp)) {
|
||||||
line++;
|
line++;
|
||||||
ptr = strskip_wht(ptr);
|
ptr = strskip_wht(ptr);
|
||||||
if(isalpha(*ptr)) {
|
if(g_isalpha(*ptr)) {
|
||||||
str = ptr;
|
str = ptr;
|
||||||
strtrim(str);
|
strtrim(str);
|
||||||
str = strskip_txt(str);
|
str = strskip_txt(str);
|
||||||
@ -715,7 +715,7 @@ bool ReadLangCfg(int force) {
|
|||||||
while(fgets((ptr=buf), sizeof(buf), fpi)) {
|
while(fgets((ptr=buf), sizeof(buf), fpi)) {
|
||||||
line++;
|
line++;
|
||||||
ptr = strskip_wht(ptr);
|
ptr = strskip_wht(ptr);
|
||||||
if(isalpha(*ptr)) {
|
if(g_isalpha(*ptr)) {
|
||||||
str = ptr;
|
str = ptr;
|
||||||
strtrim(str);
|
strtrim(str);
|
||||||
str = strskip_txt(str);
|
str = strskip_txt(str);
|
||||||
|
@ -193,7 +193,7 @@ void GPickArealist::dispbuf(char* buf, int areano) {
|
|||||||
if(groupid_width > 2)
|
if(groupid_width > 2)
|
||||||
sprintf(groupidbuf, "%u", area->groupid()&0x7FFF);
|
sprintf(groupidbuf, "%u", area->groupid()&0x7FFF);
|
||||||
}
|
}
|
||||||
else if(isupper(area->groupid()))
|
else if(g_isupper(area->groupid()))
|
||||||
sprintf(groupidbuf, "%c", (char)area->groupid());
|
sprintf(groupidbuf, "%c", (char)area->groupid());
|
||||||
}
|
}
|
||||||
int groupidwidth = strlen(groupidbuf);
|
int groupidwidth = strlen(groupidbuf);
|
||||||
@ -748,7 +748,7 @@ bool GPickArealist::handle_key() {
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
if(key < KK_Macro) {
|
if(key < KK_Macro) {
|
||||||
n = toupper(key & 0xFF);
|
n = g_toupper(key & 0xFF);
|
||||||
if((area_fuzidx < area_maxfuz) or (key == Key_BS)) {
|
if((area_fuzidx < area_maxfuz) or (key == Key_BS)) {
|
||||||
|
|
||||||
// Incremental search in the echoids
|
// Incremental search in the echoids
|
||||||
|
@ -43,7 +43,7 @@ static bool strncont(const char *beginword, const char *stylestopchars, int n)
|
|||||||
|
|
||||||
static bool in_ftn_domained_address(const char *ptr, const char *txt) {
|
static bool in_ftn_domained_address(const char *ptr, const char *txt) {
|
||||||
|
|
||||||
while((ptr != txt) and (not isspace(*ptr) and not isalpha(*ptr))) {
|
while((ptr != txt) and (not isspace(*ptr) and not g_isalpha(*ptr))) {
|
||||||
if(isdigit(ptr[0]) and ((ptr[1] == ':') or (ptr[1] == '/')) and isdigit(ptr[2]))
|
if(isdigit(ptr[0]) and ((ptr[1] == ':') or (ptr[1] == '/')) and isdigit(ptr[2]))
|
||||||
return true;
|
return true;
|
||||||
--ptr;
|
--ptr;
|
||||||
|
@ -1998,7 +1998,7 @@ void IEclass::ToUpper() {
|
|||||||
|
|
||||||
if(col < currline->txt.length()) {
|
if(col < currline->txt.length()) {
|
||||||
Undo->PushItem(EDIT_UNDO_OVR_CHAR);
|
Undo->PushItem(EDIT_UNDO_OVR_CHAR);
|
||||||
currline->txt[col] = toupper(currline->txt[col]);
|
currline->txt[col] = g_toupper(currline->txt[col]);
|
||||||
}
|
}
|
||||||
|
|
||||||
GFTRK(NULL);
|
GFTRK(NULL);
|
||||||
@ -2013,7 +2013,7 @@ void IEclass::ToLower() {
|
|||||||
|
|
||||||
if(col < currline->txt.length()) {
|
if(col < currline->txt.length()) {
|
||||||
Undo->PushItem(EDIT_UNDO_OVR_CHAR);
|
Undo->PushItem(EDIT_UNDO_OVR_CHAR);
|
||||||
currline->txt[col] = tolower(currline->txt[col]);
|
currline->txt[col] = g_tolower(currline->txt[col]);
|
||||||
}
|
}
|
||||||
|
|
||||||
GFTRK(NULL);
|
GFTRK(NULL);
|
||||||
@ -2028,10 +2028,10 @@ void IEclass::ToggleCase() {
|
|||||||
|
|
||||||
if(col < currline->txt.length()) {
|
if(col < currline->txt.length()) {
|
||||||
Undo->PushItem(EDIT_UNDO_OVR_CHAR);
|
Undo->PushItem(EDIT_UNDO_OVR_CHAR);
|
||||||
if(toupper(currline->txt[col]) == currline->txt[col])
|
if(g_toupper(currline->txt[col]) == currline->txt[col])
|
||||||
currline->txt[col] = tolower(currline->txt[col]);
|
currline->txt[col] = g_tolower(currline->txt[col]);
|
||||||
else
|
else
|
||||||
currline->txt[col] = toupper(currline->txt[col]);
|
currline->txt[col] = g_toupper(currline->txt[col]);
|
||||||
}
|
}
|
||||||
|
|
||||||
GFTRK(NULL);
|
GFTRK(NULL);
|
||||||
@ -2050,18 +2050,18 @@ void IEclass::ToggleCaseChar(gkey key,
|
|||||||
switch (key)
|
switch (key)
|
||||||
{
|
{
|
||||||
case KK_EditToLower:
|
case KK_EditToLower:
|
||||||
newchar = tolower(*it);
|
newchar = g_tolower(*it);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case KK_EditToUpper:
|
case KK_EditToUpper:
|
||||||
newchar = toupper(*it);
|
newchar = g_toupper(*it);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case KK_EditToggleCase:
|
case KK_EditToggleCase:
|
||||||
if (toupper(*it) == oldchar)
|
if (g_toupper(*it) == oldchar)
|
||||||
newchar = tolower(*it);
|
newchar = g_tolower(*it);
|
||||||
else
|
else
|
||||||
newchar = toupper(*it);
|
newchar = g_toupper(*it);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -259,7 +259,7 @@ bool inline samekey(gkey key1, gkey key2) {
|
|||||||
return true;
|
return true;
|
||||||
if((key1 > 0xFF) or (key2 > 0xFF))
|
if((key1 > 0xFF) or (key2 > 0xFF))
|
||||||
return false;
|
return false;
|
||||||
return (tolower(key1) == key2) or (tolower(key2) == key1);
|
return (g_tolower(key1) == key2) or (g_tolower(key2) == key1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ static void InitCmdline(char* val) {
|
|||||||
trueval = val;
|
trueval = val;
|
||||||
if(*val == NUL)
|
if(*val == NUL)
|
||||||
val = key+1;
|
val = key+1;
|
||||||
switch(toupper(*key)) {
|
switch(g_toupper(*key)) {
|
||||||
case 'C': // Use another Configfile
|
case 'C': // Use another Configfile
|
||||||
if(*val)
|
if(*val)
|
||||||
strcpy(cmdlinecfg, val);
|
strcpy(cmdlinecfg, val);
|
||||||
@ -94,7 +94,7 @@ static void InitCmdline(char* val) {
|
|||||||
break;
|
break;
|
||||||
case 'F':
|
case 'F':
|
||||||
cmdlineforce = make_bool_not(*val == '-');
|
cmdlineforce = make_bool_not(*val == '-');
|
||||||
if(toupper(key[1]) == 'F')
|
if(g_toupper(key[1]) == 'F')
|
||||||
cmdlineforce++;
|
cmdlineforce++;
|
||||||
break;
|
break;
|
||||||
case '?':
|
case '?':
|
||||||
@ -134,7 +134,7 @@ static void InitCmdline(char* val) {
|
|||||||
break;
|
break;
|
||||||
case 'V':
|
case 'V':
|
||||||
quiet = false;
|
quiet = false;
|
||||||
veryverbose = (toupper(key[1]) == 'V');
|
veryverbose = (g_toupper(key[1]) == 'V');
|
||||||
break;
|
break;
|
||||||
case 'W':
|
case 'W':
|
||||||
cmdlinewriteareas = make_bool_not(*val == '-');
|
cmdlinewriteareas = make_bool_not(*val == '-');
|
||||||
@ -318,7 +318,7 @@ static void kbputstr(const char* buf) {
|
|||||||
break;
|
break;
|
||||||
case '~':
|
case '~':
|
||||||
case '^':
|
case '^':
|
||||||
xkey = (gkey)(toupper(buf[++n]) - '@');
|
xkey = (gkey)(g_toupper(buf[++n]) - '@');
|
||||||
if(xkey)
|
if(xkey)
|
||||||
kbput(xkey);
|
kbput(xkey);
|
||||||
break;
|
break;
|
||||||
@ -974,13 +974,13 @@ void Initialize(int argc, char* argv[]) {
|
|||||||
int pos = 0;
|
int pos = 0;
|
||||||
char* p = CFG->arealistformat;
|
char* p = CFG->arealistformat;
|
||||||
while(*p) {
|
while(*p) {
|
||||||
char c = (char)toupper(*p);
|
char c = (char)g_toupper(*p);
|
||||||
char d = *(++p);
|
char d = *(++p);
|
||||||
int w = atoi(p);
|
int w = atoi(p);
|
||||||
while(isdigit(*p))
|
while(isdigit(*p))
|
||||||
p++;
|
p++;
|
||||||
if(pass == 1) {
|
if(pass == 1) {
|
||||||
if(isalpha(c)) {
|
if(g_isalpha(c)) {
|
||||||
switch(c) {
|
switch(c) {
|
||||||
case 'A': area_found = true; if(isdigit(d)) area_width = w; break;
|
case 'A': area_found = true; if(isdigit(d)) area_width = w; break;
|
||||||
case 'M': marked_found = true; if(isdigit(d)) marked_width = w; break;
|
case 'M': marked_found = true; if(isdigit(d)) marked_width = w; break;
|
||||||
|
@ -756,7 +756,7 @@ void KludgeDATE(GMsg* msg, const char* ptr) {
|
|||||||
if(isdigit(*ptr)) {
|
if(isdigit(*ptr)) {
|
||||||
day = atoi(ptr);
|
day = atoi(ptr);
|
||||||
ptr = strskip_wht(strskip_txt(ptr));
|
ptr = strskip_wht(strskip_txt(ptr));
|
||||||
if(isalpha(*ptr)) {
|
if(g_isalpha(*ptr)) {
|
||||||
month = str2mon(ptr);
|
month = str2mon(ptr);
|
||||||
if(month) {
|
if(month) {
|
||||||
ptr = strskip_wht(strskip_txt(ptr));
|
ptr = strskip_wht(strskip_txt(ptr));
|
||||||
@ -1383,7 +1383,7 @@ int ScanLine(GMsg* msg, Line* line, const char* ptr, int getvalue, int mask) {
|
|||||||
// Skip past "RFC" string, if any
|
// Skip past "RFC" string, if any
|
||||||
if(strnieql(kludge1, "RFC", 3) and (kludge1[3] != ':')) {
|
if(strnieql(kludge1, "RFC", 3) and (kludge1[3] != ':')) {
|
||||||
kludge1 += 3;
|
kludge1 += 3;
|
||||||
if(not isalpha(*kludge1))
|
if(not g_isalpha(*kludge1))
|
||||||
kludge1++;
|
kludge1++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1696,8 +1696,8 @@ void Latin2Local(char *str)
|
|||||||
byte left = i ? str[i-1] : 0;
|
byte left = i ? str[i-1] : 0;
|
||||||
byte right = str[i+1];
|
byte right = str[i+1];
|
||||||
|
|
||||||
if (((left >= 0x80) && (toupper(left) != tolower(left))) ||
|
if (((left >= 0x80) && (g_toupper(left) != g_tolower(left))) ||
|
||||||
((right >= 0x80) && (toupper(right) != tolower(right))))
|
((right >= 0x80) && (g_toupper(right) != g_tolower(right))))
|
||||||
{
|
{
|
||||||
str[i] = xch;
|
str[i] = xch;
|
||||||
|
|
||||||
@ -2101,7 +2101,7 @@ void MakeLineIndex(GMsg* msg, int margin, bool getvalue, bool header_recode) {
|
|||||||
char* kludge = ptr + (*ptr == CTRL_A ? 1 : 0);
|
char* kludge = ptr + (*ptr == CTRL_A ? 1 : 0);
|
||||||
if(strnieql(kludge, "RFC", 3)) {
|
if(strnieql(kludge, "RFC", 3)) {
|
||||||
kludge += 3;
|
kludge += 3;
|
||||||
if(not isalpha(*kludge))
|
if(not g_isalpha(*kludge))
|
||||||
kludge++;
|
kludge++;
|
||||||
}
|
}
|
||||||
while((*ptr != ' ') and (*ptr != ':') and *ptr)
|
while((*ptr != ' ') and (*ptr != ':') and *ptr)
|
||||||
|
@ -430,7 +430,7 @@ char* TokenXlat(int mode, char* input, GMsg* msg, GMsg* oldmsg, int __origarea)
|
|||||||
char buff[1024];
|
char buff[1024];
|
||||||
char token[1024];
|
char token[1024];
|
||||||
char fill = dst[5];
|
char fill = dst[5];
|
||||||
char align = toupper(dst[6]);
|
char align = g_toupper(dst[6]);
|
||||||
int size = atoi(dst+7);
|
int size = atoi(dst+7);
|
||||||
|
|
||||||
if (strchr("CLR", align))
|
if (strchr("CLR", align))
|
||||||
|
@ -56,7 +56,7 @@ std::string &strtrimline(std::string &p) {
|
|||||||
|
|
||||||
const char* get_subject_re_info(const char* s, uint32_t& n) {
|
const char* get_subject_re_info(const char* s, uint32_t& n) {
|
||||||
|
|
||||||
if(toupper(*s) == 'R' and tolower(s[1]) == 'e') {
|
if(g_toupper(*s) == 'R' and g_tolower(s[1]) == 'e') {
|
||||||
|
|
||||||
if(s[2] == ':') {
|
if(s[2] == ':') {
|
||||||
n = 1;
|
n = 1;
|
||||||
@ -99,7 +99,7 @@ void CheckSubject(GMsg* msg, char* subj) {
|
|||||||
#ifdef __UNIX__
|
#ifdef __UNIX__
|
||||||
if((*ptr == '/') and not strchr(ptr, ':')) { /* } */
|
if((*ptr == '/') and not strchr(ptr, ':')) { /* } */
|
||||||
#else
|
#else
|
||||||
if((in_range((char)tolower(*ptr), (char)'c', (char)'z') and (ptr[1] == ':')) or ((*ptr == '\\') and (ptr[1] == '\\'))) {
|
if((in_range((char)g_tolower(*ptr), (char)'c', (char)'z') and (ptr[1] == ':')) or ((*ptr == '\\') and (ptr[1] == '\\'))) {
|
||||||
#endif
|
#endif
|
||||||
// Autoattach
|
// Autoattach
|
||||||
msg->attr.att1();
|
msg->attr.att1();
|
||||||
|
@ -199,7 +199,7 @@ void Area::InitData() {
|
|||||||
if(groupid() & 0x8000u)
|
if(groupid() & 0x8000u)
|
||||||
sprintf(_groupid, "#%u", groupid() & 0x7FFF);
|
sprintf(_groupid, "#%u", groupid() & 0x7FFF);
|
||||||
else {
|
else {
|
||||||
_groupid[0] = (char)(isalpha(groupid()) ? groupid() : NUL);
|
_groupid[0] = (char)(g_isalpha(groupid()) ? groupid() : NUL);
|
||||||
_groupid[1] = NUL;
|
_groupid[1] = NUL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -244,7 +244,7 @@ void Area::RandomizeData(int mode) {
|
|||||||
if(groupid() & 0x8000u)
|
if(groupid() & 0x8000u)
|
||||||
sprintf(_groupid, "#%u", groupid() & 0x7FFF);
|
sprintf(_groupid, "#%u", groupid() & 0x7FFF);
|
||||||
else {
|
else {
|
||||||
_groupid[0] = (char)(isalpha(groupid()) ? groupid() : NUL);
|
_groupid[0] = (char)(g_isalpha(groupid()) ? groupid() : NUL);
|
||||||
_groupid[1] = NUL;
|
_groupid[1] = NUL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -74,7 +74,7 @@ const char* search_item_set(search_item& item, const char* s) {
|
|||||||
case '=': search_item_option(item.case_sensitive, s); break;
|
case '=': search_item_option(item.case_sensitive, s); break;
|
||||||
case '?':
|
case '?':
|
||||||
s++;
|
s++;
|
||||||
switch(tolower(*s)) {
|
switch(g_tolower(*s)) {
|
||||||
case 'r': item.type = gsearch::regex; break;
|
case 'r': item.type = gsearch::regex; break;
|
||||||
case 'w': item.type = gsearch::wildcard; break;
|
case 'w': item.type = gsearch::wildcard; break;
|
||||||
case 'p': item.type = gsearch::plain; break;
|
case 'p': item.type = gsearch::plain; break;
|
||||||
|
@ -63,7 +63,7 @@ bool is_user(const char* name) {
|
|||||||
|
|
||||||
inline int IsInitial(char c) {
|
inline int IsInitial(char c) {
|
||||||
|
|
||||||
return isalpha(c) or (c > 127);
|
return g_isalpha(c) or (c > 127);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -411,7 +411,7 @@ bool is_quote2(Line* line, const char* ptr)
|
|||||||
int nr = 0;
|
int nr = 0;
|
||||||
for (char *tmp = head; tmp < ptr; tmp++)
|
for (char *tmp = head; tmp < ptr; tmp++)
|
||||||
{
|
{
|
||||||
char ch = toupper(*tmp);
|
char ch = g_toupper(*tmp);
|
||||||
if ((ch >= 'A') && (ch <= 'Z'))
|
if ((ch >= 'A') && (ch <= 'Z'))
|
||||||
nr++;
|
nr++;
|
||||||
}
|
}
|
||||||
|
@ -297,7 +297,7 @@ void GMsgHeaderView::Paint() {
|
|||||||
while(ptr) {
|
while(ptr) {
|
||||||
if(*ptr == '^')
|
if(*ptr == '^')
|
||||||
ptr++;
|
ptr++;
|
||||||
if((isalpha(*ptr) and (ptr[1] == ':')) or (ptr[0] == '\\') or (ptr[0] == '/'))
|
if((g_isalpha(*ptr) and (ptr[1] == ':')) or (ptr[0] == '\\') or (ptr[0] == '/'))
|
||||||
strcpy(buf2, ptr);
|
strcpy(buf2, ptr);
|
||||||
else
|
else
|
||||||
sprintf(buf2, "%s%s", CFG->inboundpath, ptr);
|
sprintf(buf2, "%s%s", CFG->inboundpath, ptr);
|
||||||
|
@ -69,7 +69,7 @@ void gbmh::init(const char* pattern, bool ignorecase) {
|
|||||||
strupr(pat);
|
strupr(pat);
|
||||||
#else /* strupr() is wrong on windows 9x (patch from Ianos Gnatiuc 2:469/335.155) */
|
#else /* strupr() is wrong on windows 9x (patch from Ianos Gnatiuc 2:469/335.155) */
|
||||||
for(char *ptr = pat; *ptr; ptr++)
|
for(char *ptr = pat; *ptr; ptr++)
|
||||||
*ptr = toupper(*ptr);
|
*ptr = g_toupper(*ptr);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -80,12 +80,12 @@ void gbmh::init(const char* pattern, bool ignorecase) {
|
|||||||
for(i=0; i<patlen; i++) {
|
for(i=0; i<patlen; i++) {
|
||||||
skip[pat[i] & 0xff] = patlen - i - 1;
|
skip[pat[i] & 0xff] = patlen - i - 1;
|
||||||
if(ignore_case)
|
if(ignore_case)
|
||||||
skip[tolower((uint8_t)pat[i])] = patlen - i - 1;
|
skip[g_tolower((uint8_t)pat[i])] = patlen - i - 1;
|
||||||
}
|
}
|
||||||
char lastpatchar = pat[patlen - 1];
|
char lastpatchar = pat[patlen - 1];
|
||||||
skip[lastpatchar & 0xff] = INT_MAX;
|
skip[lastpatchar & 0xff] = INT_MAX;
|
||||||
if(ignore_case)
|
if(ignore_case)
|
||||||
skip[tolower((uint8_t)lastpatchar)] = INT_MAX;
|
skip[g_tolower((uint8_t)lastpatchar)] = INT_MAX;
|
||||||
|
|
||||||
// Horspool's fixed second shift
|
// Horspool's fixed second shift
|
||||||
skip2 = patlen;
|
skip2 = patlen;
|
||||||
@ -120,7 +120,7 @@ bool gbmh::find(const char* buffer) {
|
|||||||
const char* s = buffer + (i - j);
|
const char* s = buffer + (i - j);
|
||||||
|
|
||||||
if(ignore_case) {
|
if(ignore_case) {
|
||||||
while(--j >= 0 and toupper((uint8_t)s[j]) == pat[j])
|
while(--j >= 0 and g_toupper((uint8_t)s[j]) == pat[j])
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -46,7 +46,7 @@ dword strHash32(const char* s, bool __case) {
|
|||||||
|
|
||||||
while(*p) {
|
while(*p) {
|
||||||
|
|
||||||
hash = (hash << 4) + (__case ? tolower(*p) : *p);
|
hash = (hash << 4) + (__case ? g_tolower(*p) : *p);
|
||||||
|
|
||||||
g = hash & 0xF0000000UL;
|
g = hash & 0xF0000000UL;
|
||||||
if(g) {
|
if(g) {
|
||||||
|
@ -145,7 +145,7 @@ word getkeyvalcrc(char** key, char** val) {
|
|||||||
|
|
||||||
// Calculate CRC16 of keyword
|
// Calculate CRC16 of keyword
|
||||||
while(*p)
|
while(*p)
|
||||||
c = updCrc16((byte)toupper(*p++), c);
|
c = updCrc16((byte)g_toupper(*p++), c);
|
||||||
|
|
||||||
// Return keyword CRC
|
// Return keyword CRC
|
||||||
return c;
|
return c;
|
||||||
|
@ -39,7 +39,7 @@ word memCrc16(const void* _m, long l, bool __case, word mask) {
|
|||||||
|
|
||||||
if(__case) {
|
if(__case) {
|
||||||
for(n=0; n<l; n++)
|
for(n=0; n<l; n++)
|
||||||
crc = updCrc16(toupper(*m++), crc);
|
crc = updCrc16(g_toupper(*m++), crc);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
for(n=0; n<l; n++)
|
for(n=0; n<l; n++)
|
||||||
|
@ -40,7 +40,7 @@ dword memCrc32(const void* _m, long l, bool __case, dword mask) {
|
|||||||
|
|
||||||
if(__case) {
|
if(__case) {
|
||||||
for(n=0; n<l; n++)
|
for(n=0; n<l; n++)
|
||||||
crc = updCrc32(toupper(*m++), crc);
|
crc = updCrc32(g_toupper(*m++), crc);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
for(n=0; n<l; n++)
|
for(n=0; n<l; n++)
|
||||||
|
@ -38,7 +38,7 @@ word strCrc16(const char* s, bool __case, word mask) {
|
|||||||
|
|
||||||
if(__case) {
|
if(__case) {
|
||||||
while(*s)
|
while(*s)
|
||||||
crc = updCrc16(toupper(*s++), crc);
|
crc = updCrc16(g_toupper(*s++), crc);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
while(*s)
|
while(*s)
|
||||||
@ -58,7 +58,7 @@ word strCrc16c(const char* s, bool __case, word mask) {
|
|||||||
|
|
||||||
if(__case) {
|
if(__case) {
|
||||||
while(*s)
|
while(*s)
|
||||||
crc = updCrc16c(toupper(*s++), crc);
|
crc = updCrc16c(g_toupper(*s++), crc);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
while(*s)
|
while(*s)
|
||||||
|
@ -38,7 +38,7 @@ dword strCrc32(const char* s, bool __case, dword mask) {
|
|||||||
|
|
||||||
if(__case) {
|
if(__case) {
|
||||||
while(*s)
|
while(*s)
|
||||||
crc = updCrc32(toupper(*s++), crc);
|
crc = updCrc32(g_toupper(*s++), crc);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
while(*s)
|
while(*s)
|
||||||
|
@ -41,19 +41,19 @@
|
|||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#if defined(__EMX__)
|
#if defined(__EMX__)
|
||||||
#include <sys/nls.h>
|
#include <sys/nls.h>
|
||||||
#define tolower(c) _nls_tolower((uint8_t)(c))
|
#define g_tolower(c) _nls_tolower((uint8_t)(c))
|
||||||
#define toupper(c) _nls_toupper((uint8_t)(c))
|
#define g_toupper(c) _nls_toupper((uint8_t)(c))
|
||||||
#elif defined(__WIN32__)
|
#elif defined(__WIN32__)
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
extern char tl[256], tu[256];
|
extern char tl[256], tu[256];
|
||||||
__inline__ int tolower(int c) { return tl[c]; }
|
__inline__ int g_tolower(int c) { return tl[c]; }
|
||||||
__inline__ int toupper(int c) { return tu[c]; }
|
__inline__ int g_toupper(int c) { return tu[c]; }
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
extern char tl[256], tu[256];
|
extern char tl[256], tu[256];
|
||||||
#define tolower(c) tl[(int)(uint8_t)(c)]
|
#define g_tolower(c) tl[(int)(uint8_t)(c)]
|
||||||
#define toupper(c) tu[(int)(uint8_t)(c)]
|
#define g_toupper(c) tu[(int)(uint8_t)(c)]
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -64,14 +64,47 @@ extern char tl[256], tu[256];
|
|||||||
* they don't match they treated as characters
|
* they don't match they treated as characters
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if defined(__WIN32__)
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
__inline__ int g_islower(int c)
|
||||||
extern __inline__ int isxalnum(char c) {
|
{
|
||||||
return isascii(c) ? isalnum(c) : (c != tolower(c)) || (c != toupper(c));
|
return isascii(c) ? islower(c) : (c == g_tolower(c)) && (c != g_toupper(c));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__inline__ int g_isupper(int c)
|
||||||
|
{
|
||||||
|
return isascii(c) ? isupper(c) : (c != g_tolower(c)) && (c == g_toupper(c));
|
||||||
|
}
|
||||||
|
|
||||||
|
__inline__ int g_isalpha(int c)
|
||||||
|
{
|
||||||
|
return isascii(c) ? isalpha(c) : (c != g_tolower(c)) || (c != g_toupper(c));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
#define g_islower(c) (isascii(c) ? islower(c) : ((c) == g_tolower(c)) && ((c) != g_toupper(c)))
|
||||||
|
#define g_isupper(c) (isascii(c) ? isupper(c) : ((c) != g_tolower(c)) && ((c) == g_toupper(c)))
|
||||||
|
#define g_isalpha(c) (isascii(c) ? isalpha(c) : ((c) != g_tolower(c)) || ((c) != g_toupper(c)))
|
||||||
|
#endif //#ifdef __cplusplus
|
||||||
|
|
||||||
|
#else
|
||||||
|
#define g_islower islower
|
||||||
|
#define g_isupper isupper
|
||||||
|
#define g_isalpha isalpha
|
||||||
|
#endif //#if defined(__WIN32__)
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
__inline__ int isxalnum(int c)
|
||||||
|
{
|
||||||
|
return isascii(c) ? isalnum(c) : (c != g_tolower(c)) || (c != g_toupper(c));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
#define isxalnum(c) (isascii(c) ? isalnum(c) : ((c) != g_tolower(c)) || ((c) != g_toupper(c)))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __BEOS__
|
#ifdef __BEOS__
|
||||||
|
@ -168,7 +168,7 @@ int is_dir(const char* path) {
|
|||||||
|
|
||||||
// Check if it's a root path (X:\)
|
// Check if it's a root path (X:\)
|
||||||
#if defined(__HAVE_DRIVES__)
|
#if defined(__HAVE_DRIVES__)
|
||||||
if(isalpha(path[0]) and (path[1] == ':') and isslash(path[2]) and (path[3] == NUL))
|
if(g_isalpha(path[0]) and (path[1] == ':') and isslash(path[2]) and (path[3] == NUL))
|
||||||
return true; // The root is a directory
|
return true; // The root is a directory
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -226,7 +226,7 @@ void MakePathname(char* pathname, const char* path, const char* name) {
|
|||||||
have_path = true;
|
have_path = true;
|
||||||
#if defined(__HAVE_DRIVES__)
|
#if defined(__HAVE_DRIVES__)
|
||||||
// Check if it's a root path (X:\)
|
// Check if it's a root path (X:\)
|
||||||
else if(isalpha(tmpname[0]) and (tmpname[1] == ':') and isslash(tmpname[2]))
|
else if(g_isalpha(tmpname[0]) and (tmpname[1] == ':') and isslash(tmpname[2]))
|
||||||
have_path = true; // The root is a directory
|
have_path = true; // The root is a directory
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -416,7 +416,7 @@ int gchdir(const char* dir) {
|
|||||||
_chdrive(*dir);
|
_chdrive(*dir);
|
||||||
#else
|
#else
|
||||||
uint drives;
|
uint drives;
|
||||||
_dos_setdrive(toupper(*dir)-'@', &drives);
|
_dos_setdrive(g_toupper(*dir)-'@', &drives);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -75,7 +75,7 @@ int ftn_fidouser_nodelist_index::namecmp() const {
|
|||||||
int n = 1;
|
int n = 1;
|
||||||
int d;
|
int d;
|
||||||
while(1) {
|
while(1) {
|
||||||
d = tolower(*a) - tolower(*b);
|
d = g_tolower(*a) - g_tolower(*b);
|
||||||
if((d != 0) or (*a == NUL) or (*b == NUL))
|
if((d != 0) or (*a == NUL) or (*b == NUL))
|
||||||
break;
|
break;
|
||||||
a++;
|
a++;
|
||||||
|
@ -172,7 +172,7 @@ int ftn_golded_nodelist_index::namecmp() const {
|
|||||||
int n = 1;
|
int n = 1;
|
||||||
int d;
|
int d;
|
||||||
while(1) {
|
while(1) {
|
||||||
d = tolower(*a) - tolower(*b);
|
d = g_tolower(*a) - g_tolower(*b);
|
||||||
if((d != 0) or (*a == NUL) or (*b == NUL))
|
if((d != 0) or (*a == NUL) or (*b == NUL))
|
||||||
break;
|
break;
|
||||||
a++;
|
a++;
|
||||||
|
@ -141,7 +141,7 @@ int ftn_version7_nodelist_index::namecmp() const {
|
|||||||
int n = 1;
|
int n = 1;
|
||||||
int d;
|
int d;
|
||||||
while(1) {
|
while(1) {
|
||||||
d = tolower((uint8_t)*a) - tolower((uint8_t)*b);
|
d = g_tolower((uint8_t)*a) - g_tolower((uint8_t)*b);
|
||||||
if((d != 0) or (*a == NUL) or (*b == NUL))
|
if((d != 0) or (*a == NUL) or (*b == NUL))
|
||||||
break;
|
break;
|
||||||
a++;
|
a++;
|
||||||
|
@ -140,7 +140,7 @@ bool gfuzzy::findnext() {
|
|||||||
if(casing)
|
if(casing)
|
||||||
charmatch = pattern[i] == text[textloc];
|
charmatch = pattern[i] == text[textloc];
|
||||||
else
|
else
|
||||||
charmatch = toupper(pattern[i]) == toupper(text[textloc]);
|
charmatch = g_toupper(pattern[i]) == g_toupper(text[textloc]);
|
||||||
int a = ldiff[i] + (charmatch ? 0 : 1);
|
int a = ldiff[i] + (charmatch ? 0 : 1);
|
||||||
int b = ldiff[i+1] + 1;
|
int b = ldiff[i+1] + 1;
|
||||||
int c = rdiff[i] + 1;
|
int c = rdiff[i] + 1;
|
||||||
|
@ -940,7 +940,7 @@ int gkbd_nt2bios(INPUT_RECORD& inp) {
|
|||||||
else {
|
else {
|
||||||
// If it is a letter key, use the ASCII value supplied
|
// If it is a letter key, use the ASCII value supplied
|
||||||
// by NT to take into account the CapsLock state.
|
// by NT to take into account the CapsLock state.
|
||||||
if(isupper(keycode) or (k->normal == -1))
|
if(g_isupper(keycode) or (k->normal == -1))
|
||||||
c = ascii;
|
c = ascii;
|
||||||
else
|
else
|
||||||
c = k->normal;
|
c = k->normal;
|
||||||
@ -1087,7 +1087,7 @@ gkey kbxget_raw(int mode) {
|
|||||||
k = 0x7800 + ((key2 - '1') << 8);
|
k = 0x7800 + ((key2 - '1') << 8);
|
||||||
else if(key2 == '0')
|
else if(key2 == '0')
|
||||||
k = 0x8100;
|
k = 0x8100;
|
||||||
else if(isalpha(key2))
|
else if(g_isalpha(key2))
|
||||||
k = (scancode_table[key2]);
|
k = (scancode_table[key2]);
|
||||||
else if(key2 == '\010')
|
else if(key2 == '\010')
|
||||||
k = Key_A_BS;
|
k = Key_A_BS;
|
||||||
@ -1807,8 +1807,8 @@ int setonkey(gkey keycode, VfvCP func, gkey pass) {
|
|||||||
gkey key_tolower(gkey __keycode) {
|
gkey key_tolower(gkey __keycode) {
|
||||||
|
|
||||||
byte &ascii = KCodAsc(__keycode);
|
byte &ascii = KCodAsc(__keycode);
|
||||||
if(isupper(ascii))
|
if(g_isupper(ascii))
|
||||||
ascii = tolower(ascii);
|
ascii = g_tolower(ascii);
|
||||||
return __keycode;
|
return __keycode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ static char touplow(char* str, char* pos, char ch) {
|
|||||||
char i;
|
char i;
|
||||||
|
|
||||||
if(pos == str)
|
if(pos == str)
|
||||||
return toupper(ch);
|
return g_toupper(ch);
|
||||||
|
|
||||||
switch(*(pos-1)) { // check previous character
|
switch(*(pos-1)) { // check previous character
|
||||||
case ' ': // see if it is a separator
|
case ' ': // see if it is a separator
|
||||||
@ -46,10 +46,10 @@ static char touplow(char* str, char* pos, char ch) {
|
|||||||
case ',':
|
case ',':
|
||||||
case '.':
|
case '.':
|
||||||
case '/':
|
case '/':
|
||||||
i = (char)toupper(ch); // if it is, convert to upper
|
i = (char)g_toupper(ch); // if it is, convert to upper
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
i = (char)tolower(ch); // otherwise, convert to lower
|
i = (char)g_tolower(ch); // otherwise, convert to lower
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -127,7 +127,7 @@ int strnicmpw(const char* str1, const char* str2, int len) {
|
|||||||
else if(str1[n] == '*')
|
else if(str1[n] == '*')
|
||||||
return 0;
|
return 0;
|
||||||
// Compare chars
|
// Compare chars
|
||||||
else if((cmp = compare_two(toupper(str1[n]), toupper(str2[n]))) != 0)
|
else if((cmp = compare_two(g_toupper(str1[n]), g_toupper(str2[n]))) != 0)
|
||||||
return cmp;
|
return cmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -605,7 +605,7 @@ char* strupr(char* s) {
|
|||||||
|
|
||||||
char* p = s;
|
char* p = s;
|
||||||
while(*p) {
|
while(*p) {
|
||||||
*p = toupper(*p);
|
*p = g_toupper(*p);
|
||||||
p++;
|
p++;
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
@ -615,7 +615,7 @@ char* strlwr(char* s) {
|
|||||||
|
|
||||||
char* p = s;
|
char* p = s;
|
||||||
while(*p) {
|
while(*p) {
|
||||||
*p = tolower(*p);
|
*p = g_tolower(*p);
|
||||||
p++;
|
p++;
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
|
@ -283,9 +283,9 @@ int str2mon(const char* ptr) {
|
|||||||
|
|
||||||
int mon;
|
int mon;
|
||||||
|
|
||||||
switch(toupper(*ptr)) {
|
switch(g_toupper(*ptr)) {
|
||||||
case 'A':
|
case 'A':
|
||||||
if(toupper(ptr[1]) == 'P')
|
if(g_toupper(ptr[1]) == 'P')
|
||||||
mon = 4;
|
mon = 4;
|
||||||
else
|
else
|
||||||
mon = 8;
|
mon = 8;
|
||||||
@ -297,15 +297,15 @@ int str2mon(const char* ptr) {
|
|||||||
mon = 2;
|
mon = 2;
|
||||||
break;
|
break;
|
||||||
case 'J':
|
case 'J':
|
||||||
if(toupper(ptr[1]) == 'A')
|
if(g_toupper(ptr[1]) == 'A')
|
||||||
mon = 1;
|
mon = 1;
|
||||||
else if(toupper(ptr[2]) == 'L')
|
else if(g_toupper(ptr[2]) == 'L')
|
||||||
mon = 7;
|
mon = 7;
|
||||||
else
|
else
|
||||||
mon = 6;
|
mon = 6;
|
||||||
break;
|
break;
|
||||||
case 'M':
|
case 'M':
|
||||||
if(toupper(ptr[2]) == 'R')
|
if(g_toupper(ptr[2]) == 'R')
|
||||||
mon = 3;
|
mon = 3;
|
||||||
else
|
else
|
||||||
mon = 5;
|
mon = 5;
|
||||||
@ -405,7 +405,7 @@ time32_t FidoTimeToUnix(char* ptr) {
|
|||||||
if(isdigit(*ptr)) {
|
if(isdigit(*ptr)) {
|
||||||
day = atoi(ptr);
|
day = atoi(ptr);
|
||||||
ptr = strskip_wht(strskip_txt(ptr));
|
ptr = strskip_wht(strskip_txt(ptr));
|
||||||
if(isalpha(*ptr)) {
|
if(g_isalpha(*ptr)) {
|
||||||
month = str2mon(ptr);
|
month = str2mon(ptr);
|
||||||
if(month) {
|
if(month) {
|
||||||
ptr = strskip_wht(strskip_txt(ptr));
|
ptr = strskip_wht(strskip_txt(ptr));
|
||||||
|
@ -38,7 +38,7 @@ int GetYesno(const char* value) {
|
|||||||
if(isdigit(*value))
|
if(isdigit(*value))
|
||||||
return atoi(value);
|
return atoi(value);
|
||||||
|
|
||||||
switch(toupper(*value)) {
|
switch(g_toupper(*value)) {
|
||||||
|
|
||||||
case NUL: // Blank
|
case NUL: // Blank
|
||||||
case 'T': // True
|
case 'T': // True
|
||||||
@ -50,15 +50,15 @@ int GetYesno(const char* value) {
|
|||||||
return NO;
|
return NO;
|
||||||
|
|
||||||
case 'O': // On or Off
|
case 'O': // On or Off
|
||||||
if(toupper(value[1]) == 'N')
|
if(g_toupper(value[1]) == 'N')
|
||||||
return YES;
|
return YES;
|
||||||
else
|
else
|
||||||
return NO;
|
return NO;
|
||||||
|
|
||||||
case 'A': // Always, Ask or Auto
|
case 'A': // Always, Ask or Auto
|
||||||
if(toupper(value[1]) == 'L')
|
if(g_toupper(value[1]) == 'L')
|
||||||
return ALWAYS;
|
return ALWAYS;
|
||||||
else if(toupper(value[1]) == 'S')
|
else if(g_toupper(value[1]) == 'S')
|
||||||
return ASK;
|
return ASK;
|
||||||
else
|
else
|
||||||
return GAUTO;
|
return GAUTO;
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
uint32_t atoulx(const char* s);
|
uint32_t atoulx(const char* s);
|
||||||
|
|
||||||
inline word atow(const char* p) { return (word)atoi(p); }
|
inline word atow(const char* p) { return (word)atoi(p); }
|
||||||
inline int xtoi(char c) { return isdigit(c) ? (c - '0') : (toupper(c) - ('A' - 10)); }
|
inline int xtoi(char c) { return isdigit(c) ? (c - '0') : (g_toupper(c) - ('A' - 10)); }
|
||||||
inline int atox(const char* s) { return (int)atoulx(s); }
|
inline int atox(const char* s) { return (int)atoulx(s); }
|
||||||
|
|
||||||
char* ltob(char* dst, uint32_t value, int fill=32);
|
char* ltob(char* dst, uint32_t value, int fill=32);
|
||||||
|
@ -64,9 +64,6 @@ int g_put_clip_text(const char *cd);
|
|||||||
void g_get_ostitle_name(char *);
|
void g_get_ostitle_name(char *);
|
||||||
void g_set_ostitle_name(char *, int);
|
void g_set_ostitle_name(char *, int);
|
||||||
|
|
||||||
char g_tolower(char);
|
|
||||||
char g_toupper(char);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -105,7 +105,7 @@ int gwildmatch::match_internal(const char* text, const char* pattern, bool ignor
|
|||||||
matched = false;
|
matched = false;
|
||||||
if(p[1] == ']' or p[1] == '-') {
|
if(p[1] == ']' or p[1] == '-') {
|
||||||
if(ignorecase) {
|
if(ignorecase) {
|
||||||
if(tolower(*++p) == tolower(*text))
|
if(g_tolower(*++p) == g_tolower(*text))
|
||||||
matched = true;
|
matched = true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -116,7 +116,7 @@ int gwildmatch::match_internal(const char* text, const char* pattern, bool ignor
|
|||||||
for(last = *p; *++p and *p != ']'; last = *p) {
|
for(last = *p; *++p and *p != ']'; last = *p) {
|
||||||
// This next line requires a good C compiler
|
// This next line requires a good C compiler
|
||||||
if(ignorecase) {
|
if(ignorecase) {
|
||||||
if(*p == '-' and p[1] != ']' ? tolower(*text) <= tolower(*++p) and tolower(*text) >= tolower(last) : tolower(*text) == tolower(*p))
|
if(*p == '-' and p[1] != ']' ? g_tolower(*text) <= g_tolower(*++p) and g_tolower(*text) >= g_tolower(last) : g_tolower(*text) == g_tolower(*p))
|
||||||
matched = true;
|
matched = true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -133,7 +133,7 @@ int gwildmatch::match_internal(const char* text, const char* pattern, bool ignor
|
|||||||
// FALLTHROUGH
|
// FALLTHROUGH
|
||||||
default:
|
default:
|
||||||
if(ignorecase) {
|
if(ignorecase) {
|
||||||
if(tolower(*text) != tolower(*p))
|
if(g_tolower(*text) != g_tolower(*p))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -186,7 +186,7 @@ bool strwild(const char* str, const char* wild) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(toupper(*str) == toupper(*wild) or *wild == '?') {
|
else if(g_toupper(*str) == g_toupper(*wild) or *wild == '?') {
|
||||||
wild++;
|
wild++;
|
||||||
str++;
|
str++;
|
||||||
}
|
}
|
||||||
|
@ -1216,7 +1216,7 @@ int wmenuget() {
|
|||||||
item=citem->next;
|
item=citem->next;
|
||||||
for(;;) {
|
for(;;) {
|
||||||
while(item!=NULL) {
|
while(item!=NULL) {
|
||||||
if ((toupper(ch)==toupper(item->schar)) && !(item->fmask & M_NOSEL))
|
if ((g_toupper(ch)==g_toupper(item->schar)) && !(item->fmask & M_NOSEL))
|
||||||
{
|
{
|
||||||
if (!gwin.menu->hotkey) _overtagid = item->tagid;
|
if (!gwin.menu->hotkey) _overtagid = item->tagid;
|
||||||
goto FARBREAK;
|
goto FARBREAK;
|
||||||
|
@ -678,15 +678,15 @@ int wpickstr(int srow, int scol, int erow, int ecol, int btype, int bordattr, in
|
|||||||
// position for the item that begins with the same ASCII
|
// position for the item that begins with the same ASCII
|
||||||
// character as the keypress. If not found after current
|
// character as the keypress. If not found after current
|
||||||
// position, search from the beginning for a match
|
// position, search from the beginning for a match
|
||||||
ch = (char)toupper((char)xch);
|
ch = (char)g_toupper((char)xch);
|
||||||
if(!ch)
|
if(!ch)
|
||||||
break;
|
break;
|
||||||
for(i=r.curr+1; i<r.numelems; i++)
|
for(i=r.curr+1; i<r.numelems; i++)
|
||||||
if(ch==toupper(strarr[i][quickpos]))
|
if(ch==g_toupper(strarr[i][quickpos]))
|
||||||
break;
|
break;
|
||||||
if(i==r.numelems) {
|
if(i==r.numelems) {
|
||||||
for(i=0;i<r.curr;i++)
|
for(i=0;i<r.curr;i++)
|
||||||
if(ch==toupper(strarr[i][quickpos]))
|
if(ch==g_toupper(strarr[i][quickpos]))
|
||||||
break;
|
break;
|
||||||
if(i==r.curr)
|
if(i==r.curr)
|
||||||
continue;
|
continue;
|
||||||
|
@ -1053,10 +1053,10 @@ bool gwinput::field::overwrite_char(char ch) {
|
|||||||
|
|
||||||
switch(conversion) {
|
switch(conversion) {
|
||||||
case gwinput::cvt_lowercase:
|
case gwinput::cvt_lowercase:
|
||||||
ch = (char)tolower(ch);
|
ch = (char)g_tolower(ch);
|
||||||
break;
|
break;
|
||||||
case gwinput::cvt_uppercase:
|
case gwinput::cvt_uppercase:
|
||||||
ch = (char)toupper(ch);
|
ch = (char)g_toupper(ch);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -220,8 +220,8 @@ void gareafile::ReadCrashmailCfg(const char* file) {
|
|||||||
if(jbstrcpy(tmp, buf, 100, &jbcpos)) {
|
if(jbstrcpy(tmp, buf, 100, &jbcpos)) {
|
||||||
if(isdigit(tmp[0]))
|
if(isdigit(tmp[0]))
|
||||||
aa.groupid = 0x8000+atoi(tmp);
|
aa.groupid = 0x8000+atoi(tmp);
|
||||||
else if(isalpha(tmp[0]))
|
else if(g_isalpha(tmp[0]))
|
||||||
aa.groupid = toupper(tmp[0]);
|
aa.groupid = g_toupper(tmp[0]);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@ void gareafile::ReadDB130(char* tag, char* dbpath) {
|
|||||||
|
|
||||||
if(AA1.allocated and strchr("QFqf", AA2.msgbase)) {
|
if(AA1.allocated and strchr("QFqf", AA2.msgbase)) {
|
||||||
aa.reset();
|
aa.reset();
|
||||||
switch(toupper(AA2.msgbase)) {
|
switch(g_toupper(AA2.msgbase)) {
|
||||||
case 'Q':
|
case 'Q':
|
||||||
aa.basetype = "HUDSON";
|
aa.basetype = "HUDSON";
|
||||||
aa.board = AA2.board;
|
aa.board = AA2.board;
|
||||||
@ -76,7 +76,7 @@ void gareafile::ReadDB130(char* tag, char* dbpath) {
|
|||||||
aa.setpath(STRNP2C(AA2.path));
|
aa.setpath(STRNP2C(AA2.path));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
switch(toupper(AA2.kind)) {
|
switch(g_toupper(AA2.kind)) {
|
||||||
case 'N':
|
case 'N':
|
||||||
aa.type = GMB_NET;
|
aa.type = GMB_NET;
|
||||||
aa.attr = attribsnet;
|
aa.attr = attribsnet;
|
||||||
@ -127,7 +127,7 @@ void gareafile::ReadDB1046(char* file, char* tag) {
|
|||||||
while(fread(ADF, sizeof(DB1046_ADF), 1, fp) == 1) {
|
while(fread(ADF, sizeof(DB1046_ADF), 1, fp) == 1) {
|
||||||
if(ADF->allocated and strchr("QFqf", ADF->msgbase)) {
|
if(ADF->allocated and strchr("QFqf", ADF->msgbase)) {
|
||||||
aa.reset();
|
aa.reset();
|
||||||
switch(toupper(ADF->msgbase)) {
|
switch(g_toupper(ADF->msgbase)) {
|
||||||
case 'Q':
|
case 'Q':
|
||||||
aa.basetype = "HUDSON";
|
aa.basetype = "HUDSON";
|
||||||
aa.board = ADF->board;
|
aa.board = ADF->board;
|
||||||
@ -137,7 +137,7 @@ void gareafile::ReadDB1046(char* file, char* tag) {
|
|||||||
aa.setpath(STRNP2C(ADF->path));
|
aa.setpath(STRNP2C(ADF->path));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
switch(toupper(ADF->kind)) {
|
switch(g_toupper(ADF->kind)) {
|
||||||
case 'N':
|
case 'N':
|
||||||
aa.type = GMB_NET;
|
aa.type = GMB_NET;
|
||||||
aa.attr = attribsnet;
|
aa.attr = attribsnet;
|
||||||
@ -190,7 +190,7 @@ void gareafile::ReadDB1047A22(char* file, int reclen, char* tag) {
|
|||||||
while(fread(ADF, reclen, 1, fp) == 1) {
|
while(fread(ADF, reclen, 1, fp) == 1) {
|
||||||
if(ADF->allocated and strchr("QFqf", ADF->msgbase)) {
|
if(ADF->allocated and strchr("QFqf", ADF->msgbase)) {
|
||||||
aa.reset();
|
aa.reset();
|
||||||
switch(toupper(ADF->msgbase)) {
|
switch(g_toupper(ADF->msgbase)) {
|
||||||
case 'Q':
|
case 'Q':
|
||||||
aa.basetype = "HUDSON";
|
aa.basetype = "HUDSON";
|
||||||
aa.board = ADF->board;
|
aa.board = ADF->board;
|
||||||
@ -200,7 +200,7 @@ void gareafile::ReadDB1047A22(char* file, int reclen, char* tag) {
|
|||||||
aa.setpath(STRNP2C(ADF->path));
|
aa.setpath(STRNP2C(ADF->path));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
switch(toupper(ADF->kind)) {
|
switch(g_toupper(ADF->kind)) {
|
||||||
case 'N':
|
case 'N':
|
||||||
aa.type = GMB_NET;
|
aa.type = GMB_NET;
|
||||||
aa.attr = attribsnet;
|
aa.attr = attribsnet;
|
||||||
@ -254,7 +254,7 @@ void gareafile::ReadDB2011(char* file, int reclen, char* tag) {
|
|||||||
while(fread(ADF, reclen, 1, fp) == 1) {
|
while(fread(ADF, reclen, 1, fp) == 1) {
|
||||||
if(ADF->allocated and strchr("QFqf", ADF->msgbase)) {
|
if(ADF->allocated and strchr("QFqf", ADF->msgbase)) {
|
||||||
aa.reset();
|
aa.reset();
|
||||||
switch(toupper(ADF->msgbase)) {
|
switch(g_toupper(ADF->msgbase)) {
|
||||||
case 'Q':
|
case 'Q':
|
||||||
if(ADF->board < 1 or ADF->board > 200)
|
if(ADF->board < 1 or ADF->board > 200)
|
||||||
continue; // Bad area number
|
continue; // Bad area number
|
||||||
@ -266,7 +266,7 @@ void gareafile::ReadDB2011(char* file, int reclen, char* tag) {
|
|||||||
aa.setpath(STRNP2C(ADF->path));
|
aa.setpath(STRNP2C(ADF->path));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
switch(toupper(ADF->kind)) {
|
switch(g_toupper(ADF->kind)) {
|
||||||
case 'N':
|
case 'N':
|
||||||
aa.type = GMB_NET;
|
aa.type = GMB_NET;
|
||||||
aa.attr = attribsnet;
|
aa.attr = attribsnet;
|
||||||
@ -342,7 +342,7 @@ void gareafile::ReadDBridge(char* tag) {
|
|||||||
// Read netmail storage method etc
|
// Read netmail storage method etc
|
||||||
for(line=1; line <= 2; line++)
|
for(line=1; line <= 2; line++)
|
||||||
fgets(buf, 255, fp);
|
fgets(buf, 255, fp);
|
||||||
type = (char)toupper(*buf);
|
type = (char)g_toupper(*buf);
|
||||||
|
|
||||||
// Fido-style netmail path
|
// Fido-style netmail path
|
||||||
line++;
|
line++;
|
||||||
|
@ -185,7 +185,7 @@ void gareafile::ReadFMail098(FILE* fp, char* path, char* file, char* options) {
|
|||||||
grp >>= 1;
|
grp >>= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
//aa.groupid = (char)toupper((char)ar->group);
|
//aa.groupid = (char)g_toupper((char)ar->group);
|
||||||
aa.aka = cfg->akaList[ar->address].nodeNum;
|
aa.aka = cfg->akaList[ar->address].nodeNum;
|
||||||
if(ar->options.local) {
|
if(ar->options.local) {
|
||||||
aa.type = GMB_LOCAL;
|
aa.type = GMB_LOCAL;
|
||||||
|
@ -189,7 +189,7 @@ void gareafile::ReadFMail116(FILE* fp, char* path, char* file, char* options) {
|
|||||||
grp >>= 1;
|
grp >>= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
//aa.groupid = (char)toupper((char)ar->group);
|
//aa.groupid = (char)g_toupper((char)ar->group);
|
||||||
aa.aka = cfg->akaList[ar->address].nodeNum;
|
aa.aka = cfg->akaList[ar->address].nodeNum;
|
||||||
if(ar->options.local) {
|
if(ar->options.local) {
|
||||||
aa.type = GMB_LOCAL;
|
aa.type = GMB_LOCAL;
|
||||||
|
@ -318,8 +318,8 @@ void gareafile::ReadHPTFile(char* path, char* file, char* origin, int group) {
|
|||||||
|
|
||||||
if(isdigit(*key))
|
if(isdigit(*key))
|
||||||
aa.groupid = 0x8000+atoi(key);
|
aa.groupid = 0x8000+atoi(key);
|
||||||
else if(isalpha(*key))
|
else if(g_isalpha(*key))
|
||||||
aa.groupid = toupper(*key);
|
aa.groupid = g_toupper(*key);
|
||||||
}
|
}
|
||||||
else if (strieql(opt, "d")) {
|
else if (strieql(opt, "d")) {
|
||||||
|
|
||||||
@ -395,13 +395,13 @@ void gareafile::ReadHPT(char* tag) {
|
|||||||
if(*ptr != '-')
|
if(*ptr != '-')
|
||||||
strcpy(file, ptr);
|
strcpy(file, ptr);
|
||||||
else {
|
else {
|
||||||
if(toupper(*(++ptr)) == 'G') {
|
if(g_toupper(*(++ptr)) == 'G') {
|
||||||
if(*(++ptr) == '=')
|
if(*(++ptr) == '=')
|
||||||
ptr++;
|
ptr++;
|
||||||
if(*ptr == '#')
|
if(*ptr == '#')
|
||||||
defaultgroup = (word)(atoi(ptr+1)+0x8000u);
|
defaultgroup = (word)(atoi(ptr+1)+0x8000u);
|
||||||
else
|
else
|
||||||
defaultgroup = (word)(isupper(*ptr) ? *ptr : 0);
|
defaultgroup = (word)(g_isupper(*ptr) ? *ptr : 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ptr = strtok(NULL, " \t");
|
ptr = strtok(NULL, " \t");
|
||||||
|
@ -137,7 +137,7 @@ void gareafile::ReadIMail160(char* options, char* file, char* impath) {
|
|||||||
if(AR.o_addr)
|
if(AR.o_addr)
|
||||||
aa.aka = CAST(ftn_addr, CF->aka[AR.o_addr-1]);
|
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.setdesc(AR.comment);
|
||||||
aa.setechoid(AR.aname);
|
aa.setechoid(AR.aname);
|
||||||
|
@ -52,8 +52,8 @@ void gareafile::ReadQEchoFile(char* file, char* options, char* origin) {
|
|||||||
|
|
||||||
if(isdigit(*ptr))
|
if(isdigit(*ptr))
|
||||||
aa.groupid = 0x8000+atoi(ptr);
|
aa.groupid = 0x8000+atoi(ptr);
|
||||||
else if(isalpha(*ptr))
|
else if(g_isalpha(*ptr))
|
||||||
aa.groupid = toupper(*ptr);
|
aa.groupid = g_toupper(*ptr);
|
||||||
|
|
||||||
if((ptr = strtok(NULL, " \t")) != NULL) {
|
if((ptr = strtok(NULL, " \t")) != NULL) {
|
||||||
if(*ptr == '*') {
|
if(*ptr == '*') {
|
||||||
|
@ -141,8 +141,8 @@ void gareafile::ReadSpaceAr(const char* file) {
|
|||||||
case CRC_GROUP:
|
case CRC_GROUP:
|
||||||
if(isdigit(*val))
|
if(isdigit(*val))
|
||||||
aa.groupid = 0x8000+atoi(val);
|
aa.groupid = 0x8000+atoi(val);
|
||||||
else if(isalpha(*val))
|
else if(g_isalpha(*val))
|
||||||
aa.groupid = toupper(*val);
|
aa.groupid = g_toupper(*val);
|
||||||
break;
|
break;
|
||||||
case CRC_ENDAREA:
|
case CRC_ENDAREA:
|
||||||
if(aa.basetype[0] != '\0')
|
if(aa.basetype[0] != '\0')
|
||||||
|
@ -118,13 +118,13 @@ void gareafile::ReadSquishFile(char* path, char* file, char* options, char* orig
|
|||||||
if(strnieql(p, "-$", 2)) {
|
if(strnieql(p, "-$", 2)) {
|
||||||
aa.basetype = "SQUISH";
|
aa.basetype = "SQUISH";
|
||||||
p += 2;
|
p += 2;
|
||||||
if((tolower(*p) == 'g') and isalpha(p[1])) {
|
if((g_tolower(*p) == 'g') and g_isalpha(p[1])) {
|
||||||
if(isdigit(p[1]))
|
if(isdigit(p[1]))
|
||||||
aa.groupid = 0x8000+atoi(p+1);
|
aa.groupid = 0x8000+atoi(p+1);
|
||||||
else if(isalpha(p[1]))
|
else if(g_isalpha(p[1]))
|
||||||
aa.groupid = toupper(p[1]);
|
aa.groupid = g_toupper(p[1]);
|
||||||
}
|
}
|
||||||
else if(tolower(*p) == 'n') {
|
else if(g_tolower(*p) == 'n') {
|
||||||
key = ++p;
|
key = ++p;
|
||||||
getkeyval(&key, &p);
|
getkeyval(&key, &p);
|
||||||
aa.setdesc(key);
|
aa.setdesc(key);
|
||||||
@ -190,13 +190,13 @@ void gareafile::ReadSquish(char* tag) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(toupper(*(++ptr)) == 'G') {
|
if(g_toupper(*(++ptr)) == 'G') {
|
||||||
if(*(++ptr) == '=')
|
if(*(++ptr) == '=')
|
||||||
ptr++;
|
ptr++;
|
||||||
if(*ptr == '#')
|
if(*ptr == '#')
|
||||||
defaultgroup = (word)(atoi(ptr+1)+0x8000u);
|
defaultgroup = (word)(atoi(ptr+1)+0x8000u);
|
||||||
else
|
else
|
||||||
defaultgroup = (word)(isupper(*ptr) ? *ptr : 0);
|
defaultgroup = (word)(g_isupper(*ptr) ? *ptr : 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ptr = strtok(NULL, " \t");
|
ptr = strtok(NULL, " \t");
|
||||||
|
@ -234,7 +234,7 @@ void gareafile::ReadTimed(char* tag) {
|
|||||||
AddBackslash(strcpy(path, ptr));
|
AddBackslash(strcpy(path, ptr));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(toupper(*(++ptr)) == 'C') {
|
if(g_toupper(*(++ptr)) == 'C') {
|
||||||
if(*(++ptr) == '=')
|
if(*(++ptr) == '=')
|
||||||
ptr++;
|
ptr++;
|
||||||
strcpy(timedcfg, ptr);
|
strcpy(timedcfg, ptr);
|
||||||
|
@ -130,7 +130,7 @@ void gareafile::ReadTmail(char* tag) {
|
|||||||
AddBackslash(strcpy(path, ptr));
|
AddBackslash(strcpy(path, ptr));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(toupper(*(++ptr)) == 'C') {
|
if(g_toupper(*(++ptr)) == 'C') {
|
||||||
if(*(++ptr) == ':')
|
if(*(++ptr) == ':')
|
||||||
ptr++;
|
ptr++;
|
||||||
strcpy(tmailcfg, ptr);
|
strcpy(tmailcfg, ptr);
|
||||||
|
@ -122,7 +122,7 @@ void gareafile::ReadTosScan(char* tag) {
|
|||||||
while(fread(areafile, sizeof(TS_Areafile), 1, fp) == 1) {
|
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)) {
|
if(not (areafile->deleted or areafile->passthru) and not strblank(areafile->echoname) and (areafile->board ? areafile->board < 201 : 1)) {
|
||||||
aa.reset();
|
aa.reset();
|
||||||
aa.groupid = (char)toupper(areafile->groupid);
|
aa.groupid = (char)g_toupper(areafile->groupid);
|
||||||
aa.aka = shared->aka[areafile->akano];
|
aa.aka = shared->aka[areafile->akano];
|
||||||
aa.type = GMB_ECHO;
|
aa.type = GMB_ECHO;
|
||||||
aa.attr = attribsecho;
|
aa.attr = attribsecho;
|
||||||
|
@ -75,16 +75,16 @@
|
|||||||
# define ISGRAPH(c) (ISASCII (c) && isprint (c) && !isspace (c))
|
# define ISGRAPH(c) (ISASCII (c) && isprint (c) && !isspace (c))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define ISPRINT(c) (ISASCII (c) && isprint (c))
|
#define ISPRINT(c) (ISASCII (c) && isprint (c))
|
||||||
#define ISDIGIT(c) (ISASCII (c) && isdigit (c))
|
#define ISDIGIT(c) (ISASCII (c) && isdigit (c))
|
||||||
#define ISALNUM(c) (ISASCII (c) && isalnum (c))
|
#define ISALNUM(c) (ISASCII (c) && isxalnum (c))
|
||||||
#define ISALPHA(c) (ISASCII (c) && isalpha (c))
|
#define ISALPHA(c) (ISASCII (c) && g_isalpha (c))
|
||||||
#define ISCNTRL(c) (ISASCII (c) && iscntrl (c))
|
#define ISCNTRL(c) (ISASCII (c) && iscntrl (c))
|
||||||
#define ISLOWER(c) (ISASCII (c) && islower (c))
|
#define ISLOWER(c) (ISASCII (c) && g_islower (c))
|
||||||
#define ISPUNCT(c) (ISASCII (c) && ispunct (c))
|
#define ISPUNCT(c) (ISASCII (c) && ispunct (c))
|
||||||
#define ISSPACE(c) (ISASCII (c) && isspace (c))
|
#define ISSPACE(c) (ISASCII (c) && isspace (c))
|
||||||
#define ISUPPER(c) (ISASCII (c) && isupper (c))
|
#define ISUPPER(c) (ISASCII (c) && g_isupper (c))
|
||||||
#define ISXDIGIT(c) (ISASCII (c) && isxdigit (c))
|
#define ISXDIGIT(c) (ISASCII (c) && isxdigit (c))
|
||||||
|
|
||||||
# define STREQ(s1, s2) ((strcmp (s1, s2) == 0))
|
# define STREQ(s1, s2) ((strcmp (s1, s2) == 0))
|
||||||
|
|
||||||
@ -140,9 +140,9 @@ fnmatch (pattern, string, flags)
|
|||||||
|
|
||||||
/* Note that this evaluates C many times. */
|
/* Note that this evaluates C many times. */
|
||||||
# ifdef _LIBC
|
# ifdef _LIBC
|
||||||
# define FOLD(c) ((flags & FNM_CASEFOLD) ? tolower (c) : (c))
|
# define FOLD(c) ((flags & FNM_CASEFOLD) ? g_tolower (c) : (c))
|
||||||
# else
|
# else
|
||||||
# define FOLD(c) ((flags & FNM_CASEFOLD) && ISUPPER (c) ? tolower (c) : (c))
|
# define FOLD(c) ((flags & FNM_CASEFOLD) && ISUPPER (c) ? g_tolower (c) : (c))
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
while ((c = *p++) != '\0')
|
while ((c = *p++) != '\0')
|
||||||
|
@ -243,16 +243,16 @@ init_syntax_once ()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#undef ISPRINT
|
#undef ISPRINT
|
||||||
#define ISPRINT(c) (ISASCII (c) && isprint (c))
|
#define ISPRINT(c) (ISASCII (c) && isprint (c))
|
||||||
#define ISDIGIT(c) (ISASCII (c) && isdigit (c))
|
#define ISDIGIT(c) (ISASCII (c) && isdigit (c))
|
||||||
#define ISALNUM(c) (ISASCII (c) && isalnum (c))
|
#define ISALNUM(c) (ISASCII (c) && isxalnum (c))
|
||||||
#define ISALPHA(c) (ISASCII (c) && isalpha (c))
|
#define ISALPHA(c) (ISASCII (c) && g_isalpha (c))
|
||||||
#define ISCNTRL(c) (ISASCII (c) && iscntrl (c))
|
#define ISCNTRL(c) (ISASCII (c) && iscntrl (c))
|
||||||
#define ISLOWER(c) (ISASCII (c) && islower (c))
|
#define ISLOWER(c) (ISASCII (c) && g_islower (c))
|
||||||
#define ISPUNCT(c) (ISASCII (c) && ispunct (c))
|
#define ISPUNCT(c) (ISASCII (c) && ispunct (c))
|
||||||
#define ISSPACE(c) (ISASCII (c) && isspace (c))
|
#define ISSPACE(c) (ISASCII (c) && isspace (c))
|
||||||
#define ISUPPER(c) (ISASCII (c) && isupper (c))
|
#define ISUPPER(c) (ISASCII (c) && g_isupper (c))
|
||||||
#define ISXDIGIT(c) (ISASCII (c) && isxdigit (c))
|
#define ISXDIGIT(c) (ISASCII (c) && isxdigit (c))
|
||||||
|
|
||||||
#ifndef NULL
|
#ifndef NULL
|
||||||
# define NULL (void *)0
|
# define NULL (void *)0
|
||||||
@ -5631,7 +5631,7 @@ regcomp (preg, pattern, cflags)
|
|||||||
|
|
||||||
/* Map uppercase characters to corresponding lowercase ones. */
|
/* Map uppercase characters to corresponding lowercase ones. */
|
||||||
for (i = 0; i < CHAR_SET_SIZE; i++)
|
for (i = 0; i < CHAR_SET_SIZE; i++)
|
||||||
preg->translate[i] = ISUPPER (i) ? tolower (i) : i;
|
preg->translate[i] = ISUPPER (i) ? g_tolower (i) : i;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
preg->translate = NULL;
|
preg->translate = NULL;
|
||||||
|
@ -174,7 +174,7 @@ void EzycomArea::save_message(int __mode, gmsg* __msg, EzycHdr& __hdr) {
|
|||||||
_msgfast.whoto = CRC32_MASK_CCITT;
|
_msgfast.whoto = CRC32_MASK_CCITT;
|
||||||
char* _ptr = __msg->to;
|
char* _ptr = __msg->to;
|
||||||
while(*_ptr) {
|
while(*_ptr) {
|
||||||
_msgfast.whoto = updCrc32((char)toupper(*_ptr), _msgfast.whoto);
|
_msgfast.whoto = updCrc32((char)g_toupper(*_ptr), _msgfast.whoto);
|
||||||
_ptr++;
|
_ptr++;
|
||||||
}
|
}
|
||||||
_fh = test_open(AddPath(wide->msgbasepath, "MSGFAST.BBS"), O_WRONLY|O_CREAT|O_BINARY, SH_DENYWR);
|
_fh = test_open(AddPath(wide->msgbasepath, "MSGFAST.BBS"), O_WRONLY|O_CREAT|O_BINARY, SH_DENYWR);
|
||||||
|
@ -197,7 +197,7 @@ int PcbArea::load_message(int __mode, gmsg* __msg, PcbHdr& __hdr) {
|
|||||||
while(*ptr2) {
|
while(*ptr2) {
|
||||||
if(*ptr2 == '+') {
|
if(*ptr2 == '+') {
|
||||||
// get flags
|
// get flags
|
||||||
switch(toupper(*(++ptr2))) {
|
switch(g_toupper(*(++ptr2))) {
|
||||||
case 'C': __msg->attr.cra1(); break;
|
case 'C': __msg->attr.cra1(); break;
|
||||||
case 'D': __msg->attr.dir1(); break;
|
case 'D': __msg->attr.dir1(); break;
|
||||||
}
|
}
|
||||||
|
@ -106,7 +106,7 @@ uint16_t XbbsCheckSum(char* str) {
|
|||||||
uint16_t checksum = 0;
|
uint16_t checksum = 0;
|
||||||
|
|
||||||
while(*str) {
|
while(*str) {
|
||||||
checksum ^= (uint16_t)toupper(*str++);
|
checksum ^= (uint16_t)g_toupper(*str++);
|
||||||
if(checksum & 1)
|
if(checksum & 1)
|
||||||
checksum = (uint16_t)((checksum >> 1) ^ 0xA000);
|
checksum = (uint16_t)((checksum >> 1) ^ 0xA000);
|
||||||
else
|
else
|
||||||
|
@ -90,7 +90,7 @@ int direxist(const char *directory)
|
|||||||
|
|
||||||
/* Root directory of any drive always exists! */
|
/* Root directory of any drive always exists! */
|
||||||
|
|
||||||
if ((isalpha((int)tempstr[0]) && tempstr[1] == ':' && (tempstr[2] == '\\' || tempstr[2] == '/') &&
|
if ((g_isalpha((int)tempstr[0]) && tempstr[1] == ':' && (tempstr[2] == '\\' || tempstr[2] == '/') &&
|
||||||
!tempstr[3]) || eqstr(tempstr, "\\")) {
|
!tempstr[3]) || eqstr(tempstr, "\\")) {
|
||||||
free(tempstr);
|
free(tempstr);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -186,7 +186,7 @@ int direxist(const char *directory)
|
|||||||
|
|
||||||
/* Root directory of any drive always exists! */
|
/* Root directory of any drive always exists! */
|
||||||
|
|
||||||
if ((isalpha(tempstr[0]) && tempstr[1] == ':' && ((tempstr[2] == '\0') || ((tempstr[2] == '\\' ||
|
if ((g_isalpha(tempstr[0]) && tempstr[1] == ':' && ((tempstr[2] == '\0') || ((tempstr[2] == '\\' ||
|
||||||
tempstr[2] == '/') && tempstr[3] == '\0'))) || eqstri(tempstr, "\\"))
|
tempstr[2] == '/') && tempstr[3] == '\0'))) || eqstri(tempstr, "\\"))
|
||||||
{
|
{
|
||||||
ret = TRUE;
|
ret = TRUE;
|
||||||
@ -244,7 +244,7 @@ int _fast direxist(const char *directory)
|
|||||||
|
|
||||||
/* Root directory of any drive always exists! */
|
/* Root directory of any drive always exists! */
|
||||||
|
|
||||||
if ((isalpha((int)tempstr[0]) && tempstr[1] == ':' && (tempstr[2] == '\\' || tempstr[2] == '/') &&
|
if ((g_isalpha((int)tempstr[0]) && tempstr[1] == ':' && (tempstr[2] == '\\' || tempstr[2] == '/') &&
|
||||||
!tempstr[3]) || eqstr(tempstr, "\\"))
|
!tempstr[3]) || eqstr(tempstr, "\\"))
|
||||||
{
|
{
|
||||||
free(tempstr);
|
free(tempstr);
|
||||||
|
@ -86,7 +86,7 @@ dword GenMsgIdEx(char *seqdir, unsigned long max_outrun, dword (*altGenMsgId)(vo
|
|||||||
p = getenv("SEQOUT");
|
p = getenv("SEQOUT");
|
||||||
if ( p && isdigit((int)(*p)) ) {
|
if ( p && isdigit((int)(*p)) ) {
|
||||||
max_outrun = (unsigned long)atol(p);
|
max_outrun = (unsigned long)atol(p);
|
||||||
switch (tolower(p[strlen(p) - 1])) {
|
switch (g_tolower(p[strlen(p) - 1])) {
|
||||||
case 'y': max_outrun *= 365;
|
case 'y': max_outrun *= 365;
|
||||||
case 'd': max_outrun *= 24;
|
case 'd': max_outrun *= 24;
|
||||||
case 'h': max_outrun *= 60*60;
|
case 'h': max_outrun *= 60*60;
|
||||||
|
@ -4,5 +4,6 @@
|
|||||||
#define __TYPEDEFS_H__
|
#define __TYPEDEFS_H__
|
||||||
|
|
||||||
#include <gdefs.h>
|
#include <gdefs.h>
|
||||||
|
#include <gctype.h>
|
||||||
|
|
||||||
#endif //#ifndef __TYPEDEFS_H__
|
#endif //#ifndef __TYPEDEFS_H__
|
||||||
|
@ -34,7 +34,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <ctype.h>
|
|
||||||
|
|
||||||
#ifdef STDC_HEADERS
|
#ifdef STDC_HEADERS
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@ -50,6 +49,8 @@
|
|||||||
#include <memory.h>
|
#include <memory.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <gdefs.h>
|
||||||
|
#include <gctype.h>
|
||||||
#include <fptools.h>
|
#include <fptools.h>
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
@ -147,12 +148,12 @@ _FP_stricmp (char *str1, char *str2)
|
|||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
while (*str1) {
|
while (*str1) {
|
||||||
if (tolower(*str1) != tolower(*str2))
|
if (g_tolower(*str1) != g_tolower(*str2))
|
||||||
break;
|
break;
|
||||||
str1++;
|
str1++;
|
||||||
str2++;
|
str2++;
|
||||||
}
|
}
|
||||||
return (tolower (*str1) - tolower (*str2));
|
return (g_tolower (*str1) - g_tolower (*str2));
|
||||||
}
|
}
|
||||||
|
|
||||||
int TOOLEXPORT
|
int TOOLEXPORT
|
||||||
@ -162,13 +163,13 @@ _FP_strnicmp (char *str1, char *str2, int count)
|
|||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
while (*str1 && count) {
|
while (*str1 && count) {
|
||||||
if (tolower(*str1) != tolower(*str2))
|
if (g_tolower(*str1) != g_tolower(*str2))
|
||||||
break;
|
break;
|
||||||
str1++;
|
str1++;
|
||||||
str2++;
|
str2++;
|
||||||
count--;
|
count--;
|
||||||
}
|
}
|
||||||
return count ? (tolower (*str1) - tolower (*str2)) : 0;
|
return count ? (g_tolower (*str1) - g_tolower (*str2)) : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -269,7 +270,7 @@ _FP_stristr (char *str1, char *str2)
|
|||||||
|
|
||||||
while (*(ptr1=str1)) {
|
while (*(ptr1=str1)) {
|
||||||
for (ptr2=str2;
|
for (ptr2=str2;
|
||||||
*ptr1 && *ptr2 && tolower(*ptr1)==tolower(*ptr2);
|
*ptr1 && *ptr2 && g_tolower(*ptr1)==g_tolower(*ptr2);
|
||||||
ptr1++, ptr2++)
|
ptr1++, ptr2++)
|
||||||
/* empty loop */ ;
|
/* empty loop */ ;
|
||||||
|
|
||||||
@ -332,7 +333,7 @@ _FP_stoupper (char *input)
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
while (*iter) {
|
while (*iter) {
|
||||||
*iter = toupper (*iter);
|
*iter = g_toupper (*iter);
|
||||||
iter++;
|
iter++;
|
||||||
}
|
}
|
||||||
return input;
|
return input;
|
||||||
@ -347,7 +348,7 @@ _FP_stolower (char *input)
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
while (*iter) {
|
while (*iter) {
|
||||||
*iter = tolower (*iter);
|
*iter = g_tolower (*iter);
|
||||||
iter++;
|
iter++;
|
||||||
}
|
}
|
||||||
return input;
|
return input;
|
||||||
|
@ -32,7 +32,6 @@
|
|||||||
**/
|
**/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <ctype.h>
|
|
||||||
|
|
||||||
#ifdef STDC_HEADERS
|
#ifdef STDC_HEADERS
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@ -48,6 +47,8 @@
|
|||||||
#include <memory.h>
|
#include <memory.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <gdefs.h>
|
||||||
|
#include <gctype.h>
|
||||||
#include <uudeview.h>
|
#include <uudeview.h>
|
||||||
#include <uuint.h>
|
#include <uuint.h>
|
||||||
#include <fptools.h>
|
#include <fptools.h>
|
||||||
@ -165,7 +166,7 @@ UUGetFileName (char *subject, char *ptonum, char *ptonend)
|
|||||||
count = length = alflag = 0;
|
count = length = alflag = 0;
|
||||||
while (iter[count] &&
|
while (iter[count] &&
|
||||||
(isalnum (iter[count]) || strchr (uufnchars, iter[count])!=NULL)) {
|
(isalnum (iter[count]) || strchr (uufnchars, iter[count])!=NULL)) {
|
||||||
if (isalpha (iter[count]))
|
if (g_isalpha(iter[count]))
|
||||||
alflag++;
|
alflag++;
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
@ -224,14 +225,14 @@ UUGetFileName (char *subject, char *ptonum, char *ptonend)
|
|||||||
|
|
||||||
if (_FP_strnicmp (ptr, "ftp", 3) == 0) {
|
if (_FP_strnicmp (ptr, "ftp", 3) == 0) {
|
||||||
/* hey, that's an ftp address */
|
/* hey, that's an ftp address */
|
||||||
while (isalpha (*ptr) || isdigit (*ptr) || *ptr == '.')
|
while (g_isalpha(*ptr) || isdigit (*ptr) || *ptr == '.')
|
||||||
ptr++;
|
ptr++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
while ((isalnum(*iter)||strchr(uufnchars, *iter)!=NULL||
|
while ((isalnum(*iter)||strchr(uufnchars, *iter)!=NULL||
|
||||||
*iter=='/') && *iter && iter != ptonum && *iter != '.') {
|
*iter=='/') && *iter && iter != ptonum && *iter != '.') {
|
||||||
if (isalpha (*iter))
|
if (g_isalpha(*iter))
|
||||||
alflag = 1;
|
alflag = 1;
|
||||||
|
|
||||||
count++; iter++;
|
count++; iter++;
|
||||||
@ -253,7 +254,7 @@ UUGetFileName (char *subject, char *ptonum, char *ptonend)
|
|||||||
if (_FP_strnicmp (iter, "edu", 3) == 0 ||
|
if (_FP_strnicmp (iter, "edu", 3) == 0 ||
|
||||||
_FP_strnicmp (iter, "gov", 3) == 0) {
|
_FP_strnicmp (iter, "gov", 3) == 0) {
|
||||||
/* hey, that's an ftp address */
|
/* hey, that's an ftp address */
|
||||||
while (isalpha (*iter) || isdigit (*iter) || *iter == '.')
|
while (g_isalpha(*iter) || isdigit (*iter) || *iter == '.')
|
||||||
iter++;
|
iter++;
|
||||||
ptr = iter;
|
ptr = iter;
|
||||||
length = 0;
|
length = 0;
|
||||||
@ -310,7 +311,7 @@ UUGetFileName (char *subject, char *ptonum, char *ptonend)
|
|||||||
if (length == 0) { /* No filename found, use subject line for ident */
|
if (length == 0) { /* No filename found, use subject line for ident */
|
||||||
ptr = subject;
|
ptr = subject;
|
||||||
|
|
||||||
while (*ptr && !isalpha (*ptr))
|
while (*ptr && !g_isalpha(*ptr))
|
||||||
ptr++;
|
ptr++;
|
||||||
|
|
||||||
while ((isalnum(ptr[length])||strchr(uufnchars,ptr[length])!=NULL||
|
while ((isalnum(ptr[length])||strchr(uufnchars,ptr[length])!=NULL||
|
||||||
@ -541,7 +542,7 @@ UUGetPartNo (char *subject, char **where, char **whend)
|
|||||||
if (isdigit(*(iter-1))) {
|
if (isdigit(*(iter-1))) {
|
||||||
while (iter>subject && isdigit (*(iter-1)))
|
while (iter>subject && isdigit (*(iter-1)))
|
||||||
iter--;
|
iter--;
|
||||||
if (!isdigit (*iter) && !isalpha (*iter) && *iter != '.')
|
if (!isdigit (*iter) && !g_isalpha(*iter) && *iter != '.')
|
||||||
iter++;
|
iter++;
|
||||||
ptr = iter;
|
ptr = iter;
|
||||||
|
|
||||||
@ -595,7 +596,7 @@ UUGetPartNo (char *subject, char **where, char **whend)
|
|||||||
ptr = subject;
|
ptr = subject;
|
||||||
|
|
||||||
while (count > 0) {
|
while (count > 0) {
|
||||||
if (!isdigit(ptr[count])||isalpha(ptr[count+1])||ptr[count+1] == '.') {
|
if (!isdigit(ptr[count])||g_isalpha(ptr[count+1])||ptr[count+1] == '.') {
|
||||||
count--;
|
count--;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -604,7 +605,7 @@ UUGetPartNo (char *subject, char **where, char **whend)
|
|||||||
while (count >= 0 && isdigit (ptr[count])) {
|
while (count >= 0 && isdigit (ptr[count])) {
|
||||||
count--; length++;
|
count--; length++;
|
||||||
}
|
}
|
||||||
if (count>=0 && ((isalpha (ptr[count]) &&
|
if (count>=0 && ((g_isalpha(ptr[count]) &&
|
||||||
(ptr[count] != 's' || ptr[count+1] != 't') &&
|
(ptr[count] != 's' || ptr[count+1] != 't') &&
|
||||||
(ptr[count] != 'n' || ptr[count+1] != 'd')) ||
|
(ptr[count] != 'n' || ptr[count+1] != 'd')) ||
|
||||||
ptr[count] == '/' || ptr[count] == '.' ||
|
ptr[count] == '/' || ptr[count] == '.' ||
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <ctype.h>
|
|
||||||
|
|
||||||
#ifdef STDC_HEADERS
|
#ifdef STDC_HEADERS
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@ -52,6 +51,8 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <gdefs.h>
|
||||||
|
#include <gctype.h>
|
||||||
#include <crc32.h>
|
#include <crc32.h>
|
||||||
#include <uudeview.h>
|
#include <uudeview.h>
|
||||||
#include <uuint.h>
|
#include <uuint.h>
|
||||||
@ -465,7 +466,7 @@ UUValidData (char *ptr, int encoding, int *bhflag)
|
|||||||
goto _t_XX; /* bad length */
|
goto _t_XX; /* bad length */
|
||||||
}
|
}
|
||||||
|
|
||||||
if (len != j || islower (*ptr)) {
|
if (len != j || g_islower (*ptr)) {
|
||||||
/*
|
/*
|
||||||
* if we are not in a 'uuencoded' state, don't allow the line to have
|
* if we are not in a 'uuencoded' state, don't allow the line to have
|
||||||
* space characters at all. if we know we _are_ decoding uuencoded
|
* space characters at all. if we know we _are_ decoding uuencoded
|
||||||
@ -788,8 +789,8 @@ UUDecodeQP (FILE *datain, FILE *dataout, int *state,
|
|||||||
p1 = ++p2;
|
p1 = ++p2;
|
||||||
|
|
||||||
if (isxdigit (*p2) && isxdigit (*(p2+1))) {
|
if (isxdigit (*p2) && isxdigit (*(p2+1))) {
|
||||||
val = ((isdigit(*p2)) ? (*p2-'0') : (tolower(*p2)-'a'+10)) << 4;
|
val = ((isdigit(*p2)) ? (*p2-'0') : (g_tolower(*p2)-'a'+10)) << 4;
|
||||||
val |= ((isdigit(*(p2+1)))?(*(p2+1)-'0') : (tolower(*(p2+1))-'a'+10));
|
val |= ((isdigit(*(p2+1)))?(*(p2+1)-'0') : (g_tolower(*(p2+1))-'a'+10));
|
||||||
|
|
||||||
fputc (val, dataout);
|
fputc (val, dataout);
|
||||||
p2 += 2;
|
p2 += 2;
|
||||||
|
Reference in New Issue
Block a user