[vlc-devel] [PATCH 4/9] raop: Implement options for password

Rémi Denis-Courmont remi at remlab.net
Thu Jul 23 08:58:39 CEST 2009


On Wed, 22 Jul 2009 22:14:15 +0200, Michael Hanselmann <public at hansmi.ch>
wrote:
> 2009/7/22 Rémi Denis-Courmont <remi at remlab.net>:
>> Le mercredi 22 juillet 2009 22:48:27 Michael Hanselmann, vous avez
> écrit :
>>> 2009/7/22 Rémi Denis-Courmont <remi at remlab.net>:
>>> > Le mercredi 22 juillet 2009 02:06:41 Michael Hanselmann, vous avez
> écrit :
>>> >> +    fd = utf8_open( psz_path, O_RDONLY, 0400 );
>>> >
>>> > Any reason why you use the low-level file functions here?
>>>
>>> I couldn't find any module abstracting file I/O. Could you give me a
>>> hint, please?
>>
>> I mean <stdio.h>.
> 
> I just tried to convert it to fopen(3) and friends, but the code gets
> more complicated due to fread(3) being item-based (fgets(3) doesn't
> return length of read data). Can we leave it as it is?

I fail to see how fread() can be any worse than read() if the element size
is set to 1. stdio.h has built-in buffering and platform-specific new line
handling, while raw I/O does not.

-- 
Rémi Denis-Courmont




More information about the vlc-devel mailing list