comparison lisp/ange-ftp.el @ 10118:7e22057e9516

(ange-ftp-set-binary-mode): Ignore hash size if nil. (ange-ftp-set-ascii-mode): Likewise.
author Karl Heuer <kwzh@gnu.org>
date Tue, 06 Dec 1994 00:19:09 +0000
parents f54857d6c2f7
children 3d95ea97eb9e
comparison
equal deleted inserted replaced
10117:413a1fd0f7c4 10118:7e22057e9516
2688 (let ((result (ange-ftp-send-cmd host user '(type "binary")))) 2688 (let ((result (ange-ftp-send-cmd host user '(type "binary"))))
2689 (if (not (car result)) 2689 (if (not (car result))
2690 (ange-ftp-error host user (concat "BINARY failed: " (cdr result))) 2690 (ange-ftp-error host user (concat "BINARY failed: " (cdr result)))
2691 (save-excursion 2691 (save-excursion
2692 (set-buffer (process-buffer (ange-ftp-get-process host user))) 2692 (set-buffer (process-buffer (ange-ftp-get-process host user)))
2693 (setq ange-ftp-hash-mark-unit (ash ange-ftp-binary-hash-mark-size -4)))))) 2693 (and ange-ftp-binary-hash-mark-size
2694 (setq ange-ftp-hash-mark-unit
2695 (ash ange-ftp-binary-hash-mark-size -4)))))))
2694 2696
2695 (defun ange-ftp-set-ascii-mode (host user) 2697 (defun ange-ftp-set-ascii-mode (host user)
2696 "Tell the ftp process for the given HOST & USER to switch to ascii mode." 2698 "Tell the ftp process for the given HOST & USER to switch to ascii mode."
2697 (let ((result (ange-ftp-send-cmd host user '(type "ascii")))) 2699 (let ((result (ange-ftp-send-cmd host user '(type "ascii"))))
2698 (if (not (car result)) 2700 (if (not (car result))
2699 (ange-ftp-error host user (concat "ASCII failed: " (cdr result))) 2701 (ange-ftp-error host user (concat "ASCII failed: " (cdr result)))
2700 (save-excursion 2702 (save-excursion
2701 (set-buffer (process-buffer (ange-ftp-get-process host user))) 2703 (set-buffer (process-buffer (ange-ftp-get-process host user)))
2702 (setq ange-ftp-hash-mark-unit (ash ange-ftp-ascii-hash-mark-size -4)))))) 2704 (and ange-ftp-ascii-hash-mark-size
2705 (setq ange-ftp-hash-mark-unit
2706 (ash ange-ftp-ascii-hash-mark-size -4)))))))
2703 2707
2704 (defun ange-ftp-cd (host user dir) 2708 (defun ange-ftp-cd (host user dir)
2705 (let ((result (ange-ftp-send-cmd host user (list 'cd dir) "Doing CD"))) 2709 (let ((result (ange-ftp-send-cmd host user (list 'cd dir) "Doing CD")))
2706 (or (car result) 2710 (or (car result)
2707 (ange-ftp-error host user (concat "CD failed: " (cdr result)))))) 2711 (ange-ftp-error host user (concat "CD failed: " (cdr result))))))