switch source tree from k&r to c99
This commit is contained in:
+89
-129
@@ -101,8 +101,7 @@ struct window_procs safe_procs = {
|
||||
};
|
||||
|
||||
struct window_procs *
|
||||
get_safe_procs(optn)
|
||||
int optn;
|
||||
get_safe_procs(int optn)
|
||||
{
|
||||
if (optn) {
|
||||
/* include the slightly more functional stdc versions */
|
||||
@@ -118,126 +117,104 @@ int optn;
|
||||
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
safe_init_nhwindows(argcp, argv)
|
||||
int *argcp UNUSED;
|
||||
char **argv UNUSED;
|
||||
safe_init_nhwindows(int *argcp UNUSED, char **argv UNUSED)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
safe_player_selection()
|
||||
safe_player_selection(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
safe_askname()
|
||||
safe_askname(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
safe_get_nh_event()
|
||||
safe_get_nh_event(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
safe_suspend_nhwindows(str)
|
||||
const char *str;
|
||||
safe_suspend_nhwindows(const char *str)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
safe_resume_nhwindows()
|
||||
safe_resume_nhwindows(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
safe_exit_nhwindows(str)
|
||||
const char *str;
|
||||
safe_exit_nhwindows(const char *str)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
winid
|
||||
safe_create_nhwindow(type)
|
||||
int type;
|
||||
safe_create_nhwindow(int type)
|
||||
{
|
||||
return WIN_ERR;
|
||||
}
|
||||
|
||||
void
|
||||
safe_clear_nhwindow(window)
|
||||
winid window;
|
||||
safe_clear_nhwindow(winid window)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
safe_display_nhwindow(window, blocking)
|
||||
winid window;
|
||||
boolean blocking;
|
||||
safe_display_nhwindow(winid window,boolean blocking)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
safe_dismiss_nhwindow(window)
|
||||
winid window;
|
||||
safe_dismiss_nhwindow(winid window)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
safe_destroy_nhwindow(window)
|
||||
winid window;
|
||||
safe_destroy_nhwindow(winid window)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
safe_curs(window, x, y)
|
||||
winid window;
|
||||
int x, y;
|
||||
safe_curs(winid window, int x, int y)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
safe_putstr(window, attr, str)
|
||||
winid window;
|
||||
int attr;
|
||||
const char *str;
|
||||
safe_putstr(winid window, int attr, const char *str)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
safe_putmixed(window, attr, str)
|
||||
winid window;
|
||||
int attr;
|
||||
const char *str;
|
||||
safe_putmixed(winid window, int attr, const char *str)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
safe_display_file(fname, complain)
|
||||
const char *fname;
|
||||
boolean complain;
|
||||
safe_display_file(const char * fname, boolean complain)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
safe_start_menu(window, mbehavior)
|
||||
winid window;
|
||||
unsigned long mbehavior;
|
||||
safe_start_menu(winid window, unsigned long mbehavior)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -248,15 +225,15 @@ unsigned long mbehavior;
|
||||
* later.
|
||||
*/
|
||||
void
|
||||
safe_add_menu(window, glyphinfo, identifier, ch, gch, attr, str, itemflags)
|
||||
winid window; /* window to use, must be of type NHW_MENU */
|
||||
const glyph_info *glyphinfo UNUSED; /* glyph plus glyph info */
|
||||
const anything *identifier; /* what to return if selected */
|
||||
char ch; /* keyboard accelerator (0 = pick our own) */
|
||||
char gch; /* group accelerator (0 = no group) */
|
||||
int attr; /* attribute for string (like safe_putstr()) */
|
||||
const char *str; /* menu string */
|
||||
unsigned int itemflags; /* itemflags such as marked as selected */
|
||||
safe_add_menu(
|
||||
winid window, /* window to use, must be of type NHW_MENU */
|
||||
const glyph_info *glyphinfo UNUSED, /* glyph plus glyph info */
|
||||
const anything *identifier, /* what to return if selected */
|
||||
char ch, /* keyboard accelerator (0 = pick our own) */
|
||||
char gch, /* group accelerator (0 = no group) */
|
||||
int attr, /* attribute for string (like safe_putstr()) */
|
||||
const char *str, /* menu string */
|
||||
unsigned int itemflags) /* itemflags such as marked as selected */
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -265,52 +242,51 @@ unsigned int itemflags; /* itemflags such as marked as selected */
|
||||
* End a menu in this window, window must a type NHW_MENU.
|
||||
*/
|
||||
void
|
||||
safe_end_menu(window, prompt)
|
||||
winid window; /* menu to use */
|
||||
const char *prompt; /* prompt to for menu */
|
||||
safe_end_menu(
|
||||
winid window, /* menu to use */
|
||||
const char *prompt) /* prompt to for menu */
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int
|
||||
safe_select_menu(window, how, menu_list)
|
||||
winid window;
|
||||
int how;
|
||||
menu_item **menu_list;
|
||||
safe_select_menu(
|
||||
winid window,
|
||||
int how,
|
||||
menu_item **menu_list)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* special hack for treating top line --More-- as a one item menu */
|
||||
char
|
||||
safe_message_menu(let, how, mesg)
|
||||
char let;
|
||||
int how;
|
||||
const char *mesg;
|
||||
safe_message_menu(
|
||||
char let,
|
||||
int how,
|
||||
const char *mesg)
|
||||
{
|
||||
return '\033';
|
||||
}
|
||||
|
||||
void
|
||||
safe_update_inventory()
|
||||
safe_update_inventory(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
safe_mark_synch()
|
||||
safe_mark_synch(void)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
safe_wait_synch()
|
||||
safe_wait_synch(void)
|
||||
{
|
||||
}
|
||||
|
||||
#ifdef CLIPPING
|
||||
void
|
||||
safe_cliparound(x, y)
|
||||
int x, y;
|
||||
safe_cliparound(int x, int y)
|
||||
{
|
||||
}
|
||||
#endif /* CLIPPING */
|
||||
@@ -321,31 +297,30 @@ int x, y;
|
||||
* Print the glyph to the output device. Don't flush the output device.
|
||||
*/
|
||||
void
|
||||
safe_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;
|
||||
safe_print_glyph(
|
||||
winid window UNUSED,
|
||||
xchar x UNUSED,
|
||||
xchar y UNUSED,
|
||||
const glyph_info *glyphinfo UNUSED,
|
||||
const glyph_info *bkglyphinfo UNUSED)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
safe_raw_print(str)
|
||||
const char *str;
|
||||
safe_raw_print(const char *str)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
safe_raw_print_bold(str)
|
||||
const char *str;
|
||||
safe_raw_print_bold(const char *str)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int
|
||||
safe_nhgetch()
|
||||
safe_nhgetch(void)
|
||||
{
|
||||
return '\033';
|
||||
}
|
||||
@@ -357,23 +332,20 @@ safe_nhgetch()
|
||||
*/
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
safe_nh_poskey(x, y, mod)
|
||||
int *x, *y, *mod;
|
||||
safe_nh_poskey(int *x, int *y, int *mod)
|
||||
{
|
||||
return '\033';
|
||||
}
|
||||
|
||||
void
|
||||
win_safe_init(dir)
|
||||
int dir;
|
||||
win_safe_init(int dir)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef POSITIONBAR
|
||||
void
|
||||
safe_update_positionbar(posbar)
|
||||
char *posbar;
|
||||
safe_update_positionbar(char *posbar)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -384,130 +356,121 @@ char *posbar;
|
||||
* -- initialize the port-specific data structures.
|
||||
*/
|
||||
void
|
||||
safe_status_init()
|
||||
safe_status_init(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
boolean
|
||||
safe_can_suspend()
|
||||
safe_can_suspend(void)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
safe_nhbell()
|
||||
safe_nhbell(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int
|
||||
safe_doprev_message()
|
||||
safe_doprev_message(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
char
|
||||
safe_yn_function(query, resp, def)
|
||||
const char *query;
|
||||
const char *resp;
|
||||
char def;
|
||||
safe_yn_function(const char * query, const char* resp, char def)
|
||||
{
|
||||
return '\033';
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
safe_getlin(prompt, outbuf)
|
||||
const char *prompt UNUSED;
|
||||
char *outbuf;
|
||||
safe_getlin(const char* prompt UNUSED, char *outbuf)
|
||||
{
|
||||
Strcpy(outbuf, "\033");
|
||||
}
|
||||
|
||||
int
|
||||
safe_get_ext_cmd()
|
||||
safe_get_ext_cmd(void)
|
||||
{
|
||||
return '\033';
|
||||
}
|
||||
|
||||
void
|
||||
safe_number_pad(mode)
|
||||
int mode;
|
||||
safe_number_pad(int mode)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
safe_delay_output()
|
||||
safe_delay_output(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
safe_start_screen()
|
||||
safe_start_screen(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
safe_end_screen()
|
||||
safe_end_screen(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
safe_outrip(tmpwin, how, when)
|
||||
winid tmpwin;
|
||||
int how;
|
||||
time_t when;
|
||||
safe_outrip(winid tmpwin, int how, time_t when)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
safe_preference_update(pref)
|
||||
const char *pref UNUSED;
|
||||
safe_preference_update(const char* pref UNUSED)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
char *
|
||||
safe_getmsghistory(init)
|
||||
boolean init UNUSED;
|
||||
safe_getmsghistory(boolean init UNUSED)
|
||||
{
|
||||
return (char *) 0;
|
||||
}
|
||||
|
||||
void
|
||||
safe_putmsghistory(msg, is_restoring)
|
||||
const char *msg;
|
||||
boolean is_restoring;
|
||||
safe_putmsghistory(
|
||||
const char *msg,
|
||||
boolean is_restoring)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
safe_status_finish()
|
||||
safe_status_finish(void)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
safe_status_enablefield(fieldidx, nm, fmt, enable)
|
||||
int fieldidx;
|
||||
const char *nm;
|
||||
const char *fmt;
|
||||
boolean enable;
|
||||
safe_status_enablefield(
|
||||
int fieldidx,
|
||||
const char *nm,
|
||||
const char *fmt,
|
||||
boolean enable)
|
||||
{
|
||||
}
|
||||
|
||||
/* call once for each field, then call with BL_FLUSH to output the result */
|
||||
void
|
||||
safe_status_update(idx, ptr, chg, percent, color, colormasks)
|
||||
int idx;
|
||||
genericptr_t ptr;
|
||||
int chg UNUSED, percent UNUSED, color UNUSED;
|
||||
unsigned long *colormasks UNUSED;
|
||||
safe_status_update(
|
||||
int idx,
|
||||
genericptr_t ptr,
|
||||
int chg UNUSED,
|
||||
int percent UNUSED,
|
||||
int color UNUSED,
|
||||
unsigned long *colormasks UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -528,7 +491,7 @@ unsigned long *colormasks UNUSED;
|
||||
|
||||
/* Add to your code: windowprocs.win_raw_print = stdio_wait_synch; */
|
||||
void
|
||||
stdio_wait_synch()
|
||||
stdio_wait_synch(void)
|
||||
{
|
||||
char valid[] = {' ', '\n', '\r', '\033', '\0'};
|
||||
|
||||
@@ -540,8 +503,7 @@ stdio_wait_synch()
|
||||
|
||||
/* Add to your code: windowprocs.win_raw_print = stdio_raw_print; */
|
||||
void
|
||||
stdio_raw_print(str)
|
||||
const char *str;
|
||||
stdio_raw_print(const char* str)
|
||||
{
|
||||
if (str)
|
||||
fprintf(stdout, "%s\n", str);
|
||||
@@ -551,8 +513,7 @@ const char *str;
|
||||
/* no newline variation, add to your code:
|
||||
windowprocs.win_raw_print = stdio_nonl_raw_print; */
|
||||
void
|
||||
stdio_nonl_raw_print(str)
|
||||
const char *str;
|
||||
stdio_nonl_raw_print(const char* str)
|
||||
{
|
||||
if (str)
|
||||
fprintf(stdout, "%s", str);
|
||||
@@ -561,8 +522,7 @@ const char *str;
|
||||
|
||||
/* Add to your code: windowprocs.win_raw_print_bold = stdio_raw_print_bold; */
|
||||
void
|
||||
stdio_raw_print_bold(str)
|
||||
const char *str;
|
||||
stdio_raw_print_bold(const char* str)
|
||||
{
|
||||
stdio_raw_print(str);
|
||||
return;
|
||||
@@ -570,7 +530,7 @@ const char *str;
|
||||
|
||||
/* Add to your code: windowprocs.win_nhgetch = stdio_nhgetch; */
|
||||
int
|
||||
stdio_nhgetch()
|
||||
stdio_nhgetch(void)
|
||||
{
|
||||
return getchar();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user