ShowStartTraps.mesa
Copyright Ó 1993 by Xerox Corporation. All rights reserved.
Chauser, March 5, 1993 1:35 pm PST
Willie-s, March 9, 1993 2:21 pm PST
DIRECTORY
Commander,
CommanderOps,
InstallationStartInfo,
Rope,
IO;
ShowStartTraps: CEDAR PROGRAM
IMPORTS Commander, CommanderOps, InstallationStartInfo, IO, Rope
~ BEGIN
ROPE: TYPE ~ Rope.ROPE;
ShowTraps: Commander.CommandProc ~ {
PrintList[cmd.out, InstallationStartInfo.ListStartTraps[], CommanderOps.NextArgument[cmd]];
};
ShowOrder: Commander.CommandProc ~ {
PrintList[cmd.out, InstallationStartInfo.ListStartOrder[], CommanderOps.NextArgument[cmd]];
};
PrintList: PROC[out: IO.STREAM, list: LIST OF ROPE, filter: ROPE] ~ {
FOR r: LIST OF ROPE ¬ list, r.rest WHILE r#NIL DO
IF filter # NIL THEN IF Rope.Find[r.first, filter] # 0 THEN LOOP;
out.PutF1["\t%g\n", [rope[r.first]]];
ENDLOOP;
};
Commander.Register["ShowStartTraps", ShowTraps, "usage: ShowStartTraps {filter - case matters}"];
Commander.Register["ShowStartOrder", ShowOrder, "usage: ShowStartOrder {filter - case matters}"];
END.