-- PressUserCm.mesa -- Edit: Johnsson; 17-Mar-81 10:48:04 -- Edit: Paul Rovner; 6-Jan-82 19:15:46 -- Edit: Warren Teitelman; 22-Mar-82 22:03:33 -- Edit: MBrown on April 29, 1982 3:34 pm -- Edit: Plass on May 2, 1983 3:45 pm DIRECTORY LongStorage USING [CopyString, Free], Press USING [PutFontInTable], PressUtilities USING [], Rope, UserCredentials, UserProfile; PressUserCm: PROGRAM IMPORTS LongStorage, Press, Rope, UserCredentials, UserProfile EXPORTS PressUtilities = BEGIN SetupFontsForNonProgDisk: PUBLIC PROC [landscape: BOOLEAN _ FALSE] = BEGIN eight: CARDINAL _ 8; ten: CARDINAL _ 10; twelve: CARDINAL _ 12; eighteen: CARDINAL _ 18; twentyfour: CARDINAL _ 24; IF landscape THEN { eight _ 6; ten _ 8; twelve _ 10; eighteen _ 14; twentyfour _ 18}; Press.PutFontInTable[0, "TimesRoman"L, ten]; Press.PutFontInTable[1, "TimesRoman"L, eight]; Press.PutFontInTable[2, "Logo"L, twentyfour]; -- X, E, R, and O only Press.PutFontInTable[3, "Math"L, ten]; Press.PutFontInTable[4, "Hippo"L, ten]; Press.PutFontInTable[5, "TimesRoman"L, twelve]; Press.PutFontInTable[6, "Helvetica"L, ten]; Press.PutFontInTable[7, "Helvetica"L, eight]; Press.PutFontInTable[8, "Gacha"L, ten]; Press.PutFontInTable[9, "Helvetica"L, eighteen]; END; hardcopyUserName: PUBLIC LONG STRING _ NIL; hardcopyHost: PUBLIC LONG STRING _ NIL; hardcopyFont: PUBLIC LONG STRING _ NIL; SetupHardCopyOptions: PUBLIC PROC [] = { SetString[@hardcopyHost, Rope.Flatten[ UserProfile.Token["Hardcopy.PressPrinter", "Clover"]]]; SetString[@hardcopyUserName, Rope.Flatten[ UserProfile.Token["Hardcopy.PrintedBy", UserCredentials.GetUserCredentials[].name]]]; SetString[@hardcopyFont, Rope.Flatten[ UserProfile.Token["Hardcopy.Font", ""]]]; -- Hardcopy.Font token in User.Profile should not contain an embedded blank ... }; SetString: PROC [p: POINTER TO LONG STRING, s: Rope.Text] = { -- Free old contents of p^, if any; then copy s to it LongStorage.Free[p^]; p^ _ NIL; IF s.Length[] = 0 THEN RETURN; p^ _ LongStorage.CopyString[LOOPHOLE[s]] }; END. <<8-Mar-82 11:26:37 W.Teitelman. Changed use of CVExecutive.UserName to UserExec.GetNameAndPassWord[].name 22-Mar-82 22:03:47 W.Teitelman. Changed spelling of GetNameAndPassWord to GetNameAndPassword April 29, 1982 3:33 pm MBrown. Discard SetupFontsForBravo; use UserProfile instead of CmFile for PressPrinter, PrintedBy, Font. November 1, 1982 10:51 am Michael Plass. Removed calls to UserProfile.Open and UserProfile.Close May 2, 1983 3:43 pm Michael Plass. Changed use of UserExec.GetNameAndPassword to UserCredentials.GetUserCredentials>>