(FILECREATED "12-Mar-85 03:12:23" {ERIS}<LAFITE>LAFITE.;111 65920 changes to: (VARS LAFITECOMS) (FNS LA.SHORTFILENAME \LAFITE.UNCACHE.FOLDER \LAFITE.UNCACHE.FOLDER.MULTIPLE \LAFITE.START.PROC \LAFITE.QUIT.PROC) previous date: "24-Feb-85 22:50:00" {ERIS}<LAFITE>LAFITE.;108) (* Copyright (c) 1982, 1983, 1984, 1985 by Xerox Corporation and Bolt Beranek and Newman Inc. . All rights reserved.) (PRETTYCOMPRINT LAFITECOMS) (RPAQQ LAFITECOMS [(COMS (E (SETQ LAFITESYSTEMDATE (DATE))) (VARS LAFITEVERSION# LAFITESYSTEMDATE)) (COMS (FNS LAFITE \LAFITE.START.PROC LA.CREATE.UPDATE.MENUS \LAFITE.PROCESS \LAFITE.START.ABORT \LAFITE.QUIT \LAFITE.RESTART \LAFITE.SUBQUIT \LAFITE.QUIT.PROC \LAFITEDEFAULTHOST&DIR LAFITEDEFAULTHOST&DIR MAKELAFITECOMMANDWINDOW EXTRACTMENUCOMMAND DOMAINLAFITECOMMAND) (PROP ARGNAMES LAFITE) (FNS LAFITEMODE \LAFITE.INFER.MODE \LAFITE.SHOW.MODE \LAFITE.MODE.TITLE) (PROP VARTYPE LAFITEMODELST) (ADDVARS (LAFITEMODELST)) (INITVARS (\LAFITEMODE) (\LAFITE.AUTHENTICATION.FAILURE))) (INITVARS * LAFITEPROFILEVARS) (INITVARS * LAFITERANDOMGLOBALS) (VARS * LAFITEMARKS) (VARS LAFITECOMMANDMENUITEMS LAFITEUPDATEMENUITEMS LAFITECLOSEITEM LAFITEUPDATETOCITEM LAFITECLOSELABELS ANOTHERFOLDERMENUITEM LAFITESUBQUITMENUITEMS) (INITVARS (LAFITESTATUSWINDOW) (\ACTIVELAFITEFOLDERS) (\LAFITEPROFILECHANGED) (\LAFITE.TEMPFILES) (LAFITEPRIMARYDISPLAYWINDOW) (LAFITEMAILFOLDERS) (LAFITEFOLDERSMENU) (LAFITEUPDATEMENUS) (\LAFITE.MODE.CHOICES) (LAFITESUBQUITMENU)) (FNS LA.RESETSHADE LA.REMOVEDUPLICATES COLLECTOLDFILES LA.SETDIFFERENCE NTHMESSAGE \LAFITE.MAKE.MSGARRAY \LAFITE.ADDMESSAGES.TO.ARRAY) (COMS (* Display aids) (CURSORS LA.CROSSCURSOR)) (COMS (INITVARS (\LAFITE.ACTIVE) (\LAFITE.READY) (\LAFITEDEFAULTHOST&DIR) (\LAFITEUSERDATA)) (ADDVARS (\SYSTEMCACHEVARS \LAFITE.READY \LAFITEUSERDATA)) (FNS LAFITE.AROUNDEXIT CHECKLAFITEMAILFOLDERS \LAFITE.REBROWSEFOLDER \LAFITE.AFTERLOGIN) ) (COMS (* Low level file functions) (FNS \LAFITE.WRITE.PROFILE \LAFITE.READ.PROFILE DELETEMAILFOLDER FORGETMAILFILE \LAFITE.UNCACHE.FOLDER \LAFITE.UNCACHE.FOLDER.MULTIPLE \LAFITE.OPEN.FOLDER \LAFITE.OPENSTREAM \LAFITE.CREATE.MENU \LAFITE.EOF \LAFITE.CLOSE.FOLDER PROMPTFORFILENAME \LAFITE.PROMPTFORFOLDER MAKELAFITEMAILFOLDERSMENU MAILFOLDERBUSY LA.LONGFILENAME PROFILEFILENAME TOCFILENAME LA.SHORTFILENAME) (FNS COPY7BITFILE FIXLAURELFILE \LAFITE.BROWSE.LAURELFILE \LAFITE.FIX.LAUREL.FOLDER)) (DECLARE: DOEVAL@COMPILE DONTCOPY (COMS * LAFITECOMPILETIME)) (INITRECORDS MAILFOLDER LAFITEMSG) (SYSRECORDS MAILFOLDER LAFITEMSG) [COMS (FNS \LAFITE.GLOBAL.INIT) (DECLARE: DONTEVAL@LOAD DOCOPY (FILES LAFITEBROWSE LAFITESEND LAFITEMAIL TEDIT ATTACHEDWINDOW) (P (\LAFITE.GLOBAL.INIT] (DECLARE: DOEVAL@LOAD DOEVAL@COMPILE DONTCOPY COMPILERVARS (ADDVARS (NLAMA) (NLAML) (LAMA LAFITE]) (RPAQQ LAFITEVERSION# 9) (RPAQQ LAFITESYSTEMDATE "12-Mar-85 03:12:27") (DEFINEQ (LAFITE [LAMBDA X (* bvm: " 5-Jan-85 16:05") (* * The first argument should be ON or OFF. The second argument, if supplied, is the name of the mailfile Lafite should browse unless the second argument is NIL in which case no mailfile will be browsed. If there is no second argument then default to DEFAULTMAILFOLDERNAME mailfile -- currently ACTIVE * *) (SELECTQ (COND ((ILESSP X 1) (* Lafite called with no args *) (QUOTE ON)) (T (ARG X 1))) [(ON on) (COND (\LAFITE.ACTIVE (TOTOPW LAFITESTATUSWINDOW) (QUOTE ON)) ((NOT (THIS.PROCESS)) "No Processes!") (T (COND ((NOT (WINDOWP LAFITESTATUSWINDOW)) (MAKELAFITECOMMANDWINDOW))) (PRINTLAFITESTATUS "Initializing") (SETQ \LAFITE.ACTIVE (QUOTE INIT)) (\LAFITE.PROCESS [LIST (FUNCTION \LAFITE.START.PROC) [KWOTE (COND ((ILEQ X 1) DEFAULTMAILFOLDERNAME) (T (ARG X 2] (KWOTE (for I from 3 to X collect (ARG X I] (QUOTE LAFITE)) (QUOTE ON] [(OFF off RESTART) (COND (\LAFITE.ACTIVE (* Lafite was on *) [COND ((EQ \LAFITE.ACTIVE (QUOTE INIT)) (* Zap the initializer) (DEL.PROCESS (QUOTE LAFITE] (\LAFITE.QUIT.PROC (ASSOC (QUOTE Quit) LAFITECOMMANDMENUITEMS) LAFITEMAINMENU))) (COND [(EQ (ARG X 1) (QUOTE RESTART)) (APPLY (FUNCTION LAFITE) (CONS (QUOTE ON) (for I from 2 to X collect (ARG X I] (T (QUOTE OFF] (LISPERROR "ILLEGAL ARG" (ARG X 1]) (\LAFITE.START.PROC [LAMBDA (MAILFILE OPTIONS) (* bvm: "12-Mar-85 00:14") (RESETSAVE NIL (LIST (FUNCTION \LAFITE.START.ABORT))) (\LAFITEDEFAULTHOST&DIR (OR LAFITEDEFAULTHOST&DIR LOGINHOST/DIR)) (SETQ \LAFITE.BROWSELOCK (CREATE.MONITORLOCK "Lafite Browser Control")) (* Used by anyone creating browsers or otherwise concerned with changes to \ACTIVELAFITEFOLDERS) (SETQ \LAFITE.MAINLOCK (CREATE.MONITORLOCK "Lafite Main")) (* Used by \LAFITE.CLOSE.OTHER.FOLDERS or anyone who needs access to multiple arbitrary folders) (SETQ \LAFITE.PROFILELOCK (CREATE.MONITORLOCK "Lafite Profile")) (SETQ \LAFITE.HARDCOPYLOCK (CREATE.MONITORLOCK "Lafite hardcopy")) (* Used by anyone reading or writing the Lafite profile) (\LAFITE.READ.PROFILE) (SETQ LAFITEUPDATEMENUS (CONS (LA.CREATE.UPDATE.MENUS LAFITEUPDATEMENUITEMS NIL NIL "Update Options") (LA.CREATE.UPDATE.MENUS LAFITEUPDATEMENUITEMS LAFITECLOSELABELS LAFITECLOSEITEM "Close/Shrink Options"))) (SETQ \LAFITE.READY T) (pushnew \AFTERLOGINFNS (FUNCTION \LAFITE.AFTERLOGIN)) (pushnew AROUNDEXITFNS (FUNCTION LAFITE.AROUNDEXIT)) (SETQ \LAFITE.ACTIVE T) (NLSETQ (WITH.MONITOR \LAFITE.MAILSERVERLOCK (\LAFITE.GET.USER.DATA))) (* Authenticate user first, so that MSGFROMMEP works. NLSETQ so that errors and/or ↑ from break do not leave Lafite in inconsistent state) (ADD.PROCESS (CONSTANT (LIST (FUNCTION LAFITEMAILWATCH))) (QUOTE RESTARTABLE) (QUOTE HARDRESET) (QUOTE AFTEREXIT) (QUOTE SUSPEND)) [COND ((OR MAILFILE (AND (EQMEMB (QUOTE SHRINK) OPTIONS) (SETQ MAILFILE DEFAULTMAILFOLDERNAME))) (\LAFITE.BROWSE (ASSOC (QUOTE Browse) (fetch (MENU ITEMS) of LAFITEMAINMENU)) LAFITEMAINMENU NIL MAILFILE (CONS (QUOTE NOCONFIRM) (MKLIST OPTIONS] (* Finally, enable menu) (replace (MENU WHENSELECTEDFN) of LAFITEMAINMENU with (FUNCTION DOMAINLAFITECOMMAND]) (LA.CREATE.UPDATE.MENUS [LAMBDA (MENUITEMS LASTLABELS LASTITEM TITLE) (* bvm: "29-May-84 15:09") (PROG (OTHERMENUS) [COND (MENUITEMS (SETQ OTHERMENUS (LA.CREATE.UPDATE.MENUS (CDR MENUITEMS) (CDR LASTLABELS) LASTITEM TITLE))) (T (SETQ MENUITEMS (LIST LAFITEUPDATETOCITEM] (RETURN (CONS (\LAFITE.CREATE.MENU (COND [LASTITEM (APPEND MENUITEMS (LIST (CONS (CAR LASTLABELS) (CDR LASTITEM] (T MENUITEMS)) TITLE) OTHERMENUS]) (\LAFITE.PROCESS [LAMBDA (FORM NAME ALLOWLOGOUT RESTARTABLE) (* bvm: "25-Mar-84 17:16") (* * Creates a process running FORM which by default is not restartable and will not permit LOGOUT while it is running) (ADD.PROCESS FORM (QUOTE NAME) NAME (QUOTE RESTARTABLE) (OR RESTARTABLE (QUOTE NO)) (QUOTE BEFOREEXIT) (COND (ALLOWLOGOUT NIL) (T (QUOTE DON'T]) (\LAFITE.START.ABORT [LAMBDA NIL (* bvm: "25-Mar-84 16:44") (COND ((AND RESETSTATE (NEQ \LAFITE.ACTIVE T)) (CLOSEW LAFITESTATUSWINDOW) (SETQ LAFITESTATUSWINDOW (SETQ \LAFITE.ACTIVE]) (\LAFITE.QUIT [LAMBDA (ITEM MENU BUTTON) (* bvm: " 7-Nov-84 11:48") (COND ((EQ BUTTON (QUOTE MIDDLE)) (\LAFITE.SUBQUIT ITEM MENU)) (T (\LAFITE.PROCESS (LIST (FUNCTION \LAFITE.QUIT.PROC) (KWOTE ITEM) (KWOTE MENU)) (QUOTE LAFITEQUIT]) (\LAFITE.RESTART [LAMBDA (ITEM MENU) (* bvm: " 7-Nov-84 11:56") (COND ((\LAFITE.QUIT.PROC ITEM MENU) (LAFITE (QUOTE ON) NIL]) (\LAFITE.SUBQUIT [LAMBDA (ITEM MENU) (* bvm: " 7-Nov-84 11:58") (PROG ((MODES (for MODE in LAFITEMODELST when (LISTP (CDR MODE)) collect (LIST (CONCAT (CAR MODE) " Mode") (KWOTE (LIST (CAR MODE))) "Change to this mode of mail sending/retrieving"))) COMMAND) (COND ((NOT (EQUAL \LAFITE.MODE.CHOICES (SETQ \LAFITE.MODE.CHOICES MODES))) (* Recompute menu) (SETQ LAFITESUBQUITMENU))) (COND ([LISTP (SETQ COMMAND (MENU (.LAFITEMENU. LAFITESUBQUITMENU (APPEND LAFITESUBQUITMENUITEMS MODES) "Mode Change"] (LAFITEMODE (CAR COMMAND))) (COMMAND (\LAFITE.PROCESS (LIST COMMAND (KWOTE ITEM) (KWOTE MENU)) (QUOTE LAFITEQUIT]) (\LAFITE.QUIT.PROC [LAMBDA (ITEM MENU) (* bvm: "12-Mar-85 00:14") (RESETLST (LA.RESETSHADE ITEM MENU) (OBTAIN.MONITORLOCK \LAFITE.BROWSELOCK NIL T) (OBTAIN.MONITORLOCK \LAFITE.MAINLOCK NIL T) (PROG ((HOW? 5) MENUREG) (OR \LAFITE.ACTIVE (RETURN T)) [for FOLDER in \ACTIVELAFITEFOLDERS bind LEVEL when (fetch (MAILFOLDER BROWSERWINDOW) of FOLDER) do (* * Determine what to do with open browsers. Essentially same as the CLOSEFN for a browser, but we offer a single menu that offers all the choices that the most particular window might need) (COND ((ILESSP (SETQ LEVEL (COND ((fetch (MAILFOLDER HARDCOPYSTREAM) of FOLDER) 1) ((fetch (MAILFOLDER FOLDERNEEDSUPDATE) of FOLDER) 2) ((fetch (MAILFOLDER FOLDERNEEDSEXPUNGE) of FOLDER) 3) ((NEQ (fetch (MAILFOLDER #OFMESSAGES) of FOLDER) (fetch (MAILFOLDER TOCLASTMESSAGE#) of FOLDER)) 4) (T 5))) HOW?) (SETQ HOW? LEVEL] [COND [(SETQ HOW? (CAR (NTH (CDR LAFITEUPDATEMENUS) HOW?))) (SETQ HOW? (\LAFITE.CREATE.MENU [APPEND (fetch (MENU ITEMS) of HOW?) (QUOTE (("Don't Quit" NIL "Abort the Quit command"] "How should browsers be closed?")) (SETQ MENUREG (WINDOWPROP (WFROMMENU MENU) (QUOTE REGION))) (SETQ HOW? (OR (MENU HOW? (create POSITION XCOORD ←(IDIFFERENCE (fetch (REGION RIGHT) of MENUREG) (fetch (MENU IMAGEWIDTH) of HOW?)) YCOORD ←(IDIFFERENCE (fetch (REGION BOTTOM) of MENUREG) (fetch (MENU IMAGEHEIGHT) of HOW?))) T) (RETURN] (T (SETQ HOW? (FUNCTION \LAFITE.FINISH.UPDATE] [for FOLDER in (APPEND \ACTIVELAFITEFOLDERS) bind BROWSERWINDOW do (COND ((NOT (SETQ BROWSERWINDOW (fetch (MAILFOLDER BROWSERWINDOW) of FOLDER))) (\LAFITE.CLOSE.FOLDER FOLDER T)) (T (APPLY* HOW? BROWSERWINDOW FOLDER (QUOTE CLOSE] (SETQ \ACTIVELAFITEFOLDERS) (PROGN [for WINDOW in LAFITEEDITORWINDOWS do (* now close the edit and display windows *) (COND ((WINDOWP WINDOW) (COND ((OPENWP WINDOW) (CLOSEW WINDOW)) ([WINDOWP (SETQ WINDOW (WINDOWPROP WINDOW (QUOTE ICONWINDOW] (CLOSEW WINDOW] (SETQ LAFITEEDITORWINDOWS NIL)) (AND \LAFITE.OUTBOX (CLOSEW (fetch OBWINDOW of \LAFITE.OUTBOX))) (COND (\LAFITEPROFILECHANGED (\LAFITE.WRITE.PROFILE))) (SETQ AROUNDEXITFNS (REMOVE (FUNCTION LAFITE.AROUNDEXIT) AROUNDEXITFNS)) (SETQ \AFTERLOGINFNS (REMOVE (QUOTE \LAFITE.AFTERLOGIN) \AFTERLOGINFNS)) (PROGN (for FILE in \LAFITE.TEMPFILES do (* delete any temp files laying around *) (CLOSEF? FILE) (DELFILE FILE)) (SETQ \LAFITE.TEMPFILES)) (SETQ \LAFITE.ACTIVE NIL) (DEL.PROCESS (FUNCTION LAFITEMAILWATCH)) (LAFITECLEARCACHE) (COND ((OPENWP LAFITESTATUSWINDOW) (CLOSEW LAFITESTATUSWINDOW))) [SETQ LAFITESUBQUITMENU (SETQ \LAFITE.MODE.CHOICES (SETQ LAFITEFORMATMENU (SETQ LAFITEFOLDERSMENU (SETQ LAFITEFORMSMENU (SETQ LAFITEFORMFILES (SETQ \LAFITE.LAST.STATUS (SETQ LAFITEPRIMARYDISPLAYWINDOW (SETQ \LAFITEDEFAULTHOST&DIR (SETQ LAFITEUPDATEMENUS (SETQ LAFITEMAINMENU (SETQ LAFITESTATUSWINDOW NIL] (RETURN T]) (\LAFITEDEFAULTHOST&DIR [LAMBDA (HOST&DIR) (* bvm: "24-Feb-85 21:53") (PROG ((OLDHOST&DIR (fetch PACKEDHOST&DIR of \LAFITEDEFAULTHOST&DIR))) (COND ((OR (NULL HOST&DIR) (UCASE.STREQUAL OLDHOST&DIR HOST&DIR)) (* User wants the value, or there is no change) (RETURN HOST&DIR))) (* now make sure its a legitimate HOST&DIR *) (COND ((NOT (HOSTNAMEP HOST&DIR)) (printout PROMPTWINDOW T "Warning: " HOST&DIR " not a recognized directory"))) (* set both the visible and invisble variables *) (SETQ \LAFITEDEFAULTHOST&DIR (create DEFAULTHOST&DIR PACKEDHOST&DIR ← HOST&DIR UNPACKEDHOST&DIR ←(UNPACKFILENAME HOST&DIR))) (* reset all the appropriate menus *) (SETQ LAFITEFOLDERSMENU (SETQ LAFITEFORMSMENU)) (RETURN OLDHOST&DIR]) (LAFITEDEFAULTHOST&DIR [LAMBDA (HOST&DIR) (* bvm: "22-Feb-84 16:27") (* * Temporary definition until we can do it right) (SETQ LAFITEDEFAULTHOST&DIR HOST&DIR]) (MAKELAFITECOMMANDWINDOW [LAMBDA NIL (* bvm: "21-Dec-84 23:38") (PROG ((FONTHEIGHT (FONTPROP LAFITEMENUFONT (QUOTE HEIGHT))) MENUW MENUWREGION POSITION HEIGHT WIDTH STATUSWINDOW) [SETQ MENUW (MENUWINDOW (SETQ LAFITEMAINMENU (create MENU ITEMS ← LAFITECOMMANDMENUITEMS WHENSELECTEDFN ←(FUNCTION NILL) CENTERFLG ← T TITLE ←(OR (\LAFITE.MODE.TITLE) "L a f i t e") MENUFONT ← LAFITEMENUFONT MENUTITLEFONT ← LAFITETITLEFONT] (SETQ WIDTH (IMAX [fetch (REGION WIDTH) of (SETQ MENUWREGION (WINDOWPROP MENUW (QUOTE REGION] LAFITESTATUSWINDOWMINWIDTH)) [SETQ HEIGHT (HEIGHTIFWINDOW (FIX (FTIMES FONTHEIGHT 1.5] (SETQ POSITION (OR LAFITESTATUSWINDOWPOSITION (GETBOXPOSITION WIDTH (IPLUS HEIGHT (fetch (REGION HEIGHT) of MENUWREGION)) NIL NIL NIL "Specify position of the Lafite Command Menu."))) (SETQ STATUSWINDOW (CREATEW (create REGION LEFT ←(fetch (POSITION XCOORD) of POSITION) BOTTOM ←(IPLUS (fetch (POSITION YCOORD) of POSITION) (fetch (REGION HEIGHT) of MENUWREGION)) WIDTH ← WIDTH HEIGHT ← HEIGHT))) (DSPFONT LAFITEMENUFONT STATUSWINDOW) (ATTACHWINDOW MENUW STATUSWINDOW (QUOTE BOTTOM)) [WINDOWPROP STATUSWINDOW (QUOTE BUTTONEVENTFN) (FUNCTION (LAMBDA (WINDOW) (COND ((LASTMOUSESTATE (NOT UP)) (SETQ \LAFITE.LAST.STATUS) (\LAFITE.WAKE.WATCHER] (WINDOWPROP STATUSWINDOW (QUOTE MAINWINDOWMINSIZE) (CONS 0 HEIGHT)) (WINDOWPROP STATUSWINDOW (QUOTE MAINWINDOWMAXSIZE) (CONS MAX.SMALLP HEIGHT)) (OPENW STATUSWINDOW) (CLEARW STATUSWINDOW) [WINDOWPROP STATUSWINDOW (QUOTE YPOS) (IDIFFERENCE (DSPYPOSITION NIL STATUSWINDOW) (FIXR (FTIMES FONTHEIGHT .2] (RETURN (SETQ LAFITESTATUSWINDOW STATUSWINDOW]) (EXTRACTMENUCOMMAND [LAMBDA (ITEM) (* DECLARATIONS: (RECORD (LABEL FORM HELPSTRING))) (* mdy: "20-OCT-82 15:07") (if (NLISTP ITEM) then ITEM elseif (fetch FORM of ITEM) then (EVAL (fetch FORM of ITEM)) else (fetch LABEL of ITEM]) (DOMAINLAFITECOMMAND [LAMBDA (ITEM MENU BUTTON) (* bvm: " 5-Nov-84 16:50") (APPLY* (EXTRACTMENUCOMMAND ITEM) ITEM MENU BUTTON]) ) (PUTPROPS LAFITE ARGNAMES (NIL (ON/OFF MAILFILE . OPTIONS) . U)) (DEFINEQ (LAFITEMODE [LAMBDA (MODE) (* bvm: "21-Dec-84 22:09") (PROG1 (fetch LAFITEMODE of \LAFITEMODE) (COND (MODE (while [LITATOM (CDR (SETQ MODE (OR (ASSOC MODE LAFITEMODELST) (\ILLEGAL.ARG MODE] do (SETQ MODE (CDR MODE))) (COND ((NEQ (fetch LAFITEMODE of \LAFITEMODE) (fetch LAFITEMODE of (SETQ \LAFITEMODE MODE))) (* Mode changed, kick mailwatcher) (COND (\LAFITE.ACTIVE (\LAFITE.SHOW.MODE) (WITH.MONITOR \LAFITE.MAILSERVERLOCK (SETQ \LAFITEUSERDATA) (PRINTLAFITESTATUS "Reinitializing") (\LAFITE.WAKE.WATCHER]) (\LAFITE.INFER.MODE [LAMBDA NIL (* bvm: "21-Dec-84 22:43") (COND ([SETQ \LAFITEMODE (OR (AND LAFITEMODEDEFAULT (ASSOC LAFITEMODEDEFAULT LAFITEMODELST)) (PROG [(CHOICES (for X in LAFITEMODELST collect X when (LISTP (CDR X] (RETURN (AND CHOICES (NULL (CDR CHOICES)) (CAR CHOICES] (AND LAFITESTATUSWINDOW (\LAFITE.SHOW.MODE)) \LAFITEMODE]) (\LAFITE.SHOW.MODE [LAMBDA NIL (* bvm: "30-Oct-84 16:53") (PROG ((TITLE (\LAFITE.MODE.TITLE)) (MENU LAFITEMAINMENU)) (COND (TITLE (replace (MENU TITLE) of MENU with TITLE) (UPDATE/MENU/IMAGE MENU) (REDISPLAYW (WFROMMENU MENU]) (\LAFITE.MODE.TITLE [LAMBDA NIL (* bvm: "12-Nov-84 17:03") (* * If user wants mode shown in Lafite status window, this returns a suitable title for that window) (AND \LAFITEMODE [SELECTQ LAFITESHOWMODEFLG (ALWAYS T) (NIL NIL) (CDR (for X in LAFITEMODELST collect X when (LISTP (CDR (LISTP X] (CONCAT "L a f i t e (" (fetch LAFITEMODE of \LAFITEMODE) ")"]) ) (PUTPROPS LAFITEMODELST VARTYPE ALIST) (ADDTOVAR LAFITEMODELST ) (RPAQ? \LAFITEMODE ) (RPAQ? \LAFITE.AUTHENTICATION.FAILURE ) (RPAQQ LAFITEPROFILEVARS ((LAFITEDEFAULTHOST&DIR) (LAFITEBUFFERSIZE 20) (LAFITEIFFROMMETHENSEENFLG T) [LAFITEMENUFONT (FONTCREATE (QUOTE (HELVETICA 10 BOLD] [LAFITETITLEFONT (FONTCREATE (QUOTE (HELVETICA 12 BOLD] [LAFITEDISPLAYFONT (FONTCREATE (QUOTE (TIMESROMAN 12] (LAFITEHARDCOPYFONT LAFITEDISPLAYFONT) [LAFITEBROWSERFONT (FONTCREATE (QUOTE (GACHA 10] (LAFITEPROFILE.NAME (QUOTE LAFITE)) (LAFITEPROFILE.EXT (QUOTE PROFILE)) (DEFAULTMAILFOLDERNAME (QUOTE ACTIVE.MAIL)) (LAFITEMAIL.EXT (QUOTE MAIL)) (LAFITESTATUSWINDOWMINWIDTH 200) (LAFITESTATUSWINDOWPOSITION (create POSITION XCOORD ← 735 YCOORD ← 650)) (LAFITEDEBUGFLG) (LAFITEMODEDEFAULT) (LAFITESHOWMODEFLG T))) (RPAQ? LAFITEDEFAULTHOST&DIR ) (RPAQ? LAFITEBUFFERSIZE 20) (RPAQ? LAFITEIFFROMMETHENSEENFLG T) (RPAQ? LAFITEMENUFONT (FONTCREATE (QUOTE (HELVETICA 10 BOLD)))) (RPAQ? LAFITETITLEFONT (FONTCREATE (QUOTE (HELVETICA 12 BOLD)))) (RPAQ? LAFITEDISPLAYFONT (FONTCREATE (QUOTE (TIMESROMAN 12)))) (RPAQ? LAFITEHARDCOPYFONT LAFITEDISPLAYFONT) (RPAQ? LAFITEBROWSERFONT (FONTCREATE (QUOTE (GACHA 10)))) (RPAQ? LAFITEPROFILE.NAME (QUOTE LAFITE)) (RPAQ? LAFITEPROFILE.EXT (QUOTE PROFILE)) (RPAQ? DEFAULTMAILFOLDERNAME (QUOTE ACTIVE.MAIL)) (RPAQ? LAFITEMAIL.EXT (QUOTE MAIL)) (RPAQ? LAFITESTATUSWINDOWMINWIDTH 200) (RPAQ? LAFITESTATUSWINDOWPOSITION (create POSITION XCOORD ← 735 YCOORD ← 650)) (RPAQ? LAFITEDEBUGFLG ) (RPAQ? LAFITEMODEDEFAULT ) (RPAQ? LAFITESHOWMODEFLG T) (RPAQQ LAFITERANDOMGLOBALS ((UNSUPPLIEDFIELDSTR "---") (LAFITEBUSYWAITTIME 1000) (LAFITEITEMBUSYSHADE 43605) (LAFITEEOL " "))) (RPAQ? UNSUPPLIEDFIELDSTR "---") (RPAQ? LAFITEBUSYWAITTIME 1000) (RPAQ? LAFITEITEMBUSYSHADE 43605) (RPAQ? LAFITEEOL " ") (RPAQQ LAFITEMARKS ((SEENMARK (CHARCODE SP)) (UNSEENMARK (CHARCODE ?)) (MOVETOMARK (CHARCODE m)) (FORWARDMARK (CHARCODE f)) (ANSWERMARK (CHARCODE a)) (HARDCOPYBATCHMARK (CHARCODE H)) (HARDCOPYMARK (CHARCODE h)))) (RPAQ SEENMARK (CHARCODE SP)) (RPAQ UNSEENMARK (CHARCODE ?)) (RPAQ MOVETOMARK (CHARCODE m)) (RPAQ FORWARDMARK (CHARCODE f)) (RPAQ ANSWERMARK (CHARCODE a)) (RPAQ HARDCOPYBATCHMARK (CHARCODE H)) (RPAQ HARDCOPYMARK (CHARCODE h)) (RPAQQ LAFITECOMMANDMENUITEMS ((Browse (QUOTE \LAFITE.BROWSE) "Browse a mail file; MIDDLE for subcommands") ("Send Mail" (QUOTE \LAFITE.MESSAGEFORM) "Open a message composition window; MIDDLE for choice of forms") (Quit (QUOTE \LAFITE.QUIT) "Update and close all mail files and stop Lafite"))) (RPAQQ LAFITEUPDATEMENUITEMS (("Do Hardcopy Only" (QUOTE \LAFITE.HARDCOPYONLY.PROC) "Will print batched hardcopy but not update file") ("Write out changes only" (QUOTE \LAFITE.UPDATE.PROC) "Will update physical file to reflect new marks and deletions") ("Expunge deleted messages" (QUOTE \LAFITE.EXPUNGE.PROC) "Will rewrite mail file, expunging all deleted messages"))) (RPAQQ LAFITECLOSEITEM ("Don't update file" (QUOTE \LAFITE.FINISH.UPDATE) "Just close/shrink the window - don't update it.")) (RPAQQ LAFITEUPDATETOCITEM ("Update table of contents" (FUNCTION \LAFITE.UPDATE.PROC) "Write table of contents file to speed next browse of this folder")) (RPAQQ LAFITECLOSELABELS ("Don't Update or Hardcopy" "Don't update file" "Don't expunge file" "Just close")) (RPAQQ ANOTHERFOLDERMENUITEM ("** Other Folder **" (QUOTE ##ANOTHERFILE##) "You will be asked to specify another mail filename")) (RPAQQ LAFITESUBQUITMENUITEMS ((Quit (QUOTE \LAFITE.QUIT) "Turn Lafite off") (Restart (QUOTE \LAFITE.RESTART) "Turn Lafite off then back on"))) (RPAQ? LAFITESTATUSWINDOW ) (RPAQ? \ACTIVELAFITEFOLDERS ) (RPAQ? \LAFITEPROFILECHANGED ) (RPAQ? \LAFITE.TEMPFILES ) (RPAQ? LAFITEPRIMARYDISPLAYWINDOW ) (RPAQ? LAFITEMAILFOLDERS ) (RPAQ? LAFITEFOLDERSMENU ) (RPAQ? LAFITEUPDATEMENUS ) (RPAQ? \LAFITE.MODE.CHOICES ) (RPAQ? LAFITESUBQUITMENU ) (DEFINEQ (LA.RESETSHADE [LAMBDA (ITEM MENU OLDSHADE) (* bvm: " 2-Mar-84 11:43") (* * Shades ITEM in MENU to indicate Lafite is busy, leaves something on resetlst to unshade it) (RESETSAVE (SHADEITEM ITEM MENU LAFITEITEMBUSYSHADE) (LIST (FUNCTION SHADEITEM) ITEM MENU (OR OLDSHADE WHITESHADE]) (LA.REMOVEDUPLICATES [LAMBDA (LST) (* bvm: "18-Dec-83 16:07") (* * a case-independent intersection of LST and LST * *) (for X in LST bind RESULT unless (for GOOD in RESULT thereis (UCASE.STREQUAL X GOOD)) do (* Collect only if we haven't seen this name before) (push RESULT X) finally (RETURN (COND ((CDR RESULT) (REVERSE RESULT)) (T RESULT]) (COLLECTOLDFILES [LAMBDA (FILES EXT) (* bvm: " 6-Jan-84 11:05") (for FILE in FILES when (AND FILE (INFILEP (LA.LONGFILENAME FILE EXT))) collect (* use only those mail files that do exist *) FILE]) (LA.SETDIFFERENCE [LAMBDA (X Y) (* bvm: "20-Dec-83 18:14") (* * Returns subset of X not in Y, case-independently) (for ELT in X collect ELT unless (for OTHER in Y thereis (UCASE.STREQUAL ELT OTHER]) (NTHMESSAGE [LAMBDA (MESSAGES N) (* bvm: " 3-Jan-84 12:11") (ELT MESSAGES N]) (\LAFITE.MAKE.MSGARRAY [LAMBDA (SIZE OLDARRAY OLDSIZE) (* bvm: " 3-Jan-84 11:07") (* * Creates an array at least large enough to hold SIZE message descriptors. If OLDARRAY is given, its elements up to OLDSIZE are copied into the new array) (PROG [(NEWARRAY (ARRAY (IMAX (IPLUS SIZE 32) (CEIL SIZE 64)) (QUOTE POINTER] [COND (OLDARRAY (for I from 1 to OLDSIZE do (SETA NEWARRAY I (ELT OLDARRAY I] (RETURN NEWARRAY]) (\LAFITE.ADDMESSAGES.TO.ARRAY [LAMBDA (MSGARRAY MESSAGELIST FIRSTMSG# LASTMSG#) (* bvm: " 3-Jan-84 11:26") (* * Adds to MSGARRAY the messages from MESSAGELIST, which should be numbered FIRSTMSG# thru LASTMSG# - returns a new array if MSGARRAY wasn't large enough) [COND ((OR (NULL MSGARRAY) (IGREATERP LASTMSG# (ARRAYSIZE MSGARRAY))) (SETQ MSGARRAY (\LAFITE.MAKE.MSGARRAY LASTMSG# MSGARRAY (SUB1 FIRSTMSG#] (COND ((NEQ (fetch (LAFITEMSG #) of (CAR MESSAGELIST)) FIRSTMSG#) (SHOULDNT))) (for MSG in MESSAGELIST as MSG# from FIRSTMSG# do (SETA MSGARRAY MSG# MSG)) MSGARRAY]) ) (* Display aids) (RPAQ LA.CROSSCURSOR (CURSORCREATE (READBITMAP) 8 8)) (16 16 "L@@C" "N@@G" "G@@N" "CHAL" "ALCH" "@NG@" "@GN@" "@CL@" "@CL@" "@GN@" "@NG@" "ALCH" "CHAL" "G@@N" "N@@G" "L@@C") (RPAQ? \LAFITE.ACTIVE ) (RPAQ? \LAFITE.READY ) (RPAQ? \LAFITEDEFAULTHOST&DIR ) (RPAQ? \LAFITEUSERDATA ) (ADDTOVAR \SYSTEMCACHEVARS \LAFITE.READY \LAFITEUSERDATA) (DEFINEQ (LAFITE.AROUNDEXIT [LAMBDA (EVENT) (* bvm: "14-Aug-84 13:51") (SELECTQ EVENT [(BEFORELOGOUT) (SETQ \LAFITEUSERDATA NIL) (RESETLST (for FOLDER in \ACTIVELAFITEFOLDERS when (OBTAIN.MONITORLOCK (fetch (MAILFOLDER FOLDERLOCK) of FOLDER) T T) do (\LAFITE.CLOSE.FOLDER FOLDER T] [(AFTERLOGOUT AFTERSAVEVM AFTERSYSOUT AFTERMAKESYS) (COND ((EQ \LAFITE.ACTIVE T) (PRINTLAFITESTATUS "Reinitializing") (RESTART.PROCESS (QUOTE LAFITEMAILWATCH)) (CHECKLAFITEMAILFOLDERS] NIL]) (CHECKLAFITEMAILFOLDERS [LAMBDA NIL (* bvm: "14-Aug-84 13:54") (* * On returning from LOGOUT check to see that all the mailfiles are in a consistence state -- the user might have run Laurel and screwed up Lafite's data, or run Lafite from another machine * *) (COND ((AND \ACTIVELAFITEFOLDERS (NOT \LAFITE.READY)) (WITH.MONITOR \LAFITE.BROWSELOCK [COND ((NOT \LAFITE.READY) (SETQ \ACTIVELAFITEFOLDERS (for FOLDER in \ACTIVELAFITEFOLDERS bind NEWESTNAME FULLNAME BROWSERWINDOW collect FOLDER when (COND ((NULL (SETQ BROWSERWINDOW (fetch (MAILFOLDER BROWSERWINDOW) of FOLDER))) (* Not really active, forget it) (\LAFITE.CLOSE.FOLDER FOLDER T) NIL) ((COND ((EQ (SETQ NEWESTNAME (INFILEP (fetch (MAILFOLDER VERSIONLESSFOLDERNAME) of FOLDER))) (SETQ FULLNAME (fetch (MAILFOLDER FULLFOLDERNAME) of FOLDER))) (COND ((IEQP (GETFILEINFO FULLNAME (QUOTE LENGTH)) (fetch (MAILFOLDER FOLDEREOFPTR) of FOLDER)) (* Assume it hasn't changed if it's the same length) T) ((OPENWP BROWSERWINDOW) (CLEARW BROWSERWINDOW) (\LAFITE.PROCESS (LIST (FUNCTION \LAFITE.REBROWSEFOLDER) (KWOTE FOLDER)) (QUOTE LAFITEBROWSE)) T) (T (printout PROMPTWINDOW T FULLNAME " has changed") NIL))) ([OR (NOT NEWESTNAME) (ILESSP (FILENAMEFIELD NEWESTNAME (QUOTE VERSION)) (FILENAMEFIELD FULLNAME (QUOTE VERSION] (printout PROMPTWINDOW T "Couldn't find file " FULLNAME) NIL) (T (printout PROMPTWINDOW T NEWESTNAME " is a newer version than is currently being browsed." T) NIL)) T) (T (printout PROMPTWINDOW " - closing its browser window.") (CLOSEW (LAB.FLUSHWINDOW BROWSERWINDOW FOLDER) ) (\LAFITE.CLOSE.FOLDER FOLDER T) NIL] (SETQ \LAFITE.READY T]) (\LAFITE.REBROWSEFOLDER [LAMBDA (MAILFOLDER) (* bvm: "28-Mar-84 14:43") (WITH.MONITOR (fetch (MAILFOLDER FOLDERLOCK) of MAILFOLDER) (LAB.PROMPTPRINT MAILFOLDER "Folder has changed--rebrowsing...") (CLEARW (fetch (MAILFOLDER BROWSERWINDOW) of MAILFOLDER)) (LAB.LOADFOLDER MAILFOLDER) (replace (MAILFOLDER BROWSERPROMPTDIRTY) of MAILFOLDER with T]) (\LAFITE.AFTERLOGIN [LAMBDA (HOST USER) (* bvm: "11-Nov-84 18:28") (* Called when LOGIN gets new info. If HOST = NIL, this is the global login, which means we should get new data) (COND ((NULL HOST) (LAFITECLEARCACHE) (\LAFITE.WAKE.WATCHER]) ) (* Low level file functions) (DEFINEQ (\LAFITE.WRITE.PROFILE [LAMBDA NIL (* bvm: "13-Jan-84 10:58") (PROG ((PROFILEFILE (PROFILEFILENAME))) (WITH.MONITOR \LAFITE.PROFILELOCK (SETQ PROFILEFILE (OPENFILE PROFILEFILE (QUOTE OUTPUT) (QUOTE NEW))) (PRIN2 LAFITEMAILFOLDERS PROFILEFILE) (PRIN1 " " PROFILEFILE) (PRIN2 LAFITEFORMFILES PROFILEFILE) (CLOSEF PROFILEFILE)) (SETQ \LAFITEPROFILECHANGED]) (\LAFITE.READ.PROFILE [LAMBDA NIL (* bvm: " 7-Nov-84 11:26") (PROG ((PROFILEFILE (PROFILEFILENAME)) NEWFILES) (SETQ \LAFITEPROFILECHANGED) (COND [(INFILEP PROFILEFILE) (* read in the profile file *) (WITH.MONITOR \LAFITE.PROFILELOCK (OPENFILE PROFILEFILE (QUOTE INPUT)) (SETQ LAFITEMAILFOLDERS (READ PROFILEFILE)) (SETQ LAFITEFORMFILES (READ PROFILEFILE)) (CLOSEF PROFILEFILE)) (COND ((NEQ (CAR LAFITEMAILFOLDERS) (fetch PACKEDHOST&DIR of \LAFITEDEFAULTHOST&DIR)) (* Old format) [SETQ LAFITEMAILFOLDERS (CONS (fetch PACKEDHOST&DIR of \LAFITEDEFAULTHOST&DIR) (for FILE in LAFITEMAILFOLDERS collect (LA.SHORTFILENAME FILE LAFITEMAIL.EXT] (SETQ \LAFITEPROFILECHANGED T))) (COND ([AND NIL (NOT (EQUAL (CDR LAFITEMAILFOLDERS) (SETQ NEWFILES (COLLECTOLDFILES (CDR LAFITEMAILFOLDERS) LAFITEMAIL.EXT] (* This takes too long) (RPLACD LAFITEMAILFOLDERS NEWFILES) (SETQ LAFITEFOLDERSMENU) (SETQ \LAFITEPROFILECHANGED T))) (COND ([AND NIL (NOT (EQUAL LAFITEFORMFILES (SETQ LAFITEFORMFILES (COLLECTOLDFILES LAFITEFORMFILES LAFITEFORM.EXT] (SETQ LAFITEFORMSMENU) (SETQ \LAFITEPROFILECHANGED T] (T (SETQ LAFITEMAILFOLDERS (CONS (fetch PACKEDHOST&DIR of \LAFITEDEFAULTHOST&DIR) (SETQ LAFITEFORMFILES NIL]) (DELETEMAILFOLDER [LAMBDA (MAILFOLDER) (* bvm: "21-Feb-84 14:55") (* * deletes the associated files and tells Lafite to forget about that mail file * *) (PROG (FILE) (FORGETMAILFILE (OR (fetch (MAILFOLDER SHORTFOLDERNAME) of MAILFOLDER) (LA.SHORTFILENAME (fetch (MAILFOLDER VERSIONLESSFOLDERNAME) of MAILFOLDER) LAFITEMAIL.EXT))) (CLOSEF? (SETQ FILE (fetch (MAILFOLDER FULLFOLDERNAME) of MAILFOLDER))) (DELFILE FILE) (SETQ FILE (TOCFILENAME FILE)) (CLOSEF? FILE) (DELFILE FILE]) (FORGETMAILFILE [LAMBDA (FILENAME) (* bvm: "21-Feb-84 14:55") (* * removes FILENAME from the list of known mail files and invalidates the menu cache) (SETQ LAFITEMAILFOLDERS (DREMOVE FILENAME LAFITEMAILFOLDERS)) (SETQ \LAFITEPROFILECHANGED T) (SETQ LAFITEFOLDERSMENU]) (\LAFITE.UNCACHE.FOLDER [LAMBDA (ITEM MENU MULTFLG) (* bvm: "11-Mar-85 23:46") (* * Remove one or more names from the folder menu. If MULTFLG is true, loops until you click outside menu) (PROG ((FOLDERMENU (OR LAFITEFOLDERSMENU (MAKELAFITEMAILFOLDERSMENU))) FOLDER) LP (COND ((SETQ FOLDER (MENU FOLDERMENU)) (FORGETMAILFILE FOLDER) (printout PROMPTWINDOW T FOLDER " forgotten.") (COND (MULTFLG (GO LP]) (\LAFITE.UNCACHE.FOLDER.MULTIPLE [LAMBDA (ITEM MENU) (* bvm: "11-Mar-85 23:48") (\LAFITE.UNCACHE.FOLDER ITEM MENU T]) (\LAFITE.OPEN.FOLDER [LAMBDA (FOLDER ACCESS RECOG) (* bvm: "12-Jan-84 15:12") (* * For Interlisp-D its too inefficient to keep opening and closing the mail file so we will keep it open - If the file wants to be open for INPUT do just that -- it may want to be a read-only mail file -- otherwise open it for BOTH - FILE is always a fully qualified file name * *) (PROG ((STREAM (fetch (MAILFOLDER FOLDERSTREAM) of FOLDER)) [DESIREDACCESS (COND ((EQ ACCESS (QUOTE INPUT)) ACCESS) (T (QUOTE BOTH] FILE) (RETURN (COND ((AND STREAM (OPENP STREAM DESIREDACCESS)) STREAM) (T (SETQ FILE (\LAFITE.OPENSTREAM (OR [COND (STREAM (* Have to close file to reopen for BOTH) (PROG1 (AND (OPENP STREAM) (CLOSEF STREAM)) (replace (MAILFOLDER FOLDERSTREAM) of FOLDER with NIL] (fetch (MAILFOLDER FULLFOLDERNAME) of FOLDER)) DESIREDACCESS RECOG (fetch (MAILFOLDER BROWSERWINDOW) of FOLDER))) (AND (EQ DESIREDACCESS (QUOTE BOTH)) (LINELENGTH MAX.SMALLP FILE)) (* So that LA.PRINTCOUNT won't introduce CR's. Would be nice if PRINTNUM could be give a PRIN3 mode) (replace (MAILFOLDER FOLDERSTREAM) of FOLDER with FILE]) (\LAFITE.OPENSTREAM [LAMBDA (FILE ACCESS RECOG BIGBUFS) (* bvm: " 6-Jan-84 12:24") [SETQ FILE (OPENSTREAM FILE ACCESS RECOG NIL (CONS (QUOTE (ENDOFSTREAMOP \LAFITE.EOF)) (AND BIGBUFS (LIST (LIST (QUOTE BUFFERS) LAFITEBUFFERSIZE] (WHENCLOSE FILE (QUOTE CLOSEALL) (QUOTE NO)) FILE]) (\LAFITE.CREATE.MENU [LAMBDA (ITEMS TITLE) (* bvm: " 5-Mar-84 15:23") (create MENU ITEMS ← ITEMS MENUFONT ← LAFITEMENUFONT TITLE ← TITLE CENTERFLG ← T]) (\LAFITE.EOF [LAMBDA (STREAM) (* bvm: "27-Dec-83 12:05") (* End of stream op for Lafite mail folders. Return endless CR's so that parses eventually stop) (CHARCODE CR]) (\LAFITE.CLOSE.FOLDER [LAMBDA (MAILFOLDER REALLYP) (* bvm: "14-Aug-84 13:54") (* * This is the companion to OPENMAILFILE) (PROG ((STREAM (fetch (MAILFOLDER FOLDERSTREAM) of MAILFOLDER))) (RETURN (COND ((NULL STREAM) NIL) (REALLYP (PROG1 (AND (OPENP STREAM) (CLOSEF STREAM)) (replace (MAILFOLDER FOLDERSTREAM) of MAILFOLDER with NIL))) ((OPENP STREAM (QUOTE OUTPUT)) (FORCEOUTPUT STREAM T) (fetch (MAILFOLDER FULLFOLDERNAME) of MAILFOLDER]) (PROMPTFORFILENAME [LAMBDA (WINDOW DEFAULT PROMPT) (* bvm: " 6-Nov-84 12:36") (RESETLST (OR PROMPT (SETQ PROMPT "Filename (CR to abort): ")) (RESETSAVE (TTY.PROCESS (THIS.PROCESS))) (RESETSAVE NIL (LIST (COND (WINDOW (FUNCTION CLEARW)) (T [SETQ WINDOW (PROG ((FONT (DEFAULTFONT (QUOTE DISPLAY))) WIDTH HEIGHT) [SETQ WIDTH (WIDTHIFWINDOW (IPLUS (STRINGWIDTH PROMPT FONT) (ITIMES 50 (CHARWIDTH (CHARCODE A) FONT] [SETQ HEIGHT (HEIGHTIFWINDOW (FONTPROP FONT (QUOTE HEIGHT] (RETURN (CREATEW (create REGION LEFT ←(IMIN LASTMOUSEX (IDIFFERENCE SCREENWIDTH WIDTH)) BOTTOM ←(IMIN LASTMOUSEY (IDIFFERENCE SCREENHEIGHT HEIGHT)) WIDTH ← WIDTH HEIGHT ← HEIGHT] (FUNCTION CLOSEW))) WINDOW)) (PROMPTFORWORD PROMPT DEFAULT NIL WINDOW]) (\LAFITE.PROMPTFORFOLDER [LAMBDA (WINDOW) (* bvm: "27-Dec-83 19:12") (PROG [(FILE (MENU (OR LAFITEFOLDERSMENU (MAKELAFITEMAILFOLDERSMENU] (RETURN (SELECTQ FILE (NIL NIL) (##ANOTHERFILE## (PROMPTFORFILENAME WINDOW)) FILE]) (MAKELAFITEMAILFOLDERSMENU [LAMBDA NIL (* bvm: " 6-Jan-84 11:26") (SETQ LAFITEFOLDERSMENU (create MENU ITEMS ←(APPEND (SORT (CDR LAFITEMAILFOLDERS)) (LIST ANOTHERFOLDERMENUITEM)) TITLE ←(CONCAT "Folders on " (L-CASE (fetch PACKEDHOST&DIR \LAFITEDEFAULTHOST&DIR))) CENTERFLG ← T]) (MAILFOLDERBUSY [LAMBDA (MAILFOLDER) (* bvm: "29-Dec-83 18:11") (RESETFORM (CURSOR LA.CROSSCURSOR) (BLOCK LAFITEBUSYWAITTIME]) (LA.LONGFILENAME [LAMBDA (FILENAME EXT) (* bvm: "24-Feb-85 22:20") (* * Composes a (nearly) full-specified filename, filling in defaults from \LAFITEDEFAULTHOST&DIR) (* * Would like this to be (PACKFILENAME (QUOTE BODY) FILENAME (QUOTE EXTENSION) EXT (QUOTE DIRECTORY) (fetch PACKEDHOST&DIR of \LAFITEDEFAULTHOST&DIR)) but PACKFILENAME handles DIRECTORY wrong if FILENAME has a host but no dir) (LET ((FILEFIELDS (UNPACKFILENAME.STRING FILENAME)) (DEFAULTFIELDS (fetch UNPACKEDHOST&DIR of \LAFITEDEFAULTHOST&DIR))) (while (AND DEFAULTFIELDS (NEQ (CAR DEFAULTFIELDS) (CAR FILEFIELDS))) do (NCONC FILEFIELDS (LIST (CAR DEFAULTFIELDS) (CADR DEFAULTFIELDS))) (SETQ DEFAULTFIELDS (CDDR DEFAULTFIELDS))) (PACKFILENAME (NCONC FILEFIELDS (LIST (QUOTE EXTENSION) EXT]) (PROFILEFILENAME [LAMBDA NIL (* bvm: "24-Feb-85 22:04") (PACKFILENAME (QUOTE DIRECTORY) (fetch PACKEDHOST&DIR of \LAFITEDEFAULTHOST&DIR) (QUOTE NAME) LAFITEPROFILE.NAME (QUOTE EXTENSION) LAFITEPROFILE.EXT (QUOTE VERSION) 1]) (TOCFILENAME [LAMBDA (MAILFILE) (* M.Yonke "12-APR-83 12:44") (if MAILFILE then (PACKFILENAME (QUOTE EXTENSION) (CONCAT (FILENAMEFIELD MAILFILE (QUOTE EXTENSION)) LAFITETOC.EXT) (QUOTE BODY) MAILFILE]) (LA.SHORTFILENAME [LAMBDA (FILE EXT KEEPVERSIONFLG) (* bvm: "11-Mar-85 23:26") (* * returns that shortest file name that is compatible with \LAFITEDEFAULTHOST&DIR and EXT and no version number -- the result is used in menu creation * *) (COND (FILE (LET ([FILEFIELDS (COND ((LISTP FILE) (* Already unpacked) (APPEND FILE)) (T (UNPACKFILENAME FILE] MATCHFAILED) [for FILETAIL on FILEFIELDS by (CDDR FILETAIL) as (DEFAULTTAIL ←(fetch UNPACKEDHOST&DIR of \LAFITEDEFAULTHOST&DIR)) by (CDDR DEFAULTTAIL) do (COND ((COND ((AND (NOT MATCHFAILED) (EQ (CAR FILETAIL) (CAR DEFAULTTAIL))) (UCASE.STREQUAL (CADR FILETAIL) (CADR DEFAULTTAIL))) (T (SETQ MATCHFAILED T) (SELECTQ (CAR FILETAIL) (EXTENSION (EQ (CADR FILETAIL) EXT)) (VERSION (NOT KEEPVERSIONFLG)) NIL))) (* Remove a field from the result) (RPLACA (CDR FILETAIL) NIL)) (T (* Inhibit further matching in the HOST DEVICE DIRECTORY part) (SETQ MATCHFAILED T] (PACKFILENAME FILEFIELDS]) ) (DEFINEQ (COPY7BITFILE [LAMBDA (SRCFIL DSTFIL) (* bvm: " 5-Jan-84 10:57") (RESETLST (PROG (INSTREAM OUTSTREAM CH) [RESETSAVE NIL (LIST (QUOTE CLOSEF) (SETQ INSTREAM (OPENSTREAM SRCFIL (QUOTE INPUT) NIL NIL (QUOTE ((SEQUENTIAL T) (ENDOFSTREAMOP NILL] [RESETSAVE NIL (LIST [FUNCTION (LAMBDA (STREAM) (SETQ STREAM (CLOSEF STREAM)) (AND RESETSTATE (DELFILE STREAM] (SETQ OUTSTREAM (OPENSTREAM (OR DSTFIL (PACKFILENAME (QUOTE VERSION) NIL (QUOTE BODY) (FULLNAME INSTREAM))) (QUOTE OUTPUT) (QUOTE NEW) NIL (LIST (QUOTE (SEQUENTIAL T)) (LIST (QUOTE LENGTH) (GETFILEINFO INSTREAM (QUOTE LENGTH] (while (SETQ CH (BIN INSTREAM)) do (BOUT OUTSTREAM (LOGAND CH 127))) (RETURN (FULLNAME OUTSTREAM]) (FIXLAURELFILE [LAMBDA (MAILFILE) (* bvm: "21-Feb-84 14:35") (PROG (FOLDER) (COND ((SETQ FOLDER (WITH.MONITOR \LAFITE.BROWSELOCK (\LAFITE.GETMAILFOLDER MAILFILE))) (\LAFITE.FIX.LAUREL.FOLDER FOLDER]) (\LAFITE.BROWSE.LAURELFILE [LAMBDA (ITEM MENU FILE) (* bvm: "23-Jul-84 16:24") (\LAFITE.BROWSE ITEM MENU FILE (QUOTE LAUREL]) (\LAFITE.FIX.LAUREL.FOLDER [LAMBDA (MAILFOLDER) (* bvm: "24-Sep-84 15:19") (RESETLST (PROG (STREAM CH BROWSERPROMPTWINDOW) (OBTAIN.MONITORLOCK (fetch (MAILFOLDER FOLDERLOCK) of MAILFOLDER) NIL T) (COND ((SETQ BROWSERPROMPTWINDOW (fetch (MAILFOLDER BROWSERPROMPTWINDOW) of MAILFOLDER)) (printout BROWSERPROMPTWINDOW "Laurel scan... "))) (SETQ STREAM (\LAFITE.OPEN.FOLDER MAILFOLDER (QUOTE BOTH))) (RESETSAVE NIL (LIST (FUNCTION \LAFITE.CLOSE.FOLDER) MAILFOLDER T)) (SETFILEINFO STREAM (QUOTE ENDOFSTREAMOP) (FUNCTION NILL)) [while (SETQ CH (BIN STREAM)) do (COND ((IGREATERP CH 127) (\BACKFILEPTR STREAM) (BOUT STREAM (LOGAND CH 127] (RETURN (FULLNAME STREAM]) ) (DECLARE: DOEVAL@COMPILE DONTCOPY (RPAQQ LAFITECOMPILETIME [(FILES (IMPORT) MAILCLIENT) (RECORDS LAFITEUSERDATA LAFITEOPS LAFITEMSG MAILFOLDER DEFAULTHOST&DIR MAILSERVER) (CONSTANTS (LAFITESTAMPLENGTH 24) (DELETEDFLAG (CHARCODE D)) (UNDELETEDFLAG (CHARCODE U)) (SEENFLAG (CHARCODE S)) (UNSEENFLAG (CHARCODE U)) (LAFITEDELETEPOSITION 20) (LAFITESEENPOSITION 21) (LAFITEMARKPOSITION 22)) (CONSTANTS LAFITETOCPASSWORD LAFITETOCOVERHEADPERENTRY LAFITETOCHEADERLENGTH LAFITETOCMARKBYTEOFFSET) (I.S.OPRS SELECTEDIN) (MACROS UCASE.STREQUAL WORDIN FIXPIN WORDOUT FIXPOUT UCASECODE NTHMESSAGE .LAFITEMENU. MAYBEVERIFYMSG ASSURE.LAFITE.READY) (GLOBALVARS * LAFITEGLOBALS) (DECLARE: DONTEVAL@COMPILE (TEMPLATES WINDOWPROP WINDOWADDPROP WINDOWDELPROP)) (COMS (FNS RELEASE.LAFITE) (ADDVARS (DONTCOMPILEFNS RELEASE.LAFITE]) (FILESLOAD (IMPORT) MAILCLIENT) [DECLARE: EVAL@COMPILE (RECORD LAFITEUSERDATA (FULLUSERNAME UNPACKEDUSERNAME ENCRYPTEDPASSWORD SHORTUSERNAME . MAILSERVERS)) (RECORD LAFITEOPS (LAFITEMODE SENDPARSER SENDER ANSWERER AUTHENTICATOR)) (DATATYPE LAFITEMSG ((PARSED? FLAG) (DELETED? FLAG) (SEEN? FLAG) (FORMATTED? FLAG) (NIL FLAG) (NIL FLAG) (NIL FLAG) (NIL FLAG) (BEGIN POINTER) (MARKCHAR BYTE) (MESSAGELENGTH POINTER) (# WORD) (STAMPLENGTH WORD) (TOCLENGTH WORD) (NIL WORD) (MESSAGELENGTHCHANGED? FLAG) (MARKSCHANGED? FLAG) (SELECTED? FLAG) (MSGFROMMECHECKED? FLAG) (MSGFROMMETRUTH FLAG) (NIL FLAG) (NIL FLAG) (NIL FLAG) (DATE POINTER) (FROM POINTER) (SUBJECT POINTER) (TO POINTER)) (* BEGIN is the only absolute pointer into the message file -- all other positions are relative to BEGIN -- see the ACCESSFNS *) (BLOCKRECORD LAFITEMSG ((PARSED&DELETED&SEENBITS BITS 3) (NIL BITS 5) (NIL POINTER))) (BLOCKRECORD LAFITEMSG ((MSGFLAGBITS BITS 8) (NIL POINTER))) [ACCESSFNS LAFITEMSG ((END (IPLUS (fetch (LAFITEMSG MESSAGELENGTH) of DATUM) (fetch (LAFITEMSG BEGIN) of DATUM))) (START (IPLUS (fetch (LAFITEMSG BEGIN) of DATUM) (fetch (LAFITEMSG STAMPLENGTH) of DATUM))) (SEENFILEPTR (IPLUS (fetch (LAFITEMSG BEGIN) of DATUM) LAFITESEENPOSITION)) (MARKFILEPTR (IPLUS (fetch (LAFITEMSG BEGIN) of DATUM) LAFITEMARKPOSITION)) (DELETEFILEPTR (IPLUS (fetch (LAFITEMSG BEGIN) of DATUM) LAFITEDELETEPOSITION)) (MSGFROMMEP (COND ((fetch (LAFITEMSG MSGFROMMECHECKED?) of DATUM) (fetch (LAFITEMSG MSGFROMMETRUTH) of DATUM)) (T (LA.MSGFROMMEP DATUM))) (PROG1 (replace (LAFITEMSG MSGFROMMETRUTH) of DATUM with NEWVALUE) (replace (LAFITEMSG MSGFROMMECHECKED?) of DATUM with T]) (DATATYPE MAILFOLDER ((BROWSERPROMPTDIRTY FLAG) (BROWSERREADY FLAG) (FOLDERNEEDSUPDATE FLAG) (FOLDERNEEDSEXPUNGE FLAG) (FOLDERBEINGUPDATED FLAG) (HARDCOPYPENDING FLAG) (NIL FLAG) (FULLFOLDERNAME POINTER) (VERSIONLESSFOLDERNAME POINTER) (SHORTFOLDERNAME POINTER) (FOLDERSTREAM POINTER) (MESSAGEDESCRIPTORS POINTER) (FOLDERLOCK POINTER) (#OFMESSAGES WORD) (TOCLASTMESSAGE# WORD) (BROWSERFONTHEIGHT WORD) (BROWSERFONTASCENT WORD) (BROWSERFONTDESCENT WORD) (BROWSERMAXXPOS WORD) (ORDINALXPOS WORD) (DATEXPOS WORD) (FROMXPOS WORD) (FROMMAXXPOS WORD) (SUBJECTXPOS WORD) (BROWSERDIGITWIDTH WORD) (FIRSTSELECTEDMESSAGE WORD) (LASTSELECTEDMESSAGE WORD) (FIRSTCHANGEDMESSAGE WORD) (CURRENTEOMLENGTH WORD) (CURRENTDISPLAYEDSTREAM POINTER) (BROWSEREXTENT POINTER) (BROWSERORIGIN POINTER) (BROWSERSELECTIONREGION POINTER) (BROWSERWINDOW POINTER) (BROWSERMENU POINTER) (BROWSERMENUWINDOW POINTER) (BROWSERPROMPTWINDOW POINTER) (ORIGINALBROWSERTITLE POINTER) (FOLDERDISPLAYWINDOWS POINTER) (FOLDEREOFPTR POINTER) (DEFAULTMOVETOFILE POINTER) (CURRENTDISPLAYEDMESSAGE POINTER) (BROWSERUPDATEFROMHERE POINTER) (EXTRAFIELD POINTER) (FOLDERCREATIONDATE POINTER) (HARDCOPYMESSAGES POINTER) (HARDCOPYSTREAM POINTER))) (RECORD DEFAULTHOST&DIR (PACKEDHOST&DIR . UNPACKEDHOST&DIR) (PROPRECORD UNPACKEDHOST&DIR (DEFAULTDIR DEFAULTHOST DEFAULTDEV))) (RECORD MAILSERVER (MAILSERVEROPS MAILPORT MAILSERVERNAME CONTINUANCE . MAILSTATE)) ] (/DECLAREDATATYPE (QUOTE LAFITEMSG) (QUOTE (FLAG FLAG FLAG FLAG FLAG FLAG FLAG FLAG POINTER BYTE POINTER WORD WORD WORD WORD FLAG FLAG FLAG FLAG FLAG FLAG FLAG FLAG POINTER POINTER POINTER POINTER))) (/DECLAREDATATYPE (QUOTE MAILFOLDER) (QUOTE (FLAG FLAG FLAG FLAG FLAG FLAG FLAG POINTER POINTER POINTER POINTER POINTER POINTER WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD POINTER POINTER POINTER POINTER POINTER POINTER POINTER POINTER POINTER POINTER POINTER POINTER POINTER POINTER POINTER POINTER POINTER POINTER))) (DECLARE: EVAL@COMPILE (RPAQQ LAFITESTAMPLENGTH 24) (RPAQ DELETEDFLAG (CHARCODE D)) (RPAQ UNDELETEDFLAG (CHARCODE U)) (RPAQ SEENFLAG (CHARCODE S)) (RPAQ UNSEENFLAG (CHARCODE U)) (RPAQQ LAFITEDELETEPOSITION 20) (RPAQQ LAFITESEENPOSITION 21) (RPAQQ LAFITEMARKPOSITION 22) (CONSTANTS (LAFITESTAMPLENGTH 24) (DELETEDFLAG (CHARCODE D)) (UNDELETEDFLAG (CHARCODE U)) (SEENFLAG (CHARCODE S)) (UNSEENFLAG (CHARCODE U)) (LAFITEDELETEPOSITION 20) (LAFITESEENPOSITION 21) (LAFITEMARKPOSITION 22)) ) (DECLARE: EVAL@COMPILE (RPAQQ LAFITETOCPASSWORD 45610) (RPAQQ LAFITETOCOVERHEADPERENTRY 12) (RPAQQ LAFITETOCHEADERLENGTH 10) (RPAQQ LAFITETOCMARKBYTEOFFSET 4) (CONSTANTS LAFITETOCPASSWORD LAFITETOCOVERHEADPERENTRY LAFITETOCHEADERLENGTH LAFITETOCMARKBYTEOFFSET) ) (DECLARE: EVAL@COMPILE [I.S.OPR (QUOTE SELECTEDIN) NIL (QUOTE (bind ($$MESSAGES ← (fetch (MAILFOLDER MESSAGEDESCRIPTORS) of BODY)) ($$MSG# ← (SUB1 (fetch (MAILFOLDER FIRSTSELECTEDMESSAGE) of BODY))) ($$MSGLAST ← (fetch (MAILFOLDER LASTSELECTEDMESSAGE) of BODY)) until (IGREATERP (add $$MSG# 1) $$MSGLAST) when (fetch (LAFITEMSG SELECTED?) of (SETQ I.V. (NTHMESSAGE $$MESSAGES $$MSG#] ) (DECLARE: EVAL@COMPILE (PUTPROPS UCASE.STREQUAL MACRO ((X Y) (EQ (ALPHORDER X Y UPPERCASEARRAY) (QUOTE EQUAL)))) (PUTPROPS WORDIN DMACRO (= . \WIN)) (PUTPROPS WORDIN MACRO (= . \WIN)) (PUTPROPS FIXPIN DMACRO (OPENLAMBDA (STREAM) (\MAKENUMBER (WORDIN STREAM) (WORDIN STREAM)))) (PUTPROPS WORDOUT DMACRO (= . \WOUT)) (PUTPROPS FIXPOUT DMACRO [OPENLAMBDA (STREAM N) (PROGN (WORDOUT STREAM (LRSH N 16)) (WORDOUT STREAM (LOGAND N 65535]) (PUTPROPS UCASECODE MACRO (OPENLAMBDA (CHAR) (COND ((AND (IGEQ CHAR (CHARCODE a)) (ILEQ CHAR (CHARCODE z))) (LOGAND CHAR 95)) (T CHAR)))) (PUTPROPS NTHMESSAGE MACRO (= . ELT)) (PUTPROPS .LAFITEMENU. MACRO [(NAME ITEMS TITLE) (PROGN (DECLARE (GLOBALVARS NAME)) (OR NAME (SETQ NAME (\LAFITE.CREATE.MENU ITEMS TITLE]) (PUTPROPS MAYBEVERIFYMSG MACRO ((MSG MAILFOLDER) (AND LAFITEVERIFYFLG (\LAFITE.VERIFYMSG MSG MAILFOLDER)))) (PUTPROPS ASSURE.LAFITE.READY MACRO (NIL (OR \LAFITE.READY (CHECKLAFITEMAILFOLDERS)))) ) (RPAQQ LAFITEGLOBALS (LAFITESHOWMODEFLG \LAFITE.MODE.CHOICES LAFITESUBQUITMENU LAFITESUBQUITMENUITEMS LAFITEMODEDEFAULT LAFITEMODELST \LAFITEMODE LAFITEUPDATETOCITEM LAFITETEMPFILEHOSTNAME LAFITEMOVETOCONFIRMFLG LAFITECLOSELABELS LAFITECLOSEITEM LAFITEUPDATEMENUS LAFITESUBBROWSEMENU ANOTHERFOLDERMENUITEM ANSWERMARK AROUNDEXITFNS BROWSERMARKXPOSITION BackgroundMenu BackgroundMenuCommands DEFAULTMAILFOLDERNAME FORWARDMARK HARDCOPYBATCHMARK HARDCOPYMARK LA.CROSSCURSOR LA.SELECTION.BITMAP LAFITEBROWSERFONT LAFITEBROWSERMENUITEMS LAFITEBROWSERREGION LAFITEBUFFERSIZE LAFITEBUSYWAITTIME LAFITECOMMANDMENUITEMS LAFITEDEFAULTHOST&DIR LAFITEDELETEDLINEHEIGHT LAFITEDISPLAYAFTERDELETEFLG LAFITEDISPLAYFONT LAFITEDISPLAYREGION LAFITEEDITORWINDOWS LAFITEENDOFMESSAGEFONT LAFITEENDOFMESSAGESTR LAFITEEOL LAFITEEXTRAMENUFLG LAFITEFOLDERSMENU LAFITEFORM.EXT LAFITEFORMFILES LAFITEFORMSMENU LAFITEFROMFRACTION LAFITEHARDCOPY.MIN.TOC LAFITEHARDCOPYBATCHFLG LAFITEHARDCOPYBATCHSHADE LAFITEHARDCOPYFONT LAFITEHARDCOPYSEPARATOR LAFITEIMMEDIATECHANGESFLG LAFITEITEMBUSYSHADE LAFITEMAIL.EXT LAFITEMAILFOLDERS LAFITEMAINMENU LAFITEMENUFONT LAFITEMINFROMCHARS LAFITENEWPAGEFLG LAFITEPRIMARYDISPLAYWINDOW LAFITEPROFILE.EXT LAFITEPROFILE.NAME LAFITEREADONLYFLG LAFITESTATUSWINDOW LAFITESTATUSWINDOWMINWIDTH LAFITESTATUSWINDOWPOSITION LAFITESUBBROWSEMENUITEMS LAFITESYSTEMDATE LAFITETITLEFONT LAFITETOC.EXT LAFITEUPDATEMENUITEMS LAFITEVERIFYFLG LAFITEVERSION# LASTMOUSEBUTTONS LASTMOUSEX LASTMOUSEY LOGINHOST/DIR MOVETOMARK MSGFOLDERICON MSGFOLDERMASK MSGFOLDERTEMPLATE MSGSENTICON MSGSENTMASK MSGSENTTEMPLATE PROMPTWINDOW SCREENHEIGHT SCREENWIDTH SEENMARK UNSEENMARK UNSUPPLIEDFIELDSTR UPPERCASEARRAY \ACTIVELAFITEFOLDERS \AFTERLOGINFNS \LAFITE.ACTIVE \LAFITE.BROWSELOCK \LAFITE.HARDCOPYLOCK \LAFITE.LAST.STATUS \LAFITE.MAILSERVERLOCK \LAFITE.MAINLOCK \LAFITE.PROFILELOCK \LAFITE.READY \LAFITE.TEMPFILES \LAFITEDEFAULTHOST&DIR \LAFITEPROFILECHANGED \LAFITEUSERDATA)) (DECLARE: DOEVAL@COMPILE DONTCOPY (GLOBALVARS LAFITESHOWMODEFLG \LAFITE.MODE.CHOICES LAFITESUBQUITMENU LAFITESUBQUITMENUITEMS LAFITEMODEDEFAULT LAFITEMODELST \LAFITEMODE LAFITEUPDATETOCITEM LAFITETEMPFILEHOSTNAME LAFITEMOVETOCONFIRMFLG LAFITECLOSELABELS LAFITECLOSEITEM LAFITEUPDATEMENUS LAFITESUBBROWSEMENU ANOTHERFOLDERMENUITEM ANSWERMARK AROUNDEXITFNS BROWSERMARKXPOSITION BackgroundMenu BackgroundMenuCommands DEFAULTMAILFOLDERNAME FORWARDMARK HARDCOPYBATCHMARK HARDCOPYMARK LA.CROSSCURSOR LA.SELECTION.BITMAP LAFITEBROWSERFONT LAFITEBROWSERMENUITEMS LAFITEBROWSERREGION LAFITEBUFFERSIZE LAFITEBUSYWAITTIME LAFITECOMMANDMENUITEMS LAFITEDEFAULTHOST&DIR LAFITEDELETEDLINEHEIGHT LAFITEDISPLAYAFTERDELETEFLG LAFITEDISPLAYFONT LAFITEDISPLAYREGION LAFITEEDITORWINDOWS LAFITEENDOFMESSAGEFONT LAFITEENDOFMESSAGESTR LAFITEEOL LAFITEEXTRAMENUFLG LAFITEFOLDERSMENU LAFITEFORM.EXT LAFITEFORMFILES LAFITEFORMSMENU LAFITEFROMFRACTION LAFITEHARDCOPY.MIN.TOC LAFITEHARDCOPYBATCHFLG LAFITEHARDCOPYBATCHSHADE LAFITEHARDCOPYFONT LAFITEHARDCOPYSEPARATOR LAFITEIMMEDIATECHANGESFLG LAFITEITEMBUSYSHADE LAFITEMAIL.EXT LAFITEMAILFOLDERS LAFITEMAINMENU LAFITEMENUFONT LAFITEMINFROMCHARS LAFITENEWPAGEFLG LAFITEPRIMARYDISPLAYWINDOW LAFITEPROFILE.EXT LAFITEPROFILE.NAME LAFITEREADONLYFLG LAFITESTATUSWINDOW LAFITESTATUSWINDOWMINWIDTH LAFITESTATUSWINDOWPOSITION LAFITESUBBROWSEMENUITEMS LAFITESYSTEMDATE LAFITETITLEFONT LAFITETOC.EXT LAFITEUPDATEMENUITEMS LAFITEVERIFYFLG LAFITEVERSION# LASTMOUSEBUTTONS LASTMOUSEX LASTMOUSEY LOGINHOST/DIR MOVETOMARK MSGFOLDERICON MSGFOLDERMASK MSGFOLDERTEMPLATE MSGSENTICON MSGSENTMASK MSGSENTTEMPLATE PROMPTWINDOW SCREENHEIGHT SCREENWIDTH SEENMARK UNSEENMARK UNSUPPLIEDFIELDSTR UPPERCASEARRAY \ACTIVELAFITEFOLDERS \AFTERLOGINFNS \LAFITE.ACTIVE \LAFITE.BROWSELOCK \LAFITE.HARDCOPYLOCK \LAFITE.LAST.STATUS \LAFITE.MAILSERVERLOCK \LAFITE.MAINLOCK \LAFITE.PROFILELOCK \LAFITE.READY \LAFITE.TEMPFILES \LAFITEDEFAULTHOST&DIR \LAFITEPROFILECHANGED \LAFITEUSERDATA) ) (DECLARE: DONTEVAL@COMPILE (SETTEMPLATE (QUOTE WINDOWPROP) (QUOTE (CALL EVAL PROP EVAL . PPE))) (SETTEMPLATE (QUOTE WINDOWADDPROP) (QUOTE (CALL EVAL PROP EVAL EVAL . PPE))) (SETTEMPLATE (QUOTE WINDOWDELPROP) (QUOTE (CALL EVAL PROP EVAL . PPE))) ) (DEFINEQ (RELEASE.LAFITE [LAMBDA NIL (* bvm: "15-Nov-84 20:40") (ADD.PROCESS (LIST (FUNCTION (LAMBDA NIL (TTYDISPLAYSTREAM (CREATEW (QUOTE (0 248 467 163)) "Lafite Release")) (DSPSCROLL T) (FILESLOAD (SYSLOAD) COPYFILES) (COPYFILES (QUOTE ({ERIS}<LAFITE>LAFITE.DCOM {ERIS}<LAFITE>LAFITEBROWSE.DCOM {ERIS}<LAFITE>LAFITEMAIL.DCOM {ERIS}<LAFITE>LAFITESEND.DCOM {ERIS}<LAFITE>NSMAIL.DCOM {ERIS}<LAFITE>MAILCLIENT.DCOM {ERIS}<LAFITE>LAFITEFIND.DCOM {ERIS}<LAFITE>LAFITE {ERIS}<LAFITE>LAFITEBROWSE {ERIS}<LAFITE>LAFITEMAIL {ERIS}<LAFITE>LAFITESEND {ERIS}<LAFITE>NSMAIL {ERIS}<LAFITE>MAILCLIENT {ERIS}<LAFITE>LAFITEFIND)) (QUOTE {ERIS}<LISPCORE>LIBRARY>) (QUOTE (>A))) (printout T T "Lafite Release Complete"]) ) (ADDTOVAR DONTCOMPILEFNS RELEASE.LAFITE) ) (/DECLAREDATATYPE (QUOTE MAILFOLDER) (QUOTE (FLAG FLAG FLAG FLAG FLAG FLAG FLAG POINTER POINTER POINTER POINTER POINTER POINTER WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD POINTER POINTER POINTER POINTER POINTER POINTER POINTER POINTER POINTER POINTER POINTER POINTER POINTER POINTER POINTER POINTER POINTER POINTER))) (/DECLAREDATATYPE (QUOTE LAFITEMSG) (QUOTE (FLAG FLAG FLAG FLAG FLAG FLAG FLAG FLAG POINTER BYTE POINTER WORD WORD WORD WORD FLAG FLAG FLAG FLAG FLAG FLAG FLAG FLAG POINTER POINTER POINTER POINTER))) [ADDTOVAR SYSTEMRECLST (DATATYPE MAILFOLDER ((BROWSERPROMPTDIRTY FLAG) (BROWSERREADY FLAG) (FOLDERNEEDSUPDATE FLAG) (FOLDERNEEDSEXPUNGE FLAG) (FOLDERBEINGUPDATED FLAG) (HARDCOPYPENDING FLAG) (NIL FLAG) (FULLFOLDERNAME POINTER) (VERSIONLESSFOLDERNAME POINTER) (SHORTFOLDERNAME POINTER) (FOLDERSTREAM POINTER) (MESSAGEDESCRIPTORS POINTER) (FOLDERLOCK POINTER) (#OFMESSAGES WORD) (TOCLASTMESSAGE# WORD) (BROWSERFONTHEIGHT WORD) (BROWSERFONTASCENT WORD) (BROWSERFONTDESCENT WORD) (BROWSERMAXXPOS WORD) (ORDINALXPOS WORD) (DATEXPOS WORD) (FROMXPOS WORD) (FROMMAXXPOS WORD) (SUBJECTXPOS WORD) (BROWSERDIGITWIDTH WORD) (FIRSTSELECTEDMESSAGE WORD) (LASTSELECTEDMESSAGE WORD) (FIRSTCHANGEDMESSAGE WORD) (CURRENTEOMLENGTH WORD) (CURRENTDISPLAYEDSTREAM POINTER) (BROWSEREXTENT POINTER) (BROWSERORIGIN POINTER) (BROWSERSELECTIONREGION POINTER) (BROWSERWINDOW POINTER) (BROWSERMENU POINTER) (BROWSERMENUWINDOW POINTER) (BROWSERPROMPTWINDOW POINTER) (ORIGINALBROWSERTITLE POINTER) (FOLDERDISPLAYWINDOWS POINTER) (FOLDEREOFPTR POINTER) (DEFAULTMOVETOFILE POINTER) (CURRENTDISPLAYEDMESSAGE POINTER) (BROWSERUPDATEFROMHERE POINTER) (EXTRAFIELD POINTER) (FOLDERCREATIONDATE POINTER) (HARDCOPYMESSAGES POINTER) (HARDCOPYSTREAM POINTER))) (DATATYPE LAFITEMSG ((PARSED? FLAG) (DELETED? FLAG) (SEEN? FLAG) (FORMATTED? FLAG) (NIL FLAG) (NIL FLAG) (NIL FLAG) (NIL FLAG) (BEGIN POINTER) (MARKCHAR BYTE) (MESSAGELENGTH POINTER) (# WORD) (STAMPLENGTH WORD) (TOCLENGTH WORD) (NIL WORD) (MESSAGELENGTHCHANGED? FLAG) (MARKSCHANGED? FLAG) (SELECTED? FLAG) (MSGFROMMECHECKED? FLAG) (MSGFROMMETRUTH FLAG) (NIL FLAG) (NIL FLAG) (NIL FLAG) (DATE POINTER) (FROM POINTER) (SUBJECT POINTER) (TO POINTER))) ] (DEFINEQ (\LAFITE.GLOBAL.INIT [LAMBDA NIL (* bvm: "30-Oct-84 16:33") (* need to do this so you can send a message without "starting" lafite *) (DECLARE (GLOBALVARS BackgroundMenu BackgroundMenuCommands)) (COND ((NOT (ASSOC (QUOTE SendMail) BackgroundMenuCommands)) [SETQ BackgroundMenuCommands (APPEND BackgroundMenuCommands (LIST (LIST (QUOTE SendMail) (KWOTE (LIST (FUNCTION \LAFITE.MESSAGEFORM))) "Bring up a message sending form."] (SETQ BackgroundMenu NIL))) (LAFITE.INIT.PARSETABLES) (SETQ \LAFITE.MAILSERVERLOCK (CREATE.MONITORLOCK "Lafite Mail Servers")) (* Used by anyone who calls \LAFITE.GET.USER.DATA or otherwise tries to muck with \LAFITEUSERDATA) NIL]) ) (DECLARE: DONTEVAL@LOAD DOCOPY (FILESLOAD LAFITEBROWSE LAFITESEND LAFITEMAIL TEDIT ATTACHEDWINDOW) (\LAFITE.GLOBAL.INIT) ) (DECLARE: DOEVAL@LOAD DOEVAL@COMPILE DONTCOPY COMPILERVARS (ADDTOVAR NLAMA ) (ADDTOVAR NLAML ) (ADDTOVAR LAMA LAFITE) ) (PUTPROPS LAFITE COPYRIGHT ("Xerox Corporation and Bolt Beranek and Newman Inc." 1982 1983 1984 1985)) (DECLARE: DONTCOPY (FILEMAP (NIL (3136 19003 (LAFITE 3146 . 5141) (\LAFITE.START.PROC 5143 . 7739) ( LA.CREATE.UPDATE.MENUS 7741 . 8300) (\LAFITE.PROCESS 8302 . 8737) (\LAFITE.START.ABORT 8739 . 8990) ( \LAFITE.QUIT 8992 . 9336) (\LAFITE.RESTART 9338 . 9541) (\LAFITE.SUBQUIT 9543 . 10535) ( \LAFITE.QUIT.PROC 10537 . 14702) (\LAFITEDEFAULTHOST&DIR 14704 . 15813) (LAFITEDEFAULTHOST&DIR 15815 . 16045) (MAKELAFITECOMMANDWINDOW 16047 . 18401) (EXTRACTMENUCOMMAND 18403 . 18813) ( DOMAINLAFITECOMMAND 18815 . 19001)) (19074 21323 (LAFITEMODE 19084 . 19912) (\LAFITE.INFER.MODE 19914 . 20429) (\LAFITE.SHOW.MODE 20431 . 20791) (\LAFITE.MODE.TITLE 20793 . 21321)) (25779 28706 ( LA.RESETSHADE 25789 . 26148) (LA.REMOVEDUPLICATES 26150 . 26694) (COLLECTOLDFILES 26696 . 27045) ( LA.SETDIFFERENCE 27047 . 27349) (NTHMESSAGE 27351 . 27480) (\LAFITE.MAKE.MSGARRAY 27482 . 28016) ( \LAFITE.ADDMESSAGES.TO.ARRAY 28018 . 28704)) (29092 33191 (LAFITE.AROUNDEXIT 29102 . 29760) ( CHECKLAFITEMAILFOLDERS 29762 . 32320) (\LAFITE.REBROWSEFOLDER 32322 . 32772) (\LAFITE.AFTERLOGIN 32774 . 33189)) (33229 45471 (\LAFITE.WRITE.PROFILE 33239 . 33699) (\LAFITE.READ.PROFILE 33701 . 35512) ( DELETEMAILFOLDER 35514 . 36181) (FORGETMAILFILE 36183 . 36530) (\LAFITE.UNCACHE.FOLDER 36532 . 37075) (\LAFITE.UNCACHE.FOLDER.MULTIPLE 37077 . 37251) (\LAFITE.OPEN.FOLDER 37253 . 38796) ( \LAFITE.OPENSTREAM 38798 . 39154) (\LAFITE.CREATE.MENU 39156 . 39383) (\LAFITE.EOF 39385 . 39690) ( \LAFITE.CLOSE.FOLDER 39692 . 40286) (PROMPTFORFILENAME 40288 . 41469) (\LAFITE.PROMPTFORFOLDER 41471 . 41784) (MAKELAFITEMAILFOLDERSMENU 41786 . 42180) (MAILFOLDERBUSY 42182 . 42368) (LA.LONGFILENAME 42370 . 43357) (PROFILEFILENAME 43359 . 43700) (TOCFILENAME 43702 . 43991) (LA.SHORTFILENAME 43993 . 45469)) (45472 47844 (COPY7BITFILE 45482 . 46441) (FIXLAURELFILE 46443 . 46726) ( \LAFITE.BROWSE.LAURELFILE 46728 . 46901) (\LAFITE.FIX.LAUREL.FOLDER 46903 . 47842)) (60552 61592 ( RELEASE.LAFITE 60562 . 61590)) (64512 65534 (\LAFITE.GLOBAL.INIT 64522 . 65532))))) STOP