(FILECREATED "18-Jan-85 17:15:27" {DSK}<LISPFILES>TREES.;1 3341 changes to: (VARS TREESCOMS PRONUNCIATION.LIST) (FNS FIND.CODE MAKE.LOGIN.USERINFO) (RECORDS LOGIN.INFO) previous date: " 9-Jan-85 13:28:24" {ERIS}<SPEECH>MAILREADER>TREES.;1) (* Copyright (c) 1984, 1985 by Xerox Corporation. All rights reserved.) (PRETTYCOMPRINT TREESCOMS) (RPAQQ TREESCOMS ((FNS FIND.CODE MAKE.LEAF MAKE.LOGIN.USERINFO BUILD.ROOT) (VARS PRONUNCIATION.LIST) (RECORDS LOGIN.INFO))) (DEFINEQ (FIND.CODE [LAMBDA (SUBTREE CODE NAME ADD.FLAG) (* BBB "18-Jan-85 14:57") (* FIND.CODE either returns the names associated with the list of CODEs in SUBTREE or will add if NAME not there if the ADD.FLAG is T) (COND [CODE (COND (SUBTREE (PROG [(BRANCH (FASSOC (CAR CODE) (CAR (CDR SUBTREE] (RETURN (COND (BRANCH (FIND.CODE BRANCH (CDR CODE) NAME ADD.FLAG)) (T (if ADD.FLAG then (ATTACH (MAKE.LEAF CODE (LIST (MAKE.LOGIN.USERINFO NAME))) (CADR SUBTREE] [[AND (CAR (CDDR SUBTREE)) (EQ T ADD.FLAG) (NULL (FASSOC NAME (CAR (CDDR SUBTREE] (ATTACH (MAKE.LOGIN.USERINFO NAME) (CAR (CDDR SUBTREE] (T (CAR (CDDR SUBTREE]) (MAKE.LEAF [LAMBDA (SUBCODE NAME) (* BBB "26-Dec-84 16:17") (* This routine is used for attaching a leaf for a subcode and associating a name with it. Eg. SUBCODE = (n1 n2 n3 n4) NAME = name1 result is (n1 ((n2 ((n3 ((n4 nil name1)))))))) (if (EQ (FLENGTH SUBCODE) 1) then (LIST (CAR SUBCODE) NIL NAME) else (CONS (CAR SUBCODE) (LIST (LIST (MAKE.LEAF (CDR SUBCODE) NAME]) (MAKE.LOGIN.USERINFO [LAMBDA (NAME) (* BBB "18-Jan-85 15:37") (* * This function creates a record of the user info relevant when logging in. It is of the form (LOGIN.NAME BROWSERFILE PRONUNCIATION)) (PROG [(LOGIN.USERINFO (create LOGIN.INFO LOGIN.NAME ← NAME PRONUNCIATION ←(CADR (FASSOC NAME PRONUNCIATION.LIST] [replace (LOGIN.INFO BROWSERFILE) of LOGIN.USERINFO with (OR [CAR (LAST (DIRECTORY (PACK* (QUOTE {PHYLUM}<) NAME (QUOTE >*ACTIVE.MAIL)) (QUOTE COLLECT] [CAR (LAST (DIRECTORY (PACK* (QUOTE {ERIS}<) NAME (QUOTE >*ACTIVE.MAIL)) (QUOTE COLLECT] (CAR (LAST (DIRECTORY (PACK* (QUOTE {IVY}<) NAME (QUOTE >*ACTIVE.MAIL)) (QUOTE COLLECT] (RETURN LOGIN.USERINFO]) (BUILD.ROOT [LAMBDA NIL (* BBB "26-Dec-84 16:45") (LIST (QUOTE !) (LIST NIL]) ) (RPAQQ PRONUNCIATION.LIST NIL) [DECLARE: EVAL@COMPILE (RECORD LOGIN.INFO (LOGIN.NAME BROWSERFILE PRONUNCIATION)) ] (PUTPROPS TREES COPYRIGHT ("Xerox Corporation" 1984 1985)) (DECLARE: DONTCOPY (FILEMAP (NIL (513 3134 (FIND.CODE 523 . 1445) (MAKE.LEAF 1447 . 1969) (MAKE.LOGIN.USERINFO 1971 . 2977) (BUILD.ROOT 2979 . 3132))))) STOP