Re: Addendum to prior post (newbie crosspost)

From: Mathew Earle Reuther (graymere@zipcon.net)
Date: 06/25/02


On Tue, 25 Jun 2002, Templar Viper wrote:
> Permanent affects are not part of the original stock package, and are
> therefore
> not included in my updated 128bit patch (assuming you used it).

Right, it's an OLC thing, quite obviously.  That much I managed to figure
out. :)  (*Begins to rummage through 4 or 5 codebases in various states of
disarray for the one we're discussing*)

> Anyways, the big question is here, how did you set up your GET_OBJ_PERM
> macro, and, do you want it to have 32 bits or 128bits? Let's go for the
> 128 bits, since that's the most logical I think. Let's grab the mob
> macro for 128bits:
>
> #define MOB_FLAGGED(ch, flag) (IS_SET_AR(MOB_FLAGS(ch), (flag)))
>
> and the stock should be something like this:
>
> #define MOB_FLAGGED(ch) (IS_SET(MOB_FLAGS(ch)))

My macro looks like this in utils.h:

#define GET_OBJ_PERM(obj)       ((obj)->obj_flags.bitvector)

So I make a wild stab and change this to:

#define GET_OBJ_PERM(obj)       ((obj)->obj_flags.bitvector, (flag))

Which results in:

db.c: In function `parse_object':
db.c:1485: `flag' undeclared (first use in this function)
db.c:1485: (Each undeclared identifier is reported only once
db.c:1485: for each function it appears in.)
db.c:1485: warning: left-hand operand of comma expression has no effect

Thus I know I've made an error. :)

So I do this:

#define GET_OBJ_PERM(obj)       ((obj)->obj_flags.bitvector[(i)])

And db.c compiles now.  Error-free.  Not being a complete bumpkin, I find
myself wondering if this will actually work, or if I just managed to
vanish an error.  Anyone have an opinion on if this was a proper fix for
the issue I reported initially?

-Mathew

--
   +---------------------------------------------------------------+
   | 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