diff arogue5/encumb.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 0ed67132cf10
children
line wrap: on
line diff
--- a/arogue5/encumb.c	Sun Jan 31 13:45:07 2016 -0500
+++ b/arogue5/encumb.c	Sun Feb 07 14:39:21 2016 -0500
@@ -15,12 +15,14 @@
 #include "curses.h"
 #include "rogue.h"
 
+int packweight(void);
+
 /*
  * updpack:
  *	Update his pack weight and adjust fooduse accordingly
  */
-updpack(getmax)
-int getmax;
+void
+updpack(bool getmax)
 {
 
 	reg int topcarry, curcarry;
@@ -45,7 +47,8 @@
  * packweight:
  *	Get the total weight of the hero's pack
  */
-packweight()
+int
+packweight(void)
 {
 	reg struct object *obj;
 	reg struct linked_list *pc;
@@ -68,8 +71,8 @@
  * itemweight:
  *	Get the weight of an object
  */
-itemweight(wh)
-reg struct object *wh;
+int
+itemweight(struct object *wh)
 {
 	reg int weight;
 	reg int ac;
@@ -99,7 +102,8 @@
  * playenc:
  *	Get hero's carrying ability above norm
  */
-playenc()
+int
+playenc(void)
 {
 	return ((str_compute()-8)*50);
 }
@@ -109,7 +113,8 @@
  * totalenc:
  *	Get total weight that the hero can carry
  */
-totalenc()
+int
+totalenc(void)
 {
 	reg int wtotal;
 
@@ -130,18 +135,18 @@
  *	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) {
 	    ch = CCHAR( mvwinch(stdscr, hero.y, hero.x) );
 	    if((ch != FLOOR && ch != PASSAGE)) {
 		extinguish(wghtchk);
-		fuse(wghtchk,TRUE,1,AFTER);
+		fuse(wghtchk,NULL,1,AFTER);
 		inwhgt = FALSE;
 		return;
 	    }
@@ -169,7 +174,8 @@
  *			-1 hit for heavy pack weight
  */
 
-hitweight()
+int
+hitweight(void)
 {
 	return(2 - foodlev);
 }