Advanced Rogue 5: convert to ANSI function declarations.

This still leaves over a thousand lines of warning messages, mostly
related to the return types of daemons and fuses.
This commit is contained in:
John "Elwin" Edwards 2016-02-07 14:39:21 -05:00
parent 59f448e92e
commit f38b2223c8
37 changed files with 977 additions and 733 deletions

View file

@ -21,12 +21,20 @@
#include "rogue.h"
#include "mach_dep.h"
void help(void);
void identify(void);
void d_level(void);
void u_level(void);
void shell(void);
void call(bool mark);
/*
* command:
* Process the user commands
*/
command()
void
command(void)
{
register char ch;
register int ntimes = 1; /* Number of player moves */
@ -207,8 +215,8 @@ command()
when 'I' : after = FALSE; picky_inven();
when 'd' : drop(NULL);
when 'P' : grab(hero.y, hero.x);
when 'q' : quaff(-1, NULL, TRUE);
when 'r' : read_scroll(-1, NULL, TRUE);
when 'q' : quaff(-1, 0, TRUE);
when 'r' : read_scroll(-1, 0, TRUE);
when 'e' : eat();
when 'w' : wield();
when 'W' : wear();
@ -228,7 +236,7 @@ command()
when 'G' : gsense();
when '^' : set_trap(&player, hero.y, hero.x);
when 's' : search(FALSE, FALSE);
when 'z' : if (!do_zap(TRUE, NULL, FALSE))
when 'z' : if (!do_zap(TRUE, 0, FALSE))
after=FALSE;
when 'p' : pray();
when 'C' : cast();
@ -475,8 +483,7 @@ quit(int sig)
*/
void
bugkill(sig)
int sig;
bugkill(int sig)
{
signal(sig, quit); /* If we get it again, give up */
death(D_SIGNAL); /* Killed by a bug */
@ -488,8 +495,8 @@ int sig;
* Player gropes about him to find hidden things.
*/
search(is_thief, door_chime)
register bool is_thief, door_chime;
void
search(bool is_thief, bool door_chime)
{
register int x, y;
register char ch, /* The trap or door character */
@ -570,7 +577,8 @@ register bool is_thief, door_chime;
* Give single character help, or the whole mess if he wants it
*/
help()
void
help(void)
{
register struct h_list *strp = helpstr;
#ifdef WIZARD
@ -664,7 +672,8 @@ help()
* Tell the player what a certain thing is.
*/
identify()
void
identify(void)
{
register char ch;
const char *str;
@ -726,7 +735,8 @@ identify()
* He wants to go down a level
*/
d_level()
void
d_level(void)
{
bool no_phase=FALSE;
@ -770,7 +780,8 @@ d_level()
* He wants to go up a level
*/
u_level()
void
u_level(void)
{
bool no_phase = FALSE;
register struct linked_list *item;
@ -828,7 +839,8 @@ u_level()
* Let him escape for a while
*/
shell()
void
shell(void)
{
/*
* Set the terminal back to original mode
@ -859,8 +871,8 @@ shell()
/*
* allow a user to call a potion, scroll, or ring something
*/
call(mark)
bool mark;
void
call(bool mark)
{
register struct object *obj;
register struct linked_list *item;