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/
|
||||
______________________________________________________________________
|
||||
|
||||
- Case insensitive regexp should work on Win9x now.
|
||||
|
||||
+ New config file token LatinToLocal.
|
||||
Used to translate latin A-Za-z to local charset if one of neighbours
|
||||
is from local charset too.
|
||||
|
@ -281,7 +281,7 @@ void AreaList::WriteAreaDef(const char* file) {
|
||||
maxpath = MaxV(maxpath, tmp);
|
||||
if((*aa)->groupid() & 0x8000u)
|
||||
sprintf(groupid, "#%u", (*aa)->groupid()&0x7FFF);
|
||||
else if(isupper((*aa)->groupid()))
|
||||
else if(g_isupper((*aa)->groupid()))
|
||||
*groupid = (char)(*aa)->groupid(), groupid[1] = NUL;
|
||||
else
|
||||
*groupid = '0', groupid[1] = NUL;
|
||||
@ -301,7 +301,7 @@ void AreaList::WriteAreaDef(const char* file) {
|
||||
sprintf(desc, "\"%s\"", (*aa)->desc());
|
||||
if((*aa)->groupid() & 0x8000u)
|
||||
sprintf(groupid, "#%u", (*aa)->groupid()&0x7FFF);
|
||||
else if(isupper((*aa)->groupid()))
|
||||
else if(g_isupper((*aa)->groupid()))
|
||||
*groupid = (char)(*aa)->groupid(), groupid[1] = NUL;
|
||||
else
|
||||
*groupid = '0', groupid[1] = NUL;
|
||||
|
@ -474,7 +474,7 @@ void AreaList::GetArea(char* def) {
|
||||
StripQuotes(desc); // Copy description, stripping quotes ("")
|
||||
aa.setdesc(desc);
|
||||
|
||||
switch(toupper(*base)) { // Store area info
|
||||
switch(g_toupper(*base)) { // Store area info
|
||||
|
||||
case '-':
|
||||
aa.basetype = "SEPARATOR";
|
||||
@ -859,7 +859,7 @@ void AreaList::ReadEcholist(char* val) {
|
||||
continue;
|
||||
}
|
||||
else if(is_dz) {
|
||||
if(not isalpha(*val) and (*val != ','))
|
||||
if(not g_isalpha(*val) and (*val != ','))
|
||||
continue;
|
||||
tok(&key, &val);
|
||||
}
|
||||
@ -877,7 +877,7 @@ void AreaList::ReadEcholist(char* val) {
|
||||
}
|
||||
for(area_iterator ap = idx.begin(); ap != idx.end(); ap++) {
|
||||
if(strieql(key, (*ap)->echoid())) {
|
||||
(*ap)->set_groupid(toupper(*grp));
|
||||
(*ap)->set_groupid(g_toupper(*grp));
|
||||
if(desc)
|
||||
(*ap)->set_desc(desc);
|
||||
break;
|
||||
|
@ -42,7 +42,7 @@ int getgroup(const char *key)
|
||||
if(*key == '#')
|
||||
return atoi(key+1)+0x8000u;
|
||||
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;
|
||||
|
||||
// Switch the first letter of the keyword
|
||||
switch(toupper(k)) {
|
||||
switch(g_toupper(k)) {
|
||||
case 'A': goto SwitchA;
|
||||
case 'B': goto SwitchB;
|
||||
case 'C': goto SwitchC;
|
||||
@ -742,7 +742,7 @@ int ReadCfg(const char* cfgfile, int ignoreunknown) {
|
||||
|
||||
val = strskip_wht(val);
|
||||
|
||||
if(isalpha(*val)) {
|
||||
if(g_isalpha(*val)) {
|
||||
|
||||
// Extract key and val
|
||||
crc = getkeyvalcrc(&key, &val);
|
||||
|
@ -137,7 +137,7 @@ void CfgNodev7flags() {
|
||||
char* flagstring = t.First(val);
|
||||
char* flagvals = t.Next();
|
||||
uint flagval;
|
||||
if(tolower(*flagvals) == 'b')
|
||||
if(g_tolower(*flagvals) == 'b')
|
||||
flagval = atoi(flagvals+1);
|
||||
else {
|
||||
flagval = atoi(flagvals);
|
||||
@ -168,7 +168,7 @@ void CfgNodev7modem() {
|
||||
char* modemstring = t.First(val);
|
||||
char* modemvals = t.Next();
|
||||
int modemval;
|
||||
if(tolower(*modemvals) == 'b')
|
||||
if(g_tolower(*modemvals) == 'b')
|
||||
modemval = atoi(modemvals+1);
|
||||
else {
|
||||
modemval = atoi(modemvals);
|
||||
|
@ -407,7 +407,7 @@ void CfgSeqOutRun() {
|
||||
CfgSeqOutRun_Error();
|
||||
return;
|
||||
}
|
||||
switch(tolower(*p)) {
|
||||
switch(g_tolower(*p)) {
|
||||
case 'y':
|
||||
s *= 365;
|
||||
case 'd':
|
||||
|
@ -966,7 +966,7 @@ static void SetKeybDefaults() {
|
||||
int k = 0;
|
||||
while(k < keys) {
|
||||
if(tmp->key <= 0xFF)
|
||||
tmp->key = (gkey)tolower(tmp->key);
|
||||
tmp->key = (gkey)g_tolower(tmp->key);
|
||||
KeyCmdAdd(tmp->cmd, tmp->key, tmp->type);
|
||||
tmp++;
|
||||
k++;
|
||||
@ -1037,7 +1037,7 @@ int ReadKeysCfg(int force) {
|
||||
keyval = (gkey)_keyval;
|
||||
}
|
||||
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 {
|
||||
keycmd = SwitchKeyDefs(strCrc16(strupr(ptr2)), &keytype);
|
||||
if(not keycmd or keytype) {
|
||||
|
@ -658,7 +658,7 @@ void LoadLanguage(const char* file) {
|
||||
while(fgets((ptr=buf), sizeof(buf), fp)) {
|
||||
line++;
|
||||
ptr = strskip_wht(ptr);
|
||||
if(isalpha(*ptr)) {
|
||||
if(g_isalpha(*ptr)) {
|
||||
str = ptr;
|
||||
strtrim(str);
|
||||
str = strskip_txt(str);
|
||||
@ -715,7 +715,7 @@ bool ReadLangCfg(int force) {
|
||||
while(fgets((ptr=buf), sizeof(buf), fpi)) {
|
||||
line++;
|
||||
ptr = strskip_wht(ptr);
|
||||
if(isalpha(*ptr)) {
|
||||
if(g_isalpha(*ptr)) {
|
||||
str = ptr;
|
||||
strtrim(str);
|
||||
str = strskip_txt(str);
|
||||
|
@ -193,7 +193,7 @@ void GPickArealist::dispbuf(char* buf, int areano) {
|
||||
if(groupid_width > 2)
|
||||
sprintf(groupidbuf, "%u", area->groupid()&0x7FFF);
|
||||
}
|
||||
else if(isupper(area->groupid()))
|
||||
else if(g_isupper(area->groupid()))
|
||||
sprintf(groupidbuf, "%c", (char)area->groupid());
|
||||
}
|
||||
int groupidwidth = strlen(groupidbuf);
|
||||
@ -748,7 +748,7 @@ bool GPickArealist::handle_key() {
|
||||
|
||||
default:
|
||||
if(key < KK_Macro) {
|
||||
n = toupper(key & 0xFF);
|
||||
n = g_toupper(key & 0xFF);
|
||||
if((area_fuzidx < area_maxfuz) or (key == Key_BS)) {
|
||||
|
||||
// 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) {
|
||||
|
||||
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]))
|
||||
return true;
|
||||
--ptr;
|
||||
|
@ -1998,7 +1998,7 @@ void IEclass::ToUpper() {
|
||||
|
||||
if(col < currline->txt.length()) {
|
||||
Undo->PushItem(EDIT_UNDO_OVR_CHAR);
|
||||
currline->txt[col] = toupper(currline->txt[col]);
|
||||
currline->txt[col] = g_toupper(currline->txt[col]);
|
||||
}
|
||||
|
||||
GFTRK(NULL);
|
||||
@ -2013,7 +2013,7 @@ void IEclass::ToLower() {
|
||||
|
||||
if(col < currline->txt.length()) {
|
||||
Undo->PushItem(EDIT_UNDO_OVR_CHAR);
|
||||
currline->txt[col] = tolower(currline->txt[col]);
|
||||
currline->txt[col] = g_tolower(currline->txt[col]);
|
||||
}
|
||||
|
||||
GFTRK(NULL);
|
||||
@ -2028,10 +2028,10 @@ void IEclass::ToggleCase() {
|
||||
|
||||
if(col < currline->txt.length()) {
|
||||
Undo->PushItem(EDIT_UNDO_OVR_CHAR);
|
||||
if(toupper(currline->txt[col]) == currline->txt[col])
|
||||
currline->txt[col] = tolower(currline->txt[col]);
|
||||
if(g_toupper(currline->txt[col]) == currline->txt[col])
|
||||
currline->txt[col] = g_tolower(currline->txt[col]);
|
||||
else
|
||||
currline->txt[col] = toupper(currline->txt[col]);
|
||||
currline->txt[col] = g_toupper(currline->txt[col]);
|
||||
}
|
||||
|
||||
GFTRK(NULL);
|
||||
@ -2050,18 +2050,18 @@ void IEclass::ToggleCaseChar(gkey key,
|
||||
switch (key)
|
||||
{
|
||||
case KK_EditToLower:
|
||||
newchar = tolower(*it);
|
||||
newchar = g_tolower(*it);
|
||||
break;
|
||||
|
||||
case KK_EditToUpper:
|
||||
newchar = toupper(*it);
|
||||
newchar = g_toupper(*it);
|
||||
break;
|
||||
|
||||
case KK_EditToggleCase:
|
||||
if (toupper(*it) == oldchar)
|
||||
newchar = tolower(*it);
|
||||
if (g_toupper(*it) == oldchar)
|
||||
newchar = g_tolower(*it);
|
||||
else
|
||||
newchar = toupper(*it);
|
||||
newchar = g_toupper(*it);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -259,7 +259,7 @@ bool inline samekey(gkey key1, gkey key2) {
|
||||
return true;
|
||||
if((key1 > 0xFF) or (key2 > 0xFF))
|
||||
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;
|
||||
if(*val == NUL)
|
||||
val = key+1;
|
||||
switch(toupper(*key)) {
|
||||
switch(g_toupper(*key)) {
|
||||
case 'C': // Use another Configfile
|
||||
if(*val)
|
||||
strcpy(cmdlinecfg, val);
|
||||
@ -94,7 +94,7 @@ static void InitCmdline(char* val) {
|
||||
break;
|
||||
case 'F':
|
||||
cmdlineforce = make_bool_not(*val == '-');
|
||||
if(toupper(key[1]) == 'F')
|
||||
if(g_toupper(key[1]) == 'F')
|
||||
cmdlineforce++;
|
||||
break;
|
||||
case '?':
|
||||
@ -134,7 +134,7 @@ static void InitCmdline(char* val) {
|
||||
break;
|
||||
case 'V':
|
||||
quiet = false;
|
||||
veryverbose = (toupper(key[1]) == 'V');
|
||||
veryverbose = (g_toupper(key[1]) == 'V');
|
||||
break;
|
||||
case 'W':
|
||||
cmdlinewriteareas = make_bool_not(*val == '-');
|
||||
@ -318,7 +318,7 @@ static void kbputstr(const char* buf) {
|
||||
break;
|
||||
case '~':
|
||||
case '^':
|
||||
xkey = (gkey)(toupper(buf[++n]) - '@');
|
||||
xkey = (gkey)(g_toupper(buf[++n]) - '@');
|
||||
if(xkey)
|
||||
kbput(xkey);
|
||||
break;
|
||||
@ -974,13 +974,13 @@ void Initialize(int argc, char* argv[]) {
|
||||
int pos = 0;
|
||||
char* p = CFG->arealistformat;
|
||||
while(*p) {
|
||||
char c = (char)toupper(*p);
|
||||
char c = (char)g_toupper(*p);
|
||||
char d = *(++p);
|
||||
int w = atoi(p);
|
||||
while(isdigit(*p))
|
||||
p++;
|
||||
if(pass == 1) {
|
||||
if(isalpha(c)) {
|
||||
if(g_isalpha(c)) {
|
||||
switch(c) {
|
||||
case 'A': area_found = true; if(isdigit(d)) area_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)) {
|
||||
day = atoi(ptr);
|
||||
ptr = strskip_wht(strskip_txt(ptr));
|
||||
if(isalpha(*ptr)) {
|
||||
if(g_isalpha(*ptr)) {
|
||||
month = str2mon(ptr);
|
||||
if(month) {
|
||||
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
|
||||
if(strnieql(kludge1, "RFC", 3) and (kludge1[3] != ':')) {
|
||||
kludge1 += 3;
|
||||
if(not isalpha(*kludge1))
|
||||
if(not g_isalpha(*kludge1))
|
||||
kludge1++;
|
||||
}
|
||||
|
||||
@ -1696,8 +1696,8 @@ void Latin2Local(char *str)
|
||||
byte left = i ? str[i-1] : 0;
|
||||
byte right = str[i+1];
|
||||
|
||||
if (((left >= 0x80) && (toupper(left) != tolower(left))) ||
|
||||
((right >= 0x80) && (toupper(right) != tolower(right))))
|
||||
if (((left >= 0x80) && (g_toupper(left) != g_tolower(left))) ||
|
||||
((right >= 0x80) && (g_toupper(right) != g_tolower(right))))
|
||||
{
|
||||
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);
|
||||
if(strnieql(kludge, "RFC", 3)) {
|
||||
kludge += 3;
|
||||
if(not isalpha(*kludge))
|
||||
if(not g_isalpha(*kludge))
|
||||
kludge++;
|
||||
}
|
||||
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 token[1024];
|
||||
char fill = dst[5];
|
||||
char align = toupper(dst[6]);
|
||||
char align = g_toupper(dst[6]);
|
||||
int size = atoi(dst+7);
|
||||
|
||||
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) {
|
||||
|
||||
if(toupper(*s) == 'R' and tolower(s[1]) == 'e') {
|
||||
if(g_toupper(*s) == 'R' and g_tolower(s[1]) == 'e') {
|
||||
|
||||
if(s[2] == ':') {
|
||||
n = 1;
|
||||
@ -99,7 +99,7 @@ void CheckSubject(GMsg* msg, char* subj) {
|
||||
#ifdef __UNIX__
|
||||
if((*ptr == '/') and not strchr(ptr, ':')) { /* } */
|
||||
#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
|
||||
// Autoattach
|
||||
msg->attr.att1();
|
||||
|
@ -199,7 +199,7 @@ void Area::InitData() {
|
||||
if(groupid() & 0x8000u)
|
||||
sprintf(_groupid, "#%u", groupid() & 0x7FFF);
|
||||
else {
|
||||
_groupid[0] = (char)(isalpha(groupid()) ? groupid() : NUL);
|
||||
_groupid[0] = (char)(g_isalpha(groupid()) ? groupid() : NUL);
|
||||
_groupid[1] = NUL;
|
||||
}
|
||||
}
|
||||
@ -244,7 +244,7 @@ void Area::RandomizeData(int mode) {
|
||||
if(groupid() & 0x8000u)
|
||||
sprintf(_groupid, "#%u", groupid() & 0x7FFF);
|
||||
else {
|
||||
_groupid[0] = (char)(isalpha(groupid()) ? groupid() : NUL);
|
||||
_groupid[0] = (char)(g_isalpha(groupid()) ? groupid() : 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 '?':
|
||||
s++;
|
||||
switch(tolower(*s)) {
|
||||
switch(g_tolower(*s)) {
|
||||
case 'r': item.type = gsearch::regex; break;
|
||||
case 'w': item.type = gsearch::wildcard; break;
|
||||
case 'p': item.type = gsearch::plain; break;
|
||||
|
@ -63,7 +63,7 @@ bool is_user(const char* name) {
|
||||
|
||||
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;
|
||||
for (char *tmp = head; tmp < ptr; tmp++)
|
||||
{
|
||||
char ch = toupper(*tmp);
|
||||
char ch = g_toupper(*tmp);
|
||||
if ((ch >= 'A') && (ch <= 'Z'))
|
||||
nr++;
|
||||
}
|
||||
|
@ -297,7 +297,7 @@ void GMsgHeaderView::Paint() {
|
||||
while(ptr) {
|
||||
if(*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);
|
||||
else
|
||||
sprintf(buf2, "%s%s", CFG->inboundpath, ptr);
|
||||
|
@ -69,7 +69,7 @@ void gbmh::init(const char* pattern, bool ignorecase) {
|
||||
strupr(pat);
|
||||
#else /* strupr() is wrong on windows 9x (patch from Ianos Gnatiuc 2:469/335.155) */
|
||||
for(char *ptr = pat; *ptr; ptr++)
|
||||
*ptr = toupper(*ptr);
|
||||
*ptr = g_toupper(*ptr);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -80,12 +80,12 @@ void gbmh::init(const char* pattern, bool ignorecase) {
|
||||
for(i=0; i<patlen; i++) {
|
||||
skip[pat[i] & 0xff] = patlen - i - 1;
|
||||
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];
|
||||
skip[lastpatchar & 0xff] = INT_MAX;
|
||||
if(ignore_case)
|
||||
skip[tolower((uint8_t)lastpatchar)] = INT_MAX;
|
||||
skip[g_tolower((uint8_t)lastpatchar)] = INT_MAX;
|
||||
|
||||
// Horspool's fixed second shift
|
||||
skip2 = patlen;
|
||||
@ -120,7 +120,7 @@ bool gbmh::find(const char* buffer) {
|
||||
const char* s = buffer + (i - j);
|
||||
|
||||
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 {
|
||||
|
@ -46,7 +46,7 @@ dword strHash32(const char* s, bool __case) {
|
||||
|
||||
while(*p) {
|
||||
|
||||
hash = (hash << 4) + (__case ? tolower(*p) : *p);
|
||||
hash = (hash << 4) + (__case ? g_tolower(*p) : *p);
|
||||
|
||||
g = hash & 0xF0000000UL;
|
||||
if(g) {
|
||||
|
@ -145,7 +145,7 @@ word getkeyvalcrc(char** key, char** val) {
|
||||
|
||||
// Calculate CRC16 of keyword
|
||||
while(*p)
|
||||
c = updCrc16((byte)toupper(*p++), c);
|
||||
c = updCrc16((byte)g_toupper(*p++), c);
|
||||
|
||||
// Return keyword CRC
|
||||
return c;
|
||||
|
@ -39,7 +39,7 @@ word memCrc16(const void* _m, long l, bool __case, word mask) {
|
||||
|
||||
if(__case) {
|
||||
for(n=0; n<l; n++)
|
||||
crc = updCrc16(toupper(*m++), crc);
|
||||
crc = updCrc16(g_toupper(*m++), crc);
|
||||
}
|
||||
else {
|
||||
for(n=0; n<l; n++)
|
||||
|
@ -40,7 +40,7 @@ dword memCrc32(const void* _m, long l, bool __case, dword mask) {
|
||||
|
||||
if(__case) {
|
||||
for(n=0; n<l; n++)
|
||||
crc = updCrc32(toupper(*m++), crc);
|
||||
crc = updCrc32(g_toupper(*m++), crc);
|
||||
}
|
||||
else {
|
||||
for(n=0; n<l; n++)
|
||||
|
@ -38,7 +38,7 @@ word strCrc16(const char* s, bool __case, word mask) {
|
||||
|
||||
if(__case) {
|
||||
while(*s)
|
||||
crc = updCrc16(toupper(*s++), crc);
|
||||
crc = updCrc16(g_toupper(*s++), crc);
|
||||
}
|
||||
else {
|
||||
while(*s)
|
||||
@ -58,7 +58,7 @@ word strCrc16c(const char* s, bool __case, word mask) {
|
||||
|
||||
if(__case) {
|
||||
while(*s)
|
||||
crc = updCrc16c(toupper(*s++), crc);
|
||||
crc = updCrc16c(g_toupper(*s++), crc);
|
||||
}
|
||||
else {
|
||||
while(*s)
|
||||
|
@ -38,7 +38,7 @@ dword strCrc32(const char* s, bool __case, dword mask) {
|
||||
|
||||
if(__case) {
|
||||
while(*s)
|
||||
crc = updCrc32(toupper(*s++), crc);
|
||||
crc = updCrc32(g_toupper(*s++), crc);
|
||||
}
|
||||
else {
|
||||
while(*s)
|
||||
|
@ -41,19 +41,19 @@
|
||||
#include <ctype.h>
|
||||
#if defined(__EMX__)
|
||||
#include <sys/nls.h>
|
||||
#define tolower(c) _nls_tolower((uint8_t)(c))
|
||||
#define toupper(c) _nls_toupper((uint8_t)(c))
|
||||
#define g_tolower(c) _nls_tolower((uint8_t)(c))
|
||||
#define g_toupper(c) _nls_toupper((uint8_t)(c))
|
||||
#elif defined(__WIN32__)
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
extern char tl[256], tu[256];
|
||||
__inline__ int tolower(int c) { return tl[c]; }
|
||||
__inline__ int toupper(int c) { return tu[c]; }
|
||||
__inline__ int g_tolower(int c) { return tl[c]; }
|
||||
__inline__ int g_toupper(int c) { return tu[c]; }
|
||||
}
|
||||
#else
|
||||
extern char tl[256], tu[256];
|
||||
#define tolower(c) tl[(int)(uint8_t)(c)]
|
||||
#define toupper(c) tu[(int)(uint8_t)(c)]
|
||||
#define g_tolower(c) tl[(int)(uint8_t)(c)]
|
||||
#define g_toupper(c) tu[(int)(uint8_t)(c)]
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -64,14 +64,47 @@ extern char tl[256], tu[256];
|
||||
* they don't match they treated as characters
|
||||
*/
|
||||
|
||||
#if defined(__WIN32__)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern __inline__ int isxalnum(char c) {
|
||||
return isascii(c) ? isalnum(c) : (c != tolower(c)) || (c != toupper(c));
|
||||
__inline__ int g_islower(int 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
|
||||
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
|
||||
|
||||
#ifdef __BEOS__
|
||||
|
@ -168,7 +168,7 @@ int is_dir(const char* path) {
|
||||
|
||||
// Check if it's a root path (X:\)
|
||||
#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
|
||||
#endif
|
||||
|
||||
@ -226,7 +226,7 @@ void MakePathname(char* pathname, const char* path, const char* name) {
|
||||
have_path = true;
|
||||
#if defined(__HAVE_DRIVES__)
|
||||
// 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
|
||||
#endif
|
||||
|
||||
@ -416,7 +416,7 @@ int gchdir(const char* dir) {
|
||||
_chdrive(*dir);
|
||||
#else
|
||||
uint drives;
|
||||
_dos_setdrive(toupper(*dir)-'@', &drives);
|
||||
_dos_setdrive(g_toupper(*dir)-'@', &drives);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
@ -75,7 +75,7 @@ int ftn_fidouser_nodelist_index::namecmp() const {
|
||||
int n = 1;
|
||||
int d;
|
||||
while(1) {
|
||||
d = tolower(*a) - tolower(*b);
|
||||
d = g_tolower(*a) - g_tolower(*b);
|
||||
if((d != 0) or (*a == NUL) or (*b == NUL))
|
||||
break;
|
||||
a++;
|
||||
|
@ -172,7 +172,7 @@ int ftn_golded_nodelist_index::namecmp() const {
|
||||
int n = 1;
|
||||
int d;
|
||||
while(1) {
|
||||
d = tolower(*a) - tolower(*b);
|
||||
d = g_tolower(*a) - g_tolower(*b);
|
||||
if((d != 0) or (*a == NUL) or (*b == NUL))
|
||||
break;
|
||||
a++;
|
||||
|
@ -141,7 +141,7 @@ int ftn_version7_nodelist_index::namecmp() const {
|
||||
int n = 1;
|
||||
int d;
|
||||
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))
|
||||
break;
|
||||
a++;
|
||||
|
@ -140,7 +140,7 @@ bool gfuzzy::findnext() {
|
||||
if(casing)
|
||||
charmatch = pattern[i] == text[textloc];
|
||||
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 b = ldiff[i+1] + 1;
|
||||
int c = rdiff[i] + 1;
|
||||
|
@ -940,7 +940,7 @@ int gkbd_nt2bios(INPUT_RECORD& inp) {
|
||||
else {
|
||||
// If it is a letter key, use the ASCII value supplied
|
||||
// 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;
|
||||
else
|
||||
c = k->normal;
|
||||
@ -1087,7 +1087,7 @@ gkey kbxget_raw(int mode) {
|
||||
k = 0x7800 + ((key2 - '1') << 8);
|
||||
else if(key2 == '0')
|
||||
k = 0x8100;
|
||||
else if(isalpha(key2))
|
||||
else if(g_isalpha(key2))
|
||||
k = (scancode_table[key2]);
|
||||
else if(key2 == '\010')
|
||||
k = Key_A_BS;
|
||||
@ -1807,8 +1807,8 @@ int setonkey(gkey keycode, VfvCP func, gkey pass) {
|
||||
gkey key_tolower(gkey __keycode) {
|
||||
|
||||
byte &ascii = KCodAsc(__keycode);
|
||||
if(isupper(ascii))
|
||||
ascii = tolower(ascii);
|
||||
if(g_isupper(ascii))
|
||||
ascii = g_tolower(ascii);
|
||||
return __keycode;
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@ static char touplow(char* str, char* pos, char ch) {
|
||||
char i;
|
||||
|
||||
if(pos == str)
|
||||
return toupper(ch);
|
||||
return g_toupper(ch);
|
||||
|
||||
switch(*(pos-1)) { // check previous character
|
||||
case ' ': // see if it is a separator
|
||||
@ -46,10 +46,10 @@ static char touplow(char* str, char* pos, char ch) {
|
||||
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;
|
||||
default:
|
||||
i = (char)tolower(ch); // otherwise, convert to lower
|
||||
i = (char)g_tolower(ch); // otherwise, convert to lower
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -127,7 +127,7 @@ int strnicmpw(const char* str1, const char* str2, int len) {
|
||||
else if(str1[n] == '*')
|
||||
return 0;
|
||||
// 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;
|
||||
}
|
||||
|
||||
@ -605,7 +605,7 @@ char* strupr(char* s) {
|
||||
|
||||
char* p = s;
|
||||
while(*p) {
|
||||
*p = toupper(*p);
|
||||
*p = g_toupper(*p);
|
||||
p++;
|
||||
}
|
||||
return s;
|
||||
@ -615,7 +615,7 @@ char* strlwr(char* s) {
|
||||
|
||||
char* p = s;
|
||||
while(*p) {
|
||||
*p = tolower(*p);
|
||||
*p = g_tolower(*p);
|
||||
p++;
|
||||
}
|
||||
return s;
|
||||
|
@ -283,9 +283,9 @@ int str2mon(const char* ptr) {
|
||||
|
||||
int mon;
|
||||
|
||||
switch(toupper(*ptr)) {
|
||||
switch(g_toupper(*ptr)) {
|
||||
case 'A':
|
||||
if(toupper(ptr[1]) == 'P')
|
||||
if(g_toupper(ptr[1]) == 'P')
|
||||
mon = 4;
|
||||
else
|
||||
mon = 8;
|
||||
@ -297,15 +297,15 @@ int str2mon(const char* ptr) {
|
||||
mon = 2;
|
||||
break;
|
||||
case 'J':
|
||||
if(toupper(ptr[1]) == 'A')
|
||||
if(g_toupper(ptr[1]) == 'A')
|
||||
mon = 1;
|
||||
else if(toupper(ptr[2]) == 'L')
|
||||
else if(g_toupper(ptr[2]) == 'L')
|
||||
mon = 7;
|
||||
else
|
||||
mon = 6;
|
||||
break;
|
||||
case 'M':
|
||||
if(toupper(ptr[2]) == 'R')
|
||||
if(g_toupper(ptr[2]) == 'R')
|
||||
mon = 3;
|
||||
else
|
||||
mon = 5;
|
||||
@ -405,7 +405,7 @@ time32_t FidoTimeToUnix(char* ptr) {
|
||||
if(isdigit(*ptr)) {
|
||||
day = atoi(ptr);
|
||||
ptr = strskip_wht(strskip_txt(ptr));
|
||||
if(isalpha(*ptr)) {
|
||||
if(g_isalpha(*ptr)) {
|
||||
month = str2mon(ptr);
|
||||
if(month) {
|
||||
ptr = strskip_wht(strskip_txt(ptr));
|
||||
|
@ -38,7 +38,7 @@ int GetYesno(const char* value) {
|
||||
if(isdigit(*value))
|
||||
return atoi(value);
|
||||
|
||||
switch(toupper(*value)) {
|
||||
switch(g_toupper(*value)) {
|
||||
|
||||
case NUL: // Blank
|
||||
case 'T': // True
|
||||
@ -50,15 +50,15 @@ int GetYesno(const char* value) {
|
||||
return NO;
|
||||
|
||||
case 'O': // On or Off
|
||||
if(toupper(value[1]) == 'N')
|
||||
if(g_toupper(value[1]) == 'N')
|
||||
return YES;
|
||||
else
|
||||
return NO;
|
||||
|
||||
case 'A': // Always, Ask or Auto
|
||||
if(toupper(value[1]) == 'L')
|
||||
if(g_toupper(value[1]) == 'L')
|
||||
return ALWAYS;
|
||||
else if(toupper(value[1]) == 'S')
|
||||
else if(g_toupper(value[1]) == 'S')
|
||||
return ASK;
|
||||
else
|
||||
return GAUTO;
|
||||
|
@ -42,7 +42,7 @@
|
||||
uint32_t atoulx(const char* s);
|
||||
|
||||
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); }
|
||||
|
||||
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_set_ostitle_name(char *, int);
|
||||
|
||||
char g_tolower(char);
|
||||
char g_toupper(char);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -105,7 +105,7 @@ int gwildmatch::match_internal(const char* text, const char* pattern, bool ignor
|
||||
matched = false;
|
||||
if(p[1] == ']' or p[1] == '-') {
|
||||
if(ignorecase) {
|
||||
if(tolower(*++p) == tolower(*text))
|
||||
if(g_tolower(*++p) == g_tolower(*text))
|
||||
matched = true;
|
||||
}
|
||||
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) {
|
||||
// This next line requires a good C compiler
|
||||
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;
|
||||
}
|
||||
else {
|
||||
@ -133,7 +133,7 @@ int gwildmatch::match_internal(const char* text, const char* pattern, bool ignor
|
||||
// FALLTHROUGH
|
||||
default:
|
||||
if(ignorecase) {
|
||||
if(tolower(*text) != tolower(*p))
|
||||
if(g_tolower(*text) != g_tolower(*p))
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
@ -186,7 +186,7 @@ bool strwild(const char* str, const char* wild) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if(toupper(*str) == toupper(*wild) or *wild == '?') {
|
||||
else if(g_toupper(*str) == g_toupper(*wild) or *wild == '?') {
|
||||
wild++;
|
||||
str++;
|
||||
}
|
||||
|
@ -1216,7 +1216,7 @@ int wmenuget() {
|
||||
item=citem->next;
|
||||
for(;;) {
|
||||
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;
|
||||
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
|
||||
// character as the keypress. If not found after current
|
||||
// position, search from the beginning for a match
|
||||
ch = (char)toupper((char)xch);
|
||||
ch = (char)g_toupper((char)xch);
|
||||
if(!ch)
|
||||
break;
|
||||
for(i=r.curr+1; i<r.numelems; i++)
|
||||
if(ch==toupper(strarr[i][quickpos]))
|
||||
if(ch==g_toupper(strarr[i][quickpos]))
|
||||
break;
|
||||
if(i==r.numelems) {
|
||||
for(i=0;i<r.curr;i++)
|
||||
if(ch==toupper(strarr[i][quickpos]))
|
||||
if(ch==g_toupper(strarr[i][quickpos]))
|
||||
break;
|
||||
if(i==r.curr)
|
||||
continue;
|
||||
|
@ -1053,10 +1053,10 @@ bool gwinput::field::overwrite_char(char ch) {
|
||||
|
||||
switch(conversion) {
|
||||
case gwinput::cvt_lowercase:
|
||||
ch = (char)tolower(ch);
|
||||
ch = (char)g_tolower(ch);
|
||||
break;
|
||||
case gwinput::cvt_uppercase:
|
||||
ch = (char)toupper(ch);
|
||||
ch = (char)g_toupper(ch);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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++;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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");
|
||||
|
@ -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);
|
||||
|
@ -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 == '*') {
|
||||
|
@ -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')
|
||||
|
@ -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");
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -75,16 +75,16 @@
|
||||
# define ISGRAPH(c) (ISASCII (c) && isprint (c) && !isspace (c))
|
||||
#endif
|
||||
|
||||
#define ISPRINT(c) (ISASCII (c) && isprint (c))
|
||||
#define ISDIGIT(c) (ISASCII (c) && isdigit (c))
|
||||
#define ISALNUM(c) (ISASCII (c) && isalnum (c))
|
||||
#define ISALPHA(c) (ISASCII (c) && isalpha (c))
|
||||
#define ISCNTRL(c) (ISASCII (c) && iscntrl (c))
|
||||
#define ISLOWER(c) (ISASCII (c) && islower (c))
|
||||
#define ISPUNCT(c) (ISASCII (c) && ispunct (c))
|
||||
#define ISSPACE(c) (ISASCII (c) && isspace (c))
|
||||
#define ISUPPER(c) (ISASCII (c) && isupper (c))
|
||||
#define ISXDIGIT(c) (ISASCII (c) && isxdigit (c))
|
||||
#define ISPRINT(c) (ISASCII (c) && isprint (c))
|
||||
#define ISDIGIT(c) (ISASCII (c) && isdigit (c))
|
||||
#define ISALNUM(c) (ISASCII (c) && isxalnum (c))
|
||||
#define ISALPHA(c) (ISASCII (c) && g_isalpha (c))
|
||||
#define ISCNTRL(c) (ISASCII (c) && iscntrl (c))
|
||||
#define ISLOWER(c) (ISASCII (c) && g_islower (c))
|
||||
#define ISPUNCT(c) (ISASCII (c) && ispunct (c))
|
||||
#define ISSPACE(c) (ISASCII (c) && isspace (c))
|
||||
#define ISUPPER(c) (ISASCII (c) && g_isupper (c))
|
||||
#define ISXDIGIT(c) (ISASCII (c) && isxdigit (c))
|
||||
|
||||
# define STREQ(s1, s2) ((strcmp (s1, s2) == 0))
|
||||
|
||||
@ -140,9 +140,9 @@ fnmatch (pattern, string, flags)
|
||||
|
||||
/* Note that this evaluates C many times. */
|
||||
# ifdef _LIBC
|
||||
# define FOLD(c) ((flags & FNM_CASEFOLD) ? tolower (c) : (c))
|
||||
# define FOLD(c) ((flags & FNM_CASEFOLD) ? g_tolower (c) : (c))
|
||||
# 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
|
||||
|
||||
while ((c = *p++) != '\0')
|
||||
|
@ -243,16 +243,16 @@ init_syntax_once ()
|
||||
#endif
|
||||
|
||||
#undef ISPRINT
|
||||
#define ISPRINT(c) (ISASCII (c) && isprint (c))
|
||||
#define ISDIGIT(c) (ISASCII (c) && isdigit (c))
|
||||
#define ISALNUM(c) (ISASCII (c) && isalnum (c))
|
||||
#define ISALPHA(c) (ISASCII (c) && isalpha (c))
|
||||
#define ISCNTRL(c) (ISASCII (c) && iscntrl (c))
|
||||
#define ISLOWER(c) (ISASCII (c) && islower (c))
|
||||
#define ISPUNCT(c) (ISASCII (c) && ispunct (c))
|
||||
#define ISSPACE(c) (ISASCII (c) && isspace (c))
|
||||
#define ISUPPER(c) (ISASCII (c) && isupper (c))
|
||||
#define ISXDIGIT(c) (ISASCII (c) && isxdigit (c))
|
||||
#define ISPRINT(c) (ISASCII (c) && isprint (c))
|
||||
#define ISDIGIT(c) (ISASCII (c) && isdigit (c))
|
||||
#define ISALNUM(c) (ISASCII (c) && isxalnum (c))
|
||||
#define ISALPHA(c) (ISASCII (c) && g_isalpha (c))
|
||||
#define ISCNTRL(c) (ISASCII (c) && iscntrl (c))
|
||||
#define ISLOWER(c) (ISASCII (c) && g_islower (c))
|
||||
#define ISPUNCT(c) (ISASCII (c) && ispunct (c))
|
||||
#define ISSPACE(c) (ISASCII (c) && isspace (c))
|
||||
#define ISUPPER(c) (ISASCII (c) && g_isupper (c))
|
||||
#define ISXDIGIT(c) (ISASCII (c) && isxdigit (c))
|
||||
|
||||
#ifndef NULL
|
||||
# define NULL (void *)0
|
||||
@ -5631,7 +5631,7 @@ regcomp (preg, pattern, cflags)
|
||||
|
||||
/* Map uppercase characters to corresponding lowercase ones. */
|
||||
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
|
||||
preg->translate = NULL;
|
||||
|
@ -174,7 +174,7 @@ void EzycomArea::save_message(int __mode, gmsg* __msg, EzycHdr& __hdr) {
|
||||
_msgfast.whoto = CRC32_MASK_CCITT;
|
||||
char* _ptr = __msg->to;
|
||||
while(*_ptr) {
|
||||
_msgfast.whoto = updCrc32((char)toupper(*_ptr), _msgfast.whoto);
|
||||
_msgfast.whoto = updCrc32((char)g_toupper(*_ptr), _msgfast.whoto);
|
||||
_ptr++;
|
||||
}
|
||||
_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) {
|
||||
if(*ptr2 == '+') {
|
||||
// get flags
|
||||
switch(toupper(*(++ptr2))) {
|
||||
switch(g_toupper(*(++ptr2))) {
|
||||
case 'C': __msg->attr.cra1(); break;
|
||||
case 'D': __msg->attr.dir1(); break;
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ uint16_t XbbsCheckSum(char* str) {
|
||||
uint16_t checksum = 0;
|
||||
|
||||
while(*str) {
|
||||
checksum ^= (uint16_t)toupper(*str++);
|
||||
checksum ^= (uint16_t)g_toupper(*str++);
|
||||
if(checksum & 1)
|
||||
checksum = (uint16_t)((checksum >> 1) ^ 0xA000);
|
||||
else
|
||||
|
@ -90,7 +90,7 @@ int direxist(const char *directory)
|
||||
|
||||
/* 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, "\\")) {
|
||||
free(tempstr);
|
||||
return TRUE;
|
||||
@ -186,7 +186,7 @@ int direxist(const char *directory)
|
||||
|
||||
/* 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, "\\"))
|
||||
{
|
||||
ret = TRUE;
|
||||
@ -244,7 +244,7 @@ int _fast direxist(const char *directory)
|
||||
|
||||
/* 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, "\\"))
|
||||
{
|
||||
free(tempstr);
|
||||
|
@ -86,7 +86,7 @@ dword GenMsgIdEx(char *seqdir, unsigned long max_outrun, dword (*altGenMsgId)(vo
|
||||
p = getenv("SEQOUT");
|
||||
if ( p && isdigit((int)(*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 'd': max_outrun *= 24;
|
||||
case 'h': max_outrun *= 60*60;
|
||||
|
@ -4,5 +4,6 @@
|
||||
#define __TYPEDEFS_H__
|
||||
|
||||
#include <gdefs.h>
|
||||
#include <gctype.h>
|
||||
|
||||
#endif //#ifndef __TYPEDEFS_H__
|
||||
|
@ -34,7 +34,6 @@
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#ifdef STDC_HEADERS
|
||||
#include <stdlib.h>
|
||||
@ -50,6 +49,8 @@
|
||||
#include <memory.h>
|
||||
#endif
|
||||
|
||||
#include <gdefs.h>
|
||||
#include <gctype.h>
|
||||
#include <fptools.h>
|
||||
|
||||
#if 0
|
||||
@ -147,12 +148,12 @@ _FP_stricmp (char *str1, char *str2)
|
||||
return -1;
|
||||
|
||||
while (*str1) {
|
||||
if (tolower(*str1) != tolower(*str2))
|
||||
if (g_tolower(*str1) != g_tolower(*str2))
|
||||
break;
|
||||
str1++;
|
||||
str2++;
|
||||
}
|
||||
return (tolower (*str1) - tolower (*str2));
|
||||
return (g_tolower (*str1) - g_tolower (*str2));
|
||||
}
|
||||
|
||||
int TOOLEXPORT
|
||||
@ -162,13 +163,13 @@ _FP_strnicmp (char *str1, char *str2, int count)
|
||||
return -1;
|
||||
|
||||
while (*str1 && count) {
|
||||
if (tolower(*str1) != tolower(*str2))
|
||||
if (g_tolower(*str1) != g_tolower(*str2))
|
||||
break;
|
||||
str1++;
|
||||
str2++;
|
||||
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)) {
|
||||
for (ptr2=str2;
|
||||
*ptr1 && *ptr2 && tolower(*ptr1)==tolower(*ptr2);
|
||||
*ptr1 && *ptr2 && g_tolower(*ptr1)==g_tolower(*ptr2);
|
||||
ptr1++, ptr2++)
|
||||
/* empty loop */ ;
|
||||
|
||||
@ -332,7 +333,7 @@ _FP_stoupper (char *input)
|
||||
return NULL;
|
||||
|
||||
while (*iter) {
|
||||
*iter = toupper (*iter);
|
||||
*iter = g_toupper (*iter);
|
||||
iter++;
|
||||
}
|
||||
return input;
|
||||
@ -347,7 +348,7 @@ _FP_stolower (char *input)
|
||||
return NULL;
|
||||
|
||||
while (*iter) {
|
||||
*iter = tolower (*iter);
|
||||
*iter = g_tolower (*iter);
|
||||
iter++;
|
||||
}
|
||||
return input;
|
||||
|
@ -32,7 +32,6 @@
|
||||
**/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#ifdef STDC_HEADERS
|
||||
#include <stdlib.h>
|
||||
@ -48,6 +47,8 @@
|
||||
#include <memory.h>
|
||||
#endif
|
||||
|
||||
#include <gdefs.h>
|
||||
#include <gctype.h>
|
||||
#include <uudeview.h>
|
||||
#include <uuint.h>
|
||||
#include <fptools.h>
|
||||
@ -165,7 +166,7 @@ UUGetFileName (char *subject, char *ptonum, char *ptonend)
|
||||
count = length = alflag = 0;
|
||||
while (iter[count] &&
|
||||
(isalnum (iter[count]) || strchr (uufnchars, iter[count])!=NULL)) {
|
||||
if (isalpha (iter[count]))
|
||||
if (g_isalpha(iter[count]))
|
||||
alflag++;
|
||||
count++;
|
||||
}
|
||||
@ -224,14 +225,14 @@ UUGetFileName (char *subject, char *ptonum, char *ptonend)
|
||||
|
||||
if (_FP_strnicmp (ptr, "ftp", 3) == 0) {
|
||||
/* hey, that's an ftp address */
|
||||
while (isalpha (*ptr) || isdigit (*ptr) || *ptr == '.')
|
||||
while (g_isalpha(*ptr) || isdigit (*ptr) || *ptr == '.')
|
||||
ptr++;
|
||||
continue;
|
||||
}
|
||||
|
||||
while ((isalnum(*iter)||strchr(uufnchars, *iter)!=NULL||
|
||||
*iter=='/') && *iter && iter != ptonum && *iter != '.') {
|
||||
if (isalpha (*iter))
|
||||
if (g_isalpha(*iter))
|
||||
alflag = 1;
|
||||
|
||||
count++; iter++;
|
||||
@ -253,7 +254,7 @@ UUGetFileName (char *subject, char *ptonum, char *ptonend)
|
||||
if (_FP_strnicmp (iter, "edu", 3) == 0 ||
|
||||
_FP_strnicmp (iter, "gov", 3) == 0) {
|
||||
/* hey, that's an ftp address */
|
||||
while (isalpha (*iter) || isdigit (*iter) || *iter == '.')
|
||||
while (g_isalpha(*iter) || isdigit (*iter) || *iter == '.')
|
||||
iter++;
|
||||
ptr = iter;
|
||||
length = 0;
|
||||
@ -310,7 +311,7 @@ UUGetFileName (char *subject, char *ptonum, char *ptonend)
|
||||
if (length == 0) { /* No filename found, use subject line for ident */
|
||||
ptr = subject;
|
||||
|
||||
while (*ptr && !isalpha (*ptr))
|
||||
while (*ptr && !g_isalpha(*ptr))
|
||||
ptr++;
|
||||
|
||||
while ((isalnum(ptr[length])||strchr(uufnchars,ptr[length])!=NULL||
|
||||
@ -541,7 +542,7 @@ UUGetPartNo (char *subject, char **where, char **whend)
|
||||
if (isdigit(*(iter-1))) {
|
||||
while (iter>subject && isdigit (*(iter-1)))
|
||||
iter--;
|
||||
if (!isdigit (*iter) && !isalpha (*iter) && *iter != '.')
|
||||
if (!isdigit (*iter) && !g_isalpha(*iter) && *iter != '.')
|
||||
iter++;
|
||||
ptr = iter;
|
||||
|
||||
@ -595,7 +596,7 @@ UUGetPartNo (char *subject, char **where, char **whend)
|
||||
ptr = subject;
|
||||
|
||||
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--;
|
||||
continue;
|
||||
}
|
||||
@ -604,7 +605,7 @@ UUGetPartNo (char *subject, char **where, char **whend)
|
||||
while (count >= 0 && isdigit (ptr[count])) {
|
||||
count--; length++;
|
||||
}
|
||||
if (count>=0 && ((isalpha (ptr[count]) &&
|
||||
if (count>=0 && ((g_isalpha(ptr[count]) &&
|
||||
(ptr[count] != 's' || ptr[count+1] != 't') &&
|
||||
(ptr[count] != 'n' || ptr[count+1] != 'd')) ||
|
||||
ptr[count] == '/' || ptr[count] == '.' ||
|
||||
|
@ -36,7 +36,6 @@
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#ifdef STDC_HEADERS
|
||||
#include <stdlib.h>
|
||||
@ -52,6 +51,8 @@
|
||||
#include <errno.h>
|
||||
#endif
|
||||
|
||||
#include <gdefs.h>
|
||||
#include <gctype.h>
|
||||
#include <crc32.h>
|
||||
#include <uudeview.h>
|
||||
#include <uuint.h>
|
||||
@ -465,7 +466,7 @@ UUValidData (char *ptr, int encoding, int *bhflag)
|
||||
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
|
||||
* space characters at all. if we know we _are_ decoding uuencoded
|
||||
@ -788,8 +789,8 @@ UUDecodeQP (FILE *datain, FILE *dataout, int *state,
|
||||
p1 = ++p2;
|
||||
|
||||
if (isxdigit (*p2) && isxdigit (*(p2+1))) {
|
||||
val = ((isdigit(*p2)) ? (*p2-'0') : (tolower(*p2)-'a'+10)) << 4;
|
||||
val |= ((isdigit(*(p2+1)))?(*(p2+1)-'0') : (tolower(*(p2+1))-'a'+10));
|
||||
val = ((isdigit(*p2)) ? (*p2-'0') : (g_tolower(*p2)-'a'+10)) << 4;
|
||||
val |= ((isdigit(*(p2+1)))?(*(p2+1)-'0') : (g_tolower(*(p2+1))-'a'+10));
|
||||
|
||||
fputc (val, dataout);
|
||||
p2 += 2;
|
||||
|
Reference in New Issue
Block a user