MiscUtilities.mesa
Copyright (C) Xerox Corporation 1984, 1985, 1986. All rights reserved.
Last edited by Jacks 7-Oct-85 17:41:53
Ruseli Binsol: December 11, 1986 12:17:02 pm PST
<<The procs in this interface are miscellaneous utilities that are used by modules across different layers (configs) of the Print Service.>>
DIRECTORY
BansheeStatus USING [Type],
D1Status USING [Type],
PrincOps USING [PageCount],
FaxStatus USING [Type],
FX3500Status USING [Type],
NSPrint USING [Paper],
PSAsyncMsg USING [Msg],
PaperTypes USING [Paper],
PrintingTypes USING [Option],
RavenStatus USING [Type],
TargetPSStatus USING [Communication];
MiscUtilities: CEDAR DEFINITIONS = BEGIN
***** CONSTANTS *****--
pagesPerBandBuffer: PrincOps.PageCount = 16;
unlimitedPrintingCutOffMemSize: PrincOps.PageCount = 2560;
<<Unlimited printing is only available if real memory size is GREATER than this page limit. This value is used by CalcPagesForBandBuffers.>>
***** SIGNALS and ERRORS *****--
IllegalPaperSize: SIGNAL;
***** PROCEDURES *****--
CalcRMPagesForMarker: PROCEDURE [bandBufferSize: PrincOps.PageCount]
RETURNS [maxPages: PrincOps.PageCount];
<<Calculates the maximum amount of real memory to reserve
for the marker, based on real memory size.>>
CalcPagesForBandBuffers: PROCEDURE [printingOption: PrintingTypes.Option ← unknown,
unlimitedPrintingEnabled: BOOLEANFALSE]
RETURNS [norm: PrincOps.PageCount];
<<Calculates the number of pages to reserve for band buffers based
on the current real memory size, the current printing option
and whether or not unlimited printing is enabled.>>
STATUS PROCS: return message keys for the various printer statuses:
KeyForBansheeStatus: PROCEDURE [bansheeStatus: BansheeStatus.Type]
RETURNS [PSAsyncMsg.Msg];
KeyForD1Status: PROCEDURE [d1Status: D1Status.Type]
RETURNS [PSAsyncMsg.Msg];
KeyForFaxStatus: PROCEDURE [faxStatus: FaxStatus.Type]
RETURNS [PSAsyncMsg.Msg];
KeyForFX3500Status: PROCEDURE [fx3500Status: FX3500Status.Type]
RETURNS [PSAsyncMsg.Msg];
KeyForRavenStatus: PROCEDURE [ravenStatus: RavenStatus.Type]
RETURNS [PSAsyncMsg.Msg];
KeyForCommunicationStatus: PROCEDURE [remoteStatus: TargetPSStatus.Communication]
RETURNS [PSAsyncMsg.Msg];
NSPrintPaperToPaperTypes: PROCEDURE [nsPaper: NSPrint.Paper]
RETURNS [ptPaper: PaperTypes.Paper];
Will raise IllegalPaperSize if nsPaper = [knownSize[dontUse]].
PaperTypesToNSPrintPaper: PROCEDURE [ptPaper: PaperTypes.Paper]
RETURNS [nsPaper: NSPrint.Paper];
END.
LOG when/who/what
17-Oct-84 14:43:29 - Jacks - Created.
13-Nov-84 13:27:42 - Jacks - Made use of StatusTypes interface; added KeyForRemoteStatus.
14-Jun-85 10:20:25 - Jacks - Added copyright notice; updated to PS Euclid interfaces; added KeyForD1Status.
16-Jul-85 17:34:24 - Jacks - Converted to new PSAsyncMsg.
6-Aug-85 16:47:59 - Jacks - Added CalcPagesForBandBuffers and changed CalcRMPagesForMarker.
6-Sep-85 15:44:26 - Jacks - Added pagesPerBandBuffer.
24-Sep-85 11:01:52 - Jacks - Replaced NSPrintToPaperTypesPaperSize and PaperTypesToNSPrintPaperSize with NSPrintPaperToPaperTypes and PaperTypesToNSPrintPaper; deleted PaperSizeUnknown; added IllegalPaperSize.
7-Oct-85 17:41:34 - Jacks - Added unlimitedPrintingCutOffMemSize and added input parms to CalcPagesForBandBuffers.