Super-Rogue: convert to ANSI-style function declarations.

This fixes most of the build warnings.
This commit is contained in:
John "Elwin" Edwards 2016-01-31 13:45:07 -05:00
parent 0f87d5b4d8
commit 59f448e92e
33 changed files with 783 additions and 518 deletions

View file

@ -10,14 +10,19 @@
* See the file LICENSE.TXT for full copyright and licensing information.
*/
#include <string.h>
#include "rogue.h"
#include "rogue.ext"
int packweight(void);
int pack_vol(void);
/*
* updpack:
* Update his pack weight and adjust fooduse accordingly
*/
updpack()
void
updpack(void)
{
reg int topcarry, curcarry;
@ -44,7 +49,8 @@ updpack()
* packweight:
* Get the total weight of the hero's pack
*/
packweight()
int
packweight(void)
{
reg struct object *obj;
reg struct linked_list *pc;
@ -72,8 +78,8 @@ packweight()
* itemweight:
* Get the weight of an object
*/
itemweight(wh)
struct object *wh;
int
itemweight(struct object *wh)
{
reg int weight;
@ -97,7 +103,8 @@ struct object *wh;
* pack_vol:
* Get the total volume of the hero's pack
*/
pack_vol()
int
pack_vol(void)
{
reg struct object *obj;
reg struct linked_list *pc;
@ -115,8 +122,8 @@ pack_vol()
* itemvol:
* Get the volume of an object
*/
itemvol(wh)
struct object *wh;
int
itemvol(struct object *wh)
{
reg int volume, what, extra;
@ -139,9 +146,10 @@ struct object *wh;
* playenc:
* Get hero's carrying ability above norm
*/
playenc()
int
playenc(void)
{
reg estr = him->s_ef.a_str;
reg int estr = him->s_ef.a_str;
if (estr >= 24)
return 3000;
switch(him->s_ef.a_str) {
@ -174,7 +182,8 @@ playenc()
* totalenc:
* Get total weight that the hero can carry
*/
totalenc()
int
totalenc(void)
{
reg int wtotal;
@ -192,8 +201,8 @@ totalenc()
* whgtchk:
* See if the hero can carry his pack
*/
wghtchk(fromfuse)
int fromfuse;
void
wghtchk(int fromfuse)
{
reg int dropchk, err = TRUE;
reg char ch;
@ -231,7 +240,8 @@ int fromfuse;
* 0 hit for medium pack weight
* -1 hit for heavy pack weight
*/
hitweight()
int
hitweight(void)
{
return(2 - foodlev);
}