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

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

?? extnfunc.c

?? clips源代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
   /*******************************************************/   /*      "C" Language Integrated Production System      */   /*                                                     */   /*             CLIPS Version 6.30  10/19/06            */   /*                                                     */   /*               EXTERNAL FUNCTION MODULE              */   /*******************************************************//*************************************************************//* Purpose: Routines for adding new user or system defined   *//*   functions.                                              *//*                                                           *//* Principal Programmer(s):                                  *//*      Gary D. Riley                                        *//*                                                           *//* Contributing Programmer(s):                               *//*      Brian L. Donnell                                     *//*                                                           *//* Revision History:                                         *//*                                                           *//*      6.24: Corrected code to remove run-time program      *//*            compiler warning.                              *//*                                                           *//*      6.30: Added support for passing context information  */ /*            to user defined functions.                     *//*                                                           *//*************************************************************/#define _EXTNFUNC_SOURCE_#include "setup.h"#include <ctype.h>#include <stdlib.h>#include "constant.h"#include "envrnmnt.h"#include "router.h"#include "memalloc.h"#include "evaluatn.h"#include "extnfunc.h"/***************************************//* LOCAL INTERNAL FUNCTION DEFINITIONS *//***************************************/   static void                    AddHashFunction(void *,struct FunctionDefinition *);   static void                    InitializeFunctionHashTable(void *);   static void                    DeallocateExternalFunctionData(void *);#if (! RUN_TIME)   static int                     RemoveHashFunction(void *,struct FunctionDefinition *);#endif/*********************************************************//* InitializeExternalFunctionData: Allocates environment *//*    data for external functions.                       *//*********************************************************/globle void InitializeExternalFunctionData(  void *theEnv)  {   AllocateEnvironmentData(theEnv,EXTERNAL_FUNCTION_DATA,sizeof(struct externalFunctionData),DeallocateExternalFunctionData);  }/***********************************************************//* DeallocateExternalFunctionData: Deallocates environment *//*    data for external functions.                         *//***********************************************************/static void DeallocateExternalFunctionData(  void *theEnv)  {   struct FunctionHash *fhPtr, *nextFHPtr;   int i;#if ! RUN_TIME   struct FunctionDefinition *tmpPtr, *nextPtr;   tmpPtr = ExternalFunctionData(theEnv)->ListOfFunctions;   while (tmpPtr != NULL)     {      nextPtr = tmpPtr->next;      rtn_struct(theEnv,FunctionDefinition,tmpPtr);      tmpPtr = nextPtr;     }#endif   if (ExternalFunctionData(theEnv)->FunctionHashtable == NULL)     { return; }        for (i = 0; i < SIZE_FUNCTION_HASH; i++)     {      fhPtr = ExternalFunctionData(theEnv)->FunctionHashtable[i];      while (fhPtr != NULL)        {         nextFHPtr = fhPtr->next;         rtn_struct(theEnv,FunctionHash,fhPtr);         fhPtr = nextFHPtr;        }     }      genfree(theEnv,ExternalFunctionData(theEnv)->FunctionHashtable,           (int) sizeof (struct FunctionHash *) * SIZE_FUNCTION_HASH);  }#if (! RUN_TIME)/************************************************************//* DefineFunction: Used to define a system or user external *//*   function so that the KB can access it.                 *//************************************************************/#if (! ENVIRONMENT_API_ONLY) && ALLOW_ENVIRONMENT_GLOBALSgloble int DefineFunction(  char *name,  int returnType,  int (*pointer)(void),  char *actualName)  {   void *theEnv;      theEnv = GetCurrentEnvironment();   return(DefineFunction3(theEnv,name,returnType,                          (int (*)(void *)) pointer,                          actualName,NULL,FALSE,NULL));  }#endif/***************************************************************//* EnvDefineFunction: Used to define a system or user external *//*   function so that the KB can access it.                    *//***************************************************************/globle int EnvDefineFunction(  void *theEnv,  char *name,  int returnType,  int (*pointer)(void *),  char *actualName)  {   return(DefineFunction3(theEnv,name,returnType,pointer,actualName,NULL,TRUE,NULL));  }  /************************************************************//* EnvDefineFunctionWithContext: Used to define a system or *//*   user external function so that the KB can access it.   *//************************************************************/globle int EnvDefineFunctionWithContext(  void *theEnv,  char *name,  int returnType,  int (*pointer)(void *),  char *actualName,  void *context)  {   return(DefineFunction3(theEnv,name,returnType,pointer,actualName,NULL,TRUE,context));  }  /*************************************************************//* DefineFunction2: Used to define a system or user external *//*   function so that the KB can access it.                  *//*************************************************************/#if (! ENVIRONMENT_API_ONLY) && ALLOW_ENVIRONMENT_GLOBALSgloble int DefineFunction2(  char *name,  int returnType,  int (*pointer)(void),  char *actualName,  char *restrictions)  {   void *theEnv;      theEnv = GetCurrentEnvironment();   return(DefineFunction3(theEnv,name,returnType,                          (int (*)(void *)) pointer,                          actualName,restrictions,FALSE,NULL));  }#endif  /*************************************************************//* EnvDefineFunction2: Used to define a system or user external *//*   function so that the KB can access it.                  *//*************************************************************/globle int EnvDefineFunction2(  void *theEnv,  char *name,  int returnType,  int (*pointer)(void *),  char *actualName,  char *restrictions)  {   return(DefineFunction3(theEnv,name,returnType,pointer,actualName,restrictions,TRUE,NULL));  }/*************************************************************//* EnvDefineFunction2WithContext: Used to define a system or *//*   user external function so that the KB can access it.    *//*************************************************************/globle int EnvDefineFunction2WithContext(  void *theEnv,  char *name,  int returnType,  int (*pointer)(void *),  char *actualName,  char *restrictions,  void *context)  {   return(DefineFunction3(theEnv,name,returnType,pointer,actualName,restrictions,TRUE,context));  }/*************************************************************//* DefineFunction3: Used to define a system or user external *//*   function so that the KB can access it. Allows argument  *//*   restrictions to be attached to the function.            *//*   Return types are:                                       *//*     a - external address                                  *//*     b - boolean integer (converted to symbol)             *//*     c - character (converted to symbol)                   *//*     d - double precision float                            *//*     f - single precision float (converted to double)      *//*     g - long long integer                                 *//*     i - integer (converted to long long integer)          *//*     j - unknown (symbol, string,                          *//*                  or instance name by convention)          *//*     k - unknown (symbol or string by convention)          *//*     l - long integer (converted to long long integer)     *//*     m - unknown (multifield by convention)                *//*     n - unknown (integer or float by convention)          *//*     o - instance name                                     *//*     s - string                                            *//*     u - unknown                                           *//*     v - void                                              *//*     w - symbol                                            *//*     x - instance address                                  *//*************************************************************/globle int DefineFunction3(  void *theEnv,  char *name,  int returnType,  int (*pointer)(void *),  char *actualName,  char *restrictions,  intBool environmentAware,  void *context)  {   struct FunctionDefinition *newFunction;   if ( (returnType != 'a') &&        (returnType != 'b') &&        (returnType != 'c') &&        (returnType != 'd') &&        (returnType != 'f') &&        (returnType != 'g') &&        (returnType != 'i') &&        (returnType != 'j') &&        (returnType != 'k') &&        (returnType != 'l') &&        (returnType != 'm') &&        (returnType != 'n') &&#if OBJECT_SYSTEM        (returnType != 'o') &&#endif        (returnType != 's') &&        (returnType != 'u') &&        (returnType != 'v') &&#if OBJECT_SYSTEM        (returnType != 'x') &&#endif        (returnType != 'w') )     { return(0); }   newFunction = FindFunction(theEnv,name);   if (newFunction == NULL)     {      newFunction = get_struct(theEnv,FunctionDefinition);      newFunction->callFunctionName = (SYMBOL_HN *) EnvAddSymbol(theEnv,name);      IncrementSymbolCount(newFunction->callFunctionName);      newFunction->next = GetFunctionList(theEnv);      ExternalFunctionData(theEnv)->ListOfFunctions = newFunction;      AddHashFunction(theEnv,newFunction);     }        newFunction->returnValueType = (char) returnType;   newFunction->functionPointer = (int (*)(void)) pointer;   newFunction->actualFunctionName = actualName;   if (restrictions != NULL)     {      if (((int) (strlen(restrictions)) < 2) ? TRUE :          ((! isdigit(restrictions[0]) && (restrictions[0] != '*')) ||           (! isdigit(restrictions[1]) && (restrictions[1] != '*'))))        restrictions = NULL;     }   newFunction->restrictions = restrictions;   newFunction->parser = NULL;   newFunction->overloadable = TRUE;   newFunction->sequenceuseok = TRUE;   newFunction->environmentAware = (short) environmentAware;   newFunction->usrData = NULL;   newFunction->context = context;   return(1);  }  /***********************************************//* UndefineFunction: Used to remove a function *//*   definition from the list of functions.    *//***********************************************/globle int UndefineFunction(  void *theEnv,  char *functionName)  {   SYMBOL_HN *findValue;   struct FunctionDefinition *fPtr, *lastPtr = NULL;   findValue = (SYMBOL_HN *) FindSymbolHN(theEnv,functionName);   for (fPtr = ExternalFunctionData(theEnv)->ListOfFunctions;        fPtr != NULL;        fPtr = fPtr->next)     {      if (fPtr->callFunctionName == findValue)        {         DecrementSymbolCount(theEnv,fPtr->callFunctionName);         RemoveHashFunction(theEnv,fPtr);         if (lastPtr == NULL)           { ExternalFunctionData(theEnv)->ListOfFunctions = fPtr->next; }         else           { lastPtr->next = fPtr->next; }                    ClearUserDataList(theEnv,fPtr->usrData);         rtn_struct(theEnv,FunctionDefinition,fPtr);         return(TRUE);        }      lastPtr = fPtr;     }   return(FALSE);  }/******************************************//* RemoveHashFunction: Removes a function *//*   from the function hash table.        *//******************************************/static int RemoveHashFunction(  void *theEnv,  struct FunctionDefinition *fdPtr)  {   struct FunctionHash *fhPtr, *lastPtr = NULL;   unsigned hashValue;   hashValue = HashSymbol(ValueToString(fdPtr->callFunctionName),SIZE_FUNCTION_HASH);   for (fhPtr = ExternalFunctionData(theEnv)->FunctionHashtable[hashValue];        fhPtr != NULL;        fhPtr = fhPtr->next)     {      if (fhPtr->fdPtr == fdPtr)        {         if (lastPtr == NULL)           { ExternalFunctionData(theEnv)->FunctionHashtable[hashValue] = fhPtr->next; }         else           { lastPtr->next = fhPtr->next; }         rtn_struct(theEnv,FunctionHash,fhPtr);         return(TRUE);        }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一区二区在线看| 综合婷婷亚洲小说| 亚洲欧洲精品一区二区三区| 一区二区三区不卡视频在线观看 | 欧美日韩一区二区在线视频| 欧美va亚洲va香蕉在线| 一区二区免费视频| 成人一区二区三区在线观看| 欧美精品v日韩精品v韩国精品v| 久久综合九色综合欧美98 | 老色鬼精品视频在线观看播放| 99久久久无码国产精品| 精品电影一区二区| 日本午夜一本久久久综合| 色视频一区二区| 国产精品成人免费精品自在线观看 | 99精品黄色片免费大全| 2020国产精品自拍| 久久99久久精品| 91麻豆精品国产91久久久使用方法 | 91网站黄www| 国产女人aaa级久久久级 | 一区二区三区四区激情| 岛国精品在线播放| 久久综合九色综合久久久精品综合| 午夜欧美视频在线观看| 91视频www| 亚洲美女视频在线观看| 99热精品国产| 亚洲欧美日韩综合aⅴ视频| 成人免费三级在线| 国产欧美日韩精品一区| 国产福利视频一区二区三区| 欧美精品一区二区精品网| 久久不见久久见免费视频7 | 色综合av在线| 中文字幕欧美一| 99综合电影在线视频| 欧美国产乱子伦| 风间由美中文字幕在线看视频国产欧美| 精品日本一线二线三线不卡| 精品中文字幕一区二区小辣椒| 日韩欧美一二三四区| 久久99最新地址| 中文字幕精品一区二区精品绿巨人 | 国产日韩欧美精品电影三级在线| 国产一区二区三区黄视频| 久久久蜜臀国产一区二区| 成人性视频免费网站| 亚洲视频一区在线观看| 欧美视频在线播放| 男男视频亚洲欧美| 精品国产乱码久久久久久久久| 国产精品一级黄| 亚洲免费观看视频| 在线电影国产精品| 久久成人免费网| 国产精品久久久久久亚洲伦 | 五月天视频一区| 精品噜噜噜噜久久久久久久久试看| 激情久久五月天| **网站欧美大片在线观看| 欧美日韩在线电影| 国产在线精品一区二区夜色| 国产精品乱码一区二区三区软件 | 亚洲精品国产一区二区三区四区在线 | 欧美一区二区三区视频免费播放| 寂寞少妇一区二区三区| 1区2区3区国产精品| 欧美日韩国产综合视频在线观看| 国产在线麻豆精品观看| 亚洲一区日韩精品中文字幕| 精品美女一区二区三区| 不卡电影免费在线播放一区| 午夜精品一区二区三区电影天堂 | 粉嫩一区二区三区性色av| 亚洲丝袜另类动漫二区| 日韩一区二区三区免费看 | 韩国精品免费视频| 亚洲精品久久久蜜桃| 精品乱人伦小说| 欧美午夜精品久久久久久超碰| 国产美女精品在线| 亚洲电影在线播放| 中文字幕在线视频一区| 日韩欧美一区二区久久婷婷| 色婷婷av一区二区| 不卡av免费在线观看| 蜜臀va亚洲va欧美va天堂| 一区二区三区资源| 国产精品理论片| 久久亚洲精品小早川怜子| 91精品国产综合久久久久久久久久 | 欧美群妇大交群的观看方式| 国产成人综合自拍| 免费人成在线不卡| 五月天丁香久久| 亚洲一区二区三区中文字幕在线| 国产午夜精品在线观看| 欧美一区2区视频在线观看| av爱爱亚洲一区| 国产成人精品免费在线| 麻豆91免费观看| 偷偷要91色婷婷| 亚洲国产美女搞黄色| 亚洲丝袜美腿综合| 亚洲欧美中日韩| ●精品国产综合乱码久久久久 | 91精品国产91久久久久久一区二区 | 91精品国产综合久久久久久久| 色哟哟一区二区三区| 不卡的看片网站| www.性欧美| eeuss鲁片一区二区三区在线观看| 韩日精品视频一区| 国产一区在线精品| 国产精品主播直播| 国产jizzjizz一区二区| 国产成人午夜精品影院观看视频| 国产又黄又大久久| 国产99精品国产| 99亚偷拍自图区亚洲| 色哟哟欧美精品| 欧美日韩免费观看一区二区三区| 欧美午夜影院一区| 91精品国产91久久久久久一区二区 | 另类小说一区二区三区| 蜜桃视频在线一区| 久久69国产一区二区蜜臀| 国产曰批免费观看久久久| 国产·精品毛片| 一本在线高清不卡dvd| 欧美日韩一区二区三区在线看 | 国产视频亚洲色图| 国产精品美女www爽爽爽| 国产亚洲一二三区| 久久亚洲二区三区| 日韩精品欧美精品| 蜜臀精品一区二区三区在线观看 | 欧美精品一区二区三区蜜桃 | 欧美一区午夜视频在线观看 | 美日韩一级片在线观看| 久国产精品韩国三级视频| 国产一区福利在线| 91麻豆免费视频| 日韩一区二区在线观看| 久久久国产精品不卡| 亚洲男帅同性gay1069| 丝袜美腿成人在线| 国产成人亚洲综合色影视| 色婷婷久久一区二区三区麻豆| 欧美日韩免费观看一区二区三区| 欧美tickling网站挠脚心| 中文字幕日韩欧美一区二区三区| 亚洲大片精品永久免费| 国产精品系列在线观看| 欧洲av在线精品| 久久综合久久久久88| 一区二区三区在线播放| 国产精品综合二区| 欧美日韩国产一级片| 国产精品丝袜91| 免费成人在线播放| 91玉足脚交白嫩脚丫在线播放| 日韩一区二区在线播放| 亚洲狼人国产精品| 国产麻豆欧美日韩一区| 欧美日韩在线播放| 亚洲色图在线播放| 国内精品在线播放| 精品视频全国免费看| 国产精品免费观看视频| 久久99日本精品| 欧美午夜影院一区| 青青青伊人色综合久久| 色乱码一区二区三区88| 国产亚洲精品aa| 蜜桃视频免费观看一区| 欧美色区777第一页| 亚洲情趣在线观看| 国产成人av电影在线播放| 日韩精品一区二区三区四区视频| 一区二区高清在线| 99久久免费视频.com| 国产色综合久久| 九九在线精品视频| 欧美一区二区三区在线电影 | 色综合久久久网| 国产欧美日韩视频一区二区 | 亚洲精品一区二区三区蜜桃下载 | 一区二区三区中文字幕精品精品 | 久久综合给合久久狠狠狠97色69| 亚洲国产综合色| 99国产精品99久久久久久| 国产日韩欧美精品综合| 经典三级视频一区| 久久在线免费观看| 国产麻豆91精品| 久久久蜜臀国产一区二区| 国产综合久久久久久久久久久久|