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

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

?? isearch.c

?? Linux下的MUD客戶端程序
?? C
字號:
/* **************************************************************** *//*								    *//*			I-Search and Searching			    *//*								    *//* **************************************************************** *//* Copyright (C) 1987,1989 Free Software Foundation, Inc.   This file contains the Readline Library (the Library), a set of   routines for providing Emacs style line input to programs that ask   for it.   The Library is free software; you can redistribute it and/or modify   it under the terms of the GNU General Public License as published by   the Free Software Foundation; either version 1, or (at your option)   any later version.   The Library is distributed in the hope that it will be useful, but   WITHOUT ANY WARRANTY; without even the implied warranty of   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU   General Public License for more details.   The GNU General Public License is often shipped with GNU software, and   is generally kept in a file called COPYING or LICENSE.  If you do not   have a copy of the license, write to the Free Software Foundation,   675 Mass Ave, Cambridge, MA 02139, USA. */#define READLINE_LIBRARY#include <stdio.h>#if defined (HAVE_UNISTD_H)#  include <unistd.h>#endif#include "memalloc.h"#include "readline.h"#include "history.h"#define STREQ(a, b)	(((a)[0] == (b)[0]) && (strcmp ((a), (b)) == 0))#define STREQN(a, b, n)	(((a)[0] == (b)[0]) && (strncmp ((a), (b), (n)) == 0))/* Variables imported from other files in the readline library. */extern Keymap _rl_keymap;extern HIST_ENTRY *saved_line_for_history;extern int rl_line_buffer_len;extern int rl_point, rl_end;extern char *rl_line_buffer;extern char *xmalloc (), *xrealloc ();static int rl_search_history ();/* Last line found by the current incremental search, so we don't `find'   identical lines many times in a row. */static char *prev_line_found;/* Search backwards through the history looking for a string which is typed   interactively.  Start with the current line. */rl_reverse_search_history (sign, key)     int sign;     int key;{  return (rl_search_history (-sign, key));}/* Search forwards through the history looking for a string which is typed   interactively.  Start with the current line. */rl_forward_search_history (sign, key)     int sign;     int key;{  return (rl_search_history (sign, key));}/* Display the current state of the search in the echo-area.   SEARCH_STRING contains the string that is being searched for,   DIRECTION is zero for forward, or 1 for reverse,   WHERE is the history list number of the current line.  If it is   -1, then this line is the starting one. */static voidrl_display_search (search_string, reverse_p, where)     char *search_string;     int reverse_p, where;{  char *message;  message = xmalloc (1 + (search_string ? strlen (search_string) : 0) + 30);  *message = '\0';#if defined (NOTDEF)  if (where != -1)    sprintf (message, "[%d]", where + history_base);#endif /* NOTDEF */  strcat (message, "(");  if (reverse_p)    strcat (message, "reverse-");  strcat (message, "i-search)`");  if (search_string)    strcat (message, search_string);  strcat (message, "': ");  rl_message ("%s", message, 0);  free (message);  rl_redisplay ();}/* Search through the history looking for an interactively typed string.   This is analogous to i-search.  We start the search in the current line.   DIRECTION is which direction to search; >= 0 means forward, < 0 means   backwards. */static intrl_search_history (direction, invoking_key)     int direction;     int invoking_key;{  /* The string that the user types in to search for. */  char *search_string;  /* The current length of SEARCH_STRING. */  int search_string_index;  /* The amount of space that SEARCH_STRING has allocated to it. */  int search_string_size;  /* The list of lines to search through. */  char **lines, *allocated_line = (char *)NULL;  /* The length of LINES. */  int hlen;  /* Where we get LINES from. */  HIST_ENTRY **hlist = history_list ();  register int i = 0;  int orig_point = rl_point;  int orig_line = where_history ();  int last_found_line = orig_line;  int c, done = 0, found, failed, sline_len;  /* The line currently being searched. */  char *sline;  /* Offset in that line. */  int line_index;  /* Non-zero if we are doing a reverse search. */  int reverse = (direction < 0);  /* Create an arrary of pointers to the lines that we want to search. */  maybe_replace_line ();  if (hlist)    for (i = 0; hlist[i]; i++);  /* Allocate space for this many lines, +1 for the current input line,     and remember those lines. */  lines = (char **)xmalloc ((1 + (hlen = i)) * sizeof (char *));  for (i = 0; i < hlen; i++)    lines[i] = hlist[i]->line;  if (saved_line_for_history)    lines[i] = saved_line_for_history->line;  else    {      /* Keep track of this so we can free it. */      allocated_line = xmalloc (1 + strlen (rl_line_buffer));      strcpy (allocated_line, &rl_line_buffer[0]);      lines[i] = allocated_line;    }  hlen++;  /* The line where we start the search. */  i = orig_line;  /* Initialize search parameters. */  search_string = xmalloc (search_string_size = 128);  *search_string = '\0';  search_string_index = 0;  prev_line_found = (char *)0;		/* XXX */  /* Normalize DIRECTION into 1 or -1. */  direction = (direction >= 0) ? 1 : -1;  rl_display_search (search_string, reverse, -1);  sline = rl_line_buffer;  sline_len = strlen (sline);  line_index = rl_point;  found = failed = 0;  while (!done)    {      Function *f = (Function *)NULL;      /* Read a key and decide how to proceed. */      c = rl_read_key ();      /* Hack C to Do What I Mean. */      if (_rl_keymap[c].type == ISFUNC)	{	  f = _rl_keymap[c].function;	  if (f == rl_reverse_search_history)	    c = reverse ? -1 : -2;	  else if (f == rl_forward_search_history)	    c =  !reverse ? -1 : -2;	}      switch (c)	{	case ESC:	  done = 1;	  continue;	case -1:	  if (!search_string_index)	    continue;	  else	    {	      if (reverse)		--line_index;	      else		{		  if (line_index != sline_len)		    ++line_index;		  else		    ding ();		}	    }	  break;	  /* switch directions */	case -2:	  direction = -direction;	  reverse = (direction < 0);	  break;	case CTRL ('G'):	  strcpy (rl_line_buffer, lines[orig_line]);	  rl_point = orig_point;	  rl_end = strlen (rl_line_buffer);	  rl_clear_message ();	  free (allocated_line);	  free (lines);	  return 0;	default:	  if (CTRL_CHAR (c) || META_CHAR (c) || c == RUBOUT)	    {	      rl_execute_next (c);	      done = 1;	      continue;	    }	  else	    {	      /* Add character to search string and continue search. */	      if (search_string_index + 2 >= search_string_size)		{		  search_string_size += 128;		  search_string = xrealloc (search_string, search_string_size);		}	      search_string[search_string_index++] = c;	      search_string[search_string_index] = '\0';	      break;	    }	}      found = failed = 0;      while (1)	{	  int limit = sline_len - search_string_index + 1;	  /* Search the current line. */	  while (reverse ? (line_index >= 0) : (line_index < limit))	    {	      if (STREQN(search_string, sline + line_index, search_string_index))		  {		    found++;		    break;		  }	      else		line_index += direction;	    }	  if (found)	    break;	  /* Move to the next line, but skip new copies of the line	     we just found and lines shorter than the string we're	     searching for. */	  do	    {	      /* Move to the next line. */	      i += direction;	      /* At limit for direction? */	      if (reverse ? (i < 0) : (i == hlen))		{		  failed++;		  break;		}	      /* We will need these later. */	      sline = lines[i];	      sline_len = strlen (sline);	    }	  while ((prev_line_found && STREQ (prev_line_found, lines[i])) ||		 (search_string_index > sline_len));	  if (failed)	    break;	  /* Now set up the line for searching... */	  if (reverse)	    line_index = sline_len - search_string_index;	  else	    line_index = 0;	}      if (failed)	{	  /* We cannot find the search string.  Ding the bell. */	  ding ();	  i = last_found_line;	  continue; 		/* XXX - was break */	}      /* We have found the search string.  Just display it.  But don't	 actually move there in the history list until the user accepts	 the location. */      if (found)	{	  int line_len;	  prev_line_found = lines[i];	  line_len = strlen (lines[i]);	  if (line_len >= rl_line_buffer_len)	    rl_extend_line_buffer (line_len);	  strcpy (rl_line_buffer, lines[i]);	  rl_point = line_index;	  rl_end = line_len;	  last_found_line = i;	  rl_display_search (search_string, reverse, (i == orig_line) ? -1 : i);	}    }  /* The searching is over.  The user may have found the string that she     was looking for, or else she may have exited a failing search.  If     LINE_INDEX is -1, then that shows that the string searched for was     not found.  We use this to determine where to place rl_point. */  /* First put back the original state. */  strcpy (rl_line_buffer, lines[orig_line]);  /* Free the search string. */  free (search_string);  if (last_found_line < orig_line)    rl_get_previous_history (orig_line - last_found_line);  else    rl_get_next_history (last_found_line - orig_line);  /* If the string was not found, put point at the end of the line. */  if (line_index < 0)    line_index = strlen (rl_line_buffer);  rl_point = line_index;  rl_clear_message ();  free (allocated_line);  free (lines);  return 0;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美精品777| 欧美日韩视频在线一区二区| 亚洲第一福利一区| 亚洲最色的网站| 国产精品久久久久久久久图文区| 国产日韩高清在线| 国产欧美日韩激情| 亚洲国产精品激情在线观看| 欧美国产激情二区三区| 国产精品免费看片| 亚洲黄色小视频| 亚洲一二三区视频在线观看| 亚洲午夜精品一区二区三区他趣| 亚洲精品国产一区二区三区四区在线| 亚洲免费av高清| 亚洲第四色夜色| 久久精品99久久久| 福利一区二区在线观看| 成人av集中营| 欧美性xxxxxxxx| 91精品国产乱| 国产亚洲制服色| 亚洲视频中文字幕| 日韩精品国产精品| 国产精品亚洲专一区二区三区 | 欧美日韩国产高清一区二区| 欧美三片在线视频观看 | 日韩精品一区二区三区在线| 亚洲精品一线二线三线| 国产精品福利影院| 天天综合色天天| 国产成人一区在线| 欧美综合视频在线观看| 精品欧美黑人一区二区三区| 国产精品美女久久久久久久久久久| 亚洲欧洲av在线| 男女男精品视频| 成人app软件下载大全免费| 欧美日韩免费一区二区三区| 久久久久久久久免费| 伊人色综合久久天天人手人婷| 日韩国产精品91| 成人短视频下载| 欧美本精品男人aⅴ天堂| 亚洲狼人国产精品| 国产精品一品二品| 91精品国产综合久久久久| 国产精品久久久久毛片软件| 久久91精品国产91久久小草| 色嗨嗨av一区二区三区| 国产人久久人人人人爽| 日韩中文欧美在线| 色国产精品一区在线观看| 国产午夜精品一区二区三区嫩草 | 久久精品一区四区| 日韩在线a电影| 色综合久久久久久久| 久久青草欧美一区二区三区| 天天射综合影视| 色猫猫国产区一区二在线视频| 久久精品视频在线看| 久久99热这里只有精品| 欧美精品久久99久久在免费线| 中文字幕在线观看一区二区| 黄色精品一二区| 欧美成人乱码一区二区三区| 三级久久三级久久| 在线精品视频免费观看| 国产精品久久久久久久久久久免费看 | 国产成人综合亚洲网站| 欧美老人xxxx18| 亚洲一区二区精品3399| 在线看国产一区二区| 亚洲欧洲精品成人久久奇米网| 国产99一区视频免费| 久久婷婷综合激情| 国产精品1024| 中文字幕精品综合| eeuss鲁片一区二区三区| 国产精品私房写真福利视频| 丁香五精品蜜臀久久久久99网站 | 久久精品人人做人人爽人人 | 久久影视一区二区| 国产高清视频一区| 国产日韩视频一区二区三区| 国产成人一级电影| 亚洲欧洲制服丝袜| 欧美午夜精品久久久| 午夜av区久久| 日韩欧美www| 国产精品亚洲成人| 亚洲欧美怡红院| 在线一区二区三区| 日欧美一区二区| 日韩女优毛片在线| 丰满岳乱妇一区二区三区| 亚洲欧美日韩在线| 9191久久久久久久久久久| 久久精品国产久精国产爱| 久久精品一区八戒影视| 97se亚洲国产综合自在线观| 亚洲最新在线观看| 精品久久久久久亚洲综合网| 丁香五精品蜜臀久久久久99网站| 亚洲精品五月天| 538在线一区二区精品国产| 国产乱码字幕精品高清av | 欧美色精品在线视频| 毛片一区二区三区| 国产精品网友自拍| 欧美一区二区三区影视| 成人视屏免费看| 丝袜美腿亚洲一区| 国产精品久久久久四虎| 777亚洲妇女| 成人av资源在线观看| 爽爽淫人综合网网站| 久久精品亚洲精品国产欧美| 色久优优欧美色久优优| 国产精品一区二区久久不卡| 亚洲国产成人tv| 国产精品丝袜久久久久久app| 欧美日本在线播放| www.亚洲精品| 精品一区二区精品| 亚洲福利一二三区| 国产精品国产自产拍在线| 日韩一级二级三级精品视频| 91免费观看在线| 精品一区二区三区的国产在线播放| 亚洲欧美aⅴ...| 国产日韩欧美不卡| 精品久久久久久最新网址| 欧美挠脚心视频网站| 91麻豆高清视频| 丁香婷婷深情五月亚洲| 狠狠色丁香久久婷婷综| 日本一道高清亚洲日美韩| 一区二区三区高清| 亚洲人成网站色在线观看| 国产欧美一区二区精品忘忧草| 欧美一区二区三区免费大片| 在线观看日韩高清av| av一二三不卡影片| 成人av免费在线观看| 成人手机电影网| 国产91丝袜在线观看| 国产一区二区三区黄视频 | 亚洲精选免费视频| 日本一区二区三区视频视频| 欧美不卡一区二区三区| 欧美精品日韩综合在线| 欧美性色黄大片手机版| 一道本成人在线| 色综合天天综合| 亚洲国产精品久久不卡毛片| 亚洲黄一区二区三区| 亚洲欧美日韩精品久久久久| 亚洲婷婷在线视频| 亚洲乱码一区二区三区在线观看| 中文字幕综合网| 亚洲精品日韩综合观看成人91| 日韩理论片在线| 亚洲一区二区三区视频在线播放| 亚洲一区中文日韩| 午夜视频在线观看一区二区三区| 性欧美大战久久久久久久久| 婷婷成人综合网| 精品制服美女丁香| 成人免费视频免费观看| 99视频一区二区| 777色狠狠一区二区三区| 日韩一级免费观看| 久久综合五月天婷婷伊人| 欧美激情资源网| 亚洲猫色日本管| 日韩va亚洲va欧美va久久| 国产专区欧美精品| 95精品视频在线| 91精品国产麻豆国产自产在线 | 国产精品日日摸夜夜摸av| 国产精品电影一区二区| 亚洲一区二区三区不卡国产欧美| 天天爽夜夜爽夜夜爽精品视频| 久久国产精品第一页| 成人av一区二区三区| 欧美日韩国产精品成人| 久久―日本道色综合久久| 亚洲乱码日产精品bd| 久久成人免费网站| 91啪九色porn原创视频在线观看| 欧美日韩国产另类一区| 久久久精品免费观看| 午夜精品123| 国产sm精品调教视频网站| 欧美系列在线观看| 中文幕一区二区三区久久蜜桃| 亚洲成人免费在线观看| 成人激情校园春色| 精品免费一区二区三区|