aboutsummaryrefslogtreecommitdiff
path: root/src/sman
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2008-11-01 21:21:00 +0000
committerdos-reis <gdr@axiomatics.org>2008-11-01 21:21:00 +0000
commit080cc997345ac89c030ca945501b931af8ba11a5 (patch)
tree37b1f830bc11d6dd60a0290292f600d3f9d324bf /src/sman
parent6957f792e695571e137de9c7b85bca28cb836b28 (diff)
downloadopen-axiom-080cc997345ac89c030ca945501b931af8ba11a5.tar.gz
Fix AW/2212001
* sman/sman.c (process_arguments): Fix thinko. (process_options): Complain about unknown options.
Diffstat (limited to 'src/sman')
-rw-r--r--src/sman/sman.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/sman/sman.c b/src/sman/sman.c
index 4488948a..3ef2e346 100644
--- a/src/sman/sman.c
+++ b/src/sman/sman.c
@@ -202,15 +202,11 @@ process_arguments(openaxiom_command* command, int argc,char ** argv)
else if (strcmp(argv[arg], "-paste") == 0)
PasteFile = argv[++arg];
else
- argv[++other] = argv[arg];
+ argv[other++] = argv[arg];
}
- if (other > 0)
- ++other;
-
command->core_argv = argv;
command->core_argc = other;
- argv[++other] = NULL;
/* If there were no X libraries
* at build-time, we proceed to
@@ -257,6 +253,13 @@ process_options(openaxiom_command* command, int argc, char **argv)
{
set_up_defaults();
process_arguments(command, argc, argv);
+ /* Complain about command line arguments unknown to Superman. */
+ if (command->core_argc > 0) {
+ int i;
+ for (i = 0; i < command->core_argc; ++i)
+ fprintf(stderr,"command line error: %s\n", command->core_argv[i]);
+ exit(-1);
+ }
}
static void