- argument_reader ar("ldc2");
- ar.add_param("h","help","Output this help text.",&help_wanted);
- ar.add_param("g","greet","Wonderful bla bla. It is here only to test the output\
-capabilities of the arg_reader.",&greet_want);
-
- ar.add_argument("<input-file>","File from where data is read",&infile_set,&infile);
- ar.add_argument("<output-file>","File to where output is redirected",&outfile_set,&outfile);
-
-
- if((dump_vector(ar.read_args(argc,args))||help_wanted)){
+ configuration_manager ar("ldc2");
+
+ /* Here come the configuration switches */
+ ar.add_option_switch("h","help",
+ "Output this help text and exit.",
+ &do_help,true,false);
+
+ ar.add_option_switch("a","output_info",
+ "Print tape data information (default)",
+ &output_info);
+
+ ar.add_option_switch("c","output_called",
+ "Print all called symbols from the object(s).",
+ &output_called);
+
+ ar.add_option_switch("e","output_exported",
+ "Print all exported symbols from the object(s).",
+ &output_exported);
+
+ ar.add_option_switch("u","output_unsatisfied",
+ "List all unsatisfied symbols.",
+ &output_unsatisfied);
+
+ ar.add_option_switch("s","split_objects",
+ "Split input data into distinct object files.",
+ &split_objects);
+
+ ar.add_option_switch("S","split_objects_numbered",
+ "Split input data into distinct numbered files",
+ &split_objects_numbered);
+
+ ar.add_option_switch("b","ignore_block_errors",
+ "Ignore block integrity errors. This will output broken blocks,too",
+ &ignore_block_errors);
+
+ ar.add_option_switch("k","ignore_checksum_errors",
+ "Ignore block checksum errors. Errors will be converted to warnings.",
+ &ignore_checksum_errors);
+
+ ar.add_option_switch("p","pause_on_checksum_error",
+ "Wait for user input on checksum error.",
+ &pause_on_checksum_error);
+
+ 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);
+
+ 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);
+
+ ar.add_option_value("i","input_file",
+ "specify input file",
+ &infile_set,&infile,
+ "<input-file>");
+
+ ar.add_option_value("o","output_file",
+ "Specify output file.",
+ &outfile_set,&outfile,
+ "<output_file>");
+
+
+ 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>");
+
+ if((dump_vector(ar.read_args(argc,args))||do_help)){