diff options
author | Bert <ber.t@gmx.com> | 2011-01-20 16:03:59 +0100 |
---|---|---|
committer | Bert <ber.t@gmx.com> | 2011-01-20 16:03:59 +0100 |
commit | 45db2881e26dd5e51c0e4142bdefa2d947292c80 (patch) | |
tree | ae87d474c65f12410398a2d5808e5035daf56b5f | |
parent | c399c1a08552393633e836219ceeef2f2b0ab5f3 (diff) |
Fixed filenames in parse_options()
-rw-r--r-- | options.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -40,9 +40,6 @@ void print_version() { void parse_options(int argc, char **argv) { int opt; - _options.filenames = (const char**) argv + 1; - _options.filecnt = argc - 1; - while ((opt = getopt(argc, argv, "hv")) != -1) { switch (opt) { case '?': @@ -56,4 +53,7 @@ void parse_options(int argc, char **argv) { exit(0); } } + + _options.filenames = (const char**) argv + optind; + _options.filecnt = argc - optind; } |