DIRECTORY Ascii USING [Lower], Atom USING [MakeAtom], PeanutProfile USING [], Rope USING [ROPE, Size, Translate, TranslatorType], UserProfile USING [Boolean, CallWhenProfileChanges, ListOfTokens, Number, ProfileChangedProc, Token]; PeanutProfileImpl: CEDAR PROGRAM IMPORTS Ascii, Atom, Rope, UserProfile EXPORTS PeanutProfile = BEGIN ROPE: TYPE = Rope.ROPE; activeMailFile: PUBLIC ROPE; -- Peanut.ActiveMailFile automaticNewMail: PUBLIC BOOL; -- Peanut.AutomaticNewMail ccField: PUBLIC BOOL; -- Peanut.CarbonCopyField ccToSelf: PUBLIC BOOL; -- Peanut.CarbonCopyToSelf commentNewHeaders: PUBLIC BOOL; -- Peanut.CommentNewHeaders messageNodeFormat: PUBLIC ATOM; -- Peanut.MessageNodeFormat outgoingMailFile: PUBLIC ROPE; -- Peanut.OutgoingMailFile plainTextMessageFormat: PUBLIC ATOM; -- Peanut.PlainTextMessageFormat recipients: PUBLIC ROPE; -- Peanut.Recipients signature: PUBLIC ROPE; -- Peanut.Signature startIconic: PUBLIC BOOL; -- Peanut.StartIconic toBeforeSubject: PUBLIC BOOL; -- Peanut.ToBeforeSubject windowHeight: PUBLIC INT; -- Peanut.WindowHeight workingDirectory: PUBLIC ROPE; -- Peanut.WorkingDirectory fixupXNSAddresses: PUBLIC LIST OF ROPE; -- Peanut.FixupXNSAddresses LCAtomFromRope: PROC [rope: ROPE] RETURNS [ATOM] ~ { lowerCase: Rope.TranslatorType ~ { RETURN[Ascii.Lower[old]] }; IF Rope.Size[rope] = 0 THEN RETURN [NIL]; RETURN[Atom.MakeAtom[Rope.Translate[base: rope, translator: lowerCase]]]; }; ChangePeanutProfile: UserProfile.ProfileChangedProc = { activeMailFile ¬ UserProfile.Token["Peanut.ActiveMailFile", "Active"]; automaticNewMail ¬ UserProfile.Boolean["Peanut.AutomaticNewMail", FALSE]; ccField ¬ UserProfile.Boolean["Peanut.CarbonCopyField", TRUE]; ccToSelf ¬ UserProfile.Boolean["Peanut.CarbonCopyToSelf", TRUE]; commentNewHeaders ¬ UserProfile.Boolean["Peanut.CommentNewHeaders", TRUE]; messageNodeFormat ¬ LCAtomFromRope[UserProfile.Token["Peanut.MessageNodeFormat", NIL]]; outgoingMailFile ¬ UserProfile.Token["Peanut.OutgoingMailFile", ""]; plainTextMessageFormat ¬ LCAtomFromRope[UserProfile.Token["Peanut.PlainTextMessageFormat", "default"]]; recipients ¬ UserProfile.Token["Peanut.Recipients", "Recipients"]; signature ¬ UserProfile.Token["Peanut.Signature", NIL]; startIconic ¬ UserProfile.Boolean["Peanut.StartIconic", TRUE]; toBeforeSubject ¬ UserProfile.Boolean["Peanut.ToBeforeSubject", FALSE]; windowHeight ¬ UserProfile.Number["Peanut.WindowHeight", 80]; workingDirectory ¬ UserProfile.Token["Peanut.WorkingDirectory", NIL]; fixupXNSAddresses ¬ UserProfile.ListOfTokens["Peanut.FixupXNSAddresses", NIL]; }; UserProfile.CallWhenProfileChanges[ChangePeanutProfile]; END. xPeanutProfileImpl.mesa Copyright Σ 1985, 1990, 1992 by Xerox Corporation. All rights reserved. Doug Wyatt, July 2, 1985 11:35:11 am PDT Bertrand Serlet June 27, 1986 2:24:59 pm PDT Willie-Sue Orr, November 7, 1989 1:21:16 pm PST Last changed by Pavel on March 7, 1990 11:50 am PST Michael Plass, January 10, 1992 5:35 pm PST Kenneth A. Pier, July 6, 1992 5:09 pm PDT ΚQ•NewlineDelimiter –(cedarcode) style˜codešœ™Kšœ Οeœ=™HK™(K™,K™/K™3K™+K™)K™—šΟk ˜ Kšœžœ ˜Kšœžœ ˜Kšœžœ˜Kšœžœžœ#˜3Kšœ žœT˜e—K˜KšΠblœžœž˜ Kšžœ˜&Kšžœ˜Kšœž˜K˜Kšžœžœžœ˜K˜KšœžœžœΟc˜5Kšœžœžœ ˜9Kšœ žœžœ ˜/Kšœ žœžœ ˜1Kšœžœžœ ˜;Kšœžœžœ ˜;Kšœžœžœ ˜9Kšœžœžœ  ˜EKšœ ž œ ˜-Kšœ ž œ ˜+Kšœ žœžœ ˜/Kšœžœžœ ˜7Kšœžœžœ ˜0Kšœžœžœ ˜9Kš œžœžœžœžœ ˜DK˜š Οnœžœžœžœžœ˜4Kšœ#žœ˜>K•StartOfExpansion\[base: ROPE, start: INT _ 0, len: INT _ 2147483647, translator: Rope.TranslatorType]šžœžœžœžœ˜)KšžœC˜IK˜K˜—š‘œ$˜7K˜FKšœBžœ˜IKšœ8žœ˜>Kšœ:žœ˜@KšœDžœ˜JKšœQžœ˜WK˜DK˜gK˜BKšœ2žœ˜7Kšœ8žœ˜>Kšœ@žœ˜GK˜=Kšœ@žœ˜EKšœIžœ˜NK˜—K˜K˜8K˜Kšžœ˜—…— D