Advanced Rogue 7: convert to ANSI-style function declarations.

Almost 1500 lines of compiler warnings remain, and the GCC developers
are already working on a new version with even more warnings turned on
by default.
This commit is contained in:
John "Elwin" Edwards 2016-02-19 21:02:28 -05:00
parent f38b2223c8
commit e8e6e604c3
39 changed files with 1181 additions and 889 deletions

View file

@ -40,14 +40,15 @@ struct optstruct {
typedef struct optstruct OPTION;
int put_bool(),
get_bool(),
put_str(),
get_str(),
put_abil(),
get_abil(),
get_quest(),
put_quest();
void put_bool(bool *b, WINDOW *win);
int get_bool(bool *bp, WINDOW *win);
void put_str(char *str, WINDOW *win);
int get_str(char *opt, WINDOW *win);
void put_abil(int *ability, WINDOW *win);
void get_abil(int *abil, WINDOW *win);
void put_quest(int *quest, WINDOW *win);
void get_quest(int *quest, WINDOW *win);
int get_ro(WINDOW *win, int oy, int ox);
int get_str_prot(char *opt, WINDOW *win);
int get_score(char *opt, WINDOW *win);
@ -83,9 +84,8 @@ OPTION optlist[] = {
/*
* The ability field is read-only
*/
get_abil(abil, win)
int *abil;
WINDOW *win;
void
get_abil(int *abil, WINDOW *win)
{
register int oy, ox;
@ -97,9 +97,8 @@ WINDOW *win;
/*
* The quest field is read-only
*/
get_quest(quest, win)
int *quest;
WINDOW *win;
void
get_quest(int *quest, WINDOW *win)
{
register int oy, ox;
@ -113,9 +112,8 @@ WINDOW *win;
* "Get" a read-only value.
*/
get_ro(win, oy, ox)
WINDOW *win;
register int oy, ox;
int
get_ro(WINDOW *win, int oy, int ox)
{
register int ny, nx;
register bool op_bad;
@ -152,9 +150,8 @@ register int oy, ox;
* allow changing a boolean option and print it out
*/
get_bool(bp, win)
bool *bp;
WINDOW *win;
int
get_bool(bool *bp, WINDOW *win)
{
register int oy, ox;
register bool op_bad;
@ -202,9 +199,8 @@ WINDOW *win;
/*
* set a string option
*/
get_str(opt, win)
register char *opt;
WINDOW *win;
int
get_str(char *opt, WINDOW *win)
{
register char *sp;
register int c, oy, ox;
@ -278,7 +274,8 @@ WINDOW *win;
/*
* print and then set options from the terminal
*/
option()
void
option(void)
{
register OPTION *op;
register int retval;
@ -334,8 +331,8 @@ option()
* or the end of the entire option string.
*/
parse_opts(str)
register char *str;
void
parse_opts(char *str)
{
register char *sp;
register OPTION *op;
@ -428,9 +425,8 @@ register char *str;
/*
* print the character type
*/
put_abil(ability, win)
int *ability;
WINDOW *win;
void
put_abil(int *ability, WINDOW *win)
{
waddstr(win, char_class[*ability].name);
}
@ -440,9 +436,8 @@ WINDOW *win;
* print out the quest
*/
put_quest(quest, win)
int *quest;
WINDOW *win;
void
put_quest(int *quest, WINDOW *win)
{
waddstr(win, rel_magic[*quest].mi_name);
}
@ -451,9 +446,8 @@ WINDOW *win;
/*
* put out a boolean
*/
put_bool(b, win)
bool *b;
WINDOW *win;
void
put_bool(bool *b, WINDOW *win)
{
waddstr(win, *b ? "True" : "False");
}
@ -464,9 +458,8 @@ WINDOW *win;
/*
* put out a string
*/
put_str(str, win)
char *str;
WINDOW *win;
void
put_str(char *str, WINDOW *win)
{
waddstr(win, str);
}