home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / archives / tiexplorer.zip / ptch11.lsp < prev    next >
Text File  |  1986-09-22  |  7KB  |  176 lines

  1.  
  2. ;;; -*- Mode: Lisp; Package: User; Base: 8.; Patch-File: T -*-
  3. ;;; Written 10/17/86 12:26:15 by SPERRY,
  4. ;;; Reason: Added definitions for :send-long-break and :send-short-break methods
  5. ;;; to serial-stream-mixin, and defined the analagous commands for the
  6. ;;; VT100 emulator.
  7. ;;; while running on A from band LOD1
  8. ;;; with System  2.11, Compiler  2.0, File System  2.0, Universal Command Loop  2.0, Window System  2.1, Input Editor  2.0, ZMACS  2.3, Error Handler  2.0, Suggestions  2.0, Debug Utilities  2.2, Explorer-Net  2.5, Telnet  2.0, Vt100  2.0, File Server  2.0, Net-Config  2.1, Font Editor  2.0, Mailer  2.1, Mail-Reader  2.2, Streamer-Tape  2.3, Local-File  2.10, System-Log  2.0, Serial-Parallel  2.0, Printer  2.0, Glossary  2.0, IMAGEN  2.0, NVRAM  2.0, User Profile Utility  2.1, SPERRY  2.0, KEE2  1.6401, Graphics-Window  2.0, Graphics-Editor  2.0, Tree-Drawing-Utility  2.0, RTMS  2.5, NLMenu  2.0, NLMenu-RTMS-Interface  2.0, PROLOG  2.1, Grasper  2.0, Formatter  2.0, Color Graphics  1.0, IP  1.5, KERMIT  1.0, microcode 258, Rel 2.0.1 + KEE + 8 kits, 7-1-86.
  9.  
  10.  
  11.  
  12. #!Z
  13. ; From file SERIAL-TELNET.LISP#> KERMIT; A:
  14. #8R TELNET#:
  15. (COMPILER-LET ((PACKAGE (PKG-FIND-PACKAGE "TELNET"))
  16.                          (SI:LISP-MODE :ZETALISP)
  17.                          (*READTABLE* SI:STANDARD-READTABLE)
  18.                          (SI:*READER-SYMBOL-SUBSTITUTIONS* NIL))
  19.   (COMPILER#:PATCH-SOURCE-FILE "LM: KERMIT; SERIAL-TELNET.#"
  20.  
  21. si:
  22. (defmethod (serial-stream-mixin :SEND-LONG-BREAK) ()
  23.  "Transmits a space condition for 3.5 seconds (long break)."
  24.   (write-z-reg 5
  25.            (logand #x7F            ; Turn off DTR
  26.                (logior #x+10 WR5-CONTENTS)))  ;turn on send break
  27.   (sleep 3.5 "Sending Long Break")
  28.   (write-z-reg 5 WR5-CONTENTS)         ;restore register
  29.   )
  30. ))
  31.  
  32.  
  33. #!Z
  34. ; From file SERIAL-TELNET.LISP#> KERMIT; A:
  35. #8R TELNET#:
  36. (COMPILER-LET ((PACKAGE (PKG-FIND-PACKAGE "TELNET"))
  37.                          (SI:LISP-MODE :ZETALISP)
  38.                          (*READTABLE* SI:STANDARD-READTABLE)
  39.                          (SI:*READER-SYMBOL-SUBSTITUTIONS* NIL))
  40.   (COMPILER#:PATCH-SOURCE-FILE "LM: KERMIT; SERIAL-TELNET.#"
  41.  
  42. si:
  43. (defmethod (serial-stream-mixin :SEND-SHORT-BREAK) ()
  44.  "Transmits a space condition for .275 seconds (short break)."
  45.   (write-z-reg 5 (logior #x+10 WR5-CONTENTS))  ;turn on send break
  46.   (sleep .275 "Sending Short Break")
  47.   (write-z-reg 5 WR5-CONTENTS)                 ;restore register
  48.   )
  49. ))
  50.  
  51. #!Z
  52. ; From file SERIAL-TELNET.LISP#> KERMIT; A:
  53. #8R TELNET#:
  54. (COMPILER-LET ((PACKAGE (PKG-FIND-PACKAGE "TELNET"))
  55.                          (SI:LISP-MODE :ZETALISP)
  56.                          (*READTABLE* SI:STANDARD-READTABLE)
  57.                          (SI:*READER-SYMBOL-SUBSTITUTIONS* NIL))
  58.   (COMPILER#:PATCH-SOURCE-FILE "LM: KERMIT; SERIAL-TELNET.#"
  59.  
  60.  
  61.  
  62. (DEFCOMMAND (VT100-FRAME :LONG-BREAK) ()
  63.   '(:DESCRIPTION "Send a short break to stream."
  64.     :NAMES ("Long Break")
  65.     :KEYS ((#\NETWORK #\CTRL-BREAK)))
  66.   (if (not (null connection))
  67.       (send stream :send-long-break)
  68.       (format t "~&Not connected. Can't send Long Break.")
  69.       (when (not ucl:preempting?)
  70.     (send self :handle-prompt))))
  71.  
  72. ))
  73.  
  74. #!Z
  75. ; From file SERIAL-TELNET.LISP#> KERMIT; A:
  76. #8R TELNET#:
  77. (COMPILER-LET ((PACKAGE (PKG-FIND-PACKAGE "TELNET"))
  78.                          (SI:LISP-MODE :ZETALISP)
  79.                          (*READTABLE* SI:STANDARD-READTABLE)
  80.                          (SI:*READER-SYMBOL-SUBSTITUTIONS* NIL))
  81.   (COMPILER#:PATCH-SOURCE-FILE "LM: KERMIT; SERIAL-TELNET.#"
  82.  
  83.  
  84.  
  85. (DEFCOMMAND (VT100-FRAME :SHORT-BREAK) ()
  86.   '(:DESCRIPTION "Send a short break to stream."
  87.     :NAMES ("Short Break")
  88.     :KEYS ((#\NETWORK #\BREAK)))
  89.   (if (not (null connection))
  90.       (send stream :send-short-break)
  91.       (format t "~&Not connected. Can't send Short Break.")
  92.       (when (not ucl:preempting?)
  93.     (send self :handle-prompt))))
  94. ))
  95.  
  96. #!Z
  97. ; From file SERIAL-TELNET.LISP#> KERMIT; A:
  98. #8R TELNET#:
  99. (COMPILER-LET ((PACKAGE (PKG-FIND-PACKAGE "TELNET"))
  100.                          (SI:LISP-MODE :ZETALISP)
  101.                          (*READTABLE* SI:STANDARD-READTABLE)
  102.                          (SI:*READER-SYMBOL-SUBSTITUTIONS* NIL))
  103.   (COMPILER#:PATCH-SOURCE-FILE "LM: KERMIT; SERIAL-TELNET.#"
  104.  
  105.  
  106.  
  107. (BUILD-COMMAND-TABLE 'VT100-TELNET-CMD-TABLE 'VT100-FRAME
  108.   '((:method telnet-frame :exit-command)        
  109.     (:method telnet-frame :disconnect-command)
  110.     (:method telnet-frame :interrupt-process-command)
  111.     :send-answerback-command
  112.     :reverse-video-command
  113.     :reset-command
  114.     :escape-processing-command
  115.     (:method telnet-frame :quit-and-disconnect-command)
  116.     (:method telnet-frame :status-command)
  117.     (:method telnet-frame :abort-output-command)
  118.     :column-command
  119.     :truncate-command
  120.     :set-vt100-lines
  121.     :network-help-command
  122.     (:method telnet-frame :clear-input-command)
  123.     (:method vt100-frame :autodial)                   ; BAC
  124.     (:method vt100-frame :kermit)                     ; BAC
  125.     :local-echo-command                               ; BAC
  126.     :short-break
  127.     :long-break
  128.     )
  129.   :INIT-OPTIONS
  130.   '(:NAME "Vt100 & Telnet Commands"
  131.       :DOCUMENTATION "The Vt100 & Telnet commands."))
  132.  
  133. ))
  134.  
  135. #!Z
  136. ; From file SERIAL-TELNET.LISP#> KERMIT; A:
  137. #8R TELNET#:
  138. (COMPILER-LET ((PACKAGE (PKG-FIND-PACKAGE "TELNET"))
  139.                          (SI:LISP-MODE :ZETALISP)
  140.                          (*READTABLE* SI:STANDARD-READTABLE)
  141.                          (SI:*READER-SYMBOL-SUBSTITUTIONS* NIL))
  142.   (COMPILER#:PATCH-SOURCE-FILE "LM: KERMIT; SERIAL-TELNET.#"
  143.  
  144.  
  145.  
  146. (BUILD-MENU 'UCL-VT100-TELNET-MENU 'VT100-FRAME
  147.   :DEFAULT-ITEM-OPTIONS
  148.   '(:FONT FONTS:MEDFNT)
  149.   :ITEM-LIST-ORDER
  150.     '( ;Row 1
  151.       (:method telnet-frame :exit-command)        
  152.       (:method telnet-frame :disconnect-command)
  153.       (:method telnet-frame :interrupt-process-command)
  154.       :send-answerback-command
  155.       :reverse-video-command
  156.       :reset-command
  157.       :escape-processing-command
  158.        ;Row 2
  159.       (:method telnet-frame :quit-and-disconnect-command)
  160.       (:method telnet-frame :status-command)
  161.       (:method telnet-frame :abort-output-command)
  162.       :column-command
  163.       :truncate-command
  164.       :set-vt100-lines
  165.       :network-help-command
  166.        ;Row 3                                           ; BAC
  167.       (:method vt100-frame :autodial)                   ; BAC
  168.       (:method vt100-frame :kermit)                     ; BAC
  169.       :local-echo-command                               ; BAC
  170.       :short-break
  171.       :long-break
  172.       ))
  173.  
  174. ))
  175.  
  176.