}
-
int main(int argc, char ** args){
/* Configuration data */
&config_file_set,&config_file,
"<file-name>");
+ // Process command line first time
if((dump_vector(ar.read_args(argc,args))||do_help)){
dump_vector(ar.get_help());
exit(1);
}
+ // If user has a config file, use it.
+ if (config_file_set){
+ if(dump_vector(ar.read_file(config_file))){
+ dump_vector(ar.get_help());
+ exit(1);
+ }
+ // Process command line a second time to override values from config file.
+ if(dump_vector(ar.read_args(argc,args))||do_help){
+ dump_vector(ar.get_help());
+ exit(1);
+ }
+ }
+
+
+
+
if (infile_set==1){
printf("Opening file for input:%s\n",infile.c_str());
in_fd=open(infile.c_str(),O_RDONLY);