commands: Rename the command functions
Command functions are traditionally named like the command shortened
to four characters. When this name collides with a keyword or library
function, we abbreviate more: brea(), rea(). A few are unabbreviated,
e.g. execute(). A few have different names, e.g. explain(), not
list().
Commit 23726b379
(v4.3.0) suppressed a GCC warning about carg()
colliding with its built-in function.
Ron Koenderink reported Microsoft Visual Studio 2019 fails to link:
"_carg already defined in ucrtd.lib(ucrtbased.dll)".
Time to clean this up: rename the functions to c_FOO(), where FOO is
the unabbreviated name of the command.
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
a6c46316e9
commit
c6ec6a41c2
158 changed files with 664 additions and 524 deletions
|
@ -124,9 +124,6 @@ dnl -Wswitch-default dnl
|
|||
-Wno-unused-parameter dnl
|
||||
], [], [$cflags_test])
|
||||
|
||||
# Our carg() conflicts with libm's TODO clean that up
|
||||
MY_APPEND_COMPILE_FLAGS([-fno-builtin-carg -Wno-incompatible-library-redeclaration])
|
||||
|
||||
# No multiple definitions of uninitialized global variables
|
||||
MY_APPEND_COMPILE_FLAGS([-fno-common])
|
||||
|
||||
|
|
|
@ -71,170 +71,170 @@ extern int radar(int);
|
|||
extern void update_power(void);
|
||||
extern int show_first_tel(char *);
|
||||
/* Commands */
|
||||
int acce(void);
|
||||
int add(void);
|
||||
int anti(void);
|
||||
int apro(void);
|
||||
int arm(void);
|
||||
int army(void);
|
||||
int assa(void);
|
||||
int atta(void);
|
||||
int bdes(void);
|
||||
int best(void);
|
||||
int boar(void);
|
||||
int bomb(void);
|
||||
int brea(void);
|
||||
int budg(void);
|
||||
int buil(void);
|
||||
int buy(void);
|
||||
int capi(void);
|
||||
int carg(void);
|
||||
int cens(void);
|
||||
int chan(void);
|
||||
int coas(void);
|
||||
int coll(void);
|
||||
int comm(void);
|
||||
int cons(void);
|
||||
int conv(void);
|
||||
int coun(void);
|
||||
int cuto(void);
|
||||
int decl(void);
|
||||
int deli(void);
|
||||
int demo(void);
|
||||
int desi(void);
|
||||
int disa(void);
|
||||
int disarm(void);
|
||||
int dist(void);
|
||||
int drop(void);
|
||||
int dump(void);
|
||||
int echo(void);
|
||||
int edit(void);
|
||||
int enab(void);
|
||||
int enli(void);
|
||||
int execute(void);
|
||||
int explain(void);
|
||||
int explore(void);
|
||||
int fina(void);
|
||||
int flash(void);
|
||||
int flee(void);
|
||||
int fly(void);
|
||||
int force(void);
|
||||
int fort(void);
|
||||
int give(void);
|
||||
int grin(void);
|
||||
int hard(void);
|
||||
int head(void);
|
||||
int improve(void);
|
||||
int info(void);
|
||||
int land(void);
|
||||
int landmine(void);
|
||||
int laun(void);
|
||||
int lboa(void);
|
||||
int lcarg(void);
|
||||
int ldump(void);
|
||||
int ledg(void);
|
||||
int leve(void);
|
||||
int lload(void);
|
||||
int llook(void);
|
||||
int load(void);
|
||||
int look(void);
|
||||
int lost(void);
|
||||
int lrad(void);
|
||||
int lretr(void);
|
||||
int lsta(void);
|
||||
int ltend(void);
|
||||
int map(void);
|
||||
int march(void);
|
||||
int mark(void);
|
||||
int mine(void);
|
||||
int mission(void);
|
||||
int morale(void);
|
||||
int move(void);
|
||||
int multifire(void);
|
||||
int name(void);
|
||||
int nati(void);
|
||||
int navi(void);
|
||||
int ndump(void);
|
||||
int new(void);
|
||||
int newe(void);
|
||||
int news(void);
|
||||
int nuke(void);
|
||||
int offe(void);
|
||||
int orig(void);
|
||||
int para(void);
|
||||
int path(void);
|
||||
int payo(void);
|
||||
int pboa(void);
|
||||
int pdump(void);
|
||||
int peek(void);
|
||||
int plan(void);
|
||||
int play(void);
|
||||
int powe(void);
|
||||
int prod(void);
|
||||
int pstat(void);
|
||||
int quit(void);
|
||||
int rada(void);
|
||||
int range(void);
|
||||
int rea(void);
|
||||
int real(void);
|
||||
int reco(void);
|
||||
int reje(void);
|
||||
int rela(void);
|
||||
int relo(void);
|
||||
int repa(void);
|
||||
int repo(void);
|
||||
int rese(void);
|
||||
int reso(void);
|
||||
int retr(void);
|
||||
int rout(void);
|
||||
int sabo(void);
|
||||
int sate(void);
|
||||
int scra(void);
|
||||
int sct(void);
|
||||
int scut(void);
|
||||
int sdump(void);
|
||||
int sell(void);
|
||||
int set(void);
|
||||
int setres(void);
|
||||
int setsector(void);
|
||||
int shar(void);
|
||||
int shark(void);
|
||||
int shi(void);
|
||||
int shoo(void);
|
||||
int show(void);
|
||||
int show_motd(void);
|
||||
int shut(void);
|
||||
int sinfra(void);
|
||||
int skyw(void);
|
||||
int sona(void);
|
||||
int spy(void);
|
||||
int sstat(void);
|
||||
int start(void);
|
||||
int starve(void);
|
||||
int stoc(void);
|
||||
int stop(void);
|
||||
int stre(void);
|
||||
int supp(void);
|
||||
int surv(void);
|
||||
int swaps(void);
|
||||
int tele(void);
|
||||
int tend(void);
|
||||
int terr(void);
|
||||
int thre(void);
|
||||
int togg(void);
|
||||
int torp(void);
|
||||
int trad(void);
|
||||
int tran(void);
|
||||
int turn(void);
|
||||
int upda(void);
|
||||
int upgr(void);
|
||||
int vers(void);
|
||||
int wall(void);
|
||||
int wing(void);
|
||||
int wipe(void);
|
||||
int work(void);
|
||||
int xdump(void);
|
||||
int zdon(void);
|
||||
int c_accept(void);
|
||||
int c_add(void);
|
||||
int c_anti(void);
|
||||
int c_apropos(void);
|
||||
int c_arm(void);
|
||||
int c_army(void);
|
||||
int c_assault(void);
|
||||
int c_attack(void);
|
||||
int c_bdes(void);
|
||||
int c_bestpath(void);
|
||||
int c_board(void);
|
||||
int c_bomb(void);
|
||||
int c_break(void);
|
||||
int c_budget(void);
|
||||
int c_build(void);
|
||||
int c_buy(void);
|
||||
int c_capital(void);
|
||||
int c_cargo(void);
|
||||
int c_census(void);
|
||||
int c_change(void);
|
||||
int c_coastwatch(void);
|
||||
int c_collect(void);
|
||||
int c_commodity(void);
|
||||
int c_consider(void);
|
||||
int c_convert(void);
|
||||
int c_country(void);
|
||||
int c_cutoff(void);
|
||||
int c_declare(void);
|
||||
int c_deliver(void);
|
||||
int c_demobilize(void);
|
||||
int c_designate(void);
|
||||
int c_disable(void);
|
||||
int c_disarm(void);
|
||||
int c_distribute(void);
|
||||
int c_drop(void);
|
||||
int c_dump(void);
|
||||
int c_echo(void);
|
||||
int c_edit(void);
|
||||
int c_enable(void);
|
||||
int c_enlist(void);
|
||||
int c_execute(void);
|
||||
int c_explore(void);
|
||||
int c_financial(void);
|
||||
int c_fire(void);
|
||||
int c_flash(void);
|
||||
int c_fleetadd(void);
|
||||
int c_fly(void);
|
||||
int c_force(void);
|
||||
int c_fortify(void);
|
||||
int c_give(void);
|
||||
int c_grind(void);
|
||||
int c_harden(void);
|
||||
int c_headlines(void);
|
||||
int c_improve(void);
|
||||
int c_info(void);
|
||||
int c_land(void);
|
||||
int c_launch(void);
|
||||
int c_lboard(void);
|
||||
int c_lcargo(void);
|
||||
int c_ldump(void);
|
||||
int c_ledger(void);
|
||||
int c_level(void);
|
||||
int c_list(void);
|
||||
int c_lload(void);
|
||||
int c_llookout(void);
|
||||
int c_lmine(void);
|
||||
int c_load(void);
|
||||
int c_lookout(void);
|
||||
int c_lost(void);
|
||||
int c_lradar(void);
|
||||
int c_lretreat(void);
|
||||
int c_lstat(void);
|
||||
int c_ltend(void);
|
||||
int c_map(void);
|
||||
int c_march(void);
|
||||
int c_market(void);
|
||||
int c_mine(void);
|
||||
int c_mission(void);
|
||||
int c_morale(void);
|
||||
int c_motd(void);
|
||||
int c_move(void);
|
||||
int c_name(void);
|
||||
int c_nation(void);
|
||||
int c_navigate(void);
|
||||
int c_ndump(void);
|
||||
int c_newcap(void);
|
||||
int c_neweff(void);
|
||||
int c_newspaper(void);
|
||||
int c_nuke(void);
|
||||
int c_offer(void);
|
||||
int c_origin(void);
|
||||
int c_paradrop(void);
|
||||
int c_path(void);
|
||||
int c_payoff(void);
|
||||
int c_pboard(void);
|
||||
int c_pdump(void);
|
||||
int c_peek(void);
|
||||
int c_plane(void);
|
||||
int c_players(void);
|
||||
int c_power(void);
|
||||
int c_production(void);
|
||||
int c_pstat(void);
|
||||
int c_quit(void);
|
||||
int c_radar(void);
|
||||
int c_range(void);
|
||||
int c_read(void);
|
||||
int c_realm(void);
|
||||
int c_recon(void);
|
||||
int c_reject(void);
|
||||
int c_relations(void);
|
||||
int c_reload(void);
|
||||
int c_repay(void);
|
||||
int c_report(void);
|
||||
int c_reset(void);
|
||||
int c_resource(void);
|
||||
int c_retreat(void);
|
||||
int c_route(void);
|
||||
int c_sabotage(void);
|
||||
int c_satellite(void);
|
||||
int c_scrap(void);
|
||||
int c_scuttle(void);
|
||||
int c_sdump(void);
|
||||
int c_sect(void);
|
||||
int c_sell(void);
|
||||
int c_set(void);
|
||||
int c_setresource(void);
|
||||
int c_setsector(void);
|
||||
int c_sharebmap(void);
|
||||
int c_shark(void);
|
||||
int c_ship(void);
|
||||
int c_shoot(void);
|
||||
int c_show(void);
|
||||
int c_shutdown(void);
|
||||
int c_sinfrastructure(void);
|
||||
int c_skywatch(void);
|
||||
int c_sonar(void);
|
||||
int c_spy(void);
|
||||
int c_sstat(void);
|
||||
int c_start(void);
|
||||
int c_starvation(void);
|
||||
int c_stockpile(void);
|
||||
int c_stop(void);
|
||||
int c_strength(void);
|
||||
int c_supply(void);
|
||||
int c_survey(void);
|
||||
int c_swapsector(void);
|
||||
int c_telegram(void);
|
||||
int c_tend(void);
|
||||
int c_territory(void);
|
||||
int c_threshold(void);
|
||||
int c_toggle(void);
|
||||
int c_torpedo(void);
|
||||
int c_trade(void);
|
||||
int c_transport(void);
|
||||
int c_turn(void);
|
||||
int c_update(void);
|
||||
int c_upgrade(void);
|
||||
int c_version(void);
|
||||
int c_wall(void);
|
||||
int c_wingadd(void);
|
||||
int c_wipe(void);
|
||||
int c_work(void);
|
||||
int c_xdump(void);
|
||||
int c_zdone(void);
|
||||
|
||||
/*
|
||||
* src/lib/common/ *.c
|
||||
|
|
|
@ -36,6 +36,6 @@
|
|||
extern int test_suite_prng_seed;
|
||||
|
||||
/* Commands for test suite use */
|
||||
int testing_cmd(void);
|
||||
int c___cmd(void);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -42,7 +42,7 @@ static void pr_accept(natid, natid);
|
|||
* viewpoint of another country
|
||||
*/
|
||||
int
|
||||
acce(void)
|
||||
c_accept(void)
|
||||
{
|
||||
struct natstr *natp;
|
||||
struct natstr *np;
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#include "commands.h"
|
||||
|
||||
int
|
||||
add(void)
|
||||
c_add(void)
|
||||
{
|
||||
struct natstr *natp;
|
||||
int i;
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
* format: anti <SECT>
|
||||
*/
|
||||
int
|
||||
anti(void)
|
||||
c_anti(void)
|
||||
{
|
||||
struct sctstr sect;
|
||||
int nsect;
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
#include "plane.h"
|
||||
|
||||
int
|
||||
arm(void)
|
||||
c_arm(void)
|
||||
{
|
||||
struct nchrstr *ncp;
|
||||
struct plchrstr *plc;
|
||||
|
@ -132,7 +132,7 @@ arm(void)
|
|||
}
|
||||
|
||||
int
|
||||
disarm(void)
|
||||
c_disarm(void)
|
||||
{
|
||||
struct plnstr pl;
|
||||
struct nukstr nuke;
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include "land.h"
|
||||
|
||||
int
|
||||
army(void)
|
||||
c_army(void)
|
||||
{
|
||||
struct lndstr land;
|
||||
int count;
|
||||
|
|
|
@ -45,7 +45,7 @@ static void sneak_ashore(struct combat[], struct emp_qelem *,
|
|||
struct combat *);
|
||||
|
||||
int
|
||||
assa(void)
|
||||
c_assault(void)
|
||||
{
|
||||
struct combat off[1]; /* assaulting ship */
|
||||
struct combat def[1]; /* defending sector */
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
#include "ship.h"
|
||||
|
||||
int
|
||||
atta(void)
|
||||
c_attack(void)
|
||||
{
|
||||
struct combat off[6]; /* attacking sectors */
|
||||
struct combat def[1]; /* defending sector */
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include "map.h"
|
||||
|
||||
int
|
||||
bdes(void)
|
||||
c_bdes(void)
|
||||
{
|
||||
char *p, d;
|
||||
struct nstr_sect nstr;
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#include "path.h"
|
||||
|
||||
int
|
||||
best(void)
|
||||
c_bestpath(void)
|
||||
{
|
||||
double cost;
|
||||
struct sctstr s1, s2;
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
#include "ship.h"
|
||||
|
||||
int
|
||||
boar(void)
|
||||
c_board(void)
|
||||
{
|
||||
struct combat off[1]; /* boarding ship or sector */
|
||||
struct combat def[1]; /* defending ship */
|
||||
|
|
|
@ -61,7 +61,7 @@ static int pinflak_planedamage(struct plnstr *, struct plchrstr *,
|
|||
natid, int);
|
||||
|
||||
int
|
||||
bomb(void)
|
||||
c_bomb(void)
|
||||
{
|
||||
char *p;
|
||||
coord tx, ty;
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#include "commands.h"
|
||||
|
||||
int
|
||||
brea(void)
|
||||
c_break(void)
|
||||
{
|
||||
struct natstr *natp;
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ static struct budget *calc_all(void);
|
|||
static char *dotsprintf(char *buf, char *format, int data);
|
||||
|
||||
int
|
||||
budg(void)
|
||||
c_budget(void)
|
||||
{
|
||||
static struct {
|
||||
char *activity;
|
||||
|
|
|
@ -65,7 +65,7 @@ static int build_can_afford(double, int, char *);
|
|||
* build <WHAT> <SECTS> <TYPE|DIR|MEG> [NUMBER]
|
||||
*/
|
||||
int
|
||||
buil(void)
|
||||
c_build(void)
|
||||
{
|
||||
struct natstr *natp = getnatp(player->cnum);
|
||||
int tlev = (int)natp->nat_level[NAT_TLEV];
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
*
|
||||
*/
|
||||
int
|
||||
buy(void)
|
||||
c_buy(void)
|
||||
{
|
||||
struct sctstr sect;
|
||||
struct natstr *natp;
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include "commands.h"
|
||||
|
||||
int
|
||||
capi(void)
|
||||
c_capital(void)
|
||||
{
|
||||
char buf[1024];
|
||||
char *p;
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include "ship.h"
|
||||
|
||||
int
|
||||
carg(void)
|
||||
c_cargo(void)
|
||||
{
|
||||
int nships;
|
||||
struct nstr_item ni;
|
||||
|
@ -86,7 +86,7 @@ carg(void)
|
|||
}
|
||||
|
||||
int
|
||||
lcarg(void)
|
||||
c_lcargo(void)
|
||||
{
|
||||
int nunits;
|
||||
struct nstr_item ni;
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
static void cens_hdr(void);
|
||||
|
||||
int
|
||||
cens(void)
|
||||
c_census(void)
|
||||
{
|
||||
struct sctstr sect;
|
||||
int nsect;
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include "optlist.h"
|
||||
|
||||
int
|
||||
chan(void)
|
||||
c_change(void)
|
||||
{
|
||||
char *p;
|
||||
int charge;
|
||||
|
|
|
@ -53,7 +53,7 @@ static int showship(struct coast **cpp, int x, int y);
|
|||
* format: coastwatch [<SECTS>]
|
||||
*/
|
||||
int
|
||||
coas(void)
|
||||
c_coastwatch(void)
|
||||
{
|
||||
struct sctstr sect;
|
||||
struct nstr_sect nstr;
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
static double appraise_sect(struct sctstr *);
|
||||
|
||||
int
|
||||
coll(void)
|
||||
c_collect(void)
|
||||
{
|
||||
int arg;
|
||||
time_t now;
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
static void prthresh(int val);
|
||||
|
||||
int
|
||||
comm(void)
|
||||
c_commodity(void)
|
||||
{
|
||||
struct sctstr sect;
|
||||
char dirstr[12];
|
||||
|
|
|
@ -64,7 +64,7 @@ static void late(struct ltcomstr *ltcp);
|
|||
static void prev_signed(struct ltcomstr *ltcp);
|
||||
|
||||
int
|
||||
cons(void)
|
||||
c_consider(void)
|
||||
{
|
||||
int rv;
|
||||
struct ltcomstr ltc;
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
#include "commands.h"
|
||||
|
||||
int
|
||||
conv(void)
|
||||
c_convert(void)
|
||||
{
|
||||
struct natstr *natp;
|
||||
struct sctstr sect;
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
static void coun_list(struct natstr *natp);
|
||||
|
||||
int
|
||||
coun(void)
|
||||
c_country(void)
|
||||
{
|
||||
struct nstr_item ni;
|
||||
struct natstr nat;
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#include "path.h"
|
||||
|
||||
int
|
||||
cuto(void)
|
||||
c_cutoff(void)
|
||||
{
|
||||
struct sctstr sect;
|
||||
int nsect;
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#include "optlist.h"
|
||||
|
||||
int
|
||||
decl(void)
|
||||
c_declare(void)
|
||||
{
|
||||
struct natstr nat;
|
||||
enum relations rel;
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include "path.h"
|
||||
|
||||
int
|
||||
deli(void)
|
||||
c_deliver(void)
|
||||
{
|
||||
struct sctstr sect;
|
||||
int dir, del;
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
*/
|
||||
|
||||
int
|
||||
demo(void)
|
||||
c_demobilize(void)
|
||||
{
|
||||
struct natstr *natp;
|
||||
int number;
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
#include "optlist.h"
|
||||
|
||||
int
|
||||
desi(void)
|
||||
c_designate(void)
|
||||
{
|
||||
int n;
|
||||
char *p;
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#include "game.h"
|
||||
|
||||
int
|
||||
disa(void)
|
||||
c_disable(void)
|
||||
{
|
||||
game_ctrl_update(0);
|
||||
pr("Updates are disabled\n");
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
* distribute <SECT> <DISTSECT|.|h>
|
||||
*/
|
||||
int
|
||||
dist(void)
|
||||
c_distribute(void)
|
||||
{
|
||||
struct sctstr sect, dsect, tsect;
|
||||
struct nstr_sect nstr;
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
#include "plane.h"
|
||||
|
||||
int
|
||||
drop(void)
|
||||
c_drop(void)
|
||||
{
|
||||
coord tx, ty;
|
||||
coord ax, ay;
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
#include "path.h"
|
||||
|
||||
int
|
||||
dump(void)
|
||||
c_dump(void)
|
||||
{
|
||||
struct sctstr sect;
|
||||
char dirstr[20];
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#include "commands.h"
|
||||
|
||||
int
|
||||
echo(void)
|
||||
c_echo(void)
|
||||
{
|
||||
pr("%s\n", player->argp[1] ? player->argp[1] : "");
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ static int edit_plane(struct plnstr *, char *, char *);
|
|||
static int edit_nuke(struct nukstr *, char *, char *);
|
||||
|
||||
int
|
||||
edit(void)
|
||||
c_edit(void)
|
||||
{
|
||||
union empobj_storage item;
|
||||
char *what;
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#include "game.h"
|
||||
|
||||
int
|
||||
enab(void)
|
||||
c_enable(void)
|
||||
{
|
||||
game_ctrl_update(1);
|
||||
pr("Updates are enabled\n");
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#include "commands.h"
|
||||
|
||||
int
|
||||
enli(void)
|
||||
c_enlist(void)
|
||||
{
|
||||
struct nstr_sect nstr;
|
||||
struct sctstr sect;
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
static int explore_map(coord, coord, char *, char *);
|
||||
|
||||
int
|
||||
explore(void)
|
||||
c_explore(void)
|
||||
{
|
||||
int amount;
|
||||
struct sctstr sect;
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
* format: fina
|
||||
*/
|
||||
int
|
||||
fina(void)
|
||||
c_financial(void)
|
||||
{
|
||||
struct lonstr loan;
|
||||
struct nstr_item ni;
|
||||
|
|
|
@ -41,7 +41,7 @@ static int chat(struct natstr *, char *);
|
|||
static int sendmessage(struct natstr *, char *, int);
|
||||
|
||||
int
|
||||
flash(void)
|
||||
c_flash(void)
|
||||
{
|
||||
struct natstr *us;
|
||||
struct natstr *to;
|
||||
|
@ -73,7 +73,7 @@ flash(void)
|
|||
}
|
||||
|
||||
int
|
||||
wall(void)
|
||||
c_wall(void)
|
||||
{
|
||||
return chat(NULL, player->comtail[1]);
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include "ship.h"
|
||||
|
||||
int
|
||||
flee(void)
|
||||
c_fleetadd(void)
|
||||
{
|
||||
struct shpstr ship;
|
||||
int count;
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
#include "plane.h"
|
||||
|
||||
int
|
||||
fly(void)
|
||||
c_fly(void)
|
||||
{
|
||||
coord tx, ty;
|
||||
coord ax, ay;
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
#include "server.h"
|
||||
|
||||
int
|
||||
force(void)
|
||||
c_force(void)
|
||||
{
|
||||
if (shutdown_pending) {
|
||||
pr("Shutdown is pending\n");
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include "optlist.h"
|
||||
|
||||
int
|
||||
fort(void)
|
||||
c_fortify(void)
|
||||
{
|
||||
int nunits;
|
||||
struct nstr_item ni;
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
* format: give <commod> <sect> <amt>
|
||||
*/
|
||||
int
|
||||
give(void)
|
||||
c_give(void)
|
||||
{
|
||||
struct sctstr sect;
|
||||
int amt;
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#include "product.h"
|
||||
|
||||
int
|
||||
grin(void)
|
||||
c_grind(void)
|
||||
{
|
||||
struct nstr_sect nstr;
|
||||
struct sctstr sect;
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
* harden <PLANE> <LEVEL>
|
||||
*/
|
||||
int
|
||||
hard(void)
|
||||
c_harden(void)
|
||||
{
|
||||
struct plchrstr *pcp;
|
||||
struct plnstr pln;
|
||||
|
|
|
@ -48,7 +48,7 @@ static int head_findscoop(struct histstr (*hist)[MAXNOC],
|
|||
natid maxcnum, natid *ano, natid *vno);
|
||||
|
||||
int
|
||||
head(void)
|
||||
c_headlines(void)
|
||||
{
|
||||
struct histstr *hp;
|
||||
natid maxcnum;
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include "commands.h"
|
||||
|
||||
int
|
||||
improve(void)
|
||||
c_improve(void)
|
||||
{
|
||||
struct sctintrins *incp;
|
||||
struct sctstr sect;
|
||||
|
|
|
@ -63,7 +63,7 @@ lowerit(char *buf, int n, char *orig)
|
|||
#if !defined(_WIN32)
|
||||
|
||||
int
|
||||
info(void)
|
||||
c_info(void)
|
||||
{
|
||||
char buf[255];
|
||||
FILE *fp;
|
||||
|
@ -159,7 +159,7 @@ info(void)
|
|||
}
|
||||
|
||||
int
|
||||
apro(void)
|
||||
c_apropos(void)
|
||||
{
|
||||
FILE *fp;
|
||||
char *name, *lbp;
|
||||
|
@ -271,7 +271,7 @@ apro(void)
|
|||
#else /* _WIN32 */
|
||||
|
||||
int
|
||||
info(void)
|
||||
c_info(void)
|
||||
{
|
||||
char buf[255];
|
||||
FILE *fp;
|
||||
|
@ -384,7 +384,7 @@ info(void)
|
|||
}
|
||||
|
||||
int
|
||||
apro(void)
|
||||
c_apropos(void)
|
||||
{
|
||||
HANDLE hDir;
|
||||
WIN32_FIND_DATA fData;
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include "land.h"
|
||||
|
||||
int
|
||||
land(void)
|
||||
c_land(void)
|
||||
{
|
||||
int nunits, noff;
|
||||
struct nstr_item ni;
|
||||
|
|
|
@ -56,7 +56,7 @@ static int msl_equip(struct plnstr *, char);
|
|||
* laun <PLANES>
|
||||
*/
|
||||
int
|
||||
laun(void)
|
||||
c_launch(void)
|
||||
{
|
||||
struct nstr_item nstr;
|
||||
struct plnstr plane;
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
#include "ship.h"
|
||||
|
||||
int
|
||||
lboa(void)
|
||||
c_lboard(void)
|
||||
{
|
||||
struct combat off[1]; /* boarding sector */
|
||||
struct combat def[1]; /* defending land unit */
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include "land.h"
|
||||
|
||||
int
|
||||
ldump(void)
|
||||
c_ldump(void)
|
||||
{
|
||||
int nunits;
|
||||
int field[128];
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include "optlist.h"
|
||||
|
||||
int
|
||||
ledg(void)
|
||||
c_ledger(void)
|
||||
{
|
||||
struct nstr_item nstr;
|
||||
struct lonstr loan;
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#include "commands.h"
|
||||
|
||||
int
|
||||
leve(void)
|
||||
c_level(void)
|
||||
{
|
||||
struct sctstr sect;
|
||||
int nsect;
|
||||
|
|
|
@ -61,7 +61,7 @@ static int load_comm_land(struct sctstr *sectp, struct lndstr *lp,
|
|||
int *nunitsp);
|
||||
|
||||
int
|
||||
load(void)
|
||||
c_load(void)
|
||||
{
|
||||
int loading = **player->argp == 'l';
|
||||
int noisy;
|
||||
|
@ -190,7 +190,7 @@ load(void)
|
|||
}
|
||||
|
||||
int
|
||||
lload(void)
|
||||
c_lload(void)
|
||||
{
|
||||
int loading = player->argp[0][1] == 'l';
|
||||
int noisy;
|
||||
|
|
|
@ -44,13 +44,13 @@ static void look_ship(struct shpstr *lookship);
|
|||
static void look_land(struct lndstr *lookland);
|
||||
|
||||
int
|
||||
look(void)
|
||||
c_lookout(void)
|
||||
{
|
||||
return do_look(EF_SHIP);
|
||||
}
|
||||
|
||||
int
|
||||
llook(void)
|
||||
c_llookout(void)
|
||||
{
|
||||
return do_look(EF_LAND);
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#include "lost.h"
|
||||
|
||||
int
|
||||
lost(void)
|
||||
c_lost(void)
|
||||
{
|
||||
int nlost;
|
||||
struct nstr_item ni;
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#include "land.h"
|
||||
|
||||
int
|
||||
lsta(void)
|
||||
c_lstat(void)
|
||||
{
|
||||
int nunits;
|
||||
struct nstr_item ni;
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
static void expose_land(struct shpstr *s1, struct lndstr *l1);
|
||||
|
||||
int
|
||||
ltend(void)
|
||||
c_ltend(void)
|
||||
{
|
||||
struct nstr_item targets;
|
||||
struct nstr_item tenders;
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
#include "map.h"
|
||||
|
||||
int
|
||||
map(void)
|
||||
c_map(void)
|
||||
{
|
||||
int unit_type = EF_BAD;
|
||||
int bmap = 0;
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
#include "unit.h"
|
||||
|
||||
int
|
||||
march(void)
|
||||
c_march(void)
|
||||
{
|
||||
struct nstr_item ni_land;
|
||||
struct emp_qelem land_list;
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
#include "optlist.h"
|
||||
|
||||
int
|
||||
mark(void)
|
||||
c_market(void)
|
||||
{
|
||||
char buf[1024];
|
||||
char *p;
|
||||
|
|
|
@ -66,7 +66,7 @@ static void free_flist(struct emp_qelem *);
|
|||
static struct flist *search_flist(struct emp_qelem *, struct empobj *);
|
||||
|
||||
int
|
||||
multifire(void)
|
||||
c_fire(void)
|
||||
{
|
||||
static int ef_with_guns[] = { EF_SECTOR, EF_SHIP, EF_LAND, EF_BAD };
|
||||
char *ptr;
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
* format: mine <SHIPS> <NUMBER MINES>
|
||||
*/
|
||||
int
|
||||
mine(void)
|
||||
c_mine(void)
|
||||
{
|
||||
struct shpstr ship;
|
||||
struct sctstr sect;
|
||||
|
@ -88,7 +88,7 @@ mine(void)
|
|||
* format: landmine <UNITS> <NUMBER MINES>
|
||||
*/
|
||||
int
|
||||
landmine(void)
|
||||
c_lmine(void)
|
||||
{
|
||||
struct lndstr land;
|
||||
struct sctstr sect;
|
||||
|
|
|
@ -45,7 +45,7 @@ static int show_mission(struct nstr_item *);
|
|||
* mission <type> <planes/ships/units> <mission type> <op sector> [<radius>]
|
||||
*/
|
||||
int
|
||||
mission(void)
|
||||
c_mission(void)
|
||||
{
|
||||
static int ef_with_missions[] = { EF_SHIP, EF_LAND, EF_PLANE, EF_BAD };
|
||||
char *p;
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include "optlist.h"
|
||||
|
||||
int
|
||||
morale(void)
|
||||
c_morale(void)
|
||||
{
|
||||
struct nstr_item np;
|
||||
struct lndstr land;
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
static int cmd_move_map(coord, coord, char *, char *);
|
||||
|
||||
int
|
||||
move(void)
|
||||
c_move(void)
|
||||
{
|
||||
int amount;
|
||||
struct sctstr sect;
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
* name <SHIP> <NAME>
|
||||
*/
|
||||
int
|
||||
name(void)
|
||||
c_name(void)
|
||||
{
|
||||
struct shpstr ship;
|
||||
char *p;
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#include "optlist.h"
|
||||
|
||||
int
|
||||
nati(void)
|
||||
c_nation(void)
|
||||
{
|
||||
struct natstr *natp;
|
||||
struct sctstr sect;
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
#include "unit.h"
|
||||
|
||||
int
|
||||
navi(void)
|
||||
c_navigate(void)
|
||||
{
|
||||
struct nstr_item ni_ship;
|
||||
struct emp_qelem ship_list;
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include "nuke.h"
|
||||
|
||||
int
|
||||
ndump(void)
|
||||
c_ndump(void)
|
||||
{
|
||||
struct nstr_item nstr;
|
||||
struct nukstr nuk;
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
static void init_sanct(struct natstr *, coord, coord);
|
||||
|
||||
int
|
||||
new(void)
|
||||
c_newcap(void)
|
||||
{
|
||||
static struct range defrealm = { -8, -5, 10, 5, 0, 0 };
|
||||
struct sctstr sect;
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
#include "update.h"
|
||||
|
||||
int
|
||||
newe(void)
|
||||
c_neweff(void)
|
||||
{
|
||||
struct natstr *natp;
|
||||
struct sctstr sect;
|
||||
|
|
|
@ -46,7 +46,7 @@ struct sectwon {
|
|||
};
|
||||
|
||||
int
|
||||
news(void)
|
||||
c_newspaper(void)
|
||||
{
|
||||
struct natstr *natp;
|
||||
time_t now;
|
||||
|
@ -83,7 +83,7 @@ news(void)
|
|||
then = now - delta;
|
||||
}
|
||||
natp->nat_newstim = now;
|
||||
head();
|
||||
c_headlines();
|
||||
pr("\nThe details of Empire news since %s", ctime(&then));
|
||||
|
||||
heading = 0;
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
#include "plane.h"
|
||||
|
||||
int
|
||||
nuke(void)
|
||||
c_nuke(void)
|
||||
{
|
||||
int nnukes, noff;
|
||||
struct nstr_item nstr;
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
static int do_loan(void);
|
||||
|
||||
int
|
||||
offe(void)
|
||||
c_offer(void)
|
||||
{
|
||||
char *cp;
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include "commands.h"
|
||||
|
||||
int
|
||||
orig(void)
|
||||
c_origin(void)
|
||||
{
|
||||
char *p;
|
||||
coord x, y;
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
static int paradrop(struct emp_qelem *list, coord x, coord y);
|
||||
|
||||
int
|
||||
para(void)
|
||||
c_paradrop(void)
|
||||
{
|
||||
coord tx, ty;
|
||||
coord ax, ay;
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
#include "path.h"
|
||||
|
||||
int
|
||||
path(void)
|
||||
c_path(void)
|
||||
{
|
||||
|
||||
struct nstr_sect ns;
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include "ship.h"
|
||||
|
||||
int
|
||||
payo(void)
|
||||
c_payoff(void)
|
||||
{
|
||||
struct sctstr sect;
|
||||
int nships;
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#include "plane.h"
|
||||
|
||||
int
|
||||
pboa(void)
|
||||
c_pboard(void)
|
||||
{
|
||||
struct sctstr sect;
|
||||
struct nstr_item np;
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
#include "plane.h"
|
||||
|
||||
int
|
||||
pdump(void)
|
||||
c_pdump(void)
|
||||
{
|
||||
int nplanes;
|
||||
struct nstr_item np;
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include "commands.h"
|
||||
|
||||
int
|
||||
peek(void)
|
||||
c_peek(void)
|
||||
{
|
||||
struct sctstr sect;
|
||||
int nsect;
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
#include "plane.h"
|
||||
|
||||
int
|
||||
plan(void)
|
||||
c_plane(void)
|
||||
{
|
||||
int nplanes, noff;
|
||||
struct nstr_item np;
|
||||
|
|
|
@ -41,7 +41,7 @@ static void play_header(void);
|
|||
static int play_list(struct player *joe);
|
||||
|
||||
int
|
||||
play(void)
|
||||
c_players(void)
|
||||
{
|
||||
struct player *joe;
|
||||
int saw = 0;
|
||||
|
|
|
@ -59,7 +59,7 @@ static float power_tech_factor(float);
|
|||
static float item_power(short[]);
|
||||
|
||||
int
|
||||
powe(void)
|
||||
c_power(void)
|
||||
{
|
||||
struct natstr *natp;
|
||||
int i;
|
||||
|
|
|
@ -77,7 +77,7 @@ count_pop(void)
|
|||
}
|
||||
|
||||
int
|
||||
prod(void)
|
||||
c_production(void)
|
||||
{
|
||||
struct natstr *natp;
|
||||
struct sctstr sect, scratch_sect;
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#include "plane.h"
|
||||
|
||||
int
|
||||
pstat(void)
|
||||
c_pstat(void)
|
||||
{
|
||||
int nplanes;
|
||||
struct nstr_item np;
|
||||
|
|
|
@ -36,13 +36,13 @@
|
|||
#include "unit.h"
|
||||
|
||||
int
|
||||
rada(void)
|
||||
c_radar(void)
|
||||
{
|
||||
return radar(EF_SHIP);
|
||||
}
|
||||
|
||||
int
|
||||
lrad(void)
|
||||
c_lradar(void)
|
||||
{
|
||||
return radar(EF_LAND);
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#include "plane.h"
|
||||
|
||||
int
|
||||
range(void)
|
||||
c_range(void)
|
||||
{
|
||||
struct nstr_item np;
|
||||
struct plnstr plane;
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
static int print_sink(char *, size_t, void *);
|
||||
|
||||
int
|
||||
rea(void)
|
||||
c_read(void)
|
||||
{
|
||||
static char *telnames[] = {
|
||||
/* must follow TEL_ defines in tel.h */
|
||||
|
|
|
@ -47,7 +47,7 @@ list_realm(int curr, struct natstr *natp)
|
|||
}
|
||||
|
||||
int
|
||||
real(void)
|
||||
c_realm(void)
|
||||
{
|
||||
struct realmstr realm;
|
||||
struct natstr *natp;
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
#include "plane.h"
|
||||
|
||||
int
|
||||
reco(void)
|
||||
c_recon(void)
|
||||
{
|
||||
int mission_flags = player->argp[0][0] == 's' ? PM_R | PM_S : PM_R;
|
||||
coord tx, ty;
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#include "commands.h"
|
||||
|
||||
int
|
||||
reje(void)
|
||||
c_reject(void)
|
||||
{
|
||||
static char *what[] = { "teles", "annos", "loans" };
|
||||
char *p;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue