diff --git a/include/color.h b/include/color.h index 3eb49c612..9bf20f41c 100644 --- a/include/color.h +++ b/include/color.h @@ -49,11 +49,4 @@ #define DRAGON_SILVER CLR_BRIGHT_CYAN #define HI_ZAP CLR_BRIGHT_BLUE -struct menucoloring { - struct nhregex *match; - char *origstr; - int color, attr; - struct menucoloring *next; -}; - #endif /* COLOR_H */ diff --git a/include/hack.h b/include/hack.h index 46721704c..b052310f3 100644 --- a/include/hack.h +++ b/include/hack.h @@ -11,6 +11,7 @@ #endif #include "lint.h" +#include "color.h" #include "align.h" #include "dungeon.h" #include "objclass.h" @@ -23,7 +24,6 @@ #include "display.h" #include "botl.h" -#include "color.h" #include "context.h" #include "dungeon.h" #include "engrave.h" @@ -561,6 +561,12 @@ typedef struct ls_t { anything id; /* source's identifier */ } light_source; +struct menucoloring { + struct nhregex *match; + char *origstr; + int color, attr; + struct menucoloring *next; +}; enum movemodes { MV_ANY = -1, diff --git a/src/insight.c b/src/insight.c index 84474365e..cb35b8c6e 100644 --- a/src/insight.c +++ b/src/insight.c @@ -99,15 +99,15 @@ static struct ll_achieve_msg achieve_msg [] = { /* macros to simplify output of enlightenment messages; also used by conduct and achievements */ #define enl_msg(prefix, present, past, suffix, ps) \ - enlght_line(prefix, final ? past : present, suffix, ps) -#define you_are(attr, ps) enl_msg(You_, are, were, attr, ps) -#define you_have(attr, ps) enl_msg(You_, have, had, attr, ps) -#define you_can(attr, ps) enl_msg(You_, can, could, attr, ps) -#define you_have_been(goodthing) enl_msg(You_, have_been, were, goodthing, "") + enlght_line((prefix), final ? (past) : (present), (suffix), (ps)) +#define you_are(attr, ps) enl_msg(You_, are, were, (attr), (ps)) +#define you_have(attr, ps) enl_msg(You_, have, had, (attr), (ps)) +#define you_can(attr, ps) enl_msg(You_, can, could, (attr), (ps)) +#define you_have_been(goodthing) enl_msg(You_, have_been, were, (goodthing), "") #define you_have_never(badthing) \ - enl_msg(You_, have_never, never, badthing, "") + enl_msg(You_, have_never, never, (badthing), "") #define you_have_X(something) \ - enl_msg(You_, have, (const char *) "", something, "") + enl_msg(You_, have, (const char *) "", (something), "") static void enlght_out(const char *buf) diff --git a/src/options.c b/src/options.c index 08bfd70cf..87dc6ac09 100644 --- a/src/options.c +++ b/src/options.c @@ -7107,10 +7107,12 @@ parsebindings(char *bindings) * */ -static const struct color_names { +struct color_names { const char *name; int color; -} colornames[] = { +}; + +static const struct color_names colornames[] = { { "black", CLR_BLACK }, { "red", CLR_RED }, { "green", CLR_GREEN }, @@ -7127,7 +7129,7 @@ static const struct color_names { { "light cyan", CLR_BRIGHT_CYAN }, { "white", CLR_WHITE }, { "no color", NO_COLOR }, - { NULL, CLR_BLACK }, /* everything after this is an alias */ + { (const char *) 0, CLR_BLACK }, /* everything after this is an alias */ { "transparent", NO_COLOR }, { "purple", CLR_MAGENTA }, { "light purple", CLR_BRIGHT_MAGENTA }, @@ -7140,10 +7142,12 @@ static const struct color_names { { "bright cyan", CLR_BRIGHT_CYAN } }; -static const struct attr_names { +struct attr_names { const char *name; int attr; -} attrnames[] = { +}; + +static const struct attr_names attrnames[] = { { "none", ATR_NONE }, { "bold", ATR_BOLD }, { "dim", ATR_DIM }, @@ -7151,7 +7155,7 @@ static const struct attr_names { { "underline", ATR_ULINE }, { "blink", ATR_BLINK }, { "inverse", ATR_INVERSE }, - { NULL, ATR_NONE }, /* everything after this is an alias */ + { (const char *) 0, ATR_NONE }, /* everything after this is an alias */ { "normal", ATR_NONE }, { "uline", ATR_ULINE }, { "reverse", ATR_INVERSE },