-- Copyright (C) 1984, 1985 by Xerox Corporation. All rights reserved. -- Transport Mechanism Filestore - DEFS for bit maps -- -- A.D.Birrell December 14, 1978 11:10 AM -- -- HGM, 15-Sep-85 0:53:09 LONGs -- Hankins, 11-Jun-84 16:54:26 Klamath update (removing Bravo format chars) BitMapDefs: DEFINITIONS = BEGIN MapLevel: TYPE = RECORD [ level: CARDINAL, next: Map, data: LONG DESCRIPTOR FOR ARRAY OF WORD]; Map: TYPE = LONG POINTER TO MapLevel; MapIndex: TYPE = CARDINAL; Set: PROCEDURE [Map, MapIndex]; -- sets bit 'on' -- Test: PROCEDURE [Map, MapIndex] RETURNS [BOOLEAN]; -- returns TRUE iff bit is 'on' Clear: PROCEDURE [Map, MapIndex]; -- sets the specified bit 'off' FindFree: PROCEDURE [Map] RETURNS [MapIndex]; -- finds the first 'off' bit in the map, sets it 'on' (?) and returns its number -- Create: PROCEDURE [CARDINAL] RETURNS [Map]; -- allocates a map of specified size and sets all its bits off' -- END.