]> git.pond.sub.org Git - empserver/commitdiff
include: Move update stuff from prototypes.h to update.h
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 18 Jun 2016 11:55:44 +0000 (13:55 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 6 Aug 2017 17:59:59 +0000 (19:59 +0200)
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
24 files changed:
include/prototypes.h
include/update.h
src/lib/commands/newe.c
src/lib/commands/prod.c
src/lib/commands/strv.c
src/lib/commands/work.c
src/lib/subs/land.c
src/lib/subs/plane.c
src/lib/subs/sect.c
src/lib/subs/ship.c
src/lib/subs/supply.c
src/lib/update/age.c
src/lib/update/anno.c
src/lib/update/deliver.c
src/lib/update/distribute.c
src/lib/update/finish.c
src/lib/update/human.c
src/lib/update/material.c
src/lib/update/mobility.c
src/lib/update/move_sat.c
src/lib/update/plague.c
src/lib/update/populace.c
src/lib/update/removewants.c
src/lib/update/revolt.c

index 8359a61089367a7fd539c02e065878be70914840..79b96ce639f571f48a810be572c1c78ee514841a 100644 (file)
@@ -642,76 +642,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 update.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 void do_feed(struct sctstr *, struct natstr *, 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 */
-extern int get_materials(struct sctstr *, short[], int);
-/* 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);
-/* nxtitemp.c */
-/* in nsc.h */
-/* plague.c */
-extern void do_plague(struct sctstr *, 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 sctstr *, int);
-extern int total_work(int, int, int, int, int, int);
-/* prepare.c */
-extern void tax(struct sctstr *, int, int *, int *, int *, int *);
-extern int upd_slmilcosts(natid, int);
-extern void prepare_sects(int);
-extern int bank_income(struct sctstr *, int);
-/* produce.c */
-extern int produce(struct natstr *, struct sctstr *, 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 *);
-/* sect.c */
-extern double buildeff(struct sctstr *);
-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(struct natstr *, int, struct bp *, int[][2]);
-/* ship.c */
-extern int prod_ship(int, int, struct bp *, int);
 
 /*
  * src/server
index 41eab3773dc840c4314718e363c3de0199e06f32..97982430dd30986ff7b61f99cebd3533fa822d90 100644 (file)
 #define SCT_MAINT (SCT_TYPE_MAX + 2)
 #define SCT_BUDG_MAX SCT_MAINT
 
-struct bp *bp_alloc(void);
-void bp_set_from_sect(struct bp *, struct sctstr *);
-void bp_to_sect(struct bp *, struct sctstr *);
-
+/* main.c */
 extern int money[MAXNOC];
 extern int pops[MAXNOC];
 extern int sea_money[MAXNOC];
 extern int lnd_money[MAXNOC];
 extern int air_money[MAXNOC];
 extern int tpops[MAXNOC];
+/* nat.c */
 extern float levels[MAXNOC][4];
 
+/* age.c */
+extern int age_people(int, int);
+extern void age_levels(int);
+/* anno.c */
+extern void delete_old_announcements(void);
+/* bp.c */
+extern struct bp *bp_alloc(void);
+extern void bp_set_from_sect(struct bp *, struct sctstr *);
+extern void bp_to_sect(struct bp *, struct sctstr *);
+/* 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 void do_feed(struct sctstr *, struct natstr *, 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 */
+extern int get_materials(struct sctstr *, short[], int);
+/* 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);
+/* nxtitemp.c */
+/* in nsc.h */
+/* plague.c */
+extern void do_plague(struct sctstr *, 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 sctstr *, int);
+extern int total_work(int, int, int, int, int, int);
+/* prepare.c */
+extern void tax(struct sctstr *, int, int *, int *, int *, int *);
+extern int upd_slmilcosts(natid, int);
+extern void prepare_sects(int);
+extern int bank_income(struct sctstr *, int);
+/* produce.c */
+extern int produce(struct natstr *, struct sctstr *, 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 *);
+/* sect.c */
+extern double buildeff(struct sctstr *);
+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(struct natstr *, int, struct bp *, int[][2]);
+/* ship.c */
+extern int prod_ship(int, int, struct bp *, int);
+
 #endif
index 08d8b22c0e0faf6704c2a07527ce5f5ffad096a8..af697d82ad45b266ced83c261c91fd21b1e4b111 100644 (file)
@@ -36,6 +36,7 @@
 #include "commands.h"
 #include "item.h"
 #include "optlist.h"
+#include "update.h"
 
 int
 newe(void)
index 21ab4e0d9d50ad49a11806e4f4edbba26664bb46..2fc5fa97df757365b1d3e3cf36d4a8ceae873dff 100644 (file)
@@ -38,6 +38,7 @@
 #include "item.h"
 #include "optlist.h"
 #include "product.h"
+#include "update.h"
 
 static void prprod(struct sctstr *, double, double, char,
                   double, double, double, char[], int[], int[], int);
index be0388b48021a547e090b74bf6e708fcab1173a8..b633ff49d3271ec4097fea349278135ea390ee8c 100644 (file)
@@ -38,6 +38,7 @@
 #include "land.h"
 #include "optlist.h"
 #include "ship.h"
+#include "update.h"
 
 static void starv_sects(char *range);
 static void starv_ships(char *range);
index 66fd45218a1968f652c96e5ee01eb6633f63f707..776132892a8e10162959c89d4537b4866c1d72ab 100644 (file)
@@ -36,6 +36,7 @@
 #include "commands.h"
 #include "land.h"
 #include "optlist.h"
+#include "update.h"
 
 int
 work(void)
index fccf0ff17861e0675a55d1517e14f14373b2e324..102786272ef13c3763b5ff59a0a3c72e9c6087eb 100644 (file)
@@ -41,6 +41,7 @@
 #include "player.h"
 #include "prototypes.h"
 #include "unit.h"
+#include "update.h"
 
 void
 lnd_postread(int n, void *ptr)
index a90c077310b307c9912e04b916b51e3386f537d3..a39560a21a9a1a0783583a37e87b0734c008596f 100644 (file)
@@ -42,6 +42,7 @@
 #include "player.h"
 #include "prototypes.h"
 #include "unit.h"
+#include "update.h"
 
 void
 pln_postread(int n, void *ptr)
index a006973351d5a5d3f541e9f67a3640bd5f2202a2..55e6c9e37011bd81ce5d536a9b5c55c3fb5eba69 100644 (file)
@@ -43,6 +43,7 @@
 #include "player.h"
 #include "prototypes.h"
 #include "sect.h"
+#include "update.h"
 #include "xy.h"
 
 void
index 2a4d4bcdf846e46ac9d4c27790d669d7f69eeeec..f3f6a04d9a176476f0c1b2ca853de248d66185ed 100644 (file)
@@ -42,6 +42,7 @@
 #include "prototypes.h"
 #include "ship.h"
 #include "unit.h"
+#include "update.h"
 
 void
 shp_postread(int n, void *ptr)
index 2e55f26c35a34508eafa9b8ebbe87bff3a7cfbf4..0874fee8da7971087952f6a47c86fb0ca98088b5 100644 (file)
@@ -43,6 +43,7 @@
 #include "prototypes.h"
 #include "sect.h"
 #include "ship.h"
+#include "update.h"
 
 static int s_commod(struct empobj *, short *, i_type, int, int, int);
 static int get_minimum(struct lndstr *, i_type);
index aa7e29f2e23925fc35f3672b7610e67a2058ca0b..78da8c5b5028cb3aaa349ab56dfdfb2e5b548c5d 100644 (file)
@@ -36,7 +36,7 @@
 #include "file.h"
 #include "nat.h"
 #include "optlist.h"
-#include "prototypes.h"
+#include "update.h"
 
 int
 age_people(int n, int etu)
index 6c3cfb5efcdd04b581ea60957bcc2857e1693294..4b15e71e3ac30b05227341b5d217a51089df3f2c 100644 (file)
@@ -44,6 +44,7 @@
 #include "optlist.h"
 #include "prototypes.h"
 #include "tel.h"
+#include "update.h"
 
 static int copy_and_expire(FILE *, FILE *, char *, time_t);
 static int copy_sink(char *, size_t, void *);
index ecb06508634a451c0fa1aeed7a3ac87c7c13a3b8..f2f8e31ffd9fcb073d41f57108a41fc440ca57f5 100644 (file)
@@ -39,6 +39,7 @@
 #include "plague.h"
 #include "sect.h"
 #include "prototypes.h"
+#include "update.h"
 
 #define DELIVER_BONUS 4.0
 
index 803dcf7b568340e930e1443e259adccd71612fbc..4d659a6c3ac69cdd217c67994054607bb77023d3 100644 (file)
@@ -42,6 +42,7 @@
 #include "plague.h"
 #include "prototypes.h"
 #include "sect.h"
+#include "update.h"
 
 #ifdef DISTRIBUTE_DEBUG
 #define DPRINTF(fmt, ...) ((void)printf(fmt , ## __VA_ARGS__))
index a0bc18aa038af77af37cf9ee2688ab46c2c88e75..668a261e720dce413bddcabed747689f12d0799f 100644 (file)
@@ -44,6 +44,7 @@
 #include "path.h"
 #include "sect.h"
 #include "prototypes.h"
+#include "update.h"
 
 static void assemble_dist_paths(double *);
 
index 07b30a791919e58c479ecf9d7ac8d07202c16055..f5469e01632f83d1faa51b6991ca3891617d3e7c 100644 (file)
@@ -43,6 +43,7 @@
 #include "player.h"
 #include "prototypes.h"
 #include "sect.h"
+#include "update.h"
 #include "xy.h"
 
 static int new_work(struct sctstr *, int);
index 5860a7e0d13abe0957c274a4d2a924e9847c54f2..e6f6c555d5a92a304e0b0b4dcd7eb48bf328dcf3 100644 (file)
@@ -35,7 +35,7 @@
 
 #include "chance.h"
 #include "sect.h"
-#include "prototypes.h"
+#include "update.h"
 
 /*
  * Get build materials from sector @sp.
index 5b764187010906dd39047a600c3ad34d5803e84f..3d7829b08635f67ac1b1b1c3eb006b5a58686dd9 100644 (file)
 #include "land.h"
 #include "optlist.h"
 #include "plane.h"
-#include "prototypes.h"
 #include "sect.h"
 #include "server.h"
 #include "ship.h"
+#include "update.h"
 
 static int do_upd_checking;
 
index 95690a062d5aeae8d005ca01757ecebf157b2625..10878e211e9d0b59a8c1d3adfb116ccce7bd65e4 100644 (file)
@@ -40,6 +40,7 @@
 #include "plane.h"
 #include "prototypes.h"
 #include "sect.h"
+#include "update.h"
 
 #ifndef PI
 #define PI     3.14159265358979323846
index fcb79a44987b0400b3562eaeeaa486498776e81c..306ee6a3b487b44e6d94dd526464b3a49b6345d5 100644 (file)
@@ -43,6 +43,7 @@
 #include "plague.h"
 #include "prototypes.h"
 #include "sect.h"
+#include "update.h"
 
 static int infect_people(struct natstr *, struct sctstr *);
 
index 89f95046d8b41d9b6f807f262d239668813dd41d..a593151d93110dbc1fa53476961820b19aab8bb5 100644 (file)
@@ -40,6 +40,7 @@
 #include "prototypes.h"
 #include "nat.h"
 #include "sect.h"
+#include "update.h"
 
 void
 populace(struct sctstr *sp, int etu)
index eb04bf4775e755adc3fe79a060b3f0070dd1d298..fd557cc682e8482b777039c48d4134484659bf12 100644 (file)
@@ -34,7 +34,7 @@
 
 #include "file.h"
 #include "nat.h"
-#include "prototypes.h"
+#include "update.h"
 
 int
 update_removewants(void)
index bedfc96e43d1d3f90b37c05191936c38b4fe444d..94b2dfcd4ba7b2452e99c5cb6c2cced71da474e1 100644 (file)
@@ -46,6 +46,7 @@
 #include "plane.h"
 #include "prototypes.h"
 #include "sect.h"
+#include "update.h"
 
 static void take_casualties(struct sctstr *, int);
 static void lnd_dies_fighting_che(struct lndstr *);