head 1.1; access; symbols pkgsrc-2026Q1:1.1.0.10 pkgsrc-2026Q1-base:1.1 pkgsrc-2025Q4:1.1.0.8 pkgsrc-2025Q4-base:1.1 pkgsrc-2025Q3:1.1.0.6 pkgsrc-2025Q3-base:1.1 pkgsrc-2025Q2:1.1.0.4 pkgsrc-2025Q2-base:1.1 pkgsrc-2025Q1:1.1.0.2 pkgsrc-2025Q1-base:1.1; locks; strict; comment @# @; 1.1 date 2025.02.07.03.15.06; author ryoon; state Exp; branches; next ; commitid AmF1up5wywoP9uIF; desc @@ 1.1 log @misc/screen4: import screen-4.9.1 Screen is a full-screen window manager that multiplexes a physical terminal between several processes (typically interactive shells). Each virtual terminal provides the functions of a DEC VT100 terminal and, in addition, several control functions from the ANSI X3.64 (ISO 6429) and ISO 2022 standards (e.g. insert/delete line and support for multiple character sets). There is a scrollback history buffer for each virtual terminal and a copy-and-paste mechanism that allows moving text regions between windows. misc/screen-5.0.0 does not work under xterm. Reversed strings are not displayed properly at least. Import working GNU screen 4 as misc/screen4. And screen-5.0.0 does not have codes for older platforms. @ text @$NetBSD: patch-aa,v 1.14 2023/09/06 16:00:15 vins Exp $ Portability fixes for NetBSD pty(4). --- pty.c.orig 2014-04-26 10:58:35.000000000 +0000 +++ pty.c @@@@ -318,6 +318,45 @@@@ char **ttyn; /***************************************************************/ +#if defined(__NetBSD__) && !defined(PTY_DONE) +#define PTY_DONE + +#include +#include + +int +OpenPTY(ttyn) +char **ttyn; +{ + int m, s, f; + char *t; + + do + { + if (openpty(&m, &s, TtyName, NULL, NULL) < 0) + return -1; + close(m); + close(s); + + strcpy(PtyName, TtyName); + t = strrchr(PtyName, '/'); + if ((t == NULL ) || (*++t != 't')) + return -1; + *t = 'p'; + + f = open(PtyName, O_RDWR | O_NOCTTY); + } + while (f < 0); + + initmaster(f); + *ttyn = TtyName; + + return f; +} +#endif + +/***************************************************************/ + #if defined(HAVE_OPENPTY) && !defined(PTY_DONE) #define PTY_DONE int @