diff srogue/wizard.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 458df24e973d
children e52a8a7ad4c5
line wrap: on
line diff
--- a/srogue/wizard.c	Thu Jan 28 18:55:47 2016 -0500
+++ b/srogue/wizard.c	Sun Jan 31 13:45:07 2016 -0500
@@ -16,6 +16,7 @@
 
 #include <stdlib.h>
 #include <ctype.h>
+#include <string.h>
 #include "rogue.h"
 #include "rogue.ext"
 
@@ -23,8 +24,8 @@
  * whatis:
  *	What a certain object is
  */
-whatis(what)
-struct linked_list *what;
+void
+whatis(struct linked_list *what)
 {
 	reg struct object *obj;
 	reg struct linked_list *item;
@@ -74,8 +75,8 @@
  * create_obj:
  *	Create any object for wizard or scroll (almost)
  */
-create_obj(fscr)
-bool fscr;
+void
+create_obj(bool fscr)
 {
 	reg struct linked_list *item;
 	reg struct object *obj;
@@ -245,7 +246,8 @@
  * getbless:
  *	Get a blessing for a wizards object
  */
-getbless()
+int
+getbless(void)
 {
 	int bless;
 
@@ -263,8 +265,8 @@
  * makemons:
  *	Make a monster
  */
-makemons(what)
-int what;
+bool
+makemons(int what)
 {
 	reg int x, y, oktomake = FALSE, appear = 1;
 	struct coord mp;
@@ -293,9 +295,8 @@
  * telport:
  *	Bamf the thing someplace else
  */
-teleport(spot, th)
-struct coord spot;
-struct thing *th;
+int
+teleport(struct coord spot, struct thing *th)
 {
 	reg int rm, y, x;
 	struct coord oldspot;
@@ -345,7 +346,8 @@
  * passwd:
  *	See if user knows password
  */
-passwd()
+bool
+passwd(void)
 {
 	reg char *sp, c;
 	bool passok;