Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Sep 2013 21:41:52 +0900
From:      WATANABE Kazuhiro <CQG00620@nifty.ne.jp>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/182113: [patch] editors/nvi-m17n: Cannot search multibyte characters on FreeBSD/amd64
Message-ID:  <20130915124153.1EFC03BA96@mail1.asahi-net.or.jp>
Resent-Message-ID: <201309151250.r8FCo1co096684@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         182113
>Category:       ports
>Synopsis:       [patch] editors/nvi-m17n: Cannot search multibyte characters on FreeBSD/amd64
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Sep 15 12:50:01 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Watanabe Kazuhiro
>Release:        FreeBSD 9.1-RELEASE-p7 amd64
>Organization:
>Environment:
System: FreeBSD aquarius-vm.sign.local 9.1-RELEASE-p7 FreeBSD 9.1-RELEASE-p7 #6 r255514M: Fri Sep 13 21:37:42 JST 2013 root@aquarius-vm:/FreeBSD/obj/amd64/releng_9.1/FreeBSD/releng_9.1/src/sys/GENERIC amd64
>Description:
On FreeBSD/amd64 nvi-m17n cannot search multibyte characters with {/,?}.
It always says "Pattern not found" for such characters.
ASCII characters are able to search well.

This problem is not occured on FreeBSD/i386.

The same problem has been reported and fixed in the NetBSD pkgsrc-bugs
mailing list in Feb 2010.

http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=42832
>How-To-Repeat:
On FreeBSD/amd64 open Japanese text, and search multibyte (kanji) characters.
>Fix:
diff -urN nvi-m17n.orig/files/patch-regex_regex2.h nvi-m17n/files/patch-regex_regex2.h
--- nvi-m17n.orig/files/patch-regex_regex2.h	1970-01-01 09:00:00.000000000 +0900
+++ nvi-m17n/files/patch-regex_regex2.h	2013-09-10 22:45:23.000000000 +0900
@@ -0,0 +1,13 @@
+--- ../regex/regex2.h.orig	2013-09-08 22:55:58.000000000 +0900
++++ ../regex/regex2.h	2013-09-08 22:57:15.000000000 +0900
+@@ -80,8 +80,8 @@
+ #define	OPRMASK	0xf8000000
+ #define	OPDMASK	0x07ffffff
+ #define	OPSHIFT	((unsigned)27)
+-#define	OP(n)	((n)&OPRMASK)
+-#define	OPND(n)	((n)&OPDMASK)
++#define	OP(n)	((unsigned)((n)&OPRMASK))
++#define	OPND(n)	((unsigned)((n)&OPDMASK))
+ #define	SOP(op, opnd)	((op)|(opnd))
+ /* operators			   meaning	operand			*/
+ /*						(back, fwd are offsets)	*/
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130915124153.1EFC03BA96>