delorie.com/archives/browse.cgi | search |
Newsgroups: | comp.os.msdos.djgpp |
From: | rd5718 AT irix DOT bris DOT ac DOT uk (Rich Dawe) |
Subject: | Re: Real stupid problem. |
X-Nntp-Posting-Host: | irix.bris.ac.uk |
Message-ID: | <F89y29.Asz@fsa.bris.ac.uk> |
Lines: | 23 |
Sender: | usenet AT fsa DOT bris DOT ac DOT uk (Usenet) |
Organization: | University of Bristol, England |
X-Newsreader: | TIN [UNIX 1.3 950824BETA PL0] |
References: | <3 DOT 0 DOT 6 DOT 32 DOT 19990303124259 DOT 0094a760 AT pop DOT globalserve DOT net> |
Date: | Mon, 8 Mar 1999 11:46:57 GMT |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
Paul Derbyshire (pderbysh AT usa DOT net) wrote: : struct SXM_Pat_header { : int pat_size __attribute__ ((__packed__)); : char pack_type __attribute__ ((__packed__)); : short nr_rows __attribute__ ((__packed__)); : short pattern_data_size __attribute__ ((__packed__)); : }; You can just put the attribute at the end of the structure too: struct SXM_Pat_header { <blah> } __attribute__((packed)); This saves a lot of typing! BTW I don't think you need the double underscores on the packed part - it works for me without. Is it supposed to have double underscores? -- ============================================================================== Rich Dawe - 4th-year MSci Physicist @ Bristol University, UK richdawe AT bigfoot DOT com, http://www.bigfoot.com/~richdawe/ ==============================================================================
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |