亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? factqury.c

?? clips源代碼
?? C
?? 第 1 頁 / 共 3 頁
字號:
   if (val->type == DEFTEMPLATE_PTR)
     {
      IncrementDeftemplateBusyCount(theEnv,(void *) val->value);
      head = get_struct(theEnv,query_template);
      head->templatePtr = (struct deftemplate *) val->value;

      head->chain = NULL;
      head->nxt = NULL;
      return(head);
     }
   if (val->type == SYMBOL)
     {
      /* ===============================================
         Allow instance-set query restrictions to have a
         module specifier as part of the class name,
         but search imported defclasses too if a
         module specifier is not given
         =============================================== */
         
      templatePtr = (struct deftemplate *)
                       FindImportedConstruct(theEnv,"deftemplate",NULL,DOPToString(val),
                                             &count,TRUE,NULL);
      if (templatePtr == NULL)
        {
         CantFindItemInFunctionErrorMessage(theEnv,"deftemplate",DOPToString(val),func);
         return(NULL);
        }
      IncrementDeftemplateBusyCount(theEnv,(void *) templatePtr);
      head = get_struct(theEnv,query_template);
      head->templatePtr = templatePtr;

      head->chain = NULL;
      head->nxt = NULL;
      return(head);
     }
   if (val->type == MULTIFIELD)
     {
      head = bot = NULL;
      end = GetpDOEnd(val);
      for (i = GetpDOBegin(val) ; i <= end ; i++)
        {
         if (GetMFType(val->value,i) == SYMBOL)
           {
            templateName = ValueToString(GetMFValue(val->value,i));
            
            templatePtr = (struct deftemplate *)
                       FindImportedConstruct(theEnv,"deftemplate",NULL,templateName,
                                             &count,TRUE,NULL);

            if (templatePtr == NULL)
              {
               CantFindItemInFunctionErrorMessage(theEnv,"deftemplate",templateName,func);
               DeleteQueryTemplates(theEnv,head);
               return(NULL);
              }
           }
         else
           {
            DeleteQueryTemplates(theEnv,head);
            return(NULL);
           }
         IncrementDeftemplateBusyCount(theEnv,(void *) templatePtr);
         tmp = get_struct(theEnv,query_template);
         tmp->templatePtr = templatePtr;

         tmp->chain = NULL;
         tmp->nxt = NULL;
         if (head == NULL)
           head = tmp;
         else
           bot->chain = tmp;
         bot = tmp;
        }
      return(head);
     }
   return(NULL);
  }

/******************************************************
  NAME         : DeleteQueryTemplates
  DESCRIPTION  : Deletes a query class-list
  INPUTS       : The query list address
  RETURNS      : Nothing useful
  SIDE EFFECTS : Nodes deallocated
                 Busy count decremented for all templates
  NOTES        : None
 ******************************************************/
static void DeleteQueryTemplates(
  void *theEnv,
  QUERY_TEMPLATE *qlist)
  {
   QUERY_TEMPLATE *tmp;

   while (qlist != NULL)
     {
      while (qlist->chain != NULL)
        {
         tmp = qlist->chain;
         qlist->chain = qlist->chain->chain;
         DecrementDeftemplateBusyCount(theEnv,(void *) tmp->templatePtr);
         rtn_struct(theEnv,query_template,tmp);
        }
      tmp = qlist;
      qlist = qlist->nxt;
      DecrementDeftemplateBusyCount(theEnv,(void *) tmp->templatePtr);
      rtn_struct(theEnv,query_template,tmp);
     }
  }

/************************************************************
  NAME         : TestForFirstInChain
  DESCRIPTION  : Processes all templates in a restriction chain
                   until success or done
  INPUTS       : 1) The current chain
                 2) The index of the chain restriction
                     (e.g. the 4th query-variable)
  RETURNS      : TRUE if query succeeds, FALSE otherwise
  SIDE EFFECTS : Sets current restriction class
                 Fact variable values set
  NOTES        : None
 ************************************************************/
static int TestForFirstInChain(
  void *theEnv,
  QUERY_TEMPLATE *qchain,
  int indx)
  {
   QUERY_TEMPLATE *qptr;

   FactQueryData(theEnv)->AbortQuery = TRUE;
   for (qptr = qchain ; qptr != NULL ; qptr = qptr->chain)
     {
      FactQueryData(theEnv)->AbortQuery = FALSE;

      if (TestForFirstFactInTemplate(theEnv,qptr->templatePtr,qchain,indx))
        { return(TRUE); }
        
      if ((EvaluationData(theEnv)->HaltExecution == TRUE) || (FactQueryData(theEnv)->AbortQuery == TRUE))
        return(FALSE);
     }
   return(FALSE);
  }

/*****************************************************************
  NAME         : TestForFirstFactInTemplate
  DESCRIPTION  : Processes all facts in a template
  INPUTS       : 1) Visitation traversal id
                 2) The template
                 3) The current template restriction chain
                 4) The index of the current restriction
  RETURNS      : TRUE if query succeeds, FALSE otherwise
  SIDE EFFECTS : Fact variable values set
  NOTES        : None
 *****************************************************************/
static int TestForFirstFactInTemplate(
  void *theEnv,
  struct deftemplate *templatePtr,
  QUERY_TEMPLATE *qchain,
  int indx)
  {
   struct fact *theFact;
   DATA_OBJECT temp;

   theFact = templatePtr->factList;
   while (theFact != NULL)
     {
      FactQueryData(theEnv)->QueryCore->solns[indx] = theFact;
      if (qchain->nxt != NULL)
        {
         theFact->factHeader.busyCount++;
         if (TestForFirstInChain(theEnv,qchain->nxt,indx+1) == TRUE)
           {
            theFact->factHeader.busyCount--;
            break;
           }
         theFact->factHeader.busyCount--;
         if ((EvaluationData(theEnv)->HaltExecution == TRUE) || (FactQueryData(theEnv)->AbortQuery == TRUE))
           break;
        }
      else
        {
         theFact->factHeader.busyCount++;
         EvaluationData(theEnv)->CurrentEvaluationDepth++;
         EvaluateExpression(theEnv,FactQueryData(theEnv)->QueryCore->query,&temp);
         EvaluationData(theEnv)->CurrentEvaluationDepth--;
         PeriodicCleanup(theEnv,FALSE,TRUE);
         theFact->factHeader.busyCount--;
         if (EvaluationData(theEnv)->HaltExecution == TRUE)
           break;
         if ((temp.type != SYMBOL) ? TRUE :
             (temp.value != EnvFalseSymbol(theEnv)))
           break;
        }
      theFact = theFact->nextTemplateFact;
      while ((theFact != NULL) ? (theFact->garbage == 1) : FALSE)
        theFact = theFact->nextTemplateFact;
     }

   if (theFact != NULL)
     return(((EvaluationData(theEnv)->HaltExecution == TRUE) || (FactQueryData(theEnv)->AbortQuery == TRUE))
             ? FALSE : TRUE);

   return(FALSE);
  }

/************************************************************
  NAME         : TestEntireChain
  DESCRIPTION  : Processes all templates in a restriction chain
                   until done
  INPUTS       : 1) The current chain
                 2) The index of the chain restriction
                     (i.e. the 4th query-variable)
  RETURNS      : Nothing useful
  SIDE EFFECTS : Sets current restriction template
                 Query fact variables set
                 Solution sets stored in global list
  NOTES        : None
 ************************************************************/
static void TestEntireChain(
  void *theEnv,
  QUERY_TEMPLATE *qchain,
  int indx)
  {
   QUERY_TEMPLATE *qptr;

   FactQueryData(theEnv)->AbortQuery = TRUE;
   for (qptr = qchain ; qptr != NULL ; qptr = qptr->chain)
     {
      FactQueryData(theEnv)->AbortQuery = FALSE;

      TestEntireTemplate(theEnv,qptr->templatePtr,qchain,indx);

      if ((EvaluationData(theEnv)->HaltExecution == TRUE) || (FactQueryData(theEnv)->AbortQuery == TRUE))
        return;
     }
  }

/*****************************************************************
  NAME         : TestEntireTemplate
  DESCRIPTION  : Processes all facts in a template
  INPUTS       : 1) The module for which templates tested must be
                    in scope
                 3) The template
                 4) The current template restriction chain
                 5) The index of the current restriction
  RETURNS      : Nothing useful
  SIDE EFFECTS : Instance variable values set
                 Solution sets stored in global list
  NOTES        : None
 *****************************************************************/
static void TestEntireTemplate(
  void *theEnv,
  struct deftemplate *templatePtr,
  QUERY_TEMPLATE *qchain,
  int indx)
  {
   struct fact *theFact;
   DATA_OBJECT temp;

   theFact = templatePtr->factList;
   while (theFact != NULL)
     {
      FactQueryData(theEnv)->QueryCore->solns[indx] = theFact;
      if (qchain->nxt != NULL)
        {
         theFact->factHeader.busyCount++;
         TestEntireChain(theEnv,qchain->nxt,indx+1);
         theFact->factHeader.busyCount--;
         if ((EvaluationData(theEnv)->HaltExecution == TRUE) || (FactQueryData(theEnv)->AbortQuery == TRUE))
           break;
        }
      else
        { 
         theFact->factHeader.busyCount++;
         EvaluationData(theEnv)->CurrentEvaluationDepth++;
         EvaluateExpression(theEnv,FactQueryData(theEnv)->QueryCore->query,&temp);
         EvaluationData(theEnv)->CurrentEvaluationDepth--;
         PeriodicCleanup(theEnv,FALSE,TRUE);
         theFact->factHeader.busyCount--;
         if (EvaluationData(theEnv)->HaltExecution == TRUE)
           break;
         if ((temp.type != SYMBOL) ? TRUE :
             (temp.value != EnvFalseSymbol(theEnv)))
           {
            if (FactQueryData(theEnv)->QueryCore->action != NULL)
              {
               theFact->factHeader.busyCount++;
               EvaluationData(theEnv)->CurrentEvaluationDepth++;
               ValueDeinstall(theEnv,FactQueryData(theEnv)->QueryCore->result);
               EvaluateExpression(theEnv,FactQueryData(theEnv)->QueryCore->action,FactQueryData(theEnv)->QueryCore->result);
               ValueInstall(theEnv,FactQueryData(theEnv)->QueryCore->result);
               EvaluationData(theEnv)->CurrentEvaluationDepth--;
               PeriodicCleanup(theEnv,FALSE,TRUE);
               theFact->factHeader.busyCount--;
               if (ProcedureFunctionData(theEnv)->BreakFlag || ProcedureFunctionData(theEnv)->ReturnFlag)
                 {
                  FactQueryData(theEnv)->AbortQuery = TRUE;
                  break;
                 }
               if (EvaluationData(theEnv)->HaltExecution == TRUE)
                 break;
              }
            else
              AddSolution(theEnv);
           }
        }
        
      theFact = theFact->nextTemplateFact;
      while ((theFact != NULL) ? (theFact->garbage == 1) : FALSE)
        theFact = theFact->nextTemplateFact;
     }
  }

/***************************************************************************
  NAME         : AddSolution
  DESCRIPTION  : Adds the current fact set to a global list of
                   solutions
  INPUTS       : None
  RETURNS      : Nothing useful
  SIDE EFFECTS : Global list and count updated
  NOTES        : Solutions are stored as sequential arrays of struct fact *
 ***************************************************************************/
static void AddSolution(
  void *theEnv)
  {
   QUERY_SOLN *new_soln;
   register unsigned i;

   new_soln = (QUERY_SOLN *) gm2(theEnv,(int) sizeof(QUERY_SOLN));
   new_soln->soln = (struct fact **)
                    gm2(theEnv,(sizeof(struct fact *) * (FactQueryData(theEnv)->QueryCore->soln_size)));
   for (i = 0 ; i < FactQueryData(theEnv)->QueryCore->soln_size ; i++)
     new_soln->soln[i] = FactQueryData(theEnv)->QueryCore->solns[i];
   new_soln->nxt = NULL;
   if (FactQueryData(theEnv)->QueryCore->soln_set == NULL)
     FactQueryData(theEnv)->QueryCore->soln_set = new_soln;
   else
     FactQueryData(theEnv)->QueryCore->soln_bottom->nxt = new_soln;
   FactQueryData(theEnv)->QueryCore->soln_bottom = new_soln;
   FactQueryData(theEnv)->QueryCore->soln_cnt++;
  }

/***************************************************
  NAME         : PopQuerySoln
  DESCRIPTION  : Deallocates the topmost solution
                   set for an fact-set query
  INPUTS       : None
  RETURNS      : Nothing useful
  SIDE EFFECTS : Solution set deallocated
  NOTES        : Assumes QueryCore->soln_set != 0
 ***************************************************/
static void PopQuerySoln(
  void *theEnv)
  {
   FactQueryData(theEnv)->QueryCore->soln_bottom = FactQueryData(theEnv)->QueryCore->soln_set;
   FactQueryData(theEnv)->QueryCore->soln_set = FactQueryData(theEnv)->QueryCore->soln_set->nxt;
   rm(theEnv,(void *) FactQueryData(theEnv)->QueryCore->soln_bottom->soln,
      (sizeof(struct fact *) * FactQueryData(theEnv)->QueryCore->soln_size));
   rm(theEnv,(void *) FactQueryData(theEnv)->QueryCore->soln_bottom,sizeof(QUERY_SOLN));
  }
  
#endif


?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲天堂成人在线观看| 欧美日韩国产免费一区二区| 激情深爱一区二区| 狠狠色丁香婷婷综合久久片| 久久99热这里只有精品| 高清不卡在线观看| 精品视频在线免费| 精品久久五月天| 亚洲日本在线看| 理论电影国产精品| 成人黄色小视频| 欧美成va人片在线观看| 亚洲三级在线观看| 国产一区二区电影| 这里只有精品视频在线观看| 久久日韩粉嫩一区二区三区 | 中文字幕一区二区三区精华液| 亚洲一区二区美女| 国产成人免费9x9x人网站视频| 9i在线看片成人免费| 欧美久久高跟鞋激| 国产精品毛片高清在线完整版| 亚洲午夜电影在线观看| 国产91精品一区二区麻豆亚洲| 日韩精品一区二区三区中文精品| 亚洲手机成人高清视频| 国产精品原创巨作av| 欧美一区二区啪啪| 一区二区三区四区不卡在线| 国产成人免费视频 | 亚洲一二三专区| 色婷婷av一区二区三区之一色屋| 国产日韩欧美高清在线| 国产不卡视频一区| 中文字幕高清不卡| 99久久亚洲一区二区三区青草| 国产人久久人人人人爽| 国产精品一区二区91| 久久伊人蜜桃av一区二区| 秋霞电影网一区二区| 欧美女孩性生活视频| 日韩高清中文字幕一区| 精品视频999| 麻豆精品一区二区| 久久―日本道色综合久久| 国产a精品视频| 中文字幕永久在线不卡| 91视频精品在这里| 天天免费综合色| 精品福利二区三区| 91农村精品一区二区在线| 日日摸夜夜添夜夜添精品视频| 欧美大白屁股肥臀xxxxxx| 成人涩涩免费视频| 丝瓜av网站精品一区二区| 国产欧美一区二区在线| 欧美在线观看一区二区| 国产在线精品一区二区夜色 | 91麻豆国产精品久久| 日本91福利区| 日韩欧美的一区| 一本在线高清不卡dvd| 久久av资源站| 一区二区不卡在线播放 | 亚洲六月丁香色婷婷综合久久| 欧美一区二区性放荡片| 91麻豆视频网站| 色综合色综合色综合| 午夜激情综合网| 亚洲摸摸操操av| 国产女同性恋一区二区| 日韩一区二区三区视频在线| 欧美偷拍一区二区| 在线精品视频免费播放| 国产91精品免费| 国产精品一区二区在线播放| 日韩精品视频网| 日日夜夜精品视频免费| 亚洲国产精品麻豆| 一区二区三区**美女毛片| 亚洲欧美日韩国产综合在线| 国产精品三级视频| 国产精品传媒在线| 亚洲视频在线观看一区| 国产精品久久久久久久久动漫 | 国产精品一区免费视频| 国产一区视频导航| 国产精品一线二线三线| 成人app在线| 在线观看91精品国产入口| 国产亚洲综合色| 亚洲视频一区在线| 一区二区视频在线| 日韩中文欧美在线| 国模冰冰炮一区二区| 99精品桃花视频在线观看| 91蝌蚪porny| 91精品国产aⅴ一区二区| 久久精品在这里| 婷婷成人激情在线网| 国产主播一区二区三区| 91性感美女视频| 日韩欧美卡一卡二| 亚洲视频小说图片| 男女视频一区二区| 成人av在线一区二区三区| 欧美精品日日鲁夜夜添| 国产欧美一区二区在线| 性感美女久久精品| 99久久国产综合色|国产精品| 欧美一二区视频| 亚洲国产综合在线| 99精品视频在线观看| 欧美电影免费观看完整版| 伊人性伊人情综合网| 风间由美一区二区三区在线观看 | 成人高清免费观看| 欧美另类videos死尸| 日韩伦理电影网| 成人免费高清在线观看| 精品不卡在线视频| 99国产精品久久久久| 国产日韩在线不卡| 成人免费视频播放| 成人欧美一区二区三区黑人麻豆| eeuss鲁片一区二区三区在线看| 777午夜精品视频在线播放| 日本一区二区三区免费乱视频| 国产91高潮流白浆在线麻豆| 亚洲一区中文在线| 国产日韩精品一区二区三区| 欧美高清视频www夜色资源网| 亚洲女子a中天字幕| 欧美系列日韩一区| 蜜臀av一区二区在线免费观看| 日韩精品中文字幕在线不卡尤物| 蜜桃视频在线观看一区| 国产欧美一区二区三区沐欲| 99re这里只有精品6| 亚洲成年人影院| 欧美一区二区福利视频| 久久国产精品无码网站| 久久久久久久久久美女| 成人av资源下载| 亚洲国产精品久久人人爱| 日韩精品中午字幕| 日本黄色一区二区| 国产老妇另类xxxxx| 日本午夜精品一区二区三区电影| 国产精品每日更新| 国产欧美精品一区二区三区四区 | 一级中文字幕一区二区| 久久久国产精品午夜一区ai换脸| 欧美日韩视频在线一区二区| 99久久精品久久久久久清纯| 黄色日韩网站视频| 美女视频网站久久| 午夜免费欧美电影| 亚洲午夜免费电影| 一区二区在线观看av| 国产精品国产三级国产aⅴ无密码| 欧美日韩二区三区| 欧美亚洲综合一区| 91在线播放网址| 在线观看免费一区| 欧美日韩国产成人在线免费| 717成人午夜免费福利电影| 欧美精品777| 免费不卡在线观看| 久久久精品中文字幕麻豆发布| 久久久久青草大香线综合精品| 国产欧美日韩视频一区二区| 亚洲一线二线三线视频| 亚洲国产精品久久久久婷婷884 | 日韩免费观看高清完整版在线观看| 色一情一伦一子一伦一区| 国产精品系列在线观看| 成人黄色片在线观看| 成人福利视频在线| 91麻豆精品国产| 亚洲国产高清在线观看视频| 亚洲日本韩国一区| 日本不卡1234视频| 豆国产96在线|亚洲| 欧美亚洲尤物久久| 26uuu欧美| 亚洲色图视频网| 国产精品一区二区三区乱码| www.亚洲国产| 欧美性猛片aaaaaaa做受| 久久精品夜色噜噜亚洲aⅴ| 一区二区三区在线观看国产| 久久99久久99| 欧美私模裸体表演在线观看| 国产精品电影一区二区| 国产一区二区免费视频| 欧美剧在线免费观看网站| 日韩一区中文字幕| 成人深夜福利app| 欧美精品一区二区三区四区 |