home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / fj / news / b / 404 < prev    next >
Encoding:
Text File  |  1992-12-22  |  7.8 KB  |  226 lines

  1. Newsgroups: fj.news.b
  2. Path: sparky!uunet!stanford.edu!sun-barr!sh.wide!wnoc-tyo-news!astecgw!astecnews!kawana
  3. From: kawana@astec.co.jp (Takafumi kawana)
  4. Subject: MORE FAST nnspool-find-article-by-message-id for GNUS
  5. In-Reply-To: watanabe@izanami.material.tohoku.ac.jp's message of 22 Dec 1992 02:56:28 GMT
  6. Message-ID: <KAWANA.92Dec22171457@bronx.astec.co.jp>
  7. Sender: news@astec.co.jp (Usenet News System)
  8. Nntp-Posting-Host: bronx
  9. Organization: ASTEC, Inc. Tokyo, Japan
  10. References: <COND.92Dec17112358@hyperion.lsi-j.co.jp>
  11.     <MINMIN.92Dec22094853@chicago.astec.co.jp>
  12.     <WATANABE.92Dec22115612@izanami.material.tohoku.ac.jp>
  13. Distribution: fj
  14. Date: Tue, 22 Dec 1992 08:14:25 GMT
  15. Lines: 209
  16.  
  17. $B$+$o$J!w%"%9%F%C%/$G$9!#(B
  18.  
  19. minmin> $B$G$b!"0lIt$N6/<T$O!H$J$K!<!"%3%"$rEG$/$J$s$F5v$5$s!I$H$N$?$^(B
  20. minmin> $B$o$j!"(BGNUS $B$N(B Reference $B$r$?$I$kItJ,$r2~B$$7$F!"(B Cnews $B$N(B 
  21. minmin> dbz ($B2~(B) $B$r8F$S=P$7$F!"(Bhistory $B$rFI$`$h$&$K$7$F$$$k$h$&$G$9!#(B
  22.  
  23. watanabe> $B$r$)!*(B $B$=$l$O@'Hs8x3+$7$F$[$7$$$H$3$m$G$9!#(B
  24.  
  25. 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
  26. $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
  27.  
  28. .emacs $B$KI,MW$J@_Dj$O<!$NDL$j$G$9!#(B
  29.  
  30.     1.    $B2~B$$:$_$N(B nnspool.el $B$r%m!<%I$9$k$h$&$K@_Dj$9$k!#(B
  31.  
  32.     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
  33.     $B$3$NJQ?t$,(B nil $B$@$H!"2~B$A0$N(B nnspool.el $B$HF1MM$KF0:n$9$k!#(B
  34.  
  35.     $B@_DjNc!K(B (setq nnspool-dbz-program "/usr/local/etc/dbz")
  36.  
  37. $B!tM&5$$,$"$C$?$i;H$C$F$_$F(B :-)$B!#(B
  38.  
  39. #! /bin/sh
  40. # This is a shell archive.  Remove anything before this line, then unpack
  41. # it by saving it into a file and typing "sh file".  To overwrite existing
  42. # files, type "sh file -c".  You can also feed this as standard input via
  43. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  44. # will see the following message at the end:
  45. #        "End of shell archive."
  46. # Contents:  dbz-diff nnspool-diff
  47. # Wrapped by kawana@bronx on Tue Dec 22 17:11:02 1992
  48. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  49. if test -f 'dbz-diff' -a "${1}" != "-c" ; then 
  50.   echo shar: Will not clobber existing file \"'dbz-diff'\"
  51. else
  52. echo shar: Extracting \"'dbz-diff'\" \(1820 characters\)
  53. sed "s/^X//" >'dbz-diff' <<'END_OF_FILE'
  54. X--- 1.1    1992/06/05 19:27:30
  55. X+++ Makefile    1992/06/05 19:31:15
  56. X@@ -1,10 +1,10 @@
  57. X COPTS = -O
  58. X-CFLAGS = $(COPTS) -I../include
  59. X-LIBS = ../libcnews.a
  60. X+CFLAGS = $(COPTS) -I.
  61. X+LIBS = ./dbz.o
  62. X DBM =
  63. X RFC = -DHAVERFCIZE
  64. X DEBUG = -DDBZDEBUG
  65. X-LINTFLAGS = -h $(DEBUG) $(RFC) -I../include
  66. X+LINTFLAGS = -h $(DEBUG) $(RFC) -I.
  67. X LDFLAGS =
  68. X # =()<NEWSBIN = @<NEWSBIN>@>()=
  69. X NEWSBIN = /usr/local/lib/newsbin
  70. X--- 1.1    1992/06/05 19:32:16
  71. X+++ dbzmain.c    1992/06/05 20:00:19
  72. X@@ -19,7 +19,7 @@
  73. X #define    STREQ(a, b)    (*(a) == *(b) && strcmp((a), (b)) == 0)
  74. X #ifndef lint
  75. X-static char RCSid[] = "$Header$";
  76. X+static char RCSid[] = "$Header: /disk/sd01c/kawana/src/dbz/RCS/dbzmain.c,v 1.2 1992/06/05 19:59:24 kawana Exp $";
  77. X #endif
  78. X char *progname;
  79. X@@ -55,6 +55,7 @@
  80. X char fs = '\t';            /* field separator, default tab */
  81. X int unopen = 0;            /* make base unopenable during dbminit? */
  82. X char *change = NULL;        /* chdir here before dbmclose */
  83. X+int verbose = 0;        /* verbose output for 'x' */
  84. X #define    DEFBUF    1024        /* default line-buffer size */
  85. X int buflen = DEFBUF;        /* line length limit */
  86. X@@ -96,7 +97,7 @@
  87. X     progname = argv[0];
  88. X-    while ((c = getopt(argc, argv, "axcmt:l:R0E:SqOiX:Yuf:p:eMUC:d")) != EOF)
  89. X+    while ((c = getopt(argc, argv, "axcmt:l:R0E:SqOiX:Yuf:p:eMUC:dV")) != EOF)
  90. X         switch (c) {
  91. X         case 'a':    /* append to existing table */
  92. X             if (op != 'b')
  93. X@@ -193,6 +194,9 @@
  94. X             if (dbzdebug(1) < 0)
  95. X                 fail("dbz debugging not available", "");
  96. X             break;
  97. X+        case 'V':    /* verbose output for 'x' */
  98. X+            verbose = 1;
  99. X+            break;
  100. X         case '?':
  101. X         default:
  102. X             errflg++;
  103. X@@ -406,7 +410,7 @@
  104. X             if (fgets(cmp, buflen, base) == NULL)
  105. X                 fail("can't read line for `%.40s...'", lp);
  106. X             fputs(cmp, stdout);
  107. X-        } else if (value.dptr != NULL)
  108. X+        } else if (value.dptr != NULL || verbose && !quick)
  109. X             fputs(lp, stdout);
  110. X         break;
  111. X     case 'm':
  112. END_OF_FILE
  113. if test 1820 -ne `wc -c <'dbz-diff'`; then
  114.     echo shar: \"'dbz-diff'\" unpacked with wrong size!
  115. fi
  116. # end of 'dbz-diff'
  117. fi
  118. if test -f 'nnspool-diff' -a "${1}" != "-c" ; then 
  119.   echo shar: Will not clobber existing file \"'nnspool-diff'\"
  120. else
  121. echo shar: Extracting \"'nnspool-diff'\" \(2991 characters\)
  122. sed "s/^X//" >'nnspool-diff' <<'END_OF_FILE'
  123. X--- 1.1    1992/06/05 17:03:07
  124. X+++ nnspool.el    1992/06/08 01:00:20
  125. X@@ -1,7 +1,7 @@
  126. X ;;; Spool access using NNTP for GNU Emacs
  127. X ;; Copyright (C) 1988, 1989 Fujitsu Laboratories LTD.
  128. X ;; Copyright (C) 1988, 1989, 1990 Masanobu UMEDA
  129. X-;; $Header: nnspool.el,v 1.10 90/03/23 13:25:25 umerin Locked $
  130. X+;; $Header: nnspool.el,v 1.11 1992/06/08 00:59:03 kawana Exp $
  131. X ;; This file is part of GNU Emacs.
  132. X@@ -46,6 +46,18 @@
  133. X (defvar nnspool-current-directory nil
  134. X   "Current news group directory.")
  135. X+(defvar nnspool-dbz-program nil
  136. X+  "*Program to find article by message-id.")
  137. X+
  138. X+(defvar nnspool-dbz-switches '("-xV")
  139. X+  "*Switches that pass to `dbz' for finding article by message-id.")
  140. X+
  141. X+(defvar nnspool-dbz-buffer " *dbz*"
  142. X+  "*Buffer for containing output from `dbz'.")
  143. X+
  144. X+(defvar nnspool-dbz-process nil
  145. X+  "*Process for containing output from `dbz'.")
  146. X+
  147. X ;;;
  148. X ;;; Replacement of Extended Command for retrieving many headers.
  149. X ;;;
  150. X@@ -318,6 +330,9 @@
  151. X (defun nnspool-close-server-internal ()
  152. X   "Close connection to news server."
  153. X+  (if nnspool-dbz-process
  154. X+      (kill-buffer nnspool-dbz-buffer))
  155. X+  (setq nnspool-dbz-process nil)
  156. X   (if (get-file-buffer nnspool-history-file)
  157. X       (kill-buffer (get-file-buffer nnspool-history-file)))
  158. X   (if nntp-server-buffer
  159. X@@ -328,13 +343,36 @@
  160. X (defun nnspool-find-article-by-message-id (id)
  161. X   "Return full pathname of an artilce identified by message-ID."
  162. X   (save-excursion
  163. X-    (let ((buffer (get-file-buffer nnspool-history-file)))
  164. X-      (if buffer
  165. X-      (set-buffer buffer)
  166. X-    ;; Finding history file may take lots of time.
  167. X-    (message "Reading history file...")
  168. X-    (set-buffer (find-file-noselect nnspool-history-file))
  169. X-    (message "Reading history file... done")))
  170. X+    (if nnspool-dbz-program
  171. X+    (progn
  172. X+      (if (and nnspool-dbz-process
  173. X+           (eq 'run (process-status nnspool-dbz-process)))
  174. X+          t
  175. X+        (message "Starting dbz process...")
  176. X+        (and (get-buffer nnspool-dbz-buffer)
  177. X+         (kill-buffer nnspool-dbz-buffer))
  178. X+        (setq nnspool-dbz-process
  179. X+          (apply 'start-process "dbz" nnspool-dbz-buffer
  180. X+             nnspool-dbz-program
  181. X+             (append nnspool-dbz-switches
  182. X+                     (list nnspool-history-file))))
  183. X+        (process-kill-without-query nnspool-dbz-process))
  184. X+      (message "Reading history file...")
  185. X+      (set-buffer nnspool-dbz-buffer)
  186. X+      (erase-buffer)
  187. X+      (process-send-string nnspool-dbz-process (concat id "\n"))
  188. X+      (while (progn
  189. X+           (goto-char (point-max))
  190. X+           (/= (preceding-char) ?\n))
  191. X+        (accept-process-output nnspool-dbz-process))
  192. X+      (message "Reading history file... done"))
  193. X+      (let ((buffer (get-file-buffer nnspool-history-file)))
  194. X+    (if buffer
  195. X+        (set-buffer buffer)
  196. X+      ;; Finding history file may take lots of time.
  197. X+      (message "Reading history file...")
  198. X+      (set-buffer (find-file-noselect nnspool-history-file))
  199. X+      (message "Reading history file... done"))))
  200. X     ;; Search from end of the file. I think this is much faster than
  201. X     ;; do from the beginning of the file.
  202. X     (goto-char (point-max))
  203. END_OF_FILE
  204. if test 2991 -ne `wc -c <'nnspool-diff'`; then
  205.     echo shar: \"'nnspool-diff'\" unpacked with wrong size!
  206. fi
  207. # end of 'nnspool-diff'
  208. fi
  209. echo shar: End of shell archive.
  210. exit 0
  211.  
  212. --
  213. $B@nL>N4J8(B Takafumi KAWANA, kawana@astec.co.jp
  214. ASTEC,Inc.
  215. BR Ichigaya 6 Minami-cho Shinjuku-ku Tokyo 162 JAPAN
  216. TEL 03-5261-5973/FAX 03-5261-5980
  217.