Fixed goldkeys.cfg parser

This commit is contained in:
Alexander S. Aganichev 2001-11-30 23:08:14 +00:00
parent 544d7b1f77
commit fe4a51f4ab
2 changed files with 18 additions and 3 deletions

View File

@ -12,6 +12,9 @@ ______________________________________________________________________
Notes for GoldED+ 1.1.5, /snapshot/
______________________________________________________________________
- Fixed small bug in goldkeys.cfg parser so the last line without
the feed was incorrectly processed.
- Fixed pseudo in Internet areas.
- Partially fixed ATTRIBSEMAIL and ATTRIBSNEWS operation. They still

View File

@ -991,6 +991,12 @@ int ReadKeysCfg(int force) {
continue;
ptr2 = ptr;
ptr = strskip_txt(ptr);
if(*ptr == NUL) {
std::cout << "* " << cfgname << ": Incomplete line " << line << "." << std::endl;
SayBibi();
cfgerrors++;
continue;
}
*ptr++ = NUL;
keycmd = SwitchKeyDefs(strCrc16(strupr(ptr2)), &keytype);
if(keycmd) {
@ -1020,7 +1026,9 @@ int ReadKeysCfg(int force) {
ptr = strskip_wht(ptr);
ptr2 = ptr;
ptr = strskip_txt(ptr);
*ptr++ = 0;
if(*ptr != NUL) {
*ptr++ = NUL;
}
keycmd = SwitchKeyDefs(strCrc16(strupr(ptr2)), &keytype);
if(keycmd) {
if((keycmd >= KK_Macro) and (keycmd <= KK_ReadMacro)) {
@ -1035,12 +1043,16 @@ int ReadKeysCfg(int force) {
ch = *ptr++;
tmp2.buf[n++] = (gkey)(ch | (scancode(ch) << 8));
}
if(*ptr != NUL) {
*ptr++ = NUL;
}
}
else {
ptr2 = ptr;
ptr = strskip_txt(ptr);
if(*ptr != NUL) {
*ptr++ = NUL;
}
int tmpkt;
keycmd = SwitchKeyDefs(strCrc16(strupr(ptr2)), &tmpkt);
if(keycmd) {