(FILECREATED " 8-Sep-85 18:17:10" {ERIS}<LISPCORE>LIBRARY>RS232CHAT.;17 3369   

      changes to:  (VARS RS232CHATCOMS)

      previous date: "31-Aug-85 18:21:46" {ERIS}<LISPCORE>LIBRARY>RS232CHAT.;16)


(* Copyright (c) 1985 by Xerox Corporation. All rights reserved.)

(PRETTYCOMPRINT RS232CHATCOMS)

(RPAQQ RS232CHATCOMS ((FNS RS232CHAT.HOST.FILTER RS232CHAT.OPEN RS232CHAT.SET.PARAMETERS)
		      (ADDVARS (CHAT.PROTOCOLTYPES (RS232 . RS232CHAT.HOST.FILTER)))
		      (INITVARS (RS232CHAT.OPTION.MENU (create MENU ITEMS ← (QUOTE ((
"Set Line Parameters" (RS232CHAT.SET.PARAMETERS)
		      "Modify RS232 parameters")))
							       TITLE ← "RS232 Options")))
		      (GLOBALVARS RS232CHAT.OPTION.MENU)
		      (DECLARE: DONTCOPY (FILES (LOADCOMP FROM VALUEOF LISPUSERSDIRECTORIES)
						CHATDECL))
		      (FILES (SYSLOAD FROM VALUEOF LISPUSERSDIRECTORIES)
			     DLRS232C CHAT)))
(DEFINEQ

(RS232CHAT.HOST.FILTER
  (LAMBDA (NAME)                                             (* ejs: "27-Aug-85 13:12")
    (COND
      ((FMEMB (U-CASE NAME)
	      (QUOTE (RS232 RS232C MODEM)))
	(COND
	  ((NULL \RS232FLG)
	    (RS232C.INIT RS232C.DEFAULT.INIT.INFO)))
	(LIST (QUOTE RS232)
	      (FUNCTION RS232CHAT.OPEN))))))

(RS232CHAT.OPEN
  (LAMBDA (HOST)                                             (* ejs: " 2-Jul-85 13:09")

          (* * Return a pair of SPP streams for a chat connection, or NIL. Add CHAT specific operations to the STREAM via 
	  STREAMPROP.)


    (PROG (OUTSTREAM STREAM)
          (SETQ STREAM (OPENSTREAM (QUOTE {RS232})
				   (QUOTE INPUT)))
          (SETQ OUTSTREAM (RS232C.OUTPUTSTREAM))
          (STREAMPROP STREAM (QUOTE SETDISPLAYTYPE)
		      (FUNCTION NILL))
          (STREAMPROP STREAM (QUOTE READPEVENT)
		      (RS232C.READP.EVENT STREAM))
          (STREAMPROP STREAM (QUOTE LOGINFO)
		      (FUNCTION NILL))
          (STREAMPROP STREAM (QUOTE FLUSH&WAIT)
		      (FUNCTION NILL))
          (STREAMPROP STREAM (QUOTE SENDSCREENPARAMS)
		      (FUNCTION NILL))
          (STREAMPROP STREAM (QUOTE OPTIONMENU)
		      RS232CHAT.OPTION.MENU)
          (RETURN (CONS STREAM OUTSTREAM)))))

(RS232CHAT.SET.PARAMETERS
  (LAMBDA NIL                                                (* ejs: "31-Aug-85 18:21")
    (LET* ((WINDOW WINDOW)
	   (PWINDOW (GETPROMPTWINDOW WINDOW)))
          (COND
	    ((FNTYP (QUOTE RS232CMENU.SET.PARAMETERS))
	      (RS232CMENU.SET.PARAMETERS WINDOW)
	      (printout PWINDOW T "Select desired parameters.  Choose Apply! when done."))
	    (T (printout PWINDOW T "You must load RS232CMENU to use this function"))))))
)

(ADDTOVAR CHAT.PROTOCOLTYPES (RS232 . RS232CHAT.HOST.FILTER))

(RPAQ? RS232CHAT.OPTION.MENU (create MENU ITEMS ← (QUOTE (("Set Line Parameters" (
RS232CHAT.SET.PARAMETERS)
										 
									"Modify RS232 parameters")))
				     TITLE ← "RS232 Options"))
(DECLARE: DOEVAL@COMPILE DONTCOPY

(GLOBALVARS RS232CHAT.OPTION.MENU)
)
(DECLARE: DONTCOPY 
(FILESLOAD (LOADCOMP FROM VALUEOF LISPUSERSDIRECTORIES)
	   CHATDECL)
)
(FILESLOAD (SYSLOAD FROM VALUEOF LISPUSERSDIRECTORIES)
	   DLRS232C CHAT)
(PUTPROPS RS232CHAT COPYRIGHT ("Xerox Corporation" 1985))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (897 2785 (RS232CHAT.HOST.FILTER 907 . 1273) (RS232CHAT.OPEN 1275 . 2301) (
RS232CHAT.SET.PARAMETERS 2303 . 2783)))))
STOP