summaryrefslogtreecommitdiffstats
path: root/games/backgammon/common_source/subs.c
diff options
context:
space:
mode:
authorsteve <steve@FreeBSD.org>1999-04-19 03:59:02 +0000
committersteve <steve@FreeBSD.org>1999-04-19 03:59:02 +0000
commitd59a3ca336bac3dac6ad8918ff6cb28fcbbba718 (patch)
treec2b57d23128f242645f8e3e16274a587229383ec /games/backgammon/common_source/subs.c
parent390eb1b3d201760a5e8b76e2431c1f667648718f (diff)
downloadFreeBSD-src-d59a3ca336bac3dac6ad8918ff6cb28fcbbba718.zip
FreeBSD-src-d59a3ca336bac3dac6ad8918ff6cb28fcbbba718.tar.gz
Merge a bunch of cleanups from NetBSD.
PR: 8083 Submitted by: Stephen J. Roznowski <sjr@home.net> Obtained from: a whole slew of NetBSD PRs
Diffstat (limited to 'games/backgammon/common_source/subs.c')
-rw-r--r--games/backgammon/common_source/subs.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/games/backgammon/common_source/subs.c b/games/backgammon/common_source/subs.c
index a9e998b..69763d8 100644
--- a/games/backgammon/common_source/subs.c
+++ b/games/backgammon/common_source/subs.c
@@ -43,11 +43,11 @@ static char sccsid[] = "@(#)subs.c 8.1 (Berkeley) 5/31/93";
int buffnum;
char outbuff[BUFSIZ];
-static char plred[] = "Player is red, computer is white.";
-static char plwhite[] = "Player is white, computer is red.";
-static char nocomp[] = "(No computer play.)";
+static const char plred[] = "Player is red, computer is white.";
+static const char plwhite[] = "Player is white, computer is red.";
+static const char nocomp[] = "(No computer play.)";
-char *descr[] = {
+const char *const descr[] = {
"Usage: backgammon [-h n r w b pr pw pb tterm sfile]\n",
"\t-h\tgets this list\n\t-n\tdon't ask for rules or instructions",
"\t-r\tplayer is red (implies -n)\n\t-w\tplayer is white (implies -n)",
@@ -68,12 +68,6 @@ register char *s;
getout();
}
-strset (s1,s2)
-register char *s1, *s2;
-{
- while ( (*s1++ = *s2++) != '\0');
-}
-
int addbuf (c)
register int c;
@@ -131,11 +125,12 @@ char c;
addbuf (c);
}
+void
writel (l)
-register char *l;
+const char *l;
{
#ifdef DEBUG
- register char *s;
+ const char *s;
if (trace == NULL)
trace = fopen ("bgtrace","w");
@@ -325,7 +320,7 @@ register char **argv;
args[acnt++] = strdup ("-n");
break;
- /* player is both read and white */
+ /* player is both red and white */
case 'b':
if (rflag)
break;
@@ -424,6 +419,7 @@ int mode;
errexit("fixtty");
}
+void
getout () {
/* go to bottom of screen */
if (tflag) {
OpenPOWER on IntegriCloud