Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!dali.cs.montana.edu!caen!sdd.hp.com!cs.utexas.edu!uunet!van-bc!ubc-cs!alberta!herald.usask.ca!weyr!p0.f70.n140.z1.FIDONET.ORG!David.Plummer From: David.Plummer@p0.f70.n140.z1.FIDONET.ORG (David Plummer) Newsgroups: comp.sys.amiga.misc Subject: Bitfields in C Message-ID: <214.2826444A@weyr.FIDONET.ORG> Date: 5 May 91 20:38:10 GMT Sender: ufgate@weyr.FIDONET.ORG (newsout1.26) Organization: FidoNet node 1:140/70.0 - Double Check, Regina Sask Lines: 33 Does anyone know how to build an easily- addressable bitfield array in C? Exactly what I would like to be able to do it this: struct bits { unsigned long thebits[31] : 1; } which of course is impossible, since C doesn't allow arrays in the bitfield descriptors. Even better would be struct bit { unsigned long thebit : 1; } struct mybits { struct bit bitlist[32767]; } Which Lattice at least does not pack into memory, but rather allocates at 32767 longs of data. If you have any idea what I'm talking about, does anyone have any suggestions? Thanks a lot, Dave (plummerd@max.cc.uregina.ca) -- David Plummer - via FidoNet node 1:140/22 UUCP: ...!herald!weyr!70.0!David.Plummer Domain: David.Plummer@p0.f70.n140.z1.FIDONET.ORG Standard Disclaimers Apply...