At 5:26 PM -0600 12/3/99, Gilles Detillieux wrote:
>Yes, indeed, it does. And, I found out why. The addnum() macro doesn't
>add numbers if they're 0, just as addstring() doesn't add empty strings.
>This means that Clear() MUST zero out all DocumentRef fields, because
>they don't get stored, and therefore don't get read if they're 0.
>
>There's a separate problem with addnum() - it was written assuming that
>the number would always be positive. Note the line:
Yes, this makes sense.
>Having fixed the default, the question still remains: is it a fair
>assumption that none of the number fields in DocumentRef will ever
>be negative? If that's correct, I think we're done. If it's incorrect,
>then obviously the Serialize & Deserialize macros need more work!
These are the numerical fields of DocRef that are stored.
int docID;
time_t docTime;
time_t docAccessed;
int docHeadIsSet;
ReferenceState docState;
int docSize;
int docLinks;
int docBackLinks;
int docImageSize;
int docHopCount;
long int docSig;
I don't see any that would ever be negative. All are sizes or counts.
Some platforms allow negative time_t values, but realistically
speaking, we should never see one.
-Geoff
------------------------------------
To unsubscribe from the htdig3-dev mailing list, send a message to
[EMAIL PROTECTED]
You will receive a message to confirm this.