Fixes to the recent patches
This commit is contained in:
parent
c283d9e260
commit
dbeb60a30e
@ -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
|
||||
|
@ -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++;
|
||||
|
@ -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<Macro>::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<Macro>::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;
|
||||
}
|
||||
|
@ -34,7 +34,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#ifdef _POSIX_SOURCE
|
||||
#ifndef _MSC_VER
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#include <cstdlib>
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -55,7 +55,7 @@
|
||||
#define HAVE_FCNTL_H 1
|
||||
|
||||
/* Define if you have the <io.h> 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 <unistd.h> header file. */
|
||||
#ifdef _POSIX_SOURCE
|
||||
#ifndef _MSC_VER
|
||||
#define HAVE_UNISTD_H 1
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user