", 3)) { /* タグ発見! */
+ fwrite(&i, 1, sizeof(long), ofd);
+ jj++;
+ sdic_tagin = 1;
+ i = i + 3 - 1;
+ last_char_is_delimitter = 1;
+ } else if (!strncmp(text + i, "", 4)) {
+ sdic_tagin = 0;
+ } else if (sdic_tagin == 1) { /* の中では */
+ if ((char *) strchr(delimitter, text[i]) != NULL &&
+ text[i] != '\0') {
+ last_char_is_delimitter = 1;
+ } else if (!strncmp(text + i, "&", 5)) { /* &<>を読み飛ばす */
+ fwrite(&i, 1, sizeof(long), ofd);
+ jj++;
+ i = i + 5 - 1;
+ last_char_is_delimitter = 1;
+ } else if (!strncmp(text + i, "<", 4)) {
+ fwrite(&i, 1, sizeof(long), ofd);
+ jj++;
+ i = i + 4 - 1;
+ last_char_is_delimitter = 1;
+ } else if (!strncmp(text + i, ">", 4)) {
+ fwrite(&i, 1, sizeof(long), ofd);
+ jj++;
+ i = i + 4 - 1;
+ last_char_is_delimitter = 1;
+ } else if (last_char_is_delimitter == 1){
+ /* EUC漢字の2char目 */
+ if (bit_8_mode == MODE_ON && (0x80 & text[i]) != 0x00
+ && last_char_is_kanji == 1) {
+ last_char_is_kanji = 0;
+ } else {
+ fwrite(&i, 1, sizeof(long), ofd);
+ jj++;
+ if ((0x80 & text[i]) != 0x00)
+ last_char_is_kanji = 1;
+ }
+ if (option_byline == MODE_ON) {
+ last_char_is_delimitter = 0;
+ } else { /* 文字単位 */
+ last_char_is_delimitter = 1;
+ }
+ }
+ }
+ if (quiet_mode == MODE_ON || i == 0)
+ continue;
+ if (!(i % 50000)) /* このままじゃちゃんと数えないじゃん */
+ fprintf(stderr, "+");
+ if (!(i % 1000000))
+ fprintf(stderr, " %ldM\n", i / 1000000);
+ }
} else { /* 文字毎にインデックスを作る */
for(i = 0; i < N; i++){
/*printf("i %d %d\n",i,last_char_is_kanji);fflush(stdout);*/
@@ -479,7 +542,7 @@
void usage(void){
fprintf(stderr, "\n"
"mkary --- array ファイルを作成する\n\n"
- "Version 1.7 990616\n\n"
+ "Version 1.7 990616 + SDICpatch\n\n"
"USAGE\n"
" mkary [ -l [-#] ] [ -w ] [ -c ] [ -q ] [ -ns ] [ -so ] [ -8 ]\n"
" [ -J ] [ -m ] [ -b NUM ] [ -o FILE_NAME ] FILE_NAME\n"
@@ -492,6 +555,7 @@
" -q : メッセージなし\n"
" -ns : ソートしない(No Sort)\n"
" -so : ソートだけす(Sort Only)る\n"
+ " -sd : SDICモード\n"
" -8 : 2バイト一文字処理を行なわない\n"
" -J : 日本語文字と '<' 以外は無視する(文字単位のとき)\n"
" -# : #で始まる行はコメントアウト(行単位のとき)\n"
------------------------------------------------------------------------------
--
Tokyo Metropolitan University Kiwamu Okabe
Mail: kiwamu@debian.or.jp
URL: http://silica.eei.metro-u.ac.jp/~kiwamu/
Acknowledgement sent to kiwamu <kiwamu@debian.or.jp>:
New Bug report received and forwarded. Copy sent to Takao KAWAMURA <kawamura@debian.org>.
Your message did not contain a Subject field. This is broken, I am
afraid - the Subject: line is a Required Header according to RFC822.
Please remember to include a Subject field in your messages in future.
If you did so the fact that it got lost probably indicates a poorly
configured mail system at your site or an intervening one.
-t
From: owner@bugs.debian.org (Debian Bug Tracking System)
To: kiwamu
Subject: Bug#64028: Acknowledgement ((no subject))
Message-ID:
In-Reply-To:
References:
X-Debian-PR-Message: ack 64028
Thank you for the problem report you have sent regarding Debian.
This is an automatically generated reply, to let you know your message has
been received. It is being forwarded to the developers mailing list for
their attention; they will reply in due course.
Your message has been sent to the package maintainer(s):
Takao KAWAMURA
If you wish to submit further information on your problem, please send
it to 64028@bugs.debian.org (and *not* to
bugs@bugs.debian.org).
Please do not reply to the address at the top of this message,
unless you wish to report a problem with the Bug-tracking system.
Your message did not contain a Subject field. This is broken, I am
afraid - the Subject: line is a Required Header according to RFC822.
Please remember to include a Subject field in your messages in future.
If you did so the fact that it got lost probably indicates a poorly
configured mail system at your site or an intervening one.
Darren Benham
(administrator, Debian Bugs database)
Received: (at submit) by bugs.debian.org; 12 May 2000 14:45:02 +0000
From kiwamu@misterdosv.eei.metro-u.ac.jp Fri May 12 09:45:01 2000
Received: from misterdosv.eei.metro-u.ac.jp [133.86.34.143]
by master.debian.org with esmtp (Exim 3.12 #2 (Debian))
id 12qGgX-0005bD-00; Fri, 12 May 2000 09:45:01 -0500
Received: from kiwamu by misterdosv.eei.metro-u.ac.jp with local (Exim 3.12 #1 (Debian))
id 12qGg1-0000V9-00
for ; Fri, 12 May 2000 23:44:29 +0900
Date: Fri, 12 May 2000 23:44:29 +0900
From: kiwamu
To: submit@bugs.debian.org
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit
X-Mailer: Mutt 0.95.4i-jp2
Message-Id:
Sender: Kiwamu Okabe
Delivered-To: submit@bugs.debian.org
Package: sufary
Version: 2.1b3-4
Severity: wishlist
Please apply this patch for the optimized SDIC array.
See also .
------------------------------------------------------------------------------
--- sufary-2.1b3.orig/mkary/mkary.c
+++ sufary-2.1b3/mkary/mkary.c
@@ -55,6 +55,8 @@
int dict_mode = MODE_OFF;
int j_mode = MODE_OFF; /* 日本語と'<'にしかインデックス張らんモード 981115 */
int bunkatu_sort_mode = MODE_OFF; /* 990219 */
+int sdic_mode = MODE_OFF; /* for SDIC */
+int sdic_tagin = 0; /* for SDIC */
int number_of_block; /* 990219 分割ブロック数 */
@@ -179,6 +181,10 @@
break;
case 's': /* -so ソートしかしないモード */
if(argv[1][2] == 'o') sort_only_mode = MODE_ON;
+ if (argv[1][2] == 'd') { /* for SDIC */
+ sdic_mode = MODE_ON;
+ /* デミリタの後にしかインデックスを作らない */
+ }
break;
case '#': /* #で始まる行はコメントアウト */
comment_out_mode = MODE_ON;
@@ -325,7 +331,7 @@
if(!(i % 50000)) fprintf(stderr,"+");
if(!(i % 1000000)) fprintf(stderr," %ldM\n",i/1000000);
}
- } else if(option_byline == MODE_ON){ /* 一行、一語毎にインデックスを作る */
+ } else if(option_byline == MODE_ON && sdic_mode == MODE_OFF){ /* 一行、一語毎にインデックスを作る */
for(i = 0; i < N; i++){
if((char*)strchr(delimitter, text[i]) != NULL && text[i] != '\0')
last_char_is_delimitter = 1;
@@ -343,6 +349,63 @@
if(!(i % 50000)) fprintf(stderr,"+");
if(!(i % 1000000)) fprintf(stderr," %ldM\n",i/1000000);
}
+ } else if (sdic_mode == MODE_ON) { /* SDICモード */
+ /* の中にいるときsdic_taginが1
+ * の中にだけインデックスを作る */
+ fprintf(stderr, "SDIC MODE\n");
+ for (i = 0; i < N; i++) {
+ if (!strncmp(text + i, "", 3)) { /* タグ発見! */
+ fwrite(&i, 1, sizeof(long), ofd);
+ jj++;
+ sdic_tagin = 1;
+ i = i + 3 - 1;
+ last_char_is_delimitter = 1;
+ } else if (!strncmp(text + i, "", 4)) {
+ sdic_tagin = 0;
+ } else if (sdic_tagin == 1) { /* の中では */
+ if ((char *) strchr(delimitter, text[i]) != NULL &&
+ text[i] != '\0') {
+ last_char_is_delimitter = 1;
+ } else if (!strncmp(text + i, "&", 5)) { /* &<>を読み飛ばす */
+ fwrite(&i, 1, sizeof(long), ofd);
+ jj++;
+ i = i + 5 - 1;
+ last_char_is_delimitter = 1;
+ } else if (!strncmp(text + i, "<", 4)) {
+ fwrite(&i, 1, sizeof(long), ofd);
+ jj++;
+ i = i + 4 - 1;
+ last_char_is_delimitter = 1;
+ } else if (!strncmp(text + i, ">", 4)) {
+ fwrite(&i, 1, sizeof(long), ofd);
+ jj++;
+ i = i + 4 - 1;
+ last_char_is_delimitter = 1;
+ } else if (last_char_is_delimitter == 1){
+ /* EUC漢字の2char目 */
+ if (bit_8_mode == MODE_ON && (0x80 & text[i]) != 0x00
+ && last_char_is_kanji == 1) {
+ last_char_is_kanji = 0;
+ } else {
+ fwrite(&i, 1, sizeof(long), ofd);
+ jj++;
+ if ((0x80 & text[i]) != 0x00)
+ last_char_is_kanji = 1;
+ }
+ if (option_byline == MODE_ON) {
+ last_char_is_delimitter = 0;
+ } else { /* 文字単位 */
+ last_char_is_delimitter = 1;
+ }
+ }
+ }
+ if (quiet_mode == MODE_ON || i == 0)
+ continue;
+ if (!(i % 50000)) /* このままじゃちゃんと数えないじゃん */
+ fprintf(stderr, "+");
+ if (!(i % 1000000))
+ fprintf(stderr, " %ldM\n", i / 1000000);
+ }
} else { /* 文字毎にインデックスを作る */
for(i = 0; i < N; i++){
/*printf("i %d %d\n",i,last_char_is_kanji);fflush(stdout);*/
@@ -479,7 +542,7 @@
void usage(void){
fprintf(stderr, "\n"
"mkary --- array ファイルを作成する\n\n"
- "Version 1.7 990616\n\n"
+ "Version 1.7 990616 + SDICpatch\n\n"
"USAGE\n"
" mkary [ -l [-#] ] [ -w ] [ -c ] [ -q ] [ -ns ] [ -so ] [ -8 ]\n"
" [ -J ] [ -m ] [ -b NUM ] [ -o FILE_NAME ] FILE_NAME\n"
@@ -492,6 +555,7 @@
" -q : メッセージなし\n"
" -ns : ソートしない(No Sort)\n"
" -so : ソートだけす(Sort Only)る\n"
+ " -sd : SDICモード\n"
" -8 : 2バイト一文字処理を行なわない\n"
" -J : 日本語文字と '<' 以外は無視する(文字単位のとき)\n"
" -# : #で始まる行はコメントアウト(行単位のとき)\n"
------------------------------------------------------------------------------
--
Tokyo Metropolitan University Kiwamu Okabe
Mail: kiwamu@debian.or.jp
URL: http://silica.eei.metro-u.ac.jp/~kiwamu/
Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#64028; Package sufary.
debian-bugs-dist@lists.debian.org
Subject: Bug#64028: no subject)
Reply-To: Takao KAWAMURA , 64028@bugs.debian.org
Resent-From: Takao KAWAMURA
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Date: Sat, 13 May 2000 00:18:25 GMT
Resent-Message-ID:
Resent-Sender: owner@bugs.debian.org
X-Debian-PR-Message: report 64028
X-Debian-PR-Package: sufary
X-Debian-PR-Keywords:
X-Loop: owner@bugs.debian.org
Received: via spool by 64028-bugs@bugs.debian.org id=B64028.95817694631952
(code B ref 64028); Sat, 13 May 2000 00:18:25 GMT
X-Mailer: cmail 2.60+20000331 on GNU Emacs 20.6.2 / Mule 4.0 (HANANOEN)
References:
From: Takao KAWAMURA
To: kiwamu@debian.or.jp, 64028@bugs.debian.org
In-reply-to: kiwamu's message of "Fri, 12 May 2000 23:44:29 +0900"
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-2022-JP
Message-Id:
Date: Sat, 13 May 2000 09:14:54 +0900
Delivered-To: 64028@bugs.debian.org
> Please apply this patch for the optimized SDIC array.
> See also .
Could you explain the purpose of your patch more closely?
# for those who can not read the comments in Japanese.:-)
Anyway, I guess your patch is not specific for the Debian
package, so I am very pleased if you would contact the
upstream author of SUFARY to let him apply your patch.
> + /* デミリタの後にしかインデックスを作らない */
デミリタ -> デリミタ?
> + if (!strncmp(text + i, "", 3)) { /* タグ発見! */
I prefer `sizeof("")-1' to `3'. :-)
Regards,
Takao Kawamura
Acknowledgement sent to Takao KAWAMURA <kawamura@debian.org>:
Extra info received and forwarded to list.
-t
From: owner@bugs.debian.org (Debian Bug Tracking System)
To: Takao KAWAMURA
Subject: Bug#64028: Info received (was Bug#64028: (no subject))
Message-ID:
In-Reply-To:
References:
X-Debian-PR-Message: ack-info-maintonly 64028
Thank you for the additional information you have supplied regarding
this problem report. It has been forwarded to the developer(s) and
to the developers mailing list to accompany the original report.
If you wish to continue to submit further information on your problem,
please send it to 64028@bugs.debian.org, as before.
Please do not reply to the address at the top of this message,
unless you wish to report a problem with the Bug-tracking system.
Darren Benham
(administrator, Debian Bugs database)
Received: (at 64028) by bugs.debian.org; 13 May 2000 00:15:46 +0000
From kawamura@debian.org Fri May 12 19:15:46 2000
Received: from tottori-069.seikyou.ne.jp (mozart.composer.ne.jp) [202.211.168.69]
by master.debian.org with esmtp (Exim 3.12 #2 (Debian))
id 12qPar-0008JH-00; Fri, 12 May 2000 19:15:46 -0500
Received: from kawamura by mozart.composer.ne.jp with local (Exim 3.12 #1 (Debian))
id 12qPa2-0000Kl-00; Sat, 13 May 2000 09:14:54 +0900
X-Mailer: cmail 2.60+20000331 on GNU Emacs 20.6.2 / Mule 4.0 (HANANOEN)
References:
From: Takao KAWAMURA
To: kiwamu@debian.or.jp, 64028@bugs.debian.org
In-reply-to: kiwamu's message of "Fri, 12 May 2000 23:44:29 +0900"
Subject: Re: Bug#64028: (no subject)
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-2022-JP
Message-Id:
Date: Sat, 13 May 2000 09:14:54 +0900
Delivered-To: 64028@bugs.debian.org
> Please apply this patch for the optimized SDIC array.
> See also .
Could you explain the purpose of your patch more closely?
# for those who can not read the comments in Japanese.:-)
Anyway, I guess your patch is not specific for the Debian
package, so I am very pleased if you would contact the
upstream author of SUFARY to let him apply your patch.
> + /* デミリタの後にしかインデックスを作らない */
デミリタ -> デリミタ?
> + if (!strncmp(text + i, "", 3)) { /* タグ発見! */
I prefer `sizeof("")-1' to `3'. :-)
Regards,
Takao Kawamura
Changed Bug title.
Request was from Matej Vela <vela@debian.org>
to control@bugs.debian.org.
Received: (at control) by bugs.debian.org; 26 Feb 2006 21:59:45 +0000
From mvela@irb.hr Sun Feb 26 13:59:45 2006
Return-path:
Received: from mail.irb.hr ([161.53.22.8] ident=UNKNOWN)
by spohr.debian.org with esmtp (Exim 4.50)
id 1FDTvd-0006XV-4B
for control@bugs.debian.org; Sun, 26 Feb 2006 13:59:45 -0800
Received: from diziet.irb.hr (diziet.irb.hr [161.53.22.31])
by mail.irb.hr (8.13.4/8.13.4/Debian-3) with ESMTP id k1QLxORa024705
for ; Sun, 26 Feb 2006 22:59:24 +0100
Received: from diziet.irb.hr (localhost [127.0.0.1])
by diziet.irb.hr (8.13.5/8.13.5/Debian-3) with ESMTP id k1QLxpMM010847
for ; Sun, 26 Feb 2006 22:59:51 +0100
Received: (from mvela@localhost)
by diziet.irb.hr (8.13.5/8.13.5/Submit) id k1QLxpB0010845;
Sun, 26 Feb 2006 22:59:51 +0100
From: Matej Vela
To: control@bugs.debian.org
Subject: Clarify title
Date: Sun, 26 Feb 2006 22:59:51 +0100
Message-ID: <87slq5u6g8.fsf@diziet.irb.hr>
User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Scanned-By: MIMEDefang 2.51 on 161.53.22.8
Delivered-To: control@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02
(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level:
X-Spam-Status: No, hits=-5.0 required=4.0 tests=BAYES_00,VALID_BTS_CONTROL
autolearn=no version=2.60-bugs.debian.org_2005_01_02
retitle 64028 sufary: optimized SDIC array
tag 64028 patch
Tags added: patch
Request was from Matej Vela <vela@debian.org>
to control@bugs.debian.org.
Received: (at control) by bugs.debian.org; 26 Feb 2006 21:59:45 +0000
From mvela@irb.hr Sun Feb 26 13:59:45 2006
Return-path:
Received: from mail.irb.hr ([161.53.22.8] ident=UNKNOWN)
by spohr.debian.org with esmtp (Exim 4.50)
id 1FDTvd-0006XV-4B
for control@bugs.debian.org; Sun, 26 Feb 2006 13:59:45 -0800
Received: from diziet.irb.hr (diziet.irb.hr [161.53.22.31])
by mail.irb.hr (8.13.4/8.13.4/Debian-3) with ESMTP id k1QLxORa024705
for ; Sun, 26 Feb 2006 22:59:24 +0100
Received: from diziet.irb.hr (localhost [127.0.0.1])
by diziet.irb.hr (8.13.5/8.13.5/Debian-3) with ESMTP id k1QLxpMM010847
for ; Sun, 26 Feb 2006 22:59:51 +0100
Received: (from mvela@localhost)
by diziet.irb.hr (8.13.5/8.13.5/Submit) id k1QLxpB0010845;
Sun, 26 Feb 2006 22:59:51 +0100
From: Matej Vela
To: control@bugs.debian.org
Subject: Clarify title
Date: Sun, 26 Feb 2006 22:59:51 +0100
Message-ID: <87slq5u6g8.fsf@diziet.irb.hr>
User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Scanned-By: MIMEDefang 2.51 on 161.53.22.8
Delivered-To: control@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02
(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level:
X-Spam-Status: No, hits=-5.0 required=4.0 tests=BAYES_00,VALID_BTS_CONTROL
autolearn=no version=2.60-bugs.debian.org_2005_01_02
retitle 64028 sufary: optimized SDIC array
tag 64028 patch