Fixed fidoconfig parsing.

This commit is contained in:
Ianos Gnatiuc 2006-06-29 15:50:19 +00:00
parent 6ad07cd1bc
commit 501d7c1aa8
3 changed files with 18 additions and 3 deletions

View File

@ -10,6 +10,8 @@ _____________________________________________________________________________
‡ ¬¥âª¨ ¤«ï GoldED+ 1.1.5, /snapshot/
_____________________________________________________________________________
+ <20>®¤¤¥à¦ª  ª¥©¢®à¤  'set' ¢ fidoconfig-¥.
- Golded+ ¬®£ 㯠áâì ¢® ¢à¥¬ï ¯ àᨭ£  fidoconfig- .
- ˆá¯à ¢«¥­ ¡ £ ¢ á⥪¥ ®âª â  । ªâ®à , ¯à¨ ª®â®à®¬ £®«¤¥¤ ¯à®¡®¢ « ¯à®ç¥áâì ¯®
¨­¤¥ªáã ¡®«ìè¥ ç¥¬ à §¬¥à áâப¨.
+ „®¡ ¢«¥­ ReadForceDeleteMsg (¯® 㬮«ç ­¨î #Del) ¢ goldkeys.cfg ¤«ï 㤠«¥­¨ï

View File

@ -10,6 +10,10 @@ ______________________________________________________________________
Notes for GoldED+ 1.1.5, /snapshot/
______________________________________________________________________
+ Support for keyword 'set' in fidoconfig.
- Golded+ can crash when parsing fidoconfig.
- Fixed string subscript out of range in editors undo stack.
+ Added ReadForceDeleteMsg (default is #Del) to the goldkeys.cfg used to

View File

@ -73,6 +73,7 @@ bool gareafile::ReadHPTLine(gfile &f, std::string* s, bool add, int state)
if(state != 1) {
str.erase(ptr, str.end());
state = 2;
continue;
}
}
else {
@ -175,6 +176,7 @@ void gareafile::ReadHPTFile(char* path, char* file, char* origin, int group) {
const word CRC_VERSION = 0xF78F;
const word CRC_COMMENTCHAR = 0xE2CC;
const word CRC_ECHOAREADEFAULTS = 0x2CBB;
const word CRC_SET = 0x2FC2;
AreaCfg aa;
Path buf2;
@ -203,12 +205,19 @@ void gareafile::ReadHPTFile(char* path, char* file, char* origin, int group) {
char* key;
char* val = ptr;
gettok(&key, &val);
switch(strCrc16(key)) {
case CRC_VERSION:
switch (strCrc16(key))
{
case CRC_SET:
if (strchg(val, '[', '%') != 0)
strchg(val, ']', '%');
putenv(val);
break;
case CRC_VERSION:
{
int ver_maj, ver_min;
sscanf(val, "%d.%d", &ver_maj, &ver_min);
if ((ver_maj != 0) and (ver_min >= 0) and (ver_min < 15))
if (((ver_maj << 16) + ver_min) > 0x00010009)
{
STD_PRINTNL("* Error: Unknown fidoconfig version " << ver_maj << '.' << ver_min << " - Skipping.");
throw_xfree(alptr);