Advanced Rogue 7: convert to ANSI-style function declarations.
Almost 1500 lines of compiler warnings remain, and the GCC developers are already working on a new version with even more warnings turned on by default.
This commit is contained in:
parent
f38b2223c8
commit
e8e6e604c3
39 changed files with 1181 additions and 889 deletions
|
|
@ -16,18 +16,22 @@
|
|||
* Anything to do with trading posts
|
||||
*/
|
||||
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#include "curses.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;
|
||||
|
|
@ -79,9 +83,10 @@ buy_it()
|
|||
/*
|
||||
* 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, k;
|
||||
|
|
@ -322,8 +327,8 @@ bool startup; /* True if equipping the player at the beginning of the game */
|
|||
* 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;
|
||||
|
||||
|
|
@ -393,7 +398,8 @@ reg struct object *obj;
|
|||
* open_market:
|
||||
* 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.");
|
||||
|
|
@ -408,7 +414,8 @@ open_market()
|
|||
* 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;
|
||||
|
|
@ -445,7 +452,8 @@ price_it()
|
|||
* sell_it:
|
||||
* Sell an item to the trading post
|
||||
*/
|
||||
sell_it()
|
||||
void
|
||||
sell_it(void)
|
||||
{
|
||||
reg struct linked_list *item;
|
||||
reg struct object *obj;
|
||||
|
|
@ -491,7 +499,8 @@ sell_it()
|
|||
* trans_line:
|
||||
* 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 you have.");
|
||||
|
|
@ -511,8 +520,7 @@ trans_line()
|
|||
* 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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue