BS was using obsolete 'bs' and 'bc' capabilities. Now tries 'le' first.

This deals with pr#2417
This commit is contained in:
chopps 1996-07-03 04:17:24 +00:00
parent 648aed921f
commit 78bf5c48e8
2 changed files with 13 additions and 10 deletions

View File

@ -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);

View File

@ -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();