<> <> <> <<>> <> <> <<>> DIRECTORY Rope USING [ROPE], UnixTapeOps USING [TapeHandle, Density], TapesCommon USING [FileHandleList, FileHandle], BasicTime USING [GMT], ImagerPixel USING [PixelBuffer]; CrosfieldTape: CEDAR DEFINITIONS ~ BEGIN ROPE: TYPE ~ Rope.ROPE; PixelBuffer: TYPE ~ ImagerPixel.PixelBuffer; TapeHandle: TYPE ~ UnixTapeOps.TapeHandle; <> FileSpec: TYPE = REF FileSpecRep; FileSpecRep: TYPE = RECORD[ pixelsPerInch: PixelsPerInch, nLines, nPixels: NAT, note: ROPE, mapPixel: PixelProc ]; PixelsPerInch: TYPE = {ppi300, ppi450, ppi600}; <> FileSpecList: TYPE = LIST OF FileSpec; <> <> <> <> <> <<];>> <> WriteTape: PROC [tapeHandle: TapeHandle, files: FileSpecList, tapeNumber: [1..999] _ 102, name: ROPE] RETURNS [TapesCommon.FileHandleList]; <> <> <> <> <> <> <> <> InitializeTape: PROC [tapeHandle: TapeHandle, files: FileSpecList, tapeNumber: [1..999] _ 102, name: ROPE]; <> AddFileToTape: PROC [tapeHandle: TapeHandle, file: FileSpec, fileNumber, tapeNumber: NAT, inPosition: BOOLEAN _ FALSE] RETURNS [TapesCommon.FileHandle]; <> <> <> <> <> Identity: TYPE ~ REF IdentityRep; IdentityRep: TYPE ~ RECORD [ tapeNumber: [1..999], date: BasicTime.GMT, name: ROPE ]; Directory: TYPE ~ REF DirectoryRep; DirectoryRep: TYPE ~ RECORD [ fileNumber: [1..70], contone: BOOL, color: Color, hRes, vRes: PixelsPerInch, pixelsPerLine: CARDINAL, lines: CARDINAL, createDate: BasicTime.GMT, note: ROPE, tapeNumber: [0..999], linesPerCylinder, sectorsPerLine, cylinders, blocks: CARDINAL ]; Color: TYPE ~ MACHINE DEPENDENT RECORD [ cyan(0:7..7): BOOL _ TRUE, magenta(0:6..6): BOOL _ TRUE, yellow(0:5..5): BOOL _ TRUE, black(0:4..4): BOOL _ TRUE, red(0:3..3): BOOL _ FALSE, green(0:2..2): BOOL _ FALSE, blue(0:1..1): BOOL _ FALSE, ws1(0:0..0): BOOL _ FALSE, -- filler negativeImage(0:15..15): BOOL _ FALSE, -- low values represent dark print/film ws2(0:14..14): BOOL _ FALSE, -- filler bytesPerPixel(0:11..13): [0 .. 7) _ 4, ws3(0:8..10): [0 .. 7) _ 0 ]; ReadTapeIdentity: PROC[tapeHandle: TapeHandle] RETURNS[Identity]; <> ReadMasterDirectory: PROC[tapeHandle: TapeHandle] RETURNS [nFiles: NAT, masterDirectory: LIST OF Directory]; <> ReadFile: PROC[tapeHandle: TapeHandle, fileNumber: [1..70] _ 1] RETURNS[Directory]; <> FileTo4AIS: PROC [tapeHandle: TapeHandle, fileNumber: [1..70] _ 1, aisRootName: ROPE, mapPixel: PixelProc, reduce: NAT _ 4] RETURNS [Directory]; <> < 75 spi)>> <> <> SizeOfFile: PROC [fileSpec: FileSpec, density: UnixTapeOps.Density _ GCR6250] RETURNS [sizeInFeet: REAL]; <> <<>> SizeOfHeader: PROC [density: UnixTapeOps.Density _ GCR6250] RETURNS [sizeInFeet: REAL]; <> <<>> SizeOfList: PROC [files: FileSpecList, density: UnixTapeOps.Density _ GCR6250] RETURNS [sizeInFeet: REAL]; <> <> PixelProc: TYPE = PROC[pixel: BYTE] RETURNS[BYTE]; IdentityByte: PixelProc; CrosfieldToByte: PixelProc; --(DotPercent*2)+25 in theory, use for read ByteToCrosfield: PixelProc; --25+2*100*pixel/255.0 use for write KOToByte: PixelProc; --range [6..245] => [0..255] ByteToKO: PixelProc; --range [0..255] => [6..245] use for write END.