diff arogue5/misc.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 f2951c4e28d9
children e52a8a7ad4c5
line wrap: on
line diff
--- a/arogue5/misc.c	Sun Jan 31 13:45:07 2016 -0500
+++ b/arogue5/misc.c	Sun Feb 07 14:39:21 2016 -0500
@@ -18,9 +18,7 @@
  * See if a monster has some magic it can use.  Use it and return TRUE if so.
  */
 bool
-m_use_item(monster, monst_pos, defend_pos)
-register struct thing *monster;
-register coord *monst_pos, *defend_pos;
+m_use_item(struct thing *monster, coord *monst_pos, coord *defend_pos)
 {
     register struct linked_list *pitem;
     register struct object *obj;
@@ -95,10 +93,11 @@
  
 /*
  * add something to the contents of something else
+ * bag: the holder of the items
+ * item: the item to put inside
  */
-put_contents(bag, item)
-register struct object *bag;		/* the holder of the items */
-register struct linked_list *item;	/* the item to put inside  */
+void
+put_contents(struct object *bag, struct linked_list *item)
 {
     register struct linked_list *titem;
     register struct object *tobj;
@@ -123,10 +122,10 @@
 
 /*
  * remove something from something else
+ * bag: the holder of the items
  */
-take_contents(bag, item)
-register struct object *bag;		/* the holder of the items */
-register struct linked_list *item;
+void
+take_contents(struct object *bag, struct linked_list *item)
 {
 
     if (bag->o_ac <= 0) {
@@ -140,8 +139,8 @@
 }
 
 
-do_bag(item)
-register struct linked_list *item;
+void
+do_bag(struct linked_list *item)
 {
 
     register struct linked_list *titem = NULL;
@@ -233,7 +232,8 @@
     }
 }
 
-do_panic()
+void
+do_panic(void)
 {
     register int x,y;
     register struct linked_list *mon;
@@ -272,8 +272,7 @@
  * print miscellaneous magic bonuses
  */
 char *
-misc_name(obj)
-register struct object *obj;
+misc_name(struct object *obj)
 {
     static char buf[LINELEN];
     char buf1[LINELEN];
@@ -340,7 +339,8 @@
     return buf;
 }
 
-use_emori()
+void
+use_emori(void)
 {
     char selection;	/* Cloak function */
     int state = 0;	/* Menu state */
@@ -442,8 +442,8 @@
     }
 }
 
-use_mm(which)
-int which;
+void
+use_mm(int which)
 {
     register struct object *obj = NULL;
     register struct linked_list *item = NULL;
@@ -496,7 +496,7 @@
 		msg("The jug is empty");
 		break;
 	    }
-	    quaff (obj->o_ac, NULL, FALSE);
+	    quaff (obj->o_ac, 0, FALSE);
 	    obj->o_ac = JUG_EMPTY;
 	    fuse (alchemy, obj, ALCHEMYTIME, AFTER);
 	    if (!(obj->o_flags & ISKNOW))