From: Eric Helvey (helver@ALLIANCES.ORG)
Date: 11/06/98

What I did was copy the UNIX file system inode strcutre for having
basically unlimited bit field sizes.  It's basically an array of ints that
you can access to your heart's content.

In /usr/include/sys/fs/ufs_fs.h (on my sparc at work) you can find a
section related to bit map related macros.  With these macros, you can use
any int array as a bitfield, and make it as long as you want.

Of course, every time you change the length of one of these arrays, your
player file will be corrupted, and you'll either have to write a utility
to convert it, or just nuke everyone.  Additionally, you'll probably need
to change every place in which a bitfield is currently used in order to
use this new system.... and as I recall, that was no small undertaking.

Oh yeah... you'll also have to change all the bitfield defines to be just
flat ints instead of the 1 << x stuff that it was/(might be?).

OR... you could just use one of those spares in the playerfile.


On Fri, 6 Nov 1998, Igor wrote:

> At 06:50 AM 10/20/98 -0700, you wrote:
> >Inherently, the way that CircleMUD handles these AFF flags is by bitvector
> >handling, which is dependant upon the size of the variable that you use.
> >Circle uses either int or long for this and the size that these can handle
> >depends on the machine you are on.  Regardless, a nice maximum is to set it
> >at 1 << 31 or 2^31 or 2147483648.  This will give you 32 flags (0 through
> >31).  If you want to use more than 32 flags, you must use a different
> >system, which is available in the patch "128bit.patch".  Find it on the
> >CircleMUD ftp site, patch it, use it, love it.
> >
> >Take care,
> >Rick
> Ok, the 128bit.txt doesen't work because it reports in utils.h some strange
> macro
> errors something about '.' and 'b' in
> #define SET_BIT_AR(var. bit)      ((var)[Q_FIELD(bit)] |= Q_BIT(bit))
> so i can't use that patch ....
> but can't i change the affect bits from long to int .. otherwise i don't
> see any other
> solution then the make AFF2, which i tried but it simply reacts like
> nothing happens
> although it compiles nicely.
> So i apply on all of you who have reached the max affects (32) to help us
> other
> code newbies with some hints on how did you solve that problem (without
> 128bit.patch, of course)
> Thanks for everything
>   Peace With You
>      +------------------------------------------------------------+
>      | Ensure that you have read the CircleMUD Mailing List FAQ:  |
>      | |
>      +------------------------------------------------------------+

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | |

This archive was generated by hypermail 2b30 : 12/15/00 PST