Beispiel #1
0
static void PrintObjectGetVarPN2(
  void *theEnv,
  char *logicalName,
  void *theValue)
  {
#if DEVELOPER
   struct ObjectMatchVar2 *hack;

   hack = (struct ObjectMatchVar2 *) ValueToBitMap(theValue);
   EnvPrintRouter(theEnv,logicalName,(char*)"(ptn-obj-slot-quick-var ");
   EnvPrintRouter(theEnv,logicalName,ValueToString(FindIDSlotName(theEnv,(unsigned) hack->whichSlot)));
   if (hack->fromBeginning)
     {
      EnvPrintRouter(theEnv,logicalName,(char*)" B");
      PrintLongInteger(theEnv,logicalName,(long long) (hack->beginningOffset + 1));
     }
   if (hack->fromEnd)
     {
      EnvPrintRouter(theEnv,logicalName,(char*)" E");
      PrintLongInteger(theEnv,logicalName,(long long) (hack->endOffset + 1));
     }
   EnvPrintRouter(theEnv,logicalName,(char*)")");
#else
#endif
  }
Beispiel #2
0
static void PrintPNSimpleCompareFunction1(
    void *theEnv,
    const char *logicalName,
    void *theValue)
{
#if DEVELOPER
    struct ObjectCmpPNSingleSlotVars1 *hack;

    hack = (struct ObjectCmpPNSingleSlotVars1 *) ValueToBitMap(theValue);

    EnvPrintRouter(theEnv,logicalName,"(pslot-cmp1 ");
    EnvPrintRouter(theEnv,logicalName,hack->pass ? "p " : "n ");
    EnvPrintRouter(theEnv,logicalName,ValueToString(FindIDSlotName(theEnv,(unsigned) hack->firstSlot)));
    EnvPrintRouter(theEnv,logicalName," ");
    EnvPrintRouter(theEnv,logicalName,ValueToString(FindIDSlotName(theEnv,(unsigned) hack->secondSlot)));
    EnvPrintRouter(theEnv,logicalName,")");
#else
#endif
}
Beispiel #3
0
static void PrintPNSimpleCompareFunction2(
    void *theEnv,
    const 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
#endif
}
Beispiel #4
0
static void PrintObjectGetVarJN1(
  void *theEnv,
  char *logicalName,
  void *theValue)
  {
#if DEVELOPER
   struct ObjectMatchVar1 *hack;

   hack = (struct ObjectMatchVar1 *) ValueToBitMap(theValue);

   if (hack->objectAddress)
     {
      EnvPrintRouter(theEnv,logicalName,"(obj-ptr ");
      PrintLongInteger(theEnv,logicalName,(long) hack->whichPattern);
     }
   else if (hack->allFields)
     {
      EnvPrintRouter(theEnv,logicalName,"(obj-slot-contents ");
      PrintLongInteger(theEnv,logicalName,(long) hack->whichPattern);
      EnvPrintRouter(theEnv,logicalName," ");
      EnvPrintRouter(theEnv,logicalName,ValueToString(FindIDSlotName(theEnv,(unsigned) hack->whichSlot)));
     }
   else
     {
      EnvPrintRouter(theEnv,logicalName,"(obj-slot-var ");
      PrintLongInteger(theEnv,logicalName,(long) hack->whichPattern);
      EnvPrintRouter(theEnv,logicalName," ");
      EnvPrintRouter(theEnv,logicalName,ValueToString(FindIDSlotName(theEnv,(unsigned) hack->whichSlot)));
      EnvPrintRouter(theEnv,logicalName," ");
      PrintLongInteger(theEnv,logicalName,(long) hack->whichField);
     }
   EnvPrintRouter(theEnv,logicalName,")");
#else
#if MAC_MCW || IBM_MCW || MAC_XCD
#pragma unused(theEnv)
#pragma unused(logicalName)
#pragma unused(theValue)
#endif
#endif
  }
Beispiel #5
0
static void PrintJNSimpleCompareFunction1(
  void *theEnv,
  char *logicalName,
  void *theValue)
  {
#if DEVELOPER
   struct ObjectCmpJoinSingleSlotVars1 *hack;

   hack = (struct ObjectCmpJoinSingleSlotVars1 *) ValueToBitMap(theValue);

   EnvPrintRouter(theEnv,logicalName,(char*)"(jslot-cmp1 ");
   EnvPrintRouter(theEnv,logicalName,hack->pass ? (char*)"p " : (char*)"n ");
   PrintLongInteger(theEnv,logicalName,(long long) hack->firstPattern);
   EnvPrintRouter(theEnv,logicalName,(char*)" ");
   EnvPrintRouter(theEnv,logicalName,ValueToString(FindIDSlotName(theEnv,(unsigned) hack->firstSlot)));
   EnvPrintRouter(theEnv,logicalName,(char*)" ");
   PrintLongInteger(theEnv,logicalName,(long long) hack->secondPattern);
   EnvPrintRouter(theEnv,logicalName,(char*)" ");
   EnvPrintRouter(theEnv,logicalName,ValueToString(FindIDSlotName(theEnv,(unsigned) hack->secondSlot)));
   EnvPrintRouter(theEnv,logicalName,(char*)")");
#else
#endif
  }
Beispiel #6
0
/**********************************************************
  NAME         : PrintOPNLevel
  DESCRIPTION  : Recursivley prints object pattern network
  INPUTS       : 1) The current object pattern network node
                 2) A buffer holding preceding indentation
                    text showing the level in the tree
                 3) The length of the indentation text
  RETURNS      : Nothing useful
  SIDE EFFECTS : Pattern nodes recursively printed
  NOTES        : None
 **********************************************************/
static void PrintOPNLevel(
  void *theEnv,
  OBJECT_PATTERN_NODE *pptr,
  char *indentbuf,
  int ilen)
  {
   CLASS_BITMAP *cbmp;
   SLOT_BITMAP *sbmp;
   register unsigned i;
   OBJECT_PATTERN_NODE *uptr;
   OBJECT_ALPHA_NODE *alphaPtr;

   while (pptr != NULL)
     {
      EnvPrintRouter(theEnv,WDISPLAY,indentbuf);
      if (pptr->alphaNode != NULL)
        EnvPrintRouter(theEnv,WDISPLAY,"+");
      EnvPrintRouter(theEnv,WDISPLAY,ValueToString(FindIDSlotName(theEnv,pptr->slotNameID)));
      EnvPrintRouter(theEnv,WDISPLAY," (");
      PrintLongInteger(theEnv,WDISPLAY,(long) pptr->slotNameID);
      EnvPrintRouter(theEnv,WDISPLAY,") ");
      EnvPrintRouter(theEnv,WDISPLAY,pptr->endSlot ? "EPF#" : "PF#");
      PrintLongInteger(theEnv,WDISPLAY,(long) pptr->whichField);
      EnvPrintRouter(theEnv,WDISPLAY," ");
      EnvPrintRouter(theEnv,WDISPLAY,pptr->multifieldNode ? "$? " : "? ");
      if (pptr->networkTest != NULL)
        PrintExpression(theEnv,WDISPLAY,pptr->networkTest);
      EnvPrintRouter(theEnv,WDISPLAY,"\n");
      alphaPtr = pptr->alphaNode;
      while (alphaPtr != NULL)
        {
         EnvPrintRouter(theEnv,WDISPLAY,indentbuf);
         EnvPrintRouter(theEnv,WDISPLAY,"     Classes:");
         cbmp = (CLASS_BITMAP *) ValueToBitMap(alphaPtr->classbmp);
         for (i = 0 ; i <= cbmp->maxid ; i++)
           if (TestBitMap(cbmp->map,i))
             {
              EnvPrintRouter(theEnv,WDISPLAY," ");
              EnvPrintRouter(theEnv,WDISPLAY,EnvGetDefclassName(theEnv,(void *) DefclassData(theEnv)->ClassIDMap[i]));
             }
         if (alphaPtr->slotbmp != NULL)
           {
            sbmp = (SLOT_BITMAP *) ValueToBitMap(pptr->alphaNode->slotbmp);
            EnvPrintRouter(theEnv,WDISPLAY," *** Slots:");
            for (i = NAME_ID ; i <= sbmp->maxid ; i++)
              if (TestBitMap(sbmp->map,i))
                {
                 for (uptr = pptr ; uptr != NULL ; uptr  = uptr->lastLevel)
                   if (uptr->slotNameID == i)
                     break;
                 if (uptr == NULL)
                   {
                    EnvPrintRouter(theEnv,WDISPLAY," ");
                    EnvPrintRouter(theEnv,WDISPLAY,ValueToString(FindIDSlotName(theEnv,i)));
                   }
                }
           }
         EnvPrintRouter(theEnv,WDISPLAY,"\n");
         alphaPtr = alphaPtr->nxtInGroup;
        }
      indentbuf[ilen++] = (char) ((pptr->rightNode != NULL) ? '|' : ' ');
      indentbuf[ilen++] = ' ';
      indentbuf[ilen++] = ' ';
      indentbuf[ilen] = '\0';
      PrintOPNLevel(theEnv,pptr->nextLevel,indentbuf,ilen);
      ilen -= 3;
      indentbuf[ilen] = '\0';
      pptr = pptr->rightNode;
     }
  }