From kcwu@kcwu.homeip.net  Wed Oct 13 08:32:28 2004
Return-Path: <kcwu@kcwu.homeip.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP
	id 83F3816A4D3; Wed, 13 Oct 2004 08:32:26 +0000 (GMT)
Received: from mail2out.giga.net.tw (mail2out.giga.net.tw [203.133.1.41])
	by mx1.FreeBSD.org (Postfix) with ESMTP
	id DA34E43D2D; Wed, 13 Oct 2004 08:32:25 +0000 (GMT)
	(envelope-from kcwu@kcwu.homeip.net)
Received: from kcwu.homeip.net (61-70-142-187.adsl.static.giga.net.tw [61.70.142.187])
	by mail2out.giga.net.tw (Postfix) with ESMTP
	id 9B0EA136E4; Wed, 13 Oct 2004 16:32:24 +0800 (CST)
Received: from kcwu.homeip.net (kc@kcwu.homeip.net [127.0.0.1])
	by kcwu.homeip.net (8.13.1/8.13.1) with ESMTP id i9D8Wejb030548;
	Wed, 13 Oct 2004 16:32:40 +0800 (CST)
	(envelope-from kcwu@kcwu.homeip.net)
Received: (from kcwu@localhost)
	by kcwu.homeip.net (8.13.1/8.13.1/Submit) id i9D8WaoK030547;
	Wed, 13 Oct 2004 16:32:36 +0800 (CST)
	(envelope-from kcwu)
Message-Id: <200410130832.i9D8WaoK030547@kcwu.homeip.net>
Date: Wed, 13 Oct 2004 16:32:36 +0800 (CST)
From: Kuang-che Wu <kcwu@csie.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc: thierry@freebsd.org
Subject: [PATCH] x11/rxvt-unicode: multibyte related patches
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         72628
>Category:       ports
>Synopsis:       [PATCH] x11/rxvt-unicode: multibyte related patches
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    thierry
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Oct 13 08:40:21 GMT 2004
>Closed-Date:    Wed Oct 13 21:29:41 GMT 2004
>Last-Modified:  Wed Oct 13 21:29:41 GMT 2004
>Originator:     Kuang-che Wu
>Release:        FreeBSD 6.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD kcwu.homeip.net 6.0-CURRENT FreeBSD 6.0-CURRENT #0: Sat Sep  4 05:33:38 CST
>Description:
- rxvt-unicode 4.0 change language name "cn" to "zh"
- provide mbrtowc() workaround for old FreeBSD systems without mbstate fix
- extra patch for box drawing characters, which respected locale width data

Added file(s):
- files/patch-mbrtowcfix
- files/patch-src::rxvtfont.C

Port maintainer (thierry@FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.63
>How-To-Repeat:
>Fix:

--- rxvt-unicode-4.0.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/x11/rxvt-unicode/Makefile /files/home/kcwu/work/ports/x/x11/rxvt-unicode/Makefile
--- /usr/ports/x11/rxvt-unicode/Makefile	Wed Oct 13 13:36:05 2004
+++ /files/home/kcwu/work/ports/x/x11/rxvt-unicode/Makefile	Wed Oct 13 16:28:30 2004
@@ -123,7 +123,7 @@
 
 # compile in support for additional codeset groups
 .if defined(WITH_ENCODING)
-AVAIL_ENC=	jp jp_ext kr cn cn_ext all
+AVAIL_ENC=	jp jp_ext kr zh zh_ext all
 . for ENC in ${AVAIL_ENC}
 .  if (${WITH_ENCODING} == ${ENC})
 _ENC=		${ENC}
@@ -163,8 +163,8 @@
 	@${ECHO_MSG} '==> Options are: "jp"     common japanese encodings;'
 	@${ECHO_MSG} '                 "jp_ext" rarely used but big japanese encodings;'
 	@${ECHO_MSG} '                 "kr"     korean encodings;'
-	@${ECHO_MSG} '                 "cn"     common chinese encodings;'
-	@${ECHO_MSG} '                 "cn_ext" rarely used but very big chinese encodigs;'
+	@${ECHO_MSG} '                 "zh"     common chinese encodings;'
+	@${ECHO_MSG} '                 "zh_ext" rarely used but very big chinese encodigs;'
 	@${ECHO_MSG} '                 "all"    all of the above;'
 	@${ECHO_MSG} '==> For example, "WITH_ENCODING=kr" for korean encodings.'
 	@${ECHO_MSG}
diff -ruN --exclude=CVS /usr/ports/x11/rxvt-unicode/files/patch-mbrtowcfix /files/home/kcwu/work/ports/x/x11/rxvt-unicode/files/patch-mbrtowcfix
--- /usr/ports/x11/rxvt-unicode/files/patch-mbrtowcfix	Thu Jan  1 08:00:00 1970
+++ /files/home/kcwu/work/ports/x/x11/rxvt-unicode/files/patch-mbrtowcfix	Sat Sep 11 06:03:40 2004
@@ -0,0 +1,17 @@
+--- src/command.C.orig	Sat Sep 11 06:00:56 2004
++++ src/command.C	Sat Sep 11 06:03:38 2004
+@@ -1,3 +1,4 @@
++#include <sys/param.h>
+ /*--------------------------------*-C-*---------------------------------*
+  * File:	command.C
+  *----------------------------------------------------------------------*
+@@ -2697,7 +2698,9 @@
+       if (len == (size_t)-2)
+         {
+           // the mbstate stores incomplete sequences. didn't know this :/
++#if __FreeBSD_version>502110
+           cmdbuf_ptr = cmdbuf_endp;
++#endif
+           break;
+         }
+ 
diff -ruN --exclude=CVS /usr/ports/x11/rxvt-unicode/files/patch-src::rxvtfont.C /files/home/kcwu/work/ports/x/x11/rxvt-unicode/files/patch-src::rxvtfont.C
--- /usr/ports/x11/rxvt-unicode/files/patch-src::rxvtfont.C	Thu Jan  1 08:00:00 1970
+++ /files/home/kcwu/work/ports/x/x11/rxvt-unicode/files/patch-src::rxvtfont.C	Wed Oct 13 16:09:17 2004
@@ -0,0 +1,11 @@
+--- src/rxvtfont.C.orig	Wed Sep  8 13:44:38 2004
++++ src/rxvtfont.C	Sun Oct  3 03:07:41 2004
+@@ -345,7 +345,7 @@
+           uint32_t *a = linedraw_command + (offs >> 4);
+           uint32_t *b = a + (offs & 15);
+ 
+-          int W = r->TermWin.fwidth;
++          int W = r->TermWin.fwidth * wcwidth(t);
+           int H = r->TermWin.fheight;
+ 
+           int x_[16];
--- rxvt-unicode-4.0.patch ends here ---

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->thierry 
Responsible-Changed-By: sergei 
Responsible-Changed-When: Wed Oct 13 09:40:25 GMT 2004 
Responsible-Changed-Why:  
Over to maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=72628 
State-Changed-From-To: open->closed 
State-Changed-By: thierry 
State-Changed-When: Wed Oct 13 21:28:13 GMT 2004 
State-Changed-Why:  

Committed, thanks! 

Remark: these patches are interesting, and it would be fine 
to submit them to the author. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=72628 
>Unformatted:
