]> git.pond.sub.org Git - empserver/commitdiff
Add some missing declarations to headers. Remove some redundant
authorMarkus Armbruster <armbru@pond.sub.org>
Fri, 20 Feb 2004 10:51:03 +0000 (10:51 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Fri, 20 Feb 2004 10:51:03 +0000 (10:51 +0000)
declarations elsewhere.  Change linkage of some functions to static.

43 files changed:
include/nsc.h
include/optlist.h
src/doconfig/doconfig.c
src/lib/commands/add.c
src/lib/commands/anti.c
src/lib/commands/budg.c
src/lib/commands/buil.c
src/lib/commands/buy.c
src/lib/commands/expl.c
src/lib/commands/info.c
src/lib/commands/load.c
src/lib/commands/mora.c
src/lib/commands/new.c
src/lib/commands/strv.c
src/lib/commands/torp.c
src/lib/commands/trad.c
src/lib/commands/vers.c
src/lib/common/tfact.c
src/lib/gen/emp_config.c
src/lib/gen/io.c
src/lib/lwp/arch.c
src/lib/lwp/lwp.c
src/lib/lwp/lwpint.h
src/lib/player/player.c
src/lib/subs/detonate.c
src/lib/subs/fileinit.c
src/lib/subs/fortdef.c
src/lib/subs/list.c
src/lib/subs/lndsub.c
src/lib/subs/rej.c
src/lib/subs/retreat.c
src/lib/subs/satmap.c
src/lib/subs/shpsub.c
src/lib/subs/takeover.c
src/lib/update/finish.c
src/lib/update/main.c
src/lib/update/nat.c
src/lib/update/nav_ship.c
src/lib/update/prepare.c
src/lib/update/sect.c
src/server/main.c
src/server/update.c
src/util/fairland.c

index 15493c77eeab2e239000e933f4dc41517734ec74..6c381975756e92a1eeb16e9964292966c63059ed 100644 (file)
@@ -153,6 +153,7 @@ extern struct castr loan_ca[];
 extern struct castr genitem_ca[];
 extern struct castr map_ca[];
 extern struct castr bmp_ca[];
+extern struct castr lost_ca[];
 extern struct castr commodity_ca[];
 
 /* src/lib/subs/nstr.c */
index e099d56242924961aa2343fa61150a7f236383b5..bc722685c0ce5d1d1b37c986506bafd7a3859ba5 100644 (file)
@@ -205,6 +205,10 @@ extern long last_demand_update;
 
 /* Game parameters that cannot be set in econfig (yet) */
 extern int melt_item_denom[];
+extern float start_education;
+extern float start_happiness;
+extern float start_technology;
+extern float start_research;
 #ifdef START_UNITS
 int start_unit_type[];
 #endif
@@ -219,6 +223,7 @@ extern s_char *commfil;
 extern s_char *banfil;
 extern s_char *authfil;
 extern s_char *timestampfil;
+/* teldir, telfil, annfil are in tel.h */
 
 struct keymatch {
     s_char *km_key;            /* the key */
index 7c9c87caf0081ac35e9f09415faa37510d295755..46b1b809d954e2e3b7cff0c42999a1c32ade6580 100644 (file)
 #endif
 #include <string.h>
 
-void wrmakesrc(char *pathname);
-void wripglob(char *filename);
-void wrauth(char *filename);
-void wrgamesdef(char *filename);
+static void wrmakesrc(char *pathname);
+static void wripglob(char *filename);
+static void wrauth(char *filename);
+static void wrgamesdef(char *filename);
 
 char *_c_copyright_header =
     "/*\n *  Empire - A multi-player, client/server Internet based war game.\n *  Copyright (C) 1986-2000, Dave Pare, Jeff Bailey, Thomas Ruschak,\n *                           Ken Stevens, Steve McClure\n *\n *  This program is free software; you can redistribute it and/or modify\n *  it under the terms of the GNU General Public License as published by\n *  the Free Software Foundation; either version 2 of the License, or\n *  (at your option) any later version.\n *\n *  This program is distributed in the hope that it will be useful,\n *  but WITHOUT ANY WARRANTY; without even the implied warranty of\n *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n *  GNU General Public License for more details.\n *\n *  You should have received a copy of the GNU General Public License\n *  along with this program; if not, write to the Free Software\n *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\n *\n *  ---\n *\n *  See the \"LEGAL\", \"LICENSE\", \"CREDITS\" and \"README\" files for all the\n *  related information and legal notices. It is expected that any future\n *  projects/authors will amend these files as needed.\n *\n *  ---\n *\n *  gamesdef.h: This is an auto-generated file.\n * \n *  Known contributors to this file:\n *     Automatically generated by doconfig.c\n */\n\n";
@@ -105,7 +105,7 @@ main(void)
     exit(0);
 }
 
-void
+static void
 wrmakesrc(char *pathname)
 {
     FILE *fp;
@@ -123,7 +123,7 @@ wrmakesrc(char *pathname)
     fclose(fp);
 }
 
-void
+static void
 wripglob(char *filename)
 {
     FILE *fp;
@@ -140,7 +140,7 @@ wripglob(char *filename)
     fclose(fp);
 }
 
-void
+static void
 wrauth(char *filename)
 {
     FILE *fp;
@@ -166,7 +166,7 @@ wrauth(char *filename)
     fclose(fp);
 }
 
-void
+static void
 wrgamesdef(char *filename)
 {
     FILE *fp;
index 53090a4b4dbbdf38b9981a99d6b7899c4c8db69d..5b45d1bf2c33723cef025067dd737508f198f6a8 100644 (file)
@@ -44,9 +44,7 @@
 #include "tel.h"
 #include "land.h"
 #include "commands.h"
-
-extern float start_education, start_happiness;
-extern float start_technology, start_research;
+#include "optlist.h"
 
 int
 add(void)
index bc62b9d50e1212be679f92a69996a428996beed3..18bddedb9c141b73632faf1a0de68eb77713196b 100644 (file)
@@ -48,8 +48,6 @@
 #include "commands.h"
 #include "optlist.h"
 
-extern int etu_per_update;
-extern int sect_mob_neg_factor;
 /*
  * format: anti <SECT>
  */
index 097d9be0674cf38fddc448dd9607cdb03e1a5caf..97a8eba7e09c142d8823d541e2a4b094cd156414 100644 (file)
 #define MIN(x,y)       ((x) > (y) ? (y) : (x))
 #endif
 
-extern int etu_per_update;
-extern double bankint;
-extern double money_civ;
-extern double money_uw;
-extern double money_mil;
-extern double obrate, uwbrate;
-extern int etu_per_update;
-extern double money_res;
-
 static void calc_all(long int (*p_sect)[2], int *taxes, int *Ncivs,
                     int *Nuws, int *bars, int *Nbars, int *mil,
                     int *ships, int *sbuild, int *nsbuild, int *smaint,
index 5ce4308ebf9ecbcb81c86a2670a4ea8d3c38b213..caeb39e7a5aeb980e0145376e0d1108a29df3930 100644 (file)
@@ -68,10 +68,6 @@ static int build_plane(register struct sctstr *sp,
 
 static int cash;               /* static ok */
 
-extern int morale_base;
-extern int sect_mob_neg_factor;
-extern int etu_per_update;
-
 /*
  * build <WHAT> <SECTS> <TYPE|DIR|MEG> [NUMBER]
  */
index 43e641180d7b37ba13f1590772e071d3e00c9518..ac8fd5cd74cb7a05c2823e473b0e1876cd713540 100644 (file)
@@ -54,8 +54,6 @@
 #include "commands.h"
 #include "optlist.h"
 
-extern int MARK_DELAY;
-
 /*
  * format: buy <COMMODITY>
  *
index 5e13cc693e97037b1f7edae557386628b411736e..a5a60385cf1225f1d5b52df02d6259dea3507c49 100644 (file)
@@ -46,9 +46,6 @@
 
 static int explore_map(s_char *what, coord curx, coord cury, s_char *arg);
 
-extern int etu_per_update;
-extern int sect_mob_neg_factor;
-
 int
 explore(void)
 {
index b2f58a5d9c51b4df6e78d3b866d1eaf0d71557bc..7862276268167f7b165c09c4bd1859cc1b82af08 100644 (file)
@@ -235,7 +235,6 @@ printdir(void)
     extern int alphasort(const struct dirent *const *,
                         const struct dirent *const *);
 #endif
-    extern s_char *infodir;
     static time_t lastmodtime;
     static int number;
     static struct dirent **dp;
@@ -369,7 +368,6 @@ apro(void)
 int
 info(void)
 {
-    extern s_char *infodir;
     s_char buf[255];
     FILE *fp;
     s_char *bp;
@@ -441,7 +439,6 @@ info(void)
 static int
 printdir(void)
 {
-    extern s_char *infodir;
     HANDLE hDir;
     WIN32_FIND_DATA fData;
     int count;
@@ -473,7 +470,6 @@ printdir(void)
 int
 apro(void)
 {
-    extern s_char *infodir;
     HANDLE hDir;
     WIN32_FIND_DATA fData;
     FILE *fp;
index 5d2cb8bbeef57a54e2e169c4f32d39eb50e3116e..e5ce00292776f393983c48d2a5eec93fa8daa138 100644 (file)
@@ -55,7 +55,6 @@
 #define        LOAD    1
 #define        UNLOAD  -1
 
-void gift(int givee, int giver, s_char *ptr, int type, s_char *mesg);
 static int load_plane_ship(struct sctstr *sectp, struct shpstr *sp,
                           int noisy, int load_unload, int *nshipsp);
 static int load_land_ship(struct sctstr *sectp, struct shpstr *sp,
index 6d77f57971ff19e3d0612f99b8d5d90b1f8e293c..e4c3b933595343fdcea48a807f03ea64d0dff333 100644 (file)
@@ -41,8 +41,7 @@
 #include "nat.h"
 #include "deity.h"
 #include "commands.h"
-
-extern int morale_base;
+#include "optlist.h"
 
 int
 morale(void)
index 80d21300c596f26ca49808c44d5e8d19324ac2e1..e651c0b87b64bfd7fb3d045071cfc6ebd333eeb3 100644 (file)
 #include <fcntl.h>
 #include <math.h>
 
-extern float start_education, start_happiness;
-extern float start_technology, start_research;
-extern int morale_base;
-
 static int deity_build_land(int, coord, coord, natid, int);
 static int isok(int x, int y);
 static void ok(s_char *map, int x, int y);
@@ -64,9 +60,6 @@ static struct range defrealm = { -8, -5, 10, 5, 0, 0 };
 int
 new(void)
 {
-#ifdef START_UNITS
-    extern int start_unit_type[START_UNITS];
-#endif /* START_UNITS */
     struct sctstr sect;
     struct natstr *natp;
     struct boundstr newrealms;
index d473fdc8f17a98776eecc78e129d79c807f982aa..00205e6739ec651c917a49eccf5fe696ed859fb5 100644 (file)
@@ -48,7 +48,6 @@
 #include "land.h"
 #include "commands.h"
 
-extern int etu_per_update;
 static void starv_sects(s_char *range);
 static void starv_ships(s_char *range);
 static void starv_units(s_char *range);
index 495519f83e824a2a3d69ce78047fec7ba2a10b2b..c6ca72e1fae603b72a36be1b7437e3e9c0507034 100644 (file)
@@ -57,8 +57,6 @@ static void fire_dchrg(struct shpstr *sp, struct shpstr *targ, int range,
                       int ntargets);
 static int fire_torp(struct shpstr *, struct shpstr *, int, int);
 
-s_char *prsub(struct shpstr *sp);
-
 int
 torp(void)
 {
index a5f1fc441d0fcab4c182fa17a82a3acc94be3df8..a05f6461637fd294f2def61394283447e46ecd64 100644 (file)
 #include "commands.h"
 #include "optlist.h"
 
-extern int sect_mob_neg_factor;
-extern int etu_per_update;
-extern int TRADE_DELAY;
-
 /*
  * format: trade
  */
index 55ce836750b81b3b458a015ea705d9696f0c22a1..76efe3f810a88501a7251bd482c12e2a6f26594b 100644 (file)
@@ -47,8 +47,6 @@
 #include "optlist.h"
 #include "commands.h"
 
-extern float drnuke_const;
-
 int
 vers(void)
 {
index 934a7a5c6c28d8b9a4f136d971ae61540bbfabea..c6ee0a4470e0e7acf4fe288aa6080cfea3be8365 100644 (file)
@@ -34,8 +34,7 @@
 #include "misc.h"
 #include "nat.h"
 #include "file.h"
-
-extern float fire_range_factor;
+#include "optlist.h"
 
 double
 tfact(natid cn, double mult)
index 6b544d99025cd651018e1b3bc1e836e62772c593..0b58dca7da62d5efbc0e53caae2204c1e19e535c 100644 (file)
@@ -52,6 +52,7 @@
 #include "match.h"
 #include "file.h"
 #include "optlist.h"
+#include "tel.h"
 #include "gen.h"               /* parse */
 
 /* for systems without strdup  */
@@ -380,9 +381,6 @@ struct otherfiles {
     char *name;
 };
 
-extern s_char *upfil, *downfil, *disablefil, *banfil, *authfil;
-extern s_char *commfil, *annfil, *telfil, *teldir, *timestampfil;
-
 /* list of other well known files... -maybe tailor these oneday
  * anyway - meantime they are all relative to datadir */
 static struct otherfiles ofiles[] = {
index 75a9c364d4594f8360d9f009e102982de00e10bb..0cc7a5df52bf9071965551de11df5e081fc83533 100644 (file)
@@ -63,8 +63,6 @@
 
 #include "empthread.h"
 
-extern struct player *player;  /* XXX */
-
 struct iop {
     int fd;
     struct ioqueue *input;
index 0d6dc44f304b08ab5cf2f4b22f424881897c3c5c..967da6248e9ac154ae5ac80792d4b6b96726ee32 100644 (file)
@@ -98,7 +98,6 @@ void
 lwpInitContext(volatile struct lwpProc *volatile newp, void *sp)
 {
     static jmp_buf *cpp;
-    extern struct lwpProc *LwpCurrent;
 
     if (!lwpSave(LwpCurrent->context)) {
        cpp = (jmp_buf *) & newp->context;
@@ -305,7 +304,6 @@ void
 lwpInitContext(struct lwpProc *newp, void *sp)
 {
     static jmp_buf *cpp;
-    extern struct lwpProc *LwpCurrent;
 
     memset(newp->context, 0, sizeof(newp->context));
     newp->context[0] = (int)sp;
index 864ecafc3b9bb1df5aae69e92e8710ba4f57026c..ccc13a8a6df695034b907df7d844d6658e0a80e1 100644 (file)
 #include <bounds/unchecked.h>
 #endif
 
-#ifdef hpc
-extern struct lwpProc *initcontext;
-extern int startpoint;
-#endif
-
 struct lwpQueue LwpSchedQ[LWP_MAX_PRIO], LwpDeadQ;
 
 struct lwpProc *LwpCurrent = NULL;
index 4e356f55251d39fc1281dc60907d35f922edf73b..b5a427f1e9b9ccfb313b2ca9027e67fd5a42b3b5 100644 (file)
 /* more inefficient the context switch time */
 #define LCOUNT -1
 
+#ifdef hpc
+extern struct lwpProc *initcontext;
+extern int startpoint;
+#endif
+
 #ifdef hpux
 int lwpSave(jmp_buf);
 void lwpRestore(jmp_buf);
index a1746a46ca886640ef18bb501a5d4b7fd23b88d7..d274afbffdc23e6b0013c4ec7c858ef7094be0df 100644 (file)
@@ -61,7 +61,6 @@
 #include <fcntl.h>
 
 struct player *player;
-extern int m_m_p_d;
 
 void
 player_main(struct player *p)
index c244071ea0040eff8f4951072009c718c5bd48c3..308d193b1b9f886890d3096c6d5ea868d0d905f3 100644 (file)
@@ -47,7 +47,7 @@
 #include "optlist.h"
 #include "prototypes.h"
 
-void kaboom(int x, int y, int rad, natid cn);
+static void kaboom(int x, int y, int rad, natid cn);
 
 int
 detonate(struct plnstr *pp, int x, int y)
@@ -317,7 +317,7 @@ detonate(struct plnstr *pp, int x, int y)
 /*
  * silly to be sure.
  */
-void
+static void
 kaboom(int x, int y, int rad, natid cn)
 {
     mpr(cn, "\n\nK A B ");
index 9177d2ce44f2210d16ea8da3d78223e3f63a7945..52d78a33321b7a0da6303f892202438734e70b78 100644 (file)
 #include "prototypes.h"
 #include "optlist.h"
 
-extern struct castr sect_ca[];
-extern struct castr news_ca[];
-extern struct castr loan_ca[];
-extern struct castr ship_ca[];
-extern struct castr plane_ca[];
-extern struct castr treaty_ca[];
-extern struct castr nuke_ca[];
-extern struct castr trade_ca[];
-extern struct castr commodity_ca[];
-extern struct castr lost_ca[];
-
 struct fileinit fileinit[EF_MAX] = {
     {(ef_fileinit)sct_init, sct_postread, sct_prewrite, sect_ca},
     {shp_init, shp_postread, shp_prewrite, ship_ca},
index 141265c7c28e00658b5c3a8e5210b919b5d359b2..6f6a5e080bf3cfa8a7b179dc2600874e96b64513 100644 (file)
@@ -53,8 +53,6 @@
 #define        QUIET   0
 #define        NOISY   1
 
-extern double tfactfire(natid, double);
-
 /*
  * See if any nearby ships will open up on the attacker
  * Return damage done to attacker, if any.
index ded08d291123316d44207ef022bee1b291b05f0f..4c46460e349ee688fd998e654245c69b8ed1818d 100644 (file)
@@ -47,8 +47,6 @@
 #include "file.h"
 #include "prototypes.h"
 
-extern s_char *effadv(int);
-
 int
 shipsatxy(coord x, coord y, int wantflags, int nowantflags)
 {
index 55f8143da2aed4e61e00938c23274288833aa7fd..6c89791d28b6198d585685e716c4bd0f44f40a81 100644 (file)
@@ -53,8 +53,6 @@
 #include "optlist.h"
 #include "prototypes.h"
 
-extern int etu_per_update;
-
 int
 attack_val(int combat_mode, struct lndstr *lp)
 {
@@ -934,7 +932,6 @@ static int
 lnd_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;
index 8c9e58746e8be185387e472af34f0deb9ba6d46c..6add2fb57604b0c5c3280d074f230327604b98fb 100644 (file)
@@ -40,8 +40,6 @@
 #include "optlist.h"
 #include "server.h"
 
-extern s_char *relates[];
-
 int
 setrel(natid us, natid them, int rel)
 {
index a3044000c81aa958ca0740c26195c6d05d639adc..46d0d4d03f8ea4ace1d9272b60abd2ec0555c213 100644 (file)
@@ -336,8 +336,6 @@ static int
 check_nav(sect)
 struct sctstr *sect;
 {
-    extern struct dchrstr dchr[];
-
     switch (dchr[sect->sct_type].d_flg & 03) {
     case NAVOK:
        break;
index 95325bcd312b3a453a4d072ca234e3531ccbe961..7c58342a07313e5543535599aff15ec528754fd0 100644 (file)
@@ -46,8 +46,6 @@
 #include "prototypes.h"
 #include "optlist.h"
 
-void satdisp(struct sctstr *sp, int acc, int showstuff);
-
 static s_char **rad;
 static s_char *radbuf;
 
index 9c61262c5ffa8b26b9842d3f04406b22f833a7c3..a0a47059f38f56ce11360bb1f984b1c5ee51a960 100644 (file)
 #include "server.h"
 #include "prototypes.h"
 
-extern double tfactfire(natid, double);
-
-extern int etu_per_update;
-
 static int shp_check_nav(struct sctstr *);
 static int shp_check_one_mines(struct mlist *);
 static int shp_hit_mine(struct shpstr *, struct mchrstr *);
index 66e620f8b1af6264ee11f0461036e242fd96f4c0..7c0a3e2925504270f8d66aee12edc21052124bd8 100644 (file)
 
 #define CHE_MAX                 255
 
-void takeover_land(register struct lndstr *landp, natid newown,
-                  int hostile);
-void takeover_plane(register struct plnstr *pp, natid newown);
-
 void
 takeover(register struct sctstr *sp, natid newown)
 {
index 2edf7cfceef1705b7d4b201a9361d91154933666..7478cc1a927735dd7df285ad9f57b6129994eec1 100644 (file)
@@ -72,9 +72,7 @@ static s_char *finish_path = "h";     /* Placeholder indicating path exists */
 #endif /* SAVE_FINISH_PATHS */
 
 static void assemble_dist_paths(struct distinfo *distptrs);
-s_char *BestDistPath(s_char *, struct sctstr *, struct sctstr *, double *, int);
-s_char *ReversePath(s_char *path);
-double pathcost(struct sctstr *, s_char *, int);
+static s_char *ReversePath(s_char *path);
 
 void
 finish_sects(int etu)
@@ -240,7 +238,7 @@ assemble_dist_paths(struct distinfo *distptrs)
     }
 }
 
-s_char *
+static s_char *
 ReversePath(s_char *path)
 {
     s_char *patharray = "aucdefjhigklmyopqrstbvwxnz";
index 99bc3ce77f5bd7de9e6c4fe26506912a92b96f18..88d7b80d5cc3287973a082c60a4ab20398f18e39 100644 (file)
@@ -58,7 +58,6 @@ long lnd_money[MAXNOC];
 long air_money[MAXNOC];
 long tpops[MAXNOC];
 
-extern int mil_dbl_pay;
 int update_pending = 0;
 
 static void do_prod(int, int, int, int *, long int (*)[2], int *, int *,
index 649b5ba1093d51ac819bcdb96f6828c71a51e061..340cec64645c09a63ebb738ee60f0084ac086d2f 100644 (file)
  * level of 0 yields (1) 0.4, (6) 2.2, (12) 3.9, (18) 5.2.
  */
 
-extern float hap_avg;
-extern float edu_avg;
-extern float ally_factor;
-
 static void share_incr(register double *, register double *);
 
 /*
index 223942a6014aeed363f6b4ae095bda0214d1c91e..797c10ed80c507567c48e1677bc11afafe1fa2c4 100644 (file)
@@ -53,7 +53,6 @@
 #include "common.h"
 #include <stdlib.h>
 
-extern int check_nav(struct sctstr *sect);
 static void swap(register struct shpstr *);
 
 static void
index 9115ed572422f5f9a1801593874fff687bc54de1..dda51a33cca7c67aa0a9a31a5b7dc24380865799 100644 (file)
@@ -52,8 +52,6 @@
 #include "gen.h"
 #include "common.h"
 
-extern float levels[MAXNOC][4];
-
 void
 prepare_sects(int etu, int *bp)
 {
index 8a2567e5482e5cf3e1ed1fe3c6db31a8981ab691..ebdac481b5e2e970f2019f9f6376b19ac7fbe545 100644 (file)
@@ -55,8 +55,6 @@
 #include "lost.h"
 #include "gen.h"
 
-extern float levels[MAXNOC][4];
-
 int
 dodeliver(struct sctstr *sp, int *vec)
 {
@@ -201,8 +199,6 @@ enlist(register int *vec, int etu, int *cost)
 
 /* Fallout is calculated here. */
 
-extern int melt_item_denom[];
-
 static void
 meltitems(int etus, int fallout, int own, int *vec, int type, int x, int y,
          int uid)
index bd8ae4905a641a6deae3a974b6152f4822cee8f3..0af848f4ea03641757687fb031dc46235d495c64 100644 (file)
 #include "server.h"
 #include "prototypes.h"
 
-void nullify_objects(void);
-void init_files(void);
-void close_files(void);
+static void nullify_objects(void);
+static void init_files(void);
+static void close_files(void);
 
 #if defined(_WIN32)
 static void loc_NTInit(void);
 static void loc_NTTerm(void);
 #endif
 
-extern void mobility_init(void);
-extern void mobility_check(void *);
-extern void market_update(void *);
-
 #if !defined(_WIN32)
 static int mainpid = 0;
 #endif
@@ -250,7 +246,7 @@ main(int argc, char **argv)
     return 0;
 }
 
-void
+static void
 init_files(void)
 {
     ef_open(EF_NATION, O_RDWR, EFF_MEM);
@@ -270,7 +266,7 @@ init_files(void)
     ef_open(EF_LOST, O_RDWR, 0);
 }
 
-void
+static void
 close_files(void)
 {
     ef_close(EF_NATION);
@@ -385,7 +381,7 @@ shutdwn(int sig)
 }
 
 
-void
+static void
 nullify_objects(void)
 {
     int i, j;
index b7a10664545802f13493944dfce6180cf5f70e4d..9c05148a4abc22f64fce2dd81e7a4656cdfae742 100644 (file)
@@ -42,7 +42,6 @@
 
 empth_sem_t *update_sem;
 
-extern void update_main(void *);
 static void update_wait(void *argv);
 time_t update_time;
 
index 63c2f7230112550fe7cd43cc54fe1a242ef8edfd..945ee60c321db1c55f444cc837a2b76a324b210d 100644 (file)
@@ -153,27 +153,27 @@ int fl_status;                    /* is anything wrong? */
 const char *numletter =
     "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
 
-void parse_args(int argc, char *argv[]);
-int allocate_memory(void);
-void init(void);
-int drift(void);
-void grow_continents(void);
-void create_elevations(void);
-void write_sects(void);
-int write_file(void);
-void output(void);
-int write_newcap_script(void);
-int stable(void);
-void elevate_land(void);
-void elevate_sea(void);
-void translate_continents(void);
-int map_symbol(int x, int y);
+static void parse_args(int argc, char *argv[]);
+static int allocate_memory(void);
+static void init(void);
+static int drift(void);
+static void grow_continents(void);
+static void create_elevations(void);
+static void write_sects(void);
+static int write_file(void);
+static void output(void);
+static int write_newcap_script(void);
+static int stable(void);
+static void elevate_land(void);
+static void elevate_sea(void);
+static void translate_continents(void);
+static int map_symbol(int x, int y);
 static void fl_sct_init(coord x, coord y, s_char *ptr);
 
-void print_vars(void);
-void fl_move(int);
-void next_coast(int c, int x, int y, int *xp, int *yp);
-void grow_islands(void);
+static void print_vars(void);
+static void fl_move(int);
+static void next_coast(int c, int x, int y, int *xp, int *yp);
+static void grow_islands(void);
 
 /****************************************************************************
   MAIN
@@ -260,7 +260,7 @@ main(int argc, char *argv[])
     exit(0);
 }
 
-void
+static void
 print_vars(void)
 {
     if (quiet)
@@ -291,7 +291,7 @@ my_sqrt(int n)
   PARSE COMMAND LINE ARGUMENTS
 ****************************************************************************/
 
-void
+static void
 parse_args(int argc, char *argv[])
 {
     if (argc < 2 || argc > 8) {
@@ -393,7 +393,7 @@ parse_args(int argc, char *argv[])
   VARIABLE INITIALIZATION
 ****************************************************************************/
 
-int
+static int
 allocate_memory(void)
 {
     int i;
@@ -453,7 +453,7 @@ allocate_memory(void)
     return 0;
 }
 
-void
+static void
 init(void)
 {
     int i, j, xx = 0, yy = 0;
@@ -508,7 +508,7 @@ iso(int j, int newx, int newy)
 
 /* Drift all the capitals
 */
-int
+static int
 drift(void)
 {
     int i, turns;
@@ -525,7 +525,7 @@ drift(void)
 /* Check to see if we have stabilized--can we stop drifting the capitals?
 */
 
-int
+static int
 stable(void)
 {
     int i, isod, d = 0, stab = 1;
@@ -546,7 +546,7 @@ stable(void)
 /* This routine does the actual drifting
 */
 
-void
+static void
 fl_move(int j)
 {
     int i, n, newx, newy;
@@ -632,7 +632,7 @@ try_to_grow(int c, int newx, int newy, int d)
 /* Move along the coast in a clockwise direction.
 */
 
-void
+static void
 next_coast(int c, int x, int y, int *xp, int *yp)
 {
     int i, nx, ny, wat = 0;
@@ -734,7 +734,7 @@ grow_one_sector(int c)
 
 /* Grow all the continents
 */
-void
+static void
 grow_continents(void)
 {
     int c;
@@ -795,7 +795,7 @@ place_island(int c, int *xp, int *yp)
 /* Grow all the islands
 */
 
-void
+static void
 grow_islands(void)
 {
     int c, x, y, isiz;
@@ -819,7 +819,7 @@ grow_islands(void)
 /****************************************************************************
   CREATE ELEVATIONS
 ****************************************************************************/
-void
+static void
 create_elevations(void)
 {
     elevate_land();
@@ -869,7 +869,7 @@ distance_to_what(int x, int y, int flag)
 
 /* Decide where the mountains go
 */
-void
+static void
 elevate_land(void)
 {
     int i, mountain_search, k, c, total, ns, nm, highest, where, h, newk,
@@ -959,7 +959,7 @@ elevate_land(void)
 
 #define distance_to_land() distance_to_what(x, y, 1)
 
-void
+static void
 elevate_sea(void)
 {
     int x, y;
@@ -1053,7 +1053,7 @@ add_resources(struct sctstr *sct)
   DESIGNATE THE SECTORS
 ****************************************************************************/
 
-void
+static void
 write_sects(void)
 {
     register struct sctstr *sct;
@@ -1091,7 +1091,7 @@ write_sects(void)
 /****************************************************************************
   WRITE ALL THIS STUFF TO THE FILE
 ****************************************************************************/
-int
+static int
 write_file(void)
 {
     int n;
@@ -1112,7 +1112,7 @@ write_file(void)
 /****************************************************************************
   PRINT A PICTURE OF THE MAP TO YOUR SCREEN
 ****************************************************************************/
-void
+static void
 output(void)
 {
     int i, j;
@@ -1137,7 +1137,7 @@ output(void)
 }
 
 /* Reorder the continents from top left to bottom right */
-void
+static void
 translate_continents(void)
 {
     int i, j, n = 0, k, gotit, c;
@@ -1185,7 +1185,7 @@ translate_continents(void)
     }
 }
 
-int
+static int
 map_symbol(int x, int y)
 {
     int c, iscap = 0;
@@ -1203,7 +1203,7 @@ map_symbol(int x, int y)
 /***************************************************************************
   WRITE A SCRIPT FOR PLACING CAPITALS
 ****************************************************************************/
-int
+static int
 write_newcap_script(void)
 {
     int c;
@@ -1238,7 +1238,7 @@ qprint(const char *str)
        fputs(str, stdout);
 }
 
-void
+static void
 fl_sct_init(coord x, coord y, s_char *ptr)
 {
     struct sctstr *sp = (struct sctstr *)ptr;