aboutsummaryrefslogtreecommitdiff
path: root/src/sman/sman.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sman/sman.c')
-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