Path: utzoo!utgpu!watmath!clyde!bellcore!rutgers!mit-eddie!bu-cs!purdue!decwrl!sun!pitstop!sundc!seismo!uunet!mcvax!ukc!stl!stc!root44!hrc63!cd From: cd@hrc63.co.uk (Colin Denman "GECCL") Newsgroups: comp.lang.c Subject: Re: Overzealous alignment and padding Summary: external binary formats are not under my control Message-ID: <539@hrc63.co.uk> Date: 31 Oct 88 18:32:53 GMT References: <410@sdrc.UUCP> <7613@bloom-beacon.MIT.EDU> Organization: GEC Hirst Research Centre, Wembley, England. Lines: 29 In article <7613@bloom-beacon.MIT.EDU>, scs@athena.mit.edu (Steve Summit) writes: > In article <410@sdrc.UUCP> scjones@sdrc.UUCP (Larry Jones) writes: > >[...] > > As was discussed recently in this newsgroup, you can avoid all ^^^ > structure arrangement problems by simply not attempting to > conform to external binary formats, but by using an external text > file format instead. (Efficiency hackers find this solution > unpalatable, but the parse time and file size issues are often > not real problems in practice.) My most frequent problems with enforced alignments occur with *hardware* formats and ones over which I have no control. What external text format do I use for them :->. If my machine doesn't have floating point hardware, I still expect a worthy C implementation to simulate with loss of efficiency. Why can't the same attitude be adopted to matters of alignments and bit-manipulations. It would be neat and portable if I could express a format (bitfields and all) secure in the knowledge that the only thing I loose is efficiency. If my solution permits, I can optimise data layouts, but at least I get something that *works*. It is not just a problem for "efficiency hackers", quite the opposite. Colin J Denman