197 {
198 SCANNED_ARG *scArg;
199 long iArg, imageColumns = 0, i, ip;
200 char **imageColumn = NULL;
201 char *ixName, *iyName, *IntensityName;
202 short xyzMode = 0;
203 unsigned long pipeFlags = 0, ROIFlags = 0, spotROIFlags = 0, blankOutFlags = 0;
204 int32_t intensityLevels = 256, saturationLevel = 254, backgroundHalfWidth = 3, lonerThreshold = 1, lonerPasses = 1;
205 long despike = 0;
208 short hotpixelFilter = 0;
209 char *inputFile = NULL, *outputFile = NULL;
210 int32_t ROI[4] = {-1, -1, -1, -1};
211 int32_t spotROISize[2] = {-1, -1};
212 char *ROIParameter[4] = {NULL, NULL, NULL, NULL};
213 int32_t blankOut[4] = {-1, -1, -1, -1};
214 char *blankOutParameter[4] = {NULL, NULL, NULL, NULL};
215 char *spotROISizeParameter[2] = {NULL, NULL};
217 long readStatus, nx, ny, outputRow, maxPages = 0;
218 double **image;
220 unsigned long sizeLinesFlags = 0, dummyFlags = 0, backgroundFlags = 0, centerFlags = 0, majorOrderFlag;
221 int32_t sizeLines[2] = {-1, -1};
222 char *sizeLinesParameter[2] = {NULL, NULL};
223 char *centerParameter[2] = {NULL, NULL};
224 double centerValue[2];
225 char **copyParamName;
226 long copyParamNames, copyBuffer[32];
227 char *spotImageFile = NULL;
228 short columnMajorOrder = -1;
230
231 if (argc < 2) {
232 fprintf(stderr, "%s%s%s", USAGE1, USAGE2, USAGE3);
233 exit(EXIT_FAILURE);
234 }
235
236 ixName = iyName = IntensityName = NULL;
237
239 for (iArg = 1; iArg < argc; iArg++) {
240 if (scArg[iArg].arg_type == OPTION) {
242
243 switch (
match_string(scArg[iArg].list[0], option, N_OPTIONS, 0)) {
244 case SET_MAJOR_ORDER:
245 majorOrderFlag = 0;
246 scArg[iArg].n_items--;
247 if (scArg[iArg].n_items > 0 &&
248 (!
scanItemList(&majorOrderFlag, scArg[iArg].list + 1, &scArg[iArg].n_items, 0,
249 "row", -1, NULL, 0, SDDS_ROW_MAJOR_ORDER,
250 "column", -1, NULL, 0, SDDS_COLUMN_MAJOR_ORDER, NULL)))
251 SDDS_Bomb(
"invalid -majorOrder syntax/values");
252 if (majorOrderFlag & SDDS_COLUMN_MAJOR_ORDER)
253 columnMajorOrder = 1;
254 else if (majorOrderFlag & SDDS_ROW_MAJOR_ORDER)
255 columnMajorOrder = 0;
256 break;
257 case SET_IMAGECOLUMNS:
258 if (scArg[iArg].n_items < 2)
259 SDDS_Bomb(
"invalid -imagecolumns syntax");
260 if (imageColumns)
261 SDDS_Bomb(
"give one and only one -imagecolumns option");
262 imageColumns = scArg[iArg].n_items - 1;
263 imageColumn =
tmalloc(
sizeof(*imageColumn) * imageColumns);
264 for (i = 0; i < imageColumns; i++)
265 imageColumn[i] = scArg[iArg].list[i + 1];
266 xyzMode = 0;
267 break;
268 case SET_ROI:
269 if (ROIFlags & OPTGIVEN)
271 ROIFlags = OPTGIVEN;
272 scArg[iArg].n_items--;
273 if (scArg[iArg].n_items < 1 ||
274 (!
scanItemList(&ROIFlags, scArg[iArg].list + 1, &scArg[iArg].n_items, 0,
275 "x0value",
SDDS_LONG, ROI + 0, 1, X0VALUE,
276 "x1value",
SDDS_LONG, ROI + 1, 1, X1VALUE,
277 "y0value",
SDDS_LONG, ROI + 2, 1, Y0VALUE,
278 "y1value",
SDDS_LONG, ROI + 3, 1, Y1VALUE,
279 "x0parameter",
SDDS_STRING, ROIParameter + 0, 1, X0PARAM,
280 "x1parameter",
SDDS_STRING, ROIParameter + 1, 1, X1PARAM,
281 "y0parameter",
SDDS_STRING, ROIParameter + 2, 1, Y0PARAM,
282 "y1parameter",
SDDS_STRING, ROIParameter + 3, 1, Y1PARAM,
283 NULL) ||
284 ((ROIFlags & X0VALUE) && ROI[0] < 0) || ((ROIFlags & X1VALUE) && ROI[1] < 0) ||
285 ((ROIFlags & Y0VALUE) && ROI[2] < 0) || ((ROIFlags & Y1VALUE) && ROI[3] < 0) ||
286 ((ROIFlags & X0PARAM) && (!ROIParameter[0] || !strlen(ROIParameter[0]))) ||
287 ((ROIFlags & X1PARAM) && (!ROIParameter[1] || !strlen(ROIParameter[1]))) ||
288 ((ROIFlags & Y0PARAM) && (!ROIParameter[2] || !strlen(ROIParameter[2]))) ||
289 ((ROIFlags & Y1PARAM) && (!ROIParameter[3] || !strlen(ROIParameter[3])))))
291 break;
292 case SET_BLANKOUT:
293 if (blankOutFlags & OPTGIVEN)
295 blankOutFlags = OPTGIVEN;
296 scArg[iArg].n_items--;
297 if (scArg[iArg].n_items < 1 ||
298 (!
scanItemList(&blankOutFlags, scArg[iArg].list + 1, &scArg[iArg].n_items, 0,
299 "x0value",
SDDS_LONG, blankOut + 0, 1, X0VALUE,
300 "x1value",
SDDS_LONG, blankOut + 1, 1, X1VALUE,
301 "y0value",
SDDS_LONG, blankOut + 2, 1, Y0VALUE,
302 "y1value",
SDDS_LONG, blankOut + 3, 1, Y1VALUE,
303 "x0parameter",
SDDS_STRING, blankOutParameter + 0, 1, X0PARAM,
304 "x1parameter",
SDDS_STRING, blankOutParameter + 1, 1, X1PARAM,
305 "y0parameter",
SDDS_STRING, blankOutParameter + 2, 1, Y0PARAM,
306 "y1parameter",
SDDS_STRING, blankOutParameter + 3, 1, Y1PARAM,
307 NULL) ||
308 ((blankOutFlags & X0VALUE) && blankOut[0] < 0) || ((blankOutFlags & X1VALUE) && blankOut[1] < 0) ||
309 ((blankOutFlags & Y0VALUE) && blankOut[2] < 0) || ((blankOutFlags & Y1VALUE) && blankOut[3] < 0) ||
310 ((blankOutFlags & X0PARAM) && (!blankOutParameter[0] || !strlen(blankOutParameter[0]))) ||
311 ((blankOutFlags & X1PARAM) && (!blankOutParameter[1] || !strlen(blankOutParameter[1]))) ||
312 ((blankOutFlags & Y0PARAM) && (!blankOutParameter[2] || !strlen(blankOutParameter[2]))) ||
313 ((blankOutFlags & Y1PARAM) && (!blankOutParameter[3] || !strlen(blankOutParameter[3])))))
314 SDDS_Bomb(
"invalid -blankOut syntax/values");
315 break;
316 case SET_SPOTROISIZE:
317 if (spotROIFlags & OPTGIVEN)
318 SDDS_Bomb(
"give -spotROIsize only once");
319 spotROIFlags = OPTGIVEN;
320 scArg[iArg].n_items--;
321 if (scArg[iArg].n_items < 1 ||
322 (!
scanItemList(&spotROIFlags, scArg[iArg].list + 1, &scArg[iArg].n_items, 0,
323 "xvalue",
SDDS_LONG, spotROISize + 0, 1, X0VALUE,
324 "yvalue",
SDDS_LONG, spotROISize + 1, 1, Y0VALUE,
325 "xparameter",
SDDS_STRING, spotROISizeParameter + 0, 1, X0PARAM,
326 "yparameter",
SDDS_STRING, spotROISizeParameter + 1, 1, Y0PARAM,
327 NULL) ||
328 ((spotROIFlags & X0VALUE) && spotROISize[0] < 0) ||
329 ((spotROIFlags & Y0VALUE) && spotROISize[1] < 0) ||
330 ((spotROIFlags & X0PARAM) && (!spotROISizeParameter[0] || !strlen(spotROISizeParameter[0]))) ||
331 ((spotROIFlags & Y0PARAM) && (!spotROISizeParameter[1] || !strlen(spotROISizeParameter[1])))))
332 SDDS_Bomb(
"invalid -spotROIsize syntax/values");
333 break;
334 case SET_SIZELINES:
335 if (sizeLinesFlags & OPTGIVEN)
337 sizeLinesFlags = OPTGIVEN;
338 scArg[iArg].n_items--;
339 if (scArg[iArg].n_items < 1 ||
340 (!
scanItemList(&sizeLinesFlags, scArg[iArg].list + 1, &scArg[iArg].n_items, 0,
341 "xvalue",
SDDS_LONG, sizeLines + 0, 1, X0VALUE,
342 "yvalue",
SDDS_LONG, sizeLines + 1, 1, Y0VALUE,
343 "xparameter",
SDDS_STRING, sizeLinesParameter + 0, 1, X0PARAM,
344 "yparameter",
SDDS_STRING, sizeLinesParameter + 1, 1, Y0PARAM,
345 NULL) ||
346 ((sizeLinesFlags & X0VALUE) && sizeLines[0] < 0) ||
347 ((sizeLinesFlags & Y0VALUE) && sizeLines[1] < 0) ||
348 ((sizeLinesFlags & X0PARAM) && (!sizeLinesParameter[0] || !strlen(sizeLinesParameter[0]))) ||
349 ((sizeLinesFlags & Y0PARAM) && (!sizeLinesParameter[1] || !strlen(sizeLinesParameter[1])))))
350 SDDS_Bomb(
"invalid -sizeLines syntax/values");
351 break;
352 case SET_DESPIKE:
353 scArg[iArg].n_items--;
354 despikeSettings.neighbors = 4;
355 despikeSettings.passes = 1;
356 despikeSettings.threshold = 0;
357 despikeSettings.averageOf = 2;
358 despikeSettings.flags = 0;
359 if (scArg[iArg].n_items > 0 &&
360 (!
scanItemList(&despikeSettings.flags, scArg[iArg].list + 1, &scArg[iArg].n_items, 0,
361 "neighbors",
SDDS_LONG, &despikeSettings.neighbors, 1, 0,
362 "passes",
SDDS_LONG, &despikeSettings.passes, 1, 0,
363 "averageOf",
SDDS_LONG, &despikeSettings.averageOf, 1, DESPIKE_AVERAGEOF,
364 "threshold",
SDDS_DOUBLE, &despikeSettings.threshold, 1, 0,
365 "keep", -1, NULL, 0, DESPIKE_KEEP, NULL) ||
366 despikeSettings.neighbors < 2 || despikeSettings.passes < 1 ||
367 despikeSettings.averageOf < 2 || despikeSettings.threshold < 0))
368 SDDS_Bomb(
"invalid -despike syntax/values");
369 if (!(despikeSettings.flags & DESPIKE_AVERAGEOF))
370 despikeSettings.averageOf = despikeSettings.neighbors;
371 if (despikeSettings.averageOf > despikeSettings.neighbors)
372 SDDS_Bomb(
"invalid -despike syntax/values: averageOf>neighbors");
373 despike = 1;
374 break;
375 case SET_HOTPIXELS:
376 scArg[iArg].n_items--;
377 hotpixelSettings.passes = 1;
378 hotpixelSettings.distance = 1;
379 hotpixelSettings.fraction = -1;
380 if (scArg[iArg].n_items > 0 &&
381 (!
scanItemList(&hotpixelSettings.flags, scArg[iArg].list + 1, &scArg[iArg].n_items, 0,
382 "fraction",
SDDS_DOUBLE, &hotpixelSettings.fraction, 1, 0,
383 "passes",
SDDS_LONG, &hotpixelSettings.passes, 1, 0,
384 "distance",
SDDS_LONG, &hotpixelSettings.distance, 1, 0, NULL) ||
385 hotpixelSettings.fraction <= 0 || hotpixelSettings.passes < 1 || hotpixelSettings.distance < 1))
386 SDDS_Bomb(
"invalid -hotpixelFilter syntax/values");
387 hotpixelFilter = 1;
388 break;
389 case SET_PIPE:
390 if (!
processPipeOption(scArg[iArg].list + 1, scArg[iArg].n_items - 1, &pipeFlags))
392 break;
393 case SET_LEVELS:
394 scArg[iArg].n_items--;
395 if (scArg[iArg].n_items < 1 ||
396 !
scanItemList(&dummyFlags, scArg[iArg].list + 1, &scArg[iArg].n_items, 0,
397 "intensityLevels",
SDDS_LONG, &intensityLevels, 1, 0,
398 "saturationLevel",
SDDS_LONG, &saturationLevel, 1, 0, NULL) ||
399 intensityLevels <= 10 || saturationLevel <= 0)
400 SDDS_Bomb(
"invalid -levels syntax/values");
401 break;
402 case SET_BACKGROUND:
403 scArg[iArg].n_items--;
404 if (scArg[iArg].n_items < 1 ||
405 !
scanItemList(&backgroundFlags, scArg[iArg].list + 1, &scArg[iArg].n_items, 0,
406 "halfwidth",
SDDS_LONG, &backgroundHalfWidth, 1, 0,
407 "symmetric", -1, NULL, 0, SYMMETRIC_BGREMOVAL,
408 "antihalo", -1, NULL, 0, ANTIHALO_BGREMOVAL,
409 "antiloner", -1, NULL, 0, REMOVE_LONERS,
410 "lonerthreshold",
SDDS_LONG, &lonerThreshold, 1, 0,
411 "lonerpasses",
SDDS_LONG, &lonerPasses, 1, 0, NULL) ||
412 backgroundHalfWidth < 0)
413 SDDS_Bomb(
"invalid -background syntax/values");
414 break;
415 case SET_SINGLESPOT:
416 if (scArg[iArg].n_items != 1)
417 SDDS_Bomb(
"invalid -singleSpot syntax/values");
418 backgroundFlags |= SINGLE_SPOT;
419 break;
420 case SET_SPOTIMAGE:
421 if (scArg[iArg].n_items != 2 || !(spotImageFile = scArg[iArg].list[1]))
422 SDDS_Bomb(
"invalid -spotImage syntax/values");
423 break;
424 case SET_CLIP_NEGATIVE:
425 backgroundFlags |= CLIP_NEGATIVE;
426 break;
427 case SET_CENTERON:
428 scArg[iArg].n_items--;
429
430 if (scArg[iArg].n_items < 1 ||
431 !
scanItemList(¢erFlags, scArg[iArg].list + 1, &scArg[iArg].n_items, 0,
432 "xcentroid", -1, NULL, 0, XCENTER_CENTROID,
433 "ycentroid", -1, NULL, 0, YCENTER_CENTROID,
434 "xpeak", -1, NULL, 0, XCENTER_PEAK,
435 "ypeak", -1, NULL, 0, YCENTER_PEAK,
436 "xparameter",
SDDS_STRING, centerParameter + 0, 1, XCENTER_PARAM,
437 "yparameter",
SDDS_STRING, centerParameter + 1, 1, YCENTER_PARAM, NULL) ||
438 bitsSet(centerFlags & (XCENTER_CENTROID + XCENTER_PEAK + XCENTER_PARAM)) != 1 ||
439 bitsSet(centerFlags & (YCENTER_CENTROID + YCENTER_PEAK + YCENTER_PARAM)) != 1)
441 break;
442 case SET_XYZ:
443 if (scArg[iArg].n_items != 4 ||
444 !strlen(ixName = scArg[iArg].list[1]) ||
445 !strlen(iyName = scArg[iArg].list[2]) ||
446 !strlen(IntensityName = scArg[iArg].list[3]))
448 xyzMode = 1;
449 break;
450 default:
451 fprintf(stderr, "unknown option %s given\n", scArg[iArg].list[0]);
452 exit(EXIT_FAILURE);
453 break;
454 }
455 } else {
456
457 if (!inputFile) {
458 inputFile = scArg[iArg].list[0];
459 } else if (!outputFile) {
460 outputFile = scArg[iArg].list[0];
461 } else
463 }
464 }
465
466 processFilenames(
"sddsspotanalysis", &inputFile, &outputFile, pipeFlags, 0, NULL);
467
468 if (!imageColumns && !IntensityName)
469 SDDS_Bomb(
"you must give either the -imageColumns or -xyz option");
470 if (imageColumns && IntensityName)
471 SDDS_Bomb(
"you must give either the -imageColumns or -xyz option, not both");
472
475 exit(EXIT_FAILURE);
476 }
477
478 if (spotImageFile &&
479 (!
SDDS_InitializeOutput(&SDDSspim, SDDS_BINARY, 0, NULL,
"sddsspotanalysis spot image", spotImageFile) ||
488 exit(EXIT_FAILURE);
489 }
490
491 if (!xyzMode) {
492 if ((imageColumns = expandColumnPairNames(&SDDSin, &imageColumn, NULL, imageColumns, NULL, 0, FIND_NUMERIC_TYPE, 0)) <= 0) {
494 SDDS_Bomb(
"No quantities selected to analyze");
495 }
496 ny = imageColumns;
497 outputRow = 0;
498 if (!(image = calloc(ny, sizeof(*image))))
500 nx = 0;
501 } else
502 ny = nx = 0;
503
504 if (!SetUpOutputFile(&SDDSout, outputFile, &SDDSin, ©ParamName, ©ParamNames, columnMajorOrder) ||
506 SDDS_Bomb(
"Problem setting up output file.");
507
509 if (readStatus > maxPages) {
511 SDDS_Bomb(
"Problem lengthening output file.");
512 maxPages += 10;
513 }
514
515
516
517 if (!xyzMode) {
518 if (!GetImageData(&nx, &image, imageColumn, ny, &SDDSin))
519 SDDS_Bomb(
"Problem getting image data.");
520 if (!nx)
521 continue;
522 } else {
523 if (!GetXYZImageData(&nx, &ny, &image, ixName, iyName, IntensityName, &SDDSin))
524 SDDS_Bomb(
"Problem getting image data.");
525 if (!nx || !ny)
526 continue;
527 }
528 if (!DetermineQuadLongValues(ROI, ROIFlags, ROIParameter, &SDDSin, nx, ny, 1)) {
530 SDDS_Bomb(
"Problem determining region of interest---verify that you gave sufficient information.");
531 }
532 if (blankOutFlags && !DetermineQuadLongValues(blankOut, blankOutFlags, blankOutParameter, &SDDSin, nx, ny, 0))
533 SDDS_Bomb(
"Problem determining blankout region---verify that you gave sufficient information.");
534 if (!DetermineDualLongValues(spotROISize, spotROIFlags, spotROISizeParameter, &SDDSin, 150))
535 SDDS_Bomb(
"Problem determine size of spot region of interest---verify that you gave sufficient information.");
536 if (!DetermineDualLongValues(sizeLines, sizeLinesFlags, sizeLinesParameter, &SDDSin, 3))
537 SDDS_Bomb(
"Problem determine size of number of lines to use for spot size computation---verify that you gave sufficient information.");
538 centerValue[0] = centerValue[1] = -1;
540 SDDS_Bomb(
"Problem getting center parameter value for x.");
542 SDDS_Bomb(
"Problem getting center parameter value for y.");
543 if (blankOutFlags)
544 BlankOutImageData(image, nx, ny, blankOut);
545 if (!AnalyzeImageData(image, nx, ny, ROI, spotROISize, sizeLines,
546 despike ? &despikeSettings : NULL, hotpixelFilter ? &hotpixelSettings : NULL, intensityLevels,
547 saturationLevel, backgroundHalfWidth, lonerThreshold, lonerPasses, backgroundFlags | centerFlags,
548 &analysisResults, spotImageFile ? &SDDSspim : NULL, centerValue))
549 continue;
550 for (ip = 0; ip < copyParamNames; ip++) {
552 SDDS_Bomb(
"Problem reading parameter data from input file.");
553 if (!
SDDS_SetRowValues(&SDDSout, SDDS_SET_BY_NAME | SDDS_PASS_BY_REFERENCE, outputRow, copyParamName[ip], copyBuffer, NULL)) {
554 SDDS_Bomb(
"Problem copying parameter data from input file.");
555 }
556 }
557 if (!
SDDS_SetRowValues(&SDDSout, SDDS_SET_BY_NAME | SDDS_PASS_BY_VALUE, outputRow++,
558 "ImageIndex", readStatus - 1,
559 "xROILower", analysisResults.ROI[0],
560 "xROIUpper", analysisResults.ROI[1],
561 "yROILower", analysisResults.ROI[2],
562 "yROIUpper", analysisResults.ROI[3],
563 "xSpotROILower", analysisResults.spotROI[0],
564 "xSpotROIUpper", analysisResults.spotROI[1],
565 "ySpotROILower", analysisResults.spotROI[2],
566 "ySpotROIUpper", analysisResults.spotROI[3],
567 "xSpotCenter", analysisResults.spotCenter[0],
568 "ySpotCenter", analysisResults.spotCenter[1],
569 "xSpotCentroid", analysisResults.spotCentroid[0],
570 "ySpotCentroid", analysisResults.spotCentroid[1],
571 "xSpotSigma", analysisResults.spotSigma[0],
572 "xSpotRange50", analysisResults.spotRange50[0],
573 "xSpotRange65", analysisResults.spotRange65[0],
574 "xSpotRange80", analysisResults.spotRange80[0],
575 "ySpotSigma", analysisResults.spotSigma[1],
576 "ySpotRange50", analysisResults.spotRange50[1],
577 "ySpotRange65", analysisResults.spotRange65[1],
578 "ySpotRange80", analysisResults.spotRange80[1],
579 "BackgroundLevel", analysisResults.backgroundLevel,
580 "BackgroundKilledPositive", analysisResults.backgroundKilledPositive,
581 "BackgroundKilledNegative", analysisResults.backgroundKilledNegative,
582 "IntegratedSpotIntensity", analysisResults.integratedSpotIntensity,
583 "PeakSpotIntensity", analysisResults.peakSpotIntensity,
584 "SaturationCount", analysisResults.saturationCount,
585 "phi", analysisResults.phi,
586 "rmsCrossProduct", analysisResults.rmsCrossProduct,
587 "majorAxis", analysisResults.majorAxis,
588 "minorAxis", analysisResults.minorAxis,
589 "S11", analysisResults.S11,
590 "S33", analysisResults.S33,
591 "S13", analysisResults.rmsCrossProduct, NULL)) {
594 }
595 }
600 for (i = 0; i < ny; i++)
601 free(image[i]);
602 if (!xyzMode) {
603 for (i = 0; i < ny; i++)
604 free(imageColumn[i]);
605 free(imageColumn);
606 }
607 for (i = 0; i < copyParamNames; i++)
608 free(copyParamName[i]);
609 free(copyParamName);
610 free(image);
611 return EXIT_SUCCESS;
612}
int32_t SDDS_LengthenTable(SDDS_DATASET *SDDS_dataset, int64_t n_additional_rows)
int32_t SDDS_InitializeOutput(SDDS_DATASET *SDDS_dataset, int32_t data_mode, int32_t lines_per_row, const char *description, const char *contents, const char *filename)
Initializes the SDDS output dataset.
int32_t SDDS_DefineColumn(SDDS_DATASET *SDDS_dataset, const char *name, const char *symbol, const char *units, const char *description, const char *format_string, int32_t type, int32_t field_length)
Defines a data column within the SDDS dataset.
int32_t SDDS_WriteLayout(SDDS_DATASET *SDDS_dataset)
Writes the SDDS layout header to the output file.
int32_t SDDS_DefineParameter(SDDS_DATASET *SDDS_dataset, const char *name, const char *symbol, const char *units, const char *description, const char *format_string, int32_t type, char *fixed_value)
Defines a data parameter with a fixed string value.
void SDDS_PrintErrors(FILE *fp, int32_t mode)
Prints recorded error messages to a specified file stream.
#define SDDS_STRING
Identifier for the string data type.
#define SDDS_LONG
Identifier for the signed 32-bit integer data type.
#define SDDS_SHORT
Identifier for the signed short integer data type.
#define SDDS_DOUBLE
Identifier for the double data type.
long bitsSet(unsigned long data)
Counts the number of set bits (1s) in the given data.
char * delete_chars(char *s, char *t)
Removes all occurrences of characters found in string t from string s.
long match_string(char *string, char **option, long n_options, long mode)
Matches a given string against an array of option strings based on specified modes.
int scanargsg(SCANNED_ARG **scanned, int argc, char **argv)
long processPipeOption(char **item, long items, unsigned long *flags)
void processFilenames(char *programName, char **input, char **output, unsigned long pipeFlags, long noWarnings, long *tmpOutputUsed)
long scanItemList(unsigned long *flags, char **item, long *items, unsigned long mode,...)
Scans a list of items and assigns values based on provided keywords and types.