-/* $NetBSD: trade.c,v 1.13 2008/02/23 22:28:46 dholland Exp $ */
+/* $NetBSD: trade.c,v 1.16 2012/06/19 05:35:32 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
#if 0
static char sccsid[] = "@(#)trade.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: trade.c,v 1.13 2008/02/23 22:28:46 dholland Exp $");
+__RCSID("$NetBSD: trade.c,v 1.16 2012/06/19 05:35:32 dholland Exp $");
#endif
#endif /* not lint */
-#include "monop.ext"
+#include "monop.h"
struct trd_st { /* how much to give to other player */
int trader; /* trader number */
static void move_em(TRADE *, TRADE *);
void
-trade()
+trade(void)
{
int tradee, i;
* player, and puts in the structure given.
*/
static void
-get_list(struct_no, play_no)
- int struct_no, play_no;
+get_list(int struct_no, int play_no)
{
int sn, pn;
PLAY *pp;
* This routine sets up the list of tradable property.
*/
static int
-set_list(the_list)
- OWN *the_list;
+set_list(OWN *the_list)
{
int i;
OWN *op;
* This routine summates the trade.
*/
static void
-summate()
+summate(void)
{
bool some;
int i;
* This routine actually executes the trade.
*/
static void
-do_trade()
+do_trade(void)
{
move_em(&trades[0], &trades[1]);
move_em(&trades[1], &trades[0]);
* This routine does a switch from one player to another
*/
static void
-move_em(from, to)
- TRADE *from, *to;
+move_em(TRADE *from, TRADE *to)
{
PLAY *pl_fr, *pl_to;
OWN *op;
* This routine lets a player resign
*/
void
-resign()
+resign(void)
{
int i, new_own;
OWN *op;
if (cur_p->num_gojf)
ret_card(cur_p);
}
-#if 0 /* notyet */
- free(name_list[player]);
-#endif
+ free(play[player].name);
for (i = player; i < num_play; i++) {
name_list[i] = name_list[i+1];
if (i + 1 < num_play)