[MPlayer-dev-eng] [PATCH] Change lots of defines to one big enum.

Michael Niedermayer michaelni at gmx.at
Wed Jun 18 02:35:44 CEST 2008


On Tue, Jun 17, 2008 at 11:03:07PM +0200, Benjamin Zores wrote:
> Ivan Kalvachev a écrit :
> > On 6/17/08, Benjamin Zores <ben at geexbox.org> wrote:
> >> Hi,
> >>
> >> Looking at this input/input.h file, I've found it pretty ugly to use
> >> dozens of defines to declare MPlayer type of commands.
> >> This simple patch makes them a big enum which:
> >>   - ease a lot application of external patches (no command number conflict)
> >>   - allows sorting commands per type/group (let's call this the Diego's
> >> work)
> >>   - order command alphabetically per group (Diego, if you read this and
> >> care ... :-)
> >>
> >> Anyone objects to this or may I apply ?
> > 
> > I like the idea.

me too


> > 
> > I just wonder why are you making it into typedef
> > (are you planning or replacing current int with that type?)
> 
> 1. doesn't hurt.
> 2. why not, this way gcc yells when trying to use as argument value 
> something that is not part of this enum.
> 
> > and won't the mp_command_t be confused with mp_cmd_t that
> > already exists.
> 
> I'm open to other names, no problem on that.

Iam fine with any name as long as it doesnt end in _t because that is
reserved by POSIX, not that a mp_*_t is likely going to ever clash in
pratice but still.

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No snowflake in an avalanche ever feels responsible. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20080618/a0926ba8/attachment.pgp>


More information about the MPlayer-dev-eng mailing list