Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Aug 2016 15:54:55 +1000
From:      Kubilay Kocak <koobs@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org, FreeBSD Ports Security Team <ports-secteam@freebsd.org>
Subject:   Re: svn commit: r419609 - in head/sysutils/tmux: . files
Message-ID:  <c344317a-6bd0-634a-9692-e0cfae00d6d6@FreeBSD.org>
In-Reply-To: <201608041319.u74DJYlN032743@repo.freebsd.org>
References:  <201608041319.u74DJYlN032743@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 4/08/2016 11:19 PM, Mathieu Arnold wrote:
> Author: mat
> Date: Thu Aug  4 13:19:34 2016
> New Revision: 419609
> URL: https://svnweb.freebsd.org/changeset/ports/419609
> 
> Log:
>   Fix some Unicode characters not displaying correctly.
>   
>   PR:		211499
>   Submitted by:	Oleg Gushchenkov
>   Obtained from:	https://github.com/tmux/tmux/commit/65e4c57d3a554940ed5cada6dfeff403ae8d9572
>   Sponsored by:	Absolight

@ports-secteam, can you MFH this bugfix if possible please, I'm sure
quarterly users will want and appreciate it.

> Added:
>   head/sysutils/tmux/files/patch-utf8.c   (contents, props changed)
> Modified:
>   head/sysutils/tmux/Makefile   (contents, props changed)
> 
> Modified: head/sysutils/tmux/Makefile
> ==============================================================================
> --- head/sysutils/tmux/Makefile	Thu Aug  4 12:53:33 2016	(r419608)
> +++ head/sysutils/tmux/Makefile	Thu Aug  4 13:19:34 2016	(r419609)
> @@ -3,6 +3,7 @@
>  
>  PORTNAME=	tmux
>  PORTVERSION=	2.2
> +PORTREVISION=	1
>  CATEGORIES=	sysutils
>  MASTER_SITES=	https://github.com/tmux/tmux/releases/download/${PORTVERSION}/
>  DISTFILES=	${DISTNAME}${EXTRACT_SUFX}
> 
> Added: head/sysutils/tmux/files/patch-utf8.c
> ==============================================================================
> --- /dev/null	00:00:00 1970	(empty, because file is newly added)
> +++ head/sysutils/tmux/files/patch-utf8.c	Thu Aug  4 13:19:34 2016	(r419609)
> @@ -0,0 +1,34 @@
> +commit 65e4c57d3a554940ed5cada6dfeff403ae8d9572
> +Author: Nicholas Marriott <nicholas.marriott@gmail.com>
> +Date:   2016-04-29 12:47:15 +0100
> +
> +    Only assume width 1 when wcwidth() returns -1 on non-OpenBSD platforms.
> +
> +--- utf8.c.orig	2016-03-02 18:29:06 UTC
> ++++ utf8.c
> +@@ -115,8 +115,24 @@ utf8_width(wchar_t wc)
> + 	int	width;
> + 
> + 	width = wcwidth(wc);
> +-	if (width < 0 || width > 0xff)
> ++	if (width < 0 || width > 0xff) {
> ++		log_debug("Unicode %04x, wcwidth() %d", wc, width);
> ++
> ++#ifndef __OpenBSD__
> ++		/*
> ++		 * Many platforms (particularly and inevitably OS X) have no
> ++		 * width for relatively common characters (wcwidth() returns
> ++		 * -1); assume width 1 in this case. This will be wrong for
> ++		 * genuinely nonprintable characters, but they should be
> ++		 * rare. We may pass through stuff that ideally we would block,
> ++		 * but this is no worse than sending the same to the terminal
> ++		 * without tmux.
> ++		 */
> ++		if (width < 0)
> ++			return (1);
> ++#endif
> + 		return (-1);
> ++	}
> + 	return (width);
> + }
> + 
> 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c344317a-6bd0-634a-9692-e0cfae00d6d6>