diff arogue5/wizard.c @ 218:56e748983fa8

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.
author John "Elwin" Edwards
date Sun, 07 Feb 2016 14:39:21 -0500
parents c49f7927b0fa
children e52a8a7ad4c5
line wrap: on
line diff
--- a/arogue5/wizard.c	Sun Jan 31 13:45:07 2016 -0500
+++ b/arogue5/wizard.c	Sun Feb 07 14:39:21 2016 -0500
@@ -15,6 +15,7 @@
 
 #include "curses.h"
 #include <ctype.h>
+#include <string.h>
 #include <stdlib.h>
 #include "rogue.h"
 
@@ -23,9 +24,8 @@
  * create_obj:
  *	Create any object for wizard, scroll, magician, or cleric
  */
-create_obj(prompt, which_item, which_type)
-bool prompt;
-int which_item, which_type;
+void
+create_obj(bool prompt, int which_item, int which_type)
 {
     reg struct linked_list *item;
     reg struct object *obj;
@@ -311,7 +311,8 @@
  * getbless:
  *	Get a blessing for a wizards object
  */
-getbless()
+int
+getbless(void)
 {
 	reg char bless;
 
@@ -328,7 +329,8 @@
 /*
  * get a non-monster death type
  */
-getdeath()
+int
+getdeath(void)
 {
     register int i;
     int which_death;
@@ -358,8 +360,8 @@
 /*
  * make a monster for the wizard
  */
-makemonster(create) 
-bool create;
+short
+makemonster(bool create) 
 {
     register int i;
     register short which_monst;
@@ -368,7 +370,7 @@
 
     /* Print out the monsters */
     while (num_monst > 0) {
-	register left_limit;
+	register int left_limit;
 
 	if (num_monst < num_lines) left_limit = (num_monst+1)/2;
 	else left_limit = num_lines/2;
@@ -430,7 +432,8 @@
  *	see if user knows password
  */
 
-passwd()
+bool
+passwd(void)
 {
     register char *sp, c;
     char buf[LINELEN];
@@ -457,7 +460,8 @@
  *	Bamf the hero someplace else
  */
 
-teleport()
+int
+teleport(void)
 {
     register struct room *new_rp, *old_rp = roomin(&hero);
     register int rm;
@@ -525,8 +529,8 @@
  *	What a certin object is
  */
 
-whatis(what)
-struct linked_list *what;
+void
+whatis(struct linked_list *what)
 {
     register struct object *obj;
     register struct linked_list *item;