[MPlayer-dev-eng] Re: [PATCH] use mmap() to simplify menu.conf parsing

Alban Bedel albeu at free.fr
Mon Mar 10 11:03:56 CET 2003


Hi Jason Lunz,

on Sun, 9 Mar 2003 16:26:02 +0000 (UTC) you wrote:

> arpi at thot.banki.hu said:
> > but keep in mind that many OS's doesn't have mmap.
> 
> I remembered that after I sent the patch. Still, shouldn't there be a
> utility function for "give me a pointer to the contents of this file"?
> It could use mmap() on good OSes and just read in the file for others. 
> 
> whatever. I was trying to figure out how the menu code worked, and the
> buffer fill in menu_init() looked ugly. I don't like seeing data
> needlessly copied around.
> 
I too but sometimes it's not worth the headeach. It's more a design question, the
asx parser (wich i wrote long before) is a stupid recursive parser (ie it need to
read a whole element before it start to really parse its content) so  it want the whole
file at once as asx files have only one top-level element uselly. Yeah all my parsers
sucks, but i'll never rewrite this one ;)
	Albeu


More information about the MPlayer-dev-eng mailing list