home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
archives
/
tiexplorer.tar.gz
/
tiexplorer.tar
/
vtcurs.lsp
< prev
Wrap
Lisp/Scheme
|
1986-09-22
|
4KB
|
88 lines
;;; -*- Mode: Lisp; Package: User; Base: 10.; Patch-File: T -*-
;;; RESTRICTED RIGHTS LEGEND
;;;Use, duplication, or disclosure by the Government is subject to
;;;restrictions as set forth in subdivision (b)(3)(ii) of the Rights in
;;;Technical Data and Computer Software clause at 52.227-7013.
;;;
;;; TEXAS INSTRUMENTS INCORPORATED.
;;; P.O. BOX 2909
;;; AUSTIN, TEXAS 78769
;;; MS 2151
;;;
;;; Copyright (c) 1986, Texas Instruments Incorporated. All rights reserved.
;;; Written 5/16/86 10:34:33 by FORD,
;;; Reason: Fix (:METHOD VT100-ESCAPE-SEQUENCE-MIXIN :PROCESS-ESCAPE-BRACKET-NUMERIC-NUMERIC-SEMICOLON-SEQUENCE)
;;; to properly process the second leading zero in escape sequences like 01H.
;;; while running on B from band LOD2
;;; with System 2.44, Compiler 2.5, File System 2.1, Universal Command Loop 2.0, Window System 2.5, Input Editor 2.0, ZMACS 2.5, Error Handler 2.0, Suggestions 2.1, Debug Utilities 2.7, Explorer-Net 2.6, Telnet 2.2, Vt100 2.0, File Server 2.0, Net-Config 2.2, Font Editor 2.2, Mailer 2.4, Mail-Reader 2.4, Streamer-Tape 2.7, Local-File 2.15, System-Log 2.2, Serial-Parallel 2.8, Printer 2.0, Glossary 2.0, IMAGEN 2.1, NVRAM 2.3, User Profile Utility 2.1, IP 1.15, Experimental Code Management Interface 2.22, Experimental Explorer Bug System 20.0, microcode 287, FAN23-MCR287-AUS.
#!Z
; From file PROCESS-ESCAPE-SEQUENCE.LISP#> VT100; A:
#10R TELNET#:
(COMPILER-LET ((PACKAGE (PKG-FIND-PACKAGE "TELNET"))
(SI:LISP-MODE :ZETALISP)
(*READTABLE* SI:STANDARD-READTABLE)
(SI:*READER-SYMBOL-SUBSTITUTIONS* NIL))
(COMPILER#:PATCH-SOURCE-FILE "SYS: VT100; PROCESS-ESCAPE-SEQUENCE.#"
(DEFMETHOD (vt100-escape-sequence-mixin
:PROCESS-ESCAPE-BRACKET-NUMERIC-NUMERIC-SEMICOLON-SEQUENCE) (ch)
(cond ((= ch #/r) ; ESC [ num num ; num num r
(setq scroll-ending-line ; Scrolling regions
(min ending-line (tv:sheet-number-of-inside-lines vt100-pane)))
(setq scroll-starting-line starting-line-completed-value)
(if (= scroll-ending-line 0)
(setq scroll-ending-line (tv:sheet-number-of-inside-lines vt100-pane)))
(setq top-of-scroll scroll-starting-line)
(setq bottom-of-scroll scroll-ending-line)
(send vt100-pane ':set-cursorpos 0 0 ':character)
(send self ':reset))
((or (= ch #/H) (= ch #/f)) ; Direct cursor addressing
; ESC [ 14 ; H ESC [ 14 ; 1 H ESC [ 14 ; 12 H
; And the same sequences with 'f'
(send self ':move-to-direct-cursor-position
starting-line-completed-value column)
(send self ':reset))
(escape-bracket-numeric-numeric-semicolon-numeric-flag
;This is the second of the two digits, so now make a two digit value
(cond ((and test-for-three-digits-flag ; Check for "00", ie, ESC [ 10;007H
(= escape-bracket-numeric-numeric-semicolon-numeric-ch #/0))
(setq test-for-three-digits-flag nil)
(setq escape-bracket-numeric-numeric-semicolon-numeric-numeric-ch ch)
(setq ending-line
(make-two-digit-value
escape-bracket-numeric-numeric-semicolon-numeric-ch
escape-bracket-numeric-numeric-semicolon-numeric-numeric-ch))
(setq column ending-line))
(t (setq escape-bracket-numeric-numeric-semicolon-numeric-numeric-ch ch)
(setq ending-line
(make-two-digit-value
escape-bracket-numeric-numeric-semicolon-numeric-ch
escape-bracket-numeric-numeric-semicolon-numeric-numeric-ch))
(setq column ending-line))))
((and (>= ch #/0) (<= ch #/9))
;This is the first of the two digits
(setq test-for-three-digits-flag t)
(setq escape-bracket-numeric-numeric-semicolon-numeric-ch ch)
(setq column (- ch #/0))
(setq escape-bracket-numeric-numeric-semicolon-numeric-flag t)
(cond ((= starting-line-second-ch 99.)
(setq ending-line
(make-two-digit-value
escape-bracket-numeric-semicolon-numeric-ch
escape-bracket-numeric-numeric-semicolon-numeric-ch))
(setq starting-line (- starting-line #/0)))
(t NIL)))
(t
(send self ':reset))))
))