summaryrefslogtreecommitdiffstats
path: root/larn
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2001-11-02 18:27:00 +0000
committerchristos <christos@NetBSD.org>2001-11-02 18:27:00 +0000
commit31eafb107eec858251ba10953d17d3dd8402be78 (patch)
tree5cbf425c78909b7df70fef3133a6048b9a2343b6 /larn
parent4124d10fb7d8dace368157d1e2a7a31d78b92787 (diff)
downloadbsdgames-darwin-31eafb107eec858251ba10953d17d3dd8402be78.tar.gz
bsdgames-darwin-31eafb107eec858251ba10953d17d3dd8402be78.tar.zst
bsdgames-darwin-31eafb107eec858251ba10953d17d3dd8402be78.zip
Update to the new t_agetstr() API.
Diffstat (limited to 'larn')
-rw-r--r--larn/io.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/larn/io.c b/larn/io.c
index c7233271..f769312c 100644
--- a/larn/io.c
+++ b/larn/io.c
@@ -1,4 +1,4 @@
-/* $NetBSD: io.c,v 1.12 2001/09/24 13:22:29 wiz Exp $ */
+/* $NetBSD: io.c,v 1.13 2001/11/02 18:27:00 christos Exp $ */
/*
* io.c Larn is copyrighted 1986 by Noah Morgan.
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: io.c,v 1.12 2001/09/24 13:22:29 wiz Exp $");
+__RCSID("$NetBSD: io.c,v 1.13 2001/11/02 18:27:00 christos Exp $");
#endif /* not lint */
#include "header.h"
@@ -764,7 +764,6 @@ cursors()
* obvious meanings.
*/
-static char *cap;
struct tinfo *info;
char *CM, *CE, *CD, *CL, *SO, *SE, *AL, *DL; /* Termcap capabilities */
static char *outbuf = 0; /* translated output buffer */
@@ -775,10 +774,8 @@ static char *outbuf = 0; /* translated output buffer */
void
init_term()
{
- char *capptr;
char *term;
- cap = NULL;
switch (t_getent(&info, term = getenv("TERM"))) {
case -1:
write(2, "Cannot open termcap file.\n", 26);
@@ -790,16 +787,16 @@ init_term()
exit(1);
};
- CM = t_agetstr(info, "cm", &cap, &capptr); /* Cursor motion */
- CE = t_agetstr(info, "ce", &cap, &capptr); /* Clear to eoln */
- CL = t_agetstr(info, "cl", &cap, &capptr); /* Clear screen */
+ CM = t_agetstr(info, "cm"); /* Cursor motion */
+ CE = t_agetstr(info, "ce"); /* Clear to eoln */
+ CL = t_agetstr(info, "cl"); /* Clear screen */
/* OPTIONAL */
- AL = t_agetstr(info, "al", &cap, &capptr); /* Insert line */
- DL = t_agetstr(info, "dl", &cap, &capptr); /* Delete line */
- SO = t_agetstr(info, "so", &cap, &capptr); /* Begin standout mode */
- SE = t_agetstr(info, "se", &cap, &capptr); /* End standout mode */
- CD = t_agetstr(info, "cd", &cap, &capptr); /* Clear to end of display */
+ AL = t_agetstr(info, "al"); /* Insert line */
+ DL = t_agetstr(info, "dl"); /* Delete line */
+ SO = t_agetstr(info, "so"); /* Begin standout mode */
+ SE = t_agetstr(info, "se"); /* End standout mode */
+ CD = t_agetstr(info, "cd"); /* Clear to end of display */
if (!CM) { /* can't find cursor motion entry */
write(2, "Sorry, for a ", 13);