Super-Rogue: convert to ANSI-style function declarations.

This fixes most of the build warnings.
This commit is contained in:
John "Elwin" Edwards 2016-01-31 13:45:07 -05:00
parent 0f87d5b4d8
commit 59f448e92e
33 changed files with 783 additions and 518 deletions

View file

@ -29,11 +29,19 @@
#include <unistd.h>
#endif
void search(void);
void help(void);
void d_level(void);
void u_level(void);
void shell(void);
void call(void);
/*
* command:
* Process the user commands
*/
command()
void
command(void)
{
reg char ch;
reg int ntimes = 1; /* Number of player moves */
@ -416,7 +424,8 @@ quit(int a)
* Player gropes about him to find hidden things.
*/
search()
void
search(void)
{
reg int x, y;
reg char ch;
@ -461,7 +470,8 @@ search()
* help:
* Give single character help, or the whole mess if he wants it
*/
help()
void
help(void)
{
extern struct h_list helpstr[];
reg struct h_list *strp;
@ -519,8 +529,7 @@ help()
* Tell the player what a certain thing is.
*/
char *
identify(what)
int what;
identify(int what)
{
reg char ch, *str;
@ -581,7 +590,8 @@ int what;
* d_level:
* He wants to go down a level
*/
d_level()
void
d_level(void)
{
if (winat(hero.y, hero.x) != STAIRS)
msg("I see no way down.");
@ -599,7 +609,8 @@ d_level()
* u_level:
* He wants to go up a level
*/
u_level()
void
u_level(void)
{
if (winat(hero.y, hero.x) == STAIRS) {
if (pl_on(ISHELD)) {
@ -624,7 +635,8 @@ u_level()
/*
* Let him escape for a while
*/
shell()
void
shell(void)
{
reg int pid;
reg char *sh;
@ -659,7 +671,8 @@ shell()
* call:
* Allow a user to call a potion, scroll, or ring something
*/
call()
void
call(void)
{
reg struct object *obj;
reg struct linked_list *item;