Function: ange-ftp-process-handle-hash
ange-ftp-process-handle-hash is a byte-compiled function defined in
ange-ftp.el.gz.
Signature
(ange-ftp-process-handle-hash STRING)
Documentation
Remove hash marks from STRING and display count so far.
Source Code
;; Defined in /usr/src/emacs/lisp/net/ange-ftp.el.gz
(defun ange-ftp-process-handle-hash (string)
"Remove hash marks from STRING and display count so far."
(setq string (concat (substring string 0 (match-beginning 0))
(substring string (match-end 0)))
ange-ftp-hash-mark-count (+ (- (match-end 0)
(match-beginning 0))
ange-ftp-hash-mark-count))
(and ange-ftp-hash-mark-unit
ange-ftp-process-msg
ange-ftp-process-verbose
(not (eq (selected-window) (minibuffer-window)))
(not (boundp 'search-message)) ;screws up isearch otherwise
(not cursor-in-echo-area) ;screws up y-or-n-p otherwise
(let ((kbytes (ash (* ange-ftp-hash-mark-unit
ange-ftp-hash-mark-count)
-6)))
(if (zerop ange-ftp-xfer-size)
(ange-ftp-message "%s...%dk" ange-ftp-process-msg kbytes)
(let ((percent (floor (* 100.0 kbytes) ange-ftp-xfer-size)))
;; cut out the redisplay of identical %-age messages.
(unless (eq percent ange-ftp-last-percent)
(setq ange-ftp-last-percent percent)
(ange-ftp-message "%s...%d%%" ange-ftp-process-msg percent))))))
string)