switch source tree from k&r to c99
This commit is contained in:
397
src/windows.c
397
src/windows.c
@@ -13,7 +13,7 @@ extern struct window_procs curses_procs;
|
||||
/* Cannot just blindly include winX.h without including all of X11 stuff
|
||||
and must get the order of include files right. Don't bother. */
|
||||
extern struct window_procs X11_procs;
|
||||
extern void FDECL(win_X11_init, (int));
|
||||
extern void win_X11_init(int);
|
||||
#endif
|
||||
#ifdef QT_GRAPHICS
|
||||
extern struct window_procs Qt_procs;
|
||||
@@ -26,13 +26,13 @@ extern struct window_procs mac_procs;
|
||||
#endif
|
||||
#ifdef BEOS_GRAPHICS
|
||||
extern struct window_procs beos_procs;
|
||||
extern void FDECL(be_win_init, (int));
|
||||
extern void be_win_init(int);
|
||||
FAIL /* be_win_init doesn't exist? XXX*/
|
||||
#endif
|
||||
#ifdef AMIGA_INTUITION
|
||||
extern struct window_procs amii_procs;
|
||||
extern struct window_procs amiv_procs;
|
||||
extern void FDECL(ami_wininit_data, (int));
|
||||
extern void ami_wininit_data(int);
|
||||
#endif
|
||||
#ifdef WIN32_GRAPHICS
|
||||
extern struct window_procs win32_procs;
|
||||
@@ -49,32 +49,32 @@ extern struct window_procs shim_procs;
|
||||
#endif
|
||||
#ifdef WINCHAIN
|
||||
extern struct window_procs chainin_procs;
|
||||
extern void FDECL(chainin_procs_init, (int));
|
||||
extern void *FDECL(chainin_procs_chain, (int, int, void *, void *, void *));
|
||||
extern void chainin_procs_init(int);
|
||||
extern void *chainin_procs_chain(int, int, void *, void *, void *);
|
||||
|
||||
extern struct chain_procs chainout_procs;
|
||||
extern void FDECL(chainout_procs_init, (int));
|
||||
extern void *FDECL(chainout_procs_chain, (int, int, void *, void *, void *));
|
||||
extern void chainout_procs_init(int);
|
||||
extern void *chainout_procs_chain(int, int, void *, void *, void *);
|
||||
|
||||
extern struct chain_procs trace_procs;
|
||||
extern void FDECL(trace_procs_init, (int));
|
||||
extern void *FDECL(trace_procs_chain, (int, int, void *, void *, void *));
|
||||
extern void trace_procs_init(int);
|
||||
extern void *trace_procs_chain(int, int, void *, void *, void *);
|
||||
#endif
|
||||
|
||||
static void FDECL(def_raw_print, (const char *s));
|
||||
static void NDECL(def_wait_synch);
|
||||
static void def_raw_print(const char *s);
|
||||
static void def_wait_synch(void);
|
||||
|
||||
#ifdef DUMPLOG
|
||||
static winid FDECL(dump_create_nhwindow, (int));
|
||||
static void FDECL(dump_clear_nhwindow, (winid));
|
||||
static void FDECL(dump_display_nhwindow, (winid, BOOLEAN_P));
|
||||
static void FDECL(dump_destroy_nhwindow, (winid));
|
||||
static void FDECL(dump_start_menu, (winid, unsigned long));
|
||||
static void FDECL(dump_add_menu, (winid, const glyph_info *, const ANY_P *, CHAR_P,
|
||||
CHAR_P, int, const char *, unsigned int));
|
||||
static void FDECL(dump_end_menu, (winid, const char *));
|
||||
static int FDECL(dump_select_menu, (winid, int, MENU_ITEM_P **));
|
||||
static void FDECL(dump_putstr, (winid, int, const char *));
|
||||
static winid dump_create_nhwindow(int);
|
||||
static void dump_clear_nhwindow(winid);
|
||||
static void dump_display_nhwindow(winid, boolean);
|
||||
static void dump_destroy_nhwindow(winid);
|
||||
static void dump_start_menu(winid, unsigned long);
|
||||
static void dump_add_menu(winid, const glyph_info *, const ANY_P *, char,
|
||||
char, int, const char *, unsigned int);
|
||||
static void dump_end_menu(winid, const char *);
|
||||
static int dump_select_menu(winid, int, MENU_ITEM_P **);
|
||||
static void dump_putstr(winid, int, const char *);
|
||||
#endif /* DUMPLOG */
|
||||
|
||||
#ifdef HANGUPHANDLING
|
||||
@@ -90,9 +90,9 @@ volatile
|
||||
|
||||
static struct win_choices {
|
||||
struct window_procs *procs;
|
||||
void FDECL((*ini_routine), (int)); /* optional (can be 0) */
|
||||
void (*ini_routine)(int); /* optional (can be 0) */
|
||||
#ifdef WINCHAIN
|
||||
void *FDECL((*chain_routine), (int, int, void *, void *, void *));
|
||||
void *(*chain_routine)(int, int, void *, void *, void *);
|
||||
#endif
|
||||
} winchoices[] = {
|
||||
#ifdef TTY_GRAPHICS
|
||||
@@ -156,7 +156,7 @@ struct winlink {
|
||||
static struct winlink *chain = 0;
|
||||
|
||||
static struct winlink *
|
||||
wl_new()
|
||||
wl_new(void)
|
||||
{
|
||||
struct winlink *wl = (struct winlink *) alloc(sizeof *wl);
|
||||
|
||||
@@ -192,28 +192,27 @@ wl_addtail(struct winlink *wl)
|
||||
#endif /* WINCHAIN */
|
||||
|
||||
boolean
|
||||
genl_can_suspend_no(VOID_ARGS)
|
||||
genl_can_suspend_no(void)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
boolean
|
||||
genl_can_suspend_yes(VOID_ARGS)
|
||||
genl_can_suspend_yes(void)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static
|
||||
void
|
||||
def_raw_print(s)
|
||||
const char *s;
|
||||
def_raw_print(const char *s)
|
||||
{
|
||||
puts(s);
|
||||
}
|
||||
|
||||
static
|
||||
void
|
||||
def_wait_synch(VOID_ARGS)
|
||||
def_wait_synch(void)
|
||||
{
|
||||
/* Config file error handling routines
|
||||
* call wait_sync() without checking to
|
||||
@@ -229,8 +228,7 @@ def_wait_synch(VOID_ARGS)
|
||||
|
||||
#ifdef WINCHAIN
|
||||
static struct win_choices *
|
||||
win_choices_find(s)
|
||||
const char *s;
|
||||
win_choices_find(const char *s)
|
||||
{
|
||||
register int i;
|
||||
|
||||
@@ -244,8 +242,7 @@ const char *s;
|
||||
#endif
|
||||
|
||||
void
|
||||
choose_windows(s)
|
||||
const char *s;
|
||||
choose_windows(const char *s)
|
||||
{
|
||||
int i;
|
||||
char *tmps = 0;
|
||||
@@ -321,8 +318,7 @@ const char *s;
|
||||
|
||||
#ifdef WINCHAIN
|
||||
void
|
||||
addto_windowchain(s)
|
||||
const char *s;
|
||||
addto_windowchain(const char *s)
|
||||
{
|
||||
register int i;
|
||||
|
||||
@@ -352,7 +348,7 @@ const char *s;
|
||||
}
|
||||
|
||||
void
|
||||
commit_windowchain()
|
||||
commit_windowchain(void)
|
||||
{
|
||||
struct winlink *p;
|
||||
int n;
|
||||
@@ -431,10 +427,9 @@ commit_windowchain()
|
||||
*/
|
||||
/*ARGSUSED*/
|
||||
char
|
||||
genl_message_menu(let, how, mesg)
|
||||
char let UNUSED;
|
||||
int how UNUSED;
|
||||
const char *mesg;
|
||||
genl_message_menu(char let UNUSED,
|
||||
int how UNUSED,
|
||||
const char *mesg)
|
||||
{
|
||||
pline("%s", mesg);
|
||||
return 0;
|
||||
@@ -442,8 +437,7 @@ const char *mesg;
|
||||
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
genl_preference_update(pref)
|
||||
const char *pref UNUSED;
|
||||
genl_preference_update(const char *pref UNUSED)
|
||||
{
|
||||
/* window ports are expected to provide
|
||||
their own preference update routine
|
||||
@@ -454,8 +448,7 @@ const char *pref UNUSED;
|
||||
}
|
||||
|
||||
char *
|
||||
genl_getmsghistory(init)
|
||||
boolean init UNUSED;
|
||||
genl_getmsghistory(boolean init UNUSED)
|
||||
{
|
||||
/* window ports can provide
|
||||
their own getmsghistory() routine to
|
||||
@@ -472,9 +465,7 @@ boolean init UNUSED;
|
||||
}
|
||||
|
||||
void
|
||||
genl_putmsghistory(msg, is_restoring)
|
||||
const char *msg;
|
||||
boolean is_restoring;
|
||||
genl_putmsghistory(const char *msg, boolean is_restoring)
|
||||
{
|
||||
/* window ports can provide
|
||||
their own putmsghistory() routine to
|
||||
@@ -508,44 +499,43 @@ boolean is_restoring;
|
||||
* in order to avoid all terminal I/O after hangup/disconnect.
|
||||
*/
|
||||
|
||||
static int NDECL(hup_nhgetch);
|
||||
static char FDECL(hup_yn_function, (const char *, const char *, CHAR_P));
|
||||
static int FDECL(hup_nh_poskey, (int *, int *, int *));
|
||||
static void FDECL(hup_getlin, (const char *, char *));
|
||||
static void FDECL(hup_init_nhwindows, (int *, char **));
|
||||
static void FDECL(hup_exit_nhwindows, (const char *));
|
||||
static winid FDECL(hup_create_nhwindow, (int));
|
||||
static int FDECL(hup_select_menu, (winid, int, MENU_ITEM_P **));
|
||||
static void FDECL(hup_add_menu, (winid, const glyph_info *, const anything *,
|
||||
CHAR_P, CHAR_P, int, const char *,
|
||||
unsigned int));
|
||||
static void FDECL(hup_end_menu, (winid, const char *));
|
||||
static void FDECL(hup_putstr, (winid, int, const char *));
|
||||
static void FDECL(hup_print_glyph, (winid, XCHAR_P, XCHAR_P,
|
||||
const glyph_info *, const glyph_info *));
|
||||
static void FDECL(hup_outrip, (winid, int, time_t));
|
||||
static void FDECL(hup_curs, (winid, int, int));
|
||||
static void FDECL(hup_display_nhwindow, (winid, BOOLEAN_P));
|
||||
static void FDECL(hup_display_file, (const char *, BOOLEAN_P));
|
||||
static int hup_nhgetch(void);
|
||||
static char hup_yn_function(const char *, const char *, char);
|
||||
static int hup_nh_poskey(int *, int *, int *);
|
||||
static void hup_getlin(const char *, char *);
|
||||
static void hup_init_nhwindows(int *, char **);
|
||||
static void hup_exit_nhwindows(const char *);
|
||||
static winid hup_create_nhwindow(int);
|
||||
static int hup_select_menu(winid, int, MENU_ITEM_P **);
|
||||
static void hup_add_menu(winid, const glyph_info *, const anything *, char,
|
||||
char, int, const char *, unsigned int);
|
||||
static void hup_end_menu(winid, const char *);
|
||||
static void hup_putstr(winid, int, const char *);
|
||||
static void hup_print_glyph(winid, xchar, xchar, const glyph_info *,
|
||||
const glyph_info *);
|
||||
static void hup_outrip(winid, int, time_t);
|
||||
static void hup_curs(winid, int, int);
|
||||
static void hup_display_nhwindow(winid, boolean);
|
||||
static void hup_display_file(const char *, boolean);
|
||||
#ifdef CLIPPING
|
||||
static void FDECL(hup_cliparound, (int, int));
|
||||
static void hup_cliparound(int, int);
|
||||
#endif
|
||||
#ifdef CHANGE_COLOR
|
||||
static void FDECL(hup_change_color, (int, long, int));
|
||||
static void hup_change_color(int, long, int);
|
||||
#ifdef MAC
|
||||
static short FDECL(hup_set_font_name, (winid, char *));
|
||||
static short hup_set_font_name(winid, char *);
|
||||
#endif
|
||||
static char *NDECL(hup_get_color_string);
|
||||
static char *hup_get_color_string(void);
|
||||
#endif /* CHANGE_COLOR */
|
||||
static void FDECL(hup_status_update, (int, genericptr_t, int, int, int,
|
||||
unsigned long *));
|
||||
static void hup_status_update(int, genericptr_t, int, int, int,
|
||||
unsigned long *);
|
||||
|
||||
static int NDECL(hup_int_ndecl);
|
||||
static void NDECL(hup_void_ndecl);
|
||||
static void FDECL(hup_void_fdecl_int, (int));
|
||||
static void FDECL(hup_void_fdecl_winid, (winid));
|
||||
static void FDECL(hup_void_fdecl_winid_ulong, (winid, unsigned long));
|
||||
static void FDECL(hup_void_fdecl_constchar_p, (const char *));
|
||||
static int hup_int_ndecl(void);
|
||||
static void hup_void_ndecl(void);
|
||||
static void hup_void_fdecl_int(int);
|
||||
static void hup_void_fdecl_winid(winid);
|
||||
static void hup_void_fdecl_winid_ulong(winid, unsigned long);
|
||||
static void hup_void_fdecl_constchar_p(const char *);
|
||||
|
||||
static struct window_procs hup_procs = {
|
||||
"hup", 0L, 0L,
|
||||
@@ -568,7 +558,7 @@ static struct window_procs hup_procs = {
|
||||
hup_cliparound,
|
||||
#endif
|
||||
#ifdef POSITIONBAR
|
||||
(void FDECL((*), (char *))) hup_void_fdecl_constchar_p,
|
||||
(void (*)(char *)) hup_void_fdecl_constchar_p,
|
||||
/* update_positionbar */
|
||||
#endif
|
||||
hup_print_glyph,
|
||||
@@ -597,13 +587,13 @@ static struct window_procs hup_procs = {
|
||||
genl_can_suspend_no,
|
||||
};
|
||||
|
||||
static void FDECL((*previnterface_exit_nhwindows), (const char *)) = 0;
|
||||
static void (*previnterface_exit_nhwindows)(const char *) = 0;
|
||||
|
||||
/* hangup has occurred; switch to no-op user interface */
|
||||
void
|
||||
nhwindows_hangup()
|
||||
nhwindows_hangup(void)
|
||||
{
|
||||
char *FDECL((*previnterface_getmsghistory), (BOOLEAN_P)) = 0;
|
||||
char *(*previnterface_getmsghistory)(boolean) = 0;
|
||||
|
||||
#ifdef ALTMETA
|
||||
/* command processor shouldn't look for 2nd char after seeing ESC */
|
||||
@@ -629,8 +619,7 @@ nhwindows_hangup()
|
||||
}
|
||||
|
||||
static void
|
||||
hup_exit_nhwindows(lastgasp)
|
||||
const char *lastgasp;
|
||||
hup_exit_nhwindows(const char *lastgasp)
|
||||
{
|
||||
/* core has called exit_nhwindows(); call the previous interface's
|
||||
shutdown routine now; xxx_exit_nhwindows() needs to call other
|
||||
@@ -644,16 +633,16 @@ const char *lastgasp;
|
||||
}
|
||||
|
||||
static int
|
||||
hup_nhgetch(VOID_ARGS)
|
||||
hup_nhgetch(void)
|
||||
{
|
||||
return '\033'; /* ESC */
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
static char
|
||||
hup_yn_function(prompt, resp, deflt)
|
||||
const char *prompt UNUSED, *resp UNUSED;
|
||||
char deflt;
|
||||
hup_yn_function(const char *prompt UNUSED,
|
||||
const char *resp UNUSED,
|
||||
char deflt)
|
||||
{
|
||||
if (!deflt)
|
||||
deflt = '\033';
|
||||
@@ -662,125 +651,102 @@ char deflt;
|
||||
|
||||
/*ARGSUSED*/
|
||||
static int
|
||||
hup_nh_poskey(x, y, mod)
|
||||
int *x UNUSED, *y UNUSED, *mod UNUSED;
|
||||
hup_nh_poskey(int *x UNUSED, int *y UNUSED, int *mod UNUSED)
|
||||
{
|
||||
return '\033';
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
static void
|
||||
hup_getlin(prompt, outbuf)
|
||||
const char *prompt UNUSED;
|
||||
char *outbuf;
|
||||
hup_getlin(const char *prompt UNUSED, char *outbuf)
|
||||
{
|
||||
Strcpy(outbuf, "\033");
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
static void
|
||||
hup_init_nhwindows(argc_p, argv)
|
||||
int *argc_p UNUSED;
|
||||
char **argv UNUSED;
|
||||
hup_init_nhwindows(int *argc_p UNUSED, char **argv UNUSED)
|
||||
{
|
||||
iflags.window_inited = 1;
|
||||
}
|
||||
|
||||
/*ARGUSED*/
|
||||
static winid
|
||||
hup_create_nhwindow(type)
|
||||
int type UNUSED;
|
||||
hup_create_nhwindow(int type UNUSED)
|
||||
{
|
||||
return WIN_ERR;
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
static int
|
||||
hup_select_menu(window, how, menu_list)
|
||||
winid window UNUSED;
|
||||
int how UNUSED;
|
||||
struct mi **menu_list UNUSED;
|
||||
hup_select_menu(winid window UNUSED, int how UNUSED,
|
||||
struct mi **menu_list UNUSED)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
static void
|
||||
hup_add_menu(window, glyphinfo, identifier, sel, grpsel, attr, txt, itemflags)
|
||||
winid window UNUSED;
|
||||
const glyph_info *glyphinfo UNUSED;
|
||||
int attr UNUSED;
|
||||
const anything *identifier UNUSED;
|
||||
char sel UNUSED, grpsel UNUSED;
|
||||
const char *txt UNUSED;
|
||||
unsigned int itemflags UNUSED;
|
||||
hup_add_menu(winid window UNUSED,
|
||||
const glyph_info *glyphinfo UNUSED,
|
||||
const anything *identifier UNUSED,
|
||||
char sel UNUSED,
|
||||
char grpsel UNUSED,
|
||||
int attr UNUSED,
|
||||
const char *txt UNUSED,
|
||||
unsigned int itemflags UNUSED)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
static void
|
||||
hup_end_menu(window, prompt)
|
||||
winid window UNUSED;
|
||||
const char *prompt UNUSED;
|
||||
hup_end_menu(winid window UNUSED, const char *prompt UNUSED)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
static void
|
||||
hup_putstr(window, attr, text)
|
||||
winid window UNUSED;
|
||||
int attr UNUSED;
|
||||
const char *text UNUSED;
|
||||
hup_putstr(winid window UNUSED, int attr UNUSED, const char *text UNUSED)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
static void
|
||||
hup_print_glyph(window, x, y, glyphinfo, bkglyphinfo)
|
||||
winid window UNUSED;
|
||||
xchar x UNUSED, y UNUSED;
|
||||
const glyph_info *glyphinfo UNUSED;
|
||||
const glyph_info *bkglyphinfo UNUSED;
|
||||
hup_print_glyph(winid window UNUSED,
|
||||
xchar x UNUSED, xchar y UNUSED,
|
||||
const glyph_info *glyphinfo UNUSED,
|
||||
const glyph_info *bkglyphinfo UNUSED)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
static void
|
||||
hup_outrip(tmpwin, how, when)
|
||||
winid tmpwin UNUSED;
|
||||
int how UNUSED;
|
||||
time_t when UNUSED;
|
||||
hup_outrip(winid tmpwin UNUSED, int how UNUSED, time_t when UNUSED)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
static void
|
||||
hup_curs(window, x, y)
|
||||
winid window UNUSED;
|
||||
int x UNUSED, y UNUSED;
|
||||
hup_curs(winid window UNUSED, int x UNUSED, int y UNUSED)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
static void
|
||||
hup_display_nhwindow(window, blocking)
|
||||
winid window UNUSED;
|
||||
boolean blocking UNUSED;
|
||||
hup_display_nhwindow(winid window UNUSED, boolean blocking UNUSED)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
static void
|
||||
hup_display_file(fname, complain)
|
||||
const char *fname UNUSED;
|
||||
boolean complain UNUSED;
|
||||
hup_display_file(const char *fname UNUSED, boolean complain UNUSED)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -788,8 +754,7 @@ boolean complain UNUSED;
|
||||
#ifdef CLIPPING
|
||||
/*ARGSUSED*/
|
||||
static void
|
||||
hup_cliparound(x, y)
|
||||
int x UNUSED, y UNUSED;
|
||||
hup_cliparound(int x UNUSED, int y UNUSED)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -798,9 +763,7 @@ int x UNUSED, y UNUSED;
|
||||
#ifdef CHANGE_COLOR
|
||||
/*ARGSUSED*/
|
||||
static void
|
||||
hup_change_color(color, rgb, reverse)
|
||||
int color, reverse;
|
||||
long rgb;
|
||||
hup_change_color(int color, int reverse, long rgb)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -808,16 +771,14 @@ long rgb;
|
||||
#ifdef MAC
|
||||
/*ARGSUSED*/
|
||||
static short
|
||||
hup_set_font_name(window, fontname)
|
||||
winid window;
|
||||
char *fontname;
|
||||
hup_set_font_name(winid window, char *fontname)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif /* MAC */
|
||||
|
||||
static char *
|
||||
hup_get_color_string(VOID_ARGS)
|
||||
hup_get_color_string(void)
|
||||
{
|
||||
return (char *) 0;
|
||||
}
|
||||
@@ -825,12 +786,9 @@ hup_get_color_string(VOID_ARGS)
|
||||
|
||||
/*ARGSUSED*/
|
||||
static void
|
||||
hup_status_update(idx, ptr, chg, pc, color, colormasks)
|
||||
int idx UNUSED;
|
||||
genericptr_t ptr UNUSED;
|
||||
int chg UNUSED, pc UNUSED, color UNUSED;
|
||||
unsigned long *colormasks UNUSED;
|
||||
|
||||
hup_status_update(int idx UNUSED, genericptr_t ptr UNUSED, int chg UNUSED,
|
||||
int pc UNUSED, int color UNUSED,
|
||||
unsigned long *colormasks UNUSED)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -840,46 +798,42 @@ unsigned long *colormasks UNUSED;
|
||||
*/
|
||||
|
||||
static int
|
||||
hup_int_ndecl(VOID_ARGS)
|
||||
hup_int_ndecl(void)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
static void
|
||||
hup_void_ndecl(VOID_ARGS)
|
||||
hup_void_ndecl(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/*ARGUSED*/
|
||||
static void
|
||||
hup_void_fdecl_int(arg)
|
||||
int arg UNUSED;
|
||||
hup_void_fdecl_int(int arg UNUSED)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/*ARGUSED*/
|
||||
static void
|
||||
hup_void_fdecl_winid(window)
|
||||
winid window UNUSED;
|
||||
hup_void_fdecl_winid(winid window UNUSED)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/*ARGUSED*/
|
||||
static void
|
||||
hup_void_fdecl_winid_ulong(window, mbehavior)
|
||||
winid window UNUSED;
|
||||
unsigned long mbehavior UNUSED;
|
||||
hup_void_fdecl_winid_ulong(winid window UNUSED,
|
||||
unsigned long mbehavior UNUSED)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/*ARGUSED*/
|
||||
static void
|
||||
hup_void_fdecl_constchar_p(string)
|
||||
const char *string UNUSED;
|
||||
hup_void_fdecl_constchar_p(const char *string UNUSED)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -897,7 +851,7 @@ char *status_vals[MAXBLSTATS];
|
||||
boolean status_activefields[MAXBLSTATS];
|
||||
|
||||
void
|
||||
genl_status_init()
|
||||
genl_status_init(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -913,7 +867,7 @@ genl_status_init()
|
||||
}
|
||||
|
||||
void
|
||||
genl_status_finish()
|
||||
genl_status_finish(void)
|
||||
{
|
||||
/* tear down routine */
|
||||
int i;
|
||||
@@ -926,11 +880,8 @@ genl_status_finish()
|
||||
}
|
||||
|
||||
void
|
||||
genl_status_enablefield(fieldidx, nm, fmt, enable)
|
||||
int fieldidx;
|
||||
const char *nm;
|
||||
const char *fmt;
|
||||
boolean enable;
|
||||
genl_status_enablefield(int fieldidx, const char *nm, const char *fmt,
|
||||
boolean enable)
|
||||
{
|
||||
status_fieldfmt[fieldidx] = fmt;
|
||||
status_fieldnm[fieldidx] = nm;
|
||||
@@ -939,11 +890,9 @@ boolean enable;
|
||||
|
||||
/* call once for each field, then call with BL_FLUSH to output the result */
|
||||
void
|
||||
genl_status_update(idx, ptr, chg, percent, color, colormasks)
|
||||
int idx;
|
||||
genericptr_t ptr;
|
||||
int chg UNUSED, percent UNUSED, color UNUSED;
|
||||
unsigned long *colormasks UNUSED;
|
||||
genl_status_update(int idx, genericptr_t ptr, int chg UNUSED,
|
||||
int percent UNUSED, int color UNUSED,
|
||||
unsigned long *colormasks UNUSED)
|
||||
{
|
||||
char newbot1[MAXCO], newbot2[MAXCO];
|
||||
long cond, *condptr = (long *) ptr;
|
||||
@@ -1126,12 +1075,11 @@ static FILE *dumplog_file;
|
||||
static time_t dumplog_now;
|
||||
|
||||
char *
|
||||
dump_fmtstr(fmt, buf, fullsubs)
|
||||
const char *fmt;
|
||||
char *buf;
|
||||
boolean fullsubs; /* True -> full substitution for file name, False ->
|
||||
* partial substitution for '--showpaths' feedback
|
||||
* where there's no game in progress when executed */
|
||||
dump_fmtstr(const char *fmt, char *buf,
|
||||
boolean fullsubs) /* True -> full substitution for file name,
|
||||
False -> partial substitution for
|
||||
'--showpaths' feedback where there's
|
||||
no game in progress when executed */
|
||||
{
|
||||
const char *fp = fmt;
|
||||
char *bp = buf;
|
||||
@@ -1243,8 +1191,7 @@ boolean fullsubs; /* True -> full substitution for file name, False ->
|
||||
#endif /* DUMPLOG */
|
||||
|
||||
void
|
||||
dump_open_log(now)
|
||||
time_t now;
|
||||
dump_open_log(time_t now)
|
||||
{
|
||||
#ifdef DUMPLOG
|
||||
char buf[BUFSZ];
|
||||
@@ -1267,7 +1214,7 @@ time_t now;
|
||||
}
|
||||
|
||||
void
|
||||
dump_close_log()
|
||||
dump_close_log(void)
|
||||
{
|
||||
if (dumplog_file) {
|
||||
(void) fclose(dumplog_file);
|
||||
@@ -1276,11 +1223,7 @@ dump_close_log()
|
||||
}
|
||||
|
||||
void
|
||||
dump_forward_putstr(win, attr, str, no_forward)
|
||||
winid win;
|
||||
int attr;
|
||||
const char *str;
|
||||
int no_forward;
|
||||
dump_forward_putstr(winid win, int attr, const char *str, int no_forward)
|
||||
{
|
||||
if (dumplog_file)
|
||||
fprintf(dumplog_file, "%s\n", str);
|
||||
@@ -1290,67 +1233,56 @@ int no_forward;
|
||||
|
||||
/*ARGSUSED*/
|
||||
static void
|
||||
dump_putstr(win, attr, str)
|
||||
winid win UNUSED;
|
||||
int attr UNUSED;
|
||||
const char *str;
|
||||
dump_putstr(winid win UNUSED, int attr UNUSED, const char *str)
|
||||
{
|
||||
if (dumplog_file)
|
||||
fprintf(dumplog_file, "%s\n", str);
|
||||
}
|
||||
|
||||
static winid
|
||||
dump_create_nhwindow(dummy)
|
||||
int dummy;
|
||||
dump_create_nhwindow(int dummy)
|
||||
{
|
||||
return dummy;
|
||||
}
|
||||
|
||||
/*ARGUSED*/
|
||||
static void
|
||||
dump_clear_nhwindow(win)
|
||||
winid win UNUSED;
|
||||
dump_clear_nhwindow(winid win UNUSED)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
static void
|
||||
dump_display_nhwindow(win, p)
|
||||
winid win UNUSED;
|
||||
boolean p UNUSED;
|
||||
dump_display_nhwindow(winid win UNUSED, boolean p UNUSED)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/*ARGUSED*/
|
||||
static void
|
||||
dump_destroy_nhwindow(win)
|
||||
winid win UNUSED;
|
||||
dump_destroy_nhwindow(winid win UNUSED)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/*ARGUSED*/
|
||||
static void
|
||||
dump_start_menu(win, mbehavior)
|
||||
winid win UNUSED;
|
||||
unsigned long mbehavior UNUSED;
|
||||
dump_start_menu(winid win UNUSED, unsigned long mbehavior UNUSED)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
static void
|
||||
dump_add_menu(win, glyphinfo, identifier, ch, gch, attr, str, itemflags)
|
||||
winid win UNUSED;
|
||||
const glyph_info *glyphinfo;
|
||||
const anything *identifier UNUSED;
|
||||
char ch;
|
||||
char gch UNUSED;
|
||||
int attr UNUSED;
|
||||
const char *str;
|
||||
unsigned int itemflags UNUSED;
|
||||
dump_add_menu(winid win UNUSED,
|
||||
const glyph_info *glyphinfo,
|
||||
const anything *identifier UNUSED,
|
||||
char ch,
|
||||
char gch UNUSED,
|
||||
int attr UNUSED,
|
||||
const char *str,
|
||||
unsigned int itemflags UNUSED)
|
||||
{
|
||||
if (dumplog_file) {
|
||||
if (glyphinfo->glyph == NO_GLYPH)
|
||||
@@ -1362,9 +1294,7 @@ unsigned int itemflags UNUSED;
|
||||
|
||||
/*ARGSUSED*/
|
||||
static void
|
||||
dump_end_menu(win, str)
|
||||
winid win UNUSED;
|
||||
const char *str;
|
||||
dump_end_menu(winid win UNUSED, const char *str)
|
||||
{
|
||||
if (dumplog_file) {
|
||||
if (str)
|
||||
@@ -1375,18 +1305,14 @@ const char *str;
|
||||
}
|
||||
|
||||
static int
|
||||
dump_select_menu(win, how, item)
|
||||
winid win UNUSED;
|
||||
int how UNUSED;
|
||||
menu_item **item;
|
||||
dump_select_menu(winid win UNUSED, int how UNUSED, menu_item **item)
|
||||
{
|
||||
*item = (menu_item *) 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
dump_redirect(onoff_flag)
|
||||
boolean onoff_flag;
|
||||
dump_redirect(boolean onoff_flag)
|
||||
{
|
||||
if (dumplog_file) {
|
||||
if (onoff_flag) {
|
||||
@@ -1419,8 +1345,7 @@ extern NEARDATA char *hilites[CLR_MAX];
|
||||
#endif
|
||||
|
||||
int
|
||||
has_color(color)
|
||||
int color;
|
||||
has_color(int color)
|
||||
{
|
||||
return (iflags.use_color && windowprocs.name
|
||||
&& (windowprocs.wincap & WC_COLOR) && windowprocs.has_color[color]
|
||||
@@ -1433,8 +1358,7 @@ int color;
|
||||
}
|
||||
|
||||
int
|
||||
glyph2ttychar(glyph)
|
||||
int glyph;
|
||||
glyph2ttychar(int glyph)
|
||||
{
|
||||
glyph_info glyphinfo;
|
||||
|
||||
@@ -1443,8 +1367,7 @@ int glyph;
|
||||
}
|
||||
|
||||
int
|
||||
glyph2symidx(glyph)
|
||||
int glyph;
|
||||
glyph2symidx(int glyph)
|
||||
{
|
||||
glyph_info glyphinfo;
|
||||
|
||||
@@ -1453,8 +1376,7 @@ int glyph;
|
||||
}
|
||||
|
||||
char *
|
||||
encglyph(glyph)
|
||||
int glyph;
|
||||
encglyph(int glyph)
|
||||
{
|
||||
static char encbuf[20]; /* 10+1 would suffice */
|
||||
|
||||
@@ -1463,9 +1385,7 @@ int glyph;
|
||||
}
|
||||
|
||||
char *
|
||||
decode_mixed(buf, str)
|
||||
char *buf;
|
||||
const char *str;
|
||||
decode_mixed(char *buf, const char *str)
|
||||
{
|
||||
static const char hex[] = "00112233445566778899aAbBcCdDeEfF";
|
||||
char *put = buf;
|
||||
@@ -1557,10 +1477,7 @@ const char *str;
|
||||
*/
|
||||
|
||||
void
|
||||
genl_putmixed(window, attr, str)
|
||||
winid window;
|
||||
int attr;
|
||||
const char *str;
|
||||
genl_putmixed(winid window, int attr, const char *str)
|
||||
{
|
||||
char buf[BUFSZ];
|
||||
|
||||
@@ -1573,10 +1490,10 @@ const char *str;
|
||||
* logic into one place instead of 7 different window-port routines.
|
||||
*/
|
||||
boolean
|
||||
menuitem_invert_test(mode, itemflags, is_selected)
|
||||
int mode;
|
||||
unsigned itemflags; /* The itemflags for the item */
|
||||
boolean is_selected; /* The current selection status of the item */
|
||||
menuitem_invert_test(int mode,
|
||||
unsigned itemflags, /* The itemflags for the item */
|
||||
boolean is_selected) /* The current selection status
|
||||
of the item */
|
||||
{
|
||||
boolean skipinvert = (itemflags & MENU_ITEMFLAGS_SKIPINVERT) != 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user