Fixed incorrect Macro processing, stripping spaces around origin, bit stablized crashmail parser

This commit is contained in:
Alexander S. Aganichev 2000-12-10 08:29:00 +00:00
parent 6bf3719817
commit d95538c3e5
3 changed files with 10 additions and 6 deletions

View File

@ -258,7 +258,7 @@ int IsMacro(gkey key, int type) {
vector<Macro>::iterator m = CFG->macro.begin();
while(m != CFG->macro.end()) {
if((key == m->key) and (type == m->type))
if(((key == m->key) or (tolower(key) == m->key) or (toupper(key) == m->key)) and (type == m->type))
return true;
m++;
}
@ -273,7 +273,7 @@ int PlayMacro(gkey key, int type) {
vector<Macro>::iterator m = CFG->macro.begin();
while(m != CFG->macro.end()) {
if((key == m->key) and (type == m->type)) {
if(((key == m->key) or (tolower(key) == m->key) or (toupper(key) == m->key)) and (type == m->type)) {
RunMacro(m);
return true;
}

View File

@ -530,6 +530,7 @@ int SelectFromFile(const char* file, char* selection, const char* title, const c
if(n != -1) {
strcpy(selection, Listi[n]);
strtrim(selection);
strltrim(selection);
retval = true;
}
for(n=0; n<lines; n++)

View File

@ -108,6 +108,7 @@ void gareafile::ReadCrashmail(char* tag) {
aa.reset();
aa.type = 0xff;
address[0] = NUL;
domain[0] = NUL;
const word CRC_AKA = 0x13A4;
const word CRC_AREA = 0x010B;
@ -151,6 +152,12 @@ void gareafile::ReadCrashmail(char* tag) {
AddNewArea(aa);
aa.reset();
}
unconfirmed = false;
jbstrcpy(tmp, buf, 100, &jbcpos);
if(strieql(tmp, "DEFAULT") or strnieql(tmp, "DEFAULT_", 8)) {
aa.type = 0xff;
break;
}
switch(crc16) {
case CRC_NETMAIL:
aa.type = GMB_NET;
@ -165,10 +172,6 @@ void gareafile::ReadCrashmail(char* tag) {
aa.attr = attribslocal;
break;
}
unconfirmed = false;
jbstrcpy(tmp, buf, 100, &jbcpos);
if(strieql(tmp, "DEFAULT") or strnieql(tmp, "DEFAULT_", 8))
break;
aa.setechoid(tmp);
jbstrcpy(tmp, buf, 50, &jbcpos);
aa.aka = primary_aka;