[MPlayer-dev-eng] [PATCH] Change lots of defines to one big enum.
Benjamin Zores
ben at geexbox.org
Tue Jun 17 23:03:07 CEST 2008
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.
>
> 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.
Also, there are a lot of places in mplayer (stream.h, video_out.h ...)
that may deserve the same change to be done.
Ben
More information about the MPlayer-dev-eng
mailing list