Improve configuration module error management at init time, Fix command line help option processing, remove shotopt field from parameter structure

This commit is contained in:
frtabu
2017-09-24 23:43:48 +02:00
parent efe1ccf5e5
commit 3e27fc89fd
8 changed files with 442 additions and 332 deletions
+1 -1
View File
@@ -136,7 +136,7 @@ char *cfgpath;
} else {
sprintf(cfgpath,"%s",cfgoptions[i].optname);
}
if ( ((strlen(*p) > 1) && (strcmp(*p + 1,cfgoptions[i].shortopt) == 0)) ||
if ( ((strlen(*p) == 2) && (strcmp(*p + 1,cfgpath) == 0)) ||
((strlen(*p) > 2) && (strcmp(*p + 2,cfgpath ) == 0 )) ) {
p++;
j =+ processoption(&(cfgoptions[i]), *p);