Re: [AD] al_find file size

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


hmm, while they're at it that person should check out
the inernals and make sure that long long is used
everywhere the size is checked out.

In fact maybe there should be a filesize typedef...

--- Mike Fahlbusch <mcf@xxxxxxxxxx> wrote:

> In allegro\include\allegro there is a file called
> file.h.  It contains a 
> structure mostly used by the al_find* functions.
> 
> struct al_ffblk        /* file info block for the
> al_find*() routines */
> {
>     int attrib;         /* actual attributes of the
> file found */
>     time_t time;        /* modification time of file
> */
>     long size;          /* size of file */
>     char name[512];     /* name of file */
>     void *ff_data;      /* private hook */
> };
> 
> The type for size is too small to hold files larger
> than 4 Gb because on 
> many compilers, a long is only 32 bits.  Media files
> can be longer than 
> 4 Gb.  In addition many games are coming out on DVD
> so the files can be 
> larger than 4 Gb.  The  long long  data type is now
> supported by the C 
> standard.  Can someone change  long size;  to  long
> long size;   to 
> accommodate large files?
> 
> 
> 
>
-------------------------------------------------------
> SF.Net email is sponsored by:
> Tame your development challenges with Apache's
> Geronimo App Server. Download
> it for free - -and be entered to win a 42" plasma tv
> or your very own
> Sony(tm)PSP.  Click here to play:
> http://sourceforge.net/geronimo.php
> -- 
>
https://lists.sourceforge.net/lists/listinfo/alleg-developers
> 





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/