Displaying 3 results from an estimated 3 matches for "_flac_open".
2013 Mar 17
2
Patch to add Unicode filename support for win32 flac
JonY wrote:
> On 3/17/2013 10:33, Janne Hyv?rinen wrote:
> > Here's a patch that makes MSVC compiled flac.exe able to use wildcards
> > and encode/decode files with Unicode characters in names. It may not be
> > the prettiest code but it fulfills its primary purpose.
> > I tried to alter FLAC code as little as possible. It replaces argv with
> > utf-8 encoded
2013 Mar 17
0
Patch to add Unicode filename support for win32 flac
...like to see some way to do this to:
>
> a) Make this usable from MinGW compiled binaries.
> b) Reduce the the amount of inline #ifdef hackery.
>
A simple way to do this is to make all C IO calls that need OS specific
hacks go into the compatibility module. Eg for open() calls:
int _flac_open(....){
#if win32
...
#else if os2
...
#else
... [generic call to open() without hacks]
#endif
}
All those ifdefs will at least be confined rather than spread out
through the code.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/...
2013 Mar 17
3
Patch to add Unicode filename support for win32 flac
...>> a) Make this usable from MinGW compiled binaries. b) Reduce the
>> the amount of inline #ifdef hackery.
>>
>
> A simple way to do this is to make all C IO calls that need OS
> specific hacks go into the compatibility module. Eg for open()
> calls:
>
> int _flac_open(....){ #if win32 ... #else if os2 ... #else ...
> [generic call to open() without hacks] #endif }
>
> All those ifdefs will at least be confined rather than spread out
> through the code.
I did it plibc-style:
in compat.h:
#if defined(_WIN32)
#define FOPEN grabbag__fopen_utf8_wrapper...