(FILECREATED "26-Jun-86 15:38:37" {DSK}<LISPFILES>SOURCES>KERMITMENU.;4 16963 changes to: (FNS KERMIT.MENU.OPEN KERMIT.MENU.RETRIEVE KERMIT.MENU.EXIT KERMIT.MENU.STORE KERMIT.MENU.ABORT KERMIT.MENU.BYE) (VARS KERMITMENUCOMS) previous date: "24-Jun-86 15:40:59" {DSK}<LISPFILES>SOURCES>KERMITMENU.;1) (* Copyright (c) 1985, 1986 by Xerox Corporation. All rights reserved.) (PRETTYCOMPRINT KERMITMENUCOMS) (RPAQQ KERMITMENUCOMS [(COMS (* Interactive menu facility for Kermit) [INITVARS (KERMIT.FMENU.SPEC (QUOTE ((PROPS FONT (MODERN 10 BOLD)) ((LABEL "Send!" MESSAGE "Sends the specified local file to be stored remotely" SELECTEDFN KERMIT.MENU.STORE) (LABEL "Receive!" MESSAGE "Receives a remote file into the specified local file" SELECTEDFN KERMIT.MENU.RETRIEVE) (LABEL "Bye!" MESSAGE "Forces remote Kermit server to exit" SELECTEDFN KERMIT.MENU.BYE) (LABEL "Exit!" MESSAGE "Closes this menu" SELECTEDFN KERMIT.MENU.EXIT )) ((TYPE DISPLAY LABEL "Transfer mode: ") (TYPE NWAY COLLECTION MODE LABEL Kermit FONT (MODERN 10)) (TYPE NWAY COLLECTION MODE LABEL Modem FONT (MODERN 10))) ((TYPE EDITSTART LABEL "Local file:" LINKS (EDIT LOCALFILE)) (TYPE EDIT ID LOCALFILE LABEL "" FONT (MODERN 10))) ((TYPE EDITSTART LABEL "Remote file:" LINKS (EDIT REMOTEFILE)) (TYPE EDIT LABEL "" ID REMOTEFILE FONT (MODERN 10))) ((TYPE STATE LABEL "File type:" ID FILETYPE MENUITEMS (Binary Text) MENUFONT (MODERN 10) INITSTATE Text LINKS (DISPLAY FILETYPEDISPLAY)) (TYPE DISPLAY ID FILETYPEDISPLAY MAXWIDTH 40 FONT (MODERN 10) LABEL Text) (TYPE STATE LABEL "End-of-line Convention:" ID EOLCONVENTION MENUITEMS (CR LF CRLF) MENUFONT (MODERN 10) INITSTATE CRLF LINKS (DISPLAY EOLCONVENTIONDISPLAY) ) (TYPE DISPLAY ID EOLCONVENTIONDISPLAY MAXWIDTH 30 FONT (MODERN 10) LABEL CRLF] (GLOBALVARS KERMIT.FMENU.SPEC) (FNS KERMIT.MENU.ABORT KERMIT.MENU.BYE KERMIT.MENU.EXIT KERMIT.MENU.OPEN KERMIT.MENU.RETRIEVE KERMIT.MENU.STORE) (FILES (SYSLOAD FROM VALUEOF LISPUSERSDIRECTORIES) FREEMENU KERMIT) (P (COND ((NOT (FASSOC (QUOTE Kermit) CHATMENUITEMS)) (push CHATMENUITEMS (QUOTE (Kermit (FUNCTION KERMIT.MENU.OPEN) "Opens a kermit command menu" ))) (SETQ CHATMENU NIL))) (COND ((AND (BOUNDP (QUOTE TEDITCHAT.MENUITEMS)) (NOT (FASSOC (QUOTE Kermit) TEDITCHAT.MENUITEMS))) (push TEDITCHAT.MENUITEMS (QUOTE (Kermit (FUNCTION KERMIT.MENU.OPEN) "Opens a kermit command menu" ))) (SETQ TEDITCHAT.MENU NIL]) (* Interactive menu facility for Kermit) (RPAQ? KERMIT.FMENU.SPEC [QUOTE ((PROPS FONT (MODERN 10 BOLD)) ((LABEL "Send!" MESSAGE "Sends the specified local file to be stored remotely" SELECTEDFN KERMIT.MENU.STORE) (LABEL "Receive!" MESSAGE "Receives a remote file into the specified local file" SELECTEDFN KERMIT.MENU.RETRIEVE) (LABEL "Bye!" MESSAGE "Forces remote Kermit server to exit" SELECTEDFN KERMIT.MENU.BYE) (LABEL "Exit!" MESSAGE "Closes this menu" SELECTEDFN KERMIT.MENU.EXIT)) ((TYPE DISPLAY LABEL "Transfer mode: ") (TYPE NWAY COLLECTION MODE LABEL Kermit FONT (MODERN 10)) (TYPE NWAY COLLECTION MODE LABEL Modem FONT (MODERN 10))) ((TYPE EDITSTART LABEL "Local file:" LINKS (EDIT LOCALFILE)) (TYPE EDIT ID LOCALFILE LABEL "" FONT (MODERN 10))) ((TYPE EDITSTART LABEL "Remote file:" LINKS (EDIT REMOTEFILE)) (TYPE EDIT LABEL "" ID REMOTEFILE FONT (MODERN 10))) ((TYPE STATE LABEL "File type:" ID FILETYPE MENUITEMS (Binary Text) MENUFONT (MODERN 10) INITSTATE Text LINKS (DISPLAY FILETYPEDISPLAY)) (TYPE DISPLAY ID FILETYPEDISPLAY MAXWIDTH 40 FONT (MODERN 10) LABEL Text) (TYPE STATE LABEL "End-of-line Convention:" ID EOLCONVENTION MENUITEMS (CR LF CRLF) MENUFONT (MODERN 10) INITSTATE CRLF LINKS (DISPLAY EOLCONVENTIONDISPLAY)) (TYPE DISPLAY ID EOLCONVENTIONDISPLAY MAXWIDTH 30 FONT (MODERN 10) LABEL CRLF]) (DECLARE: DOEVAL@COMPILE DONTCOPY (GLOBALVARS KERMIT.FMENU.SPEC) ) (DEFINEQ (KERMIT.MENU.ABORT [LAMBDA (ITEM WINDOW BUTTON) (* jow "24-Jun-86 14:42") (* * Called to kill the active Kermit/Modem process) (LET [(PROC (WINDOWPROP (MAINWINDOW WINDOW) (QUOTE KERMITPROC] (COND ((AND (PROCESSP PROC) (NOT (RELPROCESSP PROC)) (MOUSECONFIRM "Are you sure?")) (PROCESS.EVAL PROC (QUOTE (ERROR!]) (KERMIT.MENU.BYE [LAMBDA (ITEM WINDOW BUTTON) (* jow "24-Jun-86 15:30") (LET ((STATE (FM.GETSTATE WINDOW))) (SELECTQ (FM.ITEMPROP (LISTGET STATE (QUOTE MODE)) (QUOTE LABEL)) (Kermit (KERMIT.SERVER.COMMAND KERMIT.GENERIC.SERVER.COMMAND (QUOTE F) (MAINWINDOW WINDOW))) (Modem (printout (GETPROMPTWINDOW (MAINWINDOW WINDOW)) T "This command only works in Kermit mode.")) NIL]) (KERMIT.MENU.EXIT [LAMBDA (ITEM WINDOW BUTTON) (* jow "25-Jun-86 17:16") (REMOVEWINDOW WINDOW]) (KERMIT.MENU.OPEN [LAMBDA (CHAT.STATE) (* jow "26-Jun-86 15:38") (LET ((MAINWINDOW (fetch (CHAT.STATE WINDOW) of CHAT.STATE)) (FMENU (FREEMENU KERMIT.FMENU.SPEC "Kermit/Modem Settings"))) (WINDOWPROP FMENU (QUOTE FM.PROMPTWINDOW) (GETPROMPTWINDOW MAINWINDOW)) (WINDOWPROP FMENU (QUOTE FM.DONTRESHAPE) T) [WINDOWPROP FMENU (QUOTE MINSIZE) (CONS (fetch (REGION WIDTH) of (WINDOWPROP FMENU (QUOTE REGION))) (fetch (REGION HEIGHT) of (WINDOWPROP FMENU (QUOTE REGION] (ATTACHWINDOW FMENU MAINWINDOW (QUOTE TOP) (QUOTE JUSTIFY) (QUOTE LOCALCLOSE)) (WINDOWPROP FMENU (QUOTE REJECTMAINCOMS) (QUOTE (SHAPEW))) (WINDOWADDPROP MAINWINDOW (QUOTE RESHAPEFN) (QUOTE REPOSITIONATTACHEDWINDOWS]) (KERMIT.MENU.RETRIEVE [LAMBDA (ITEM WINDOW BUTTON) (* jow "25-Jun-86 17:15") (LET ((STATE (FM.GETSTATE WINDOW)) ABORTWINDOW) (WINDOWPROP (MAINWINDOW WINDOW) (QUOTE KERMITPROC) (THIS.PROCESS)) (DSPFILL NIL HIGHLIGHTSHADE (QUOTE PAINT) WINDOW) (ATTACHWINDOW [SETQ ABORTWINDOW (FREEMENU (QUOTE (((LABEL "Button here to abort file transfer" FONT (MODERN 10 BOLD) SELECTEDFN KERMIT.MENU.ABORT] (MAINWINDOW WINDOW) (QUOTE TOP) (QUOTE LEFT)) (RESETLST [RESETSAVE NIL (LIST (FUNCTION (LAMBDA NIL (WINDOWPROP (MAINWINDOW WINDOW) (QUOTE KERMITPROC) NIL) (REMOVEWINDOW ABORTWINDOW) (FM.REDISPLAYMENU WINDOW] (SELECTQ (FM.ITEMPROP (LISTGET STATE (QUOTE MODE)) (QUOTE LABEL)) (Kermit [KERMIT.RECEIVE (LISTGET STATE (QUOTE REMOTEFILE)) (LISTGET STATE (QUOTE LOCALFILE)) (MAINWINDOW WINDOW) (U-CASE (LISTGET STATE (QUOTE FILETYPE]) (Modem (MODEM.RECEIVE (LISTGET STATE (QUOTE LOCALFILE)) (MAINWINDOW WINDOW) (U-CASE (LISTGET STATE (QUOTE FILETYPE))) (LISTGET STATE (QUOTE EOLCONVENTION)))) NIL]) (KERMIT.MENU.STORE [LAMBDA (ITEM WINDOW BUTTON) (* jow "25-Jun-86 17:15") (LET ((STATE (FM.GETSTATE WINDOW)) ABORTWINDOW) (WINDOWPROP (MAINWINDOW WINDOW) (QUOTE KERMITPROC) (THIS.PROCESS)) (DSPFILL NIL HIGHLIGHTSHADE (QUOTE PAINT) WINDOW) (ATTACHWINDOW [SETQ ABORTWINDOW (FREEMENU (QUOTE (((LABEL "Button here to abort file transfer" FONT (MODERN 10 BOLD) SELECTEDFN KERMIT.MENU.ABORT] (MAINWINDOW WINDOW) (QUOTE TOP) (QUOTE LEFT)) (RESETLST [RESETSAVE NIL (LIST (FUNCTION (LAMBDA NIL (WINDOWPROP (MAINWINDOW WINDOW) (QUOTE KERMITPROC) NIL) (REMOVEWINDOW ABORTWINDOW) (FM.REDISPLAYMENU WINDOW] (SELECTQ (FM.ITEMPROP (LISTGET STATE (QUOTE MODE)) (QUOTE LABEL)) (Kermit [KERMIT.SEND (LISTGET STATE (QUOTE LOCALFILE)) (LISTGET STATE (QUOTE REMOTEFILE)) (MAINWINDOW WINDOW) (U-CASE (LISTGET STATE (QUOTE FILETYPE]) (Modem (MODEM.SEND (LISTGET STATE (QUOTE LOCALFILE)) (MAINWINDOW WINDOW) (U-CASE (LISTGET STATE (QUOTE FILETYPE))) (LISTGET STATE (QUOTE EOLCONVENTION)))) NIL]) ) (FILESLOAD (SYSLOAD FROM VALUEOF LISPUSERSDIRECTORIES) FREEMENU KERMIT) (COND ((NOT (FASSOC (QUOTE Kermit) CHATMENUITEMS)) (push CHATMENUITEMS (QUOTE (Kermit (FUNCTION KERMIT.MENU.OPEN) "Opens a kermit command menu"))) (SETQ CHATMENU NIL))) (COND ((AND (BOUNDP (QUOTE TEDITCHAT.MENUITEMS)) (NOT (FASSOC (QUOTE Kermit) TEDITCHAT.MENUITEMS))) (push TEDITCHAT.MENUITEMS (QUOTE (Kermit (FUNCTION KERMIT.MENU.OPEN) "Opens a kermit command menu"))) (SETQ TEDITCHAT.MENU NIL))) (PUTPROPS KERMITMENU COPYRIGHT ("Xerox Corporation" 1985 1986)) (DECLARE: DONTCOPY (FILEMAP (NIL (10169 16228 (KERMIT.MENU.ABORT 10179 . 10656) (KERMIT.MENU.BYE 10658 . 11207) ( KERMIT.MENU.EXIT 11209 . 11352) (KERMIT.MENU.OPEN 11354 . 12311) (KERMIT.MENU.RETRIEVE 12313 . 14273) (KERMIT.MENU.STORE 14275 . 16226))))) STOP