]> git.pond.sub.org Git - empserver/blobdiff - include/prototypes.h
client: Unbreak standalone build
[empserver] / include / prototypes.h
index 517a142fe1e848b171c60356a970cb361e4fa3a5..b4d674820131c492a556cf028c73dd0629bf5d14 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2013, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2021, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                Ken Stevens, Steve McClure, Markus Armbruster
  *
  *  Empire is free software: you can redistribute it and/or modify
@@ -54,199 +54,187 @@ extern void finish_server(void);
  * src/lib/commands/ *.c
  */
 extern int check_market(void);
+extern int edit_sect(struct sctstr *, char *, char *);
+extern int edit_sect_i(struct sctstr *, char *, int);
 extern int load_comm_ok(struct sctstr *, natid, i_type, int);
 extern void gift(natid, natid, void *, char *);
 extern int display_mark(i_type, int);
-extern int want_to_abandon(struct sctstr *, i_type, int, struct lndstr *);
-extern int would_abandon(struct sctstr *, i_type, int, struct lndstr *);
-extern int nav_map(int, int, int);
-extern int do_unit_move(struct emp_qelem *, int *, double *, double *);
-extern int count_pop(int);
-extern int scuttle_tradeship(struct shpstr *, int);
-extern void resnoise(struct sctstr *, char *, int, int);
 extern int line_of_sight(char **rad, int ax, int ay, int bx, int by);
 extern void plane_sona(struct emp_qelem *, int, int, struct shiplist **);
 extern char *prsub(struct shpstr *);
 extern int check_trade(void);
 extern int ontradingblock(int, void *);
-extern void trdswitchown(int, void *, int);
+extern void trdswitchown(int, struct empobj *, int);
 extern int do_look(int);
 extern void look_at_sect(struct sctstr *, int);
 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 foll(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 mobq(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 orde(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 qorde(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 sail(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 sorde(void);
-int spy(void);
-int sstat(void);
-int start(void);
-int starve(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 trea(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 xedit(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
@@ -279,6 +267,7 @@ extern int read_schedule(char *, time_t[], int, time_t, time_t);
 /* res_pop.c */
 extern int max_population(float, int, int);
 extern int max_pop(float, struct sctstr *);
+extern int max_workers(float, struct sctstr *);
 /* stmtch.c */
 /* in match.h */
 /* type.c */
@@ -296,8 +285,7 @@ extern int demandupdatecheck(void);
 /* disassoc.c */
 extern int disassoc(void);
 /* fnameat.c */
-extern char *fnameat(const char *, const char *);
-extern FILE *fopenat(const char *, const char *, const char *);
+/* in fnameat.h */
 /* fsize.c */
 extern int fsize(int);
 extern int blksize(int);
@@ -390,6 +378,7 @@ extern void stop_service(void);
 extern int confirm(char *);
 extern int askyn(char *);
 /* bridgefall.c */
+extern int bridge_support_at(struct sctstr *, int);
 extern void bridge_damaged(struct sctstr *);
 extern void bridgefall(struct sctstr *);
 /* bsanct.c */
@@ -409,7 +398,10 @@ extern int check_trade_ok(struct trdstr *);
 /* coastal.c */
 extern void set_coastal(struct sctstr *, int, int);
 /* control.c */
+extern double security_strength(struct sctstr *, int *);
 extern int military_control(struct sctstr *);
+extern int abandon_askyn(struct sctstr *, i_type, int, struct ulist *);
+extern int would_abandon(struct sctstr *, i_type, int, struct ulist *);
 /* damage.c */
 extern void landdamage(struct lndstr *, int);
 extern void ship_damage(struct shpstr *, int);
@@ -425,8 +417,6 @@ extern int commdamage(int, int, i_type);
 extern int detonate(struct nukstr *, coord, coord, int);
 /* disloan.c */
 extern int disloan(int, struct lonstr *);
-/* distrea.c */
-extern int distrea(int, struct trtstr *);
 /* fileinit.c */
 extern void ef_init_srv(int);
 extern void ef_fin_srv(void);
@@ -456,9 +446,9 @@ extern int unitsatxy(coord, coord, int, int);
 extern int planesatxy(coord, coord, int, int);
 extern int asw_shipsatxy(coord, coord, int, int, struct plnstr *,
                         struct shiplist **);
-extern int has_units(coord, coord, natid, struct lndstr *);
+extern void print_shiplist(struct shiplist *);
+extern int has_units(coord, coord, natid);
 extern int adj_units(coord, coord, natid);
-extern int islist(char *);
 /* maps.c */
 /* in map.h */
 /* mission.c */
@@ -538,7 +528,7 @@ extern void pln_put1(struct plist *);
 extern void plane_sweep(struct emp_qelem *, coord, coord);
 extern int put_plane_on_land(struct plnstr *, struct lndstr *);
 extern int pln_hitchance(struct plnstr *, int, int);
-extern int pln_damage(struct plnstr *, char, int);
+extern int pln_damage(struct plnstr *, char, char *);
 extern int pln_identchance(struct plnstr *, int, int);
 extern int pln_is_in_orbit(struct plnstr *);
 extern void pln_set_tech(struct plnstr *, int);
@@ -572,20 +562,11 @@ extern int delty(struct range *, coord);
 extern void radmap(int, int, int, double, int, double);
 extern void rad_map_set(natid, int, int, int, double, int);
 /* rej.c */
-extern void setrel(natid, natid, int);
-extern void setcont(natid, natid, int);
-extern void setrej(natid, natid, int, int);
+/* in nat.h */
 /* retreat.c */
-extern void retreat_ship(struct shpstr *, char);
-extern void retreat_land(struct lndstr *, char);
-extern int check_retreat_and_do_shipdamage(struct shpstr *, int);
-extern int check_retreat_and_do_landdamage(struct lndstr *, int);
+/* in retreat.h */
 /* sarg.c */
-extern enum ns_seltype sarg_type(char *);
-extern int sarg_xy(char *, coord *, coord *);
-extern int sarg_area(char *, struct range *);
-extern int sarg_range(char *, coord *, coord *, int *);
-extern int sarg_list(char *, int *, int);
+/* in nsc.h */
 /* satmap.c */
 extern void satdisp_sect(struct sctstr *, int);
 extern void satdisp_units(coord, coord);
@@ -626,17 +607,7 @@ extern void show_news(int);
 extern void show_product(int);
 extern void show_updates(int);
 /* shpsub.c */
-extern void shp_sel(struct nstr_item *, struct emp_qelem *);
-extern void shp_nav(struct emp_qelem *, double *, double *, int *, natid);
-extern int shp_sweep(struct emp_qelem *, int, int, natid);
-extern int shp_check_nav(struct sctstr *, struct shpstr *);
-extern int sect_has_dock(struct sctstr *);
-extern int shp_hardtarget(struct shpstr *);
-extern int shp_nav_one_sector(struct emp_qelem *, int, natid, int);
-extern int shp_missile_defense(coord, coord, natid, int);
-extern void shp_missdef(struct shpstr *, natid);
-extern double shp_mobcost(struct shpstr *);
-extern void shp_set_tech(struct shpstr *, int);
+/* in ship.h */
 /* snxtitem.c */
 /* snxtsct.c */
 /* in nsc.h */
@@ -654,8 +625,6 @@ extern void takeover_ship(struct shpstr *, natid);
 extern void takeover_plane(struct plnstr *, natid);
 /* trdsub.c */
 /* in trade.h */
-/* trechk.c */
-extern int trechk(natid, natid, int);
 /* whatitem.c */
 /* in item.h */
 /* wu.c */
@@ -666,85 +635,7 @@ extern int wu(natid, natid, char *, ...) ATTRIBUTE((format (printf, 3, 4)));
 /*
  * src/lib/update/ *.c
  */
-/* age.c */
-extern int age_people(int, int);
-extern void age_levels(int);
-/* anno.c */
-extern void delete_old_announcements(void);
-/* bp.c */
-/* in budg.h */
-/* deliver.c */
-extern void dodeliver(struct sctstr *);
-/* distribute.c */
-extern int dodistribute(struct sctstr *, int, double);
-/* finish.c */
-extern void finish_sects(int);
-/* human.c */
-extern int new_work(struct sctstr *, int);
-extern int do_feed(struct sctstr *, struct natstr *, short *, int *, int);
-extern int feed_people(short *, int);
-extern double food_needed(short *, int);
-extern int famine_victims(short *, int);
-/* land.c */
-extern int prod_land(int, int, struct bp *, int);
-/* main.c */
-/* in server.h */
-/* material.c */
-/* in budg.h */
-/* mobility.c */
-extern void mob_sect(void);
-extern void mob_ship(void);
-extern void mob_land(void);
-extern void mob_plane(void);
-extern void sct_do_upd_mob(struct sctstr *sp);
-extern void shp_do_upd_mob(struct shpstr *sp);
-extern void lnd_do_upd_mob(struct lndstr *lp);
-extern void pln_do_upd_mob(struct plnstr *pp);
-/* move_sat.c */
-extern void move_sat(struct plnstr *);
-/* nat.c */
-extern void prod_nat(int);
-/* nav_ship.c */
-extern int nav_ship(struct shpstr *);
-/* nav_util.c */
-extern int load_it(struct shpstr *, struct sctstr *, int);
-extern void unload_it(struct shpstr *);
-/* nxtitemp.c */
-/* in nsc.h */
-/* plague.c */
-extern void do_plague(struct sctstr *, struct natstr *, int);
-extern int plague_people(struct natstr *, short *, int *, int *, int);
-/* plane.c */
-extern int prod_plane(int, int, struct bp *, int);
-/* populace.c */
-extern void populace(struct natstr *, struct sctstr *, int);
-extern int total_work(int, int, int, int, int, int);
-/* prepare.c */
-extern void tax(struct sctstr *, struct natstr *, int, int *, int *,
-               int *, int *);
-extern int upd_slmilcosts(natid, int);
-extern void prepare_sects(int, struct bp *);
-extern int bank_income(struct sctstr *, int);
-/* produce.c */
-extern int produce(struct natstr *, struct sctstr *, short *, int, int,
-                  int, int *, int *);
-extern int prod_materials_cost(struct pchrstr *, short[], int *);
-extern int prod_resource_limit(struct pchrstr *, unsigned char *);
-extern double prod_eff(int, float);
-/* removewants.c */
-extern int update_removewants(void);
-/* revolt.c */
-extern void revolt(struct sctstr *);
-extern void guerrilla(struct sctstr *);
-/* sail.c */
-extern void sail_ship(natid);
-/* sect.c */
-extern void do_fallout(struct sctstr *, int);
-extern void spread_fallout(struct sctstr *, int);
-extern void decay_fallout(struct sctstr *, int);
-extern void produce_sect(int, int, struct bp *, int[][2]);
-/* ship.c */
-extern int prod_ship(int, int, struct bp *, int);
+/* in update.h */
 
 /*
  * src/server