Function: math-read-big-bigp

math-read-big-bigp is a byte-compiled function defined in calc-ext.el.gz.

Signature

(math-read-big-bigp READ-BIG-LINES)

Source Code

;; Defined in /usr/src/emacs/lisp/calc/calc-ext.el.gz
(defun math-read-big-bigp (read-big-lines)
  (when (cdr read-big-lines)
    (let ((math-read-big-lines read-big-lines)
	  (matrix nil)
	  (v 0)
	  (height (if (> (length (car read-big-lines)) 0) 1 0)))
      (while (and (cdr math-read-big-lines)
		  (let* ((i 0)
			 j
			 (l1 (car math-read-big-lines))
			 (l2 (nth 1 math-read-big-lines))
			 (len (min (length l1) (length l2))))
		    (if (> (length l2) 0)
			(setq height (1+ height)))
		    (while (and (< i len)
				(or (memq (aref l1 i) '(?\  ?\- ?\_))
				    (memq (aref l2 i) '(?\  ?\-))
				    (and (memq (aref l1 i) '(?\| ?\,))
					 (= (aref l2 i) (aref l1 i)))
				    (and (eq (aref l1 i) ?\[)
					 (eq (aref l2 i) ?\[)
					 (let ((math-rb-h2 (length l1)))
					   (setq j (math-read-big-balance
						    (1+ i) v "[")))
					 (setq i (1- j)))))
		      (setq i (1+ i)))
		    (or (= i len)
			(and (eq (aref l1 i) ?\[)
			     (eq (aref l2 i) ?\[)
			     (setq matrix t)
			     nil))))
	(setq math-read-big-lines (cdr math-read-big-lines)
	      v (1+ v)))
      (or (and (> height 1)
	       (not (cdr math-read-big-lines)))
	  matrix))))