* Copyright (c) 1983, 1993
* The Regents of the University of California. All rights reserved.
* This code is derived from software contributed to Berkeley by
* Edward Wang at The University of California, Berkeley.
* %sccs.include.redist.c%
static char sccsid
[] = "@(#)tttermcap.c 8.1 (Berkeley) %G%";
register struct tt_str
*s
;
if ((str
= tgetstr(str
, &tt_strp
)) == 0)
if ((s
= (struct tt_str
*) malloc(sizeof *s
)) == 0)
s
->ts_n
= tt_strp
- s
->ts_str
- 1;
register struct tt_str
*s
;
if (tgetstr(str
, &bufp
) == 0)
if ((s
= (struct tt_str
*) malloc(sizeof *s
)) == 0)
s
->ts_n
= tt_strp
- s
->ts_str
;
register char *p
= s
->ts_str
;
ttputs(tgoto(p
, col
, row
));
for (p
+= s
->ts_n
; *--p
== 0;)
tputs(tgoto(s
->ts_str
, col
, row
), n
, tttputc
);
register struct tt_str
*a
, *b
;
if (r
= bcmp(a
->ts_str
, b
->ts_str
,
(n
= a
->ts_n
- b
->ts_n
) < 0 ? a
->ts_n
: b
->ts_n
))