DIRECTORY BootSwitch USING [promptForInitializationParameters, Set], Environment USING [PageCount], Heap USING [Create, FreeNode, MakeNode], Message USING [Expand, StringArray], MiscUtilities USING [CalcPagesForBandBuffers, CalcRMPagesForMarker, pagesPerBandBuffer], NetMgtServiceSupport USING [UnRegisterService], NSExec USING [AddClientCommands, BroadcastAsyncMessage, ClientID, ClientStatus, Command, DestroyClient, Error, ExecProc, GetTTY, Handle, localExec, OutputHandle, Predicate, Run, StopMode, SystemFilingSession, UserAServerSA, UserLoggedOn, UserName, WorkingDirectory], NSFile USING [Attributes, AttributesProc, DeleteByName, Error, GetAttributesByName, GetAttributesRecord, Handle, List, noSelections, ReleaseAttributesRecord, Selections, Session], NSName USING [Name, NameRecord, nullNameRecord], NSString USING [EquivalentStrings, FreeString, nullString, String, StringFromMesaString], PaperTypes USING [PaperMMDimension], PrintingTypes USING [Option, RavenBuild], ProductFactoring USING [Enabled], PS USING [bansheeConfigName, d1ConfigName, faxConfigName, fepsConfigName, fx3500ConfigName, ravenConfigName, reservedMemSaved], PSAsyncMsg USING [nullInsertArray, nullMsg, Proc], PSCommand USING [GetPrintServiceActivity, GetPrintServiceStatus, RegisterAsyncMessageProc, Start, Stop, StopPrinting, StopQueuing], PSCommandExtras USING [ServiceState], PSExec USING [GetClientID], PSExecInternal, PSExecMessages USING [Key], PSInit USING [calculateDefaultBBAllocation, calculateDefaultRMAllocation, ExpungePrintService, InitializePrintService, InitializeState, OptionalParms, RequiredParms, unlimitedPrintingCutOffMemSize], PSKMessages USING [DestroyMsgs, GetHandle], PSState USING [CurrentActivity, StateHandle], Runtime USING [VersionMismatch], ServicesError USING [Catch, Caught, SetCatching], ServicesPFOptions USING [psFax, psLowSpeed], ServicesPFOptionsExtrasExtras USING [psFormatting, psLaserCP], SpecialSpace USING [realMemorySize], String USING [AppendLongDecimal], TextInput USING [ChoiceIndex, Confirm, GetChoice, GetLongDecimal, GetTimedYesNo, nilChoice, nilDecimal, nilLongDecimal, nilYesNo], Time USING [Unpack, Unpacked], TTY USING [Handle, Rubout], XFormat USING [Blanks, Handle, NSLine, NSString], XMessage USING [Get, Handle, MsgKey], XString USING [ReaderBody]; PSExecInitImpl: CEDAR PROGRAM IMPORTS BootSwitch, Heap, Message, MiscUtilities, NetMgtServiceSupport, NSExec, NSFile, NSString, ProductFactoring, PS, PSCommand, PSCommandExtras, PSExec, PSExecInternal, PSInit, PSKMessages, Runtime, ServicesError, String, SpecialSpace, TextInput, Time, TTY, XFormat, XMessage EXPORTS PSExecInternal SHARES XString = BEGIN NonNormalInitType: TYPE = {configure, deleteBackingFiles}; execHeap: PUBLIC UNCOUNTED ZONE _ Heap.Create[initial: 4]; --Heap used by PSExec*Impls for miscellaneous strings, etc; exported by PSExecInternal. developmentMode: PUBLIC BOOLEAN _ BootSwitch.Set[BootSwitch.promptForInitializationParameters]; psClientID: NSExec.ClientID _ PSExec.GetClientID[]; execMsgs: XMessage.Handle _ PSKMessages.GetHandle[exec]; Initialize: PUBLIC PROCEDURE [exec: NSExec.Handle, normal: BOOLEAN] = BEGIN nonNormalInit: NonNormalInitType _ configure; engineFakerName: NSString.String = Str["EngineFakerConfig.bcd"L]; runningInTajo: BOOLEAN _ NSString.EquivalentStrings[PS.ravenConfigName, engineFakerName]; outputHandle: XFormat.Handle _ NSExec.OutputHandle[exec]; printingOption, oldPrintingOption: PrintingTypes.Option _ unknown; state: PSState.StateHandle _ NIL; newOptionChosen: BOOLEAN _ FALSE; printServiceName: NSName.Name _ NIL; requiredParms: PSInit.RequiredParms _ [printingOptionParms: unknown[]]; optionalParms: PSInit.OptionalParms _ [printingOptionParms: unknown[]]; DevelopmentModeInit: PROCEDURE = BEGIN defaultVMPagesForDecomposer: LONG CARDINAL _ IF newOptionChosen THEN 6000 ELSE state.decomposerVMPages; defaultDecomposerRMPageLimit: LONG CARDINAL _ IF newOptionChosen THEN PSInit.calculateDefaultRMAllocation ELSE state.decomposerRMPagesForMarker; defaultSpoolWhileMarking: BOOLEAN _ IF newOptionChosen THEN TRUE ELSE state.spoolWhileMarking; defaultBandBufferPages: LONG CARDINAL _ IF newOptionChosen THEN PSInit.calculateDefaultBBAllocation ELSE state.markerRMPagesForBands; defaultDecomposeWhileMarking: BOOLEAN _ IF newOptionChosen THEN TRUE ELSE state.decomposeWhileMarking; IF normal THEN SELECT printingOption FROM bansheeDl => optionalParms _ [ vmPagesForDecomposer: defaultVMPagesForDecomposer, bandBufferPages: defaultBandBufferPages, decomposerRMPageLimit: defaultDecomposerRMPageLimit, deleteIncompatibleFontsandTPs: TRUE, printingOptionParms: bansheeDl[ spoolWhileMarking: defaultSpoolWhileMarking, decomposeWhileMarking: defaultDecomposeWhileMarking] ]; d1 => optionalParms _ [ vmPagesForDecomposer: defaultVMPagesForDecomposer, bandBufferPages: defaultBandBufferPages, decomposerRMPageLimit: defaultDecomposerRMPageLimit, deleteIncompatibleFontsandTPs: TRUE, printingOptionParms: d1[ spoolWhileMarking: defaultSpoolWhileMarking, decomposeWhileMarking: defaultDecomposeWhileMarking] ]; fax295 => optionalParms _ [ vmPagesForDecomposer: defaultVMPagesForDecomposer, bandBufferPages: defaultBandBufferPages, decomposerRMPageLimit: defaultDecomposerRMPageLimit, deleteIncompatibleFontsandTPs: TRUE, printingOptionParms: fax295[ spoolWhileMarking: defaultSpoolWhileMarking, decomposeWhileMarking: defaultDecomposeWhileMarking] ]; fax495 => optionalParms _ [ vmPagesForDecomposer: defaultVMPagesForDecomposer, bandBufferPages: defaultBandBufferPages, decomposerRMPageLimit: defaultDecomposerRMPageLimit, deleteIncompatibleFontsandTPs: TRUE, printingOptionParms: fax495[ spoolWhileMarking: defaultSpoolWhileMarking, decomposeWhileMarking: defaultDecomposeWhileMarking] ]; feps9700 => optionalParms _ [ vmPagesForDecomposer: defaultVMPagesForDecomposer, bandBufferPages: defaultBandBufferPages, decomposerRMPageLimit: defaultDecomposerRMPageLimit, deleteIncompatibleFontsandTPs: TRUE, printingOptionParms: feps9700[]]; fx3500 => optionalParms _ [ vmPagesForDecomposer: defaultVMPagesForDecomposer, bandBufferPages: defaultBandBufferPages, decomposerRMPageLimit: defaultDecomposerRMPageLimit, deleteIncompatibleFontsandTPs: TRUE, printingOptionParms: fx3500[ spoolWhileMarking: defaultSpoolWhileMarking, decomposeWhileMarking: defaultDecomposeWhileMarking] ]; raven => optionalParms _ [ vmPagesForDecomposer: defaultVMPagesForDecomposer, bandBufferPages: defaultBandBufferPages, decomposerRMPageLimit: defaultDecomposerRMPageLimit, deleteIncompatibleFontsandTPs: TRUE, printingOptionParms: raven[ spoolWhileMarking: defaultSpoolWhileMarking, decomposeWhileMarking: defaultDecomposeWhileMarking] ]; ENDCASE => ERROR ELSE BEGIN SELECT printingOption FROM bansheeDl => optionalParms _ GetOptionalBansheeInitParms[ exec, requiredParms, defaultVMPagesForDecomposer, defaultDecomposerRMPageLimit, defaultSpoolWhileMarking, defaultDecomposeWhileMarking, defaultBandBufferPages]; d1 => optionalParms _ GetOptionalD1InitParms[exec, defaultVMPagesForDecomposer, defaultDecomposerRMPageLimit, defaultSpoolWhileMarking, defaultDecomposeWhileMarking, defaultBandBufferPages]; fax295 => optionalParms _ GetOptionalFax295InitParms[exec, defaultVMPagesForDecomposer, defaultDecomposerRMPageLimit, defaultSpoolWhileMarking, defaultDecomposeWhileMarking, defaultBandBufferPages]; fax495 => optionalParms _ GetOptionalFax495InitParms[exec, defaultVMPagesForDecomposer, defaultDecomposerRMPageLimit, defaultSpoolWhileMarking, defaultDecomposeWhileMarking, defaultBandBufferPages]; feps9700 => optionalParms _ GetOptionalFEPS9700InitParms[ exec, defaultVMPagesForDecomposer, defaultDecomposerRMPageLimit, defaultBandBufferPages]; fx3500 => optionalParms _ GetOptionalFX3500InitParms[exec, defaultVMPagesForDecomposer, defaultDecomposerRMPageLimit, defaultSpoolWhileMarking, defaultDecomposeWhileMarking, defaultBandBufferPages]; raven => optionalParms _ GetOptionalRavenInitParms[ exec, requiredParms, defaultVMPagesForDecomposer, defaultDecomposerRMPageLimit, defaultSpoolWhileMarking, defaultDecomposeWhileMarking, defaultBandBufferPages]; ENDCASE => ERROR; END; END; --DevelopmentModeInit IF ~ProductFactoring.Enabled[ServicesPFOptions.psLowSpeed] AND ~ProductFactoring.Enabled[ServicesPFOptions.psFax] AND ~ProductFactoring.Enabled[ServicesPFOptionsExtrasExtras.psFormatting] AND ~ProductFactoring.Enabled[ServicesPFOptionsExtrasExtras.psLaserCP] THEN BEGIN outputHandle.NSLine[M[mCannotRunPS]]; outputHandle.NSLine[M[mPSNotProductFactored]]; ERROR NSExec.Error[cannotInitialize]; END; IF NOT PS.reservedMemSaved THEN BEGIN outputHandle.NSLine[M[mCannotRunPS]]; outputHandle.NSLine[M[mMemoryNotAvailable]]; outputHandle.NSLine[M[mMeans]]; outputHandle.Blanks[8]; outputHandle.NSLine[M[mDeactivated]]; outputHandle.Blanks[8]; outputHandle.NSLine[M[mActivate]]; outputHandle.Blanks[8]; outputHandle.NSLine[M[mMemoryTaken]]; outputHandle.Blanks[8]; outputHandle.NSLine[M[mRunBeforeOtherServices]]; ERROR NSExec.Error[cannotInitialize]; END; IF NOT normal THEN BEGIN nonNormalInit _ GetNonNormalInitType[exec]; IF nonNormalInit = deleteBackingFiles THEN BEGIN outputHandle.Blanks[8]; outputHandle.NSString[M[mDeletingFiles]]; PSInit.ExpungePrintService[deleteFonts: FALSE]; outputHandle.NSString[M[mFloppyDone]]; END; END; PSInit.InitializeState[]; state _ PSCommand.GetPrintServiceStatus[]; oldPrintingOption _ state.option; IF normal AND developmentMode THEN normal _ TextInput.GetTimedYesNo[ tty: NSExec.GetTTY[exec], prompt: M[mRetainParameters], timeAllotted: 10 --seconds--, valueIfTimedOut: yes] = yes; DeleteObsoleteBcds[workingDir: NSExec.WorkingDirectory[], session: NSExec.SystemFilingSession[]]; printingOption _ GetPrintingOption[exec, normal, state, runningInTajo]; IF NOT runningInTajo THEN IF NOT LoadAndRunPrintingOptionBcd[exec, printingOption] THEN ERROR NSExec.Error[cannotInitialize]; newOptionChosen _ printingOption # oldPrintingOption; requiredParms _ SELECT printingOption FROM bansheeDl => GetRequiredBansheeInitParms[exec, normal, state, newOptionChosen], d1 => [printingOptionParms: d1[]], --no required parms for d1 fax295 => GetRequiredFax295InitParms[exec, normal, state, newOptionChosen], fax495 => GetRequiredFax495InitParms[exec, normal, state, newOptionChosen], feps9700 => [printingOptionParms: feps9700[]], --no required parms for feps9700 fx3500 => [printingOptionParms: fx3500[]], --no required parms for fx3500 ENDCASE => GetRequiredRavenInitParms[exec, normal, state, newOptionChosen]; IF newOptionChosen THEN requiredParms.newParametersSpecified _ TRUE; IF developmentMode THEN DevelopmentModeInit[]; --this proc sets the optional parameters [, printServiceName] _ PSExecInternal.RegisterServiceAtClearinghouse[exec]; PSCommand.RegisterAsyncMessageProc[PutAsyncMessage]; --This is called before calling Initialize, since Initialize may generate some asynchronous messages. PSInit.InitializePrintService[normal, printServiceName, requiredParms, optionalParms]; RegisterCommands[]; IF newOptionChosen THEN SetInitialState[oldOption: oldPrintingOption, newOption: printingOption]; IF NOT normal THEN StopQueuingAndPrintingAbnormal[exec]; Start[exec]; --Call start proc. END; --Initialize Start: PUBLIC NSExec.ExecProc = {PSCommand.Start[]}; Stop: PUBLIC PROCEDURE [exec: NSExec.Handle, stopMode: NSExec.StopMode] = BEGIN ENABLE BEGIN TTY.Rubout => GOTO Exit; NSExec.Error => IF type = invalidExec THEN GOTO Exit; END; IF stopMode = quiesce AND RepairMode[] THEN IF TextInput.GetTimedYesNo [ tty: NSExec.GetTTY[exec], prompt: M[mPrintServerinRepairMode], timeAllotted: 60--seconds--, valueIfTimedOut: no] = no THEN RETURN; PSCommand.Stop[]; EXITS Exit => NULL; END; --Stop Expunge: PUBLIC NSExec.ExecProc = BEGIN servicesWorkDir: NSFile.Handle _ NSExec.WorkingDirectory[]; servicesSession: NSFile.Session _ NSExec.SystemFilingSession[]; IF TextInput.Confirm[NSExec.GetTTY[exec], M[mExpungeWarning]] THEN BEGIN [] _ PSExecInternal.DeleteServiceFromClearinghouse[exec]; PSInit.ExpungePrintService[deleteFonts: TRUE]; PSKMessages.DestroyMsgs[]; NetMgtServiceSupport.UnRegisterService[psClientID]; NSExec.DestroyClient[psClientID]; END ELSE ERROR NSExec.Error[cannotExpunge]; END; --Expunge Name: PUBLIC PROCEDURE [nameProc: PROCEDURE [clientName: NSString.String]] = BEGIN IF PSExecInternal.printServiceName # NIL THEN nameProc[PSExecInternal.printServiceName.local] ELSE nameProc[M[mNull]]; END; --Name Status: PUBLIC PROCEDURE [ statusProc: PROCEDURE [status: NSExec.ClientStatus, comment: NSString.String]] = BEGIN statusProc[status: SELECT PSCommandExtras.ServiceState[] FROM starting => starting, stopped => stopped, stopping => stopping, ENDCASE => started, comment: NSString.nullString]; END; --Status PrintServiceCommand: PUBLIC NSExec.ExecProc = BEGIN --called whenever "Print Service" command is entered END; --PrintServiceCommand GetNonNormalInitType: PROCEDURE [exec: NSExec.Handle] RETURNS [type: NonNormalInitType] = BEGIN DO type _ PromptForNonNormalInitType[exec]; SELECT type FROM configure => EXIT; deleteBackingFiles => IF TextInput.Confirm[ NSExec.GetTTY[exec], M[mConfirmDeleteBackingFiles]] THEN EXIT; ENDCASE; ENDLOOP; END; -- GetNonNormalInitType GetPrintingOption: PROCEDURE [exec: NSExec.Handle, normal: BOOLEAN, state: PSState.StateHandle, runningInTajo: BOOLEAN] RETURNS [option: PrintingTypes.Option] = BEGIN OPEN S: NSString; ENABLE {TTY.Rubout => RETRY}; outputHandle: XFormat.Handle _ NSExec.OutputHandle[exec]; optionBcdCount: CARDINAL _ 0; --set to number of printing option bcds installed on working directory printingOptionCount: CARDINAL _ 0; --set to number of options currently available (bcd installed and product factored) availablePrintingOptions: LONG DESCRIPTOR FOR ARRAY OF PrintingTypes.Option _ DESCRIPTOR[NIL, 0]; --array of options which are installed and product factored pfEnabled: ARRAY PrintingTypes.Option OF BOOLEAN _ ALL[FALSE]; --each options may or may not be product factoring enabled bcdInstalled: ARRAY PrintingTypes.Option OF BOOLEAN _ ALL[FALSE]; --each option may or may not have its bcd installed FindPrintingOptionBcds: PROCEDURE = BEGIN selections: NSFile.Selections _ NSFile.noSelections; CompareBcdNames: NSFile.AttributesProc = BEGIN IF NSString.EquivalentStrings[attributes.name, PS.ravenConfigName] THEN {bcdInstalled[raven] _ TRUE; optionBcdCount _ optionBcdCount + 1} ELSE IF NSString.EquivalentStrings[attributes.name, PS.bansheeConfigName] THEN {bcdInstalled[bansheeDl] _ TRUE; optionBcdCount _ optionBcdCount + 1} ELSE IF NSString.EquivalentStrings[attributes.name, PS.faxConfigName] THEN {bcdInstalled[fax495] _ TRUE; optionBcdCount _ optionBcdCount + 1} ELSE IF NSString.EquivalentStrings[attributes.name, PS.fepsConfigName] THEN {bcdInstalled[feps9700] _ TRUE; optionBcdCount _ optionBcdCount + 1} ELSE IF NSString.EquivalentStrings[attributes.name, PS.fx3500ConfigName] THEN {bcdInstalled[fx3500] _ TRUE; optionBcdCount _ optionBcdCount + 1} ELSE IF NSString.EquivalentStrings[attributes.name, PS.d1ConfigName] THEN {bcdInstalled[d1] _ TRUE; optionBcdCount _ optionBcdCount + 1}; END; IF runningInTajo THEN BEGIN --If we are running in Tajo, we don't bcdInstalled _ ALL[TRUE]; optionBcdCount _ 6; --UPDATE this number when adding options! END ELSE BEGIN selections.interpreted[name] _ TRUE; NSFile.List[ directory: NSExec.WorkingDirectory[], proc: CompareBcdNames, selections: selections, session: NSExec.SystemFilingSession[]]; END; END; -- of FindPrintingOptionBcds FillProductFactoringArray: PROCEDURE = BEGIN pfEnabled[d1] _ pfEnabled[fx3500] _ pfEnabled[raven] _ ProductFactoring.Enabled[ServicesPFOptions.psLowSpeed]; pfEnabled[bansheeDl] _ ProductFactoring.Enabled[ ServicesPFOptionsExtrasExtras.psLaserCP]; pfEnabled[fax495] _ ProductFactoring.Enabled[ServicesPFOptions.psFax]; pfEnabled[feps9700] _ ProductFactoring.Enabled[ ServicesPFOptionsExtrasExtras.psFormatting]; END; -- of FillProductFactoringArray FillPrintingOptionArray: PROCEDURE = BEGIN optionUnused: PACKED ARRAY PrintingTypes.Option OF BOOLEAN _ ALL[TRUE]; --array element for a given option becomes false when option is put into the array availablePrintingOptions _ DESCRIPTOR[Heap.MakeNode[ execHeap, SIZE[PrintingTypes.Option] * printingOptionCount], printingOptionCount]; FOR i: CARDINAL IN [0..printingOptionCount) DO SELECT TRUE FROM pfEnabled[raven] AND bcdInstalled[raven] AND optionUnused[raven] => availablePrintingOptions[i] _ raven; pfEnabled[bansheeDl] AND bcdInstalled[bansheeDl] AND optionUnused[bansheeDl] => availablePrintingOptions[i] _ bansheeDl; pfEnabled[fx3500] AND bcdInstalled[fx3500] AND optionUnused[fx3500] => availablePrintingOptions[i] _ fx3500; pfEnabled[d1] AND bcdInstalled[d1] AND optionUnused[d1] => availablePrintingOptions[i] _ d1; pfEnabled[fax295] AND bcdInstalled[fax295] AND optionUnused[fax295] => availablePrintingOptions[i] _ fax295; pfEnabled[fax495] AND bcdInstalled[fax495] AND optionUnused[fax495] => availablePrintingOptions[i] _ fax495; pfEnabled[feps9700] AND bcdInstalled[feps9700] AND optionUnused[feps9700] => availablePrintingOptions[i] _ feps9700; ENDCASE => ERROR; --something's very wrong optionUnused[availablePrintingOptions[i]] _ FALSE; ENDLOOP; END; -- of FillPrintingOptionArray BEGIN FillProductFactoringArray[]; --see which options are product factored FindPrintingOptionBcds[]; --see which options are installed IF optionBcdCount = 0 THEN BEGIN outputHandle.NSLine[M[mCannotRunPS]]; outputHandle.NSLine[M[mNoPrintingOptionSoftware]]; GOTO cannotInitialize; END; FOR option: PrintingTypes.Option IN PrintingTypes.Option DO IF pfEnabled[option] AND bcdInstalled[option] THEN printingOptionCount _ printingOptionCount + 1; ENDLOOP; IF printingOptionCount = 0 THEN BEGIN outputHandle.NSLine[M[mCannotRunPS]]; outputHandle.NSLine[M[mOptionsNotProductFactored]]; GOTO cannotInitialize; END; FillPrintingOptionArray[]; --Stores printing options currently enabled into availablePrintingOptions array. IF NOT normal OR state.option = unknown OR NOT pfEnabled[state.option] OR NOT bcdInstalled[state.option] THEN option _ PromptForPrintingOption[ exec: exec, currentOption: state.option, optionCount: printingOptionCount, optionChoices: availablePrintingOptions ] ELSE option _ state.option; Heap.FreeNode[execHeap, BASE[availablePrintingOptions]]; EXITS cannotInitialize => BEGIN Heap.FreeNode[execHeap, BASE[availablePrintingOptions]]; ERROR NSExec.Error[cannotInitialize]; END; END; END; --GetPrintingOption GetRequiredBansheeInitParms: PROCEDURE [exec: NSExec.Handle, normal: BOOLEAN, state: PSState.StateHandle, newOptionChosen: BOOLEAN] RETURNS [bansheeParms: bansheeDl PSInit.RequiredParms] = BEGIN bansheeParms.invertingPaperTrayAttached _ FALSE; --not currently used SELECT TRUE FROM newOptionChosen => BEGIN bansheeParms.enableUnlimitedPrinting _ IF SpecialSpace.realMemorySize > PSInit.unlimitedPrintingCutOffMemSize THEN PromptAboutUnlimitedPrinting[exec: exec, useDefault: FALSE] ELSE FALSE; bansheeParms.newParametersSpecified _ TRUE; END; NOT normal => WITH s: state SELECT FROM bansheeDl => BEGIN bansheeParms.enableUnlimitedPrinting _ IF SpecialSpace.realMemorySize > PSInit.unlimitedPrintingCutOffMemSize THEN PromptAboutUnlimitedPrinting[ exec: exec, useDefault: TRUE, defaultToTrue: s.enableUnlimitedPrinting] ELSE FALSE; bansheeParms.newParametersSpecified _ TRUE; --set true whether the version really changed or not END; ENDCASE => ERROR; ENDCASE => WITH s: state SELECT FROM bansheeDl => IF SpecialSpace.realMemorySize > PSInit.unlimitedPrintingCutOffMemSize THEN bansheeParms.enableUnlimitedPrinting _ s.enableUnlimitedPrinting ELSE BEGIN IF s.enableUnlimitedPrinting THEN bansheeParms.newParametersSpecified _ TRUE; bansheeParms.enableUnlimitedPrinting _ FALSE; END; ENDCASE => ERROR; END; --GetRequiredBansheeInitParms GetRequiredFax295InitParms: PROCEDURE [exec: NSExec.Handle, normal: BOOLEAN, state: PSState.StateHandle, newOptionChosen: BOOLEAN] RETURNS [fax295Parms: fax295 PSInit.RequiredParms] = BEGIN SELECT TRUE FROM newOptionChosen => BEGIN fax295Parms.paperWidth _ PromptForFaxPaperWidth[ exec: exec, useDefault: FALSE]; fax295Parms.newParametersSpecified _ TRUE; END; NOT normal => WITH s: state SELECT FROM fax295 => BEGIN fax295Parms.paperWidth _ PromptForFaxPaperWidth[ exec: exec, useDefault: TRUE, defaultWidth: s.paperWidth]; fax295Parms.newParametersSpecified _ TRUE; --set true whether the version really changed or not END; ENDCASE => ERROR; ENDCASE => WITH s: state SELECT FROM fax295 => fax295Parms.paperWidth _ s.paperWidth; --keep same value as before ENDCASE => ERROR; END; --GetRequiredFax295InitParms GetRequiredFax495InitParms: PROCEDURE [exec: NSExec.Handle, normal: BOOLEAN, state: PSState.StateHandle, newOptionChosen: BOOLEAN] RETURNS [fax495Parms: fax495 PSInit.RequiredParms] = BEGIN SELECT TRUE FROM newOptionChosen => BEGIN fax495Parms.paperWidth _ PromptForFaxPaperWidth[ exec: exec, useDefault: FALSE]; fax495Parms.supportFineResolution _ PromptForFaxTransmissionResolution[ exec: exec, useDefault: FALSE]; fax495Parms.newParametersSpecified _ TRUE; END; NOT normal => WITH s: state SELECT FROM fax495 => BEGIN fax495Parms.paperWidth _ PromptForFaxPaperWidth[ exec: exec, useDefault: TRUE, defaultWidth: s.paperWidth]; fax495Parms.supportFineResolution _ PromptForFaxTransmissionResolution[ exec: exec, useDefault: TRUE, defaultToFine: s.fineResolutionSupported]; fax495Parms.newParametersSpecified _ TRUE; --set true whether the version really changed or not END; ENDCASE => ERROR; ENDCASE => WITH s: state SELECT FROM fax495 => BEGIN --keep same values as before fax495Parms.paperWidth _ s.paperWidth; fax495Parms.supportFineResolution _ s.fineResolutionSupported; END; ENDCASE => ERROR; END; --GetRequiredFax295InitParms GetRequiredRavenInitParms: PROCEDURE [exec: NSExec.Handle, normal: BOOLEAN, state: PSState.StateHandle, newOptionChosen: BOOLEAN] RETURNS [ravenParms: raven PSInit.RequiredParms] = BEGIN SELECT TRUE FROM newOptionChosen => BEGIN ravenParms.version _ PromptForRavenVersion[exec: exec, useDefault: FALSE]; ravenParms.enableUnlimitedPrinting _ IF SpecialSpace.realMemorySize > PSInit.unlimitedPrintingCutOffMemSize THEN PromptAboutUnlimitedPrinting[exec: exec, useDefault: FALSE] ELSE FALSE; ravenParms.newParametersSpecified _ TRUE; END; NOT normal => WITH s: state SELECT FROM raven => BEGIN ravenParms.version _ PromptForRavenVersion[exec: exec, useDefault: TRUE, defaultVersion: s.engineBuild]; ravenParms.enableUnlimitedPrinting _ IF SpecialSpace.realMemorySize > PSInit.unlimitedPrintingCutOffMemSize THEN PromptAboutUnlimitedPrinting[ exec: exec, useDefault: TRUE, defaultToTrue: s.enableUnlimitedPrinting] ELSE FALSE; ravenParms.newParametersSpecified _ TRUE; --set true whether the version really changed or not END; ENDCASE => ERROR; ENDCASE => WITH s: state SELECT FROM raven => BEGIN --keep same values as before ravenParms.version _ s.engineBuild; IF SpecialSpace.realMemorySize > PSInit.unlimitedPrintingCutOffMemSize THEN ravenParms.enableUnlimitedPrinting _ s.enableUnlimitedPrinting ELSE BEGIN IF s.enableUnlimitedPrinting THEN ravenParms.newParametersSpecified _ TRUE; ravenParms.enableUnlimitedPrinting _ FALSE; END; END; ENDCASE => ERROR; END; --GetRequiredRavenInitParms GetOptionalBansheeInitParms: PROCEDURE [exec: NSExec.Handle, requiredParms: PSInit.RequiredParms, defaultVMPagesForDecomposer: LONG CARDINAL, defaultDecomposerRMPageLimit: LONG CARDINAL, defaultSpoolWhileMarking: BOOLEAN, defaultDecomposeWhileMarking: BOOLEAN, defaultBBPages: LONG CARDINAL] RETURNS [bansheeParms: bansheeDl PSInit.OptionalParms] = BEGIN normalBBPages, normalRMPageLimit: LONG CARDINAL _ 0; bansheeParms.vmPagesForDecomposer _ PromptForVMPagesForDecomposer[ exec: exec, useDefault: TRUE, defaultValue: defaultVMPagesForDecomposer]; bansheeParms.deleteIncompatibleFontsandTPs _ PromptWithFontDeletionQuestion[ exec: exec, useDefault: TRUE, defaultToTrue: TRUE]; bansheeParms.spoolWhileMarking _ PromptForSpoolWhileMarking[ exec: exec, useDefault: TRUE, defaultToTrue: defaultSpoolWhileMarking]; bansheeParms.decomposeWhileMarking _ PromptForDecomposeWhileMarking[ exec: exec, useDefault: TRUE, defaultToTrue: defaultDecomposeWhileMarking]; WITH r: requiredParms SELECT FROM bansheeDl => BEGIN normalBBPages _ MiscUtilities.CalcPagesForBandBuffers[ bansheeDl, r.enableUnlimitedPrinting]; bansheeParms.bandBufferPages _ PromptForBandBufferPages[ exec: exec, useDefault: TRUE, normalValue: normalBBPages, minValue: 3, maxValue: 7, defaultValue: IF defaultBBPages = PSInit.calculateDefaultBBAllocation THEN normalBBPages ELSE defaultBBPages]; END; ENDCASE => ERROR; normalRMPageLimit _ MiscUtilities.CalcRMPagesForMarker[bansheeParms.bandBufferPages]; bansheeParms.decomposerRMPageLimit _ PromptForRMAllocation[ exec: exec, useDefault: TRUE, normalValue: normalRMPageLimit, defaultValue: IF defaultDecomposerRMPageLimit = PSInit.calculateDefaultRMAllocation THEN normalRMPageLimit ELSE defaultDecomposerRMPageLimit ]; END; --GetOptionalBansheeInitParms GetOptionalD1InitParms: PROCEDURE [exec: NSExec.Handle, defaultVMPagesForDecomposer: LONG CARDINAL, defaultDecomposerRMPageLimit: LONG CARDINAL, defaultSpoolWhileMarking: BOOLEAN, defaultDecomposeWhileMarking: BOOLEAN, defaultBBPages: LONG CARDINAL] RETURNS [d1Parms: d1 PSInit.OptionalParms] = BEGIN normalBBPages, normalRMPageLimit: LONG CARDINAL _ 0; d1Parms.vmPagesForDecomposer _ PromptForVMPagesForDecomposer[ exec: exec, useDefault: TRUE, defaultValue: defaultVMPagesForDecomposer]; d1Parms.deleteIncompatibleFontsandTPs _ PromptWithFontDeletionQuestion[ exec: exec, useDefault: TRUE, defaultToTrue: TRUE]; d1Parms.spoolWhileMarking _ PromptForSpoolWhileMarking[ exec: exec, useDefault: TRUE, defaultToTrue: defaultSpoolWhileMarking]; d1Parms.decomposeWhileMarking _ PromptForDecomposeWhileMarking[ exec: exec, useDefault: TRUE, defaultToTrue: defaultDecomposeWhileMarking]; normalBBPages _ MiscUtilities.CalcPagesForBandBuffers[d1]; d1Parms.bandBufferPages _ PromptForBandBufferPages[ exec: exec, useDefault: TRUE, normalValue: normalBBPages, minValue: 3, maxValue: 8, defaultValue: IF defaultBBPages = PSInit.calculateDefaultBBAllocation THEN normalBBPages ELSE defaultBBPages]; normalRMPageLimit _ MiscUtilities.CalcRMPagesForMarker[d1Parms.bandBufferPages]; d1Parms.decomposerRMPageLimit _ PromptForRMAllocation[ exec: exec, useDefault: TRUE, normalValue: normalRMPageLimit, defaultValue: IF defaultDecomposerRMPageLimit = PSInit.calculateDefaultRMAllocation THEN normalRMPageLimit ELSE defaultDecomposerRMPageLimit ]; END; --GetOptionalD1InitParms GetOptionalFax295InitParms: PROCEDURE [exec: NSExec.Handle, defaultVMPagesForDecomposer: LONG CARDINAL, defaultDecomposerRMPageLimit: LONG CARDINAL, defaultSpoolWhileMarking: BOOLEAN, defaultDecomposeWhileMarking: BOOLEAN, defaultBBPages: LONG CARDINAL] RETURNS [fax295Parms: fax295 PSInit.OptionalParms] = BEGIN normalBBPages, normalRMPageLimit: LONG CARDINAL _ 0; fax295Parms.vmPagesForDecomposer _ PromptForVMPagesForDecomposer[ exec: exec, useDefault: TRUE, defaultValue: defaultVMPagesForDecomposer]; fax295Parms.deleteIncompatibleFontsandTPs _ PromptWithFontDeletionQuestion[ exec: exec, useDefault: TRUE, defaultToTrue: TRUE]; fax295Parms.spoolWhileMarking _ PromptForSpoolWhileMarking[ exec: exec, useDefault: TRUE, defaultToTrue: defaultSpoolWhileMarking]; fax295Parms.decomposeWhileMarking _ PromptForDecomposeWhileMarking[ exec: exec, useDefault: TRUE, defaultToTrue: defaultDecomposeWhileMarking]; normalBBPages _ MiscUtilities.CalcPagesForBandBuffers[fax295]; fax295Parms.bandBufferPages _ PromptForBandBufferPages[ exec: exec, useDefault: TRUE, normalValue: normalBBPages, minValue: 3, maxValue: 7, defaultValue: IF defaultBBPages = PSInit.calculateDefaultBBAllocation THEN normalBBPages ELSE defaultBBPages]; normalRMPageLimit _ MiscUtilities.CalcRMPagesForMarker[fax295Parms.bandBufferPages]; fax295Parms.decomposerRMPageLimit _ PromptForRMAllocation[ exec: exec, useDefault: TRUE, normalValue: normalRMPageLimit, defaultValue: IF defaultDecomposerRMPageLimit = PSInit.calculateDefaultRMAllocation THEN normalRMPageLimit ELSE defaultDecomposerRMPageLimit]; END; --GetOptionalFax295InitParms GetOptionalFax495InitParms: PROCEDURE [exec: NSExec.Handle, defaultVMPagesForDecomposer: LONG CARDINAL, defaultDecomposerRMPageLimit: LONG CARDINAL, defaultSpoolWhileMarking: BOOLEAN, defaultDecomposeWhileMarking: BOOLEAN, defaultBBPages: LONG CARDINAL] RETURNS [fax495Parms: fax495 PSInit.OptionalParms] = BEGIN normalBBPages, normalRMPageLimit: LONG CARDINAL _ 0; fax495Parms.vmPagesForDecomposer _ PromptForVMPagesForDecomposer[ exec: exec, useDefault: TRUE, defaultValue: defaultVMPagesForDecomposer]; fax495Parms.deleteIncompatibleFontsandTPs _ PromptWithFontDeletionQuestion[ exec: exec, useDefault: TRUE, defaultToTrue: TRUE]; fax495Parms.spoolWhileMarking _ PromptForSpoolWhileMarking[ exec: exec, useDefault: TRUE, defaultToTrue: defaultSpoolWhileMarking]; fax495Parms.decomposeWhileMarking _ PromptForDecomposeWhileMarking[ exec: exec, useDefault: TRUE, defaultToTrue: defaultDecomposeWhileMarking]; normalBBPages _ MiscUtilities.CalcPagesForBandBuffers[fax495]; fax495Parms.bandBufferPages _ PromptForBandBufferPages[ exec: exec, useDefault: TRUE, normalValue: normalBBPages, minValue: 3, maxValue: 7, defaultValue: IF defaultBBPages = PSInit.calculateDefaultBBAllocation THEN normalBBPages ELSE defaultBBPages]; normalRMPageLimit _ MiscUtilities.CalcRMPagesForMarker[fax495Parms.bandBufferPages]; fax495Parms.decomposerRMPageLimit _ PromptForRMAllocation[ exec: exec, useDefault: TRUE, normalValue: normalRMPageLimit, defaultValue: IF defaultDecomposerRMPageLimit = PSInit.calculateDefaultRMAllocation THEN normalRMPageLimit ELSE defaultDecomposerRMPageLimit]; END; --GetOptionalFax495InitParms GetOptionalFEPS9700InitParms: PROCEDURE [exec: NSExec.Handle, defaultVMPagesForDecomposer: LONG CARDINAL, defaultDecomposerRMPageLimit: LONG CARDINAL, defaultBBPages: LONG CARDINAL] RETURNS [feps9700Parms: feps9700 PSInit.OptionalParms] = BEGIN normalRMPageLimit: LONG CARDINAL _ 0; feps9700Parms.vmPagesForDecomposer _ PromptForVMPagesForDecomposer[ exec: exec, useDefault: TRUE, defaultValue: defaultVMPagesForDecomposer]; feps9700Parms.deleteIncompatibleFontsandTPs _ PromptWithFontDeletionQuestion[ exec: exec, useDefault: TRUE, defaultToTrue: TRUE]; feps9700Parms.bandBufferPages _ MiscUtilities.CalcPagesForBandBuffers[feps9700]; normalRMPageLimit _ MiscUtilities.CalcRMPagesForMarker[feps9700Parms.bandBufferPages]; feps9700Parms.decomposerRMPageLimit _ PromptForRMAllocation[ exec: exec, useDefault: TRUE, normalValue: normalRMPageLimit, defaultValue: IF defaultDecomposerRMPageLimit = PSInit.calculateDefaultRMAllocation THEN normalRMPageLimit ELSE defaultDecomposerRMPageLimit]; END; --GetOptionalFEPS9700Parms GetOptionalFX3500InitParms: PROCEDURE [exec: NSExec.Handle, defaultVMPagesForDecomposer: LONG CARDINAL, defaultDecomposerRMPageLimit: LONG CARDINAL, defaultSpoolWhileMarking: BOOLEAN, defaultDecomposeWhileMarking: BOOLEAN, defaultBBPages: LONG CARDINAL] RETURNS [fx3500Parms: fx3500 PSInit.OptionalParms] = BEGIN normalBBPages, normalRMPageLimit: LONG CARDINAL _ 0; fx3500Parms.vmPagesForDecomposer _ PromptForVMPagesForDecomposer[ exec: exec, useDefault: TRUE, defaultValue: defaultVMPagesForDecomposer]; fx3500Parms.deleteIncompatibleFontsandTPs _ PromptWithFontDeletionQuestion[ exec: exec, useDefault: TRUE, defaultToTrue: TRUE]; fx3500Parms.spoolWhileMarking _ PromptForSpoolWhileMarking[ exec: exec, useDefault: TRUE, defaultToTrue: defaultSpoolWhileMarking]; fx3500Parms.decomposeWhileMarking _ PromptForDecomposeWhileMarking[ exec: exec, useDefault: TRUE, defaultToTrue: defaultDecomposeWhileMarking]; normalBBPages _ MiscUtilities.CalcPagesForBandBuffers[fx3500]; fx3500Parms.bandBufferPages _ PromptForBandBufferPages[ exec: exec, useDefault: TRUE, normalValue: normalBBPages, minValue: 3, maxValue: 7, defaultValue: IF defaultBBPages = PSInit.calculateDefaultBBAllocation THEN normalBBPages ELSE defaultBBPages]; normalRMPageLimit _ MiscUtilities.CalcRMPagesForMarker[fx3500Parms.bandBufferPages]; fx3500Parms.decomposerRMPageLimit _ PromptForRMAllocation[ exec: exec, useDefault: TRUE, normalValue: normalRMPageLimit, defaultValue: IF defaultDecomposerRMPageLimit = PSInit.calculateDefaultRMAllocation THEN normalRMPageLimit ELSE defaultDecomposerRMPageLimit]; END; --GetOptionalFX3500InitParms GetOptionalRavenInitParms: PROCEDURE [exec: NSExec.Handle, requiredParms: PSInit.RequiredParms, defaultVMPagesForDecomposer: LONG CARDINAL, defaultDecomposerRMPageLimit: LONG CARDINAL, defaultSpoolWhileMarking: BOOLEAN, defaultDecomposeWhileMarking: BOOLEAN, defaultBBPages: LONG CARDINAL] RETURNS [ravenParms: raven PSInit.OptionalParms] = BEGIN normalBBPages, normalRMPageLimit: LONG CARDINAL _ 0; ravenParms.vmPagesForDecomposer _ PromptForVMPagesForDecomposer[ exec: exec, useDefault: TRUE, defaultValue: defaultVMPagesForDecomposer]; ravenParms.deleteIncompatibleFontsandTPs _ PromptWithFontDeletionQuestion[ exec: exec, useDefault: TRUE, defaultToTrue: TRUE]; ravenParms.spoolWhileMarking _ PromptForSpoolWhileMarking[ exec: exec, useDefault: TRUE, defaultToTrue: defaultSpoolWhileMarking]; ravenParms.decomposeWhileMarking _ PromptForDecomposeWhileMarking[ exec: exec, useDefault: TRUE, defaultToTrue: defaultDecomposeWhileMarking]; WITH r: requiredParms SELECT FROM raven => BEGIN normalBBPages _ MiscUtilities.CalcPagesForBandBuffers[ raven, r.enableUnlimitedPrinting]; ravenParms.bandBufferPages _ PromptForBandBufferPages[ exec: exec, useDefault: TRUE, normalValue: normalBBPages, minValue: 3, maxValue: 7, defaultValue: IF defaultBBPages = PSInit.calculateDefaultBBAllocation THEN normalBBPages ELSE defaultBBPages]; END; ENDCASE => ERROR; normalRMPageLimit _ MiscUtilities.CalcRMPagesForMarker[ravenParms.bandBufferPages]; ravenParms.decomposerRMPageLimit _ PromptForRMAllocation[ exec: exec, useDefault: TRUE, normalValue: normalRMPageLimit, defaultValue: IF defaultDecomposerRMPageLimit = PSInit.calculateDefaultRMAllocation THEN normalRMPageLimit ELSE defaultDecomposerRMPageLimit]; END; --GetOptionalRavenInitParms DeleteObsoleteBcds: PROCEDURE [ workingDir: NSFile.Handle, session: NSFile.Session] = BEGIN oldEngineConfigName: NSString.String = Str["PSEngineConfig.bcd"L]; NSFile.DeleteByName[workingDir, oldEngineConfigName, session ! NSFile.Error => GOTO NoEngineConfig]; BEGIN rs232CCommonName: NSString.String = Str["RS232CCommon.bcd"L]; selections: NSFile.Selections _ NSFile.noSelections; attribute: NSFile.Attributes _ NSFile.GetAttributesRecord[]; fileDate: Time.Unpacked; BEGIN selections.interpreted[createdOn] _ TRUE; NSFile.GetAttributesByName[workingDir, rs232CCommonName, selections, attribute, session ! NSFile.Error => GOTO NoRS232CCommon]; fileDate _ Time.Unpack[attribute.createdOn]; IF fileDate.year = 1984 THEN NSFile.DeleteByName[workingDir, rs232CCommonName, session]; NSFile.ReleaseAttributesRecord[attribute]; EXITS NoRS232CCommon => NSFile.ReleaseAttributesRecord[attribute]; END; END; EXITS NoEngineConfig => NULL; END; -- of DeleteObsoleteBcds LoadAndRunPrintingOptionBcd: PROCEDURE [ exec: NSExec.Handle, option: PrintingTypes.Option] RETURNS [success: BOOLEAN] = BEGIN runFailed: BOOLEAN _ FALSE; bcdToRun: NSString.String _ SELECT option FROM bansheeDl => PS.bansheeConfigName, d1 => PS.d1ConfigName, fax295, fax495 => PS.faxConfigName, feps9700 => PS.fepsConfigName, fx3500 => PS.fx3500ConfigName, ENDCASE => PS.ravenConfigName; VersionMismatchError: PROCEDURE RETURNS [resume: BOOLEAN _ FALSE] = BEGIN stringArray: ARRAY [0..1) OF NSString.String _ [bcdToRun]; freeThisString: NSString.String _ Message.Expand[ M[mContinueToRun], DESCRIPTOR[stringArray], execHeap]; resume _ TextInput.Confirm[NSExec.GetTTY[exec], freeThisString]; NSString.FreeString[execHeap, freeThisString]; IF NOT resume THEN BEGIN outputHandle: XFormat.Handle _ NSExec.OutputHandle[exec]; stringArray[0] _ bcdToRun; freeThisString _ Message.Expand[ M[mNotRun], DESCRIPTOR[stringArray], execHeap]; outputHandle.Blanks[8]; outputHandle.NSLine[freeThisString]; NSString.FreeString[execHeap, freeThisString]; runFailed _ TRUE; END; END; --VersionMismatchError Run: PROCEDURE = BEGIN resume: BOOLEAN _ FALSE; ServicesError.SetCatching[on: TRUE]; NSExec.Run[bcdToRun, exec, --codeLinks: -- TRUE! ServicesError.Caught => { IF (resume _ VersionMismatchError[]) THEN { ServicesError.SetCatching[on: FALSE]; RETRY} ELSE CONTINUE}; Runtime.VersionMismatch => IF resume THEN { resume _ FALSE; -- allows subsequent version mismatches to be flagged to the user ServicesError.SetCatching[on: TRUE]; RESUME} ELSE REJECT]; END; -- Run ServicesError.Catch[Run, LOOPHOLE[exec]]; RETURN [success _ NOT runFailed]; END; -- of LoadAndRunPrintingOptionBcd PromptAboutUnlimitedPrinting: PROCEDURE [ exec: NSExec.Handle, useDefault: BOOLEAN, defaultToTrue: BOOLEAN _ TRUE] RETURNS [enableUnlimitedPrinting: BOOLEAN] = BEGIN enableUnlimitedPrinting _ TextInput.Confirm[ tty: NSExec.GetTTY[exec], prompt: M[mUnlimitedPrintingPrompt], default: IF useDefault THEN IF defaultToTrue THEN yes ELSE no ELSE TextInput.nilYesNo]; END; --PromptAboutUnlimitedPrinting PromptForBandBufferPages: PROCEDURE [ exec: NSExec.Handle, useDefault: BOOLEAN, normalValue, minValue, maxValue: LONG CARDINAL, defaultValue: LONG CARDINAL _ 0] RETURNS [bandBufferPages: LONG CARDINAL] = BEGIN normalCount: LONG CARDINAL _ normalValue/MiscUtilities.pagesPerBandBuffer; bandBuffers: LONG CARDINAL _ 0; sNormalCount: LONG STRING _ [10]; sBBPages: LONG STRING _ [10]; freeThisString: NSString.String; stringArray: ARRAY [0..2) OF NSString.String; String.AppendLongDecimal[sNormalCount, normalCount]; stringArray[0] _ Str[sNormalCount]; String.AppendLongDecimal[sBBPages, MiscUtilities.pagesPerBandBuffer]; stringArray[1] _ Str[sBBPages]; freeThisString _ Message.Expand[ M[mBandBuffersPrompt], DESCRIPTOR[stringArray], execHeap]; bandBuffers _ TextInput.GetLongDecimal[ tty: NSExec.GetTTY[exec], prompt: freeThisString, min: minValue, max: maxValue, default: IF useDefault THEN defaultValue/MiscUtilities.pagesPerBandBuffer ELSE TextInput.nilDecimal]; bandBufferPages _ bandBuffers * MiscUtilities.pagesPerBandBuffer; NSString.FreeString[execHeap, freeThisString]; END; --PromptForBandBufferPages PromptForDecomposeWhileMarking: PROCEDURE [exec: NSExec.Handle, useDefault: BOOLEAN, defaultToTrue: BOOLEAN] RETURNS [decomposeWhileMarking: BOOLEAN] = BEGIN decomposeWhileMarking _ TextInput.Confirm[ tty: NSExec.GetTTY[exec], prompt: M[mDecomposeWhileMarkingPrompt], default: IF useDefault THEN IF defaultToTrue THEN yes ELSE no ELSE TextInput.nilYesNo]; END; --PromptForDecomposeWhileMarking PromptForNonNormalInitType: PROCEDURE [exec: NSExec.Handle] RETURNS [type: NonNormalInitType] = BEGIN choices: CARDINAL = 2; typeMsgKeys: ARRAY [0..choices) OF PSExecMessages.Key _ [mConfigure, mDeleteBackingFiles]; typeChoices: ARRAY [0..choices) OF NSString.String; PSExecInternal.GetList[choices, DESCRIPTOR[typeMsgKeys], DESCRIPTOR[typeChoices]]; type _ SELECT TextInput.GetChoice[tty: NSExec.GetTTY[exec], prompt: M[mSpecifyNonNormalOption], choices: DESCRIPTOR[typeChoices]] FROM 1 => deleteBackingFiles, ENDCASE => configure; END; --PromptForNonNormalInitType PromptForPrintingOption: PROCEDURE [exec: NSExec.Handle, currentOption: PrintingTypes.Option, optionCount: CARDINAL, optionChoices: LONG DESCRIPTOR FOR ARRAY OF PrintingTypes.Option] RETURNS [option: PrintingTypes.Option] = BEGIN tty: TTY.Handle _ NSExec.GetTTY[exec]; outputHandle: XFormat.Handle _ NSExec.OutputHandle[exec]; optionMsgKeys: PSExecInternal.KeyList _ DESCRIPTOR[NIL, 0]; optionStrings: Message.StringArray _ DESCRIPTOR[NIL, 0]; bansheeChoiceIndex, d1ChoiceIndex, --index for each printing option in optionStrings array, fax295ChoiceIndex, fax495ChoiceIndex, --which is passed to TextInput.GetChoice feps9700ChoiceIndex, fx3500ChoiceIndex, ravenChoiceIndex, defaultOption: TextInput.ChoiceIndex _ TextInput.nilChoice; freeThisString: NSString.String; stringArray: ARRAY [0..1) OF NSString.String; ConfirmOptionChange: PROCEDURE [newOption: PrintingTypes.Option] RETURNS [confirmed: BOOLEAN] = BEGIN BEGIN SELECT currentOption FROM bansheeDl => SELECT newOption FROM bansheeDl, d1 => GOTO noFontMsgNecessary; ENDCASE; d1 => SELECT newOption FROM bansheeDl, d1 => GOTO noFontMsgNecessary; ENDCASE; fax295, fax495 => SELECT newOption FROM fax295, fax495 => GOTO noFontMsgNecessary; ENDCASE; feps9700, fx3500, raven => SELECT newOption FROM bansheeDl, feps9700, fx3500, raven => GOTO noFontMsgNecessary; --Raven, fx3500 and feps9700 use same fonts. These fonts are rotated for banshee. ENDCASE; ENDCASE => --unknown-- GOTO noFontMsgNecessary; stringArray[0] _ M[SELECT currentOption FROM bansheeDl => mBanshee, d1 => mD1, fax295 => mTC295, fax495 => mTC495, feps9700 => mFEPS, fx3500 => mFX3500, ENDCASE => mRaven]; outputHandle.Blanks[8]; freeThisString _ Message.Expand[ M[mDeleteOldFonts], DESCRIPTOR[stringArray], execHeap]; outputHandle.NSLine[freeThisString]; NSString.FreeString[execHeap, freeThisString]; EXITS noFontMsgNecessary => NULL; END; stringArray[0] _ M[SELECT newOption FROM bansheeDl => mShortBanshee, d1 => mD1, fax295 => mTC295, fax495 => mTC495, feps9700 => mFEPS, fx3500 => mFX3500, ENDCASE => mRaven]; freeThisString _ Message.Expand[ M[mConfirmOption], DESCRIPTOR[stringArray], execHeap]; confirmed _ TextInput.Confirm[tty: tty, prompt: freeThisString]; NSString.FreeString[execHeap, freeThisString]; END; --ConfirmOptionChange optionMsgKeys _ DESCRIPTOR[Heap.MakeNode[ execHeap, SIZE[PSExecMessages.Key] * optionCount], optionCount]; optionStrings _ DESCRIPTOR[Heap.MakeNode[ execHeap, SIZE[NSString.String] * optionCount], optionCount]; FOR i: CARDINAL IN [0..optionCount) DO SELECT optionChoices[i] FROM bansheeDl => BEGIN optionMsgKeys[i] _ mBanshee; bansheeChoiceIndex _ i; END; d1 => BEGIN optionMsgKeys[i] _ mD1; d1ChoiceIndex _ i; END; fax295 => BEGIN optionMsgKeys[i] _ mTC295; fax295ChoiceIndex _ i; END; fax495 => BEGIN optionMsgKeys[i] _ mTC495; fax495ChoiceIndex _ i; END; feps9700 => BEGIN optionMsgKeys[i] _ mFEPS; feps9700ChoiceIndex _ i; END; fx3500 => BEGIN optionMsgKeys[i] _ mFX3500; fx3500ChoiceIndex _ i; END; raven => BEGIN optionMsgKeys[i] _ mRaven; ravenChoiceIndex _ i; END; ENDCASE => ERROR; ENDLOOP; PSExecInternal.GetList[LENGTH[optionMsgKeys], optionMsgKeys, optionStrings]; IF currentOption # unknown THEN --use current printing option as default when prompting for option defaultOption _ SELECT currentOption FROM --defaultOption will be nilChoice, if current printing option is unknown bansheeDl => bansheeChoiceIndex, d1 => d1ChoiceIndex, fax295 => fax295ChoiceIndex, fax495 => fax495ChoiceIndex, feps9700 => feps9700ChoiceIndex, fx3500 => fx3500ChoiceIndex, ENDCASE => ravenChoiceIndex; DO --Loop until a printing option is selected and confirmed... SELECT TextInput.GetChoice[tty: tty, prompt: M[mSpecifyOption], choices: optionStrings, default: defaultOption] FROM bansheeChoiceIndex => option _ bansheeDl; d1ChoiceIndex => option _ d1; fax295ChoiceIndex => option _ fax295; fax495ChoiceIndex => option _ fax495; feps9700ChoiceIndex => option _ feps9700; fx3500ChoiceIndex => option _ fx3500; ravenChoiceIndex => option _ raven; ENDCASE => ERROR; SELECT currentOption FROM option, unknown => EXIT; ENDCASE => IF ConfirmOptionChange[option] THEN EXIT; ENDLOOP; Heap.FreeNode[execHeap, BASE[optionMsgKeys]]; Heap.FreeNode[execHeap, BASE[optionStrings]]; END; --PromptForPrintingOption PromptForFaxPaperWidth: PROCEDURE [exec: NSExec.Handle, useDefault: BOOLEAN, defaultWidth: CARDINAL _ 0] RETURNS [width: CARDINAL] = BEGIN choices: CARDINAL = 2; widthMsgKeys: ARRAY [0..choices) OF PSExecMessages.Key _ [ mLetterLegalWidth, mA4Width]; widthChoices: ARRAY [0..choices) OF NSString.String; defaultChoice: TextInput.ChoiceIndex _ IF useDefault THEN SELECT defaultWidth FROM PaperTypes.PaperMMDimension[a4].short => 1, ENDCASE --letter/legal-- => 0 ELSE TextInput.nilChoice; PSExecInternal.GetList[choices, DESCRIPTOR[widthMsgKeys], DESCRIPTOR[widthChoices]]; RETURN [SELECT TextInput.GetChoice[tty: NSExec.GetTTY[exec], prompt: M[mSpecifyFaxPaperWidth], choices: DESCRIPTOR[widthChoices], default: defaultChoice] FROM 0 => PaperTypes.PaperMMDimension[letter].short, ENDCASE => PaperTypes.PaperMMDimension[a4].short]; END; --PromptForFaxPaperWidth PromptForFaxTransmissionResolution: PROCEDURE [exec: NSExec.Handle, useDefault: BOOLEAN, defaultToFine: BOOLEAN _ TRUE] RETURNS [supportFineResolution: BOOLEAN] = BEGIN choices: CARDINAL = 2; resolutionMsgKeys: ARRAY [0..choices) OF PSExecMessages.Key _ [ mStandard, mFine]; resolutionChoices: ARRAY [0..choices) OF NSString.String; defaultChoice: TextInput.ChoiceIndex _ IF useDefault THEN IF defaultToFine THEN 1 ELSE 0 ELSE TextInput.nilChoice; PSExecInternal.GetList[choices, DESCRIPTOR[resolutionMsgKeys], DESCRIPTOR[resolutionChoices]]; RETURN [SELECT TextInput.GetChoice[tty: NSExec.GetTTY[exec], prompt: M[mSpecifyFaxResolution], choices: DESCRIPTOR[resolutionChoices], default: defaultChoice] FROM 0 => FALSE, ENDCASE => TRUE]; END; --PromptForFaxTransmissionResolution PromptForRavenVersion: PROCEDURE [exec: NSExec.Handle, useDefault: BOOLEAN, defaultVersion: PrintingTypes.RavenBuild _ b1] RETURNS [version: PrintingTypes.RavenBuild] = BEGIN choices: CARDINAL = 2; ravenMsgKeys: ARRAY [0..choices) OF PSExecMessages.Key _ [ mRavenB1, mRavenB2]; ravenChoices: ARRAY [0..choices) OF NSString.String; defaultChoice: TextInput.ChoiceIndex _ IF useDefault THEN SELECT defaultVersion FROM b2 => 1, ENDCASE --b1-- => 0 ELSE TextInput.nilChoice; PSExecInternal.GetList[choices, DESCRIPTOR[ravenMsgKeys], DESCRIPTOR[ravenChoices]]; RETURN [ SELECT TextInput.GetChoice[ tty: NSExec.GetTTY[exec], prompt: M[mSpecifyRavenBuild], choices: DESCRIPTOR[ravenChoices], default: defaultChoice] FROM 0 => b1, ENDCASE => b2]; END; --PromptForRavenVersion PromptForRMAllocation: PROCEDURE [exec: NSExec.Handle, useDefault: BOOLEAN, normalValue: LONG CARDINAL, defaultValue: LONG CARDINAL _ 0] RETURNS [rmAllocation: LONG CARDINAL] = BEGIN outputHandle: XFormat.Handle _ NSExec.OutputHandle[exec]; rmAllocation _ TextInput.GetLongDecimal[ tty: NSExec.GetTTY[exec], prompt: M[mRMLimitPrompt], min: 100, max: normalValue, default: IF useDefault THEN defaultValue ELSE TextInput.nilLongDecimal]; END; --PromptForRMAllocation PromptForSpoolWhileMarking: PROCEDURE [exec: NSExec.Handle, useDefault: BOOLEAN, defaultToTrue: BOOLEAN] RETURNS [spoolWhileMarking: BOOLEAN] = BEGIN spoolWhileMarking _ TextInput.Confirm[ tty: NSExec.GetTTY[exec], prompt: M[mSpoolWhileMarkingPrompt], default: IF useDefault THEN IF defaultToTrue THEN yes ELSE no ELSE TextInput.nilYesNo]; END; --PromptForSpoolWhileMarking PromptForVMPagesForDecomposer: PROCEDURE [exec: NSExec.Handle, useDefault: BOOLEAN, defaultValue: LONG CARDINAL _ 0] RETURNS [vmPagesForDecomposer: LONG CARDINAL] = BEGIN vmPagesForDecomposer _ TextInput.GetLongDecimal[ tty: NSExec.GetTTY[exec], prompt: M[mVMLimitPrompt], min: 100, max: 12000, default: IF useDefault THEN defaultValue ELSE TextInput.nilLongDecimal]; END; --PromptForVMPagesForDecomposer PromptWithFontDeletionQuestion: PROCEDURE [exec: NSExec.Handle, useDefault: BOOLEAN, defaultToTrue: BOOLEAN] RETURNS [deleteIncompatibleFontsandTPs: BOOLEAN] = BEGIN deleteIncompatibleFontsandTPs _ TextInput.Confirm[ tty: NSExec.GetTTY[exec], prompt: M[mDeleteObsoleteFonts], default: IF useDefault THEN IF defaultToTrue THEN yes ELSE no ELSE TextInput.nilYesNo]; END; --PromptWithFontDeletionQuestion PutAsyncMessage: PSAsyncMsg.Proc --insertArray: PSAsyncMsg.InsertArray _ PSAsyncMsg.nullInsertArray]-- = BEGIN Get: PROCEDURE [domain: XMessage.Handle, key: XMessage.MsgKey] RETURNS [string: NSString.String] = { r: XString.ReaderBody _ XMessage.Get[domain, key]; string _ [bytes: LOOPHOLE[r.bytes], length: r.limit, maxlength: r.limit]}; IF insertArray = PSAsyncMsg.nullInsertArray THEN NSExec.BroadcastAsyncMessage[Get[msg.domain, msg.key], psClientID] --output msg to all active execs ELSE BEGIN stringCount: CARDINAL _ LENGTH[insertArray]; freeThisStringArray: Message.StringArray _ DESCRIPTOR[Heap.MakeNode[execHeap, SIZE[NSString.String] * stringCount], stringCount]; FOR i: CARDINAL IN [0..stringCount) DO IF insertArray[i].m # PSAsyncMsg.nullMsg THEN freeThisStringArray[i] _ Get[ insertArray[i].m.domain, insertArray[i].m.key] ELSE freeThisStringArray[i] _ insertArray[i].s; ENDLOOP; PSExecInternal.ExpandArrayAndPrintAsync[ Get[msg.domain, msg.key], freeThisStringArray]; Heap.FreeNode[execHeap, BASE[freeThisStringArray]]; END; END; --PutAsyncMessage SetInitialState: PROCEDURE [oldOption, newOption: PrintingTypes.Option] = BEGIN StopMessage: TYPE = {checkFonts, setTargetPS, setTargetPSAndCheckFonts}; StopPrinting: PROCEDURE [message: StopMessage] = TRUSTED BEGIN systemName: NSName.NameRecord _ NSName.nullNameRecord; systemName.local _ M[mSystemControl]; PSCommand.StopPrinting[ user: @systemName, reason: M[ SELECT message FROM setTargetPS => mSetTarget, setTargetPSAndCheckFonts => mSetTargetAndCheckFonts, ENDCASE => mCheckFonts] ]; END; --StopPrinting SELECT oldOption FROM bansheeDl, d1 => SELECT newOption FROM bansheeDl, d1 => NULL; fax295, fax495, fx3500, raven => StopPrinting[checkFonts]; --banshee fonts cannot be rotated back for raven or fx3500 feps9700 => StopPrinting[setTargetPSAndCheckFonts]; ENDCASE => ERROR; fax295, fax495 => SELECT newOption FROM raven, fx3500, bansheeDl, d1 => StopPrinting[checkFonts]; fax295, fax495 => NULL; feps9700 => StopPrinting[setTargetPSAndCheckFonts]; ENDCASE => ERROR; feps9700 => SELECT newOption FROM raven, fx3500, bansheeDl, d1, fax295, fax495 => StopPrinting[checkFonts]; feps9700 => NULL; ENDCASE => ERROR; fx3500, raven => SELECT newOption FROM raven, fx3500, bansheeDl => NULL; --fx3500/raven fonts are rotated for banshee d1, fax295, fax495 => StopPrinting[checkFonts]; feps9700 => StopPrinting[setTargetPS]; ENDCASE => ERROR; unknown => SELECT newOption FROM raven, d1, fx3500, bansheeDl, fax295, fax495 => StopPrinting[checkFonts]; feps9700 => StopPrinting[setTargetPSAndCheckFonts]; ENDCASE => ERROR; ENDCASE => ERROR; END; --SetInitialState StopQueuingAndPrintingAbnormal: PROCEDURE [exec: NSExec.Handle] = BEGIN name: NSName.Name _ NSExec.UserName[exec ! NSExec.Error => GOTO noUser]; PSCommand.StopQueuing[ user: name, reason: M[mAbnormalStartup]]; PSCommand.StopPrinting[ user: name, reason: M[mAbnormalStartup]]; EXITS noUser => BEGIN systemName: NSName.NameRecord _ NSName.nullNameRecord; systemName.local _ M[mSystemControl]; PSCommand.StopQueuing[ user: @systemName, reason: M[mAbnormalStartup]]; PSCommand.StopPrinting[ user: @systemName, reason: M[mAbnormalStartup]]; END; END; --StopQueuingAndPrintingAbnormal RegisterCommands: PROCEDURE = BEGIN commands: ARRAY [0..27) OF NSExec.Command _ [ --List Documents:-- [ M[mListDocs], PSExecInternal.DisplayDocuments], --Cancel Documents:-- [ M[mCancelDoc], PSExecInternal.CancelDocuments, AllowCancelDocuments], --List Fonts:-- [ M[mListFonts], PSExecInternal.DisplayFonts], --List Test Patterns:-- [ M[mListTPs], PSExecInternal.DisplayTestPatterns], --Delete Fonts:-- [ M[mDeleteFonts], PSExecInternal.DeleteFonts, AllowDeleteFonts], --Delete Test Patterns:-- [ M[mDeleteTPs], PSExecInternal.DeleteTestPatterns, AllowDeleteTestPatterns], --Install From Floppy (Fonts & Test Patterns):-- [ M[mInstallFonts], PSExecInternal.InstallFromFloppy, AllowInstallFromFloppy], --Print Test Pattern:-- [ M[mPrintTP], PSExecInternal.PrintTestPattern, AllowPrintTestPattern], --Set Parameters:-- [ M[mSetParameters], PSExecInternal.SetParameters, AllowSetParameters], --Set Banner:-- [ M[mSetBanner], PSExecInternal.SetParameters, AllowSetBanner], --Show Status:-- [ M[mShowStatus], PSExecInternal.DisplayPrintServiceStatus], --Start:-- [ M[mStart], PSExecInternal.StartQueuingAndPrinting, AllowStartQueuingAndPrinting], --Stop:-- [ M[mStop], PSExecInternal.StopQueuingAndPrinting, AllowStopQueuingAndPrinting], --Start Printing:-- [ M[mStartPrinting], PSExecInternal.StartPrinting, AllowStartPrinting], --Stop Printing:-- [ M[mStopPrinting], PSExecInternal.StopPrinting, AllowStopPrinting], --Start Queuing:-- [ M[mStartSpooling], PSExecInternal.StartQueuing, AllowStartQueuing], --Stop Queuing:-- [ M[mStopSpooling], PSExecInternal.StopQueuing, AllowStopQueuing], --Start Diagnostic:-- [ M[mStartDiagnostic], PSExecInternal.StartDiagnostic, AllowStartDiagnostic], --WakeUp Printer:-- [ M[mWakeupRaven], PSExecInternal.WakeUpPrinter, AllowWakeUpPrinter], --ShutDown Printer:-- [ M[mShutdownRaven], PSExecInternal.ShutDownPrinter, AllowShutDownPrinter], --Reset Statistics:-- [ M[mResetStats], PSExecInternal.ResetStatistics, AllowResetStatistics], --Rename Print Service: -- [ M[mRenamePrintService], PSExecInternal.RenamePrintService, AllowRenamePrintService], --Put Display:-- [ M[mPutDisplay], PSExecInternal.PutPrinterDisplay, AllowPutDisplay], --Get Display:-- [ M[mGetDisplay], PSExecInternal.GetPrinterDisplay, AllowGetDisplay], --Set Trace:-- [ M[mSetTrace], PSExecInternal.SetTrace, AllowSetTrace], --Set Target Print Service:-- [ M[mSetTargetPS], PSExecInternal.SetTargetPrintService, AllowSetTargetPS], --Query Target Print Service:-- [ M[mQueryTargetPS], PSExecInternal.QueryTargetPrintService, AllowQueryTargetPS] ]; NSExec.AddClientCommands[ id: psClientID, commands: DESCRIPTOR[commands]]; END; --RegisterCommands AllowRenamePrintService: NSExec.Predicate = BEGIN RETURN [NSExec.UserAServerSA[exec] AND PSStopped[]]; END; --AllowRenamePrintService AllowCancelDocuments, AllowResetStatistics: NSExec.Predicate = BEGIN RETURN [NSExec.UserAServerSA[exec] AND PSStarted[]]; END; -- AllowCancelDocuments AllowPrintTestPattern: NSExec.Predicate = BEGIN state: PSState.StateHandle _ PSCommand.GetPrintServiceStatus[]; RETURN [PSStarted[] AND (state.mode.current = normal OR state.mode.current = repair)]; END; --AllowPrintTestPattern AllowInstallFromFloppy, AllowDeleteFonts, AllowDeleteTestPatterns: NSExec.Predicate = BEGIN RETURN [ NSExec.UserAServerSA[exec] AND PSStarted[] AND PSCommand.GetPrintServiceStatus[].mode.current = normal]; END; --AllowInstallFromFloppy AllowSetParameters: NSExec.Predicate = BEGIN state: PSState.StateHandle _ PSCommand.GetPrintServiceStatus[]; RETURN [ state.option # feps9700 AND state.option # bansheeDl AND NSExec.UserAServerSA[exec] AND PSStarted[]]; END; --AllowSetParameters AllowSetBanner: NSExec.Predicate = BEGIN RETURN [ PSCommand.GetPrintServiceStatus[].option = bansheeDl AND NSExec.UserAServerSA[exec] AND PSStarted[]]; END; --AllowSetBanner AllowStartDiagnostic: NSExec.Predicate = BEGIN --Only allowed for raven and fx3500 engines from the LOCAL EXEC ONLY. state: PSState.StateHandle _ PSCommand.GetPrintServiceStatus[]; IF exec # NSExec.localExec THEN RETURN [FALSE]; IF NOT PSStarted[] THEN RETURN [FALSE]; WITH s: state SELECT FROM bansheeDl, d1, fax295, fax495, fx3500, raven => RETURN [s.mode.current = normal]; ENDCASE => RETURN [FALSE]; END; --AllowStartDiagnostic AllowStartQueuingAndPrinting: NSExec.Predicate = BEGIN state: PSState.StateHandle _ PSCommand.GetPrintServiceStatus[]; RETURN [ NSExec.UserLoggedOn[exec] AND NOT state.clientControl.markerEnabled AND state.clientControl.spooler # enabled AND PSStarted[]]; END; --AllowStartQueuingAndPrinting AllowStopQueuingAndPrinting: NSExec.Predicate = BEGIN state: PSState.StateHandle _ PSCommand.GetPrintServiceStatus[]; RETURN [ NSExec.UserAServerSA[exec] AND state.clientControl.markerEnabled AND state.clientControl.spooler = enabled AND PSStarted[]]; END; --AllowStopQueuingAndPrinting AllowStartPrinting: NSExec.Predicate = BEGIN RETURN [ NSExec.UserLoggedOn[exec] AND NOT PSCommand.GetPrintServiceStatus[].clientControl.markerEnabled AND PSStarted[]]; END; -- AllowStartPrinting AllowStopPrinting: NSExec.Predicate = BEGIN RETURN [ NSExec.UserAServerSA[exec] AND PSCommand.GetPrintServiceStatus[].clientControl.markerEnabled AND PSStarted[]]; END; -- AllowStopPrinting AllowStartQueuing: NSExec.Predicate = BEGIN RETURN [ NSExec.UserLoggedOn[exec] AND PSCommand.GetPrintServiceStatus[].clientControl.spooler # enabled AND PSStarted[]]; END; -- AllowStartQueuing AllowStopQueuing: NSExec.Predicate = BEGIN RETURN [ NSExec.UserAServerSA[exec] AND PSCommand.GetPrintServiceStatus[].clientControl.spooler = enabled AND PSStarted[]]; END; -- AllowStopQueuing AllowWakeUpPrinter: NSExec.Predicate = BEGIN activity: PSState.CurrentActivity _ PSCommand.GetPrintServiceActivity[]; WITH a: activity SELECT FROM raven => RETURN [ NSExec.UserAServerSA[exec] AND NOT RepairMode[] AND a.ravenStatus = aboutToDozeOff AND PSStarted[]]; ENDCASE => RETURN [FALSE]; END; -- AllowWakeUpPrinter AllowShutDownPrinter: NSExec.Predicate = BEGIN state: PSState.StateHandle _ PSCommand.GetPrintServiceStatus[]; WITH s: state SELECT FROM raven => IF NSExec.UserAServerSA[exec] AND NOT RepairMode[] AND PSStarted[] AND s.engineBuild > b1 THEN BEGIN activity: PSState.CurrentActivity _ PSCommand.GetPrintServiceActivity[]; WITH a: activity SELECT FROM raven => RETURN [a.ravenStatus = okay AND a.marker = available]; ENDCASE => RETURN [FALSE] END ELSE RETURN [FALSE]; ENDCASE => RETURN [FALSE]; END; -- AllowShutDownPrinter AllowPutDisplay, AllowGetDisplay: NSExec.Predicate = BEGIN RETURN [ PSCommand.GetPrintServiceStatus[].option = fx3500 AND RepairMode[] AND PSStarted[]]; END; --AllowPutDisplay AllowSetTrace: NSExec.Predicate = BEGIN --Allowed in repair mode or development mode RETURN [PSStarted[] AND (RepairMode[] OR developmentMode)]; END; --AllowSetTrace AllowSetTargetPS: NSExec.Predicate = BEGIN RETURN [NSExec.UserAServerSA[exec] AND PSStarted[] AND PSCommand.GetPrintServiceStatus[].option = feps9700]; END; --AllowSetTargetPS AllowQueryTargetPS: NSExec.Predicate = BEGIN RETURN [PSStarted[] AND PSCommand.GetPrintServiceStatus[].option = feps9700]; END; --AllowQueryTargetPS RepairMode: PROCEDURE RETURNS [BOOLEAN] = BEGIN RETURN [PSCommand.GetPrintServiceStatus[].mode.current = repair]; END; --RepairMode PSStarted: PROCEDURE RETURNS [started: BOOLEAN] = BEGIN RETURN [PSCommandExtras.ServiceState[] = started]; END; --PSStarted PSStopped: PROCEDURE RETURNS [stopped: BOOLEAN] = BEGIN RETURN [PSCommandExtras.ServiceState[] = stopped]; END; --PSStopped M: PROCEDURE [key: PSExecMessages.Key] RETURNS [string: NSString.String] = { r: XString.ReaderBody _ XMessage.Get[execMsgs, ORD[key]]; string _ [bytes: LOOPHOLE[r.bytes], length: r.limit, maxlength: r.limit]}; Str: PROCEDURE [s: LONG STRING] RETURNS [ns: NSString.String] = INLINE { RETURN[NSString.StringFromMesaString[s]]}; END. LOG when/who/what 3-Oct-84 16:01:29 - Jacks - Created. Took code from PSExecAImpl and PSCommandInitImpl and added to it. 22-Oct-84 10:33:59 - Jacks - Now using CalcRMPagesForMarker from new MiscUtilities I/F; added SetInitialState; renamed ttyHeap to execHeap; added two commands for feps9700. 1-Nov-84 17:31:04 - Jacks - Removed fax295 from init engine options; added set target ps stuff to SetInitialState. 14-Nov-84 11:01:34 - Jacks - Put back prompting for fax required init parms. 19-Nov-84 13:44:11 - Jacks - Added Set Banner command for banshee. 13-Dec-84 11:31:38 - Jacks - Changed one development mode prompt string and some msg keys; removed ControlMessagesExtras. 16-Jan-85 15:32:23 - Jacks - Added "ps" prefix to all new message keys for 9.0. 18-Jan-85 16:19:18 - Jacks - Updated product factoring for feps9700. 23-Jan-85 15:13:20 - Jacks - Updated SetInitialState for banshee font situation. 7-Feb-85 9:24:21 - Jacks - Updated to newer version of PSInit. 28-Feb-85 15:22:26 - Jacks - Allow StartDiagnostic for banshee; only allow StartDiagnostic for local exec; fixed space leak in GetPrintingOption; made developmentMode PUBLIC. 19-Jun-85 11:33:29 - Jacks - Added copyright notice; updated to PS Euclid interfaces; turned off public error catching by SCS in all exec procs. 28-Jun-85 13:39:47 - Jacks - Added d1 code; removed SetCatching calls. 18-Jul-85 15:02:19 - Jacks - Updated to Euclid Services interfaces, especially XMessage. 6-Aug-85 17:31:39 - Jacks - Made List Fonts and List Test Patterns client commands; updated ConfirmOptionChange in PromptForPrintingOption for d1; updated DevelopmentModeInit to get more info from state record; made use of new CalcRMPagesForMarker and CalcPagesForBandBuffers. 20-Aug-85 14:07:14 - Jacks - Added correct min/max values to PromptForBandBufferPages and PromptForRMAllocation; added runtime loading of printing option bcds. 28-Aug-85 15:39:23 - Jacks - Enabled StartDiagnostic for fax. 6-Sep-85 15:34:16 - Jacks - Delete PSEngineConfig; one band buffer for feps9700. 9-Sep-85 13:17:48 - Jacks - Changed VM for decomoser max value; added many strings to msg file. 11-Sep-85 11:49:36 - Jacks - Changed developmentMode deleteIncompatibleFontsandTPs default to TRUE. 19-Sep-85 11:13:07 - Jacks - Minor changes. 23-Sep-85 14:00:50 - Jacks - Added GetRequiredBansheeInitParms and PromptAboutUnlimitedPrinting. 27-Sep-85 12:38:11 - Jacks - Fixed some stuff about unlimited printing. 8-Oct-85 13:17:52 - Jacks - Updated to new PSInit with changes to band buffer calculation for unlimited printing; changed spoolWhileMarking default to TRUE for US printers. 15-Oct-85 9:48:00 - Jacks - Expunge now deletes msg files. 6-Nov-85 13:06:17 - Jacks - Expunge DOESN'T delete msg files, but DOES destroy msgs; user must confirm Expunge; call PSKMessages for msg handle; catch PSInit.FontsNotCataloged. 7-Nov-85 11:11:48 - Jacks - Use LSEPFace.MaxBands in PromptForBandBufferPages; got rid of FontsNotCataloged business. 13-Nov-85 10:34:13 - Jacks - Added DeleteObsoleteBcds; default spoolWhileMarking and decomposeWhileMarking to TRUE for FX printers. 27-Nov-85 14:18:51 - Jacks - PSStarted now uses PSCommandExtras.ServiceState; updated to new product factoring bits; use default values in normal startup portion of DevelopmentModeInit. 16-Dec-85 13:00:24 - Jacks - Removed call to DisplayPrintServiceStatus from Start proc. 30-Dec-85 17:39:39 - Jacks - Max band buffers down to 7. 28-Jan-86 14:20:19 - Jacks - Added min and max parms to PromptForBandBufferPages (max for d1 is 8; max for rest is 7). 29-Apr-86 14:11:37 - Jacks - Changed messages displayed when reserved memory is not available. 19-May-86 10:38:42 - Jacks - Don't prompt to confirm printing option change if previously option wasn't set; changed expunge warning prompt; prompt for non-normal startup option (configure or delete backing files). ŒPSExecInitImpl.mesa Copyright (C) Xerox Corporation 1984, 1985, 1986. All rights reserved. Last edited by Jacks 19-May-86 10:38:46 Initialization code for Services Executive interface to the Print Service. boot switch determines if we're in development mode Message domain handles: ************************************************ SERVICES EXECUTIVE INITIALIZATION PROCEDURES: These procedures are exported by the PSExec interface and used in the PSExecControlImpl module in the call to NSExec.CreateClient. ************************************************ This is the name of the module that fakes the engine drivers when we run the PS in Tajo. Sets optional init parameters. If the user has already selected a new printing option, all the optional parameters are defaulted to their normal values. If the user has NOT selected a new printing option, all the optional parameters are defaulted to their current values, as found in the state record. The defaultDecomposerRMPageLimit must be calculated after we prompt for the number of band buffers! For NORMAL STARTUP IN DEVELOPMENT MODE the user is not prompted to enter optional parameters. It is not usually possible to change the printing option during a normal startup, but if the product factoring has changed, such that the current printing option is no longer enabled, the user will be forced to choose another option. Therefore, the optional parameters are usually set to the current values from the state record or to certain known defaults for this mode--but if a new printing option HAS been chosen, the optional parameters are defaulted to the normal values for the new printing options. For NON-NORMAL STARTUP IN DEVELOPMENT MODE the user is prompted the enter values for optional parameters. *********** MAINLINE OF INITIALIZE ************-- If it's a normal init in development mode, we provide a special prompt to determine if it should really be a normal init: ****** NOTE: Remove this code in a later release ****** The stmt above must follow the previous calls to "GetRequiredXXXInitParms", because those procs default newParametersSpecified to FALSE. If there's a new printing option, may need to stop printing and remind the user to install fonts or set target print service: Queuing and printing should be stopped if it's a non-normal PS startup: If not a cold quit and we are in repair mode, the user is prompted to confirm stopping the print service. If for some reason no one can provide confirmation at the TTY window, stopping is aborted. ================================================ Actual Print Service Initialization Routines: ================================================ **** NON NORMAL INIT TYPE **** **** ENGINE TYPE **** Option choices are currently: raven, d1, fx3500, bansheeDl, fax495 and feps9700. Code for fax295 has been included, but it is not enabled. Proc looks for printing option configs installed on the working directory. need to check for option configs on the working directory. Proc checks product factoring for all printing options. These select arms are in the specific order that the user will see the options displayed: Mainline code for GetPrintingOption: **** REQUIRED ENGINE INITIALIZATION PARAMETERS **** mem size changed; unlimited printing no longer available mem size changed; unlimited printing no longer available **** OPTIONAL ENGINE INITIALIZATION PARAMETERS **** Must prompt for RM page limit after prompting for band buffer pages, since the number of band buffer pages is a parameter for calculating the RM limit: Must prompt for RM page limit after prompting for band buffer pages, since the number of band buffer pages is a parameter for calculating the RM limit: Must prompt for RM page limit after prompting for band buffer pages, since the number of band buffer pages is a parameter for calculating the RM limit: Must prompt for RM page limit after prompting for band buffer pages, since the number of band buffer pages is a parameter for calculating the RM limit: Must prompt for RM page limit after prompting for band buffer pages, since the number of band buffer pages is a parameter for calculating the RM limit: Must prompt for RM page limit after prompting for band buffer pages, since the number of band buffer pages is a parameter for calculating the RM limit: Must prompt for RM page limit after prompting for band buffer pages, since the number of band buffer pages is a parameter for calculating the RM limit: ============================== SUPPORT ROUTINES ============================== Deletes obsolete bcds from the working directory. This proc is currently backwards compatible to Services 8.0. NOTE: Update or delete the proc in a later release. Delete the old loadable engine config used for Print Service 8 and 9, but obsolete in 10.0. If engine config isn't there, don't bother looking for RS232CCommon. Delete RS232CCommon.bcd, used for Print Service 8 and 9, but obsolete in 10.0. Must check create date of file, so we don't delete it if it is a current version that may be used by other services. NOTE: See MiscUtilitiesImpl.mesa for detailed explanation of band buffer allocation, including the min, max and normal values. Check if there are fonts installed from the previous printing option and, if so, display a warning that they will be deleted, if appropriate. Even though font floppies cannot be shared between banshee and d1, fonts already loaded and rotated for banshee may be used for d1. Unrotated banshee fonts will be deleted if option is changed to d1. Mainline of PromptForPrintingOption: Store appropriate values in optionMsgKeys array and set indices. If a certain printing option is not among the current choices, its index will remain nil. If a new printing option is selected, confirm the change: If option change isn't confirmed, loop and display the selections again. [msg: PSAsyncMsg.Message, This procedure compares the old printing option to the new printing option. If different fonts are required for the new printing option, printing is stopped with the message to check that fonts have been installed. Or, if the new printing option is the feps9700, the message is that the target print service should be set. ===================================================== ===================================================== Command Phrase, Command Processor, Activity Check & Help Proc for each command: Allow Procs all return BOOLEAN indicating whether command is currently valid: Don't allow PrintTestPattern when installing/deleting fonts. Mode must be normal to insure that other fonts are not being installed or deleted at the same time. (If PS is not running mode would be notStarted or shutDown.) Banshee only has one operation parameter, so the command Set Banner is used rather than the menu oriented Set Parameters. The same proc implements Set Banner and Set Parameters. Mode must be normal so that we're not in repair mode or already in diagnostic mode and we're not installing or deleting fonts. Proc for getting NSString from XMessage key Ê5Ò˜™J™FJ™'—™J™J—J˜šÏk ˜ Jšœ œ*˜:Jšœ œ ˜Jšœœ˜(Jšœœ˜$JšœœE˜XJšœœ˜/Jšœœþ˜ŠJšœœ§˜³Jšœœ$˜0Jšœ œK˜YJšœ œ˜$Jšœœ˜)Jšœœ ˜!Jšœœw˜Jšœ œ"˜2Jšœ œt˜ƒJšœœ˜%Jšœœ˜J˜Jšœœ˜Jšœœº˜ÆJšœ œ˜+Jšœœ ˜-Jšœœ˜ Jšœœ˜1Jšœœ˜,Jšœœ˜>Jšœ œ˜$Jšœœ˜!Jšœ œs˜‚Jšœœ˜Jšœœ˜Jšœœ$˜1Jšœ œ˜%Jšœœ˜—J˜šÏnœ ˜JšœmœŠœ˜–Jšœ˜Jšœ ˜J˜Jšœœ#˜:J˜Jšœ œ œœÏcW˜’šœœœ˜"J˜=Jšœ3™3—J˜J˜4J˜Jšœ™J˜8˜J˜—Jšœ0™0Jšœ-™-Jšœ,™,Jšœ2™2Jšœ#™#Jšœ0™0J˜š ž œœ œœ˜KJ˜-˜AJšœMœ ™X—Jšœœœ#˜YJ˜9J˜BJšœœ˜!Jšœœœ˜!Jšœ œ˜$J˜GJ˜GJ˜Jšžœ œ˜&šœ™J˜™UJšœ6œ™»J™—šœœœ˜-Jšœœœ˜:—šœœœ˜.Jšœœ$˜;Jšœ"˜&Jšœ9™9Jšœ)™)—šœœ˜$Jšœœœœ˜:—šœœœ˜(Jšœœ%˜J˜——Jšœ˜š œœœœ œœ¬Ÿ'œa™ÚJ˜šœ˜˜J˜2J˜(J˜4Jšœœ˜$˜J˜,J˜4—J˜—˜J˜2J˜(J˜4Jšœœ˜$˜J˜-J˜4—J˜—˜J˜2J˜(J˜4Jšœœ˜$˜J˜,J˜4—J˜—˜J˜2J˜(J˜4Jšœœ˜$˜J˜,J˜4—J˜—˜J˜2J˜(J˜4Jšœœ˜$J˜!—˜J˜2J˜(J˜4Jšœœ˜$˜J˜,J˜4—J˜—˜J˜2J˜(J˜4Jšœœ˜$˜J˜,J˜4—J˜—Jšœ˜J˜——Jšœ˜ š œœœœœ œ™+J™>šœ˜˜˜J˜1J˜8J˜6——˜˜9J˜8J˜6——˜˜=J˜8J˜6——˜˜=J˜8J˜6——˜˜J˜#J˜6——˜˜=J˜8J˜6——˜˜J˜1J˜8J˜6——Jšœœ˜—Jšœ˜—JšœŸ˜J˜—Jšœ1™1J˜šœ9˜>Jšœ3˜6JšœF˜IJšœC˜GJš˜J˜%J˜.Jšœ ˜%Jšœ˜—š œœœœ˜%J˜%J˜,J˜J˜J˜%J˜J˜"J˜J˜%J˜J˜0Jšœ ˜%Jšœ˜J˜—šœœœ˜J˜+šœ$œ˜0J˜J˜)Jšœ(œ˜/J˜&Jšœ˜—Jšœ˜J˜—J˜J˜*J˜!J˜Jšœy™yšœœ˜"˜!J˜7JšœŸ œ˜:J˜——Jšœ7™7˜:˜'J˜——J˜Gšœœ˜šœœ3˜=Jšœ ˜%——J˜5J˜šœœ˜*J˜OJšœ#Ÿ˜=J˜KJ˜KJšœ/Ÿ ˜OJšœ+Ÿ˜IJšœD˜K—šœœ(œ˜DJ™LJšœ6œ™<—JšœœŸ(˜WJ˜KJšœ5Ÿe˜šJ˜J˜VJ˜J˜Jšœ}™}JšœœJ˜aJšœG™GJšœœœ&˜8Jšœ Ÿ˜JšœŸ ˜J˜J˜—šžœœ'˜4J˜—J˜Jšžœœ œ4˜OšœÅ™Åšœ˜ Jšœ œ˜Jšœœœœ˜5Jšœ˜—šœœ˜+šœ˜J˜>šœŸ œ˜6Jšœœ˜ —J˜——J˜Jšœ œ˜JšœŸ˜ J˜J˜—šžœœ˜'J˜;J˜?šœ<œ˜HJ˜9Jšœ(œ˜.J˜J˜3J˜!Jš˜—Jšœœ˜'JšœŸ ˜J˜J˜—šžœœ œ œ!˜LJš˜šœ#œ˜-J˜/—Jšœ˜JšœŸ˜ J˜J˜—šžœœ œ˜Jšœ œ;˜Všœœ ˜=˜*Jšœœ ˜*—J˜—JšœŸ˜ J˜J˜—šžœœ˜-JšœŸ4˜:JšœŸ˜J˜J˜—Jšœ0™0Jšœ-™-Jšœ0™0J˜Jšœ™J˜šžœ œ˜5Jšœ˜)š˜J˜(šœ˜Jšœ œ˜˜šœ˜Jšœ4œœ˜>——Jšœ˜—Jšœ˜—JšœŸ˜——˜J˜Jšœ™J˜šžœ œœ˜CJšœ+œ˜3Jšœ!˜(J˜JšœP™PJšœ9™9J˜Jšœœžœ ˜Jšœœ œ˜J˜9JšœœŸF˜dJšœœŸS˜vJšœœ œœœœ œœŸ;˜Jš œ œœœœœŸ:˜yJš œœœœœœŸ3˜uJ˜Jšžœ œ˜#šœJ™JJšœ˜J˜4šžœ˜.Jšœ-œ˜GJšœœ'˜FJ˜Jšœ-œ˜IJšœœ'˜JJ˜Jšœ-œ˜EJšœœ'˜GJ˜Jšœ-œ˜FJšœœ'˜IJ˜Jšœ-œ˜HJšœœ'˜GJ˜Jšœ-œ˜DJšœœ'˜?Jšœ˜—šœ˜JšœŸ&˜,Jšœ:™:Jšœœœ˜JšœŸ)˜=Jš˜—šœ˜ Jšœœ˜$˜ J˜=J˜?—Jšœ˜—JšœŸ˜!J˜—Jšžœ œ˜,šœ7™7˜7J˜7—˜0J˜)—J˜F˜/J˜,—JšœŸ˜$J˜—šžœ œ˜*JšœœœœœœœŸR˜ššœ œ˜4Jšœ œD˜R—šœœœ˜.Jšœœ˜šœY™YJšœœœ<˜hJšœœœD˜xJšœœœ>˜lJšœœœ6˜\Jšœœœ>˜lJšœœœ>˜lJšœœœB˜tJšœœŸ˜*—Jšœ,œ˜2Jšœ˜—JšœŸ˜"J˜J˜—Jšœ$™$Jš˜JšœŸ(˜EJšœŸ!˜;šœœ˜ J˜%J˜2Jšœ˜Jšœ˜—šœœ˜;šœœ˜2J˜.—Jšœ˜—šœœ˜%J˜%J˜3Jšœ˜Jšœ˜—JšœŸP˜kJ˜šœœœ˜*Jšœœ˜Jšœ˜#˜!J˜ J˜J˜!J˜'J˜——Jšœ˜Jšœœ˜8šœ˜Jšœœ˜8Jšœ ˜%Jšœ˜—Jšœ˜JšœŸ˜J˜J˜—Jšœ3™3J˜šžœ œœ˜MJšœ-œ˜5Jšœ1˜>Jšœ*œŸ˜Ešœœ˜šœ˜˜'šœE˜KJšœ5œ˜;—Jšœœ˜ —Jšœ&œ˜+Jšœ˜—šœ œ œ˜'šœ ˜˜&šœEœ˜M˜Jšœœ˜J˜)——Jšœœ˜ —Jšœ&œŸ4˜`Jšœ˜—Jšœœ˜—šœœ œ˜$˜ šœE˜KJ˜@—šœœ˜ šœ˜!Jšœ8™8Jšœ&œ˜+—Jšœ'œ˜-Jšœ˜——Jšœœ˜——JšœŸ˜"J˜—šžœ œœ˜LJšœ-œ˜5Jšœ-˜:šœœ˜šœ˜˜0Jšœœ˜—Jšœ%œ˜*Jšœ˜—šœ œ œ˜'šœ ˜˜0Jšœœ˜:—Jšœ%œŸ4˜_Jšœ˜—Jšœœ˜—šœœ œ˜$Jšœ1Ÿ˜LJšœœ˜——JšœŸ˜!J˜—šžœ œœ˜LJšœ-œ˜5Jšœ-˜:šœœ˜šœ˜˜0Jšœœ˜—˜GJšœœ˜—Jšœ%œ˜*Jšœ˜—šœ œ œ˜'šœ ˜˜0Jšœœ˜:—˜GJšœœ,˜H—Jšœ%œŸ4˜_Jšœ˜—Jšœœ˜—šœœ œ˜$šœ œŸ˜,J˜&J˜>Jšœ˜—Jšœœ˜——JšœŸ˜!—J˜šžœ œœ˜KJšœ-œ˜5Jšœ+˜8šœœ˜šœ˜˜Jšœ.œ˜5—˜%šœEœ˜MJšœ5œ˜;—Jšœœ˜ —Jšœ$œ˜)Jšœ˜—šœ œ œ˜'šœ ˜˜Jšœ.œ!˜S—˜%šœEœ˜M˜Jšœœ+˜G——Jšœœ˜ —Jšœ$œŸ4˜^Jšœ˜—Jšœœ˜—šœœ œ˜$šœ œŸ˜+J˜#šœE˜KJ˜>—šœœ˜ šœ˜!Jšœ8™8Jšœ$œ˜)—Jšœ%œ˜+Jšœ˜—Jšœ˜—Jšœœ˜——JšœŸ˜ J˜J˜—šœ3™3J˜—šžœ œ˜Jšœ"œœ˜4˜BJšœœ-˜I—˜LJšœœœ˜3—˜˜7Jšœœ˜9J˜šœœ5˜EJšœœ˜(——Jšœœ|œ™—J˜T˜:Jšœœ!˜=˜šœC˜EJšœœ˜:———JšœŸ˜!J˜—šžœ œ˜˜7Jšœœ˜9J˜šœœ5˜EJšœœ˜(——Jšœœ|œ™—J˜T˜:Jšœœ!˜=˜šœC˜EJšœœ˜:———JšœŸ˜!J˜—šžœ œ˜=Jšœœœ˜+Jšœœœ˜,Jšœœœ˜Jšœ1˜>Jšœœœ˜%˜CJšœœ-˜I—˜MJšœœœ˜3—J˜PJšœœ|œ™—J˜V˜˜7Jšœœ˜9J˜šœœ5˜EJšœœ˜(——Jšœœ|œ™—J˜T˜:Jšœœ!˜=˜šœC˜EJšœœ˜:———JšœŸ˜!J˜—šžœ œ˜:J˜$Jšœœœ˜+Jšœœœ˜,Jšœœ˜"Jšœœ˜&Jšœœœ˜Jšœ+˜8Jšœ"œœ˜4˜@Jšœœ-˜I—˜JJšœœœ˜3—˜:Jšœœ+˜G—˜BJšœœ/˜K—šœœ˜!šœ ˜˜6J˜"—˜6Jšœœ˜9J˜šœœ5˜EJšœœ˜(——Jšœ˜—Jšœœ˜—Jšœœ|œ™—J˜S˜9Jšœœ!˜=˜šœC˜EJšœœ˜:———JšœŸ˜ J˜J˜—Jšœ™Jšœ™Jšœ™J˜šžœ œ˜J˜5Jšœnœ/™¢Jš˜J™[J˜B˜šœ œ ˜Jšœœœ˜!Jšœ˜——JšœŸ˜#J˜—šžœ œ˜%Jšœ!œ˜*Jšœ!œœ˜/Jš œœœœœœ˜QJ˜Jšœz™~J˜Jšœ œœ0˜JJšœ œœ˜Jšœœœ˜!Jšœ œœ˜J˜ Jšœ œœ˜-J˜4J˜#J˜EJ˜˜ Jšœ œ˜:—˜'J˜2J˜Jšœ œ œ/œ˜e—J˜AJ˜.JšœŸ˜J˜—šžœ œ#œ˜TJšœœœœ˜H˜*J˜Bšœ œ ˜Jšœœœ˜!Jšœ˜——JšœŸ ˜%J˜—šžœ œ˜;Jšœ˜)Jšœ œ˜Jšœ œœ8˜ZJšœ œœ˜3Jšœ œ œ˜Ršœœ.˜;J˜#Jšœ œ˜&Jšœœ˜.—JšœŸ˜!J˜—šžœ œ˜8J˜$Jšœ œ˜Jš œœ œœœœ˜AJšœ!˜.Jšœœ˜&J˜9J˜Jšœ( œœ˜;Jšœ% œœ˜9Jšœ&Ÿ8˜^Jšœ&Ÿ(˜NJ˜šœ˜J˜———šœŸ;˜>šœ˜$J˜šœ0˜4J˜)J˜J˜%J˜%J˜)J˜%J˜#Jšœœ˜—J˜—Jšœ;™;šœ˜Jšœœ˜Jšœœœœ˜4—JšœH™Hšœ˜J˜——Jšœœ˜-Jšœœ˜-JšœŸ˜—J˜šžœ œ#œ˜LJšœœœ œ˜=Jšœ œ˜šœœœ˜:J˜—Jšœœœ˜4šœ'œ ˜9šœ˜J˜+JšœŸœ˜—Jšœ˜—J˜Jšœ œ œ˜TšœœZ œ(˜ž˜/Jšœ+˜2——JšœŸ˜J˜—šž"œ œ˜CJšœ œœœ˜3Jšœœ˜0Jšœ œ˜šœœœ˜?J˜—Jšœœœ˜9šœ'œ ˜9Jšœœœ˜Jšœ˜—J˜Jšœ œ œ˜^šœœZ œ-˜£šœœ˜ Jšœœ˜——JšœŸ$˜)J˜—šžœ œ#œ˜KJ˜.Jšœ'˜3Jšœ œ˜šœœœ˜:J˜—Jšœœœ˜4šœ'œ ˜9šœ˜Jšœ œŸœ˜—šœ˜J˜——Jšœ œ œ˜Tšœ˜šœ˜J˜8Jšœ œ˜"šœ˜J˜Jšœ˜———JšœŸ˜J˜—šžœ œ#œ˜KJš œ œœœœ˜=Jšœœœ˜-J˜9˜(J˜4J˜Jšœ œ œœ˜H—JšœŸ˜J˜—šžœ œ#œ˜PJšœœœœ˜D˜&J˜>šœ œ ˜Jšœœœ˜!Jšœ˜——JšœŸ˜!J˜—šžœ œ#œ˜SJš œœœœœœ˜PJš˜˜0J˜4J˜Jšœ œ œœ˜H—JšœŸ˜$J˜—šžœ œ#œ˜TJšœœœ!œ˜P˜2J˜:šœ œ ˜Jšœœœ˜!Jšœ˜——JšœŸ ˜%J˜—šžœ˜ Jšœ™JšŸEœ˜MJ˜šžœ œ0˜>Jšœ˜%J˜2Jšœœ1˜JJ˜—šœ*˜0JšœCŸ ˜c—šœ˜ Jšœ œœ˜,˜*Jš œœ/˜VJ˜—šœœœ˜&šœ'˜-˜J˜.——š˜J˜*—Jšœ˜—˜(J˜/—J˜Jšœœ˜3Jšœ˜—JšœŸ˜J˜—Jšžœ œ0˜O™ÄJ˜Jšœ œ7˜HJ˜šž œ œœ˜>J˜6J˜%˜˜šœ ˜J˜J˜4Jšœ˜——J˜—JšœŸ˜—šœ ˜šœœ ˜&Jšœœ˜Jšœ;Ÿ:˜uJ˜3Jšœœ˜—šœœ ˜'J˜9Jšœœ˜J˜3Jšœœ˜—šœ œ ˜!J˜IJšœ œ˜Jšœœ˜—šœœ ˜&JšœœŸ,˜NJ˜/J˜&Jšœœ˜—šœ œ ˜ J˜IJ˜3Jšœœ˜—Jšœœ˜—JšœŸ˜J˜—šžœ œ˜G˜(Jšœœ ˜—˜J˜)—˜J˜)—š˜šœ ˜J˜6J˜%˜J˜0—˜J˜0—Jšœ˜——JšœŸ ˜%J˜J˜——šœ5™5Jšžœ œ˜—šœ5™5Jš˜šœ œ œ˜-Jšœ=™=Jšœ™šŸœ˜J˜/—šŸœ˜J˜E—šŸœ˜J˜,—šŸœ˜J˜1—šŸœ˜J˜?—šŸœ˜J˜K—šŸ0œ˜3J˜L—šŸœ˜J˜E—šŸœ˜J˜E—šŸœ˜J˜=—šŸœ˜J˜:—šŸ œ˜ J˜Q—šŸ œ˜ J˜N—šŸœ˜J˜E—šŸœ˜J˜B—šŸœ˜J˜C—šŸœ˜J˜@—šŸœ˜J˜K—šŸœ˜J˜C—šŸœ˜J˜I—šŸœ˜J˜F—šŸœ˜J˜T—šŸœ˜J˜C—šŸœ˜J˜C—šŸœ˜J˜6—šŸœ˜J˜I—šŸœ˜!J˜NJ˜—J˜—˜Jšœ œ ˜0—JšœŸ˜J˜J˜šœM™MJ˜—šžœ˜1Jšœœ˜4JšœŸ˜——˜šœžœ˜DJšœœ˜4JšœŸ˜J˜—šžœ˜/J˜?šœ˜Jšœœ˜>Jšœ<™<—JšœŸ˜—J˜J˜)šžœ˜1šœ˜Jšœœ ˜.J˜9Jšœ¡™¡—JšœŸ˜J˜—šžœ˜,J˜?šœ˜Jšœœ˜8Jšœœ˜,—JšœŸ˜J˜—Jšžœ˜"Jšœ8™8Jšœ0™0Jšœ8™8šœ™Jš˜šœ˜Jšœ5˜8Jšœœ˜,—JšœŸ˜J˜—šžœ˜(JšœŸE˜KJ˜?Jšœœœœ˜/Jš œœ œœœ˜'Jšœ œ˜™~˜0Jšœ˜!—Jšœœœ˜—JšœŸ˜J˜—šžœ˜6J˜?šœ˜Jšœ˜Jšœ#˜)Jšœ&˜)J˜ —JšœŸ˜#J˜—šžœ˜5J˜?šœ˜Jšœ˜Jšœ"˜%Jšœ&˜)J˜ —JšœŸ˜"——˜šžœ˜,šœ˜Jšœ˜Jšœ?˜EJ˜ —JšœŸ˜——˜šžœ˜+šœ˜Jšœ˜Jšœ>˜AJ˜ —JšœŸ˜——˜šžœ˜+šœ˜Jšœ˜JšœB˜EJ˜ —JšœŸ˜——˜šžœ˜*šœ˜Jšœ˜JšœB˜EJ˜ —JšœŸ˜——˜šžœ˜,J˜Hšœ œ˜šœ œ˜Jšœœœ˜3Jšœœ˜0—Jšœœœ˜—JšœŸ˜——˜šžœ˜.J˜?šœ œ˜˜Jšœœœ˜6šœ œœ˜-J˜Hšœ œ˜šœ œ˜)J˜—Jšœœœ˜—š˜J˜——Jšœœœ˜—Jšœœœ˜—JšœŸ˜J˜—šœžœ˜4Jš˜šœ˜Jšœ2œ˜6Jšœ œ˜—JšœŸ˜——˜šž œ˜!JšœŸ,˜2Jšœœœ˜;JšœŸ˜J˜—šžœ˜*Jšœœ ˜3Jšœ6˜9JšœŸ˜J˜—šžœ˜,šœ˜J˜5—JšœŸ˜J˜—š ž œ œœœ˜/Jšœ;˜AJšœŸ ˜J˜—š ž œ œœ œ˜7Jšœ,˜2JšœŸ ˜J˜—š ž œ œœ œ˜7Jšœ,˜2JšœŸ ˜J˜—Jšœ+™+šžœ œ˜&Jšœ˜%Jšœ/œ˜9Jšœœ1˜JJ˜—š žœ œœœœœ˜HJšœ$˜*J˜—Jšœ˜Jšœ˜J˜g—˜¬J˜r—J˜LJ˜BJ˜yJ˜OJ˜D˜PJ˜?—Jšœ§œ˜®Jšœ@œ8œ˜J˜F˜XJ˜”—J˜Ÿ˜=J˜PJšœ$œ9˜_—Jšœ^œ˜cJ˜+J˜`˜GJšœ—œœ ˜¬—˜;Jšœ$œœj˜°J˜u—Jšœnœœ ˜ƒJ˜¹J˜WJ˜8J˜vJ˜^J˜ÖJ˜—…—ôzEØ