version 1.9, 2025/03/24 01:54:09
|
version 1.13, 2025/04/09 19:52:02
|
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.13 2025/04/09 19:52:02 snw |
|
* Eliminate as many warnings as possible while building with -Wall |
|
* |
|
* Revision 1.12 2025/03/24 04:05:36 snw |
|
* Replace crlf with frm_crlf to avoid symbol conflict with readline on OS/2 |
|
* |
|
* 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 |
|
* Work around some OS/2 incompatibilities in service.c |
|
* |
* Revision 1.9 2025/03/24 01:54:09 snw |
* Revision 1.9 2025/03/24 01:54:09 snw |
* Work around some OS/2 incompatibilities in set_break and set_zbreak |
* Work around some OS/2 incompatibilities in set_break and set_zbreak |
* |
* |
Line 85 int scosgr (short att, short bwflag);
|
Line 97 int scosgr (short att, short bwflag);
|
# if !defined(MSDOS) |
# if !defined(MSDOS) |
# include <termio.h> |
# include <termio.h> |
# endif |
# endif |
|
# if defined(__OS2__) |
|
# include <termios.h> |
|
# define termio termios |
|
# endif |
# endif |
# endif |
#else |
#else |
# include <termios.h> |
# include <termios.h> |
Line 987 end:
|
Line 1003 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 1048 void writeHOME (char *text)
|
Line 1066 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); |
Line 2741 void part_ref (struct vtstyp *scr, short
|
Line 2764 void part_ref (struct vtstyp *scr, short
|
short l; |
short l; |
short max; |
short max; |
unsigned char exa; |
unsigned char exa; |
|
#if !defined(LINUX) && defined(COLOR) |
unsigned char exc; |
unsigned char exc; |
|
#endif |
short i; |
short i; |
unsigned char *linea; |
unsigned char *linea; |
unsigned char *linex; |
unsigned char *linex; |
unsigned char *linec; |
unsigned char *linec; |
unsigned char ch; |
unsigned char ch; |
unsigned char tmp[1300]; |
char tmp[1300]; /* was unsigned char tmp... (snw 4-9-2025) */ |
|
|
/* build up alternate screen */ |
/* build up alternate screen */ |
/* reset SGR,TBM;white on black,go HOME; 25 Lines */ |
/* reset SGR,TBM;white on black,go HOME; 25 Lines */ |
Line 2817 void part_ref (struct vtstyp *scr, short
|
Line 2842 void part_ref (struct vtstyp *scr, short
|
} |
} |
|
|
exa = ~linea[0]; /* dummy value to trigger argument codes on 1st char */ |
exa = ~linea[0]; /* dummy value to trigger argument codes on 1st char */ |
|
|
|
#if !defined(LINUX) && defined(COLOR) |
exc = ~linec[0]; /* dummy value to trigger argument codes on 1st char */ |
exc = ~linec[0]; /* dummy value to trigger argument codes on 1st char */ |
|
#endif |
|
|
for (l = 0; l <= max; l++) { |
for (l = 0; l <= max; l++) { |
|
|
Line 3302 void write_m (char *text)
|
Line 3330 void write_m (char *text)
|
|
|
ypos[io]++; |
ypos[io]++; |
|
|
if (crlf[io]) xpos[io] = 0; |
if (frm_crlf[io]) xpos[io] = 0; |
|
|
continue; |
continue; |
|
|
Line 3395 void read_m (char *stuff, long read_time
|
Line 3423 void read_m (char *stuff, long read_time
|
static char term_key[256] = {EOL, EOL}; |
static char term_key[256] = {EOL, EOL}; |
static short int escptr; |
static short int escptr; |
static short int single; |
static short int single; |
static short int timoflag; /* timeout flag */ |
static short int timoflag; /* timeout flag */ |
static long int timex; |
|
static short int timexms; |
|
static short int i; |
static short int i; |
static int ch; |
static int ch; |
|
|
Line 3419 void read_m (char *stuff, long read_time
|
Line 3445 void read_m (char *stuff, long read_time
|
stuff[0] = EOL; |
stuff[0] = EOL; |
|
|
if (length < 1) single = length = 1; |
if (length < 1) single = length = 1; |
|
|
timex = 0L; |
|
timexms = 0; |
|
|
|
if (io == HOME) opnfile[HOME] = stdin; |
if (io == HOME) opnfile[HOME] = stdin; |
|
|
if (io == HOME && !frm_filter) { |
if (io == HOME && !frm_filter) { |
Line 4133 void read_m (char *stuff, long read_time
|
Line 4156 void read_m (char *stuff, long read_time
|
|
|
if (single) break; |
if (single) break; |
|
|
if (ch == LF && crlf[io]) { |
if (ch == LF && frm_crlf[io]) { |
i--; |
i--; |
continue; |
continue; |
} |
} |