DIRECTORY Commander USING [CommandProc, Register], Rope USING [ROPE], FS USING [StreamOpen], IO USING [card, Close, GetTokenRope, int, PutF, RIS, rope, STREAM]; Trans106: CEDAR PROGRAM IMPORTS IO, Commander, FS = BEGIN ROPE: TYPE = Rope.ROPE; Trans106Proc: Commander.CommandProc = BEGIN i: CARD; x, y: INT; stream: IO.STREAM _ IO.RIS[cmd.commandLine]; outputName: ROPE _ IO.GetTokenRope[stream].token; out: IO.STREAM _ FS.StreamOpen[outputName,$create]; IO.PutF[out, "4096 2048 -300 -375 200 5775 -100 -400 TRANS106 PARC-TRANS106 J\n"]; FOR i IN [1..53] DO x_ ((i-1)/4)*100; y _ -(((i-1) MOD 4)* 100); IF y = 0 AND x =0 THEN { IO.PutF[out, "%g %g P%g 255 0 %g 0 24\n", IO.int[x], IO.int[y], IO.card[i], IO.card[i]]; } ELSE IF y = -100 AND 100 < x AND x < 1200 THEN { IO.PutF[out, "%g %g GND 1 0 %g 5 26\n", IO.int[x], IO.int[y], IO.card[i]]; } ELSE IF y = 0 AND 300 < x AND x < 1000 THEN { IO.PutF[out, "%g %g VCC 1 0 %g 4 27\n", IO.int[x], IO.int[y], IO.card[i]]; } ELSE { IO.PutF[out, "%g %g P%g 255 0 %g 0 25\n", IO.int[x], IO.int[y], IO.card[i], IO.card[i]]; }; ENDLOOP; FOR i IN [1..53] DO x_ ((i-1)/4)*100; y _ -(((i-1) MOD 4)* 100)-400; IO.PutF[out, "%g %g P%g 255 0 %g 0 25\n", IO.int[x], IO.int[y], IO.card[i+53], IO.card[i+53]]; ENDLOOP; IO.Close[out]; IO.PutF[cmd.out, "File %g Written\n", IO.rope[outputName]]; END; Commander.Register[ key: "Trans106", proc: Trans106Proc, doc: "Generates a Trans106.part file\n"]; END. JFile: Trans106.mesa Christophe Cuenod March 30, 1987 1:50:07 pm PST Κ–i(firstHeadersAfterPage) {1} .cvx .def (firstPageNumber) {1} .cvx .def (oneSidedFormat) {.false} .cvx .def– "Cedar" style˜– "Cedar" stylešΟnœ™Icodešœ/™/—unitšΟk ˜ Kšœ žœ˜(Kšœžœžœ˜Kšžœžœ˜Kšžœžœ(žœžœ˜C—šœžœž˜Kšžœžœ žœ˜—Lšž˜Lšžœžœžœ˜š œž˜+Jšœžœ˜Iprogramšœžœ˜ Mš œžœžœžœžœ˜,Mšœ žœžœ˜1Kšœžœžœžœ ˜3JšžœP˜Ršžœžœ žœ˜J˜Jšœ žœ ˜šžœžœžœ˜Jš žœ(žœ žœ žœ žœ ˜XJ˜—š žœžœ žœ žœ žœ˜0Jšžœ&žœ žœ žœ ˜JJ˜—š žœžœžœ žœ žœ˜-Jšžœ&žœ žœ žœ ˜JJ˜—šžœ˜Jš žœ(žœ žœ žœ žœ ˜XJ˜—Jšžœ˜—šžœžœ žœ˜J˜Jšœ žœ˜Jš žœ(žœ žœ žœ žœ ˜^Jšžœ˜—Jšœ˜J˜Jšžœ ˜Jšžœ(žœ˜?Jšžœ˜—šœ˜JšœN˜N—Iprocšžœ˜—…—€