--- freem/src/service.c 2025/03/09 19:50:47 1.7 +++ freem/src/service.c 2025/03/24 01:54:09 1.9 @@ -1,5 +1,5 @@ /* - * $Id: service.c,v 1.7 2025/03/09 19:50:47 snw Exp $ + * $Id: service.c,v 1.9 2025/03/24 01:54:09 snw Exp $ * terminal and sequential I/O handling, * file and global locking * @@ -25,6 +25,12 @@ * along with FreeM. If not, see . * * $Log: service.c,v $ + * Revision 1.9 2025/03/24 01:54:09 snw + * Work around some OS/2 incompatibilities in set_break and set_zbreak + * + * Revision 1.8 2025/03/24 01:52:30 snw + * Work around some OS/2 incompatibilities in set_break and set_zbreak + * * Revision 1.7 2025/03/09 19:50:47 snw * Second phase of REUSE compliance and header reformat * @@ -4431,6 +4437,7 @@ void set_io (short action) /* DEL = UNIX quit */ void set_break (short break_char) { +#if !defined(__OS2__) struct termio arg; ioctl (0, TCGETA, &arg); @@ -4438,7 +4445,7 @@ void set_break (short break_char) arg.c_cc[VINTR] = break_char; /* interrupt = CTRL/C */ ioctl (0, TCSETA, &arg); - +#endif return; } /* end of set_break() */ @@ -4449,6 +4456,7 @@ void set_break (short break_char) /* DEL = UNIX quit */ void set_zbreak (short quit_char) { +#if !defined(__OS2__) struct termio arg; ioctl (0, TCGETA, &arg); @@ -4456,7 +4464,7 @@ void set_zbreak (short quit_char) arg.c_cc[VQUIT] = quit_char; ioctl (0, TCSETA, &arg); - +#endif return; } /* end of set_zbreak() */ @@ -4501,6 +4509,8 @@ void set_io (short action) /* set io_ void set_break (short break_char) { + +#if !defined(__OS2__) struct termios termios_p; tcgetattr (0, &termios_p); @@ -4508,14 +4518,14 @@ void set_break (short break_char) termios_p.c_cc[VINTR] = break_char; /* interrupt = CTRL/C */ tcsetattr (0, TCSADRAIN, &termios_p); /* set paramters */ - +#endif return; } /* end of set_break() */ void set_zbreak (short quit_char) { - +#if !defined(__OS2__) struct termios termios_p; tcgetattr (0, &termios_p); @@ -4523,7 +4533,7 @@ void set_zbreak (short quit_char) termios_p.c_cc[VQUIT] = quit_char; tcsetattr (0, TCSADRAIN, &termios_p); /* set paramters */ - +#endif return; } /* end of set_zbreak() */