Function: shr-pro-rate-columns

shr-pro-rate-columns is a byte-compiled function defined in shr.el.gz.

Signature

(shr-pro-rate-columns COLUMNS)

Source Code

;; Defined in /usr/src/emacs/lisp/net/shr.el.gz
(defun shr-pro-rate-columns (columns)
  (let ((total-percentage 0)
	(widths (make-vector (length columns) 0)))
    (dotimes (i (length columns))
      (setq total-percentage (+ total-percentage (aref columns i))))
    (setq total-percentage (/ 1.0 total-percentage))
    (dotimes (i (length columns))
      (aset widths i (max (truncate (* (aref columns i)
				       total-percentage
				       (- shr-internal-width
                                          (* (1+ (length columns))
					     shr-table-separator-pixel-width))))
			  10)))
    widths))