summaryrefslogtreecommitdiff
path: root/games/backgammon
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1998-04-26 14:52:18 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1998-04-26 14:52:18 +0000
commit56946dcacec2a6dd9acf36f3bea386336232f31d (patch)
treec65aa90c1f7644769bab3b7039767e2f0507bd69 /games/backgammon
parent04477bcb87530c1bcbf79ac8c2b54f7ebc179df8 (diff)
Fix terminal initialization for libtermlib to be happy.
Diffstat (limited to 'games/backgammon')
-rw-r--r--games/backgammon/common_source/fancy.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/games/backgammon/common_source/fancy.c b/games/backgammon/common_source/fancy.c
index 0af7f174598..dc358fbd605 100644
--- a/games/backgammon/common_source/fancy.c
+++ b/games/backgammon/common_source/fancy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fancy.c,v 1.3 1998/03/19 11:13:19 pjanzen Exp $ */
+/* $OpenBSD: fancy.c,v 1.4 1998/04/26 14:52:17 millert Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)fancy.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: fancy.c,v 1.3 1998/03/19 11:13:19 pjanzen Exp $";
+static char rcsid[] = "$OpenBSD: fancy.c,v 1.4 1998/04/26 14:52:17 millert Exp $";
#endif
#endif /* not lint */
@@ -63,7 +63,7 @@ int *linect; /* array of lengths of lines on screen
(the actual screen is not stored) */
/* two letter codes */
-char tcap[] = "lecdceclcmhondup";
+char *tcap[] = {"le", "cd", "ce", "cl", "cm", "ho", "nd", "up", NULL};
/* corresponding strings */
char **tstr[] = {&BC, &CD, &CE, &CL, &CM, &HO, &ND, &UP};
@@ -674,7 +674,7 @@ int
getcaps(s)
char *s;
{
- char *code; /* two letter code */
+ char **code; /* two letter code */
char ***cap; /* pointer to cap string */
char *bufp; /* pointer to cap buffer */
char tentry[1024]; /* temporary uncoded caps buffer */
@@ -697,8 +697,8 @@ getcaps(s)
bufp = tbuf; /* get string entries */
cap = tstr;
- for (code = tcap; *code; code += 2)
- **cap++ = (char *)tgetstr(code, &bufp);
+ for (code = tcap; *code; code++)
+ **cap++ = (char *)tgetstr(*code, &bufp);
/* get pertinent lengths */
if (HO)