|
|
| version 1.10, 2025/03/24 01:55:46 | version 1.11, 2025/03/24 02:00:30 |
|---|---|
| Line 25 | Line 25 |
| * along with FreeM. If not, see <https://www.gnu.org/licenses/>. | * along with FreeM. If not, see <https://www.gnu.org/licenses/>. |
| * | * |
| * $Log$ | * $Log$ |
| * Revision 1.11 2025/03/24 02:00:30 snw | |
| * Work around some OS/2 incompatibilities in service.c | |
| * | |
| * Revision 1.10 2025/03/24 01:55:46 snw | * Revision 1.10 2025/03/24 01:55:46 snw |
| * Work around some OS/2 incompatibilities in service.c | * Work around some OS/2 incompatibilities in service.c |
| * | * |
| Line 994 end: | Line 997 end: |
| void writeHOME (char *text) | void writeHOME (char *text) |
| { | { |
| #if !defined(__OS2__) | |
| struct winsize terminal_window; | struct winsize terminal_window; |
| #endif | |
| static char initflag = TRUE; /* initialisation flag */ | static char initflag = TRUE; /* initialisation flag */ |
| static char esc = 0; /* esc processing flag */ | static char esc = 0; /* esc processing flag */ |
| static char dcs = 0; /* device control processing flag */ | static char dcs = 0; /* device control processing flag */ |
| Line 1055 void writeHOME (char *text) | Line 1060 void writeHOME (char *text) |
| * and the 'hardcopy function' | * and the 'hardcopy function' |
| */ | */ |
| if (initflag) { | if (initflag) { |
| #if !defined(__OS2__) | |
| /* TODO: why are we casting to void here? */ | /* TODO: why are we casting to void here? */ |
| (void) ioctl(STDOUT_FILENO, TIOCGWINSZ, &terminal_window); | (void) ioctl(STDOUT_FILENO, TIOCGWINSZ, &terminal_window); |
| n_lines = terminal_window.ws_row; | n_lines = terminal_window.ws_row; |
| n_columns = terminal_window.ws_col; | n_columns = terminal_window.ws_col; |
| #else | |
| n_lines = 25; | |
| n_columns = 80; | |
| #endif | |
| screen = (struct vtstyp *) calloc (1, sizeof (struct vtstyp)); | screen = (struct vtstyp *) calloc (1, sizeof (struct vtstyp)); |
| ris (screen); | ris (screen); |