diff rogue4/command.c @ 215:1b73a8641b37

rogue4: fix most GCC5 warnings. Converting all function definitions to ANSI style accounts for most of the change. This has exposed other problems, such as daemons not actually being their stated type, that will require more careful solutions.
author John "Elwin" Edwards
date Wed, 27 Jan 2016 19:41:05 -0500
parents f871cb0539d3
children e52a8a7ad4c5
line wrap: on
line diff
--- a/rogue4/command.c	Sat Jan 23 09:35:14 2016 -0500
+++ b/rogue4/command.c	Wed Jan 27 19:41:05 2016 -0500
@@ -19,15 +19,30 @@
 
 char countch, direction, newcount = FALSE;
 
+void call(void);
+void d_level(void);
+void help(void);
+void identify(void);
+void illcom(char ch);
+void search(void);
+void u_level(void);
+
+#ifdef WIZARD
+extern void add_pass(void);
+extern void create_obj(void);
+extern bool passwd(void);
+extern void show_map(void);
+#endif
+
 /*
  * command:
  *	Process the user commands
  */
-command()
+void
+command(void)
 {
     register char ch;
     register int ntimes = 1;			/* Number of player moves */
-    char *unctrol();
 
     if (on(player, ISHASTE))
 	ntimes++;
@@ -344,8 +359,8 @@
  * illcom:
  *	What to do with an illegal command
  */
-illcom(ch)
-char ch;
+void
+illcom(char ch)
 {
     save_msg = FALSE;
     count = 0;
@@ -357,7 +372,8 @@
  * search:
  *	Player gropes about him to find hidden things.
  */
-search()
+void
+search(void)
 {
     register int y, x;
     register char *fp;
@@ -400,7 +416,8 @@
  * help:
  *	Give single character help, or the whole mess if he wants it
  */
-help()
+void
+help(void)
 {
     register const struct h_list *strp = helpstr;
     register char helpch;
@@ -457,7 +474,8 @@
  * identify:
  *	Tell the player what a certain thing is.
  */
-identify()
+void
+identify(void)
 {
     register char ch;
     register const char *str;
@@ -502,7 +520,8 @@
  * d_level:
  *	He wants to go down a level
  */
-d_level()
+void
+d_level(void)
 {
     if (chat(hero.y, hero.x) != STAIRS)
 	msg("I see no way down");
@@ -517,7 +536,8 @@
  * u_level:
  *	He wants to go up a level
  */
-u_level()
+void
+u_level(void)
 {
     if (chat(hero.y, hero.x) == STAIRS)
 	if (amulet)
@@ -538,7 +558,8 @@
  * call:
  *	Allow a user to call a potion, scroll, or ring something
  */
-call()
+void
+call(void)
 {
     register THING *obj;
     register char **guess;