summaryrefslogtreecommitdiffstats
path: root/snake
diff options
context:
space:
mode:
authorchopps <chopps@NetBSD.org>1996-07-03 04:17:24 +0000
committerchopps <chopps@NetBSD.org>1996-07-03 04:17:24 +0000
commit5907b84fc3b8d464ecedbc099bd1af93456a1c84 (patch)
treef38d72be4a2abdf3cdbd830df268877f109cdab4 /snake
parentaeaee350ab2233c5b7bb402f56f18b79cef6533d (diff)
downloadbsdgames-darwin-5907b84fc3b8d464ecedbc099bd1af93456a1c84.tar.gz
bsdgames-darwin-5907b84fc3b8d464ecedbc099bd1af93456a1c84.tar.zst
bsdgames-darwin-5907b84fc3b8d464ecedbc099bd1af93456a1c84.zip
BS was using obsolete 'bs' and 'bc' capabilities. Now tries 'le' first.
This deals with pr#2417
Diffstat (limited to 'snake')
-rw-r--r--snake/snake/move.c19
-rw-r--r--snake/snake/snake.h4
2 files changed, 13 insertions, 10 deletions
diff --git a/snake/snake/move.c b/snake/snake/move.c
index 3a7d61d6..fd29abc8 100644
--- a/snake/snake/move.c
+++ b/snake/snake/move.c
@@ -1,4 +1,4 @@
-/* $NetBSD: move.c,v 1.12 1996/05/19 20:22:09 pk Exp $ */
+/* $NetBSD: move.c,v 1.13 1996/07/03 04:17:24 chopps Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)move.c 8.1 (Berkeley) 7/19/93";
#else
-static char rcsid[] = "$NetBSD: move.c,v 1.12 1996/05/19 20:22:09 pk Exp $";
+static char rcsid[] = "$NetBSD: move.c,v 1.13 1996/07/03 04:17:24 chopps Exp $";
#endif
#endif /* not lint */
@@ -604,11 +604,13 @@ getcap()
if (DO == 0)
DO = "\n";
- BS = tgetstr("bc", &ap);
- if (BS == 0 && tgetflag("bs"))
- BS = "\b";
- if (BS)
- xBC = *BS;
+ BS = tgetstr("le", &ap);
+ if (BS == 0) {
+ /* try using obsolete capabilities */
+ BS = tgetstr("bc", &ap);
+ if (BS == 0 && tgetflag("bs"))
+ BS = "\b";
+ }
TA = tgetstr("ta", &ap);
if (TA == 0 && tgetflag("pt"))
@@ -654,7 +656,8 @@ getcap()
}
NDlength = strlen(ND);
if (BS == 0) {
- fprintf(stderr, "Terminal must have `bs' or `bc' capability\n");
+ fprintf(stderr,
+ "Terminal must have 'le' or `bs' or `bc' capability\n");
exit(5);
}
BSlength = strlen(BS);
diff --git a/snake/snake/snake.h b/snake/snake/snake.h
index 921426ae..e43e9aaa 100644
--- a/snake/snake/snake.h
+++ b/snake/snake/snake.h
@@ -1,4 +1,4 @@
-/* $NetBSD: snake.h,v 1.6 1995/04/29 01:17:15 mycroft Exp $ */
+/* $NetBSD: snake.h,v 1.7 1996/07/03 04:17:25 chopps Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -56,7 +56,7 @@ char *CL, *UP, *DO, *ND, *BS,
*TI, *TE, *KS, *KE;
int LINES, COLUMNS; /* physical screen size. */
int lcnt, ccnt; /* user's idea of screen size */
-char xBC, PC;
+char PC;
int AM, BW;
char tbuf[1024], tcapbuf[128];
char *tgetstr(), *tgoto();