DIRECTORY AdobeCommon USING [AddSystemToKnownSystems, Handle, LocateSystemInKnownSystems, SysList, Systems, SystemsHandle], AdobeCommonInternal, AdobeOps USING [ToolType], Rope USING [Equal, ROPE], UserProfile USING [ListOfTokens, Number, Token]; AdobeCommonImplC: CEDAR PROGRAM IMPORTS AdobeCommon, AdobeCommonInternal, Rope, UserProfile EXPORTS AdobeCommonInternal = { typedInitialSystem: Rope.ROPE ¬ NIL; SetTypedInitialSystem: PUBLIC PROCEDURE[r: Rope.ROPE] ~ { typedInitialSystem ¬ r; }; ProcessUserDotCM: PUBLIC PROCEDURE [handle: AdobeCommon.Handle] = { systemName: Rope.ROPE ¬ NIL; handle.unboundFieldHeight ¬ GetUBFL[]; handle.tool ¬ handle.oldtool ¬ GetToolName[]; handle.knownSystems ¬ GetKnownSystems[]; IF typedInitialSystem # NIL THEN { systemName ¬ typedInitialSystem; typedInitialSystem ¬ NIL; } ELSE systemName ¬ GetInitialSystem[]; handle.oldsystem ¬ handle.system ¬ AdobeCommon.LocateSystemInKnownSystems[systemName, handle.knownSystems ! AdobeCommonInternal.SystemNotFound => {AdobeCommon.AddSystemToKnownSystems[systemName, handle.knownSystems]; RETRY}]; IF handle.system # LAST[CARD] THEN handle.systemName ¬ handle.knownSystems.system[handle.system]; }; GetUBFL: PROCEDURE RETURNS [len: CARD ¬ 3] = { profileLen: INT ¬ UserProfile.Number[key: "Adobe.InitialUnboundFieldLength", default: 3]; IF profileLen < 2 THEN RETURN[2]; IF profileLen > LAST[CARD] THEN len ¬ LAST[CARD] ELSE len ¬ profileLen; RETURN[len]; }; GetInitialSystem: PROCEDURE RETURNS [system: Rope.ROPE] = { system ¬ UserProfile.Token[key: "Adobe.InitialSystem", default: "SUN of System Software:OSBU North:Xerox"]; RETURN[system]; }; GetToolName: PROCEDURE RETURNS [AdobeOps.ToolType] = { tool: AdobeOps.ToolType ¬ edit; profileTool: Rope.ROPE ¬ UserProfile.Token[key: "Adobe.InitialTool", default: "Edit"]; SELECT TRUE FROM Rope.Equal[profileTool, "edit", FALSE] => tool ¬ edit; Rope.Equal[profileTool, "submit", FALSE] => tool ¬ submit; Rope.Equal[profileTool, "query", FALSE] => tool ¬ query; Rope.Equal[profileTool, "queryList", FALSE] => tool ¬ queryList; Rope.Equal[profileTool, "report", FALSE] => tool ¬ report; Rope.Equal[profileTool, "sort", FALSE] => tool ¬ sort; ENDCASE; RETURN[tool]; }; GetKnownSystems: PROCEDURE RETURNS [knownSystems: AdobeCommon.SystemsHandle ¬ NIL] = { count: CARD ¬ 0; systemsRope: LIST OF Rope.ROPE ¬ UserProfile.ListOfTokens[key: "Adobe.KnownSystems", default: LIST ["SUN of System Software"]]; FOR index: LIST OF Rope.ROPE ¬ systemsRope, index.rest UNTIL index = NIL DO count ¬ count + 1; ENDLOOP; IF count > 0 THEN { knownSystems ¬ NEW[AdobeCommon.Systems ¬ [0, NEW[AdobeCommon.SysList[count]]]]; knownSystems.next ¬ count; count ¬ 0; FOR index: LIST OF Rope.ROPE ¬ systemsRope, index.rest UNTIL index = NIL DO knownSystems.system[count] ¬ index.first; count ¬ count + 1; ENDLOOP; }; }; }. ˆ AdobeCommonImplC.mesa Copyright Σ 1990 b, 1992y Xerox Corporation. All rights reserved. Philip James, June 26, 1991 2:42 pm PDT Κ…–(cedarcode) style•NewlineDelimiter ™šœ™Jšœ Οeœ5™AJ™'—Icode˜šΟk ˜ Kšœ žœ`˜qK˜Kšœ žœ ˜Kšœžœ žœ˜Kšœ žœ˜0—K˜šΟnœžœžœ˜ Kšžœ4˜;Kšžœ˜K˜Kšœžœžœ˜$šŸœžœž œ žœ˜9K˜K˜K˜—šŸœžœž œ!˜CKšœžœžœ˜K˜K˜&K˜-K˜(šžœžœžœ˜#K˜!Kšœžœ˜K˜—šžœ˜K˜ —K˜KšœΪžœ˜βšžœžœžœžœ˜#K˜>—šœ˜K˜—K˜—šŸœž œžœžœ ˜.Kšœ žœK˜ZKšžœžœžœ˜!šžœžœžœžœ˜ Kšœžœžœ˜—˜K˜—Kšžœ˜ šœ˜K˜—K˜—šŸœž œžœžœ˜;K˜kKšžœ ˜šœ˜K˜—K˜—šŸ œž œžœ˜6K˜Kšœžœ@˜Všžœžœž˜Kšœ žœ˜6Kšœ"žœ˜:Kšœ!žœ˜8Kšœ%žœ˜@Kšœ"žœ˜:Kšœ žœ˜6Kšžœ˜—Kšžœ˜ Kšœ˜K˜—šŸœž œžœ,žœ˜WKšœžœ˜Kš œ žœžœžœ@žœ˜K˜š žœžœžœžœžœ žœž˜KK˜Kšžœ˜—šžœ žœ˜Kšœžœžœ˜OK˜K˜ š žœžœžœžœžœ žœž˜KK˜)K˜Kšžœ˜—K˜—Kšœ˜K˜—K˜——…— )