On Thu, 1 Mar 2012, Rob Browning wrote:

Ariel <asdeb...@dsgml.com> writes:

I had thought that getopt() supported "-b [foo]" style arguments, but
I must have misremembered.  It looks like it only supports "-b[foo]".

If we want "-b [foo]", I'll need to specify "b" to getopt (no colons)
and handle any subsequent oss|alsa value manually (increment optind,
etc.).  That works -- or we can just require -balsa/-boss.

Are you sure about that with getopt? The manual shows differently: http://www.gnu.org/software/libc/manual/html_node/Example-of-Getopt.html#Example-of-Getopt

-cfoo and -c foo were parsed the same in the example.

Make a note in the man page that -o requires -b and error if -o is
used without -b.

For backward compatibility, I imagine we shouldn't require -o, and
should just default to oss when -b isn't specified.

Nah, oss is dead, it's not useful as a default and backwards compatibility is not really that necessary.

Of course, if we didn't have to worry about backward compatibility at
all, it'd be nicest to have saytime default to sox -d whenever -b and -o
aren't specified, since that's probably more portable.

No, don't worry about backward compatibility at all. If it bothers you, then put in a NEWS file that lets people know the options changed.

        -Ariel



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to