X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f Date: Sat, 25 Dec 2004 12:09:21 +0200 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: djgpp AT delorie DOT com Message-ID: <01c4ea69$Blat.v2.2.2$f96dba00@zahav.net.il> Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=ISO-8859-1 X-Mailer: emacs 21.3.50 (via feedmail 8 I) and Blat ver 2.2.2 In-reply-to: (message from Radical NetSurfer on Sat, 25 Dec 2004 02:11:42 -0500) Subject: Re: MAJOR PAIN: Reading Integers! References: Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > From: Radical NetSurfer > Date: Sat, 25 Dec 2004 02:11:42 -0500 > > 7. Conclusion: > Except for being "clever" at using *4* fread's > or by re-arranging a unsigned char, byte-by-byte > using shifts and ors, > I just see NO WAY to directly read in Integer > Values without being "corrupted" by Intel's expectations! > > what other method(s) are available to achieves this that > I may of missed? Did you try a union like below? union lbf { unsigned char buf[4]; unsigned long bf; } abf; I think reading into abf.buf[] and then using abf.bf will do what you want. Does it?