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

Diego Biurrun diego at biurrun.de
Wed Feb 20 20:02:41 CET 2008


On Wed, Feb 20, 2008 at 09:20:35PM +0900, KO Myung-Hun wrote:
>
> Reimar Döffinger wrote:
>> On Wed, Feb 20, 2008 at 06:28:55PM +0900, KO Myung-Hun wrote:
>>   
>>> --- osdep/getch2-win.c	(revision 26012)
>>> +++ osdep/getch2-win.c	(working copy)
>>> @@ -13,7 +13,7 @@
>>>  // HACK, stdin is used as something else below
>>>  #undef stdin
>>>  -int mp_input_win32_slave_cmd_func(int fd,char* dest,int size){
>>> +int mp_input_slave_cmd_func(int fd,char* dest,int size){
>>>    DWORD retval;
>>>    HANDLE stdin = GetStdHandle(STD_INPUT_HANDLE);
>>>    if(!PeekNamedPipe(stdin, NULL, size, &retval, NULL, NULL) || !retval){
>>
>> I do not like this renaming at all, this is still code that is full of
>> Windows-API stuff. Sure it is used for OS/2 as well, but is is still the
>> Windows API it uses, so the previous name still seems more correct.
>
> I agree with you. But it seems that Alban and Diego want it.
>
>> Add a comment that it also handles OS/2 if you want.
>> Or if you really want to rename if make it win32_os2...
>
> I've added a comment to the patch.

diego at cerebus:~/src/mplayer/mplayer$ patch --dry-run -p0 -i /tmp/getch2-os2.diff 
patching file mplayer.c
Hunk #1 succeeded at 2853 (offset -2 lines).
patching file osdep/getch2-os2.c
patch: **** malformed patch at line 220: Index: osdep/getch2.h

The patch also does not take into account recent changes to getch2.h.

Diego



More information about the MPlayer-dev-eng mailing list