From dbeb60a30e7e59bab052d27f6dca39686e6f7c22 Mon Sep 17 00:00:00 2001 From: "Alexander S. Aganichev" Date: Mon, 23 Sep 2002 09:23:45 +0000 Subject: [PATCH] Fixes to the recent patches --- docs/notework.txt | 4 ++++ golded3/gckeys.cpp | 2 +- golded3/geglob.cpp | 8 ++++++-- goldlib/gall/gfilutil.h | 2 +- goldlib/gcfg/gxsync.cpp | 4 ++-- goldlib/glibc/config.h | 2 +- goldlib/uulib/config.h | 4 ++-- 7 files changed, 17 insertions(+), 9 deletions(-) diff --git a/docs/notework.txt b/docs/notework.txt index dd1a7c5..1bca941 100644 --- a/docs/notework.txt +++ b/docs/notework.txt @@ -12,6 +12,10 @@ ______________________________________________________________________ Notes for GoldED+ 1.1.5, /snapshot/ ______________________________________________________________________ +- Fixed keyboard macro handling broken somewhere in pre-1.1.5s. + +- Fixed Synchronet configuration parser :-) + + Added Synchronet configuration parser: Areafile Synchronet path\to\msgs.cnf diff --git a/golded3/gckeys.cpp b/golded3/gckeys.cpp index 35664de..7d95fd7 100644 --- a/golded3/gckeys.cpp +++ b/golded3/gckeys.cpp @@ -922,7 +922,7 @@ static void SetKeybDefaults() { int keys = (sizeof(DefaultKeyset) / sizeof(CmdKey)) - 1; int k = 0; while(k < keys) { - if(tmp->key < 0xFF) + if(tmp->key <= 0xFF) tmp->key = (gkey)tolower(tmp->key); KeyCmdAdd(tmp->cmd, tmp->key, tmp->type); tmp++; diff --git a/golded3/geglob.cpp b/golded3/geglob.cpp index 7845dc9..02d8c3a 100644 --- a/golded3/geglob.cpp +++ b/golded3/geglob.cpp @@ -255,6 +255,10 @@ bool inline samekey(gkey key1, gkey key2) { if(key1 >= KK_Commands) // special key return false; + if(key1 == key2) + return true; + if((key1 > 0xFF) || (key2 > 0xFF)) + return false; return (tolower(key1) == key2) or (tolower(key2) == key1); } @@ -265,7 +269,7 @@ int IsMacro(gkey key, int type) { std::vector::iterator m = CFG->macro.begin(); while(m != CFG->macro.end()) { - if(((key == m->key) or samekey(key, m->key)) and (type == m->type)) + if(samekey(key, m->key) and (type == m->type)) return true; m++; } @@ -280,7 +284,7 @@ int PlayMacro(gkey key, int type) { std::vector::iterator m = CFG->macro.begin(); while(m != CFG->macro.end()) { - if(((key == m->key) or samekey(key, m->key)) and (type == m->type)) { + if(samekey(key, m->key) and (type == m->type)) { RunMacro(&(*m)); return true; } diff --git a/goldlib/gall/gfilutil.h b/goldlib/gall/gfilutil.h index c678c52..a3e81d6 100644 --- a/goldlib/gall/gfilutil.h +++ b/goldlib/gall/gfilutil.h @@ -34,7 +34,7 @@ #include #include #include -#ifdef _POSIX_SOURCE +#ifndef _MSC_VER #include #else #include diff --git a/goldlib/gcfg/gxsync.cpp b/goldlib/gcfg/gxsync.cpp index d621704..9a90588 100644 --- a/goldlib/gcfg/gxsync.cpp +++ b/goldlib/gcfg/gxsync.cpp @@ -94,8 +94,8 @@ void gareafile::ReadSynchronet(char* tag) { aa.setechoid(sub.code); aa.setdesc(sub.lname); aa.groupid = 0x8000 + sub.grp; - if(*sub.echopath) - MakePathname(file, sub.echopath, sub.code); + if(*sub.data_dir) + MakePathname(file, sub.data_dir, sub.code); else MakePathname(file, path, sub.code); aa.setpath(file); diff --git a/goldlib/glibc/config.h b/goldlib/glibc/config.h index aea3d2c..211beca 100644 --- a/goldlib/glibc/config.h +++ b/goldlib/glibc/config.h @@ -6,7 +6,7 @@ #define HAVE_DIRENT_H 1 #define STDC_HEADERS 1 -#ifdef _POSIX_SOURCE +#ifndef _MSC_VER #define HAVE_UNISTD_H 1 #endif #define HAVE_STRING_H 1 diff --git a/goldlib/uulib/config.h b/goldlib/uulib/config.h index 508dd9d..3a44872 100644 --- a/goldlib/uulib/config.h +++ b/goldlib/uulib/config.h @@ -55,7 +55,7 @@ #define HAVE_FCNTL_H 1 /* Define if you have the header file. */ -#ifndef _POSIX_SOURCE +#ifdef _MSC_VER #define HAVE_IO_H #endif @@ -72,7 +72,7 @@ #define HAVE_SYS_TIME_H 1 /* Define if you have the header file. */ -#ifdef _POSIX_SOURCE +#ifndef _MSC_VER #define HAVE_UNISTD_H 1 #endif