XRogue: convert to ANSI-style function declarations.

This commit is contained in:
John "Elwin" Edwards 2016-03-02 21:13:26 -05:00
parent e8e6e604c3
commit 2853120387
41 changed files with 1281 additions and 908 deletions

View file

@ -41,16 +41,16 @@ struct optstruct {
typedef struct optstruct OPTION;
int put_bool(),
get_bool(),
put_str(),
get_str(),
put_abil(),
get_abil(),
get_quest(),
put_quest(),
get_default();
int get_ro(WINDOW *win, int oy, int ox);
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);
void get_default(bool *bp, WINDOW *win);
int get_str_prot(char *opt, WINDOW *win);
int get_score(char *opt, WINDOW *win);
bool allowchange(OPTION *op);
@ -88,9 +88,8 @@ OPTION optlist[] = {
* The default attribute field is read-only
*/
get_default(bp, win)
bool *bp;
WINDOW *win;
void
get_default(bool *bp, WINDOW *win)
{
register int oy, ox;
@ -103,9 +102,8 @@ WINDOW *win;
* The ability (class) field is read-only
*/
get_abil(abil, win)
int *abil;
WINDOW *win;
void
get_abil(int *abil, WINDOW *win)
{
register int oy, ox;
@ -118,9 +116,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;
@ -134,9 +131,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;
@ -173,9 +169,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;
@ -223,9 +218,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;
@ -298,7 +292,8 @@ WINDOW *win;
* print and then set options from the terminal
*/
option()
void
option(void)
{
register OPTION *op;
register int retval;
@ -356,8 +351,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;
@ -466,9 +461,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);
}
@ -477,9 +471,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);
}
@ -488,9 +481,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");
}
@ -499,9 +491,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);
}