diff srogue/list.c @ 217:94a0d9dd5ce1

Super-Rogue: convert to ANSI-style function declarations. This fixes most of the build warnings.
author John "Elwin" Edwards
date Sun, 31 Jan 2016 13:45:07 -0500
parents d6b7c3fb37ea
children 0250220d8cdd
line wrap: on
line diff
--- a/srogue/list.c	Thu Jan 28 18:55:47 2016 -0500
+++ b/srogue/list.c	Sun Jan 31 13:45:07 2016 -0500
@@ -23,8 +23,8 @@
  *	Takes an item out of whatever linked list it might be in
  */
 
-_detach(list, item)
-struct linked_list **list, *item;
+void
+_detach(struct linked_list **list, struct linked_list *item)
 {
 	if (*list == item)
 		*list = next(item);
@@ -39,8 +39,8 @@
 /*
  * _attach:	add an item to the head of a list
  */
-_attach(list, item)
-struct linked_list **list, *item;
+void
+_attach(struct linked_list **list, struct linked_list *item)
 {
 	if (*list != NULL) 	{
 		item->l_next = *list;
@@ -57,8 +57,8 @@
 /*
  * _free_list:	Throw the whole blamed thing away
  */
-_free_list(ptr)
-struct linked_list **ptr;
+void
+_free_list(struct linked_list **ptr)
 {
 	register struct linked_list *item;
 
@@ -72,8 +72,8 @@
 /*
  * discard:  free up an item
  */
-discard(item)
-struct linked_list *item;
+void
+discard(struct linked_list *item)
 {
 	total -= 2;
 	FREE(item->l_data);
@@ -84,8 +84,7 @@
  * new_item:	get a new item with a specified size
  */
 struct linked_list *
-new_item(size)
-int size;
+new_item(int size)
 {
 	register struct linked_list *item;
 
@@ -96,8 +95,7 @@
 }
 
 char *
-new(size)
-int size;
+new(int size)
 {
 	register char *space = ALLOC(size);