/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2008, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ * Copyright (C) 1986-2010, Dave Pare, Jeff Bailey, Thomas Ruschak,
* Ken Stevens, Steve McClure
*
* This program is free software; you can redistribute it and/or modify
struct trdstr tmpt;
struct ichrstr *ip;
int qty;
- int o, n, q;
+ int o, n;
coord x, y;
char *p;
float bid;
display_mark(ip->i_uid, 0);
pr("\n");
p = getstarg(player->argp[2], "Which lot are you bidding on: ", buf);
- if (p == 0)
+ if (!p)
return RET_SYN;
if (*p == 0)
return RET_SYN;
pr("You can't bid on your own lot.\n");
return RET_OK;
}
- if ((p = getstarg(player->argp[3], "How much per unit: ", buf)) == 0)
+ if (!(p = getstarg(player->argp[3], "How much per unit: ", buf)))
return RET_SYN;
bid = atof(p);
if (bid <= 0)
would make him go broke. Ken, I ought to skin you alive for making me code
this part up.*/
tally = 0.0;
- for (q = 0; gettrade(q, &tmpt); q++) {
+ for (n = 0; gettrade(n, &tmpt); n++) {
if (tmpt.trd_maxbidder == player->cnum &&
tmpt.trd_unitid >= 0 && tmpt.trd_owner != player->cnum) {
tally += tmpt.trd_price * tradetax;
}
}
- for (q = 0; getcomm(q, &comt); q++) {
+ for (n = 0; getcomm(n, &comt); n++) {
if (comt.com_maxbidder == player->cnum &&
comt.com_owner != 0 && comt.com_owner != player->cnum) {
tally += comt.com_price * comt.com_amount * buytax;