aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ChangeLog6
-rw-r--r--src/sman/sman.c13
2 files changed, 14 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index d0b3f19d..1da82e2b 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,11 @@
2008-11-01 Gabriel Dos Reis <gdr@cs.tamu.edu>
+ Fix AW/2212001
+ * sman/sman.c (process_arguments): Fix thinko.
+ (process_options): Complain about unknown options.
+
+2008-11-01 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
* sman/sman.c (ptsPath): Remove.
* sman/Makefile.in: Add additional C runtimes for link.
* lib/openpty.c: Include <pty.h> and <util.h> where available.
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