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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? tintinfiles.cpp

?? Windows上的MUD客戶(hù)端程序
?? CPP
字號(hào):
/*----------------------------------------------------------------------------
                        _                              _ _       
        /\             | |                            | (_)      
       /  \   _ __   __| |_ __ ___  _ __ ___   ___  __| |_  __ _ 
      / /\ \ | '_ \ / _` | '__/ _ \| '_ ` _ \ / _ \/ _` | |/ _` |
     / ____ \| | | | (_| | | | (_) | | | | | |  __/ (_| | | (_| |
    /_/    \_\_| |_|\__,_|_|  \___/|_| |_| |_|\___|\__,_|_|\__,_|

    The contents of this file are subject to the Andromedia Public
	License Version 1.0 (the "License"); you may not use this file
	except in compliance with the License. You may obtain a copy of
	the License at http://www.andromedia.com/APL/

    Software distributed under the License is distributed on an
	"AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
	implied. See the License for the specific language governing
	rights and limitations under the License.

    The Original Code is Pueblo client code, released November 4, 1998.

    The Initial Developer of the Original Code is Andromedia Incorporated.
	Portions created by Andromedia are Copyright (C) 1998 Andromedia
	Incorporated.  All Rights Reserved.

	Andromedia Incorporated                         415.365.6700
	818 Mission Street - 2nd Floor                  415.365.6701 fax
	San Francisco, CA 94103

    Contributor(s):
	--------------------------------------------------------------------------
	   Chaco team:  Dan Greening, Glenn Crocker, Jim Doubek,
	                Coyote Lussier, Pritham Shetty.

					Wrote and designed original codebase.

------------------------------------------------------------------------------

	TinTin class linked list methods.  Originally modified from TinTin++,
	(T)he K(I)cki(N) (T)ickin D(I)kumud Clie(N)t, originally coded by
	Peter Unold 1992.

----------------------------------------------------------------------------*/

// $Header: /home/cvs/chaco/modules/client/msw/ChText/TinTinFiles.cpp,v 2.1 1996/02/14 01:31:25 coyote Exp $

#include <ChTypes.h>
#include <ChUtil.h>

#include <fstream.h>

#include "TinTin.h"

/*----------------------------------------------------------------------------
	Constants
----------------------------------------------------------------------------*/

#define BUF_SIZE		2048


/*----------------------------------------------------------------------------
	TinTin class
----------------------------------------------------------------------------*/

/*----------------------------------------------------------------------------
	TinTin::DoRead
				Read a file of tintin commands.
----------------------------------------------------------------------------*/

void TinTin::DoRead( const string& strFilename, bool boolOnline )
{
	string		strFilePath( strFilename );
	char		buffer[BUF_SIZE];
	ifstream	file;
	bool		boolFlag = true;
	bool		boolSaveOnline = IsOnline();

											// Set the 'online' state
	if (IsOnline() && !boolOnline)
	{										/* Only turn 'online' in 'off'
												direction */
		m_boolOnline = boolOnline;
	}

	GetArgInBraces( strFilePath, strFilePath, true );

	if (-1 == strFilePath.Find( '\\' ))
	{										/* Get the file from the Pueblo
												directory by default */
		string		strAppDir;

		ChUtil::GetAppDirectory( strAppDir );
		strFilePath = strAppDir + strFilePath;
	}

	file.open( strFilePath, ios::in | ios::nocreate );
	if (!file.is_open())
	{
		if (boolOnline)
		{
			string		strTemp;

			strTemp.Format( "# Error - The file '%s' couldn't be opened.",
							(const char*)strFilePath );
			Display( strTemp );
		}
	}
	else
	{
		m_iAliasCounter = 0;
		m_iActionCounter = 0;
		m_iSubCounter = 0;
		m_iAntiSubCounter = 0;
		m_iVarCounter = 0;
		m_iHighlightCounter = 0;

		do {
			file.getline( buffer, BUF_SIZE );
			ParseInput( buffer );

		} while (!file.eof());

		if (boolOnline)
		{
			string		strTemp;

			if (m_iAliasCounter)
			{
				strTemp.Format( "# OK.  %d aliases loaded.", m_iAliasCounter );
				Display( strTemp );
			}

			if (m_iActionCounter)
			{
				strTemp.Format( "# OK.  %d actions loaded.",
									m_iActionCounter );
				Display( strTemp );
			}

			if (m_iAntiSubCounter)
			{
				strTemp.Format( "# OK.  %d antisubs loaded.",
									m_iAntiSubCounter );
				Display( strTemp );
			}

			if (m_iSubCounter)
			{
				strTemp.Format( "# OK.  %d substitutes loaded.",
									m_iSubCounter );
				Display( strTemp );
			}

			if (m_iVarCounter)
			{
				strTemp.Format( "# OK.  %d variables loaded.", m_iVarCounter );
				Display( strTemp );
			}

			if (m_iHighlightCounter)
			{
				strTemp.Format( "# OK.  %d highlights loaded.",
									m_iHighlightCounter );
				Display( strTemp );
			}
		}

		file.close();
	}
											// Reset the 'online' state
	m_boolOnline = boolSaveOnline;
}


#if 0

/* Autoconf patching by David Hedbor, neotron@lysator.liu.se */
/*********************************************************************/
/* file: files.c - funtions for logfile and reading/writing comfiles */
/*                             TINTIN + +                            */
/*          (T)he K(I)cki(N) (T)ickin D(I)kumud Clie(N)t             */
/*                     coded by peter unold 1992                     */
/*                    New code by Bill Reiss 1993                    */
/*********************************************************************/
#ifdef HAVE_STRING_H
#include <string.h>
#else
#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif
#endif
#include "tintin.h"

struct listnode *common_aliases, *common_actions, *common_subs,
                *common_myvars, *common_highs, *common_antisubs, 
		*common_pathdirs;
struct completenode *complete_head;
void prepare_for_write();

extern struct session *parse_input();

extern int puts_echoing;
extern int alnum,acnum,subnum,hinum,varnum,antisubnum;
extern int verbose;
extern char tintin_char;
/**********************************/
/* load a completion file         */
/**********************************/
void read_complete()
{
  FILE *myfile;
  char buffer[BUFFER_SIZE], *cptr;
  char message[80];
  int flag;
  struct completenode *tcomplete, *tcomp2;
  flag=TRUE;
  if ((complete_head=(struct completenode *)(malloc(sizeof(struct completenode))))==NULL) {
    fprintf(stderr, "couldn't alloc completehead\n");
    exit(1);
  }
  tcomplete=complete_head;

  if((myfile=fopen("tab.txt", "r"))==NULL) {
    if((cptr=(char *) getenv("HOME"))) {
      strcpy(buffer,cptr);
      strcat(buffer,"/.tab.txt");
      myfile=fopen(buffer, "r");
    }
  }
  if(myfile==NULL) {
    tintin_puts("no tab.txt file, no completion list\n", (struct session *)NULL);
    return;
  }

  while(fgets(buffer, sizeof(buffer), myfile)) {
    for(cptr=buffer; *cptr && *cptr!='\n'; cptr++);
    *cptr='\0';
    if ((tcomp2=(struct completenode *)(malloc(sizeof(struct completenode))))==NULL) {
      fprintf(stderr, "couldn't alloc comletehead\n");
      exit(1);
    }
    
    if ((cptr=(char *)(malloc(strlen(buffer)+1)))==NULL) {
      fprintf(stderr, "couldn't alloc memory for string in complete\n");
      exit(1);
    }
    strcpy(cptr, buffer);
    tcomp2->strng=cptr;
    tcomplete->next=tcomp2;      
    tcomplete=tcomp2;
  }
  tcomplete->next=NULL;
  fclose(myfile);
  tintin_puts("tab.txt file loaded.\n", (struct session *)NULL);
  prompt(NULL);
  tintin_puts("\n", (struct session *)NULL);
  
}

  
/********************/
/* the #log command */
/********************/
void log_command(arg, ses)
     char *arg;
     struct session *ses;
{
  if(ses) {
    if(!ses->logfile) {
      if(*arg) { 
        if((ses->logfile=fopen(arg, "w")))
          tintin_puts("#OK. LOGGING.....", ses);
        else
         tintin_puts("#COULDN'T OPEN FILE.", ses);
      }
      else
        tintin_puts("#SPECIFY A FILENAME.", ses);
    }
    else {
      fclose(ses->logfile);
      ses->logfile=NULL;
      tintin_puts("#OK. LOGGING TURNED OFF.", ses);
    }
  }
  else
   tintin_puts("#THERE'S NO SESSION TO LOG.", ses);
  prompt(NULL);
}


/************************/
/* write a command file */
/************************/
struct session *write_command(filename, ses)
     char *filename;
     struct session *ses;
{
  FILE *myfile;
  char buffer[BUFFER_SIZE];
  struct listnode *nodeptr;
  get_arg_in_braces(filename,filename, 1);
  if (*filename=='\0') {
    tintin_puts("#ERROR - COULDN'T OPEN THAT FILE.", ses);
    prompt(NULL);
    return(0); /* added zero return */
  }    
  if((myfile=fopen(filename, "w"))==NULL) {
    tintin_puts("#ERROR - COULDN'T OPEN THAT FILE.", ses);
    prompt(NULL);
    return(0); /* added zero return */
  }

  nodeptr=(ses) ? ses->aliases : common_aliases;
  while((nodeptr=nodeptr->next)) {
    prepare_for_write("alias", nodeptr->left, nodeptr->right, "\0", buffer);
    fputs(buffer, myfile);
  }

  nodeptr=(ses) ? ses->actions : common_actions;
  while((nodeptr=nodeptr->next)) {
    prepare_for_write("action", nodeptr->left, nodeptr->right, nodeptr->pr,
    buffer);
    fputs(buffer, myfile);
  }

  nodeptr=(ses) ? ses->antisubs : common_antisubs;
  while((nodeptr=nodeptr->next)) {
    prepare_for_write("antisubstitute", nodeptr->left,
    nodeptr->right, "\0", buffer);
    fputs(buffer, myfile);
  } 
  
  nodeptr=(ses) ? ses->subs : common_subs;
  while((nodeptr=nodeptr->next)) {
    prepare_for_write("substitute", nodeptr->left, nodeptr->right, "\0", buffer);
    fputs(buffer, myfile);
  }

  nodeptr=(ses) ? ses->myvars : common_myvars;
  while((nodeptr=nodeptr->next)) {
    prepare_for_write("variable", nodeptr->left, nodeptr->right, "\0", buffer);
    fputs(buffer, myfile);
  }
  nodeptr=(ses) ? ses->highs : common_highs;
  while((nodeptr=nodeptr->next)) {
    prepare_for_write("highlight", nodeptr->right, nodeptr->left, "\0", buffer);
    fputs(buffer, myfile);
  }
  nodeptr=(ses) ? ses->pathdirs : common_pathdirs;
  while((nodeptr=nodeptr->next)) {
    prepare_for_write("pathdir", nodeptr->right, nodeptr->left, "\0", buffer);
    fputs(buffer, myfile);
  }
  fclose(myfile);
  tintin_puts("#COMMANDO-FILE WRITTEN.", ses);
  return ses;
}

/************************/
/* write a command file */
/************************/
struct session *writesession_command(filename, ses)
     char *filename;
     struct session *ses;
{
  FILE *myfile;
  char buffer[BUFFER_SIZE], fn[BUFFER_SIZE];
  struct listnode *nodeptr;
  get_arg_in_braces(filename,filename,1);
  if(*filename=='\0') {
    tintin_puts("#ERROR - COULDN'T OPEN THAT FILE.", ses);
    prompt(NULL);
    return(0); /* added zero return */
  }
  if((myfile=fopen(filename, "w"))==NULL) {
    tintin_puts("#ERROR - COULDN'T OPEN THAT FILE.", ses);
    prompt(NULL);
    return(0); /* added zero return */
  }

  nodeptr=(ses) ? ses->aliases : common_aliases;
  while((nodeptr=nodeptr->next)) {
    if(ses && searchnode_list(common_aliases, nodeptr->left))
      continue;
    prepare_for_write("alias", nodeptr->left, nodeptr->right, "\0", buffer);
    fputs(buffer, myfile);
  }

  nodeptr=(ses) ? ses->actions : common_actions;
  while((nodeptr=nodeptr->next)) {
    if(ses && searchnode_list(common_actions, nodeptr->left))
      continue;
    prepare_for_write("action", nodeptr->left, nodeptr->right, nodeptr->pr,
    buffer);
    fputs(buffer, myfile);
  }
  
  nodeptr=(ses) ? ses->antisubs : common_antisubs;
  while((nodeptr=nodeptr->next)) {
    if(ses && searchnode_list(common_antisubs, nodeptr->left))
      continue;
    prepare_for_write("antisubstitute", nodeptr->left, "", "\0", buffer);
    fputs(buffer,myfile);
  }
  
  nodeptr=(ses) ? ses->subs : common_subs;
  while((nodeptr=nodeptr->next)) {
    if(ses && searchnode_list(common_subs, nodeptr->left))
      continue;
    prepare_for_write("substitute", nodeptr->left, nodeptr->right, "\0", buffer);
    fputs(buffer, myfile);
  }

  nodeptr=(ses) ? ses->myvars : common_myvars;
  while((nodeptr=nodeptr->next)) {
    if(ses && searchnode_list(common_myvars, nodeptr->left))
      continue;
    prepare_for_write("variable", nodeptr->left, nodeptr->right, "\0", buffer);
    fputs(buffer, myfile);
  }

  nodeptr=(ses) ? ses->highs : common_highs;
  while((nodeptr=nodeptr->next)) {
    if(ses && searchnode_list(common_highs, nodeptr->left))
      continue;
    prepare_for_write("highlight", nodeptr->right, nodeptr->left, "\0", buffer);
    fputs(buffer, myfile);
  }

  fclose(myfile);
  tintin_puts("#COMMANDO-FILE WRITTEN.", ses);
  return ses;
}


void prepare_for_write(command, left, right, pr, result)
     char *command;
     char *left;
     char *right;
     char *pr;
     char *result;
{
  /* char tmpbuf[BUFFER_SIZE]; */
  *result=tintin_char;
  *(result+1)='\0';
  strcat(result, command);
  strcat(result, " {");
  strcat(result, left);
  strcat(result, "}");
  if (strlen(right)!=0) {
    strcat(result, " {");
    strcat(result, right);
    strcat(result, "}");
  }
  if (strlen(pr)!=0) {
    strcat(result, " {");
    strcat(result, pr);
    strcat(result, "}");
  }
  strcat(result,"\n");
}

void prepare_quotes(string)
     char *string;
{
  char s[BUFFER_SIZE], *cpsource, *cpdest;
  int nest=FALSE;
  strcpy(s, string);

  cpsource=s;
  cpdest=string;

 while(*cpsource) {
    if(*cpsource=='\\') {
      *cpdest++=*cpsource++;
      if(*cpsource)
        *cpdest++=*cpsource++;
    }
    else if(*cpsource=='\"' && nest==FALSE) {
      *cpdest++='\\';
      *cpdest++=*cpsource++;
    }
    else if(*cpsource=='{') {
      nest=TRUE;
      *cpdest++=*cpsource++;
    }
    else if(*cpsource=='}') {
      nest=FALSE;
      *cpdest++=*cpsource++;
    }
    else
      *cpdest++=*cpsource++; 
  }
  *cpdest='\0';
}


#endif

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人永久免费视频| 91偷拍与自偷拍精品| 日韩理论片一区二区| 欧美精品久久天天躁| 国产高清一区日本| 日韩黄色一级片| 亚洲欧美自拍偷拍色图| 精品国产1区2区3区| 欧美色图片你懂的| av一区二区三区在线| 国产自产高清不卡| 免费欧美在线视频| 日本免费新一区视频| 亚洲午夜羞羞片| 中文字幕亚洲综合久久菠萝蜜| 日韩欧美综合在线| 91精品国产色综合久久不卡电影 | 国产精品色哟哟网站| 欧美v国产在线一区二区三区| 欧美日韩免费高清一区色橹橹| 91丝袜高跟美女视频| 岛国一区二区在线观看| 成人一区在线观看| av中文字幕在线不卡| 99久久久无码国产精品| 不卡视频免费播放| av在线不卡免费看| 日本精品免费观看高清观看| 色999日韩国产欧美一区二区| 91麻豆国产福利精品| 欧美在线视频日韩| 91精选在线观看| 日韩精品一区二区三区swag | 精品第一国产综合精品aⅴ| 久久综合九色综合欧美亚洲| 国产午夜精品在线观看| 最新久久zyz资源站| 亚洲一二三专区| 看国产成人h片视频| 国产激情视频一区二区在线观看| 成人av免费在线播放| 欧美最新大片在线看| 精品区一区二区| 亚洲同性gay激情无套| 日本麻豆一区二区三区视频| 国产精一区二区三区| 在线观看免费视频综合| 日韩欧美视频在线| 亚洲欧美电影一区二区| 日韩不卡一区二区| 97久久人人超碰| 久久久国产综合精品女国产盗摄| 亚洲视频在线一区| 国产在线视视频有精品| 欧洲另类一二三四区| 久久久久综合网| 日本美女视频一区二区| 一本一道综合狠狠老| 久久精品人人做人人综合 | 欧美在线观看视频一区二区| 久久久久久免费毛片精品| 五月激情丁香一区二区三区| proumb性欧美在线观看| 精品欧美一区二区久久 | 麻豆国产欧美日韩综合精品二区| 91尤物视频在线观看| 久久久一区二区三区捆绑**| 免费久久精品视频| 这里只有精品视频在线观看| 亚洲妇熟xx妇色黄| 欧美剧在线免费观看网站| 亚洲精品国产品国语在线app| 国产高清不卡一区二区| 国产亚洲欧洲997久久综合| 九九视频精品免费| 337p粉嫩大胆噜噜噜噜噜91av| 免费人成黄页网站在线一区二区| 成人av资源站| 国产精品久久久久桃色tv| 国产精品一区二区三区99| 久久久精品人体av艺术| 国产精品一级二级三级| 国产精品丝袜一区| 色哟哟日韩精品| 日本中文一区二区三区| 欧美电视剧免费全集观看| 久久99国产乱子伦精品免费| 日韩欧美亚洲一区二区| 国产成人综合视频| 亚洲人成在线播放网站岛国| 在线精品视频一区二区三四| 日韩在线卡一卡二| 久久久久国产一区二区三区四区| 成人精品国产免费网站| 亚洲男人的天堂av| 日韩欧美黄色影院| 91老师片黄在线观看| 免费久久99精品国产| 中文字幕一区二区三区在线播放 | 夜夜亚洲天天久久| 日韩视频免费观看高清完整版在线观看| 久久精品国产亚洲aⅴ| 国产精品伦理在线| 精品99久久久久久| 欧美在线制服丝袜| 不卡的av电影| 韩国欧美一区二区| 性做久久久久久久久| 欧美激情在线观看视频免费| 在线电影国产精品| 色婷婷av一区二区三区软件| 国产制服丝袜一区| 麻豆精品在线观看| 亚洲成av人片www| 亚洲乱码国产乱码精品精可以看| 亚洲一区影音先锋| 久久久亚洲综合| 精品欧美乱码久久久久久1区2区 | 欧美日韩一二三区| 91老司机福利 在线| 91亚洲精品一区二区乱码| 国产成人一区二区精品非洲| 狠狠色伊人亚洲综合成人| 日韩不卡免费视频| 蜜臀av性久久久久蜜臀aⅴ| 亚洲va国产va欧美va观看| 亚洲激情自拍视频| 一区二区三区四区亚洲| 亚洲人妖av一区二区| 中文字幕欧美一| 亚洲国产精品自拍| 日本成人在线不卡视频| 久久99国产精品久久99| 国产精品系列在线播放| 成人精品国产一区二区4080| 国产99久久久久久免费看农村| 国产成人精品免费视频网站| 国产成人综合精品三级| 91福利视频在线| 日韩写真欧美这视频| 久久久久国色av免费看影院| 国产另类ts人妖一区二区| 国产成人精品亚洲日本在线桃色 | 欧美国产欧美亚州国产日韩mv天天看完整| 国产人久久人人人人爽| 亚洲精品国产一区二区精华液| 日韩精品高清不卡| 国产精品一区二区免费不卡 | 国产日韩欧美一区二区三区综合| 日韩毛片视频在线看| 麻豆成人久久精品二区三区红 | 国产精品天天看| 天堂久久一区二区三区| av不卡在线观看| 天天色天天操综合| 成人综合婷婷国产精品久久免费| 色天天综合色天天久久| 精品国产乱码久久久久久免费| 亚洲欧美一区二区三区国产精品| 激情综合一区二区三区| 在线亚洲一区二区| 欧美激情一二三区| 狠狠色2019综合网| 欧美精三区欧美精三区| 亚洲精品日产精品乱码不卡| 国产专区欧美精品| 欧美人动与zoxxxx乱| 亚洲精品国产成人久久av盗摄| 国产精品系列在线观看| 日韩午夜激情电影| 日韩激情视频在线观看| 欧美日本一区二区| 亚洲欧美日韩一区二区三区在线观看 | 亚洲视频电影在线| 成人av免费网站| 亚洲人精品午夜| 91在线视频免费91| 亚洲男人的天堂网| 在线观看一区日韩| 亚洲国产一区视频| 欧美日韩第一区日日骚| 91国偷自产一区二区三区成为亚洲经典 | 欧美高清在线一区二区| 丰满放荡岳乱妇91ww| 国产精品无遮挡| 91麻豆精品在线观看| 一区二区三区四区不卡视频| 欧美日韩一区二区三区四区五区 | 成熟亚洲日本毛茸茸凸凹| 中文字幕第一页久久| 日本乱人伦一区| 日韩av网站在线观看| 精品国产一区二区三区久久影院| 国产乱码精品一区二区三区忘忧草| 久久久夜色精品亚洲| 日本乱人伦aⅴ精品| 久久 天天综合| 亚洲美腿欧美偷拍| 日韩欧美国产电影| 91色综合久久久久婷婷|