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

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

?? commline.c

?? clips源代碼
?? C
?? 第 1 頁 / 共 3 頁
字號:
   /*******************************************************/   /*      "C" Language Integrated Production System      */   /*                                                     */   /*             CLIPS Version 6.24  06/05/06            */   /*                                                     */   /*                COMMAND LINE MODULE                  */   /*******************************************************//*************************************************************//* Purpose: Provides a set of routines for processing        *//*   commands entered at the top level prompt.               *//*                                                           *//* Principal Programmer(s):                                  *//*      Gary D. Riley                                        *//*                                                           *//* Contributing Programmer(s):                               *//*      Brian L. Donnell                                     *//*                                                           *//* Revision History:                                         *//*                                                           *//*      6.24: Renamed BOOLEAN macro type to intBool.         *//*                                                           *//*            Refactored several functions and added         *//*            additional functions for use by an interface   *//*            layered on top of CLIPS.                       *//*                                                           *//*************************************************************/#define _COMMLINE_SOURCE_#include <stdio.h>#define _STDIO_INCLUDED_#include <string.h>#include <ctype.h>#include "setup.h"#include "constant.h"#include "argacces.h"#include "constrct.h"#include "cstrcpsr.h"#include "envrnmnt.h"#include "exprnpsr.h"#include "filecom.h"#include "memalloc.h"#include "prcdrfun.h"#include "prcdrpsr.h"#include "router.h"#include "scanner.h"#include "strngrtr.h"#include "symbol.h"#include "sysdep.h"#include "utility.h"#include "commline.h"/***************************************//* LOCAL INTERNAL FUNCTION DEFINITIONS *//***************************************/#if ! RUN_TIME   static int                     DoString(char *,int,int *);   static int                     DoComment(char *,int);   static int                     DoWhiteSpace(char *,int);   static int                     DefaultGetNextEvent(void *);#endif   static void                    DeallocateCommandLineData(void *);/****************************************************//* InitializeCommandLineData: Allocates environment *//*    data for command line functionality.          *//****************************************************/globle void InitializeCommandLineData(  void *theEnv)  {   AllocateEnvironmentData(theEnv,COMMANDLINE_DATA,sizeof(struct commandLineData),DeallocateCommandLineData);#if ! RUN_TIME      CommandLineData(theEnv)->BannerString = BANNER_STRING;   CommandLineData(theEnv)->EventFunction = DefaultGetNextEvent;#endif  }  /*******************************************************//* DeallocateCommandLineData: Deallocates environment *//*    data for the command line functionality.        *//******************************************************/static void DeallocateCommandLineData(  void *theEnv)  {#if ! RUN_TIME   if (CommandLineData(theEnv)->CommandString != NULL)      { rm(theEnv,CommandLineData(theEnv)->CommandString,CommandLineData(theEnv)->MaximumCharacters); }        if (CommandLineData(theEnv)->CurrentCommand != NULL)      { ReturnExpression(theEnv,CommandLineData(theEnv)->CurrentCommand); }#else#if MAC_MCW || IBM_MCW || MAC_XCD#pragma unused(theEnv)#endif#endif  }#if ! RUN_TIME/***************************************************//* ExpandCommandString: Appends a character to the *//*   command string. Returns TRUE if the command   *//*   string was successfully expanded, otherwise   *//*   FALSE. Expanding the string also includes     *//*   adding a backspace character which reduces    *//*   string's length.                              *//***************************************************/globle int ExpandCommandString(  void *theEnv,  int inchar)  {   size_t k;   k = RouterData(theEnv)->CommandBufferInputCount;   CommandLineData(theEnv)->CommandString = ExpandStringWithChar(theEnv,inchar,CommandLineData(theEnv)->CommandString,&RouterData(theEnv)->CommandBufferInputCount,                                        &CommandLineData(theEnv)->MaximumCharacters,CommandLineData(theEnv)->MaximumCharacters+80);   return((RouterData(theEnv)->CommandBufferInputCount != k) ? TRUE : FALSE);  }/******************************************************************//* FlushCommandString: Empties the contents of the CommandString. *//******************************************************************/globle void FlushCommandString(  void *theEnv)  {   if (CommandLineData(theEnv)->CommandString != NULL) rm(theEnv,CommandLineData(theEnv)->CommandString,CommandLineData(theEnv)->MaximumCharacters);   CommandLineData(theEnv)->CommandString = NULL;   CommandLineData(theEnv)->MaximumCharacters = 0;   RouterData(theEnv)->CommandBufferInputCount = 0;  }/*********************************************************************************//* SetCommandString: Sets the contents of the CommandString to a specific value. *//*********************************************************************************/globle void SetCommandString(  void *theEnv,  char *str)  {   size_t length;   FlushCommandString(theEnv);   length = strlen(str);   CommandLineData(theEnv)->CommandString = (char *)                   genrealloc(theEnv,CommandLineData(theEnv)->CommandString,(unsigned) CommandLineData(theEnv)->MaximumCharacters,                              (unsigned) CommandLineData(theEnv)->MaximumCharacters + length + 1);   genstrcpy(CommandLineData(theEnv)->CommandString,str);   CommandLineData(theEnv)->MaximumCharacters += (length + 1);   RouterData(theEnv)->CommandBufferInputCount += (int) length;  }/*************************************************************//* SetNCommandString: Sets the contents of the CommandString *//*   to a specific value up to N characters.                 *//*************************************************************/globle void SetNCommandString(  void *theEnv,  char *str,  unsigned length)  {   FlushCommandString(theEnv);   CommandLineData(theEnv)->CommandString = (char *)                   genrealloc(theEnv,CommandLineData(theEnv)->CommandString,(unsigned) CommandLineData(theEnv)->MaximumCharacters,                              (unsigned) CommandLineData(theEnv)->MaximumCharacters + length + 1);   genstrncpy(CommandLineData(theEnv)->CommandString,str,length);   CommandLineData(theEnv)->CommandString[CommandLineData(theEnv)->MaximumCharacters + length] = 0;   CommandLineData(theEnv)->MaximumCharacters += (length + 1);   RouterData(theEnv)->CommandBufferInputCount += (int) length;  }/******************************************************************************//* AppendCommandString: Appends a value to the contents of the CommandString. *//******************************************************************************/globle void AppendCommandString(  void *theEnv,  char *str)  {   CommandLineData(theEnv)->CommandString = AppendToString(theEnv,str,CommandLineData(theEnv)->CommandString,&RouterData(theEnv)->CommandBufferInputCount,&CommandLineData(theEnv)->MaximumCharacters);  }/************************************************************//* AppendNCommandString: Appends a value up to N characters *//*   to the contents of the CommandString.                  *//************************************************************/globle void AppendNCommandString(  void *theEnv,  char *str,  unsigned length)  {   CommandLineData(theEnv)->CommandString = AppendNToString(theEnv,str,CommandLineData(theEnv)->CommandString,length,&RouterData(theEnv)->CommandBufferInputCount,&CommandLineData(theEnv)->MaximumCharacters);  }/*****************************************************************************//* GetCommandString: Returns a pointer to the contents of the CommandString. *//*****************************************************************************/globle char *GetCommandString(  void *theEnv)  {   return(CommandLineData(theEnv)->CommandString);  }/**************************************************************************//* CompleteCommand: Determines whether a string forms a complete command. *//*   A complete command is either a constant, a variable, or a function   *//*   call which is followed (at some point) by a carriage return. Once a  *//*   complete command is found (not including the parenthesis),           *//*   extraneous parenthesis and other tokens are ignored. If a complete   *//*   command exists, then 1 is returned. 0 is returned if the command was *//*   not complete and without errors. -1 is returned if the command       *//*   contains an error.                                                   *//**************************************************************************/globle int CompleteCommand(  char *mstring)  {   int i;   char inchar;   int depth = 0;   int moreThanZero = 0;   int complete;   int error = 0;   if (mstring == NULL) return(0);   /*===================================================*/   /* Loop through each character of the command string */   /* to determine if there is a complete command.      */   /*===================================================*/   i = 0;   while ((inchar = mstring[i++]) != EOS)     {      switch(inchar)        {         /*======================================================*/         /* If a carriage return or line feed is found, there is */         /* at least one completed token in the command buffer,  */         /* and parentheses are balanced, then a complete        */         /* command has been found. Otherwise, remove all white  */         /* space beginning with the current character.          */         /*======================================================*/         case '\n' :         case '\r' :           if (error) return(-1);           if (moreThanZero && (depth == 0)) return(1);           i = DoWhiteSpace(mstring,i);           break;         /*=====================*/         /* Remove white space. */         /*=====================*/         case ' ' :         case '\f' :         case '\t' :           i = DoWhiteSpace(mstring,i);           break;         /*======================================================*/         /* If the opening quotation of a string is encountered, */         /* determine if the closing quotation of the string is  */         /* in the command buffer. Until the closing quotation   */         /* is found, a complete command can not be made.        */         /*======================================================*/         case '"' :           i = DoString(mstring,i,&complete);           if ((depth == 0) && complete) moreThanZero = TRUE;           break;         /*====================*/         /* Process a comment. */         /*====================*/         case ';' :           i = DoComment(mstring,i);           if (moreThanZero && (depth == 0) && (mstring[i] != EOS))             {              if (error) return(-1);              else return(1);             }           else if (mstring[i] != EOS) i++;           break;         /*====================================================*/         /* A left parenthesis increases the nesting depth of  */         /* the current command by 1. Don't bother to increase */         /* the depth if the first token encountered was not   */         /* a parenthesis (e.g. for the command string         */         /* "red (+ 3 4", the symbol red already forms a       */         /* complete command, so the next carriage return will */         /* cause evaluation of red--the closing parenthesis   */         /* for "(+ 3 4" does not have to be found).           */         /*====================================================*/         case '(' :           if ((depth > 0) || (moreThanZero == FALSE))             {              depth++;              moreThanZero = TRUE;             }           break;         /*====================================================*/         /* A right parenthesis decreases the nesting depth of */         /* the current command by 1. If the parenthesis is    */         /* the first token of the command, then an error is   */         /* generated.                                         */         /*====================================================*/         case ')' :           if (depth > 0) depth--;           else if (moreThanZero == FALSE) error = TRUE;           break;         /*=====================================================*/         /* If the command begins with any other character and  */         /* an opening parenthesis hasn't yet been found, then  */         /* skip all characters on the same line. If a carriage */         /* return or line feed is found, then a complete       */         /* command exists.                                     */         /*=====================================================*/         default:           if (depth == 0)             {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲素人一区二区| 九色综合狠狠综合久久| 欧美激情在线一区二区| 欧美精品一区二区高清在线观看 | 国产一二精品视频| 久久99精品国产麻豆婷婷| 日韩电影在线观看电影| 日一区二区三区| 日韩国产精品久久久| 免费人成精品欧美精品| 蜜臀av一级做a爰片久久| 久88久久88久久久| 高清国产一区二区| 91麻豆免费看| 欧美曰成人黄网| 欧美日韩国产首页在线观看| 在线综合视频播放| 日韩一级黄色片| 久久先锋影音av鲁色资源| 欧美激情一区二区三区| 综合色中文字幕| 亚洲va国产天堂va久久en| 日韩影视精彩在线| 狠狠色狠狠色综合| 成人app下载| 欧美亚洲日本国产| 日韩欧美成人激情| 欧美经典三级视频一区二区三区| 国产精品免费视频一区| 亚洲免费观看高清完整版在线观看| 亚洲精品大片www| 日本一道高清亚洲日美韩| 毛片不卡一区二区| www.视频一区| 欧美三级电影网| 欧美成人性福生活免费看| 国产欧美一区二区精品久导航| 综合婷婷亚洲小说| 日韩电影免费一区| 国产91在线观看| 在线视频国内自拍亚洲视频| 日韩小视频在线观看专区| 国产日韩精品一区二区浪潮av| 亚洲日韩欧美一区二区在线| 日本大胆欧美人术艺术动态| 国产精品69毛片高清亚洲| 91成人在线免费观看| 精品久久久久一区二区国产| 国产精品日产欧美久久久久| 亚洲第一av色| 国产美女av一区二区三区| 91论坛在线播放| 精品国产三级电影在线观看| 亚洲欧美aⅴ...| 久久精品av麻豆的观看方式| voyeur盗摄精品| 日韩三区在线观看| 亚洲精品成a人| 国产原创一区二区| 欧美欧美欧美欧美首页| 欧美激情综合在线| 日本美女视频一区二区| 91免费观看视频在线| 久久久久久久久蜜桃| 亚洲成人免费看| 成人黄色在线网站| 日韩免费电影一区| 亚洲第一搞黄网站| www.色精品| 久久久久国产一区二区三区四区| 亚洲国产综合色| 不卡区在线中文字幕| 精品免费视频一区二区| 亚洲风情在线资源站| av爱爱亚洲一区| 久久久久久亚洲综合影院红桃| 香蕉av福利精品导航| 91色|porny| 亚洲国产成人在线| 激情深爱一区二区| 欧美一级日韩免费不卡| 亚洲综合色视频| 99久久国产免费看| 国产精品天干天干在观线| 国内精品写真在线观看| 欧美一区二区观看视频| 亚洲国产一区二区三区| 色婷婷激情久久| 国产精品国产自产拍高清av| 风间由美性色一区二区三区| 精品处破学生在线二十三| 秋霞国产午夜精品免费视频| 欧美精品乱人伦久久久久久| 亚洲精品国产高清久久伦理二区| 91在线高清观看| 国产精品久久久久毛片软件| 豆国产96在线|亚洲| 国产欧美日韩另类视频免费观看| 精品一区二区三区香蕉蜜桃| 日韩三级伦理片妻子的秘密按摩| 日韩一区欧美二区| 日韩视频永久免费| 久久 天天综合| 一级精品视频在线观看宜春院| 99re热视频精品| 国产精品国模大尺度视频| www.亚洲国产| 亚洲免费av高清| 在线一区二区三区四区五区| 亚洲一区日韩精品中文字幕| 91福利在线导航| 午夜av一区二区| 717成人午夜免费福利电影| 日韩福利电影在线观看| 欧美一区二区三区在线观看视频| 免费观看在线综合| 精品区一区二区| 春色校园综合激情亚洲| 国产精品区一区二区三| 色94色欧美sute亚洲线路一久 | 亚洲手机成人高清视频| 色一情一乱一乱一91av| 亚洲一二三专区| 日韩网站在线看片你懂的| 国产美女av一区二区三区| 国产精品欧美一级免费| 在线欧美小视频| 日本不卡在线视频| 久久久不卡网国产精品二区| 99精品视频在线观看| 亚洲欧洲中文日韩久久av乱码| 欧美综合天天夜夜久久| 日韩二区三区在线观看| 久久精品一级爱片| 在线视频一区二区免费| 肉肉av福利一精品导航| 久久精品一区二区三区不卡牛牛| 一本大道久久a久久精二百| 日韩av一区二区在线影视| 久久精品视频网| 91高清视频免费看| 狠狠色伊人亚洲综合成人| 中文字幕一区二区日韩精品绯色| 欧美丝袜第三区| 狠狠色丁香婷综合久久| 综合久久久久久久| 日韩片之四级片| 不卡视频免费播放| 视频在线观看91| 日本一区二区免费在线| 欧美日韩一区二区欧美激情| 激情欧美一区二区| 夜夜精品浪潮av一区二区三区| 日韩欧美一区二区三区在线| 97精品国产露脸对白| 美女网站在线免费欧美精品| 亚洲三级免费电影| 精品av久久707| 欧美亚洲国产怡红院影院| 黄网站免费久久| 亚洲高清不卡在线| 国产精品乱人伦一区二区| 制服.丝袜.亚洲.中文.综合| 处破女av一区二区| 久久精品国产在热久久| 一区二区三区日韩精品视频| 久久久久久一二三区| 欧美久久久影院| av不卡一区二区三区| 九一久久久久久| 香蕉成人啪国产精品视频综合网| 国产精品网友自拍| 久久综合给合久久狠狠狠97色69| 欧美人牲a欧美精品| gogogo免费视频观看亚洲一| 久久精品国产色蜜蜜麻豆| 亚洲免费电影在线| 国产精品久久久久三级| 久久综合色8888| 欧美一区二区三区思思人| 91性感美女视频| 国产精品91xxx| 欧美精品一区二区三区在线播放 | 成人黄页在线观看| 奇米一区二区三区| 亚洲最新视频在线观看| 欧美激情一二三区| 精品99一区二区| 日韩一区二区免费高清| 欧美视频一区二区三区四区| 99精品视频免费在线观看| 粉嫩久久99精品久久久久久夜| 久久精品国产77777蜜臀| 视频一区免费在线观看| 一二三区精品福利视频| 亚洲精品免费在线| 亚洲日本乱码在线观看| 亚洲欧洲另类国产综合| 国产一区二区久久| 麻豆久久一区二区|