-/* $NetBSD: bdisp.c,v 1.5 1997/10/10 13:36:02 lukem Exp $ */
+/* $NetBSD: bdisp.c,v 1.8 2003/08/07 09:37:16 agc Exp $ */
/*
* Copyright (c) 1994
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
#if 0
static char sccsid[] = "@(#)bdisp.c 8.2 (Berkeley) 5/3/95";
#else
-__RCSID("$NetBSD: bdisp.c,v 1.5 1997/10/10 13:36:02 lukem Exp $");
+__RCSID("$NetBSD: bdisp.c,v 1.8 2003/08/07 09:37:16 agc Exp $");
#endif
#endif /* not lint */
static int lastline;
static char pcolor[] = "*O.?";
+extern int interactive;
+extern char *plyr[];
+
/*
* Initialize screen display.
*/
int update;
{
int i;
- extern char *plyr[];
move(21, 0);
clrtoeol();
*/
void
dislog(str)
- char *str;
+ const char *str;
{
if (++lastline >= SCRNH - 1) {
/* move 'em up */
lastline = 1;
}
- if (strlen(str) >= SCRNW - 46)
- str[SCRNW - 46 - 1] = '\0';
move(lastline, 46);
- addstr(str);
+ addnstr(str, SCRNW - 46 - 1);
clrtoeol();
move(lastline + 1, 46);
clrtoeol();
void
ask(str)
- char *str;
+ const char *str;
{
int len = strlen(str);
{
char *cp, *end;
int c;
- extern int interactive;
c = 0;
cp = buf;