From owner-svn-src-stable@FreeBSD.ORG Fri Aug 15 19:07:00 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 87F768F7; Fri, 15 Aug 2014 19:07:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 727512C79; Fri, 15 Aug 2014 19:07:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7FJ70pI031747; Fri, 15 Aug 2014 19:07:00 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7FJ6xlE031737; Fri, 15 Aug 2014 19:06:59 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201408151906.s7FJ6xlE031737@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 15 Aug 2014 19:06:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270026 - in stable/10/contrib/nvi: cl common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Aug 2014 19:07:00 -0000 Author: emaste Date: Fri Aug 15 19:06:59 2014 New Revision: 270026 URL: http://svnweb.freebsd.org/changeset/base/270026 Log: MFC r259088: Vendor import nvi-2.1.2-c80f493b038 a multikey mapping fix PR: bin/182463 Modified: stable/10/contrib/nvi/cl/cl_term.c stable/10/contrib/nvi/common/key.c stable/10/contrib/nvi/common/key.h Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/nvi/cl/cl_term.c ============================================================================== --- stable/10/contrib/nvi/cl/cl_term.c Fri Aug 15 16:08:52 2014 (r270025) +++ stable/10/contrib/nvi/cl/cl_term.c Fri Aug 15 19:06:59 2014 (r270026) @@ -10,7 +10,7 @@ #include "config.h" #ifndef lint -static const char sccsid[] = "$Id: cl_term.c,v 10.33 2012/04/21 23:51:46 zy Exp $"; +static const char sccsid[] = "$Id: cl_term.c,v 10.34 2013/12/07 16:21:14 wjenkner Exp $"; #endif /* not lint */ #include @@ -187,14 +187,18 @@ cl_term_init(SCR *sp) int cl_term_end(GS *gp) { - SEQ *qp, *nqp; + SEQ *qp, *nqp, *pre_qp = NULL; /* Delete screen specific mappings. */ SLIST_FOREACH_SAFE(qp, gp->seqq, q, nqp) if (F_ISSET(qp, SEQ_SCREEN)) { - SLIST_REMOVE_HEAD(gp->seqq, q); + if (qp == SLIST_FIRST(gp->seqq)) + SLIST_REMOVE_HEAD(gp->seqq, q); + else + SLIST_REMOVE_AFTER(pre_qp, q); (void)seq_free(qp); - } + } else + pre_qp = qp; return (0); } Modified: stable/10/contrib/nvi/common/key.c ============================================================================== --- stable/10/contrib/nvi/common/key.c Fri Aug 15 16:08:52 2014 (r270025) +++ stable/10/contrib/nvi/common/key.c Fri Aug 15 19:06:59 2014 (r270026) @@ -10,7 +10,7 @@ #include "config.h" #ifndef lint -static const char sccsid[] = "$Id: key.c,v 10.53 2013/03/11 01:20:53 yamt Exp $"; +static const char sccsid[] = "$Id: key.c,v 10.54 2013/11/13 12:15:27 zy Exp $"; #endif /* not lint */ #include @@ -272,7 +272,7 @@ v_key_name( * The code prints non-printable wide characters in 4 or 5 digits * Unicode escape sequences, so only supports plane 0 to 15. */ - if (ISPRINT(ach)) + if (CAN_PRINT(sp, ach)) goto done; nopr: if (iscntrl(ch) && (ch < 0x20 || ch == 0x7f)) { sp->cname[0] = '^'; Modified: stable/10/contrib/nvi/common/key.h ============================================================================== --- stable/10/contrib/nvi/common/key.h Fri Aug 15 16:08:52 2014 (r270025) +++ stable/10/contrib/nvi/common/key.h Fri Aug 15 19:06:59 2014 (r270026) @@ -6,7 +6,7 @@ * * See the LICENSE file for redistribution information. * - * $Id: key.h,v 10.55 2012/10/07 01:31:17 zy Exp $ + * $Id: key.h,v 10.56 2013/11/13 12:15:27 zy Exp $ */ #include "multibyte.h" @@ -23,8 +23,9 @@ #define INPUT2INT5(sp,cw,n,nlen,w,wlen) \ sp->conv.input2int(sp, n, nlen, &(cw), &wlen, &w) #define CONST +#define INTISWIDE(c) (wctob(c) == EOF) #define CHAR_WIDTH(sp, ch) wcwidth(ch) -#define INTISWIDE(c) (wctob(c) == EOF) +#define CAN_PRINT(sp, ch) (CHAR_WIDTH(sp, ch) > 0) #else #define FILE2INT5(sp,buf,n,nlen,w,wlen) \ (w = n, wlen = nlen, 0) @@ -36,9 +37,10 @@ (n = w, nlen = wlen, 0) #define INPUT2INT5(sp,buf,n,nlen,w,wlen) \ (w = n, wlen = nlen, 0) -#define CONST const -#define INTISWIDE(c) 0 +#define CONST const +#define INTISWIDE(c) 0 #define CHAR_WIDTH(sp, ch) 1 +#define CAN_PRINT(sp, ch) isprint(ch) #endif #define FILE2INT(sp,n,nlen,w,wlen) \ FILE2INT5(sp,sp->cw,n,nlen,w,wlen)