From: Markus Armbruster Date: Tue, 17 Feb 2004 22:58:04 +0000 (+0000) Subject: Declare all configuration variables in optlist.h. Include that X-Git-Tag: v4.2.14~187 X-Git-Url: http://git.pond.sub.org/?p=empserver;a=commitdiff_plain;h=8cd0160176447fad9561cbc5deacba2cf9fccf32 Declare all configuration variables in optlist.h. Include that instead of declaring them all over the place. This uncovered type errors: (s_p_etu, adj_update): Defined long, sometimes declared int. Kills big endian machines where sizeof(long) != sizeof(int). Change to int. (set_option, delete_option, optstrset, intset, floatset, doubleset, longset, optionset, optiondel, worldxset): Change linkage to static. --- diff --git a/include/optlist.h b/include/optlist.h index a1bfe52ec..f1d86ff85 100644 --- a/include/optlist.h +++ b/include/optlist.h @@ -42,12 +42,6 @@ struct option_list { extern struct option_list Options[]; -extern void set_option(const char *key); -extern void delete_option(const char *key); - -extern int WORLD_X; -extern int WORLD_Y; - extern int opt_NO_FORT_FIRE; extern int opt_TREATIES; extern int opt_BRIDGETOWERS; @@ -99,23 +93,119 @@ extern int opt_INTERDICT_ATT; extern int opt_TECH_POP; extern int opt_ROLLOVER_AVAIL; -struct keymatch; /* forward decl */ - -/* function prototype for variable setting routines */ -typedef void KmFunc(struct keymatch * kp, s_char **av); - -/* current known routines */ -#if defined(__cplusplus) || (defined(__STDC__) &&__STDC__) -KmFunc optstrset, intset, floatset, doubleset, longset, - optionset, optiondel, worldxset; -#else -void optstrset(), intset(), floatset(), doubleset(), longset(), -optionset(), optiondel(), worldxset(); -#endif +extern s_char *datadir; +extern s_char *infodir; +extern s_char *loginport; +extern s_char *privname; +extern s_char *privlog; +extern int WORLD_X; +extern int WORLD_Y; +extern int update_policy; +extern int etu_per_update; +extern int s_p_etu; +extern int adj_update; +extern int update_window; +extern s_char *update_times; +extern int hourslop; +extern int blitz_time; +extern int update_demandpolicy; +extern int update_wantmin; +extern int update_missed; +extern s_char *update_demandtimes; +extern s_char *game_days; +extern s_char *game_hours; +extern float btu_build_rate; +extern int m_m_p_d; +extern int max_btus; +extern int max_idle; +extern int players_at_00; +extern int at_least_one_100; +extern double powe_cost; +extern int War_Cost; +extern float easy_tech; +extern float hard_tech; +extern float start_technology; +extern float start_happiness; +extern float start_research; +extern float start_education; +extern float level_age_rate; +extern float tech_log_base; +extern float ally_factor; +extern float edu_avg; +extern float hap_avg; +extern double edu_cons; +extern double hap_cons; +extern int startmob; +extern float sect_mob_scale; +extern int sect_mob_max; +extern int buil_bh; +extern double buil_bc; +extern double buil_bt; +extern int buil_tower_bh; +extern double buil_tower_bc; +extern double buil_tower_bt; +extern float land_mob_scale; +extern int land_grow_scale; +extern int land_mob_max; +extern double money_land; +extern int morale_base; +extern float plane_mob_scale; +extern int plane_grow_scale; +extern int plane_mob_max; +extern double money_plane; +extern float ship_mob_scale; +extern int ship_grow_scale; +extern int ship_mob_max; +extern double money_ship; +extern int torpedo_damage; +extern int fort_max_interdiction_range; +extern int land_max_interdiction_range; +extern int ship_max_interdiction_range; +extern double flakscale; +extern double combat_mob; +extern double people_damage; +extern double unit_damage; +extern double collateral_dam; +extern double assault_penalty; +extern float fire_range_factor; +extern int sect_mob_neg_factor; +extern double mission_mob_cost; +extern double uwbrate; +extern double money_civ; +extern double money_mil; +extern double money_res; +extern double money_uw; +extern double babyeat; +extern double bankint; +extern double eatrate; +extern double fcrate; +extern double fgrate; +extern double obrate; +extern double decay_per_etu; +extern double fallout_spread; +extern float drnuke_const; +extern int MARK_DELAY; +extern int TRADE_DELAY; +extern double maxmult; +extern double minmult; +extern double buytax; +extern double tradetax; +extern int trade_1_dist; +extern int trade_2_dist; +extern int trade_3_dist; +extern float trade_1; +extern float trade_2; +extern float trade_3; +extern float trade_ally_bonus; +extern float trade_ally_cut; +extern int fuel_mult; +extern int lost_items_timeout; +extern long last_demand_update; struct keymatch { s_char *km_key; /* the key */ - KmFunc *km_func; /* the function to call if matches */ + void (*km_func)(struct keymatch * kp, s_char **av); + /* the function to call if matches */ caddr_t km_data; /* associated data */ int km_flags; /* useful flags */ #define KM_ALLOC 0x01 /* memory allocated */ diff --git a/src/lib/commands/buil.c b/src/lib/commands/buil.c index b77bfc9d9..abd10ae26 100644 --- a/src/lib/commands/buil.c +++ b/src/lib/commands/buil.c @@ -80,8 +80,6 @@ extern int etu_per_update; int buil(void) { - extern double buil_bt; - extern double buil_tower_bt; struct sctstr sect; struct nstr_sect nstr; struct natstr *natp; @@ -100,7 +98,6 @@ buil(void) int gotsect = 0; int built; int hold, found, number = 1, x; - extern float drnuke_const; int asked = 0; s_char buf[1024]; @@ -652,8 +649,6 @@ build_land(register struct sctstr *sp, register struct lchrstr *lp, static int build_bridge(register struct sctstr *sp, register int *vec) { - extern int buil_bh; - extern double buil_bc; struct sctstr sect; int val; int newx, newy; @@ -1003,8 +998,6 @@ build_plane(register struct sctstr *sp, register struct plchrstr *pp, static int build_tower(register struct sctstr *sp, register int *vec) { - extern int buil_tower_bh; - extern double buil_tower_bc; struct sctstr sect; int val; int newx, newy; diff --git a/src/lib/commands/buy.c b/src/lib/commands/buy.c index 7dee3c92f..43e641180 100644 --- a/src/lib/commands/buy.c +++ b/src/lib/commands/buy.c @@ -78,8 +78,6 @@ buy(void) time_t now; double tally; double canspend; - extern double buytax; - extern double tradetax; s_char buf[1024]; if (!opt_MARKET) { @@ -224,7 +222,6 @@ buy(void) int check_market(void) { - extern double buytax; struct comstr comm; struct sctstr *sect; struct ichrstr *ip; diff --git a/src/lib/commands/edit.c b/src/lib/commands/edit.c index 6226ee2c7..beb3db008 100644 --- a/src/lib/commands/edit.c +++ b/src/lib/commands/edit.c @@ -690,7 +690,6 @@ static int docountry(s_char op, int arg, s_char *p, float farg, natid nat, struct natstr *np) { - extern int m_m_p_d; coord newx, newy; switch (op) { case 'n': diff --git a/src/lib/commands/fort.c b/src/lib/commands/fort.c index 07bb252e2..2517d9e42 100644 --- a/src/lib/commands/fort.c +++ b/src/lib/commands/fort.c @@ -43,6 +43,7 @@ #include "deity.h" #include "file.h" #include "commands.h" +#include "optlist.h" int fort(void) @@ -52,7 +53,6 @@ fort(void) struct lndstr land; int fort_amt, hard_amt; s_char *p; - extern int land_mob_max; s_char buf[1024]; if (!snxtitem(&ni, EF_LAND, player->argp[1])) diff --git a/src/lib/commands/info.c b/src/lib/commands/info.c index f3e34d3b3..b2f58a5d9 100644 --- a/src/lib/commands/info.c +++ b/src/lib/commands/info.c @@ -49,6 +49,7 @@ #include #endif #include "commands.h" +#include "optlist.h" #if 0 static int fileselect(struct dirent *dp); @@ -92,7 +93,6 @@ strnccmp(s_char *s1, s_char *s2, int n) int info(void) { - extern s_char *infodir; s_char buf[255]; FILE *fp; s_char *bp; @@ -272,7 +272,6 @@ printdir(void) int apro(void) { - extern s_char *infodir; FILE *fp; s_char *bp, *lbp; s_char *fbuf; diff --git a/src/lib/commands/look.c b/src/lib/commands/look.c index 5620493fd..f572df915 100644 --- a/src/lib/commands/look.c +++ b/src/lib/commands/look.c @@ -118,7 +118,6 @@ look_ship(register struct shpstr *lookship) register struct shpstr *sp; register struct mchrstr *smcp; register struct mchrstr *tmcp; - extern int ship_max_interdiction_range; struct sctstr sect; int range; int vrange; diff --git a/src/lib/commands/mark.c b/src/lib/commands/mark.c index d35ec1da5..f06d8af83 100644 --- a/src/lib/commands/mark.c +++ b/src/lib/commands/mark.c @@ -62,7 +62,6 @@ pr_mark(struct comstr *comm) { time_t now; double tleft; - extern int MARK_DELAY; (void)time(&now); tleft = MARK_DELAY / 3600.0 - (now - comm->com_markettime) / 3600.0; diff --git a/src/lib/commands/mfir.c b/src/lib/commands/mfir.c index 4b35da692..dca043313 100644 --- a/src/lib/commands/mfir.c +++ b/src/lib/commands/mfir.c @@ -780,7 +780,6 @@ quiet_bigdef(int attacker, struct emp_qelem *list, natid own, natid aown, struct sctstr firing; struct nstr_sect ns; struct flist *fp; - extern int torpedo_damage; int gun; if (own == 0) diff --git a/src/lib/commands/miss.c b/src/lib/commands/miss.c index 99b79f9a4..f6cc31142 100644 --- a/src/lib/commands/miss.c +++ b/src/lib/commands/miss.c @@ -50,6 +50,7 @@ #include "mission.h" #include "genitem.h" #include "commands.h" +#include "optlist.h" /* * mission [] @@ -67,10 +68,6 @@ mission(void) struct genitem *gp; int num = 0, mobmax, mobused, dist; struct nstr_item ni; - extern int ship_mob_max; - extern int land_mob_max; - extern int plane_mob_max; - extern double mission_mob_cost; s_char prompt[128]; s_char buf[1024]; diff --git a/src/lib/commands/mobq.c b/src/lib/commands/mobq.c index 08e108b03..cdd36c270 100644 --- a/src/lib/commands/mobq.c +++ b/src/lib/commands/mobq.c @@ -47,9 +47,6 @@ int mobq(void) { - extern int ship_mob_max; - extern float ship_mob_scale; - extern int etu_per_update; struct shpstr ship; s_char *cp, *oldmq; int good, mobquota, count = 0; diff --git a/src/lib/commands/mult.c b/src/lib/commands/mult.c index 3c51d5ae9..5abdbca59 100644 --- a/src/lib/commands/mult.c +++ b/src/lib/commands/mult.c @@ -79,8 +79,6 @@ mult(void) static void multsingle(natid us, natid them, struct natstr *natp) { - extern double minmult; - extern double maxmult; double price; s_char *p; s_char prompt[128]; diff --git a/src/lib/commands/nati.c b/src/lib/commands/nati.c index 842c5a266..0e9683f02 100644 --- a/src/lib/commands/nati.c +++ b/src/lib/commands/nati.c @@ -44,8 +44,6 @@ int nati(void) { - extern int etu_per_update; - extern double obrate, uwbrate; struct natstr *natp; struct sctstr sect; float hap; diff --git a/src/lib/commands/new.c b/src/lib/commands/new.c index 93b154197..80d21300c 100644 --- a/src/lib/commands/new.c +++ b/src/lib/commands/new.c @@ -64,9 +64,6 @@ static struct range defrealm = { -8, -5, 10, 5, 0, 0 }; int new(void) { - extern int max_btus; - extern int players_at_00; - extern int at_least_one_100; #ifdef START_UNITS extern int start_unit_type[START_UNITS]; #endif /* START_UNITS */ @@ -80,7 +77,6 @@ new(void) int i; s_char *p; int n; - extern int startmob; s_char buf[1024]; natp = getnatp(player->cnum); @@ -316,7 +312,6 @@ ok(s_char *map, int x, int y) static int deity_build_land(int type, coord x, coord y, natid own, int tlev) { - extern int land_mob_max; struct lndstr land; struct lchrstr *lp; struct nstr_item nstr; diff --git a/src/lib/commands/newe.c b/src/lib/commands/newe.c index 3f2175705..f9e1c6634 100644 --- a/src/lib/commands/newe.c +++ b/src/lib/commands/newe.c @@ -47,8 +47,6 @@ int newe(void) { - extern double obrate, uwbrate; - extern int etu_per_update; struct natstr *natp; struct sctstr sect; struct nstr_sect nstr; diff --git a/src/lib/commands/orde.c b/src/lib/commands/orde.c index b172c8aca..22f67dc49 100644 --- a/src/lib/commands/orde.c +++ b/src/lib/commands/orde.c @@ -333,8 +333,6 @@ orde(void) static void eta_calc(struct shpstr *sp, s_char *path, int *len, int *nupdates) { - extern int etu_per_update; - extern float ship_mob_scale; struct mchrstr *mcp; double mobcost, mobil; int i; diff --git a/src/lib/commands/payo.c b/src/lib/commands/payo.c index 8135157c9..3b0b92901 100644 --- a/src/lib/commands/payo.c +++ b/src/lib/commands/payo.c @@ -54,14 +54,6 @@ payo(void) struct mchrstr *mp; int dist; float cash = 0.0; - extern int trade_1_dist; /* less than this gets no money */ - extern int trade_2_dist; /* less than this gets trade_1 money */ - extern int trade_3_dist; /* less than this gets trade_2 money */ - extern float trade_1; /* return on trade_1 distance */ - extern float trade_2; /* return on trade_2 distance */ - extern float trade_3; /* return on trade_3 distance */ - extern float trade_ally_bonus; /* 20% bonus for trading with allies */ - if (!opt_TRADESHIPS) { pr("Tradeships are not enabled.\n"); diff --git a/src/lib/commands/powe.c b/src/lib/commands/powe.c index 039cced9a..ce27b66df 100644 --- a/src/lib/commands/powe.c +++ b/src/lib/commands/powe.c @@ -229,7 +229,6 @@ out5(double value, int round_val, int round_flag) static void gen_power(void) { - extern double powe_cost; float *f_ptr; float *f_pt2; register struct powstr *pow; diff --git a/src/lib/commands/prod.c b/src/lib/commands/prod.c index 1065454ec..21d2bffb3 100644 --- a/src/lib/commands/prod.c +++ b/src/lib/commands/prod.c @@ -68,8 +68,6 @@ count_pop(register int n) int prod(void) { - extern double obrate, uwbrate; - extern int etu_per_update; struct natstr *natp; struct sctstr sect; struct nstr_sect nstr; diff --git a/src/lib/commands/sate.c b/src/lib/commands/sate.c index 66fa81f77..aa6765503 100644 --- a/src/lib/commands/sate.c +++ b/src/lib/commands/sate.c @@ -43,11 +43,11 @@ #include "file.h" #include "nat.h" #include "commands.h" +#include "optlist.h" int sate(void) { - extern int plane_mob_max; double tech; int pln_uid; struct plnstr plane; diff --git a/src/lib/commands/scut.c b/src/lib/commands/scut.c index 24f799d1e..f3f242c29 100644 --- a/src/lib/commands/scut.c +++ b/src/lib/commands/scut.c @@ -58,14 +58,6 @@ union item_u { int scuttle_tradeship(struct shpstr *sp, int interactive) { - extern int trade_1_dist; /* less than this gets no money */ - extern int trade_2_dist; /* less than this gets trade_1 money */ - extern int trade_3_dist; /* less than this gets trade_2 money */ - extern float trade_1; /* return on trade_1 distance */ - extern float trade_2; /* return on trade_2 distance */ - extern float trade_3; /* return on trade_3 distance */ - extern float trade_ally_bonus; /* 20% bonus for trading with allies */ - extern float trade_ally_cut; /* 10% bonus for ally you trade with */ float cash = 0; float ally_cash = 0; int dist; diff --git a/src/lib/commands/show.c b/src/lib/commands/show.c index f9cfdb547..ff2729fdd 100644 --- a/src/lib/commands/show.c +++ b/src/lib/commands/show.c @@ -51,7 +51,6 @@ show(void) struct natstr *natp; int tlev; s_char buf[1024]; - extern float drnuke_const; int rlev; if (!(p = getstarg(player->argp[1], diff --git a/src/lib/commands/torp.c b/src/lib/commands/torp.c index d6b50b26a..495519f83 100644 --- a/src/lib/commands/torp.c +++ b/src/lib/commands/torp.c @@ -47,6 +47,7 @@ #include "retreat.h" #include "damage.h" #include "commands.h" +#include "optlist.h" static void anti_torp(int f, int ntorping, int vshipown); static int candchrg(struct shpstr *, struct shpstr *); @@ -61,7 +62,6 @@ s_char *prsub(struct shpstr *sp); int torp(void) { - extern int torpedo_damage; natid vshipown; int range; int dam; @@ -404,7 +404,6 @@ fire_dchrg(struct shpstr *sp, struct shpstr *targ, int range, int ntargets) static int fire_torp(struct shpstr *sp, struct shpstr *targ, int range, int ntargets) { - extern int torpedo_damage; int dam; int shells; double hitchance; diff --git a/src/lib/commands/trad.c b/src/lib/commands/trad.c index 0a0603379..a5f1fc441 100644 --- a/src/lib/commands/trad.c +++ b/src/lib/commands/trad.c @@ -78,8 +78,6 @@ trad(void) struct trdstr tmpt; union trdgenstr tg; int plflags; - extern double tradetax; - extern double buytax; double canspend; time_t now; int bid; @@ -308,7 +306,6 @@ check_trade(void) { int n; int j; - extern double tradetax; struct nstr_item ni; struct plnstr plane; struct lndstr land; diff --git a/src/lib/commands/upda.c b/src/lib/commands/upda.c index beca583c1..4541b2ee1 100644 --- a/src/lib/commands/upda.c +++ b/src/lib/commands/upda.c @@ -51,7 +51,6 @@ upda(void) FILE *fp; struct mob_acc_globals timestamps; extern int updating_mob; - extern int update_window; extern s_char *timestampfil; if (opt_MOB_ACCESS) { @@ -77,14 +76,6 @@ upda(void) if (opt_UPDATESCHED) { time_t now, next, delta; extern int update_time; - extern int update_policy; - extern int update_demandpolicy; - extern int update_wantmin; - extern int blitz_time; - extern s_char *update_times; - extern s_char *update_demandtimes; - extern s_char *game_days; - extern s_char *game_hours; if (updates_disabled()) pr("UPDATES ARE DISABLED!\n"); @@ -164,9 +155,6 @@ upda(void) return (0); } else { - extern int s_p_etu; - extern int etu_per_update; - extern int adj_update; time_t now; time_t upd_time; time_t next_update; diff --git a/src/lib/commands/vers.c b/src/lib/commands/vers.c index ed22a5887..55ce83675 100644 --- a/src/lib/commands/vers.c +++ b/src/lib/commands/vers.c @@ -52,44 +52,6 @@ extern float drnuke_const; int vers(void) { - extern int s_p_etu; - extern int etu_per_update; - extern int m_m_p_d; - extern int players_at_00; - extern float btu_build_rate; - extern double fgrate, fcrate; - extern double eatrate, babyeat; - extern double obrate, uwbrate; - extern double bankint; - extern double hap_cons, edu_cons; - extern double money_civ, money_uw, money_mil, money_res; - extern float hap_avg, edu_avg, ally_factor; - extern float level_age_rate; -/* extern float easy_tech, hard_tech, tech_log_base; */ - extern float easy_tech, tech_log_base; - extern int land_mob_max; - extern int land_grow_scale; - extern float land_mob_scale; - extern int sect_mob_max; - extern float sect_mob_scale; - extern int ship_mob_max; - extern float ship_mob_scale; - extern int ship_grow_scale; - extern int plane_mob_max; - extern float plane_mob_scale; - extern int plane_grow_scale; - extern int War_Cost; - extern float fire_range_factor; - extern int trade_1_dist; /* less than this gets no money */ - extern int trade_2_dist; /* less than this gets trade_1 money */ - extern int trade_3_dist; /* less than this gets trade_2 money */ - extern float trade_1; /* return on trade_1 distance */ - extern float trade_2; /* return on trade_2 distance */ - extern float trade_3; /* return on trade_3 distance */ - extern float trade_ally_bonus; /* 20% bonus for trading with allies */ - extern float trade_ally_cut; /* 10% bonus for ally you trade with */ - extern double tradetax; - extern double buytax; struct option_list *op; time_t now; diff --git a/src/lib/commands/work.c b/src/lib/commands/work.c index 3f7725103..e33a82b2d 100644 --- a/src/lib/commands/work.c +++ b/src/lib/commands/work.c @@ -55,7 +55,6 @@ work(void) struct lndstr land; int work_amt, eff_amt, w; s_char *p; - extern int land_mob_max; coord donex = 0, doney = 1; s_char buf[1024]; diff --git a/src/lib/common/damage.c b/src/lib/common/damage.c index b12c3c056..b8726f3df 100644 --- a/src/lib/common/damage.c +++ b/src/lib/common/damage.c @@ -102,7 +102,6 @@ void landdamage(struct lndstr *lp, int dam) { double damage_factor, m; - extern int land_mob_max; m = (double)land_mob_max; @@ -183,7 +182,6 @@ effdamage(register int amt, int dam) int commdamage(register int amt, int dam, int vtype) { - extern double people_damage; int lost; if (vtype == V_BAR && opt_SUPER_BARS) diff --git a/src/lib/common/hours.c b/src/lib/common/hours.c index f03644357..bd84ed6df 100644 --- a/src/lib/common/hours.c +++ b/src/lib/common/hours.c @@ -44,6 +44,7 @@ #include "keyword.h" #include "file.h" #include "common.h" +#include "optlist.h" #if defined(Rel4) || defined(_WIN32) #include @@ -59,7 +60,6 @@ int gamehours(time_t now, int *hour) { - extern s_char *game_days, *game_hours; extern struct tm *localtime(const time_t *); register s_char *bp; register struct tm *tm; diff --git a/src/lib/common/log.c b/src/lib/common/log.c index 34bee7d51..68f55fb3f 100644 --- a/src/lib/common/log.c +++ b/src/lib/common/log.c @@ -47,6 +47,7 @@ #include "deity.h" #include "player.h" #include "common.h" +#include "optlist.h" static s_char *logfile = 0; @@ -63,7 +64,6 @@ void loginit(void) { extern s_char program[]; - extern s_char *datadir; s_char buf[1024]; #if !defined(_WIN32) diff --git a/src/lib/common/sectdamage.c b/src/lib/common/sectdamage.c index d4c9964f0..6b3ae27a4 100644 --- a/src/lib/common/sectdamage.c +++ b/src/lib/common/sectdamage.c @@ -88,7 +88,6 @@ sect_damage(struct sctstr *sp, int dam, struct emp_qelem *list) int sectdamage(struct sctstr *sp, int dam, struct emp_qelem *list) { - extern double unit_damage; struct nstr_item ni; struct lndstr land; struct plnstr plane; diff --git a/src/lib/common/vlist.c b/src/lib/common/vlist.c index b0350bfc6..554ddd090 100644 --- a/src/lib/common/vlist.c +++ b/src/lib/common/vlist.c @@ -126,7 +126,6 @@ vl_damage(register int pct, register u_char *typevec, { register int i; register int lose; - extern double people_damage; if (pct >= 100) return 0; diff --git a/src/lib/common/wantupd.c b/src/lib/common/wantupd.c index ae67955b4..cb4185278 100644 --- a/src/lib/common/wantupd.c +++ b/src/lib/common/wantupd.c @@ -54,9 +54,6 @@ void update_policy_check(void) { - extern int update_policy, update_demandpolicy; - extern int update_wantmin, blitz_time; - if (update_policy < 0) update_policy = UDP_DEFAULT; if (update_policy > UDP_MAX) @@ -80,7 +77,6 @@ demand_update_time(time_t * now) s_char *p; int curtime; int hour[2]; - extern s_char *update_demandtimes; tm = localtime(now); curtime = tm->tm_min + tm->tm_hour * 60; @@ -98,9 +94,6 @@ demand_update_time(time_t * now) static void regular_update_time(time_t * now, time_t * tim, time_t * delta) { - extern int s_p_etu; - extern int etu_per_update; - extern int adj_update; s_char *p; time_t tw; int secs_per_update; @@ -119,8 +112,6 @@ scheduled_update_time(time_t * now, int *which) s_char *p, *p1; int curtime; int hour; - extern int hourslop; - extern s_char *update_times; *which = -1; p = update_times; @@ -146,7 +137,6 @@ next_scheduled_time(time_t * now, time_t * tim, time_t * delta) int curtime; int hour; int mintime; - extern s_char *update_times; p = update_times; if (*p == 0) @@ -197,12 +187,10 @@ demand_update_want(int *want, int *pop, int which) static int demand_check(void) { - extern int update_wantmin, update_missed; struct natstr *natp; int want, pop, cn, veto; time_t now; time_t cur; - extern long last_demand_update; time(&cur); @@ -278,8 +266,6 @@ demand_check(void) int demandupdatecheck(void) { - extern int update_demandpolicy; - if (UDDEM_COMSET != update_demandpolicy) { logerror("no demand update, not policy."); return (0); @@ -295,7 +281,6 @@ demandupdatecheck(void) int updatetime(time_t * now) { - extern int update_policy; int which; if (opt_BLITZ && update_policy == UDP_BLITZ) { @@ -333,9 +318,7 @@ next_update_time(time_t * now, time_t * tim, time_t * delta) /* Time of next update */ /* Seconds till next update */ { - extern int update_policy; time_t stim, sdelta; - extern int blitz_time; switch (update_policy) { case UDP_NORMAL: @@ -369,9 +352,7 @@ next_update_check_time(time_t * now, time_t * tim, time_t * delta) /* Time of next update */ /* Seconds till next update check */ { - extern int update_policy; time_t stim, sdelta; - extern int blitz_time; switch (update_policy) { case UDP_NORMAL: diff --git a/src/lib/gen/emp_config.c b/src/lib/gen/emp_config.c index 7d4a4fbaa..ecf0338e2 100644 --- a/src/lib/gen/emp_config.c +++ b/src/lib/gen/emp_config.c @@ -61,6 +61,7 @@ extern char *strdup(); #endif /* NOSTRDUP */ +#if 0 /* All the configurable variables ... */ extern s_char *infodir, *datadir, *loginport, *privname, *privlog; @@ -123,10 +124,20 @@ extern float start_technology, start_research; extern int trade_1_dist, trade_2_dist, trade_3_dist; extern float trade_1, trade_2, trade_3, trade_ally_bonus, trade_ally_cut; +#endif /* Dummy one */ static int emp_config_dummy; +static void optstrset(struct keymatch *kp, s_char **av); +static void intset(struct keymatch *kp, s_char **av); +static void floatset(struct keymatch *kp, s_char **av); +static void doubleset(struct keymatch *kp, s_char **av); +static void longset(struct keymatch *kp, s_char **av); +static void optionset(struct keymatch *kp, s_char **av); +static void optiondel(struct keymatch *kp, s_char **av); +static void worldxset(struct keymatch *kp, s_char **av); + /* things that can be changed */ struct keymatch configkeys[] = { {"", intset, (caddr_t)&emp_config_dummy, 0, @@ -502,7 +513,7 @@ keylookup(register s_char *command, struct keymatch *tbl) } /* worldx int setting function */ -void +static void worldxset(struct keymatch *kp, s_char **av) { int *intptr = (int *)kp->km_data; @@ -517,7 +528,7 @@ worldxset(struct keymatch *kp, s_char **av) } /* generic int setting function */ -void +static void intset(struct keymatch *kp, s_char **av) { int *intptr = (int *)kp->km_data; @@ -528,7 +539,7 @@ intset(struct keymatch *kp, s_char **av) } /* generic float set function */ -void +static void floatset(struct keymatch *kp, s_char **av) { float *floatptr = (float *)kp->km_data; @@ -541,7 +552,7 @@ floatset(struct keymatch *kp, s_char **av) /* generic string set function */ -void +static void optstrset(struct keymatch *kp, s_char **av) { s_char **confstrp = (s_char **)kp->km_data; @@ -555,7 +566,7 @@ optstrset(struct keymatch *kp, s_char **av) } /* generic double set function */ -void +static void doubleset(struct keymatch *kp, s_char **av) { double *doublep = (double *)kp->km_data; @@ -566,7 +577,7 @@ doubleset(struct keymatch *kp, s_char **av) } /* generic long set function */ -void +static void longset(struct keymatch *kp, s_char **av) { long int *longp = (long int *)kp->km_data; @@ -636,7 +647,7 @@ print_config(FILE * fp) /* add an option to the list */ -void +static void set_option(const char *s) { struct option_list *op; @@ -648,7 +659,7 @@ set_option(const char *s) } /* delete an option from the list */ -void +static void delete_option(const char *s) { struct option_list *op; @@ -660,7 +671,7 @@ delete_option(const char *s) } /* config interface */ -void +static void optionset(struct keymatch *kp, s_char **av) /* unused - we have a well known global */ { @@ -671,7 +682,7 @@ optionset(struct keymatch *kp, s_char **av) } /* config interface */ -void +static void optiondel(struct keymatch *kp, s_char **av) /* unused - we have a well known global */ { diff --git a/src/lib/global/constants.c b/src/lib/global/constants.c index 6895d50a9..191011ac5 100644 --- a/src/lib/global/constants.c +++ b/src/lib/global/constants.c @@ -48,9 +48,9 @@ int MARK_DELAY = 7200; /* Seconds to bid on commodities */ int TRADE_DELAY = 7200; /* Seconds to bid on units */ int m_m_p_d = 1440; /* max mins of play per day (per country) */ -long s_p_etu = DEF_S_P_ETU; /* seconds per Empire time unit */ +int s_p_etu = DEF_S_P_ETU; /* seconds per Empire time unit */ int etu_per_update = ETUS; /* # of etu's per update, from misc.h */ -long adj_update = 0; /* update time adjustment */ +int adj_update = 0; /* update time adjustment */ int update_window = 0; /* update window adjustment */ int hourslop = 5; /* amount of slop to match update times */ s_char *update_times = ""; /* times regular update is allowed */ diff --git a/src/lib/player/accept.c b/src/lib/player/accept.c index c6fff50b7..7c2141cfc 100644 --- a/src/lib/player/accept.c +++ b/src/lib/player/accept.c @@ -193,7 +193,6 @@ player_wakeup(struct player *pl) void player_accept(void *argv) { - extern s_char *loginport; struct sockaddr_in sin; struct servent *sp; int s; diff --git a/src/lib/player/dispatch.c b/src/lib/player/dispatch.c index 791c7212b..99b25a074 100644 --- a/src/lib/player/dispatch.c +++ b/src/lib/player/dispatch.c @@ -51,7 +51,6 @@ dispatch(s_char *buf, s_char *redir) { extern struct cmndstr player_coms[]; extern int update_pending; - extern int max_btus; struct natstr *np; struct cmndstr *command; int cmd; diff --git a/src/lib/player/init_nats.c b/src/lib/player/init_nats.c index 2c4b0ddec..ebf555113 100644 --- a/src/lib/player/init_nats.c +++ b/src/lib/player/init_nats.c @@ -74,9 +74,6 @@ init_nats(void) static int nat_cap(int btu) { - extern int s_p_etu; - extern int max_btus; - extern float btu_build_rate; struct sctstr sect; struct natstr *np; double d; diff --git a/src/lib/subs/attsub.c b/src/lib/subs/attsub.c index f40a8d840..a3865b665 100644 --- a/src/lib/subs/attsub.c +++ b/src/lib/subs/attsub.c @@ -2608,8 +2608,6 @@ static void take_move_in_mob(int combat_mode, struct llist *llp, struct combat *off, struct combat *def) { - extern int etu_per_update; - extern float land_mob_scale; int mobcost; int new; diff --git a/src/lib/subs/lndsub.c b/src/lib/subs/lndsub.c index 20c5c0ad6..55f8143da 100644 --- a/src/lib/subs/lndsub.c +++ b/src/lib/subs/lndsub.c @@ -58,7 +58,6 @@ extern int etu_per_update; int attack_val(int combat_mode, struct lndstr *lp) { - extern double assault_penalty; int men; int value; struct lchrstr *lcp; @@ -102,7 +101,6 @@ attack_val(int combat_mode, struct lndstr *lp) int defense_val(struct lndstr *lp) { - extern int land_mob_max; int men; double value; struct lchrstr *lcp; @@ -1359,7 +1357,6 @@ lnd_can_attack(struct lndstr *lp) int lnd_fortify (struct lndstr *lp, int hard_amt) { - extern int land_mob_max; int mob_used; int eng; diff --git a/src/lib/subs/mission.c b/src/lib/subs/mission.c index 1b61462d7..64593e011 100644 --- a/src/lib/subs/mission.c +++ b/src/lib/subs/mission.c @@ -119,7 +119,6 @@ ground_interdict(coord x, coord y, natid victim, s_char *s) int collateral_damage(coord x, coord y, int dam, struct emp_qelem *list) { - extern double collateral_dam; int coll; struct sctstr sect; @@ -439,8 +438,6 @@ static int perform_mission(coord x, coord y, natid victim, struct emp_qelem *list, int mission, s_char *s, int hardtarget) { - extern int land_max_interdiction_range; - extern int ship_max_interdiction_range; struct emp_qelem *qp, missiles, bombers, escorts, airp, b, e; struct emp_qelem *newqp; struct genlist *glp; @@ -456,7 +453,6 @@ perform_mission(coord x, coord y, natid victim, struct emp_qelem *list, natid plane_owner = 0; int gun, shell, md, air_dam = 0; double range2, prb, range, mobcost, hitchance; - extern int torpedo_damage; getsect(x, y, §); diff --git a/src/lib/subs/rej.c b/src/lib/subs/rej.c index 94472b68b..462eff937 100644 --- a/src/lib/subs/rej.c +++ b/src/lib/subs/rej.c @@ -55,7 +55,6 @@ setrel(natid us, natid them, int rel) int n_down = 0; s_char *addendum = 0; int theirrel; - extern int War_Cost; if (rel < AT_WAR) rel = AT_WAR; diff --git a/src/lib/subs/show.c b/src/lib/subs/show.c index 34e5dd65f..2772610bc 100644 --- a/src/lib/subs/show.c +++ b/src/lib/subs/show.c @@ -228,9 +228,6 @@ lookup(int key, struct lookup *table) void show_bridge(int tlev) { - extern double buil_bt, buil_bc; - extern int buil_bh; - if (tlev < buil_bt) return; pr("Bridges require %g tech,", buil_bt); @@ -246,9 +243,6 @@ show_bridge(int tlev) void show_tower(int tlev) { - extern double buil_tower_bt, buil_tower_bc; - extern int buil_tower_bh; - if (tlev < buil_tower_bt) return; pr("Bridge Towers require %g tech,", buil_tower_bt); @@ -273,7 +267,6 @@ show_nuke_build(int tlev) register struct nchrstr *np; register int n; register int avail; - extern float drnuke_const; if (opt_DRNUKE) pr("%13s lcm hcm oil rad avail tech res $\n", ""); @@ -309,7 +302,6 @@ show_nuke_capab(int tlev) register struct nchrstr *np; register int i, j, n; s_char *p; - extern float drnuke_const; if (opt_DRNUKE) pr("%13s blst dam lbs tech res $%7s abilities\n", "", ""); diff --git a/src/lib/subs/shpsub.c b/src/lib/subs/shpsub.c index a88e1cffa..6509700d3 100644 --- a/src/lib/subs/shpsub.c +++ b/src/lib/subs/shpsub.c @@ -630,7 +630,6 @@ static int shp_fort_interdiction(struct emp_qelem *list, coord newx, coord newy, natid victim) { - extern int fort_max_interdiction_range; struct nstr_sect ns; struct sctstr fsect; int trange; diff --git a/src/lib/subs/supply.c b/src/lib/subs/supply.c index b438a6a95..c0e42d081 100644 --- a/src/lib/subs/supply.c +++ b/src/lib/subs/supply.c @@ -123,8 +123,6 @@ resupply_commod(struct lndstr *lp, int type) } if (opt_FUEL && type == I_PETROL) { - extern float land_mob_scale; - extern int etu_per_update; int fuel_needed = (lp->lnd_fuelu * (((float)etu_per_update * land_mob_scale)) / 10.0); @@ -180,8 +178,6 @@ s_commod(int own, int x, int y, int type, int total_wanted, int can_move; double move_cost, weight, mobcost; int packing; - extern double eatrate; - extern int etu_per_update; struct dchrstr *dp; struct ichrstr *ip; s_char buf[1024]; @@ -484,9 +480,6 @@ get_minimum(struct lndstr *lp, int type) { struct lchrstr *lcp; int max, want = 0; - extern double eatrate; - extern int etu_per_update; - extern float land_mob_scale; lcp = &lchr[(int)lp->lnd_type]; max = vl_find(V_ITEM(type), lcp->l_vtype, lcp->l_vamt, (int)lcp->l_nv); diff --git a/src/lib/subs/takeover.c b/src/lib/subs/takeover.c index d6c6350ff..66e620f8b 100644 --- a/src/lib/subs/takeover.c +++ b/src/lib/subs/takeover.c @@ -64,8 +64,6 @@ takeover(register struct sctstr *sp, natid newown) struct nstr_item ni; struct plnstr p; struct lndstr land; - extern int etu_per_update; - extern int sect_mob_neg_factor; /* Wipe all the distribution info */ memset(vec, 0, sizeof(vec)); diff --git a/src/lib/update/age.c b/src/lib/update/age.c index 34b252412..0d9454836 100644 --- a/src/lib/update/age.c +++ b/src/lib/update/age.c @@ -36,11 +36,11 @@ #include "file.h" #include "update.h" #include "gen.h" +#include "optlist.h" void age_levels(int etu) { - extern float level_age_rate; register float best_tech; register float best_res; register struct natstr *np; diff --git a/src/lib/update/human.c b/src/lib/update/human.c index 19e2ed478..b39824366 100644 --- a/src/lib/update/human.c +++ b/src/lib/update/human.c @@ -65,7 +65,6 @@ int do_feed(register struct sctstr *sp, register struct natstr *np, int *vec, int *workp, int *bp, int etu) { - extern double eatrate; int people; int work_avail; int starved, sctwork; @@ -153,8 +152,6 @@ do_feed(register struct sctstr *sp, register struct natstr *np, int *vec, static int growfood(struct sctstr *sp, register int *vec, int work, int etu) { - extern double fgrate; - extern double fcrate; double food_fertil; double food_workers; double food; @@ -189,7 +186,6 @@ growfood(struct sctstr *sp, register int *vec, int work, int etu) int feed_people(register int *vec, int etu, int *needed) { - extern double eatrate; double food_eaten; double people_left; int can_eat; @@ -281,9 +277,6 @@ grow_people(struct sctstr *sp, register int etu, register struct natstr *np, int *workp, int sctwork, register int *vec) { - extern double obrate; - extern double uwbrate; - extern double babyeat; int newciv; int newuw; int new_birth; diff --git a/src/lib/update/land.c b/src/lib/update/land.c index e78a329be..f6ed81d8b 100644 --- a/src/lib/update/land.c +++ b/src/lib/update/land.c @@ -116,14 +116,12 @@ upd_land(register struct lndstr *lp, int landno, register int etus, struct natstr *np, int *bp, int build) /* build = 1, maintain = 0 */ { - extern int morale_base; struct lchrstr *lcp; int vec[I_MAX + 1]; int cvec[I_MAX + 1]; int n; int min = morale_base - (int)np->nat_level[NAT_HLEV]; int mult; - extern double money_land; int needed; int cost; int eff; @@ -244,7 +242,6 @@ static int landrepair(register struct lndstr *land, int *vec, struct natstr *np, int *bp, int etus) { - extern int land_grow_scale; register int delta; struct sctstr *sp; struct lchrstr *lp; @@ -369,7 +366,6 @@ int feed_land(struct lndstr *lp, register int *vec, int etus, int *needed, int doit) { - extern double eatrate; double food_eaten, ship_eaten; double people_left; int can_eat, need, svec[I_MAX + 1]; diff --git a/src/lib/update/main.c b/src/lib/update/main.c index b1aa0c136..99bc3ce77 100644 --- a/src/lib/update/main.c +++ b/src/lib/update/main.c @@ -68,8 +68,6 @@ static void do_prod(int, int, int, int *, long int (*)[2], int *, int *, void update_main(void *argv) { - extern int etu_per_update; - extern double money_res; int etu = etu_per_update; int n; int x; @@ -220,7 +218,6 @@ do_prod(int sector_type, int etu, int n, int *bp, long int (*p_sect)[2], int *ship_build, int *ship_maint, int *plane_build, int *plane_maint, int *land_build, int *land_maint) { - extern double money_mil; struct natstr *np; np = getnatp(n); diff --git a/src/lib/update/mobility.c b/src/lib/update/mobility.c index c2c0c578c..12bc80fa7 100644 --- a/src/lib/update/mobility.c +++ b/src/lib/update/mobility.c @@ -62,7 +62,6 @@ increase_mob(time_t * counter, float mult) time_t secs; time_t now; time_t left; - extern long s_p_etu; extern int updating_mob; int newetus; float newmob; @@ -156,7 +155,6 @@ update_all_mob(void) void sct_do_upd_mob(register struct sctstr *sp) { - extern float sect_mob_scale; int etus; if (do_upd_checking || timestamp_fixing || update_pending) @@ -176,7 +174,6 @@ sct_do_upd_mob(register struct sctstr *sp) void shp_do_upd_mob(register struct shpstr *sp) { - extern float ship_mob_scale; int etus; if (do_upd_checking || timestamp_fixing || update_pending) @@ -193,7 +190,6 @@ shp_do_upd_mob(register struct shpstr *sp) void lnd_do_upd_mob(register struct lndstr *lp) { - extern float land_mob_scale; int etus; if (do_upd_checking || timestamp_fixing || update_pending) @@ -211,7 +207,6 @@ lnd_do_upd_mob(register struct lndstr *lp) void pln_do_upd_mob(register struct plnstr *pp) { - extern float plane_mob_scale; int etus; if (do_upd_checking || timestamp_fixing || update_pending) @@ -246,8 +241,6 @@ mob_sect(register int etus) static void do_mob_sect(register struct sctstr *sp, register int etus) { - extern float sect_mob_scale; - extern int sect_mob_max; register int value; if (sp->sct_own == 0) @@ -286,13 +279,10 @@ mob_ship(register int etus) static void do_mob_ship(register struct shpstr *sp, register int etus) { - extern int ship_mob_max; - extern float ship_mob_scale; int newfuel = 0; register int value; int can_add, have_fuel_for, total_add; double d; - extern int fuel_mult; if (sp->shp_own == 0) return; @@ -399,13 +389,10 @@ mob_land(register int etus) static void do_mob_land(register struct lndstr *lp, register int etus) { - extern int land_mob_max; - extern float land_mob_scale; int newfuel = 0; register int value; int can_add, have_fuel_for, total_add; double d; - extern int fuel_mult; if (lp->lnd_own == 0) return; @@ -519,8 +506,6 @@ mob_plane(register int etus) static void do_mob_plane(register struct plnstr *pp, register int etus) { - extern int plane_mob_max; - extern float plane_mob_scale; register int value; if (pp->pln_own == 0) diff --git a/src/lib/update/nat.c b/src/lib/update/nat.c index 1b4f745fe..9c9656ad6 100644 --- a/src/lib/update/nat.c +++ b/src/lib/update/nat.c @@ -104,8 +104,6 @@ limit_level(double level, int type, int flag) /* * Begin ugly hack. */ - extern float easy_tech, tech_log_base; - level_easy[0] = easy_tech; level_log[0] = tech_log_base; /* @@ -132,7 +130,6 @@ prod_nat(int etu) { extern long money[MAXNOC]; extern long pops[MAXNOC]; - extern double hap_cons, edu_cons; extern long sea_money[MAXNOC]; extern long lnd_money[MAXNOC]; extern long air_money[MAXNOC]; diff --git a/src/lib/update/plane.c b/src/lib/update/plane.c index b016d2c92..30eb3a6a8 100644 --- a/src/lib/update/plane.c +++ b/src/lib/update/plane.c @@ -59,9 +59,6 @@ prod_plane(int etus, int natnum, int *bp, int buildem) /* Build = 1, maintain =0 */ { - extern double money_mil; - extern double money_plane; - extern int plane_grow_scale; extern long air_money[MAXNOC]; register struct plnstr *pp; register struct plchrstr *plp; diff --git a/src/lib/update/prepare.c b/src/lib/update/prepare.c index f8b05a395..f41c701a0 100644 --- a/src/lib/update/prepare.c +++ b/src/lib/update/prepare.c @@ -121,7 +121,6 @@ tax(struct sctstr *sp, struct natstr *np, int etu, long *pop, int *civ_tax, int *uw_tax, int *mil_pay) { int vec[I_MAX + 1]; - extern double money_civ, money_mil, money_uw; *civ_tax = 0; *uw_tax = 0; @@ -152,7 +151,6 @@ tax(struct sctstr *sp, struct natstr *np, int etu, long *pop, int *civ_tax, int upd_slmilcosts(natid n, int etu) { - extern double money_mil; struct shpstr *sp; struct lndstr *lp; int mil = 0; @@ -179,7 +177,6 @@ upd_slmilcosts(natid n, int etu) int bank_income(struct sctstr *sp, int etu) { - extern double bankint; int vec[I_MAX + 1]; if (getvec(VT_ITEM, vec, (s_char *)sp, EF_SECTOR) <= 0) diff --git a/src/lib/update/sect.c b/src/lib/update/sect.c index 23eeb3a03..8a2567e54 100644 --- a/src/lib/update/sect.c +++ b/src/lib/update/sect.c @@ -295,7 +295,6 @@ do_fallout(register struct sctstr *sp, register int etus) void spread_fallout(struct sctstr *sp, int etus) { - extern double fallout_spread; struct sctstr *ap; int tvec[I_MAX + 1]; int cvec[I_MAX + 1]; @@ -329,8 +328,6 @@ spread_fallout(struct sctstr *sp, int etus) void decay_fallout(struct sctstr *sp, int etus) { - extern double decay_per_etu; - extern double fallout_spread; int cvec[I_MAX + 1]; int decay; diff --git a/src/lib/update/ship.c b/src/lib/update/ship.c index eb474609a..c14ed35fb 100644 --- a/src/lib/update/ship.c +++ b/src/lib/update/ship.c @@ -126,7 +126,6 @@ upd_ship(register struct shpstr *sp, int shipno, register int etus, s_char *resource; int n; int mult; - extern double money_ship; int needed; int cost; int eff; @@ -267,7 +266,6 @@ static int shiprepair(register struct shpstr *ship, int *vec, struct natstr *np, int *bp, int etus) { - extern int ship_grow_scale; register int delta; struct sctstr *sp; struct mchrstr *mp; @@ -435,7 +433,6 @@ int feed_ship(struct shpstr *sp, register int *vec, int etus, int *needed, int doit) { - extern double eatrate; double food_eaten, land_eaten; double people_left; int ifood_eaten; diff --git a/src/server/idle.c b/src/server/idle.c index 209a605e4..e197dc851 100644 --- a/src/server/idle.c +++ b/src/server/idle.c @@ -37,12 +37,12 @@ #include "empthread.h" #include "proto.h" #include "prototypes.h" +#include "optlist.h" /*ARGSUSED*/ void player_kill_idle(void *argv) { - extern int max_idle; struct player *p; time_t now; diff --git a/src/server/lostitem.c b/src/server/lostitem.c index d14648e84..5defc990e 100644 --- a/src/server/lostitem.c +++ b/src/server/lostitem.c @@ -40,12 +40,12 @@ #include "lost.h" #include #include "prototypes.h" +#include "optlist.h" /*ARGSUSED*/ void delete_lostitems(void *argv) { - extern int lost_items_timeout; time_t now; struct loststr lost; int n; diff --git a/src/server/main.c b/src/server/main.c index d7e780cde..3ed013c3e 100644 --- a/src/server/main.c +++ b/src/server/main.c @@ -98,7 +98,6 @@ main(int argc, char **argv) int debug = 0; int op; char *config_file = NULL; - extern s_char *datadir; extern char *optarg; s_char tbuf[256]; #ifdef POSIXSIGNALS diff --git a/src/server/update.c b/src/server/update.c index cc2eb5878..0a183895b 100644 --- a/src/server/update.c +++ b/src/server/update.c @@ -49,10 +49,6 @@ time_t update_time; void update_sched(void *argv) { - extern int s_p_etu; - extern int etu_per_update; - extern int adj_update; - extern int update_window; s_char *kw; int hour[2]; int wind; diff --git a/src/util/fairland.c b/src/util/fairland.c index fa9fd328e..63c2f7230 100644 --- a/src/util/fairland.c +++ b/src/util/fairland.c @@ -185,7 +185,6 @@ main(int argc, char *argv[]) int opt; extern int optind; extern char *optarg; - extern s_char *datadir; char *config_file = NULL; char tbuf[512]; int i = 0; diff --git a/src/util/files.c b/src/util/files.c index f0eae78c2..5c71a32b7 100644 --- a/src/util/files.c +++ b/src/util/files.c @@ -75,7 +75,6 @@ main(int argc, char *argv[]) extern s_char *timestampfil; extern s_char *infodir; extern s_char *commfil; - extern s_char *datadir; s_char buf[255]; s_char tbuf[512]; s_char *filename;