summaryrefslogtreecommitdiffstats
path: root/backgammon/teachgammon/ttext1.c
diff options
context:
space:
mode:
authorhubertf <hubertf@NetBSD.org>1999-02-10 12:29:47 +0000
committerhubertf <hubertf@NetBSD.org>1999-02-10 12:29:47 +0000
commitf2e552ba9ea473d3399e7b124077a7e4a856138b (patch)
treece3f13ceac941baa50c07a090d8cbd73be7fda90 /backgammon/teachgammon/ttext1.c
parent19bd733c3aad11dcfb4bbcf06abf79ff64442032 (diff)
downloadbsdgames-darwin-f2e552ba9ea473d3399e7b124077a7e4a856138b.tar.gz
bsdgames-darwin-f2e552ba9ea473d3399e7b124077a7e4a856138b.tar.zst
bsdgames-darwin-f2e552ba9ea473d3399e7b124077a7e4a856138b.zip
The patch below makes the game backgammon(6) use `const' where
appropriate. It also removes some obsolete, unused code to check the number of users on the system (obsoleted by dm); removes a prototype for an unused function that was removed earlier; and removes a control character from one message that was I think intended to clear the screen on some particular terminal (though I can't find the comment to that effect in any of the BSD source trees I have handy) but no longer serves any useful purpose. From PR 6580 by Joseph Myers <jsm28@cam.ac.uk>. Also contains two more patches, one in teachgammon/tutor.h (by Joseph) and one in common_source/fancy.c (by me).
Diffstat (limited to 'backgammon/teachgammon/ttext1.c')
-rw-r--r--backgammon/teachgammon/ttext1.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/backgammon/teachgammon/ttext1.c b/backgammon/teachgammon/ttext1.c
index 33a96253..e3486e19 100644
--- a/backgammon/teachgammon/ttext1.c
+++ b/backgammon/teachgammon/ttext1.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ttext1.c,v 1.4 1997/10/10 08:59:53 lukem Exp $ */
+/* $NetBSD: ttext1.c,v 1.5 1999/02/10 12:29:48 hubertf Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -38,17 +38,17 @@
#if 0
static char sccsid[] = "@(#)ttext1.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: ttext1.c,v 1.4 1997/10/10 08:59:53 lukem Exp $");
+__RCSID("$NetBSD: ttext1.c,v 1.5 1999/02/10 12:29:48 hubertf Exp $");
#endif
#endif /* not lint */
#include "back.h"
#include "tutor.h"
-char *opts = " QIMRHEDSPT";
-char *prompt = "-->";
+const char *opts = " QIMRHEDSPT";
+const char *prompt = "-->";
-char *list[] = {
+const char *const list[] = {
"\n\n\tI\tIntroduction to Backgammon",
"\tM\tMoves and Points",
"\tR\tRemoving Men from the Board",
@@ -64,8 +64,8 @@ char *list[] = {
0
};
-char *hello[] = {
- "\n\032 These rules consist of text describing how to play Backgammon",
+const char *const hello[] = {
+ "\n These rules consist of text describing how to play Backgammon",
"followed by a tutorial session where you play a practice game",
"against the computer. When using this program, think carefuly",
"before typing, since it reacts as soon as you type something. In",
@@ -82,7 +82,7 @@ char *hello[] = {
0
};
-char *intro1[] = {
+const char *const intro1[] = {
"\nIntroduction:",
"\n Backgammon is a game involving the skill of two players and",
"the luck of two dice. There are two players, red and white, and",
@@ -93,7 +93,7 @@ char *intro1[] = {
"",
0};
-char *intro2[] = {
+const char *const intro2[] = {
"",
"\n Although not indicated on the board, the players' homes are",
"located just to the right of the board. A player's men are placed",
@@ -107,7 +107,7 @@ char *intro2[] = {
"",
0};
-char *moves[] = {
+const char *const moves[] = {
"\nMoves and Points:",
"\n Moves are made along the positions on the board according to",
"their numbers. Red moves in the positive direction (clockwise",
@@ -138,7 +138,7 @@ char *moves[] = {
"",
0};
-char *removepiece[] = {
+const char *const removepiece[] = {
"\nRemoving Men from the Board:",
"\n The most important part of the game is removing men, since",
"that is how you win the game. Once a man is removed, he stays",
@@ -162,7 +162,7 @@ char *removepiece[] = {
"",
0};
-char *hits[] = {
+const char *const hits[] = {
"\nHitting Blots:",
"\n Although two men on a position form an impenetrable point, a",
"lone man is not so secure. Such a man is called a 'blot' and has",
@@ -179,7 +179,7 @@ char *hits[] = {
"",
0};
-char *endgame[] = {
+const char *const endgame[] = {
"\nEnding the Game and Scoring:",
"\n Winning a game usually wins one point, the normal value of a",
"game. However, if the losing player has not removed any men yet,",