toppin@melpar.UUCP (Doug Toppin) (03/16/89)
Does anyone have any functions that manage a bit map array? I am interested in being able to create an array of n int's and treat each of the bits independently. For example, map = createMap(1000) - would allocate space for 1000 bits setBit(map, 500) - would set bit 500 clearBit(map, 500) - would clear bit 500 testBit(map, 500) - would return the state of bit 500. I remember this being in an old Dr. Dobb's but can't find it anymore. I would really appreciate someone sending it or something like it to me. I have a tight schedule for what I am doing and can't afford to spend much time on it. I am using C on a 286 running IBM Xenix but it should not depend of the machine/system as far as I can tell. Thanks for any responses. Doug Toppin uunet!melpar!toppin