Re: What is?

From: George Greer (greerga@circlemud.org)
Date: 06/12/02


On Wed, 12 Jun 2002, Kevin Dethlefs wrote:

>What is this 128 bit deal? What does it do? I seen it on the ftp site, and
>now in here. Its bugging me.

Uses an array of integers to give the illusion of one big bitvector.

unsigned long array_o_bits[4];  /* 32 bits * 4 ints = 128 bits */

#define AFF_A 1
#define AFF_B 2
#define AFF_Z 26
#define AFF_z 52

AFF_z = array_o_bits[52 / 32] & (1 << (52 % 32));
AFF_z = array_o_bits[1] & (1 << 20);

Only downside being you cannot do:

  PRF_FLAGGED(ch, PRF_B | PRF_Z)

because "2 | 26" doesn't do what you want, while "(1 << 26) | (1 << 2)"
does.

--
George Greer
greerga@circlemud.org

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/25/03 PDT