From a329dd84046748ae5232208eb3f76cdd52de20ab Mon Sep 17 00:00:00 2001 From: Kevin Easton Date: Wed, 10 May 2017 23:19:57 +1000 Subject: [PATCH] Include vars.h in wserv.c and scr-bx.c for enum VAR_TYPES Also define STERM_C and include modval.h in scr-bx.c. This allows us to remove the slightly bogus dummy definition of enum VAR_TYPES from modval.h, and use a simple macro to redirect the declaration and use of get_int_var() to BX_get_int_var(). --- include/modval.h | 7 ++----- source/scr-bx.c | 5 ++++- source/wserv.c | 1 + 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/include/modval.h b/include/modval.h index c3fe7cb..f845ff8 100644 --- a/include/modval.h +++ b/include/modval.h @@ -39,11 +39,8 @@ #define ip_to_host(x) BX_ip_to_host(x) #define host_to_ip(x) BX_host_to_ip(x) #define connect_by_number(a, b, c, d, e) BX_connect_by_number(a, b, c, d, e) -#ifndef __vars_h_ -enum VAR_TYPES { unused }; -#endif -int get_int_var (enum VAR_TYPES); -void ircpanic (char *, ...); +#define get_int_var(v) BX_get_int_var(v) +#define ircpanic BX_ircpanic char *my_ltoa (long); #else diff --git a/source/scr-bx.c b/source/scr-bx.c index b4b24df..eeff32a 100644 --- a/source/scr-bx.c +++ b/source/scr-bx.c @@ -25,6 +25,9 @@ #include "ircterm.h" #include "screen.h" #include "ircaux.h" +#include "vars.h" +#define STERM_C +#include "modval.h" #include @@ -90,7 +93,7 @@ void ircpanic(char *string, ...) return; } -int get_int_var(int var) +int get_int_var(enum VAR_TYPES var) { return 1; } diff --git a/source/wserv.c b/source/wserv.c index 7c843b4..1b6a716 100644 --- a/source/wserv.c +++ b/source/wserv.c @@ -22,6 +22,7 @@ static char rcsid[] = "@(#)$Id$"; #include "ircterm.h" #include "ircaux.h" +#include "vars.h" #define WTERM_C #include "modval.h" #include