On Thu, 3 Feb 2000, Andreas Beck wrote:

> > +struct file_type_op_t file_type[] =
> > +{
> > +        { "ppm", _ggi_file_detect_ppm, NULL, _ggi_file_ppm_write },
> > +        { "bmp", _ggi_file_detect_bmp, _ggi_file_bmp_read, NULL },
> > +        { NULL, NULL, NULL, NULL }
> > +};
> Hmm - I'd like it better, if it would read only P?M and use ppmtools to
> convert any other format as required.

I'd prefer PNG myself.  Or JPEG.  Or better, both.
At least with those I know my videodata's stored properly :)
[png up to 48bpp RGB, JPEG stores in YCbCr which I'd rather have for
pictures... :]

And I can't afford the 100Megs it takes to store the ppmtools.
(exageration - it's ~25-40MB depending on compile options).  Or have to
hunt down one that will -compile- on my computer.  *sigh*

> Why don't you just use a file-stream and leave buffering to the libc ?

It's handy for overriding to read from sources -other- than files? :)
(ie: network connections [okay poor example], messaging systems *giggle*,
WWW connections....  preformatted files ie embedded WWW or gzipped... :)

Oh yeah, and you can support 64bit access too.  For files >2GB in size :)

> > +/* FIXME: compiler fails on using this with: "sizeof applied to an incomplete 
>type" */
> > +#define NUM_FILE_TYPES     (sizeof(file_type) / sizeof(struct file_type_op_t))
> You need to have a complete prototype for file_type_op_t included before you
> can use sizeof.

Unless it's a (void*)....  which is how I normally HANDLE it *giggle*

Anyways, G'day, eh? :)
        - Teunis

PS: ignore me if ya want.  i'm just a crank...

Reply via email to