| 93 | #endif /* AUX */ |
| 94 | |
| 95 | void |
| 96 | getwindowsz(void) |
| 97 | { |
| 98 | #ifdef USE_WIN_IOCTL |
| 99 | /* |
| 100 | * ttysize is found on Suns and BSD |
| 101 | * winsize is found on Suns, BSD, and Ultrix |
| 102 | */ |
| 103 | struct winsize ttsz; |
| 104 | |
| 105 | if (ioctl(fileno(stdin), (int) TIOCGWINSZ, (char *) &ttsz) != -1) { |
| 106 | /* |
| 107 | * Use the kernel's values for lines and columns if it has |
| 108 | * any idea. |
| 109 | */ |
| 110 | if (ttsz.ws_row) |
| 111 | LI = ttsz.ws_row; |
| 112 | if (ttsz.ws_col) |
| 113 | CO = ttsz.ws_col; |
| 114 | } |
| 115 | #endif |
| 116 | } |
| 117 | |
| 118 | void |
| 119 | getioctls(void) |