IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 30, 2012, 2:11:49 PM (14 years ago)
Author:
bills
Message:

add new option to censorObjects where it simply reads the input smf file.
If it failes we can assume that the file is corrupt

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/magic/censorObjects/src/censorArguments.c

    r24695 r33626  
    3232    }
    3333
     34    status = pmConfigFileSetsMD (config->arguments, &argc, argv, "INPUT", "-file", "-list");
     35    if (!status) {
     36        psError(CENSOR_ERR_ARGUMENTS, true, "Missing -file (input) or -list (input)");
     37        psErrorStackPrint(stderr, "exit");
     38        return NULL;
     39    }
     40
     41    if ((N = psArgumentGet (argc, argv, "-checkinputonly"))) {
     42        psArgumentRemove (N, &argc, argv);
     43        psMetadataAddBool(config->arguments, PS_LIST_TAIL, "CHECK.INPUT.ONLY", PS_META_REPLACE, "do not censor just check input sources", true);
     44        return config;
     45    }
     46       
    3447    // define the input mask
    3548    status = pmConfigFileSetsMD (config->arguments, &argc, argv, "INPUT.MASK", "-mask", "-masklist");
     
    4255    }
    4356
    44     status = pmConfigFileSetsMD (config->arguments, &argc, argv, "INPUT", "-file", "-list");
    45     if (!status) {
    46         psError(CENSOR_ERR_ARGUMENTS, true, "Missing -file (input) or -list (input)");
    47         psErrorStackPrint(stderr, "exit");
    48         return NULL;
    49     }
    5057
    5158    if (argc != 2) {
Note: See TracChangeset for help on using the changeset viewer.