remove aref of boolean for debugging
File modified: lisp/ivan/nterm.el
Change289 at Mon May 03 21:41:35 2010 +0200 by Ivan Kanis <ivan@tao>
diff -r 292f783f195a -r e847a9660649 lisp/ivan/nterm.el --- a/lisp/ivan/nterm.el Sun May 02 12:36:58 2010 +0200 +++ b/lisp/ivan/nterm.el Mon May 03 21:41:35 2010 +0200 @@ -62,9 +62,6 @@ ;; terminal. Someone can easily reproduce a bug by replaying the trace ;; both on xterm and nterm. -;; It's not complete yet but it passes the first three tests of -;; vttest. I will get back to it when I have time. - ;; The latest version is at http://kanis.fr/hg/lisp/ivan/nterm.el ;; FAQ @@ -125,27 +122,12 @@ "Map single width character to unicode double width equivalent.") ;;; Debugging -(defvar nterm-debug (make-bool-vector 6 nil) - "Debugging bool vector") - -(defvar nterm-debug-emulator 0) -(defvar nterm-debug-vt100 1) -(defvar nterm-debug-cursor 2) -(defvar nterm-debug-ansi 3) -(defvar nterm-debug-vt52 4) -(defvar nterm-debug-assert 5) -;; (aset nterm-debug nterm-debug-emulator t) -;; (aset nterm-debug nterm-debug-emulator nil) -;; (aset nterm-debug nterm-debug-vt100 t) -;; (aset nterm-debug nterm-debug-vt100 nil) -;; (aset nterm-debug nterm-debug-cursor t) -;; (aset nterm-debug nterm-debug-cursor nil) -;; (aset nterm-debug nterm-debug-ansi t) -;; (aset nterm-debug nterm-debug-ansi nil) -;; (aset nterm-debug nterm-debug-vt52 t) -;; (aset nterm-debug nterm-debug-vt52 nil) -;; (aset nterm-debug nterm-debug-assert t) -;; (aset nterm-debug nterm-debug-assert nil) +(defvar nterm-debug-emulator nil) +(defvar nterm-debug-vt100 nil) +(defvar nterm-debug-cursor nil) +(defvar nterm-debug-ansi nil) +(defvar nterm-debug-vt52 nil) +(defvar nterm-debug-assert nil) (defvar nterm-record-enable nil "Enable recording") @@ -253,7 +235,7 @@ "Return CONS of cursor-position (line . col)." (let ((line (cadr (assq 'cursor nterm-state))) (col (cddr (assq 'cursor nterm-state)))) - (if (aref nterm-debug nterm-debug-cursor) + (if nterm-debug-cursor (message "nterm-cursor-position-get line=%d col=%d" line col)) (cons line col))) @@ -262,7 +244,7 @@ (let ((get-line (cadr (assq 'cursor nterm-state)))) (if (>= get-line nterm-height) (error "line out of range line=%d" get-line)) - (if (aref nterm-debug nterm-debug-cursor) + (if nterm-debug-cursor (message "nterm-cursor-line-get col=%d" get-line)) get-line)) @@ -271,13 +253,13 @@ (let ((get-col (cddr (assq 'cursor nterm-state)))) (if (>= get-col nterm-width) (error "col out of range col=%d" get-col)) - (if (aref nterm-debug nterm-debug-cursor) + (if nterm-debug-cursor (message "nterm-cursor-col-get col=%d" get-col)) get-col)) (defun nterm-cursor-position-set (cursor-set) "Set cursor to cons CURSOR-SET (line . col)." - (if (aref nterm-debug nterm-debug-cursor) + (if nterm-debug-cursor (message "nterm-cursor-position-set line=%d col=%d" (car cursor-set) (cdr cursor-set))) (nterm-cursor-col-set (cdr cursor-set)) @@ -287,7 +269,7 @@ "Move cursor to line CURSOR-LINE." (if (>= cursor-line nterm-height) (error "line out of range line=%d" cursor-line)) - (if (aref nterm-debug nterm-debug-cursor) + (if nterm-debug-cursor (message "nterm-cursor-line-set line=%d" cursor-line)) (setcar (cdr (assq 'cursor nterm-state)) cursor-line) (goto-char 1) @@ -298,7 +280,7 @@ "Move cursor to column CURSOR-COL." (if (>= cursor-col (nterm-vt100-width)) (error "col out of range col=%d" cursor-col)) - (if (aref nterm-debug nterm-debug-cursor) + (if nterm-debug-cursor (message "nterm-cursor-col-set col=%d" cursor-col)) (setcdr (cdr (assq 'cursor nterm-state)) cursor-col) (let ((window (get-buffer-window nterm-buffer-name))) @@ -308,7 +290,7 @@ (defun nterm-emulate (process output) "Dispatch characters from process" - (if (aref nterm-debug nterm-debug-emulator) + (if nterm-debug-emulator (message output)) (if nterm-record-enable (nterm-record-insert output)) @@ -325,13 +307,13 @@ (setq emulate-dispatch (aref (eval nterm-dispatch) emulate-char)) (if emulate-dispatch (progn - (if (aref nterm-debug nterm-debug-emulator) + (if nterm-debug-emulator (message "received 0x%x %c dispatch %S" emulate-char emulate-char emulate-dispatch)) (funcall emulate-dispatch emulate-char) - (if (aref nterm-debug nterm-debug-assert) + (if nterm-debug-assert (nterm-assert))) - (if (aref nterm-debug nterm-debug-emulator) + (if nterm-debug-emulator (message "received 0x%x not handled" emulate-char))))) (incf emulate-index)) (set-buffer emulate-buffer))) @@ -499,7 +481,7 @@ (defun nterm-ansi-rm (char) "RM -- Reset Mode - ansi" - (if (aref nterm-debug nterm-debug-ansi) + (if nterm-debug-ansi (message "RM")) (if (nterm-vt100-set-mode nterm-ansi-mode nterm-ansi-mode-function nil) @@ -507,7 +489,7 @@ (defun nterm-ansi-sm (char) "SM -- Set Mode - ansi" - (if (aref nterm-debug nterm-debug-ansi) + (if nterm-debug-ansi (message "SM")) (nterm-vt100-set-mode nterm-ansi-mode nterm-ansi-mode-function t) @@ -962,7 +944,7 @@ (defun nterm-vt100-bs (char) "Backspace, it doesn't erase in VT100" (let* ((cub-col (- (nterm-cursor-col-get) 1))) - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "Backspace")) (if (< cub-col 0) (setq cub-col 0)) @@ -976,7 +958,7 @@ (let* ((cpr-line (+ (nterm-cursor-line-get) 1)) (cpr-col (+ (nterm-cursor-col-get) 1)) (string (format "\e[%s;%s)" cpr-line cpr-col))) - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "CPR line=%d col=%d" cpr-line cpr-col)) (nterm-send-string string))) @@ -984,7 +966,7 @@ "CUB -- Cursor Backward -- host to vt100" (let* ((cub-number (car (nterm-argument-to-list 1 1))) (cub-col (- (nterm-cursor-col-get) cub-number))) - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "CUB %d" cub-number)) (if (< cub-col 0) (setq cub-col 0)) @@ -996,7 +978,7 @@ (let* ((cud-number (car (nterm-argument-to-list 1 1))) (cud-line (+ (nterm-cursor-line-get) cud-number)) (cud-height (cdr (assq 'bottom-margin nterm-vt100-state)))) - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "CUD %d" cud-number)) (if (> cud-line cud-height) (setq cud-line cud-height)) @@ -1008,7 +990,7 @@ (let* ((cuf-number (car (nterm-argument-to-list 1 1))) (cuf-col (+ (nterm-cursor-col-get) cuf-number)) (cuf-width (- (nterm-vt100-width) 1))) - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "CUF %d" cuf-number)) (if (> cuf-col cuf-width) (setq cuf-col cuf-width)) @@ -1027,7 +1009,7 @@ ;; check for upper bound (and (> cup-line nterm-height) (setq cup-line 1)) (and (> cup-col nterm-width) (setq cup-col 1)) - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "CUP line=%d col=%d" cup-line cup-col)) (nterm-cursor-position-set (cons (- cup-line 1) (- cup-col 1)))) (nterm-vt100-escape-end char)) @@ -1037,7 +1019,7 @@ (let* ((cuu-number (car (nterm-argument-to-list 1 1))) (cuu-line (- (nterm-cursor-line-get) cuu-number)) (cuu-top (cdr (assq 'top-margin nterm-vt100-state)))) - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "CUU %d" cuu-number)) (if (< cuu-line cuu-top) (setq cuu-line cuu-top)) @@ -1128,20 +1110,20 @@ (defun nterm-vt100-cr (char) "Do a carriage return" (interactive) - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "CR")) (nterm-cursor-col-set 0)) (defun nterm-vt100-da (char) "DA -- Device attribute TBD" - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "DA")) (nterm-send-string"\e[?1;2c") (nterm-vt100-escape-end char)) (defun nterm-vt100-decaln (char) "DECALN -- Screen Alignment Display (DEC Private)" - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "DECALN")) (nterm-blank-screen ?E) (nterm-vt100-escape-end char)) @@ -1154,17 +1136,17 @@ (defun nterm-vt100-decawm (flag) "DECAWM – Auto Wrap Mode (DEC Private)" - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "DECAWM %s" (if flag "set" "reset")))) (defun nterm-vt100-decckm (flag) "DECCKM – Column Mode (DEC Private)" - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "DECCKM %s" (if flag "set" "reset")))) (defun nterm-vt100-deccolm (flag) "DECCOLM – Column Mode (DEC Private)" - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "DECCOLM %s" (if flag "set" "reset"))) (let ((deccolm-width (if flag 132 80))) (set-frame-width nil deccolm-width) @@ -1176,7 +1158,7 @@ (defun nterm-vt100-decdhl-top (char) "DECDHL -- Double Height Line (DEC Private)" - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "DECHDL (top)")) (nterm-mem-line-set nterm-vt100-line-decdwl nil) (nterm-mem-line-set nterm-vt100-line-decdwl-top t) @@ -1187,7 +1169,7 @@ (defun nterm-vt100-decdhl-bottom (char) "DECDHL -- Double Height Line (DEC Private)" - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "DECHDL (bottom)")) (nterm-mem-line-set nterm-vt100-line-decdwl nil) (nterm-mem-line-set nterm-vt100-line-decdwl-top nil) @@ -1198,7 +1180,7 @@ (defun nterm-vt100-decdwl (char) "DECDWL -- Double-Width Line (DEC Private)" - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "DECDWL")) (nterm-mem-line-set nterm-vt100-line-decdwl t) (nterm-mem-line-set nterm-vt100-line-decdwl-top nil) @@ -1210,20 +1192,20 @@ (defun nterm-vt100-decid (char) "DECID -- Identify Terminal (DEC Private) TBD implement" - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "DECID")) (nterm-vt100-escape-end char)) (defun nterm-vt100-deckpam (char) "DECKPAM -- Keypad Application Mode (DEC Private)." - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "DECKPAM")) (aset nterm-vt100-mode 10 t) (nterm-vt100-escape-end char)) (defun nterm-vt100-deckpnm (char) "DECKPNM -- Keypad Numeric Mode (DEC Private)." - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "DECKPNM")) (aset nterm-vt100-mode 10 nil) (nterm-vt100-escape-end char)) @@ -1231,19 +1213,19 @@ (defun nterm-vt100-decll (char) "DECLL -- Load LEDS (DEC Private) TBD implement" - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "DECKLL") (nterm-vt100-escape-end char))) (defun nterm-vt100-decom (flag) "DECOM – Origin Mode (DEC Private)" - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "DECOM %s" (if flag "set" "reset"))) (nterm-vt100-home)) (defun nterm-vt100-decrc (char) "DECRC -- Restore Cursor (DEC Private) - host to vt100" - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "RC")) (nterm-cursor-position-set (cdr (assq 'save-cursor nterm-vt100-state))) (nterm-state-copy save-charset charset nil) @@ -1255,19 +1237,19 @@ (defun nterm-vt100-decreptparm () "DECREPTPARM -- Report Terminal Parameters - vt100 to host TBD implement" - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "REPTPARM"))) (defun nterm-vt100-decreqtparm (char) "DECREQTPARM -- Request Terminal Parameters - host to vt100 TBD implement" - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "DECREQTPARM")) (nterm-vt100-escape-end char)) (defun nterm-vt100-decsc (char) "DECSC -- Save Cursor (DEC Private) - host to vt100" - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "DECSC")) (setcdr (assq 'save-cursor nterm-vt100-state) (nterm-cursor-position-get)) @@ -1289,7 +1271,7 @@ (let* ((stbm-list (nterm-argument-to-list 2 0)) (stbm-top (nth 0 stbm-list)) (stbm-bottom (nth 1 stbm-list))) - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "DECSTBM top=%d bottom=%d" stbm-top stbm-bottom)) (if (= stbm-bottom 0) (setq stbm-bottom (- nterm-height 1)) @@ -1305,7 +1287,7 @@ (defun nterm-vt100-decswl (char) "DECSWL -- Single-width Line (DEC Private) - host to vt100" - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "DECSWL")) (nterm-mem-line-set nterm-vt100-line-decdwl nil) (nterm-mem-line-set nterm-vt100-line-decdwl-top nil) @@ -1315,7 +1297,7 @@ (defun nterm-vt100-dectst (char) "DECTST -- Invoke Confidence Test - host to vt100" - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "DECTST")) (let ((list-dectst (nterm-argument-to-list 2 0))) (if (and (eq (nth 0 list-dectst) 2) @@ -1324,7 +1306,7 @@ (defun nterm-vt100-dsr (char) "DSR -- Device Status Report" - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "DECDSR")) (let ((dsr-number (car (nterm-argument-to-list 1 0)))) (cond ((eq dsr-number 0) @@ -1338,7 +1320,7 @@ (ed-index 0) (ed-line (nterm-cursor-line-get)) (ed-col (nterm-cursor-col-get))) - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "ED par=%d" ed-number)) (while (< ed-index nterm-height) (cond @@ -1376,7 +1358,7 @@ (let ((el-number (car (nterm-argument-to-list 1 0))) (el-line (nterm-cursor-line-get)) (el-col (nterm-cursor-col-get))) - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "EL par=%d" el-number)) (cond ((eq el-number 0) @@ -1424,7 +1406,7 @@ (defun nterm-vt100-hts (char) "HTS -- Horizontal Tabulation Set - host to vt100" - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "HTS")) (aset (cdr (assq 'tab nterm-vt100-state)) (nterm-cursor-col-get) t) (nterm-vt100-escape-end char)) @@ -1432,7 +1414,7 @@ (defun nterm-vt100-hvp (char) "HVP -- Horizontal and Vertical Position - host to vt100 TBD handle DECOM" - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "HVP")) (nterm-vt100-cup char)) @@ -1441,7 +1423,7 @@ (defun nterm-vt100-ind (char) "IND -- Index - host to vt100" - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "IND")) (nterm-vt100-lf char) (nterm-vt100-escape-end char)) @@ -1539,7 +1521,7 @@ (defun nterm-vt100-lf (char) "Do a line feed, handle scrolling" (interactive) - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "LF")) (let ((lf-line (nterm-cursor-line-get))) (if (= lf-line (cdr (assq 'bottom-margin nterm-vt100-state))) @@ -1605,12 +1587,9 @@ (defun nterm-vt100-line-draw-dwl (res) "Draw double width LINE from terminal memory." - (let* ((dwl-table (eval (nterm-vt100-char-insert-table - (cdr (assq 'attribute res))))) - (dwl-string (aref dwl-table (cdr (assq 'char res))))) - (nterm-insert-image dwl-string 24 24 - (cdr (assq 'background res)) - (cdr (assq 'foreground res))))) + (nterm-insert-image (cdr (assq 'char res)) 24 24 + (cdr (assq 'background res)) + (cdr (assq 'foreground res)))) (defun nterm-vt100-mode-decawm () "Returns DECAWM mode" @@ -1644,7 +1623,7 @@ (defun nterm-vt100-nel (char) "NEL -- Next Line - host to vt100" - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "NEL")) (nterm-vt100-cr char) (nterm-vt100-lf char) @@ -1669,7 +1648,7 @@ (defun nterm-vt100-ri (char) "RI -- Reverse Index - host to vt100" - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "RI")) (if (= (nterm-cursor-line-get) (cdr (assq 'top-margin nterm-vt100-state))) (nterm-scroll-down @@ -1681,14 +1660,14 @@ (defun nterm-vt100-ris (char) "RIS -- Reset To Initial State - host to vt100" - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "RIS")) (nterm-vt100-reset ?\s) (nterm-vt100-escape-end char)) (defun nterm-vt100-rm (char) "RM -- Reset Mode - host to vt100" - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "RM")) (if (nterm-vt100-set-mode nterm-vt100-mode nterm-vt100-mode-function nil) @@ -1696,7 +1675,7 @@ (defun nterm-vt100-scs-g0 (char) "SCS -- Select Character Set G0- host to vt100" - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "SCS %c" char)) (setcar (cdr (assq 'charset nterm-vt100-state)) @@ -1713,7 +1692,7 @@ (defun nterm-vt100-scs-g1 (char) "SCS -- Select Character Set G0- host to vt100" - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "SCS %c" char)) (setcar (cddr (assq 'charset nterm-vt100-state)) @@ -1762,7 +1741,7 @@ (sgr-foreground (cdr (assq 'foreground nterm-vt100-state))) (sgr-background (cdr (assq 'background nterm-vt100-state))) sgr-number) - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "SGR %S" sgr-list)) (while sgr-list (setq sgr-number (car sgr-list)) @@ -1805,7 +1784,7 @@ (defun nterm-vt100-sm (char) "SM -- Set Mode - host to vt100" - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "SM")) (if (nterm-vt100-set-mode nterm-vt100-mode nterm-vt100-mode-function t) @@ -1827,7 +1806,7 @@ tab-col tab-width)) ; end loop (incf tab-col)) (setq tab-col (if (= target-col -1) (- tab-width 1) target-col)) - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "TAB going to col=%d" tab-col)) (nterm-cursor-col-set tab-col))) @@ -1848,7 +1827,7 @@ (defun nterm-vt100-tbc (char) "TBC -- Tabulation Clear - host to vt100" - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "TBC")) (let ((tbc-arg (car (nterm-argument-to-list 1 0))) (tabs (cdr (assq 'tab nterm-vt100-state)))) @@ -2319,7 +2298,7 @@ (defun nterm-vt52-cursor-down (char) "Cursor Down -- host to vt52." (let ((cud-line (+ (nterm-cursor-line-get) 1))) - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "vt52 cursor down")) (if (< cud-line nterm-height) (nterm-cursor-line-set cud-line))) @@ -2328,7 +2307,7 @@ (defun nterm-vt52-cursor-left (char) "CUB -- Cursor Backward -- host to vt52" (let ((cub-col (- (nterm-cursor-col-get) 1))) - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "vt52 cursor left")) (if (>= cub-col 0) (nterm-cursor-col-set cub-col))) @@ -2337,7 +2316,7 @@ (defun nterm-vt52-cursor-right (char) "Cursor Right -- host to vt52." (let ((cuf-col (+ (nterm-cursor-col-get) 1))) - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "vt52 cursor right")) (if (< cuf-col nterm-width) (nterm-cursor-col-set cuf-col))) @@ -2346,7 +2325,7 @@ (defun nterm-vt52-cursor-up (char) "Cursor Up -- host to vt52." (let ((cuu-line (- (nterm-cursor-line-get) 1))) - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "vt52 cursor up")) (if (<= cuu-line 0) (nterm-cursor-line-set cuu-line))) @@ -2354,7 +2333,7 @@ (defun nterm-vt52-enter-graphics (char) "Enter graphics mode -- host to vt52." - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "vt52 enter graphics mode")) (setcdr (assq 'charset nterm-vt52-state) nterm-vt52-charset-graphic) (nterm-vt52-escape-end char)) @@ -2362,7 +2341,7 @@ (defun nterm-vt52-erase-to-end-of-screen (char) (let ((end-line (nterm-cursor-line-get)) (end-position (nterm-cursor-position-get))) - (if (aref nterm-debug nterm-debug-vt52) + (if nterm-debug-vt52 (message "vt 52 erase to end of screen")) (nterm-vt52-blank-line ?\s) (incf end-line) (while (< end-line nterm-height) @@ -2373,7 +2352,7 @@ (nterm-vt52-escape-end char)) (defun nterm-vt52-erase-to-end-of-line (char) - (if (aref nterm-debug nterm-debug-vt52) + (if nterm-debug-vt52 (message "vt 52 erase to end of line")) (nterm-vt52-blank-line ?\s) ;; TBD ?\s (nterm-cursor-line-get) (- nterm-width (nterm-cursor-col-get))) @@ -2388,14 +2367,14 @@ (setq nterm-dispatch 'nterm-vt52-escape-dispatch)) (defun nterm-vt52-escape-y-col (char) "Set column - host to vt52." - (if (aref nterm-debug nterm-debug-vt52) + (if nterm-debug-vt52 (message "vt 52 ESC y set col")) (nterm-cursor-col-set (- char 32)) (nterm-vt52-escape-end char)) (defun nterm-vt52-escape-y-line (char) "Set line -- host to vt52" - (if (aref nterm-debug nterm-debug-vt52) + (if nterm-debug-vt52 (message "vt 52 ESC y set line")) (nterm-cursor-line-set (- char 32)) (setq nterm-dispatch 'nterm-vt52-escape-y-dispatch-col)) @@ -2406,7 +2385,7 @@ (defun nterm-vt52-exit-graphics (char) "Exit graphics mode -- host to vt52." - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "vt52 exit graphics mode")) (setcdr (assq 'charset nterm-vt52-state) nterm-vt100-charset-normal) (nterm-vt52-escape-end char)) @@ -2430,7 +2409,7 @@ (defun nterm-vt52-reverse-line-feed (char) "Reverse Line Feed -- host to vt52." - (if (aref nterm-debug nterm-debug-vt100) + (if nterm-debug-vt100 (message "vt52 reverse line feed ")) (if (= (nterm-cursor-line-get) 0) (nterm-scroll-down 0 nterm-height 'nterm-vt52-blank-line) @@ -2443,7 +2422,7 @@ (defun nterm-vt52-identify (char) "Identify -- host to vt52" - (if (aref nterm-debug nterm-debug-vt52) + (if nterm-debug-vt52 (message "vt 52 identify")) (nterm-send-string "\e/Z"))