From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 8 06:16:51 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0F43106564A for ; Thu, 8 Dec 2011 06:16:51 +0000 (UTC) (envelope-from lichray@gmail.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id 65A698FC13 for ; Thu, 8 Dec 2011 06:16:50 +0000 (UTC) Received: by eaai12 with SMTP id i12so1282205eaa.13 for ; Wed, 07 Dec 2011 22:16:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=MrWeZ0Gvez9nn6wvnHS181EAai/f7bbQrtLD2kZ0WLc=; b=n85eXr9XP8oMY3aACaChbYRJejGcCAWilSaYayi75ublZ9woIJLkYwlLThestlWxql rZUin+NveHORpZzOj788R1vBU4cYvcF2xnBPaDKAGkrUV1qkAhfmA/BkBTHI7VBqXmaT nRluaTCzLh0xXV81ZGAyisFGkIk66A/qkchYU= MIME-Version: 1.0 Received: by 10.213.21.148 with SMTP id j20mr65919ebb.87.1323325009814; Wed, 07 Dec 2011 22:16:49 -0800 (PST) Received: by 10.14.47.194 with HTTP; Wed, 7 Dec 2011 22:16:49 -0800 (PST) In-Reply-To: References: <868vqt0xuc.fsf@gmail.com> <1313663436600-4711635.post@n5.nabble.com> <86hb5euofp.fsf@gmail.com> <20110823175133.GK18091@acme.spoerlein.net> Date: Thu, 8 Dec 2011 00:16:49 -0600 Message-ID: From: Zhihao Yuan To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=UTF-8 Subject: Re: [nvi-iconv]Call for test X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Dec 2011 06:16:51 -0000 Hi, I uploaded a new version, 2.0.2. http://students.cs.niu.edu/~z1565938/distfiles/nvi2-freebsd-2011-12-07.diff.gz Same as before, you need to remove usr.bin/vi/port.h after you applied this patch. In this version, I analyzed all of the PRs, patches/commits of Debian's nvi package and NetBSD's nvi-1.81.6b5 in base. Many bug fixes are merged. And 2 main features are gained: 1. Recognized non-ASCII letters' upper/lower cases (~); 2. Recognized non-ASCII word boundary (w, ^A, regex, etc.). Btw, vim don't have such features. I also solved all memory leak in all know tests. iconv_open(3) usage part is rewrote. 2 changes from NetBSD are not merged: 1. To use signed char instead of unsigned char in 8-bit mode. This requires to cast all character to at least unsigned char when passing them to ctype(3). Test cases are required to convince me on this part; 2. 32-bit clean regex. According to the PRs and commit log, I don't have enough confidence in NetBSD's code here. Although the current regex in use is only 24-bit clean, but it works correctly and, my final solution is to use TRE in base directly. Comments and test reports are welcome. -- Zhihao Yuan, nickname lichray The best way to predict the future is to invent it. ___________________________________________________ 4BSD -- http://4bsd.biz/