65 |
|
|
66 |
|
{ |
67 |
|
FILE *fp; |
68 |
– |
#ifdef UNIX |
68 |
|
FILE *popen(); |
70 |
– |
#endif |
69 |
|
char comargs[200], command[300]; |
70 |
|
|
73 |
– |
#ifdef CPM |
74 |
– |
fixargs("meta2tga", &argc, &argv); |
75 |
– |
#endif |
76 |
– |
|
71 |
|
fout = stdout; |
72 |
|
progname = *argv++; |
73 |
|
argc--; |
74 |
|
|
75 |
|
condonly = FALSE; |
82 |
– |
#ifdef CPM |
83 |
– |
conditioned = TRUE; |
84 |
– |
#else |
76 |
|
conditioned = FALSE; |
86 |
– |
#endif |
77 |
|
|
78 |
|
while (argc && **argv == '-') { |
79 |
|
switch (*(*argv+1)) { |
90 |
– |
#ifdef UNIX |
80 |
|
case 'c': |
81 |
|
condonly = TRUE; |
82 |
|
break; |
83 |
|
case 'r': |
84 |
|
conditioned = TRUE; |
85 |
|
break; |
97 |
– |
#endif |
86 |
|
case 'm': |
87 |
|
minwidth = atoi(*++argv); |
88 |
|
argc--; |
130 |
|
argc--; |
131 |
|
} |
132 |
|
sprintf(command, XCOM, comargs); |
145 |
– |
#ifdef UNIX |
133 |
|
if (condonly) |
134 |
|
return(system(command)); |
135 |
|
else { |
140 |
|
if (lineno) |
141 |
|
nextpage(); |
142 |
|
} |
156 |
– |
#endif |
143 |
|
} |
144 |
|
|
145 |
|
return(0); |