|
|
| version 1.3, 2025/02/28 20:06:07 | version 1.9, 2026/01/07 19:51:33 |
|---|---|
| Line 1 | Line 1 |
| /* | /* |
| * * | * $Id$ |
| * * * | |
| * * * | |
| * *************** | |
| * * * * * | |
| * * MUMPS * | |
| * * * * * | |
| * *************** | |
| * * * | |
| * * * | |
| * * | |
| * | |
| * views.c | |
| * implementation of VIEW command and $VIEW intrinsic function | * implementation of VIEW command and $VIEW intrinsic function |
| * | * |
| * | * |
| * 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 35 | Line 23 |
| * 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.9 2026/01/07 19:51:33 snw | |
| * Fix segfault in reverse $QUERY | |
| * | |
| * Revision 1.8 2025/04/09 19:52:02 snw | |
| * Eliminate as many warnings as possible while building with -Wall | |
| * | |
| * Revision 1.7 2025/04/02 03:02:42 snw | |
| * Stop requiring users to pass -e to fmadm when -u or -g are passed | |
| * | |
| * Revision 1.6 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 <stdlib.h> | #include <stdlib.h> |
| Line 43 | Line 47 |
| #include "mwapi_window.h" | #include "mwapi_window.h" |
| #define LOCK 'l' | #define LOCK 'l' |
| #define ZDEALLOCATE 'D' | |
| /* system services */ | /* system services */ |
| #include <signal.h> | #include <signal.h> |
| #if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__linux__) | |
| #include <sys/ioctl.h> | |
| #endif | |
| #if !defined(__APPLE__) && !defined(__gnu_hurd__) && !defined(EMSCRIPTEN) | #if !defined(__APPLE__) && !defined(__gnu_hurd__) && !defined(EMSCRIPTEN) |
| # if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__AMIGA) | # if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__AMIGA) |
| # include <termios.h> | # include <termios.h> |
| Line 58 | Line 66 |
| # endif | # endif |
| # define termio termios | # define termio termios |
| # else | # else |
| # if !defined(MSDOS) | # if !defined(MSDOS) && !defined(__linux__) |
| # include <termio.h> | # include <termio.h> |
| # else | |
| # include <termios.h> | |
| # define termio termios | |
| # endif | # endif |
| # endif | # endif |
| #else | #else |
| Line 72 | Line 83 |
| #endif /* __CYGWIN__ */ | #endif /* __CYGWIN__ */ |
| #include <errno.h> /* snw */ | #include <errno.h> /* snw */ |
| #if defined(__NetBSD__) | |
| #include <sys/ioctl.h> | |
| #endif | |
| #include <fcntl.h> | #include <fcntl.h> |
| #include <unistd.h> | #include <unistd.h> |
| Line 108 void view_com (void) | Line 116 void view_com (void) |
| { | { |
| /* process VIEW command */ | /* process VIEW command */ |
| char tmp[256]; | |
| char tmp2[256]; | |
| int arg1; | int arg1; |
| register long int i; | register long int i; |
| register long int j; | register long int j; |