1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-10 06:47:55 -08:00

de-register

This commit is contained in:
pjanzen 2002-05-31 04:21:20 +00:00
parent 5878d5c261
commit 97419aa08e
71 changed files with 508 additions and 535 deletions

View File

@ -1,4 +1,4 @@
/* $OpenBSD: arithmetic.c,v 1.10 2002/05/31 03:40:00 pjanzen Exp $ */
/* $OpenBSD: arithmetic.c,v 1.11 2002/05/31 04:21:20 pjanzen Exp $ */
/*
* Copyright (c) 1989, 1993
@ -46,7 +46,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)arithmetic.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: arithmetic.c,v 1.10 2002/05/31 03:40:00 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: arithmetic.c,v 1.11 2002/05/31 04:21:20 pjanzen Exp $";
#endif
#endif /* not lint */
@ -193,7 +193,7 @@ showstats()
int
problem()
{
register char *p;
char *p;
time_t start, finish;
int left, op, right, result;
char line[80];
@ -328,7 +328,7 @@ getrandom(maxval, op, operand)
int maxval, op, operand;
{
int value;
register struct penalty **pp, *p;
struct penalty **pp, *p;
op = opnum(op);
value = random() % (maxval + penalty[op][operand]);

View File

@ -1,4 +1,4 @@
/* $OpenBSD: bog.c,v 1.9 2002/05/31 03:40:00 pjanzen Exp $ */
/* $OpenBSD: bog.c,v 1.10 2002/05/31 04:21:29 pjanzen Exp $ */
/* $NetBSD: bog.c,v 1.5 1995/04/24 12:22:32 cgd Exp $ */
/*-
@ -47,7 +47,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)bog.c 8.1 (Berkeley) 6/11/93";
#else
static char rcsid[] = "$OpenBSD: bog.c,v 1.9 2002/05/31 03:40:00 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: bog.c,v 1.10 2002/05/31 04:21:29 pjanzen Exp $";
#endif
#endif /* not lint */
@ -265,8 +265,8 @@ char *
batchword(fp)
FILE *fp;
{
register int *p, *q;
register char *w;
int *p, *q;
char *w;
q = &wordpath[MAXWORDLEN + 1];
p = wordpath;
@ -293,7 +293,6 @@ batchword(fp)
void
playgame()
{
/* Can't use register variables if setjmp() is used! */
int i, *p, *q;
time_t t;
char buf[MAXWORDLEN + 1];
@ -417,8 +416,8 @@ checkword(word, prev, path)
char *word;
int prev, *path;
{
register char *p, *q;
register int i, *lm;
char *p, *q;
int i, *lm;
if (debug) {
(void) printf("checkword(%s, %d, [", word, prev);
@ -499,8 +498,8 @@ int
validword(word)
char *word;
{
register int j;
register char *q, *w;
int j;
char *q, *w;
j = word[0] - 'a';
if (dictseek(dictfp, dictindex[j].start, SEEK_SET) < 0) {
@ -533,8 +532,8 @@ validword(word)
void
checkdict()
{
register char *p, **pw, *w;
register int i;
char *p, **pw, *w;
int i;
int prevch, previndex, *pi, *qi, st;
mwordsp = mwords;
@ -612,7 +611,7 @@ void
newgame(b)
char *b;
{
register int i, p, q;
int i, p, q;
char *tmp;
int *lm[26];
static char *cubes[16] = {
@ -658,7 +657,7 @@ newgame(b)
}
for (i = 0; i < 16; i++) {
register int j;
int j;
j = (int) (board[i] - 'a');
*lm[j] = i;

View File

@ -1,4 +1,4 @@
/* $OpenBSD: mach.c,v 1.4 2002/02/16 21:27:09 millert Exp $ */
/* $OpenBSD: mach.c,v 1.5 2002/05/31 04:21:29 pjanzen Exp $ */
/* $NetBSD: mach.c,v 1.5 1995/04/28 22:28:48 mycroft Exp $ */
/*-
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)mach.c 8.1 (Berkeley) 6/11/93";
#else
static char rcsid[] = "$OpenBSD: mach.c,v 1.4 2002/02/16 21:27:09 millert Exp $";
static char rcsid[] = "$OpenBSD: mach.c,v 1.5 2002/05/31 04:21:29 pjanzen Exp $";
#endif
#endif /* not lint */
@ -173,8 +173,8 @@ char *
getline(q)
char *q;
{
register int ch, done;
register char *p;
int ch, done;
char *p;
int row, col;
p = q;
@ -662,8 +662,7 @@ static void
tty_showboard(b)
char *b;
{
register int i;
int line;
int i, line;
clear();
move(BOARD_LINE, BOARD_COL);

View File

@ -1,4 +1,4 @@
/* $OpenBSD: prtable.c,v 1.6 2002/02/17 19:42:20 millert Exp $ */
/* $OpenBSD: prtable.c,v 1.7 2002/05/31 04:21:29 pjanzen Exp $ */
/* $NetBSD: prtable.c,v 1.2 1995/03/21 12:14:42 cgd Exp $ */
/*-
@ -69,8 +69,8 @@ prtable(base, num, d_cols, width, prentry, length)
void (*prentry)(char *[], int);
int (*length)(char *[], int);
{
register int c, j;
register int a, b, cols, loc, maxlen, nrows, z;
int c, j;
int a, b, cols, loc, maxlen, nrows, z;
int col, row;
if (num == 0)
@ -119,7 +119,7 @@ get_maxlen(base, num, length)
int num;
int (*length)(char **, int);
{
register int i, len, max;
int i, len, max;
max = (*length)(base, 0);
for (i = 0; i < num; i++) {

View File

@ -1,4 +1,4 @@
/* $OpenBSD: word.c,v 1.2 1998/09/24 06:45:06 pjanzen Exp $ */
/* $OpenBSD: word.c,v 1.3 2002/05/31 04:21:29 pjanzen Exp $ */
/* $NetBSD: word.c,v 1.2 1995/03/21 12:14:45 cgd Exp $ */
/*-
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)word.c 8.1 (Berkeley) 6/11/93";
#else
static char rcsid[] = "$OpenBSD: word.c,v 1.2 1998/09/24 06:45:06 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: word.c,v 1.3 2002/05/31 04:21:29 pjanzen Exp $";
#endif
#endif /* not lint */
@ -70,8 +70,8 @@ nextword(fp)
FILE *fp;
{
extern int wordlen;
register int ch, pcount;
register char *p;
int ch, pcount;
char *p;
static char buf[MAXWORDLEN + 1];
if (fp == NULL) {
@ -190,7 +190,7 @@ int
loadindex(indexfile)
char *indexfile;
{
register int i, j;
int i, j;
char buf[BUFSIZ];
FILE *fp;
extern struct dictindex dictindex[];

View File

@ -1,4 +1,4 @@
/* $OpenBSD: mkdict.c,v 1.3 1998/09/24 06:45:06 pjanzen Exp $ */
/* $OpenBSD: mkdict.c,v 1.4 2002/05/31 04:21:29 pjanzen Exp $ */
/* $NetBSD: mkdict.c,v 1.2 1995/03/21 12:14:49 cgd Exp $ */
/*-
@ -47,7 +47,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)mkdict.c 8.1 (Berkeley) 6/11/93";
#else
static char rcsid[] = "$OpenBSD: mkdict.c,v 1.3 1998/09/24 06:45:06 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: mkdict.c,v 1.4 2002/05/31 04:21:29 pjanzen Exp $";
#endif
#endif /* not lint */
@ -72,8 +72,8 @@ main(argc, argv)
int argc;
char *argv[];
{
register char *p, *q;
register int ch, common, n, nwords;
char *p, *q;
int ch, common, n, nwords;
int current, len, prev, qcount;
char buf[2][MAXWORDLEN + 1];

View File

@ -1,4 +1,4 @@
/* $OpenBSD: mkindex.c,v 1.3 2002/02/16 21:27:09 millert Exp $ */
/* $OpenBSD: mkindex.c,v 1.4 2002/05/31 04:21:29 pjanzen Exp $ */
/* $NetBSD: mkindex.c,v 1.2 1995/03/21 12:14:52 cgd Exp $ */
/*-
@ -47,7 +47,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)mkindex.c 8.1 (Berkeley) 6/11/93";
#else
static char rcsid[] = "$OpenBSD: mkindex.c,v 1.3 2002/02/16 21:27:09 millert Exp $";
static char rcsid[] = "$OpenBSD: mkindex.c,v 1.4 2002/05/31 04:21:29 pjanzen Exp $";
#endif
#endif /* not lint */
@ -93,8 +93,8 @@ nextword(fp, buffer, clen, rlen)
char *buffer;
int *clen, *rlen;
{
register int ch, pcount;
register char *p, *q;
int ch, pcount;
char *p, *q;
static char buf[MAXWORDLEN + 1];
static int first = 1;
static int lastch = 0;

View File

@ -1,4 +1,4 @@
/* $OpenBSD: bs.c,v 1.13 2002/05/31 03:40:00 pjanzen Exp $ */
/* $OpenBSD: bs.c,v 1.14 2002/05/31 04:21:29 pjanzen Exp $ */
/*
* bs.c - original author: Bruce Holloway
* salvo option by: Chuck A DeGaul
@ -11,7 +11,7 @@
*/
#ifndef lint
static char rcsid[] = "$OpenBSD: bs.c,v 1.13 2002/05/31 03:40:00 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: bs.c,v 1.14 2002/05/31 04:21:29 pjanzen Exp $";
#endif
/* #define _POSIX_SOURCE */ /* ( random() ) */
@ -334,8 +334,8 @@ static int rnd(int n)
static void randomplace(int b, ship_t *ss)
/* generate a valid random ship placement into px,py */
{
register int bwidth = BWIDTH - ss->length;
register int bdepth = BDEPTH - ss->length;
int bwidth = BWIDTH - ss->length;
int bdepth = BDEPTH - ss->length;
do {
ss->y = rnd(bdepth);
@ -1276,7 +1276,7 @@ void usage()
static void do_options(int c, char *op[])
{
register int i;
int i;
if (c > 1)
{
@ -1327,8 +1327,8 @@ static void do_options(int c, char *op[])
static int scount(int who)
{
register int i, shots;
register ship_t *sp;
int i, shots;
ship_t *sp;
if (who)
sp = cpuship; /* count cpu shots */
@ -1365,7 +1365,7 @@ int main(int argc, char *argv[])
}
else /* salvo */
{
register int i;
int i;
i = scount(turn);
while (i--)

View File

@ -1,4 +1,4 @@
/* $OpenBSD: caesar.c,v 1.10 2002/05/31 03:40:00 pjanzen Exp $ */
/* $OpenBSD: caesar.c,v 1.11 2002/05/31 04:21:30 pjanzen Exp $ */
/*
* Copyright (c) 1989, 1993
@ -51,7 +51,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)caesar.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: caesar.c,v 1.10 2002/05/31 03:40:00 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: caesar.c,v 1.11 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -155,7 +155,7 @@ void
printit(rot)
int rot;
{
register int ch;
int ch;
if ((rot < 0) || ( rot >= 26))
errx(1, "bad rotation value");

View File

@ -1,4 +1,4 @@
/* $OpenBSD: fortune.c,v 1.13 2002/02/17 19:42:20 millert Exp $ */
/* $OpenBSD: fortune.c,v 1.14 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: fortune.c,v 1.8 1995/03/23 08:28:40 cgd Exp $ */
/*-
@ -47,7 +47,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)fortune.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: fortune.c,v 1.13 2002/02/17 19:42:20 millert Exp $";
static char rcsid[] = "$OpenBSD: fortune.c,v 1.14 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -186,8 +186,8 @@ char *regcmp(), *regex();
int
main(ac, av)
int ac;
char *av[];
int ac;
char *av[];
{
#ifdef OK_TO_WRITE_DISK
int fd;
@ -241,9 +241,9 @@ char *av[];
void
display(fp)
FILEDESC *fp;
FILEDESC *fp;
{
register char *p, ch;
char *p, ch;
char line[BUFSIZ];
open_fp(fp);
@ -268,7 +268,7 @@ FILEDESC *fp;
int
fortlen()
{
register int nchar;
int nchar;
char line[BUFSIZ];
if (!(Fortfile->tbl.str_flags & (STR_RANDOM | STR_ORDERED)))
@ -290,12 +290,12 @@ fortlen()
*/
void
getargs(argc, argv)
register int argc;
register char **argv;
int argc;
char **argv;
{
register int ignore_case;
int ignore_case;
# ifndef NO_REGEX
register char *pat = NULL;
char *pat = NULL;
# endif /* NO_REGEX */
extern char *optarg;
extern int optind;
@ -391,11 +391,11 @@ register char **argv;
*/
int
form_file_list(files, file_cnt)
register char **files;
register int file_cnt;
char **files;
int file_cnt;
{
register int i, percent;
register char *sp;
int i, percent;
char *sp;
if (file_cnt == 0)
if (Find_files)
@ -451,17 +451,17 @@ register int file_cnt;
*/
int
add_file(percent, file, dir, head, tail, parent)
int percent;
register char *file;
char *dir;
FILEDESC **head, **tail;
FILEDESC *parent;
int percent;
char *file;
char *dir;
FILEDESC **head, **tail;
FILEDESC *parent;
{
register FILEDESC *fp;
register int fd;
register char *path, *offensive;
register bool was_malloc;
register bool isdir;
FILEDESC *fp;
int fd;
char *path, *offensive;
bool was_malloc;
bool isdir;
if (dir == NULL) {
path = file;
@ -580,7 +580,7 @@ over:
FILEDESC *
new_fp()
{
register FILEDESC *fp;
FILEDESC *fp;
fp = (FILEDESC *) do_malloc(sizeof *fp);
fp->datfd = -1;
@ -604,7 +604,7 @@ new_fp()
*/
char *
off_name(file)
char *file;
char *file;
{
char *new;
@ -618,7 +618,7 @@ char *file;
*/
int
is_off_name(file)
char *file;
char *file;
{
int len;
@ -633,12 +633,12 @@ char *file;
*/
void
all_forts(fp, offensive)
register FILEDESC *fp;
char *offensive;
FILEDESC *fp;
char *offensive;
{
register char *sp;
register FILEDESC *scene, *obscene;
register int fd;
char *sp;
FILEDESC *scene, *obscene;
int fd;
auto char *datfile, *posfile;
if (fp->child != NULL) /* this is a directory, not a file */
@ -683,10 +683,10 @@ char *offensive;
*/
int
add_dir(fp)
register FILEDESC *fp;
FILEDESC *fp;
{
register DIR *dir;
register struct dirent *dirent;
DIR *dir;
struct dirent *dirent;
auto FILEDESC *tailp;
auto char *name;
@ -722,7 +722,7 @@ register FILEDESC *fp;
*/
int
is_dir(file)
char *file;
char *file;
{
auto struct stat sbuf;
@ -741,12 +741,12 @@ char *file;
/* ARGSUSED */
int
is_fortfile(file, datp, posp, check_for_offend)
char *file, **datp, **posp;
int check_for_offend;
char *file, **datp, **posp;
int check_for_offend;
{
register int i;
register char *sp;
register char *datfile;
int i;
char *sp;
char *datfile;
static char *suflist[] = { /* list of "illegal" suffixes" */
"dat", "pos", "c", "h", "p", "i", "f",
"pas", "ftn", "ins.c", "ins,pas",
@ -810,8 +810,8 @@ int check_for_offend;
*/
char *
copy(str, len)
char *str;
unsigned int len;
char *str;
unsigned int len;
{
char *new, *sp;
@ -829,7 +829,7 @@ unsigned int len;
*/
void *
do_malloc(size)
unsigned int size;
unsigned int size;
{
void *new;
@ -846,7 +846,7 @@ unsigned int size;
*/
void
do_free(ptr)
void *ptr;
void *ptr;
{
if (ptr != NULL)
free(ptr);
@ -859,8 +859,8 @@ void *ptr;
void
init_prob()
{
register FILEDESC *fp, *last;
register int percent, num_noprob, frac;
FILEDESC *fp, *last;
int percent, num_noprob, frac;
/*
* Distribute the residual probability (if any) across all
@ -931,8 +931,8 @@ init_prob()
void
get_fort()
{
register FILEDESC *fp;
register int choice;
FILEDESC *fp;
int choice;
if (File_list->next == NULL || File_list->percent == NO_PROB)
fp = File_list;
@ -994,10 +994,10 @@ get_fort()
*/
FILEDESC *
pick_child(parent)
FILEDESC *parent;
FILEDESC *parent;
{
register FILEDESC *fp;
register int choice;
FILEDESC *fp;
int choice;
if (Equal_probs) {
choice = arc4random() % parent->num_children;
@ -1031,7 +1031,7 @@ FILEDESC *parent;
*/
void
sum_noprobs(fp)
register FILEDESC *fp;
FILEDESC *fp;
{
static bool did_noprobs = FALSE;
@ -1048,7 +1048,7 @@ register FILEDESC *fp;
int
max(i, j)
register int i, j;
int i, j;
{
return (i >= j ? i : j);
}
@ -1059,7 +1059,7 @@ register int i, j;
*/
void
open_fp(fp)
FILEDESC *fp;
FILEDESC *fp;
{
if (fp->inf == NULL && (fp->inf = fdopen(fp->fd, "r")) == NULL) {
perror(fp->path);
@ -1073,7 +1073,7 @@ FILEDESC *fp;
*/
void
open_dat(fp)
FILEDESC *fp;
FILEDESC *fp;
{
if (fp->datfd < 0 && (fp->datfd = open(fp->datfile, 0)) < 0) {
perror(fp->datfile);
@ -1088,7 +1088,7 @@ FILEDESC *fp;
*/
void
get_pos(fp)
FILEDESC *fp;
FILEDESC *fp;
{
#ifdef OK_TO_WRITE_DISK
int fd;
@ -1121,10 +1121,10 @@ FILEDESC *fp;
*/
void
get_tbl(fp)
FILEDESC *fp;
FILEDESC *fp;
{
auto int fd;
register FILEDESC *child;
FILEDESC *child;
if (fp->read_tbl)
return;
@ -1193,7 +1193,7 @@ FILEDESC *fp;
*/
void
zero_tbl(tp)
register STRFILE *tp;
STRFILE *tp;
{
tp->str_numstr = 0;
tp->str_longlen = 0;
@ -1206,7 +1206,7 @@ register STRFILE *tp;
*/
void
sum_tbl(t1, t2)
register STRFILE *t1, *t2;
STRFILE *t1, *t2;
{
t1->str_numstr += t2->str_numstr;
if (t1->str_longlen < t2->str_longlen)
@ -1233,8 +1233,8 @@ print_file_list()
*/
void
print_list(list, lev)
register FILEDESC *list;
int lev;
FILEDESC *list;
int lev;
{
while (list != NULL) {
fprintf(stderr, "%*s", lev * 4, "");
@ -1259,11 +1259,11 @@ int lev;
*/
char *
conv_pat(orig)
register char *orig;
char *orig;
{
register char *sp;
register unsigned int cnt;
register char *new;
char *sp;
unsigned int cnt;
char *new;
cnt = 1; /* allow for '\0' */
for (sp = orig; *sp != '\0'; sp++)
@ -1320,10 +1320,10 @@ find_matches()
*/
int
maxlen_in_list(list)
FILEDESC *list;
FILEDESC *list;
{
register FILEDESC *fp;
register int len, maxlen;
FILEDESC *fp;
int len, maxlen;
maxlen = 0;
for (fp = list; fp != NULL; fp = fp->next) {
@ -1346,10 +1346,10 @@ FILEDESC *list;
*/
void
matches_in_list(list)
FILEDESC *list;
FILEDESC *list;
{
register char *sp;
register FILEDESC *fp;
char *sp;
FILEDESC *fp;
int in_file;
for (fp = list; fp != NULL; fp = fp->next) {

View File

@ -1,4 +1,4 @@
/* $OpenBSD: bdinit.c,v 1.3 1998/03/26 21:16:43 pjanzen Exp $ */
/* $OpenBSD: bdinit.c,v 1.4 2002/05/31 04:21:30 pjanzen Exp $ */
/*
* Copyright (c) 1994
* The Regents of the University of California. All rights reserved.
@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)bdinit.c 8.2 (Berkeley) 5/3/95";
#else
static char rcsid[] = "$OpenBSD: bdinit.c,v 1.3 1998/03/26 21:16:43 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: bdinit.c,v 1.4 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -50,9 +50,9 @@ void
bdinit(bp)
struct spotstr *bp;
{
register int i, j, r;
register struct spotstr *sp;
register struct combostr *cbp;
int i, j, r;
struct spotstr *sp;
struct combostr *cbp;
movenum = 1;
@ -176,9 +176,9 @@ bdinit(bp)
void
init_overlap()
{
register struct spotstr *sp1, *sp2;
register struct combostr *cbp;
register int i, f, r, n, d1, d2;
struct spotstr *sp1, *sp2;
struct combostr *cbp;
int i, f, r, n, d1, d2;
int mask, bmask, vertex, s;
u_char *str;
short *ip;

View File

@ -1,4 +1,4 @@
/* $OpenBSD: bdisp.c,v 1.6 2001/02/17 23:03:57 pjanzen Exp $ */
/* $OpenBSD: bdisp.c,v 1.7 2002/05/31 04:21:30 pjanzen Exp $ */
/*
* Copyright (c) 1994
* The Regents of the University of California. All rights reserved.
@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)bdisp.c 8.2 (Berkeley) 5/3/95";
#else
static char rcsid[] = "$OpenBSD: bdisp.c,v 1.6 2001/02/17 23:03:57 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: bdisp.c,v 1.7 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -96,7 +96,7 @@ cursfini()
void
bdisp_init()
{
register int i, j;
int i, j;
/* top border */
for (i = 1; i < BSZ1; i++) {
@ -161,8 +161,8 @@ bdwho(update)
void
bdisp()
{
register int i, j, c;
register struct spotstr *sp;
int i, j, c;
struct spotstr *sp;
for (j = BSZ1; --j > 0; ) {
for (i = 1; i < BSZ1; i++) {
@ -190,8 +190,8 @@ bdisp()
bdump(fp)
FILE *fp;
{
register int i, j, c;
register struct spotstr *sp;
int i, j, c;
struct spotstr *sp;
/* top border */
fprintf(fp, " A B C D E F G H J K L M N O P Q R S T\n");
@ -264,8 +264,8 @@ getline(buf, size)
char *buf;
int size;
{
register char *cp, *end;
register int c = EOF;
char *cp, *end;
int c = EOF;
extern int interactive;
cp = buf;

View File

@ -1,4 +1,4 @@
/* $OpenBSD: makemove.c,v 1.4 1998/03/26 21:16:50 pjanzen Exp $ */
/* $OpenBSD: makemove.c,v 1.5 2002/05/31 04:21:30 pjanzen Exp $ */
/*
* Copyright (c) 1994
* The Regents of the University of California. All rights reserved.
@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)makemove.c 8.2 (Berkeley) 5/3/95";
#else
static char rcsid[] = "$OpenBSD: makemove.c,v 1.4 1998/03/26 21:16:50 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: makemove.c,v 1.5 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -64,12 +64,12 @@ int
makemove(us, mv)
int us, mv;
{
register struct spotstr *sp, *fsp;
register union comboval *cp;
struct spotstr *sp, *fsp;
union comboval *cp;
struct spotstr *osp;
struct combostr *cbp, *cbp1;
union comboval *cp1;
register int i, f, r, d, n;
int i, f, r, d, n;
int space, val, bmask;
/* check for end of game */
@ -222,8 +222,8 @@ void
update_overlap(osp)
struct spotstr *osp;
{
register struct spotstr *sp, *sp1, *sp2;
register int i, f, r, r1, d, d1, n;
struct spotstr *sp, *sp1, *sp2;
int i, f, r, r1, d, d1, n;
int a, b, bmask, bmask1;
struct spotstr *esp = NULL;
char *str;

View File

@ -1,4 +1,4 @@
/* $OpenBSD: pickmove.c,v 1.6 2002/04/20 00:58:32 espie Exp $ */
/* $OpenBSD: pickmove.c,v 1.7 2002/05/31 04:21:30 pjanzen Exp $ */
/*
* Copyright (c) 1994
* The Regents of the University of California. All rights reserved.
@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)pickmove.c 8.2 (Berkeley) 5/3/95";
#else
static char rcsid[] = "$OpenBSD: pickmove.c,v 1.6 2002/04/20 00:58:32 espie Exp $";
static char rcsid[] = "$OpenBSD: pickmove.c,v 1.7 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -70,8 +70,8 @@ int
pickmove(us)
int us;
{
register struct spotstr *sp, *sp1, *sp2;
register union comboval *Ocp, *Tcp;
struct spotstr *sp, *sp1, *sp2;
union comboval *Ocp, *Tcp;
int m;
/* first move is easy */
@ -231,11 +231,11 @@ void
scanframes(color)
int color;
{
register struct combostr *cbp, *ecbp;
register struct spotstr *sp;
register union comboval *cp;
register struct elist *ep, *nep;
register int i, r, d, n;
struct combostr *cbp, *ecbp;
struct spotstr *sp;
union comboval *cp;
struct elist *ep, *nep;
int i, r, d, n;
union comboval cb;
curcolor = color;
@ -419,9 +419,9 @@ makecombo2(ocbp, osp, off, s)
int off;
int s;
{
register struct spotstr *fsp;
register struct combostr *ncbp;
register int f, r, d, c;
struct spotstr *fsp;
struct combostr *ncbp;
int f, r, d, c;
int baseB, fcnt, emask, bmask, n;
union comboval ocb, fcb;
struct combostr **scbpp, *fcbp;
@ -550,10 +550,10 @@ void
addframes(level)
int level;
{
register struct combostr *cbp, *ecbp;
register struct spotstr *sp, *fsp;
register struct elist *ep, *nep;
register int i, r, d;
struct combostr *cbp, *ecbp;
struct spotstr *sp, *fsp;
struct elist *ep, *nep;
int i, r, d;
struct combostr **cbpp, *pcbp;
union comboval fcb, cb;
@ -654,10 +654,10 @@ makecombo(ocbp, osp, off, s)
int off;
int s;
{
register struct combostr *cbp, *ncbp;
register struct spotstr *sp;
register struct elist *ep;
register int n, c;
struct combostr *cbp, *ncbp;
struct spotstr *sp;
struct elist *ep;
int n, c;
struct elist *nep;
struct combostr **scbpp;
int baseB, fcnt, emask, verts;
@ -961,9 +961,9 @@ updatecombo(cbp, color)
struct combostr *cbp;
int color;
{
register struct spotstr *sp;
register struct combostr *tcbp;
register int i, d;
struct spotstr *sp;
struct combostr *tcbp;
int i, d;
int nframes, s, flg = 0;
union comboval cb;
@ -1466,7 +1466,7 @@ clearcombo(cbp, open)
struct combostr *cbp;
int open;
{
register struct spotstr *sp;
struct spotstr *sp;
struct combostr *tcbp;
int d, n, mask;

View File

@ -1,4 +1,4 @@
/* $OpenBSD: stoc.c,v 1.3 1998/03/26 21:16:52 pjanzen Exp $ */
/* $OpenBSD: stoc.c,v 1.4 2002/05/31 04:21:30 pjanzen Exp $ */
/*
* Copyright (c) 1994
* The Regents of the University of California. All rights reserved.
@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)stoc.c 8.1 (Berkeley) 7/24/94";
#else
static char rcsid[] = "$OpenBSD: stoc.c,v 1.3 1998/03/26 21:16:52 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: stoc.c,v 1.4 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -68,7 +68,7 @@ stoc(s)
int s;
{
static char buf[32];
register int i;
int i;
for (i = 0; mv[i].m_code >= 0; i++)
if (s == mv[i].m_code)
@ -84,7 +84,7 @@ int
ctos(mp)
char *mp;
{
register int i;
int i;
for (i = 0; mv[i].m_code >= 0; i++)
if (strcmp(mp, mv[i].m_text) == 0)
@ -104,7 +104,7 @@ int
lton(c)
int c;
{
register int i;
int i;
if (islower(c))
c = toupper(c);

View File

@ -1,4 +1,4 @@
/* $OpenBSD: setup.c,v 1.5 2002/02/16 21:27:11 millert Exp $ */
/* $OpenBSD: setup.c,v 1.6 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: setup.c,v 1.4 1995/04/24 12:24:41 cgd Exp $ */
/*
@ -63,8 +63,8 @@ main(argc, argv)
int argc;
char *argv[];
{
register char **filename; /* for pointing to file names */
register int fd; /* file descriptor */
char **filename; /* for pointing to file names */
int fd; /* file descriptor */
FILE *fp; /* for opening files */
struct stat fbuf; /* for getting files statistics */
int ch;

View File

@ -1,4 +1,4 @@
/* $OpenBSD: init_field.c,v 1.3 1998/07/09 04:34:15 pjanzen Exp $ */
/* $OpenBSD: init_field.c,v 1.4 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: init_field.c,v 1.3 1995/04/22 10:08:52 cgd Exp $ */
/*
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)init_field.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: init_field.c,v 1.3 1998/07/09 04:34:15 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: init_field.c,v 1.4 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -52,7 +52,7 @@ static char rcsid[] = "$OpenBSD: init_field.c,v 1.3 1998/07/09 04:34:15 pjanzen
void
init_field()
{
register int i;
int i;
static bool first = TRUE;
static char *desc[] = {
"Directions:",

View File

@ -1,4 +1,4 @@
/* $OpenBSD: main.c,v 1.9 2000/01/21 04:11:13 pjanzen Exp $ */
/* $OpenBSD: main.c,v 1.10 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: main.c,v 1.5 1995/04/22 10:08:54 cgd Exp $ */
/*
@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: main.c,v 1.9 2000/01/21 04:11:13 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: main.c,v 1.10 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -62,14 +62,14 @@ main(ac, av)
int ac;
char **av;
{
register bool show_only;
bool show_only;
extern char *Scorefile;
int score_wfd; /* high score writable file descriptor */
int score_err = 0; /* hold errno from score file open */
int ch;
extern int optind;
#ifdef FANCY
register char *sp;
char *sp;
#endif
if ((score_wfd = open(Scorefile, O_RDWR)) < 0)
@ -190,7 +190,7 @@ quit(dummy)
bool
another()
{
register int y;
int y;
#ifdef FANCY
if ((Stand_still || Pattern_roll) && !Newscore)

View File

@ -1,4 +1,4 @@
/* $OpenBSD: make_level.c,v 1.3 1998/08/22 08:55:55 pjanzen Exp $ */
/* $OpenBSD: make_level.c,v 1.4 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: make_level.c,v 1.3 1995/04/22 10:08:56 cgd Exp $ */
/*
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)make_level.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: make_level.c,v 1.3 1998/08/22 08:55:55 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: make_level.c,v 1.4 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -51,9 +51,9 @@ static char rcsid[] = "$OpenBSD: make_level.c,v 1.3 1998/08/22 08:55:55 pjanzen
void
make_level()
{
register int i;
register COORD *cp;
register int x;
int i;
COORD *cp;
int x;
reset_count();
for (i = 1; i < Y_FIELDSIZE; i++)

View File

@ -1,4 +1,4 @@
/* $OpenBSD: move.c,v 1.5 2000/07/23 22:23:42 pjanzen Exp $ */
/* $OpenBSD: move.c,v 1.6 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: move.c,v 1.4 1995/04/22 10:08:58 cgd Exp $ */
/*
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)move.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: move.c,v 1.5 2000/07/23 22:23:42 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: move.c,v 1.6 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -236,7 +236,7 @@ ret:
bool
must_telep()
{
register int x, y;
int x, y;
static COORD newpos;
#ifdef FANCY
@ -303,9 +303,9 @@ do_move(dy, dx)
*/
bool
eaten(pos)
register COORD *pos;
COORD *pos;
{
register int x, y;
int x, y;
for (y = pos->y - 1; y <= pos->y + 1; y++) {
if (y <= 0 || y >= Y_FIELDSIZE)

View File

@ -1,4 +1,4 @@
/* $OpenBSD: move_robs.c,v 1.4 2001/08/12 19:19:40 pjanzen Exp $ */
/* $OpenBSD: move_robs.c,v 1.5 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: move_robs.c,v 1.3 1995/04/22 10:08:59 cgd Exp $ */
/*
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)move_robs.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: move_robs.c,v 1.4 2001/08/12 19:19:40 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: move_robs.c,v 1.5 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -51,7 +51,7 @@ static char rcsid[] = "$OpenBSD: move_robs.c,v 1.4 2001/08/12 19:19:40 pjanzen E
void
move_robots()
{
register COORD *rp;
COORD *rp;
#ifdef DEBUG
move(Min.y, Min.x);

View File

@ -1,4 +1,4 @@
/* $OpenBSD: play_level.c,v 1.5 2001/08/06 22:59:13 pjanzen Exp $ */
/* $OpenBSD: play_level.c,v 1.6 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: play_level.c,v 1.3 1995/04/22 10:09:03 cgd Exp $ */
/*
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)play_level.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: play_level.c,v 1.5 2001/08/06 22:59:13 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: play_level.c,v 1.6 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -51,7 +51,7 @@ static char rcsid[] = "$OpenBSD: play_level.c,v 1.5 2001/08/06 22:59:13 pjanzen
void
play_level()
{
register COORD *cp;
COORD *cp;
move(My_pos.y, My_pos.x);
addch(PLAYER);

View File

@ -1,4 +1,4 @@
/* $OpenBSD: query.c,v 1.2 1998/07/09 04:34:21 pjanzen Exp $ */
/* $OpenBSD: query.c,v 1.3 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: query.c,v 1.3 1995/04/22 10:09:05 cgd Exp $ */
/*
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)query.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: query.c,v 1.2 1998/07/09 04:34:21 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: query.c,v 1.3 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -52,8 +52,8 @@ int
query(prompt)
char *prompt;
{
register int c, retval;
register int y, x;
int c, retval;
int y, x;
getyx(stdscr, y, x);
move(Y_PROMPT, X_PROMPT);

View File

@ -1,4 +1,4 @@
/* $OpenBSD: score.c,v 1.6 1999/12/18 11:18:13 pjanzen Exp $ */
/* $OpenBSD: score.c,v 1.7 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: score.c,v 1.3 1995/04/22 10:09:12 cgd Exp $ */
/*
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)score.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: score.c,v 1.6 1999/12/18 11:18:13 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: score.c,v 1.7 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -64,10 +64,10 @@ void
score(score_wfd)
int score_wfd;
{
register int inf = score_wfd;
register SCORE *scp;
int inf = score_wfd;
SCORE *scp;
uid_t uid;
register bool done_show = FALSE;
bool done_show = FALSE;
static int numscores, max_uid;
Newscore = FALSE;
@ -169,8 +169,8 @@ cmp_sc(s1, s2)
void
show_score()
{
register SCORE *scp;
register int inf;
SCORE *scp;
int inf;
static int max_score;
if ((inf = open(Scorefile, O_RDONLY)) < 0) {

View File

@ -1,4 +1,4 @@
/* $OpenBSD: input.c,v 1.7 2001/09/27 08:37:33 deraadt Exp $ */
/* $OpenBSD: input.c,v 1.8 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: input.c,v 1.3 1996/02/06 22:47:33 jtc Exp $ */
/*-
@ -78,7 +78,7 @@
*/
int
rwait(tvp)
register struct timeval *tvp;
struct timeval *tvp;
{
int i;
struct timeval starttv, endtv, *s;

View File

@ -1,4 +1,4 @@
/* $OpenBSD: scores.c,v 1.6 2002/02/16 21:27:11 millert Exp $ */
/* $OpenBSD: scores.c,v 1.7 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: scores.c,v 1.2 1995/04/22 07:42:38 cgd Exp $ */
/*-
@ -157,8 +157,8 @@ void
savescore(level)
int level;
{
register struct highscore *sp;
register int i;
struct highscore *sp;
int i;
int change;
FILE *sf;
const char *me;
@ -251,8 +251,8 @@ static int
cmpscores(x, y)
const void *x, *y;
{
register const struct highscore *a, *b;
register long l;
const struct highscore *a, *b;
long l;
a = x;
b = y;
@ -279,17 +279,17 @@ cmpscores(x, y)
*/
static int
checkscores(hs, num)
register struct highscore *hs;
struct highscore *hs;
int num;
{
register struct highscore *sp;
register int i, j, k, numnames;
struct highscore *sp;
int i, j, k, numnames;
int levelfound[NLEVELS];
struct peruser {
char *name;
int times;
} count[NUMSPOTS];
register struct peruser *pu;
struct peruser *pu;
/*
* Sort so that highest totals come first.
@ -355,8 +355,8 @@ void
showscores(level)
int level;
{
register struct highscore *sp;
register int i, n, c;
struct highscore *sp;
int i, n, c;
const char *me;
int levelfound[NLEVELS];

View File

@ -1,4 +1,4 @@
/* $OpenBSD: screen.c,v 1.7 2002/02/16 21:27:11 millert Exp $ */
/* $OpenBSD: screen.c,v 1.8 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: screen.c,v 1.4 1995/04/29 01:11:36 mycroft Exp $ */
/*-
@ -174,13 +174,13 @@ scr_init()
stop("cannot find your termcap");
fill = combuf;
{
register struct tcsinfo *p;
struct tcsinfo *p;
for (p = tcstrings; p->tcaddr; p++)
*p->tcaddr = tgetstr(p->tcname, &fill);
}
{
register struct tcninfo *p;
struct tcninfo *p;
for (p = tcflags; p->tcaddr; p++)
*p->tcaddr = tgetflag(p->tcname);
@ -368,9 +368,9 @@ typedef cell regcell;
void
scr_update()
{
register cell *bp, *sp;
register regcell so, cur_so = 0;
register int i, ccol, j;
cell *bp, *sp;
regcell so, cur_so = 0;
int i, ccol, j;
sigset_t sigset, osigset;
static struct shape *lastshape;
@ -481,12 +481,12 @@ scr_update()
*/
void
scr_msg(s, set)
register char *s;
char *s;
int set;
{
if (set || CEstr == NULL) {
register int l = strlen(s);
int l = strlen(s);
moveto(Rows - 2, ((Cols - l) >> 1) - 1);
if (set)

View File

@ -1,4 +1,4 @@
/* $OpenBSD: shapes.c,v 1.3 1998/09/24 06:45:07 pjanzen Exp $ */
/* $OpenBSD: shapes.c,v 1.4 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: shapes.c,v 1.2 1995/04/22 07:42:44 cgd Exp $ */
/*-
@ -86,9 +86,9 @@ struct shape shapes[] = {
int
fits_in(shape, pos)
struct shape *shape;
register int pos;
int pos;
{
register int *o = shape->off;
int *o = shape->off;
if (board[pos] || board[pos + *o++] || board[pos + *o++] ||
board[pos + *o])
@ -103,9 +103,9 @@ fits_in(shape, pos)
void
place(shape, pos, onoff)
struct shape *shape;
register int pos, onoff;
int pos, onoff;
{
register int *o = shape->off;
int *o = shape->off;
board[pos] = onoff;
board[pos + *o++] = onoff;

View File

@ -1,4 +1,4 @@
/* $OpenBSD: tetris.c,v 1.11 2002/02/16 21:27:11 millert Exp $ */
/* $OpenBSD: tetris.c,v 1.12 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: tetris.c,v 1.2 1995/04/22 07:42:47 cgd Exp $ */
/*-
@ -89,8 +89,8 @@ void usage(void);
static void
setup_board()
{
register int i;
register cell *p;
int i;
cell *p;
p = board;
for (i = B_SIZE; i; i--)
@ -103,8 +103,8 @@ setup_board()
static void
elide()
{
register int i, j, base;
register cell *p;
int i, j, base;
cell *p;
for (i = A_FIRST; i < A_LAST; i++) {
base = i * B_COLS + 1;
@ -144,9 +144,9 @@ main(argc, argv)
int argc;
char *argv[];
{
register int pos, c;
register char *keys;
register int level = 2;
int pos, c;
char *keys;
int level = 2;
char key_write[6][10];
int ch, i, j;

View File

@ -1,4 +1,4 @@
/* $OpenBSD: abandon.c,v 1.3 1999/03/12 03:02:38 pjanzen Exp $ */
/* $OpenBSD: abandon.c,v 1.4 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: abandon.c,v 1.3 1995/04/22 10:58:24 cgd Exp $ */
/*
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)abandon.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: abandon.c,v 1.3 1999/03/12 03:02:38 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: abandon.c,v 1.4 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -72,10 +72,10 @@ void
abandon(v)
int v;
{
register struct quad *q;
register int i;
int j;
register struct event *e;
struct quad *q;
int i;
int j;
struct event *e;
if (Ship.ship == QUEENE)
{

View File

@ -1,4 +1,4 @@
/* $OpenBSD: attack.c,v 1.2 1998/08/19 07:41:10 pjanzen Exp $ */
/* $OpenBSD: attack.c,v 1.3 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: attack.c,v 1.3 1995/04/22 10:58:26 cgd Exp $ */
/*
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)attack.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: attack.c,v 1.2 1998/08/19 07:41:10 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: attack.c,v 1.3 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -80,12 +80,12 @@ void
attack(resting)
int resting; /* set if attack while resting */
{
register int hit, i, l;
int maxhit, tothit, shldabsb;
double chgfac, propor, extradm;
double dustfac, tothe;
int cas;
int hitflag;
int hit, i, l;
int maxhit, tothit, shldabsb;
double chgfac, propor, extradm;
double dustfac, tothe;
int cas;
int hitflag;
if (Move.free)
return;

View File

@ -1,4 +1,4 @@
/* $OpenBSD: autover.c,v 1.2 1998/08/19 07:41:12 pjanzen Exp $ */
/* $OpenBSD: autover.c,v 1.3 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: autover.c,v 1.3 1995/04/22 10:58:28 cgd Exp $ */
/*
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)autover.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: autover.c,v 1.2 1998/08/19 07:41:12 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: autover.c,v 1.3 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -66,8 +66,8 @@ static char rcsid[] = "$OpenBSD: autover.c,v 1.2 1998/08/19 07:41:12 pjanzen Exp
void
autover()
{
double dist;
register int course;
double dist;
int course;
printf("\07RED ALERT: The %s is in a supernova quadrant\n", Ship.shipname);
printf("*** Emergency override attempts to hurl %s to safety\n", Ship.shipname);

View File

@ -1,4 +1,4 @@
/* $OpenBSD: capture.c,v 1.2 1998/08/19 07:41:13 pjanzen Exp $ */
/* $OpenBSD: capture.c,v 1.3 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: capture.c,v 1.3 1995/04/22 10:58:32 cgd Exp $ */
/*
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)capture.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: capture.c,v 1.2 1998/08/19 07:41:13 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: capture.c,v 1.3 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -62,9 +62,9 @@ void
capture(v)
int v;
{
register int i;
register struct kling *k;
double x;
int i;
struct kling *k;
double x;
/* check for not cloaked */
if (Ship.cloaked)
@ -130,7 +130,7 @@ capture(v)
struct kling *
selectklingon()
{
register int i;
int i;
if (Etc.nkling < 2)
i = 0;

View File

@ -1,4 +1,4 @@
/* $OpenBSD: check_out.c,v 1.2 1998/08/19 07:41:16 pjanzen Exp $ */
/* $OpenBSD: check_out.c,v 1.3 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: check_out.c,v 1.3 1995/04/22 10:58:35 cgd Exp $ */
/*
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)check_out.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: check_out.c,v 1.2 1998/08/19 07:41:16 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: check_out.c,v 1.3 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -60,7 +60,7 @@ int
check_out(device)
int device;
{
register int dev;
int dev;
dev = device;

View File

@ -1,4 +1,4 @@
/* $OpenBSD: compkl.c,v 1.3 2002/02/16 21:27:12 millert Exp $ */
/* $OpenBSD: compkl.c,v 1.4 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: compkl.c,v 1.3 1995/04/22 10:58:38 cgd Exp $ */
/*
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)compkl.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: compkl.c,v 1.3 2002/02/16 21:27:12 millert Exp $";
static char rcsid[] = "$OpenBSD: compkl.c,v 1.4 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -62,9 +62,9 @@ void
compkldist(f)
int f; /* set if new quadrant */
{
register int i, dx, dy;
double d;
double temp;
int i, dx, dy;
double d;
double temp;
if (Etc.nkling == 0)
return;
@ -104,8 +104,8 @@ compkldist(f)
static void
sortkl()
{
struct kling t;
register int f, i, m;
struct kling t;
int f, i, m;
m = Etc.nkling - 1;
f = 1;

View File

@ -1,4 +1,4 @@
/* $OpenBSD: computer.c,v 1.5 2002/02/16 21:27:12 millert Exp $ */
/* $OpenBSD: computer.c,v 1.6 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: computer.c,v 1.4 1995/04/24 12:25:51 cgd Exp $ */
/*
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)computer.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: computer.c,v 1.5 2002/02/16 21:27:12 millert Exp $";
static char rcsid[] = "$OpenBSD: computer.c,v 1.6 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -115,15 +115,15 @@ computer(v)
int v;
{
int ix, iy;
register int i, j;
int i, j;
int tqx, tqy;
const struct cvntab *r;
const struct cvntab *r;
int cost;
int course;
double dist, time;
double warpfact;
struct quad *q;
register struct event *e;
struct event *e;
if (check_out(COMPUTER))
return;
@ -328,10 +328,10 @@ kalc(tqx, tqy, tsx, tsy, dist)
int tsy;
double *dist;
{
double dx, dy;
double quadsize;
double angle;
register int course;
double dx, dy;
double quadsize;
double angle;
int course;
/* normalize to quadrant distances */
quadsize = NSECTS;

View File

@ -1,4 +1,4 @@
/* $OpenBSD: damage.c,v 1.2 1998/08/19 07:41:21 pjanzen Exp $ */
/* $OpenBSD: damage.c,v 1.3 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: damage.c,v 1.3 1995/04/22 10:58:40 cgd Exp $ */
/*
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)damage.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: damage.c,v 1.2 1998/08/19 07:41:21 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: damage.c,v 1.3 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -63,10 +63,10 @@ damage(dev1, dam)
int dev1; /* device index */
double dam; /* time to repair */
{
register int i;
register struct event *e;
int f;
register int dev;
int i;
struct event *e;
int f;
int dev;
/* ignore zero damages */
if (dam <= 0.0)

View File

@ -1,4 +1,4 @@
/* $OpenBSD: damaged.c,v 1.2 1998/08/19 07:41:22 pjanzen Exp $ */
/* $OpenBSD: damaged.c,v 1.3 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: damaged.c,v 1.3 1995/04/22 10:58:41 cgd Exp $ */
/*
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)damaged.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: damaged.c,v 1.2 1998/08/19 07:41:22 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: damaged.c,v 1.3 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -55,9 +55,9 @@ int
damaged(dev)
int dev;
{
register int d;
register struct event *e;
register int i;
int d;
struct event *e;
int i;
d = dev;

View File

@ -1,4 +1,4 @@
/* $OpenBSD: dcrept.c,v 1.2 1998/08/19 07:41:23 pjanzen Exp $ */
/* $OpenBSD: dcrept.c,v 1.3 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: dcrept.c,v 1.3 1995/04/22 10:58:43 cgd Exp $ */
/*
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)dcrept.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: dcrept.c,v 1.2 1998/08/19 07:41:23 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: dcrept.c,v 1.3 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -61,10 +61,10 @@ void
dcrept(v)
int v;
{
register int i, f;
double x;
double m1, m2;
register struct event *e;
int i, f;
double x;
double m1, m2;
struct event *e;
/* set up the magic factors to output the time till fixed */
if (Ship.cond == DOCKED)

View File

@ -1,4 +1,4 @@
/* $OpenBSD: destruct.c,v 1.3 1999/03/12 03:02:40 pjanzen Exp $ */
/* $OpenBSD: destruct.c,v 1.4 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: destruct.c,v 1.3 1995/04/22 10:58:44 cgd Exp $ */
/*
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)destruct.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: destruct.c,v 1.3 1999/03/12 03:02:40 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: destruct.c,v 1.4 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -71,9 +71,9 @@ void
destruct(v)
int v;
{
char checkpass[15];
register int i, j;
double zap;
char checkpass[15];
int i, j;
double zap;
if (damaged(COMPUTER))
{

View File

@ -1,4 +1,4 @@
/* $OpenBSD: dock.c,v 1.2 1998/08/19 07:41:26 pjanzen Exp $ */
/* $OpenBSD: dock.c,v 1.3 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: dock.c,v 1.3 1995/04/22 10:58:45 cgd Exp $ */
/*
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)dock.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: dock.c,v 1.2 1998/08/19 07:41:26 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: dock.c,v 1.3 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -64,9 +64,9 @@ void
dock(v)
int v;
{
register int i, j;
int ok;
register struct event *e;
int i, j;
int ok;
struct event *e;
if (Ship.cond == DOCKED)
{
@ -138,8 +138,8 @@ void
undock(v)
int v;
{
register struct event *e;
register int i;
struct event *e;
int i;
if (Ship.cond != DOCKED)
{

View File

@ -1,4 +1,4 @@
/* $OpenBSD: dumpgame.c,v 1.5 2002/02/16 21:27:12 millert Exp $ */
/* $OpenBSD: dumpgame.c,v 1.6 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: dumpgame.c,v 1.4 1995/04/24 12:25:54 cgd Exp $ */
/*
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)dumpgame.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: dumpgame.c,v 1.5 2002/02/16 21:27:12 millert Exp $";
static char rcsid[] = "$OpenBSD: dumpgame.c,v 1.6 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -88,10 +88,10 @@ void
dumpgame(v)
int v;
{
int version;
register int fd;
register struct dump *d;
register int i;
int version;
int fd;
struct dump *d;
int i;
if ((fd = creat("trek.dump", 0644)) < 0)
{
@ -127,8 +127,7 @@ dumpgame(v)
int
restartgame()
{
register int fd;
int version;
int fd, version;
if ((fd = open("trek.dump", O_RDONLY)) < 0 ||
read(fd, &version, sizeof version) != sizeof version ||
@ -158,10 +157,9 @@ static int
readdump(fd1)
int fd1;
{
register int fd;
register struct dump *d;
register int i;
long junk;
int fd, i;
struct dump *d;
long junk;
fd = fd1;

View File

@ -1,4 +1,4 @@
/* $OpenBSD: dumpme.c,v 1.2 1998/08/19 07:41:30 pjanzen Exp $ */
/* $OpenBSD: dumpme.c,v 1.3 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: dumpme.c,v 1.3 1995/04/22 10:58:48 cgd Exp $ */
/*
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)dumpme.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: dumpme.c,v 1.2 1998/08/19 07:41:30 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: dumpme.c,v 1.3 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -61,10 +61,9 @@ void
dumpme(flag)
int flag;
{
register int f;
double x;
register struct event *e;
register int i;
int f, i;
double x;
struct event *e;
f = flag;
Ship.quadx = ranf(NQUADS);

View File

@ -1,4 +1,4 @@
/* $OpenBSD: dumpssradio.c,v 1.2 1998/08/19 07:41:31 pjanzen Exp $ */
/* $OpenBSD: dumpssradio.c,v 1.3 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: dumpssradio.c,v 1.3 1995/04/22 10:58:49 cgd Exp $ */
/*
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)dumpssradio.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: dumpssradio.c,v 1.2 1998/08/19 07:41:31 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: dumpssradio.c,v 1.3 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -52,9 +52,8 @@ static char rcsid[] = "$OpenBSD: dumpssradio.c,v 1.2 1998/08/19 07:41:31 pjanzen
int
dumpssradio()
{
register struct event *e;
register int j;
register int chkrest;
struct event *e;
int j, chkrest;
chkrest = 0;
for (j = 0; j < MAXEVENTS; j++)

View File

@ -1,4 +1,4 @@
/* $OpenBSD: events.c,v 1.3 2001/08/23 14:17:08 aaron Exp $ */
/* $OpenBSD: events.c,v 1.4 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: events.c,v 1.3 1995/04/22 10:58:50 cgd Exp $ */
/*
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)events.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: events.c,v 1.3 2001/08/23 14:17:08 aaron Exp $";
static char rcsid[] = "$OpenBSD: events.c,v 1.4 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -60,19 +60,18 @@ int
events(warp)
int warp; /* set if called in a time warp */
{
register int i;
char *p;
int j;
struct kling *k;
double rtime;
double xdate;
double idate;
struct event *ev = NULL;
int ix, iy;
register struct quad *q;
register struct event *e;
int evnum;
int restcancel;
int i, j;
char *p;
struct kling *k;
double rtime;
double xdate;
double idate;
struct event *ev = NULL;
int ix, iy;
struct quad *q;
struct event *e;
int evnum;
int restcancel;
/* if nothing happened, just allow for any Klingons killed */
if (Move.time <= 0.0)

View File

@ -1,4 +1,4 @@
/* $OpenBSD: getpar.c,v 1.8 2002/02/25 00:18:48 pvalchev Exp $ */
/* $OpenBSD: getpar.c,v 1.9 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: getpar.c,v 1.4 1995/04/24 12:25:57 cgd Exp $ */
/*
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)getpar.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: getpar.c,v 1.8 2002/02/25 00:18:48 pvalchev Exp $";
static char rcsid[] = "$OpenBSD: getpar.c,v 1.9 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -57,8 +57,7 @@ int
getintpar(s)
const char *s;
{
register int i;
int n;
int i, n;
while (1)
{
@ -82,8 +81,8 @@ double
getfltpar(s)
const char *s;
{
register int i;
double d;
int i;
double d;
while (1)
{
@ -211,9 +210,8 @@ getstrpar(s, r, l, t)
int l;
const char *t;
{
register int i;
char format[20];
register int f;
int i, f;
char format[20];
if (t == 0)
t = " \t\n;";

View File

@ -1,4 +1,4 @@
/* $OpenBSD: help.c,v 1.3 1999/07/31 18:48:59 pjanzen Exp $ */
/* $OpenBSD: help.c,v 1.4 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: help.c,v 1.3 1995/04/22 10:59:01 cgd Exp $ */
/*
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)help.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: help.c,v 1.3 1999/07/31 18:48:59 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: help.c,v 1.4 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -74,10 +74,9 @@ void
help(v)
int v;
{
register int i;
double dist, x;
register int dx = 0, dy = 0;
int j, l = 0;
double dist, x;
int dx = 0, dy = 0;
int i, j, l = 0;
/* check to see if calling for help is reasonable ... */
if (Ship.cond == DOCKED)

View File

@ -1,4 +1,4 @@
/* $OpenBSD: impulse.c,v 1.2 1998/08/19 07:41:40 pjanzen Exp $ */
/* $OpenBSD: impulse.c,v 1.3 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: impulse.c,v 1.3 1995/04/22 10:59:03 cgd Exp $ */
/*
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)impulse.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: impulse.c,v 1.2 1998/08/19 07:41:40 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: impulse.c,v 1.3 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -54,10 +54,8 @@ void
impulse(v)
int v;
{
int course;
register int power;
double dist, time;
register int percent;
int course, power, percent;
double dist, time;
if (Ship.cond == DOCKED)
{

View File

@ -1,4 +1,4 @@
/* $OpenBSD: initquad.c,v 1.2 1998/08/19 07:41:41 pjanzen Exp $ */
/* $OpenBSD: initquad.c,v 1.3 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: initquad.c,v 1.3 1995/04/22 10:59:04 cgd Exp $ */
/*
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)initquad.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: initquad.c,v 1.2 1998/08/19 07:41:41 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: initquad.c,v 1.3 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -66,11 +66,11 @@ void
initquad(f)
int f;
{
register int i, j;
int rx, ry;
int nbases, nstars;
register struct quad *q;
int nholes;
int i, j;
int rx, ry;
int nbases, nstars;
struct quad *q;
int nholes;
q = &Quad[Ship.quadx][Ship.quady];
@ -149,7 +149,7 @@ void
sector(x, y)
int *x, *y;
{
register int i, j;
int i, j;
do
{

View File

@ -1,4 +1,4 @@
/* $OpenBSD: kill.c,v 1.3 1999/07/31 18:48:59 pjanzen Exp $ */
/* $OpenBSD: kill.c,v 1.4 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: kill.c,v 1.3 1995/04/22 10:59:06 cgd Exp $ */
/*
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)kill.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: kill.c,v 1.3 1999/07/31 18:48:59 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: kill.c,v 1.4 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -65,7 +65,7 @@ void
killk(ix, iy)
int ix, iy;
{
register int i;
int i;
printf(" *** Klingon at %d,%d destroyed ***\n", ix, iy);
@ -106,8 +106,8 @@ void
killb(qx, qy)
int qx, qy;
{
register struct quad *q;
register struct xy *b;
struct quad *q;
struct xy *b;
q = &Quad[qx][qy];
@ -157,9 +157,9 @@ kills(x, y, f)
int x, y; /* quad coords if f == 0, else sector coords */
int f; /* f != 0 -- this quad; f < 0 -- Enterprise's fault */
{
register struct quad *q;
register struct event *e;
const char *name;
struct quad *q;
struct event *e;
const char *name;
if (f)
{
@ -201,9 +201,9 @@ killd(x, y, f)
int x, y; /* quadrant coordinates */
int f; /* set if user is to be informed */
{
register struct event *e;
register int i;
register struct quad *q;
struct event *e;
int i;
struct quad *q;
q = &Quad[x][y];
for (i = 0; i < MAXEVENTS; i++)

View File

@ -1,4 +1,4 @@
/* $OpenBSD: klmove.c,v 1.2 1998/08/19 07:41:45 pjanzen Exp $ */
/* $OpenBSD: klmove.c,v 1.3 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: klmove.c,v 1.3 1995/04/22 10:59:07 cgd Exp $ */
/*
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)klmove.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: klmove.c,v 1.2 1998/08/19 07:41:45 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: klmove.c,v 1.3 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -72,16 +72,16 @@ void
klmove(fl)
int fl;
{
int n;
register struct kling *k;
double dx, dy;
int nextx, nexty;
register int lookx, looky;
int motion;
int fudgex, fudgey;
int qx, qy;
double bigger;
int i;
int n;
struct kling *k;
double dx, dy;
int nextx, nexty;
int lookx, looky;
int motion;
int fudgex, fudgey;
int qx, qy;
double bigger;
int i;
# ifdef xTRACE
if (Trace)

View File

@ -1,4 +1,4 @@
/* $OpenBSD: lrscan.c,v 1.2 1998/08/19 07:41:47 pjanzen Exp $ */
/* $OpenBSD: lrscan.c,v 1.3 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: lrscan.c,v 1.3 1995/04/22 10:59:09 cgd Exp $ */
/*
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)lrscan.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: lrscan.c,v 1.2 1998/08/19 07:41:47 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: lrscan.c,v 1.3 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -61,8 +61,8 @@ void
lrscan(v)
int v;
{
register int i, j;
register struct quad *q;
int i, j;
struct quad *q;
if (check_out(LRSCAN))
return;

View File

@ -1,4 +1,4 @@
/* $OpenBSD: main.c,v 1.8 2002/05/31 03:40:01 pjanzen Exp $ */
/* $OpenBSD: main.c,v 1.9 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: main.c,v 1.4 1995/04/22 10:59:10 cgd Exp $ */
/*
@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: main.c,v 1.8 2002/05/31 03:40:01 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: main.c,v 1.9 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -139,9 +139,9 @@ main(argc, argv)
int argc;
char **argv;
{
time_t curtime;
register int ac;
register char **av;
time_t curtime;
int ac;
char **av;
av = argv;
ac = argc;

View File

@ -1,4 +1,4 @@
/* $OpenBSD: move.c,v 1.3 1999/03/12 03:02:42 pjanzen Exp $ */
/* $OpenBSD: move.c,v 1.4 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: move.c,v 1.3 1995/04/22 10:59:12 cgd Exp $ */
/*
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)move.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: move.c,v 1.3 1999/03/12 03:02:42 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: move.c,v 1.4 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -85,16 +85,12 @@ move(ramflag, course, time, speed)
double time;
double speed;
{
double angle;
double x, y, dx, dy;
register int ix = 0, iy = 0;
double bigger;
int n;
register int i;
double dist;
double sectsize;
double xn;
double evtime;
double angle;
double x, y, dx, dy;
int ix = 0, iy = 0;
double bigger;
int n, i;
double dist, sectsize, xn, evtime;
# ifdef xTRACE
if (Trace)

View File

@ -1,4 +1,4 @@
/* $OpenBSD: nova.c,v 1.2 1998/08/19 07:41:51 pjanzen Exp $ */
/* $OpenBSD: nova.c,v 1.3 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: nova.c,v 1.3 1995/04/22 10:59:14 cgd Exp $ */
/*
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)nova.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: nova.c,v 1.2 1998/08/19 07:41:51 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: nova.c,v 1.3 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -63,8 +63,8 @@ void
nova(x, y)
int x, y;
{
register int i, j;
register int se;
int i, j;
int se;
if (Sect[x][y] != STAR || Quad[Ship.quadx][Ship.quady].stars < 0)
return;

View File

@ -1,4 +1,4 @@
/* $OpenBSD: phaser.c,v 1.5 2000/07/24 00:56:05 pjanzen Exp $ */
/* $OpenBSD: phaser.c,v 1.6 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: phaser.c,v 1.4 1995/04/24 12:26:02 cgd Exp $ */
/*
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)phaser.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: phaser.c,v 1.5 2000/07/24 00:56:05 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: phaser.c,v 1.6 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -97,18 +97,17 @@ void
phaser(v)
int v;
{
register int i;
int j;
register struct kling *k;
double dx, dy;
double anglefactor, distfactor;
register struct banks *b;
int manual, flag, extra;
int hit;
double tot;
int n;
int hitreqd[NBANKS];
struct banks bank[NBANKS];
int i, j;
struct kling *k;
double dx, dy;
double anglefactor, distfactor;
struct banks *b;
int manual, flag, extra;
int hit;
double tot;
int n;
int hitreqd[NBANKS];
struct banks bank[NBANKS];
const struct cvntab *ptr;
if (Ship.cond == DOCKED)

View File

@ -1,4 +1,4 @@
/* $OpenBSD: ram.c,v 1.2 1998/08/19 07:41:56 pjanzen Exp $ */
/* $OpenBSD: ram.c,v 1.3 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: ram.c,v 1.3 1995/04/22 10:59:19 cgd Exp $ */
/*
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)ram.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: ram.c,v 1.2 1998/08/19 07:41:56 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: ram.c,v 1.3 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -61,8 +61,8 @@ void
ram(ix, iy)
int ix, iy;
{
register int i;
register char c;
int i;
char c;
printf("\07RED ALERT\07: collision imminent\n");
c = Sect[ix][iy];

View File

@ -1,4 +1,4 @@
/* $OpenBSD: ranf.c,v 1.2 1998/08/19 07:41:58 pjanzen Exp $ */
/* $OpenBSD: ranf.c,v 1.3 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: ranf.c,v 1.3 1995/04/22 10:59:21 cgd Exp $ */
/*
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)ranf.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: ranf.c,v 1.2 1998/08/19 07:41:58 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: ranf.c,v 1.3 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -49,7 +49,7 @@ int
ranf(max)
int max;
{
register int t;
int t;
if (max <= 0)
return (0);

View File

@ -1,4 +1,4 @@
/* $OpenBSD: rest.c,v 1.2 1998/08/19 07:41:59 pjanzen Exp $ */
/* $OpenBSD: rest.c,v 1.3 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: rest.c,v 1.3 1995/04/22 10:59:22 cgd Exp $ */
/*
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)rest.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: rest.c,v 1.2 1998/08/19 07:41:59 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: rest.c,v 1.3 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -65,7 +65,7 @@ rest(v)
int v;
{
double t;
register int percent;
int percent;
/* get the time to rest */
t = getfltpar("How long");

View File

@ -1,4 +1,4 @@
/* $OpenBSD: schedule.c,v 1.2 1998/08/19 07:42:01 pjanzen Exp $ */
/* $OpenBSD: schedule.c,v 1.3 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: schedule.c,v 1.3 1995/04/22 10:59:23 cgd Exp $ */
/*
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)schedule.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: schedule.c,v 1.2 1998/08/19 07:42:01 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: schedule.c,v 1.3 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -64,9 +64,9 @@ schedule(type, offset, x, y, z)
char x, y;
char z;
{
register struct event *e;
register int i;
double date;
struct event *e;
int i;
double date;
date = Now.date + offset;
for (i = 0; i < MAXEVENTS; i++)
@ -104,8 +104,8 @@ reschedule(e1, offset)
struct event *e1;
double offset;
{
double date;
register struct event *e;
double date;
struct event *e;
e = e1;
@ -130,7 +130,7 @@ void
unschedule(e1)
struct event *e1;
{
register struct event *e;
struct event *e;
e = e1;
@ -159,7 +159,7 @@ xsched(ev1, factor, x, y, z)
int factor;
int x, y, z;
{
register int ev;
int ev;
ev = ev1;
return (schedule(ev, -Param.eventdly[ev] * Param.time * log(franf()) / factor, x, y, z));
@ -179,8 +179,8 @@ xresched(e1, ev1, factor)
int ev1;
int factor;
{
register int ev;
register struct event *e;
int ev;
struct event *e;
ev = ev1;
e = e1;

View File

@ -1,4 +1,4 @@
/* $OpenBSD: score.c,v 1.2 1998/08/19 07:42:02 pjanzen Exp $ */
/* $OpenBSD: score.c,v 1.3 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: score.c,v 1.3 1995/04/22 10:59:24 cgd Exp $ */
/*
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)score.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: score.c,v 1.2 1998/08/19 07:42:02 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: score.c,v 1.3 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -53,8 +53,7 @@ static char rcsid[] = "$OpenBSD: score.c,v 1.2 1998/08/19 07:42:02 pjanzen Exp $
long
score()
{
register int u;
register int t;
int u, t;
long s;
double r;

View File

@ -1,4 +1,4 @@
/* $OpenBSD: setup.c,v 1.3 1999/07/31 18:48:59 pjanzen Exp $ */
/* $OpenBSD: setup.c,v 1.4 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: setup.c,v 1.4 1995/04/24 12:26:06 cgd Exp $ */
/*
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)setup.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: setup.c,v 1.3 1999/07/31 18:48:59 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: setup.c,v 1.4 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -85,12 +85,12 @@ void
setup()
{
const struct cvntab *r;
register int i, j;
int i, j;
double f;
int d;
int klump;
int ix, iy;
register struct quad *q;
struct quad *q;
struct event *e;
while (1)

View File

@ -1,4 +1,4 @@
/* $OpenBSD: shield.c,v 1.3 1999/07/31 18:49:00 pjanzen Exp $ */
/* $OpenBSD: shield.c,v 1.4 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: shield.c,v 1.4 1995/04/24 12:26:09 cgd Exp $ */
/*
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)shield.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: shield.c,v 1.3 1999/07/31 18:49:00 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: shield.c,v 1.4 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -74,7 +74,7 @@ void
shield(f)
int f;
{
register int i;
int i;
const struct cvntab *r;
char s[100];
const char *device, *dev2, *dev3;

View File

@ -1,4 +1,4 @@
/* $OpenBSD: snova.c,v 1.2 1998/08/19 07:42:07 pjanzen Exp $ */
/* $OpenBSD: snova.c,v 1.3 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: snova.c,v 1.3 1995/04/22 10:59:29 cgd Exp $ */
/*
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)snova.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: snova.c,v 1.2 1998/08/19 07:42:07 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: snova.c,v 1.3 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -71,12 +71,11 @@ void
snova(x, y)
int x, y;
{
int qx, qy;
register int ix, iy = 0;
int f;
int dx, dy;
int n;
register struct quad *q;
int qx, qy;
int ix, iy = 0;
int f, n;
int dx, dy;
struct quad *q;
f = 0;
ix = x;

View File

@ -1,4 +1,4 @@
/* $OpenBSD: srscan.c,v 1.4 1999/07/31 18:49:00 pjanzen Exp $ */
/* $OpenBSD: srscan.c,v 1.5 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: srscan.c,v 1.3 1995/04/22 10:59:31 cgd Exp $ */
/*
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)srscan.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: srscan.c,v 1.4 1999/07/31 18:49:00 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: srscan.c,v 1.5 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -73,8 +73,8 @@ void
srscan(f)
int f;
{
register int i, j;
register int statinfo;
int i, j;
int statinfo;
const char *s;
int percent;
struct quad *q = NULL;

View File

@ -1,4 +1,4 @@
/* $OpenBSD: systemname.c,v 1.3 1999/07/31 18:49:00 pjanzen Exp $ */
/* $OpenBSD: systemname.c,v 1.4 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: systemname.c,v 1.3 1995/04/22 10:59:32 cgd Exp $ */
/*
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)systemname.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: systemname.c,v 1.3 1999/07/31 18:49:00 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: systemname.c,v 1.4 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -60,7 +60,7 @@ systemname(q1)
const struct quad *q1;
{
const struct quad *q;
register int i;
int i;
q = q1;

View File

@ -1,4 +1,4 @@
/* $OpenBSD: torped.c,v 1.4 2002/02/16 21:27:12 millert Exp $ */
/* $OpenBSD: torped.c,v 1.5 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: torped.c,v 1.3 1995/04/22 10:59:34 cgd Exp $ */
/*
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)torped.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: torped.c,v 1.4 2002/02/16 21:27:12 millert Exp $";
static char rcsid[] = "$OpenBSD: torped.c,v 1.5 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -72,15 +72,14 @@ void
torped(v)
int v;
{
register int ix, iy;
double x, y, dx, dy;
double angle;
int course, course2;
register int k;
double bigger;
double sectsize;
int burst;
int n;
int ix, iy;
double x, y, dx, dy;
double angle;
int course, course2;
int k;
double bigger;
double sectsize;
int burst, n;
if (Ship.cloaked)
{
@ -236,8 +235,8 @@ static int
randcourse(n)
int n;
{
double r;
register int d;
double r;
int d;
d = ((franf() + franf()) - 1.0) * 20;
if (abs(d) > 12)

View File

@ -1,4 +1,4 @@
/* $OpenBSD: visual.c,v 1.2 1998/08/19 07:42:15 pjanzen Exp $ */
/* $OpenBSD: visual.c,v 1.3 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: visual.c,v 1.3 1995/04/22 10:59:39 cgd Exp $ */
/*
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)visual.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: visual.c,v 1.2 1998/08/19 07:42:15 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: visual.c,v 1.3 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -75,9 +75,8 @@ void
visual(z)
int z;
{
register int ix, iy;
int co;
register struct xy *v;
int ix, iy, co;
struct xy *v;
co = getintpar("direction");
if (co < 0 || co > 360)

View File

@ -1,4 +1,4 @@
/* $OpenBSD: warp.c,v 1.3 2001/09/19 10:51:55 pjanzen Exp $ */
/* $OpenBSD: warp.c,v 1.4 2002/05/31 04:21:30 pjanzen Exp $ */
/* $NetBSD: warp.c,v 1.3 1995/04/22 10:59:40 cgd Exp $ */
/*
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)warp.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: warp.c,v 1.3 2001/09/19 10:51:55 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: warp.c,v 1.4 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -82,15 +82,9 @@ warp(fl, c, d)
int fl, c;
double d;
{
char *p;
int course;
double power;
double dist;
double time;
double speed;
double frac;
register int percent;
register int i;
char *p;
double power, dist, time, speed, frac;
int course, percent, i;
if (Ship.cond == DOCKED)
{

View File

@ -1,4 +1,4 @@
/* $OpenBSD: worm.c,v 1.16 2002/05/31 03:40:01 pjanzen Exp $ */
/* $OpenBSD: worm.c,v 1.17 2002/05/31 04:21:30 pjanzen Exp $ */
/*
* Copyright (c) 1980, 1993
@ -43,7 +43,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)worm.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: worm.c,v 1.16 2002/05/31 03:40:01 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: worm.c,v 1.17 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -186,8 +186,8 @@ main(argc, argv)
void
life()
{
register struct body *bp, *np;
register int i,j = 1;
struct body *bp, *np;
int i,j = 1;
head = newlink();
head->x = start_len % (COLS-5) + 2;
@ -267,7 +267,7 @@ void
process(ch)
int ch;
{
register int x,y;
int x,y;
struct body *nh;
x = head->x;

View File

@ -1,4 +1,4 @@
/* $OpenBSD: worms.c,v 1.12 2002/05/31 03:40:01 pjanzen Exp $ */
/* $OpenBSD: worms.c,v 1.13 2002/05/31 04:21:30 pjanzen Exp $ */
/*
* Copyright (c) 1980, 1993
@ -43,7 +43,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)worms.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: worms.c,v 1.12 2002/05/31 03:40:01 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: worms.c,v 1.13 2002/05/31 04:21:30 pjanzen Exp $";
#endif
#endif /* not lint */
@ -309,7 +309,7 @@ main(argc, argv)
if (++h == length)
h = 0;
if (w->xpos[w->head = h] >= 0) {
register int x1, y1;
int x1, y1;
x1 = w->xpos[h];
y1 = w->ypos[h];