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

@ -20,15 +20,14 @@
#include "rogue.h"
#include "rogue.ext"
void basic_init(struct object *cur);
/*
* inv_name:
* Return the name of something as it would appear in an inventory.
*/
char *
inv_name(obj, drop)
struct object *obj;
bool drop;
inv_name(struct object *obj, bool drop)
{
reg char *pb, *tn, *pl;
reg int wh, knowit;
@ -183,7 +182,8 @@ bool drop;
* money:
* Add to characters purse
*/
money()
void
money(void)
{
reg struct room *rp;
reg struct linked_list *item;
@ -215,8 +215,8 @@ money()
* drop:
* put something down
*/
drop(item)
struct linked_list *item;
int
drop(struct linked_list *item)
{
reg char ch;
reg struct linked_list *ll, *nll;
@ -281,8 +281,8 @@ struct linked_list *item;
* dropcheck:
* Do special checks for dropping or unweilding|unwearing|unringing
*/
dropcheck(op)
struct object *op;
bool
dropcheck(struct object *op)
{
if (op == NULL)
return TRUE;
@ -320,9 +320,7 @@ struct object *op;
* Return a new thing
*/
struct linked_list *
new_thing(treas, type, which)
int type, which;
bool treas;
new_thing(bool treas, int type, int which)
{
struct linked_list *item;
struct magic_item *mi;
@ -404,8 +402,8 @@ bool treas;
* basic_init:
* Set all params of an object to the basic values.
*/
basic_init(cur)
struct object *cur;
void
basic_init(struct object *cur)
{
cur->o_ac = 11;
cur->o_count = 1;
@ -423,7 +421,8 @@ struct object *cur;
* extras:
* Return the number of extra items to be created
*/
extras()
int
extras(void)
{
reg int i;
@ -441,8 +440,8 @@ extras()
* pick_one:
* Pick an item out of a list of nitems possible magic items
*/
pick_one(mag)
struct magic_item *mag;
int
pick_one(struct magic_item *mag)
{
reg struct magic_item *start;
reg int i;