options: fix specifying string options without parameter
commit86571435baf116a91a31451d26224600f3575270
authorUoti Urpala <uau@mplayer2.org>
Fri, 29 Jun 2012 02:14:26 +0000 (29 05:14 +0300)
committerUoti Urpala <uau@mplayer2.org>
Mon, 16 Jul 2012 18:08:42 +0000 (16 21:08 +0300)
treeaf013eb73a698e577817b806514b20845b8f3602
parent9426c5f92aab4b561c568e4250f5b250e2aa45c5
options: fix specifying string options without parameter

Specifying a string option with no parameter, as in "--dumpfile" with
no '=', erroneously set the corresponding variable to NULL. Fix this
to give an error about missing parameter instead.

Suboption parsing explicitly treated empty option values as if the
option had been specified with no value (no '='). Thus it was not
possible to specify empty strings as values. I think this behavior was
originally added only because of other limitations in the old
implementation. Remove it, so that suboptions now behave the same as
top-level ones in this regard.

Document the NULL-distinguishing property of bstrdup0() that the code
depends on, and also make bstrdup() behave consistently.
bstr.h
m_option.c