DEFINITION MODULE iofdefs;

FROM IOFform IMPORT indirectItem, jNode, emptySlot;

EXPORT QUALIFIED initialIndirectItem, initialJnode, initialFreeItem;



(*
	Initial Values for File Items
*)

(* NOTE: The following items are (should be) CONSTANTS!
     The FACC Modula compiler allowed RECORD constants, Modula-2 does not.
     
     Values are assigned in the initialization of the iofdefs IMPLEMENTATION
     	  MODULE.
*)


VAR

     initialIndirectItem:	 indirectItem;
(**** VALUE is:
	  	    0, indirectKind,
		    [* maxIndirect *] (cardinal32(65535, 65535)),
		    [* maxDirectInIndirect *] (cardinal32(65535, 65535)),
		    slotNumber(0,0), slotNumber(0,0),CARDINAL(0),
		    [*INDEXFILLSZ*](0C));
*****)

(*
	initial jNode   --   prototype used by K_create
*)

     initialJnode:		jNode;
(**** VALUE is:
	0,				(* checksum *)
	jNodeKind,			(* kind *)
	[* maxIndirect *] slotNumber(nullPointer,nullPointer),
	[* maxDirectInJnode *] mBlockNumber(nullPointer,nullPointer),
	FILEWRITING,			(* initial state *)
	security(			(* rights *)
	    tiiStruct(0C,0C,bits32({},{}),nullPointer,nullPointer,{},bits32({},{})),
	    seid(nullNsp,0C,0)),	(* subtype seid *)
	slotNumber(0,0),		(* self *)
	fBlockNumber(0,0),		(* high block *)
	0,				(* trailing bytes to ignore *)
	0,				(* link count *)
	timeStamp(0,0),			(* text last mod *)
	[* JNODEFILLSZ *] 0C);		(* filler *)
****)


(*
	initial free item  --  used when releasing slots
*)
	initialFreeItem:	emptySlot;
(**** VALUE is:
	 (0, freeKind, [* EMPTYFILLSZ*](0C));
****)

END iofdefs.
