remove STATIC_DCL, STATIC_OVL, STATIC_VAR, STATIC_PTR from win/tty

This commit is contained in:
nhmall
2019-07-14 17:33:44 -04:00
parent a0c38bd76c
commit 6688053802
4 changed files with 92 additions and 92 deletions
+5 -5
View File
@@ -15,12 +15,12 @@
#include "func_tab.h" #include "func_tab.h"
char morc = 0; /* tell the outside world what char you chose */ char morc = 0; /* tell the outside world what char you chose */
STATIC_VAR boolean suppress_history; static boolean suppress_history;
STATIC_DCL boolean FDECL(ext_cmd_getlin_hook, (char *)); static boolean FDECL(ext_cmd_getlin_hook, (char *));
typedef boolean FDECL((*getlin_hook_proc), (char *)); typedef boolean FDECL((*getlin_hook_proc), (char *));
STATIC_DCL void FDECL(hooked_tty_getlin, static void FDECL(hooked_tty_getlin,
(const char *, char *, getlin_hook_proc)); (const char *, char *, getlin_hook_proc));
extern int NDECL(extcmd_via_menu); /* cmd.c */ extern int NDECL(extcmd_via_menu); /* cmd.c */
@@ -41,7 +41,7 @@ register char *bufp;
hooked_tty_getlin(query, bufp, (getlin_hook_proc) 0); hooked_tty_getlin(query, bufp, (getlin_hook_proc) 0);
} }
STATIC_OVL void static void
hooked_tty_getlin(query, bufp, hook) hooked_tty_getlin(query, bufp, hook)
const char *query; const char *query;
register char *bufp; register char *bufp;
@@ -252,7 +252,7 @@ register const char *s; /* chars allowed besides return */
* + we don't change the characters that are already in base * + we don't change the characters that are already in base
* + base has enough room to hold our string * + base has enough room to hold our string
*/ */
STATIC_OVL boolean static boolean
ext_cmd_getlin_hook(base) ext_cmd_getlin_hook(base)
char *base; char *base;
{ {
+7 -7
View File
@@ -34,15 +34,15 @@ static void NDECL(kill_hilite);
/* (see tcap.h) -- nh_CM, nh_ND, nh_CD, nh_HI,nh_HE, nh_US,nh_UE, ul_hack */ /* (see tcap.h) -- nh_CM, nh_ND, nh_CD, nh_HI,nh_HE, nh_US,nh_UE, ul_hack */
struct tc_lcl_data tc_lcl_data = { 0, 0, 0, 0, 0, 0, 0, FALSE }; struct tc_lcl_data tc_lcl_data = { 0, 0, 0, 0, 0, 0, 0, FALSE };
STATIC_VAR char *HO, *CL, *CE, *UP, *XD, *BC, *SO, *SE, *TI, *TE; static char *HO, *CL, *CE, *UP, *XD, *BC, *SO, *SE, *TI, *TE;
STATIC_VAR char *VS, *VE; static char *VS, *VE;
STATIC_VAR char *ME, *MR, *MB, *MH, *MD; static char *ME, *MR, *MB, *MH, *MD;
#ifdef TERMLIB #ifdef TERMLIB
boolean dynamic_HIHE = FALSE; boolean dynamic_HIHE = FALSE;
STATIC_VAR int SG; static int SG;
STATIC_OVL char PC = '\0'; static char PC = '\0';
STATIC_VAR char tbuf[512]; static char tbuf[512];
#endif /*TERMLIB*/ #endif /*TERMLIB*/
#ifdef TEXTCOLOR #ifdef TEXTCOLOR
@@ -61,7 +61,7 @@ extern boolean HE_resets_AS;
#endif #endif
#ifndef TERMLIB #ifndef TERMLIB
STATIC_VAR char tgotobuf[20]; static char tgotobuf[20];
#ifdef TOS #ifdef TOS
#define tgoto(fmt, x, y) (Sprintf(tgotobuf, fmt, y + ' ', x + ' '), tgotobuf) #define tgoto(fmt, x, y) (Sprintf(tgotobuf, fmt, y + ' ', x + ' '), tgotobuf)
#else #else
+12 -12
View File
@@ -14,11 +14,11 @@
#define C(c) (0x1f & (c)) #define C(c) (0x1f & (c))
#endif #endif
STATIC_DCL void FDECL(redotoplin, (const char *)); static void FDECL(redotoplin, (const char *));
STATIC_DCL void FDECL(topl_putsym, (CHAR_P)); static void FDECL(topl_putsym, (CHAR_P));
STATIC_DCL void FDECL(removetopl, (int)); static void FDECL(removetopl, (int));
STATIC_DCL void FDECL(msghistory_snapshot, (BOOLEAN_P)); static void FDECL(msghistory_snapshot, (BOOLEAN_P));
STATIC_DCL void FDECL(free_msghistory_snapshot, (BOOLEAN_P)); static void FDECL(free_msghistory_snapshot, (BOOLEAN_P));
int int
tty_doprev_message() tty_doprev_message()
@@ -122,7 +122,7 @@ tty_doprev_message()
return 0; return 0;
} }
STATIC_OVL void static void
redotoplin(str) redotoplin(str)
const char *str; const char *str;
{ {
@@ -298,7 +298,7 @@ register const char *bp;
redotoplin(g.toplines); redotoplin(g.toplines);
} }
STATIC_OVL static
void void
topl_putsym(c) topl_putsym(c)
char c; char c;
@@ -350,7 +350,7 @@ const char *str;
topl_putsym(*str++); topl_putsym(*str++);
} }
STATIC_OVL void static void
removetopl(n) removetopl(n)
register int n; register int n;
{ {
@@ -550,7 +550,7 @@ static char **snapshot_mesgs = 0;
/* collect currently available message history data into a sequential array; /* collect currently available message history data into a sequential array;
optionally, purge that data from the active circular buffer set as we go */ optionally, purge that data from the active circular buffer set as we go */
STATIC_OVL void static void
msghistory_snapshot(purge) msghistory_snapshot(purge)
boolean purge; /* clear message history buffer as we copy it */ boolean purge; /* clear message history buffer as we copy it */
{ {
@@ -596,7 +596,7 @@ boolean purge; /* clear message history buffer as we copy it */
} }
/* release memory allocated to message history snapshot */ /* release memory allocated to message history snapshot */
STATIC_OVL void static void
free_msghistory_snapshot(purged) free_msghistory_snapshot(purged)
boolean purged; /* True: took history's pointers, False: just cloned them */ boolean purged; /* True: took history's pointers, False: just cloned them */
{ {
@@ -617,7 +617,7 @@ boolean purged; /* True: took history's pointers, False: just cloned them */
} }
} }
STATIC_OVL ptr_array_t * static ptr_array_t *
get_message_history() get_message_history()
{ {
char *mesg; char *mesg;
@@ -653,7 +653,7 @@ get_message_history()
return a; return a;
} }
STATIC_OVL void static void
purge_message_history() purge_message_history()
{ {
int i; int i;
+68 -68
View File
@@ -180,45 +180,45 @@ boolean HE_resets_AS; /* see termcap.c */
static const char to_continue[] = "to continue"; static const char to_continue[] = "to continue";
#define getret() getreturn(to_continue) #define getret() getreturn(to_continue)
#else #else
STATIC_DCL void NDECL(getret); static void NDECL(getret);
#endif #endif
STATIC_DCL void FDECL(bail, (const char *)); /* __attribute__((noreturn)) */ static void FDECL(bail, (const char *)); /* __attribute__((noreturn)) */
STATIC_DCL void NDECL(new_status_window); static void NDECL(new_status_window);
STATIC_DCL void FDECL(erase_menu_or_text, (winid, struct WinDesc *, static void FDECL(erase_menu_or_text, (winid, struct WinDesc *,
BOOLEAN_P)); BOOLEAN_P));
STATIC_DCL void FDECL(free_window_info, (struct WinDesc *, BOOLEAN_P)); static void FDECL(free_window_info, (struct WinDesc *, BOOLEAN_P));
STATIC_DCL void FDECL(dmore, (struct WinDesc *, const char *)); static void FDECL(dmore, (struct WinDesc *, const char *));
STATIC_DCL void FDECL(set_item_state, (winid, int, tty_menu_item *)); static void FDECL(set_item_state, (winid, int, tty_menu_item *));
STATIC_DCL void FDECL(set_all_on_page, (winid, tty_menu_item *, static void FDECL(set_all_on_page, (winid, tty_menu_item *,
tty_menu_item *)); tty_menu_item *));
STATIC_DCL void FDECL(unset_all_on_page, (winid, tty_menu_item *, static void FDECL(unset_all_on_page, (winid, tty_menu_item *,
tty_menu_item *)); tty_menu_item *));
STATIC_DCL void FDECL(invert_all_on_page, (winid, tty_menu_item *, static void FDECL(invert_all_on_page, (winid, tty_menu_item *,
tty_menu_item *, CHAR_P)); tty_menu_item *, CHAR_P));
STATIC_DCL void FDECL(invert_all, (winid, tty_menu_item *, static void FDECL(invert_all, (winid, tty_menu_item *,
tty_menu_item *, CHAR_P)); tty_menu_item *, CHAR_P));
STATIC_DCL void FDECL(toggle_menu_attr, (BOOLEAN_P, int, int)); static void FDECL(toggle_menu_attr, (BOOLEAN_P, int, int));
STATIC_DCL void FDECL(process_menu_window, (winid, struct WinDesc *)); static void FDECL(process_menu_window, (winid, struct WinDesc *));
STATIC_DCL void FDECL(process_text_window, (winid, struct WinDesc *)); static void FDECL(process_text_window, (winid, struct WinDesc *));
STATIC_DCL tty_menu_item *FDECL(reverse, (tty_menu_item *)); static tty_menu_item *FDECL(reverse, (tty_menu_item *));
STATIC_DCL const char *FDECL(compress_str, (const char *)); static const char *FDECL(compress_str, (const char *));
STATIC_DCL void FDECL(tty_putsym, (winid, int, int, CHAR_P)); static void FDECL(tty_putsym, (winid, int, int, CHAR_P));
STATIC_DCL void FDECL(setup_rolemenu, (winid, BOOLEAN_P, int, int, int)); static void FDECL(setup_rolemenu, (winid, BOOLEAN_P, int, int, int));
STATIC_DCL void FDECL(setup_racemenu, (winid, BOOLEAN_P, int, int, int)); static void FDECL(setup_racemenu, (winid, BOOLEAN_P, int, int, int));
STATIC_DCL void FDECL(setup_gendmenu, (winid, BOOLEAN_P, int, int, int)); static void FDECL(setup_gendmenu, (winid, BOOLEAN_P, int, int, int));
STATIC_DCL void FDECL(setup_algnmenu, (winid, BOOLEAN_P, int, int, int)); static void FDECL(setup_algnmenu, (winid, BOOLEAN_P, int, int, int));
STATIC_DCL boolean NDECL(reset_role_filtering); static boolean NDECL(reset_role_filtering);
#ifdef STATUS_HILITES #ifdef STATUS_HILITES
STATIC_DCL boolean FDECL(check_fields, (BOOLEAN_P, int *)); static boolean FDECL(check_fields, (BOOLEAN_P, int *));
STATIC_DCL void NDECL(render_status); static void NDECL(render_status);
STATIC_DCL void FDECL(tty_putstatusfield, (const char *, int, int)); static void FDECL(tty_putstatusfield, (const char *, int, int));
STATIC_DCL boolean NDECL(check_windowdata); static boolean NDECL(check_windowdata);
STATIC_DCL int NDECL(condition_size); static int NDECL(condition_size);
STATIC_DCL int FDECL(make_things_fit, (BOOLEAN_P)); static int FDECL(make_things_fit, (BOOLEAN_P));
STATIC_DCL void FDECL(shrink_enc, (int)); static void FDECL(shrink_enc, (int));
STATIC_DCL void FDECL(shrink_dlvl, (int)); static void FDECL(shrink_dlvl, (int));
#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED) #if (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
STATIC_DCL void NDECL(status_sanity_check); static void NDECL(status_sanity_check);
#endif /* NH_DEVEL_STATUS */ #endif /* NH_DEVEL_STATUS */
#endif #endif
@@ -266,7 +266,7 @@ int i, c, d;
/* clean up and quit */ /* clean up and quit */
STATIC_OVL void static void
bail(mesg) bail(mesg)
const char *mesg; const char *mesg;
{ {
@@ -277,7 +277,7 @@ const char *mesg;
} }
#if defined(SIGWINCH) && defined(CLIPPING) #if defined(SIGWINCH) && defined(CLIPPING)
STATIC_DCL void FDECL(winch_handler, (int)); static void FDECL(winch_handler, (int));
/* /*
* This really ought to just set a flag like the hangup handler does, * This really ought to just set a flag like the hangup handler does,
@@ -289,7 +289,7 @@ STATIC_DCL void FDECL(winch_handler, (int));
* 'winch_seen' has been "notyet" for a long time.... * 'winch_seen' has been "notyet" for a long time....
*/ */
/*ARGUSED*/ /*ARGUSED*/
STATIC_OVL void static void
winch_handler(sig_unused) /* signal handler is called with at least 1 arg */ winch_handler(sig_unused) /* signal handler is called with at least 1 arg */
int sig_unused UNUSED; int sig_unused UNUSED;
{ {
@@ -355,7 +355,7 @@ int sig_unused UNUSED;
/* destroy and recreate status window; extracted from winch_handler() /* destroy and recreate status window; extracted from winch_handler()
and augmented for use by tty_preference_update() */ and augmented for use by tty_preference_update() */
STATIC_OVL void static void
new_status_window() new_status_window()
{ {
if (WIN_STATUS != WIN_ERR) { if (WIN_STATUS != WIN_ERR) {
@@ -1031,7 +1031,7 @@ tty_player_selection()
return; return;
} }
STATIC_OVL boolean static boolean
reset_role_filtering() reset_role_filtering()
{ {
winid win; winid win;
@@ -1085,7 +1085,7 @@ reset_role_filtering()
#undef ALGN #undef ALGN
/* add entries a-Archeologist, b-Barbarian, &c to menu being built in 'win' */ /* add entries a-Archeologist, b-Barbarian, &c to menu being built in 'win' */
STATIC_OVL void static void
setup_rolemenu(win, filtering, race, gend, algn) setup_rolemenu(win, filtering, race, gend, algn)
winid win; winid win;
boolean filtering; /* True => exclude filtered roles; False => filter reset */ boolean filtering; /* True => exclude filtered roles; False => filter reset */
@@ -1128,7 +1128,7 @@ int race, gend, algn; /* all ROLE_NONE for !filtering case */
} }
} }
STATIC_OVL void static void
setup_racemenu(win, filtering, role, gend, algn) setup_racemenu(win, filtering, role, gend, algn)
winid win; winid win;
boolean filtering; boolean filtering;
@@ -1161,7 +1161,7 @@ int role, gend, algn;
} }
} }
STATIC_DCL void static void
setup_gendmenu(win, filtering, role, race, algn) setup_gendmenu(win, filtering, role, race, algn)
winid win; winid win;
boolean filtering; boolean filtering;
@@ -1192,7 +1192,7 @@ int role, race, algn;
} }
} }
STATIC_DCL void static void
setup_algnmenu(win, filtering, role, race, gend) setup_algnmenu(win, filtering, role, race, gend)
winid win; winid win;
boolean filtering; boolean filtering;
@@ -1342,7 +1342,7 @@ tty_get_nh_event()
} }
#if !defined(MICRO) && !defined(WIN32CON) #if !defined(MICRO) && !defined(WIN32CON)
STATIC_OVL void static void
getret() getret()
{ {
HUPSKIP(); HUPSKIP();
@@ -1535,7 +1535,7 @@ int type;
return newid; return newid;
} }
STATIC_OVL void static void
erase_menu_or_text(window, cw, clear) erase_menu_or_text(window, cw, clear)
winid window; winid window;
struct WinDesc *cw; struct WinDesc *cw;
@@ -1555,7 +1555,7 @@ boolean clear;
} }
} }
STATIC_OVL void static void
free_window_info(cw, free_data) free_window_info(cw, free_data)
struct WinDesc *cw; struct WinDesc *cw;
boolean free_data; boolean free_data;
@@ -1699,7 +1699,7 @@ long count;
return FALSE; return FALSE;
} }
STATIC_OVL void static void
dmore(cw, s) dmore(cw, s)
register struct WinDesc *cw; register struct WinDesc *cw;
const char *s; /* valid responses */ const char *s; /* valid responses */
@@ -1720,7 +1720,7 @@ const char *s; /* valid responses */
xwaitforspace(s); xwaitforspace(s);
} }
STATIC_OVL void static void
set_item_state(window, lineno, item) set_item_state(window, lineno, item)
winid window; winid window;
int lineno; int lineno;
@@ -1736,7 +1736,7 @@ tty_menu_item *item;
term_end_attr(item->attr); term_end_attr(item->attr);
} }
STATIC_OVL void static void
set_all_on_page(window, page_start, page_end) set_all_on_page(window, page_start, page_end)
winid window; winid window;
tty_menu_item *page_start, *page_end; tty_menu_item *page_start, *page_end;
@@ -1751,7 +1751,7 @@ tty_menu_item *page_start, *page_end;
} }
} }
STATIC_OVL void static void
unset_all_on_page(window, page_start, page_end) unset_all_on_page(window, page_start, page_end)
winid window; winid window;
tty_menu_item *page_start, *page_end; tty_menu_item *page_start, *page_end;
@@ -1767,7 +1767,7 @@ tty_menu_item *page_start, *page_end;
} }
} }
STATIC_OVL void static void
invert_all_on_page(window, page_start, page_end, acc) invert_all_on_page(window, page_start, page_end, acc)
winid window; winid window;
tty_menu_item *page_start, *page_end; tty_menu_item *page_start, *page_end;
@@ -1790,7 +1790,7 @@ char acc; /* group accelerator, 0 => all */
/* /*
* Invert all entries that match the give group accelerator (or all if zero). * Invert all entries that match the give group accelerator (or all if zero).
*/ */
STATIC_OVL void static void
invert_all(window, page_start, page_end, acc) invert_all(window, page_start, page_end, acc)
winid window; winid window;
tty_menu_item *page_start, *page_end; tty_menu_item *page_start, *page_end;
@@ -1821,7 +1821,7 @@ char acc; /* group accelerator, 0 => all */
} }
/* support menucolor in addition to caller-supplied attribute */ /* support menucolor in addition to caller-supplied attribute */
STATIC_OVL void static void
toggle_menu_attr(on, color, attr) toggle_menu_attr(on, color, attr)
boolean on; boolean on;
int color, attr; int color, attr;
@@ -1845,7 +1845,7 @@ int color, attr;
#endif #endif
} }
STATIC_OVL void static void
process_menu_window(window, cw) process_menu_window(window, cw)
winid window; winid window;
struct WinDesc *cw; struct WinDesc *cw;
@@ -2216,7 +2216,7 @@ struct WinDesc *cw;
free((genericptr_t) morestr); free((genericptr_t) morestr);
} }
STATIC_OVL void static void
process_text_window(window, cw) process_text_window(window, cw)
winid window; winid window;
struct WinDesc *cw; struct WinDesc *cw;
@@ -2560,7 +2560,7 @@ register int x, y; /* not xchar: perhaps xchar is unsigned and
ttyDisplay->cury = y; ttyDisplay->cury = y;
} }
STATIC_OVL void static void
tty_putsym(window, x, y, ch) tty_putsym(window, x, y, ch)
winid window; winid window;
int x, y; int x, y;
@@ -2593,7 +2593,7 @@ char ch;
} }
} }
STATIC_OVL const char * static const char *
compress_str(str) compress_str(str)
const char *str; const char *str;
{ {
@@ -2963,7 +2963,7 @@ boolean preselected; /* item is marked as selected */
} }
/* Invert the given list, can handle NULL as an input. */ /* Invert the given list, can handle NULL as an input. */
STATIC_OVL tty_menu_item * static tty_menu_item *
reverse(curr) reverse(curr)
tty_menu_item *curr; tty_menu_item *curr;
{ {
@@ -3758,9 +3758,9 @@ extern winid WIN_STATUS;
#ifdef STATUS_HILITES #ifdef STATUS_HILITES
#ifdef TEXTCOLOR #ifdef TEXTCOLOR
STATIC_DCL int FDECL(condcolor, (long, unsigned long *)); static int FDECL(condcolor, (long, unsigned long *));
#endif #endif
STATIC_DCL int FDECL(condattr, (long, unsigned long *)); static int FDECL(condattr, (long, unsigned long *));
static unsigned long *tty_colormasks; static unsigned long *tty_colormasks;
static long tty_condition_bits; static long tty_condition_bits;
static struct tty_status_fields tty_status[2][MAXBLSTATS]; /* 2: NOW,BEFORE */ static struct tty_status_fields tty_status[2][MAXBLSTATS]; /* 2: NOW,BEFORE */
@@ -4066,7 +4066,7 @@ unsigned long *colormasks;
return; return;
} }
STATIC_OVL int static int
make_things_fit(force_update) make_things_fit(force_update)
boolean force_update; boolean force_update;
{ {
@@ -4130,7 +4130,7 @@ boolean force_update;
* must be updated because they need to change. * must be updated because they need to change.
* This is now done at an individual field case-by-case level. * This is now done at an individual field case-by-case level.
*/ */
STATIC_OVL boolean static boolean
check_fields(forcefields, sz) check_fields(forcefields, sz)
boolean forcefields; boolean forcefields;
int sz[3]; int sz[3];
@@ -4233,7 +4233,7 @@ int sz[3];
} }
#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED) #if (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
STATIC_OVL void static void
status_sanity_check(VOID_ARGS) status_sanity_check(VOID_ARGS)
{ {
int i; int i;
@@ -4281,7 +4281,7 @@ status_sanity_check(VOID_ARGS)
/* /*
* This is what places a field on the tty display. * This is what places a field on the tty display.
*/ */
STATIC_OVL void static void
tty_putstatusfield(text, x, y) tty_putstatusfield(text, x, y)
const char *text; const char *text;
int x, y; int x, y;
@@ -4320,7 +4320,7 @@ int x, y;
} }
/* caller must set cond_shrinklvl (0..2) before calling us */ /* caller must set cond_shrinklvl (0..2) before calling us */
STATIC_OVL int static int
condition_size() condition_size()
{ {
long mask; long mask;
@@ -4338,7 +4338,7 @@ condition_size()
return lth; return lth;
} }
STATIC_OVL void static void
shrink_enc(lvl) shrink_enc(lvl)
int lvl; int lvl;
{ {
@@ -4350,7 +4350,7 @@ int lvl;
tty_status[NOW][BL_CAP].lth = strlen(status_vals[BL_CAP]); tty_status[NOW][BL_CAP].lth = strlen(status_vals[BL_CAP]);
} }
STATIC_OVL void static void
shrink_dlvl(lvl) shrink_dlvl(lvl)
int lvl; int lvl;
{ {
@@ -4371,7 +4371,7 @@ int lvl;
* Ensure the underlying status window data start out * Ensure the underlying status window data start out
* blank and null-terminated. * blank and null-terminated.
*/ */
STATIC_OVL boolean static boolean
check_windowdata(VOID_ARGS) check_windowdata(VOID_ARGS)
{ {
if (WIN_STATUS == WIN_ERR || wins[WIN_STATUS] == (struct WinDesc *) 0) { if (WIN_STATUS == WIN_ERR || wins[WIN_STATUS] == (struct WinDesc *) 0) {
@@ -4389,7 +4389,7 @@ check_windowdata(VOID_ARGS)
* Return what color this condition should * Return what color this condition should
* be displayed in based on user settings. * be displayed in based on user settings.
*/ */
STATIC_OVL int static int
condcolor(bm, bmarray) condcolor(bm, bmarray)
long bm; long bm;
unsigned long *bmarray; unsigned long *bmarray;
@@ -4411,7 +4411,7 @@ unsigned long *bmarray;
#define term_end_color(color) /*empty*/ #define term_end_color(color) /*empty*/
#endif /* TEXTCOLOR */ #endif /* TEXTCOLOR */
STATIC_OVL int static int
condattr(bm, bmarray) condattr(bm, bmarray)
long bm; long bm;
unsigned long *bmarray; unsigned long *bmarray;
@@ -4477,7 +4477,7 @@ unsigned long *bmarray;
} \ } \
} while (0) } while (0)
STATIC_OVL void static void
render_status(VOID_ARGS) render_status(VOID_ARGS)
{ {
long mask, bits; long mask, bits;