36 |
|
|
37 |
|
|
38 |
|
|
39 |
< |
|
40 |
< |
|
39 |
> |
#include "rtprocess.h" |
40 |
|
#include "meta.h" |
42 |
– |
|
41 |
|
#include "plot.h" |
44 |
– |
|
42 |
|
#include "span.h" |
43 |
|
|
44 |
|
|
48 |
– |
|
49 |
– |
|
45 |
|
char *progname; |
46 |
|
|
47 |
|
struct span outspan; |
62 |
|
conditioned = FALSE; |
63 |
|
|
64 |
|
|
65 |
< |
main(argc, argv) |
66 |
< |
|
67 |
< |
int argc; |
68 |
< |
char **argv; |
69 |
< |
|
65 |
> |
int |
66 |
> |
main( |
67 |
> |
int argc, |
68 |
> |
char **argv |
69 |
> |
) |
70 |
|
{ |
71 |
|
FILE *fp; |
77 |
– |
#ifdef UNIX |
78 |
– |
FILE *popen(); |
79 |
– |
#endif |
72 |
|
char comargs[200], command[300]; |
73 |
|
|
82 |
– |
#ifdef CPM |
83 |
– |
fixargs("mx80", &argc, &argv); |
84 |
– |
#endif |
85 |
– |
|
74 |
|
progname = *argv++; |
75 |
|
argc--; |
76 |
|
|
77 |
|
condonly = FALSE; |
90 |
– |
#ifdef CPM |
91 |
– |
conditioned = TRUE; |
92 |
– |
#else |
78 |
|
conditioned = FALSE; |
94 |
– |
#endif |
79 |
|
|
80 |
|
while (argc && **argv == '-') { |
81 |
|
switch (*(*argv+1)) { |
98 |
– |
#ifdef UNIX |
82 |
|
case 'c': |
83 |
|
condonly = TRUE; |
84 |
|
break; |
85 |
|
case 'r': |
86 |
|
conditioned = TRUE; |
87 |
|
break; |
105 |
– |
#endif |
88 |
|
default: |
89 |
|
error(WARNING, "unknown option"); |
90 |
|
break; |
115 |
|
argc--; |
116 |
|
} |
117 |
|
sprintf(command, XCOM, comargs); |
136 |
– |
#ifdef UNIX |
118 |
|
if (condonly) |
119 |
|
return(system(command)); |
120 |
|
else { |
125 |
|
pclose(fp); |
126 |
|
fputs(PUNINIT, stdout); |
127 |
|
} |
147 |
– |
#endif |
128 |
|
} |
129 |
|
|
130 |
|
return(0); |
131 |
|
} |
132 |
|
|
133 |
|
|
134 |
< |
|
135 |
< |
|
156 |
< |
|
157 |
< |
|
158 |
< |
|
159 |
< |
thispage() /* rewind and initialize current page */ |
160 |
< |
|
134 |
> |
void |
135 |
> |
thispage(void) /* rewind and initialize current page */ |
136 |
|
{ |
162 |
– |
|
137 |
|
if (lineno) |
138 |
|
error(USER, "cannot restart page in thispage"); |
165 |
– |
|
139 |
|
} |
140 |
|
|
141 |
|
|
142 |
< |
|
143 |
< |
|
171 |
< |
nextpage() /* advance to next page */ |
172 |
< |
|
142 |
> |
void |
143 |
> |
nextpage(void) /* advance to next page */ |
144 |
|
{ |
174 |
– |
|
145 |
|
fputs("\f\r", stdout); |
146 |
|
|
147 |
|
lineno = 0; |
178 |
– |
|
148 |
|
} |
149 |
|
|
150 |
|
|
151 |
< |
|
152 |
< |
|
184 |
< |
contpage() /* continue new plot on current page */ |
185 |
< |
|
151 |
> |
void |
152 |
> |
contpage(void) /* continue new plot on current page */ |
153 |
|
{ |
187 |
– |
|
154 |
|
while (lineno++ < NLINES) |
155 |
|
putc('\n', stdout); |
156 |
|
|
157 |
|
lineno = 0; |
192 |
– |
|
158 |
|
} |
159 |
|
|
160 |
|
|
161 |
< |
|
162 |
< |
printspan() /* output span to printer */ |
198 |
< |
|
161 |
> |
void |
162 |
> |
printspan(void) /* output span to printer */ |
163 |
|
{ |
164 |
|
register int k; |
165 |
|
|
187 |
|
} |
188 |
|
|
189 |
|
|
190 |
< |
|
191 |
< |
|
192 |
< |
|
193 |
< |
printstr(p) /* output a string to the printer */ |
230 |
< |
|
231 |
< |
PRIMITIVE *p; |
190 |
> |
void |
191 |
> |
printstr( /* output a string to the printer */ |
192 |
> |
PRIMITIVE *p |
193 |
> |
) |
194 |
|
|
195 |
|
{ |
196 |
|
int i; |