summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2011-02-09 23:42:44 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2011-02-13 09:12:17 -0800
commit2011f509c56b73cc62105c689d702f279f522017 (patch)
tree311bcc3a37950de2e832509c5319e692ad3cd86c
parent60cd11cf0b83176e7c542e51a7e6a3eaea58401c (diff)
Bug 34117: setxkbmap -I dir not accepted, despite man page
Easy enough to accept the syntax documented in the man page, so accept the -I flag with or without a space between -I and the directory argument. https://bugs.freedesktop.org/show_bug.cgi?id=34117 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Dirk Wallenstein <halsmit@t-online.de> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
-rw-r--r--setxkbmap.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/setxkbmap.c b/setxkbmap.c
index e812a9c..4c30812 100644
--- a/setxkbmap.c
+++ b/setxkbmap.c
@@ -414,7 +414,15 @@ parseArgs(int argc, char **argv)
usage(argc, argv);
exit(0);
}
- else if (strpfx(argv[i], "-I"))
+ else if (streq(argv[i], "-I")) /* space between -I and path */
+ {
+ if ( ++i < argc )
+ ok = addToList(&szInclPath, &numInclPath, &inclPath, argv[i]);
+ else
+ VMSG(0, "No directory specified on the command line\n"
+ "Trailing -I option ignored\n");
+ }
+ else if (strpfx(argv[i], "-I")) /* no space between -I and path */
ok = addToList(&szInclPath, &numInclPath, &inclPath, &argv[i][2]);
else if (streq(argv[i], "-keycodes"))
ok = setOptString(&i, argc, argv, KEYCODES_NDX, FROM_CMD_LINE);