[MPlayer-dev-eng] [PATCH] getch2() support for OS/2

KO Myung-Hun komh at chollian.net
Tue Feb 19 08:19:49 CET 2008


Hi/2.

Alban Bedel wrote:
> On Tue, 19 Feb 2008 02:17:37 +0900
> KO Myung-Hun <komh at chollian.net> wrote:
>
>   
>> @@ -2851,10 +2855,12 @@
>>  mp_input_init(use_gui);
>>    mp_input_add_key_fd(-1,0,mplayer_get_key,NULL);
>>  if(slave_mode)
>> -#ifndef __MINGW32__
>> +#ifdef __MINGW32__
>> +  mp_input_add_cmd_fd(0,0,mp_input_win32_slave_cmd_func,NULL);
>> +#elif defined(__OS2__)
>> +  mp_input_add_cmd_fd(0,0,mp_input_os2_slave_cmd_func,NULL);
>> +#else
>>     mp_input_add_cmd_fd(0,1,NULL,NULL);
>> -#else
>> -  mp_input_add_cmd_fd(0,0,mp_input_win32_slave_cmd_func,NULL);
>>  #endif
>>  else if(!noconsolecontrols)
>>      mp_input_add_event_fd(0, getch2);
>>     
>
> imho this should be done in a different way. This #ifdef mess is really
> ugly. A single name for all slave_cmd functions is enouth, the build
> system only compile the correct one anyway. And the NULL vs.
> mp_input_slave_cmd_func can be solved with a simple define.
>
>   

Even in your case, we cannot avoid #ifdef statement to define macros for 
slave_cmd functions and select flag.

I think, there is no big difference between them.

-- 
KO Myung-Hun

Using Mozilla SeaMonkey 1.1.8
Under OS/2 Warp 4 for Korean with FixPak #15
On AMD ThunderBird 750 MHz with 512 MB RAM

Korean OS/2 User Community : http://www.ecomstation.co.kr





More information about the MPlayer-dev-eng mailing list