From: Markus Armbruster Date: Mon, 18 Jan 2021 05:00:04 +0000 (+0100) Subject: commands: Rename the command functions X-Git-Url: http://git.pond.sub.org/?p=empserver;a=commitdiff_plain;h=7e6318500758d8ba99dca7dd9b95e3a8218699cb 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 --- diff --git a/configure.ac b/configure.ac index ea2e22ef5..240343238 100644 --- a/configure.ac +++ b/configure.ac @@ -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]) diff --git a/include/prototypes.h b/include/prototypes.h index 29eb013d4..b4d674820 100644 --- a/include/prototypes.h +++ b/include/prototypes.h @@ -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 diff --git a/include/testing.h b/include/testing.h index 4ed2d1f5f..198daf37b 100644 --- a/include/testing.h +++ b/include/testing.h @@ -36,6 +36,6 @@ extern int test_suite_prng_seed; /* Commands for test suite use */ -int testing_cmd(void); +int c___cmd(void); #endif diff --git a/src/lib/commands/acce.c b/src/lib/commands/acce.c index ce781f039..3453faf62 100644 --- a/src/lib/commands/acce.c +++ b/src/lib/commands/acce.c @@ -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; diff --git a/src/lib/commands/add.c b/src/lib/commands/add.c index 2bdefd2f4..754986f9f 100644 --- a/src/lib/commands/add.c +++ b/src/lib/commands/add.c @@ -36,7 +36,7 @@ #include "commands.h" int -add(void) +c_add(void) { struct natstr *natp; int i; diff --git a/src/lib/commands/anti.c b/src/lib/commands/anti.c index 5e95518af..ffb19678c 100644 --- a/src/lib/commands/anti.c +++ b/src/lib/commands/anti.c @@ -43,7 +43,7 @@ * format: anti */ int -anti(void) +c_anti(void) { struct sctstr sect; int nsect; diff --git a/src/lib/commands/arm.c b/src/lib/commands/arm.c index 74ea9485e..9c7b220b9 100644 --- a/src/lib/commands/arm.c +++ b/src/lib/commands/arm.c @@ -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; diff --git a/src/lib/commands/army.c b/src/lib/commands/army.c index fc72c2c91..49dffd515 100644 --- a/src/lib/commands/army.c +++ b/src/lib/commands/army.c @@ -37,7 +37,7 @@ #include "land.h" int -army(void) +c_army(void) { struct lndstr land; int count; diff --git a/src/lib/commands/assa.c b/src/lib/commands/assa.c index 4f0395554..2812e0e9c 100644 --- a/src/lib/commands/assa.c +++ b/src/lib/commands/assa.c @@ -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 */ diff --git a/src/lib/commands/atta.c b/src/lib/commands/atta.c index efe3fb39b..cd2c84a2a 100644 --- a/src/lib/commands/atta.c +++ b/src/lib/commands/atta.c @@ -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 */ diff --git a/src/lib/commands/bdes.c b/src/lib/commands/bdes.c index 3122d5fbe..55de90561 100644 --- a/src/lib/commands/bdes.c +++ b/src/lib/commands/bdes.c @@ -37,7 +37,7 @@ #include "map.h" int -bdes(void) +c_bdes(void) { char *p, d; struct nstr_sect nstr; diff --git a/src/lib/commands/best.c b/src/lib/commands/best.c index ab2fe9793..38fb91786 100644 --- a/src/lib/commands/best.c +++ b/src/lib/commands/best.c @@ -36,7 +36,7 @@ #include "path.h" int -best(void) +c_bestpath(void) { double cost; struct sctstr s1, s2; diff --git a/src/lib/commands/boar.c b/src/lib/commands/boar.c index 7652ad114..676f62560 100644 --- a/src/lib/commands/boar.c +++ b/src/lib/commands/boar.c @@ -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 */ diff --git a/src/lib/commands/bomb.c b/src/lib/commands/bomb.c index ba19b392f..ad0ecf24c 100644 --- a/src/lib/commands/bomb.c +++ b/src/lib/commands/bomb.c @@ -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; diff --git a/src/lib/commands/brea.c b/src/lib/commands/brea.c index 9693f74f2..0dea808f9 100644 --- a/src/lib/commands/brea.c +++ b/src/lib/commands/brea.c @@ -35,7 +35,7 @@ #include "commands.h" int -brea(void) +c_break(void) { struct natstr *natp; diff --git a/src/lib/commands/budg.c b/src/lib/commands/budg.c index 2b2af028b..5c26a45fc 100644 --- a/src/lib/commands/budg.c +++ b/src/lib/commands/budg.c @@ -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; diff --git a/src/lib/commands/buil.c b/src/lib/commands/buil.c index 58651046f..02888f936 100644 --- a/src/lib/commands/buil.c +++ b/src/lib/commands/buil.c @@ -65,7 +65,7 @@ static int build_can_afford(double, int, char *); * build [NUMBER] */ int -buil(void) +c_build(void) { struct natstr *natp = getnatp(player->cnum); int tlev = (int)natp->nat_level[NAT_TLEV]; diff --git a/src/lib/commands/buy.c b/src/lib/commands/buy.c index 2ba7f3e53..d3088ff4b 100644 --- a/src/lib/commands/buy.c +++ b/src/lib/commands/buy.c @@ -48,7 +48,7 @@ * */ int -buy(void) +c_buy(void) { struct sctstr sect; struct natstr *natp; diff --git a/src/lib/commands/capi.c b/src/lib/commands/capi.c index 3aa5650fc..37288250f 100644 --- a/src/lib/commands/capi.c +++ b/src/lib/commands/capi.c @@ -37,7 +37,7 @@ #include "commands.h" int -capi(void) +c_capital(void) { char buf[1024]; char *p; diff --git a/src/lib/commands/carg.c b/src/lib/commands/carg.c index a615121ef..dcad074b3 100644 --- a/src/lib/commands/carg.c +++ b/src/lib/commands/carg.c @@ -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; diff --git a/src/lib/commands/cens.c b/src/lib/commands/cens.c index 145ad46b9..29cff4da4 100644 --- a/src/lib/commands/cens.c +++ b/src/lib/commands/cens.c @@ -39,7 +39,7 @@ static void cens_hdr(void); int -cens(void) +c_census(void) { struct sctstr sect; int nsect; diff --git a/src/lib/commands/chan.c b/src/lib/commands/chan.c index e5948a422..f481fffc3 100644 --- a/src/lib/commands/chan.c +++ b/src/lib/commands/chan.c @@ -37,7 +37,7 @@ #include "optlist.h" int -chan(void) +c_change(void) { char *p; int charge; diff --git a/src/lib/commands/coas.c b/src/lib/commands/coas.c index d4e7ee56f..bd35946d5 100644 --- a/src/lib/commands/coas.c +++ b/src/lib/commands/coas.c @@ -53,7 +53,7 @@ static int showship(struct coast **cpp, int x, int y); * format: coastwatch [] */ int -coas(void) +c_coastwatch(void) { struct sctstr sect; struct nstr_sect nstr; diff --git a/src/lib/commands/coll.c b/src/lib/commands/coll.c index bbe99ce2c..bf695ee02 100644 --- a/src/lib/commands/coll.c +++ b/src/lib/commands/coll.c @@ -43,7 +43,7 @@ static double appraise_sect(struct sctstr *); int -coll(void) +c_collect(void) { int arg; time_t now; diff --git a/src/lib/commands/comm.c b/src/lib/commands/comm.c index bfa2df148..4a70ef91d 100644 --- a/src/lib/commands/comm.c +++ b/src/lib/commands/comm.c @@ -38,7 +38,7 @@ static void prthresh(int val); int -comm(void) +c_commodity(void) { struct sctstr sect; char dirstr[12]; diff --git a/src/lib/commands/cons.c b/src/lib/commands/cons.c index 186fe454d..a2d56dbf1 100644 --- a/src/lib/commands/cons.c +++ b/src/lib/commands/cons.c @@ -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; diff --git a/src/lib/commands/conv.c b/src/lib/commands/conv.c index d3d023edc..70977511a 100644 --- a/src/lib/commands/conv.c +++ b/src/lib/commands/conv.c @@ -41,7 +41,7 @@ #include "commands.h" int -conv(void) +c_convert(void) { struct natstr *natp; struct sctstr sect; diff --git a/src/lib/commands/coun.c b/src/lib/commands/coun.c index 97f29f24c..fb5724959 100644 --- a/src/lib/commands/coun.c +++ b/src/lib/commands/coun.c @@ -38,7 +38,7 @@ static void coun_list(struct natstr *natp); int -coun(void) +c_country(void) { struct nstr_item ni; struct natstr nat; diff --git a/src/lib/commands/cuto.c b/src/lib/commands/cuto.c index ed4b7a331..17be7d87f 100644 --- a/src/lib/commands/cuto.c +++ b/src/lib/commands/cuto.c @@ -36,7 +36,7 @@ #include "path.h" int -cuto(void) +c_cutoff(void) { struct sctstr sect; int nsect; diff --git a/src/lib/commands/decl.c b/src/lib/commands/decl.c index 84cce1a22..f961323d0 100644 --- a/src/lib/commands/decl.c +++ b/src/lib/commands/decl.c @@ -36,7 +36,7 @@ #include "optlist.h" int -decl(void) +c_declare(void) { struct natstr nat; enum relations rel; diff --git a/src/lib/commands/deli.c b/src/lib/commands/deli.c index 73088c12d..66632ef38 100644 --- a/src/lib/commands/deli.c +++ b/src/lib/commands/deli.c @@ -37,7 +37,7 @@ #include "path.h" int -deli(void) +c_deliver(void) { struct sctstr sect; int dir, del; diff --git a/src/lib/commands/demo.c b/src/lib/commands/demo.c index 1db1b4609..ff564394d 100644 --- a/src/lib/commands/demo.c +++ b/src/lib/commands/demo.c @@ -40,7 +40,7 @@ */ int -demo(void) +c_demobilize(void) { struct natstr *natp; int number; diff --git a/src/lib/commands/desi.c b/src/lib/commands/desi.c index a963f8295..3e539eae1 100644 --- a/src/lib/commands/desi.c +++ b/src/lib/commands/desi.c @@ -38,7 +38,7 @@ #include "optlist.h" int -desi(void) +c_designate(void) { int n; char *p; diff --git a/src/lib/commands/disa.c b/src/lib/commands/disa.c index 4de9a6158..b6fe2b3d4 100644 --- a/src/lib/commands/disa.c +++ b/src/lib/commands/disa.c @@ -36,7 +36,7 @@ #include "game.h" int -disa(void) +c_disable(void) { game_ctrl_update(0); pr("Updates are disabled\n"); diff --git a/src/lib/commands/dist.c b/src/lib/commands/dist.c index 48d6e81da..799aac083 100644 --- a/src/lib/commands/dist.c +++ b/src/lib/commands/dist.c @@ -42,7 +42,7 @@ * distribute */ int -dist(void) +c_distribute(void) { struct sctstr sect, dsect, tsect; struct nstr_sect nstr; diff --git a/src/lib/commands/drop.c b/src/lib/commands/drop.c index 6e7eb4cbb..2c6261fe5 100644 --- a/src/lib/commands/drop.c +++ b/src/lib/commands/drop.c @@ -39,7 +39,7 @@ #include "plane.h" int -drop(void) +c_drop(void) { coord tx, ty; coord ax, ay; diff --git a/src/lib/commands/dump.c b/src/lib/commands/dump.c index 8cc132a3f..9a88f6c84 100644 --- a/src/lib/commands/dump.c +++ b/src/lib/commands/dump.c @@ -38,7 +38,7 @@ #include "path.h" int -dump(void) +c_dump(void) { struct sctstr sect; char dirstr[20]; diff --git a/src/lib/commands/echo.c b/src/lib/commands/echo.c index 2478daa1a..45609a848 100644 --- a/src/lib/commands/echo.c +++ b/src/lib/commands/echo.c @@ -35,7 +35,7 @@ #include "commands.h" int -echo(void) +c_echo(void) { pr("%s\n", player->argp[1] ? player->argp[1] : ""); diff --git a/src/lib/commands/edit.c b/src/lib/commands/edit.c index cdbc92509..80683694a 100644 --- a/src/lib/commands/edit.c +++ b/src/lib/commands/edit.c @@ -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; diff --git a/src/lib/commands/enab.c b/src/lib/commands/enab.c index 509751840..c340c9fc6 100644 --- a/src/lib/commands/enab.c +++ b/src/lib/commands/enab.c @@ -36,7 +36,7 @@ #include "game.h" int -enab(void) +c_enable(void) { game_ctrl_update(1); pr("Updates are enabled\n"); diff --git a/src/lib/commands/enli.c b/src/lib/commands/enli.c index 47f3a49b1..af710c5c6 100644 --- a/src/lib/commands/enli.c +++ b/src/lib/commands/enli.c @@ -36,7 +36,7 @@ #include "commands.h" int -enli(void) +c_enlist(void) { struct nstr_sect nstr; struct sctstr sect; diff --git a/src/lib/commands/expl.c b/src/lib/commands/expl.c index cc10cf746..63a67ff7d 100644 --- a/src/lib/commands/expl.c +++ b/src/lib/commands/expl.c @@ -42,7 +42,7 @@ static int explore_map(coord, coord, char *, char *); int -explore(void) +c_explore(void) { int amount; struct sctstr sect; diff --git a/src/lib/commands/fina.c b/src/lib/commands/fina.c index 9bafdd3d4..6645479a1 100644 --- a/src/lib/commands/fina.c +++ b/src/lib/commands/fina.c @@ -42,7 +42,7 @@ * format: fina */ int -fina(void) +c_financial(void) { struct lonstr loan; struct nstr_item ni; diff --git a/src/lib/commands/flash.c b/src/lib/commands/flash.c index 0119684b6..4f95cde1b 100644 --- a/src/lib/commands/flash.c +++ b/src/lib/commands/flash.c @@ -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]); } diff --git a/src/lib/commands/flee.c b/src/lib/commands/flee.c index 76351b4c0..c399b4af7 100644 --- a/src/lib/commands/flee.c +++ b/src/lib/commands/flee.c @@ -37,7 +37,7 @@ #include "ship.h" int -flee(void) +c_fleetadd(void) { struct shpstr ship; int count; diff --git a/src/lib/commands/fly.c b/src/lib/commands/fly.c index 2aab73384..4df04bb2f 100644 --- a/src/lib/commands/fly.c +++ b/src/lib/commands/fly.c @@ -41,7 +41,7 @@ #include "plane.h" int -fly(void) +c_fly(void) { coord tx, ty; coord ax, ay; diff --git a/src/lib/commands/forc.c b/src/lib/commands/forc.c index 2e9e0c2a8..021c0ca0a 100644 --- a/src/lib/commands/forc.c +++ b/src/lib/commands/forc.c @@ -38,7 +38,7 @@ #include "server.h" int -force(void) +c_force(void) { if (shutdown_pending) { pr("Shutdown is pending\n"); diff --git a/src/lib/commands/fort.c b/src/lib/commands/fort.c index 112b8d0eb..2d218ca7d 100644 --- a/src/lib/commands/fort.c +++ b/src/lib/commands/fort.c @@ -37,7 +37,7 @@ #include "optlist.h" int -fort(void) +c_fortify(void) { int nunits; struct nstr_item ni; diff --git a/src/lib/commands/give.c b/src/lib/commands/give.c index bd74b12a1..c05a7d5b5 100644 --- a/src/lib/commands/give.c +++ b/src/lib/commands/give.c @@ -42,7 +42,7 @@ * format: give */ int -give(void) +c_give(void) { struct sctstr sect; int amt; diff --git a/src/lib/commands/grin.c b/src/lib/commands/grin.c index e4c281fcd..16f55db65 100644 --- a/src/lib/commands/grin.c +++ b/src/lib/commands/grin.c @@ -36,7 +36,7 @@ #include "product.h" int -grin(void) +c_grind(void) { struct nstr_sect nstr; struct sctstr sect; diff --git a/src/lib/commands/hard.c b/src/lib/commands/hard.c index 649f4466c..de2730627 100644 --- a/src/lib/commands/hard.c +++ b/src/lib/commands/hard.c @@ -40,7 +40,7 @@ * harden */ int -hard(void) +c_harden(void) { struct plchrstr *pcp; struct plnstr pln; diff --git a/src/lib/commands/head.c b/src/lib/commands/head.c index 00ce25cce..c1f48fe13 100644 --- a/src/lib/commands/head.c +++ b/src/lib/commands/head.c @@ -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; diff --git a/src/lib/commands/improve.c b/src/lib/commands/improve.c index 72f0ba809..fa135c7b9 100644 --- a/src/lib/commands/improve.c +++ b/src/lib/commands/improve.c @@ -37,7 +37,7 @@ #include "commands.h" int -improve(void) +c_improve(void) { struct sctintrins *incp; struct sctstr sect; diff --git a/src/lib/commands/info.c b/src/lib/commands/info.c index 962ec3d02..dd7069b5b 100644 --- a/src/lib/commands/info.c +++ b/src/lib/commands/info.c @@ -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; diff --git a/src/lib/commands/land.c b/src/lib/commands/land.c index c7ecbcc59..4c2984075 100644 --- a/src/lib/commands/land.c +++ b/src/lib/commands/land.c @@ -37,7 +37,7 @@ #include "land.h" int -land(void) +c_land(void) { int nunits, noff; struct nstr_item ni; diff --git a/src/lib/commands/laun.c b/src/lib/commands/laun.c index 7a78c4e5c..9e1466b5c 100644 --- a/src/lib/commands/laun.c +++ b/src/lib/commands/laun.c @@ -56,7 +56,7 @@ static int msl_equip(struct plnstr *, char); * laun */ int -laun(void) +c_launch(void) { struct nstr_item nstr; struct plnstr plane; diff --git a/src/lib/commands/lboard.c b/src/lib/commands/lboard.c index 91972d634..b12123f32 100644 --- a/src/lib/commands/lboard.c +++ b/src/lib/commands/lboard.c @@ -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 */ diff --git a/src/lib/commands/ldump.c b/src/lib/commands/ldump.c index 6109cd0e7..1186244b1 100644 --- a/src/lib/commands/ldump.c +++ b/src/lib/commands/ldump.c @@ -37,7 +37,7 @@ #include "land.h" int -ldump(void) +c_ldump(void) { int nunits; int field[128]; diff --git a/src/lib/commands/ledg.c b/src/lib/commands/ledg.c index edd307ebc..1e154c903 100644 --- a/src/lib/commands/ledg.c +++ b/src/lib/commands/ledg.c @@ -37,7 +37,7 @@ #include "optlist.h" int -ledg(void) +c_ledger(void) { struct nstr_item nstr; struct lonstr loan; diff --git a/src/lib/commands/leve.c b/src/lib/commands/leve.c index 1a1a189c5..ee73bf448 100644 --- a/src/lib/commands/leve.c +++ b/src/lib/commands/leve.c @@ -35,7 +35,7 @@ #include "commands.h" int -leve(void) +c_level(void) { struct sctstr sect; int nsect; diff --git a/src/lib/commands/load.c b/src/lib/commands/load.c index 0cae81bc7..b3e9b60c1 100644 --- a/src/lib/commands/load.c +++ b/src/lib/commands/load.c @@ -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; diff --git a/src/lib/commands/look.c b/src/lib/commands/look.c index 5984b4c4b..9f4ae5f95 100644 --- a/src/lib/commands/look.c +++ b/src/lib/commands/look.c @@ -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); } diff --git a/src/lib/commands/lost.c b/src/lib/commands/lost.c index 2151c508b..08ba874ee 100644 --- a/src/lib/commands/lost.c +++ b/src/lib/commands/lost.c @@ -36,7 +36,7 @@ #include "lost.h" int -lost(void) +c_lost(void) { int nlost; struct nstr_item ni; diff --git a/src/lib/commands/lstat.c b/src/lib/commands/lstat.c index f30438085..794f75346 100644 --- a/src/lib/commands/lstat.c +++ b/src/lib/commands/lstat.c @@ -36,7 +36,7 @@ #include "land.h" int -lsta(void) +c_lstat(void) { int nunits; struct nstr_item ni; diff --git a/src/lib/commands/lten.c b/src/lib/commands/lten.c index 3bb98cab3..d0603d6e8 100644 --- a/src/lib/commands/lten.c +++ b/src/lib/commands/lten.c @@ -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; diff --git a/src/lib/commands/map.c b/src/lib/commands/map.c index 7eff8d743..7d812792a 100644 --- a/src/lib/commands/map.c +++ b/src/lib/commands/map.c @@ -39,7 +39,7 @@ #include "map.h" int -map(void) +c_map(void) { int unit_type = EF_BAD; int bmap = 0; diff --git a/src/lib/commands/marc.c b/src/lib/commands/marc.c index af2491079..6bd6c1f34 100644 --- a/src/lib/commands/marc.c +++ b/src/lib/commands/marc.c @@ -39,7 +39,7 @@ #include "unit.h" int -march(void) +c_march(void) { struct nstr_item ni_land; struct emp_qelem land_list; diff --git a/src/lib/commands/mark.c b/src/lib/commands/mark.c index b9a01f36f..284f310a9 100644 --- a/src/lib/commands/mark.c +++ b/src/lib/commands/mark.c @@ -41,7 +41,7 @@ #include "optlist.h" int -mark(void) +c_market(void) { char buf[1024]; char *p; diff --git a/src/lib/commands/mfir.c b/src/lib/commands/mfir.c index 5fd32011c..cb1eb9c58 100644 --- a/src/lib/commands/mfir.c +++ b/src/lib/commands/mfir.c @@ -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; diff --git a/src/lib/commands/mine.c b/src/lib/commands/mine.c index 15c699478..20966fbeb 100644 --- a/src/lib/commands/mine.c +++ b/src/lib/commands/mine.c @@ -41,7 +41,7 @@ * format: mine */ int -mine(void) +c_mine(void) { struct shpstr ship; struct sctstr sect; @@ -88,7 +88,7 @@ mine(void) * format: landmine */ int -landmine(void) +c_lmine(void) { struct lndstr land; struct sctstr sect; diff --git a/src/lib/commands/miss.c b/src/lib/commands/miss.c index 23b620588..b36e692e2 100644 --- a/src/lib/commands/miss.c +++ b/src/lib/commands/miss.c @@ -45,7 +45,7 @@ static int show_mission(struct nstr_item *); * mission [] */ int -mission(void) +c_mission(void) { static int ef_with_missions[] = { EF_SHIP, EF_LAND, EF_PLANE, EF_BAD }; char *p; diff --git a/src/lib/commands/mora.c b/src/lib/commands/mora.c index 5d487964e..b3d8c6eab 100644 --- a/src/lib/commands/mora.c +++ b/src/lib/commands/mora.c @@ -37,7 +37,7 @@ #include "optlist.h" int -morale(void) +c_morale(void) { struct nstr_item np; struct lndstr land; diff --git a/src/lib/commands/move.c b/src/lib/commands/move.c index 69746e7b5..91b55edf8 100644 --- a/src/lib/commands/move.c +++ b/src/lib/commands/move.c @@ -44,7 +44,7 @@ static int cmd_move_map(coord, coord, char *, char *); int -move(void) +c_move(void) { int amount; struct sctstr sect; diff --git a/src/lib/commands/name.c b/src/lib/commands/name.c index a451dcc21..cb42e3bc5 100644 --- a/src/lib/commands/name.c +++ b/src/lib/commands/name.c @@ -39,7 +39,7 @@ * name */ int -name(void) +c_name(void) { struct shpstr ship; char *p; diff --git a/src/lib/commands/nati.c b/src/lib/commands/nati.c index 8243c2876..f6994c067 100644 --- a/src/lib/commands/nati.c +++ b/src/lib/commands/nati.c @@ -36,7 +36,7 @@ #include "optlist.h" int -nati(void) +c_nation(void) { struct natstr *natp; struct sctstr sect; diff --git a/src/lib/commands/navi.c b/src/lib/commands/navi.c index 6d8e7ff89..869ddbf94 100644 --- a/src/lib/commands/navi.c +++ b/src/lib/commands/navi.c @@ -38,7 +38,7 @@ #include "unit.h" int -navi(void) +c_navigate(void) { struct nstr_item ni_ship; struct emp_qelem ship_list; diff --git a/src/lib/commands/ndump.c b/src/lib/commands/ndump.c index 5a20115d3..cbb0e1ac0 100644 --- a/src/lib/commands/ndump.c +++ b/src/lib/commands/ndump.c @@ -37,7 +37,7 @@ #include "nuke.h" int -ndump(void) +c_ndump(void) { struct nstr_item nstr; struct nukstr nuk; diff --git a/src/lib/commands/new.c b/src/lib/commands/new.c index 917b7f320..985792892 100644 --- a/src/lib/commands/new.c +++ b/src/lib/commands/new.c @@ -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; diff --git a/src/lib/commands/newe.c b/src/lib/commands/newe.c index bc1939928..398cc04b0 100644 --- a/src/lib/commands/newe.c +++ b/src/lib/commands/newe.c @@ -39,7 +39,7 @@ #include "update.h" int -newe(void) +c_neweff(void) { struct natstr *natp; struct sctstr sect; diff --git a/src/lib/commands/news.c b/src/lib/commands/news.c index d89efbf93..cc35a401e 100644 --- a/src/lib/commands/news.c +++ b/src/lib/commands/news.c @@ -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; diff --git a/src/lib/commands/nuke.c b/src/lib/commands/nuke.c index 5b558300a..d8b3e3354 100644 --- a/src/lib/commands/nuke.c +++ b/src/lib/commands/nuke.c @@ -38,7 +38,7 @@ #include "plane.h" int -nuke(void) +c_nuke(void) { int nnukes, noff; struct nstr_item nstr; diff --git a/src/lib/commands/offe.c b/src/lib/commands/offe.c index 111505d64..845eeae88 100644 --- a/src/lib/commands/offe.c +++ b/src/lib/commands/offe.c @@ -41,7 +41,7 @@ static int do_loan(void); int -offe(void) +c_offer(void) { char *cp; diff --git a/src/lib/commands/orig.c b/src/lib/commands/orig.c index c8e2b4ff2..0df626743 100644 --- a/src/lib/commands/orig.c +++ b/src/lib/commands/orig.c @@ -37,7 +37,7 @@ #include "commands.h" int -orig(void) +c_origin(void) { char *p; coord x, y; diff --git a/src/lib/commands/para.c b/src/lib/commands/para.c index fb88a14fe..2e676bd63 100644 --- a/src/lib/commands/para.c +++ b/src/lib/commands/para.c @@ -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; diff --git a/src/lib/commands/path.c b/src/lib/commands/path.c index 7dacce1a0..bbcc26e9d 100644 --- a/src/lib/commands/path.c +++ b/src/lib/commands/path.c @@ -40,7 +40,7 @@ #include "path.h" int -path(void) +c_path(void) { struct nstr_sect ns; diff --git a/src/lib/commands/payo.c b/src/lib/commands/payo.c index 48d39411c..f7249d639 100644 --- a/src/lib/commands/payo.c +++ b/src/lib/commands/payo.c @@ -37,7 +37,7 @@ #include "ship.h" int -payo(void) +c_payoff(void) { struct sctstr sect; int nships; diff --git a/src/lib/commands/pboa.c b/src/lib/commands/pboa.c index c0f362463..f5e0b2354 100644 --- a/src/lib/commands/pboa.c +++ b/src/lib/commands/pboa.c @@ -36,7 +36,7 @@ #include "plane.h" int -pboa(void) +c_pboard(void) { struct sctstr sect; struct nstr_item np; diff --git a/src/lib/commands/pdump.c b/src/lib/commands/pdump.c index 982d8b04d..1f285a65e 100644 --- a/src/lib/commands/pdump.c +++ b/src/lib/commands/pdump.c @@ -38,7 +38,7 @@ #include "plane.h" int -pdump(void) +c_pdump(void) { int nplanes; struct nstr_item np; diff --git a/src/lib/commands/peek.c b/src/lib/commands/peek.c index 305ada901..a35ba1eab 100644 --- a/src/lib/commands/peek.c +++ b/src/lib/commands/peek.c @@ -37,7 +37,7 @@ #include "commands.h" int -peek(void) +c_peek(void) { struct sctstr sect; int nsect; diff --git a/src/lib/commands/plan.c b/src/lib/commands/plan.c index f162d075a..470f858e9 100644 --- a/src/lib/commands/plan.c +++ b/src/lib/commands/plan.c @@ -39,7 +39,7 @@ #include "plane.h" int -plan(void) +c_plane(void) { int nplanes, noff; struct nstr_item np; diff --git a/src/lib/commands/play.c b/src/lib/commands/play.c index d3d1e7282..49c468833 100644 --- a/src/lib/commands/play.c +++ b/src/lib/commands/play.c @@ -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; diff --git a/src/lib/commands/powe.c b/src/lib/commands/powe.c index f72c9951f..16e4dbbf2 100644 --- a/src/lib/commands/powe.c +++ b/src/lib/commands/powe.c @@ -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; diff --git a/src/lib/commands/prod.c b/src/lib/commands/prod.c index e392977e0..1fec59808 100644 --- a/src/lib/commands/prod.c +++ b/src/lib/commands/prod.c @@ -77,7 +77,7 @@ count_pop(void) } int -prod(void) +c_production(void) { struct natstr *natp; struct sctstr sect, scratch_sect; diff --git a/src/lib/commands/pstat.c b/src/lib/commands/pstat.c index 6b9661318..8dd82702f 100644 --- a/src/lib/commands/pstat.c +++ b/src/lib/commands/pstat.c @@ -36,7 +36,7 @@ #include "plane.h" int -pstat(void) +c_pstat(void) { int nplanes; struct nstr_item np; diff --git a/src/lib/commands/rada.c b/src/lib/commands/rada.c index d851f7ff8..9d08255e6 100644 --- a/src/lib/commands/rada.c +++ b/src/lib/commands/rada.c @@ -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); } diff --git a/src/lib/commands/rang.c b/src/lib/commands/rang.c index d09b74987..54c635b4f 100644 --- a/src/lib/commands/rang.c +++ b/src/lib/commands/rang.c @@ -36,7 +36,7 @@ #include "plane.h" int -range(void) +c_range(void) { struct nstr_item np; struct plnstr plane; diff --git a/src/lib/commands/rea.c b/src/lib/commands/rea.c index 33fd606ed..fea82ce59 100644 --- a/src/lib/commands/rea.c +++ b/src/lib/commands/rea.c @@ -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 */ diff --git a/src/lib/commands/real.c b/src/lib/commands/real.c index c1411a68a..ff5f3165a 100644 --- a/src/lib/commands/real.c +++ b/src/lib/commands/real.c @@ -47,7 +47,7 @@ list_realm(int curr, struct natstr *natp) } int -real(void) +c_realm(void) { struct realmstr realm; struct natstr *natp; diff --git a/src/lib/commands/reco.c b/src/lib/commands/reco.c index c32586fd3..21be9af38 100644 --- a/src/lib/commands/reco.c +++ b/src/lib/commands/reco.c @@ -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; diff --git a/src/lib/commands/reje.c b/src/lib/commands/reje.c index a1010d155..2cc08160e 100644 --- a/src/lib/commands/reje.c +++ b/src/lib/commands/reje.c @@ -35,7 +35,7 @@ #include "commands.h" int -reje(void) +c_reject(void) { static char *what[] = { "teles", "annos", "loans" }; char *p; diff --git a/src/lib/commands/rela.c b/src/lib/commands/rela.c index a58e6044a..ced60bfc2 100644 --- a/src/lib/commands/rela.c +++ b/src/lib/commands/rela.c @@ -41,7 +41,7 @@ * viewpoint of another country */ int -rela(void) +c_relations(void) { struct natstr *np; natid cn; diff --git a/src/lib/commands/relo.c b/src/lib/commands/relo.c index b5f033c10..5216cee76 100644 --- a/src/lib/commands/relo.c +++ b/src/lib/commands/relo.c @@ -37,7 +37,7 @@ #include "server.h" int -relo(void) +c_reload(void) { /* * Like SIGHUP, plus friendly chatter. If you change anything diff --git a/src/lib/commands/repa.c b/src/lib/commands/repa.c index 868c73a50..2a1d4f8bc 100644 --- a/src/lib/commands/repa.c +++ b/src/lib/commands/repa.c @@ -39,7 +39,7 @@ #include "optlist.h" int -repa(void) +c_repay(void) { struct lonstr loan; struct natstr *natp; diff --git a/src/lib/commands/repo.c b/src/lib/commands/repo.c index 397335331..04cf1ed12 100644 --- a/src/lib/commands/repo.c +++ b/src/lib/commands/repo.c @@ -43,7 +43,7 @@ static void printdiff(struct natstr *, struct natstr *, int what); static int tryprdiff(double, double, double, int, int); int -repo(void) +c_report(void) { struct natstr *natp; struct natstr nat; diff --git a/src/lib/commands/rese.c b/src/lib/commands/rese.c index af1824ba7..4477506d7 100644 --- a/src/lib/commands/rese.c +++ b/src/lib/commands/rese.c @@ -40,7 +40,7 @@ #include "optlist.h" int -rese(void) +c_reset(void) { struct comstr comm; struct sctstr sect; diff --git a/src/lib/commands/reso.c b/src/lib/commands/reso.c index b63eb56e7..ef0ffd779 100644 --- a/src/lib/commands/reso.c +++ b/src/lib/commands/reso.c @@ -37,7 +37,7 @@ static void reso_hdr(void); int -reso(void) +c_resource(void) { struct sctstr sect; int nsect; diff --git a/src/lib/commands/retr.c b/src/lib/commands/retr.c index 9a0c58f3c..e0d46f046 100644 --- a/src/lib/commands/retr.c +++ b/src/lib/commands/retr.c @@ -54,13 +54,13 @@ static int retreat(int); static int retreat_show(int, struct nstr_item *); int -retr(void) +c_retreat(void) { return retreat(EF_SHIP); } int -lretr(void) +c_lretreat(void) { return retreat(EF_LAND); } diff --git a/src/lib/commands/rout.c b/src/lib/commands/rout.c index 4f5684b5f..c6333bfb4 100644 --- a/src/lib/commands/rout.c +++ b/src/lib/commands/rout.c @@ -39,7 +39,7 @@ #include "path.h" int -rout(void) +c_route(void) { struct ichrstr *ip; struct nstr_sect ns; diff --git a/src/lib/commands/sabo.c b/src/lib/commands/sabo.c index cd868af5a..ce101c710 100644 --- a/src/lib/commands/sabo.c +++ b/src/lib/commands/sabo.c @@ -38,7 +38,7 @@ #include "land.h" int -sabo(void) +c_sabotage(void) { struct nstr_item ni; struct lndstr land, tmp; diff --git a/src/lib/commands/sate.c b/src/lib/commands/sate.c index 84b8c2958..f4bd9dfc6 100644 --- a/src/lib/commands/sate.c +++ b/src/lib/commands/sate.c @@ -40,7 +40,7 @@ #include "plane.h" int -sate(void) +c_satellite(void) { static int sct_shp_or_lnd[] = { EF_SECTOR, EF_SHIP, EF_LAND, EF_BAD }; double tech; diff --git a/src/lib/commands/scra.c b/src/lib/commands/scra.c index cb0e717f4..f512e01d2 100644 --- a/src/lib/commands/scra.c +++ b/src/lib/commands/scra.c @@ -40,7 +40,7 @@ #include "unit.h" int -scra(void) +c_scrap(void) { struct nstr_item ni; union empobj_storage item; diff --git a/src/lib/commands/scut.c b/src/lib/commands/scut.c index f89118e5e..e44f3013d 100644 --- a/src/lib/commands/scut.c +++ b/src/lib/commands/scut.c @@ -41,7 +41,7 @@ static int scuttle_tradeship(struct shpstr *); int -scut(void) +c_scuttle(void) { struct nstr_item ni; union empobj_storage item; diff --git a/src/lib/commands/sdump.c b/src/lib/commands/sdump.c index f9482557f..ea0492c37 100644 --- a/src/lib/commands/sdump.c +++ b/src/lib/commands/sdump.c @@ -37,7 +37,7 @@ #include "ship.h" int -sdump(void) +c_sdump(void) { int nships; struct nstr_item ni; diff --git a/src/lib/commands/sect.c b/src/lib/commands/sect.c index 9df12b376..ccdbfd80d 100644 --- a/src/lib/commands/sect.c +++ b/src/lib/commands/sect.c @@ -37,7 +37,7 @@ #include "optlist.h" int -sct(void) +c_sect(void) { struct nstr_sect ns; struct sctstr sect; diff --git a/src/lib/commands/sell.c b/src/lib/commands/sell.c index f2203f9d2..e53ce8462 100644 --- a/src/lib/commands/sell.c +++ b/src/lib/commands/sell.c @@ -47,7 +47,7 @@ * each sector. */ int -sell(void) +c_sell(void) { struct sctstr sect; struct ichrstr *ip; diff --git a/src/lib/commands/set.c b/src/lib/commands/set.c index f370f06a0..098808e22 100644 --- a/src/lib/commands/set.c +++ b/src/lib/commands/set.c @@ -47,7 +47,7 @@ * format: set */ int -set(void) +c_set(void) { static int ef_saleable[] = { EF_SHIP, EF_PLANE, EF_LAND, EF_NUKE, EF_BAD }; char *p; diff --git a/src/lib/commands/setres.c b/src/lib/commands/setres.c index c0166563d..d8789ae33 100644 --- a/src/lib/commands/setres.c +++ b/src/lib/commands/setres.c @@ -41,7 +41,7 @@ * format: setres resource */ int -setres(void) +c_setresource(void) { struct sctstr sect; char *what; diff --git a/src/lib/commands/setsect.c b/src/lib/commands/setsect.c index 017e6fb1f..12d89f723 100644 --- a/src/lib/commands/setsect.c +++ b/src/lib/commands/setsect.c @@ -40,7 +40,7 @@ * format: setres thing <#> */ int -setsector(void) +c_setsector(void) { struct sctstr sect; char *what; diff --git a/src/lib/commands/shar.c b/src/lib/commands/shar.c index 06de37b0c..ab4a0b91f 100644 --- a/src/lib/commands/shar.c +++ b/src/lib/commands/shar.c @@ -36,7 +36,7 @@ #include "map.h" int -shar(void) +c_sharebmap(void) { int to; struct nstr_sect ns; diff --git a/src/lib/commands/shark.c b/src/lib/commands/shark.c index 19d5ad4af..c27b2f042 100644 --- a/src/lib/commands/shark.c +++ b/src/lib/commands/shark.c @@ -39,7 +39,7 @@ #include "optlist.h" int -shark(void) +c_shark(void) { int arg; time_t now; diff --git a/src/lib/commands/shi.c b/src/lib/commands/shi.c index fa9de86b9..1397398af 100644 --- a/src/lib/commands/shi.c +++ b/src/lib/commands/shi.c @@ -36,7 +36,7 @@ #include "ship.h" int -shi(void) +c_ship(void) { int nships, noff, npln, nch, nxl; struct nstr_item ni; diff --git a/src/lib/commands/shoo.c b/src/lib/commands/shoo.c index 7d6e6bf26..c7c6cf4b8 100644 --- a/src/lib/commands/shoo.c +++ b/src/lib/commands/shoo.c @@ -39,7 +39,7 @@ #include "news.h" int -shoo(void) +c_shoot(void) { struct sctstr sect; struct nstr_sect nstr; diff --git a/src/lib/commands/show.c b/src/lib/commands/show.c index 1e1dc82ca..5addc64b0 100644 --- a/src/lib/commands/show.c +++ b/src/lib/commands/show.c @@ -38,7 +38,7 @@ #include "optlist.h" int -show(void) +c_show(void) { char *p; void (*cfunc)(int); diff --git a/src/lib/commands/shut.c b/src/lib/commands/shut.c index d1fa6bd69..0b50ad29e 100644 --- a/src/lib/commands/shut.c +++ b/src/lib/commands/shut.c @@ -39,7 +39,7 @@ #include "server.h" int -shut(void) +c_shutdown(void) { int shutdown_minutes; int shutdown_was_pending; @@ -56,7 +56,7 @@ shut(void) if (!p) return RET_SYN; if (*p != 'n') - disa(); + c_disable(); } shutdown_was_pending = shutdown_initiate(shutdown_minutes); diff --git a/src/lib/commands/sinf.c b/src/lib/commands/sinf.c index 764bab6a5..6d7df0d43 100644 --- a/src/lib/commands/sinf.c +++ b/src/lib/commands/sinf.c @@ -40,7 +40,7 @@ static void prmobcost(struct sctstr *, int); int -sinfra(void) +c_sinfrastructure(void) { struct sctstr sect; int nsect; diff --git a/src/lib/commands/skyw.c b/src/lib/commands/skyw.c index f2f43f851..7ae111259 100644 --- a/src/lib/commands/skyw.c +++ b/src/lib/commands/skyw.c @@ -51,7 +51,7 @@ static int showsat(struct sky **skypp, int x, int y); * format: skywatch [] */ int -skyw(void) +c_skywatch(void) { struct sctstr sect; struct nstr_sect nstr; diff --git a/src/lib/commands/sona.c b/src/lib/commands/sona.c index 650a24ab4..41abdf1ea 100644 --- a/src/lib/commands/sona.c +++ b/src/lib/commands/sona.c @@ -46,7 +46,7 @@ static int blankrow(char *); int -sona(void) +c_sonar(void) { struct nstr_item ni, nit; struct sctstr sect; diff --git a/src/lib/commands/spy.c b/src/lib/commands/spy.c index 2adb8ce99..d9dafe7f0 100644 --- a/src/lib/commands/spy.c +++ b/src/lib/commands/spy.c @@ -54,7 +54,7 @@ static void prunits(int, int); static char *player_relstr(natid); int -spy(void) +c_spy(void) { natid own; enum relations relat; diff --git a/src/lib/commands/sstat.c b/src/lib/commands/sstat.c index a3b82b790..891384292 100644 --- a/src/lib/commands/sstat.c +++ b/src/lib/commands/sstat.c @@ -36,7 +36,7 @@ #include "ship.h" int -sstat(void) +c_sstat(void) { int nships; struct nstr_item ni; diff --git a/src/lib/commands/stoc.c b/src/lib/commands/stoc.c index 3765179b4..6460b8985 100644 --- a/src/lib/commands/stoc.c +++ b/src/lib/commands/stoc.c @@ -37,7 +37,7 @@ #include "nuke.h" int -stoc(void) +c_stockpile(void) { struct nukstr nuke; int count; diff --git a/src/lib/commands/stop.c b/src/lib/commands/stop.c index f04fbe5e2..0d983bfcb 100644 --- a/src/lib/commands/stop.c +++ b/src/lib/commands/stop.c @@ -46,13 +46,13 @@ static int start_stop_unit(int, char *, int); static void start_stop_unit_hdr(int); int -start(void) +c_start(void) { return start_stop(0); } int -stop(void) +c_stop(void) { return start_stop(1); } diff --git a/src/lib/commands/stre.c b/src/lib/commands/stre.c index 741055ba6..ccd625730 100644 --- a/src/lib/commands/stre.c +++ b/src/lib/commands/stre.c @@ -42,7 +42,7 @@ static double units_in_sector(struct combat *def); static void stre_hdr(void); int -stre(void) +c_strength(void) { struct sctstr sect; int nsect = 0; diff --git a/src/lib/commands/strv.c b/src/lib/commands/strv.c index f39eedb53..6b842638c 100644 --- a/src/lib/commands/strv.c +++ b/src/lib/commands/strv.c @@ -48,7 +48,7 @@ static void ship_hdr(void); static void unit_hdr(void); int -starve(void) +c_starvation(void) { int do_sects = 0; int do_ships = 0; diff --git a/src/lib/commands/supp.c b/src/lib/commands/supp.c index 512e172f5..96fabb60e 100644 --- a/src/lib/commands/supp.c +++ b/src/lib/commands/supp.c @@ -36,7 +36,7 @@ #include "land.h" int -supp(void) +c_supply(void) { int nunits; struct nstr_item ni; diff --git a/src/lib/commands/surv.c b/src/lib/commands/surv.c index 54fec505f..c8f9f7906 100644 --- a/src/lib/commands/surv.c +++ b/src/lib/commands/surv.c @@ -45,7 +45,7 @@ static char code_char(struct valstr, struct sctstr *sp); * */ int -surv(void) +c_survey(void) { int nsect; struct nstr_sect nstr; diff --git a/src/lib/commands/swap.c b/src/lib/commands/swap.c index 778767025..eb618f5a7 100644 --- a/src/lib/commands/swap.c +++ b/src/lib/commands/swap.c @@ -41,7 +41,7 @@ static void print_res(struct sctstr *); * Syntax: swap */ int -swaps(void) +c_swapsector(void) { struct sctstr secta, sectb, tmp; char buf[1024]; diff --git a/src/lib/commands/tele.c b/src/lib/commands/tele.c index 3f655a2c2..080e75f50 100644 --- a/src/lib/commands/tele.c +++ b/src/lib/commands/tele.c @@ -38,7 +38,7 @@ #include "tel.h" int -tele(void) +c_telegram(void) { natid to; struct natstr *natp; diff --git a/src/lib/commands/tend.c b/src/lib/commands/tend.c index 308c45d87..5bce71772 100644 --- a/src/lib/commands/tend.c +++ b/src/lib/commands/tend.c @@ -48,7 +48,7 @@ static void expose_ship(struct shpstr *s1, struct shpstr *s2); static int tend_land(struct shpstr *tenderp, int, char *units); int -tend(void) +c_tend(void) { struct nstr_item targets; struct nstr_item tenders; diff --git a/src/lib/commands/terr.c b/src/lib/commands/terr.c index 8f17a90f6..7b37b5e3a 100644 --- a/src/lib/commands/terr.c +++ b/src/lib/commands/terr.c @@ -35,7 +35,7 @@ #include "commands.h" int -terr(void) +c_territory(void) { struct sctstr sect; char *p; diff --git a/src/lib/commands/testing.c b/src/lib/commands/testing.c index e3435b66b..3830db30a 100644 --- a/src/lib/commands/testing.c +++ b/src/lib/commands/testing.c @@ -36,7 +36,7 @@ #include "testing.h" int -testing_cmd(void) +c___cmd(void) { char *p; char buf[1024]; diff --git a/src/lib/commands/thre.c b/src/lib/commands/thre.c index f126f6cfe..d52fb2b49 100644 --- a/src/lib/commands/thre.c +++ b/src/lib/commands/thre.c @@ -40,7 +40,7 @@ * threshold */ int -thre(void) +c_threshold(void) { struct sctstr sect; struct nstr_sect nstr; diff --git a/src/lib/commands/togg.c b/src/lib/commands/togg.c index e2daad3bf..851b1d6ca 100644 --- a/src/lib/commands/togg.c +++ b/src/lib/commands/togg.c @@ -36,7 +36,7 @@ #include "commands.h" int -togg(void) +c_toggle(void) { int flag = 0; int pos; diff --git a/src/lib/commands/torp.c b/src/lib/commands/torp.c index fc5d3d4a0..7f43201f2 100644 --- a/src/lib/commands/torp.c +++ b/src/lib/commands/torp.c @@ -47,7 +47,7 @@ static void fire_dchrg(struct shpstr *, struct shpstr *, int); static int fire_torp(struct shpstr *, struct shpstr *, int); int -torp(void) +c_torpedo(void) { natid vshipown; int range; diff --git a/src/lib/commands/trad.c b/src/lib/commands/trad.c index b1ce47dcc..e29388af3 100644 --- a/src/lib/commands/trad.c +++ b/src/lib/commands/trad.c @@ -54,7 +54,7 @@ * format: trade */ int -trad(void) +c_trade(void) { struct sctstr sect; struct natstr *natp; diff --git a/src/lib/commands/tran.c b/src/lib/commands/tran.c index 310509715..d99538b91 100644 --- a/src/lib/commands/tran.c +++ b/src/lib/commands/tran.c @@ -45,7 +45,7 @@ static int tran_plane(void); static int pln_weight(struct plnstr *); int -tran(void) +c_transport(void) { char *what; char buf[1024]; diff --git a/src/lib/commands/turn.c b/src/lib/commands/turn.c index c2aa6c44f..c5fb8cb12 100644 --- a/src/lib/commands/turn.c +++ b/src/lib/commands/turn.c @@ -42,7 +42,7 @@ #include "optlist.h" int -turn(void) +c_turn(void) { FILE *fptr; struct telstr tgm; diff --git a/src/lib/commands/upda.c b/src/lib/commands/upda.c index bba589adf..d9a0668a8 100644 --- a/src/lib/commands/upda.c +++ b/src/lib/commands/upda.c @@ -42,7 +42,7 @@ * is likely to be. */ int -upda(void) +c_update(void) { time_t now, next, stop; diff --git a/src/lib/commands/upgr.c b/src/lib/commands/upgr.c index a4d886e1b..a20614926 100644 --- a/src/lib/commands/upgr.c +++ b/src/lib/commands/upgr.c @@ -49,7 +49,7 @@ static int pupgr(void); static int supgr(void); int -upgr(void) +c_upgrade(void) { char *p; char buf[1024]; diff --git a/src/lib/commands/vers.c b/src/lib/commands/vers.c index 576d3c995..4c2e4305d 100644 --- a/src/lib/commands/vers.c +++ b/src/lib/commands/vers.c @@ -50,7 +50,7 @@ static void show_opts(int val); static char *prwrap(char *, char *, int *); int -vers(void) +c_version(void) { time_t now; diff --git a/src/lib/commands/wing.c b/src/lib/commands/wing.c index feb06cd7c..3254fbe92 100644 --- a/src/lib/commands/wing.c +++ b/src/lib/commands/wing.c @@ -37,7 +37,7 @@ #include "plane.h" int -wing(void) +c_wingadd(void) { struct plnstr plane; diff --git a/src/lib/commands/wipe.c b/src/lib/commands/wipe.c index 692e7d84d..8a5745a64 100644 --- a/src/lib/commands/wipe.c +++ b/src/lib/commands/wipe.c @@ -35,7 +35,7 @@ #include "commands.h" int -wipe(void) +c_wipe(void) { struct sctstr sect; struct nstr_sect nstr; diff --git a/src/lib/commands/work.c b/src/lib/commands/work.c index 545618e6b..870f6a738 100644 --- a/src/lib/commands/work.c +++ b/src/lib/commands/work.c @@ -39,7 +39,7 @@ #include "update.h" int -work(void) +c_work(void) { int nunits; struct nstr_item ni; diff --git a/src/lib/commands/xdump.c b/src/lib/commands/xdump.c index 3f44fa2c2..37054155c 100644 --- a/src/lib/commands/xdump.c +++ b/src/lib/commands/xdump.c @@ -167,7 +167,7 @@ xditem(struct xdstr *xd, int type, char *arg) /* Extended dump command */ int -xdump(void) +c_xdump(void) { char *p; char buf[1024]; diff --git a/src/lib/commands/zdon.c b/src/lib/commands/zdon.c index 4ce49e677..40cd06946 100644 --- a/src/lib/commands/zdon.c +++ b/src/lib/commands/zdon.c @@ -49,7 +49,7 @@ #include "server.h" int -zdon(void) +c_zdone(void) { int whichcnum; struct natstr *natp; diff --git a/src/lib/player/empdis.c b/src/lib/player/empdis.c index d2ceeec76..6f3cfeedc 100644 --- a/src/lib/player/empdis.c +++ b/src/lib/player/empdis.c @@ -107,7 +107,7 @@ log_last_commands(void) } int -explain(void) +c_list(void) { struct cmndstr *com; diff --git a/src/lib/player/empmod.c b/src/lib/player/empmod.c index 2a47b0679..42b5ccdaa 100644 --- a/src/lib/player/empmod.c +++ b/src/lib/player/empmod.c @@ -50,231 +50,374 @@ struct cmndstr player_coms[] = { /* command form cost addr permit */ - {"accept [as-COUNTRY]", 0, acce, C_MOD, NORM}, - {"add ", 0, add, C_MOD, GOD}, - {"announce", 0, tele, C_MOD, 0}, - {"anti ", 3, anti, C_MOD, NORM + MONEY + CAP}, - {"apropos ", 0, apro, 0, 0}, - {"arm ", 3, arm, C_MOD, NORM + CAP}, - {"army ", 0, army, C_MOD, NORM}, + {"accept [as-COUNTRY]", + 0, c_accept, C_MOD, NORM}, + {"add ", + 0, c_add, C_MOD, GOD}, + {"announce", + 0, c_telegram, C_MOD, 0}, + {"anti ", + 3, c_anti, C_MOD, NORM + MONEY + CAP}, + {"apropos ", + 0, c_apropos, 0, 0}, + {"arm ", + 3, c_arm, C_MOD, NORM + CAP}, + {"army ", + 0, c_army, C_MOD, NORM}, {"assault [ ]", - 3, assa, C_MOD, NORM + MONEY + CAP}, + 3, c_assault, C_MOD, NORM + MONEY + CAP}, {"attack [ ]", - 3, atta, C_MOD, NORM + MONEY + CAP}, - {"bdes ", 0, bdes, C_MOD, NORM}, - {"bestpath ", 0, best, 0, NORM}, - {"bmap [s|l|n|p|r|t|*|h]", 0, map, C_MOD, NORM}, + 3, c_attack, C_MOD, NORM + MONEY + CAP}, + {"bdes ", + 0, c_bdes, C_MOD, NORM}, + {"bestpath ", + 0, c_bestpath, 0, NORM}, + {"bmap [s|l|n|p|r|t|*|h]", + 0, c_map, C_MOD, NORM}, {"board [|]", - 3, boar, C_MOD, NORM + MONEY + CAP}, + 3, c_board, C_MOD, NORM + MONEY + CAP}, {"bomb ", - 2, bomb, C_MOD, NORM + MONEY + CAP}, - {"break", 0, brea, C_MOD, SANCT}, - {"budget", 1, budg, 0, NORM}, + 2, c_bomb, C_MOD, NORM + MONEY + CAP}, + {"break", + 0, c_break, C_MOD, SANCT}, + {"budget", + 1, c_budget, 0, NORM}, {"build [ ]", - 1, buil, C_MOD, NORM + MONEY + CAP}, + 1, c_build, C_MOD, NORM + MONEY + CAP}, {"buy ", - 1, buy, C_MOD, NORM + MONEY + CAP}, - {"bye", 0, quit, 0, 0}, - {"capital ", 0, capi, C_MOD, NORM}, - {"cargo ", 0, carg, 0, NORM}, - {"census ", 0, cens, 0, NONVIS}, - {"change ", 0, chan, C_MOD, NONVIS}, - {"coastwatch ", 1, coas, C_MOD, NORM + CAP}, - {"collect ", 2, coll, C_MOD, NORM + MONEY + CAP}, - {"commodity ", 0, comm, 0, NONVIS}, + 1, c_buy, C_MOD, NORM + MONEY + CAP}, + {"bye", + 0, c_quit, 0, 0}, + {"capital ", + 0, c_capital, C_MOD, NORM}, + {"cargo ", + 0, c_cargo, 0, NORM}, + {"census ", + 0, c_census, 0, NONVIS}, + {"change ", + 0, c_change, C_MOD, NONVIS}, + {"coastwatch ", + 1, c_coastwatch, C_MOD, NORM + CAP}, + {"collect ", + 2, c_collect, C_MOD, NORM + MONEY + CAP}, + {"commodity ", + 0, c_commodity, 0, NONVIS}, {"consider ", - 1, cons, C_MOD, NORM + CAP}, - {"convert ", 2, conv, C_MOD, NORM + MONEY + CAP}, - {"country ", 0, coun, 0, 0}, - {"cutoff ", 0, cuto, 0, NORM}, + 1, c_consider, C_MOD, NORM + CAP}, + {"convert ", + 2, c_convert, C_MOD, NORM + MONEY + CAP}, + {"country ", + 0, c_country, 0, 0}, + {"cutoff ", + 0, c_cutoff, 0, NORM}, {"declare ", - 2, decl, C_MOD, NORM + CAP}, - {"deliver [q|] []", 1, deli, C_MOD, NORM}, - {"demobilize ", 1, demo, C_MOD, + 2, c_declare, C_MOD, NORM + CAP}, + {"deliver [q|] []", + 1, c_deliver, C_MOD, NORM}, + {"demobilize ", + 1, c_demobilize, C_MOD, NORM + MONEY + CAP}, - {"designate ", 1, desi, C_MOD, NORM}, - {"disable", 0, disa, C_MOD, GOD}, - {"disarm ", 2, disarm, C_MOD, NORM + CAP}, - {"distribute ", 1, dist, C_MOD, NORM}, + {"designate ", + 1, c_designate, C_MOD, NORM}, + {"disable", + 0, c_disable, C_MOD, GOD}, + {"disarm ", + 2, c_disarm, C_MOD, NORM + CAP}, + {"distribute ", + 1, c_distribute, C_MOD, NORM}, {"drop ", - 1, drop, C_MOD, NORM + MONEY + CAP}, - {"dump []", 0, dump, 0, NORM}, - {"echo []", 0, echo, 0, 0}, + 1, c_drop, C_MOD, NORM + MONEY + CAP}, + {"dump []", + 0, c_dump, 0, NORM}, + {"echo []", + 0, c_echo, 0, 0}, {"edit [ ]...", - 0, edit, C_MOD, GOD}, - {"enable", 0, enab, C_MOD, GOD}, - {"enlist ", 2, enli, C_MOD, NORM + MONEY + CAP}, - {"execute ", 0, execute, 0, EXEC}, + 0, c_edit, C_MOD, GOD}, + {"enable", + 0, c_enable, C_MOD, GOD}, + {"enlist ", + 2, c_enlist, C_MOD, NORM + MONEY + CAP}, + {"execute ", + 0, c_execute, 0, EXEC}, {"explore ", - 1, explore, C_MOD, NORM + MONEY + CAP}, - {"financial", 0, fina, 0, 0}, + 1, c_explore, C_MOD, NORM + MONEY + CAP}, + {"financial", + 0, c_financial, 0, 0}, {"fire [TO-SECT | SHIP]", - 1, multifire, C_MOD, NORM + MONEY + CAP}, - {"flash []", 0, flash, 0, 0}, - {"fleetadd ", 0, flee, C_MOD, NORM}, + 1, c_fire, C_MOD, NORM + MONEY + CAP}, + {"flash []", + 0, c_flash, 0, 0}, + {"fleetadd ", + 0, c_fleetadd, C_MOD, NORM}, {"fly ", - 2, fly, C_MOD, NORM + MONEY + CAP}, - {"force", 0, force, C_MOD, GOD}, - {"fortify ", 1, fort, C_MOD, NORM + CAP}, - {"give ", 0, give, C_MOD, GOD}, - {"grind ", 1, grin, C_MOD, NORM + MONEY + CAP}, - {"harden ", 2, hard, C_MOD, NORM + MONEY + CAP}, - {"headlines [days]", 0, head, 0, 0}, - {"help ", 0, info, 0, 0}, + 2, c_fly, C_MOD, NORM + MONEY + CAP}, + {"force", + 0, c_force, C_MOD, GOD}, + {"fortify ", + 1, c_fortify, C_MOD, NORM + CAP}, + {"give ", + 0, c_give, C_MOD, GOD}, + {"grind ", + 1, c_grind, C_MOD, NORM + MONEY + CAP}, + {"harden ", + 2, c_harden, C_MOD, NORM + MONEY + CAP}, + {"headlines [days]", + 0, c_headlines, 0, 0}, + {"help ", + 0, c_info, 0, 0}, {"improve ", - 1, improve, C_MOD, NORM + MONEY + CAP}, - {"info ", 0, info, 0, 0}, - {"land ", 0, land, 0, NORM}, - {"launch ", 3, laun, C_MOD, NORM + MONEY + CAP}, - {"lbmap [s|l|n|p|r|t|*|h]", 0, map, C_MOD, NORM}, + 1, c_improve, C_MOD, NORM + MONEY + CAP}, + {"info ", + 0, c_info, 0, 0}, + {"land ", + 0, c_land, 0, NORM}, + {"launch ", + 3, c_launch, C_MOD, NORM + MONEY + CAP}, + {"lbmap [s|l|n|p|r|t|*|h]", + 0, c_map, C_MOD, NORM}, {"lboard []", - 3, lboa, C_MOD, NORM + MONEY + CAP}, - {"lcargo ", 0, lcarg, 0, NORM}, - {"ldump []", 0, ldump, 0, NORM}, - {"ledger ", 0, ledg, 0, NORM}, - {"level ", 0, leve, 0, NORM}, - {"list", 0, explain, 0, 0}, + 3, c_lboard, C_MOD, NORM + MONEY + CAP}, + {"lcargo ", + 0, c_lcargo, 0, NORM}, + {"ldump []", + 0, c_ldump, 0, NORM}, + {"ledger ", + 0, c_ledger, 0, NORM}, + {"level ", + 0, c_level, 0, NORM}, + {"list", + 0, c_list, 0, 0}, {"lload ", - 1, lload, C_MOD, NORM + CAP}, - {"llookout ", 1, llook, 0, NORM + CAP}, - {"lmap [s|l|n|p|*|h]", 0, map, C_MOD, NORM}, - {"lmine ", 2, landmine, C_MOD, NORM + MONEY + CAP}, + 1, c_lload, C_MOD, NORM + CAP}, + {"llookout ", + 1, c_llookout, 0, NORM + CAP}, + {"lmap [s|l|n|p|*|h]", + 0, c_map, C_MOD, NORM}, + {"lmine ", + 2, c_lmine, C_MOD, NORM + MONEY + CAP}, {"load ", - 1, load, C_MOD, NORM + CAP}, - {"lookout ", 1, look, 0, NORM + CAP}, - {"lost", 0, lost, 0, NORM}, - {"lradar ", 1, lrad, C_MOD, NORM + CAP}, + 1, c_load, C_MOD, NORM + CAP}, + {"lookout ", + 1, c_lookout, 0, NORM + CAP}, + {"lost", + 0, c_lost, 0, NORM}, + {"lradar ", + 1, c_lradar, C_MOD, NORM + CAP}, {"lretreat [q | ]", - 1, lretr, C_MOD, NORM + CAP}, - {"lstat ", 0, lsta, 0, NORM}, + 1, c_lretreat, C_MOD, NORM + CAP}, + {"lstat ", + 0, c_lstat, 0, NORM}, {"ltend ", - 1, ltend, C_MOD, NORM + CAP}, + 1, c_ltend, C_MOD, NORM + CAP}, {"lunload ", - 1, lload, C_MOD, NORM + CAP}, - {"map [s|l|n|p|*|h]", 0, map, C_MOD, NORM}, - {"march ", 1, march, C_MOD, NORM + CAP}, - {"market ", 0, mark, C_MOD, NORM}, - {"mine ", 2, mine, C_MOD, NORM + MONEY + CAP}, + 1, c_lload, C_MOD, NORM + CAP}, + {"map [s|l|n|p|*|h]", + 0, c_map, C_MOD, NORM}, + {"march ", + 1, c_march, C_MOD, NORM + CAP}, + {"market ", + 0, c_market, C_MOD, NORM}, + {"mine ", + 2, c_mine, C_MOD, NORM + MONEY + CAP}, {"mission []", - 2, mission, C_MOD, NORM + CAP}, - {"morale ", 1, morale, C_MOD, NORM + CAP}, - {"motd", 0, show_motd, 0, 0}, + 2, c_mission, C_MOD, NORM + CAP}, + {"morale ", + 1, c_morale, C_MOD, NORM + CAP}, + {"motd", + 0, c_motd, 0, 0}, {"move ", - 1, move, C_MOD, NORM + CAP}, - {"name ", 0, name, C_MOD, NORM}, - {"nation [as-COUNTRY]", 0, nati, 0, 0}, - {"navigate ", 1, navi, C_MOD, NORM + CAP}, - {"nbmap [s|l|n|p|r|t|*|h]", 0, map, C_MOD, NORM}, - {"ndump ", 0, ndump, 0, NORM}, - {"newcap ", 0, new, C_MOD, GOD}, - {"neweff ", 0, newe, 0, NORM}, - {"newspaper [days]", 0, news, 0, 0}, - {"nmap [s|l|n|p|*|h]", 0, map, C_MOD, NORM}, - {"nuke ", 0, nuke, 0, NORM}, + 1, c_move, C_MOD, NORM + CAP}, + {"name ", + 0, c_name, C_MOD, NORM}, + {"nation [as-COUNTRY]", + 0, c_nation, 0, 0}, + {"navigate ", + 1, c_navigate, C_MOD, NORM + CAP}, + {"nbmap [s|l|n|p|r|t|*|h]", + 0, c_map, C_MOD, NORM}, + {"ndump ", + 0, c_ndump, 0, NORM}, + {"newcap ", + 0, c_newcap, C_MOD, GOD}, + {"neweff ", + 0, c_neweff, 0, NORM}, + {"newspaper [days]", + 0, c_newspaper, 0, 0}, + {"nmap [s|l|n|p|*|h]", + 0, c_map, C_MOD, NORM}, + {"nuke ", + 0, c_nuke, 0, NORM}, {"offer [ ]", - 1, offe, C_MOD, NORM + MONEY + CAP}, - {"origin ", 1, orig, C_MOD, NORM}, + 1, c_offer, C_MOD, NORM + MONEY + CAP}, + {"origin ", + 1, c_origin, C_MOD, NORM}, {"paradrop ", - 3, para, C_MOD, NORM + MONEY + CAP}, - {"path ", 0, path, C_MOD, NORM}, - {"payoff ", 0, payo, 0, NORM}, - {"pbmap [s|l|n|p|r|t|*|h]", 0, map, C_MOD, NORM}, - {"pboard ", 3, pboa, C_MOD, NORM + MONEY + CAP}, - {"pdump []", 0, pdump, 0, NORM}, - {"peek ", 0, peek, 0, GOD}, - {"plane ", 0, plan, 0, NORM}, - {"players", 0, play, 0, 0}, - {"pmap [s|l|n|p|*|h]", 0, map, C_MOD, NORM}, + 3, c_paradrop, C_MOD, NORM + MONEY + CAP}, + {"path ", + 0, c_path, C_MOD, NORM}, + {"payoff ", + 0, c_payoff, 0, NORM}, + {"pbmap [s|l|n|p|r|t|*|h]", + 0, c_map, C_MOD, NORM}, + {"pboard ", + 3, c_pboard, C_MOD, NORM + MONEY + CAP}, + {"pdump []", + 0, c_pdump, 0, NORM}, + {"peek ", + 0, c_peek, 0, GOD}, + {"plane ", + 0, c_plane, 0, NORM}, + {"players", + 0, c_players, 0, 0}, + {"pmap [s|l|n|p|*|h]", + 0, c_map, C_MOD, NORM}, {"power [\"new\"|\"update\"] [ | \"country\" ]", - 0, powe, C_MOD, 0}, - {"pray", 0, tele, C_MOD, NORM}, - {"production ", 0, prod, 0, NORM}, - {"pstat ", 0, pstat, 0, NORM}, - {"quit", 0, quit, 0, 0}, - {"radar ", 1, rada, C_MOD, NORM + CAP}, - {"range ", 1, range, C_MOD, NORM + CAP}, - {"read [yes|no|]", 0, rea, C_MOD, NONVIS}, - {"realm []", 0, real, C_MOD, NORM}, + 0, c_power, C_MOD, 0}, + {"pray", + 0, c_telegram, C_MOD, NORM}, + {"production ", + 0, c_production, 0, NORM}, + {"pstat ", + 0, c_pstat, 0, NORM}, + {"quit", + 0, c_quit, 0, 0}, + {"radar ", + 1, c_radar, C_MOD, NORM + CAP}, + {"range ", + 1, c_range, C_MOD, NORM + CAP}, + {"read [yes|no|]", + 0, c_read, C_MOD, NONVIS}, + {"realm []", + 0, c_realm, C_MOD, NORM}, {"recon ", - 3, reco, C_MOD, NORM + MONEY + CAP}, + 3, c_recon, C_MOD, NORM + MONEY + CAP}, {"reject ", - 2, reje, C_MOD, NORM}, - {"relations [as-COUNTRY]", 0, rela, 0, 0}, - {"reload", 0, relo, C_MOD, GOD}, - {"repay ", 1, repa, C_MOD, NORM + MONEY + CAP}, - {"report ", 0, repo, 0, 0}, - {"reset <0|price>", 1, rese, C_MOD, NORM + CAP}, - {"resource ", 0, reso, 0, NONVIS}, + 2, c_reject, C_MOD, NORM}, + {"relations [as-COUNTRY]", + 0, c_relations, 0, 0}, + {"reload", + 0, c_reload, C_MOD, GOD}, + {"repay ", + 1, c_repay, C_MOD, NORM + MONEY + CAP}, + {"report ", + 0, c_report, 0, 0}, + {"reset <0|price>", + 1, c_reset, C_MOD, NORM + CAP}, + {"resource ", + 0, c_resource, 0, NONVIS}, {"retreat [q | ]", - 1, retr, C_MOD, NORM + CAP}, - {"route ", 1, rout, C_MOD, NORM}, - {"sabotage ", 1, sabo, C_MOD, NORM + MONEY + CAP}, + 1, c_retreat, C_MOD, NORM + CAP}, + {"route ", + 1, c_route, C_MOD, NORM}, + {"sabotage ", + 1, c_sabotage, C_MOD, NORM + MONEY + CAP}, {"satellite [ [?cond&cond&...]]", - 1, sate, C_MOD, NORM + CAP}, - {"sbmap [s|l|n|p|r|t|*|h]", 0, map, C_MOD, NORM}, + 1, c_satellite, C_MOD, NORM + CAP}, + {"sbmap [s|l|n|p|r|t|*|h]", + 0, c_map, C_MOD, NORM}, {"scrap ", - 2, scra, C_MOD, NORM + MONEY + CAP}, - {"scuttle ", 5, scut, C_MOD, NORM + CAP}, - {"sdump []", 0, sdump, 0, NORM}, - {"sect ", 0, sct, C_MOD, NORM}, - {"sell ", 1, sell, C_MOD, NORM + CAP}, + 2, c_scrap, C_MOD, NORM + MONEY + CAP}, + {"scuttle ", + 5, c_scuttle, C_MOD, NORM + CAP}, + {"sdump []", + 0, c_sdump, 0, NORM}, + {"sect ", + 0, c_sect, C_MOD, NORM}, + {"sell ", + 1, c_sell, C_MOD, NORM + CAP}, {"set ", - 1, set, C_MOD, NORM + CAP}, - {"setresource ", 0, setres, C_MOD, GOD}, - {"setsector ", 0, setsector, C_MOD, GOD}, - {"sharebmap []", 0, shar, C_MOD, NORM}, - {"shark ", 25, shark, C_MOD, NORM + MONEY + CAP}, - {"ship ", 0, shi, 0, NORM}, - {"shoot ", 3, shoo, C_MOD, NORM + MONEY + CAP}, + 1, c_set, C_MOD, NORM + CAP}, + {"setresource ", + 0, c_setresource, C_MOD, GOD}, + {"setsector ", + 0, c_setsector, C_MOD, GOD}, + {"sharebmap []", + 0, c_sharebmap, C_MOD, NORM}, + {"shark ", + 25, c_shark, C_MOD, NORM + MONEY + CAP}, + {"ship ", + 0, c_ship, 0, NORM}, + {"shoot ", + 3, c_shoot, C_MOD, NORM + MONEY + CAP}, {"show <\"build\"|\"stats\"|\"cap\"> []\n" "\tshow \n" "\tshow updates []>", - 0, show, 0, 0}, - {"shutdown ", 0, shut, 0, GOD}, - {"sinfrastructure ", 0, sinfra, 0, NONVIS}, - {"skywatch ", 1, skyw, C_MOD, NORM + CAP}, - {"smap [s|l|n|p|*|h]", 0, map, C_MOD, NORM}, - {"sonar ", 1, sona, C_MOD, NORM + CAP}, - {"spy ", 1, spy, C_MOD, NORM + CAP}, - {"sstat ", 0, sstat, 0, NORM}, - {"start ", 1, start, C_MOD, NORM}, - {"starvation [|l |s ]", 0, starve, 0, NORM}, - {"stockpile ", 0, stoc, C_MOD, NORM}, - {"stop ", 1, stop, C_MOD, NORM}, - {"strength ", 1, stre, C_MOD, NORM}, - {"supply ", 1, supp, C_MOD, NORM + CAP}, - {"survey ", 0, surv, C_MOD, NORM}, - {"swapsector ", 0, swaps, C_MOD, GOD}, + 0, c_show, 0, 0}, + {"shutdown ", + 0, c_shutdown, 0, GOD}, + {"sinfrastructure ", + 0, c_sinfrastructure, 0, NONVIS}, + {"skywatch ", + 1, c_skywatch, C_MOD, NORM + CAP}, + {"smap [s|l|n|p|*|h]", + 0, c_map, C_MOD, NORM}, + {"sonar ", + 1, c_sonar, C_MOD, NORM + CAP}, + {"spy ", + 1, c_spy, C_MOD, NORM + CAP}, + {"sstat ", + 0, c_sstat, 0, NORM}, + {"start ", + 1, c_start, C_MOD, NORM}, + {"starvation [|l |s ]", + 0, c_starvation, 0, NORM}, + {"stockpile ", + 0, c_stockpile, C_MOD, NORM}, + {"stop ", + 1, c_stop, C_MOD, NORM}, + {"strength ", + 1, c_strength, C_MOD, NORM}, + {"supply ", + 1, c_supply, C_MOD, NORM + CAP}, + {"survey ", + 0, c_survey, C_MOD, NORM}, + {"swapsector ", + 0, c_swapsector, C_MOD, GOD}, {"sweep ", - 3, reco, C_MOD, NORM + MONEY + CAP}, - {"telegram ...", 0, tele, C_MOD, NORM}, + 3, c_recon, C_MOD, NORM + MONEY + CAP}, + {"telegram ...", + 0, c_telegram, C_MOD, NORM}, {"tend ", - 1, tend, C_MOD, NORM + CAP}, - {"territory []", 0, terr, C_MOD, NORM}, + 1, c_tend, C_MOD, NORM + CAP}, + {"territory []", + 0, c_territory, C_MOD, NORM}, {"test ", - 1, move, C_MOD, NORM}, - {"threshold ", 1, thre, C_MOD, NORM}, + 1, c_move, C_MOD, NORM}, + {"threshold ", + 1, c_threshold, C_MOD, NORM}, {"toggle [inform|flash|beep|coastwatch|sonar|techlists] [on|off]", - 0, togg, C_MOD, 0}, + 0, c_toggle, C_MOD, 0}, {"torpedo ", - 3, torp, C_MOD, NORM + MONEY + CAP}, - {"trade", 1, trad, C_MOD, NORM + MONEY + CAP}, + 3, c_torpedo, C_MOD, NORM + MONEY + CAP}, + {"trade", + 1, c_trade, C_MOD, NORM + MONEY + CAP}, {"transport <\"nuke\"|\"plane\"> ", - 1, tran, C_MOD, NORM + CAP}, - {"turn <\"on\"|\"off\"|\"mess\">", 0, turn, C_MOD, GOD}, + 1, c_transport, C_MOD, NORM + CAP}, + {"turn <\"on\"|\"off\"|\"mess\">", + 0, c_turn, C_MOD, GOD}, {"unload ", - 1, load, C_MOD, NORM + CAP}, - {"update", 0, upda, 0, 0}, + 1, c_load, C_MOD, NORM + CAP}, + {"update", + 0, c_update, 0, 0}, {"upgrade ", - 1, upgr, C_MOD, NORM + MONEY + CAP}, - {"version", 0, vers, 0, 0}, - {"wall []", 0, wall, 0, NORM}, - {"wingadd ", 0, wing, C_MOD, NORM}, - {"wipe ", 1, wipe, C_MOD, NORM}, - {"wire [yes|no|]", 0, rea, C_MOD, 0}, - {"work ", 1, work, C_MOD, NORM + MONEY + CAP}, - {"xdump [\"meta\"] []", 0, xdump, 0, 0}, - {"zdone ", 0, zdon, C_MOD, NORM}, - {"__cmd \"added\" ", 0, testing_cmd, 0, TESTING}, + 1, c_upgrade, C_MOD, NORM + MONEY + CAP}, + {"version", + 0, c_version, 0, 0}, + {"wall []", + 0, c_wall, 0, NORM}, + {"wingadd ", + 0, c_wingadd, C_MOD, NORM}, + {"wipe ", + 1, c_wipe, C_MOD, NORM}, + {"wire [yes|no|]", + 0, c_read, C_MOD, 0}, + {"work ", + 1, c_work, C_MOD, NORM + MONEY + CAP}, + {"xdump [\"meta\"] []", + 0, c_xdump, 0, 0}, + {"zdone ", + 0, c_zdone, C_MOD, NORM}, + {"__cmd \"added\" ", + 0, c___cmd, 0, TESTING}, {NULL, 0, NULL, 0, 0} }; diff --git a/src/lib/player/player.c b/src/lib/player/player.c index 4846953eb..78a5e3e8a 100644 --- a/src/lib/player/player.c +++ b/src/lib/player/player.c @@ -58,7 +58,7 @@ player_main(struct player *p) player = p; time(&player->curup); update_timeused_login(player->curup); - show_motd(); + c_motd(); if (running_test_suite) pr("\n" "*** Server configured for testing ***\n" @@ -229,7 +229,7 @@ make_stale_if_command_arg(char *arg) * We'll wait until 1.2 I guess. */ int -execute(void) +c_execute(void) { char buf[1024]; /* UTF-8 */ int failed; @@ -275,14 +275,14 @@ execute(void) } int -show_motd(void) +c_motd(void) { show_first_tel(motdfil); return RET_OK; } int -quit(void) +c_quit(void) { io_set_eof(player->iop); return RET_OK; diff --git a/src/lib/subs/unitsub.c b/src/lib/subs/unitsub.c index ef7c9cea2..21222eef2 100644 --- a/src/lib/subs/unitsub.c +++ b/src/lib/subs/unitsub.c @@ -254,7 +254,7 @@ unit_move_non_dir(struct emp_qelem *list, char *cp, int *map_shown) if (leader->ef_type != EF_SHIP) return NULL; cp = unit_move_parse(cp, leader_str); - sona(); + c_sonar(); player->btused++; /* FIXME likewise */ *map_shown = 1; break; @@ -268,9 +268,9 @@ unit_move_non_dir(struct emp_qelem *list, char *cp, int *map_shown) player->argp[1] = leader_str; } if (leader->ef_type == EF_SHIP) - mine(); + c_mine(); else - landmine(); + c_lmine(); player->btused++; /* FIXME likewise */ *map_shown = 1; break;