RunCT: Commander.CommandProc = {
nofArgs: INT ← CommandTool.NumArgs[cmd];
top: CDFrame.Frame ← Complete;
expand: BOOL ← FALSE;
build: LIST OF Rope.ROPE;
write:
LIST
OF Rope.
ROPE ←
LIST[
-- default list of saved shells
"IFUAsmLeftColumn",
"IFUAsmDataColumnCore",
"IFUAsmDataColumn",
"IFUAsmRightColumn"];
list: LIST OF Rope.ROPE;
comlist: LIST OF Rope.ROPE ← CommandTool.ParseToList[cmd].list;
design ← IFUPW.GetDesign[IFUAsm.RefDesign[]];
FOR list ← comlist, list.rest
WHILE list#
NIL
DO
Next:
PROC
RETURNS[next: Rope.
ROPE] =
{IF list.rest=NIL THEN ERROR; list ← list.rest; next ← list.first};
SELECT list.first.Fetch[0]
FROM
'- =>
SELECT list.first.Fetch[1]
FROM
'R, 'r => IF NOT CDFrame.ReadShellFrame[top, Next[]].done THEN ERROR;
'W, 'w => write ← CONS[Next[], write];
'B, 'b => build ← CONS[Next[], build];
'E, 'e => expand ← TRUE;
ENDCASE;
ENDCASE => build ← CONS[list.first, build];
ENDLOOP;
IF build.rest # NIL OR build.first=NIL THEN ERROR;
top ← IFUPWControl.BuildFrame[top, build.first, design].new;
FOR list:
LIST
OF Rope.
ROPE ← write, list.rest
WHILE list#
NIL
DO
top ← CDFrame.WriteShellFrame[top, list.first ].new ENDLOOP;
IF expand
THEN {
IFUPWControl.IncludeRecursiveInDesign[design]; -- make it real
[ ] ← CDIO.WriteDesign[design, build.first]};
IFUPW.AssembleFrame[design, top, NIL, build.first]};