Mail Archives: djgpp/1999/12/23/04:14:22
On Wed, 22 Dec 1999, Ghalos wrote:
> I have a problem loading the header for an FLI file.... it should be 128
> bytes like this:
>
#pragma pack(1)
> struct fli_file_header_s
> {
> int size;
> short magic;
> short frames;
> short width;
> short height;
> short depth;
> int flags;
> short speed;
> int next;
> int frit;
> char expand[100];
> }
#pragma pack()
>
> Problem is.... DJGPP pads this out to take up 132 bytes! I guess this is to
> keep everything nicely aligned but I can't read it in from the file
> correctly if this happens... how can I stop it??
>
Using #pragma pack(1) and #pragma pack() is one (but not only) of the
ways how to do that
- Raw text -