From 2b7bccbb42e8826fedd4142cf21d2386c0afb039 Mon Sep 17 00:00:00 2001 From: Roman Mohr Date: Sun, 23 Jun 2013 17:25:50 +0200 Subject: siege compatibility patches --- ChangeLog | 6 +++++- include/joedog/defs.h | 7 ++++--- include/joedog/joedog.h | 14 ++++++++++++++ 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index a866f1b..49c3990 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,8 @@ *libjoedog-0.1.0 (23 Jun 2013) - 23 Jun 2013; Roman Mohr : + 22 Jun 2013; Roman Mohr : initial release based on fido-1.1.0-beta + + 23 Jun 2013; Roman Mohr : + compatibility changes for siege + diff --git a/include/joedog/defs.h b/include/joedog/defs.h index da35665..2b33f2b 100644 --- a/include/joedog/defs.h +++ b/include/joedog/defs.h @@ -1,6 +1,6 @@ #ifndef JOEDOG_DEFS_H #define JOEDOG_DEFS_H -#define private static +#define private static #define public #include @@ -10,9 +10,10 @@ #define ISCOMMENT(x) (x == '#') #define ISSEPARATOR(x) (('='==(x))||(':'==(x))) #define ISSPACE(x) isspace((unsigned char)(x)) -#define ISOPERAND(x) ('<'==(x)||'>'==(x)||'='==(x)) +#define ISOPERAND(x) ('<'==(x)||'>'==(x)||'='==(x)) #define ISDIGIT(x) isdigit ((unsigned char)(x)) -#define ISQUOTE(x) (x == '"' || x == '\'') +#define ISNUMBER(v) (((v) > (char)0x2f) && ((v) < (char)0x3a)) +#define ISQUOTE(x) (x == '"' || x == '\'') #if STDC_HEADERS # define TOLOWER(Ch) tolower (Ch) # define TOUPPER(Ch) toupper (Ch) diff --git a/include/joedog/joedog.h b/include/joedog/joedog.h index 5698529..3a80c81 100644 --- a/include/joedog/joedog.h +++ b/include/joedog/joedog.h @@ -26,6 +26,15 @@ #include #include +#define BLACK 0 +#define RED 1 +#define GREEN 2 +#define YELLOW 3 +#define BLUE 4 +#define MAGENTA 5 +#define CYAN 6 +#define WHITE 7 + /** * Error notification */ @@ -42,11 +51,16 @@ void CLOSELOG(void); void SYSLOG(LEVEL L, const char *fmt, ...); void NOTIFY(LEVEL L, const char *fmt, ...); void VERBOSE(BOOLEAN verbose, const char *fmt, ...); +void DISPLAY(int color, const char *fmt, ...); +/** + * Memory management + */ void * xrealloc(void *, size_t); void * xmalloc (size_t); void * xcalloc (size_t, size_t); char * xstrdup(const char *str); +char * xstrcat(const char *arg1, ...); void xfree(void *ptr); /** -- cgit