can get unintended results (like printint the previous contents of the str
register, which is almost certainly what you don't want).
if (termstatus == 0)
initialize_terminfo();
+ termcbufp = termcbuf;
+
if (termstatus == -1)
- return;
+ goto out;
parm = tigetstr(cap);
if (parm == (char *) -1 || parm == NULL) {
- return;
+ goto out;
}
- termcbufp = termcbuf;
-
tputs(parm, 1, termbytes);
+out:
termcbufp = '\0';
LS(t->f_type, termcbuf);