Function: epa-progress-callback-function

epa-progress-callback-function is a byte-compiled function defined in epa.el.gz.

Signature

(epa-progress-callback-function CONTEXT WHAT CHAR CURRENT TOTAL HANDBACK)

Source Code

;; Defined in /usr/src/emacs/lisp/epa.el.gz
(defun epa-progress-callback-function (_context what _char current total
						handback)
  (let ((prompt (or handback
		    (format "Processing %s: " what))))
    ;; According to gnupg/doc/DETAIL: a "total" of 0 indicates that
    ;; the total amount is not known. The condition TOTAL && CUR ==
    ;; TOTAL may be used to detect the end of an operation.
    (if (> total 0)
	(if (= current total)
	    (message "%s...done" prompt)
	  (message "%s...%d%%" prompt
		   (floor (* 100.0 current) total)))
      (message "%s..." prompt))))