;ELC   
;;; Compiled by root@porky.devel.redhat.com on Wed Apr  7 03:36:26 2004
;;; from file /usr/src/build/385100-i386/BUILD/emacs-w3m-1.3.6/w3m-cookie.el
;;; in Emacs version 21.3.1
;;; with bytecomp version 2.85.4.1
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.
(if (and (boundp 'emacs-version)
	 (< (aref emacs-version (1- (length emacs-version))) ?A)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`w3m-cookie.el' was compiled for Emacs 19.29 or later"))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(byte-code "\300\301!\210\300\302!\207" [require w3m-util w3m] 2)
#@77 A list of cookie elements.
Currently only browser local cookies are stored.
(defvar w3m-cookies nil (#$ . 709))
#@124 A regular expression of top-level domains that only require two matching
'.'s in the domain name in order to set a cookie.
(defconst w3m-cookie-two-dot-domains-regexp (byte-code "\300\301\302\303\304\305\306\307\310\311\257\312#\313Q\207" ["\\.\\(" mapconcat identity "com" "edu" "net" "org" "gov" "mil" "int" "\\|" "\\)$"] 10) (#$ . 828))
#@39 A list of trusted domain name string.
(custom-declare-variable 'w3m-cookie-accept-domains 'nil '(#$ . 1175) :group 'w3m :type '(repeat string))
#@41 A list of untrusted domain name string.
(custom-declare-variable 'w3m-cookie-reject-domains 'nil '(#$ . 1325) :group 'w3m :type '(repeat string))
#@113 If nil, don't accept bad cookies.
If t, accept bad cookies.
If ask, ask user whether accept bad cookies or not.
(custom-declare-variable 'w3m-cookie-accept-bad-cookies 'nil '(#$ . 1478) :group 'w3m :type '(choice (const :tag "Don't accept bad cookies" nil) (const :tag "Ask accepting bad cookies" ask) (const :tag "Always accept bad cookies" t)))
#@33 File in which cookies are kept.
(custom-declare-variable 'w3m-cookie-file '(expand-file-name ".cookie" w3m-profile-directory) '(#$ . 1831) :group 'w3m :type 'file)
(defalias 'w3m-cookie-url '(macro . #[(cookie) "\301\302BB\207" [cookie aref (0)] 3]))
(defalias 'w3m-cookie-domain '(macro . #[(cookie) "\301\302BB\207" [cookie aref (1)] 3]))
(defalias 'w3m-cookie-secure '(macro . #[(cookie) "\301\302BB\207" [cookie aref (2)] 3]))
(defalias 'w3m-cookie-name '(macro . #[(cookie) "\301\302BB\207" [cookie aref (3)] 3]))
(defalias 'w3m-cookie-value '(macro . #[(cookie) "\301\302BB\207" [cookie aref (4)] 3]))
(defalias 'w3m-cookie-path '(macro . #[(cookie) "\301\302BB\207" [cookie aref (5)] 3]))
(defalias 'w3m-cookie-version '(macro . #[(cookie) "\301\302BB\207" [cookie aref (6)] 3]))
(defalias 'w3m-cookie-expires '(macro . #[(cookie) "\301\302BB\207" [cookie aref (7)] 3]))
(defalias 'w3m-cookie-ignore '(macro . #[(cookie) "\301\302BB\207" [cookie aref (8)] 3]))
(defalias 'w3m-cookie-create #[(&rest args) "\302\303\304\"\211\305\306	\307\"I\210\310\306	\311\"I\210\312\306	\313\"I\210\314\306	\315\"I\210\316\306	\317\"I\210\320\306	\321\"I\210\322\306	\323\"\206? \305I\210\324\306	\325\"I\210\326\306	\327\"I\210)\207" [cookie args make-vector 9 nil 0 plist-get :url 1 :domain 2 :secure 3 :name 4 :value 5 :path 6 :version 7 :expires 8 :ignore] 6])
(put 'w3m-cookie-create 'byte-optimizer 'byte-compile-inline-expand)
#@15 Store COOKIE.
(defalias 'w3m-cookie-store #[(cookie) "\303\304\305\215\210?\205 	\nB\211)\207" [ignored cookie w3m-cookies nil found (byte-code "\305\211\203E \n@\211\306H\306H\230\203> 	\307H\307H\230\203> 	\310H\310H\230\203> 	\311H\2034 \312\2029 \313	\"\314\315\312\"\210\nA\211\204 *\305\207" [w3m-cookies c #1=#:--dolist-temp--94986 cookie ignored nil 1 5 3 8 t delq throw found] 4)] 2 (#$ . 3283)])
#@26 Remove COOKIE if stored.
(defalias 'w3m-cookie-remove #[(domain path name) "\306\211\203/ \n@\211\307H\230\203( 	\310H\f\230\203( 	\311H\230\203( \312	\"\nA\211\204 *\306\207" [w3m-cookies c #1=#:--dolist-temp--94987 domain path name nil 1 5 3 delq] 4 (#$ . 3711)])
#@39 Retrieve cookies for DOMAIN and PATH.
(defalias 'w3m-cookie-retrieve #[(host path &optional secure) "\306\307\211\307\211\203\223 @\211\310H\203T \311 \312\f\310H!\211\205I ?\206I @@V\206I @@U\205I A@A@V*\203T \f	B\202\214 \f\313H\204\214 \314\315\f\316H!\317P\"\203\214 \314\320\315\f\321H!P\"\203\214 \f\322H\203\210 \203\214 \fB\202\214 \fBA\211\204 *	\307\211\203\262 @\323\"A\211\204\236 *+\207" [cookies expires case-fold-search w3m-cookies c #1=#:--dolist-temp--94988 t nil 7 current-time w3m-time-parse-string 8 string-match regexp-quote 1 "$" "^" 5 2 delq b a host path secure expire #2=#:--dolist-temp--94989] 6 (#$ . 3993)])
#@29 Parse an absolute HTTP URL.
(defalias 'w3m-parse-http-url #[(url) "\305\211\306\n\"\205W \307\310\"\311\230\204 \307\310\"\312\230\211\205W \313\224\205W \313\225\205W \314 \315\216\316\307\313\"\317\"*\320	@\321A@\206C \322!\307\323\"G\324=\203R \325\202V \307\323\"$*\207" [split secure w3m-url-components-regexp url save-match-data-internal nil string-match match-string 2 "http" "https" 4 match-data ((set-match-data save-match-data-internal)) split-string ":" vector string-to-number "80" 5 0 "/"] 7 (#$ . 4692)])
#@30 Secure flag of the HTTP-URL.
(defalias 'w3m-http-url-secure #[(http-url) "\301H\207" [http-url 0] 2 (#$ . 5231)])
(put 'w3m-http-url-secure 'byte-optimizer 'byte-compile-inline-expand)
#@28 Host name of the HTTP-URL.
(defalias 'w3m-http-url-host #[(http-url) "\301H\207" [http-url 1] 2 (#$ . 5423)])
(put 'w3m-http-url-host 'byte-optimizer 'byte-compile-inline-expand)
#@30 Port number of the HTTP-URL.
(defalias 'w3m-http-url-port #[(http-url) "\301H\207" [http-url 2] 2 (#$ . 5609)])
(put 'w3m-http-url-port 'byte-optimizer 'byte-compile-inline-expand)
#@23 Path of the HTTP-URL.
(defalias 'w3m-http-url-path #[(http-url) "\301H\207" [http-url 3] 2 (#$ . 5797)])
(put 'w3m-http-url-path 'byte-optimizer 'byte-compile-inline-expand)
#@45 A syntax table for parsing sgml attributes.
(defvar w3m-cookie-parse-args-syntax-table (copy-syntax-table emacs-lisp-mode-syntax-table) (#$ . 5978))
(byte-code "\301\302\303#\210\301\304\303#\210\301\305\306#\210\301\307\310#\207" [w3m-cookie-parse-args-syntax-table modify-syntax-entry 39 "\"" 96 123 "(" 125 ")"] 4)
(defalias 'w3m-cookie-parse-args #[(str &optional nodowncase) "\306\211\211\211\211\211\211\212\214\307\310!q\210\311!\210\312 \210c\210ed\311!\210	}\210eb\210m\204\243 \313\306w\210`\314\306w\210\204J \315`\"\210`{\316\306w\210`f\206Y \317\320U\204c \306\202\225 \321\306w\210`\211f\206o \317\322U\204 \nf\206z \317\323U\203\211 \nT\306\324\325\217{\202\224 \n\326\306w\210\327\306x\210`{B\fB\313\306w\210\2022 \f.	\207" [nd st val-pos name-pos results value nil get-buffer-create " *w3m-cookie-parse-temp*" set-syntax-table erase-buffer "; \n	" "^ \n	=;" downcase-region " 	\n" 0 61 " 	\n=" 34 39 (byte-code "\300\301!\210`S\302\303w\210\207" [forward-sexp 1 "\"" nil] 3) ((error (byte-code "\300\301w\210`\207" ["^ 	\n" nil] 2))) "^;" " 	" name w3m-cookie-parse-args-syntax-table str nodowncase] 8])
#@64 Returns non-nil when the HOST is specified as trusted by user.
(defalias 'w3m-cookie-trusted-host-p #[(host) "	\306\307\211\211\203f @\310\230\203  \311\202K @\312\230\203- \313\202K \314@!\315=\203B \316@!\317P\202K \320\316@!\317Q\321\f\"\203[ @G\307\211A@\210\202 \203\300 @\310\230\203x \311\202\243 @\312\230\203\205 \313\202\243 \314@!\315=\203\232 \316@!\317P\202\243 \320\316@!\317Q\321\f\317P\"\203\265 @G\307\211A@\210\202f \203\323 \n\203\331 \nX\203\331 \307\202\331 \n\203\331 \307.\207" [w3m-cookie-accept-domains w3m-cookie-reject-domains rlen tlen regexp trusted t nil "." ".*" ".local" "^[^\\.]+$" string-to-char 46 regexp-quote "$" "^" string-match reject accept host] 6 (#$ . 7141)])
(defalias 'w3m-cookie-1-acceptable-p #[(host domain) "\306\307\310\311\312\313#\211\203 TT\202\n \312\"\203' \314\230\2032 \310\202E 	Y\203D \312\315!\316P\"\202E \307-\207" [domain mindots case-fold-search last tmp numdots 0 nil t 3 string-match "\\." 2 regexp-quote "$" w3m-cookie-two-dot-domains-regexp host] 5])
(defalias 'w3m-cookie-1-set #[(url &rest args) "\306!\307\310\211\211\211\2110\2111\205a\31123\2114\227\310563\203L 3@:\203C 63@@\227\230\203C 3@5\31033A\2113\204) 5,\205S \307\31223\2114\227\310563\203\212 3@:\203\201 63@@\227\230\203\201 3@5\31033A\2113\204g 5,\243\206\231 1\2111\313H)\31423\2114\227\310563\203\320 3@:\203\307 63@@\227\230\203\307 3@5\31033A\2113\204\255 5,\243\31523\2114\227\310563\2033@:\20363@@\227\230\2033@5\31033A\2113\204\350 5,\243\206\3161\2111\317H)!2\203;2@@\227\320\235\20422@	B2A\2112\204\"\3211\2111\313H)!\204L\310\202a\3221\2111\313H)\f\"\204y7\307=\204y7\323=\203U\324\325\3261\2111\313H)\f#!\203U	\3108\2119\203P9@8\203\310\327 \330!:\211;\205\274:?\206\274;@:@V\206\274;@:@U\205\274;A@:A@V*\203\310\331\f\n8@#\210\332\333\334\f\3358@\3368A\337\n\340\341\2572\342\343\310\"\211<\344\3452\333\"I\210<\313\3452\334\"I\210<\346\3452\341\"I\210<\317\3452\335\"I\210<\347\3452\336\"I\210<\350\3452\337\"I\210<\351\3452\352\"\206,\344I\210<\353\3452\340\"I\210<\354\3452\355\"I\210<*!\2109A\2119\204\203*\310\202a\356\3571\2111\313H)\f#.\207" [url rest path expires domain secure w3m-parse-http-url t nil "secure" "domain" 1 "expires" "path" file-name-directory 3 ("secure" "domain" "expires" "path") w3m-cookie-trusted-host-p w3m-cookie-1-acceptable-p ask y-or-n-p format "Accept bad cookie from %s for %s? " current-time w3m-time-parse-string w3m-cookie-remove w3m-cookie-store :url :domain :name :value :path :expires :secure make-vector 9 0 plist-get 2 4 5 6 :version 7 8 :ignore message "%s tried to set a cookie for domain %s - rejected." case-fold-search http-url args alist name match dname w3m-cookie-accept-bad-cookies elem #1=#:--dolist-temp--94990 b a cookie] 17])
(defalias 'w3m-cookie-2-acceptable-p #[(http-url domain) "\300\207" [nil] 1])
(defalias 'w3m-cookie-2-set #[(url &rest args) "\300\207" [nil] 1])
(byte-code "\301B\302\301!\204\f \303\303\207" [current-load-list w3m-cookie-init boundp nil] 2)
#@20 Clear cookie list.
(defalias 'w3m-cookie-clear #[nil "\301\211\207" [w3m-cookies nil] 2 (#$ . 10383)])
#@15 Save cookies.
(defalias 'w3m-cookie-save #[nil "\306	\306\211\203K @\211\307H\203D \310\n\307H!\311 \211\205< \f?\206< @\f@V\206< @\f@U\205< A@\fA@V*\203D \nBA\211\204\n *\312\")\207" [cookies w3m-cookies cookie #1=#:--dolist-temp--94991 b a nil 7 w3m-time-parse-string current-time w3m-save-list w3m-cookie-file] 4 (#$ . 10493)])
#@15 Load cookies.
(defalias 'w3m-cookie-load #[nil "?\205\n \302	!\211\207" [w3m-cookies w3m-cookie-file w3m-load-list] 2 (#$ . 10847)])
#@60 Setup cookies. Returns immediataly if already initialized.
(defalias 'w3m-cookie-setup #[nil "?\205 \301 \210\302\211\207" [w3m-cookie-init w3m-cookie-load t] 2 (#$ . 10988) nil])
#@15 Save cookies.
(defalias 'w3m-cookie-shutdown #[nil "\301 \210\302\303 \210\304\305!\205 \306\304\305!!\207" [w3m-cookie-init w3m-cookie-save nil w3m-cookie-clear get-buffer " *w3m-cookie-parse-temp*" kill-buffer] 3 (#$ . 11177) nil])
#@115 Register cookies which correspond to URL.
BEG and END should be an HTTP response header region on current buffer.
(defalias 'w3m-cookie-set #[(url beg end) "\306 \210\205I 	\205I \n\205I \212\307\310\311	b\210\312\313\n\307#\205H \314\315!\316\224\203, \317\320\f\310=\2037 \321\202> \f\317=\205> \322\323\324\"#\210\202 ,\207" [url beg end data version case-fold-search w3m-cookie-setup t 0 nil re-search-forward "^\\(Set-Cookie\\(2\\)?:\\) *\\(.*\\(\n[ 	].*\\)*\\)\n" match-string 3 2 1 apply w3m-cookie-1-set w3m-cookie-2-set w3m-cookie-parse-args nodowncase] 6 (#$ . 11420)])
#@57 Get a cookie field string which corresponds to the URL.
(defalias 'w3m-cookie-get #[(url) "\303 \210\304!\211\205 \305	\211\306H)	\211\307H)	\211\310H)#\311\n\312\"\211\205. \313\314\n\315#*\207" [url http-url cookies w3m-cookie-setup w3m-parse-http-url w3m-cookie-retrieve 1 3 0 sort #[(x y) "\302HG	\302HGW\207" [x y 5] 3] mapconcat #[(cookie) "\301H\302\303HQ\207" [cookie 3 "=" 4] 4] "; "] 6 (#$ . 12015)])
#@15 Cookie setup.
(defalias 'w3m-cookie #[(&optional no-cache) "\301\302\"\207" [no-cache w3m-goto-url "about://cookie/"] 3 (#$ . 12443) "P"])
#@15 Cookie setup.
(defalias 'w3m-about-cookie #[(url &optional no-decode no-cache post-data &rest args) "\204 \306\307!\210\310 \210\311\n\203@ \312\n\313\"\314\211\203? \f@\312\315\"\316@!8\317\316\2111A@)!\311=I\210\fA\211\204 *\320c\210\3142\2113\203\334 3@2\3212\311H\3222\311H\323\324\3252\326H\3152\327H\3302\331H\205w \3322\331H\330Q\333\3342\335H!\3302\336H\205\215 \3372\336H\330Q2\340H\205\233 \3412\340H\330Q\3422\343H\203\247 \344\202\250 \345\346\347\350\351	2\317H\203\270 \352\202\271 \353#\354\350\355	2\317H\203\311 \353\202\312 \352#\356\260c\210	T3A\2113\204M *\357c\210)\360\207" [w3m-use-cookies pos post-data pair #1=#:--dolist-temp--94992 w3m-cookies error "You must enable cookies." w3m-cookie-setup 0 split-string "&" nil "=" string-to-number 8 "<html><head><title>Cookies</title></head>\n<body><center><b>Cookies</b></center>\n<p><form method=\"post\" action=\"about://cookie/\">\n<ol>" "<li><h1><a href=\"" "\">" "</a></h1>" "<table cellpadding=0>" "<tr><td width=\"80\"><b>Cookie:</b></td><td>" 3 4 "</td></tr>" 7 "<tr><td width=\"80\"><b>Expires:</b></td><td>" "<tr><td width=\"80\"><b>Version:</b></td><td>" number-to-string 6 1 "<tr><td width=\"80\"><b>Domain:</b></td><td>" 5 "<tr><td width=\"80\"><b>Path:</b></td><td>" "<tr><td width=\"80\"><b>Secure:</b></td><td>" 2 "Yes" "No" "</td></tr><tr><td>" "<tr><td width=\"80\"><b>Use:</b></td><td>" format "<input type=radio name=\"%d\" value=1%s>Yes" "" " checked" "&nbsp;&nbsp;" "<input type=radio name=\"%d\" value=0%s>No" "</td></tr><tr><td><input type=submit value=\"OK\"></table><p>" "</ol></form></body></html>" "text/html" x cookie #2=#:--dolist-temp--94993] 29 (#$ . 12589)])
(provide 'w3m-cookie)
