DIRECTORY Commander USING [CommandProc, Register], ExpertLibRead USING [LibTable, PinNumber, ReadLibFile, RelativePinPosition], IO USING [GetTokenRope, card, int, PutF, RIS, rope, STREAM], Rope USING [ROPE], IntHashTable USING [EachPairAction, Pairs]; ReadLib: CEDAR PROGRAM IMPORTS Commander, ExpertLibRead, IO, IntHashTable = BEGIN ROPE: TYPE = Rope.ROPE; ReadLibProc: Commander.CommandProc = BEGIN PrintOneLine: IntHashTable.EachPairAction ~ { IF ExpertLibRead.PinNumber[libTable, key] >1 THEN { IO.PutF[cmd.out, "LibEntry: %g\tpin1: %g %g\tpin2: %g\t%g\n", IO.card[key], IO.int[ExpertLibRead.RelativePinPosition[libTable, key, 1].x], IO.int[ExpertLibRead.RelativePinPosition[libTable, key, 1].y], IO.int[ExpertLibRead.RelativePinPosition[libTable, key, 2].x], IO.int[ExpertLibRead.RelativePinPosition[libTable, key, 2].y]]; } ELSE { IO.PutF[cmd.out, "LibEntry: %g\tpin1: %g %g\n", IO.card[key], IO.int[ExpertLibRead.RelativePinPosition[libTable, key, 1].x], IO.int[ExpertLibRead.RelativePinPosition[libTable, key, 1].y]]; }; }; libTable: ExpertLibRead.LibTable; stream: IO.STREAM _ IO.RIS[cmd.commandLine]; inputName: ROPE _ IO.GetTokenRope[stream].token; IO.PutF[cmd.out, "Reading %g\n", IO.rope[inputName]]; libTable _ ExpertLibRead.ReadLibFile[inputName]; [] _ IntHashTable.Pairs[libTable, PrintOneLine]; END; Commander.Register[ key: "ReadLib", proc: ReadLibProc, doc: "Read an Expert .lib file"]; END. „ReadLib.mesa Christophe Cuenod April 1, 1989 4:42:40 pm PST Reads a .lib file and output the results on the screen for test ΚQ– "Cedar" style–i(firstHeadersAfterPage) {1} .cvx .def (firstPageNumber) {1} .cvx .def (oneSidedFormat) {.false} .cvx .def˜– "Cedar" stylešœ ™ Icodešœ.™.—J™Iunit™?šΟk ˜ Kšœ œ˜(Kšœœ9˜LKšœœ!œœ˜œ=œ>œ=˜ΚK˜—šœ˜Kšœ.œ œ>œ=˜½K˜K˜—K˜—K˜Kšœ!˜!Kš œœœœœ˜,Kšœ œœ˜0Jšœœ˜5Jšœ0˜0šœ0˜0J˜—Jšœ˜—šœ˜JšœD˜D—Iprocšœ˜—…—Žc