Mercurial > hg > early-roguelike
diff arogue5/trader.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 | c49f7927b0fa |
children | ad2570b5b21f |
line wrap: on
line diff
--- a/arogue5/trader.c Sun Jan 31 13:45:07 2016 -0500 +++ b/arogue5/trader.c Sun Feb 07 14:39:21 2016 -0500 @@ -14,17 +14,20 @@ #include "curses.h" #include "rogue.h" +#include <ctype.h> #include <string.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; @@ -77,7 +80,8 @@ * do_post: * Put a trading post room and stuff on the screen */ -do_post() +void +do_post(void) { coord tp; reg int i; @@ -124,8 +128,8 @@ * get_worth: * Calculate an objects worth in gold */ -get_worth(obj) -reg struct object *obj; +int +get_worth(struct object *obj) { reg int worth, wh; @@ -195,7 +199,8 @@ * open_market: * Retruns TRUE when ok do to transacting */ -open_market() +bool +open_market(void) { if (trader >= MAXPURCH && !wizard) { msg("The market is closed. The stairs are that-a-way."); @@ -210,7 +215,8 @@ * price_it: * Price the object that the hero stands on */ -price_it() +bool +price_it(void) { reg struct linked_list *item; reg struct object *obj; @@ -244,7 +250,8 @@ * sell_it: * Sell an item to the trading post */ -sell_it() +void +sell_it(void) { reg struct linked_list *item; reg struct object *obj; @@ -291,7 +298,8 @@ * trans_line: * Show how many transactions the hero has left */ -trans_line() +void +trans_line(void) { if (!wizard) sprintf(prbuf,"You have %d transactions remaining.", @@ -309,8 +317,7 @@ * Return the name for this type of object */ char * -typ_name(obj) -reg struct object *obj; +typ_name(struct object *obj) { static char buff[20]; reg int wh;