XRogue: convert to ANSI-style function declarations.

This commit is contained in:
John "Elwin" Edwards 2016-03-02 21:13:26 -05:00
parent e8e6e604c3
commit 2853120387
41 changed files with 1281 additions and 908 deletions

View file

@ -21,13 +21,16 @@
#include <curses.h>
#include "rogue.h"
void r_discard(struct linked_list *item);
void t_discard(struct linked_list *item);
/*
* detach:
* Takes an item out of whatever linked list it might be in
*/
_detach(list, item)
register struct linked_list **list, *item;
void
_detach(struct linked_list **list, struct linked_list *item)
{
if (*list == item)
*list = next(item);
@ -42,8 +45,8 @@ register struct linked_list **list, *item;
* add an item to the head of a list
*/
_attach(list, item)
register struct linked_list **list, *item;
void
_attach(struct linked_list **list, struct linked_list *item)
{
if (*list != NULL)
{
@ -65,8 +68,8 @@ register struct linked_list **list, *item;
* Throw the whole object list away
*/
_o_free_list(ptr)
register struct linked_list **ptr;
void
_o_free_list(struct linked_list **ptr)
{
register struct linked_list *item;
@ -83,8 +86,8 @@ register struct linked_list **ptr;
* free up an item and its object(and maybe contents)
*/
o_discard(item)
register struct linked_list *item;
void
o_discard(struct linked_list *item)
{
register struct object *obj;
@ -102,8 +105,8 @@ register struct linked_list *item;
discard the item (monster) itself as that belong to mlist.
*/
_r_free_fire_list(ptr)
register struct linked_list **ptr;
void
_r_free_fire_list(struct linked_list **ptr)
{
register struct linked_list *item;
@ -119,8 +122,8 @@ register struct linked_list **ptr;
* Throw the whole list of room exits away
*/
_r_free_list(ptr)
register struct linked_list **ptr;
void
_r_free_list(struct linked_list **ptr)
{
register struct linked_list *item;
@ -137,8 +140,8 @@ register struct linked_list **ptr;
* free up an item and its room
*/
r_discard(item)
register struct linked_list *item;
void
r_discard(struct linked_list *item)
{
total -= 2;
FREE(DOORPTR(item));
@ -150,8 +153,8 @@ register struct linked_list *item;
* Throw the whole thing list away
*/
_t_free_list(ptr)
register struct linked_list **ptr;
void
_t_free_list(struct linked_list **ptr)
{
register struct linked_list *item;
@ -168,8 +171,8 @@ register struct linked_list **ptr;
* free up an item and its thing
*/
t_discard(item)
register struct linked_list *item;
void
t_discard(struct linked_list *item)
{
register struct thing *tp;
@ -187,8 +190,8 @@ register struct linked_list *item;
* get rid of an item structure -- don't worry about contents
*/
destroy_item(item)
register struct linked_list *item;
void
destroy_item(struct linked_list *item)
{
total--;
FREE(item);
@ -200,8 +203,7 @@ register struct linked_list *item;
*/
struct linked_list *
new_item(size)
int size;
new_item(int size)
{
register struct linked_list *item;
@ -220,7 +222,7 @@ int size;
*/
struct linked_list *
creat_item()
creat_item(void)
{
register struct linked_list *item;
@ -231,8 +233,7 @@ creat_item()
}
char *
new(size)
int size;
new(int size)
{
register char *space = ALLOC(size);