options: Fix multiple -v by simplifying CONF_TYPE_FUNC
commit6be229cbbfbe29ad61025051b1d903f5619e0b8a
authorUoti Urpala <uau@symbol.nonexistent.invalid>
Sat, 26 Apr 2008 05:53:26 +0000 (26 08:53 +0300)
committerUoti Urpala <uau@symbol.nonexistent.invalid>
Sat, 26 Apr 2008 06:40:35 +0000 (26 09:40 +0300)
treef501adc6759acbff9d3f8b31b174dfb1f13eddf5
parent98b959ae1fadd70b7a8ac8259759b11d6ed4fb2d
options: Fix multiple -v by simplifying CONF_TYPE_FUNC

The CONF_TYPE_FUNC implementation counted how many times the option
had appeared and called the function that many times when it was set.
However each -v on the command line triggered an increase of the count
_and_ as many calls as the current count indicated. Thus the resulting
verbosity levels for 0 to 5 -v were really 0, 1, 3, 6, 10, 15 instead
of 0, 1, 2, 3, 4, 5.

Remove the counting functionality and just call the given function
once at each set operation. This fixes -v; other options are not
affected.
m_option.c