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

@ -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;