-- ProcBcds.Mesa, last edit 18-Mar-82 14:08:05 -- Pilot 6.0/ Mesa 7.0 DIRECTORY BcdDefs: TYPE USING [Base, BCD, VersionStamp], BcdOps: TYPE USING [NameString], File: TYPE USING [Capability, nullCapability], FileParms: TYPE USING [SymbolSpace], IFSFile: TYPE USING [FileHandle], Space: TYPE USING [Handle]; ProcBcds: DEFINITIONS = { -- these are procedures the user provides -- usually as parameters to PrintDepends RelCode: TYPE = {imports, exports, otherdepends, symbolsfile, canignore, defstype, sourcefile}; -- ProcBcds.PrintDepends calls ProcMod and then ProcDep -- as many times as needed -- sourcefile ends in either a .config or .mesa -- uns is usually a DBTuples.Tuple ProcMod: TYPE = PROC[sourcefile, smodulename: STRING, bcdvers, sourcevers, creatorvers: BcdDefs.VersionStamp, isdefns, isconfig, iscodebound, istablecompiled, altoCode, boundsChecks, cedarSwitch, crossJump, linksInCode, nilChecks, sortByUsage: BOOL, symbolSpace: FileParms.SymbolSpace, rtVersionID: CARDINAL] RETURNS[uns: UNSPECIFIED]; -- uns is passed thru from ProcMod result -- the user generates uns, we call procDep with it -- filename normally has ".bcd" at the end ProcDep: TYPE = PROC[relcode: RelCode, smodulename, filename: STRING, bcdvers: BcdDefs.VersionStamp, uns: UNSPECIFIED]; Innards: TYPE = POINTER TO InnardsObject; InnardsObject: TYPE = RECORD[ cap: File.Capability _ File.nullCapability, fh: IFSFile.FileHandle _ NIL, bcdheaderspace: Space.Handle, bcd: LONG POINTER TO BcdDefs.BCD _ NIL, upperLimit: CARDINAL _ NULL, -- this is # words available tb: BcdDefs.Base _ NULL, ssb: BcdOps.NameString _ NULL, evb: BcdDefs.Base _ NULL, spb: BcdDefs.Base _ NULL, fpb: BcdDefs.Base _ NULL, ctb: BcdDefs.Base _ NULL, mtb: BcdDefs.Base _ NULL, itb: BcdDefs.Base _ NULL, etb: BcdDefs.Base _ NULL, sgb: BcdDefs.Base _ NULL, ftb: BcdDefs.Base _ NULL, ntb: BcdDefs.Base _ NULL ]; -- this procedure takes a file name and calls the three procedure -- variables that are its last arguments on file "sfn" -- you must do an InstallAddressesBcd[] first -- I will call procMod. -- Then I will call procDep for each dependency for both Defs and Impls. -- if print is TRUE, it will print out the number of imports and exports -- if calltwice is TRUE, it will call ProcMod twice to help with -- clustering in the database PrintDepends: PROC[innards: Innards, procMod: ProcMod, procDep: ProcDep, print, calltwice, less: BOOL, bcdfilename: LONG STRING] RETURNS[success, isconfig, isdefns: BOOL, nimp, nexp, ntype: CARDINAL]; -- defined in ProcBcdsImpl -- the way this works is that you call ReadInSegmentsBcd -- with innards.cap filled in with the cap of a local file -- or call it with the fh of a remote file -- uses innards.cap or innards.fh, sets innards.bcdheaderspace and .bcd ReadInSegmentsBcd: PROC[innards: Innards]; -- raised by ReadInSegmentsBcd InvalidBcd: SIGNAL; -- invalid bcd version ID -- uses innards.bcd, set other bases InstallAddressesBcd: PROC[innards: Innards]; -- uses innards.bcdheaderspace -- does NOT close fh UnstallBcd: PROC [innards: Innards]; -- innards.cap and space initted from ReadInSegmentsBcd -- called by DescribeBcdImpl PrintSymbolsFile: PROC[innards: Innards, procDep: ProcDep, uns: UNSPECIFIED, print, allsyms, less: BOOL, bcdfilename: LONG STRING] RETURNS[success: BOOL, ntype: CARDINAL]; GetModuleName: PROC[innards: ProcBcds.Innards, interfacename: STRING] RETURNS[success: BOOL]; -- uses heuristics IsRealTime: PROC[stamp: LONG CARDINAL] RETURNS[isrealtime: BOOL]; }.