;ELC   
;;; Compiled by rms@psilocin.gnu.org on Mon Dec 22 01:15:38 1997
;;; from file /gd/gnu/emacs/lisp/telnet.el
;;; in Emacs version 20.2.83.1
;;; with bytecomp version 2.35
;;; with all optimizations.
;;; This file uses opcodes which do not exist in Emacs 18.

(if (and (boundp 'emacs-version)
	 (< (aref emacs-version (1- (length emacs-version))) ?A)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`telnet.el' was compiled for Emacs 19.29 or later"))


(require 'comint)
#@300 Specify which telnet program to use for particular hosts.
Each element has the form (HOSTNAME PROGRAM [LOGIN-NAME])
HOSTNAME says which machine the element applies to.
PROGRAM says which program to run, to talk to that machine.
LOGIN-NAME, which is optional, says what to log in as on that machine.
(defvar telnet-host-properties nil (#$ . 546))
(byte-code "ÀÁ!„ ÂÁBÀÄ!„ ÅÄBÀÆ!„! ÇÆBÀÈ!„. ÅÈBÉÀÊ!„< Ë\nÊBÌÊÍÎ#ˆÊ!ˆÉÀÏ!„S ÐÏBÌÏÍÑ#ˆÏ!‡" [boundp telnet-new-line "" current-load-list telnet-mode-map nil telnet-prompt-pattern "^[^#$%>\n]*[#$%>] *" telnet-replace-c-g make-variable-buffer-local telnet-remote-echoes t put variable-documentation "True if the telnet process will echo input." telnet-interrupt-string "" "String sent by C-c."] 5)
#@74 Number of output strings from telnet process while looking for password.
(defvar telnet-count 0 (#$ . 1315))
(make-variable-buffer-local 'telnet-count)
#@45 Program to run to open a telnet connection.
(defvar telnet-program "telnet" (#$ . 1473))
#@147 Initial value of `telnet-count'.  Should be set to the negative of the
number of terminal writes telnet will make setting up the host connection.
(defvar telnet-initial-count -50 (#$ . 1569))
#@237 Maximum value `telnet-count' can have.
After this many passes, we stop looking for initial setup data.
Should be set to the number of terminal writes telnet will make
rejecting one login and prompting again for a username and password.
(defvar telnet-maximum-count 4 (#$ . 1768))
(defalias 'telnet-interrupt-subjob #[nil "ÀÁ\n\"‡" [send-string nil telnet-interrupt-string] 3 nil nil])
(defalias 'telnet-c-z #[nil "ÀÁÂ\"‡" [send-string nil ""] 3 nil nil])
(defalias 'send-process-next-char #[nil "ÀÁÂÃÅ Á)!\"‡" [send-string nil char-to-string t inhibit-quit read-char quit-flag] 5 nil nil])
(byte-code "„! Á \n¤ÃÄÅ#ˆÃÆÇ#ˆÃÈÉ#ˆÃÊË#ˆÁ‡" [telnet-mode-map make-sparse-keymap comint-mode-map define-key "" telnet-send-input "" send-process-next-char "" telnet-interrupt-subjob "" telnet-c-z] 4)
#@55 Tries to put correct initializations in.  Needs work.
(defalias 'telnet-check-software-type-initialize #[(string) "ÀÂÃ\f\"ƒ Ç‚6 ÂÉ\f\"ƒ Ê‚6 ÂË\f\"ƒ, Ì‚6 ÂÍ\f\"ƒ6 Î)‰‡" [t case-fold-search string-match "unix" string comint-prompt-regexp telnet-prompt-pattern "\n" telnet-new-line "tops-20" "[@>]*" "its" "^[^*>\n]*[*>] *" "explorer" 10 telnet-replace-c-g] 3 (#$ . 2580)])
(defalias 'telnet-initial-filter #[(proc string) "rÀ	!qˆÂÄÅ\"ƒ ÇÀ	!!ˆÈÅ!‚Z ÄÉ\"ƒ: Ê	\"ˆË\fÍ	ÎÏÂ\"P\"‚Z Ñ!ˆÊ	\"ˆ\fVƒT Ó	Ê\"‚Z \fT‰\f*‡" [process-buffer proc t case-fold-search string-match "No such host" string kill-buffer error "passw" telnet-filter 0 telnet-count send-string comint-read-noecho "Password: " telnet-new-line telnet-check-software-type-initialize telnet-maximum-count set-process-filter] 5])
(defalias 'telnet-simple-send #[(proc string) "À	\n\"ˆÀ	\"‡" [comint-send-string proc string telnet-new-line] 3])
(defalias 'telnet-filter #[(proc string) "ŠÀ	!qˆÂÃ	!!`\fZ… Â!Èp!‰	…( Ê	!\fbˆÌ!ˆ\fÏ“ˆÃ	!`Ï“ˆƒL Ð	Ñ#ˆƒX Ï“ˆÒ\fxˆ`\fVƒj `S`|ˆ‚X Ã	!bˆƒ} Ô\f`ÕÑ%ˆÖV…‰ Ã	!\\b.‡" [process-buffer proc marker-position process-mark last-insertion delta comint-last-input-end ie get-buffer-window w window-start ws insert-before-markers string comint-last-output-start nil set-window-start t "^" telnet-replace-c-g subst-char-in-region 7 0] 7])
(defalias 'telnet-send-input #[nil "À ˆ	…\n \n|‡" [comint-send-input telnet-remote-echoes comint-last-input-start comint-last-input-end] 2 nil nil])
#@398 Open a network login connection to host named HOST (a string).
Communication with HOST is recorded in a buffer `*PROGRAM-HOST*'
where PROGRAM is the telnet program being used.  This program
is controlled by the contents of the global variable `telnet-host-properties',
falling back on the value of the global variable `telnet-program'.
Normally input is edited in Emacs and sent a line at a time.
(defalias 'telnet #[(host) "ÀÂ\f\"A‰ƒ @‚ ‰ÇÈÉÊ#QÌÍÍQ!A…1 ÏABÊƒL Ò!ƒL ÓÍÍQ!‚€ ÓÔÕÊ%!ˆÒp!Ö×\"ˆØ!ˆÙ ˆÚÛÜQ\"ˆÝ ˆÞ ‰!.‡" [(32 9) comint-delimiter-argument-list assoc host telnet-host-properties properties telnet-program "-" comint-arguments 0 nil name get-buffer "*" buffer "-l" telnet-options process get-buffer-process pop-to-buffer apply make-comint set-process-filter telnet-initial-filter accept-process-output erase-buffer send-string "open " "\n" telnet-mode telnet-simple-send comint-input-sender telnet-initial-count telnet-count] 8 (#$ . 4122) "sOpen connection to host: "])
(put 'telnet-mode 'mode-class 'special)
#@322 This mode is for using telnet (or rsh) from a buffer to another host.
It has most of the same commands as comint-mode.
There is a variable ``telnet-interrupt-string'' which is the character
sent to try to stop execution of a job on the remote host.
Data is sent to the remote host when RET is typed.

\{telnet-mode-map}

(defalias 'telnet-mode #[nil "À ˆÁÃÇ!ˆÉÊ!‡" [comint-mode telnet-mode major-mode "Telnet" mode-name telnet-prompt-pattern comint-prompt-regexp use-local-map telnet-mode-map run-hooks telnet-mode-hook] 2 (#$ . 5195) nil])
#@187 Open a network login connection to host named HOST (a string).
Communication with HOST is recorded in a buffer `*rsh-HOST*'.
Normally input is edited in Emacs and sent a line at a time.
(defalias 'rsh #[(host) "ÀÁ!ˆÂPÅÆ\fÈ$!ˆÉÊ\f!Ë\"ˆÌ ˆÍ‰)‡" [require shell "rsh-" host name pop-to-buffer make-comint remote-shell-program nil set-process-filter get-process telnet-initial-filter telnet-mode -16 telnet-count] 6 (#$ . 5750) "sOpen rsh connection to host: "])
(provide 'telnet)
