Break inclusion cycle: prototypes.h and commands.h included each
other. Ensure headers in include/ can be included in any order (except for econfig-spec.h, which is special). New header types.h to help avoid inclusion cycles. Sort include directives. Remove some superflous includes.
This commit is contained in:
parent
16a0869bb0
commit
e42053d928
373 changed files with 1193 additions and 2516 deletions
|
@ -33,12 +33,7 @@
|
|||
|
||||
#include <config.h>
|
||||
|
||||
#include "misc.h"
|
||||
#include "nat.h"
|
||||
#include "file.h"
|
||||
#include "update.h"
|
||||
#include "gen.h"
|
||||
#include "optlist.h"
|
||||
|
||||
void
|
||||
age_levels(int etu)
|
||||
|
|
|
@ -36,17 +36,10 @@
|
|||
|
||||
#include <config.h>
|
||||
|
||||
#include "misc.h"
|
||||
#include "tel.h"
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
#if !defined(_WIN32)
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include "tel.h"
|
||||
#include "update.h"
|
||||
#include "optlist.h"
|
||||
#include "common.h"
|
||||
|
||||
static int copy_and_expire(FILE *annfp, FILE *tmpfp,
|
||||
char *tmp_filename, time_t expiry_time);
|
||||
|
|
|
@ -33,13 +33,8 @@
|
|||
|
||||
#include <config.h>
|
||||
|
||||
#include "misc.h"
|
||||
#include "nat.h"
|
||||
#include "sect.h"
|
||||
#include "budg.h"
|
||||
#include "update.h"
|
||||
#include "common.h"
|
||||
#include "optlist.h"
|
||||
|
||||
static int bud_key[I_MAX + 2] =
|
||||
{ 1, 2, 3, 4, 0, 0, 0, 0, 0, 0, 5, 6, 0, 0, 7 };
|
||||
|
|
|
@ -33,16 +33,10 @@
|
|||
|
||||
#include <config.h>
|
||||
|
||||
#include "misc.h"
|
||||
#include "plague.h"
|
||||
#include "sect.h"
|
||||
#include "item.h"
|
||||
#include "path.h"
|
||||
#include "file.h"
|
||||
#include "xy.h"
|
||||
#include "plague.h"
|
||||
#include "update.h"
|
||||
#include "subs.h"
|
||||
#include "common.h"
|
||||
|
||||
#define DELIVER_BONUS 4.0
|
||||
|
||||
|
|
|
@ -34,20 +34,12 @@
|
|||
|
||||
#include <config.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "misc.h"
|
||||
#include "plague.h"
|
||||
#include "nat.h"
|
||||
#include "sect.h"
|
||||
#include "item.h"
|
||||
#include "xy.h"
|
||||
#include "path.h"
|
||||
#include "file.h"
|
||||
#include "distribute.h"
|
||||
#include "update.h"
|
||||
#include "subs.h"
|
||||
#include "common.h"
|
||||
#include "item.h"
|
||||
#include "path.h"
|
||||
#include "plague.h"
|
||||
#include "prototypes.h"
|
||||
#include "update.h"
|
||||
|
||||
#define EXPORT_BONUS 10.0
|
||||
#define IMPORT_BONUS 10.0
|
||||
|
|
|
@ -35,16 +35,10 @@
|
|||
|
||||
#include <config.h>
|
||||
|
||||
#include "misc.h"
|
||||
#include "sect.h"
|
||||
#include "nat.h"
|
||||
#include "file.h"
|
||||
#include "xy.h"
|
||||
#include "path.h"
|
||||
#include "distribute.h"
|
||||
#include "path.h"
|
||||
#include "update.h"
|
||||
#include "common.h"
|
||||
#include "optlist.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
/* Used for building up distribution info */
|
||||
struct distinfo {
|
||||
|
|
|
@ -35,20 +35,13 @@
|
|||
|
||||
#include <config.h>
|
||||
|
||||
#include <math.h>
|
||||
#include "misc.h"
|
||||
#include "sect.h"
|
||||
#include "nat.h"
|
||||
#include "budg.h"
|
||||
#include "item.h"
|
||||
#include "news.h"
|
||||
#include "xy.h"
|
||||
#include "optlist.h"
|
||||
#include "budg.h"
|
||||
#include "player.h"
|
||||
#include "update.h"
|
||||
#include "common.h"
|
||||
#include "gen.h"
|
||||
#include "subs.h"
|
||||
#include "xy.h"
|
||||
#include <math.h>
|
||||
|
||||
static int growfood(struct sctstr *, short *, int, int);
|
||||
static int starve_some(short *, i_type, int);
|
||||
|
|
|
@ -36,24 +36,15 @@
|
|||
|
||||
#include <config.h>
|
||||
|
||||
#include <math.h>
|
||||
#include "misc.h"
|
||||
#include "plague.h"
|
||||
#include "sect.h"
|
||||
#include "nat.h"
|
||||
#include "land.h"
|
||||
#include "ship.h"
|
||||
#include "news.h"
|
||||
#include "file.h"
|
||||
#include "optlist.h"
|
||||
#include "budg.h"
|
||||
#include "player.h"
|
||||
#include "update.h"
|
||||
#include "land.h"
|
||||
#include "lost.h"
|
||||
#include "common.h"
|
||||
#include "subs.h"
|
||||
#include "common.h"
|
||||
#include "gen.h"
|
||||
#include "news.h"
|
||||
#include "plague.h"
|
||||
#include "player.h"
|
||||
#include "ship.h"
|
||||
#include "update.h"
|
||||
#include <math.h>
|
||||
|
||||
static void landrepair(struct lndstr *, struct natstr *, int *, int);
|
||||
static void upd_land(struct lndstr *, int, struct natstr *, int *, int);
|
||||
|
|
|
@ -35,23 +35,12 @@
|
|||
|
||||
#include <config.h>
|
||||
|
||||
#include "misc.h"
|
||||
#include "nat.h"
|
||||
#include "file.h"
|
||||
#include "sect.h"
|
||||
#include "player.h"
|
||||
#include "empthread.h"
|
||||
#include "budg.h"
|
||||
#include "player.h"
|
||||
#include "update.h"
|
||||
#include "common.h"
|
||||
#include "optlist.h"
|
||||
#include "empthread.h"
|
||||
#include "journal.h"
|
||||
#include "player.h"
|
||||
#include "server.h"
|
||||
#include <stdlib.h>
|
||||
#if !defined(_WIN32)
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
#include "update.h"
|
||||
|
||||
long money[MAXNOC];
|
||||
long pops[MAXNOC];
|
||||
|
|
|
@ -33,13 +33,9 @@
|
|||
|
||||
#include <config.h>
|
||||
|
||||
#include "misc.h"
|
||||
#include "sect.h"
|
||||
#include "budg.h"
|
||||
#include "player.h"
|
||||
#include "update.h"
|
||||
#include "common.h"
|
||||
#include "subs.h"
|
||||
|
||||
void
|
||||
get_materials(struct sctstr *sp, int *bp, int *mvec, int check)
|
||||
|
|
|
@ -34,19 +34,11 @@
|
|||
|
||||
#include <config.h>
|
||||
|
||||
#include "misc.h"
|
||||
#include "sect.h"
|
||||
#include "ship.h"
|
||||
#include "land.h"
|
||||
#include "plane.h"
|
||||
#include "nat.h"
|
||||
#include "file.h"
|
||||
#include "optlist.h"
|
||||
#include "update.h"
|
||||
#include "gen.h"
|
||||
#include "subs.h"
|
||||
#include "optlist.h"
|
||||
#include "server.h"
|
||||
#include "ship.h"
|
||||
#include "update.h"
|
||||
|
||||
|
||||
int updating_mob = 1;
|
||||
|
|
|
@ -34,17 +34,10 @@
|
|||
#include <config.h>
|
||||
|
||||
#include <math.h>
|
||||
#include "misc.h"
|
||||
#include "plane.h"
|
||||
#include "sect.h"
|
||||
#include "xy.h"
|
||||
#include "nsc.h"
|
||||
#include "nat.h"
|
||||
#include "path.h"
|
||||
#include "file.h"
|
||||
#include "plane.h"
|
||||
#include "update.h"
|
||||
#include "subs.h"
|
||||
#include "optlist.h"
|
||||
|
||||
#ifndef PI
|
||||
#define PI 3.14159265358979323846
|
||||
|
|
|
@ -35,16 +35,9 @@
|
|||
#include <config.h>
|
||||
|
||||
#include <math.h>
|
||||
#include "misc.h"
|
||||
#include "sect.h"
|
||||
#include "nat.h"
|
||||
#include "item.h"
|
||||
#include "file.h"
|
||||
#include "xy.h"
|
||||
#include "optlist.h"
|
||||
#include "update.h"
|
||||
#include "subs.h"
|
||||
#include "budg.h"
|
||||
#include "item.h"
|
||||
#include "update.h"
|
||||
|
||||
/*
|
||||
* hap and edu avg mean that the weight on current happiness is
|
||||
|
|
|
@ -34,23 +34,13 @@
|
|||
|
||||
#include <config.h>
|
||||
|
||||
#include "misc.h"
|
||||
|
||||
#include <ctype.h>
|
||||
#include "ship.h"
|
||||
#include "sect.h"
|
||||
#include "xy.h"
|
||||
#include "nsc.h"
|
||||
#include "nat.h"
|
||||
#include "path.h"
|
||||
#include "file.h"
|
||||
#include "item.h"
|
||||
#include "optlist.h"
|
||||
#include "player.h"
|
||||
#include "nsc.h"
|
||||
#include "path.h"
|
||||
#include "ship.h"
|
||||
#include "update.h"
|
||||
#include "subs.h"
|
||||
#include "common.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
static void swap(struct shpstr *);
|
||||
|
||||
|
|
|
@ -33,26 +33,15 @@
|
|||
|
||||
#include <config.h>
|
||||
|
||||
#include "misc.h"
|
||||
|
||||
#include <ctype.h>
|
||||
#include "plague.h"
|
||||
#include "ship.h"
|
||||
#include "plane.h"
|
||||
#include "land.h"
|
||||
#include "sect.h"
|
||||
#include "xy.h"
|
||||
#include "nsc.h"
|
||||
#include "nat.h"
|
||||
#include "path.h"
|
||||
#include "file.h"
|
||||
#include "item.h"
|
||||
#include "optlist.h"
|
||||
#include "player.h"
|
||||
#include "land.h"
|
||||
#include "nsc.h"
|
||||
#include "path.h"
|
||||
#include "plague.h"
|
||||
#include "plane.h"
|
||||
#include "ship.h"
|
||||
#include "update.h"
|
||||
#include "subs.h"
|
||||
#include "common.h"
|
||||
#include "gen.h"
|
||||
|
||||
/* load a specific ship given its
|
||||
* location and what field to modify.
|
||||
|
|
|
@ -33,16 +33,11 @@
|
|||
|
||||
#include <config.h>
|
||||
|
||||
#include "misc.h"
|
||||
#include "xy.h"
|
||||
#include "ship.h"
|
||||
#include "empobj.h"
|
||||
#include "land.h"
|
||||
#include "nsc.h"
|
||||
#include "file.h"
|
||||
#include "player.h"
|
||||
#include "ship.h"
|
||||
#include "update.h"
|
||||
#include "gen.h"
|
||||
#include "common.h"
|
||||
|
||||
void *
|
||||
nxtitemp(struct nstr_item *np)
|
||||
|
|
|
@ -33,20 +33,11 @@
|
|||
|
||||
#include <config.h>
|
||||
|
||||
#include "misc.h"
|
||||
#include "plague.h"
|
||||
#include "sect.h"
|
||||
#include "nat.h"
|
||||
#include "item.h"
|
||||
#include "news.h"
|
||||
#include "file.h"
|
||||
#include "xy.h"
|
||||
#include "optlist.h"
|
||||
#include "update.h"
|
||||
#include "common.h"
|
||||
#include "subs.h"
|
||||
#include "lost.h"
|
||||
#include "gen.h"
|
||||
#include "news.h"
|
||||
#include "plague.h"
|
||||
#include "update.h"
|
||||
|
||||
static int infect_people(struct natstr *, struct sctstr *);
|
||||
|
||||
|
|
|
@ -35,20 +35,12 @@
|
|||
|
||||
#include <config.h>
|
||||
|
||||
#include "misc.h"
|
||||
#include "sect.h"
|
||||
#include "plane.h"
|
||||
#include "ship.h"
|
||||
#include "nat.h"
|
||||
#include "file.h"
|
||||
#include "optlist.h"
|
||||
#include "budg.h"
|
||||
#include "player.h"
|
||||
#include "update.h"
|
||||
#include "lost.h"
|
||||
#include "subs.h"
|
||||
#include "common.h"
|
||||
#include "gen.h"
|
||||
#include "plane.h"
|
||||
#include "player.h"
|
||||
#include "ship.h"
|
||||
#include "update.h"
|
||||
|
||||
static void planerepair(struct plnstr *, struct natstr *, int *, int);
|
||||
static void upd_plane(struct plnstr *, int, struct natstr *, int *, int);
|
||||
|
|
|
@ -33,18 +33,10 @@
|
|||
|
||||
#include <config.h>
|
||||
|
||||
#include "misc.h"
|
||||
#include "sect.h"
|
||||
#include "nat.h"
|
||||
#include "file.h"
|
||||
#include "path.h"
|
||||
#include "xy.h"
|
||||
#include "land.h"
|
||||
#include "update.h"
|
||||
#include "subs.h"
|
||||
#include "gen.h"
|
||||
#include "common.h"
|
||||
#include "lost.h"
|
||||
#include "path.h"
|
||||
#include "update.h"
|
||||
|
||||
void
|
||||
populace(struct natstr *np, struct sctstr *sp, int etu)
|
||||
|
|
|
@ -35,21 +35,13 @@
|
|||
|
||||
#include <config.h>
|
||||
|
||||
#include "misc.h"
|
||||
#include "sect.h"
|
||||
#include "nat.h"
|
||||
#include "item.h"
|
||||
#include "file.h"
|
||||
#include "xy.h"
|
||||
#include "path.h"
|
||||
#include "optlist.h"
|
||||
#include "budg.h"
|
||||
#include "item.h"
|
||||
#include "land.h"
|
||||
#include "path.h"
|
||||
#include "player.h"
|
||||
#include "ship.h"
|
||||
#include "land.h"
|
||||
#include "update.h"
|
||||
#include "gen.h"
|
||||
#include "common.h"
|
||||
|
||||
void
|
||||
prepare_sects(int etu, int *bp)
|
||||
|
|
|
@ -33,18 +33,10 @@
|
|||
|
||||
#include <config.h>
|
||||
|
||||
#include "misc.h"
|
||||
#include "sect.h"
|
||||
#include "product.h"
|
||||
#include "nat.h"
|
||||
#include "xy.h"
|
||||
#include "player.h"
|
||||
#include "update.h"
|
||||
#include "gen.h"
|
||||
#include "subs.h"
|
||||
#include "common.h"
|
||||
#include "optlist.h"
|
||||
#include "budg.h"
|
||||
#include "player.h"
|
||||
#include "product.h"
|
||||
#include "update.h"
|
||||
|
||||
static void materials_charge(struct pchrstr *, short *, int);
|
||||
static int materials_cost(struct pchrstr *, short *, int *);
|
||||
|
|
|
@ -33,9 +33,6 @@
|
|||
|
||||
#include <config.h>
|
||||
|
||||
#include "misc.h"
|
||||
#include "nat.h"
|
||||
#include "file.h"
|
||||
#include "update.h"
|
||||
|
||||
int
|
||||
|
|
|
@ -34,21 +34,13 @@
|
|||
|
||||
#include <config.h>
|
||||
|
||||
#include "misc.h"
|
||||
#include "sect.h"
|
||||
#include "nat.h"
|
||||
#include "news.h"
|
||||
#include "file.h"
|
||||
#include "path.h"
|
||||
#include "xy.h"
|
||||
#include "land.h"
|
||||
#include "lost.h"
|
||||
#include "news.h"
|
||||
#include "nsc.h"
|
||||
#include "path.h"
|
||||
#include "plane.h"
|
||||
#include "update.h"
|
||||
#include "common.h"
|
||||
#include "gen.h"
|
||||
#include "lost.h"
|
||||
#include "subs.h"
|
||||
|
||||
static void take_casualties(struct sctstr *, int);
|
||||
|
||||
|
|
|
@ -36,19 +36,11 @@
|
|||
|
||||
#include <config.h>
|
||||
|
||||
#include "misc.h"
|
||||
#include "sect.h"
|
||||
#include <math.h>
|
||||
#include "nsc.h"
|
||||
#include "path.h"
|
||||
#include "ship.h"
|
||||
#include "file.h"
|
||||
#include "nat.h"
|
||||
#include "xy.h"
|
||||
#include "nsc.h"
|
||||
#include "update.h"
|
||||
#include "subs.h"
|
||||
#include "common.h"
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
static void fltp_to_list(struct fltheadstr *, struct emp_qelem *);
|
||||
|
||||
|
|
|
@ -34,24 +34,15 @@
|
|||
|
||||
#include <config.h>
|
||||
|
||||
#include "misc.h"
|
||||
#include "sect.h"
|
||||
#include "nat.h"
|
||||
#include "item.h"
|
||||
#include "file.h"
|
||||
#include "xy.h"
|
||||
#include "path.h"
|
||||
#include "product.h"
|
||||
#include "optlist.h"
|
||||
#include "budg.h"
|
||||
#include "player.h"
|
||||
#include "item.h"
|
||||
#include "land.h"
|
||||
#include "lost.h"
|
||||
#include "path.h"
|
||||
#include "player.h"
|
||||
#include "product.h"
|
||||
#include "ship.h"
|
||||
#include "update.h"
|
||||
#include "subs.h"
|
||||
#include "common.h"
|
||||
#include "lost.h"
|
||||
#include "gen.h"
|
||||
|
||||
/*
|
||||
* Increase sector efficiency if old type == new type.
|
||||
|
|
|
@ -37,25 +37,15 @@
|
|||
#include <config.h>
|
||||
|
||||
#include <math.h>
|
||||
#include "misc.h"
|
||||
#include "plague.h"
|
||||
#include "sect.h"
|
||||
#include "nat.h"
|
||||
#include "ship.h"
|
||||
#include "news.h"
|
||||
#include "file.h"
|
||||
#include "product.h"
|
||||
#include "land.h"
|
||||
#include "xy.h"
|
||||
#include "nsc.h"
|
||||
#include "optlist.h"
|
||||
#include "player.h"
|
||||
#include "update.h"
|
||||
#include "common.h"
|
||||
#include "subs.h"
|
||||
#include "gen.h"
|
||||
#include "lost.h"
|
||||
#include "budg.h"
|
||||
#include "land.h"
|
||||
#include "lost.h"
|
||||
#include "news.h"
|
||||
#include "plague.h"
|
||||
#include "player.h"
|
||||
#include "product.h"
|
||||
#include "ship.h"
|
||||
#include "update.h"
|
||||
|
||||
static void shiprepair(struct shpstr *, struct natstr *, int *, int);
|
||||
static void upd_ship(struct shpstr *, int, struct natstr *, int *, int);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue