From 9012b446d779a76d80a5dbc42b0da5d2e8d253f7 Mon Sep 17 00:00:00 2001 From: kernc Date: Tue, 13 Jul 2010 15:34:56 +0000 Subject: [PATCH] updated args.cc so there are no 0bXXXX binary constants defined (replaced with hexadecimal 0xXXXX), because they seem to cause errors on older g++ git-svn-id: https://logkeys.googlecode.com/svn/trunk@67 c501e62c-e7d1-11de-a198-37193048d1ed --- src/args.cc | 12 ++++++------ src/logkeys.cc | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/args.cc b/src/args.cc index cdb8d26..235f7da 100644 --- a/src/args.cc +++ b/src/args.cc @@ -25,12 +25,12 @@ struct arguments char * irc_port; // if --post-irc effective, this holds the IRC port number off_t post_size; // post log file to remote when of size post_size, --post-size switch int flags; // holds the following option flags -#define FLAG_EXPORT_KEYMAP 0b1 // export keymap obtained from dumpkeys, --export-keymap is used -#define FLAG_NO_FUNC_KEYS 0b10 // only log character keys (e.g. 'c', '2', etc.) and don't log function keys (e.g. , etc.), --no-func-keys switch -#define FLAG_NO_TIMESTAMPS 0b100 // don't log timestamps, --no-timestamps switch -#define FLAG_POST_HTTP 0b1000 // post log to remote HTTP server, --post-http switch -#define FLAG_POST_IRC 0b10000 // post log to remote IRC server, --post-irc switch -#define FLAG_POST_SIZE 0b100000 // post log to remote HTTP or IRC server when log of size optarg, --post-size +#define FLAG_EXPORT_KEYMAP 0x1 // export keymap obtained from dumpkeys, --export-keymap is used +#define FLAG_NO_FUNC_KEYS 0x2 // only log character keys (e.g. 'c', '2', etc.) and don't log function keys (e.g. , etc.), --no-func-keys switch +#define FLAG_NO_TIMESTAMPS 0x4 // don't log timestamps, --no-timestamps switch +#define FLAG_POST_HTTP 0x8 // post log to remote HTTP server, --post-http switch +#define FLAG_POST_IRC 0x10 // post log to remote IRC server, --post-irc switch +#define FLAG_POST_SIZE 0x20 // post log to remote HTTP or IRC server when log of size optarg, --post-size } args = {0}; // default all args to 0x0 diff --git a/src/logkeys.cc b/src/logkeys.cc index 370da13..c1fe382 100644 --- a/src/logkeys.cc +++ b/src/logkeys.cc @@ -61,7 +61,7 @@ namespace logkeys { -// executes cmd and returns string ouput or "ERR" on pipe error +// executes cmd and returns string ouput std::string execute(const char* cmd) { FILE* pipe = popen(cmd, "r");