From 78bf5c48e886199f4499849ea2b8c54afb2cb238 Mon Sep 17 00:00:00 2001 From: chopps Date: Wed, 3 Jul 1996 04:17:24 +0000 Subject: [PATCH] BS was using obsolete 'bs' and 'bc' capabilities. Now tries 'le' first. This deals with pr#2417 --- games/snake/snake/move.c | 19 +++++++++++-------- games/snake/snake/snake.h | 4 ++-- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/games/snake/snake/move.c b/games/snake/snake/move.c index 3a7d61d63fa1..fd29abc85c52 100644 --- a/games/snake/snake/move.c +++ b/games/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/games/snake/snake/snake.h b/games/snake/snake/snake.h index 921426ae4920..e43e9aaada9e 100644 --- a/games/snake/snake/snake.h +++ b/games/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();