diff xrogue/encumb.c @ 220:f54901b9c39b

XRogue: convert to ANSI-style function declarations.
author John "Elwin" Edwards
date Wed, 02 Mar 2016 21:13:26 -0500
parents e6179860cb76
children 7c1cb43f346e
line wrap: on
line diff
--- a/xrogue/encumb.c	Fri Feb 19 21:02:28 2016 -0500
+++ b/xrogue/encumb.c	Wed Mar 02 21:13:26 2016 -0500
@@ -15,14 +15,15 @@
 #include <curses.h>
 #include "rogue.h"
 
+int packweight(struct thing *tp);
+
 /*
  * updpack:
  *      Update his pack weight and adjust fooduse accordingly
  */
 
-updpack(getmax, tp)
-int getmax;
-struct thing *tp;
+void
+updpack(int getmax, struct thing *tp)
 {
 
         reg int topcarry, curcarry;
@@ -52,8 +53,8 @@
  *      Get the total weight of the hero's pack
  */
 
-packweight(tp)
-register struct thing *tp;
+int
+packweight(struct thing *tp)
 {
         reg struct object *obj;
         reg struct linked_list *pc;
@@ -89,8 +90,8 @@
  *      Get the weight of an object
  */
 
-itemweight(wh)
-reg struct object *wh;
+int
+itemweight(struct object *wh)
 {
         reg int weight;
         reg int ac;
@@ -120,8 +121,8 @@
  *      Get hero's carrying ability above norm
  */
 
-playenc(tp)
-register struct thing *tp;
+int
+playenc(struct thing *tp)
 {
         register int strength;
 
@@ -136,8 +137,8 @@
  *      Get total weight that the hero can carry
  */
 
-totalenc(tp)
-register struct thing *tp;
+int
+totalenc(struct thing *tp)
 {
         reg int wtotal;
 
@@ -157,11 +158,11 @@
  *      See if the hero can carry his pack
  */
 
-wghtchk()
+void
+wghtchk(void)
 {
         reg int dropchk, err = TRUE;
         reg char ch;
-        int wghtchk();
 
         inwhgt = TRUE;
         if (pstats.s_pack > pstats.s_carry) {
@@ -195,7 +196,8 @@
  *                      -1 hit for heavy pack weight
  */
 
-hitweight()
+int
+hitweight(void)
 {
         return(2 - foodlev);
 }