diff xrogue/trader.c @ 220:f54901b9c39b

XRogue: convert to ANSI-style function declarations.
author John "Elwin" Edwards
date Wed, 02 Mar 2016 21:13:26 -0500
parents ce0cf824c192
children
line wrap: on
line diff
--- a/xrogue/trader.c	Fri Feb 19 21:02:28 2016 -0500
+++ b/xrogue/trader.c	Wed Mar 02 21:13:26 2016 -0500
@@ -16,12 +16,17 @@
 #include <string.h>
 #include "rogue.h"
 
+bool open_market(void);
+void trans_line(void);
+char *typ_name(struct object *obj);
+
 /*
  * buy_it:
  *      Buy the item on which the hero stands
  */
 
-buy_it()
+void
+buy_it(void)
 {
         reg int wh;
         struct linked_list *item = NULL;
@@ -84,10 +89,11 @@
 /*
  * do_post:
  *      Put a trading post room and stuff on the screen
+ * startup: True if equipping the player at the beginning of the game
  */
 
-do_post(startup)
-bool startup;   /* True if equipping the player at the beginning of the game */
+void
+do_post(bool startup)
 {
         coord tp;
         reg int i, j = 0, k;
@@ -348,7 +354,8 @@
  *      Retruns TRUE when ok do to transacting
  */
  
-open_market()
+bool
+open_market(void)
 {
         if (trader >= MAXPURCH && !wizard && level != 0) {
             msg("The market is closed. The stairs are that-a-way! ");
@@ -364,7 +371,8 @@
  *      Price the object that the hero stands on
  */
  
-price_it()
+bool
+price_it(void)
 {
         reg struct linked_list *item;
         reg struct object *obj;
@@ -404,7 +412,8 @@
  *      Sell an item to the trading post
  */
  
-sell_it()
+void
+sell_it(void)
 {
         reg struct linked_list *item;
         reg struct object *obj;
@@ -451,7 +460,8 @@
  *      Show how many transactions the hero has left
  */
  
-trans_line()
+void
+trans_line(void)
 {
         if (level == 0)
             sprintf(prbuf, "You are welcome to spend whatever gold you have.");
@@ -472,8 +482,7 @@
  */
  
 char *
-typ_name(obj)
-reg struct object *obj;
+typ_name(struct object *obj)
 {
         static char buff[20];
         reg int wh;