include: Move update stuff from prototypes.h to update.h
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
2e7efd1e9b
commit
893093f999
24 changed files with 97 additions and 77 deletions
|
@ -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
|
||||
|
|
|
@ -40,16 +40,87 @@
|
|||
#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
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include "commands.h"
|
||||
#include "item.h"
|
||||
#include "optlist.h"
|
||||
#include "update.h"
|
||||
|
||||
int
|
||||
newe(void)
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include "commands.h"
|
||||
#include "land.h"
|
||||
#include "optlist.h"
|
||||
#include "update.h"
|
||||
|
||||
int
|
||||
work(void)
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
#include "player.h"
|
||||
#include "prototypes.h"
|
||||
#include "unit.h"
|
||||
#include "update.h"
|
||||
|
||||
void
|
||||
lnd_postread(int n, void *ptr)
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
#include "player.h"
|
||||
#include "prototypes.h"
|
||||
#include "unit.h"
|
||||
#include "update.h"
|
||||
|
||||
void
|
||||
pln_postread(int n, void *ptr)
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
#include "player.h"
|
||||
#include "prototypes.h"
|
||||
#include "sect.h"
|
||||
#include "update.h"
|
||||
#include "xy.h"
|
||||
|
||||
void
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
#include "prototypes.h"
|
||||
#include "ship.h"
|
||||
#include "unit.h"
|
||||
#include "update.h"
|
||||
|
||||
void
|
||||
shp_postread(int n, void *ptr)
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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 *);
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
#include "plague.h"
|
||||
#include "sect.h"
|
||||
#include "prototypes.h"
|
||||
#include "update.h"
|
||||
|
||||
#define DELIVER_BONUS 4.0
|
||||
|
||||
|
|
|
@ -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__))
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
#include "path.h"
|
||||
#include "sect.h"
|
||||
#include "prototypes.h"
|
||||
#include "update.h"
|
||||
|
||||
static void assemble_dist_paths(double *);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
#include "chance.h"
|
||||
#include "sect.h"
|
||||
#include "prototypes.h"
|
||||
#include "update.h"
|
||||
|
||||
/*
|
||||
* Get build materials from sector @sp.
|
||||
|
|
|
@ -39,10 +39,10 @@
|
|||
#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;
|
||||
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
#include "plane.h"
|
||||
#include "prototypes.h"
|
||||
#include "sect.h"
|
||||
#include "update.h"
|
||||
|
||||
#ifndef PI
|
||||
#define PI 3.14159265358979323846
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
#include "plague.h"
|
||||
#include "prototypes.h"
|
||||
#include "sect.h"
|
||||
#include "update.h"
|
||||
|
||||
static int infect_people(struct natstr *, struct sctstr *);
|
||||
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
#include "prototypes.h"
|
||||
#include "nat.h"
|
||||
#include "sect.h"
|
||||
#include "update.h"
|
||||
|
||||
void
|
||||
populace(struct sctstr *sp, int etu)
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
#include "file.h"
|
||||
#include "nat.h"
|
||||
#include "prototypes.h"
|
||||
#include "update.h"
|
||||
|
||||
int
|
||||
update_removewants(void)
|
||||
|
|
|
@ -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 *);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue