diff srogue/pack.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 7f5f5f1ba09c
children
line wrap: on
line diff
--- a/srogue/pack.c	Thu Jan 28 18:55:47 2016 -0500
+++ b/srogue/pack.c	Sun Jan 31 13:45:07 2016 -0500
@@ -24,9 +24,8 @@
  * is non-null use it as the linked_list pointer instead of
  * getting it off the ground.
  */
-add_pack(item, silent)
-struct linked_list *item;
-bool silent;
+bool
+add_pack(struct linked_list *item, bool silent)
 {
 	reg struct linked_list *ip, *lp;
 	reg struct object *obj, *op = NULL;
@@ -191,9 +190,8 @@
  * inventory:
  *	Show what items are in a specific list
  */
-inventory(list, type)
-struct linked_list *list;
-int type;
+bool
+inventory(struct linked_list *list, int type)
 {
 	reg struct linked_list *pc;
 	reg struct object *obj;
@@ -229,8 +227,8 @@
  * pick_up:
  *	Add something to characters pack.
  */
-pick_up(ch)
-char ch;
+void
+pick_up(char ch)
 {
 	nochange = FALSE;
 	switch(ch) {
@@ -254,7 +252,8 @@
  * picky_inven:
  *	Allow player to inventory a single item
  */
-picky_inven()
+void
+picky_inven(void)
 {
 	reg struct linked_list *item;
 	reg char ch, mch;
@@ -288,9 +287,7 @@
  *	pick something out of a pack for a purpose
  */
 struct linked_list *
-get_item(purpose, type)
-char *purpose;
-int type;
+get_item(char *purpose, int type)
 {
 	reg struct linked_list *obj, *pit, *savepit = NULL;
 	struct object *pob;
@@ -408,8 +405,7 @@
  *	Get the character of a particular item in the pack
  */
 char
-pack_char(obj)
-struct object *obj;
+pack_char(struct object *obj)
 {
 	reg struct linked_list *item;
 	reg char c;
@@ -427,7 +423,8 @@
  * idenpack:
  *	Identify all the items in the pack
  */
-idenpack()
+void
+idenpack(void)
 {
 	reg struct linked_list *pc;
 
@@ -440,8 +437,8 @@
  * del_pack:
  *	Take something out of the hero's pack
  */
-del_pack(what)
-struct linked_list *what;
+void
+del_pack(struct linked_list *what)
 {
 	reg struct object *op;
 
@@ -461,8 +458,8 @@
  * cur_null:
  *	This updates cur_weapon etc for dropping things
  */
-cur_null(op)
-struct object *op;
+void
+cur_null(struct object *op)
 {
 	if (op == cur_weapon)
 		cur_weapon = NULL;