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

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

?? readline.c

?? 微軟的基于HMM的人臉識(shí)別原代碼, 非常經(jīng)典的說(shuō)
?? C
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
/* GNUPLOT - readline.c */
/*
 * Copyright (C) 1986 - 1993   Thomas Williams, Colin Kelley
 *
 * Permission to use, copy, and distribute this software and its
 * documentation for any purpose with or without fee is hereby granted, 
 * provided that the above copyright notice appear in all copies and 
 * that both that copyright notice and this permission notice appear 
 * in supporting documentation.
 *
 * Permission to modify the software is granted, but not the right to
 * distribute the modified code.  Modifications are to be distributed 
 * as patches to released version.
 *  
 * This software is provided "as is" without express or implied warranty.
 * 
 *
 * AUTHORS
 *
 *   Original Software:
 *     Tom Tkacik
 *
 * HISTORY:
 *   Enhancements:
 *     Gershon Elber and many others.
 *
 *   Ed Breen (Jun 10 08:11:14 EST 1996)
 *     Stripped down: EiC port.
 *     Added standalone capability -- for testing and experimenting:
 *        To make the stand alone version of readline:
 *            gcc -D_STANDALONE -Wall -o readline readline.c
 *     Added a limiter to the history recording mechanism:
 *        The default limit means that only the last 500 lines 
 *        can be recalled. This can be set via the macro _HistLimit.
 *        Note, by setting _HistLimit to 0, effectively turns  off the
 *        limiter; that is,
 *          gcc -D_STANDALONE -D_HistLimit=0 -Wall -o readline readline.c
 *     Added tab recognition -- no, not file completion.
 *     Added show_history.
 *            void EiC_show_history(FILE *fp)
 *               outputs the history list to stream fp.
 *            last_history.
 *              returns a pointer to the last entered string in the history
 *              list. Will return NULL if no entry exists.
 *              Do not attempt to free this space, it is under control
 *              of history.
 *     Added bracket balancing routine:
 *              void backupTo(char to, char from);
 *     Optimized for speedy cursor movements:     
 *     Tested under:
 *        ultrix, solaris, dec alpha, sunos, linux, irix-5.3, irix-6.x. 
 *   Ed Breen (July 17 1999)
 *       Added win95, win98, NT win32 support
 *   Ed Breen (July 16 2000)
 *       Added DJGPP support
 */

/* a small version of GNU's readline */
/* this is not the BASH or GNU EMACS version of READLINE due to Copyleft 
	restrictions */
/* do not need any terminal capabilities except , */


/* NANO-EMACS line editing facility */
/* printable characters print as themselves (insert not overwrite) */
/* ^A moves to the beginning of the line */
/* ^B moves back a single character */
/* ^E moves to the end of the line */
/* ^F moves forward a single character */
/* ^K kills from current position to the end of line */
/* ^P moves back through history */
/* ^N moves forward through history */
/* ^H and DEL delete the previous character */
/* ^D deletes the current character, or EOF if line is empty */
/* ^L/^R redraw line in case it gets trashed */
/* ^U kills the entire line */
/* ^W kills last word */
/* LF and CR return the entire line regardless of the cursor postition */
/* EOF  with an empty line returns (char *)NULL */

/* all other characters are ignored */

#ifndef NO_READLINE

/*#define _POSIX_SOURCE*/
  #include <stdio.h>
  #include <stdlib.h>
  #include <string.h>
  #include <ctype.h>
  #include <signal.h>
  #include <time.h>

#if defined(WIN32) 

#include <conio.h>
#include <io.h>

# define special_getc() msdos_getch()
static char msdos_getch();

#else

#include <unistd.h> 
#include <termios.h>

#define special_getc() ansi_getc()
static int ansi_getc();

/* watch out for SV4 and BSD+4.3 stuff */
#ifndef  VREPRINT
#define  VREPRINT 18
#endif
#ifndef VWERASE
#define VWERASE 23
#endif
#ifndef SIGTSTP
#define SIGTSTP 26
#endif

#endif

#ifndef CLOCKS_PER_SEC
#define CLOCKS_PER_SEC 1000000
#endif


/* stubbs added by Ed Breen */
#define ralloc(x,y,z) realloc(x,y)
#define alloc(x,y)    malloc(x)
#define int_error(text,code)  {fprintf(stderr,"Fatal error..\n");\
				   fprintf(stderr,"%s\n",text);\
				   fprintf(stderr,"...now exiting to system ...\n");\
				   exit(1);}

#if !defined(WIN32)

static struct termios orig_termio, rl_termio;

/* ULTRIX defines VRPRNT instead of VREPRINT */
#if defined(VRPRNT) && !defined(VREPRINT)
#define VREPRINT VRPRNT
#endif

/* define characters to use with our input character handler */
static char term_chars[NCCS];

static int term_set = 0;	/* =1 if rl_termio set */

#endif


#define MAXBUF	512	/* initial size and increment of input line length */
#define BACKSPACE 0x08	/* ^H */
#define SPACE	' '
#define NEWLINE	'\n'
#define BELL    '\a'
#define TABSTOPS 4       /* number of spaces per tab stop */

struct hist {
	char *line;
	struct hist *prev;
	struct hist *next;
};

static struct hist *history = NULL;      /* no history yet */
static struct hist *EndHist = NULL;      /* end of history list */
static struct hist *cur_entry = NULL;


static char *cur_line;  /* current contents of the line */
static int line_len=0;
static int cur_pos = 0;	/* current position of the cursor */
static int max_pos = 0;	/* maximum character position */
static int HistLineNo = 0;  /* Current Line Number in history list */

static void fix_line  (void)  ;
static void redraw_line  (char *prompt)  ;
static void clear_line  (char *prompt)  ;
static void clear_eoline  (void)  ;
static void copy_line  (char *line)  ;
static void set_termio  (void)  ;
static void reset_termio  (void)  ;
static int ansi_getc  (void)  ;
static void  user_putc  (char ch)  ;
static int user_putsn(char *str, int n)  ;

static void extend_cur_line  (void)  ;
static void backupTo(char to, char from);
static char _BS = BACKSPACE;

#if  defined(WIN32)
#define backspace() _putch(BACKSPACE)
#else
#define backspace()   write(STDIN_FILENO,&_BS,1)
#endif

#define user_puts(x)  user_putsn(x,strlen(x))


void delay(clock_t d)
{
    clock_t et = clock() + d;
    while(et> clock());
}

static void user_putc(char ch)
{
#if defined(WIN32)
	_putch(ch);
#else	
   write(STDIN_FILENO,&ch,1);
#endif

}

static int user_putsn(char *str, int n)
{
	int rv;
#if defined(WIN32)
	for(rv=0;rv<n;rv++)
	    _putch(*str++);
#else
	rv = write(STDIN_FILENO,str,n);
#endif
	return rv;
}

static void extend_cur_line()
{
  char *new_line;

  /* extent input line length */
  new_line=ralloc(cur_line, line_len+MAXBUF, NULL);
  if(!new_line) {
    reset_termio();
    int_error("Can't extend readline length", NO_CARET);
  }
  cur_line=new_line;
  line_len+=MAXBUF;

}

unsigned char * EiC_readline(char *prompt)
{
    
    /* start with a string of MAXBUF chars */
    char * editLine(char *);
    if(line_len!=0) {
		free(cur_line);
		line_len=0;
    }
    
    cur_line=alloc((unsigned long)MAXBUF, "readline");
    line_len=MAXBUF;
    
    /* set the termio so we can do our own input processing */
    set_termio();
    
    /* print the prompt */

    user_puts(prompt);
    cur_line[0] = '\0';
    cur_pos = 0;
    max_pos = 0;
    cur_entry = NULL;
    return editLine(prompt);
}


char * editLine(char *prompt)
{
    /* The line to be edited is stored in cur_line.*/
    /* get characters */
    int cur_char;
    
    for(;;) {
	cur_char = special_getc();
	
	if(isprint(cur_char) || (((unsigned char)cur_char > 0x7f) &&
				 cur_char != EOF) || cur_char == '\t') {
	    int i,inc = 1;
	    if(cur_char == '\t') {
		inc = TABSTOPS;
		cur_char = ' ';
	    }
	    

	    if(max_pos+inc>=line_len) 
		extend_cur_line();

	    for(i=max_pos+inc-1; i-inc>=cur_pos; i--) {
		    cur_line[i] = cur_line[i-inc];
		}
	    max_pos += inc;
	    while(inc--) {
		user_putc(cur_char);
		cur_line[cur_pos++] = cur_char;
	    }
	    if (cur_pos < max_pos)
		fix_line();
	    cur_line[max_pos] = '\0';
	    switch(cur_char) {
	      case ')':backupTo('(',')');break;
	      case ']':backupTo('[',']');break;
	    }
#if defined(VERASE) 
	} else if(cur_char == term_chars[VERASE] ){ /* DEL? */
	    if(cur_pos > 0) {
		int i;
		cur_pos -= 1;
		backspace();
		for(i=cur_pos; i<max_pos; i++)
		    cur_line[i] = cur_line[i+1];
		max_pos -= 1;
		fix_line();
	    }
	} else if(cur_char == term_chars[VEOF] ){ /* ^D? */
	    if(max_pos == 0) {
		copy_line("to exit EiC, enter  :exit\n");
		user_putc(BELL);

		reset_termio();		
		return((char*)NULL);
	    }
	    if((cur_pos < max_pos)&&(cur_char == 004)) { /* ^D */
		int i;
		for(i=cur_pos; i<max_pos; i++)
		    cur_line[i] = cur_line[i+1];
		max_pos -= 1;
		fix_line();
	    }

	} else if(cur_char == term_chars[VKILL] ){ /* ^U? */
	    clear_line(prompt);

	} else if(cur_char == term_chars[VWERASE] ){ /* ^W? */
	    while((cur_pos > 0) &&
		  (cur_line[cur_pos-1] == SPACE)) {
		cur_pos -= 1;
		backspace();
	    }
	    while((cur_pos > 0) &&
		  (cur_line[cur_pos-1] != SPACE)) {
		cur_pos -= 1;
		backspace();
	    }
	    clear_eoline();
	    max_pos = cur_pos;


	} else if(cur_char == term_chars[VREPRINT] ){ /* ^R? */
	    user_putc(NEWLINE); /* go to a fresh line */
	    redraw_line(prompt);


	} else if(cur_char == term_chars[VSUSP]) {
	    reset_termio();
	    kill(0, SIGTSTP);

	    /* process stops here */

	    set_termio();
	    /* print the prompt */
	    redraw_line(prompt);
#endif
	} else {
	    /* do normal editing commands */
	    /* some of these are also done above */
	    int i;
	    switch(cur_char) {
	      case EOF:
		reset_termio();
		return((char *)NULL);
	      case 001:		/* ^A */
		while(cur_pos > 0) {
		    cur_pos -= 1;
		    backspace();
		}
		break;
	      case 002:		/* ^B */
		if(cur_pos > 0) {
		    cur_pos -= 1;
		    backspace();
		}
		break;
	      case 005:		/* ^E */
		while(cur_pos < max_pos) {
		    user_putc(cur_line[cur_pos]);
		    cur_pos += 1;
		}
		break;
	      case 006:		/* ^F */
		if(cur_pos < max_pos) {
		    user_putc(cur_line[cur_pos]);
		    cur_pos += 1;
		}
		break;
	      case 013:		/* ^K */
		clear_eoline();
		max_pos = cur_pos;
		break;
		
	      case 020:		/* ^P */
		if(history != NULL) {
		    if(cur_entry == NULL) {
			cur_entry = history;
			clear_line(prompt);
			copy_line(cur_entry->line);
		    } else if(cur_entry->prev != NULL) {
			cur_entry = cur_entry->prev;
			clear_line(prompt);
			copy_line(cur_entry->line);
		    }else
			user_putc(BELL);
		}else
		    user_putc(BELL);
		break;

	    case 016:		/* ^N */
		if(cur_entry != NULL) {
		    cur_entry = cur_entry->next;
		    clear_line(prompt);
		    if(cur_entry != NULL) 
			copy_line(cur_entry->line);
		    else
			cur_pos = max_pos = 0;
		}else
		    user_putc(BELL);
		break;
	      case 014:		/* ^L */
	      case 022:		/* ^R */
		user_putc(NEWLINE); /* go to a fresh line */

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人午夜高潮毛片| 成年人网站91| 亚洲精品免费在线观看| 日韩欧美一区二区在线视频| 粉嫩绯色av一区二区在线观看| 亚洲制服丝袜在线| 久久夜色精品一区| 欧美精品三级日韩久久| av亚洲精华国产精华精华| 美国毛片一区二区| 亚洲综合色成人| 国产精品福利一区二区| 久久亚洲综合色一区二区三区| 欧美色爱综合网| 一本色道综合亚洲| 成人动漫中文字幕| 国内精品伊人久久久久av影院| 亚洲国产欧美在线人成| 亚洲私人影院在线观看| 久久综合九色综合97婷婷女人| 欧美精品免费视频| 在线精品视频一区二区三四| 成人免费看片app下载| 国产一区二区三区日韩| 免费成人结看片| 日韩av中文字幕一区二区 | 欧美大片在线观看一区| 色丁香久综合在线久综合在线观看 | 亚洲视频在线观看三级| 国产色婷婷亚洲99精品小说| 日韩欧美电影在线| 91精品国产一区二区三区蜜臀| 在线精品视频免费播放| 在线免费观看成人短视频| 色综合天天做天天爱| 97成人超碰视| 99精品国产热久久91蜜凸| 不卡高清视频专区| 成人毛片在线观看| 91在线一区二区| 97精品久久久久中文字幕 | 亚洲第一主播视频| 午夜精品福利视频网站| 丝袜诱惑亚洲看片| 五月天久久比比资源色| 天天影视涩香欲综合网| 日本不卡123| 人人精品人人爱| 开心九九激情九九欧美日韩精美视频电影| 日韩精品电影在线观看| 伦理电影国产精品| 国产一区二区视频在线| 国产成人精品在线看| 成人免费高清在线观看| 97久久久精品综合88久久| 色综合天天在线| 欧美精品xxxxbbbb| 精品少妇一区二区三区| 国产视频视频一区| 亚洲日本在线看| 亚洲一区在线电影| 男女男精品视频网| 国产精品99久久久久久有的能看| 国产成人自拍高清视频在线免费播放| 成人动漫中文字幕| 欧美三级一区二区| 日韩欧美123| 国产无一区二区| 一区二区三区四区中文字幕| 亚洲动漫第一页| 老汉av免费一区二区三区| 国产成人亚洲精品狼色在线| 91视频.com| 日韩一区二区三免费高清| 国产欧美一区二区三区鸳鸯浴| 成人欧美一区二区三区1314 | 亚洲激情五月婷婷| 日韩av二区在线播放| 国产一区二区导航在线播放| 91免费观看在线| 日韩一区二区三区四区五区六区| 久久久不卡影院| 亚洲一区在线视频观看| 国产一区二区三区免费| 在线亚洲欧美专区二区| 精品国产一区二区三区久久久蜜月 | 91老司机福利 在线| 欧美一区二区三区在线观看| 中文一区一区三区高中清不卡| 亚洲午夜视频在线观看| 国内精品自线一区二区三区视频| 91亚洲国产成人精品一区二三| 欧美久久一二区| 中文字幕一区在线观看| 久久99国内精品| 日本乱码高清不卡字幕| 久久久国产精品不卡| 日韩高清国产一区在线| 99精品视频在线观看| 2019国产精品| 亚洲国产aⅴ成人精品无吗| 成人福利在线看| 精品国产乱码91久久久久久网站| 亚洲欧美日韩中文播放| 国产福利精品导航| 日韩欧美的一区| 午夜精品一区二区三区三上悠亚| 不卡电影免费在线播放一区| 精品欧美一区二区在线观看 | 成年人国产精品| 亚洲精品一区二区三区香蕉 | 久久99精品久久久久久| 欧美日韩一区二区三区在线| 国产精品不卡在线| 国产一区二区三区美女| 日韩欧美一区二区三区在线| 亚洲精品ww久久久久久p站| 懂色av一区二区在线播放| 日韩欧美区一区二| 日韩精品一二三区| 91电影在线观看| 亚洲欧美一区二区久久| 成人视屏免费看| 国产午夜亚洲精品不卡| 韩国av一区二区| 欧美tickling网站挠脚心| 青青草国产成人av片免费| 欧美老人xxxx18| 午夜精品久久久久久久久| 欧美午夜片在线观看| 亚洲国产精品久久不卡毛片 | 国产专区欧美精品| 日韩免费性生活视频播放| 丝袜亚洲另类欧美综合| 在线观看亚洲一区| 亚洲综合一二区| 欧美日韩国产小视频在线观看| 一级日本不卡的影视| 欧美性色aⅴ视频一区日韩精品| 亚洲视频综合在线| 色婷婷久久综合| 亚洲成人免费av| 69p69国产精品| 蜜臂av日日欢夜夜爽一区| 日韩三级视频在线观看| 国产一区二区毛片| 中文字幕乱码日本亚洲一区二区| 成人一区二区视频| 亚洲精品一二三| 欧美日韩和欧美的一区二区| 视频一区欧美日韩| 欧美v日韩v国产v| 国产成人久久精品77777最新版本| 欧美韩国日本不卡| 91视频精品在这里| 亚洲第一av色| 精品国产青草久久久久福利| 国产精品一区不卡| 亚洲欧美日韩中文播放| 欧美日韩免费高清一区色橹橹 | 大白屁股一区二区视频| 亚洲色图制服丝袜| 欧美性色综合网| 精油按摩中文字幕久久| 久久久夜色精品亚洲| 91在线无精精品入口| 亚洲一区二区三区四区中文字幕 | 欧美一区二区三区影视| 国产一区二区看久久| 中文字幕中文字幕一区二区| 欧美午夜精品久久久久久孕妇| 美女久久久精品| 中文字幕一区二区三区精华液| 在线视频一区二区三| 九色|91porny| 亚洲日韩欧美一区二区在线| 91精品国产综合久久精品app| 国产麻豆精品95视频| 亚洲精品欧美激情| 精品国产青草久久久久福利| 91亚洲精品久久久蜜桃网站| 麻豆91精品视频| 亚洲美女精品一区| 26uuu色噜噜精品一区二区| 色综合久久精品| 极品少妇xxxx精品少妇偷拍| 亚洲欧美日韩一区二区三区在线观看| 日韩一二三区视频| 91丨porny丨最新| 国精产品一区一区三区mba桃花| 亚洲品质自拍视频网站| 欧美精品一区二区久久婷婷 | 国产天堂亚洲国产碰碰| 欧美亚洲日本一区| 成人免费毛片a| 久久精品国产免费看久久精品| 亚洲卡通欧美制服中文| 日韩精品一区二区三区swag| 91麻豆123| 国产69精品久久777的优势|