diff srogue/sticks.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 2128c7dc8a40
children e52a8a7ad4c5
line wrap: on
line diff
--- a/srogue/sticks.c	Thu Jan 28 18:55:47 2016 -0500
+++ b/srogue/sticks.c	Sun Jan 31 13:45:07 2016 -0500
@@ -16,15 +16,18 @@
  */
 
 #include <ctype.h>
+#include <string.h>
 #include "rogue.h"
 #include "rogue.ext"
 
+void drain(int ymin, int ymax, int xmin, int xmax);
+
 /*
  * fix_stick:
  *	Init a stick for the hero
  */
-fix_stick(cur)
-struct object *cur;
+void
+fix_stick(struct object *cur)
 {
 	struct rod *rd;
 
@@ -62,8 +65,8 @@
  * do_zap:
  *	Zap a stick at something
  */
-do_zap(gotdir)
-bool gotdir;
+void
+do_zap(bool gotdir)
 {
 	reg struct linked_list *item;
 	reg struct object *obj;
@@ -537,8 +540,8 @@
  * drain:
  *	Do drain hit points from player stick
  */
-drain(ymin, ymax, xmin, xmax)
-int ymin, ymax, xmin, xmax;
+void
+drain(int ymin, int ymax, int xmin, int xmax)
 {
 	reg int i, j, cnt;
 	reg struct thing *ick;
@@ -580,8 +583,7 @@
  *	Return number of charges left in a stick
  */
 char *
-charge_str(obj)
-struct object *obj;
+charge_str(struct object *obj)
 {
 	static char buf[20];