- ar.add_option_switch("k","ignore_checksum_errors",
- "Ignore block checksum errors. Errors will be converted to warnings.",
- &ignore_checksum_errors,true,true);
-
- ar.add_option_switch("p","pause_on_checksum_error",
- "Wait for user input on checksum error.",
- &pause_on_checksum_error,true,true);
-
- ar.add_option_switch("n","ignore_unknown_block_errors",
- "Ignore errors caused by unknown block types. Errors will be converted to warnings.",
- &ignore_unknown_block_errors,true,true);
-
- ar.add_option_switch("g","ignore_object_integrity_errors",
- "Ignore errors caused by objects without proper end block. \
-Errors will be converted to warnings.",
- &ignore_object_integrity_errors,true,true);
-
- ar.add_option_switch("v","verbose",
- "Be a bit more verbose.",
- &verbose,true,true);
-
- ar.add_option_value("i","in_file",
- "specify input file",
- &infile_set,&infile,
- "<input-file>",true,false);
-
- ar.add_option_value("o","out_file",
- "Specify output file.",
- &outfile_set,&outfile,
- "<output_file>",true,true);
-
- ar.add_argument("File from where data is read",
- &infile_set,&infile,
- "<input-file>");
-
- ar.add_argument("File to where output is redirected",
- &outfile_set,&outfile,
- "<output-file>");
-
- ar.add_option_value("F","config_file",
- "Use the specified configuration file.",
- &config_file_set,&config_file,
- "<file-name>",false,true);
-
-
- // If there's a config file mentioned in the environment, take it!
- char * env_ldc_config=getenv("LDC_CONFIG");
- if(env_ldc_config){
- fprintf(stderr,"Using config file:\"%s\"\n",env_ldc_config);
- if(dump_vector(ar.read_file(env_ldc_config))){
- dump_vector(ar.get_help());
- exit(1);
- }
- }
-
- // Process command line first time
- if(dump_vector(ar.read_args(argc,args))){
- dump_vector(ar.get_help());
- exit(7);