summaryrefslogtreecommitdiffstats
path: root/games/backgammon/common_source
diff options
context:
space:
mode:
Diffstat (limited to 'games/backgammon/common_source')
-rw-r--r--games/backgammon/common_source/allow.c2
-rw-r--r--games/backgammon/common_source/board.c6
-rw-r--r--games/backgammon/common_source/check.c6
-rw-r--r--games/backgammon/common_source/fancy.c45
-rw-r--r--games/backgammon/common_source/odds.c12
-rw-r--r--games/backgammon/common_source/one.c18
-rw-r--r--games/backgammon/common_source/save.c8
-rw-r--r--games/backgammon/common_source/subs.c34
-rw-r--r--games/backgammon/common_source/table.c10
9 files changed, 70 insertions, 71 deletions
diff --git a/games/backgammon/common_source/allow.c b/games/backgammon/common_source/allow.c
index 620ce05..d2848b1d 100644
--- a/games/backgammon/common_source/allow.c
+++ b/games/backgammon/common_source/allow.c
@@ -41,7 +41,7 @@ static char sccsid[] = "@(#)allow.c 8.1 (Berkeley) 5/31/93";
movallow () {
- register int i, m, iold;
+ int i, m, iold;
int r;
if (d0)
diff --git a/games/backgammon/common_source/board.c b/games/backgammon/common_source/board.c
index 1446248..b7c365c 100644
--- a/games/backgammon/common_source/board.c
+++ b/games/backgammon/common_source/board.c
@@ -44,7 +44,7 @@ static int i, j, k;
static char ln[60];
wrboard () {
- register int l;
+ int l;
static const char bl[] =
"| | | |\n";
static const char sv[] =
@@ -160,8 +160,8 @@ lastline:
}
wrbsub () {
- register int m;
- register char d;
+ int m;
+ char d;
if (board[k] > 0) {
m = board[k];
diff --git a/games/backgammon/common_source/check.c b/games/backgammon/common_source/check.c
index c545e39..78433b7 100644
--- a/games/backgammon/common_source/check.c
+++ b/games/backgammon/common_source/check.c
@@ -40,7 +40,7 @@ static char sccsid[] = "@(#)check.c 8.1 (Berkeley) 5/31/93";
#include "back.h"
getmove () {
- register int i, c;
+ int i, c;
c = 0;
for (;;) {
@@ -103,10 +103,10 @@ getmove () {
}
movokay (mv)
-register int mv;
+int mv;
{
- register int i, m;
+ int i, m;
if (d0)
swap;
diff --git a/games/backgammon/common_source/fancy.c b/games/backgammon/common_source/fancy.c
index 8a4ddc4..6ddb464 100644
--- a/games/backgammon/common_source/fancy.c
+++ b/games/backgammon/common_source/fancy.c
@@ -86,7 +86,7 @@ int realc;
int addbuf __P((int));
fboard () {
- register int i, j, l;
+ int i, j, l;
curmove (0,0); /* do top line */
for (i = 0; i < 53; i++)
@@ -200,9 +200,9 @@ int cpos; /* column of position */
int cnext; /* direction of position */
{
- register int j; /* index */
- register int n; /* number of men on position */
- register int bct; /* counter */
+ int j; /* index */
+ int n; /* number of men on position */
+ int bct; /* counter */
int k; /* index */
char pc; /* color of men on position */
@@ -254,7 +254,7 @@ int cnext; /* direction of position */
}
refresh() {
- register int i, r, c;
+ int i, r, c;
r = curr; /* save current position */
c = curc;
@@ -314,7 +314,7 @@ fixpos (old,new,r,c,inc)
int old, new, r, c, inc;
{
- register int o, n, nv;
+ int o, n, nv;
int ov, nc;
char col;
@@ -381,11 +381,10 @@ int old, new, r, c, inc;
}
fixcol (r,c,l,ch,inc)
-register int l, ch;
-int r, c, inc;
+int l, ch, r, c, inc;
{
- register int i;
+ int i;
curmove (r,c);
fancyc (ch);
@@ -396,7 +395,7 @@ int r, c, inc;
}
curmove (r,c)
-register int r, c;
+int r, c;
{
if (curr == r && curc == c)
@@ -410,9 +409,9 @@ register int r, c;
}
newpos () {
- register int r; /* destination row */
- register int c; /* destination column */
- register int mode = -1; /* mode of movement */
+ int r; /* destination row */
+ int c; /* destination column */
+ int mode = -1; /* mode of movement */
int count = 1000; /* character count */
int i; /* index */
@@ -577,7 +576,7 @@ newpos () {
}
clear () {
- register int i;
+ int i;
/* double space if can't clear */
if (CL == 0) {
@@ -595,9 +594,9 @@ clear () {
fancyc (c)
-register char c; /* character to output */
+char c; /* character to output */
{
- register int sp; /* counts spaces in a tab */
+ int sp; /* counts spaces in a tab */
if (c == '\007') { /* bells go in blindly */
addbuf (c);
@@ -651,8 +650,8 @@ register char c; /* character to output */
}
clend() {
- register int i;
- register char *s;
+ int i;
+ char *s;
if (CD) {
@@ -673,9 +672,9 @@ clend() {
}
cline () {
- register int i;
- register int c;
- register char *s;
+ int i;
+ int c;
+ char *s;
if (curc > linect[curr])
return;
@@ -707,8 +706,8 @@ getcaps (s)
const char *s;
{
- register char *code; /* two letter code */
- register char ***cap; /* pointer to cap string */
+ char *code; /* two letter code */
+ char ***cap; /* pointer to cap string */
char *bufp; /* pointer to cap buffer */
char tentry[1024]; /* temporary uncoded caps buffer */
diff --git a/games/backgammon/common_source/odds.c b/games/backgammon/common_source/odds.c
index a989d65..d3e21e4 100644
--- a/games/backgammon/common_source/odds.c
+++ b/games/backgammon/common_source/odds.c
@@ -40,10 +40,10 @@ static char sccsid[] = "@(#)odds.c 8.1 (Berkeley) 5/31/93";
#include "back.h"
odds (r1,r2,val)
-register int r1;
+int r1;
int r2, val;
{
- register int i, j;
+ int i, j;
if (r1 == 0) {
for (i = 0; i < 6; i++)
@@ -65,9 +65,9 @@ int r2, val;
}
count () {
- register int i;
- register int j;
- register int total;
+ int i;
+ int j;
+ int total;
total = 0;
for (i = 0; i < 6; i++)
@@ -80,7 +80,7 @@ canhit (i,c)
int i, c;
{
- register int j, k, b;
+ int j, k, b;
int a, d, diff, place, addon, menstuck;
if (c == 0)
diff --git a/games/backgammon/common_source/one.c b/games/backgammon/common_source/one.c
index a8dda64..e62a59f 100644
--- a/games/backgammon/common_source/one.c
+++ b/games/backgammon/common_source/one.c
@@ -40,10 +40,10 @@ static char sccsid[] = "@(#)one.c 8.1 (Berkeley) 5/31/93";
#include "back.h"
makmove (i)
-register int i;
+int i;
{
- register int n, d;
+ int n, d;
int max;
d = d0;
@@ -94,10 +94,10 @@ register int i;
}
moverr (i)
-register int i;
+int i;
{
- register int j;
+ int j;
if (tflag)
curmove (20,0);
@@ -117,7 +117,7 @@ register int i;
checkd (d)
-register int d;
+int d;
{
if (d0 != d)
@@ -126,7 +126,7 @@ register int d;
}
last () {
- register int i;
+ int i;
for (i = home-6*cturn; i != home; i += cturn)
if (board[i]*cturn > 0)
@@ -134,17 +134,17 @@ last () {
}
movback (i)
-register int i;
+int i;
{
- register int j;
+ int j;
for (j = i-1; j >= 0; j--)
backone(j);
}
backone (i)
-register int i;
+int i;
{
board[p[i]] += cturn;
diff --git a/games/backgammon/common_source/save.c b/games/backgammon/common_source/save.c
index a82939b..674c192 100644
--- a/games/backgammon/common_source/save.c
+++ b/games/backgammon/common_source/save.c
@@ -53,11 +53,11 @@ static const char rec[] = "\" to recover your game.\n\n";
static const char cantrec[] = "Can't recover file: ";
save (n)
-register int n;
+int n;
{
- register int fdesc;
- register char *fs;
+ int fdesc;
+ char *fs;
char fname[50];
if (n) {
@@ -148,7 +148,7 @@ recover (s)
const char *s;
{
- register int i;
+ int i;
int fdesc;
if ((fdesc = open (s,O_RDONLY)) == -1)
diff --git a/games/backgammon/common_source/subs.c b/games/backgammon/common_source/subs.c
index a54ee4b..d60bf4a 100644
--- a/games/backgammon/common_source/subs.c
+++ b/games/backgammon/common_source/subs.c
@@ -63,7 +63,7 @@ const char *const descr[] = {
};
errexit (s)
-register char *s;
+char *s;
{
write (2,"\n",1);
perror (s);
@@ -71,7 +71,7 @@ register char *s;
}
int addbuf (c)
-register int c;
+int c;
{
buffnum++;
@@ -169,7 +169,7 @@ proll () {
wrint (n)
int n;
{
- register int i, j, t;
+ int i, j, t;
for (i = 4; i > 0; i--) {
t = 1;
@@ -182,7 +182,7 @@ int n;
}
gwrite() {
- register int r, c;
+ int r, c;
if (tflag) {
r = curr;
@@ -224,7 +224,7 @@ gwrite() {
}
quit () {
- register int i;
+ int i;
if (tflag) {
curmove (20,0);
@@ -245,10 +245,10 @@ quit () {
}
yorn (special)
-register char special; /* special response */
+char special; /* special response */
{
- register char c;
- register int i;
+ char c;
+ int i;
i = 1;
while ( (c = readc()) != 'Y' && c != 'N') {
@@ -275,7 +275,7 @@ register char special; /* special response */
}
wrhit (i)
-register int i;
+int i;
{
writel ("Blot hit on ");
wrint (i);
@@ -284,7 +284,7 @@ register int i;
}
nexturn () {
- register int c;
+ int c;
cturn = -cturn;
c = cturn/abs(cturn);
@@ -299,11 +299,11 @@ nexturn () {
}
getarg (argc, argv)
-register int argc;
-register char **argv;
+int argc;
+char **argv;
{
- register char ch;
+ char ch;
extern int optind;
extern char *optarg;
int i;
@@ -384,7 +384,7 @@ register char **argv;
}
init () {
- register int i;
+ int i;
for (i = 0; i < 26;)
board[i++] = 0;
board[1] = 2;
@@ -435,9 +435,9 @@ getout () {
exit(0);
}
roll () {
- register char c;
- register int row;
- register int col;
+ char c;
+ int row;
+ int col;
if (iroll) {
if (tflag) {
diff --git a/games/backgammon/common_source/table.c b/games/backgammon/common_source/table.c
index d8f074d..b64f09b 100644
--- a/games/backgammon/common_source/table.c
+++ b/games/backgammon/common_source/table.c
@@ -81,8 +81,8 @@ checkmove (ist)
int ist;
{
- register int j, n;
- register char c;
+ int j, n;
+ char c;
char a;
domove:
@@ -202,10 +202,10 @@ dochar:
dotable (c,i)
char c;
-register int i;
+int i;
{
- register int a, j;
+ int a, j;
int test;
test = (c == 'R');
@@ -298,7 +298,7 @@ register int i;
}
rsetbrd () {
- register int i, j, n;
+ int i, j, n;
n = 0;
mvl = 0;
OpenPOWER on IntegriCloud