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

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

?? search.c

?? UNIX下SH的實現源碼
?? C
字號:
/* search.c - code for non-incremental searching in emacs and vi modes. *//* Copyright (C) 1992 Free Software Foundation, Inc.   This file is part of 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 2, 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,   59 Temple Place, Suite 330, Boston, MA 02111 USA. */#define READLINE_LIBRARY#if defined (HAVE_CONFIG_H)#  include <config.h>#endif#include <sys/types.h>#include <stdio.h>#if defined (HAVE_UNISTD_H)#  include <unistd.h>#endif#if defined (HAVE_STDLIB_H)#  include <stdlib.h>#else#  include "ansi_stdlib.h"#endif#include "rldefs.h"#include "readline.h"#include "history.h"#include "rlprivate.h"#include "xmalloc.h"#ifdef abs#  undef abs#endif#define abs(x)		(((x) >= 0) ? (x) : -(x))extern HIST_ENTRY *saved_line_for_history;/* Functions imported from the rest of the library. */extern int _rl_free_history_entry __P((HIST_ENTRY *));static char *noninc_search_string = (char *) NULL;static int noninc_history_pos;static char *prev_line_found = (char *) NULL;static int rl_history_search_len;static int rl_history_search_pos;static char *history_search_string;static int history_string_size;/* Make the data from the history entry ENTRY be the contents of the   current line.  This doesn't do anything with rl_point; the caller   must set it. */static voidmake_history_line_current (entry)     HIST_ENTRY *entry;{  int line_len;  line_len = strlen (entry->line);  if (line_len >= rl_line_buffer_len)    rl_extend_line_buffer (line_len);  strcpy (rl_line_buffer, entry->line);  rl_undo_list = (UNDO_LIST *)entry->data;  rl_end = line_len;  if (saved_line_for_history)    _rl_free_history_entry (saved_line_for_history);  saved_line_for_history = (HIST_ENTRY *)NULL;}/* Search the history list for STRING starting at absolute history position   POS.  If STRING begins with `^', the search must match STRING at the   beginning of a history line, otherwise a full substring match is performed   for STRING.  DIR < 0 means to search backwards through the history list,   DIR >= 0 means to search forward. */static intnoninc_search_from_pos (string, pos, dir)     char *string;     int pos, dir;{  int ret, old;  old = where_history ();  history_set_pos (pos);  if (*string == '^')    ret = history_search_prefix (string + 1, dir);  else    ret = history_search (string, dir);  if (ret != -1)    ret = where_history ();  history_set_pos (old);  return (ret);}/* Search for a line in the history containing STRING.  If DIR is < 0, the   search is backwards through previous entries, else through subsequent   entries. */static voidnoninc_dosearch (string, dir)     char *string;     int dir;{  int oldpos, pos;  HIST_ENTRY *entry;  if (string == 0 || *string == '\0' || noninc_history_pos < 0)    {      ding ();      return;    }  pos = noninc_search_from_pos (string, noninc_history_pos + dir, dir);  if (pos == -1)    {      /* Search failed, current history position unchanged. */      maybe_unsave_line ();      rl_clear_message ();      rl_point = 0;      ding ();      return;    }  noninc_history_pos = pos;  oldpos = where_history ();  history_set_pos (noninc_history_pos);  entry = current_history ();#if defined (VI_MODE)  if (rl_editing_mode != vi_mode)#endif  history_set_pos (oldpos);  make_history_line_current (entry);  rl_point = 0;  rl_clear_message ();}/* Search non-interactively through the history list.  DIR < 0 means to   search backwards through the history of previous commands; otherwise   the search is for commands subsequent to the current position in the   history list.  PCHAR is the character to use for prompting when reading   the search string; if not specified (0), it defaults to `:'. */static voidnoninc_search (dir, pchar)     int dir;     int pchar;{  int saved_point, c;  char *p;  maybe_save_line ();  saved_point = rl_point;  /* Use the line buffer to read the search string. */  rl_line_buffer[0] = 0;  rl_end = rl_point = 0;  p = _rl_make_prompt_for_search (pchar ? pchar : ':');  rl_message (p, 0, 0);  free (p);#define SEARCH_RETURN rl_restore_prompt (); return  /* Read the search string. */  while (c = rl_read_key ())    {      switch (c)	{	case CTRL('H'):	case RUBOUT:	  if (rl_point == 0)	    {	      maybe_unsave_line ();	      rl_clear_message ();	      rl_point = saved_point;	      SEARCH_RETURN;	    }	  rl_rubout (1, c);	  break;	case CTRL('W'):	  rl_unix_word_rubout (1, c);	  break;	case CTRL('U'):	  rl_unix_line_discard (1, c);	  break;	case RETURN:	case NEWLINE:	  goto dosearch;	  /* NOTREACHED */	  break;	case CTRL('C'):	case CTRL('G'):	  maybe_unsave_line ();	  rl_clear_message ();	  rl_point = saved_point;	  ding ();	  SEARCH_RETURN;	default:	  rl_insert (1, c);	  break;	}      (*rl_redisplay_function) ();    } dosearch:  /* If rl_point == 0, we want to re-use the previous search string and     start from the saved history position.  If there's no previous search     string, punt. */  if (rl_point == 0)    {      if (!noninc_search_string)	{	  ding ();	  SEARCH_RETURN;	}    }  else    {      /* We want to start the search from the current history position. */      noninc_history_pos = where_history ();      FREE (noninc_search_string);      noninc_search_string = savestring (rl_line_buffer);    }  rl_restore_prompt ();  noninc_dosearch (noninc_search_string, dir);}/* Search forward through the history list for a string.  If the vi-mode   code calls this, KEY will be `?'. */intrl_noninc_forward_search (count, key)     int count, key;{  noninc_search (1, (key == '?') ? '?' : 0);  return 0;}/* Reverse search the history list for a string.  If the vi-mode code   calls this, KEY will be `/'. */intrl_noninc_reverse_search (count, key)     int count, key;{  noninc_search (-1, (key == '/') ? '/' : 0);  return 0;}/* Search forward through the history list for the last string searched   for.  If there is no saved search string, abort. */intrl_noninc_forward_search_again (count, key)     int count, key;{  if (!noninc_search_string)    {      ding ();      return (-1);    }  noninc_dosearch (noninc_search_string, 1);  return 0;}/* Reverse search in the history list for the last string searched   for.  If there is no saved search string, abort. */intrl_noninc_reverse_search_again (count, key)     int count, key;{  if (!noninc_search_string)    {      ding ();      return (-1);    }  noninc_dosearch (noninc_search_string, -1);  return 0;}static intrl_history_search_internal (count, dir)     int count, dir;{  HIST_ENTRY *temp;  int ret, oldpos;  maybe_save_line ();  temp = (HIST_ENTRY *)NULL;  /* Search COUNT times through the history for a line whose prefix     matches history_search_string.  When this loop finishes, TEMP,     if non-null, is the history line to copy into the line buffer. */  while (count)    {      ret = noninc_search_from_pos (history_search_string, rl_history_search_pos + dir, dir);      if (ret == -1)	break;      /* Get the history entry we found. */      rl_history_search_pos = ret;      oldpos = where_history ();      history_set_pos (rl_history_search_pos);      temp = current_history ();      history_set_pos (oldpos);      /* Don't find multiple instances of the same line. */      if (prev_line_found && STREQ (prev_line_found, temp->line))        continue;      prev_line_found = temp->line;      count--;    }  /* If we didn't find anything at all, return. */  if (temp == 0)    {      maybe_unsave_line ();      ding ();      /* If you don't want the saved history line (last match) to show up         in the line buffer after the search fails, change the #if 0 to         #if 1 */#if 0      if (rl_point > rl_history_search_len)        {          rl_point = rl_end = rl_history_search_len;          rl_line_buffer[rl_end] = '\0';        }#else      rl_point = rl_history_search_len;	/* maybe_unsave_line changes it */#endif      return 1;    }  /* Copy the line we found into the current line buffer. */  make_history_line_current (temp);  rl_point = rl_history_search_len;  return 0;}static voidrl_history_search_reinit (){  rl_history_search_pos = where_history ();  rl_history_search_len = rl_point;  prev_line_found = (char *)NULL;  if (rl_point)    {      if (rl_history_search_len >= history_string_size - 2)	{	  history_string_size = rl_history_search_len + 2;	  history_search_string = xrealloc (history_search_string, history_string_size);	}      history_search_string[0] = '^';      strncpy (history_search_string + 1, rl_line_buffer, rl_point);      history_search_string[rl_point + 1] = '\0';    }}/* Search forward in the history for the string of characters   from the start of the line to rl_point.  This is a non-incremental   search. */intrl_history_search_forward (count, ignore)     int count, ignore;{  if (count == 0)    return (0);  if (rl_last_func != rl_history_search_forward &&      rl_last_func != rl_history_search_backward)    rl_history_search_reinit ();  if (rl_history_search_len == 0)    return (rl_get_next_history (count, ignore));  return (rl_history_search_internal (abs (count), (count > 0) ? 1 : -1));}/* Search backward through the history for the string of characters   from the start of the line to rl_point.  This is a non-incremental   search. */intrl_history_search_backward (count, ignore)     int count, ignore;{  if (count == 0)    return (0);  if (rl_last_func != rl_history_search_forward &&      rl_last_func != rl_history_search_backward)    rl_history_search_reinit ();  if (rl_history_search_len == 0)    return (rl_get_previous_history (count, ignore));  return (rl_history_search_internal (abs (count), (count > 0) ? -1 : 1));}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲va欧美va天堂v国产综合| 狠狠色综合播放一区二区| 欧美高清在线一区| 精品国产乱码久久久久久久久| 欧美日韩免费电影| 欧美在线视频日韩| 色噜噜久久综合| 91福利区一区二区三区| 欧美亚日韩国产aⅴ精品中极品| 91免费版在线看| 91精品1区2区| 欧美影院午夜播放| 欧美影院精品一区| 色欧美片视频在线观看| 成人丝袜18视频在线观看| 国产激情一区二区三区四区| 国产宾馆实践打屁股91| 成人午夜免费av| 99re成人在线| 日本久久电影网| 欧美日韩卡一卡二| 欧美一区二区三区日韩视频| 久久婷婷久久一区二区三区| 国产亚洲精品7777| 亚洲三级在线免费观看| 亚洲综合在线观看视频| 亚洲福中文字幕伊人影院| 亚洲影院理伦片| 亚洲成人免费视| 五月天丁香久久| 免费日本视频一区| 国产盗摄一区二区三区| zzijzzij亚洲日本少妇熟睡| 欧美亚洲自拍偷拍| 3d成人h动漫网站入口| 久久免费视频色| 亚洲女性喷水在线观看一区| 天堂在线亚洲视频| 国产精品亚洲人在线观看| 91色porny在线视频| 欧美日韩精品系列| 日韩视频在线你懂得| 国产日韩欧美一区二区三区综合| 亚洲色图丝袜美腿| 亚洲欧美色综合| 极品瑜伽女神91| 色av成人天堂桃色av| 欧美成人video| 国产精品久久久99| 日韩av一区二区三区| 成人深夜福利app| 欧美日韩精品一区视频| 国产午夜精品久久| 婷婷综合五月天| 风间由美一区二区三区在线观看| 欧美日韩精品专区| 国产精品久久久久影院老司| 日韩二区三区在线观看| www.亚洲国产| 欧美sm美女调教| 亚洲午夜日本在线观看| 国产麻豆精品95视频| 欧美日韩精品一区二区天天拍小说 | 国产精品萝li| 日韩av电影天堂| 色悠悠亚洲一区二区| 国产欧美日产一区| 美脚の诱脚舐め脚责91 | 精品欧美久久久| 亚洲午夜激情av| 成人av影视在线观看| 欧美大黄免费观看| 亚洲欧美日韩小说| 国产盗摄精品一区二区三区在线 | 欧美高清在线一区二区| 麻豆成人av在线| 欧美三级欧美一级| 国产精品九色蝌蚪自拍| 国产美女在线精品| 精品剧情v国产在线观看在线| 亚洲电影在线播放| 91麻豆swag| 国产精品免费久久久久| 激情综合亚洲精品| 日韩一区二区精品葵司在线| 亚洲在线视频一区| 91丨porny丨户外露出| 中文一区在线播放| 国产成人激情av| 久久综合九色综合97婷婷| 青青草国产精品亚洲专区无| 欧美日韩精品电影| 亚洲已满18点击进入久久| 99re这里只有精品首页| 欧美激情一区二区在线| 国产精品一区二区免费不卡 | 欧美在线|欧美| 亚洲图片激情小说| 99热在这里有精品免费| 国产精品嫩草久久久久| 成人精品一区二区三区中文字幕| 国产婷婷一区二区| 国产传媒一区在线| 国产精品三级av| av不卡在线观看| 综合久久久久久| 色婷婷精品大视频在线蜜桃视频| 亚洲三级在线看| 欧美视频在线观看一区| 亚洲一区视频在线观看视频| 欧美在线你懂的| 午夜精品福利视频网站| 制服丝袜亚洲色图| 美国欧美日韩国产在线播放| 337p日本欧洲亚洲大胆色噜噜| 国产一区二区在线观看免费| 久久精品欧美日韩精品| 成人自拍视频在线| 亚洲欧洲99久久| 欧美影院一区二区三区| 日韩黄色片在线观看| 日韩精品资源二区在线| 国产精品一区二区久久不卡| 中文字幕一区二区三区乱码在线| 色综合色狠狠天天综合色| 亚洲伊人色欲综合网| 日韩欧美一区二区视频| 国产乱一区二区| 亚洲精品ww久久久久久p站| 欧美日韩国产首页| 麻豆视频观看网址久久| 国产精品五月天| 欧洲国内综合视频| 麻豆国产一区二区| 国产蜜臀97一区二区三区| 91久久精品午夜一区二区| 日韩电影在线免费观看| 久久久久久久精| 欧美主播一区二区三区| 理论电影国产精品| 中文字幕在线一区免费| 欧美亚洲国产一卡| 久久精品国产精品青草| 亚洲欧美在线aaa| 制服丝袜成人动漫| 成人va在线观看| 偷拍与自拍一区| 国产日韩欧美一区二区三区综合| 欧洲色大大久久| 国产老女人精品毛片久久| 亚洲裸体xxx| 精品日韩99亚洲| 色婷婷av一区二区三区软件| 久久精品国产精品亚洲红杏| 亚洲精品免费一二三区| 日韩你懂的在线播放| 99久久精品久久久久久清纯| 日本不卡的三区四区五区| 国产精品盗摄一区二区三区| 欧美一级高清片| 日本高清不卡aⅴ免费网站| 久88久久88久久久| 亚洲已满18点击进入久久| 国产亚洲午夜高清国产拍精品| 欧美午夜精品一区| 成人三级伦理片| 青青草原综合久久大伊人精品优势| 中文字幕一区二区三区在线观看 | 亚洲成a人在线观看| 亚洲国产精品ⅴa在线观看| 欧美一区二区三区啪啪| 日本韩国欧美在线| 粉嫩嫩av羞羞动漫久久久| 美女视频一区二区| 亚洲国产精品自拍| 亚洲婷婷在线视频| 久久毛片高清国产| 日韩欧美国产一区在线观看| 色先锋资源久久综合| 国产成人免费视频精品含羞草妖精| 日韩av中文在线观看| 亚洲国产视频a| 一区二区高清在线| 国产精品国产自产拍高清av王其| 欧美成人aa大片| 日韩视频免费观看高清完整版| 欧美最猛性xxxxx直播| 99久久99久久免费精品蜜臀| 国产另类ts人妖一区二区| 久久www免费人成看片高清| 日韩av一区二区三区四区| 亚洲国产综合91精品麻豆| 亚洲黄色av一区| 亚洲人成亚洲人成在线观看图片| 中文字幕二三区不卡| 国产三级一区二区| 久久精品人人做人人爽人人| 亚洲精品一线二线三线无人区| 日韩一区二区在线观看视频| 911国产精品|