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.
This commit is contained in:
John "Elwin" Edwards 2016-02-07 14:39:21 -05:00
parent 59f448e92e
commit f38b2223c8
37 changed files with 977 additions and 733 deletions

View file

@ -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 @@ int getmax;
* 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 @@ packweight()
* 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 @@ reg struct object *wh;
* playenc:
* Get hero's carrying ability above norm
*/
playenc()
int
playenc(void)
{
return ((str_compute()-8)*50);
}
@ -109,7 +113,8 @@ playenc()
* totalenc:
* Get total weight that the hero can carry
*/
totalenc()
int
totalenc(void)
{
reg int wtotal;
@ -130,18 +135,18 @@ totalenc()
* 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 @@ wghtchk()
* -1 hit for heavy pack weight
*/
hitweight()
int
hitweight(void)
{
return(2 - foodlev);
}