diff options
author | jstebbins <[email protected]> | 2010-06-05 16:34:32 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2010-06-05 16:34:32 +0000 |
commit | bf5570e6b21bc049009f480e7116fe0b44223e45 (patch) | |
tree | 4122c33d763a2046a9d4ebd21acd3170db0246ab | |
parent | 6874e9ed1779e1c7813d8b356c1fe9d716d545e1 (diff) |
CLI: remove 'L' from short opts so that getopt_long properly flags it as an invalid option
I forgot to remove this short option when the --longest was removed.
Also fix the default case of the switch to print the option that failed
rather than the next option.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3357 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | test/test.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test/test.c b/test/test.c index 9d624b98e..fb26df9d7 100644 --- a/test/test.c +++ b/test/test.c @@ -2641,9 +2641,12 @@ static int ParseOptions( int argc, char ** argv ) int option_index = 0; int c; + int cur_optind; - c = getopt_long( argc, argv, - "hv::uC:f:4i:Io:t:Lc:m::M:a:A:6:s:UF::N:e:E:2dD:7895gOw:l:n:b:q:S:B:r:R:x:TY:X:Z:z", + cur_optind = optind; + c = getopt_long( argc, argv, + "hv::uC:f:4i:Io:t:c:m::M:a:A:6:s:UF::N:e:E:" + "2dD:7895gOw:l:n:b:q:S:B:r:R:x:TY:X:Z:z", long_options, &option_index ); if( c < 0 ) { @@ -3099,7 +3102,7 @@ static int ParseOptions( int argc, char ** argv ) color_matrix = 2; break; default: - fprintf( stderr, "unknown option (%s)\n", argv[optind] ); + fprintf( stderr, "unknown option (%s)\n", argv[cur_optind] ); return -1; } } |