output beautifications and the reset of the initialize status on destroy

This commit is contained in:
Marcel 2014-03-09 15:23:50 +00:00
parent 8608074638
commit 98bd6e23de
1 changed files with 4 additions and 4 deletions

View File

@ -95,7 +95,6 @@ int CmdLO_Parse(int argc, char** argv) {
int i = 1; int i = 1;
CONode* cnode = 0; CONode* cnode = 0;
char* carg = 0; char* carg = 0;
;
for (; i < argc; ++i) { for (; i < argc; ++i) {
if (argv[i][0] == cmdoptions.cmdchar) { if (argv[i][0] == cmdoptions.cmdchar) {
if ((cnode = CmdLO_SearchNode(argv[i])) != 0) { if ((cnode = CmdLO_SearchNode(argv[i])) != 0) {
@ -103,7 +102,7 @@ int CmdLO_Parse(int argc, char** argv) {
continue; continue;
} else { } else {
carg = argv[i]; carg = argv[i];
fprintf(stderr, "CmdLineOptions: Unrecognized option '%s'.", fprintf(stderr, "CmdLineOptions: Unrecognized option '%s'.\n",
carg); carg);
} }
} }
@ -123,13 +122,13 @@ int CmdLO_Parse(int argc, char** argv) {
} }
if (cnode->option->possibleparametercount == j) { if (cnode->option->possibleparametercount == j) {
fprintf(stderr, fprintf(stderr,
"CmdLineOptions: Parameter '%s' is not allowed, parameter not added.", "CmdLineOptions: Parameter '%s' is not allowed, parameter not added.\n",
argv[i]); argv[i]);
} }
} }
} else { } else {
fprintf(stderr, fprintf(stderr,
"CmdLineOptions: Unrecognized option parameter '%s' for unrecognized option '%s'.", "CmdLineOptions: Unrecognized option parameter '%s' for unrecognized option '%s'.\n",
argv[i], carg); argv[i], carg);
} }
} }
@ -297,4 +296,5 @@ void CmdLO_Destroy() {
free(old); free(old);
} }
cmdoptions.options = 0; cmdoptions.options = 0;
cmdoptions.init = 0;
} }