/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2008, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ * Copyright (C) 1986-2009, Dave Pare, Jeff Bailey, Thomas Ruschak,
* Ken Stevens, Steve McClure
*
* This program is free software; you can redistribute it and/or modify
* David Muir Sharnoff
* Chad Zabel, 1994
* Steve McClure, 1998-2000
- * Ron Koenderink, 2003-2004
- * Markus Armbruster, 2003-2008
+ * Ron Koenderink, 2003-2009
+ * Markus Armbruster, 2003-2009
*/
#include <config.h>
char buf[1024];
char ewhat;
- if ((what = getstarg(player->argp[1],
- "Edit What (country, land, ship, plane, nuke, unit)? ",
- buf)) == 0)
+ what = getstarg(player->argp[1],
+ "Edit What (country, land, ship, plane, nuke, unit)? ",
+ buf);
+ if (!what)
return RET_SYN;
ewhat = what[0];
switch (ewhat) {
pr("huh?\n");
return RET_SYN;
}
- if (player->argp[3] == 0) {
+ if (!player->argp[3]) {
switch (ewhat) {
case 'l':
prsect(§);
}
}
for (;;) {
- if (player->argp[arg_index] != 0) {
- if (player->argp[arg_index+1] != 0) {
+ if (player->argp[arg_index]) {
+ if (player->argp[arg_index+1]) {
thing = player->argp[arg_index++][0];
ptr = player->argp[arg_index++];
arg = atoi(ptr);
{
struct natstr *natp;
- if ((natp = getnatp(ship->shp_own)) == 0)
+ if (!(natp = getnatp(ship->shp_own)))
return;
pr("%s (#%d) %s\n", natp->nat_cnam, ship->shp_own, prship(ship));
pr("UID <U>: %d\n", ship->shp_uid);
case 'e':
new = errcheck(arg, 0, 100);
noise(sect, "Efficiency", sect->sct_effic, new);
- sect->sct_effic = (unsigned char)new;
+ sect->sct_effic = new;
break;
case 'm':
new = errcheck(arg, -127, 255);
}
-int
+static int
doplane(char op, int arg, char *p, struct plnstr *plane)
{
coord newx, newy;