Mercurial > emacs
comparison lisp/net/ange-ftp.el @ 38412:253f761ad37b
Some fixes to follow coding conventions in files maintained by FSF.
author | Pavel Janík <Pavel@Janik.cz> |
---|---|
date | Sun, 15 Jul 2001 16:15:35 +0000 |
parents | 3c2404604bae |
children | 75cd77e6f1d5 |
comparison
equal
deleted
inserted
replaced
38411:2fc02d49a9a4 | 38412:253f761ad37b |
---|---|
4832 (defun ange-ftp-fix-dir-name-for-vms (dir-name) | 4832 (defun ange-ftp-fix-dir-name-for-vms (dir-name) |
4833 ;; Should there be entries for .. -> [-] and . -> [] below. Don't | 4833 ;; Should there be entries for .. -> [-] and . -> [] below. Don't |
4834 ;; think so, because expand-filename should have already short-circuited | 4834 ;; think so, because expand-filename should have already short-circuited |
4835 ;; them. | 4835 ;; them. |
4836 (cond ((string-equal dir-name "/") | 4836 (cond ((string-equal dir-name "/") |
4837 (error "Cannot get listing for fictitious \"/\" directory.")) | 4837 (error "Cannot get listing for fictitious \"/\" directory")) |
4838 ((string-match "^/[-A-Z0-9_$]+:/$" dir-name) | 4838 ((string-match "^/[-A-Z0-9_$]+:/$" dir-name) |
4839 (error "Cannot get listing for device.")) | 4839 (error "Cannot get listing for device")) |
4840 ((ange-ftp-fix-name-for-vms dir-name)))) | 4840 ((ange-ftp-fix-name-for-vms dir-name)))) |
4841 | 4841 |
4842 (or (assq 'vms ange-ftp-fix-dir-name-func-alist) | 4842 (or (assq 'vms ange-ftp-fix-dir-name-func-alist) |
4843 (setq ange-ftp-fix-dir-name-func-alist | 4843 (setq ange-ftp-fix-dir-name-func-alist |
4844 (cons '(vms . ange-ftp-fix-dir-name-for-vms) | 4844 (cons '(vms . ange-ftp-fix-dir-name-for-vms) |
5351 | 5351 |
5352 ;; Convert name from UNIX-ish to MTS ready for a DIRectory listing. | 5352 ;; Convert name from UNIX-ish to MTS ready for a DIRectory listing. |
5353 ;; Remember that there are no directories in MTS. | 5353 ;; Remember that there are no directories in MTS. |
5354 (defun ange-ftp-fix-dir-name-for-mts (dir-name) | 5354 (defun ange-ftp-fix-dir-name-for-mts (dir-name) |
5355 (if (string-equal dir-name "/") | 5355 (if (string-equal dir-name "/") |
5356 (error "Cannot get listing for fictitious \"/\" directory.") | 5356 (error "Cannot get listing for fictitious \"/\" directory") |
5357 (let ((dir-name (ange-ftp-fix-name-for-mts dir-name))) | 5357 (let ((dir-name (ange-ftp-fix-name-for-mts dir-name))) |
5358 (cond | 5358 (cond |
5359 ((string-equal dir-name "") | 5359 ((string-equal dir-name "") |
5360 "?") | 5360 "?") |
5361 ((string-match ":$" dir-name) | 5361 ((string-match ":$" dir-name) |
5540 | 5540 |
5541 ;; Convert name from UNIX-ish to CMS ready for a DIRectory listing. | 5541 ;; Convert name from UNIX-ish to CMS ready for a DIRectory listing. |
5542 (defun ange-ftp-fix-dir-name-for-cms (dir-name) | 5542 (defun ange-ftp-fix-dir-name-for-cms (dir-name) |
5543 (cond | 5543 (cond |
5544 ((string-equal "/" dir-name) | 5544 ((string-equal "/" dir-name) |
5545 (error "Cannot get listing for fictitious \"/\" directory.")) | 5545 (error "Cannot get listing for fictitious \"/\" directory")) |
5546 ((string-match "^/\\([-A-Z0-9$*._]+\\)/\\([-A-Z0-9$._]+\\)?$" dir-name) | 5546 ((string-match "^/\\([-A-Z0-9$*._]+\\)/\\([-A-Z0-9$._]+\\)?$" dir-name) |
5547 (let* ((minidisk (substring dir-name (match-beginning 1) (match-end 1))) | 5547 (let* ((minidisk (substring dir-name (match-beginning 1) (match-end 1))) |
5548 ;; host and user are bound in the call to ange-ftp-send-cmd | 5548 ;; host and user are bound in the call to ange-ftp-send-cmd |
5549 (proc (ange-ftp-get-process ange-ftp-this-host ange-ftp-this-user)) | 5549 (proc (ange-ftp-get-process ange-ftp-this-host ange-ftp-this-user)) |
5550 (cmd (concat "cd " minidisk)) | 5550 (cmd (concat "cd " minidisk)) |