diff arogue7/rings.c @ 219:f9ef86cf22b2

Advanced Rogue 7: convert to ANSI-style function declarations. Almost 1500 lines of compiler warnings remain, and the GCC developers are already working on a new version with even more warnings turned on by default.
author John "Elwin" Edwards
date Fri, 19 Feb 2016 21:02:28 -0500
parents cadff8f047a1
children e1cd27c5464f
line wrap: on
line diff
--- a/arogue7/rings.c	Sun Feb 07 14:39:21 2016 -0500
+++ b/arogue7/rings.c	Fri Feb 19 21:02:28 2016 -0500
@@ -12,6 +12,7 @@
  */
 
 #include <stdlib.h>
+#include <string.h>
 #include "curses.h"
 #include "rogue.h"
 
@@ -23,8 +24,8 @@
 /*
  * how much food does this ring use up?
  */
-ring_eat(hand)
-register int hand;
+int
+ring_eat(int hand)
 {
     if (cur_ring[hand] == NULL)
 	return 0;
@@ -48,8 +49,8 @@
     return 0;
 }
 
-ring_on(item)
-register struct linked_list *item;
+void
+ring_on(struct linked_list *item)
 {
     register struct object *obj;
     register int save_max;
@@ -111,8 +112,7 @@
  * print ring bonuses
  */
 char *
-ring_num(obj)
-register struct object *obj;
+ring_num(struct object *obj)
 {
     static char buf[5];
 
@@ -146,7 +146,8 @@
 /* 
  * Return the effect of the specified ring 
  */
-ring_value(type)
+int
+ring_value(int type)
 {
     int result = 0;