;ELC   
;;; compiled by gsstark@lola-granola.MIT.EDU on Tue Jul 23 13:36:43 1996
;;; from file /afs/sipb.mit.edu/contrib/emacs/packages/gnus-5.2.37/lisp/nnspool.el
;;; emacs version 19.30.1.
;;; bytecomp version FSF 2.10
;;; optimization is on.
;;; this file uses opcodes which do not exist in Emacs 18.

(if (and (boundp 'emacs-version)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`nnspool.el' was compiled for Emacs 19.29 or later"))


(byte-code "!!!!\"ȉF	B	ȇ" [require nnheader nntp timezone nnoo nnspool mapcar #[(p) "C" [p] 1] nil nnoo-definition-alist] 4)
#@67 Program to post news.
This is most commonly `inews' or `injnews'.
(defvar nnspool-inews-program news-inews-program (#$ . 656))
(nnoo-define (quote nnspool-inews-program) nil)
#@142 Switches for nnspool-request-post to pass to `inews' for posting news.
If you are using Cnews, you probably should set this variable to nil.
(defvar nnspool-inews-switches (quote ("-h" "-S")) (#$ . 838))
(nnoo-define (quote nnspool-inews-switches) nil)
#@29 Local news spool directory.
(defvar nnspool-spool-directory (file-name-as-directory news-path) (#$ . 1097))
(nnoo-define (quote nnspool-spool-directory) nil)
#@27 Local news nov directory.
(defvar nnspool-nov-directory (concat nnspool-spool-directory "over.view/") (#$ . 1261))
(nnoo-define (quote nnspool-nov-directory) nil)
#@48 Where the local news library files are stored.
(defvar nnspool-lib-dir "/usr/lib/news/" (#$ . 1430))
(nnoo-define (quote nnspool-lib-dir) nil)
#@25 Local news active file.
(defvar nnspool-active-file (concat nnspool-lib-dir "active") (#$ . 1579))
(nnoo-define (quote nnspool-active-file) nil)
#@29 Local news newsgroups file.
(defvar nnspool-newsgroups-file (concat nnspool-lib-dir "newsgroups") (#$ . 1730))
(nnoo-define (quote nnspool-newsgroups-file) nil)
#@32 Local news distributions file.
(defvar nnspool-distributions-file (concat nnspool-lib-dir "distribs.pat") (#$ . 1897))
(nnoo-define (quote nnspool-distributions-file) nil)
#@26 Local news history file.
(defvar nnspool-history-file (concat nnspool-lib-dir "history") (#$ . 2075))
(nnoo-define (quote nnspool-history-file) nil)
#@30 Local news active date file.
(defvar nnspool-active-times-file (concat nnspool-lib-dir "active.times") (#$ . 2230))
(nnoo-define (quote nnspool-active-times-file) nil)
#@183 The number of the articles which indicates a large newsgroup.
If the number of the articles is greater than the value, verbose
messages will be shown to indicate the current status.
(defvar nnspool-large-newsgroup 50 (#$ . 2405))
(nnoo-define (quote nnspool-large-newsgroup) nil)
#@76 Non-nil means that nnspool will never return NOV lines instead of headers.
(defvar nnspool-nov-is-evil nil (#$ . 2691))
(nnoo-define (quote nnspool-nov-is-evil) nil)
#@151 If non-nil, use sed to get the relevant portion from the overview file.
If nil, nnspool will load the entire file into a buffer and process it
there.
(defconst nnspool-sift-nov-with-sed nil (#$ . 2864))
#@75 *A hook that will be run when an article has been rejected by the server.
(defvar nnspool-rejected-article-hook nil (#$ . -3073))
(nnoo-define (quote nnspool-rejected-article-hook) nil)
#@45 Version numbers of this version of NNSPOOL.
(defconst nnspool-version "nnspool 2.0" (#$ . 3265))
#@31 Current news group directory.
(defvar nnspool-current-directory nil (#$ . 3368))
(byte-code "\"! B\"! B\"!" [nnoo-define nnspool-current-directory nil boundp nnspool-current-group current-load-list nnspool-status-string "" nnoo-define-basics-1 nnspool] 3)
#@35 Retrieve the headers of ARTICLES.
(defalias 'nnspool-retrieve-headers #[(articles &optional group server fetch-old) "q !%\fG	\n! \nV\f@A \f\"A ӂ#\fA@;n !d @A\"At ! ! cp\"c`! = !  \\$8= #?db  W +)b#uc`d|A TUA _\"A ! .)" [nntp-server-buffer erase-buffer nnspool-possibly-change-directory group articles number 0 count nnspool-current-directory default-directory nnspool-large-newsgroup do-message nil file beg article ag nnspool-retrieve-headers-with-nov fetch-old nov nnspool-find-id nnspool-article-pathname int-to-string file-exists-p "221 " princ " Article retrieved.\n" nnheader-max-head-length t nnheader-insert-file-contents-literally 1024 chop format-alist 1 insert-file-contents search-forward "\n\n" -1 ".\n" 20 message "nnspool: Receiving headers... %d%%" 100 "nnspool: Receiving headers...done" nnheader-fold-continuation-lines headers] 9 (#$ . 3664)])
(nnoo-register-function (quote nnspool-retrieve-headers))
(defalias 'nnspool-open-server #[(server &optional defs) "\n#!  #!!!(  #!6 #\n$Ї" [nnoo-change-server nnspool server defs file-exists-p nnspool-spool-directory nnspool-close-server nnheader-report "Spool directory doesn't exist: %s" file-directory-p directory-file-name file-truename "Not a directory: %s" nnspool-active-file "The active file doesn't exist: %s" "Opened server %s using directory %s" t] 5])
(nnoo-register-function (quote nnspool-open-server))
#@43 Select article by message ID (or number).
(defalias 'nnspool-request-article #[(id &optional group server buffer) "	!\n	 ĉ;) !1 @A\"1 \n\"] !] !?] !)] \\ \nB] +" [nnspool-possibly-change-directory group buffer nntp-server-buffer nil ag file id nnspool-find-id nnspool-article-pathname nnspool-current-group file-exists-p file-directory-p nnspool-find-file] 3 (#$ . 5300)])
(nnoo-register-function (quote nnspool-request-article))
#@48 Select article body by message ID (or number).
(defalias 'nnspool-request-body #[(id &optional group server) "	!!! qeb# e`|\f))" [nnspool-possibly-change-directory group nnspool-request-article id res nntp-server-buffer search-forward "\n\n" nil t] 5 (#$ . 5792)])
(nnoo-register-function (quote nnspool-request-body))
#@48 Select article head by message ID (or number).
(defalias 'nnspool-request-head #[(id &optional group server) "	!!$ qeb#  `Sd| )\f)" [nnspool-possibly-change-directory group nnspool-request-article id res nntp-server-buffer search-forward "\n\n" nil t nnheader-fold-continuation-lines] 5 (#$ . 6136)])
(nnoo-register-function (quote nnspool-request-head))
#@20 Select news GROUP.
(defalias 'nnspool-request-group #[(group &optional server dont-check) "	!\f! 	#f \f		#, 	#̂f \f$? \"\"\\ G@AU AJ @	%f 	#	\"*" [nnspool-article-pathname group nil dir pathname file-directory-p nnheader-report nnspool "Invalid group name (no such directory): %s" nnspool-current-directory "Selected group %s" dont-check t directory-files "^[0-9]+$" sort mapcar #[(name) "	!" [string-to-int name] 2] < nnheader-insert "211 %d %d %d %s\n" "Empty group %s" "211 0 0 0 %s\n"] 7 (#$ . 6517)])
(nnoo-register-function (quote nnspool-request-group))
(defalias 'nnspool-request-type #[(group &optional article) "" [news] 1])
(nnoo-register-function (quote nnspool-request-type))
(defalias 'nnspool-close-group #[(group &optional server) "" [t] 1])
(nnoo-register-function (quote nnspool-close-group))
#@25 List active newsgroups.
(defalias 'nnspool-request-list #[(&optional server) "	! 	!\")" [nnspool-find-file nnspool-active-file nnheader-report nnspool nnheader-file-error] 4 (#$ . 7398)])
(nnoo-register-function (quote nnspool-request-list))
#@37 List newsgroups (defined in NNTP2).
(defalias 'nnspool-request-list-newsgroups #[(&optional server) "	! 	!\")" [nnspool-find-file nnspool-newsgroups-file nnheader-report nnspool nnheader-file-error] 4 (#$ . 7654)])
(nnoo-register-function (quote nnspool-request-list-newsgroups))
#@40 List distributions (defined in NNTP2).
(defalias 'nnspool-request-list-distributions #[(&optional server) "	! 	!\")" [nnspool-find-file nnspool-distributions-file nnheader-report nnspool nnheader-file-error] 4 (#$ . 7948)])
(nnoo-register-function (quote nnspool-request-list-distributions))
#@33 List groups created after DATE.
(defalias 'nnspool-request-newgroups #[(date &optional server) "	!j db! yU\n !	\n!P ŕSbc͕bp!\nVP ͔͕{	B	P yU   	h 	@б	A	X +ч" [nnspool-find-file nnspool-active-times-file looking-at "\\([^ ]+\\) +\\([0-9]+\\)[0-9][0-9][0-9] " -1 0 nnspool-seconds-since-epoch date nil groups seconds "\\([^ ]+\\) +[0-9]+ " ".0" 1 read erase-buffer " 0 0 y\n" t] 3 (#$ . 8254)])
(nnoo-register-function (quote nnspool-request-newgroups))
#@36 Post a new news in current buffer.
(defalias 'nnspool-request-post #[(&optional server) "!Ǐ) \"\"ed#Џ," [nil process-connection-type generate-new-buffer " *nnspool post*" inews-buffer err (byte-code "\f%" [apply start-process "*nnspool inews*" inews-buffer nnspool-inews-program nnspool-inews-switches] 6) ((error (byte-code "#" [nnheader-report nnspool "inews error: %S" err] 4))) proc nnheader-report nnspool "" set-process-sentinel nnspool-inews-sentinel process-send-region (process-send-eof proc) ((error)) t] 5 (#$ . 8762)])
(nnoo-register-function (quote nnspool-request-post))
(defalias 'nnspool-inews-sentinel #[(proc status) "	!qeb U # p!B #/ ǉ#  #\" !)" [process-buffer proc buffer-size 0 search-forward "spooled" nil t kill-buffer re-search-forward "[ 	\n]+" replace-match " " nnheader-report nnspool "%s" buffer-string message "nnspool: %s" nnspool-status-string ding run-hooks nnspool-rejected-article-hook] 4])
(defalias 'nnspool-retrieve-headers-with-nov #[(articles &optional fetch-old) " 	?N \f#	\n\n!M \fq 4 \n\"L \n!H H тL ӏ)+" [gnus-nov-is-evil nnspool-nov-is-evil nnheader-group-pathname nnspool-current-group nnspool-nov-directory ".overview" articles nil last arts nov file-exists-p nntp-server-buffer erase-buffer nnspool-sift-nov-with-sed insert-file-contents fetch-old t (byte-code "	 @	Z] @!e`|A# A @!, y`d| U?t yp!@UI ɇ\na \n@Xa \nA\nI \ns \nA\n@!a ɇ" [nnspool-find-nov-line fetch-old 1 articles buffer-size 0 -1 read last t arts nnspool-insert-nov-head] 5) ((error))] 4])
#@63 Read the head of ARTICLE, convert to NOV headers, and insert.
(defalias 'nnspool-insert-nov-head #[(article) "p!\"!) ! \nqdb!)	!+" [nil buf cur nnheader-set-temp-buffer " *nnspool head*" nnheader-insert-head nnspool-article-pathname nnspool-current-group article nnheader-insert-article-line nnheader-parse-head headers nnheader-insert-nov kill-buffer] 4 (#$ . 10455)])
(defalias 'nnspool-find-nov-line #[(article) "debpe	R \\ǥby`U' m- ɉ `\f!V@ ` \nWL ` ̉ 	= \n= ``W \nt \nW y`ma \f!a \n= 	by\n.=" [nil found num prev cur min max 2 0 t read article yes 1] 7])
(defalias 'nnspool-sift-nov-with-sed #[(articles file) "@A A @\nS	T#	&*" [articles last first call-process "awk" nil t format "BEGIN {firstmsg=%d; lastmsg=%d;}\n $1 >= firstmsg && $1 <= lastmsg {print;}" file] 10])
(defalias 'nnspool-find-id #[(id) "!qp! Əeb!$ !!!Bp!)" [get-buffer-create " *nnspool work*" buffer-disable-undo erase-buffer nil (byte-code "!&" [call-process "grep" nil t regexp-quote id nnspool-history-file] 7) ((error)) looking-at "<[^>]+>[ 	]+[-0-9~]+[ 	]+\\([^ /	\n]+\\)/\\([0-9]+\\)[ 	\n]" match-string 1 string-to-int 2 kill-buffer] 4])
#@38 Insert FILE in server buffer safely.
(defalias 'nnspool-find-file #[(file) "q ď" [nntp-server-buffer erase-buffer nil (byte-code "	!" [nnheader-insert-file-contents-literally file t] 2) ((file-error))] 3 (#$ . 11747)])
(defalias 'nnspool-possibly-change-directory #[(group) " !!  #)" [group t nnspool-article-pathname pathname file-directory-p nnspool-current-directory nnspool-current-group nnheader-report nnspool "No such newsgroup: %s"] 4])
#@26 Find the path for GROUP.
(defalias 'nnspool-article-pathname #[(group &optional article) "	\n#" [nnheader-group-pathname group nnspool-spool-directory article] 4 (#$ . 12235)])
(defalias 'nnspool-seconds-since-epoch #[(date) "!\"!H!\"8A@@\f8\fA@\f@\f8&\f@_\fA@\\+" [mapcar #[(ti) " !" [ti string-to-int] 2] timezone-parse-date date tdate #[(ti) " !" [ti string-to-int] 2] timezone-parse-time 3 ttime encode-time 2 4 unix 65536.0] 10])
(provide (quote nnspool))
