;ELC ;;; compiled by jwz@thalidomide on Tue Apr 5 00:48:33 1994 ;;; from file /th/jwz/emacs19/lisp/dired/ange-ftp.el ;;; emacs version 19.10 Lucid (beta11). ;;; bytecomp version 2.23; 22-dec-93. ;;; 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.")) (defvar ange-ftp-path-format '("^/\\(\\([^@/:]*\\)@\\)?\\([^@/:]*\\):\\(.*\\)" 3 2 4) "\ *Format of a fully expanded remote pathname. This is a cons (REGEXP . (HOST USER PATH)), where REGEXP is a regular expression matching the full remote pathname, and HOST, USER, and PATH are the numbers of parenthesized expressions in REGEXP for the components (in that order).") (defvar ange-ftp-multi-msgs "^220-\\|^230-\\|^226\\|^25.-\\|^221-\\|^200-\\|^530-\\|^4[25]1-" "\ *Regular expression matching messages from the ftp process that start a multiline reply.") (defvar ange-ftp-good-msgs "^220 \\|^230 \\|^226 \\|^25. \\|^221 \\|^200 \\|^[Hh]ash mark" "\ *Regular expression matching messages from the ftp process that indicate that the action that was initiated has completed successfully.") (defvar ange-ftp-skip-msgs (concat "^200 \\(PORT\\|Port\\) \\|^331 \\|^150 \\|^350 \\|^[0-9]+ bytes \\|" "^Connected \\|^$\\|^Remote system\\|^Using\\|^ \\|Password:\\|" "^local:\\|^Trying\\|^125 \\|^550-\\|^221 .*oodbye") "\ *Regular expression matching messages from the ftp process that can be ignored.") (defvar ange-ftp-fatal-msgs (concat "^ftp: \\|^Not connected\\|^530 \\|^4[25]1 \\|rcmd: \\|" "^No control connection\\|unknown host\\|^lost connection") "\ *Regular expression matching messages from the FTP process that indicate something has gone drastically wrong attempting the action that was initiated and that the FTP process should (or already has) been killed.") (defvar ange-ftp-gateway-fatal-msgs "No route to host\\|Connection closed\\|No such host\\|Login incorrect" "\ *Regular expression matching messages from the rlogin / telnet process that indicates that logging in to the gateway machine has gone wrong.") (defvar ange-ftp-xfer-size-msgs "^150 .* connection for .* (\\([0-9]+\\) bytes)" "\ *Regular expression used to determine the number of bytes in a FTP transfer.") (defvar ange-ftp-tmp-name-template "/tmp/ange-ftp" "\ *Template used to create temporary files.") (defvar ange-ftp-gateway-tmp-name-template "/tmp/ange-ftp" "\ *Template used to create temporary files when ftp-ing through a gateway. Files starting with this prefix need to be accessible from BOTH the local machine and the gateway machine, and need to have the SAME name on both machines, that is, /tmp is probably NOT what you want, since that is rarely cross-mounted.") (defvar ange-ftp-netrc-filename "~/.netrc" "\ *File in .netrc format to search for passwords.") (defvar ange-ftp-disable-netrc-security-check nil "\ *If non-nil avoid checking permissions on the .netrc file.") (defvar ange-ftp-default-user nil "\ *User name to use when none is specied in a pathname. If nil, then the name under which the user is logged in is used. If non-nil but not a string, the user is prompted for the name.") (defvar ange-ftp-default-password nil "\ *Password to use when the user is the same as ange-ftp-default-user.") (defvar ange-ftp-default-account nil "\ *Account password to use when the user is the same as ange-ftp-default-user.") (defvar ange-ftp-generate-anonymous-password nil "\ *If t, use a password of user@host when logging in as the anonymous user. If a string then use that as the password. If nil then prompt the user for a password.") (defvar ange-ftp-dumb-unix-host-regexp nil "\ *If non-nil, if the host being ftp'd to matches this regexp then the FTP process uses the 'dir' command to get directory information.") (defvar ange-ftp-binary-file-name-regexp (concat "\\.g?z$\\|\\.Z$\\|\\.lzh$\\|\\.arc$\\|\\.zip$\\|\\.zoo$\\|\\.tar$\\|" "\\.dvi$\\|\\.ps$\\|\\.elc$\\|TAGS$\\|\\.gif$\\|" "\\.EXE\\(;[0-9]+\\)?$\\|\\.g?z-part-..$\\|\\.Z-part-..$") "\ *If a file matches this regexp then it is transferred in binary mode.") (defvar ange-ftp-gateway-host nil "\ *Name of host to use as gateway machine when local FTP isn't possible.") (defvar ange-ftp-local-host-regexp ".*" "\ *If a host being FTP'd to matches this regexp then the ftp process is started locally, otherwise the FTP process is started on `ange-ftp-gateway-host' instead.") (defvar ange-ftp-gateway-program-interactive nil "\ *If non-nil then the gateway program is expected to connect to the gateway machine and eventually give a shell prompt. Both telnet and rlogin do something like this.") (defvar ange-ftp-gateway-program (byte-code "=‡Ç" [system-type hpux "remsh" "rsh"] 2) "\ *Name of program to spawn a shell on the gateway machine. Valid candidates are rsh (remsh on hp-ux), telnet and rlogin. See also the gateway variable above.") (defvar ange-ftp-gateway-prompt-pattern "^[^#$%>;]*[#$%>;] *" "\ *Regexp used to detect that the logging-in sequence is completed on the gateway machine and that the shell is now awaiting input. Make this regexp as strict as possible; it shouldn't match *anything* at all except the user's initial prompt. The above string will fail under most SUN-3's since it matches the login banner.") (defvar ange-ftp-gateway-setup-term-command (byte-code "=‡Ç" [system-type hpux "stty -onlcr -echo\n" "stty -echo nl\n"] 2) "\ *Command to use after logging in to the gateway machine to stop the terminal echoing each command and to strip out trailing ^M characters.") (defvar ange-ftp-smart-gateway nil "\ *If the gateway FTP is smart enough to use proxy server, then don't bother telnetting etc, just issue a user@host command instead.") (defvar ange-ftp-smart-gateway-port "21" "\ *Port on gateway machine to use when smart gateway is in operation.") (defvar ange-ftp-send-hash t "\ *If non-nil, send the HASH command to the FTP client.") (defvar ange-ftp-binary-hash-mark-size nil "\ *Default size, in bytes, between hash-marks when transferring a binary file. If NIL, this variable will be locally overridden if the FTP client outputs a suitable response to the HASH command. If non-NIL then this value takes precedence over the local value.") (defvar ange-ftp-ascii-hash-mark-size 1024 "\ *Default size, in bytes, between hash-marks when transferring an ASCII file. This variable is buffer-local and will be locally overridden if the FTP client outputs a suitable response to the HASH command.") (defvar ange-ftp-process-verbose t "\ *If non-NIL then be chatty about interaction with the FTP process.") (defvar ange-ftp-ftp-program-name "ftp" "\ *Name of FTP program to run.") (defvar ange-ftp-gateway-ftp-program-name "ftp" "\ *Name of FTP program to run on gateway machine. Some AT&T folks claim to use something called `pftp' here.") (defvar ange-ftp-ftp-program-args '("-i" "-n" "-g" "-v") "\ *A list of arguments passed to the FTP program when started.") (defvar ange-ftp-nslookup-program nil "\ *If non-NIL then a string naming nslookup program.") (defvar ange-ftp-make-backup-files nil "\ *A list of operating systems for which ange-ftp will make Emacs backup files files on the remote host. For example, '(unix) makes sense, but '(unix vms) or '(vms) would be silly, since vms makes its own backups.") (defvar ange-ftp-retry-time 5 "\ *Number of seconds to wait before retrying if a file or listing doesn't arrive. This might need to be increased for very slow connections.") (defvar ange-ftp-auto-save 0 "\ If 1, allows ange-ftp files to be auto-saved. If 0, suppresses auto-saving of ange-ftp files. Don't use any other value.") (require 'backquote) (fset 'ange-ftp-make-hashtable #[(&optional size) " \"" [make-vector size 31 0] 3 "\ Make an obarray suitable for use as a hashtable. SIZE, if supplied, should be a prime number."]) (fset 'ange-ftp-map-hashtable #[(fun tbl) "\n\"" [mapatoms #[(sym) " N N\"" [fun sym key val] 4] tbl] 3 "\ Call FUNCTION on each key and value in HASHTABLE."]) (fset 'ange-ftp-make-hash-key '(macro . #[(key) "\nD\n\nDF" [if stringp key prin1-to-string] 5 "\ Convert KEY into a suitable key for a hashtable."])) (fset 'ange-ftp-get-hash-entry #[(key tbl) " ; ! \" N)" [intern-soft key prin1-to-string tbl sym val] 4 "\ Return the value associated with KEY in HASHTABLE."]) (fset 'ange-ftp-put-hash-entry #[(key val tbl) " ; ! \" # #)" [intern key prin1-to-string tbl sym put val] 4 "\ Record an association between KEY and VALUE in HASHTABLE."]) (fset 'ange-ftp-del-hash-entry #[(key tbl) "G ! S\" Y HI So+" [tbl len ange-ftp-make-hashtable new-tbl i ange-ftp-map-hashtable #[(k v) "  #" [k key ange-ftp-put-hash-entry v new-tbl] 4] 0] 5 "\ Copy all symbols except KEY in HASHTABLE and return modified hashtable."]) (fset 'ange-ftp-hash-entry-exists-p #[(key tbl) " ; ! \"" [intern-soft key prin1-to-string tbl] 3 "\ Return whether there is an association for KEY in TABLE."]) (fset 'ange-ftp-hash-table-keys #[(tbl) " \"\"" [sort all-completions "" tbl string-lessp] 4 "\ Return a sorted list of all the active keys in the hashtable, as strings."]) (byte-code "‡" ["Revision: 4.20.Lucid" ange-ftp-version nil] 1) (defvar ange-ftp-data-buffer-name " *ftp data*" "\ Buffer name to hold directory listing data received from ftp process.") (defvar ange-ftp-netrc-modtime nil "\ Last modified time of the netrc file from file-attributes.") (defvar ange-ftp-user-hashtable (ange-ftp-make-hashtable) "\ Hash table holding associations between HOST, USER pairs.") (defvar ange-ftp-passwd-hashtable (ange-ftp-make-hashtable) "\ Mapping between a HOST, USER pair and a PASSWORD for them.") (defvar ange-ftp-account-hashtable (ange-ftp-make-hashtable) "\ Mapping between a HOST, USER pair and a ACCOUNT password for them.") (defvar ange-ftp-files-hashtable (ange-ftp-make-hashtable 97) "\ Hash table for storing directories and their respective files.") (defvar ange-ftp-ls-cache-lsargs nil "\ Last set of args used by ange-ftp-ls.") (defvar ange-ftp-ls-cache-file nil "\ Last file passed to ange-ftp-ls.") (defvar ange-ftp-ls-cache-res nil "\ Last result returned from ange-ftp-ls.") (put 'ftp-error 'error-conditions '(ftp-error file-error error)) (fset 'ange-ftp-save-match-data '(macro . #[(&rest body) "! DC B DEE*" [make-symbol "match-data" nil case-fold-search original let (match-data) unwind-protect progn body store-match-data] 6 "\ Execute the BODY forms, restoring the global value of the match data. Before executing BODY, case-fold-search is locally bound to nil."])) (byte-code "##" [put ange-ftp-save-match-data lisp-indent-hook 0 edebug-form-hook (&rest form)] 4) (fset 'ange-ftp-message #[(fmt &rest args) "\n # !GYZOP\"*" [apply format fmt args window-width minibuffer-window max msg "> " 3 nil message "%s"] 5 "\ Output the given message, but truncate to the size of the minibuffer window."]) (byte-code "!" [boundp ange-ftp-lazy-message-time 0] 2) (fset 'ange-ftp-lazy-message #[(fmt &rest args) " A@U? #" [ange-ftp-lazy-message-time current-time apply ange-ftp-message fmt args] 4 "\ Output the given message, but truncate to the size of the minibuffer window, and don't print the message if we've printed another message less than one second ago."]) (byte-code "!M" [fboundp current-time ange-ftp-lazy-message ange-ftp-message] 2) (fset 'ange-ftp-abbreviate-filename #[(file &optional new) " Ž !Q\"ɕSO ! !!*" [match-data match-data ((store-match-data match-data)) default-directory string-match "^" regexp-quote "." file 0 nil new file-name-nondirectory file-name-directory "./"] 4 "\ Abbreviate the given filename relative to the default-directory. If the optional parameter NEW is given and the non-directory parts match, only return the directory part of the file."]) (fset 'ange-ftp-set-user #[(host user) " \n #" [ange-ftp-put-hash-entry host user ange-ftp-user-hashtable] 4 "\ For a given HOST, set or change the default USER." "sHost: \nsUser: "]) (fset 'ange-ftp-get-user #[(host) " \n \" ; \n\" \") \n \")" [ange-ftp-parse-netrc ange-ftp-get-hash-entry host ange-ftp-user-hashtable user ange-ftp-default-user t enable-recursive-minibuffers read-string format "User for %s: " user-login-name ange-ftp-set-user] 5 "\ Given a HOST, return the default USER."]) (fset 'ange-ftp-read-passwd #[(prompt &optional default) " #" [read-passwd prompt nil default] 4 "\ Read a password from the user. See documentation of `read-passwd' for more info."]) (byte-code "MM" [ange-ftp-generate-passwd-key (macro . #[(host user) " F" [concat host "/" user] 4]) ange-ftp-lookup-passwd (macro . #[(host user) "\n EE" [ange-ftp-get-hash-entry ange-ftp-generate-passwd-key host user ange-ftp-passwd-hashtable] 4])] 2) (fset 'ange-ftp-set-passwd #[(host user passwd) " Q #" [ange-ftp-put-hash-entry host "/" user passwd ange-ftp-passwd-hashtable] 4 "\ For a given HOST and USER, set or change the associated PASSWORD." (byte-code "!!!E" [read-string "Host: " "User: " ange-ftp-read-passwd "Password: "] 4)]) (fset 'ange-ftp-get-host-with-passwd #[(user) " " [ange-ftp-parse-netrc found-one (byte-code "\n\" Ŏ\"*ȇ" [ange-ftp-map-hashtable #[(host val) " Q \" \"" [ange-ftp-get-hash-entry host "/" user ange-ftp-passwd-hashtable throw found-one] 4] ange-ftp-user-hashtable match-data match-data ((store-match-data match-data)) #[(key value) "\n\"\nĔO\nĕO \")" [string-match "^[^/]*\\(/\\).*$" key 0 1 host user nil value throw found-one] 4] ange-ftp-passwd-hashtable nil] 3)] 2 "\ Given a USER, return a host we know the password for."]) (fset 'ange-ftp-get-passwd #[(host user) " \n Q \";  Ș ɘ\n\n;\n Q ! \n % Q \"\" \n#!\n #*" [ange-ftp-parse-netrc ange-ftp-get-hash-entry host "/" user ange-ftp-passwd-hashtable ange-ftp-default-user ange-ftp-default-password "anonymous" "ftp" ange-ftp-generate-anonymous-password user-login-name "@" system-name ange-ftp-get-host-with-passwd other ange-ftp-read-passwd format "passwd for %s@%s (same as %s@%s): " "Password for %s@%s: " passwd ange-ftp-set-passwd] 8 "\ Given a HOST and USER, return the FTP password, prompting if it was not previously set."]) (fset 'ange-ftp-set-account #[(host user account) " Q #" [ange-ftp-put-hash-entry host "/" user account ange-ftp-account-hashtable] 4 "\ For a given HOST and USER, set or change the associated ACCOUNT password." (byte-code "!!!E" [read-string "Host: " "User: " ange-ftp-read-passwd "Account password: "] 4)]) (fset 'ange-ftp-get-account #[(host user) " \n Q \"; " [ange-ftp-parse-netrc ange-ftp-get-hash-entry host "/" user ange-ftp-account-hashtable ange-ftp-default-user ange-ftp-default-account] 4 "\ Given a HOST and USER, return the FTP account."]) (fset 'ange-ftp-chase-symlinks #[(file) " ! ! ! Pi) " [nil temp ange-ftp-real-file-symlink-p file file-name-absolute-p file-name-directory] 2 "\ Return the filename that FILENAME references, following all symbolic links."]) (fset 'ange-ftp-parse-netrc-token #[(token limit) " \n#\nwg=u`\nwu `S{`\nw `{)" [search-forward token limit t nil beg ", \n" 34 1 "^\"" "^, \n"] 4 "\ Move along current line looking for the value of the TOKEN. Valid separators between TOKEN and its value are commas and whitespace. Second arg LIMIT is a limit for the search."]) (fset 'ange-ftp-parse-netrc-group #[nil "y`d$`ʼn \nb \" \" \" \"  \" # #\nb # \" \" \" b." [0 re-search-forward "machine\\|default" end 2 nil account password login machine start ange-ftp-parse-netrc-token "machine" "login" "password" "account" ange-ftp-set-user ange-ftp-set-passwd ange-ftp-set-account search-forward "default" t ange-ftp-default-user ange-ftp-default-password ange-ftp-default-account] 7 "\ Extract the values for the tokens `machine', `login', `password' and `account' in the current buffer. If successful, record the information found."]) (fset 'ange-ftp-parse-netrc #[nil "\n!! ! 8?  ʎ 8 = 8\"!q !  !!\"ebm xp!)\n\"! 8**" [ange-ftp-chase-symlinks ange-ftp-real-expand-file-name ange-ftp-netrc-filename file ange-ftp-real-file-attributes attr 5 ange-ftp-netrc-modtime match-data match-data ((store-match-data match-data)) ange-ftp-disable-netrc-security-check 2 user-uid string-match ".r..------" 8 generate-new-buffer "*ftp-.netrc*" ange-ftp-real-insert-file-contents buffer-file-name file-name-directory default-directory normal-mode t mapcar funcall find-file-hooks nil ange-ftp-parse-netrc-group kill-buffer ange-ftp-message "%s either not owned by you or badly protected." sit-for 1] 5 "\ If ~/.netrc file exists and has the correct permissions then extract the `machine', `login', `password' and `account' information from within." nil]) (fset 'ange-ftp-generate-root-prefixes #[nil " Î\"\n\" +" [ange-ftp-parse-netrc match-data match-data ((store-match-data match-data)) nil res ange-ftp-map-hashtable #[(key value) "\n\"\nĔO\nĕORC\nB\n*" [string-match "^[^/]*\\(/\\).*$" key 0 1 nil user host "@" ":" res] 4] ange-ftp-passwd-hashtable #[(host user) "PC\nB" [host ":" res] 2] ange-ftp-user-hashtable] 3 "\ Return a list of prefixes of the form 'user@host:' to be used when completion is done in the root directory."]) (fset 'ange-ftp-ftp-path-component '(macro . #[(n ns path) " EDCFE" [let elt nth n ns substring path (match-beginning elt) (match-end elt)] 6 "\ Extract the Nth ftp path component from NS."])) (byte-code "!!ć" [boundp ange-ftp-ftp-path-arg "" ange-ftp-ftp-path-res nil] 2) (fset 'ange-ftp-ftp-path #[(path) " \n Ŏ@\"A@   O)\nA@   O) 8   O) GU\n! \n E,*" [path ange-ftp-ftp-path-arg ange-ftp-ftp-path-res match-data match-data ((store-match-data match-data)) string-match ange-ftp-path-format ns elt host user 2 0 ange-ftp-get-user] 4 "\ Parse PATH according to ange-ftp-path-format (which see). Returns a list (HOST USER PATH), or nil if PATH does not match the format."]) (fset 'ange-ftp-replace-path-component #[(fullpath path) " Ž @ \" A8 O\n OQ**" [match-data match-data ((store-match-data match-data)) string-match ange-ftp-path-format fullpath ns 2 elt 0 path nil] 5 "\ Take a FULLPATH that matches according to ange-ftp-path-format and replace the path component with PATH."]) (byte-code "  #" [make-sparse-keymap ange-ftp-tmp-keymap define-key " " exit-minibuffer] 4) (fset 'ange-ftp-repaint-minibuffer #[nil " = \"! \n $*" [selected-window minibuffer-window string-match "Lucid" emacs-version message nil 13 t enable-recursive-minibuffers unread-command-char read-from-minibuffer "" ange-ftp-tmp-keymap] 5 "\ Gross hack to set minibuf_message = 0, so that the contents of the minibuffer will show."]) (fset 'ange-ftp-ftp-process-buffer #[(host user) " İ" ["*ftp " user "@" host "*"] 5 "\ Return the name of the buffer that collects output from the ftp process connected to the given HOST and USER pair."]) (fset 'ange-ftp-error #[(host user msg) " \"!!db !*\"C\"" [selected-window t pop-up-windows cur pop-to-buffer get-buffer-create ange-ftp-ftp-process-buffer host user select-window signal ftp-error format "FTP Error: %s" msg] 5 "\ Display the last chunk of output from the ftp process for the given HOST USER pair, and signal an error including MSG in the text."]) (fset 'ange-ftp-set-buffer-mode #[nil ";! !!Ɖ" [buffer-file-name ange-ftp-ftp-path auto-save-mode ange-ftp-auto-save make-variable-buffer-local revert-buffer-function ange-ftp-revert-buffer] 2 "\ Set the correct modes for the current buffer if it is visiting a remote file."]) (fset 'ange-ftp-kill-ftp-process #[(buffer) "p \n !!@A@\"!*))" [buffer buffer-file-name default-directory file ange-ftp-ftp-path expand-file-name parsed user host kill-buffer ange-ftp-ftp-process-buffer] 5 "\ If the BUFFER's visited filename or default-directory is an ftp filename then kill the related ftp process." "bKill FTP process associated with buffer: "]) (fset 'ange-ftp-quote-string #[(string) " \"\"" [apply concat mapcar #[(char) "XVUU\"!" [char 32 126 34 92 vector] 3] string] 5 "\ Quote any characters in STRING that may confuse the ftp process."]) (fset 'ange-ftp-barf-if-not-directory #[(directory) " ! !ƪ E\"" [file-directory-p directory signal file-error "Opening directory" file-exists-p "not a directory" "no such file or directory"] 5]) (fset 'ange-ftp-process-handle-line #[(line proc) " \n\"\nŔŕO!\"\n\"ɇ\n\n\"  \n\n\"! \n\n\"ɉɇ \n" [string-match ange-ftp-xfer-size-msgs line ash string-to-int 1 -10 ange-ftp-xfer-size ange-ftp-skip-msgs t ange-ftp-good-msgs nil ange-ftp-process-busy ange-ftp-process-result ange-ftp-process-result-line ange-ftp-fatal-msgs delete-process proc ange-ftp-multi-msgs ange-ftp-process-multi-skip] 5 "\ Look at the given LINE from the ftp process PROC. Try to catagorize it into one of four categories: good, skip, fatal, or unknown."]) (fset 'ange-ftp-process-log-string #[(proc str) "p !q` !U !bc !`“) !b+" [old-buffer ((set-buffer old-buffer)) nil moving process-buffer proc process-mark str] 3 "\ For a given PROCESS, log the given STRING at the end of its associated buffer."]) (fset 'ange-ftp-set-xfer-size #[(host user bytes) " \n\" ! q\" )))" [ange-ftp-get-process host user proc process-buffer buf ash bytes -10 ange-ftp-xfer-size] 4 "\ Set the size of the next FTP transfer in bytes."]) (fset 'ange-ftp-process-handle-hash #[(str) "OOPZ \\ =!\n _\"U #_= #))" [str 0 nil ange-ftp-hash-mark-count ange-ftp-process-msg ange-ftp-process-verbose selected-window minibuffer-window boundp search-message cursor-in-echo-area ash ange-ftp-hash-mark-unit -6 kbytes ange-ftp-xfer-size ange-ftp-lazy-message "%s...%dk" 100 percent ange-ftp-last-percent "%s...%d%%"] 5 "\ Remove hash marks from STRING and display count so far."]) (fset 'ange-ftp-call-cont #[(cont result line) "<@=@ A$ \"" [cont lambda apply result line] 5 "\ Call the function specified by CONT. CONT can be either a function or a list of a function and some args. The first two parameters passed to the function will be RESULT and LINE. The remaining args will be taken from CONT if a list was passed."]) (fset 'ange-ftp-process-filter #[(proc str) " !p !Ŏ Ȏ !q \n \" !  \"\n P\" \"\n\"ԉOԕO\"ԕOo \")K\n?\"   ! !##)+*" [process-buffer proc old-buffer buffer buffer-name ((set-buffer old-buffer)) match-data match-data ((store-match-data match-data)) ange-ftp-hash-mark-unit ange-ftp-process-busy string-match "^#+$" str ange-ftp-process-handle-hash ange-ftp-process-log-string ange-ftp-process-string "Password: *$" send-string "\n" 0 line nil "^ftp> *" ange-ftp-process-handle-line ange-ftp-xfer-size ange-ftp-process-msg ange-ftp-process-verbose ange-ftp-process-result ange-ftp-message "%s...done" ange-ftp-repaint-minibuffer ange-ftp-process-continue cont ange-ftp-call-cont ange-ftp-process-result-line] 4 "\ Build up a complete line of output from the ftp PROCESS and pass it on to ange-ftp-process-handle-line to deal with."]) (fset 'ange-ftp-process-sentinel #[(proc str) " Ž ! \" ȔȕO ɔɕO\n \n \"*)͉*" [match-data match-data ((store-match-data match-data)) process-name proc name string-match "\\*ftp \\([^@]+\\)@\\([^*]+\\)*" 1 2 host user ange-ftp-wipe-file-entries nil ange-ftp-ls-cache-file] 4 "\ When ftp process changes state, nuke all file-entries in cache."]) (fset 'ange-ftp-use-gateway-p #[(host) "? Î \"*?" [ange-ftp-smart-gateway match-data match-data ((store-match-data match-data)) string-match ange-ftp-local-host-regexp host] 3 "\ Returns whether to access this host via a normal (non-smart) gateway."]) (fset 'ange-ftp-use-smart-gateway-p #[(host) " Î \"*?" [ange-ftp-smart-gateway match-data match-data ((store-match-data match-data)) string-match ange-ftp-local-host-regexp host] 3 "\ Returns whether to access this host via a smart gateway."]) (byte-code "!!!!‡" [boundp ange-ftp-tmp-name-files nil ange-ftp-tmp-name-hashtable ange-ftp-make-hashtable 10 ange-ftp-pid] 2) (fset 'ange-ftp-get-pid #[nil "!O" [make-temp-name "" 1 nil ange-ftp-pid] 3 "\ Half-hearted attempt to get the current process's id."]) (fset 'ange-ftp-make-tmp-name #[(host) " !\n      $  \" > ! T VX P O B -" [ange-ftp-use-gateway-p host ange-ftp-gateway-tmp-name-template ange-ftp-tmp-name-template template ange-ftp-pid ange-ftp-get-pid pid 97 start nil file entry format "%s%c%s" intern ange-ftp-tmp-name-hashtable ange-ftp-tmp-name-files ange-ftp-real-file-exists-p 122 "X"] 6 "\ This routine will return the name of a new file."]) (byte-code "M!!MM" [ange-ftp-del-tmp-name #[(temp) "\n \" \"Ǐ" [delq intern temp ange-ftp-tmp-name-hashtable ange-ftp-tmp-name-files nil (ange-ftp-real-delete-file temp) ((error))] 4] boundp ange-ftp-gwp-running t ange-ftp-gwp-status nil ange-ftp-gwp-sentinel #[(proc str) "" [nil ange-ftp-gwp-running] 2] ange-ftp-gwp-filter #[(proc str) " Ž \" \" \n !)P\" \"   !\"P\" \" !҉ \"ɉ*" [match-data match-data ((store-match-data match-data)) ange-ftp-process-log-string proc str string-match "login: *$" send-string t ange-ftp-default-user ange-ftp-get-user ange-ftp-gateway-host "\n" "Password: *$" ange-ftp-get-passwd ange-ftp-gateway-fatal-msgs delete-process nil ange-ftp-gwp-running ange-ftp-gateway-prompt-pattern ange-ftp-gwp-status] 6]] 2) (fset 'ange-ftp-gwp-start #[(host user name args) " ! $ # !\"\"!`ғ \"!u# \"\"!u# Q\"+" [ange-ftp-get-user ange-ftp-gateway-host gw-user start-process name ange-ftp-gateway-program proc mapconcat identity args " " ftp process-kill-without-query set-process-sentinel ange-ftp-gwp-sentinel set-process-filter ange-ftp-gwp-filter process-mark nil t ange-ftp-gwp-running ange-ftp-gwp-status ange-ftp-message "Connecting to gateway %s..." accept-process-output ange-ftp-error host user "unable to login to gateway" "Connecting to gateway %s...done" process-send-string ange-ftp-gateway-setup-term-command "unable to set terminal modes on gateway" "exec " "\n"] 5 "\ Login to the gateway machine and fire up an ftp process."]) (fset 'ange-ftp-raw-send-cmd #[(proc cmd &optional msg cont nowait) " !> !q x   P  \"db ܎\"щO߱c* \" !`ʓ\"? !w? B)" [process-status proc (run open) process-buffer ange-ftp-process-busy accept-process-output "" ange-ftp-process-string ange-ftp-process-result-line t nil ange-ftp-process-result ange-ftp-process-multi-skip msg ange-ftp-process-msg cont ange-ftp-process-continue 0 ange-ftp-hash-mark-count -1 ange-ftp-last-percent cmd "\n" ange-ftp-process-verbose ange-ftp-message "%s..." match-data match-data ((store-match-data match-data)) string-match "^user \"[^\"]*\"" " Turtle Power!\n" send-string process-mark nowait] 3 "\ Low-level routine to send the given ftp CMD to the ftp PROCESS. MSG is an optional message to output before and after the command. If CONT is non-NIL then it is either a function or a list of function and some arguments. The function will be called when the ftp command has completed. If CONT is NIL then this routine will return ( RESULT . LINE ) where RESULT is whether the command was successful, and LINE is the line from the FTP process that caused the command to complete. If NOWAIT is given then the routine will return immediately the command has been queued with no result. CONT will still be called, however."]) (fset 'ange-ftp-nslookup-host #[(host) "‰ $  ! !q !> !seb#ϔϕ{p!) * " [ange-ftp-nslookup-program start-process " *nslookup*" host res proc process-kill-without-query process-buffer process-status (run open) accept-process-output re-search-forward "Name:.*\nAddress: *\\(.*\\)$" nil t 1 kill-buffer] 5 "\ Attempt to resolve the given HOSTNAME using nslookup if possible." "sHost: "]) (fset 'ange-ftp-start-process #[(host user name) " !  C\"\n\n  $\nD\"$\n$\n\n!\n\"\n\"!\n!q )\n!\n," [ange-ftp-use-gateway-p host use-gateway ange-ftp-gateway-ftp-program-name ange-ftp-ftp-program-name ftp-prog append ange-ftp-ftp-program-args args nil proc ange-ftp-gateway-program-interactive ange-ftp-gwp-start user name apply start-process ange-ftp-gateway-program ange-ftp-gateway-host process-kill-without-query set-process-sentinel ange-ftp-process-sentinel set-process-filter ange-ftp-process-filter require shell process-buffer ange-ftp-shell-mode accept-process-output] 8 "\ Spawn a new ftp process ready to connect to machine HOST and give it NAME. If HOST is only ftp-able through a gateway machine then spawn a shell on the gateway machine to do the ftp instead."]) (fset 'ange-ftp-smart-login #[(host user pass account proc) " !# ## @  AP#  !% ## @ # #  AP#)" [ange-ftp-raw-send-cmd proc format "open %s %s" ange-ftp-nslookup-host ange-ftp-gateway-host ange-ftp-smart-gateway-port "Opening FTP connection to %s via %s" host result ange-ftp-error user "OPEN request failed: " "user \"%s\"@%s %s %s" pass account "Logging in as user %s@%s" ange-ftp-set-passwd nil ange-ftp-set-account "USER request failed: "] 9 "\ Connect to the FTP-server on HOST as USER using PASSWORD and ACCOUNT. PROC is the FTP-client's process. This routine uses the smart-gateway host specified in ``ange-ftp-gateway-host''."]) (fset 'ange-ftp-normal-login #[(host user pass account proc) " !\" \"#@  AP#    $ ##@  #  #  AP#)" [ange-ftp-raw-send-cmd proc format "open %s" ange-ftp-nslookup-host host "Opening FTP connection to %s" result ange-ftp-error user "OPEN request failed: " "user \"%s\" %s %s" pass account "Logging in as user %s@%s" ange-ftp-set-passwd nil ange-ftp-set-account "USER request failed: "] 8 "\ Connect to the FTP-server on HOST as USER using PASSWORD and ACCOUNT. PROC is the process to the FTP-client."]) (defvar ange-ftp-hash-mark-msgs "[hH]ash mark [^0-9]*\\([0-9]+\\)" "\ *Regexp matching the FTP client's output upon doing a HASH command.") (fset 'ange-ftp-guess-hash-mark-size #[(proc) "Š\n!q\n\"@ A  ʎ \"ΔΕO!\")." [ange-ftp-send-hash process-buffer proc ange-ftp-raw-send-cmd "hash" status result line match-data match-data ((store-match-data match-data)) string-match ange-ftp-hash-mark-msgs string-to-int 1 size ange-ftp-ascii-hash-mark-size ash -4 ange-ftp-hash-mark-unit ange-ftp-binary-hash-mark-size] 5]) (fset 'ange-ftp-get-process #[(host user) " \n\" ! !> \n\"! \n\"!  \n # ! \n  % \n  % ! \n\"!* *" [ange-ftp-ftp-process-buffer host user name get-process proc process-status (run open) ange-ftp-quote-string ange-ftp-get-passwd ange-ftp-get-account account pass ange-ftp-start-process ange-ftp-use-smart-gateway-p ange-ftp-smart-login ange-ftp-normal-login ange-ftp-guess-hash-mark-size ange-ftp-guess-host-type run-hooks ange-ftp-process-startup-hook] 7 "\ Return the process object for a FTP process connected to HOST and logged in as USER. Create a new process if needed."]) (byte-code "!!‡" [boundp ange-ftp-host-cache nil ange-ftp-host-type-cache] 2) (fset 'ange-ftp-host-type #[(host &optional user) " =\n  \" =\n!ƪ!!ɪ!!˪!!ͪ!!ϪЉ" [host ange-ftp-host-cache ange-ftp-host-type-cache user ange-ftp-get-process ange-ftp-dumb-unix-host dumb-unix fboundp ange-ftp-vos-host vos ange-ftp-vms-host vms ange-ftp-mts-host mts ange-ftp-cms-host cms unix] 3 "\ Return a symbol which represents the type of the HOST given. If the optional argument USER is given, attempts to guess the host-type by logging in as USER."]) (defvar ange-ftp-fix-path-func-alist nil "\ Association list of ( TYPE . FUNC ) pairs, where FUNC is a routine which can change a UNIX path into a path more suitable for a host of type TYPE.") (defvar ange-ftp-fix-dir-path-func-alist nil "\ Association list of ( TYPE . FUNC ) pairs, where FUNC is a routine which can change UNIX directory path into a directory path more suitable for a host of type TYPE.") (defvar ange-ftp-dumb-host-types '(dumb-unix) "\ List of host types that can't take UNIX ls-style listing options.") (fset 'ange-ftp-send-cmd #[(host user cmd &optional msg cont nowait) "@A@8\n \"=  A!8 =\" \"P > # A>\n!>\n !=\n!\n !!P PQ \n \"#\n #%&&%&?%? B." [cmd nil fix-pathname-func host-type cmd3 cmd2 cmd1 cmd0 2 ange-ftp-host-type host user dir ange-ftp-fix-dir-path-func-alist identity 3 unix string-match "/$" "R" "." ange-ftp-dumb-host-types ls format "\"%s %s\"" ange-ftp-fix-path-func-alist (get delete mkdir rmdir cd) (append put chmod) rename symbol-name " " afsc-line afsc-result ange-ftp-raw-send-cmd ange-ftp-get-process msg #[(result line host user cmd msg cont nowait) "    # \"\n D %" [cont result afsc-result line afsc-line ange-ftp-call-cont ange-ftp-raw-send-cmd ange-ftp-get-process host user cmd msg #[(result line cont) "   #" [cont result afsc-result line afsc-line ange-ftp-call-cont] 4] nowait] 6] cont nowait] 12 "\ Find an ftp process connected to HOST logged in as USER and send it CMD. MSG is an optional status message to be output before and after issuing the command. See the documentation for ange-ftp-raw-send-cmd for a description of CONT and NOWAIT."]) (byte-code "PLJ" ["^[-A-Z0-9$*][-A-Z0-9$*]?[-A-Z0-9$*]?[-A-Z0-9$*]?[-A-Z0-9$*]?" "[-A-Z0-9$*]?[-A-Z0-9$*]?[-A-Z0-9$*]?\\.[0-9][0-9][0-9A-Z]$" ange-ftp-cms-path-template "^[-A-Z0-9_$]+:\\[[-A-Z0-9_$]+\\(\\.[-A-Z0-9_$]+\\)*\\]$" ange-ftp-vms-path-template "^[A-Z0-9._][A-Z0-9._][A-Z0-9._][A-Z0-9._]:$" ange-ftp-mts-path-template nil] 2) (fset 'ange-ftp-guess-host-type #[(host user) " ! R=  ʎ \" @  !! A\" !  \" !  \" !   \" !  !A \"  $#-= $\"? \"@  P$#!!)*" [ange-ftp-host-type host "/" user "/~" key host-type unix match-data match-data ((store-match-data match-data)) ange-ftp-get-pwd result dir nil fix-path-func message "Warning! Unable to get home directory" sit-for 1 string-match "^450 No current working directory defined$" ange-ftp-add-cms-host ange-ftp-host-cache cms ange-ftp-host-type-cache ange-ftp-vms-path-template ange-ftp-add-vms-host vms ange-ftp-mts-path-template ange-ftp-add-mts-host mts ange-ftp-cms-path-template ange-ftp-fix-path-func-alist reverse ange-ftp-put-hash-entry ange-ftp-expand-dir-hashtable ange-ftp-hash-entry-exists-p] 6 "\ Guess at the the host type of HOST by doing a pwd, and examining the directory syntax."]) (byte-code "!‡" [boundp ange-ftp-shell-mode-map nil] 2) (fset 'ange-ftp-shell-mode #[nil "p!  \" \" !  db !`ϓ!L!L!L!L!L!L!L!L!L!L!L!L!L!)" [get-buffer-process proc kill-all-local-variables shell-mode ange-ftp-shell-mode-map make-sparse-keymap set-keymap-parent shell-mode-map set-keymap-name use-local-map ange-ftp-shell-mode major-mode "ange-ftp" mode-name process-mark nil make-local-variable ange-ftp-process-string "" ange-ftp-process-busy ange-ftp-process-result ange-ftp-process-msg ange-ftp-process-multi-skip ange-ftp-process-result-line ange-ftp-process-continue ange-ftp-hash-mark-count ange-ftp-binary-hash-mark-size ange-ftp-ascii-hash-mark-size ange-ftp-hash-mark-unit ange-ftp-xfer-size ange-ftp-last-percent 0 run-hooks ange-ftp-shell-mode-hook] 3 "\ Major mode for interacting with an FTP process. Return at end of buffer sends line as input. Return not at end copies rest of line to end and sends it. The following commands imitate the usual Unix interrupt and editing control characters: \\{ange-ftp-shell-mode-map} Runs ange-ftp-shell-mode-hook if not nil." nil]) (fset 'ange-ftp-dumb-unix-host #[(host) " Î \"*" [ange-ftp-dumb-unix-host-regexp match-data match-data ((store-match-data match-data)) string-match host] 3 "\ Returns whether HOST's FTP server doesn't like 'ls' or 'dir' commands to take switch arguments."]) (fset 'ange-ftp-add-dumb-unix-host #[(host) " !? ! lj" [ange-ftp-dumb-unix-host host "^" regexp-quote "$" ange-ftp-dumb-unix-host-regexp "\\|" nil ange-ftp-host-cache] 5 "\ Interactively adds a given HOST to ange-ftp-dumb-unix-host-regexp." (byte-code " = !@)\"C" [read-string "Host: " buffer-file-name major-mode dired-mode dired-directory name ange-ftp-ftp-path] 5)]) (defvar ange-ftp-parse-list-func-alist nil "\ Association list of ( TYPE . FUNC ) pairs. The FUNC is a routine which can parse the output from a DIR listing for a host of type TYPE.") (fset 'ange-ftp-ls #[(file lsargs parse &optional no-error) " ! ! @ A@ 8! !\n \"  >Ԙ #!\n !Fގ  !\"$@ߊ$!q !!)!!! \"#,  .A !\"\n )1? AP#).\n!)" [ange-ftp-expand-file-name file ange-ftp-ftp-path parsed host user ange-ftp-quote-string 2 path directory-file-name key ange-ftp-host-type host-type ange-ftp-dumb-host-types dumb nil result temp lscmd parse-func "" ange-ftp-real-file-name-as-directory ange-ftp-expand-dir "~" ange-ftp-ls-cache-file lsargs ange-ftp-ls-cache-lsargs ange-ftp-ls-cache-res ange-ftp-make-tmp-name dir ((ange-ftp-del-tmp-name temp)) ange-ftp-send-cmd format "Listing %s" ange-ftp-abbreviate-filename get-buffer-create ange-ftp-data-buffer-name erase-buffer ange-ftp-real-file-readable-p ange-ftp-real-insert-file-contents sleep-for ange-ftp-retry-time ange-ftp-error "list data file %s not readable" parse ange-ftp-set-files ange-ftp-parse-list-func-alist ange-ftp-parse-dired-listing buffer-string no-error "DIR failed: " error "Should never happen. Please report. Bug ref. no.: 1"] 9 "\ Return the output of an `DIR' or `ls' command done over ftp. FILE is the full name of the remote file, LSARGS is any args to pass to the `ls' command, and PARSE specifies that the output should be parsed and stored away in the internal cache."]) (byte-code "PÇ" [" \\(Jan\\|Feb\\|Mar\\|Apr\\|May\\|Jun\\|Jul\\|Aug\\|Sep\\|Oct" "\\|Nov\\|Dec\\) +[0-3]?[0-9] " ange-ftp-date-regexp nil] 2) (defvar ange-ftp-add-file-entry-alist nil "\ Association list of pairs ( TYPE . FUNC ), where FUNC is a function to be used to add a file entry for the OS TYPE. The main reason for this alist is to deal with file versions in VMS.") (defvar ange-ftp-delete-file-entry-alist nil "\ Association list of pairs ( TYPE . FUNC ), where FUNC is a function to be used to delete a file entry for the OS TYPE. The main reason for this alist is to deal with file versions in VMS.") (fset 'ange-ftp-add-file-entry #[(path &optional dir-p) "\n!@! A\n \"Ɖ" [ange-ftp-host-type ange-ftp-ftp-path path ange-ftp-add-file-entry-alist ange-ftp-internal-add-file-entry dir-p nil ange-ftp-ls-cache-file] 3 "\ Given a PATH, add the file entry for it, if its directory info exists."]) (fset 'ange-ftp-delete-file-entry #[(path &optional dir-p) "\n!@! A\n \"Ɖ" [ange-ftp-host-type ange-ftp-ftp-path path ange-ftp-delete-file-entry-alist ange-ftp-internal-delete-file-entry dir-p nil ange-ftp-ls-cache-file] 3 "\ Given a PATH, delete the file entry for it, if its directory info exists."]) (byte-code "MM" [ange-ftp-parse-filename (macro . #[nil "" [(let ((eol (progn (end-of-line) (point)))) (beginning-of-line) (if (re-search-forward ange-ftp-date-regexp eol t) (progn (skip-chars-forward " ") (skip-chars-forward "^ " eol) (skip-chars-forward " " eol) (buffer-substring (point) eol))))] 1]) ange-ftp-ls-parser (macro . #[nil "" [(let ((tbl (ange-ftp-make-hashtable)) (used-F (and (stringp switches) (string-match "F" switches))) file-type symlink directory file) (while (setq file (ange-ftp-parse-filename)) (beginning-of-line) (skip-chars-forward " 0-9") (setq file-type (following-char) directory (eq file-type 100)) (if (eq file-type 108) (if (string-match " -> " file) (setq symlink (substring file (match-end 0)) file (substring file 0 (match-beginning 0))) (setq symlink "")) (setq symlink nil)) (if (and used-F (not (string-equal file "")) (looking-at ".[-r][-w]\\([^ ]\\)[-r][-w]\\([^ ]\\)[-r][-w]\\([^ ]\\)")) (let ((socket (eq file-type 115)) (executable (and (not symlink) (string-match "[xst]" (concat (buffer-substring (match-beginning 1) (match-end 1)) (buffer-substring (match-beginning 2) (match-end 2)) (buffer-substring (match-beginning 3) (match-end 3))))))) (if (or (and symlink (string-match "@$" file)) (and directory (string-match "/$" file)) (and executable (string-match "*$" file)) (and socket (string-match "=$" file))) (setq file (substring file 0 -1))))) (ange-ftp-put-hash-entry file (or symlink directory) tbl) (forward-line 1)) (ange-ftp-put-hash-entry "." t tbl) (ange-ftp-put-hash-entry ".." t tbl) tbl)] 1])] 2) (defvar ange-ftp-dl-dir-regexp nil "\ Regexp matching directories which are listed in dl format. This regexp shouldn't be anchored with a trailing $ so that it will match subdirectories as well.") (fset 'ange-ftp-add-dl-dir #[(dir) "\n\"?\n!R" [ange-ftp-dl-dir-regexp string-match dir "^" regexp-quote "\\|"] 4 "\ Interactively adds a given directory to ange-ftp-dl-dir-regexp." (byte-code " = !!)\"C" [read-string "Directory: " buffer-file-name major-mode dired-mode dired-directory name ange-ftp-ftp-path file-name-directory] 5)]) (fset 'ange-ftp-dl-parser '(macro . #[nil "" [(let ((tbl (ange-ftp-make-hashtable))) (while (not (eobp)) (ange-ftp-put-hash-entry (buffer-substring (point) (progn (skip-chars-forward "^ /\n") (point))) (eq (following-char) 47) tbl) (forward-line 1)) (ange-ftp-put-hash-entry "." t tbl) (ange-ftp-put-hash-entry ".." t tbl) tbl)] 1])) (fset 'ange-ftp-parse-dired-listing #[(&optional switches) " Ž!y ;\"ʉ   `y#www`{) ywg= = \" ҕO  ҉O    ܘ!= ?Ŕŕ{{{Q\"\"#  \"  \"\" \"# \" O *   #y*##.w!ʂwmʂw#9y ;\"ʉ   `y#www`{) %ywg= = \" ҕO  ҉O    ܘ!= ?Ŕŕ{{{Q\"\"#  \"  \"\" \"# \" O *   #yN##.# !y m`w`{g=#yi##)*" [match-data match-data ((store-match-data match-data)) looking-at "^total [0-9]+$" 1 ange-ftp-make-hashtable switches string-match "F" nil file directory symlink file-type used-F tbl eol 0 re-search-forward ange-ftp-date-regexp t " " "^ " " 0-9" 100 108 " -> " "" ".[-r][-w]\\([^ ]\\)[-r][-w]\\([^ ]\\)[-r][-w]\\([^ ]\\)" 115 "[xst]" 2 3 executable socket "@$" "/$" "*$" "=$" -1 ange-ftp-put-hash-entry "." ".." "[^\n]+\\( not found\\|: Not a directory\\)\n\\'" "^[^ \n ]+ +\\([0-9]+\\|-\\|=\\) " ange-ftp-add-dl-dir "^ /\n" 47] 8 "\ Parse the current buffer which is assumed to be in a dired-like listing format, and return a hashtable as the result. If the listing is not really a listing, then return nil."]) (fset 'ange-ftp-set-files #[(directory files) " ! #" [files ange-ftp-put-hash-entry file-name-as-directory directory ange-ftp-files-hashtable] 4 "\ For a given DIRECTORY, set or change the associated FILES hashtable."]) (fset 'ange-ftp-get-files #[(directory &optional no-error) " ! \" Ǝ ! ; \" \" \" !;\"\"\"$ \"*" [file-name-as-directory directory ange-ftp-get-hash-entry ange-ftp-files-hashtable match-data match-data ((store-match-data match-data)) ange-ftp-ls boundp dired-actual-switches string-match "[aA]" "l" "R" dired-listing-switches "-al" t no-error] 5 "\ Given a given DIRECTORY, return a hashtable of file entries. This will give an error or return nil, depending on the value of NO-ERROR, if a listing for DIRECTORY cannot be obtained."]) (fset 'ange-ftp-get-file-part '(macro . #[(path) " DDCE" [let file file-name-nondirectory path (if (string-equal file "") "." file)] 4 "\ Given PATH, return the file part that can be used for looking up the file's entry in a hashtable."])) (fset 'ange-ftp-allow-child-lookup '(macro . #[(dir file) " D DFED" [not let* efile file edir dir (parsed (ange-ftp-ftp-path edir)) (host-type (ange-ftp-host-type (car parsed))) (or (and (boundp 'dired-local-variables-file) (stringp dired-local-variables-file) (string-equal dired-local-variables-file efile)) (and (eq host-type 'vms) (string-match "\\." efile)) (and (memq host-type '(mts cms)) (not (string-equal "/" (nth 2 parsed)))))] 6 "\ Return whether ange-ftp-file-entry-p and ange-ftp-get-file-entry are allowed to determine if PATH is a sub-directory by listing it directly, rather than listing its parent directory. This is used for efficiency so that a wasted listing is not done: 1. When looking for a .dired file in dired-x.el. 2. The syntax of FILE and DIR make it impossible that FILE could be a valid subdirectory. This is of course an OS dependent judgement."])) (fset 'ange-ftp-file-entry-p #[(path) " ! ! \" !ɘʪ)\"   !@!!; = \">8٘?, \"\" !\"," [directory-file-name path file-name-directory dir ange-ftp-get-hash-entry ange-ftp-files-hashtable ent file-name-nondirectory file "" "." ange-ftp-hash-entry-exists-p efile edir ange-ftp-ftp-path parsed ange-ftp-host-type host-type boundp dired-local-variables-file vms string-match "\\." (mts cms) 2 "/" ange-ftp-get-files t] 5 "\ Given PATH, return whether there is a file entry for it."]) (fset 'ange-ftp-get-file-entry #[(path) " ! ! \" !ɘʪ)\"   !@!!; = \">8ؘ?, \"\" !\"," [directory-file-name path file-name-directory dir ange-ftp-get-hash-entry ange-ftp-files-hashtable ent file-name-nondirectory file "" "." efile edir ange-ftp-ftp-path parsed ange-ftp-host-type host-type boundp dired-local-variables-file vms string-match "\\." (mts cms) 2 "/" ange-ftp-get-files t] 5 "\ Given PATH, return the given file entry which will be either t for a directory, nil for a normal file, or a string for a symlink. If the file isn't in the hashtable, this also returns nil."]) (byte-code "MM" [ange-ftp-internal-delete-file-entry #[(path &optional dir-p) "\n!\n \"\n!\n! \"\n!\n˘̪\n)\")" [dir-p file-name-as-directory path ange-ftp-del-hash-entry ange-ftp-files-hashtable directory-file-name ange-ftp-get-hash-entry file-name-directory files file-name-nondirectory file "" "."] 4] ange-ftp-internal-add-file-entry #[(path &optional dir-p) "\n!\n! \"\n! ʘ˪ )#)" [dir-p directory-file-name path ange-ftp-get-hash-entry file-name-directory ange-ftp-files-hashtable files ange-ftp-put-hash-entry file-name-nondirectory file "" "."] 5]] 2) (fset 'ange-ftp-wipe-file-entries #[(host user) " G! \"\n)" [ange-ftp-make-hashtable ange-ftp-files-hashtable new-tbl ange-ftp-map-hashtable #[(key val) " !\n@\nA@   #*)" [ange-ftp-ftp-path key parsed u h host user ange-ftp-put-hash-entry val new-tbl] 5]] 3 "\ Replace the file entry information hashtable with one that doesn't have any entries for the given HOST, USER pair."]) (fset 'ange-ftp-set-binary-mode #[(host user) " \n#@ \n AP# \n\"!q\n\" ))" [ange-ftp-send-cmd host user (type "binary") result ange-ftp-error "BINARY failed: " process-buffer ange-ftp-get-process ash ange-ftp-binary-hash-mark-size -4 ange-ftp-hash-mark-unit] 6 "\ Tell the ftp process for the given HOST & USER to switch to binary mode."]) (fset 'ange-ftp-set-ascii-mode #[(host user) " \n#@ \n AP# \n\"!q\n\" ))" [ange-ftp-send-cmd host user (type "ascii") result ange-ftp-error "ASCII failed: " process-buffer ange-ftp-get-process ash ange-ftp-ascii-hash-mark-size -4 ange-ftp-hash-mark-unit] 6 "\ Tell the ftp process for the given HOST & USER to switch to ascii mode."]) (fset 'ange-ftp-cd #[(host user dir) " \n D$@ \nAP#)" [ange-ftp-send-cmd host user cd dir "Doing CD" result ange-ftp-error "CD failed: "] 6]) (fset 'ange-ftp-get-pwd #[(host user) " \n$A @ \nˎ\"\"ϔϕO*+B" [ange-ftp-send-cmd host user (pwd) "Getting PWD" result line nil dir match-data match-data ((store-match-data match-data)) string-match "\"\\([^\"]*\\)\"" " \\([^ ]+\\) " 1] 6 "\ Attempts to get the current working directory for the given HOST/USER pair. Returns ( DIR . LINE ) where DIR is either the directory or NIL if not found, and LINE is the relevant success or fail line from the FTP-client."]) (byte-code " " [ange-ftp-make-hashtable ange-ftp-expand-dir-hashtable "^5.0 \\([^: ]+\\):" ange-ftp-expand-dir-regexp] 1) (fset 'ange-ftp-expand-dir #[(host user dir) " \n\" A \n\n\" \n̘\n͘ =Q \nE\"$A\"ڔڕO + ۘ \n\"@ \n#ߎ \n# \n\"@ *  \"  \n# ," [ange-ftp-host-type host user host-type ange-ftp-fix-path-func-alist fix-pathname-func "/" dir key ange-ftp-get-hash-entry ange-ftp-expand-dir-hashtable res "anonymous" "ftp" unix ange-ftp-expand-dir-regexp "\\|" ange-ftp-good-msgs ange-ftp-send-cmd get "/dev/null" format "expanding %s" result line string-match 1 "~" ange-ftp-get-pwd ange-ftp-expand-dir home ((ange-ftp-cd host user home)) ange-ftp-cd reverse ange-ftp-put-hash-entry] 8 "\ Return the result of doing a PWD in the current FTP session to machine HOST logged in as user USER and cd'd to directory DIR."]) (fset 'ange-ftp-canonize-filename #[(n) "\n\"\nÕSO\n!@A@8 \n\"\"ÔÕO ÕO\n  #P O\"+\n #!P!)!\"O\n\"+\n!=\n!\n!\n!\")" [string-match ".+//" n 0 nil ange-ftp-ftp-path parsed 2 path user host "^/" "^~[^/]*" tilda rest ange-ftp-expand-dir dir error "User \"%s\" is not known" 1 "~" ange-ftp-real-file-name-as-directory "Unable to obtain CWD" ange-ftp-real-expand-file-name "^//" ange-ftp-replace-path-component string-to-char 47 ange-ftp-real-file-name-nondirectory ange-ftp-real-file-name-directory] 6 "\ Take a string and short-circuit //, /. and /.."]) (fset 'ange-ftp-expand-file-name #[(name &optional default) " Ž != \" ȕSO \" ȕSO` != ! != ! GU!! P!*" [match-data match-data ((store-match-data match-data)) string-to-char name 47 string-match ".+//" 0 nil "/~" 126 ange-ftp-real-expand-file-name ange-ftp-canonize-filename default default-directory file-name-as-directory] 3 "\ Documented as original."]) (defvar ange-ftp-file-name-as-directory-alist nil "\ Association list of ( TYPE . FUNC ) pairs, where FUNC converts a filename to a directory name for the operating system TYPE.") (fset 'ange-ftp-file-name-as-directory #[(name) " !\n8Ę \n@!A ! !)" [ange-ftp-ftp-path name parsed 2 "" ange-ftp-host-type ange-ftp-file-name-as-directory-alist ange-ftp-real-file-name-as-directory] 3 "\ Documented as original."]) (fset 'ange-ftp-file-name-directory #[(name) " !\n8 ǎ \"* !\") !)" [ange-ftp-ftp-path name parsed 2 path match-data match-data ((store-match-data match-data)) string-match "^~[^/]*$" ange-ftp-replace-path-component ange-ftp-real-file-name-directory] 5 "\ Documented as original."]) (fset 'ange-ftp-file-name-nondirectory #[(name) " !\n8 ǎ \"*ʪ !) !)" [ange-ftp-ftp-path name parsed 2 path match-data match-data ((store-match-data match-data)) string-match "^~[^/]*$" "" ange-ftp-real-file-name-nondirectory] 4 "\ Documented as original."]) (fset 'ange-ftp-directory-file-name #[(dir) " ! \n8!\" !)" [ange-ftp-ftp-path dir parsed ange-ftp-replace-path-component ange-ftp-real-directory-file-name 2] 6 "\ Documented as original."]) (fset 'ange-ftp-binary-file #[(file) " Ž \"*" [match-data match-data ((store-match-data match-data)) string-match ange-ftp-binary-file-name-regexp file] 3 "\ Returns whether the given FILE is to be considered as a binary file for ftp transfers."]) (fset 'ange-ftp-write-region #[(start end filename &optional append visit) " ! ! @ A@ 8! !\n !  ͪ !Ҏ ؎\n%, \"\n!  8#) \nE\"$&@&A\" E\"*= ! !\" !.  %)" [expand-file-name filename ange-ftp-ftp-path parsed host user ange-ftp-quote-string 2 path ange-ftp-make-tmp-name temp ange-ftp-binary-file binary append put cmd ange-ftp-abbreviate-filename abbr ((byte-code " !\n \"" [ange-ftp-del-tmp-name temp binary ange-ftp-set-ascii-mode host user] 3)) t buffer-file-name buffer-modified-p mod-p executing-macro ((byte-code "! !" [filename buffer-file-name fboundp compute-buffer-file-truename set-buffer-modified-p mod-p] 2)) ange-ftp-real-write-region start end nil visit ange-ftp-set-binary-mode file-attributes attr ange-ftp-set-xfer-size 7 ange-ftp-send-cmd format "Writing %s" result signal ftp-error "Opening output file" "FTP Error: \"%s\"" ange-ftp-set-buffer-mode fboundp compute-buffer-file-truename set-buffer-modified-p ange-ftp-message "Wrote %s" ange-ftp-add-file-entry] 8 "\ Documented as original." "r\nFWrite region to file: "]) (fset 'ange-ftp-insert-file-contents #[(filename &optional visit beg end replace) " \n!\n! \n! \n! \n!\"\n! @ A@ 8!!\n!\n!ێ\"E\"$!@!A\"\nE\")!(!!)ed| +,%A@\n\"D\") \n! \n.D\nD\"\n +,)%)" [barf-if-buffer-read-only expand-file-name filename ange-ftp-ftp-path parsed visit buffer-file-name fboundp compute-buffer-file-truename file-exists-p nil ange-ftp-ls-cache-file ange-ftp-del-hash-entry file-name-directory ange-ftp-files-hashtable host user ange-ftp-quote-string 2 path ange-ftp-make-tmp-name temp ange-ftp-binary-file binary ange-ftp-abbreviate-filename abbr size ((byte-code "\n \" !" [binary ange-ftp-set-ascii-mode host user ange-ftp-del-tmp-name temp] 3)) ange-ftp-set-binary-mode ange-ftp-send-cmd get format "Retrieving %s" result signal ftp-error "Opening input file" "FTP Error: \"%s\"" ange-ftp-real-file-readable-p sleep-for ange-ftp-retry-time replace ange-ftp-real-insert-file-contents beg end "Opening input file:" "FTP Error: %s not arrived or readable" file-error] 8 "\ Documented as original."]) (fset 'ange-ftp-revert-buffer #[(arg noconfirm) "` ! \"!  ) \")d^b!)" [opoint buffer-file-name error "Buffer does not seem to be associated with any file" noconfirm yes-or-no-p format "Revert buffer from file %s? " nil buffer-read-only unlock-buffer erase-buffer insert-file-contents t after-find-file] 4 "\ Revert this buffer from a remote file using ftp."]) (fset 'ange-ftp-expand-symlink #[(file dir) " ! \" \"" [file-name-absolute-p file ange-ftp-replace-path-component dir expand-file-name] 3]) (fset 'ange-ftp-file-symlink-p #[(file) " ! ! !Řƪ ) !!\" ; ! ! \" ) !" [ange-ftp-expand-file-name file ange-ftp-ftp-path ange-ftp-get-hash-entry file-name-nondirectory "" "." ange-ftp-get-files file-name-directory file-ent file-name-absolute-p ange-ftp-replace-path-component ange-ftp-real-file-symlink-p] 6 "\ Documented as original."]) (fset 'ange-ftp-file-exists-p #[(path) " ! ! ! !; !!\"!) !" [expand-file-name path ange-ftp-ftp-path ange-ftp-file-entry-p ange-ftp-get-file-entry file-ent file-exists-p ange-ftp-expand-symlink file-name-directory directory-file-name t ange-ftp-real-file-exists-p] 7 "\ Documented as original."]) (fset 'ange-ftp-file-directory-p #[(path) " ! ! !!; !!\"! ) !" [expand-file-name path ange-ftp-ftp-path ange-ftp-get-file-entry ange-ftp-file-name-as-directory file-ent file-directory-p ange-ftp-expand-symlink file-name-directory directory-file-name ange-ftp-real-file-directory-p] 7 "\ Documented as original."]) (fset 'ange-ftp-directory-files #[(directory &optional full match &rest v19-args) " ! ! ! !!Ɖ !  ͎  @ A \"f PBS*+ %" [expand-file-name directory ange-ftp-ftp-path ange-ftp-barf-if-not-directory ange-ftp-hash-table-keys ange-ftp-get-files nil f files tail file-name-as-directory match-data match-data ((store-match-data match-data)) match string-match full apply ange-ftp-real-directory-files v19-args] 6 "\ Documented as original."]) (fset 'ange-ftp-file-attributes #[(file) " ! ! !Řƪ ) !! \n\n \" @ A@ 8\n \";! !\"ԉ;ت٪P\"\"!\"\"ԯ ,* !)" [expand-file-name file ange-ftp-ftp-path parsed file-name-nondirectory "" "." ange-ftp-get-files file-name-directory files part ange-ftp-hash-entry-exists-p 2 ange-ftp-get-hash-entry dirp path user host file-name-absolute-p ange-ftp-expand-symlink -1 (0 0) (0 0) (0 0) "l" "d" "-" "?????????" nil apply \+ mapcar identity directory-file-name ange-ftp-real-file-attributes] 18 "\ Documented as original."]) (fset 'ange-ftp-file-writable-p #[(file) " ! ! ! !! !" [expand-file-name file ange-ftp-ftp-path file-exists-p file-directory-p file-name-directory ange-ftp-real-file-writable-p] 3 "\ Documented as original."]) (fset 'ange-ftp-file-readable-p #[(file) " ! ! ! !" [expand-file-name file ange-ftp-ftp-path file-exists-p ange-ftp-real-file-readable-p] 2 "\ Documented as original."]) (fset 'ange-ftp-delete-file #[(file) " ! ! @ A@ 8! !\n D\n\"$@A\" E\" !- !)" [expand-file-name file ange-ftp-ftp-path parsed host user ange-ftp-quote-string 2 path ange-ftp-abbreviate-filename abbr ange-ftp-send-cmd delete format "Deleting %s" result signal ftp-error "Removing old name" "FTP Error: \"%s\"" ange-ftp-delete-file-entry ange-ftp-real-delete-file] 8 "\ Documented as original." "fDelete file: "]) (fset 'ange-ftp-verify-visited-file-modtime #[(buf) " !;\n!Ī !)" [buffer-file-name buf name ange-ftp-ftp-path t ange-ftp-real-verify-visited-file-modtime] 3 "\ Documented as original."]) (fset 'ange-ftp-backup-buffer #[nil "\n< ; !\n? @!\n>?? )" [nil parsed ange-ftp-make-backup-files buffer-file-name ange-ftp-ftp-path ange-ftp-host-type ange-ftp-real-backup-buffer] 2 "\ Documented as original."]) (byte-code "MMMM" [ange-ftp-barf-or-query-if-file-exists #[(absname querystring interactive) " !\n C\" #!? C\"" [file-exists-p absname interactive signal file-already-exists yes-or-no-p format "File %s already exists; %s anyway? " querystring] 5] ange-ftp-copy-file-internal #[(filename newname ok-if-already-exists keep-date &optional msg cont nowait) " !\n!\n! !\n\" !\n! \n \n$ ? #?@A@8! !@A@8!\n \" !\n!  \n #!!\"\nE&\"# \n& ++& \n&܉ +&. *" [expand-file-name filename newname file-directory-p file-name-nondirectory ange-ftp-ftp-path t-parsed f-parsed ange-ftp-real-copy-file ok-if-already-exists keep-date cont ange-ftp-call-cont t "Copied locally" f-host f-user ange-ftp-quote-string 2 f-path ange-ftp-abbreviate-filename f-abbr t-host t-user t-path t-abbr ange-ftp-binary-file binary nil temp1 temp2 ange-ftp-barf-or-query-if-file-exists "copy to it" ange-ftp-use-gateway-p ange-ftp-make-tmp-name ange-ftp-set-binary-mode ange-ftp-send-cmd get msg format "Getting %s" "Copying %s to %s" ange-ftp-cf1 nowait] 25] ange-ftp-cf1 #[(result line filename newname binary msg f-parsed f-host f-user f-path f-abbr t-parsed t-host t-user t-path t-abbr temp1 temp2 cont nowait) "\n ! \" E\")\n !!   #  #\" !8#) E!\"#$#!  &&!  & \n#" [line ((byte-code "\n \"" [binary ange-ftp-set-ascii-mode f-host f-user] 3)) result temp1 ange-ftp-del-tmp-name cont signal ftp-error "Opening input file" format "FTP Error: \"%s\"" filename t-parsed ange-ftp-use-gateway-p t-host ange-ftp-make-tmp-name temp2 nil ange-ftp-real-copy-file t binary ange-ftp-set-binary-mode t-user file-attributes attr ange-ftp-set-xfer-size 7 ange-ftp-send-cmd put t-path msg f-parsed "Putting %s" newname "Copying %s to %s" f-abbr t-abbr ange-ftp-cf2 nowait ange-ftp-call-cont] 14] ange-ftp-cf2 #[(result line newname t-host t-user binary temp1 temp2 cont) " Ž \"\nE\"\n!)  \n#)" [((byte-code "!\n\n! #" [temp1 ange-ftp-del-tmp-name temp2 ange-ftp-call-cont cont result line] 4)) line ((byte-code "\n \"" [binary ange-ftp-set-ascii-mode t-host t-user] 3)) result cont signal ftp-error "Opening output file" format "FTP Error: \"%s\"" newname ange-ftp-add-file-entry temp1 ange-ftp-real-copy-file t] 6]] 2) (fset 'ange-ftp-copy-file #[(filename newname &optional ok-if-already-exists keep-date) " \n ʼnt&" [ange-ftp-copy-file-internal filename newname ok-if-already-exists keep-date nil] 8 "\ Documented as original." "fCopy file: \nFCopy %s to file: \np"]) (fset 'ange-ftp-rename-remote-to-remote #[(filename newname f-parsed t-parsed binary) "@A@ @ A@ \n8! 8!  E  ! \"  #$@A\" F\"! !. $ !," [f-parsed t-parsed t-user t-host f-user f-host ange-ftp-quote-string 2 f-path t-path rename cmd ange-ftp-abbreviate-filename filename fabbr newname nabbr ange-ftp-send-cmd format "Renaming %s to %s" result signal ftp-error "Renaming" "FTP Error: \"%s\"" ange-ftp-add-file-entry ange-ftp-delete-file-entry ange-ftp-copy-file-internal t nil delete-file] 9 "\ Rename remote file FILE to remote file NEWNAME."]) (fset 'ange-ftp-rename-local-to-remote #[(filename newname) " ! \"\n # % !," [ange-ftp-abbreviate-filename filename fabbr newname nabbr format "Renaming %s to %s" msg ange-ftp-copy-file-internal t nil ange-ftp-process-verbose delete-file] 6 "\ Rename local FILE to remote file NEWNAME."]) (fset 'ange-ftp-rename-remote-to-local #[(filename newname) " ! \"\n # % !," [ange-ftp-abbreviate-filename filename fabbr newname nabbr format "Renaming %s to %s" msg ange-ftp-copy-file-internal t nil ange-ftp-process-verbose delete-file] 6 "\ Rename remote file FILE to local file NEWNAME."]) (fset 'ange-ftp-rename-file #[(filename newname &optional ok-if-already-exists) " !\n! !\n! ! \n# \n % \n\" \n\" \n#+" [expand-file-name filename newname ange-ftp-ftp-path f-parsed t-parsed ange-ftp-binary-file binary ok-if-already-exists ange-ftp-barf-or-query-if-file-exists "rename to it" ange-ftp-rename-remote-to-remote ange-ftp-rename-remote-to-local ange-ftp-rename-local-to-remote ange-ftp-real-rename-file] 6 "\ Documented as original." "fRename file: \nFRename %s to file: \np"]) (defvar ange-ftp-dired-host-type nil "\ The host type associated with a dired buffer. (buffer local)") (make-variable-buffer-local 'ange-ftp-dired-host-type) (fset 'ange-ftp-dired-readin #[(dirname buffer) " ! ! \"q ~ ! @!  #c) ! & ! !R&)ebmcyueb* \"*" [ange-ftp-abbreviate-filename dirname ange-ftp-ftp-path parsed file ange-ftp-message "Reading directory %s..." buffer nil buffer-read-only erase-buffer expand-file-name ange-ftp-host-type host-type ange-ftp-dired-host-type ange-ftp-ls dired-listing-switches t ange-ftp-real-file-directory-p call-process "ls" ange-ftp-real-file-name-directory default-directory shell-file-name "-c" "ls " " " ange-ftp-real-file-name-nondirectory " " 1 "Reading directory %s...done"] 12 "\ Documented as original."]) (fset 'ange-ftp-dired-revert #[(&optional arg noconfirm) "!!\"" [dired-directory ange-ftp-ftp-path expand-file-name nil ange-ftp-ls-cache-file ange-ftp-real-dired-revert arg noconfirm] 3 "\ Documented as original."]) (defvar ange-ftp-dired-re-exe-alist nil "\ Association list of regexps (strings) which match file lines of executable files.") (defvar ange-ftp-dired-re-dir-alist nil "\ Association list of regexps (strings) which match file lines of subdirectories.") (defvar ange-ftp-dired-insert-headerline-alist nil "\ Association list of (TYPE . FUNC ) pairs, where FUNC is the function to be used by dired to insert the headerline of the dired buffer.") (defvar ange-ftp-dired-move-to-filename-alist nil "\ Association list of (TYPE . FUNC ) pairs, where FUNC is the function to be used by dired to move to the beginning of a filename.") (defvar ange-ftp-dired-move-to-end-of-filename-alist nil "\ Association list of (TYPE . FUNC ) pairs, where FUNC is the function to be used by dired to move to the end of a filename.") (defvar ange-ftp-dired-get-filename-alist nil "\ Association list of (TYPE . FUNC ) pairs, where FUNC is the function to be used by dired to get a filename from the current line.") (defvar ange-ftp-dired-between-files-alist nil "\ Association list of (TYPE . FUNC ) pairs, where FUNC is the function to be used by dired to determine when the point is on a line between files.") (defvar ange-ftp-dired-ls-trim-alist nil "\ Association list of ( TYPE . FUNC ) pairs, where FUNC is a function which trims extraneous lines from a directory listing.") (defvar ange-ftp-dired-clean-directory-alist nil "\ Association list of ( TYPE . FUNC ) pairs, where FUNC is a function which cleans out old versions of files in the OS TYPE.") (defvar ange-ftp-dired-flag-backup-files-alist nil "\ Association list of ( TYPE . FUNC ) pairs, where FUNC is a functions which flags the backup files for deletion in the OS TYPE.") (defvar ange-ftp-dired-backup-diff-alist nil "\ Association list of ( TYPE . FUNC ) pairs, where FUNC diffs a file with its backup. The backup file is determined according to the OS TYPE.") (fset 'ange-ftp-tree-dired-readin #[(dirname buffer) " !Ȋ q\n@! = \" \n    ! AL ! AL >+) \"" [ange-ftp-ftp-path dirname parsed buffer ange-ftp-host-type ange-ftp-dired-host-type ange-ftp-dl-dir-regexp unix string-match unix:dl ange-ftp-dired-re-exe-alist ange-ftp-dired-re-dir-alist dentry eentry make-local-variable dired-re-exe dired-re-dir ange-ftp-dumb-host-types "-Al" dired-actual-switches ange-ftp-real-dired-readin] 4 "\ Documented as original."]) (fset 'ange-ftp-dired-insert-headerline #[(dir) " A !" [ange-ftp-dired-host-type ange-ftp-dired-insert-headerline-alist ange-ftp-real-dired-insert-headerline dir] 2 "\ Documented as original."]) (fset 'ange-ftp-dired-move-to-filename #[(&optional raise-error eol) " A \"" [ange-ftp-dired-host-type ange-ftp-dired-move-to-filename-alist ange-ftp-real-dired-move-to-filename raise-error eol] 3 "\ Documented as original."]) (fset 'ange-ftp-dired-move-to-end-of-filename #[(&optional no-error) " A !" [ange-ftp-dired-host-type ange-ftp-dired-move-to-end-of-filename-alist ange-ftp-real-dired-move-to-end-of-filename no-error] 2 "\ Documented as original."]) (fset 'ange-ftp-dired-get-filename #[(&optional localp no-error-if-not-filep) " A \"" [ange-ftp-dired-host-type ange-ftp-dired-get-filename-alist ange-ftp-real-dired-get-filename localp no-error-if-not-filep] 3 "\ Documented as original."]) (fset 'ange-ftp-dired-between-files #[nil " A " [ange-ftp-dired-host-type ange-ftp-dired-between-files-alist ange-ftp-real-dired-between-files] 2 "\ Documented as original."]) (defvar ange-ftp-bob-version-alist nil "\ Association list of pairs ( TYPE . FUNC ), where FUNC is a function to be used to bob the version number off of a filename in OS TYPE.") (fset 'ange-ftp-dired-find-file #[nil " \nA !!" [find-file ange-ftp-dired-host-type ange-ftp-bob-version-alist identity dired-get-filename] 3 "\ Documented as original." nil]) (defvar ange-ftp-dired-compress-make-compressed-filename-alist nil "\ Association list of ( TYPE . FUNC ) pairs, where FUNC converts a filename to the filename of the associated compressed file.") (fset 'ange-ftp-dired-compress-make-compressed-filename #[(name &optional reverse) " ! @!A \"\n!Q   \" ωO* \nP*" [ange-ftp-ftp-path name nil conversion-func parsed ange-ftp-host-type ange-ftp-dired-compress-make-compressed-filename-alist reverse "\\.\\(g?z\\|" regexp-quote dired-gzip-file-extension "$\\|Z\\)$" string case-fold-search string-match 0 dired-use-gzip-instead-of-compress ".Z"] 5 "\ Converts a filename to the filename of the associated compressed file. With an optional reverse argument, the reverse conversion is done. Modified to work with gzip (GNU zip) files."]) (fset 'ange-ftp-dired-clean-directory #[(keep) " A !" [ange-ftp-dired-host-type ange-ftp-dired-clean-directory-alist ange-ftp-real-dired-clean-directory keep] 2 "\ Documented as original." "P"]) (fset 'ange-ftp-dired-backup-diff #[(&optional switches) " A !" [ange-ftp-dired-host-type ange-ftp-dired-backup-diff-alist ange-ftp-real-dired-backup-diff switches] 2 "\ Documented as original." (byte-code "!!C" [fboundp diff-read-switches "Diff with switches: "] 2)]) (fset 'ange-ftp-dired-fixup-subdirs #[(start file) "\n`}\nb #Ɣb`ƕ{`ƕ| \"c)_+" ["^\\([^ \n ]+\\)\\(:\\)[\n ]" subdir-regexp start re-search-forward nil t 1 name ange-ftp-replace-path-component file] 4 "\ Turn each subdir name into a valid ange-ftp filename."]) (fset 'ange-ftp-dired-ls #[(file switches &optional wildcard full-directory-p) " !`\n8\n@!>    > #c P#c !! `} bm? #!yg+) \" O\"\" #c \"  \"$#c$?%A `} ).  $$)" [ange-ftp-ftp-path file parsed pt 2 path ange-ftp-host-type host-type ange-ftp-dumb-host-types dumb nil trim-func case-fold-search wildcard (unix dumb-unix) ange-ftp-ls switches "d" ange-ftp-real-file-name-directory dir regexp-quote dirq dired-move-to-filename re-search-forward t replace-match "" 1 string-match "/\\.$" ange-ftp-replace-path-component 0 -1 "R" ange-ftp-dired-fixup-subdirs "[aA]" full-directory-p ange-ftp-dired-ls-trim-alist ange-ftp-real-dired-ls] 7 "\ Documented as original."]) (defvar ange-ftp-remote-shell-file-name (byte-code ">‡Ç" [system-type (hpux usg-unix-v) "remsh" "rsh"] 2) "\ Remote shell used by ange-ftp.") (fset 'ange-ftp-dired-run-shell-command #[(command &optional in-background) " !@\nA@\n8\n \"GVR $\" !!," [ange-ftp-ftp-path default-directory parsed host user 2 path ange-ftp-real-dired-run-shell-command command in-background 0 "cd " "; " format "%s %s \"%s\"" ange-ftp-remote-shell-file-name ange-ftp-message "Remote command '%s' ..." comint::background shell-command] 6 "\ Documented as original."]) (fset 'ange-ftp-make-directory #[(dir &optional parents) " ! \" ! @ A@!= 8! 8!! !D\"$@ A## \"- \")" [file-exists-p dir error "Cannot make directory %s: file already exists" ange-ftp-ftp-path parsed host user ange-ftp-quote-string ange-ftp-host-type unix ange-ftp-real-directory-file-name 2 ange-ftp-real-file-name-as-directory path ange-ftp-abbreviate-filename abbr ange-ftp-send-cmd mkdir format "Making directory %s" result ange-ftp-error "Could not make directory %s: %s" ange-ftp-add-file-entry t ange-ftp-real-make-directory parents] 8 "\ Documented as original." (byte-code "!)D" [current-prefix-arg read-directory-name "Create directory: "] 2)]) (fset 'ange-ftp-remove-directory #[(dir) " ! ! @ A@ != 8! 8!! !  D\"$@ A## \"- !) \"" [file-directory-p dir ange-ftp-ftp-path parsed host user ange-ftp-quote-string ange-ftp-host-type unix ange-ftp-real-directory-file-name 2 ange-ftp-real-file-name-as-directory path ange-ftp-abbreviate-filename abbr ange-ftp-send-cmd rmdir format "Removing directory %s" result ange-ftp-error "Could not remove directory %s: %s" ange-ftp-delete-file-entry t ange-ftp-real-remove-directory error "Not a directory: %s"] 8 "\ Documented as original." (byte-code "É$!C" [expand-file-name read-file-name "Remove directory: " nil confirm] 6)]) (fset 'ange-ftp-diff #[(fn1 fn2 &optional switches) "; ; # ; < #! !! !     @!  @! ! !! !ڎ! !\"! !! \" ! ! \"%  \"%\"!! #!))!=)!m!--!-!-!!= a\"!!qebP#P!!7eb7#!r)!8eb8# !r).\n #," [fn1 fn2 error "diff: arguments must be strings: %s %s" switches diff-switches mapconcat identity " " "" expand-file-name ange-ftp-ftp-path pa1 pa2 ange-ftp-make-tmp-name tmp1 tmp2 ange-ftp-binary-file bin1 bin2 file-directory-p dir1 dir2 default-directory old-dir "/tmp" ((byte-code "!\n\n!" [tmp1 ange-ftp-del-tmp-name tmp2] 2)) "can't compare remote directories" file-name-nondirectory ange-ftp-copy-file-internal t nil format "Getting %s" ange-ftp-process-verbose ange-ftp-message "doing diff..." sit-for 0 ange-ftp-real-diff boundp compilation-process process-status run accept-process-output compilation-last-buffer buffer-name get-buffer-process "doing diff...done" get-buffer-create "*compilation*" search-forward "cd " replace-match shell-quote q1 q2] 8 "\ Documented as original." (diff-read-args "Diff: " "Diff %s with: " "Diff with switches: ")]) (fset 'ange-ftp-dired-call-process #[(program discard &rest arguments) " !ď ?\n&" [ange-ftp-ftp-path default-directory oops (byte-code " !Ě !ƚ !\"" [program "compress" ange-ftp-call-compress arguments "uncompress" ange-ftp-call-uncompress "chmod" ange-ftp-call-chmod error "Unknown remote command: %s"] 3) ((ftp-error (byte-code "\nA@\n8\n8$c" [format "%s: %s, %s\n" oops 2 3] 6)) (error (byte-code "\nA@\"c" [format "%s\n" oops] 3))) apply call-process program nil discard arguments] 7 "\ Documented as original."]) (fset 'ange-ftp-call-compress #[(args) "GU@˜\"A@ !@! @!\n ! !! \"\"Վ  % \"`` \n#& \" U !)\n%.\n" [args 2 "-f" error "ange-ftp-call-compress: missing -f flag and/or missing filename: %s" file ange-ftp-ftp-path parsed ange-ftp-make-tmp-name tmp1 tmp2 ange-ftp-abbreviate-filename abbr ange-ftp-dired-compress-make-compressed-filename nfile nabbr format "Getting %s" msg1 "Putting %s" msg2 ((byte-code " !\n!" [ange-ftp-del-tmp-name tmp1 tmp2] 2)) ange-ftp-copy-file-internal t nil ange-ftp-process-verbose ange-ftp-message "Compressing %s..." call-process-region shell-file-name "-c" "compress -f -c < %s > %s" "Compressing %s...done" buffer-size 0 delete-file] 12 "\ Perform a compress command on a remote file. Works by taking a copy of the file, compressing it and copying the file back."]) (fset 'ange-ftp-call-uncompress #[(args) "GU\"@ !@!@! ! \"! \"\"Վ % \"`` #& \" U !) %.\n" [args 1 error "ange-ftp-call-uncompress: missing filename: %s" file ange-ftp-ftp-path parsed ange-ftp-make-tmp-name tmp1 tmp2 ange-ftp-abbreviate-filename abbr ange-ftp-dired-compress-make-compressed-filename reverse nfile nabbr format "Getting %s" msg1 "Putting %s" msg2 ((byte-code " !\n!" [ange-ftp-del-tmp-name tmp1 tmp2] 2)) ange-ftp-copy-file-internal t nil ange-ftp-process-verbose ange-ftp-message "Uncompressing %s..." call-process-region shell-file-name "-c" "uncompress -c < %s > %s" "Uncompressing %s...done" buffer-size 0 delete-file] 12 "\ Perform an uncompress command on a remote file. Works by taking a copy of the file, uncompressing it and copying the file back."]) (byte-code "MMM" [ange-ftp-call-chmod #[(args) "GW\"@A\")lj" [args 2 error "ange-ftp-call-chmod: missing mode and/or filename: %s" mode mapcar #[(file) " ! ! @ A@ 8! !\n  E\n\"$@ A##-)" [expand-file-name file ange-ftp-ftp-path parsed host user ange-ftp-quote-string 2 path ange-ftp-abbreviate-filename abbr ange-ftp-send-cmd chmod mode format "doing chmod %s" result ange-ftp-error "chmod: %s: \"%s\""] 8] nil ange-ftp-ls-cache-file] 3] ange-ftp-dired-compress #[nil "  !y!) P! ! P $ ! !+" [nil buffer-read-only dired-get-filename from-file ange-ftp-dired-compress-make-compressed-filename to-file 0 looking-at dired-re-sym dired-log "Attempt to compress a symbolic link:\n" dired-make-relative dired-check-process "Compressing " "compress" "-f" dired-update-file-line] 5] ange-ftp-dired-uncompress #[nil "  \" P # !!+" [nil buffer-read-only dired-get-filename from-file ange-ftp-dired-compress-make-compressed-filename reverse to-file dired-check-process "Uncompressing " "uncompress" dired-make-relative dired-update-file-line] 4]] 2) (fset 'ange-ftp-dired-flag-backup-files #[(&optional unflag-p) " A !" [ange-ftp-dired-host-type ange-ftp-dired-flag-backup-files-alist ange-ftp-real-dired-flag-backup-files unflag-p] 2 "\ Documented as original." "P"]) (fset 'ange-ftp-dired-copy-file #[(from to ok-flag &optional cont nowait) " ! &" [dired-handle-overwrite to ange-ftp-copy-file-internal from ok-flag dired-copy-preserve-time nil cont nowait] 8 "\ Documented as original."]) (fset 'ange-ftp-dired-do-create-files #[(op-symbol file-creator operation arg &optional marker-char op1 how-to) "  &)" [t ange-ftp-dired-do-create-files ange-ftp-real-dired-do-create-files op-symbol file-creator operation arg marker-char op1 how-to] 8 "\ Documented as original."]) (fset 'ange-ftp-dired-create-files #[(file-creator operation fn-list name-constructor &optional marker-char) "! \n =\n@!\n@!! \n! \npˉ\nG& \n\n%" [boundp ange-ftp-dired-do-create-files fn-list file-creator dired-copy-file ange-ftp-ftp-path name-constructor ange-ftp-dcf-1 operation target marker-char nil 0 ange-ftp-real-dired-create-files] 14 "\ Documented as original."]) (byte-code "MMM" [ange-ftp-dcf-1 #[(file-creator operation fn-list name-constructor target marker-char buffer overwrite-query overwrite-backup-query failures skipped success-count total) "p\nq  \n& @\n \n! \n \n#  A \n \n!B &  ! #)\n!+**" [old-buf ((set-buffer old-buf)) buffer fn-list ange-ftp-dcf-3 failures operation total skipped success-count from name-constructor to nil dired-log "Cannot %s to same file: %s\n" ange-ftp-dcf-1 file-creator target marker-char overwrite-query overwrite-backup-query dired-make-relative file-exists-p overwrite (format "Type SPC or `y' to overwrite file `%s',\nDEL or `n' to skip to next,\nESC or `q' to not overwrite any of the remaining files,\n`!' to overwrite all remaining files with no more questions." to) help-form dired-query "Overwrite `%s'?" overwrite-confirmed dired-file-marker actual-marker-char err (byte-code " \n  \n  \n  %" [file-creator from to overwrite-confirmed ange-ftp-dcf-2 nil operation fn-list name-constructor target marker-char actual-marker-char buffer overwrite overwrite-query overwrite-backup-query failures skipped success-count total t] 24) ((file-error (byte-code "\n  \n   &" [ange-ftp-dcf-2 nil err file-creator operation fn-list name-constructor target marker-char actual-marker-char buffer to from overwrite overwrite-confirmed overwrite-query overwrite-backup-query failures skipped success-count total] 22)))] 15] ange-ftp-dcf-2 #[(result line err file-creator operation fn-list name-constructor target marker-char actual-marker-char buffer to from overwrite overwrite-confirmed overwrite-query overwrite-backup-query failures skipped success-count total) "p\nq !B\n  %  !T\n$ \"\nA\n& *" [old-buf ((set-buffer old-buf)) buffer err result dired-make-relative from failures dired-log "%s `%s' to `%s' failed:\n%s\n" operation to line overwrite dired-remove-file success-count message "%s: %d of %d" total dired-add-file actual-marker-char ange-ftp-dcf-1 file-creator fn-list name-constructor target marker-char overwrite-query overwrite-backup-query skipped] 14] ange-ftp-dcf-3 #[(failures operation total skipped success-count buffer) "p\nq  G! &!\n\nG!\n&!  !$ *" [old-buf ((set-buffer old-buf)) buffer failures dired-log-summary message "%s failed for %d of %d file%s %s" operation total dired-plural-s skipped "%s: %d of %d file%s skipped %s" "%s: %s file%s." success-count dired-move-to-filename] 8]] 2) (defconst ange-ftp-dired-dl-re-dir "^. [^ /]+/[ \n]" "\ Regular expression to use to search for dl directories.") (byte-code " \nB B" [unix:dl ange-ftp-dired-re-dir-alist ange-ftp-dired-dl-re-dir] 2) (fset 'ange-ftp-dired-dl-move-to-filename #[(&optional raise-error eol) "`y!`\\b!)" [eol nil case-fold-search 0 looking-at ". [^ ]+ +\\([0-9]+\\|-\\|=\\) " 2 raise-error error "No file on this line"] 2 "\ In dired, move to the first character of the filename on this line."]) (byte-code " BM B" [unix:dl ange-ftp-dired-move-to-filename-alist (unix:dl . ange-ftp-dired-dl-move-to-filename) ange-ftp-dired-dl-move-to-end-of-filename #[(&optional no-error eol) "` `) #) ?!! w `= ?!`+" [nil hidden case-fold-search opoint eol selective-display search-forward " " t no-error error substitute-command-keys "File line is hidden, type \\[dired-hide-subdir] to unhide" "^ /" "No file on this line"] 5] ange-ftp-dired-move-to-end-of-filename-alist (unix:dl . ange-ftp-dired-dl-move-to-end-of-filename)] 2) (fset 'ange-ftp-file-entry-active-p #[(sym) "N;? \"!)" [sym val file-exists-p ange-ftp-expand-symlink dir] 5 "\ If the file entry is a symlink, returns whether the file pointed to exists. Note that DIR is dynamically bound."]) (fset 'ange-ftp-file-entry-not-ignored-p #[(sym) "N!; \"!!\n \"?) \n \"?*" [sym val symbol-name symname ange-ftp-expand-symlink dir file file-directory-p file-exists-p string-match completion-ignored-pattern] 4 "\ If the file entry is not a directory (nor a symlink pointing to a directory) returns whether the file (or file pointed to by the symlink) is ignored by completion-ignored-extensions. Note that DIR and COMPLETION-IGNORED-PATTERN are dynamically bound."]) (fset 'ange-ftp-file-name-all-completions #[(file dir) " ! ! ! ! !#\n\n\"* ͘ \" \" \"" [expand-file-name dir ange-ftp-ftp-path ange-ftp-barf-if-not-directory ange-ftp-real-file-name-as-directory ange-ftp-get-files tbl all-completions file ange-ftp-file-entry-active-p completions mapcar #[(file) " \n\" ; \"! P )" [ange-ftp-get-hash-entry file tbl ent file-directory-p ange-ftp-expand-symlink dir "/"] 5] "/" ange-ftp-generate-root-prefixes ange-ftp-real-file-name-all-completions] 4 "\ Documented as original."]) (fset 'ange-ftp-file-name-completion #[(file dir) " ! ! ! ŚŇ ! ! # Ў  $  $, Ԙ \"\"\" \"" [expand-file-name dir ange-ftp-ftp-path ange-ftp-barf-if-not-directory file "" ange-ftp-real-file-name-as-directory ange-ftp-get-files tbl mapconcat #[(s) ";!PÇ" [s regexp-quote "$" "/"] 2] completion-ignored-extensions "\\|" completion-ignored-pattern match-data match-data ((store-match-data match-data)) ange-ftp-file-name-completion-1 ange-ftp-file-entry-not-ignored-p ange-ftp-file-entry-active-p "/" try-completion ange-ftp-generate-root-prefixes mapcar list ange-ftp-real-file-name-all-completions ange-ftp-real-file-name-completion] 8 "\ Documented as original."]) (fset 'ange-ftp-file-name-completion-1 #[(file tbl dir predicate) " \n # = \"! PŪ \n #= \"! P )" [try-completion file tbl predicate bestmatch t file-directory-p expand-file-name dir "/"] 5 "\ Internal subroutine for ange-ftp-file-name-completion. Do not call this."]) (fset 'ange-ftp-quote-filename #[(file) " # O OQ \\f )" [0 pos string-match "\\$" file "$" nil 2] 5 "\ Quote `$' as `$$' in FILE to get it past function `substitute-in-file-name.'"]) (fset 'ange-ftp-read-file-name-internal #[(string dir action) " = GV !! GU   ! ! !  \"  \n \" !\n \";P!**" [nil realdir name action lambda string 0 file-exists-p substitute-in-file-name dir file-name-nondirectory file-name-directory expand-file-name file-name-all-completions file-name-completion val specdir ange-ftp-quote-filename] 5 "\ Documented as original."]) (fset 'ange-ftp-re-read-dir #[(&optional dir) "! !!!\"\"" [dir expand-file-name file-name-directory buffer-string ange-ftp-ftp-path nil ange-ftp-ls-cache-file ange-ftp-del-hash-entry ange-ftp-files-hashtable ange-ftp-get-files t] 3 "\ Forces a re-read of the directory DIR. If DIR is omitted then it defaults to the directory part of the contents of the current buffer." nil]) (byte-code "!" [boundp ange-ftp-overwrite-msg "Note: This function has been modified to work with ange-ftp."] 2) (fset 'ange-ftp-safe-documentation #[(fun) "" [nil (documentation fun) ((error))] 3 "\ A documentation function that isn't quite as fragile."]) (fset 'ange-ftp-overwrite-fn #[(fun) " !\nP!\nP!K\n8˚\n8˚ͪ9Ku ! KM M !Q<׏AA@;@AB)!\"B\"M)!!!!!!A@C&M." [symbol-name fun name intern "ange-ftp-real-" saved "ange-ftp-" new nfun 3 command-line-args "dump" 4 "../etc/" exec-directory fboundp ange-ftp-safe-documentation doc-str "\n" ange-ftp-overwrite-msg ndoc-str nil (byte-code "@" [nfun] 2) ((error (byte-code " !\n M" [copy-sequence nfun new] 2))) ndoc-cdr compiled-function-arglist append new-code apply make-byte-code compiled-function-instructions compiled-function-constants compiled-function-stack-depth commandp compiled-function-interactive] 11 "\ Replace FUN's function definition with ange-ftp-FUN's, saving the original definition as ange-ftp-real-FUN. The original documentation is placed on the new definition suitably augmented."]) (fset 'ange-ftp-overwrite-dired #[nil "!!!!!!!!KM!!!!!!!!!!!!!!!KMMKMM!!" [fboundp dired-ls ange-ftp-overwrite-fn dired-readin make-directory remove-directory diff dired-run-shell-command dired-call-process ange-ftp-dired-readin ange-ftp-tree-dired-readin dired-insert-headerline dired-move-to-filename dired-move-to-end-of-filename dired-get-filename dired-between-files dired-clean-directory dired-flag-backup-files dired-backup-diff dired-do-create-files dired-copy-file dired-create-files dired-compress-make-compressed-filename ange-ftp-real-dired-compress dired-compress ange-ftp-dired-compress ange-ftp-real-dired-uncompress dired-uncompress ange-ftp-dired-uncompress dired-find-file dired-revert] 2]) (fset 'ange-ftp-add-hook #[(hook-var hook-function) " ! J<\n@= \n>? \n \nB L \n=? \nDL) L" [boundp hook-var value lambda hook-function] 4 "\ Prepend hook-function to hook-var's value, if it is not already an element. hook-var's value may be a single function or a list of functions."]) (byte-code "!!\"! !K$B$" [boundp dired-load-hook featurep dired ange-ftp-add-hook ange-ftp-overwrite-dired require fboundp make-directory autoload ange-ftp-overwrite-fn remove-directory diff insert-file-contents directory-files file-directory-p file-writable-p file-readable-p file-symlink-p delete-file read-file-name-internal verify-visited-file-modtime file-exists-p write-region backup-buffer copy-file rename-file file-attributes file-name-directory file-name-nondirectory file-name-as-directory directory-file-name expand-file-name file-name-all-completions file-name-completion ange-ftp-set-buffer-mode find-file-hooks] 3) (fset 'ange-ftp-fix-path-for-vms #[(path &optional reverse) " Ž \"lj \n˔˔˕O\n̔̔̕O ͔͔͕O  O\"\" \n\nQ R+\"lj \n\"ؕSO\nؕO!O\"\" !\n \n? RQ,*" [match-data match-data ((store-match-data match-data)) reverse string-match "^\\([^:]+:\\)?\\(\\[.*\\]\\)?\\([^][]*\\)$" path nil file dir drive 1 2 3 apply concat mapcar #[(char) "U!!" [char 46 vector 47] 2] -1 "/" error "path %s didn't match" tmp "^/[^:]+:/" 0 file-name-directory #[(char) "U!!" [char 47 vector 46] 2] file-name-nondirectory "[" "." "]"] 8 "\ Convert PATH from UNIX-ish to VMS. If REVERSE given then convert from VMS to UNIX-ish."]) (byte-code " B > B" [vms ange-ftp-fix-path-func-alist (vms . ange-ftp-fix-path-for-vms) ange-ftp-dumb-host-types] 2) (fset 'ange-ftp-fix-dir-path-for-vms #[(dir-path) "!\"!!" [dir-path "/" error "Cannot get listing for fictitious \"/\" directory." string-match "^/[-A-Z0-9_$]+:/$" "Cannot get listing for device." ange-ftp-fix-path-for-vms] 3 "\ Convert path from UNIX-ish to VMS ready for a DIRectory listing."]) (byte-code " B!Ň" [vms ange-ftp-fix-dir-path-func-alist (vms . ange-ftp-fix-dir-path-for-vms) boundp ange-ftp-vms-host-regexp nil] 2) (fset 'ange-ftp-vms-host #[(host) " Î \"*" [ange-ftp-vms-host-regexp match-data match-data ((store-match-data match-data)) string-match host] 3 "\ Return whether HOST is running VMS."]) (defconst ange-ftp-vms-filename-regexp (concat "\\(\\([_A-Za-z0-9$]?\\|[_A-Za-z0-9$][_A-Za-z0-9$---]*\\)\\." "[_A-Za-z0-9$---]*;+[0-9]*\\)") "\ Regular expression to match for a valid VMS file name in Dired buffer. Stupid freaking bug! Position of _ and $ shouldn't matter but they do. Having [A-Z0-9$_] bombs on filename _$$CHANGE_LOG$.TXT$ and $CHANGE_LOG$.TX Other orders of $ and _ seem to all work just fine.") (fset 'ange-ftp-parse-vms-filename #[nil " #Ĕĕ{" [re-search-forward ange-ftp-vms-filename-regexp nil t 0] 4 "\ Extract the next filename from a VMS dired-like listing."]) (fset 'ange-ftp-parse-vms-listing #[nil " eb Ǝ \n\"\nˉO #\n #\n\"\nˉO #yM # #* *" [ange-ftp-make-hashtable nil file tbl match-data match-data ((store-match-data match-data)) ange-ftp-parse-vms-filename string-match "\\.\\(DIR\\|dir\\);[0-9]+" ange-ftp-put-hash-entry 0 t ";[0-9]+$" 1 "." ".."] 4 "\ Parse the current buffer which is assumed to be in MultiNet FTP dir format, and return a hashtable as the result."]) (byte-code " BM BM  B " [vms ange-ftp-parse-list-func-alist (vms . ange-ftp-parse-vms-listing) ange-ftp-vms-delete-file-entry #[(path &optional dir-p) "\n\" Ǝ\n!ɘʪ)\"\n!\"щO!Q\"\"\"+)+" [dir-p ange-ftp-internal-delete-file-entry path t match-data match-data ((store-match-data match-data)) file-name-nondirectory file "" "." string-match ";[0-9]+$" ange-ftp-get-hash-entry file-name-directory ange-ftp-files-hashtable files 0 root "^" regexp-quote regexp nil versions ange-ftp-del-hash-entry mapatoms #[(sym) " \nN\"ĉ" [string-match regexp sym key t versions] 4]] 4] ange-ftp-delete-file-entry-alist (vms . ange-ftp-vms-delete-file-entry) ange-ftp-vms-add-file-entry #[(path &optional dir-p) "\n\"\n!\"\n! ʘ˪ )  Ύ \" ҉O# !Q\"T !Q#** #))" [dir-p ange-ftp-internal-add-file-entry path t ange-ftp-get-hash-entry file-name-directory ange-ftp-files-hashtable files file-name-nondirectory file "" "." match-data match-data ((store-match-data match-data)) string-match ";[0-9]+$" ange-ftp-put-hash-entry 0 nil "^" regexp-quote ";\\([0-9]+\\)$" version regexp mapatoms #[(sym) "N \n\" \nǔǕO!])" [sym key name string-match regexp version string-to-int 1] 5] ";" int-to-string] 6] ange-ftp-add-file-entry-alist (vms . ange-ftp-vms-add-file-entry)] 2) (fset 'ange-ftp-add-vms-host #[(host) " !? ! lj" [ange-ftp-vms-host host "^" regexp-quote "$" ange-ftp-vms-host-regexp "\\|" nil ange-ftp-host-cache] 5 "\ Interactively adds a given HOST to ange-ftp-vms-host-regexp." (byte-code " = !@)\"C" [read-string "Host: " buffer-file-name major-mode dired-mode dired-directory name ange-ftp-ftp-path] 5)]) (byte-code "M B" [ange-ftp-vms-file-name-as-directory #[(name) " Ž \" ƉO !*" [match-data match-data ((store-match-data match-data)) string-match "\\.\\(DIR\\|dir\\)\\(;[0-9]+\\)?$" name 0 ange-ftp-real-file-name-as-directory] 3] vms ange-ftp-file-name-as-directory-alist (vms . ange-ftp-vms-file-name-as-directory)] 2) (defconst ange-ftp-dired-vms-re-exe "^. [^ .]+\\.\\(EXE\\|exe\\)[; ]" "\ Regular expression to use to search for VMS executable files.") (defconst ange-ftp-dired-vms-re-dir "^. [^ .]+\\.\\(DIR\\|dir\\)[; ]" "\ Regular expression to use to search for VMS directories.") (byte-code " \nB B B BMB" [vms ange-ftp-dired-re-exe-alist ange-ftp-dired-vms-re-exe ange-ftp-dired-re-dir-alist ange-ftp-dired-vms-re-dir ange-ftp-dired-vms-insert-headerline #[(dir) "!y!`ĕ|)!" [looking-at "^ wildcard " 1 "^[ \n ]*[^\n]+\\][ ]*\n" 0 ange-ftp-real-dired-insert-headerline dir] 2] ange-ftp-dired-insert-headerline-alist (vms . ange-ftp-dired-vms-insert-headerline)] 2) (fset 'ange-ftp-dired-vms-move-to-filename #[(&optional raise-error eol) "\n`y \n#ǔb!)" [nil case-fold-search eol 0 re-search-forward ange-ftp-vms-filename-regexp t 1 raise-error error "No file on this line"] 4 "\ In dired, move to first char of filename on this line. Returns position (point) or nil if no filename on this line."]) (byte-code " BM BM  B M  B MBMB" [vms ange-ftp-dired-move-to-filename-alist (vms . ange-ftp-dired-vms-move-to-filename) ange-ftp-dired-vms-move-to-end-of-filename #[(&optional no-error eol) "` `) #)\n # `=\n!! `=?`+" [nil case-fold-search hidden opoint eol selective-display search-forward " " t re-search-forward ange-ftp-vms-filename-regexp no-error error substitute-command-keys "File line is hidden, type \\[dired-hide-subdir] to unhide" "No file on this line"] 5] ange-ftp-dired-move-to-end-of-filename-alist (vms . ange-ftp-dired-vms-move-to-end-of-filename) ange-ftp-dired-vms-between-files #[nil "yggšu!gƚ)" [0 10 9 2 looking-at "Total of" 32] 2] ange-ftp-dired-between-files-alist (vms . ange-ftp-dired-vms-between-files) ange-ftp-vms-make-compressed-filename #[(name &optional reverse) " \" ĉO \" ĉO \" O \" ĉOP P" [reverse string-match "-Z;[0-9]+$" name 0 ";[0-9]+$" "-Z$" -2 "-Z"] 3] ange-ftp-dired-compress-make-compressed-filename-alist (vms . ange-ftp-vms-make-compressed-filename) ange-ftp-dired-vms-ls-trim #[nil "eb !)ye`|y`d|" [nil case-fold-search re-search-forward ange-ftp-vms-filename-regexp 0 1] 2] ange-ftp-dired-ls-trim-alist (vms . ange-ftp-dired-vms-ls-trim) ange-ftp-vms-bob-version #[(name) " Ž \" ƉO *" [match-data match-data ((store-match-data match-data)) string-match ";[0-9]+$" name 0] 3] ange-ftp-bob-version-alist (vms . ange-ftp-vms-bob-version)] 2) (fset 'ange-ftp-dired-vms-clean-directory #[(keep &optional marker msg) " ! ]W [ X ]     P#! @A\"BG\\VZ@A*AH)! P!-" [1 keep prefix-numeric-value dired-kept-versions 0 kept-old-versions msg "Cleaning" marker dired-del-marker nil file-version-assoc-list trample-marker action late-retention early-retention message " numerical backups (keeping %d late, %d old)..." dired-map-dired-file-lines ange-ftp-dired-vms-collect-file-versions fval q sort < sorted-v-list v-count ange-ftp-dired-vms-trample-file-versions " numerical backups...done"] 6 "\ Flag numerical backups for deletion. Spares `dired-kept-versions' latest versions, and `kept-old-versions' oldest. Positive prefix arg KEEP overrides `dired-kept-versions'; Negative prefix arg KEEP overrides `kept-old-versions' with KEEP made positive. To clear the flags on these files, you can use \\[dired-flag-backup-files] with a prefix argument."]) (byte-code " BMMM  B M  B " [vms ange-ftp-dired-clean-directory-alist (vms . ange-ftp-dired-vms-clean-directory) ange-ftp-dired-vms-collect-file-versions #[(fn) "\n!8 \" ƉO\n \"? !P G  \n!\"\"\nBB,*)" [2 ange-ftp-ftp-path fn path string-match ";[0-9]+$" 0 ange-ftp-replace-path-component file-version-assoc-list file-name-nondirectory ";" base-versions bv-length file-name-all-completions file-name-directory possibilities mapcar #[(arg) "\n #Ĕ U\n O!ć" [string-match "[0-9]+$" arg bv-length 0 string-to-int nil] 4] versions] 5] ange-ftp-dired-vms-trample-file-versions #[(fn) "\n\" \n O\"\n TO! >?y! c*" [string-match ";[0-9]+$" fn start-vn nil base-version-list assoc 0 file-version-assoc-list string-to-int delete-char 1 trample-marker] 4] ange-ftp-dired-vms-flag-backup-files #[(&optional unflag-p) "‰\n #," [1 0 nil msg marker kept-old-versions dired-kept-versions unflag-p 32 "Unflagging" dired-del-marker "Cleaning" ange-ftp-dired-vms-clean-directory] 4] ange-ftp-dired-flag-backup-files-alist (vms . ange-ftp-dired-vms-flag-backup-files) ange-ftp-dired-vms-backup-diff #[(&optional switches) "! \" ljO ǔTO! \n \nS\nV  \n!Q ! \nS\n_ + ! !# ! !\" \"*" [dired-get-filename no-dir nil bak file string-match ";[0-9]+$" 0 string-to-int found ver root ";" int-to-string file-exists-p t switches diff expand-file-name error "No previous version found for %s"] 6] ange-ftp-dired-backup-diff-alist (vms . ange-ftp-dired-vms-backup-diff)] 2) (fset 'ange-ftp-fix-path-for-mts #[(path &optional reverse) " Ž \"lj ʔʕO ̔̔̕O  QP*\"\"ʉO̔̕OP*" [match-data match-data ((store-match-data match-data)) reverse string-match "^\\([^:]+:\\)?\\(.*\\)$" path nil file acct 1 0 2 "/" error "path %s didn't match" "^/\\([^:]+:\\)/\\(.*\\)$"] 4 "\ Convert PATH from UNIX-ish to MTS. If REVERSE given then convert from MTS to UNIX-ish."]) (byte-code " B" [mts ange-ftp-fix-path-func-alist (mts . ange-ftp-fix-path-for-mts)] 2) (fset 'ange-ftp-fix-dir-path-for-mts #[(dir-path) "!!Řƪ\"P)" [dir-path "/" error "Cannot get listing for fictitious \"/\" directory." ange-ftp-fix-path-for-mts "" "?" string-match ":$"] 4 "\ Convert path from UNIX-ish to MTS ready for a DIRectory listing. Remember that there are no directories in MTS."]) (byte-code " B > B!Ƈ" [mts ange-ftp-fix-dir-path-func-alist (mts . ange-ftp-fix-dir-path-for-mts) ange-ftp-dumb-host-types boundp ange-ftp-mts-host-regexp nil] 2) (fset 'ange-ftp-mts-host #[(host) " Î \"*" [ange-ftp-mts-host-regexp match-data match-data ((store-match-data match-data)) string-match host] 3 "\ Return whether HOST is running MTS."]) (fset 'ange-ftp-parse-mts-listing #[nil " eb Ď#x`\nx`\n{ #)y[* # )" [ange-ftp-make-hashtable tbl match-data match-data ((store-match-data match-data)) re-search-forward ange-ftp-date-regexp nil t " " end "-A-Z0-9_.!" ange-ftp-put-hash-entry 1 "."] 4 "\ Parse the current buffer which is assumed to be in mts ftp dir format."]) (byte-code " B" [mts ange-ftp-parse-list-func-alist (mts . ange-ftp-parse-mts-listing)] 2) (fset 'ange-ftp-add-mts-host #[(host) " !? ! lj" [ange-ftp-mts-host host "^" regexp-quote "$" ange-ftp-mts-host-regexp "\\|" nil ange-ftp-host-cache] 5 "\ Interactively adds a given HOST to ange-ftp-mts-host-regexp." (byte-code " = !@)\"C" [read-string "Host: " buffer-file-name major-mode dired-mode dired-directory name ange-ftp-ftp-path] 5)]) (fset 'ange-ftp-dired-mts-move-to-filename #[(&optional raise-error eol) "`y #www!•b`\n!" [eol nil 0 re-search-forward ange-ftp-date-regexp t " " "0-9:" looking-at "[A-Z0-9_.]+:" raise-error error "No file on this line"] 4 "\ In dired, move to first char of filename on this line. Returns position (point) or nil if no filename on this line."]) (byte-code " BM B" [mts ange-ftp-dired-move-to-filename-alist (mts . ange-ftp-dired-mts-move-to-filename) ange-ftp-dired-mts-move-to-end-of-filename #[(&optional no-error eol) "``) #) w\n `=\n!! `=?`+" [nil case-fold-search hidden opoint eol selective-display search-forward " " t "-A-Z0-9._!" no-error error substitute-command-keys "File line is hidden, type \\[dired-hide-subdir] to unhide" "No file on this line"] 5] ange-ftp-dired-move-to-end-of-filename-alist (mts . ange-ftp-dired-mts-move-to-end-of-filename)] 2) (fset 'ange-ftp-fix-path-for-cms #[(path &optional reverse) " Ž P \" ȉO ʔ ʔʕO P \"#@ \"#@  A##)+ )!*" [match-data match-data ((store-match-data match-data)) reverse "/" path string-match "^/\\([-A-Z0-9$*._]+\\)/\\([-A-Z0-9$._]+\\)?$" 1 minidisk 2 "cd " ange-ftp-get-process host user proc cmd file ange-ftp-raw-send-cmd msg result ange-ftp-error format "cd to minidisk %s failed: %s" error "Invalid CMS filename"] 8 "\ Convert PATH from UNIX-ish to CMS. If REVERSE is given, convert from CMS to UNIX. Actually, CMS doesn't have a full pathname syntax, so we fudge things by sending cd's."]) (byte-code " B > B" [cms ange-ftp-fix-path-func-alist (cms . ange-ftp-fix-path-for-cms) ange-ftp-dumb-host-types] 2) (fset 'ange-ftp-fix-dir-path-for-cms #[(dir-path) "!\"ƔƕO \n\" P ΔΔΕO  \"@ \n\"   \"@ \nA##),!" [dir-path "/" error "Cannot get listing for fictitious \"/\" directory." string-match "^/\\([-A-Z0-9$*._]+\\)/\\([-A-Z0-9$._]+\\)?$" 1 minidisk ange-ftp-get-process host user proc "cd " cmd 2 path "*" file ange-ftp-raw-send-cmd result ange-ftp-error format "cd to minidisk %s failed: " "Invalid CMS pathname"] 8 "\ Convert path from UNIX-ish to VMS ready for a DIRectory listing."]) (byte-code " B" [cms ange-ftp-fix-dir-path-func-alist (cms . ange-ftp-fix-dir-path-for-cms)] 2) (defvar ange-ftp-cms-host-regexp nil "\ Regular expression to match hosts running the CMS operating system.") (fset 'ange-ftp-cms-host #[(host) " Î \"*" [ange-ftp-cms-host-regexp match-data match-data ((store-match-data match-data)) string-match host] 3 "\ Return whether the host is running CMS."]) (fset 'ange-ftp-add-cms-host #[(host) " !? ! lj" [ange-ftp-cms-host host "^" regexp-quote "$" ange-ftp-cms-host-regexp "\\|" nil ange-ftp-host-cache] 5 "\ Interactively adds a given HOST to ange-ftp-cms-host-regexp." (byte-code " = !@)\"C" [read-string "Host: " buffer-file-name major-mode dired-mode dired-directory name ange-ftp-ftp-path] 5)]) (fset 'ange-ftp-parse-cms-listing #[nil " eb Ď#ʔʕ{̔̕{Q #yc #* )" [ange-ftp-make-hashtable tbl match-data match-data ((store-match-data match-data)) re-search-forward "^\\([-A-Z0-9$_]+\\) +\\([-A-Z0-9$_]+\\) +[VF] +[0-9]+ " nil t ange-ftp-put-hash-entry 1 "." 2] 5 "\ Parse the current buffer which is assumed to be a CMS directory listing."]) (byte-code " B" [cms ange-ftp-parse-list-func-alist (cms . ange-ftp-parse-cms-listing)] 2) (defconst ange-ftp-dired-cms-re-exe "^. [-A-Z0-9$_]+ +EXEC " "\ Regular expression to use to search for CMS executables.") (byte-code " \nB BM B" [cms ange-ftp-dired-re-exe-alist ange-ftp-dired-cms-re-exe ange-ftp-dired-cms-insert-headerline #[(dir) "cu !" ["\n" -1 ange-ftp-real-dired-insert-headerline dir] 2] ange-ftp-dired-insert-headerline-alist (cms . ange-ftp-dired-cms-insert-headerline)] 2) (fset 'ange-ftp-dired-cms-move-to-filename #[(&optional raise-error eol) "`y#ÔTb!)" [eol nil case-fold-search 0 re-search-forward " [-A-Z0-9$_]+ +[-A-Z0-9$_]+ +[VF] +[0-9]+ " t raise-error error "No file on this line"] 4 "\ In dired, move to the first char of filename on this line."]) (byte-code " BM BM  B M  B !" [cms ange-ftp-dired-move-to-filename-alist (cms . ange-ftp-dired-cms-move-to-filename) ange-ftp-dired-cms-move-to-end-of-filename #[(&optional no-error eol) "` `) #) ?!! w w w `= ?!`+" [nil hidden case-fold-search opoint eol selective-display search-forward " " t no-error error substitute-command-keys "File line is hidden, type \\[dired-hide-subdir] to unhide" "-A-Z0-9$_" " " "No file on this line"] 5] ange-ftp-dired-move-to-end-of-filename-alist (cms . ange-ftp-dired-cms-move-to-end-of-filename) ange-ftp-cms-make-compressed-filename #[(name &optional reverse) " \" O P" [reverse string-match "-Z$" name 0 -2 "-Z"] 3] ange-ftp-dired-compress-make-compressed-filename-alist (cms . ange-ftp-cms-make-compressed-filename) ange-ftp-dired-cms-get-filename #[(&optional localp no-error-if-not-filep) " \n\" \" ǕO ɔɕOQ )" [ange-ftp-real-dired-get-filename localp no-error-if-not-filep name string-match "^\\([^ ]+\\) +\\([^ ]+\\)$" 0 1 "." 2] 6] ange-ftp-dired-get-filename-alist (cms . ange-ftp-dired-cms-get-filename) provide ange-ftp] 2)