#include "queue.h"
#include "nsc.h"
#include "retreat.h"
-#include "var.h"
#define LAND_MINEFF 10
#define LAND_MINFIREEFF 40 /* arty must be this effic to fire */
extern int want_to_abandon(struct sctstr *, i_type, int, struct lndstr *);
extern int would_abandon(struct sctstr *, i_type, int, struct lndstr *);
extern int nav_map(int, int, int);
-extern int count_pop(register int);
+extern int count_pop(int);
extern int scuttle_tradeship(struct shpstr *, int);
extern void scuttle_ship(struct shpstr *);
extern void resnoise(struct sctstr *sptr, int public_amt, s_char *name,
/* damage.c */
extern void landdamage(struct lndstr *, int);
extern void ship_damage(struct shpstr *, int);
-extern int damage(register int, int);
+extern int damage(int, int);
extern void shipdamage(struct shpstr *, int);
extern void land_damage(struct lndstr *, int);
extern void planedamage(struct plnstr *, int);
extern int nukedamage(struct nchrstr *, int, int);
-extern int effdamage(register int, int);
+extern int effdamage(int, int);
extern void item_damage(int, short *);
extern int commdamage(int, int, i_type);
/* check.c */
extern int sect_damage(struct sctstr *, int, struct emp_qelem *);
extern int sectdamage(struct sctstr *, int, struct emp_qelem *);
/* snxtit_subs.c */
-extern void snxtitem_area(register struct nstr_item *, int,
+extern void snxtitem_area(struct nstr_item *, int,
struct range *);
-extern void snxtitem_dist(register struct nstr_item *, int, int, int, int);
-extern void snxtitem_xy(register struct nstr_item *, int, coord, coord);
-extern void snxtitem_all(register struct nstr_item *, int);
-extern void snxtitem_group(register struct nstr_item *, int, s_char);
+extern void snxtitem_dist(struct nstr_item *, int, int, int, int);
+extern void snxtitem_xy(struct nstr_item *, int, coord, coord);
+extern void snxtitem_all(struct nstr_item *, int);
+extern void snxtitem_group(struct nstr_item *, int, s_char);
extern void snxtitem_rewind(struct nstr_item *);
-extern int snxtitem_list(register struct nstr_item *, int, int *, int);
+extern int snxtitem_list(struct nstr_item *, int, int *, int);
/* snxtsect_subs.c */
-extern void snxtsct_area(register struct nstr_sect *, struct range *);
-extern void xydist_range(coord, coord, register int, struct range *);
-extern void xysize_range(register struct range *);
+extern void snxtsct_area(struct nstr_sect *, struct range *);
+extern void xydist_range(coord, coord, int, struct range *);
+extern void xysize_range(struct range *);
extern void snxtsct_all(struct nstr_sect *);
extern void snxtsct_rewind(struct nstr_sect *);
-extern void snxtsct_dist(register struct nstr_sect *, coord, coord, int);
+extern void snxtsct_dist(struct nstr_sect *, coord, coord, int);
/* stmtch.c */
/* in match.h */
/* type.c */
/* nxtitem.c */
extern int nxtitem(struct nstr_item *, void *);
/* nxtsct.c */
-extern int nxtsct(register struct nstr_sect *, struct sctstr *);
+extern int nxtsct(struct nstr_sect *, struct sctstr *);
/* plane.c */
extern s_char *prplane(struct plnstr *);
extern int pln_postread(int, s_char *);
extern void shp_missdef(struct shpstr *, natid);
extern void shp_set_tech(struct shpstr *, int);
/* snxtitem.c */
-extern int snxtitem(register struct nstr_item *, int, s_char *);
+extern int snxtitem(struct nstr_item *, int, s_char *);
/* snxtsct.c */
extern int snxtsct(register struct nstr_sect *, s_char *);
/* supply.c */
extern int has_supply(struct lndstr *);
extern int use_supply(struct lndstr *);
/* takeover.c */
-extern void takeover_land(register struct lndstr *, natid, int);
-extern void takeover(register struct sctstr *, natid);
-extern void takeover_ship(register struct shpstr *, natid, int);
-extern void takeover_plane(register struct plnstr *, natid);
+extern void takeover_land(struct lndstr *, natid, int);
+extern void takeover(struct sctstr *, natid);
+extern void takeover_ship(struct shpstr *, natid, int);
+extern void takeover_plane(struct plnstr *, natid);
/* trdsub.c */
/* trechk.c */
extern int trechk(register natid, register natid, int);
/* material.c */
/* in budg.h */
/* mobility.c */
-extern void mob_sect(register int);
-extern void mob_ship(register int);
-extern void mob_land(register int);
-extern void mob_plane(register int);
+extern void mob_sect(int);
+extern void mob_ship(int);
+extern void mob_land(int);
+extern void mob_plane(int);
extern void update_all_mob(void);
extern void update_timestamps(time_t offset);
-extern void sct_do_upd_mob(register struct sctstr *sp);
-extern void shp_do_upd_mob(register struct shpstr *sp);
-extern void lnd_do_upd_mob(register struct lndstr *lp);
-extern void pln_do_upd_mob(register struct plnstr *pp);
+extern void sct_do_upd_mob(struct sctstr *sp);
+extern void shp_do_upd_mob(struct shpstr *sp);
+extern void lnd_do_upd_mob(struct lndstr *lp);
+extern void pln_do_upd_mob(struct plnstr *pp);
/* move_sat.c */
-extern void move_sat(register struct plnstr *);
+extern void move_sat(struct plnstr *);
/* nat.c */
extern double logx(double, double);
extern void prod_nat(int);
#define _SECT_H_
#include "item.h"
-#include "var.h"
/* The order of the following elements is there to match up with genitem */
#include "queue.h"
#include "misc.h"
#include "retreat.h"
-#include "var.h"
#define SHIP_MINEFF 20
extern coord strtoy(char *str, char **end);
extern coord xabs(struct natstr *np, coord relx);
extern coord yabs(struct natstr *np, coord rely);
-extern coord xnorm(register coord x);
-extern coord ynorm(register coord y);
+extern coord xnorm(coord x);
+extern coord ynorm(coord y);
extern int xyinrange(coord x, coord y, struct range *rp);
#endif /* _XY_H_ */
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "nat.h"
#include "sect.h"
#include "file.h"
#include <ctype.h>
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "sect.h"
#include "nat.h"
#include <string.h>
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "sect.h"
#include "nuke.h"
#include "plane.h"
#include <ctype.h>
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "land.h"
#include "xy.h"
#include "nsc.h"
army(void)
{
struct lndstr land;
- register int count;
+ int count;
s_char *cp;
s_char c;
struct nstr_item nstr;
#include "misc.h"
#include "player.h"
#include "file.h"
-#include "var.h"
#include "sect.h"
#include "path.h"
#include "news.h"
#include "misc.h"
#include "player.h"
#include "file.h"
-#include "var.h"
#include "sect.h"
#include "path.h"
#include "news.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "sect.h"
#include "item.h"
#include "xy.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "sect.h"
#include "item.h"
#include "xy.h"
#include "misc.h"
#include "player.h"
#include "file.h"
-#include "var.h"
#include "sect.h"
#include "path.h"
#include "news.h"
#include <string.h>
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "sect.h"
#include "ship.h"
#include "land.h"
static void
eff_bomb(struct emp_qelem *list, struct sctstr *target)
{
- register struct plist *plp;
+ struct plist *plp;
struct emp_qelem *qp;
struct sctstr sect;
int oldeff, dam = 0;
static void
comm_bomb(struct emp_qelem *list, struct sctstr *target)
{
- register struct plist *plp;
+ struct plist *plp;
float b;
int i;
int amt, before;
static void
strat_bomb(struct emp_qelem *list, struct sctstr *target)
{
- register struct plist *plp;
+ struct plist *plp;
int dam = 0;
struct emp_qelem *qp;
struct sctstr sect;
#include <string.h>
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "nsc.h"
#include "sect.h"
int *units, int *lbuild, int *nlbuild, int *lmaint,
int *planes, int *pbuild, int *npbuild, int *pmaint)
{
- register int y, z;
+ int y, z;
struct natstr *np;
int sm = 0, sb = 0, pm = 0, pb = 0, lm = 0, lb = 0;
int *bp;
#include "misc.h"
#include "xy.h"
#include "file.h"
-#include "var.h"
#include "sect.h"
#include "nat.h"
#include "news.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "sect.h"
#include "nat.h"
#include "xy.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "sect.h"
#include "ship.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "sect.h"
#include "nsc.h"
static void cede_hdr(void);
static int cede_sect(struct nstr_sect *, natid);
static int cede_ship(struct nstr_item *, natid);
-static void grab_sect(register struct sctstr *, natid);
-static void grab_ship(register struct shpstr *, natid);
+static void grab_sect(struct sctstr *, natid);
+static void grab_ship(struct shpstr *, natid);
int
cede(void)
static void
-grab_sect(register struct sctstr *sp, natid to)
+grab_sect(struct sctstr *sp, natid to)
{
struct plnstr *pp;
struct lndstr *lp;
}
static void
-grab_ship(register struct shpstr *sp, natid to)
+grab_ship(struct shpstr *sp, natid to)
{
- register struct plnstr *pp;
- register struct lndstr *lp;
+ struct plnstr *pp;
+ struct lndstr *lp;
struct nstr_item ni;
struct plnstr p;
struct lndstr l;
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "sect.h"
#include "nsc.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "sect.h"
#include "ship.h"
#include "nat.h"
static int
showship(struct coast **cpp, int x, int y)
{
- register struct coast *cp;
- register struct coast *todelete = 0;
- register struct coast **prev;
+ struct coast *cp;
+ struct coast *todelete = 0;
+ struct coast **prev;
int nship = 0;
prev = 0;
#include <math.h>
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "file.h"
#include "sect.h"
#include "item.h"
int
coll(void)
{
- register int arg;
- register int i;
- register int val;
+ int arg;
+ int i;
+ int val;
time_t now;
char *p;
struct lonstr loan;
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "sect.h"
#include "xy.h"
#include "nsc.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "sect.h"
#include "nat.h"
#include "xy.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "sect.h"
#include "nat.h"
#include "xy.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "sect.h"
#include "xy.h"
#include "nsc.h"
#include "misc.h"
#include "player.h"
#include "xy.h"
-#include "var.h"
#include "sect.h"
#include "item.h"
#include "file.h"
deli(void)
{
struct sctstr sect;
- register int dir, del;
- register struct ichrstr *ich;
- register int thresh;
+ int dir, del;
+ struct ichrstr *ich;
+ int thresh;
int sx, sy;
struct nstr_sect nstr;
s_char buf[1024];
#include "misc.h"
#include "player.h"
#include "xy.h"
-#include "var.h"
#include "sect.h"
#include "nat.h"
#include "nsc.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "sect.h"
#include "item.h"
#include "xy.h"
do_desi(struct natstr *natp, s_char *sects, s_char *deschar, long int cash,
int for_real)
{
- register int n;
+ int n;
s_char *p;
int breaksanct;
int cap_x;
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "sect.h"
#include "nsc.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "sect.h"
#include "ship.h"
#include "item.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "sect.h"
#include "nsc.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "sect.h"
#include "nsc.h"
#include <ctype.h>
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "ship.h"
#include "xy.h"
#include "nsc.h"
flee(void)
{
struct shpstr ship;
- register int count;
+ int count;
s_char *cp;
s_char c;
struct nstr_item nstr;
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "sect.h"
#include "ship.h"
#include "item.h"
#include <ctype.h>
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "ship.h"
#include "xy.h"
#include "nsc.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "sect.h"
#include "land.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "sect.h"
#include "nat.h"
#include "news.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "sect.h"
#include "nat.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "sect.h"
#include "item.h"
#include "plane.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "sect.h"
#include "xy.h"
#include "nsc.h"
#include <string.h>
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "sect.h"
#include "nsc.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "sect.h"
#include "land.h"
#include "misc.h"
#include "player.h"
#include "xy.h"
-#include "var.h"
#include "sect.h"
#include "item.h"
#include "plane.h"
#include "misc.h"
#include "player.h"
#include "file.h"
-#include "var.h"
#include "sect.h"
#include "path.h"
#include "news.h"
#include "nsc.h"
#include "file.h"
#include "optlist.h"
-#include "var.h"
#include "commands.h"
int
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "sect.h"
#include "xy.h"
#include "nsc.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "sect.h"
#include "ship.h"
#include "commands.h"
#include "optlist.h"
-static void look_ship(register struct shpstr *lookship);
+static void look_ship(struct shpstr *lookship);
int
look(void)
{
- register int i;
+ int i;
struct nstr_item ni;
struct shpstr myship;
struct sctstr sect;
}
static void
-look_ship(register struct shpstr *lookship)
+look_ship(struct shpstr *lookship)
{
- register struct shpstr *sp;
- register struct mchrstr *smcp;
- register struct mchrstr *tmcp;
+ struct shpstr *sp;
+ struct mchrstr *smcp;
+ struct mchrstr *tmcp;
struct sctstr sect;
int range;
int vrange;
}
}
-static void look_land(register struct lndstr *lookland);
+static void look_land(struct lndstr *lookland);
int
llook(void)
{
- register int i;
+ int i;
struct nstr_item ni;
struct lndstr myland;
struct sctstr sect;
}
static void
-look_land(register struct lndstr *lookland)
+look_land(struct lndstr *lookland)
{
- register struct plnstr *pp;
- register struct lndstr *lp;
+ struct plnstr *pp;
+ struct lndstr *lp;
double drange;
int range;
int vrange;
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "sect.h"
#include "land.h"
#include <ctype.h>
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "land.h"
#include "sect.h"
#include "news.h"
#include "misc.h"
#include "nat.h"
-#include "var.h"
#include "item.h"
#include "commodity.h"
#include "player.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "treaty.h"
#include "nat.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "ship.h"
#include "land.h"
#include "sect.h"
#include "options.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "sect.h"
#include "retreat.h"
#include <ctype.h>
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "ship.h"
#include "xy.h"
#include "nsc.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "sect.h"
#include "nsc.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "land.h"
#include "nsc.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "sect.h"
#include "ship.h"
#include "xy.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "nat.h"
#include "sect.h"
#include "file.h"
#include <ctype.h>
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "ship.h"
#include "sect.h"
#include "news.h"
int
nav_map(int x, int y, int show_designations)
{
- register s_char *ptr;
+ s_char *ptr;
struct nstr_sect ns;
struct natstr *np;
struct sctstr sect;
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "sect.h"
#include "nuke.h"
#include "xy.h"
int
ndump(void)
{
- register int i;
+ int i;
struct nstr_item nstr;
struct nukstr nuk;
time_t now;
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "nat.h"
#include "sect.h"
#include "path.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "nsc.h"
#include "sect.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "sect.h"
#include "nuke.h"
#include "xy.h"
int
nuke(void)
{
- register int first_line = 0;
- register int first_nuke;
- register int show_comm;
- register int i;
+ int first_line = 0;
+ int first_nuke;
+ int show_comm;
+ int i;
struct nstr_item nstr;
struct nukstr nuk;
struct sctstr sect;
#include <ctype.h>
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "ship.h"
#include "sect.h"
#include "news.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "sect.h"
#include "ship.h"
#include "item.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "nsc.h"
#include "nat.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "sect.h"
#include "ship.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "plane.h"
#include "nsc.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "plane.h"
#include "nsc.h"
#include <string.h>
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "sect.h"
#include "nat.h"
#include "ship.h"
natid cnum;
};
-static void addtopow(register short *vec, register struct powstr *pow);
+static void addtopow(short *vec, struct powstr *pow);
static void gen_power(void);
static void out5(double value, int round_val, int round_flag);
static int powcmp(struct powsort *p1, struct powsort *p2);
{
float *f_ptr;
float *f_pt2;
- register struct powstr *pow;
- register int i;
+ struct powstr *pow;
+ int i;
struct sctstr sect;
struct plnstr plane;
struct shpstr ship;
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "nsc.h"
#include "sect.h"
#include "commands.h"
int
-count_pop(register int n)
+count_pop(int n)
{
- register int i;
- register int pop = 0;
+ int i;
+ int pop = 0;
struct sctstr *sp;
for (i = 0; NULL != (sp = getsectid(i)); i++) {
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "plane.h"
#include "nsc.h"
#include "misc.h"
#include "player.h"
#include "xy.h"
-#include "var.h"
#include "ship.h"
#include "land.h"
#include "sect.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "plane.h"
#include "land.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "sect.h"
#include "ship.h"
#include "item.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "nat.h"
#include "sect.h"
#include "file.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "sect.h"
#include "nat.h"
#include "file.h"
#include "misc.h"
#include "xy.h"
#include "file.h"
-#include "var.h"
#include "sect.h"
#include "item.h"
#include "nsc.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "sect.h"
#include "nsc.h"
#include "options.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "sect.h"
#include "retreat.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "nat.h"
#include "nsc.h"
*/
#include "misc.h"
-#include "var.h"
#include "land.h"
#include "nsc.h"
#include "file.h"
#include <ctype.h>
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "ship.h"
#include "path.h"
#include "xy.h"
static int
show_sail(struct nstr_item *nstr)
{
- register int count = 0;
+ int count = 0;
struct shpstr ship;
while (nxtitem(nstr, (s_char *)&ship)) {
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "plane.h"
#include "sect.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "sect.h"
#include "ship.h"
#include "player.h"
#include "sect.h"
#include "news.h"
-#include "var.h"
#include "xy.h"
#include "ship.h"
#include "land.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "sect.h"
#include "ship.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "sect.h"
#include "nsc.h"
#include "misc.h"
#include "xy.h"
#include "file.h"
-#include "var.h"
#include "sect.h"
#include "item.h"
#include "nsc.h"
*/
#include "misc.h"
-#include "var.h"
#include "sect.h"
#include "ship.h"
#include "land.h"
#include <ctype.h>
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "sect.h"
#include "nat.h"
#include <ctype.h>
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "sect.h"
#include "nat.h"
#include <math.h>
#include "misc.h"
-#include "var.h"
#include "file.h"
#include "sect.h"
#include "item.h"
int
shark(void)
{
- register int arg;
+ int arg;
time_t now;
char *p;
struct lonstr loan;
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "sect.h"
#include "ship.h"
#include "misc.h"
#include "player.h"
#include "xy.h"
-#include "var.h"
#include "sect.h"
#include "news.h"
#include "item.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "sect.h"
#include "nsc.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "sect.h"
#include "plane.h"
#include "nat.h"
static int
showsat(struct sky **skypp, int x, int y)
{
- register struct sky *skyp;
- register struct sky *todelete = 0;
- register struct sky **prev;
- register struct plchrstr *pcp;
+ struct sky *skyp;
+ struct sky *todelete = 0;
+ struct sky **prev;
+ struct plchrstr *pcp;
s_char *name;
int nsat = 0;
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "sect.h"
#include "nsc.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "sect.h"
#include "item.h"
#include "nat.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "sect.h"
#include "ship.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "sect.h"
#include "nsc.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "sect.h"
#include "nsc.h"
#include "misc.h"
#include "player.h"
#include "file.h"
-#include "var.h"
#include "sect.h"
#include "path.h"
#include "news.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "sect.h"
#include "nsc.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "sect.h"
#include "land.h"
#include <ctype.h>
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "sect.h"
#include "xy.h"
#include "nsc.h"
#include <ctype.h>
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "sect.h"
#include "nat.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "sect.h"
#include "xy.h"
#include "nsc.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "sect.h"
#include "xy.h"
#include "item.h"
#include <stdio.h>
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "ship.h"
#include "file.h"
#include "xy.h"
#include <ctype.h>
#include "misc.h"
-#include "var.h"
#include "sect.h"
#include "nat.h"
#include "news.h"
#include <string.h>
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "sect.h"
#include "nuke.h"
#include "xy.h"
#include "misc.h"
#include "player.h"
#include "xy.h"
-#include "var.h"
#include "ship.h"
#include "land.h"
#include "plane.h"
#include <ctype.h>
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "plane.h"
#include "xy.h"
#include "nsc.h"
{
struct plnstr plane;
- register int count;
+ int count;
s_char *cp;
s_char c;
struct nstr_item nstr;
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "sect.h"
#include "nsc.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "sect.h"
#include "land.h"
static int
buildeff(struct sctstr *sp, int work, double *money)
{
- register int work_cost;
+ int work_cost;
int n, hcms, lcms;
int effdone = 0;
#include "gamesdef.h"
#include "misc.h"
#include "xy.h"
-#include "var.h"
#include "sect.h"
#include "file.h"
#include "nat.h"
#include "player.h"
#include "xy.h"
#include "file.h"
-#include "var.h"
#include "sect.h"
#include "ship.h"
#include "plane.h"
*/
#include "misc.h"
-#include "var.h"
#include "sect.h"
#include "ship.h"
#include "land.h"
}
int
-damage(register int amt, int pct)
+damage(int amt, int pct)
{
- register int tmp;
- register int lost;
+ int tmp;
+ int lost;
if (amt <= 0)
return 0;
/* asymptotic damage to commodities, efficiency, and sectors */
int
-effdamage(register int amt, int dam)
+effdamage(int amt, int dam)
{
return damage(amt, PERCENT_DAMAGE(dam));
}
#include <ctype.h>
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "sect.h"
#include "nat.h"
*/
#include "misc.h"
-#include "var.h"
#include "sect.h"
#include "nat.h"
-#include "var.h"
#include "file.h"
#include "path.h"
#include "xy.h"
int
adj_units(coord x, coord y, natid own)
{
- register int i;
+ int i;
struct sctstr sect;
for (i = DIR_FIRST; i <= DIR_LAST; i++) {
int
has_units(coord x, coord y, natid cn, struct lndstr *lp)
{
- register int n;
+ int n;
struct lndstr land;
for (n = 0; ef_read(EF_LAND, n, (s_char *)&land); n++) {
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "sect.h"
#include "xy.h"
#include "nsc.h"
#include "subs.h"
#include "optlist.h"
-static int bmnxtsct(register struct nstr_sect *);
+static int bmnxtsct(struct nstr_sect *);
static s_char map_char(u_char type, natid own, int owner_or_god);
int
border(&range, " ", "");
blankfill((s_char *)wmapbuf, &nsp->range, 1);
if (bmap) {
- register int c;
+ int c;
switch (bmap) {
case EF_BMAP:
while (bmnxtsct(nsp) && !player->aborted) {
}
}
if (map_flags & MAP_HIGH) {
- register s_char *ptr;
+ s_char *ptr;
struct sctstr sect;
snxtsct_rewind(nsp);
* get the next sector in the range
*/
static int
-bmnxtsct(register struct nstr_sect *np)
+bmnxtsct(struct nstr_sect *np)
{
while (1) {
np->dx++;
#include "gamesdef.h"
#include "misc.h"
#include "xy.h"
-#include "var.h"
#include "sect.h"
#include "file.h"
#include "path.h"
#include <math.h>
#include "misc.h"
-#include "var.h"
#include "sect.h"
#include "nat.h"
#include "item.h"
*/
#include "misc.h"
-#include "var.h"
#include "sect.h"
#include "ship.h"
#include "land.h"
}
coord
-xnorm(register coord x)
+xnorm(coord x)
{
if (x < 0)
x = WORLD_X - (-x % WORLD_X);
}
coord
-ynorm(register coord y)
+ynorm(coord y)
{
if (y < 0)
y = WORLD_Y - (-y % WORLD_Y);
*/
#include "misc.h"
-#include "var.h"
#include "xy.h"
/* must agree with DIR_ defines */
#include <stddef.h>
#include "misc.h"
-#include "var.h"
#include "xy.h"
#include "loan.h"
#include "nsc.h"
*/
#include "misc.h"
-#include "var.h"
#include "ship.h"
#include "plane.h"
#include "product.h"
static void
init_mchr(void)
{
- register struct mchrstr *mp;
- register int n;
+ struct mchrstr *mp;
+ int n;
for (mp = mchr, n = 0; n < shp_maxno; n++, mp++) {
if (mp->m_nxlight)
static void
init_plchr(void)
{
- register struct plchrstr *pp;
+ struct plchrstr *pp;
int pcount;
for (pp = plchr, pcount = 0; pcount < pln_maxno; pcount++, pp++) {
static void
init_pchr(void)
{
- register struct pchrstr *p;
+ struct pchrstr *p;
int pcount;
for (p = pchr, pcount = 0; pcount < prd_maxno; pcount++, p++) {
#include <stddef.h>
#include "misc.h"
-#include "var.h"
#include "xy.h"
#include "loan.h"
#include "nsc.h"
#include "product.h"
#include "sect.h"
#include "nat.h"
-#include "var.h"
struct pchrstr pchr[] = {
#include "prototypes.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "sect.h"
#include "nat.h"
#include "file.h"
#include "misc.h"
#include "player.h"
#include "proto.h"
-#include "var.h"
#include "com.h"
#include "nat.h"
#include "sect.h"
int
command(void)
{
- register unsigned int x;
+ unsigned int x;
s_char *redir;
s_char scanspace[1024];
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "news.h"
#include "land.h"
#include "sect.h"
static void getilist(struct emp_qelem *list, natid own,
struct emp_qelem *a, struct emp_qelem *b,
struct emp_qelem *c, struct emp_qelem *d);
-static void ac_dog(register struct plist *ap, register struct plist *dp);
+static void ac_dog(struct plist *ap, struct plist *dp);
#define FLAK_MAX 15
ac_intercept(struct emp_qelem *bomb_list, struct emp_qelem *esc_list,
struct emp_qelem *def_list, natid def_own, coord x, coord y)
{
- register struct plnstr *pp;
+ struct plnstr *pp;
struct plist *plp;
int icount;
struct emp_qelem *next;
ac_airtoair(struct emp_qelem *att_list, struct emp_qelem *int_list,
natid def_own)
{
- register struct plist *attacker;
- register struct plist *interceptor;
+ struct plist *attacker;
+ struct plist *interceptor;
struct emp_qelem *att;
struct emp_qelem *in;
int nplanes;
}
static void
-ac_dog(register struct plist *ap, register struct plist *dp)
+ac_dog(struct plist *ap, struct plist *dp)
{
int att, def;
double odds;
ac_planedamage(struct plist *plp, natid from, int dam, natid other,
int checkabort, int show, s_char *mesg)
{
- register struct plnstr *pp;
+ struct plnstr *pp;
int disp;
s_char dmess[255];
int eff;
void
ac_fireflak(struct emp_qelem *list, natid from, natid other, int guns)
{
- register struct plnstr *pp;
+ struct plnstr *pp;
struct plist *plp;
int n;
float mult;
getilist(struct emp_qelem *list, natid own, struct emp_qelem *a,
struct emp_qelem *b, struct emp_qelem *c, struct emp_qelem *d)
{
- register struct plchrstr *pcp;
+ struct plchrstr *pcp;
struct plnstr plane;
struct shpstr ship;
struct lndstr land;
#include "nat.h"
#include "tel.h"
#include "file.h"
-#include "var.h"
#include "prototypes.h"
/*
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "sect.h"
#include "ship.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "sect.h"
#include "nsc.h"
void
bsanct(void)
{
- register int count;
+ int count;
struct sctstr s;
struct nstr_sect nstr;
#include "misc.h"
#include "player.h"
#include "nat.h"
-#include "var.h"
#include "sect.h"
#include "file.h"
#include "xy.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "sect.h"
#include "nat.h"
-#include "var.h"
#include "file.h"
#include "path.h"
#include "xy.h"
#include "news.h"
#include "plane.h"
#include "nsc.h"
-#include "var.h"
#include "optlist.h"
#include "prototypes.h"
*/
#include "misc.h"
-#include "var.h"
#include "xy.h"
#include "nat.h"
#include "sect.h"
sb(natid att, natid def, struct sctstr *sp, coord tx, coord ty, int noisy,
int defending)
{
- register int damage;
+ int damage;
natid own;
int shell;
double range;
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "file.h"
#include "land.h"
#include "ship.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "news.h"
#include "ship.h"
#include "land.h"
int
islist(s_char *p)
{
- register int x;
+ int x;
x = 0;
#include "misc.h"
#include "player.h"
#include "file.h"
-#include "var.h"
#include "sect.h"
#include "path.h"
#include "news.h"
void
lnd_put(struct emp_qelem *list, natid actor)
{
- register struct emp_qelem *qp;
- register struct emp_qelem *newqp;
+ struct emp_qelem *qp;
+ struct emp_qelem *newqp;
struct llist *llp;
qp = list->q_back;
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "file.h"
#include "land.h"
#include "ship.h"
#include "options.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "sect.h"
#include "retreat.h"
int
ground_interdict(coord x, coord y, natid victim, s_char *s)
{
- register int cn;
+ int cn;
int dam = 0, newdam, rel;
struct genlist mi[MAXNOC];
int z;
unit_interdict(coord x, coord y, natid victim, s_char *s, int hardtarget,
int mission)
{
- register int cn;
+ int cn;
int dam = 0, newdam;
struct genlist mi[MAXNOC];
int z;
static int
dosupport(struct genlist *mi, coord x, coord y, natid victim, natid actee)
{
- register int cn;
+ int cn;
int rel;
int dam = 0;
struct sctstr sect;
struct plchrstr *pcp;
struct plist *plp;
- register int y, bad, bad1;
+ int y, bad, bad1;
unsigned int x;
for (qp = list->q_forw; qp != list; qp = next) {
mission_pln_equip(struct plist *plp, struct ichrstr *ip, int flags,
s_char mission)
{
- register struct plchrstr *pcp;
+ struct plchrstr *pcp;
struct plnstr *pp;
int needed;
struct lndstr land;
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "sect.h"
#include "item.h"
#include "file.h"
#include "misc.h"
#include "queue.h"
#include "player.h"
-#include "var.h"
#include "sect.h"
#include "ship.h"
#include "optlist.h"
msl_sel(struct emp_qelem *list, coord x, coord y, natid victim,
int wantflags, int nowantflags, int mission)
{
- register struct plchrstr *pcp;
+ struct plchrstr *pcp;
struct plnstr plane;
struct plist *irv;
struct nstr_item ni;
msl_intercept(coord x, coord y, natid bombown, int hardtarget,
int sublaunch, int wantflags, int nowantflags)
{
- register struct plnstr *pp;
- register struct plchrstr *pcp;
+ struct plnstr *pp;
+ struct plchrstr *pcp;
struct sctstr sect;
struct emp_qelem *irvlist;
struct emp_qelem foo;
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "nuke.h"
#include "sect.h"
#include "xy.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "plane.h"
#include "ship.h"
*/
#include "misc.h"
-#include "var.h"
#include "xy.h"
#include "sect.h"
#include "nsc.h"
* that matches the conditions.
*/
int
-nxtsct(register struct nstr_sect *np, struct sctstr *sp)
+nxtsct(struct nstr_sect *np, struct sctstr *sp)
{
while (1) {
np->dx++;
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "plane.h"
#include "ship.h"
#include "land.h"
#include <math.h>
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "sect.h"
#include "ship.h"
#include "land.h"
int range;
struct plchrstr *pcp;
struct plist *plp;
- register int y;
- register int bad, bad1;
+ int y;
+ int bad, bad1;
unsigned int x;
emp_initque(list);
static int
pln_equip(struct plist *plp, struct ichrstr *ip, int flags, s_char mission)
{
- register struct plchrstr *pcp;
+ struct plchrstr *pcp;
struct plnstr *pp;
int needed;
struct lndstr land;
void
pln_put(struct emp_qelem *list)
{
- register struct emp_qelem *qp;
- register struct emp_qelem *newqp;
+ struct emp_qelem *qp;
+ struct emp_qelem *newqp;
struct plist *plp;
struct plnstr *pp;
struct shpstr ship;
#include "misc.h"
#include "player.h"
#include "nat.h"
-#include "var.h"
#include "retreat.h"
#include "ship.h"
#include "land.h"
/* Is this the originally scared ship, or a follower */
{
struct sctstr sect;
- register int n;
- register int m;
+ int n;
+ int m;
int max;
int dir;
coord newx;
/* Is this the originally scared unit, or a follower */
{
struct sctstr sect;
- register int n;
- register int m;
+ int n;
+ int m;
int max;
int dir;
coord newx;
#include "ship.h"
#include "land.h"
#include "plane.h"
-#include "var.h"
#include "nsc.h"
#include "nat.h"
#include "file.h"
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "file.h"
#include "nat.h"
#include "misc.h"
#include "player.h"
#include "nuke.h"
-#include "var.h"
#include "ship.h"
#include "land.h"
#include "item.h"
void
show_nuke_build(int tlev)
{
- register struct nchrstr *np;
- register int n;
- register int avail;
+ struct nchrstr *np;
+ int n;
+ int avail;
if (opt_DRNUKE)
pr("%13s lcm hcm oil rad avail tech res $\n", "");
void
show_nuke_capab(int tlev)
{
- register struct nchrstr *np;
- register int i, j, n;
+ struct nchrstr *np;
+ int i, j, n;
s_char *p;
if (opt_DRNUKE)
void
show_ship_build(int tlev)
{
- register struct mchrstr *mp;
- register int n;
+ struct mchrstr *mp;
+ int n;
pr("%25s lcm hcm avail tech $\n", "");
make_new_list(tlev, EF_SHIP);
void
show_ship_stats(int tlev)
{
- register struct mchrstr *mp;
+ struct mchrstr *mp;
int scount;
int techdiff;
void
show_plane_stats(int tlev)
{
- register struct plchrstr *pp;
+ struct plchrstr *pp;
int pcount;
pr("%25s acc load att def ran fuel stlth\n", "");
void
show_plane_capab(int tlev)
{
- register struct plchrstr *pp;
- register int i;
+ struct plchrstr *pp;
+ int i;
int pcount;
int n;
s_char *p;
void
show_plane_build(int tlev)
{
- register struct plchrstr *pp;
- register int pcount;
+ struct plchrstr *pp;
+ int pcount;
pr("%25s lcm hcm crew avail tech $\n", "");
make_new_list(tlev, EF_PLANE);
void
show_land_build(int tlev)
{
- register struct lchrstr *lp;
- register int n;
+ struct lchrstr *lp;
+ int n;
pr("%25s lcm hcm guns avail tech $\n", "");
make_new_list(tlev, EF_LAND);
void
show_sect_build(int foo)
{
- register int x, first = 1;
+ int x, first = 1;
for (x = 0; x <= SCT_MAXDEF; x++) {
if (dchr[x].d_mnem == 0)
void
show_sect_stats(int foo)
{
- register int x, first = 1;
+ int x, first = 1;
struct sctstr sect;
struct natstr *natp;
void
show_sect_capab(int foo)
{
- register int x, first = 1, i, j;
+ int x, first = 1, i, j;
char *tmpstr;
for (x = 0; x <= SCT_MAXDEF; x++) {
#include "misc.h"
#include "queue.h"
#include "player.h"
-#include "var.h"
#include "sect.h"
#include "ship.h"
#include "plane.h"
void
shp_put(struct emp_qelem *list, natid actor)
{
- register struct emp_qelem *qp;
- register struct emp_qelem *newqp;
+ struct emp_qelem *qp;
+ struct emp_qelem *newqp;
struct mlist *mlp;
qp = list->q_back;
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "sect.h"
#include "nsc.h"
* for arguments to compile into the nstr.
*/
int
-snxtitem(register struct nstr_item *np, int type, s_char *str)
+snxtitem(struct nstr_item *np, int type, s_char *str)
{
struct range range;
int list[NS_LSIZE];
}
void
-snxtitem_area(register struct nstr_item *np, int type, struct range *range)
+snxtitem_area(struct nstr_item *np, int type, struct range *range)
{
memset(np, 0, sizeof(*np));
np->cur = -1;
}
void
-snxtitem_dist(register struct nstr_item *np, int type, int cx, int cy,
+snxtitem_dist(struct nstr_item *np, int type, int cx, int cy,
int dist)
{
struct range range;
}
void
-snxtitem_xy(register struct nstr_item *np, int type, coord x, coord y)
+snxtitem_xy(struct nstr_item *np, int type, coord x, coord y)
{
memset(np, 0, sizeof(*np));
np->cur = -1;
}
void
-snxtitem_all(register struct nstr_item *np, int type)
+snxtitem_all(struct nstr_item *np, int type)
{
memset(np, 0, sizeof(*np));
np->cur = -1;
}
void
-snxtitem_group(register struct nstr_item *np, int type, s_char group)
+snxtitem_group(struct nstr_item *np, int type, s_char group)
{
if (group == '~')
group = ' ';
}
int
-snxtitem_list(register struct nstr_item *np, int type, int *list, int len)
+snxtitem_list(struct nstr_item *np, int type, int *list, int len)
{
int i;
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "xy.h"
#include "sect.h"
#include "nsc.h"
* for arguments to compile into the nstr.
*/
int
-snxtsct(register struct nstr_sect *np, s_char *str)
+snxtsct(struct nstr_sect *np, s_char *str)
{
struct range range;
coord cx, cy;
}
void
-snxtsct_area(register struct nstr_sect *np, struct range *range)
+snxtsct_area(struct nstr_sect *np, struct range *range)
{
memset(np, 0, sizeof(*np));
np->range = *range;
}
void
-snxtsct_dist(register struct nstr_sect *np, coord cx, coord cy, int dist)
+snxtsct_dist(struct nstr_sect *np, coord cx, coord cy, int dist)
{
memset(np, 0, sizeof(*np));
xydist_range(cx, cy, dist, &np->range);
}
void
-xysize_range(register struct range *rp)
+xysize_range(struct range *rp)
{
if (rp->lx >= rp->hx)
rp->width = WORLD_X + rp->hx - rp->lx;
/* This is called also called in snxtitem.c */
void
-xydist_range(coord x, coord y, register int dist, struct range *rp)
+xydist_range(coord x, coord y, int dist, struct range *rp)
{
if (dist < WORLD_X / 4) {
rp->lx = xnorm((coord)(x - 2 * dist));
#include "misc.h"
#include "nat.h"
-#include "var.h"
#include "retreat.h"
#include "ship.h"
#include "land.h"
*/
#include "misc.h"
-#include "var.h"
#include "sect.h"
#include "xy.h"
#include "nsc.h"
#include "optlist.h"
void
-takeover(register struct sctstr *sp, natid newown)
+takeover(struct sctstr *sp, natid newown)
{
struct plnstr *pp;
struct lndstr *lp;
}
void
-takeover_plane(register struct plnstr *pp, natid newown)
+takeover_plane(struct plnstr *pp, natid newown)
{
int n;
}
void
-takeover_ship(register struct shpstr *sp, natid newown, int hostile)
+takeover_ship(struct shpstr *sp, natid newown, int hostile)
{
- register struct plnstr *pp;
- register struct lndstr *lp;
+ struct plnstr *pp;
+ struct lndstr *lp;
struct nstr_item ni;
struct plnstr p;
struct lndstr llp;
}
void
-takeover_land(register struct lndstr *landp, natid newown, int hostile)
+takeover_land(struct lndstr *landp, natid newown, int hostile)
{
- register struct plnstr *pp;
- register struct lndstr *lp;
+ struct plnstr *pp;
+ struct lndstr *lp;
struct nstr_item ni;
struct plnstr p;
struct lndstr llp;
#include "misc.h"
#include "player.h"
-#include "var.h"
#include "sect.h"
#include "nat.h"
#include "item.h"
get_couval(int cnum)
{
struct sctstr *sp;
- register int j, k, val;
+ int j, k, val;
long secttot = 0;
for (j = 0; NULL != (sp = getsectid(j)); j++) {
#include <math.h>
#include "misc.h"
-#include "var.h"
#include "sect.h"
#include "nat.h"
#include "item.h"
void
finish_sects(int etu)
{
- register struct sctstr *sp;
+ struct sctstr *sp;
struct natstr *np;
int n;
struct distinfo *infptr;
#include <math.h>
#include "misc.h"
-#include "var.h"
#include "sect.h"
#include "nat.h"
#include "item.h"
#include "gen.h"
#include "subs.h"
-static int grow_people(struct sctstr *, register int,
- register struct natstr *, int *, int,
+static int grow_people(struct sctstr *, int,
+ struct natstr *, int *, int,
short *);
static int growfood(struct sctstr *, short *, int, int);
static void starvation(struct sctstr *);
-static void trunc_people(struct sctstr *, register struct natstr *,
+static void trunc_people(struct sctstr *, struct natstr *,
short *);
/*
* Truncate any extra people that may be around
*/
static void
-trunc_people(struct sctstr *sp, register struct natstr *np,
+trunc_people(struct sctstr *sp, struct natstr *np,
short *vec)
{
int maxpop = max_pop(np->nat_level[NAT_RLEV], sp);
* production? Maybe with just high education?
*/
static int
-grow_people(struct sctstr *sp, register int etu,
- register struct natstr *np, int *workp, int sctwork,
+grow_people(struct sctstr *sp, int etu,
+ struct natstr *np, int *workp, int sctwork,
short *vec)
{
int newciv;
#include "nat.h"
#include "land.h"
#include "ship.h"
-#include "var.h"
#include "news.h"
#include "file.h"
#include "product.h"
#define MIN(x,y) ((x) > (y) ? (y) : (x))
#endif
-static int landrepair(register struct lndstr *, struct natstr *,
+static int landrepair(struct lndstr *, struct natstr *,
int *, int);
-static void upd_land(register struct lndstr *lp, register int etus,
+static void upd_land(struct lndstr *lp, int etus,
struct natstr *np, int *bp, int build);
int
prod_land(int etus, int natnum, int *bp, int build)
/* build = 1, maintain = 0 */
{
- register struct lndstr *lp;
+ struct lndstr *lp;
struct sctstr *sp;
struct natstr *np;
int n, k = 0;
}
static void
-upd_land(register struct lndstr *lp, register int etus,
+upd_land(struct lndstr *lp, int etus,
struct natstr *np, int *bp, int build)
/* build = 1, maintain = 0 */
{
/*ARGSUSED*/
static int
-landrepair(register struct lndstr *land, struct natstr *np,
+landrepair(struct lndstr *land, struct natstr *np,
int *bp, int etus)
{
- register int delta;
+ int delta;
struct sctstr *sp;
struct lchrstr *lp;
float leftp, buildp;
#include "sect.h"
#include "player.h"
#include "empthread.h"
-#include "var.h"
#include "budg.h"
#include "product.h"
#include "player.h"
*/
#include "misc.h"
-#include "var.h"
#include "sect.h"
#include "file.h"
#include "optlist.h"
*/
#include "misc.h"
-#include "var.h"
#include "sect.h"
#include "ship.h"
#include "land.h"
static int timestamp_fixing;
static int do_upd_checking = 0;
-static void do_mob_land(register struct lndstr *, register int);
-static void do_mob_plane(register struct plnstr *, register int);
-static void do_mob_sect(register struct sctstr *sp, register int etus);
-static void do_mob_ship(register struct shpstr *, register int);
+static void do_mob_land(struct lndstr *, int);
+static void do_mob_plane(struct plnstr *, int);
+static void do_mob_sect(struct sctstr *sp, int etus);
+static void do_mob_ship(struct shpstr *, int);
static int
increase_mob(time_t * counter, float mult)
}
void
-sct_do_upd_mob(register struct sctstr *sp)
+sct_do_upd_mob(struct sctstr *sp)
{
int etus;
}
void
-shp_do_upd_mob(register struct shpstr *sp)
+shp_do_upd_mob(struct shpstr *sp)
{
int etus;
}
void
-lnd_do_upd_mob(register struct lndstr *lp)
+lnd_do_upd_mob(struct lndstr *lp)
{
int etus;
}
void
-pln_do_upd_mob(register struct plnstr *pp)
+pln_do_upd_mob(struct plnstr *pp)
{
int etus;
}
void
-mob_sect(register int etus)
+mob_sect(int etus)
{
- register struct sctstr *sp;
- register int n;
+ struct sctstr *sp;
+ int n;
time_t now;
time(&now);
}
static void
-do_mob_sect(register struct sctstr *sp, register int etus)
+do_mob_sect(struct sctstr *sp, int etus)
{
- register int value;
+ int value;
if (sp->sct_own == 0)
return;
}
void
-mob_ship(register int etus)
+mob_ship(int etus)
{
- register struct shpstr *sp;
- register int n;
+ struct shpstr *sp;
+ int n;
time_t now;
time(&now);
}
static void
-do_mob_ship(register struct shpstr *sp, register int etus)
+do_mob_ship(struct shpstr *sp, int etus)
{
int newfuel = 0;
- register int value;
+ int value;
int can_add, have_fuel_for, total_add;
double d;
}
void
-mob_land(register int etus)
+mob_land(int etus)
{
- register struct lndstr *lp;
- register int n;
+ struct lndstr *lp;
+ int n;
time_t now;
time(&now);
}
static void
-do_mob_land(register struct lndstr *lp, register int etus)
+do_mob_land(struct lndstr *lp, int etus)
{
int newfuel = 0;
- register int value;
+ int value;
int can_add, have_fuel_for, total_add;
double d;
}
void
-mob_plane(register int etus)
+mob_plane(int etus)
{
- register struct plnstr *pp;
- register int n;
+ struct plnstr *pp;
+ int n;
time_t now;
time(&now);
}
static void
-do_mob_plane(register struct plnstr *pp, register int etus)
+do_mob_plane(struct plnstr *pp, int etus)
{
- register int value;
+ int value;
if (pp->pln_own == 0)
return;
#include <math.h>
#include "misc.h"
-#include "var.h"
#include "plane.h"
#include "sect.h"
#include "xy.h"
#endif
void
-move_sat(register struct plnstr *pp)
+move_sat(struct plnstr *pp)
{
coord x1, y1, x2, y2;
coord dx, dy;
#include <math.h>
#include "misc.h"
-#include "var.h"
#include "sect.h"
#include "nat.h"
#include "item.h"
* level of 0 yields (1) 0.4, (6) 2.2, (12) 3.9, (18) 5.2.
*/
-static void share_incr(register double *, register double *);
+static void share_incr(double *, double *);
/*
* for values below the "easy level" values, production is
* find out everyones increment
*/
static void
-share_incr(register double *res, register double *tech)
+share_incr(double *res, double *tech)
{
- register struct natstr *np;
- register struct natstr *other;
- register natid i;
- register natid j;
+ struct natstr *np;
+ struct natstr *other;
+ natid i;
+ natid j;
int rnc;
int tnc;
#include "misc.h"
#include <ctype.h>
-#include "var.h"
#include "ship.h"
#include "sect.h"
#include "news.h"
static void swap(struct shpstr *);
static void
-scuttle_it(register struct shpstr *sp)
+scuttle_it(struct shpstr *sp)
{
struct sctstr *sectp;
}
static void
-nav_check_atdest(register struct shpstr *sp)
+nav_check_atdest(struct shpstr *sp)
{
if ((sp->shp_x == sp->shp_destx[0]) && (sp->shp_y == sp->shp_desty[0])) {
if ((sp->shp_destx[0] == sp->shp_destx[1]) &&
*/
static int
-nav_loadship(register struct shpstr *sp, natid cnum)
+nav_loadship(struct shpstr *sp, natid cnum)
{
struct sctstr *sectp;
int i, landown, shipown, didsomething[TMAX], rel;
* Modified to use shp_nav by Ken Stevens 1995
*/
int
-nav_ship(register struct shpstr *sp)
+nav_ship(struct shpstr *sp)
{
struct sctstr *sectp;
s_char *cp;
*/
#include "misc.h"
-#include "var.h"
#include "xy.h"
#include "plane.h"
#include "ship.h"
*/
#include "misc.h"
-#include "var.h"
#include "xy.h"
#include "sect.h"
#include "nsc.h"
* that matches the conditions.
*/
struct sctstr *
-nxtsctp(register struct nstr_sect *np)
+nxtsctp(struct nstr_sect *np)
{
while (1) {
np->dx++;
*/
#include "misc.h"
-#include "var.h"
#include "sect.h"
#include "plane.h"
#include "ship.h"
/* Build = 1, maintain =0 */
{
- register struct plnstr *pp;
- register struct plchrstr *plp;
+ struct plnstr *pp;
+ struct plchrstr *plp;
struct natstr *np;
float leftp, buildp;
int left, build;
*/
#include "misc.h"
-#include "var.h"
#include "sect.h"
#include "nat.h"
#include "news.h"
-#include "var.h"
#include "file.h"
#include "path.h"
#include "xy.h"
#include "lost.h"
void
-populace(struct natstr *np, register struct sctstr *sp, int etu)
+populace(struct natstr *np, struct sctstr *sp, int etu)
{
float hap;
float tech;
}
int
-total_work(register int sctwork, register int etu, register int civil,
- register int milit, register int uw)
+total_work(int sctwork, int etu, int civil,
+ int milit, int uw)
{
return ((int)((((civil * sctwork) / 100.0 +
(milit * 2 / 5.0) + uw)) * etu) / 100);
#include <math.h>
#include "misc.h"
-#include "var.h"
#include "sect.h"
#include "nat.h"
#include "item.h"
void
prepare_sects(int etu, int *bp)
{
- register struct sctstr *sp;
+ struct sctstr *sp;
struct natstr *np;
int n, civ_tax, uw_tax, mil_pay;
*/
#include "misc.h"
-#include "var.h"
#include "sect.h"
#include "product.h"
#include "nat.h"
produce(struct natstr *np, struct sctstr *sp, short *vec, int work,
int desig, int neweff, int *cost, int *amount)
{
- register struct pchrstr *product;
+ struct pchrstr *product;
double p_e;
double prodeff;
s_char *resource;
*/
#include "misc.h"
-#include "var.h"
#include "sect.h"
#include "nat.h"
#include "news.h"
-#include "var.h"
#include "file.h"
#include "path.h"
#include "xy.h"
}
}
if (convert && sp->sct_loyal >= 50) {
- register int n;
+ int n;
/* new owner gets to keep the mobility there */
oldmob = sp->sct_mobil;
/* che won, and sector converts. */
*/
#include "misc.h"
-#include "var.h"
#include "sect.h"
#include "path.h"
#include "ship.h"
-#include "var.h"
#include "news.h"
#include "file.h"
#include "nat.h"
#include <math.h>
#include "misc.h"
-#include "var.h"
#include "sect.h"
#include "nat.h"
#include "item.h"
* Return amount of work used.
*/
static int
-upd_buildeff(struct natstr *np, register struct sctstr *sp, int *workp,
+upd_buildeff(struct natstr *np, struct sctstr *sp, int *workp,
short *vec, int etu, int *desig, int sctwork, int *cost)
{
- register int work_cost = 0;
+ int work_cost = 0;
int buildeff_work = *workp / 2;
int n, hcms, lcms, neweff;
u_char old_type = *desig;
*/
void
-do_fallout(register struct sctstr *sp, register int etus)
+do_fallout(struct sctstr *sp, int etus)
{
struct shpstr *spp;
struct lndstr *lp;
{
struct sctstr *ap;
int n;
- register int inc;
+ int inc;
if (etus > 24)
etus = 24;
produce_sect(int natnum, int etu, int *bp, long int (*p_sect)[2],
int sector_type)
{
- register struct sctstr *sp;
- register struct natstr *np;
+ struct sctstr *sp;
+ struct natstr *np;
short buf[I_MAX + 1];
short *vec;
int work, cost, ecost, pcost, sctwork;
#include "sect.h"
#include "nat.h"
#include "ship.h"
-#include "var.h"
#include "news.h"
#include "file.h"
#include "product.h"
#define MIN(x,y) ((x) > (y) ? (y) : (x))
#endif
-static int shiprepair(register struct shpstr *, struct natstr *,
+static int shiprepair(struct shpstr *, struct natstr *,
int *, int);
-static void upd_ship(register struct shpstr *, register int,
+static void upd_ship(struct shpstr *, int,
struct natstr *, int *, int);
int
prod_ship(int etus, int natnum, int *bp, int build)
/* build = 1, maintain = 0 */
{
- register struct shpstr *sp;
+ struct shpstr *sp;
struct natstr *np;
int n, k = 0;
int start_money;
}
static void
-upd_ship(register struct shpstr *sp, register int etus,
+upd_ship(struct shpstr *sp, int etus,
struct natstr *np, int *bp, int build)
/* build = 1, maintain = 0 */
{
* 8 * 8 * $40 = $2560!
*/
static int
-shiprepair(register struct shpstr *ship, struct natstr *np,
+shiprepair(struct shpstr *ship, struct natstr *np,
int *bp, int etus)
{
- register int delta;
+ int delta;
struct sctstr *sp;
struct mchrstr *mp;
float leftp, buildp;
#include "land.h"
#include "ship.h"
#include "sect.h"
-#include "var.h"
#include "product.h"
#include "optlist.h"
#include "global.h"
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
-#include "var.h"
#include "misc.h"
#include "power.h"
#include "nat.h"
static void
write_sects(void)
{
- register struct sctstr *sct;
+ struct sctstr *sct;
int c, x, y, total;
/* sct = §s[0][0]; */
#include "options.h"
#include "misc.h"
-#include "var.h"
#include "sect.h"
#include "nat.h"
#include "ship.h"