diff srogue/command.c @ 217:94a0d9dd5ce1

Super-Rogue: convert to ANSI-style function declarations. This fixes most of the build warnings.
author John "Elwin" Edwards
date Sun, 31 Jan 2016 13:45:07 -0500
parents 576cc8154521
children e52a8a7ad4c5
line wrap: on
line diff
--- a/srogue/command.c	Thu Jan 28 18:55:47 2016 -0500
+++ b/srogue/command.c	Sun Jan 31 13:45:07 2016 -0500
@@ -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 @@
  *	Player gropes about him to find hidden things.
  */
 
-search()
+void
+search(void)
 {
 	reg int x, y;
 	reg char ch;
@@ -461,7 +470,8 @@
  * 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 @@
  *	Tell the player what a certain thing is.
  */
 char *
-identify(what)
-int what;
+identify(int what)
 {
 	reg char ch, *str;
 
@@ -581,7 +590,8 @@
  * 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 @@
  * 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 @@
 /*
  * Let him escape for a while
  */
-shell()
+void
+shell(void)
 {
 	reg int pid;
 	reg char *sh;
@@ -659,7 +671,8 @@
  * 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;