Newsgroups: comp.lang.c
Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!m.cs.uiuc.edu!ux1.cso.uiuc.edu!cso.uiuc.edu!allender
From: allender@cso.uiuc.edu (Mark Allender)
Subject: Re: Little problem with sizeof on PC
Message-ID: <1991Apr23.155042.5532@ux1.cso.uiuc.edu>
Sender: usenet@ux1.cso.uiuc.edu (News)
Organization: TechoPunks Ltd. -- Party Goers to the Max
References: <1991Apr23.022057.29511@ux1.cso.uiuc.edu> <1991Apr23.132612.16687@msuinfo.cl.msu.edu>
Date: Tue, 23 Apr 1991 15:50:42 GMT
Lines: 31

I have a structure that is defined like:

struct header {
	int version[2];
	char unused[40];
	int stuff[8];
	char bogus;
	char mode;
	int time;
	char unused2[90];
	char filler[38];
	char filler2[15]
	float number;
};

Just a followup to me problem with the word alignment in this structure..
The data that I am reading in someone else's form, and has to stay this way.
I can't change it.  And indeed, I would rather have the data in raw binary
form.  There is a filler byte inserted after the filler2[15] declaration.

The best suggestion around this was to read the entire 201 bytes into
a char buffer[201] array, and then memcpy the elements into their corresponding
location.

Thanks to all who responded.....

-- 
-Mark Allender
-University of Illinois at Urbana/Champaign
-Conversation Builder Project
-allender@cs.uiuc.edu
