home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: fj.news.b
- Path: sparky!uunet!stanford.edu!sun-barr!sh.wide!wnoc-tyo-news!astecgw!astecnews!kawana
- From: kawana@astec.co.jp (Takafumi kawana)
- Subject: MORE FAST nnspool-find-article-by-message-id for GNUS
- In-Reply-To: watanabe@izanami.material.tohoku.ac.jp's message of 22 Dec 1992 02:56:28 GMT
- Message-ID: <KAWANA.92Dec22171457@bronx.astec.co.jp>
- Sender: news@astec.co.jp (Usenet News System)
- Nntp-Posting-Host: bronx
- Organization: ASTEC, Inc. Tokyo, Japan
- References: <COND.92Dec17112358@hyperion.lsi-j.co.jp>
- <MINMIN.92Dec22094853@chicago.astec.co.jp>
- <WATANABE.92Dec22115612@izanami.material.tohoku.ac.jp>
- Distribution: fj
- Date: Tue, 22 Dec 1992 08:14:25 GMT
- Lines: 209
-
- $B$+$o$J!w%"%9%F%C%/$G$9!#(B
-
- minmin> $B$G$b!"0lIt$N6/<T$O!H$J$K!<!"%3%"$rEG$/$J$s$F5v$5$s!I$H$N$?$^(B
- minmin> $B$o$j!"(BGNUS $B$N(B Reference $B$r$?$I$kItJ,$r2~B$$7$F!"(B Cnews $B$N(B
- minmin> dbz ($B2~(B) $B$r8F$S=P$7$F!"(Bhistory $B$rFI$`$h$&$K$7$F$$$k$h$&$G$9!#(B
-
- watanabe> $B$r$)!*(B $B$=$l$O@'Hs8x3+$7$F$[$7$$$H$3$m$G$9!#(B
-
- Cnews $B$KIUB0$N(B dbz V3.2 $B$H(B GNUS $B$KIUB0$N(B nnspool.el-1.10 $B$X$N%Q%C%A$G$9!#(B
- $B:n$C$?$N$O$@$$$VA0$N$3$H$J$N$G!"$R$g$C$H$7$?$i4V0c$C$F$$$k$+$b$7$l$^$;$s(B X-)$B!#(B
-
- .emacs $B$KI,MW$J@_Dj$O<!$NDL$j$G$9!#(B
-
- 1. $B2~B$$:$_$N(B nnspool.el $B$r%m!<%I$9$k$h$&$K@_Dj$9$k!#(B
-
- 2. dbz $B$N%Q%9$rJQ?t(B nnspool-dbz-program $B$K@_Dj$9$k!#!J4{DjCM$O(B nil$B!K(B
- $B$3$NJQ?t$,(B nil $B$@$H!"2~B$A0$N(B nnspool.el $B$HF1MM$KF0:n$9$k!#(B
-
- $B@_DjNc!K(B (setq nnspool-dbz-program "/usr/local/etc/dbz")
-
- $B!tM&5$$,$"$C$?$i;H$C$F$_$F(B :-)$B!#(B
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of shell archive."
- # Contents: dbz-diff nnspool-diff
- # Wrapped by kawana@bronx on Tue Dec 22 17:11:02 1992
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'dbz-diff' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'dbz-diff'\"
- else
- echo shar: Extracting \"'dbz-diff'\" \(1820 characters\)
- sed "s/^X//" >'dbz-diff' <<'END_OF_FILE'
- X--- 1.1 1992/06/05 19:27:30
- X+++ Makefile 1992/06/05 19:31:15
- X@@ -1,10 +1,10 @@
- X COPTS = -O
- X-CFLAGS = $(COPTS) -I../include
- X-LIBS = ../libcnews.a
- X+CFLAGS = $(COPTS) -I.
- X+LIBS = ./dbz.o
- X DBM =
- X RFC = -DHAVERFCIZE
- X DEBUG = -DDBZDEBUG
- X-LINTFLAGS = -h $(DEBUG) $(RFC) -I../include
- X+LINTFLAGS = -h $(DEBUG) $(RFC) -I.
- X LDFLAGS =
- X # =()<NEWSBIN = @<NEWSBIN>@>()=
- X NEWSBIN = /usr/local/lib/newsbin
- X--- 1.1 1992/06/05 19:32:16
- X+++ dbzmain.c 1992/06/05 20:00:19
- X@@ -19,7 +19,7 @@
- X #define STREQ(a, b) (*(a) == *(b) && strcmp((a), (b)) == 0)
- X
- X #ifndef lint
- X-static char RCSid[] = "$Header$";
- X+static char RCSid[] = "$Header: /disk/sd01c/kawana/src/dbz/RCS/dbzmain.c,v 1.2 1992/06/05 19:59:24 kawana Exp $";
- X #endif
- X
- X char *progname;
- X@@ -55,6 +55,7 @@
- X char fs = '\t'; /* field separator, default tab */
- X int unopen = 0; /* make base unopenable during dbminit? */
- X char *change = NULL; /* chdir here before dbmclose */
- X+int verbose = 0; /* verbose output for 'x' */
- X
- X #define DEFBUF 1024 /* default line-buffer size */
- X int buflen = DEFBUF; /* line length limit */
- X@@ -96,7 +97,7 @@
- X
- X progname = argv[0];
- X
- X- while ((c = getopt(argc, argv, "axcmt:l:R0E:SqOiX:Yuf:p:eMUC:d")) != EOF)
- X+ while ((c = getopt(argc, argv, "axcmt:l:R0E:SqOiX:Yuf:p:eMUC:dV")) != EOF)
- X switch (c) {
- X case 'a': /* append to existing table */
- X if (op != 'b')
- X@@ -193,6 +194,9 @@
- X if (dbzdebug(1) < 0)
- X fail("dbz debugging not available", "");
- X break;
- X+ case 'V': /* verbose output for 'x' */
- X+ verbose = 1;
- X+ break;
- X case '?':
- X default:
- X errflg++;
- X@@ -406,7 +410,7 @@
- X if (fgets(cmp, buflen, base) == NULL)
- X fail("can't read line for `%.40s...'", lp);
- X fputs(cmp, stdout);
- X- } else if (value.dptr != NULL)
- X+ } else if (value.dptr != NULL || verbose && !quick)
- X fputs(lp, stdout);
- X break;
- X case 'm':
- END_OF_FILE
- if test 1820 -ne `wc -c <'dbz-diff'`; then
- echo shar: \"'dbz-diff'\" unpacked with wrong size!
- fi
- # end of 'dbz-diff'
- fi
- if test -f 'nnspool-diff' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'nnspool-diff'\"
- else
- echo shar: Extracting \"'nnspool-diff'\" \(2991 characters\)
- sed "s/^X//" >'nnspool-diff' <<'END_OF_FILE'
- X--- 1.1 1992/06/05 17:03:07
- X+++ nnspool.el 1992/06/08 01:00:20
- X@@ -1,7 +1,7 @@
- X ;;; Spool access using NNTP for GNU Emacs
- X ;; Copyright (C) 1988, 1989 Fujitsu Laboratories LTD.
- X ;; Copyright (C) 1988, 1989, 1990 Masanobu UMEDA
- X-;; $Header: nnspool.el,v 1.10 90/03/23 13:25:25 umerin Locked $
- X+;; $Header: nnspool.el,v 1.11 1992/06/08 00:59:03 kawana Exp $
- X
- X ;; This file is part of GNU Emacs.
- X
- X@@ -46,6 +46,18 @@
- X (defvar nnspool-current-directory nil
- X "Current news group directory.")
- X
- X+(defvar nnspool-dbz-program nil
- X+ "*Program to find article by message-id.")
- X+
- X+(defvar nnspool-dbz-switches '("-xV")
- X+ "*Switches that pass to `dbz' for finding article by message-id.")
- X+
- X+(defvar nnspool-dbz-buffer " *dbz*"
- X+ "*Buffer for containing output from `dbz'.")
- X+
- X+(defvar nnspool-dbz-process nil
- X+ "*Process for containing output from `dbz'.")
- X+
- X ;;;
- X ;;; Replacement of Extended Command for retrieving many headers.
- X ;;;
- X@@ -318,6 +330,9 @@
- X
- X (defun nnspool-close-server-internal ()
- X "Close connection to news server."
- X+ (if nnspool-dbz-process
- X+ (kill-buffer nnspool-dbz-buffer))
- X+ (setq nnspool-dbz-process nil)
- X (if (get-file-buffer nnspool-history-file)
- X (kill-buffer (get-file-buffer nnspool-history-file)))
- X (if nntp-server-buffer
- X@@ -328,13 +343,36 @@
- X (defun nnspool-find-article-by-message-id (id)
- X "Return full pathname of an artilce identified by message-ID."
- X (save-excursion
- X- (let ((buffer (get-file-buffer nnspool-history-file)))
- X- (if buffer
- X- (set-buffer buffer)
- X- ;; Finding history file may take lots of time.
- X- (message "Reading history file...")
- X- (set-buffer (find-file-noselect nnspool-history-file))
- X- (message "Reading history file... done")))
- X+ (if nnspool-dbz-program
- X+ (progn
- X+ (if (and nnspool-dbz-process
- X+ (eq 'run (process-status nnspool-dbz-process)))
- X+ t
- X+ (message "Starting dbz process...")
- X+ (and (get-buffer nnspool-dbz-buffer)
- X+ (kill-buffer nnspool-dbz-buffer))
- X+ (setq nnspool-dbz-process
- X+ (apply 'start-process "dbz" nnspool-dbz-buffer
- X+ nnspool-dbz-program
- X+ (append nnspool-dbz-switches
- X+ (list nnspool-history-file))))
- X+ (process-kill-without-query nnspool-dbz-process))
- X+ (message "Reading history file...")
- X+ (set-buffer nnspool-dbz-buffer)
- X+ (erase-buffer)
- X+ (process-send-string nnspool-dbz-process (concat id "\n"))
- X+ (while (progn
- X+ (goto-char (point-max))
- X+ (/= (preceding-char) ?\n))
- X+ (accept-process-output nnspool-dbz-process))
- X+ (message "Reading history file... done"))
- X+ (let ((buffer (get-file-buffer nnspool-history-file)))
- X+ (if buffer
- X+ (set-buffer buffer)
- X+ ;; Finding history file may take lots of time.
- X+ (message "Reading history file...")
- X+ (set-buffer (find-file-noselect nnspool-history-file))
- X+ (message "Reading history file... done"))))
- X ;; Search from end of the file. I think this is much faster than
- X ;; do from the beginning of the file.
- X (goto-char (point-max))
- END_OF_FILE
- if test 2991 -ne `wc -c <'nnspool-diff'`; then
- echo shar: \"'nnspool-diff'\" unpacked with wrong size!
- fi
- # end of 'nnspool-diff'
- fi
- echo shar: End of shell archive.
- exit 0
-
- --
- $B@nL>N4J8(B Takafumi KAWANA, kawana@astec.co.jp
- ASTEC,Inc.
- BR Ichigaya 6 Minami-cho Shinjuku-ku Tokyo 162 JAPAN
- TEL 03-5261-5973/FAX 03-5261-5980
-