55 |
|
|
56 |
|
#if defined(_WIN32) || defined(_WIN64) |
57 |
|
#define RCONTRIB_FEATURES "Accumulation\nSummation\nRecovery\n" \ |
58 |
< |
"ValueContribution\nImmediateIrradiance\n" \ |
59 |
< |
"ProgressReporting\nDistanceLimiting\n" |
58 |
> |
"Hyperspectral\nImmediateIrradiance\n" \ |
59 |
> |
"ProgressReporting\nDistanceLimiting\n" \ |
60 |
> |
"InputFormats=a,f,d\nOutputFormats=a,f,d,c\n" \ |
61 |
> |
"Outputs=V,W\n" |
62 |
|
#else |
63 |
|
#define RCONTRIB_FEATURES "Multiprocessing\n" \ |
64 |
|
"Accumulation\nSummation\nRecovery\n" \ |
65 |
< |
"ValueContribution\nImmediateIrradiance\n" \ |
66 |
< |
"ProgressReporting\nDistanceLimiting\n" |
65 |
> |
"Hyperspectral\nImmediateIrradiance\n" \ |
66 |
> |
"ProgressReporting\nDistanceLimiting\n" \ |
67 |
> |
"InputFormats=a,f,d\nOutputFormats=a,f,d,c\n" \ |
68 |
> |
"Outputs=V,W\n" |
69 |
|
#endif |
70 |
|
|
71 |
|
static void |
72 |
|
printdefaults(void) /* print default values to stdout */ |
73 |
|
{ |
74 |
|
printf("-c %-5d\t\t\t# accumulated rays per record\n", accumulate); |
75 |
+ |
if (NCSAMP > 3) { |
76 |
+ |
printf("-cs %-2d\t\t\t\t# number of spectral bins\n", NCSAMP); |
77 |
+ |
printf("-cw %3.0f %3.0f\t\t\t# wavelength limits (nm)\n", |
78 |
+ |
WLPART[3], WLPART[0]); |
79 |
+ |
} |
80 |
|
printf("-V%c\t\t\t\t# output %s\n", contrib ? '+' : '-', |
81 |
|
contrib ? "contributions" : "coefficients"); |
82 |
|
if (imm_irrad) |
87 |
|
printf("-y %-9d\t\t\t# y resolution\n", yres); |
88 |
|
printf(lim_dist ? "-ld+\t\t\t\t# limit distance on\n" : |
89 |
|
"-ld-\t\t\t\t# limit distance off\n"); |
90 |
< |
printf("-h%c\t\t\t\t# %s header\n", header ? '+' : '-', |
91 |
< |
header ? "output" : "no"); |
90 |
> |
printf(header ? "-h+\t\t\t\t# output header\n" : |
91 |
> |
"-h-\t\t\t\t# no header\n"); |
92 |
|
printf("-f%c%c\t\t\t\t# format input/output = %s/%s\n", |
93 |
|
inpfmt, outfmt, formstr(inpfmt), formstr(outfmt)); |
94 |
|
printf(erract[WARNING].pf != NULL ? |
204 |
|
gargc = argc; |
205 |
|
/* feature check only? */ |
206 |
|
strcat(RFeatureList, RCONTRIB_FEATURES); |
207 |
< |
if (!strcmp(argv[1], "-features")) |
207 |
> |
if (argc > 1 && !strcmp(argv[1], "-features")) |
208 |
|
return feature_status(argc-2, argv+2); |
209 |
< |
#if defined(_WIN32) || defined(_WIN64) |
210 |
< |
_setmaxstdio(2048); /* increase file limit to maximum */ |
209 |
> |
#if defined(_WIN32) || defined(_WIN64) /* increase file limit to maximum */ |
210 |
> |
for (i = 8192; i > _IOB_ENTRIES; i >>= 1) |
211 |
> |
if (_setmaxstdio(i) == i) |
212 |
> |
break; |
213 |
|
#endif |
214 |
|
/* initialize calcomp routines early */ |
215 |
|
initfunc(); |
292 |
|
check(2,"s"); |
293 |
|
curout = argv[++i]; |
294 |
|
break; |
284 |
– |
case 'c': /* input rays per output */ |
285 |
– |
check(2,"i"); |
286 |
– |
accumulate = atoi(argv[++i]); |
287 |
– |
break; |
295 |
|
case 'r': /* recover output */ |
296 |
|
check_bool(2,recover); |
297 |
|
break; |
302 |
|
check(2,"s"); |
303 |
|
set_eparams(prms = argv[++i]); |
304 |
|
break; |
305 |
+ |
case 'c': /* spectral sampling or count */ |
306 |
+ |
switch (argv[i][2]) { |
307 |
+ |
#if MAXCSAMP>3 |
308 |
+ |
case 's': /* spectral bin count */ |
309 |
+ |
check(3,"i"); |
310 |
+ |
NCSAMP = atoi(argv[++i]); |
311 |
+ |
break; |
312 |
+ |
case 'w': /* wavelength extrema */ |
313 |
+ |
check(3,"ff"); |
314 |
+ |
WLPART[0] = atof(argv[++i]); |
315 |
+ |
WLPART[3] = atof(argv[++i]); |
316 |
+ |
break; |
317 |
+ |
#endif |
318 |
+ |
case '\0': /* sample count */ |
319 |
+ |
check(2,"i"); |
320 |
+ |
accumulate = atoi(argv[++i]); |
321 |
+ |
break; |
322 |
+ |
default: |
323 |
+ |
goto badopt; |
324 |
+ |
} |
325 |
+ |
break; |
326 |
|
case 'b': /* bin expression/count */ |
327 |
|
if (argv[i][2] == 'n') { |
328 |
|
check(3,"s"); |
428 |
|
|
429 |
|
void |
430 |
|
wputs( /* warning output function */ |
431 |
< |
char *s |
431 |
> |
const char *s |
432 |
|
) |
433 |
|
{ |
434 |
|
int lasterrno = errno; |
439 |
|
|
440 |
|
void |
441 |
|
eputs( /* put string to stderr */ |
442 |
< |
char *s |
442 |
> |
const char *s |
443 |
|
) |
444 |
|
{ |
445 |
|
static int midline = 0; |