Supply prototypes where possible. This uncovered type errors with
thread entrypoints: (lwpSelect, shutdown_sequence): Parameters didn't match thread entry point prototype. (lwpEntryPoint): Arguments didn't match thread entry point prototype. Change linkage of functions without prototype declaration to static where possible. Remove some superflous declarations, replace others by suitable includes.
This commit is contained in:
parent
7dbb87b0e0
commit
237baffca9
108 changed files with 505 additions and 877 deletions
|
@ -67,7 +67,6 @@ anti(void)
|
|||
double odds, damil, dache;
|
||||
int mob;
|
||||
int n_cheleft;
|
||||
extern double hap_fact();
|
||||
|
||||
if (!snxtsct(&nstr, player->argp[1]))
|
||||
return RET_SYN;
|
||||
|
|
|
@ -48,7 +48,7 @@ int
|
|||
best(void)
|
||||
{
|
||||
double cost;
|
||||
s_char *BestDistPath(), *BestLandPath(), *s;
|
||||
s_char *s;
|
||||
struct sctstr s1, s2;
|
||||
struct nstr_sect nstr, nstr2;
|
||||
s_char buf[1024];
|
||||
|
|
|
@ -214,7 +214,6 @@ bomb(void)
|
|||
static void
|
||||
pin_bomb(struct emp_qelem *list, struct sctstr *target)
|
||||
{
|
||||
extern s_char *effadv();
|
||||
struct dchrstr *dcp;
|
||||
int nplanes;
|
||||
int nships;
|
||||
|
|
|
@ -348,7 +348,6 @@ calc_all(long int (*p_sect)[2], int *taxes, int *Ncivs, int *Nuws,
|
|||
extern long lnd_money[MAXNOC];
|
||||
extern long air_money[MAXNOC];
|
||||
extern long tpops[MAXNOC];
|
||||
extern int mil_dbl_pay;
|
||||
|
||||
lnd_money[player->cnum] = sea_money[player->cnum] = 0;
|
||||
air_money[player->cnum] = 0;
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
* Steve McClure, 1998-2000
|
||||
*/
|
||||
|
||||
#include <math.h>
|
||||
#ifdef Rel4
|
||||
#include <string.h>
|
||||
#endif /* Rel4 */
|
||||
|
@ -69,9 +70,6 @@ static int build_plane(register struct sctstr *sp,
|
|||
|
||||
static int cash; /* static ok */
|
||||
|
||||
double sqrt(double);
|
||||
double logx();
|
||||
|
||||
extern int morale_base;
|
||||
extern int sect_mob_neg_factor;
|
||||
extern int etu_per_update;
|
||||
|
@ -494,7 +492,6 @@ build_land(register struct sctstr *sp, register struct lchrstr *lp,
|
|||
int points;
|
||||
struct natstr *natp;
|
||||
float eff = ((float)LAND_MINEFF / 100.0);
|
||||
double techfact(int, double);
|
||||
int mil, lcm, hcm, gun, shell;
|
||||
int freeland = 0;
|
||||
|
||||
|
|
|
@ -111,9 +111,7 @@ static int
|
|||
cons_choose(struct ltcomstr *ltcp)
|
||||
{
|
||||
s_char *p;
|
||||
extern int disloan();
|
||||
extern int distrea();
|
||||
int (*dis) ();
|
||||
int (*dis)();
|
||||
struct lonstr *lp;
|
||||
struct trtstr *tp;
|
||||
s_char prompt[128];
|
||||
|
|
|
@ -71,8 +71,6 @@ static long
|
|||
do_desi(struct natstr *natp, s_char *sects, s_char *deschar, long int cash,
|
||||
int for_real)
|
||||
{
|
||||
extern int opt_NO_LCMS;
|
||||
extern int opt_NO_HCMS;
|
||||
register int n;
|
||||
s_char *p;
|
||||
int breaksanct;
|
||||
|
|
|
@ -53,7 +53,6 @@
|
|||
int
|
||||
diss(void)
|
||||
{
|
||||
int quit(void);
|
||||
struct sctstr sect;
|
||||
struct lndstr land;
|
||||
struct shpstr ship;
|
||||
|
|
|
@ -51,7 +51,6 @@ land(void)
|
|||
struct nstr_item ni;
|
||||
struct lndstr land;
|
||||
int vec[I_MAX + 1];
|
||||
s_char *mission_short_name();
|
||||
|
||||
if (!snxtitem(&ni, EF_LAND, player->argp[1]))
|
||||
return RET_SYN;
|
||||
|
|
|
@ -53,7 +53,7 @@ ldump(void)
|
|||
struct nstr_item ni;
|
||||
struct lndstr land;
|
||||
int vec[I_MAX + 1];
|
||||
s_char *mission_short_name();
|
||||
s_char *mission_short_name(int);
|
||||
int n, i;
|
||||
struct natstr *np;
|
||||
time_t now;
|
||||
|
|
|
@ -257,7 +257,6 @@ look_land(register struct lndstr *lookland)
|
|||
int vrange;
|
||||
int i;
|
||||
int dist;
|
||||
double techfact(int, double);
|
||||
|
||||
drange = techfact(lookland->lnd_tech, (double)lookland->lnd_spy);
|
||||
drange = (drange * ((double)lookland->lnd_effic / 100.0));
|
||||
|
|
|
@ -50,7 +50,7 @@ lsta(void)
|
|||
int nunits;
|
||||
struct nstr_item ni;
|
||||
struct lndstr land;
|
||||
s_char *mission_short_name();
|
||||
s_char *mission_short_name(int);
|
||||
|
||||
if (!snxtitem(&ni, EF_LAND, player->argp[1]))
|
||||
return RET_SYN;
|
||||
|
|
|
@ -57,7 +57,7 @@ mark(void)
|
|||
return display_mark(" ");
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
pr_mark(struct comstr *comm)
|
||||
{
|
||||
time_t now;
|
||||
|
|
|
@ -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;
|
||||
double techfact(int, double);
|
||||
extern int torpedo_damage;
|
||||
int gun;
|
||||
|
||||
|
|
|
@ -71,7 +71,6 @@ mission(void)
|
|||
extern int land_mob_max;
|
||||
extern int plane_mob_max;
|
||||
extern double mission_mob_cost;
|
||||
s_char *nameofitem();
|
||||
s_char prompt[128];
|
||||
s_char buf[1024];
|
||||
|
||||
|
|
|
@ -53,7 +53,6 @@ morale(void)
|
|||
int i, min;
|
||||
s_char *p;
|
||||
s_char mess[128];
|
||||
double techfact(int, double);
|
||||
s_char buf[1024];
|
||||
|
||||
if (!snxtitem(&np, EF_LAND, player->argp[1]))
|
||||
|
|
|
@ -46,8 +46,8 @@
|
|||
#include "optlist.h"
|
||||
#include "commands.h"
|
||||
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <math.h>
|
||||
|
||||
extern float start_education, start_happiness;
|
||||
extern float start_technology, start_research;
|
||||
|
@ -321,7 +321,6 @@ deity_build_land(int type, coord x, coord y, natid own, int tlev)
|
|||
struct lchrstr *lp;
|
||||
struct nstr_item nstr;
|
||||
struct natstr *natp;
|
||||
double techfact(int, double);
|
||||
int lvec[I_MAX + 1];
|
||||
int extend = 1;
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ path(void)
|
|||
coord cx, cy;
|
||||
int i;
|
||||
int y;
|
||||
s_char *pp, *p, *BestDistPath();
|
||||
s_char *pp, *p;
|
||||
/* Note this is not re-entrant anyway, so we keep the buffers
|
||||
around */
|
||||
static s_char *mapbuf = (s_char *)0;
|
||||
|
|
|
@ -38,8 +38,7 @@
|
|||
#include "nat.h"
|
||||
#include "file.h"
|
||||
#include "commands.h"
|
||||
|
||||
extern void shutdown_sequence();
|
||||
#include "prototypes.h"
|
||||
|
||||
int
|
||||
shut(void)
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
#include "path.h"
|
||||
#include "file.h"
|
||||
#include "commands.h"
|
||||
#include "combat.h"
|
||||
|
||||
int
|
||||
sinfra(void)
|
||||
|
@ -49,8 +50,6 @@ sinfra(void)
|
|||
struct sctstr sect;
|
||||
int nsect;
|
||||
struct nstr_sect nstr;
|
||||
double sector_mcost();
|
||||
double sector_strength(struct sctstr *);
|
||||
|
||||
if (!snxtsct(&nstr, player->argp[1]))
|
||||
return RET_SYN;
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
int
|
||||
thre(void)
|
||||
{
|
||||
extern struct ichrstr *whatitem();
|
||||
extern struct ichrstr *whatitem(s_char *, s_char *);
|
||||
struct sctstr sect;
|
||||
struct nstr_sect nstr;
|
||||
int val;
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
* Steve McClure, 1996-2000
|
||||
*/
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include "misc.h"
|
||||
#include "player.h"
|
||||
#include "xy.h"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue