Skip to main content.
home | support | download

Back to List Archive

Re: Oh - and a problem with the swish-e.h

From: <moseley(at)>
Date: Thu Jul 24 2003 - 05:32:39 GMT
On Wed, Jul 23, 2003 at 08:48:01PM -0700, wrote:
> Before I forget :-), I was adding the Swish constants to the PHP environment 
> and noticed that IN_ALL is using a bit flag that is not defined (for that 
> matter, so is IN_FILE). Basically, IN_ALL is #define'd as using OR'd values of 
> all the bit fields, but IN_FILE_BIT is not defined, thus making this attribute 
> useless. Is this suppose to be:
> #define IN_FILE_BIT 0
> #define IN_FILE (1<<IN_FILE_BIT);
> #define IN_ALL (...|IN_FILE);

Yes, it should be.  It's defined in swish.h (which is used when building 
swish) but since libtest.c, which includes swish-e.h, doesn't use 
IN_FILE the compiler didn't complain.

I'm not a big fan of the way the structure flags are set in the API (by
calling SwishSetStructure() with a structure constant).  I remember
thinking about it when first adding that function and thinking I'd
revisit it later -- which has not happened.  I guess I'm not thrilled
with the use of the constants, but I'm not sure what would be a better

Thanks for that catch.

Bill Moseley
Received on Thu Jul 24 05:32:48 2003