diff rogue4/sticks.c @ 215:1b73a8641b37

rogue4: fix most GCC5 warnings. Converting all function definitions to ANSI style accounts for most of the change. This has exposed other problems, such as daemons not actually being their stated type, that will require more careful solutions.
author John "Elwin" Edwards
date Wed, 27 Jan 2016 19:41:05 -0500
parents 9535a08ddc39
children e52a8a7ad4c5
line wrap: on
line diff
--- a/rogue4/sticks.c	Sat Jan 23 09:35:14 2016 -0500
+++ b/rogue4/sticks.c	Wed Jan 27 19:41:05 2016 -0500
@@ -16,12 +16,14 @@
 #include <string.h>
 #include "rogue.h"
 
+void drain(void);
+
 /*
  * fix_stick:
  *	Set up a new stick
  */
-fix_stick(cur)
-register THING *cur;
+void
+fix_stick(THING *cur)
 {
     if (strcmp(ws_type[cur->o_which], "staff") == 0)
 	strcpy(cur->o_damage,"2d3");
@@ -45,7 +47,8 @@
  * do_zap:
  *	Perform a zap with a wand
  */
-do_zap()
+void
+do_zap(void)
 {
     register THING *obj, *tp;
     register int y, x;
@@ -272,7 +275,8 @@
  * drain:
  *	Do drain hit points from player shtick
  */
-drain()
+void
+drain(void)
 {
     register THING *mp;
     register int cnt;
@@ -321,9 +325,8 @@
  * fire_bolt:
  *	Fire a bolt in a given direction from a specific starting place
  */
-fire_bolt(start, dir, name)
-coord *start, *dir;
-char *name;
+void
+fire_bolt(coord *start, coord *dir, char *name)
 {
     register char dirch, ch;
     register THING *tp;
@@ -446,8 +449,7 @@
  *	Return an appropriate string for a wand charge
  */
 char *
-charge_str(obj)
-register THING *obj;
+charge_str(THING *obj)
 {
     static char buf[20];