From owner-freebsd-ports Thu Jul 18 13: 0:22 2002 Delivered-To: freebsd-ports@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CA1C637B400 for ; Thu, 18 Jul 2002 13:00:06 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1D6C043E4A for ; Thu, 18 Jul 2002 13:00:06 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g6IK05JU055222 for ; Thu, 18 Jul 2002 13:00:05 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g6IK05fY055219; Thu, 18 Jul 2002 13:00:05 -0700 (PDT) Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 52B8337B400 for ; Thu, 18 Jul 2002 12:52:41 -0700 (PDT) Received: from kcwu.dyndns.org (u142-187.u61-70.giga.net.tw [61.70.142.187]) by mx1.FreeBSD.org (Postfix) with ESMTP id BA88F43E58 for ; Thu, 18 Jul 2002 12:52:39 -0700 (PDT) (envelope-from kcwu@kcwu.dyndns.org) Received: (from kcwu@localhost) by kcwu.dyndns.org (8.11.6/8.11.5) id g6IJqWd36138; Fri, 19 Jul 2002 03:52:32 +0800 (CST) (envelope-from kcwu) Message-Id: <200207181952.g6IJqWd36138@kcwu.dyndns.org> Date: Fri, 19 Jul 2002 03:52:32 +0800 (CST) From: Kuang-che Wu Reply-To: Kuang-che Wu To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: ports/40741: New port: chinese/dictd Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 40741 >Category: ports >Synopsis: New port: chinese/dictd >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Jul 18 13:00:05 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Kuang-che Wu >Release: FreeBSD 5.0-CURRENT i386 >Organization: >Environment: System: FreeBSD m722 5.0-CURRENT FreeBSD 5.0-CURRENT #2: Sat Apr 6 14:30:47 CST 2002 root@m722:/usr/obj/usr/src/sys/M722 i386 >Description: big5-encoding fixed version of net/dictd So, with chinese/dictd-database, you can play it like $ dict '¥\¯à' >How-To-Repeat: >Fix: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # dictd # dictd/Makefile # dictd/files # dictd/files/patch-index.c # dictd/files/patch-libmaa::arg.c # echo c - dictd mkdir -p dictd > /dev/null 2>&1 echo x - dictd/Makefile sed 's/^X//' >dictd/Makefile << 'END-of-dictd/Makefile' X# New ports collection makefile for: dictd X# Date created: 19 July 2002 X# Whom: Kuang-che Wu X# X# $FreeBSD$ X# X XCATEGORIES= chinese X XMAINTAINER= kcwu@ck.tp.edu.tw X XMASTERDIR= ${.CURDIR}/../../net/dictd XEXTRA_PATCHES= ${.CURDIR}/files/patch-index.c \ X ${.CURDIR}/files/patch-libmaa::arg.c X X.include "${MASTERDIR}/Makefile" X XPKGNAMEPREFIX:= ${PKGNAMEPREFIX}tw- END-of-dictd/Makefile echo c - dictd/files mkdir -p dictd/files > /dev/null 2>&1 echo x - dictd/files/patch-index.c sed 's/^X//' >dictd/files/patch-index.c << 'END-of-dictd/files/patch-index.c' X--- index.c.orig Wed Jul 17 04:15:35 2002 X+++ index.c Wed Jul 17 04:47:19 2002 X@@ -120,6 +120,15 @@ X X /* FIXME. Optimize this inner loop. */ X while (*word && start < end && *start != '\t') { X+ if ((*start & 0x80) && start+1index)) \ X && !compare(buf, pt, database->index->end)) { \ X@@ -724,6 +738,11 @@ X if (isspace( *(const unsigned char *)w )) { X *pt++ = ' '; X } else { X+ if((*w & 0x80) && *(w+1)) { X+ *pt++=*w++; X+ *pt++=*w; X+ continue; X+ } X if (!isalnum( *(const unsigned char *)w )) continue; X *pt++ = tolower(*w); X } END-of-dictd/files/patch-index.c echo x - dictd/files/patch-libmaa::arg.c sed 's/^X//' >dictd/files/patch-libmaa::arg.c << 'END-of-dictd/files/patch-libmaa::arg.c' X--- libmaa/arg.c.orig Wed Jul 17 05:21:04 2002 X+++ libmaa/arg.c Wed Jul 17 05:13:50 2002 X@@ -216,6 +216,9 @@ X ++pt; X X for (last = pt, len = 0; *pt; ++pt, ++len) { X+ if((*pt & 0x80) && pt[1]) { X+ ++pt, ++len; X+ } else X switch (*pt) { X case ' ': X case '\t': END-of-dictd/files/patch-libmaa::arg.c exit >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message