<> <> <<>> <> DIRECTORY Commander USING [CommandProc, Register], ExpertPinRead USING [PinTable, PinInfoList, ReadPinFile], IO USING [GetTokenRope, int, PutF, RIS, rope, STREAM], Rope USING [ROPE], SymTab USING [EachPairAction, Pairs]; ReadPin: CEDAR PROGRAM IMPORTS Commander, ExpertPinRead, IO, SymTab = BEGIN ROPE: TYPE = Rope.ROPE; ReadPinProc: Commander.CommandProc = BEGIN PrintOneLine: SymTab.EachPairAction ~ { pinInfoList: ExpertPinRead.PinInfoList _ NARROW[val]; IF pinInfoList.rest = NIL THEN { IO.PutF[cmd.out, "%g \t%g \tpin %g \tpage %g\n", IO.rope[key], IO.rope[pinInfoList.first.refDes], IO.int[pinInfoList.first.pinNumber], IO.int[pinInfoList.first.pageNumber]]; }; }; pinTable: ExpertPinRead.PinTable; stream: IO.STREAM _ IO.RIS[cmd.commandLine]; inputName: ROPE _ IO.GetTokenRope[stream].token; IO.PutF[cmd.out, "Reading %g\n", IO.rope[inputName]]; pinTable _ ExpertPinRead.ReadPinFile[inputName]; [] _ SymTab.Pairs[pinTable, PrintOneLine]; END; Commander.Register[ key: "ReadPin", proc: ReadPinProc, doc: "Read an Expert .pcb file"]; END.