diff options
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | src/main.c | 10 |
2 files changed, 12 insertions, 0 deletions
@@ -1,5 +1,7 @@ 2005-01-15 Shawn Betts <katia_dilkina@verizon.net> + * src/main.c (main): Report extra unparsed arguments. + * src/actions.c (init_user_commands): set the last argument of the following commands to arg_REST: addhook, chdir, remhook, source, tmpwm, and prompt. @@ -566,6 +566,16 @@ main (int argc, char *argv[]) } } + /* Report extra unparsed arguments. */ + if (optind < argc) + { + fprintf (stderr, "Error: junk arguments: "); + while (optind < argc) + fprintf (stderr, "%s ", argv[optind++]); + fputc ('\n', stderr); + exit (EXIT_FAILURE); + } + if (!(dpy = XOpenDisplay (display))) { fprintf (stderr, "Can't open display\n"); |