diff xrogue/wizard.c @ 220:f54901b9c39b

XRogue: convert to ANSI-style function declarations.
author John "Elwin" Edwards
date Wed, 02 Mar 2016 21:13:26 -0500
parents ce0cf824c192
children
line wrap: on
line diff
--- a/xrogue/wizard.c	Fri Feb 19 21:02:28 2016 -0500
+++ b/xrogue/wizard.c	Wed Mar 02 21:13:26 2016 -0500
@@ -21,6 +21,8 @@
  * under strange circumstances)
  */
 
+int getbless(void);
+
 #include <stdlib.h>
 #include <curses.h>
 #include <ctype.h>
@@ -33,9 +35,8 @@
  *      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;
@@ -338,7 +339,7 @@
  */
 
 int
-getbless()
+getbless(void)
 {
         reg char bless;
 
@@ -356,7 +357,8 @@
  * get a non-monster death type
  */
 
-getdeath()
+int
+getdeath(void)
 {
     register int i;
     int which_death;
@@ -385,11 +387,11 @@
 
 /*
  * make a monster for the wizard
+ * showall -> show uniques and genocided creatures
  */
 
-makemonster(showall, action) 
-bool showall;   /* showall -> show uniques and genocided creatures */
-char *action;
+short
+makemonster(bool showall, char *action) 
 {
     register int i;
     register short which_monst;
@@ -485,7 +487,7 @@
  */
 
 bool
-passwd()
+passwd(void)
 {
     register char *sp, c;
     char buf[LINELEN];
@@ -522,7 +524,7 @@
  */
 
 void
-teleport()
+teleport(void)
 {
     register struct room *new_rp = NULL, *old_rp = roomin(&hero);
     register int rm, which;
@@ -622,8 +624,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;
@@ -686,7 +688,8 @@
  *      (if on STARTLEV equipage level = 0)
  */
 
-choose_qst()
+void
+choose_qst(void)
 {
     bool doit = TRUE;
     bool escp = TRUE;
@@ -718,7 +721,7 @@
         if (menu_overlay)  /* Print the selections.  The longest line is
                 * Hruggek (26 characters).  The prompt is 21.
                 */
-            over_win(cw, hw, 20, 29, 0, 21, NULL);
+            over_win(cw, hw, 20, 29, 0, 21, '\0');
         else
             draw(hw);