-
-/*
- * If we have the capability, print this in standout mode
- */
-static
-standout(f, s, a1, a2)
- FILE *f;
- char *s;
-{
-#ifdef TERMCAP
- if (SO)
- tputs(SO, 0, putch);
- fprintf(f, s, a1, a2);
- if (SO && SE)
- tputs(SE, 0, putch);
-#else
- fprintf(f, s, a1, a2);
-#endif
-}
-
-#ifdef TERMCAP
-static char *
-capstrings[] = {
- "bc", "cl", "cm", "so", "se", "ti", "te", "up",
- 0
-};
-
-static char **
-caps[] = {
- &BC, &CL, &CM, &SO, &SE, &TI, &TE, &UP,
-};
-
-/*
- * All we need from termcap is to clear screen and
- * position cursor at the top; if these aren't available
- * we say the terminal is dumb and let things scroll
- */
-static
-termcap()
-{
- char *term, tbuf[BUFSIZ];
- static char buf[BUFSIZ/2];
- register short columns;
- char *bp = buf;
- register char **p, ***q, *cp;
-
- ioctl(0, TIOCGETP, (char *)&sbuf);
- ospeed = sbuf.sg_ospeed;
- if ((term = getenv("TERM")) != NULL && tgetent(tbuf, term) > 0) {
- for (p = capstrings, q = caps; *p != NULL; p++, q++)
- **q = tgetstr(*p, &bp);
- if ((cp = tgetstr("pc", &bp)) != NULL)
- PC = *cp;
- }
- return(CL == NULL || CM == NULL);
-}
-
-/*
- * Putchar writearound for tputs
- */
-static
-putch(c)
- char c;
-{
- putchar(c);
-}
-#endif