xref: /original-bsd/usr.bin/window/tttermcap.c (revision 6219b5e8)
1 #ifndef lint
2 static char sccsid[] = "@(#)tttermcap.c	3.5 04/24/85";
3 #endif
4 
5 /*
6  * Copyright (c) 1983 Regents of the University of California,
7  * All rights reserved.  Redistribution permitted subject to
8  * the terms of the Berkeley Software License Agreement.
9  */
10 
11 #include "tt.h"
12 
13 char *tgetstr();
14 
15 tttputc(c)
16 {
17 	ttputc(c);
18 }
19 
20 ttxputc(c)
21 {
22 	*tt_strp++ = c;
23 }
24 
25 char *
26 ttxgetstr(str)
27 char *str;
28 {
29 	char buf[100];
30 	char *bufp = buf;
31 
32 	str = tgetstr(str, &bufp);
33 	if (str == 0)
34 		return 0;
35 	str = tt_strp;
36 	tputs(buf, 1, ttxputc);
37 	ttxputc(0);
38 	return str;
39 }
40