Break inclusion cycles. To simplify the change, move a few
declarations to other, no less sensible places.
This commit is contained in:
parent
858839f063
commit
afa65c8f27
18 changed files with 193 additions and 189 deletions
|
@ -57,178 +57,4 @@
|
||||||
|
|
||||||
#include "prototypes.h" /* must come at end, after defines and typedefs */
|
#include "prototypes.h" /* must come at end, after defines and typedefs */
|
||||||
|
|
||||||
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 cede(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 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 fuel(void);
|
|
||||||
int give(void);
|
|
||||||
int grin(void);
|
|
||||||
int hard(void);
|
|
||||||
int head(void);
|
|
||||||
int hidd(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 lrange(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 mobupdate(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 offs(void);
|
|
||||||
int orde(void);
|
|
||||||
int orig(void);
|
|
||||||
int para(void);
|
|
||||||
int path(void);
|
|
||||||
int payo(void);
|
|
||||||
int pboa(void);
|
|
||||||
int pdump(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 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 wai(void);
|
|
||||||
int wall(void);
|
|
||||||
int wing(void);
|
|
||||||
int wipe(void);
|
|
||||||
int work(void);
|
|
||||||
int xdump(void);
|
|
||||||
int zdon(void);
|
|
||||||
|
|
||||||
#endif /* _COMMANDS_H_ */
|
#endif /* _COMMANDS_H_ */
|
||||||
|
|
|
@ -121,6 +121,4 @@ void empth_sem_signal(empth_sem_t *);
|
||||||
void empth_sem_wait(empth_sem_t *);
|
void empth_sem_wait(empth_sem_t *);
|
||||||
void empth_alarm(int);
|
void empth_alarm(int);
|
||||||
|
|
||||||
|
|
||||||
#include "prototypes.h" /* must come at end, after defines and typedefs */
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -56,6 +56,9 @@ struct lonstr {
|
||||||
#define LS_PROPOSED 1
|
#define LS_PROPOSED 1
|
||||||
#define LS_SIGNED 2
|
#define LS_SIGNED 2
|
||||||
|
|
||||||
|
extern long get_outstand(int);
|
||||||
|
extern double loan_owed(struct lonstr *loan, time_t paytime);
|
||||||
|
|
||||||
#define getloan(n, lp) \
|
#define getloan(n, lp) \
|
||||||
ef_read(EF_LOAN, n, lp)
|
ef_read(EF_LOAN, n, lp)
|
||||||
#define putloan(n, lp) \
|
#define putloan(n, lp) \
|
||||||
|
|
|
@ -100,6 +100,4 @@ void lwpStatus(struct lwpProc *proc, char *format, ...)
|
||||||
|
|
||||||
extern struct lwpProc *LwpCurrent;
|
extern struct lwpProc *LwpCurrent;
|
||||||
|
|
||||||
#include "prototypes.h" /* must come at end, after defines and typedefs */
|
|
||||||
|
|
||||||
#endif /* _LWP_H_ */
|
#endif /* _LWP_H_ */
|
||||||
|
|
|
@ -35,6 +35,8 @@
|
||||||
#ifndef _OPTLIST_H_
|
#ifndef _OPTLIST_H_
|
||||||
#define _OPTLIST_H_
|
#define _OPTLIST_H_
|
||||||
|
|
||||||
|
#include "nsc.h"
|
||||||
|
|
||||||
struct option_list {
|
struct option_list {
|
||||||
char *opt_key;
|
char *opt_key;
|
||||||
int *opt_valuep;
|
int *opt_valuep;
|
||||||
|
|
|
@ -94,6 +94,4 @@ struct player {
|
||||||
#define PP_ACCEPT 3
|
#define PP_ACCEPT 3
|
||||||
#define PP_KILLIDLE 2
|
#define PP_KILLIDLE 2
|
||||||
|
|
||||||
#include "prototypes.h" /* must come at end, after defines and typedefs */
|
|
||||||
|
|
||||||
#endif /* _PLAYER_H_ */
|
#endif /* _PLAYER_H_ */
|
||||||
|
|
|
@ -34,6 +34,8 @@
|
||||||
#ifndef _PRODUCT_H_
|
#ifndef _PRODUCT_H_
|
||||||
#define _PRODUCT_H_
|
#define _PRODUCT_H_
|
||||||
|
|
||||||
|
#include "item.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Maximum number of product constituents.
|
* Maximum number of product constituents.
|
||||||
* Beware, some output formats rely on MAXPRCON <= 3!
|
* Beware, some output formats rely on MAXPRCON <= 3!
|
||||||
|
|
|
@ -35,15 +35,12 @@
|
||||||
#ifndef _PROTOTYPES_H_
|
#ifndef _PROTOTYPES_H_
|
||||||
#define _PROTOTYPES_H_
|
#define _PROTOTYPES_H_
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "empthread.h"
|
#include "empthread.h"
|
||||||
#include "player.h"
|
#include "player.h"
|
||||||
#include "commands.h"
|
#include "commands.h"
|
||||||
#include "common.h"
|
#include "product.h"
|
||||||
#include "gen.h"
|
|
||||||
#include "global.h"
|
|
||||||
#include "subs.h"
|
|
||||||
#include "update.h"
|
|
||||||
#include "empio.h"
|
#include "empio.h"
|
||||||
#include "commodity.h"
|
#include "commodity.h"
|
||||||
|
|
||||||
|
@ -86,7 +83,180 @@ extern s_char *prsub(struct shpstr *);
|
||||||
extern int check_trade(void);
|
extern int check_trade(void);
|
||||||
extern int ontradingblock(int, int *);
|
extern int ontradingblock(int, int *);
|
||||||
extern void trdswitchown(int, int *, int);
|
extern void trdswitchown(int, int *, int);
|
||||||
/* more in commands.h */
|
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 cede(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 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 fuel(void);
|
||||||
|
int give(void);
|
||||||
|
int grin(void);
|
||||||
|
int hard(void);
|
||||||
|
int head(void);
|
||||||
|
int hidd(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 lrange(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 mobupdate(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 offs(void);
|
||||||
|
int orde(void);
|
||||||
|
int orig(void);
|
||||||
|
int para(void);
|
||||||
|
int path(void);
|
||||||
|
int payo(void);
|
||||||
|
int pboa(void);
|
||||||
|
int pdump(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 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 wai(void);
|
||||||
|
int wall(void);
|
||||||
|
int wing(void);
|
||||||
|
int wipe(void);
|
||||||
|
int work(void);
|
||||||
|
int xdump(void);
|
||||||
|
int xedit(void);
|
||||||
|
int zdon(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* src/lib/common/ *.c
|
* src/lib/common/ *.c
|
||||||
|
|
|
@ -37,6 +37,7 @@
|
||||||
#ifndef _SHIP_H_
|
#ifndef _SHIP_H_
|
||||||
#define _SHIP_H_
|
#define _SHIP_H_
|
||||||
|
|
||||||
|
#include "item.h"
|
||||||
#include "queue.h"
|
#include "queue.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "retreat.h"
|
#include "retreat.h"
|
||||||
|
|
|
@ -78,8 +78,6 @@ extern s_char *trade_nameof(struct trdstr *, union trdgenstr *);
|
||||||
extern int trade_desc(struct trdstr *, union trdgenstr *);
|
extern int trade_desc(struct trdstr *, union trdgenstr *);
|
||||||
extern int trade_getitem(struct trdstr *, union trdgenstr *);
|
extern int trade_getitem(struct trdstr *, union trdgenstr *);
|
||||||
extern long get_couval(int);
|
extern long get_couval(int);
|
||||||
extern long get_outstand(int);
|
|
||||||
extern double loan_owed(struct lonstr *loan, time_t paytime);
|
|
||||||
|
|
||||||
#define gettrade(n, p) \
|
#define gettrade(n, p) \
|
||||||
ef_read(EF_TRADE, n, p)
|
ef_read(EF_TRADE, n, p)
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
* Steve McClure, 1998
|
* Steve McClure, 1998
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
#include "as.h"
|
#include "as.h"
|
||||||
#include "optlist.h"
|
#include "optlist.h"
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
#include "file.h"
|
#include "file.h"
|
||||||
#include "sect.h"
|
#include "sect.h"
|
||||||
#include "plane.h"
|
#include "plane.h"
|
||||||
|
#include "commands.h"
|
||||||
|
|
||||||
int
|
int
|
||||||
pboa(void)
|
pboa(void)
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
#include "land.h"
|
#include "land.h"
|
||||||
#include "nsc.h"
|
#include "nsc.h"
|
||||||
#include "file.h"
|
#include "file.h"
|
||||||
|
#include "commands.h"
|
||||||
|
|
||||||
int
|
int
|
||||||
sabo(void)
|
sabo(void)
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
#include "news.h"
|
#include "news.h"
|
||||||
#include "nsc.h"
|
#include "nsc.h"
|
||||||
#include "optlist.h"
|
#include "optlist.h"
|
||||||
|
#include "commands.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Dump everything under the sun
|
* Dump everything under the sun
|
||||||
|
|
|
@ -37,6 +37,7 @@
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "optlist.h"
|
#include "optlist.h"
|
||||||
|
#include "prototypes.h"
|
||||||
|
|
||||||
static char *weekday(char *str, int *wday);
|
static char *weekday(char *str, int *wday);
|
||||||
static char *daytime(char *str, int *min);
|
static char *daytime(char *str, int *min);
|
||||||
|
|
|
@ -39,7 +39,6 @@
|
||||||
#include "file.h"
|
#include "file.h"
|
||||||
#include "empio.h"
|
#include "empio.h"
|
||||||
#include "power.h"
|
#include "power.h"
|
||||||
#include "common.h"
|
|
||||||
#include "gen.h"
|
#include "gen.h"
|
||||||
#include "optlist.h"
|
#include "optlist.h"
|
||||||
|
|
||||||
|
|
|
@ -32,9 +32,12 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "file.h"
|
#include "file.h"
|
||||||
|
#include "ship.h"
|
||||||
#include "plane.h"
|
#include "plane.h"
|
||||||
|
#include "prototypes.h"
|
||||||
|
|
||||||
int
|
int
|
||||||
on_shiplist(short uid, struct shiplist *head)
|
on_shiplist(short uid, struct shiplist *head)
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
#include "file.h"
|
#include "file.h"
|
||||||
#include "match.h"
|
#include "match.h"
|
||||||
#include "nsc.h"
|
#include "nsc.h"
|
||||||
|
#include "prototypes.h"
|
||||||
|
|
||||||
static int nstr_promote(int valtype);
|
static int nstr_promote(int valtype);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue