diff arogue5/list.c @ 218:56e748983fa8

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.
author John "Elwin" Edwards
date Sun, 07 Feb 2016 14:39:21 -0500
parents 0ed67132cf10
children 0250220d8cdd
line wrap: on
line diff
--- a/arogue5/list.c	Sun Jan 31 13:45:07 2016 -0500
+++ b/arogue5/list.c	Sun Feb 07 14:39:21 2016 -0500
@@ -21,8 +21,8 @@
  *	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);
@@ -37,8 +37,8 @@
  *	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)
     {
@@ -60,8 +60,8 @@
  *	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;
 
@@ -78,8 +78,8 @@
  *	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;
     obj = OBJPTR(item);
@@ -95,8 +95,8 @@
  *	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;
 
@@ -113,8 +113,8 @@
  *	free up an item and its thing
  */
 
-t_discard(item)
-struct linked_list *item;
+void
+t_discard(struct linked_list *item)
 {
     total -= 2;
     FREE(item->l_data);
@@ -126,8 +126,8 @@
  *	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);
@@ -139,8 +139,7 @@
  */
 
 struct linked_list *
-new_item(size)
-int size;
+new_item(int size)
 {
     register struct linked_list *item;
 
@@ -158,7 +157,7 @@
  */
 
 struct linked_list *
-creat_item()
+creat_item(void)
 {
     register struct linked_list *item;
 
@@ -169,8 +168,7 @@
 }
 
 char *
-new(size)
-int size;
+new(int size)
 {
     register char *space = ALLOC(size);
     static char errbuf[LINELEN];