globle void MarkFactPatternForIncrementalReset( void *theEnv, struct patternNodeHeader *thePattern, int value) { struct factPatternNode *patternPtr = (struct factPatternNode *) thePattern; #if MAC_MCW || IBM_MCW || MAC_XCD #pragma unused(theEnv) #endif /*=====================================*/ /* We should be passed a valid pointer */ /* to a fact pattern network node. */ /*=====================================*/ Bogus(patternPtr == NULL); /*============================================*/ /* If the pattern was previously initialized, */ /* then don't bother with it. */ /*============================================*/ if (patternPtr->header.initialize == FALSE) return; /*======================================================*/ /* Set the initialization field of this pattern network */ /* node and all pattern network nodes which preceed it. */ /*======================================================*/ while (patternPtr != NULL) { patternPtr->header.initialize = value; patternPtr = patternPtr->lastLevel; } }
globle void MarkFactPatternForIncrementalReset( void *theEnv, struct patternNodeHeader *thePattern, int value) { struct factPatternNode *patternPtr = (struct factPatternNode *) thePattern; struct joinNode *theJoin; #if MAC_MCW || WIN_MCW || MAC_XCD #pragma unused(theEnv) #endif /*=====================================*/ /* We should be passed a valid pointer */ /* to a fact pattern network node. */ /*=====================================*/ Bogus(patternPtr == NULL); /*===============================================================*/ /* If the pattern was previously initialized, then don't bother */ /* with it unless the pattern was subsumed by another pattern */ /* and associated with a join that hasn't been initialized. */ /* DR0880 2008-01-24 */ /*===============================================================*/ if (patternPtr->header.initialize == FALSE) { for (theJoin = patternPtr->header.entryJoin; theJoin != NULL; theJoin = theJoin->rightMatchNode) { if (theJoin->initialize == FALSE) { return; } } } /*======================================================*/ /* Set the initialization field of this pattern network */ /* node and all pattern network nodes which preceed it. */ /*======================================================*/ while (patternPtr != NULL) { patternPtr->header.initialize = value; patternPtr = patternPtr->lastLevel; } }