-- MDUtil.Mesa, last edit July 1, 1982 2:16 pm
-- Pilot 6.0/ Mesa 7.0
-- utility definitions file for the modeller (exported by MDUtilImpl)

DIRECTORY
  ExecOps: TYPE USING [Outcome],
  File: TYPE USING [Capability],
  MDModel: TYPE USING [MODELSymbol, Symbol, SymbolSeq],
  IO: TYPE USING[Handle],
  Rope: TYPE USING[ROPE, Text],
  Stream: TYPE USING [Handle],
  TypeScript: TYPE USING[TS];

MDUtil: DEFINITIONS = {

-- print / write out a model from symbolseq
PrintNewModelStream: PROC[symbolseq: MDModel.SymbolSeq, sproot: MDModel.Symbol, 
	outsh: Stream.Handle, title: Rope.Text, dontdefault: BOOL, 
	typeScript: TypeScript.TS, ttyout: IO.Handle];

-- print/ write out a .config from a model in symbolseq
MakeConfig: PROC[spmodel: MDModel.MODELSymbol, symbolseq: MDModel.SymbolSeq, 
	outsh: Stream.Handle, createtime: LONG CARDINAL, 
	ttyout: IO.Handle, fileparameters: LONG STRING];

RunBinder: PROC[cmd: STRING, typeScript: TypeScript.TS, ttyin, ttyout: IO.Handle,
	msgout: IO.Handle, confirm: REF BOOL] RETURNS[outcome: ExecOps.Outcome];

SetModelCreateProperty: PROC[configcap: File.Capability, create: LONG CARDINAL];

GetModelCreateProperty: PROC[configcap: File.Capability] 
	RETURNS[create: LONG CARDINAL];

-- must call this!!
SupportInit: PROC[symbolseq: MDModel.SymbolSeq, typeScript: TypeScript.TS,
	ttyout: IO.Handle];

-- cedar support
AnyR: PROC[str: Rope.ROPE, ch: CHAR] RETURNS[BOOL];

-- neither of in, out may be NIL
IOConfirm: PROC[dch: CHAR, in, out: IO.Handle] RETURNS[CHAR];

-- lock and unlock of the msg window
AcquireMsgLock, ReleaseMsgLock: PROC;

}.