ports/182113: [patch] editors/nvi-m17n: Cannot search multibyte characters on FreeBSD/amd64

WATANABE Kazuhiro CQG00620 at nifty.ne.jp
Sun Sep 15 12:50:02 UTC 2013


>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 at 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:


More information about the freebsd-ports-bugs mailing list