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

@ -18,12 +18,13 @@
#include <string.h>
#include "rogue.h"
int extras(void);
/*
* print out the number of charges on a stick
*/
char *
charge_str(obj)
register struct object *obj;
charge_str(struct object *obj)
{
static char buf[20];
@ -41,9 +42,7 @@ register struct object *obj;
* inventory.
*/
char *
inv_name(obj, drop)
register struct object *obj;
bool drop;
inv_name(struct object *obj, bool drop)
{
register char *pb;
@ -296,8 +295,7 @@ bool drop;
* Return the name of a weapon.
*/
char *
weap_name(obj)
register struct object *obj;
weap_name(struct object *obj)
{
switch (obj->o_type) {
case WEAPON:
@ -325,8 +323,8 @@ register struct object *obj;
* drop:
* put something down
*/
drop(item)
struct linked_list *item;
bool
drop(struct linked_list *item)
{
register char ch = 0;
register struct linked_list *obj, *nobj;
@ -413,8 +411,8 @@ struct linked_list *item;
/*
* do special checks for dropping or unweilding|unwearing|unringing
*/
dropcheck(op)
register struct object *op;
bool
dropcheck(struct object *op)
{
int save_max;
@ -514,8 +512,7 @@ register struct object *op;
* return a new thing
*/
struct linked_list *
new_thing(thing_type)
int thing_type;
new_thing(int thing_type)
{
register struct linked_list *item;
register struct object *cur;
@ -710,8 +707,7 @@ int thing_type;
* provide a new item tailored to specification
*/
struct linked_list *
spec_item(type, which, hit, damage)
int type, which, hit, damage;
spec_item(int type, int which, int hit, int damage)
{
register struct linked_list *item;
register struct object *obj;
@ -787,9 +783,8 @@ int type, which, hit, damage;
/*
* pick an item out of a list of nitems possible magic items
*/
pick_one(magic, nitems)
register struct magic_item *magic;
int nitems;
int
pick_one(struct magic_item *magic, int nitems)
{
register struct magic_item *end;
register int i;
@ -821,8 +816,7 @@ int nitems;
*/
char *
blesscurse(flags)
int flags;
blesscurse(int flags)
{
if (flags & ISKNOW) {
if (flags & ISCURSED) return("cursed ");
@ -836,7 +830,8 @@ int flags;
* extras:
* Return the number of extra items to be created
*/
extras()
int
extras(void)
{
reg int i;