
(defvar ftp-password-alist nil "\
Security sucks")

(defun read-ftp-user-password (host user new) (byte-code "Æ	?…  
<…  Ç
\"A‰…  ?†  È@\"ƒ' ‚— †R 
<…6 Ç
\"A@†; É ‰ˆÊËÌ#!‰ˆÍÎ\"…R ‰ˆÊËÏ#
<?ƒd Î‚w Ç
\"AA†w 
ÐÑ�)†w Î\"B‰ˆÒÎ!ˆ
<…‹ ÈAÎ\"?…• B
B‰ˆ)‡" [tem new ftp-password-alist host user l nil assoc string= user-login-name read-string format "User-name for %s (default \"%s\"): " equal "" "Password for %s@%s: " foo (byte-code "…  Ã@A@	\"ƒ ÄÅ@AA\"‚ A‰ˆ‚  ˆÂ‡" [l user nil string= throw foo] 5) message] 14))

(defun ftp-read-file-name (prompt) (byte-code "ÂÃÄ\"?… Å	\"‰ˆ‚ ˆÆÇ!ÈÇ!OÆÉ!ÈÉ!OD)‡" [s prompt "" string-match "\\`[ 	]*\\([^ 	:]+\\)[ 	]*:\\(.+\\)\\'" read-string match-beginning 1 match-end 2] 10))

(defun ftp-find-file (host file &optional user password) "\
FTP to HOST to get FILE, logging in as USER with password PASSWORD.
Interactively, HOST and FILE are specified by reading a string with
 a colon character separating the host from the filename.
USER and PASSWORD are defaulted from the values used when
 last ftping from HOST (unless password-remembering is disabled).
 Supply a password of the symbol `t' to override this default
 (interactively, this is done by giving a prefix arg)" (interactive (byte-code "ÂÃÄ!À	??D\"‡" [nil current-prefix-arg append ftp-read-file-name "FTP get host:file: "] 5)) (byte-code "ÀˆÇ
Ä%‡" [nil current-prefix-arg host file t user password ftp-find-file-or-directory] 6))

(defun ftp-list-directory (host file &optional user password) "\
FTP to HOST to list DIRECTORY, logging in as USER with password PASSWORD.
Interactively, HOST and FILE are specified by reading a string with
 a colon character separating the host from the filename.
USER and PASSWORD are defaulted from the values used when
 last ftping from HOST (unless password-remembering is disabled).
 Supply a password of the symbol `t' to override this default
 (interactively, this is done by giving a prefix arg)" (interactive (byte-code "ÂÃÄ!À	??D\"‡" [nil current-prefix-arg append ftp-read-file-name "FTP get host:directory: "] 5)) (byte-code "ÀˆÆ
À%‡" [nil current-prefix-arg host file user password ftp-find-file-or-directory] 6))

(defun ftp-find-file-or-directory (host file filep &optional user password) "\
FTP to HOST to get FILE.  Third arg is t for file, nil for directory.
Log in as USER with PASSWORD.  If USER is nil or PASSWORD is nil or t,
we prompt for the user name and password." (byte-code "… 	… 	Â=?† Ì	Â=#A@‰ˆÍÎÏƒ* Ð‚+ Ñ$!qˆÒ\"ÉÉ
ÓŽÔ	$‰
ƒV ÕÖ!‚Y ×Ø!))ˆÕÙƒf Ú‚g Û$ˆÜÎÝƒy Þ‚z ß#àá$ƒ¢ âã!ˆÉäe`\")ˆÕå#ˆæç\"ˆ‚¹ è!ˆÉéê!)ˆë!ˆ×ì#*)‡" [user password t host buffer filep file process case-fold-search nil win buffer-read-only read-ftp-user-password get-buffer-create format "*ftp%s %s:%s*" "" "-directory" ftp-setup-buffer ((byte-code "† Â	!‡" [win process delete-process] 2)) ftp-login message "Logged in" error "Ftp login lost" "Opening %s %s:%s..." "file" "directory" ftp-command "%s \"%s\" -
quit
" "get" "dir" "\\(150\\|125\\).*
" "200.*
" forward-line 1 delete-region "Retrieving %s:%s in background.  Bye!" set-process-sentinel ftp-asynchronous-input-sentinel switch-to-buffer insert-before-markers "<<<Ftp lost>>>" delete-process "Ftp %s:%s lost"] 21))

(defun ftp-write-file (host file &optional user password) "\
FTP to HOST to write FILE, logging in as USER with password PASSWORD.
Interactively, HOST and FILE are specified by reading a string with colon
separating the host from the filename.
USER and PASSWORD are defaulted from the values used when
 last ftping from HOST (unless password-remembering is disabled).
 Supply a password of the symbol `t' to override this default
 (interactively, this is done by giving a prefix arg)" (interactive (byte-code "ÂÃÄ!À	??D\"‡" [nil current-prefix-arg append ftp-read-file-name "FTP write host:file: "] 5)) (byte-code "Àˆ
… … Ä=?†  Î
Ä=#
A
@‰ˆÏÐÑ#!ÒÓ!Ôed#ˆqˆÕÉ!ˆ‰	ˆÖ\"À
À×ŽØ

$‰ƒg ÙÚ!‚j ÛÜ!))ˆÙÝ#ˆÞ
Ðß#àá$ƒ£ âã!ˆÀäe`\")ˆÙå#ˆæ
ç\"ˆ
‚» è!ˆÀéê!)ˆë
!ˆÛì#**‡" [nil current-prefix-arg user password t host buffer file tmp ftp-temp-file-name process case-fold-search win buffer-read-only read-ftp-user-password get-buffer-create format "*ftp %s:%s*" make-temp-name "/tmp/emacsftp" write-region make-local-variable ftp-setup-buffer ((byte-code "† Â	!‡" [win process delete-process] 2)) ftp-login message "Logged in" error "Ftp login lost" "Opening file %s:%s..." ftp-command "send \"%s\" \"%s\"
quit
" "\\(150\\|125\\).*
" "200.*
" forward-line 1 delete-region "Saving %s:%s in background.  Bye!" set-process-sentinel ftp-asynchronous-output-sentinel switch-to-buffer insert-before-markers "<<<Ftp lost>>>" delete-process "Ftp write %s:%s lost"] 24))

(defun ftp-setup-buffer (host file) (byte-code "Ç ˆÈp!…1 É ˆÊËÌÍÈp!!Îp!#!ƒ. Èp!…+ ÏÈp!!ˆ‚ ‚1 ÐÑ!ˆÁ‰ˆÒ ˆÓÂ!ˆ‰ˆÓÄ!ˆ‰ˆÆ‰ˆÔÕpÕÖ×Ø&‡" [buffer-read-only nil ftp-host host ftp-file file t fundamental-mode get-buffer-process discard-input y-or-n-p format "Kill process \"%s\" in %s? " process-name buffer-name kill-process error "Foo" erase-buffer make-local-variable start-process "ftp" "-i" "-n" "-g"] 22))

(defun ftp-login (process host user password) (byte-code "ÇÈ	#ˆÉ
ÊË	$ÌÍ$ƒ Ä‚2 ÎÏ
!!ˆÐ
!ˆ<…0 ÑÒ	\"\"‰ˆÆ‡" [user host process password t ftp-password-alist nil message "FTP logging in as %s@%s..." ftp-command format "open %s
user %s %s
" "230.*
" "\\(Connected to \\|220\\|331\\).*
" switch-to-buffer process-buffer delete-process delq assoc] 10))

(defun ftp-command (process command win ignore) (byte-code "È	\"ˆÉÄÊ
!…b Ë!ƒ dbˆÄ‰‚^ ËÌ!ƒ+ ÍÎ!b‚^ Ë!ƒ8 ÏÉ!‚^ ÐÑÇÄ#?ƒO `‰ˆÇÒÓ�ˆ
b‚^ ËÔ!ƒ[ ÏÉ!‚^ Ç‰ˆ‚	 ˆ
*‡" [process command p case-fold-search t win ignore nil process-send-string 1 numberp looking-at "^ftp> \\|^
" match-end 0 forward-line search-forward "
" (byte-code "Á!‡" [process accept-process-output] 2) ((error (byte-code "À‡" [nil] 1))) "^[a-z]"] 13))

(defun ftp-asynchronous-input-sentinel (process msg) (byte-code "Ã	ÂÂ$‡" [process msg t ftp-sentinel] 5))

(defun ftp-synchronous-input-sentinel (process msg) (byte-code "Ä	ÂÃ$‡" [process msg nil t ftp-sentinel] 5))

(defun ftp-asynchronous-output-sentinel (process msg) (byte-code "Ä	ÂÃ$‡" [process msg t nil ftp-sentinel] 5))

(defun ftp-synchronous-output-sentinel (process msg) (byte-code "Ã	ÂÂ$‡" [process msg nil ftp-sentinel] 5))

(defun ftp-sentinel (process msg asynchronous input) (byte-code "ÍÎ!!?ƒ ÏÁ\"‚Ð!Ñ=… Ò!ÓUƒÐ ŠÎ!qˆÁƒ/ Ô‚0 ÕdbˆÖ×!ˆØ!…B Ö×!ˆ`ÙÚƒO Û‚P Ü$ÝÁÈ#ƒj ÞßàÓ!áÓ!\"P‚k âP‰ˆÁ	ãd\")ˆŠäå!qˆÁ	æ
ç\"))ˆèÁ!)ˆ?ƒ� Áéê�ˆëp!‚½ ìÙí#!
Í
!ë
!ˆ‰
ˆî
!ˆï )ˆ…Ë ðñ
\"ˆòó!*)‚Ð!ô>…ŠÎ!qˆÙõÍp!
#‰ˆÁ	dbˆæçç
#)ˆö!ˆäå!qˆÁ	dbˆ
c)ˆ÷ …øñ
\")‡" [process nil msg r input p ftp-host ftp-file t buffer-read-only kludge asynchronous proc buffer-name process-buffer set-process-buffer process-status exit process-exit-status 0 "[0-9]+ bytes received in [0-9]+\\.[0-9]+ seconds.*$" "[0-9]+ bytes sent in [0-9]+\\.[0-9]+ seconds.*$" search-backward "226 " looking-at format "ftp %s %s:%s done" "read" "write" re-search-forward ": " buffer-substring match-beginning match-end "" delete-region get-buffer-create "*ftp log*" insert 10 set-buffer-modified-p (byte-code "ÁÀ!… … Â!‡" [ftp-temp-file-name boundp delete-file] 3) ((error (byte-code "À‡" [nil] 1))) kill-buffer generate-new-buffer "%s:%s (ftp)" rename-buffer ftp-setup-write-file-hooks message "%s" sleep-for 2 (exit signal) "Ftp died (buffer %s): %s" delete-process waiting-for-user-input-p error] 38))

(defun ftp-setup-write-file-hooks nil (byte-code "	ÇÁ!ˆÈ	É\"‰)ˆÇÂ!ˆÊ‰ˆË‰ˆÌÍp!!P‰ˆÆ‰‡" [hooks write-file-hooks revert-buffer-function default-directory buffer-file-name buffer-read-only nil make-local-variable append (ftp-write-file-hook) ftp-revert-buffer "/tmp/" make-temp-name buffer-name] 7))

(defun ftp-write-file-hook nil (byte-code "Å	
\"ÆÇ\"ˆÈÉ	
#ˆÊ!Ë=…  ÃÌÍ�ˆ‚ ˆÊ!Î=…4 Ï!ÐU…4 ÑÃ!)ˆÈÒ!ˆÄ‡" [process ftp-host ftp-file nil t ftp-write-file set-process-sentinel ftp-synchronous-output-sentinel message "FTP writing %s:%s..." process-status run (byte-code "Á!‡" [process accept-process-output] 2) ((error (byte-code "À‡" [nil] 1))) exit process-exit-status 0 set-buffer-modified-p "Written"] 9))

(defun ftp-revert-buffer (&rest ignore) (byte-code "Ä	
\"ÅÆ\"ˆÇÈ	
#ˆÉ!Ê=…  ÃËÌ�ˆ‚ ˆÉ!Í=…4 Î!ÏU…4 ÐÃ!ˆÇÑ!)‡" [process ftp-host ftp-file nil ftp-find-file set-process-sentinel ftp-synchronous-input-sentinel message "FTP reverting %s:%s" process-status run (byte-code "Á!‡" [process accept-process-output] 2) ((error (byte-code "À‡" [nil] 1))) exit process-exit-status 0 set-buffer-modified-p "Reverted"] 9))
