2 statusdict /setduplexmode known {
3 false statusdict /setduplexmode get exec
12 /CF /Courier findfont Ps scalefont def
13 /IF /Courier-Oblique findfont Ps scalefont def
14 /BF /Courier-Bold findfont Ps scalefont def
15 /CFs /Courier findfont SPs scalefont def
16 /IFs /Courier-Oblique findfont SPs scalefont def
17 /BFs /Courier-Bold findfont SPs scalefont def
18 /HF /Helvetica findfont Ps scalefont def
19 /Li CFs setfont (1234567890) stringwidth pop def
20 /Nl { /Vpos Vpos Lh sub def } def
21 /Lpt { 0 Vpos moveto } def
24 /Ip { Gb .5 setlinewidth
25 0 Tm moveto 0 Bh neg rlineto Rm 0 rlineto 0 Bh rlineto closepath
26 gsave .98 setgray fill grestore stroke
27 0 0 moveto 0 Bf rlineto Rm 0 rlineto 0 Bf neg rlineto closepath
28 gsave .98 setgray fill grestore stroke
29 0 Bf moveto 0 Tm Bh sub lineto stroke newpath
31 /Cp { Ip .3 setlinewidth newpath
32 Li 0 Bf add moveto Li Tm Bh sub lineto stroke newpath
34 /So { gsave dup stringwidth pop Ps 3 div 0 exch rmoveto 0 rlineto fill grestore } def
35 /Ul { gsave dup stringwidth pop 0 -1 rmoveto 0 rlineto fill grestore } def
36 /Bs { gsave dup show grestore 0.5 0.5 rmoveto show } def
37 <</PageSize [605 806]>> setpagedevice
40 /Helvetica findfont 10 scalefont setfont
41 (Trueprint 3.6.5) show
43 /Helvetica-Bold findfont 20 scalefont setfont
46 (Printed on: Fri Apr 16 03:00:00 1982) show
48 (Last page number: 12) show
49 70 650 moveto (File: test1.c) show
50 70 625 moveto (File: test7) show
51 70 600 moveto (File: test6.c) show
55 15 405 translate .5 .5 scale
56 Ip HF setfont /Ypos Tm Bh sub Ps 2 div add def
58 (Fri Apr 16 03:00:00 1982) show currentpoint pop dup Rm Ps sub (Page 1) stringwidth pop sub dup Ypos moveto
60 exch sub 2 div add (Function Index) stringwidth pop 2 div sub Ypos moveto
62 HF setfont /Ypos Ps 2 div def
64 (Fri Apr 16 03:00:00 1982) show currentpoint pop dup Rm Ps sub (Page 1) stringwidth pop sub dup Ypos moveto
66 exch sub 2 div add (Function Index) stringwidth pop 2 div sub Ypos moveto
68 CF setfont /Vpos Tm Bh sub Ps sub def
69 Lpt( closepipe 2 (test1.c)
71 Lpt( closepipe..................10 (test6.c)) show Nl
72 Lpt( fclosepipe 2 (test1.c)
74 Lpt( fclosepipe.................10 (test6.c)) show Nl
75 Lpt( fopenpipe 2 (test1.c)
77 Lpt( fopenpipe..................10 (test6.c)) show Nl
78 Lpt( openpipe 1 (test1.c)
80 Lpt( openpipe....................9 (test6.c)) show Nl
82 15 30 translate .5 .5 scale
83 Ip HF setfont /Ypos Tm Bh sub Ps 2 div add def
85 (Fri Apr 16 03:00:00 1982) show currentpoint pop dup Rm Ps sub (Page 2) stringwidth pop sub dup Ypos moveto
87 exch sub 2 div add (Function Index) stringwidth pop 2 div sub Ypos moveto
89 HF setfont /Ypos Ps 2 div def
91 (Fri Apr 16 03:00:00 1982) show currentpoint pop dup Rm Ps sub (Page 2) stringwidth pop sub dup Ypos moveto
93 exch sub 2 div add (Function Index) stringwidth pop 2 div sub Ypos moveto
95 CF setfont /Vpos Tm Bh sub Ps sub def
97 304 405 translate .5 .5 scale
98 Ip HF setfont /Ypos Tm Bh sub Ps 2 div add def
100 (Fri Apr 16 03:00:00 1982) show currentpoint pop dup Rm Ps sub (Page 3) stringwidth pop sub dup Ypos moveto
102 exch sub 2 div add (Function Index) stringwidth pop 2 div sub Ypos moveto
103 (Function Index) show
104 HF setfont /Ypos Ps 2 div def
106 (Fri Apr 16 03:00:00 1982) show currentpoint pop dup Rm Ps sub (Page 3) stringwidth pop sub dup Ypos moveto
108 exch sub 2 div add (Function Index) stringwidth pop 2 div sub Ypos moveto
109 (Function Index) show
110 CF setfont /Vpos Tm Bh sub Ps sub def
112 304 30 translate .5 .5 scale
113 Ip HF setfont /Ypos Tm Bh sub Ps 2 div add def
115 (Fri Apr 16 03:00:00 1982) show currentpoint pop dup Rm Ps sub (Page 4) stringwidth pop sub dup Ypos moveto
117 exch sub 2 div add (Function Index) stringwidth pop 2 div sub Ypos moveto
118 (Function Index) show
119 HF setfont /Ypos Ps 2 div def
121 (Fri Apr 16 03:00:00 1982) show currentpoint pop dup Rm Ps sub (Page 4) stringwidth pop sub dup Ypos moveto
123 exch sub 2 div add (Function Index) stringwidth pop 2 div sub Ypos moveto
124 (Function Index) show
125 CF setfont /Vpos Tm Bh sub Ps sub def
129 15 405 translate .5 .5 scale
130 Ip HF setfont /Ypos Tm Bh sub Ps 2 div add def
132 (Fri Apr 16 03:00:00 1982) show currentpoint pop dup Rm Ps sub (Page 1) stringwidth pop sub dup Ypos moveto
134 exch sub 2 div add (File Index) stringwidth pop 2 div sub Ypos moveto
136 HF setfont /Ypos Ps 2 div def
138 (Fri Apr 16 03:00:00 1982) show currentpoint pop dup Rm Ps sub (Page 1) stringwidth pop sub dup Ypos moveto
140 exch sub 2 div add (File Index) stringwidth pop 2 div sub Ypos moveto
142 CF setfont /Vpos Tm Bh sub Ps sub def
143 Lpt( test1.c 1) BF setfont show CF setfont Nl
144 Lpt( closepipe...................2) show Nl
145 Lpt( fclosepipe 2) show Nl
146 Lpt( fopenpipe...................2) show Nl
147 Lpt( openpipe 1) show Nl
148 Lpt( test7 5) BF setfont show CF setfont Nl
149 Lpt( test6.c 9) BF setfont show CF setfont Nl
150 Lpt( closepipe..................10) show Nl
151 Lpt( fclosepipe 10) show Nl
152 Lpt( fopenpipe..................10) show Nl
153 Lpt( openpipe 9) show Nl
155 15 30 translate .5 .5 scale
156 Ip HF setfont /Ypos Tm Bh sub Ps 2 div add def
158 (Fri Apr 16 03:00:00 1982) show currentpoint pop dup Rm Ps sub (Page 2) stringwidth pop sub dup Ypos moveto
160 exch sub 2 div add (File Index) stringwidth pop 2 div sub Ypos moveto
162 HF setfont /Ypos Ps 2 div def
164 (Fri Apr 16 03:00:00 1982) show currentpoint pop dup Rm Ps sub (Page 2) stringwidth pop sub dup Ypos moveto
166 exch sub 2 div add (File Index) stringwidth pop 2 div sub Ypos moveto
168 CF setfont /Vpos Tm Bh sub Ps sub def
170 304 405 translate .5 .5 scale
171 Ip HF setfont /Ypos Tm Bh sub Ps 2 div add def
173 (Fri Apr 16 03:00:00 1982) show currentpoint pop dup Rm Ps sub (Page 3) stringwidth pop sub dup Ypos moveto
175 exch sub 2 div add (File Index) stringwidth pop 2 div sub Ypos moveto
177 HF setfont /Ypos Ps 2 div def
179 (Fri Apr 16 03:00:00 1982) show currentpoint pop dup Rm Ps sub (Page 3) stringwidth pop sub dup Ypos moveto
181 exch sub 2 div add (File Index) stringwidth pop 2 div sub Ypos moveto
183 CF setfont /Vpos Tm Bh sub Ps sub def
185 304 30 translate .5 .5 scale
186 Ip HF setfont /Ypos Tm Bh sub Ps 2 div add def
188 (Fri Apr 16 03:00:00 1982) show currentpoint pop dup Rm Ps sub (Page 4) stringwidth pop sub dup Ypos moveto
190 exch sub 2 div add (File Index) stringwidth pop 2 div sub Ypos moveto
192 HF setfont /Ypos Ps 2 div def
194 (Fri Apr 16 03:00:00 1982) show currentpoint pop dup Rm Ps sub (Page 4) stringwidth pop sub dup Ypos moveto
196 exch sub 2 div add (File Index) stringwidth pop 2 div sub Ypos moveto
198 CF setfont /Vpos Tm Bh sub Ps sub def
202 15 405 translate .5 .5 scale
203 Cp HF setfont /Ypos Tm Bh sub Ps 2 div add def
205 (Fri Apr 16 03:00:00 1982) show currentpoint pop dup Rm Ps sub (Page 1 of 12) stringwidth pop sub dup Ypos moveto
207 exch sub 2 div add (openpipe) stringwidth pop 2 div sub Ypos moveto
209 HF setfont /Ypos Ps 2 div def
211 (Fri Apr 16 03:00:00 1982) show currentpoint pop dup Rm Ps sub (Page 1 of 12) stringwidth pop sub dup Ypos moveto
213 exch sub 2 div add (test1.c 1) stringwidth pop 2 div sub Ypos moveto
215 /Vpos Tm Bh sub Ps sub def
216 Lpt CFs setfont ( 1 ) show (/*) IF setfont show Nl
217 Lpt CFs setfont ( 2 ) show ( * Source file:) IF setfont show Nl
218 Lpt CFs setfont ( 3 ) show ( * openpipe.c) IF setfont show Nl
219 Lpt CFs setfont ( 4 ) show ( *) IF setfont show Nl
220 Lpt CFs setfont ( 5 ) show ( * Contains openpipe - a replacement for the non-POSIX function popen.) IF setfont show Nl
221 Lpt CFs setfont ( 6 ) show ( * This returns an int rather than a FILE * to make it general purpose -) IF setfont show Nl
222 Lpt CFs setfont ( 7 ) show ( * fdopen can be used outside to convert this to a FILE *) IF setfont show Nl
223 Lpt CFs setfont ( 8 ) show ( */) IF setfont show Nl
224 Lpt CFs setfont ( ) show () IF setfont show Nl
225 Lpt CFs setfont ( 10 ) show (#define _POSIX_SOURCE) CF setfont show Nl
226 Lpt CFs setfont ( ) show () CF setfont show Nl
227 Lpt CFs setfont ( 12 ) show (#include <errno.h>) CF setfont show Nl
228 Lpt CFs setfont ( 13 ) show (#include <stdio.h>) CF setfont show Nl
229 Lpt CFs setfont ( 14 ) show (#include <stdlib.h>) CF setfont show Nl
230 Lpt CFs setfont ( 15 ) show (#include <string.h>) CF setfont show Nl
231 Lpt CFs setfont ( 16 ) show (#include <sys/types.h>) CF setfont show Nl
232 Lpt CFs setfont ( 17 ) show (#include <sys/wait.h>) CF setfont show Nl
233 Lpt CFs setfont ( ) show () CF setfont show Nl
234 Lpt CFs setfont ( 19 ) show (#ifdef _ultrix) CF setfont show Nl
235 Lpt CFs setfont ( 20 ) show (extern int close\(int fildes\);) CF setfont show Nl
236 Lpt CFs setfont ( 21 ) show (extern int dup\(int fildes\);) CF setfont show Nl
237 Lpt CFs setfont ( 22 ) show (extern pid_t fork\(void\);) CF setfont show Nl
238 Lpt CFs setfont ( 23 ) show (extern int pipe\(int fildes[2]\);) CF setfont show Nl
239 Lpt CFs setfont ( 24 ) show (#else) CF setfont show Nl
240 Lpt CFs setfont ( 25 ) show (#include <unistd.h>) CF setfont show Nl
241 Lpt CFs setfont ( 26 ) show (#endif) CF setfont show Nl
242 Lpt CFs setfont ( ) show () CF setfont show Nl
243 Lpt CFs setfont ( 28 ) show (#include "trueprint.h") CF setfont show Nl
244 Lpt CFs setfont ( 29 ) show (#include "main.h") CF setfont show Nl
245 Lpt CFs setfont ( 30 ) show (#include "openpipe.h") CF setfont show Nl
246 Lpt CFs setfont ( ) show () CF setfont show Nl
247 Lpt CFs setfont ( 32 ) show (int) CF setfont show Nl
248 Lpt CFs setfont ( 33 ) show (openpipe) BF setfont show (\(const char *command, char *mode\)) CF setfont show Nl
249 Lpt CFs setfont ( ) show () BF setfont show Nl
250 Lpt CFs setfont ( 35 1 ) show ({) CF setfont show Nl
251 Lpt CFs setfont ( 36 1 ) show ( int fildes[2];) CF setfont show Nl
252 Lpt CFs setfont ( 37 1 ) show ( int parent_pipe_end;) CF setfont show Nl
253 Lpt CFs setfont ( 38 1 ) show ( int child_pipe_end;) CF setfont show Nl
254 Lpt CFs setfont ( 39 1 ) show ( char *child_pipe_mode;) CF setfont show Nl
255 Lpt CFs setfont ( ) show () CF setfont show Nl
256 Lpt CFs setfont ( 41 2 ) show ( if \(strcmp\(mode, "w"\) == 0\) {) CF setfont show Nl
257 Lpt CFs setfont ( 42 2 ) show ( parent_pipe_end = 1; child_pipe_end = 0;) CF setfont show Nl
258 Lpt CFs setfont ( 43 2 ) show ( child_pipe_mode = "read";) CF setfont show Nl
259 Lpt CFs setfont ( 44 2 ) show ( } else if \(strcmp\(mode, "r"\) == 0\) {) CF setfont show Nl
260 Lpt CFs setfont ( 45 2 ) show ( parent_pipe_end = 0; child_pipe_end = 1;) CF setfont show Nl
261 Lpt CFs setfont ( 46 2 ) show ( child_pipe_mode = "write";) CF setfont show Nl
262 Lpt CFs setfont ( 47 2 ) show ( } else {) CF setfont show Nl
263 Lpt CFs setfont ( 48 2 ) show ( \(void\)fprintf\(stderr, "%s: Internal error: popen\() CF setfont show Nl
264 Lpt CFs setfont ( ) show ( \) called with bad mode %s", cmd_name, mode\);) CF setfont show Nl
265 Lpt CFs setfont ( 49 2 ) show ( exit\(2\);) CF setfont show Nl
266 Lpt CFs setfont ( 50 1 ) show ( }) CF setfont show Nl
267 Lpt CFs setfont ( ) show () CF setfont show Nl
268 Lpt CFs setfont ( 52 2 ) show ( if \(pipe\(fildes\) != 0\) {) CF setfont show Nl
269 Lpt CFs setfont ( 53 2 ) show ( \(void\)fprintf\(stderr, "%s: Cannot create pipe, %s\\n", cmd_name, strerror\(errno\)\);) CF setfont show Nl
270 Lpt CFs setfont ( 54 2 ) show ( exit\(2\);) CF setfont show Nl
271 Lpt CFs setfont ( 55 1 ) show ( }) CF setfont show Nl
272 Lpt CFs setfont ( ) show () CF setfont show Nl
273 Lpt CFs setfont ( 57 2 ) show ( switch \(fork\(\)\) {) CF setfont show Nl
274 Lpt CFs setfont ( 58 2 ) show ( case -1:) CF setfont show Nl
275 Lpt CFs setfont ( 59 2 ) show ( ) CF setfont show (/* Error */) IF setfont show Nl
276 Lpt CFs setfont ( 60 2 ) show ( \(void\)fprintf\(stderr, "%s: Cannot fork, %s\\n", cmd_name, strerror\(errno\)\);) CF setfont show Nl
277 Lpt CFs setfont ( 61 2 ) show ( exit\(2\);) CF setfont show Nl
278 Lpt CFs setfont ( 62 2 ) show ( ) CF setfont show (/*NOTREACHED*/) IF setfont show Nl
279 Lpt CFs setfont ( ) show () CF setfont show Nl
281 15 30 translate .5 .5 scale
282 Cp HF setfont /Ypos Tm Bh sub Ps 2 div add def
284 (Fri Apr 16 03:00:00 1982) show currentpoint pop dup Rm Ps sub (Page 2 of 12) stringwidth pop sub dup Ypos moveto
286 exch sub 2 div add (openpipe) stringwidth pop 2 div sub Ypos moveto
288 HF setfont /Ypos Ps 2 div def
290 (Fri Apr 16 03:00:00 1982) show currentpoint pop dup Rm Ps sub (Page 2 of 12) stringwidth pop sub dup Ypos moveto
292 exch sub 2 div add (test1.c 2) stringwidth pop 2 div sub Ypos moveto
294 /Vpos Tm Bh sub Ps sub def
295 Lpt CFs setfont ( 64 2 ) show ( case 0:) CF setfont show Nl
296 Lpt CFs setfont ( 65 2 ) show ( ) CF setfont show (/* Child process */) IF setfont show Nl
297 Lpt CFs setfont ( 66 2 ) show ( if \(!\(\(close\(fildes[parent_pipe_end]\) == 0\) &&) CF setfont show Nl
298 Lpt CFs setfont ( 67 2 ) show ( \(close\(child_pipe_end\) == 0\) &&) CF setfont show Nl
299 Lpt CFs setfont ( 68 3 ) show ( \(dup\(fildes[child_pipe_end]\) == child_pipe_end\)\)\) {) CF setfont show Nl
300 Lpt CFs setfont ( 69 3 ) show ( \(void\)fprintf\() CF setfont show Nl
301 Lpt CFs setfont ( ) show (stderr,"%s: Cannot redirect %s for child, %s\\n", cmd_name, child_pipe_mode, strerror\() CF setfont show Nl
302 Lpt CFs setfont ( ) show ( errno\)\);) CF setfont show Nl
303 Lpt CFs setfont ( 70 3 ) show ( exit\(2\);) CF setfont show Nl
304 Lpt CFs setfont ( 71 2 ) show ( }) CF setfont show Nl
305 Lpt CFs setfont ( ) show () CF setfont show Nl
306 Lpt CFs setfont ( 73 3 ) show ( if \(system\(command\) < 0\) {) CF setfont show Nl
307 Lpt CFs setfont ( 74 3 ) show ( \(void\)fprintf\(stderr,"%s: Cannot start pipe, %s\\n",cmd_name, strerror\(errno\)\);) CF setfont show Nl
308 Lpt CFs setfont ( 75 3 ) show ( exit\(2\);) CF setfont show Nl
309 Lpt CFs setfont ( 76 2 ) show ( } else exit\(0\);) CF setfont show Nl
310 Lpt CFs setfont ( 77 2 ) show ( ) CF setfont show (/*NOTREACHED*/) IF setfont show Nl
311 Lpt CFs setfont ( ) show () CF setfont show Nl
312 Lpt CFs setfont ( 79 2 ) show ( default:) CF setfont show Nl
313 Lpt CFs setfont ( 80 2 ) show ( ) CF setfont show (/* Parent process */) IF setfont show Nl
314 Lpt CFs setfont ( ) show () CF setfont show Nl
315 Lpt CFs setfont ( 82 3 ) show ( if \(close\(fildes[child_pipe_end]\) != 0\) {) CF setfont show Nl
316 Lpt CFs setfont ( 83 3 ) show ( \(void\)fprintf\() CF setfont show Nl
317 Lpt CFs setfont ( ) show ( stderr,"%s: Cannot close %s end of pipe for parent, %s\\n",cmd_name, child_pipe_mode,) CF setfont show Nl
318 Lpt CFs setfont ( ) show ( strerror\(errno\)\);) CF setfont show Nl
319 Lpt CFs setfont ( 84 3 ) show ( exit\(2\);) CF setfont show Nl
320 Lpt CFs setfont ( 85 2 ) show ( }) CF setfont show Nl
321 Lpt CFs setfont ( ) show () CF setfont show Nl
322 Lpt CFs setfont ( 87 2 ) show ( return fildes[parent_pipe_end];) CF setfont show Nl
323 Lpt CFs setfont ( 88 1 ) show ( }) CF setfont show Nl
324 Lpt CFs setfont ( 89 ) show (}) CF setfont show Nl
325 Lpt CFs setfont ( ) show () CF setfont show Nl
326 Lpt CFs setfont ( 91 ) show (FILE *) CF setfont show Nl
327 Lpt CFs setfont ( 92 ) show (fopenpipe) BF setfont show (\(const char *command, char *mode\)) CF setfont show Nl
328 Lpt CFs setfont ( ) show () BF setfont show Nl
329 Lpt CFs setfont ( 94 1 ) show ({) CF setfont show Nl
330 Lpt CFs setfont ( 95 1 ) show ( int handle;) CF setfont show Nl
331 Lpt CFs setfont ( ) show () CF setfont show Nl
332 Lpt CFs setfont ( 97 1 ) show ( handle = openpipe\(command, mode\);) CF setfont show Nl
333 Lpt CFs setfont ( ) show () CF setfont show Nl
334 Lpt CFs setfont ( 99 1 ) show ( return fdopen\(handle, mode\);) CF setfont show Nl
335 Lpt CFs setfont ( 100 ) show (}) CF setfont show Nl
336 Lpt CFs setfont ( ) show () CF setfont show Nl
337 Lpt CFs setfont ( 102 ) show (void) CF setfont show Nl
338 Lpt CFs setfont ( 103 ) show (closepipe) BF setfont show (\(int handle\)) CF setfont show Nl
339 Lpt CFs setfont ( ) show () BF setfont show Nl
340 Lpt CFs setfont ( 105 1 ) show ({) CF setfont show Nl
341 Lpt CFs setfont ( 106 1 ) show ( int statloc;) CF setfont show Nl
342 Lpt CFs setfont ( ) show () CF setfont show Nl
343 Lpt CFs setfont ( 108 1 ) show ( \(void\)close\(handle\);) CF setfont show Nl
344 Lpt CFs setfont ( 109 1 ) show ( \(void\)waitpid\(-1, &statloc, WNOHANG\);) CF setfont show Nl
345 Lpt CFs setfont ( 110 ) show (}) CF setfont show Nl
346 Lpt CFs setfont ( ) show () CF setfont show Nl
347 Lpt CFs setfont ( 112 ) show (void) CF setfont show Nl
348 Lpt CFs setfont ( 113 ) show (fclosepipe) BF setfont show (\(FILE *fp\)) CF setfont show Nl
349 Lpt CFs setfont ( ) show () BF setfont show Nl
350 Lpt CFs setfont ( 115 1 ) show ({) CF setfont show Nl
351 Lpt CFs setfont ( 116 1 ) show ( closepipe\(fileno\(fp\)\);) CF setfont show Nl
352 Lpt CFs setfont ( 117 ) show (}) CF setfont show Nl
354 304 405 translate .5 .5 scale
355 Cp HF setfont /Ypos Tm Bh sub Ps 2 div add def
357 (Fri Apr 16 03:00:00 1982) show currentpoint pop dup Rm Ps sub (Page 3 of 12) stringwidth pop sub dup Ypos moveto
359 exch sub 2 div add () stringwidth pop 2 div sub Ypos moveto
361 HF setfont /Ypos Ps 2 div def
363 (Fri Apr 16 03:00:00 1982) show currentpoint pop dup Rm Ps sub (Page 3 of 12) stringwidth pop sub dup Ypos moveto
365 exch sub 2 div add (test1.c 3) stringwidth pop 2 div sub Ypos moveto
367 /Vpos Tm Bh sub Ps sub def
369 304 30 translate .5 .5 scale
370 Cp HF setfont /Ypos Tm Bh sub Ps 2 div add def
372 (Fri Apr 16 03:00:00 1982) show currentpoint pop dup Rm Ps sub (Page 4 of 12) stringwidth pop sub dup Ypos moveto
374 exch sub 2 div add () stringwidth pop 2 div sub Ypos moveto
376 HF setfont /Ypos Ps 2 div def
378 (Fri Apr 16 03:00:00 1982) show currentpoint pop dup Rm Ps sub (Page 4 of 12) stringwidth pop sub dup Ypos moveto
380 exch sub 2 div add (test1.c 4) stringwidth pop 2 div sub Ypos moveto
382 /Vpos Tm Bh sub Ps sub def
386 15 405 translate .5 .5 scale
387 Cp HF setfont /Ypos Tm Bh sub Ps 2 div add def
389 (Fri Apr 16 03:00:00 1982) show currentpoint pop dup Rm Ps sub (Page 5 of 12) stringwidth pop sub dup Ypos moveto
391 exch sub 2 div add () stringwidth pop 2 div sub Ypos moveto
393 HF setfont /Ypos Ps 2 div def
395 (Fri Apr 16 03:00:00 1982) show currentpoint pop dup Rm Ps sub (Page 5 of 12) stringwidth pop sub dup Ypos moveto
397 exch sub 2 div add (test7 1) stringwidth pop 2 div sub Ypos moveto
399 /Vpos Tm Bh sub Ps sub def
400 Lpt CFs setfont ( 1 ) show (This is a short line) CF setfont show Nl
401 Lpt CFs setfont ( 2 ) show (12345678901234567890123456789012345678901234567890123456789012345678901234567890123456) CF setfont show Nl
402 Lpt CFs setfont ( ) show ( 7890) CF setfont show Nl
403 Lpt CFs setfont ( 3 ) show (This is a very long line that extends way beyond the normal width of a normal line ) CF setfont show Nl
404 Lpt CFs setfont ( ) show ( and goes on until at least the hundredth column.) CF setfont show Nl
405 Lpt CFs setfont ( 4 ) show (This is another short line.) CF setfont show Nl
407 15 30 translate .5 .5 scale
408 Cp HF setfont /Ypos Tm Bh sub Ps 2 div add def
410 (Fri Apr 16 03:00:00 1982) show currentpoint pop dup Rm Ps sub (Page 6 of 12) stringwidth pop sub dup Ypos moveto
412 exch sub 2 div add () stringwidth pop 2 div sub Ypos moveto
414 HF setfont /Ypos Ps 2 div def
416 (Fri Apr 16 03:00:00 1982) show currentpoint pop dup Rm Ps sub (Page 6 of 12) stringwidth pop sub dup Ypos moveto
418 exch sub 2 div add (test7 2) stringwidth pop 2 div sub Ypos moveto
420 /Vpos Tm Bh sub Ps sub def
422 304 405 translate .5 .5 scale
423 Cp HF setfont /Ypos Tm Bh sub Ps 2 div add def
425 (Fri Apr 16 03:00:00 1982) show currentpoint pop dup Rm Ps sub (Page 7 of 12) stringwidth pop sub dup Ypos moveto
427 exch sub 2 div add () stringwidth pop 2 div sub Ypos moveto
429 HF setfont /Ypos Ps 2 div def
431 (Fri Apr 16 03:00:00 1982) show currentpoint pop dup Rm Ps sub (Page 7 of 12) stringwidth pop sub dup Ypos moveto
433 exch sub 2 div add (test7 3) stringwidth pop 2 div sub Ypos moveto
435 /Vpos Tm Bh sub Ps sub def
437 304 30 translate .5 .5 scale
438 Cp HF setfont /Ypos Tm Bh sub Ps 2 div add def
440 (Fri Apr 16 03:00:00 1982) show currentpoint pop dup Rm Ps sub (Page 8 of 12) stringwidth pop sub dup Ypos moveto
442 exch sub 2 div add () stringwidth pop 2 div sub Ypos moveto
444 HF setfont /Ypos Ps 2 div def
446 (Fri Apr 16 03:00:00 1982) show currentpoint pop dup Rm Ps sub (Page 8 of 12) stringwidth pop sub dup Ypos moveto
448 exch sub 2 div add (test7 4) stringwidth pop 2 div sub Ypos moveto
450 /Vpos Tm Bh sub Ps sub def
454 15 405 translate .5 .5 scale
455 Cp HF setfont /Ypos Tm Bh sub Ps 2 div add def
457 (Fri Apr 16 03:00:00 1982) show currentpoint pop dup Rm Ps sub (Page 9 of 12) stringwidth pop sub dup Ypos moveto
459 exch sub 2 div add (openpipe) stringwidth pop 2 div sub Ypos moveto
461 HF setfont /Ypos Ps 2 div def
463 (Fri Apr 16 03:00:00 1982) show currentpoint pop dup Rm Ps sub (Page 9 of 12) stringwidth pop sub dup Ypos moveto
465 exch sub 2 div add (test6.c 1) stringwidth pop 2 div sub Ypos moveto
467 /Vpos Tm Bh sub Ps sub def
468 Lpt CFs setfont ( 1 ) show (/*) IF setfont show Nl
469 Lpt CFs setfont ( 2 ) show ( * Source file:) IF setfont show Nl
470 Lpt CFs setfont ( 3 ) show ( * openpipe.c) IF setfont show Nl
471 Lpt CFs setfont ( 4 ) show ( *) IF setfont show Nl
472 Lpt CFs setfont ( 5 ) show ( * Contains openpipe - a replacement for the non-POSIX function popen.) IF setfont show Nl
473 Lpt CFs setfont ( 6 ) show ( * This returns an int rather than a FILE * to make it general purpose -) IF setfont show Nl
474 Lpt CFs setfont ( 7 ) show ( * fdopen can be used outside to convert this to a FILE *) IF setfont show Nl
475 Lpt CFs setfont ( 8 ) show ( */) IF setfont show Nl
476 Lpt CFs setfont ( ) show () IF setfont show Nl
477 Lpt CFs setfont ( 10 ) show (#define _POSIX_SOURCE) CF setfont show Nl
478 Lpt CFs setfont ( ) show () CF setfont show Nl
479 Lpt CFs setfont ( 12 ) show (#include <errno.h>) CF setfont show Nl
480 Lpt CFs setfont ( 13 ) show (#include <stdio.h>) CF setfont show Nl
481 Lpt CFs setfont ( 14 ) show (#include <stdlib.h>) CF setfont show Nl
482 Lpt CFs setfont ( 15 ) show (#include <string.h>) CF setfont show Nl
483 Lpt CFs setfont ( 16 ) show (#include <sys/types.h>) CF setfont show Nl
484 Lpt CFs setfont ( 17 ) show (#include <sys/wait.h>) CF setfont show Nl
485 Lpt CFs setfont ( ) show () CF setfont show Nl
486 Lpt CFs setfont ( 19 ) show (#ifdef _ultrix) CF setfont show Nl
487 Lpt CFs setfont ( 20 ) show (extern int close\(int fildes\);) CF setfont show Nl
488 Lpt CFs setfont ( 21 ) show (extern int dup\(int fildes\);) CF setfont show Nl
489 Lpt CFs setfont ( 22 ) show (extern pid_t fork\(void\);) CF setfont show Nl
490 Lpt CFs setfont ( 23 ) show (extern int pipe\(int fildes[2]\);) CF setfont show Nl
491 Lpt CFs setfont ( 24 ) show (#else) CF setfont show Nl
492 Lpt CFs setfont ( 25 ) show (#include <unistd.h>) CF setfont show Nl
493 Lpt CFs setfont ( 26 ) show (#endif) CF setfont show Nl
494 Lpt CFs setfont ( ) show () CF setfont show Nl
495 Lpt CFs setfont ( 28 ) show (#include "trueprint.h") CF setfont show Nl
496 Lpt CFs setfont ( 29 ) show (#include "main.h") CF setfont show Nl
497 Lpt CFs setfont ( 30 ) show (#include "openpipe.h") CF setfont show Nl
498 Lpt CFs setfont ( ) show () CF setfont show Nl
499 Lpt CFs setfont ( 32 ) show (int) CF setfont show Nl
500 Lpt CFs setfont ( 33 ) show (openpipe) BF setfont show (\(const char *command, char *mode\)) CF setfont show Nl
501 Lpt CFs setfont ( ) show () BF setfont show Nl
502 Lpt CFs setfont ( 35 1 ) show ({) CF setfont show Nl
503 Lpt CFs setfont ( 36 1 ) show ( int fildes[2];) CF setfont show Nl
504 Lpt CFs setfont ( 37 1 ) show ( int parent_pipe_end;) CF setfont show Nl
505 Lpt CFs setfont ( 38 1 ) show ( int child_pipe_end;) CF setfont show Nl
506 Lpt CFs setfont ( 39 1 ) show ( char *child_pipe_mode;) CF setfont show Nl
507 Lpt CFs setfont ( ) show () CF setfont show Nl
508 Lpt CFs setfont ( 41 2 ) show ( if \(strcmp\(mode, "w"\) == 0\) {) CF setfont show Nl
509 Lpt CFs setfont ( 42 2 ) show ( parent_pipe_end = 1; child_pipe_end = 0;) CF setfont show Nl
510 Lpt CFs setfont ( 43 2 ) show ( child_pipe_mode = "read";) CF setfont show Nl
511 Lpt CFs setfont ( 44 2 ) show ( } else if \(strcmp\(mode, "r"\) == 0\) {) CF setfont show Nl
512 Lpt CFs setfont ( 45 2 ) show ( parent_pipe_end = 0; child_pipe_end = 1;) CF setfont show Nl
513 Lpt CFs setfont ( 46 2 ) show ( child_pipe_mode = "write";) CF setfont show Nl
514 Lpt CFs setfont ( 47 2 ) show ( } else {) CF setfont show Nl
515 Lpt CFs setfont ( 48 2 ) show ( \(void\)fprintf\(stderr, "%s: Internal error: popen\() CF setfont show Nl
516 Lpt CFs setfont ( ) show ( \) called with bad mode %s", cmd_name, mode\);) CF setfont show Nl
517 Lpt CFs setfont ( 49 2 ) show ( exit\(2\);) CF setfont show Nl
518 Lpt CFs setfont ( 50 1 ) show ( }) CF setfont show Nl
519 Lpt CFs setfont ( ) show () CF setfont show Nl
520 Lpt CFs setfont ( 52 2 ) show ( if \(pipe\(fildes\) != 0\) {) CF setfont show Nl
521 Lpt CFs setfont ( 53 2 ) show ( \(void\)fprintf\(stderr, "%s: Cannot create pipe, %s\\n", cmd_name, strerror\(errno\)\);) CF setfont show Nl
522 Lpt CFs setfont ( 54 2 ) show ( exit\(2\);) CF setfont show Nl
523 Lpt CFs setfont ( 55 1 ) show ( }) CF setfont show Nl
524 Lpt CFs setfont ( ) show () CF setfont show Nl
525 Lpt CFs setfont ( 57 2 ) show ( switch \(fork\(\)\) {) CF setfont show Nl
526 Lpt CFs setfont ( 58 2 ) show ( case -1:) CF setfont show Nl
527 Lpt CFs setfont ( 59 2 ) show ( ) CF setfont show (/* Error */) IF setfont show Nl
528 Lpt CFs setfont ( 60 2 ) show ( \(void\)fprintf\(stderr, "%s: Cannot fork, %s\\n", cmd_name, strerror\(errno\)\);) CF setfont show Nl
529 Lpt CFs setfont ( 61 2 ) show ( exit\(2\);) CF setfont show Nl
530 Lpt CFs setfont ( 62 2 ) show ( ) CF setfont show (/*NOTREACHED*/) IF setfont show Nl
531 Lpt CFs setfont ( ) show () CF setfont show Nl
533 15 30 translate .5 .5 scale
534 Cp HF setfont /Ypos Tm Bh sub Ps 2 div add def
536 (Fri Apr 16 03:00:00 1982) show currentpoint pop dup Rm Ps sub (Page 10 of 12) stringwidth pop sub dup Ypos moveto
538 exch sub 2 div add (openpipe) stringwidth pop 2 div sub Ypos moveto
540 HF setfont /Ypos Ps 2 div def
542 (Fri Apr 16 03:00:00 1982) show currentpoint pop dup Rm Ps sub (Page 10 of 12) stringwidth pop sub dup Ypos moveto
544 exch sub 2 div add (test6.c 2) stringwidth pop 2 div sub Ypos moveto
546 /Vpos Tm Bh sub Ps sub def
547 Lpt CFs setfont ( 64 2 ) show ( case 0:) CF setfont show Nl
548 Lpt CFs setfont ( 65 2 ) show ( ) CF setfont show (/* Child process */) IF setfont show Nl
549 Lpt CFs setfont ( 66 2 ) show ( if \(!\(\(close\(fildes[parent_pipe_end]\) == 0\) &&) CF setfont show Nl
550 Lpt CFs setfont ( 67 2 ) show ( \(close\(child_pipe_end\) == 0\) &&) CF setfont show Nl
551 Lpt CFs setfont ( 68 3 ) show ( \(dup\(fildes[child_pipe_end]\) == child_pipe_end\)\)\) {) CF setfont show Nl
552 Lpt CFs setfont ( 69 3 ) show ( \(void\)fprintf\() CF setfont show Nl
553 Lpt CFs setfont ( ) show (stderr,"%s: Cannot redirect %s for child, %s\\n", cmd_name, child_pipe_mode, strerror\() CF setfont show Nl
554 Lpt CFs setfont ( ) show ( errno\)\);) CF setfont show Nl
555 Lpt CFs setfont ( 70 3 ) show ( exit\(2\);) CF setfont show Nl
556 Lpt CFs setfont ( 71 2 ) show ( }) CF setfont show Nl
557 Lpt CFs setfont ( ) show () CF setfont show Nl
558 Lpt CFs setfont ( 73 3 ) show ( if \(system\(command\) < 0\) {) CF setfont show Nl
559 Lpt CFs setfont ( 74 3 ) show ( \(void\)fprintf\(stderr,"%s: Cannot start pipe, %s\\n",cmd_name, strerror\(errno\)\);) CF setfont show Nl
560 Lpt CFs setfont ( 75 3 ) show ( exit\(2\);) CF setfont show Nl
561 Lpt CFs setfont ( 76 2 ) show ( } else exit\(0\);) CF setfont show Nl
562 Lpt CFs setfont ( 77 2 ) show ( ) CF setfont show (/*NOTREACHED*/) IF setfont show Nl
563 Lpt CFs setfont ( ) show () CF setfont show Nl
564 Lpt CFs setfont ( 79 2 ) show ( default:) CF setfont show Nl
565 Lpt CFs setfont ( 80 2 ) show ( ) CF setfont show (/* Parent process */) IF setfont show Nl
566 Lpt CFs setfont ( ) show () CF setfont show Nl
567 Lpt CFs setfont ( 82 3 ) show ( if \(close\(fildes[child_pipe_end]\) != 0\) {) CF setfont show Nl
568 Lpt CFs setfont ( 83 3 ) show ( \(void\)fprintf\() CF setfont show Nl
569 Lpt CFs setfont ( ) show ( stderr,"%s: Cannot close %s end of pipe for parent, %s\\n",cmd_name, child_pipe_mode,) CF setfont show Nl
570 Lpt CFs setfont ( ) show ( strerror\(errno\)\);) CF setfont show Nl
571 Lpt CFs setfont ( 84 3 ) show ( exit\(2\);) CF setfont show Nl
572 Lpt CFs setfont ( 85 2 ) show ( }) CF setfont show Nl
573 Lpt CFs setfont ( ) show () CF setfont show Nl
574 Lpt CFs setfont ( 87 2 ) show ( return fildes[parent_pipe_end];) CF setfont show Nl
575 Lpt CFs setfont ( 88 1 ) show ( }) CF setfont show Nl
576 Lpt CFs setfont ( 89 ) show (}) CF setfont show Nl
577 Lpt CFs setfont ( ) show () CF setfont show Nl
578 Lpt CFs setfont ( 91 ) show (FILE *) CF setfont show Nl
579 Lpt CFs setfont ( 92 ) show (fopenpipe) BF setfont show (\(const char *command, char *mode\)) CF setfont show Nl
580 Lpt CFs setfont ( ) show () BF setfont show Nl
581 Lpt CFs setfont ( 94 1 ) show ({) CF setfont show Nl
582 Lpt CFs setfont ( 95 1 ) show ( int handle;) CF setfont show Nl
583 Lpt CFs setfont ( ) show () CF setfont show Nl
584 Lpt CFs setfont ( 97 1 ) show ( handle = openpipe\(command, mode\);) CF setfont show Nl
585 Lpt CFs setfont ( ) show () CF setfont show Nl
586 Lpt CFs setfont ( 99 1 ) show ( return fdopen\(handle, mode\);) CF setfont show Nl
587 Lpt CFs setfont ( 100 ) show (}) CF setfont show Nl
588 Lpt CFs setfont ( ) show () CF setfont show Nl
589 Lpt CFs setfont ( 102 ) show (void) CF setfont show Nl
590 Lpt CFs setfont ( 103 ) show (closepipe) BF setfont show (\(int handle\)) CF setfont show Nl
591 Lpt CFs setfont ( ) show () BF setfont show Nl
592 Lpt CFs setfont ( 105 1 ) show ({) CF setfont show Nl
593 Lpt CFs setfont ( 106 1 ) show ( int statloc;) CF setfont show Nl
594 Lpt CFs setfont ( ) show () CF setfont show Nl
595 Lpt CFs setfont ( 108 1 ) show ( \(void\)close\(handle\);) CF setfont show Nl
596 Lpt CFs setfont ( 109 1 ) show ( \(void\)waitpid\(-1, &statloc, WNOHANG\);) CF setfont show Nl
597 Lpt CFs setfont ( 110 ) show (}) CF setfont show Nl
598 Lpt CFs setfont ( ) show () CF setfont show Nl
599 Lpt CFs setfont ( 112 ) show (void) CF setfont show Nl
600 Lpt CFs setfont ( 113 ) show (fclosepipe) BF setfont show (\(FILE *fp\)) CF setfont show Nl
601 Lpt CFs setfont ( ) show () BF setfont show Nl
602 Lpt CFs setfont ( 115 1 ) show ({) CF setfont show Nl
603 Lpt CFs setfont ( 116 1 ) show ( closepipe\(fileno\(fp\)\);) CF setfont show Nl
604 Lpt CFs setfont ( 117 ) show (}) CF setfont show Nl
606 304 405 translate .5 .5 scale
607 Cp HF setfont /Ypos Tm Bh sub Ps 2 div add def
609 (Fri Apr 16 03:00:00 1982) show currentpoint pop dup Rm Ps sub (Page 11 of 12) stringwidth pop sub dup Ypos moveto
611 exch sub 2 div add () stringwidth pop 2 div sub Ypos moveto
613 HF setfont /Ypos Ps 2 div def
615 (Fri Apr 16 03:00:00 1982) show currentpoint pop dup Rm Ps sub (Page 11 of 12) stringwidth pop sub dup Ypos moveto
617 exch sub 2 div add (test6.c 3) stringwidth pop 2 div sub Ypos moveto
619 /Vpos Tm Bh sub Ps sub def
621 304 30 translate .5 .5 scale
622 Cp HF setfont /Ypos Tm Bh sub Ps 2 div add def
624 (Fri Apr 16 03:00:00 1982) show currentpoint pop dup Rm Ps sub (Page 12 of 12) stringwidth pop sub dup Ypos moveto
626 exch sub 2 div add () stringwidth pop 2 div sub Ypos moveto
628 HF setfont /Ypos Ps 2 div def
630 (Fri Apr 16 03:00:00 1982) show currentpoint pop dup Rm Ps sub (Page 12 of 12) stringwidth pop sub dup Ypos moveto
632 exch sub 2 div add (test6.c 4) stringwidth pop 2 div sub Ypos moveto
634 /Vpos Tm Bh sub Ps sub def