static int initCO = 0;
static int CO = 80; /* number of colums */
-static char *SE = NULL; /* termcap string to end standout mode */
-static char *SO = NULL; /* termcap string to begin standout mode */
static char termcap[TXTSIZ];
cp = termcap;
if ((bp = tgetstr("pc", &cp)))
PC = *bp;
- if (tgetnum("sg") <= 0) {
- SE = tgetstr("se", &cp);
- SO = tgetstr("so", &cp);
- }
}
return CO;
}
-
-
-/*
-** print in standout mode
-*/
-int
-SOprintf(char *fmt, ...)
-{
- va_list ap;
-
- read_termcap();
- if (!(SO && SE))
- return NOTOK;
-
- tputs(SO, 1, putchar);
-
- va_start(ap, fmt);
- vprintf(fmt, ap);
- va_end(ap);
-
- tputs(SE, 1, putchar);
-
- return OK;
-}