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

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

?? cstrnchk.c

?? clips源代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
   if ((type != INSTANCE_ADDRESS) && (type != INSTANCE_NAME))
     { return(TRUE); }

   /*=============================================*/
   /* If an instance name is specified, determine */
   /* whether the instance exists.                */
   /*=============================================*/
   
   if (type == INSTANCE_ADDRESS)
     { ins = (INSTANCE_TYPE *) vPtr; }
   else
     { ins = FindInstanceBySymbol(theEnv,(SYMBOL_HN *) vPtr); }
    
   if (ins == NULL)
     { return(FALSE); }
   
   /*======================================================*/
   /* Search through the class list to see if the instance */
   /* belongs to one of the allowed classes in the list.   */
   /*======================================================*/

   insClass = (DEFCLASS *) EnvGetInstanceClass(theEnv,ins);
   for (tmpPtr = constraints->classList;
        tmpPtr != NULL;
        tmpPtr = tmpPtr->nextArg)
     {
      cmpClass = (DEFCLASS *) EnvFindDefclass(theEnv,ValueToString(tmpPtr->value));
      if (cmpClass == NULL) continue;
      if (cmpClass == insClass) return(TRUE);
      if (EnvSubclassP(theEnv,insClass,cmpClass)) return(TRUE);
     }

   /*=========================================================*/
   /* If a parent class wasn't found in the list, then return */
   /* FALSE because the constraint has been violated.         */
   /*=========================================================*/

   return(FALSE);
#else

#if MAC_MCW || IBM_MCW || MAC_XCD
#pragma unused(theEnv)
#pragma unused(type)
#pragma unused(vPtr)
#pragma unused(constraints)
#endif

   return(TRUE);
#endif     
  }

/*************************************************************/
/* CheckRangeConstraint: Determines if a primitive data type */
/*   satisfies the range constraint of a constraint record.  */
/*************************************************************/
static intBool CheckRangeConstraint(
  void *theEnv,
  int type,
  void *vPtr,
  CONSTRAINT_RECORD *constraints)
  {
   struct expr *minList, *maxList;

   /*===================================*/
   /* If the constraint record is NULL, */
   /* there are no range restrictions.  */
   /*===================================*/

   if (constraints == NULL) return(TRUE);

   /*============================================*/
   /* If the value being checked isn't a number, */
   /* then the range restrictions don't apply.   */
   /*============================================*/

   if ((type != INTEGER) && (type != FLOAT)) return(TRUE);

   /*=====================================================*/
   /* Check each of the range restrictions to see if the  */
   /* number falls within at least one of the allowed     */
   /* ranges. If it falls within one of the ranges, then  */
   /* return TRUE since the constraint is satisifed.      */
   /*=====================================================*/

   minList = constraints->minValue;
   maxList = constraints->maxValue;

   while (minList != NULL)
     {
      if (CompareNumbers(theEnv,type,vPtr,minList->type,minList->value) == LESS_THAN)
        {
         minList = minList->nextArg;
         maxList = maxList->nextArg;
        }
      else if (CompareNumbers(theEnv,type,vPtr,maxList->type,maxList->value) == GREATER_THAN)
        {
         minList = minList->nextArg;
         maxList = maxList->nextArg;
        }
      else
        { return(TRUE); }
     }

   /*===========================================*/
   /* Return FALSE since the number didn't fall */
   /* within one of the allowed numeric ranges. */
   /*===========================================*/

   return(FALSE);
  }

/************************************************/
/* ConstraintViolationErrorMessage: Generalized */
/*   error message for constraint violations.   */
/************************************************/
globle void ConstraintViolationErrorMessage(
  void *theEnv,
  char *theWhat,
  char *thePlace,
  int command,
  int thePattern,
  struct symbolHashNode *theSlot,
  int theField,
  int violationType,
  CONSTRAINT_RECORD *theConstraint,
  int printPrelude)
  {
   /*======================================================*/
   /* Don't print anything other than the tail explanation */
   /* of the error unless asked to do so.                  */
   /*======================================================*/

   if (printPrelude)
     {
      /*===================================*/
      /* Print the name of the thing which */
      /* caused the constraint violation.  */
      /*===================================*/

      if (violationType == FUNCTION_RETURN_TYPE_VIOLATION)
        {
         PrintErrorID(theEnv,"CSTRNCHK",1,TRUE);
         EnvPrintRouter(theEnv,WERROR,"The function return value ");
        }
      else if (theWhat != NULL)
        {
         PrintErrorID(theEnv,"CSTRNCHK",1,TRUE);
         EnvPrintRouter(theEnv,WERROR,theWhat);
         EnvPrintRouter(theEnv,WERROR," ");
        }

      /*=======================================*/
      /* Print the location of the thing which */
      /* caused the constraint violation.      */
      /*=======================================*/

      if (thePlace != NULL)
        {
         EnvPrintRouter(theEnv,WERROR,"found in ");
         if (command) EnvPrintRouter(theEnv,WERROR,"the ");
         EnvPrintRouter(theEnv,WERROR,thePlace);
         if (command) EnvPrintRouter(theEnv,WERROR," command");
        }

      /*================================================*/
      /* If the violation occured in the LHS of a rule, */
      /* indicate which pattern was at fault.           */
      /*================================================*/

      if (thePattern > 0)
        {
         EnvPrintRouter(theEnv,WERROR,"found in CE #");
         PrintLongInteger(theEnv,WERROR,(long int) thePattern);
        }
     }

   /*===============================================================*/
   /* Indicate the type of constraint violation (type, range, etc). */
   /*===============================================================*/

   if ((violationType == TYPE_VIOLATION) ||
       (violationType == FUNCTION_RETURN_TYPE_VIOLATION))
     { EnvPrintRouter(theEnv,WERROR,"\ndoes not match the allowed types"); }
   else if (violationType == RANGE_VIOLATION)
     {
      EnvPrintRouter(theEnv,WERROR,"\ndoes not fall in the allowed range ");
      PrintRange(theEnv,WERROR,theConstraint);
     }
   else if (violationType == ALLOWED_VALUES_VIOLATION)
     { EnvPrintRouter(theEnv,WERROR,"\ndoes not match the allowed values"); }
   else if (violationType == CARDINALITY_VIOLATION)
     { EnvPrintRouter(theEnv,WERROR,"\ndoes not satisfy the cardinality restrictions"); }
   else if (violationType == ALLOWED_CLASSES_VIOLATION)
     { EnvPrintRouter(theEnv,WERROR,"\ndoes not match the allowed classes"); }

   /*==============================================*/
   /* Print either the slot name or field position */
   /* where the constraint violation occured.      */
   /*==============================================*/

   if (theSlot != NULL)
     {
      EnvPrintRouter(theEnv,WERROR," for slot ");
      EnvPrintRouter(theEnv,WERROR,ValueToString(theSlot));
     }
   else if (theField > 0)
     {
      EnvPrintRouter(theEnv,WERROR," for field #");
      PrintLongInteger(theEnv,WERROR,(long long) theField);
     }

   EnvPrintRouter(theEnv,WERROR,".\n");
  }

/********************************************************************/
/* PrintRange: Prints the range restriction of a constraint record. */
/*   For example, 8 to +00 (eight to positive infinity).            */
/********************************************************************/
static void PrintRange(
  void *theEnv,
  char *logicalName,
  CONSTRAINT_RECORD *theConstraint)
  {
   if (theConstraint->minValue->value == SymbolData(theEnv)->NegativeInfinity)
     { EnvPrintRouter(theEnv,logicalName,ValueToString(SymbolData(theEnv)->NegativeInfinity)); }
   else PrintExpression(theEnv,logicalName,theConstraint->minValue);
   EnvPrintRouter(theEnv,logicalName," to ");
   if (theConstraint->maxValue->value == SymbolData(theEnv)->PositiveInfinity)
     { EnvPrintRouter(theEnv,logicalName,ValueToString(SymbolData(theEnv)->PositiveInfinity)); }
   else PrintExpression(theEnv,logicalName,theConstraint->maxValue);
  }

/*************************************************************/
/* ConstraintCheckDataObject: Given a value stored in a data */
/*   object structure and a constraint record, determines if */
/*   the data object satisfies the constraint record.        */
/*************************************************************/
globle int ConstraintCheckDataObject(
  void *theEnv,
  DATA_OBJECT *theData,
  CONSTRAINT_RECORD *theConstraints)
  {
   long i; /* 6.04 Bug Fix */
   int rv;
   struct field *theMultifield;

   if (theConstraints == NULL) return(NO_VIOLATION);

   if (theData->type == MULTIFIELD)
     {
      if (CheckCardinalityConstraint(theEnv,(theData->end - theData->begin) + 1,
                                     theConstraints) == FALSE)
        { return(CARDINALITY_VIOLATION); }

      theMultifield = ((struct multifield *) theData->value)->theFields;
      for (i = theData->begin; i <= theData->end; i++)
        {
         if ((rv = ConstraintCheckValue(theEnv,theMultifield[i].type,
                                        theMultifield[i].value,
                                        theConstraints)) != NO_VIOLATION)
           { return(rv); }
        }

      return(NO_VIOLATION);
     }

   if (CheckCardinalityConstraint(theEnv,1L,theConstraints) == FALSE)
    { return(CARDINALITY_VIOLATION); }

   return(ConstraintCheckValue(theEnv,theData->type,theData->value,theConstraints));
  }

/****************************************************************/
/* ConstraintCheckValue: Given a value and a constraint record, */
/*   determines if the value satisfies the constraint record.   */
/****************************************************************/
globle int ConstraintCheckValue(
  void *theEnv,
  int theType,
  void *theValue,
  CONSTRAINT_RECORD *theConstraints)
  {
   if (CheckTypeConstraint(theType,theConstraints) == FALSE)
     { return(TYPE_VIOLATION); }

   else if (CheckAllowedValuesConstraint(theType,theValue,theConstraints) == FALSE)
     { return(ALLOWED_VALUES_VIOLATION); }

   else if (CheckAllowedClassesConstraint(theEnv,theType,theValue,theConstraints) == FALSE)
     { return(ALLOWED_CLASSES_VIOLATION); }

   else if (CheckRangeConstraint(theEnv,theType,theValue,theConstraints) == FALSE)
     { return(RANGE_VIOLATION); }

   else if (theType == FCALL)
     {
      if (CheckFunctionReturnType((int) ValueFunctionType(theValue),theConstraints) == FALSE)
        { return(FUNCTION_RETURN_TYPE_VIOLATION); }
     }

   return(NO_VIOLATION);
  }

/********************************************************************/
/* ConstraintCheckExpressionChain: Checks an expression and nextArg */
/* links for constraint conflicts (argList is not followed).        */
/********************************************************************/
globle int ConstraintCheckExpressionChain(
  void *theEnv,
  struct expr *theExpression,
  CONSTRAINT_RECORD *theConstraints)
  {
   struct expr *theExp;
   int min = 0, max = 0, vCode;

   /*===========================================================*/
   /* Determine the minimum and maximum number of value which   */
   /* can be derived from the expression chain (max of -1 means */
   /* positive infinity).                                       */
   /*===========================================================*/

   for (theExp = theExpression ; theExp != NULL ; theExp = theExp->nextArg)
     {
      if (ConstantType(theExp->type)) min++;
      else if (theExp->type == FCALL)
        {
         if ((ExpressionFunctionType(theExp) != 'm') &&
             (ExpressionFunctionType(theExp) != 'u')) min++;
         else max = -1;
        }
      else max = -1;
     }

   /*====================================*/
   /* Check for a cardinality violation. */
   /*====================================*/

   if (max == 0) max = min;
   if (CheckRangeAgainstCardinalityConstraint(theEnv,min,max,theConstraints) == FALSE)
     { return(CARDINALITY_VIOLATION); }

   /*========================================*/
   /* Check for other constraint violations. */
   /*========================================*/

   for (theExp = theExpression ; theExp != NULL ; theExp = theExp->nextArg)
     {
      vCode = ConstraintCheckValue(theEnv,theExp->type,theExp->value,theConstraints);
      if (vCode != NO_VIOLATION)
        return(vCode);
     }

   return(NO_VIOLATION);
  }

#if (! RUN_TIME) && (! BLOAD_ONLY)

/***************************************************/
/* ConstraintCheckExpression: Checks an expression */
/*   for constraint conflicts. Returns TRUE if     */
/*   conflicts are found, otherwise FALSE.         */
/***************************************************/
globle int ConstraintCheckExpression(
  void *theEnv,
  struct expr *theExpression,
  CONSTRAINT_RECORD *theConstraints)
  {
   int rv = NO_VIOLATION;

   if (theConstraints == NULL) return(rv);

   while (theExpression != NULL)
     {
      rv = ConstraintCheckValue(theEnv,theExpression->type,
                                theExpression->value,
                                theConstraints);
      if (rv != NO_VIOLATION) return(rv);
      rv = ConstraintCheckExpression(theEnv,theExpression->argList,theConstraints);
      if (rv != NO_VIOLATION) return(rv);
      theExpression = theExpression->nextArg;
     }

   return(rv);
  }

#endif /* (! RUN_TIME) && (! BLOAD_ONLY) */

#if (! RUN_TIME)

/*****************************************************/
/* UnmatchableConstraint: Determines if a constraint */
/*  record can still be satisfied by some value.     */
/*****************************************************/
globle intBool UnmatchableConstraint(
  CONSTRAINT_RECORD *theConstraint)
  {
   if (theConstraint == NULL) return(FALSE);

   if ((! theConstraint->anyAllowed) &&
       (! theConstraint->symbolsAllowed) &&
       (! theConstraint->stringsAllowed) &&
       (! theConstraint->floatsAllowed) &&
       (! theConstraint->integersAllowed) &&
       (! theConstraint->instanceNamesAllowed) &&
       (! theConstraint->instanceAddressesAllowed) &&
       (! theConstraint->multifieldsAllowed) &&
       (! theConstraint->externalAddressesAllowed) &&
       (! theConstraint->voidAllowed) &&
       (! theConstraint->factAddressesAllowed))
     { return(TRUE); }

   return(FALSE);
  }

#endif /* (! RUN_TIME) */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美精品一区二区三区蜜臀 | 成人精品高清在线| 欧美大片在线观看| 蜜桃传媒麻豆第一区在线观看| 欧美猛男男办公室激情| 日韩在线一区二区| 久久综合999| 成人av资源站| 亚洲影视在线播放| 日韩亚洲欧美成人一区| 国产乱人伦精品一区二区在线观看 | 91亚洲男人天堂| 亚洲综合偷拍欧美一区色| 欧美一级艳片视频免费观看| 国产麻豆成人传媒免费观看| 日韩一区欧美小说| 欧美精品一卡二卡| 国产精品18久久久久久久网站| 国产精品毛片久久久久久久 | 欧美视频完全免费看| 免费在线欧美视频| 中文久久乱码一区二区| 欧美主播一区二区三区| 青青草国产精品97视觉盛宴| 国产午夜精品在线观看| 色噜噜狠狠色综合欧洲selulu| 天天色图综合网| 欧美激情一区二区三区不卡| 色狠狠av一区二区三区| 久久精品国产在热久久| 1区2区3区国产精品| 在线观看不卡视频| 国产精品一色哟哟哟| 国产精品免费网站在线观看| 成人av一区二区三区| 亚洲一区二区在线观看视频 | 精品一区二区免费看| 日韩视频一区二区| 91影院在线免费观看| 美国一区二区三区在线播放| 国产网站一区二区| 在线观看视频一区二区| 懂色av一区二区三区免费观看| 一区二区免费看| 国产亚洲午夜高清国产拍精品| 91原创在线视频| 国产超碰在线一区| 一区二区三区中文免费| 欧美mv日韩mv| 欧美主播一区二区三区| 国产成人午夜精品影院观看视频| 日本视频免费一区| 亚洲自拍偷拍九九九| 国产精品国产三级国产三级人妇 | 亚洲午夜在线视频| 自拍偷拍亚洲综合| 国产亚洲婷婷免费| 日韩美女在线视频| 555夜色666亚洲国产免| 在线免费精品视频| av亚洲精华国产精华精| 国产成人精品免费在线| 久国产精品韩国三级视频| 丝袜亚洲另类丝袜在线| 亚洲一区二区三区四区中文字幕 | 欧美成人一区二区三区片免费 | 色视频成人在线观看免| 国产乱一区二区| 国产乱码精品一区二区三区av| 免费一区二区视频| 日本不卡视频在线| 日韩精品国产欧美| 秋霞成人午夜伦在线观看| 天天色天天操综合| 日本少妇一区二区| 麻豆一区二区三区| 国产在线不卡一区| 国产精品主播直播| 国产suv精品一区二区883| 国产综合成人久久大片91| 狠狠色丁香久久婷婷综合_中| 久久99九九99精品| 国内精品伊人久久久久av一坑| 九九热在线视频观看这里只有精品| 日韩高清一级片| 精品亚洲aⅴ乱码一区二区三区| 另类的小说在线视频另类成人小视频在线| 天堂成人免费av电影一区| 偷偷要91色婷婷| 美女视频第一区二区三区免费观看网站| 日韩成人午夜电影| 精品一区二区三区在线播放视频| 精品一区二区三区在线播放| 高清国产一区二区三区| 中文字幕av一区二区三区| 欧美mv日韩mv国产| 精品视频色一区| 亚洲成人免费av| 欧美一级片在线看| 日韩免费福利电影在线观看| 国产欧美一区二区精品仙草咪| 欧美国产精品一区二区三区| 国产蜜臀97一区二区三区| 欧美videos中文字幕| 国产性色一区二区| 亚洲精品免费播放| 日本不卡免费在线视频| 国产精品77777竹菊影视小说| aaa亚洲精品| 欧美一区中文字幕| 中文字幕的久久| 亚洲国产成人精品视频| 精品一区二区成人精品| 91麻豆国产福利精品| 7878成人国产在线观看| 日本一区二区三区在线不卡| 亚洲综合久久久久| 国产精品影视在线观看| 欧美色图免费看| 久久久99精品免费观看| 亚洲国产欧美另类丝袜| 国产精品白丝av| 欧美三级电影在线观看| 国产视频一区在线观看| 亚洲不卡av一区二区三区| 国产在线国偷精品免费看| 欧美视频一区在线| 亚洲精选视频在线| 老司机午夜精品| 日本高清免费不卡视频| 亚洲精品一区二区精华| 亚洲成精国产精品女| 成人av免费网站| 久久亚洲一区二区三区明星换脸 | 欧美一区二区日韩| **欧美大码日韩| 国产专区欧美精品| 91超碰这里只有精品国产| 亚洲欧洲日韩女同| 国产酒店精品激情| 日韩西西人体444www| 亚洲国产另类av| 成人一道本在线| 精品国偷自产国产一区| 亚洲成av人片在www色猫咪| 91蝌蚪porny九色| 国产日产亚洲精品系列| 精品一区二区在线看| 欧美天堂亚洲电影院在线播放| 国产精品国产成人国产三级| 国产一区二区在线电影| 精品免费国产一区二区三区四区| 亚洲国产精品久久人人爱| 波多野结衣亚洲| 久久精品亚洲乱码伦伦中文 | 精品亚洲成a人| 91精品国产福利| 性感美女极品91精品| 91福利在线免费观看| 亚洲蜜桃精久久久久久久| av电影天堂一区二区在线| 久久综合久久鬼色中文字| 日本成人在线一区| 欧美伊人久久久久久久久影院 | 欧美专区在线观看一区| 亚洲精品五月天| 久久精品国产一区二区三区免费看| 这里是久久伊人| 爽爽淫人综合网网站| 欧美精品久久99久久在免费线 | 日韩美女精品在线| 91婷婷韩国欧美一区二区| 中文字幕日韩一区| 成人免费福利片| 最新热久久免费视频| 色中色一区二区| 亚洲成年人影院| 欧美日韩成人一区二区| 青椒成人免费视频| 欧美一二三区在线| 国内精品久久久久影院一蜜桃| 精品国产百合女同互慰| 国产成人精品一区二区三区网站观看| 日韩精品一区二区三区在线观看| 日韩成人一级片| 亚洲人成网站影音先锋播放| 国产大陆亚洲精品国产| 日韩毛片一二三区| 欧美日韩激情一区| 蜜桃久久av一区| 国产欧美一区视频| 91福利资源站| 美国毛片一区二区三区| 亚洲国产精品传媒在线观看| 色婷婷综合久久久久中文一区二区| 亚洲高清免费观看| 精品国产成人在线影院| 一本色道综合亚洲| 久久丁香综合五月国产三级网站| 欧美韩国日本综合|