diff arogue5/things.c @ 225:4f6e056438eb

Merge the GCC5 and build fix branches.
author John "Elwin" Edwards
date Wed, 02 Mar 2016 21:28:34 -0500
parents 56e748983fa8
children
line wrap: on
line diff
--- a/arogue5/things.c	Fri Feb 26 17:30:30 2016 -0500
+++ b/arogue5/things.c	Wed Mar 02 21:28:34 2016 -0500
@@ -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 @@
  *	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 @@
  *	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 @@
  * 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 @@
 /*
  * 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 @@
  * 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 @@
  * 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 @@
 /*
  * 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 @@
  */
 
 char *
-blesscurse(flags)
-int flags;
+blesscurse(int flags)
 {
     if (flags & ISKNOW)  {
 	if (flags & ISCURSED) return("cursed ");
@@ -836,7 +830,8 @@
  * extras:
  *	Return the number of extra items to be created
  */
-extras()
+int
+extras(void)
 {
 	reg int i;