|
|
| version 1.5, 2025/02/28 20:51:20 | version 1.8, 2025/03/24 01:52:30 |
|---|---|
| Line 1 | Line 1 |
| /* | /* |
| * * | * $Id$ |
| * * * | |
| * * * | |
| * *************** | |
| * * * * * | |
| * * MUMPS * | |
| * * * * * | |
| * *************** | |
| * * * | |
| * * * | |
| * * | |
| * | |
| * service.c | |
| * terminal and sequential I/O handling, | * terminal and sequential I/O handling, |
| * file and global locking | * file and global locking |
| * | * |
| * | * |
| * Author: Serena Willis <jpw@coherent-logic.com> | * Author: Serena Willis <snw@coherent-logic.com> |
| * Copyright (C) 1998 MUG Deutschland | * Copyright (C) 1998 MUG Deutschland |
| * Copyright (C) 2020 Coherent Logic Development LLC | * Copyright (C) 2020, 2025 Coherent Logic Development LLC |
| * | * |
| * | * |
| * This file is part of FreeM. | * This file is part of FreeM. |
| Line 36 | Line 24 |
| * You should have received a copy of the GNU Affero Public License | * You should have received a copy of the GNU Affero Public License |
| * along with FreeM. If not, see <https://www.gnu.org/licenses/>. | * along with FreeM. If not, see <https://www.gnu.org/licenses/>. |
| * | * |
| * $Log$ | |
| * 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 | |
| * | |
| * | |
| * SPDX-FileCopyrightText: (C) 2025 Coherent Logic Development LLC | |
| * SPDX-License-Identifier: AGPL-3.0-or-later | |
| **/ | **/ |
| #include <errno.h> | #include <errno.h> |
| Line 4436 void set_io (short action) | Line 4434 void set_io (short action) |
| /* DEL = UNIX quit */ | /* DEL = UNIX quit */ |
| void set_break (short break_char) | void set_break (short break_char) |
| { | { |
| #if !defined(__OS2__) | |
| struct termio arg; | struct termio arg; |
| ioctl (0, TCGETA, &arg); | ioctl (0, TCGETA, &arg); |
| Line 4443 void set_break (short break_char) | Line 4442 void set_break (short break_char) |
| arg.c_cc[VINTR] = break_char; /* interrupt = CTRL/C */ | arg.c_cc[VINTR] = break_char; /* interrupt = CTRL/C */ |
| ioctl (0, TCSETA, &arg); | ioctl (0, TCSETA, &arg); |
| #endif | |
| return; | return; |
| } /* end of set_break() */ | } /* end of set_break() */ |
| Line 4454 void set_break (short break_char) | Line 4453 void set_break (short break_char) |
| /* DEL = UNIX quit */ | /* DEL = UNIX quit */ |
| void set_zbreak (short quit_char) | void set_zbreak (short quit_char) |
| { | { |
| #if !defined(__OS2__) | |
| struct termio arg; | struct termio arg; |
| ioctl (0, TCGETA, &arg); | ioctl (0, TCGETA, &arg); |
| Line 4461 void set_zbreak (short quit_char) | Line 4461 void set_zbreak (short quit_char) |
| arg.c_cc[VQUIT] = quit_char; | arg.c_cc[VQUIT] = quit_char; |
| ioctl (0, TCSETA, &arg); | ioctl (0, TCSETA, &arg); |
| #endif | |
| return; | return; |
| } /* end of set_zbreak() */ | } /* end of set_zbreak() */ |