rogue4: fix most GCC5 warnings.
Converting all function definitions to ANSI style accounts for most of the change. This has exposed other problems, such as daemons not actually being their stated type, that will require more careful solutions.
This commit is contained in:
parent
384386d71c
commit
c1d6a6af6a
32 changed files with 625 additions and 394 deletions
|
|
@ -14,14 +14,16 @@
|
|||
#include <ctype.h>
|
||||
#include "rogue.h"
|
||||
|
||||
void money(int value);
|
||||
|
||||
/*
|
||||
* update_mdest:
|
||||
* Called after picking up an object, before discarding it.
|
||||
* If this was the object of something's desire, that monster will
|
||||
* get mad and run at the hero
|
||||
*/
|
||||
update_mdest(obj)
|
||||
register THING *obj;
|
||||
void
|
||||
update_mdest(THING *obj)
|
||||
{
|
||||
register THING *mp;
|
||||
|
||||
|
|
@ -36,9 +38,8 @@ register THING *obj;
|
|||
* non-null use it as the linked_list pointer instead of gettting
|
||||
* it off the ground.
|
||||
*/
|
||||
add_pack(obj, silent)
|
||||
register THING *obj;
|
||||
bool silent;
|
||||
void
|
||||
add_pack(THING *obj, bool silent)
|
||||
{
|
||||
register THING *op, *lp = NULL;
|
||||
register bool exact, from_floor;
|
||||
|
|
@ -216,9 +217,8 @@ picked_up:
|
|||
* inventory:
|
||||
* List what is in the pack
|
||||
*/
|
||||
inventory(list, type)
|
||||
THING *list;
|
||||
int type;
|
||||
bool
|
||||
inventory(THING *list, int type)
|
||||
{
|
||||
register char ch;
|
||||
register int n_objs;
|
||||
|
|
@ -253,8 +253,8 @@ int type;
|
|||
* pick_up:
|
||||
* Add something to characters pack.
|
||||
*/
|
||||
pick_up(ch)
|
||||
char ch;
|
||||
void
|
||||
pick_up(char ch)
|
||||
{
|
||||
register THING *obj, *mp;
|
||||
|
||||
|
|
@ -290,7 +290,8 @@ char ch;
|
|||
* picky_inven:
|
||||
* Allow player to inventory a single item
|
||||
*/
|
||||
picky_inven()
|
||||
void
|
||||
picky_inven(void)
|
||||
{
|
||||
register THING *obj;
|
||||
register char ch, mch;
|
||||
|
|
@ -325,9 +326,7 @@ picky_inven()
|
|||
* Pick something out of a pack for a purpose
|
||||
*/
|
||||
THING *
|
||||
get_item(purpose, type)
|
||||
char *purpose;
|
||||
int type;
|
||||
get_item(char *purpose, int type)
|
||||
{
|
||||
register THING *obj;
|
||||
register char ch, och;
|
||||
|
|
@ -384,8 +383,8 @@ int type;
|
|||
* pack_char:
|
||||
* Return which character would address a pack object
|
||||
*/
|
||||
pack_char(obj)
|
||||
register THING *obj;
|
||||
char
|
||||
pack_char(THING *obj)
|
||||
{
|
||||
register THING *item;
|
||||
register char c;
|
||||
|
|
@ -403,8 +402,8 @@ register THING *obj;
|
|||
* money:
|
||||
* Add or subtract gold from the pack
|
||||
*/
|
||||
money(value)
|
||||
register int value;
|
||||
void
|
||||
money(int value)
|
||||
{
|
||||
register char floor;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue