diff svr-runopts.c @ 1160:1b583b2994ba

Warn rather than fail if flags have trailing parts
author Matt Johnston <matt@ucc.asn.au>
date Wed, 28 Oct 2015 21:37:35 +0800
parents 67d8a904f5a9
children 8b6cba298768
line wrap: on
line diff
--- a/svr-runopts.c	Wed Oct 21 23:08:22 2015 +0800
+++ b/svr-runopts.c	Wed Oct 28 21:37:35 2015 +0800
@@ -191,8 +191,9 @@
 		if (argv[i][0] == '-') {
 			char c = argv[i][1];
 			if (strlen(argv[i]) != 2) {
-				/* Ensure only one flag per hyphen. '?' falls through to print help */
-				c = '?';
+				/* We only handle one flag per hyphen */
+				fprintf(stderr, "Warning, trailing '%s' of '%s' is ignored.\n",
+					&argv[i][2], argv[i]);
 			}
 			switch (c) {
 				case 'b':