DFPorter.mesa
Copyright Ó 1989, 1991 by Xerox Corporation. All rights reserved.
Michael Plass, March 5, 1991 10:44 pm PST
DIRECTORY
DFUtilities,
IO USING [STREAM],
SymTab USING [Ref],
Rope USING [ROPE];
DFPorter: CEDAR DEFINITIONS
~ BEGIN OPEN DFUtilities, Rope;
LORA: TYPE ~ LIST OF REF ANY;
DFContents: TYPE ~ RECORD [name: ROPE, contents: LORA, distributed: BOOL ¬ FALSE];
FullFileItem: TYPE ~ RECORD [
directory: REF DirectoryItem,
file: REF FileItem,
sortClass: CARD ¬ 0
];
OrderedCommentItem: TYPE ~ RECORD [
order: CARD,
comment: REF CommentItem
];
ReadDFs: PROC [dfNames: LIST OF ROPE, followImports: BOOL ¬ FALSE] RETURNS [LIST OF DFContents];
SelfName: PROC [df: DFContents] RETURNS [ROPE];
ShortName: PROC [fileName: Rope.ROPE] RETURNS [ROPE];
BaseName: PROC [fileName: Rope.ROPE] RETURNS [ROPE];
StripVersion: PROC [fileName: Rope.ROPE] RETURNS [ROPE];
CanonicalFileName: PROC [fileName: Rope.ROPE] RETURNS [atom: ATOM];
ReadDF: PROC [name: ROPE] RETURNS [DFContents];
DistributeDF: PROC [df: DFContents] RETURNS [DFContents];
FactorDF: PROC [df: DFContents] RETURNS [DFContents];
WriteDF: PROC [df: DFContents];
MergeUsingLists: PROC [a, b: REF UsingList ¬ NIL] RETURNS [new: REF UsingList];
SortDF: PROC [df: DFContents] RETURNS [DFContents];
ExpandIncludes: PROC [df: DFContents] RETURNS [DFContents];
MkFile: PROC [filename: ROPE, root: BOOL ¬ FALSE] RETURNS [REF FileItem];
MkFull: PROC [dir: REF DirectoryItem, file: REF FileItem, sortClass: CARD ¬ 0] RETURNS [REF FullFileItem];
MkComment: PROC [rope: ROPE] RETURNS [REF CommentItem];
CouldntFind: SIGNAL [shortName, usingDF: ROPE];
MultiplyDefinedShortname: SIGNAL [shortName, df1, df2: ROPE];
GetDefinerTable: PROC [dfName: ROPE] RETURNS [x: SymTab.Ref];
BuildInversion: PROC [df: DFContents] RETURNS [SymTab.Ref];
IsImplementation: PROC [fileName: ROPE] RETURNS [impl: BOOL ¬ TRUE];
SplitIntoSuites: PROC [world: ROPE, component: ROPE, df: DFContents, definerTable: SymTab.Ref ¬ NIL, quickAndDirty: BOOL ¬ FALSE, intermediateSource: BOOL ¬ TRUE, intermediateObject: BOOL ¬ TRUE] RETURNS [result: LIST OF DFContents ¬ NIL];
PrintNames: PROC [stream: IO.STREAM, groupFormat: ROPE, itemFormat: ROPE, stripVersion: BOOL, list: LIST OF LIST OF DFContents];
Examples:
groupFormat~"Do %g\n", itemFormat~"%g "
groupFormat~"%g\n", itemFormat~"Include %g Of ~=\n "
PrintMultiplyDefinedWarning: PROC [stream: IO.STREAM, shortName, df1, df2: ROPE];
NFSRemoteFileNameFromFSName: PROC [rope: ROPE] RETURNS [ROPE];
END.