Two small bugs in config parsers fixed.
This commit is contained in:
parent
8821a1698f
commit
7de851a3c0
@ -12,6 +12,12 @@ ______________________________________________________________________
|
|||||||
Notes for GoldED+ 1.1.4.5, May XX 2000
|
Notes for GoldED+ 1.1.4.5, May XX 2000
|
||||||
______________________________________________________________________
|
______________________________________________________________________
|
||||||
|
|
||||||
|
- Fixed small bug in fidoconfig parser that brokes correct handling of
|
||||||
|
INCLUDE keyword.
|
||||||
|
|
||||||
|
- Adjusted buffer size in Crashmail II parser, added LOCALAREA
|
||||||
|
recognition.
|
||||||
|
|
||||||
- EditExportText now saves whole the message to file, this is more
|
- EditExportText now saves whole the message to file, this is more
|
||||||
predictable behaviour than before.
|
predictable behaviour than before.
|
||||||
|
|
||||||
|
@ -110,6 +110,7 @@ void gareafile::ReadCrashmail(char* tag) {
|
|||||||
|
|
||||||
const word CRC_AKA = 0x13A4;
|
const word CRC_AKA = 0x13A4;
|
||||||
const word CRC_AREA = 0x010B;
|
const word CRC_AREA = 0x010B;
|
||||||
|
const word CRC_LOCALAREA = 0xAEC1;
|
||||||
const word CRC_DESCRIPTION = 0x2DF1;
|
const word CRC_DESCRIPTION = 0x2DF1;
|
||||||
const word CRC_DOMAIN = 0xFFCA;
|
const word CRC_DOMAIN = 0xFFCA;
|
||||||
const word CRC_GROUP = 0x1C9B;
|
const word CRC_GROUP = 0x1C9B;
|
||||||
@ -121,10 +122,12 @@ void gareafile::ReadCrashmail(char* tag) {
|
|||||||
const word CRC_JAM = 0xA8C3;
|
const word CRC_JAM = 0xA8C3;
|
||||||
const word CRC_SQUISH = 0xFCF6;
|
const word CRC_SQUISH = 0xFCF6;
|
||||||
|
|
||||||
while(fgets(buf, 81, fp) != NULL) {
|
word crc16;
|
||||||
|
|
||||||
|
while(fgets(buf, 4000, fp) != NULL) {
|
||||||
jbcpos=0;
|
jbcpos=0;
|
||||||
jbstrcpy(key, buf, 30, &jbcpos);
|
jbstrcpy(key, buf, 30, &jbcpos);
|
||||||
switch(strCrc16(key)) {
|
switch(crc16 = strCrc16(key)) {
|
||||||
case CRC_SYSOP:
|
case CRC_SYSOP:
|
||||||
jbstrcpy(tmp, buf, 100, &jbcpos);
|
jbstrcpy(tmp, buf, 100, &jbcpos);
|
||||||
CfgUsername(tmp);
|
CfgUsername(tmp);
|
||||||
@ -141,12 +144,13 @@ void gareafile::ReadCrashmail(char* tag) {
|
|||||||
break;
|
break;
|
||||||
case CRC_AREA:
|
case CRC_AREA:
|
||||||
case CRC_NETMAIL:
|
case CRC_NETMAIL:
|
||||||
|
case CRC_LOCALAREA:
|
||||||
if(aa.type != 0xff) {
|
if(aa.type != 0xff) {
|
||||||
if(not unconfirmed)
|
if(not unconfirmed)
|
||||||
AddNewArea(aa);
|
AddNewArea(aa);
|
||||||
aa.reset();
|
aa.reset();
|
||||||
}
|
}
|
||||||
aa.type = (strCrc16(key) == CRC_NETMAIL) ? GMB_NET : GMB_ECHO;
|
aa.type = (crc16 == CRC_NETMAIL) ? GMB_NET : (crc16 == CRC_LOCALAREA) ? GMB_LOCAL : GMB_ECHO;
|
||||||
switch(aa.type) {
|
switch(aa.type) {
|
||||||
case GMB_NET:
|
case GMB_NET:
|
||||||
aa.attr = attribsnet;
|
aa.attr = attribsnet;
|
||||||
|
@ -120,7 +120,7 @@ bool gareafile::ReadHPTLine(FILE* f, string* s, bool add, int state) {
|
|||||||
++ptr;
|
++ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(not str.empty() and (*(str.end()-1) == '\n'))
|
while(not str.empty() and ((*(str.end()-1) == '\n') or (*(str.end()-1) == '\r')))
|
||||||
str.erase(str.end()-1);
|
str.erase(str.end()-1);
|
||||||
|
|
||||||
const char *p = strskip_wht(str.c_str());
|
const char *p = strskip_wht(str.c_str());
|
||||||
|
Reference in New Issue
Block a user