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

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

?? files.c

?? Linux下的MUD客戶端程序
?? C
字號:
/* 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_functions, *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,funcnum,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);}/***********************************//* read and execute a command file *//***********************************/struct session *read_command(filename, ses)     char *filename;     struct session *ses;{  FILE *myfile;  /* DECLARATION OF VARIABLES CHANGED TO ALLOW EXTENDED READING OF FILES */  char buffer[BUFFER_SIZE], *b;  char command[BUFFER_SIZE], *cptr;  char *p;  char lastch=' ';  char message[80];  int flag;  flag=TRUE;  get_arg_in_braces(filename,filename, 1);  if((myfile=fopen(filename, "r"))==NULL) {    tintin_puts("#ERROR - COULDN'T OPEN THAT FILE.", ses);    prompt(NULL);    return ses;  }  if (!verbose) puts_echoing=FALSE;  alnum=0;  funcnum=0;  acnum=0;  subnum=0;  varnum=0;  hinum=0;  antisubnum=0;/* ADDED FOR EXTENDED READING */  cptr=command;/* */  while(fgets(buffer, sizeof(buffer), myfile)) {    if (flag) {      puts_echoing=TRUE;      char_command(buffer, ses);      if (!verbose) puts_echoing=FALSE;      flag=FALSE;    }/* START EXTENDED READ CODE *//*Allow linebreaks in command files:If last non-whitespace character on a line is '\' thenthe command is continued from the first non-whitespacecharacter on the next line. A leading '/' character willignored, but the line will be read from thereon. Blank lines are also ignored.  -- SN*/    /*printf("Buffer: '%s'",buffer);/**/    /* skip leading whitespace on a line */    b=buffer;    while (isspace(*b)) b++;    if ((*b=='/') && (lastch=='\\')) b++;         /* remove trailing whitespace and find lastch */    p=buffer+strlen(buffer);      while ((isspace(*p) || (*p=='\0')) && (p!=buffer)) p--;    if ((lastch=*p)!='\\') p++;    *p='\0';    if (lastch=='\n') lastch='\\';    /*printf("Last ch: '%c'\n",lastch);/**/    strcpy(cptr,b); cptr+=strlen(b);    if (lastch!='\\') {      /*printf("Command: '%s'\n\n", command);/**/      ses = parse_input(command, ses);      cptr=command;    } /* Comment out the following line if you don't want a ' ' inserted at linebreaks *//*      else *cptr++=' '; /**/  }/* END OF EXTENDED READ CODE */  if (!verbose) {    puts_echoing=TRUE;    sprintf(message,"#OK. %d ALIASES LOADED.",alnum);    tintin_puts2(message,ses);    sprintf(message,"#OK. %d FUNCTIONS LOADED.",funcnum);    tintin_puts2(message,ses);    sprintf(message,"#OK. %d ACTIONS LOADED.",acnum);    tintin_puts2(message,ses);    sprintf(message,"#OK. %d ANTISUBS LOADED.",antisubnum);    tintin_puts2(message,ses);    sprintf(message,"#OK. %d SUBSTITUTES LOADED.",subnum);    tintin_puts2(message,ses);    sprintf(message,"#OK. %d VARIABLES LOADED.",varnum);    tintin_puts2(message,ses);    sprintf(message,"#OK. %d HIGHLIGHTS LOADED.",hinum);    tintin_puts2(message,ses);  }  fclose(myfile);  prompt(NULL);  return ses;}/************************//* 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->myfuncs : common_functions;  while((nodeptr=nodeptr->next)) {    prepare_for_write("function", 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->myfuncs : common_functions;  while((nodeptr=nodeptr->next)) {    if(ses && searchnode_list(common_functions, nodeptr->left))      continue;    prepare_for_write("function", 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';}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久久久99精品| 偷窥少妇高潮呻吟av久久免费| 国产精品久久看| 亚洲国产欧美一区二区三区丁香婷| 麻豆久久久久久久| 色婷婷av一区| 久久久影视传媒| 石原莉奈在线亚洲二区| 成人中文字幕在线| 日韩丝袜美女视频| 亚洲男同性视频| 国产精品77777| 在线播放91灌醉迷j高跟美女| 欧美激情一区二区三区蜜桃视频| 午夜成人免费电影| 91蜜桃婷婷狠狠久久综合9色| 欧美va天堂va视频va在线| 亚洲影视在线播放| 成人黄页在线观看| 亚洲精品一区二区在线观看| 亚洲大片一区二区三区| 99在线精品免费| 国产日产欧美精品一区二区三区| 日韩av二区在线播放| 欧美自拍偷拍一区| 亚洲欧美日本在线| 成人午夜电影网站| 国产午夜精品久久久久久免费视 | 欧美tickle裸体挠脚心vk| 一区二区在线电影| 色综合天天综合给合国产| 国产精品丝袜黑色高跟| 国产精品456露脸| 2欧美一区二区三区在线观看视频 337p粉嫩大胆噜噜噜噜噜91av | 亚洲免费观看高清在线观看| 成人午夜电影小说| 欧美国产乱子伦| 成人性生交大片免费看在线播放 | 成人avav影音| 国产精品人妖ts系列视频| 国产成人综合在线播放| 国产欧美日韩三区| 国产成a人亚洲| 国产欧美日韩综合精品一区二区| 国产九九视频一区二区三区| 精品欧美久久久| 国产精品18久久久久| 国产目拍亚洲精品99久久精品| 国产乱子伦视频一区二区三区| 久久久久久影视| 成人av免费在线| 亚洲精品视频自拍| 欧美片网站yy| 美女一区二区在线观看| 久久丝袜美腿综合| 成人免费高清在线| 中文字幕一区二区在线播放| 日本二三区不卡| 天天色综合天天| 精品久久一二三区| 成人免费观看av| 一区二区三区.www| 欧美一区二区三区日韩视频| 国产真实乱偷精品视频免| 中文字幕乱码亚洲精品一区| 91麻豆文化传媒在线观看| 亚洲一区欧美一区| 日韩女优制服丝袜电影| 丁香一区二区三区| 亚洲一区二区三区视频在线播放| 日韩一级二级三级| 成人免费的视频| 天堂久久久久va久久久久| 久久久噜噜噜久久人人看| 色偷偷一区二区三区| 久久精品久久精品| 中文字幕字幕中文在线中不卡视频| 欧美日韩一区高清| 国产精品影视在线| 午夜精品久久久| 国产精品大尺度| 91精品午夜视频| 97久久精品人人做人人爽| 日本三级亚洲精品| 亚洲欧洲三级电影| 日韩精品一区二区三区蜜臀 | 在线不卡a资源高清| 成人综合婷婷国产精品久久免费| 亚洲h精品动漫在线观看| 国产午夜亚洲精品理论片色戒| 91黄视频在线观看| 国产精一品亚洲二区在线视频| 亚洲无人区一区| 国产精品三级视频| 欧美不卡一区二区三区| 欧美色成人综合| 99久久伊人久久99| 国产在线精品一区二区夜色| 亚洲国产欧美日韩另类综合| 国产日韩精品一区二区浪潮av | 中文字幕高清一区| 日韩免费性生活视频播放| 欧美在线观看18| 成人动漫一区二区| 国产一区二区三区在线观看免费视频| 亚洲6080在线| 亚洲狠狠丁香婷婷综合久久久| 久久九九全国免费| 日韩精品中文字幕一区| 欧美区一区二区三区| 日本精品免费观看高清观看| 成人理论电影网| 国产成人精品亚洲777人妖| 蓝色福利精品导航| 秋霞午夜鲁丝一区二区老狼| 亚洲一区二区三区四区五区黄 | 一本色道综合亚洲| 不卡视频在线观看| 国产成人aaa| 成人国产一区二区三区精品| 国产成人鲁色资源国产91色综| 国产米奇在线777精品观看| 久久国产乱子精品免费女| 美女高潮久久久| 精品一区二区三区免费播放| 精品夜夜嗨av一区二区三区| 精品制服美女久久| 韩国v欧美v亚洲v日本v| 国产乱码精品1区2区3区| 国精产品一区一区三区mba桃花| 黄一区二区三区| 国产很黄免费观看久久| 成人小视频免费观看| 成人午夜精品一区二区三区| 91免费国产在线| 欧美三级电影网站| 日韩一区二区在线播放| 欧美成人精品3d动漫h| 国产午夜精品一区二区三区视频 | 日韩一区二区视频| 精品国产乱码久久久久久久| 久久久久国产免费免费| 国产精品久久久久国产精品日日| 自拍偷拍国产精品| 同产精品九九九| 韩国一区二区视频| 99免费精品在线| 精品视频一区三区九区| 欧美哺乳videos| 亚洲欧洲精品一区二区三区| 亚洲精选视频免费看| 日韩成人午夜精品| 国产成人av福利| 欧美亚洲国产一区二区三区va| 欧美高清性hdvideosex| 国产视频911| 夜夜嗨av一区二区三区网页| 美女久久久精品| 97精品国产露脸对白| 欧美一区二区三区在线视频| 国产视频亚洲色图| 午夜av一区二区| 国产精品99精品久久免费| 色av成人天堂桃色av| 欧美电视剧免费观看| 1000部国产精品成人观看| 蜜臀av一区二区在线观看 | 看国产成人h片视频| 国产成人综合在线| 欧美高清视频一二三区 | 成人欧美一区二区三区1314| 亚洲高清视频中文字幕| 丁香六月久久综合狠狠色| 欧美精品色一区二区三区| 中文字幕久久午夜不卡| 蜜桃在线一区二区三区| 色偷偷一区二区三区| 欧美激情在线观看视频免费| 日日摸夜夜添夜夜添国产精品| 99久久精品免费观看| 久久夜色精品一区| 日韩不卡一二三区| 91久久精品一区二区三区| 中文av一区特黄| 国产综合久久久久久久久久久久| 欧美日韩在线观看一区二区| 亚洲欧洲精品一区二区精品久久久| 黄色成人免费在线| 日韩欧美激情一区| 肉肉av福利一精品导航| 欧美在线999| 亚洲精品国产第一综合99久久| 国产福利电影一区二区三区| 欧美成人高清电影在线| 手机精品视频在线观看| 一本大道综合伊人精品热热| 国产精品国产三级国产有无不卡| 国产成人在线网站| 久久久久国产一区二区三区四区 | 亚洲国产aⅴ成人精品无吗|