;ELC   
;;; compiled by jwz@thalidomide on Sat May 21 06:38:50 1994
;;; from file /th/jwz/emacs19/lisp/gnus/nntp.el
;;; emacs version 19.10 Lucid (beta25).
;;; bytecomp version 2.24; 26-Apr-94.
;;; 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")))
    (error "This file was compiled for Emacs 19."))

(byte-code "!!!!!!" [require gnus chat fboundp open-network-stream tcp boundp nntp/rcs-revision purecopy "!Revision: 1.10.3 !"] 2)
(defvar nntp/default-nntp-port (purecopy "nntp") "\
The default tcp port to use for nntp connections.")
(fset 'nntp-last #[(x) "AAw" [x] 2 "\
Returns the last link in the list LIST."])
(defvar nntp/connection nil "\
The current NNTP connection.")
(defvar nntp/group nil "\
The most-recently-selected NNTP group.")
(defvar nntp-status-string nil "\
The error message from the last NNTP command.  'nil if no error.
Don't use this, call the function `nntp-status-message' instead.")
(defvar nntp/can-xover t "\
Does this server understand the XOVER command?  (Computed.)")
(defvar nntp/inhibit-xover nil "\
If you have XOVER but it doesn't work, set this to t.")
(byte-code "!OP!" [boundp nntp-version purecopy "flee/nntp/Lucid " nntp/rcs-revision 11 -2] 5)
(defvar nntp-server-buffer nil "\
Buffer that GNUS looks at when it wants data.")
(defvar nntp-authinfo-string nil "\
*String sent to NNTP server if the connection fails.")
(fset 'nntp-open-server #[(host service) "	?!!\n$\"! ! ==\" ==)" [service nntp/default-nntp-port nil nntp-status-string nntp/inhibit-xover nntp/can-xover generate-new-buffer "*nntp*" nntp-server-buffer buffer-disable-undo nntp/group open-network-stream "nntp" host nntp/connection set-process-sentinel nntp/sentinel process-kill-without-query nntp/response code nntp/command "MODE READER" 200 201 nntp-authinfo-string "AUTHINFO"] 6 "\
Start a connection to the given HOST and SERVICE.  Returns true
if successful."])
(fset 'nntp-server-opened #[nil "		! !>" [nntp/connection nntp-server-buffer buffer-name nntp-close-server process-status (run open)] 2 "\
Are we currently connected?"])
(fset 'nntp-close-server #[nil "	!\n\n!*" [nntp/connection nntp-server-buffer buffer proc nil nntp/group delete-process kill-buffer] 2 "\
Terminate the connection.  Returns nothing."])
(fset 'nntp-status-message #[nil "" [nntp-status-string ""] 1 "\
Returns the error message from the last NNTP request."])
(fset 'nntp-request-list #[nil "! = " [nntp/command "LIST" nntp/response 215 nntp/wait-for-text] 2 "\
Retrieve the list of newsgroups into 'nntp-server-buffer.
Returns true if successful."])
(fset 'nntp-request-group #[(group) "\n\" =??\nƇ" [nntp/command "GROUP" group nntp/response 211 nntp/group t] 3 "\
Select group GROUP.  Returns true if successful."])
(fset 'nntp-request-article #[(id) "\n\" = " [nntp/command "ARTICLE" id nntp/response 220 nntp/get-text] 3 "\
Retrieve article ID (either a number or a message-id) into
'nntp-server-buffer.  Returns true if successful."])
(fset 'nntp-request-post #[nil "! =Ǝ 	ed# *=" [nntp/command "POST" nntp/response 340 nil finished ((byte-code "\n\"" [finished process-send-string nntp/connection "\n.\n"] 3)) nntp/unix-to-smtp-text process-send-region nntp/connection t 240] 4 "\
Modify and post the current buffer.  Returns true if successful."])
(fset 'nntp-retrieve-headers-by-id #[(messageid) "!!!\n)" [messageid nil result message "NNTP: retrieving headers..." nntp/headers "NNTP: retrieving headers...done"] 2 "\
Returns the header data for MESSAGE-ID.
MESSAGE-ID is a string like \"<12345@foo.com>\"."])
(fset 'nntp-retrieve-headers #[(sequence) "!!!!\n)" [sequence nil result message "NNTP: retrieving headers..." nntp/can-xover nntp/try-xover nntp/headers "NNTP: retrieving headers...done"] 2 "\
Returns the header data for SEQUENCE in the current group.
SEQUENCE is a sorted list of article numbers.
XXX describe the return value."])
(byte-code "MM" [nntp/sentinel #[(proc delta) " !" [nntp-server-opened error "NNTP connection closed."] 2] nntp/clear #[nil "	!" [chat/delete-pending-data nntp/connection] 2]] 2)
(fset 'nntp/command #[(&rest strings) " \n#P\"" [nntp/clear process-send-string nntp/connection mapconcat identity strings " " "\n"] 6 "\
Start a new NNTP command."])
(fset 'nntp/read-integer '(macro . #[(&optional point move-p) "	ªCDC#" [append move-p progn save-excursion point goto-char ((if (and (<= (following-char) 57) (>= (following-char) 48)) (read (current-buffer)) 0))] 4]))
(fset 'nntp/response #[nil "\n\"\n!qe}ebgXgYp!)		Xe\\dZ{	*e|)" [chat/wait-for-string "\n" nntp/connection process-buffer chat/data-marker 57 48 read 0 code 400 4 2 nntp-status-string] 3 "\
Wait for an NNTP response and return the response code.  Also sets
'nntp-status-string."])
(fset 'nntp/wait-for-text #[nil "	!" [chat/wait-for-dot-crlf nntp/connection] 2 "\
Wait for an NNTP text response.  Returns true."])
(fset 'nntp/get-text #[nil " 	q )Ç" [nntp/wait-for-text nntp-server-buffer nntp/smtp-to-unix-text t] 1 "\
Wait for an NNTP text response and convert it to Unix text format.
Returns true."])
(fset 'nntp/smtp-to-unix-text #[nil "ebmg=!h=!uc h=!" [46 delete-char 1 nil 13 -1 backward-char 10] 2 "\
Convert the current buffer from SMTP text format to Unix text
format.  Modifies point.  Returns nothing."])
(fset 'nntp/unix-to-smtp-text #[nil "ebmg=ccyjoh=cc" [46 nil 13 10 "\n" ".\n"] 2 "\
Convert the current buffer form Unix text format to SMTP text
format.  Modifies point.  Returns nothing."])
(fset 'nntp/try-xover #[(sequence) "@!@!\n!Q\" =!!qe}!)e|)*" [sequence nntp-last hi lo nntp/command "XOVER" int-to-string "-" nntp/response 224 chat/wait-for-dot-crlf nntp/connection process-buffer chat/data-marker nov/parse nil nntp/can-xover] 6 "\
Try using the XOVER command to retrieve headers."])
(byte-code "MM" [nov/skip-field (macro . #[nil "" [(search-forward "	" eol 'end)] 1]) nov/field (macro . #[nil "" [(buffer-substring (point) (progn (nov/skip-field) (1- (point))))] 1])] 2)
(fset 'nov/parse #[(sequence) "eb m gXgYp!gUgUdbVdbJ@WAt @= A`)\"Iu`	#`S{I`	#`S{I`	#`S{I`	#`S{I`	#`S{I	#`	#`S{!I 	#`	#`S{I\nBy \n," [nil eol headers header number sequence 57 48 read 0 9 46 nntp/can-xover make-vector 8 1 search-forward "	" end 2 5 6 7 4 string-to-int backward-char "	xref: " t 3] 9 "\
Parse the news overview data in the current buffer, and return a
list of headers that match SEQUENCE (see 'nntp-retrieve-headers)."])
(byte-code "\"!Ň" [add-hook gnus-article-prepare-hook nntp/article-get-xrefs boundp gnus-current-headers nil] 3)
(fset 'nntp/article-get-xrefs #[nil "	Heb#e`}ebg=!#͕bu	``{I*" [gnus-digest-mode gnus-current-headers 3 t case-fold-search search-forward "\n\n" nil end 120 looking-at "Xref:" "\nXref:" 0] 4 "\
Fill in the Xref value in 'gnus-current-headers, if necessary.
This is meant to be called in 'gnus-Article-prepare-hook."])
(byte-code "MMMMM" [nntp/headers #[(sequence) " \n!\n!" [nntp/clear nntp/send-head-requests sequence nntp/parse-headers] 2] nntp/send-head-requests #[(sequence) "!\nG\n\n@Q\"ʦU\"!\\\nAY*" [message "NNTP: requesting headers..." sequence 0 count L process-send-string nntp/connection "HEAD " "\n" 5000 gnus-lazy-message "NNTP: requesting headers... %d%%" accept-process-output 100 nil] 6] nntp/parse-headers #[(sequence) "!G\"!qe}ebgXgYp!))e|)=!!qe}@!B)e|)!qy)ԦU\"\\A," [message "NNTP: parsing headers..." nil sequence 0 count L code headers chat/wait-for-string "\n" nntp/connection process-buffer chat/data-marker 57 48 read 221 chat/wait-for-dot-crlf nntp/parse-header 5000 gnus-lazy-message "NNTP: parsing headers... %d%%" 100] 5] nntp/header-value #[nil "bw`h=!ug>!!c_`S{" [0 "	 " nil 13 delete-char -1 (9 32) 1 32] 3] nntp/parse-header #[(number) "\"IIm!ysg= Ib= IT= IF= !I6= I(= I= IHIHIH;!QH\"H͔͕#@I+" [make-vector 8 nil t char case-fold-search header 0 number 4 looking-at "subject:\\|from:\\|xref:\\|lines:\\|date:\\|message-id:\\|references:" 115 1 nntp/header-value 102 2 120 3 108 string-to-int 100 5 109 6 114 7 "" nntp/group string-match "[ 	]" regexp-quote ":\\([0-9]+\\)" read-from-string] 7]] 2)
(fset 'nntp-request-list-newsgroups #[nil "! = " [nntp/command "LIST NEWSGROUPS" nntp/response 215 nntp/wait-for-text] 2 "\
List newsgroups (defined in NNTP2)."])
(fset 'nntp-request-list-distributions #[nil "! = " [nntp/command "LIST DISTRIBUTIONS" nntp/response 215 nntp/wait-for-text] 2 "\
List distributions (defined in NNTP2)."])
(provide 'nntp)
