From e8334245554f4c4fa10462b6681364cb68d750f6 Mon Sep 17 00:00:00 2001 From: jwalz Date: Sat, 9 Mar 2002 01:59:47 +0000 Subject: [PATCH] Make pre-ANSI compiler happy. --- src/cmd.c | 2 +- src/options.c | 12 ++++++------ src/wizard.c | 2 +- src/worn.c | 4 +++- win/share/tilemap.c | 2 +- 5 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/cmd.c b/src/cmd.c index 7de0be410..e1915a8e3 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -1048,7 +1048,7 @@ minimal_enlightenment() anything any; char buf[BUFSZ], buf2[BUFSZ]; static char fmtstr[] = "%-15s: %-12s"; - char deity_fmtstr[] = "%-17s%s"; + static char deity_fmtstr[] = "%-17s%s"; any.a_void = 0; buf[0] = buf2[0] = '\0'; diff --git a/src/options.c b/src/options.c index e459423c6..c33f64a0f 100644 --- a/src/options.c +++ b/src/options.c @@ -1617,7 +1617,7 @@ goodfruit: prefix_val = -1; while (*op && num < sizeof flags.end_disclose - 1) { register char c, *dop; - char valid_settings[] = { + static char valid_settings[] = { DISCLOSE_PROMPT_DEFAULT_YES, DISCLOSE_PROMPT_DEFAULT_NO, DISCLOSE_YES_WITHOUT_PROMPT, @@ -2379,7 +2379,7 @@ boolean setinitial,setfromfile; * The order of disclose_names[] * must correspond to disclosure_options in decl.h */ - const char *disclosure_names[] = { + static const char *disclosure_names[] = { "inventory", "attributes", "vanquished", "genocides", "conduct" }; int disc_cat[NUM_DISCLOSURE_OPTIONS]; @@ -3146,15 +3146,15 @@ char *op; int j; char buf[BUFSZ]; char *wn, *tfg, *tbg, *newop; - char *wnames[] = {"menu", "message", "status", "text"}; - char *shortnames[] = {"mnu", "msg", "sts", "txt"}; - char **fgp[] = { + static char *wnames[] = {"menu", "message", "status", "text"}; + static char *shortnames[] = {"mnu", "msg", "sts", "txt"}; + static char **fgp[] = { &iflags.wc_foregrnd_menu, &iflags.wc_foregrnd_message, &iflags.wc_foregrnd_status, &iflags.wc_foregrnd_text }; - char **bgp[] = { + static char **bgp[] = { &iflags.wc_backgrnd_menu, &iflags.wc_backgrnd_message, &iflags.wc_backgrnd_status, diff --git a/src/wizard.c b/src/wizard.c index 851501ecd..c9d00a018 100644 --- a/src/wizard.c +++ b/src/wizard.c @@ -366,7 +366,7 @@ tactics(mtmp) } } } - /* NOTREACHED */ + /*NOTREACHED*/ return(0); } diff --git a/src/worn.c b/src/worn.c index f4a448390..99b4967cb 100644 --- a/src/worn.c +++ b/src/worn.c @@ -701,7 +701,9 @@ boolean polyspot; /* currently only does speed boots, but might be expanded if monsters get to use more armor abilities */ static int -extra_pref(struct monst *mon, struct obj *obj) +extra_pref(mon, obj) +struct monst *mon; +struct obj *obj; { if (obj) { if (obj->otyp == SPEED_BOOTS && mon->permspeed != MFAST) diff --git a/win/share/tilemap.c b/win/share/tilemap.c index 0ec14bde2..a8bbfcc76 100644 --- a/win/share/tilemap.c +++ b/win/share/tilemap.c @@ -216,7 +216,7 @@ int set, entry; i = entry - tilenum; if (i < (MAXEXPCHARS * EXPL_MAX)) { if (set == OTH_GLYPH) { - char *explosion_types[] = { /* hack.h */ + static char *explosion_types[] = { /* hack.h */ "dark", "noxious", "muddy", "wet", "magical", "fiery", "frosty" };