Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Apr 2001 20:56:45 +0800 (CST)
From:      leeym@bsd.ce.ntu.edu.tw
To:        FreeBSD-gnats-submit@freebsd.org
Cc:        clive@freebsd.org
Subject:   ports/26402: update port: chinese/tin: minor fix
Message-ID:  <200104071256.f37Cujj15434@utopia.leeym.com>

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

>Number:         26402
>Category:       ports
>Synopsis:       update port: chinese/tin: minor fix
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Apr 07 06:00:12 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Yen-Ming Lee
>Release:        FreeBSD 4.3-RC i386
>Organization:
>Environment:
System: FreeBSD utopia.leeym.com 4.3-RC FreeBSD 4.3-RC #1: Sat Apr 7 03:42:12 CST 2001 root@utopia.leeym.com:/home/system/obj/usr/src/sys/UTOPIA i386

	
>Description:

"my_isprint() always return 1" will cause zh-tin unable to handle input data.

It's big5 encoding range:
  Big5
    /([\xa1-\xf9](?:[\x40-\x7e]|[\xa1-\xfe]))/
  Big5+
    /([\x81-\xfe](?:[\x40-\x7e]|[\x80-\xfe]))/

>How-To-Repeat:

1. install zh-tin
2. tin -r
3. press "/" to search any newsgroup
4. zh-tin halt for waiting input

>Fix:

diff -ruN /usr/ports/chinese/tin/files/patch-misc.c tin/files/patch-misc.c
--- /usr/ports/chinese/tin/files/patch-misc.c	Fri Dec  8 00:37:52 2000
+++ tin/files/patch-misc.c	Sat Apr  7 20:35:32 2001
@@ -4,7 +4,7 @@
  my_isprint (
  	int c)
  {
-+	return 1;
++	return (isprint(c) || (c>=0x40 && c<=0xfe));
  #ifndef NO_LOCALE
  	/* use locale */
  	return isprint(c);
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




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