/[tramp]/tramp/lisp/tramp.el
ViewVC logotype

Diff of /tramp/lisp/tramp.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2.172 by kai, Sun Aug 4 13:53:24 2002 UTC revision 2.173 by kai, Mon Aug 5 14:41:17 2002 UTC
# Line 1216  some systems don't, and for them we have Line 1216  some systems don't, and for them we have
1216  ;; output.  If you are hacking on this, note that you get *no* output  ;; output.  If you are hacking on this, note that you get *no* output
1217  ;; unless this spits out a complete line, including the '\n' at the  ;; unless this spits out a complete line, including the '\n' at the
1218  ;; end.  ;; end.
1219  (defconst tramp-perl-file-attributes (concat  (defconst tramp-perl-file-attributes "\
1220   "$f = $ARGV[0];  $f = $ARGV[0];
1221  @s = lstat($f);  @s = lstat($f);
1222  if (($s[2] & 0170000) == 0120000) { $l = readlink($f); $l = \"\\\"$l\\\"\"; }  if (($s[2] & 0170000) == 0120000) { $l = readlink($f); $l = \"\\\"$l\\\"\"; }
1223  elsif (($s[2] & 0170000) == 040000) { $l = \"t\"; }  elsif (($s[2] & 0170000) == 040000) { $l = \"t\"; }
1224  else { $l = \"nil\" };  else { $l = \"nil\" };
1225  printf(\"(%s %u %u %u (%u %u) (%u %u) (%u %u) %u %u t (%u . %u) (%u %u))\\n\",  printf(\"(%s %u %d %d (%u %u) (%u %u) (%u %u) %u %u t (%u . %u) (%u %u))\\n\",
1226  $l, $s[3], $s[4], $s[5], $s[8] >> 16 & 0xffff, $s[8] & 0xffff,  $l, $s[3], $s[4], $s[5], $s[8] >> 16 & 0xffff, $s[8] & 0xffff,
1227  $s[9] >> 16 & 0xffff, $s[9] & 0xffff, $s[10] >> 16 & 0xffff, $s[10] & 0xffff,  $s[9] >> 16 & 0xffff, $s[9] & 0xffff, $s[10] >> 16 & 0xffff, $s[10] & 0xffff,
1228  $s[7], $s[2], $s[1] >> 16 & 0xffff, $s[1] & 0xffff, $s[0] >> 16 & 0xffff, $s[0] & 0xffff);"  $s[7], $s[2], $s[1] >> 16 & 0xffff, $s[1] & 0xffff, $s[0] >> 16 & 0xffff, $s[0] & 0xffff);"
  )  
1229    "Perl script to produce output suitable for use with `file-attributes'    "Perl script to produce output suitable for use with `file-attributes'
1230  on the remote file system.")  on the remote file system.")
1231    
# Line 3189  necessary anymore." Line 3188  necessary anymore."
3188    
3189  (defun tramp-invoke-ange-ftp (operation &rest args)  (defun tramp-invoke-ange-ftp (operation &rest args)
3190    "Invoke the Ange-FTP handler function and throw."    "Invoke the Ange-FTP handler function and throw."
3191    (or ange-ftp-name-format (require 'ange-ftp))    (or (boundp 'ange-ftp-name-format) (require 'ange-ftp))
3192    (let ((ange-ftp-name-format    (let ((ange-ftp-name-format
3193           (list (nth 0 tramp-file-name-structure)           (list (nth 0 tramp-file-name-structure)
3194                 (nth 3 tramp-file-name-structure)                 (nth 3 tramp-file-name-structure)
3195                 (nth 2 tramp-file-name-structure)                 (nth 2 tramp-file-name-structure)
3196                 (nth 4 tramp-file-name-structure))))                 (nth 4 tramp-file-name-structure))))
3197      (throw 'tramp-forward-to-ange-ftp      (throw 'tramp-forward-to-ange-ftp
3198             (apply 'ange-ftp-hook-function operation args))))             (tramp-run-real-handler 'ange-ftp-hook-function
3199                                       (cons operation args)))))
3200    
3201  (defun tramp-ange-ftp-file-name-p (multi-method method)  (defun tramp-ange-ftp-file-name-p (multi-method method)
3202    "Check if it's a filename that should be forwarded to Ange-FTP."    "Check if it's a filename that should be forwarded to Ange-FTP."
# Line 3470  file exists and nonzero exit status othe Line 3470  file exists and nonzero exit status othe
3470      ;;                  `/usr/bin/test'.      ;;                  `/usr/bin/test'.
3471      ;; `/usr/bin/test -e'       In case `/bin/test' does not exist.      ;; `/usr/bin/test -e'       In case `/bin/test' does not exist.
3472      (unless (or      (unless (or
              (and (setq tramp-file-exists-command "ls -d %s")  
                   (tramp-handle-file-exists-p existing)  
                   (not (tramp-handle-file-exists-p nonexisting)))  
3473               (and (setq tramp-file-exists-command "test -e %s")               (and (setq tramp-file-exists-command "test -e %s")
3474                    (tramp-handle-file-exists-p existing)                    (tramp-handle-file-exists-p existing)
3475                    (not (tramp-handle-file-exists-p nonexisting)))                    (not (tramp-handle-file-exists-p nonexisting)))
# Line 3481  file exists and nonzero exit status othe Line 3478  file exists and nonzero exit status othe
3478                    (not (tramp-handle-file-exists-p nonexisting)))                    (not (tramp-handle-file-exists-p nonexisting)))
3479               (and (setq tramp-file-exists-command "/usr/bin/test -e %s")               (and (setq tramp-file-exists-command "/usr/bin/test -e %s")
3480                    (tramp-handle-file-exists-p existing)                    (tramp-handle-file-exists-p existing)
3481                      (not (tramp-handle-file-exists-p nonexisting)))
3482                 (and (setq tramp-file-exists-command "ls -d %s")
3483                      (tramp-handle-file-exists-p existing)
3484                    (not (tramp-handle-file-exists-p nonexisting))))                    (not (tramp-handle-file-exists-p nonexisting))))
3485        (error "Couldn't find command to check if file exists."))))        (error "Couldn't find command to check if file exists."))))
3486            
# Line 4456  locale to C and sets up the remote shell Line 4456  locale to C and sets up the remote shell
4456    ;;    ;;
4457    ;; Daniel Pittman <daniel@danann.net>    ;; Daniel Pittman <daniel@danann.net>
4458    (sleep-for 1)    (sleep-for 1)
4459      (erase-buffer)
4460    (tramp-find-file-exists-command multi-method method user host)    (tramp-find-file-exists-command multi-method method user host)
4461    (make-local-variable 'tramp-ls-command)    (make-local-variable 'tramp-ls-command)
4462    (setq tramp-ls-command (tramp-find-ls-command multi-method method user host))    (setq tramp-ls-command (tramp-find-ls-command multi-method method user host))

Legend:
Removed from v.2.172  
changed lines
  Added in v.2.173

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26