From leeym@utopia.leeym.com  Sat Apr  7 05:56:52 2001
Return-Path: <leeym@utopia.leeym.com>
Received: from utopia.leeym.com (utopia.leeym.com [211.72.162.194])
	by hub.freebsd.org (Postfix) with ESMTP
	id BC9A937B424; Sat,  7 Apr 2001 05:56:49 -0700 (PDT)
	(envelope-from leeym@utopia.leeym.com)
Received: (from leeym@localhost)
	by utopia.leeym.com (8.11.3/8.11.3) id f37Cujj15434;
	Sat, 7 Apr 2001 20:56:45 +0800 (CST)
	(envelope-from leeym)
Message-Id: <200104071256.f37Cujj15434@utopia.leeym.com>
Date: Sat, 7 Apr 2001 20:56:45 +0800 (CST)
From: leeym@bsd.ce.ntu.edu.tw
Reply-To: leeym@bsd.ce.ntu.edu.tw
To: FreeBSD-gnats-submit@freebsd.org
Cc: clive@freebsd.org
Subject: update port: chinese/tin: minor fix
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         26402
>Category:       ports
>Synopsis:       update port: chinese/tin: minor fix
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    clive
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Apr 07 06:00:12 PDT 2001
>Closed-Date:    Sun Apr 8 10:01:51 PDT 2001
>Last-Modified:  Sun Apr 08 10:05:51 PDT 2001
>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:
Responsible-Changed-From-To: freebsd-ports->clive 
Responsible-Changed-By: clive 
Responsible-Changed-When: Sat Apr 7 12:21:54 PDT 2001 
Responsible-Changed-Why:  
I will handle this. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=26402 
State-Changed-From-To: open->closed 
State-Changed-By: clive 
State-Changed-When: Sun Apr 8 10:01:51 PDT 2001 
State-Changed-Why:  
Committed, thanks. 

For further audit trial: 

o Unless we have wchar and, well, Citrus Project, imported, there's            
no clean way, Good Thing (tm), we can do in this case.                       


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