diff options
author | Tavian Barnes <tavianator@gmail.com> | 2011-04-02 18:26:56 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2011-04-02 18:26:56 -0400 |
commit | 90e477cde0e9c2f7d8e085efa19b2fe2d0f9aae5 (patch) | |
tree | d83b7858d5233a33db35173fff7b585df4c03022 /dimension | |
parent | c44fbdb2512a63a1e145b400dc20130199601b3e (diff) | |
download | dimension-90e477cde0e9c2f7d8e085efa19b2fe2d0f9aae5.tar.xz |
Print usage info to stderr on invalid options.
Diffstat (limited to 'dimension')
-rw-r--r-- | dimension/main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/dimension/main.c b/dimension/main.c index 6e40c08..80bc6e6 100644 --- a/dimension/main.c +++ b/dimension/main.c @@ -81,11 +81,12 @@ main(int argc, char **argv) break; case '?': - print_usage(stdout, argv[0]); /* '?' is returned as an error code too */ if (optopt == 0) { + print_usage(stdout, argv[0]); return EXIT_SUCCESS; } else { + print_usage(stderr, argv[0]); return EXIT_FAILURE; } case DMNSN_OPT_VERSION: |