From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Mar 17 16:00:12 2007 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4140B16A405 for ; Sat, 17 Mar 2007 16:00:12 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 23C7113C459 for ; Sat, 17 Mar 2007 16:00:12 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l2HG0BqH070156 for ; Sat, 17 Mar 2007 16:00:11 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l2HG0BfB070155; Sat, 17 Mar 2007 16:00:11 GMT (envelope-from gnats) Resent-Date: Sat, 17 Mar 2007 16:00:11 GMT Resent-Message-Id: <200703171600.l2HG0BfB070155@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Ed Schouten Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EE01416A400 for ; Sat, 17 Mar 2007 15:57:50 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (palm.hoeg.nl [83.98.131.212]) by mx1.freebsd.org (Postfix) with ESMTP id C5F0713C48C for ; Sat, 17 Mar 2007 15:57:49 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 7ED0E1CD1A; Sat, 17 Mar 2007 16:57:48 +0100 (CET) Message-Id: <20070317155748.7ED0E1CD1A@palm.hoeg.nl> Date: Sat, 17 Mar 2007 16:57:48 +0100 (CET) From: Ed Schouten To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/110448: [editors/em] use instead of X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Ed Schouten List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2007 16:00:12 -0000 >Number: 110448 >Category: ports >Synopsis: [editors/em] use instead of >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Mar 17 16:00:11 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Ed Schouten >Release: FreeBSD 6.2-STABLE i386 >Organization: >Environment: System: FreeBSD palm.hoeg.nl 6.2-STABLE FreeBSD 6.2-STABLE #0: Sun Feb 11 22:32:09 CET 2007 root@palm.hoeg.nl:/usr/obj/usr/src/sys/PALM i386 >Description: The editor em has the ability to use sgtty and termio. Teach it how termios works. Now we can use it without COMPAT_43TTY >How-To-Repeat: >Fix: Place the following file in the `files/' directory. --- termio.c Thu May 2 13:52:00 1996 +++ termio.c Sat Mar 17 16:53:22 2007 @@ -41,16 +41,21 @@ int nxtchar = -1; /* character held from type ahead */ #endif +#undef USG +#define USG 1 +#undef BSD +#define BSD 0 + #if USG /* System V */ #include -#include +#include #include int kbdflgs; /* saved keyboard fd flags */ int kbdpoll; /* in O_NDELAY mode */ int kbdqp; /* there is a char in kbdq */ char kbdq; /* char we've already read */ -struct termio otermio; /* original terminal characteristics */ -struct termio ntermio; /* charactoristics to use inside */ +struct termios otermio; /* original terminal characteristics */ +struct termios ntermio; /* charactoristics to use inside */ #if XONXOFF #define XXMASK 0016000 #endif @@ -154,7 +159,7 @@ #endif #if USG - ioctl(0, TCGETA, &otermio); /* save old settings */ + tcgetattr(0, &otermio); /* save old settings */ ntermio.c_iflag = 0; /* setup new settings */ #if XONXOFF ntermio.c_iflag = otermio.c_iflag & XXMASK; /* save XON/XOFF P.K. */ @@ -162,11 +167,10 @@ ntermio.c_oflag = 0; ntermio.c_cflag = otermio.c_cflag; ntermio.c_lflag = 0; - ntermio.c_line = otermio.c_line; ntermio.c_cc[VMIN] = 1; ntermio.c_cc[VTIME] = 0; #if PKCODE - ioctl(0, TCSETAW, &ntermio); /* and activate them */ + tcsetattr(0, TCSANOW, &ntermio); /* and activate them */ #else ioctl(0, TCSETA, &ntermio); /* and activate them */ #endif @@ -244,7 +248,7 @@ #if USG #if PKCODE - ioctl(0, TCSETAW, &otermio); /* restore terminal settings */ + tcsetattr(0, TCSANOW, &otermio); /* and activate them */ #else ioctl(0, TCSETA, &otermio); /* restore terminal settings */ #endif >Release-Note: >Audit-Trail: >Unformatted: