36 |
|
|
37 |
|
char *progname; /* global argv[0] */ |
38 |
|
|
39 |
< |
int verbose = 0; /* verbose mode? */ |
39 |
> |
int verbose = 0; /* verbose mode (< 0 no warnings) */ |
40 |
|
|
41 |
|
char *rcarg[MAXRCARG+1] = {"rcontrib", "-fo+"}; |
42 |
|
int nrcargs = 2; |
226 |
|
fputs(": command line too long in popen_arglist()\n", stderr); |
227 |
|
return(NULL); |
228 |
|
} |
229 |
< |
if (verbose) |
229 |
> |
if (verbose > 0) |
230 |
|
fprintf(stderr, "%s: opening pipe %s: %s\n", |
231 |
|
progname, (*mode=='w') ? "to" : "from", cmd); |
232 |
|
return(popen(cmd, mode)); |
244 |
|
fputs(": command line too long in my_exec()\n", stderr); |
245 |
|
return(1); |
246 |
|
} |
247 |
< |
if (verbose) |
247 |
> |
if (verbose > 0) |
248 |
|
fprintf(stderr, "%s: running: %s\n", progname, cmd); |
249 |
|
return(system(cmd)); |
250 |
|
} |
259 |
|
fprintf(stderr, "%s: cannot locate %s\n", progname, av[0]); |
260 |
|
return(1); |
261 |
|
} |
262 |
< |
if (verbose) { |
262 |
> |
if (verbose > 0) { |
263 |
|
char cmd[4096]; |
264 |
|
if (!convert_commandline(cmd, sizeof(cmd), av)) |
265 |
|
strcpy(cmd, "COMMAND TOO LONG TO SHOW"); |
867 |
|
fputs(": no sender surface!\n", stderr); |
868 |
|
return(-1); |
869 |
|
} |
870 |
< |
if (curparams.outfn != NULL) /* misplaced output file spec. */ |
870 |
> |
/* misplaced output file spec. */ |
871 |
> |
if ((curparams.outfn != NULL) & (verbose >= 0)) |
872 |
|
fprintf(stderr, "%s: warning - ignoring output file in sender ('%s')\n", |
873 |
|
progname, curparams.outfn); |
874 |
|
/* check/set basis hemisphere */ |
1019 |
|
snew->area *= PI*snew->area; |
1020 |
|
break; |
1021 |
|
} |
1022 |
< |
if (snew->area <= FTINY) { |
1022 |
> |
if ((snew->area <= FTINY) & (verbose >= 0)) { |
1023 |
|
fprintf(stderr, "%s: warning - zero area for surface '%s'\n", |
1024 |
|
progname, oname); |
1025 |
|
free(snew); |
1206 |
|
na = 1; |
1207 |
|
switch (argv[a][1]) { /* !! Keep consistent !! */ |
1208 |
|
case 'v': /* verbose mode */ |
1209 |
< |
verbose = !verbose; |
1209 |
> |
verbose = 1; |
1210 |
|
na = 0; |
1211 |
|
continue; |
1212 |
|
case 'f': /* special case for -fo, -ff, etc. */ |
1247 |
|
iropt = argv[a]; |
1248 |
|
na = 0; |
1249 |
|
continue; |
1250 |
< |
case 'V': /* options without arguments */ |
1251 |
< |
case 'w': |
1250 |
> |
case 'w': /* options without arguments */ |
1251 |
> |
if (argv[a][2] != '+') verbose = -1; |
1252 |
> |
case 'V': |
1253 |
|
case 'u': |
1254 |
|
case 'h': |
1255 |
|
case 'r': |