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

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

?? display.c

?? Linux下的MUD客戶端程序
?? C
?? 第 1 頁 / 共 3 頁
字號:
/* display.c -- readline redisplay facility. *//* Copyright (C) 1987, 1989, 1992 Free Software Foundation, Inc.   This file is part of the GNU Readline Library, a library for   reading lines of text with interactive input and history editing.   The GNU Readline 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 GNU Readline 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>#include <sys/types.h>#if defined (HAVE_UNISTD_H)#  include <unistd.h>#endif /* HAVE_UNISTD_H */#if defined (HAVE_STDLIB_H)#  include <stdlib.h>#else#  include "ansi_stdlib.h"#endif /* HAVE_STDLIB_H */#include "posixstat.h"/* System-specific feature definitions and include files. */#include "rldefs.h"/* Some standard library routines. */#include "readline.h"#include "history.h"#if !defined (strchr) && !defined (__STDC__)extern char *strchr (), *strrchr ();#endif /* !strchr && !__STDC__ *//* Global and pseudo-global variables and functions   imported from readline.c. */extern char *rl_prompt;extern int readline_echoing_p;extern char *term_clreol, *term_im, *term_ic,  *term_ei, *term_DC;/* Termcap variables. */extern char *term_up, *term_dc, *term_cr, *term_IC;extern int screenheight, screenwidth, screenchars;extern int terminal_can_insert, term_xn;extern void _rl_output_some_chars ();extern int _rl_output_character_function ();extern int _rl_output_meta_chars;extern int _rl_horizontal_scroll_mode;extern int _rl_mark_modified_lines;extern int _rl_prefer_visible_bell;/* Pseudo-global functions (local to the readline library) exported   by this file. */void _rl_move_cursor_relative (), _rl_output_some_chars ();void _rl_move_vert ();static void update_line (), clear_to_eol (), space_to_eol ();static void delete_chars (), insert_some_chars ();extern char *xmalloc (), *xrealloc ();/* Heuristic used to decide whether it is faster to move from CUR to NEW   by backing up or outputting a carriage return and moving forward. */#define CR_FASTER(new, cur) (((new) + 1) < ((cur) - (new)))/* **************************************************************** *//*								    *//*			Display stuff				    *//*								    *//* **************************************************************** *//* This is the stuff that is hard for me.  I never seem to write good   display routines in C.  Let's see how I do this time. *//* (PWP) Well... Good for a simple line updater, but totally ignores   the problems of input lines longer than the screen width.   update_line and the code that calls it makes a multiple line,   automatically wrapping line update.  Careful attention needs   to be paid to the vertical position variables. *//* Keep two buffers; one which reflects the current contents of the   screen, and the other to draw what we think the new contents should   be.  Then compare the buffers, and make whatever changes to the   screen itself that we should.  Finally, make the buffer that we   just drew into be the one which reflects the current contents of the   screen, and place the cursor where it belongs.   Commands that want to can fix the display themselves, and then let   this function know that the display has been fixed by setting the   RL_DISPLAY_FIXED variable.  This is good for efficiency. *//* Global variables declared here. *//* What YOU turn on when you have handled all redisplay yourself. */int rl_display_fixed = 0;/* The stuff that gets printed out before the actual text of the line.   This is usually pointing to rl_prompt. */char *rl_display_prompt = (char *)NULL;/* Pseudo-global variables declared here. *//* The visible cursor position.  If you print some text, adjust this. */int _rl_last_c_pos = 0;int _rl_last_v_pos = 0;/* Number of lines currently on screen minus 1. */int _rl_vis_botlin = 0;/* Variables used only in this file. *//* The last left edge of text that was displayed.  This is used when   doing horizontal scrolling.  It shifts in thirds of a screenwidth. */static int last_lmargin = 0;/* The line display buffers.  One is the line currently displayed on   the screen.  The other is the line about to be displayed. */static char *visible_line = (char *)NULL;static char *invisible_line = (char *)NULL;/* A buffer for `modeline' messages. */static char msg_buf[128];/* Non-zero forces the redisplay even if we thought it was unnecessary. */static int forced_display = 0;/* Default and initial buffer size.  Can grow. */static int line_size = 1024;static char *last_prompt_string = (char *)NULL;static char *local_prompt, *local_prompt_prefix;static int visible_length, prefix_length;/* The number of invisible characters in the line currently being   displayed on the screen. */static int visible_wrap_offset = 0;/* The length (buffer offset) of the first line of the last (possibly   multi-line) buffer displayed on the screen. */static int visible_first_line_len = 0;/* Expand the prompt string S and return the number of visible   characters in *LP, if LP is not null.  This is currently more-or-less   a placeholder for expansion. *//* Current implementation:	\001 (^A) start non-visible characters	\002 (^B) end non-visible characters   all characters except \001 and \002 (following a \001) are copied to   the returned string; all characters except those between \001 and   \002 are assumed to be `visible'. */	static char *expand_prompt (pmt, lp)     char *pmt;     int *lp;{  char *r, *ret, *p;  int l, rl, ignoring;  /* Short-circuit if we can. */  if (strchr (pmt, RL_PROMPT_START_IGNORE) == 0)    {      r = savestring (pmt);      if (lp)	*lp = strlen (r);      return r;    }  l = strlen (pmt);  r = ret = xmalloc (l + 1);    for (rl = ignoring = 0, p = pmt; p && *p; p++)    {      /* This code strips the invisible character string markers	 RL_PROMPT_START_IGNORE and RL_PROMPT_END_IGNORE */      if (*p == RL_PROMPT_START_IGNORE)	{	  ignoring++;	  continue;	}      else if (ignoring && *p == RL_PROMPT_END_IGNORE)	{	  ignoring = 0;	  continue;	}      else	{	  *r++ = *p;	  if (!ignoring)	    rl++;	}    }  *r = '\0';  if (lp)    *lp = rl;  return ret;}/* * Expand the prompt string into the various display components, if * necessary. * * local_prompt = expanded last line of string in rl_display_prompt *		  (portion after the final newline) * local_prompt_prefix = portion before last newline of rl_display_prompt, *			 expanded via expand_prompt * visible_length = number of visible characters in local_prompt * prefix_length = number of visible characters in local_prompt_prefix * * This function is called once per call to readline().  It may also be * called arbitrarily to expand the primary prompt. * * The return value is the number of visible characters on the last line * of the (possibly multi-line) prompt. */intrl_expand_prompt (prompt)     char *prompt;{  char *p, *t;  int c;  /* Clear out any saved values. */  if (local_prompt)    free (local_prompt);  if (local_prompt_prefix)    free (local_prompt_prefix);  local_prompt = local_prompt_prefix = (char *)0;  p = strrchr (prompt, '\n');  if (!p)    {      /* The prompt is only one line. */      local_prompt = expand_prompt (prompt, &visible_length);      local_prompt_prefix = (char *)0;      return (visible_length);    }  else    {      /* The prompt spans multiple lines. */      t = ++p;      local_prompt = expand_prompt (p, &visible_length);      c = *t; *t = '\0';      /* The portion of the prompt string up to and including the	 final newline is now null-terminated. */      local_prompt_prefix = expand_prompt (prompt, &prefix_length);      *t = c;      return (prefix_length);    }}/* Basic redisplay algorithm. */voidrl_redisplay (){  register int in, out, c, linenum;  register char *line = invisible_line;  int c_pos = 0, inv_botlin = 0, wrap_offset, wrap_column;  char *prompt_this_line;  if (!readline_echoing_p)    return;  if (!rl_display_prompt)    rl_display_prompt = "";  if (!invisible_line)    {      visible_line = xmalloc (line_size);      invisible_line = xmalloc (line_size);      line = invisible_line;      for (in = 0; in < line_size; in++)	{	  visible_line[in] = 0;	  invisible_line[in] = 1;	}      rl_on_new_line ();    }  /* Draw the line into the buffer. */  c_pos = -1;  /* Mark the line as modified or not.  We only do this for history     lines. */  out = 0;  if (_rl_mark_modified_lines && current_history () && rl_undo_list)    {      line[out++] = '*';      line[out] = '\0';    }  /* If someone thought that the redisplay was handled, but the currently     visible line has a different modification state than the one about     to become visible, then correct the caller's misconception. */  if (visible_line[0] != invisible_line[0])    rl_display_fixed = 0;  /* If the prompt to be displayed is the `primary' readline prompt (the     one passed to readline()), use the values we have already expanded.     If not, use what's already in rl_display_prompt.  WRAP_OFFSET is the     number of non-visible characters in the prompt string. */  if (rl_display_prompt == rl_prompt)    {      int local_len = local_prompt ? strlen (local_prompt) : 0;      if (local_prompt_prefix && forced_display)	_rl_output_some_chars (local_prompt_prefix, strlen (local_prompt_prefix));      if (local_len > 0)	strncpy (line + out, local_prompt, local_len);      out += local_len;      line[out] = '\0';      wrap_offset = local_len - visible_length;    }  else    {      int pmtlen;      prompt_this_line = strrchr (rl_display_prompt, '\n');      if (!prompt_this_line)	prompt_this_line = rl_display_prompt;      else	{	  prompt_this_line++;	  if (forced_display)	    _rl_output_some_chars (rl_display_prompt, prompt_this_line - rl_display_prompt);	}      pmtlen = strlen (prompt_this_line);      strncpy (line + out,  prompt_this_line, pmtlen);      out += pmtlen;      line[out] = '\0';      wrap_offset = 0;    }  for (in = 0; in < rl_end; in++)    {      c = (unsigned char)rl_line_buffer[in];      if (out + 8 >= line_size)		/* XXX - 8 for \t */	{	  line_size *= 2;	  visible_line = xrealloc (visible_line, line_size);	  invisible_line = xrealloc (invisible_line, line_size);	  line = invisible_line;	}      if (in == rl_point)	c_pos = out;      if (META_CHAR (c))	{	  if (_rl_output_meta_chars == 0)	    {	      sprintf (line + out, "\\%o", c);	      out += 4;	    }	  else	    line[out++] = c;	  	}#if defined (DISPLAY_TABS)      else if (c == '\t')	{	  register int newout = (out | (int)7) + 1;	  while (out < newout)	    line[out++] = ' ';	}#endif      else if (c < ' ')	{	  line[out++] = '^';	  line[out++] = UNCTRL (c);	/* XXX was c ^ 0x40 */	}      else if (c == 127)	{	  line[out++] = '^';	  line[out++] = '?';	}      else	line[out++] = c;    }  line[out] = '\0';  if (c_pos < 0)    c_pos = out;  /* C_POS == position in buffer where cursor should be placed. */  /* PWP: now is when things get a bit hairy.  The visible and invisible     line buffers are really multiple lines, which would wrap every     (screenwidth - 1) characters.  Go through each in turn, finding     the changed region and updating it.  The line order is top to bottom. */  /* If we can move the cursor up and down, then use multiple lines,

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美精品一区二区三区四区| 成人99免费视频| 一区二区高清在线| 亚洲欧洲www| 国产精品美女久久久久高潮| 欧美岛国在线观看| 精品盗摄一区二区三区| 欧美不卡一区二区三区四区| 欧美精品一区二区三区很污很色的 | 国模冰冰炮一区二区| 美女一区二区久久| 国产精选一区二区三区| 国产盗摄女厕一区二区三区| 成人午夜私人影院| 色综合久久88色综合天天6| 在线免费观看一区| 91精品国产色综合久久久蜜香臀| 日韩视频永久免费| 久久先锋影音av鲁色资源| 国产精品美女一区二区| 亚洲精品五月天| 日本不卡一二三| 国产99一区视频免费| 91久久香蕉国产日韩欧美9色| 欧美日韩国产高清一区二区三区| 欧美精品精品一区| 欧美激情一区二区三区蜜桃视频| 亚洲视频免费观看| 蜜臀久久99精品久久久画质超高清 | 亚洲日本青草视频在线怡红院| 亚洲免费av网站| 麻豆国产精品视频| 91麻豆福利精品推荐| 91精品国产高清一区二区三区 | 国产精品久久久久影院亚瑟| 一区二区三区在线视频免费 | 国产精品久久久久天堂| 亚洲妇熟xx妇色黄| 国产成+人+日韩+欧美+亚洲| 欧美体内she精高潮| 久久久久久日产精品| 一级中文字幕一区二区| 国产精品一区二区久久精品爱涩| 色噜噜偷拍精品综合在线| 26uuu久久综合| 亚洲综合激情小说| 成人精品免费网站| 精品欧美久久久| 亚洲国产另类av| 成人午夜在线播放| 久久久久久一二三区| 视频一区在线视频| 色哟哟一区二区三区| 精品国产在天天线2019| 五月天国产精品| 91国偷自产一区二区三区观看| 国产亚洲欧美日韩在线一区| 奇米精品一区二区三区在线观看| 91麻豆国产自产在线观看| 国产蜜臀97一区二区三区 | 精品乱人伦小说| 亚洲h在线观看| 在线看日韩精品电影| 国产精品久久久久久久久久免费看| 久久99深爱久久99精品| 337p亚洲精品色噜噜噜| 亚洲国产成人高清精品| 在线看不卡av| 一区二区三区在线播| 91免费版在线| 亚洲日本青草视频在线怡红院| 丁香婷婷深情五月亚洲| 国产精品美女www爽爽爽| 国产999精品久久久久久绿帽| 精品国产不卡一区二区三区| 另类小说视频一区二区| 欧美大尺度电影在线| 极品少妇xxxx精品少妇偷拍 | 国产精品69毛片高清亚洲| 国产一区二区在线电影| 国产成人小视频| 国产麻豆精品视频| 91久久线看在观草草青青| 最新国产精品久久精品| 从欧美一区二区三区| 国产精品入口麻豆原神| 成人亚洲一区二区一| 中文字幕成人av| 99久久伊人精品| 亚洲一区二区中文在线| 在线播放中文字幕一区| 美国十次综合导航| 国产欧美精品一区二区色综合朱莉| 国产激情视频一区二区三区欧美| 久久精品视频一区二区三区| 成+人+亚洲+综合天堂| 一二三区精品福利视频| 精品sm捆绑视频| 精品处破学生在线二十三| 天天操天天色综合| 日韩三级在线观看| 国产一区视频导航| 亚洲欧美在线aaa| 欧美顶级少妇做爰| 国产成人亚洲综合a∨婷婷图片 | 日本最新不卡在线| 久久久综合视频| 色香蕉成人二区免费| 免费高清视频精品| 国产精品久久久久久户外露出| 色婷婷综合久久久中文字幕| 日本不卡在线视频| 国产精品久久久久一区二区三区共| 精品视频1区2区| 国产xxx精品视频大全| 五月婷婷综合在线| 国产精品视频一二三区 | 精品久久久久久无| 99re这里都是精品| 狠狠色丁香婷婷综合| 一级做a爱片久久| 亚洲国产成人私人影院tom | 欧美二区乱c少妇| 不卡的看片网站| 精品亚洲成a人| 亚洲国产cao| 最近中文字幕一区二区三区| 精品国产一二三| 欧美精品色一区二区三区| 99精品国产99久久久久久白柏| 蜜臀久久99精品久久久久宅男| 亚洲精品高清在线| 国产精品丝袜黑色高跟| 久久欧美中文字幕| 日韩视频免费直播| 在线播放欧美女士性生活| 日本精品免费观看高清观看| 丁香一区二区三区| 国产精选一区二区三区| 麻豆成人综合网| 日韩成人伦理电影在线观看| 亚洲二区在线视频| 亚洲午夜免费电影| 亚洲综合一二三区| 亚洲自拍欧美精品| 亚洲自拍偷拍综合| 亚洲一区二区3| 亚洲一区二区五区| 亚洲图片自拍偷拍| 亚洲综合色在线| 亚洲一区二区三区在线播放| 亚洲美女视频在线观看| 亚洲精品国产无套在线观| 亚洲欧美一区二区三区孕妇| 中文字幕一区二区三中文字幕| 国产精品美女一区二区| 亚洲天堂av老司机| 亚洲黄网站在线观看| 亚洲第一会所有码转帖| 日韩激情中文字幕| 久久99国产乱子伦精品免费| 国产一区三区三区| 不卡视频免费播放| 在线欧美小视频| 欧美一级淫片007| 精品少妇一区二区三区免费观看 | 韩国成人在线视频| 国产成人小视频| 色偷偷88欧美精品久久久| 欧美在线啊v一区| 91麻豆精品国产91| 欧美精品一区二区三区久久久| 久久久久国产一区二区三区四区 | 97久久精品人人做人人爽| 97精品视频在线观看自产线路二| 色系网站成人免费| 欧美一级久久久| 国产精品你懂的| 亚洲h精品动漫在线观看| 久久国产精品免费| 色婷婷综合久久久久中文| 欧美日韩精品免费| 国产视频不卡一区| 亚洲精品欧美二区三区中文字幕| 视频在线在亚洲| 懂色av一区二区在线播放| 欧美日韩在线一区二区| 久久久久九九视频| 亚洲国产成人av| 国产99精品在线观看| 欧美老女人第四色| 国产精品拍天天在线| 视频一区在线播放| 91网站黄www| 日韩精品一区二区三区视频| 自拍av一区二区三区| 久久99国产精品免费| 欧美亚洲一区二区三区四区| 久久精品人人做人人爽97| 婷婷中文字幕一区三区|