[MPlayer-dev-eng] [PATCH] MacOS X Application Bundle Support
Nicolas Plourde
nicolas.plourde at sympatico.ca
Tue Dec 21 23:06:40 CET 2004
Chris Roccati wrote:
>
> On 19 Dec 2004, at 12:52, Reimar Döffinger wrote:
>
>> Hi,
>> does CFURLGetFileSystemRepresentation when it succeeds always
>> guarantee to return a
>> null-terminated string (because e.g. snprintf (IMHO very stupidly)
>> doesn't)?
>> If not you should make sure it the string always is null-terminated...
>
>
> Yes. The documentation says:
> "Boolean CFURLGetFileSystemRepresentation (
> CFURLRef url,
> Boolean resolveAgainstBase,
> UInt8 *buffer,
> CFIndex maxBufLen
> );
>
> No more than maxBufLen bytes are written to buffer. If url requires
> more than maxBufLen bytes to represent itself, including the
> terminating null byte, this function returns false. To avoid this
> possible failure, you should pass a buffer with size of at least the
> maximum path length for the file system in question."
>
> So the loop will only exit when the full path (including the null
> byte) will fit.
>
Can this be applied? Now we really need to look into creating/porting a
gui for OSX. Porting the actual mplayer gtk gui to osx look difficult
(impossible).
Sugestion are welcome.
--
====
Nicolas Plourde <nicolas.plourde at sympatico.ca>
More information about the MPlayer-dev-eng
mailing list