- HC = tgetflag ("hc");
-
- if (!initCO && (CO = tgetnum ("co")) <= 0)
- CO = 80;
- if (!initLI && (LI = tgetnum ("li")) <= 0)
- LI = 24;
-
- cp = termcap;
- CL = tgetstr ("cl", &cp);
- if ((bp = tgetstr ("pc", &cp)))
- PC = *bp;
- if (tgetnum ("sg") <= 0) {
- SE = tgetstr ("se", &cp);
- SO = tgetstr ("so", &cp);
- }
-}
-
-
-int
-sc_width (void)
-{
-#ifdef TIOCGWINSZ
- struct winsize win;
- int width;
-
- if (ioctl (fileno (stderr), TIOCGWINSZ, &win) != NOTOK
- && (width = win.ws_col) > 0) {
- CO = width;
- initCO++;
- } else
-#endif /* TIOCGWINSZ */
- read_termcap();