(FILECREATED " 5-Jun-85 10:54:38" {EROS}<SPEECH>MAILREADER>CALLTEXT>MAIL-READER-USERS.;2 8448   

      previous date: "28-Mar-85 11:44:52" {EROS}<SPEECH>MAILREADER>CALLTEXT>MAIL-READER-USERS.;1)


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

(PRETTYCOMPRINT MAIL-READER-USERSCOMS)

(RPAQQ MAIL-READER-USERSCOMS ((VARS LETTER.TO.NUMBER.LIST ISL AISBU PTS OTHER)
			      (CONSTANTS LETTER.TO.NUMBER.LIST)
			      (FNS ADD.TO.NAME.HASHFILE STRIPVERSION ADD.ALL.TO.NAME.HASHFILE 
				   CHANGE.MAILFILE COMPUTE.TOUCHTONES GET.LOGININFO)
			      (RECORDS LOGININFO)))

(RPAQQ LETTER.TO.NUMBER.LIST ((A "2")
			      (B "2")
			      (C "2")
			      (D "3")
			      (E "3")
			      (F "3")
			      (G "4")
			      (H "4")
			      (I "4")
			      (J "5")
			      (K "5")
			      (L "5")
			      (M "6")
			      (N "6")
			      (O "6")
			      (P "7")
			      (Q "1")
			      (R "7")
			      (S "7")
			      (T "8")
			      (U "8")
			      (V "8")
			      (W "9")
			      (X "9")
			      (Y "9")
			      (Z "1")
			      (- "1")
			      (' "1")))

(RPAQQ ISL ((ARAYA NIL NIL)
	    (ABELL NIL NIL)
	    (BARWISE NIL NIL)
	    (BERLIN NIL NIL)
	    (BLOMBERG NIL NIL)
	    (DBLOOMBERG NIL NIL)
	    (BOBROW NIL NIL)
	    (BORRIELLO NIL NIL)
	    (BRESNAN NIL NIL)
	    (BRIGGS NIL NIL)
	    (BROWN NIL NIL)
	    (BURTON NIL NIL)
	    (BURWELL NIL NIL)
	    (CARD NIL NIL)
	    (DEKLEER NIL NIL)
	    (DESMARAIS NIL NIL)
	    (MIKEDIXON NIL NIL)
	    (FARLEY NIL NIL)
	    (FORD NIL NIL)
	    (FOSS NIL NIL)
	    (FOSTER NIL NIL)
	    (GARCIA NIL NIL)
	    (MGARDNER NIL NIL)
	    (GASCON NIL NIL)
	    (GREENO NIL NIL)
	    (GUEVARA NIL NIL)
	    (GUIBERT NIL NIL)
	    (HALASZ NIL NIL)
	    (HALVORSEN NIL NIL)
	    (HAYASHI NIL NIL)
	    (AHENDERSON NIL NIL)
	    (HOGG NIL NIL)
	    (ISHIKAWA NIL NIL)
	    (LJOHNSON NIL NIL)
	    (JORDAN NIL NIL)
	    (KAHN NIL NIL)
	    (KAPLAN NIL NIL)
	    (KAY NIL NIL)
	    (GREGOR NIL NIL)
	    (CKIPARSKY NIL NIL)
	    (KIPARSKY NIL NIL)
	    (LAIRD NIL NIL)
	    (LANNING NIL NIL)
	    (DLEVY NIL NIL)
	    (LIN NIL NIL)
	    (MASINTER NIL NIL)
	    (MAXWELL NIL NIL)
	    (MCALLESTER NIL NIL)
	    (MITTAL NIL NIL)
	    (MONT-REYNAUD NIL NIL)
	    (MONTY NIL NIL)
	    (MORAN NIL NIL)
	    (SNEWMAN NIL NIL)
	    (ORR NIL NIL)
	    (ROACH NIL NIL)
	    (JROBERTS NIL NIL)
	    (ROOTH NIL NIL)
	    (DMRUSSELL NIL NIL)
	    (SCHOPPERS NIL NIL)
	    (SELKER NIL NIL)
	    (SHEEHAN NIL NIL)
	    (BRIANSMITH NIL NIL)
	    (STANSBURY NIL NIL)
	    (STEFIK NIL NIL)
	    (SUCHMAN NIL NIL)
	    (SUGAI NIL NIL)
	    (TREICHEL NIL NIL)
	    (TRIGG NIL NIL)
	    (VANLEHN NIL NIL)
	    (VANMELLE NIL NIL)
	    (WESCOAT NIL NIL)
	    (WITHGOTT NIL NIL)
	    (YUE NIL NIL)
	    (ZAENEN NIL NIL)))

(RPAQQ AISBU ((BOKELMAN NIL NIL)
	      (BLUM NIL NIL)
	      (CHARNLEY NIL NIL)
	      (DEMERRITT NIL NIL)
	      (FISHER NIL NIL)
	      (GRIMBLE NIL NIL)
	      (HANEY NIL NIL)
	      (HAUSLADEN NIL NIL)
	      (JAMES NIL NIL)
	      (JELLINEK NIL NIL)
	      (KRISTY NIL NIL)
	      (LESLIE NIL NIL)
	      (LILLY NIL NIL)
	      (NUYENS NIL NIL)
	      (PEDERSEN NIL NIL)
	      (PURCELL NIL NIL)
	      (RHOADES NIL NIL)
	      (RICCI NIL NIL)
	      (SANNELLA NIL NIL)
	      (SANTOSA NIL NIL)
	      (SCHOEN NIL NIL)
	      (SHEIL NIL NIL)
	      (SYBALSKY NIL NIL)))

(RPAQQ PTS ((BURNS NIL NIL)
	    (ESSER NIL NIL)
	    (MANN NIL NIL)
	    (MORRILL NIL NIL)
	    (PIROGOWICZ NIL NIL)
	    (WALTERS NIL NIL)
	    (WINFIELD NIL NIL)))

(RPAQQ OTHER ((HUBERMAN NIL NIL)
	      (PTURNER NIL NIL)
	      (SPENCER NIL NIL)))
(DECLARE: EVAL@COMPILE 

(RPAQQ LETTER.TO.NUMBER.LIST ((A "2")
			      (B "2")
			      (C "2")
			      (D "3")
			      (E "3")
			      (F "3")
			      (G "4")
			      (H "4")
			      (I "4")
			      (J "5")
			      (K "5")
			      (L "5")
			      (M "6")
			      (N "6")
			      (O "6")
			      (P "7")
			      (Q "1")
			      (R "7")
			      (S "7")
			      (T "8")
			      (U "8")
			      (V "8")
			      (W "9")
			      (X "9")
			      (Y "9")
			      (Z "1")
			      (- "1")
			      (' "1")))

(CONSTANTS LETTER.TO.NUMBER.LIST)
)
(DEFINEQ

(ADD.TO.NAME.HASHFILE
  [LAMBDA (PERSON)                                           (* bbb: " 1-Mar-85 18:24")

          (* * PERSON is a record of type LOGININFO who will be added to the NAME.HASHFILE Note: a variable which is bound 
	  called OLD.STRING.PTR must be defined in order to call this routine)


    (PROG [(NAME.IN.TOUCHTONES)
	   (PEOPLE.WITH.SAME.TOUCHTONES)
	   (STRING.PTR)
	   (CHANGED.PERSON (create LOGININFO using PERSON MAILFILE ←(STRIPVERSION
						     (OR (fetch (LOGININFO MAILFILE) of PERSON)
							 (P.SEARCH.FOR.MAILFILE (fetch NAME
										   of PERSON]
          (SETQ STRING.PTR (SUBSTRING (MKSTRING (fetch NAME of CHANGED.PERSON))
				      1 NIL OLD.STRING.PTR))
          (SETQ NAME.IN.TOUCHTONES (CONCATLIST (COMPUTE.TOUCHTONES STRING.PTR)))
          (SETQ PEOPLE.WITH.SAME.TOUCHTONES NIL)

          (* * SETQ PEOPLE.WITH.SAME.TOUCHTONES (GETHASHFILE NAME.IN.TOUCHTONES NAME.HASHFILE))


          (if PEOPLE.WITH.SAME.TOUCHTONES
	      then (PUTHASHFILE NAME.IN.TOUCHTONES (CONS CHANGED.PERSON (REMOVE PERSON 
								      PEOPLE.WITH.SAME.TOUCHTONES))
				NAME.HASHFILE)
	    else (PUTHASHFILE NAME.IN.TOUCHTONES (LIST CHANGED.PERSON)
			      NAME.HASHFILE])

(STRIPVERSION
  [LAMBDA (FILE)                                             (* bbb: " 1-Mar-85 18:22")
    (if FILE
	then (PACKFILENAME (QUOTE HOST)
			   (FILENAMEFIELD FILE (QUOTE HOST))
			   (QUOTE DIRECTORY)
			   (FILENAMEFIELD FILE (QUOTE DIRECTORY))
			   (QUOTE NAME)
			   (FILENAMEFIELD FILE (QUOTE NAME))
			   (QUOTE EXTENSION)
			   (FILENAMEFIELD FILE (QUOTE EXTENSION])

(ADD.ALL.TO.NAME.HASHFILE
  [LAMBDA NIL                                                (* BBB " 7-Mar-85 19:05")

          (* * This function adds the ISL, PTS and AISBU names to NAME.HASHFILE)


    (PROG ((NAME.HASHFILE (CREATEHASHFILE (QUOTE {CORE}NAME.HASH)
					  (QUOTE EXPR)
					  15 1200))
	   (OLD.STRING.PTR (ALLOCSTRING 1)))
          (for PERSON in ISL do (ADD.TO.NAME.HASHFILE PERSON))
          (for PERSON in AISBU do (ADD.TO.NAME.HASHFILE PERSON))
          (for PERSON in PTS do (ADD.TO.NAME.HASHFILE PERSON))
          (for PERSON in OTHER do (ADD.TO.NAME.HASHFILE PERSON))
          (CLOSEHASHFILE NAME.HASHFILE)
          (COPYFILE (QUOTE {CORE}NAME.HASH)
		    (QUOTE {DSK}NAME.HASH])

(CHANGE.MAILFILE
  [LAMBDA (USER TOUCHTONES MAILFILE)                         (* bbb: " 1-Mar-85 18:03")

          (* * The mail file associated with USER is replaced with MAILFILE)


    (PROG ((PEOPLE.WITH.SAME.TOUCHTONES (GETHASHFILE TOUCHTONES MAILREADERUSERSFILE))
	   ALL.LOGININFO)
          (SETQ ALL.LOGININFO (for PERSON in PEOPLE.WITH.SAME.TOUCHTONES
				 when (EQ (fetch (LOGININFO NAME) of PERSON)
					  USER)
				 do (replace (LOGININFO MAILFILE) of PERSON with MAILFILE)))
          (PUTHASHFILE TOUCHTONES ALL.LOGININFO MAILREADERUSERSFILE])

(COMPUTE.TOUCHTONES
  [LAMBDA (NAME.STRING)                                      (* BBB "25-Jan-85 15:53")

          (* * Given a string this routine returns the corresponding touchtones as a list of numbers. Note: NAME.STRING will 
	  be destroyed using GNC.)


    (PROG ((LETTER))
          (RETURN (while (SETQ LETTER (GNC NAME.STRING)) collect (CADR (FASSOC LETTER 
									    LETTER.TO.NUMBER.LIST])

(GET.LOGININFO
  [LAMBDA (USER TOUCHTONES)                                  (* BBB "21-Feb-85 14:42")

          (* * The login info associated with USER is returned.)


    (for PERSON in (GETHASHFILE TOUCHTONES MAILREADERUSERSFILE)
       do (if (EQ (fetch NAME of PERSON)
		  USER)
	      then (RETURN PERSON])
)
[DECLARE: EVAL@COMPILE 

(RECORD LOGININFO (NAME PRONUNCIATION MAILFILE))
]
(PUTPROPS MAIL-READER-USERS COPYRIGHT ("Xerox Corporation" 1984 1985))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (4206 8275 (ADD.TO.NAME.HASHFILE 4216 . 5544) (STRIPVERSION 5546 . 5998) (
ADD.ALL.TO.NAME.HASHFILE 6000 . 6819) (CHANGE.MAILFILE 6821 . 7448) (COMPUTE.TOUCHTONES 7450 . 7906) (
GET.LOGININFO 7908 . 8273)))))
STOP