head 1.6; access; symbols pkgsrc-2026Q1:1.6.0.94 pkgsrc-2026Q1-base:1.6 pkgsrc-2025Q4:1.6.0.92 pkgsrc-2025Q4-base:1.6 pkgsrc-2025Q3:1.6.0.90 pkgsrc-2025Q3-base:1.6 pkgsrc-2025Q2:1.6.0.88 pkgsrc-2025Q2-base:1.6 pkgsrc-2025Q1:1.6.0.86 pkgsrc-2025Q1-base:1.6 pkgsrc-2024Q4:1.6.0.84 pkgsrc-2024Q4-base:1.6 pkgsrc-2024Q3:1.6.0.82 pkgsrc-2024Q3-base:1.6 pkgsrc-2024Q2:1.6.0.80 pkgsrc-2024Q2-base:1.6 pkgsrc-2024Q1:1.6.0.78 pkgsrc-2024Q1-base:1.6 pkgsrc-2023Q4:1.6.0.76 pkgsrc-2023Q4-base:1.6 pkgsrc-2023Q3:1.6.0.74 pkgsrc-2023Q3-base:1.6 pkgsrc-2023Q2:1.6.0.72 pkgsrc-2023Q2-base:1.6 pkgsrc-2023Q1:1.6.0.70 pkgsrc-2023Q1-base:1.6 pkgsrc-2022Q4:1.6.0.68 pkgsrc-2022Q4-base:1.6 pkgsrc-2022Q3:1.6.0.66 pkgsrc-2022Q3-base:1.6 pkgsrc-2022Q2:1.6.0.64 pkgsrc-2022Q2-base:1.6 pkgsrc-2022Q1:1.6.0.62 pkgsrc-2022Q1-base:1.6 pkgsrc-2021Q4:1.6.0.60 pkgsrc-2021Q4-base:1.6 pkgsrc-2021Q3:1.6.0.58 pkgsrc-2021Q3-base:1.6 pkgsrc-2021Q2:1.6.0.56 pkgsrc-2021Q2-base:1.6 pkgsrc-2021Q1:1.6.0.54 pkgsrc-2021Q1-base:1.6 pkgsrc-2020Q4:1.6.0.52 pkgsrc-2020Q4-base:1.6 pkgsrc-2020Q3:1.6.0.50 pkgsrc-2020Q3-base:1.6 pkgsrc-2020Q2:1.6.0.46 pkgsrc-2020Q2-base:1.6 pkgsrc-2020Q1:1.6.0.26 pkgsrc-2020Q1-base:1.6 pkgsrc-2019Q4:1.6.0.48 pkgsrc-2019Q4-base:1.6 pkgsrc-2019Q3:1.6.0.44 pkgsrc-2019Q3-base:1.6 pkgsrc-2019Q2:1.6.0.42 pkgsrc-2019Q2-base:1.6 pkgsrc-2019Q1:1.6.0.40 pkgsrc-2019Q1-base:1.6 pkgsrc-2018Q4:1.6.0.38 pkgsrc-2018Q4-base:1.6 pkgsrc-2018Q3:1.6.0.36 pkgsrc-2018Q3-base:1.6 pkgsrc-2018Q2:1.6.0.34 pkgsrc-2018Q2-base:1.6 pkgsrc-2018Q1:1.6.0.32 pkgsrc-2018Q1-base:1.6 pkgsrc-2017Q4:1.6.0.30 pkgsrc-2017Q4-base:1.6 pkgsrc-2017Q3:1.6.0.28 pkgsrc-2017Q3-base:1.6 pkgsrc-2017Q2:1.6.0.24 pkgsrc-2017Q2-base:1.6 pkgsrc-2017Q1:1.6.0.22 pkgsrc-2017Q1-base:1.6 pkgsrc-2016Q4:1.6.0.20 pkgsrc-2016Q4-base:1.6 pkgsrc-2016Q3:1.6.0.18 pkgsrc-2016Q3-base:1.6 pkgsrc-2016Q2:1.6.0.16 pkgsrc-2016Q2-base:1.6 pkgsrc-2016Q1:1.6.0.14 pkgsrc-2016Q1-base:1.6 pkgsrc-2015Q4:1.6.0.12 pkgsrc-2015Q4-base:1.6 pkgsrc-2015Q3:1.6.0.10 pkgsrc-2015Q3-base:1.6 pkgsrc-2015Q2:1.6.0.8 pkgsrc-2015Q2-base:1.6 pkgsrc-2015Q1:1.6.0.6 pkgsrc-2015Q1-base:1.6 pkgsrc-2014Q4:1.6.0.4 pkgsrc-2014Q4-base:1.6 pkgsrc-2014Q3:1.6.0.2 pkgsrc-2014Q3-base:1.6 pkgsrc-2014Q2:1.5.0.8 pkgsrc-2014Q2-base:1.5 pkgsrc-2014Q1:1.5.0.6 pkgsrc-2014Q1-base:1.5 pkgsrc-2013Q4:1.5.0.4 pkgsrc-2013Q4-base:1.5 pkgsrc-2013Q3:1.5.0.2 pkgsrc-2013Q3-base:1.5 pkgsrc-2013Q2:1.4.0.50 pkgsrc-2013Q2-base:1.4 pkgsrc-2013Q1:1.4.0.48 pkgsrc-2013Q1-base:1.4 pkgsrc-2012Q4:1.4.0.46 pkgsrc-2012Q4-base:1.4 pkgsrc-2012Q3:1.4.0.44 pkgsrc-2012Q3-base:1.4 pkgsrc-2012Q2:1.4.0.42 pkgsrc-2012Q2-base:1.4 pkgsrc-2012Q1:1.4.0.40 pkgsrc-2012Q1-base:1.4 pkgsrc-2011Q4:1.4.0.38 pkgsrc-2011Q4-base:1.4 pkgsrc-2011Q3:1.4.0.36 pkgsrc-2011Q3-base:1.4 pkgsrc-2011Q2:1.4.0.34 pkgsrc-2011Q2-base:1.4 pkgsrc-2011Q1:1.4.0.32 pkgsrc-2011Q1-base:1.4 pkgsrc-2010Q4:1.4.0.30 pkgsrc-2010Q4-base:1.4 pkgsrc-2010Q3:1.4.0.28 pkgsrc-2010Q3-base:1.4 pkgsrc-2010Q2:1.4.0.26 pkgsrc-2010Q2-base:1.4 pkgsrc-2010Q1:1.4.0.24 pkgsrc-2010Q1-base:1.4 pkgsrc-2009Q4:1.4.0.22 pkgsrc-2009Q4-base:1.4 pkgsrc-2009Q3:1.4.0.20 pkgsrc-2009Q3-base:1.4 pkgsrc-2009Q2:1.4.0.18 pkgsrc-2009Q2-base:1.4 pkgsrc-2009Q1:1.4.0.16 pkgsrc-2009Q1-base:1.4 pkgsrc-2008Q4:1.4.0.14 pkgsrc-2008Q4-base:1.4 pkgsrc-2008Q3:1.4.0.12 pkgsrc-2008Q3-base:1.4 cube-native-xorg:1.4.0.10 cube-native-xorg-base:1.4 pkgsrc-2008Q2:1.4.0.8 pkgsrc-2008Q2-base:1.4 cwrapper:1.4.0.6 pkgsrc-2008Q1:1.4.0.4 pkgsrc-2008Q1-base:1.4 pkgsrc-2007Q4:1.4.0.2 pkgsrc-2007Q4-base:1.4 pkgsrc-2007Q3:1.2.0.16 pkgsrc-2007Q3-base:1.2 pkgsrc-2007Q2:1.2.0.14 pkgsrc-2007Q2-base:1.2 pkgsrc-2007Q1:1.2.0.12 pkgsrc-2007Q1-base:1.2 pkgsrc-2006Q4:1.2.0.10 pkgsrc-2006Q4-base:1.2 pkgsrc-2006Q3:1.2.0.8 pkgsrc-2006Q3-base:1.2 pkgsrc-2006Q2:1.2.0.6 pkgsrc-2006Q2-base:1.2 pkgsrc-2006Q1:1.2.0.4 pkgsrc-2006Q1-base:1.2 pkgsrc-2005Q4:1.2.0.2 pkgsrc-2005Q4-base:1.2 pkgsrc-2005Q3:1.1.0.24 pkgsrc-2005Q3-base:1.1 pkgsrc-2005Q2:1.1.0.22 pkgsrc-2005Q2-base:1.1 pkgsrc-2005Q1:1.1.0.20 pkgsrc-2005Q1-base:1.1 pkgsrc-2004Q4:1.1.0.18 pkgsrc-2004Q4-base:1.1 pkgsrc-2004Q3:1.1.0.16 pkgsrc-2004Q3-base:1.1 pkgsrc-2004Q2:1.1.0.14 pkgsrc-2004Q2-base:1.1 pkgsrc-2004Q1:1.1.0.12 pkgsrc-2004Q1-base:1.1 pkgsrc-2003Q4:1.1.0.10 pkgsrc-2003Q4-base:1.1 netbsd-1-6-1:1.1.0.6 netbsd-1-6-1-base:1.1 netbsd-1-6:1.1.0.8 netbsd-1-6-RELEASE-base:1.1 pkgviews:1.1.0.4 pkgviews-base:1.1 buildlink2:1.1.0.2 buildlink2-base:1.1 netbsd-1-5-PATCH003:1.1 netbsd-1-5-PATCH001:1.1 netbsd-1-5-RELEASE:1.1 netbsd-1-4-PATCH003:1.1 netbsd-1-4-PATCH002:1.1 comdex-fall-1999:1.1 netbsd-1-4-PATCH001:1.1 netbsd-1-4-RELEASE:1.1; locks; strict; comment @# @; 1.6 date 2014.09.12.03.54.13; author dholland; state Exp; branches; next 1.5; commitid 3ryTSPdOeliow0Qx; 1.5 date 2013.07.18.12.07.24; author joerg; state Exp; branches; next 1.4; commitid qF8N7gtfLNHoOWXw; 1.4 date 2007.12.16.15.53.44; author yyamano; state Exp; branches; next 1.3; 1.3 date 2007.11.25.12.15.53; author wiz; state Exp; branches; next 1.2; 1.2 date 2005.12.09.13.56.51; author joerg; state Exp; branches; next 1.1; 1.1 date 98.12.20.21.12.58; author bad; state Exp; branches; next ; desc @@ 1.6 log @Rip out struct sgttyb. And . This is 2014. Should fix the build on Solaris and most other OSes that don't keep a museum of historical BSD curiosities on tap. Also, make the termios code already present actually work instead of zeroing some things, using uninitialized values for others, and thereby hanging up the tty. Given that some of the logic apparently came from Debian patches, I'm not impressed. (I suppose Linux probably doesn't honor hangup via setting the speed to 0.) While here also fix up the window size handling. Input now works properly for me (on NetBSD) and it didn't before I started mucking around, so it seems like generally a step forward. PKGREVISION -> 1. @ text @$NetBSD$ Rip out struct sgttyb and termio and other prehistoric stuff. Use only termios, except leave the OS2 and MINIX cases alone. The latter probably should be removed too, but let's wait to hear from some Minix users. Also, make the termios code that was already here actually work. --- termio.c.orig 2014-09-12 03:38:15.000000000 +0000 +++ termio.c @@@@ -12,9 +12,6 @@@@ #include #include #include -#ifdef BSD -#include -#else #ifdef OS2 #ifndef __EMX__ #define INCL_NOPM @@@@ -28,15 +25,10 @@@@ #include #define O_NDELAY O_NONBLOCK #else -#ifdef __GLIBC__ +#include #include -#else -#include -#endif /* __GLIBC__ */ #endif /* MINIX */ #endif /* OS2 */ -#endif /* BSD */ -#include #include #include "def.h" int kbdflgs; /* saved keyboard fd flags */ @@@@ -44,10 +36,6 @@@@ int kbdpoll; /* in O_NDELAY mode int kbdqp; /* there is a char in kbdq */ char kbdq; /* char we've already read */ -#ifdef BSD -struct sgttyb otermb; -struct sgttyb ntermb; -#else #ifdef OS2 #ifndef __EMX__ KBDINFO kbst, kbst_std; @@@@ -58,21 +46,12 @@@@ struct sgttyb otermio; /* original term struct sgttyb ntermio; /* charactoristics to use inside */ struct tchars tchars, tcharsorig; #else -#ifdef __GLIBC__ -#include +#include struct termios otermio; struct termios ntermio; -#else -struct termio otermio; /* original terminal characteristics */ -struct termio ntermio; /* charactoristics to use inside */ -#endif /* __GLIBC__ */ #endif /* MINIX */ #endif /* OS2 */ -#endif /* BSD */ -#ifndef OS2 -//extern errno; /* System error number -- Necessary when compiling in BSD 1.13 */ -#endif int nrow; /* Terminal size, rows. */ int ncol; /* Terminal size, columns. */ @@@@ -86,42 +65,37 @@@@ int ncol; /* Terminal size, columns. void ttopen () { -#ifdef BSD -#ifdef ULTRIX +#if !defined(OS2) && !defined(MINIX) + +#if defined(TIOCGWINSZ) struct winsize ttysize; -#else +#elif defined(TIOCGSIZE) struct ttysize ttysize; #endif - ioctl (0, TIOCGETP, &otermb); /* save settings */ - ntermb = otermb; /* setup new settings */ - ntermb.sg_flags &= ~ECHO; - ntermb.sg_flags |= RAW; - ioctl (0, TIOCSETP, &ntermb); /* and activate them */ - kbdpoll = FALSE; - /* on all screens we are not sure of the initial position of the cursor */ ttrow = 999; ttcol = 999; -#ifdef ULTRIX +#if defined(TIOCGWINSZ) if (ioctl (0, TIOCGWINSZ, &ttysize) == 0) { nrow = ttysize.ws_row; ncol = ttysize.ws_col; -#else + } else +#elif defined(TIOCGSIZE) if (ioctl (0, TIOCGSIZE, &ttysize) == 0) { nrow = ttysize.ts_lines; ncol = ttysize.ts_cols; + } else #endif /* ULTRIX */ - } - else { nrow = NROW; ncol = NCOL; } -#else +#endif /* not OS2 or MINIX */ + #ifdef OS2 setmode (1, O_BINARY); #else @@@@ -137,33 +111,23 @@@@ ttopen () tchars.t_stopc = tchars.t_eofc = tchars.t_brkc = -1; ioctl (0, TIOCSETC, &tchars); #else -#ifdef __GLIBC__ tcgetattr(0,&otermio); -#else - ioctl (0, TCGETA, &otermio);/* save old settings */ - ntermio.c_line = otermio.c_line; -#endif +#if 0 /* horribly wrong -- never do this! */ ntermio.c_iflag = 0; /* setup new settings */ ntermio.c_oflag = 0; ntermio.c_cflag = otermio.c_cflag; ntermio.c_lflag = 0; +#else + ntermio = otermio; + ntermio.c_lflag &= ~(ECHO|ECHONL|ECHOCTL|ISIG|ICANON); +#endif ntermio.c_cc[VMIN] = 1; ntermio.c_cc[VTIME] = 0; -#ifdef __GLIBC__ tcsetattr(0,TCSANOW,&ntermio); -#else - ioctl (0, TCSETAW, &ntermio); /* and activate them */ -#endif #endif /* MINIX */ kbdflgs = fcntl (0, F_GETFL, 0); kbdpoll = FALSE; #endif /* OS2 */ - /* on all screens we are not sure of the initial position of the cursor */ - ttrow = 999; - ttcol = 999; - nrow = NROW; - ncol = NCOL; -#endif /* BSD */ } /* @@@@ -174,10 +138,6 @@@@ ttopen () void ttclose () { -#ifdef BSD - if (ioctl (0, TIOCSETP, &otermb) == -1) /* restore terminal settings */ - printf ("closing ioctl on dev 0 failure, error = %d\n", errno); -#else #ifdef OS2 setmode (1, O_TEXT); #else @@@@ -186,17 +146,12 @@@@ ttclose () ioctl (0, TIOCSETC, &tcharsorig) == -1) printf ("closing ioctl on dev 0 failure, error = %d\n", errno); #else -#ifdef __GLIBC__ if( tcsetattr(0,TCSANOW,&otermio) == -1) -#else - if (ioctl (0, TCSETAW, &otermio) == -1) /* restore terminal settings */ -#endif printf ("closing ioctl on dev 0 failure, error = %d\n", errno); #endif /* MINIX */ if (fcntl (0, F_SETFL, kbdflgs) == -1) printf ("closing fcntl on dev 0 failure, error = %d\n", errno); #endif /* OS2 */ -#endif /* BSD */ } #ifdef OS2 @@@@ -235,7 +190,7 @@@@ ttcooked (void) #endif } -#endif +#endif /* OS2 */ /* * Write a character to the display. On VMS, terminal output is buffered, and @@@@ -336,7 +291,7 @@@@ int ttgetc () kbdqp = FALSE; else { -#ifdef BSD +#if defined(FIONREAD) int count; if (kbdpoll && (ioctl (0, FIONREAD, &count), count == 0)) @@@@ -372,7 +327,7 @@@@ int ttkeyready () #else if (!kbdqp) { -#ifdef BSD +#if defined(FIONREAD) int count; if (!kbdpoll && (ioctl (0, FIONREAD, &count), count == 0)) @@@@ -389,7 +344,7 @@@@ int ttkeyready () kbdpoll = TRUE; /* fix in 1.13 */ kbdqp = (1 == read (0, &kbdq, 1)); #endif /* MINIX */ -#endif /* BSD */ +#endif /* FIONREAD */ } return (kbdqp); @ 1.5 log @Add termios.h formerly included by unistd.h. @ text @d1 1 a1 1 $NetBSD: patch-ab,v 1.4 2007/12/16 15:53:44 yyamano Exp $ d3 8 a10 1 --- termio.c.orig 2013-07-17 14:36:18.000000000 +0000 d12 3 a14 1 @@@@ -14,6 +14,10 @@@@ d16 40 a55 4 #ifdef BSD #include +#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__APPLE__) +#include d57 87 d145 30 d176 17 d194 36 a229 1 #ifndef __EMX__ @ 1.4 log @Make this build on Darwin. @ text @d1 1 a1 1 $NetBSD: patch-ab,v 1.3 2007/11/25 12:15:53 wiz Exp $ d3 1 a3 1 --- termio.c.orig 2007-12-17 00:49:07.000000000 +0900 d5 1 a5 1 @@@@ -14,6 +14,9 @@@@ d11 1 @ 1.3 log @Update to 1.40.18: beav (1:1.40-18) unstable; urgency=low * Repackaged with the original 1.40 source so that we get a proper diff.gz. * defs.h: + Removed prototypes for malloc and strcpy/strcat (Closes: #262572). -- Sam Hocevar (Debian packages) Sat, 31 Jul 2004 22:42:19 +0200 beav (1:1.40-17) unstable; urgency=low * debian/control: + Set policy to 3.6.1.1. * beav.1: + Fixed documentation location (Closes: #210601). * Fixed warnings everywhere in the code. * main.c: + Added a help string to tell the user how to quit (Closes: #171933). * file.c: + Fixed an overflow in the filename display routine (Closes: #56546). * fileio.c: + Corrected wrong char signedness assumption that caused backup filenames to be mangled (Closes: #46376). -- Sam Hocevar (Debian packages) Tue, 13 Jul 2004 11:36:18 +0200 beav (1:1.40-16) unstable; urgency=low * New maintainer (Closes: #227774). * debian/control: + Set policy to 3.6.1.0. + Removed caps in the short description. * debian/copyright: + Added the GPL blurb to the copyright file. -- Sam Hocevar (Debian packages) Tue, 27 Jan 2004 13:22:17 +0100 beav (1:1.40-15) unstable; urgency=low * Include patch from James A Morrison for Hurd support. * Update to standards version 3.5.5. -- Martin Mitchell Sat, 21 Jul 2001 23:37:20 +1000 beav (1:1.40-14) unstable; urgency=low * Update to standards version 3.5.2. (closes: #91113, #91385) * Add build depends. (closes: #70223) -- Martin Mitchell Tue, 27 Mar 2001 00:18:25 +1000 beav (1:1.40-13) unstable; urgency=low * Update to standards version 2.4.1. * Recompile for ncurses4. -- Martin Mitchell Sun, 11 Oct 1998 01:27:50 +1000 beav (1:1.40-12) unstable; urgency=low * Fix missing separator in debian/rules. (#25766) -- Martin Mitchell Sat, 29 Aug 1998 18:27:04 +1000 @ text @d1 1 a1 1 $NetBSD: patch-ab,v 1.2 2005/12/09 13:56:51 joerg Exp $ d3 1 a3 1 --- termio.c.orig 2007-11-25 12:03:46.000000000 +0000 d9 1 a9 1 +#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) @ 1.2 log @Fix errno. Remove "prototypes", which confused GCC 3.4. Add DragonFly. @ text @d1 1 a1 1 $NetBSD$ d3 1 a3 1 --- termio.c.orig 1995-08-20 18:05:21.000000000 +0000 d5 1 a5 1 @@@@ -12,6 +12,9 @@@@ a14 11 @@@@ -58,10 +61,6 @@@@ struct termio ntermio; /* charactoristi #endif /* OS2 */ #endif /* BSD */ -#ifndef OS2 -extern errno; /* System error number -- Necessary when compiling in BSD 1.13 */ -#endif - int nrow; /* Terminal size, rows. */ int ncol; /* Terminal size, columns. */ @ 1.1 log @Adapt to Netbsd. Split patch-a into multiple files. @ text @d3 23 a25 14 *** beav-140.orig/termio.c Wed Nov 30 18:43:35 1994 --- termio.c Sat Jul 1 17:56:09 1995 *************** *** 12,17 **** --- 12,20 ---- #include #ifdef BSD #include + #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) + #include + #endif #else #ifdef OS2 #ifndef __EMX__ @