IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 5, 2009, 9:41:50 AM (17 years ago)
Author:
bills
Message:

in pmConfigRead parse -image_id and -source_id arguments, save the values
in the pmConfig structure and when createing an output pmFPAfile copy
the values to the file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/config/pmConfig.c

    r20639 r21314  
    156156    // the file structure is used to carry pmFPAfiles
    157157    config->files = psMetadataAlloc ();
     158
     159    config->sourceId = 0;
     160    config->imageId = 0;
    158161    return config;
    159162}
     
    917920            }
    918921
     922            psArgumentRemove(argNum, argc, argv);
     923        }
     924    }
     925
     926    argNum = psArgumentGet(*argc, argv, "-image_id");
     927    if (argNum > 0) {
     928        psArgumentRemove(argNum, argc, argv);
     929        if (argNum >= *argc) {
     930            psWarning("-image_id command-line switch provided without the required id number");
     931        } else {
     932            if (!sscanf(argv[argNum], "%" PRId64, &config->imageId)) {
     933                psWarning("Failed to parse image_id value %s", argv[argNum]);
     934            }
     935            psArgumentRemove(argNum, argc, argv);
     936        }
     937    }
     938
     939    argNum = psArgumentGet(*argc, argv, "-source_id");
     940    if (argNum > 0) {
     941        psArgumentRemove(argNum, argc, argv);
     942        if (argNum >= *argc) {
     943            psWarning("-source_id command-line switch provided without the required id number");
     944        } else {
     945            if (!sscanf(argv[argNum], "%" PRId64, &config->sourceId)) {
     946                psWarning("Failed to parse image_id value %s", argv[argNum]);
     947            }
    919948            psArgumentRemove(argNum, argc, argv);
    920949        }
Note: See TracChangeset for help on using the changeset viewer.