Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site decwrl.UUCP Path: utzoo!linus!security!genrad!decvax!decwrl!asente From: asente@decwrl.UUCP (Paul Asente) Newsgroups: net.lang.c Subject: Re: Packed Structures? Message-ID: <3373@decwrl.UUCP> Date: Fri, 30-Sep-83 16:28:20 EDT Article-I.D.: decwrl.3373 Posted: Fri Sep 30 16:28:20 1983 Date-Received: Sun, 2-Oct-83 20:35:43 EDT References: <274@sequel.UUCP> Organization: DEC Western Research Lab, Los Altos, CA Lines: 11 Packed structures sound like a great idea. Earlier this summer I had to deal with a device that required certain 32-bit integer quantities to be aligned on 16-bit boundaries in its command packet format. The solution I ended up coming up with is one of the all-time great kludges of my life (involving storing the longs as arrays of 2 shorts and doing pointer coercion all the time) and everything would have been much easier if I could have just said to pack the array the way I specified it! -paul asente (decvax, ucbvax, allegra, ihpn4)!decwrl!asente