diff --git a/docs/notework.rus b/docs/notework.rus index dffd630..5e38bfc 100644 --- a/docs/notework.rus +++ b/docs/notework.rus @@ -10,6 +10,8 @@ _____________________________________________________________________________ Заметки для GoldED+ 1.1.5, /snapshot/ _____________________________________________________________________________ ++ Поддержка кейворда 'set' в fidoconfig-е. +- Golded+ мог упасть во время парсинга fidoconfig-а. - Исправлен баг в стеке отката редактора, при котором голдед пробовал прочесть по индексу больше чем размер строки. + Добавлен ReadForceDeleteMsg (по умолчанию #Del) в goldkeys.cfg для удаления diff --git a/docs/notework.txt b/docs/notework.txt index 36aa98f..2288d89 100644 --- a/docs/notework.txt +++ b/docs/notework.txt @@ -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 diff --git a/goldlib/gcfg/gxhpt.cpp b/goldlib/gcfg/gxhpt.cpp index dbca2bf..0f72ea3 100644 --- a/goldlib/gcfg/gxhpt.cpp +++ b/goldlib/gcfg/gxhpt.cpp @@ -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);