⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 objrtfnx.c

📁 clips源代码
💻 C
📖 第 1 页 / 共 4 页
字号:
#endif#endif  }static intBool PNSimpleCompareFunction1(  void *theEnv,  void *theValue,  DATA_OBJECT *theResult)  {   struct ObjectCmpPNSingleSlotVars1 *hack;   INSTANCE_SLOT *is1,*is2;   int rv;   hack = (struct ObjectCmpPNSingleSlotVars1 *) ValueToBitMap(theValue);   is1 = GetInsSlot(ObjectReteData(theEnv)->CurrentPatternObject,hack->firstSlot);   is2 = GetInsSlot(ObjectReteData(theEnv)->CurrentPatternObject,hack->secondSlot);   if (is1->type != is2->type)     rv = hack->fail;   else if (is1->value != is2->value)     rv = hack->fail;   else     rv = hack->pass;   theResult->type = SYMBOL;   theResult->value = rv ? EnvTrueSymbol(theEnv) : EnvFalseSymbol(theEnv);   return(rv);  }#if IBM_TBC && (! DEVELOPER)#pragma argsused#endifstatic void PrintPNSimpleCompareFunction2(  void *theEnv,  char *logicalName,  void *theValue)  {#if DEVELOPER   struct ObjectCmpPNSingleSlotVars2 *hack;   hack = (struct ObjectCmpPNSingleSlotVars2 *) ValueToBitMap(theValue);   EnvPrintRouter(theEnv,logicalName,"(pslot-cmp2 ");   EnvPrintRouter(theEnv,logicalName,hack->pass ? "p " : "n ");   EnvPrintRouter(theEnv,logicalName,ValueToString(FindIDSlotName(theEnv,(unsigned) hack->firstSlot)));   EnvPrintRouter(theEnv,logicalName,hack->fromBeginning ? " B" : " E");   PrintLongInteger(theEnv,logicalName,(long long) hack->offset);   EnvPrintRouter(theEnv,logicalName," ");   EnvPrintRouter(theEnv,logicalName,ValueToString(FindIDSlotName(theEnv,(unsigned) hack->secondSlot)));   EnvPrintRouter(theEnv,logicalName,")");#else#if MAC_MCW || IBM_MCW || MAC_XCD#pragma unused(theEnv)#pragma unused(logicalName)#pragma unused(theValue)#endif#endif  }static intBool PNSimpleCompareFunction2(  void *theEnv,  void *theValue,  DATA_OBJECT *theResult)  {   struct ObjectCmpPNSingleSlotVars2 *hack;   int rv;   FIELD f1;   INSTANCE_SLOT *is2;   hack = (struct ObjectCmpPNSingleSlotVars2 *) ValueToBitMap(theValue);   GetInsMultiSlotField(&f1,ObjectReteData(theEnv)->CurrentPatternObject,(unsigned) hack->firstSlot,                             (unsigned) hack->fromBeginning,(unsigned) hack->offset);   is2 = GetInsSlot(ObjectReteData(theEnv)->CurrentPatternObject,hack->secondSlot);   if (f1.type != is2->type)     rv = hack->fail;   else if (f1.value != is2->value)     rv = hack->fail;   else     rv = hack->pass;   theResult->type = SYMBOL;   theResult->value = rv ? EnvTrueSymbol(theEnv) : EnvFalseSymbol(theEnv);   return(rv);  }#if IBM_TBC && (! DEVELOPER)#pragma argsused#endifstatic void PrintPNSimpleCompareFunction3(  void *theEnv,  char *logicalName,  void *theValue)  {#if DEVELOPER   struct ObjectCmpPNSingleSlotVars3 *hack;   hack = (struct ObjectCmpPNSingleSlotVars3 *) ValueToBitMap(theValue);   EnvPrintRouter(theEnv,logicalName,"(pslot-cmp3 ");   EnvPrintRouter(theEnv,logicalName,hack->pass ? "p " : "n ");   EnvPrintRouter(theEnv,logicalName,ValueToString(FindIDSlotName(theEnv,(unsigned) hack->firstSlot)));   EnvPrintRouter(theEnv,logicalName,hack->firstFromBeginning ? " B" : " E");   PrintLongInteger(theEnv,logicalName,(long long) hack->firstOffset);   EnvPrintRouter(theEnv,logicalName," ");   EnvPrintRouter(theEnv,logicalName,ValueToString(FindIDSlotName(theEnv,(unsigned) hack->secondSlot)));   EnvPrintRouter(theEnv,logicalName,hack->secondFromBeginning ? " B" : " E");   PrintLongInteger(theEnv,logicalName,(long long) hack->secondOffset);   EnvPrintRouter(theEnv,logicalName,")");#else#if MAC_MCW || IBM_MCW || MAC_XCD#pragma unused(theEnv)#pragma unused(logicalName)#pragma unused(theValue)#endif#endif  }static intBool PNSimpleCompareFunction3(  void *theEnv,  void *theValue,  DATA_OBJECT *theResult)  {   struct ObjectCmpPNSingleSlotVars3 *hack;   int rv;   FIELD f1,f2;   hack = (struct ObjectCmpPNSingleSlotVars3 *) ValueToBitMap(theValue);   GetInsMultiSlotField(&f1,ObjectReteData(theEnv)->CurrentPatternObject,(unsigned) hack->firstSlot,                        (unsigned) hack->firstFromBeginning,(unsigned) hack->firstOffset);   GetInsMultiSlotField(&f2,ObjectReteData(theEnv)->CurrentPatternObject,(unsigned) hack->secondSlot,                        (unsigned) hack->secondFromBeginning,(unsigned) hack->secondOffset);   if (f1.type != f2.type)     rv = hack->fail;   else if (f1.value != f2.value)     rv = hack->fail;   else     rv = hack->pass;   theResult->type = SYMBOL;   theResult->value = rv ? EnvTrueSymbol(theEnv) : EnvFalseSymbol(theEnv);   return(rv);  }#if IBM_TBC && (! DEVELOPER)#pragma argsused#endifstatic void PrintJNSimpleCompareFunction1(  void *theEnv,  char *logicalName,  void *theValue)  {#if DEVELOPER   struct ObjectCmpJoinSingleSlotVars1 *hack;   hack = (struct ObjectCmpJoinSingleSlotVars1 *) ValueToBitMap(theValue);   EnvPrintRouter(theEnv,logicalName,"(jslot-cmp1 ");   EnvPrintRouter(theEnv,logicalName,hack->pass ? "p " : "n ");   PrintLongInteger(theEnv,logicalName,(long long) hack->firstPattern);   EnvPrintRouter(theEnv,logicalName," ");   EnvPrintRouter(theEnv,logicalName,ValueToString(FindIDSlotName(theEnv,(unsigned) hack->firstSlot)));   EnvPrintRouter(theEnv,logicalName," ");   PrintLongInteger(theEnv,logicalName,(long long) hack->secondPattern);   EnvPrintRouter(theEnv,logicalName," ");   EnvPrintRouter(theEnv,logicalName,ValueToString(FindIDSlotName(theEnv,(unsigned) hack->secondSlot)));   EnvPrintRouter(theEnv,logicalName,")");#else#if MAC_MCW || IBM_MCW || MAC_XCD#pragma unused(theEnv)#pragma unused(logicalName)#pragma unused(theValue)#endif#endif  }static intBool JNSimpleCompareFunction1(  void *theEnv,  void *theValue,  DATA_OBJECT *theResult)  {   INSTANCE_TYPE *ins1,*ins2;   struct multifieldMarker *theMarks;   struct ObjectCmpJoinSingleSlotVars1 *hack;   int rv;   INSTANCE_SLOT *is1,*is2;   hack = (struct ObjectCmpJoinSingleSlotVars1 *) ValueToBitMap(theValue);   GetPatternObjectAndMarks(theEnv,((int) hack->firstPattern),hack->firstPatternLHS,hack->firstPatternRHS,&ins1,&theMarks);   is1 = GetInsSlot(ins1,hack->firstSlot);   GetPatternObjectAndMarks(theEnv,((int) hack->secondPattern),hack->secondPatternLHS,hack->secondPatternRHS,&ins2,&theMarks);   is2 = GetInsSlot(ins2,hack->secondSlot);   if (is1->type != is2->type)     rv = hack->fail;   else if (is1->value != is2->value)     rv = hack->fail;   else     rv = hack->pass;   theResult->type = SYMBOL;   theResult->value = rv ? EnvTrueSymbol(theEnv) : EnvFalseSymbol(theEnv);   return(rv);  }#if IBM_TBC && (! DEVELOPER)#pragma argsused#endifstatic void PrintJNSimpleCompareFunction2(  void *theEnv,  char *logicalName,  void *theValue)  {#if DEVELOPER   struct ObjectCmpJoinSingleSlotVars2 *hack;   hack = (struct ObjectCmpJoinSingleSlotVars2 *) ValueToBitMap(theValue);   EnvPrintRouter(theEnv,logicalName,"(jslot-cmp2 ");   EnvPrintRouter(theEnv,logicalName,hack->pass ? "p " : "n ");   PrintLongInteger(theEnv,logicalName,(long long) hack->firstPattern);   EnvPrintRouter(theEnv,logicalName," ");   EnvPrintRouter(theEnv,logicalName,ValueToString(FindIDSlotName(theEnv,(unsigned) hack->firstSlot)));   EnvPrintRouter(theEnv,logicalName,hack->fromBeginning ? " B" : " E");   PrintLongInteger(theEnv,logicalName,(long long) hack->offset);   EnvPrintRouter(theEnv,logicalName," ");   PrintLongInteger(theEnv,logicalName,(long long) hack->secondPattern);   EnvPrintRouter(theEnv,logicalName," ");   EnvPrintRouter(theEnv,logicalName,ValueToString(FindIDSlotName(theEnv,(unsigned) hack->secondSlot)));   EnvPrintRouter(theEnv,logicalName,")");#else#if MAC_MCW || IBM_MCW || MAC_XCD#pragma unused(theEnv)#pragma unused(logicalName)#pragma unused(theValue)#endif#endif  }static intBool JNSimpleCompareFunction2(  void *theEnv,  void *theValue,  DATA_OBJECT *theResult)  {   INSTANCE_TYPE *ins1,*ins2;   struct multifieldMarker *theMarks;   struct ObjectCmpJoinSingleSlotVars2 *hack;   int rv;   FIELD f1;   INSTANCE_SLOT *is2;   hack = (struct ObjectCmpJoinSingleSlotVars2 *) ValueToBitMap(theValue);   GetPatternObjectAndMarks(theEnv,((int) hack->firstPattern),hack->firstPatternLHS,hack->firstPatternRHS,&ins1,&theMarks);   GetInsMultiSlotField(&f1,ins1,(unsigned) hack->firstSlot,                        (unsigned) hack->fromBeginning,(unsigned) hack->offset);   GetPatternObjectAndMarks(theEnv,((int) hack->secondPattern),hack->secondPatternLHS,hack->secondPatternRHS,&ins2,&theMarks);   is2 = GetInsSlot(ins2,hack->secondSlot);   if (f1.type != is2->type)     rv = hack->fail;   else if (f1.value != is2->value)     rv = hack->fail;   else     rv = hack->pass;   theResult->type = SYMBOL;   theResult->value = rv ? EnvTrueSymbol(theEnv) : EnvFalseSymbol(theEnv);   return(rv);  }#if IBM_TBC && (! DEVELOPER)#pragma argsused#endifstatic void PrintJNSimpleCompareFunction3(  void *theEnv,  char *logicalName,  void *theValue)  {#if DEVELOPER   struct ObjectCmpJoinSingleSlotVars3 *hack;   hack = (struct ObjectCmpJoinSingleSlotVars3 *) ValueToBitMap(theValue);   EnvPrintRouter(theEnv,logicalName,"(jslot-cmp3 ");   EnvPrintRouter(theEnv,logicalName,hack->pass ? "p " : "n ");   PrintLongInteger(theEnv,logicalName,(long long) hack->firstPattern);   EnvPrintRouter(theEnv,logicalName," ");   EnvPrintRouter(theEnv,logicalName,ValueToString(FindIDSlotName(theEnv,(unsigned) hack->firstSlot)));   EnvPrintRouter(theEnv,logicalName,hack->firstFromBeginning ? " B" : " E");   PrintLongInteger(theEnv,logicalName,(long long) hack->firstOffset);   EnvPrintRouter(theEnv,logicalName," ");   PrintLongInteger(theEnv,logicalName,(long long) hack->secondPattern);   EnvPrintRouter(theEnv,logicalName," ");   EnvPrintRouter(theEnv,logicalName,ValueToString(FindIDSlotName(theEnv,(unsigned) hack->secondSlot)));   EnvPrintRouter(theEnv,logicalName,hack->secondFromBeginning ? " B" : " E");   PrintLongInteger(theEnv,logicalName,(long long) hack->secondOffset);   EnvPrintRouter(theEnv,logicalName,")");#else#if MAC_MCW || IBM_MCW || MAC_XCD#pragma unused(theEnv)#pragma unused(logicalName)#pragma unused(theValue)#endif#endif  }static intBool JNSimpleCompareFunction3(  void *theEnv,  void *theValue,  DATA_OBJECT *theResult)  {   INSTANCE_TYPE *ins1,*ins2;   struct multifieldMarker *theMarks;   struct ObjectCmpJoinSingleSlotVars3 *hack;   int rv;   FIELD f1,f2;   hack = (struct ObjectCmpJoinSingleSlotVars3 *) ValueToBitMap(theValue);   GetPatternObjectAndMarks(theEnv,((int) hack->firstPattern),hack->firstPatternLHS,hack->firstPatternRHS,&ins1,&theMarks);   GetInsMultiSlotField(&f1,ins1,(unsigned) hack->firstSlot,                        (unsigned) hack->firstFromBeginning,                        (unsigned) hack->firstOffset);   GetPatternObjectAndMarks(theEnv,((int) hack->secondPattern),hack->secondPatternLHS,hack->secondPatternRHS,&ins2,&theMarks);   GetInsMultiSlotField(&f2,ins2,(unsigned) hack->secondSlot,                        (unsigned) hack->secondFromBeginning,                        (unsigned) hack->secondOffset);   if (f1.type != f2.type)     rv = hack->fail;   else if (f1.value != f2.value)     rv = hack->fail;   else     rv = hack->pass;   theResult->type = SYMBOL;   theResult->value = rv ? EnvTrueSymbol(theEnv) : EnvFalseSymbol(theEnv);   return(rv);  }/****************************************************  NAME         : GetPatternObjectAndMarks  DESCRIPTION  : Finds the instance and multfiield                 markers corresponding to a specified                 pattern in the join network  INPUTS       : 1) The index of the desired pattern                 2) A buffer to hold the instance                    address                 3) A buffer to hold the list of                    multifield markers  RETURNS      : Nothing useful  SIDE EFFECTS : Buffers set

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -