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

@ -24,9 +24,8 @@
* is non-null use it as the linked_list pointer instead of
* getting it off the ground.
*/
add_pack(item, silent)
struct linked_list *item;
bool silent;
bool
add_pack(struct linked_list *item, bool silent)
{
reg struct linked_list *ip, *lp;
reg struct object *obj, *op = NULL;
@ -191,9 +190,8 @@ picked_up:
* inventory:
* Show what items are in a specific list
*/
inventory(list, type)
struct linked_list *list;
int type;
bool
inventory(struct linked_list *list, int type)
{
reg struct linked_list *pc;
reg struct object *obj;
@ -229,8 +227,8 @@ int type;
* pick_up:
* Add something to characters pack.
*/
pick_up(ch)
char ch;
void
pick_up(char ch)
{
nochange = FALSE;
switch(ch) {
@ -254,7 +252,8 @@ char ch;
* picky_inven:
* Allow player to inventory a single item
*/
picky_inven()
void
picky_inven(void)
{
reg struct linked_list *item;
reg char ch, mch;
@ -288,9 +287,7 @@ picky_inven()
* pick something out of a pack for a purpose
*/
struct linked_list *
get_item(purpose, type)
char *purpose;
int type;
get_item(char *purpose, int type)
{
reg struct linked_list *obj, *pit, *savepit = NULL;
struct object *pob;
@ -408,8 +405,7 @@ int type;
* Get the character of a particular item in the pack
*/
char
pack_char(obj)
struct object *obj;
pack_char(struct object *obj)
{
reg struct linked_list *item;
reg char c;
@ -427,7 +423,8 @@ struct object *obj;
* idenpack:
* Identify all the items in the pack
*/
idenpack()
void
idenpack(void)
{
reg struct linked_list *pc;
@ -440,8 +437,8 @@ idenpack()
* del_pack:
* Take something out of the hero's pack
*/
del_pack(what)
struct linked_list *what;
void
del_pack(struct linked_list *what)
{
reg struct object *op;
@ -461,8 +458,8 @@ struct linked_list *what;
* cur_null:
* This updates cur_weapon etc for dropping things
*/
cur_null(op)
struct object *op;
void
cur_null(struct object *op)
{
if (op == cur_weapon)
cur_weapon = NULL;