Purge the register keyword.

This commit is contained in:
Markus Armbruster 2006-05-21 13:18:57 +00:00
parent 4c4fdca42b
commit 0d842c47f7
15 changed files with 45 additions and 57 deletions

View file

@ -369,7 +369,7 @@ extern int onearg(char *, char *);
extern int parse(char *, char **, char **, char *, char **);
extern int ldround(double, int);
extern int roundintby(int, int);
extern int scthash(register int, register int, int);
extern int scthash(int, int, int);
extern int tcp_listen(char *, char *, size_t *);
extern char *numstr(char buf[], int n);
/* plur.c */
@ -450,9 +450,9 @@ extern int military_control(struct sctstr *);
/* detonate.c */
extern int detonate(struct nukstr *, coord, coord, int);
/* disloan.c */
extern int disloan(int, register struct lonstr *);
extern int disloan(int, struct lonstr *);
/* distrea.c */
extern int distrea(int, register struct trtstr *);
extern int distrea(int, struct trtstr *);
/* fileinit.c */
extern void ef_init_srv(void);
extern void ef_fin_srv(void);
@ -618,9 +618,9 @@ extern int check_retreat_and_do_landdamage(struct lndstr *, int);
/* sarg.c */
extern ns_seltype sarg_type(char *);
extern int sarg_xy(char *, coord *, coord *);
extern int sarg_area(char *, register struct range *);
extern int sarg_area(char *, struct range *);
extern int sarg_range(char *, coord *, coord *, int *);
extern int sarg_list(char *, register int *, int);
extern int sarg_list(char *, int *, int);
/* satmap.c */
extern void satdisp(struct sctstr *, int, int);
extern void satmap(int, int, int, int, int, int);
@ -682,7 +682,7 @@ extern void snxtitem_group(struct nstr_item *, int, char);
extern void snxtitem_rewind(struct nstr_item *);
extern int snxtitem_list(struct nstr_item *, int, int *, int);
/* snxtsct.c */
extern int snxtsct(register struct nstr_sect *, char *);
extern int snxtsct(struct nstr_sect *, char *);
extern void snxtsct_area(struct nstr_sect *, struct range *);
extern void xydist_range(coord, coord, int, struct range *);
extern void xysize_range(struct range *);
@ -703,7 +703,7 @@ 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);
extern int trechk(natid, natid, int);
/* whatitem.c */
/* in item.h */
/* wu.c */
@ -728,7 +728,7 @@ extern int dodistribute(struct sctstr *, int, char *, double, double);
extern void finish_sects(int);
/* human.c */
extern int new_work(struct sctstr *, int);
extern int do_feed(register struct sctstr *, register struct natstr *,
extern int do_feed(struct sctstr *, struct natstr *,
short *, int *, int *, int);
extern int feed_people(short *, int, int *);
/* land.c */
@ -755,7 +755,7 @@ extern void move_sat(struct plnstr *);
extern double logx(double, double);
extern void prod_nat(int);
/* nav_ship.c */
extern int nav_ship(register struct shpstr *);
extern int nav_ship(struct shpstr *);
/* nav_util.c */
extern int load_it(struct shpstr *, struct sctstr *,
int);
@ -769,7 +769,7 @@ extern int plague_people(struct natstr *, short *, int *, int *, int);
/* plane.c */
extern int prod_plane(int, int, int *, int);
/* populace.c */
extern void populace(struct natstr *, register struct sctstr *, int);
extern void populace(struct natstr *, struct sctstr *, int);
extern int total_work(int, int, int, int, int, int);
/* prepare.c */
extern void tax(struct sctstr *, struct natstr *, int, long *, int *,
@ -789,7 +789,7 @@ extern void guerrilla(struct sctstr *);
/* sail.c */
extern void sail_ship(natid);
/* sect.c */
extern void do_fallout(register struct sctstr *, register int);
extern void do_fallout(struct sctstr *, int);
extern void spread_fallout(struct sctstr *, int);
extern void decay_fallout(struct sctstr *, int);
extern void produce_sect(int natnum, int etu, int *bp,

View file

@ -52,14 +52,13 @@ static void head_describe(struct histstr *, int, char *, char *);
static int head_printscoop(struct histstr (*hist)[MAXNOC], natid ano,
natid vno);
static int head_findscoop(struct histstr (*hist)[MAXNOC],
register natid maxcnum, natid *ano, natid *vno);
natid maxcnum, natid *ano, natid *vno);
int
head(void)
{
register int i;
register struct histstr *hp;
register natid maxcnum;
struct histstr *hp;
natid maxcnum;
time_t now;
int severity;
int scoop;
@ -71,7 +70,7 @@ head(void)
natid actor;
natid victim;
struct nstr_item nstr;
int n;
int i, n;
(void)time(&now);
natp = getnatp(player->cnum);
@ -126,7 +125,7 @@ head(void)
static int
head_printscoop(struct histstr (*hist)[MAXNOC], natid ano, natid vno)
{
register struct histstr *hp;
struct histstr *hp;
int severity;
hp = &hist[ano][vno];
@ -220,16 +219,12 @@ head_describe(struct histstr *hp, int what, char *aname, char *vname)
* Pretty strange.
*/
static int
head_findscoop(struct histstr (*hist)[MAXNOC], register natid maxcnum,
head_findscoop(struct histstr (*hist)[MAXNOC], natid maxcnum,
natid *ano, natid *vno)
{
register struct histstr *hp;
register int i;
register int j;
register int k;
int scoop;
natid actor;
natid victim;
struct histstr *hp;
int i, j, k, scoop;
natid actor, victim;
scoop = 9;
actor = 0;

View file

@ -43,7 +43,7 @@
#include "commands.h"
#include "optlist.h"
static void preport(register struct nwsstr *np);
static void preport(struct nwsstr *np);
int
news(void)
@ -174,10 +174,10 @@ news(void)
}
static void
preport(register struct nwsstr *np)
preport(struct nwsstr *np)
{
char *cp;
register int i;
int i;
char buf[255];
char num[128];
char *ptr;

View file

@ -80,15 +80,13 @@ static int
do_treaty(void)
{
char *cp;
register int ourcond;
register int theircond;
register int j;
int ourcond, theircond;
struct symbol *tfp;
struct trtstr trty;
struct nstr_item nstr;
natid recipient;
time_t now;
int n;
int j, n;
struct natstr *natp;
char prompt[128];
char buf[1024];
@ -163,7 +161,7 @@ do_treaty(void)
static int
do_loan(void)
{
register int amt, irate, dur, maxloan;
int amt, irate, dur, maxloan;
struct nstr_item nstr;
struct natstr *natp;
struct lonstr loan;

View file

@ -38,7 +38,7 @@
int
roundintby(int n, int m)
{
register int r11;
int r11;
r11 = (m >> 1) + n;
return r11 / m * m;

View file

@ -48,7 +48,7 @@ lwpGetFirst(struct lwpQueue *q)
}
void
lwpAddTail(register struct lwpQueue *q, register struct lwpProc *p)
lwpAddTail(struct lwpQueue *q, struct lwpProc *p)
{
if (!q->tail)
q->head = p;

View file

@ -167,7 +167,7 @@ getplayer(natid cnum)
void
player_wakeup_all(natid cnum)
{
register struct player *lp;
struct player *lp;
if (NULL != (lp = getplayer(cnum)))
player_wakeup(lp);

View file

@ -44,9 +44,7 @@ border(struct range *rp, char *prefstr, char *sep)
/* prefixes each line */
/* separates the numbers */
{
register int posi;
register int n;
register int x;
int posi, n, x;
if ((WORLD_X / 2) >= 100) {
if (rp->lx + rp->width > 99 || rp->hx - rp->width < -99) {

View file

@ -41,12 +41,10 @@
#include "prototypes.h"
int
distrea(int n, register struct trtstr *tp)
distrea(int n, struct trtstr *tp)
{
register int i;
int acond;
int bcond;
int cond;
int i;
int acond, bcond, cond;
time_t now;
if (tp->trt_status == TS_FREE)

View file

@ -136,7 +136,7 @@ emp_getbit(int x, int y, unsigned char *bitmap)
void
emp_setbit(int x, int y, unsigned char *bitmap)
{
register int id;
int id;
id = (GCFy(y)) * WORLD_X / 2 + GCFx(x) / 2;
bitmap[id / 8] |= bit(id & 07);
@ -145,9 +145,9 @@ emp_setbit(int x, int y, unsigned char *bitmap)
static void
emp_setbitmap(int x, int y, unsigned char *bitmap, int *bitmaps)
{
register int *mp;
register int id;
register int dx, dy;
int *mp;
int id;
int dx, dy;
for (mp = bitmaps; *mp != 9999;) {
dx = x + *mp++;

View file

@ -48,8 +48,8 @@
int
comtch(char *command, struct cmndstr *coms, int comstat)
{
register struct cmndstr *com;
register int status;
struct cmndstr *com;
int status;
if (command == 0 || *command == 0)
return M_IGNORE;

View file

@ -43,7 +43,7 @@
int
neigh(coord x, coord y, natid own)
{
register int i;
int i;
struct sctstr sect;
for (i = DIR_FIRST; i <= DIR_LAST; i++) {

View file

@ -154,7 +154,7 @@ init_nreport(void)
static struct newscache *
ncache(int actor, int event, int victim, int times)
{
register struct newscache *np;
struct newscache *np;
int i;
int oldslot;
time_t oldtime;

View file

@ -52,9 +52,9 @@
#include "optlist.h"
int
trechk(register natid actor, register natid victim, int provision)
trechk(natid actor, natid victim, int provision)
{
register natid cn;
natid cn;
char buf[1024];
int news_verb;
int involved[MAXNOC];

View file

@ -43,9 +43,8 @@
void
age_levels(int etu)
{
register float best_tech;
register float best_res;
register struct natstr *np;
float best_tech, best_res;
struct natstr *np;
int i;
double level;
double delta;