亚洲欧美第一页_禁久久精品乱码_粉嫩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久久婷婷国产| 51精品国自产在线| 亚洲伦在线观看| 国产成人综合亚洲网站| 制服丝袜av成人在线看| 亚洲欧美一区二区久久| 国产成人av资源| 日韩精品一区二区三区三区免费 | 成人欧美一区二区三区白人| 蜜臀久久久久久久| 欧美三级在线播放| 一区二区三区**美女毛片| 丁香六月综合激情| 国产亚洲自拍一区| 精品在线播放免费| 欧美一区二区网站| 午夜精品在线视频一区| 欧美亚洲综合久久| 亚洲综合男人的天堂| 日本韩国精品一区二区在线观看| 国产精品另类一区| 成人黄色片在线观看| 中文字幕巨乱亚洲| 北岛玲一区二区三区四区 | 日韩一区国产二区欧美三区| 亚洲综合一区二区精品导航| 91黄色免费网站| 亚洲电影第三页| 精品视频资源站| 丝袜亚洲另类欧美| 91麻豆精品国产91久久久久久| 日韩国产欧美在线观看| 欧美精品久久一区二区三区| 丝袜美腿一区二区三区| 91精品麻豆日日躁夜夜躁| 秋霞午夜av一区二区三区| 91精品国产综合久久久蜜臀图片 | 欧美一区二区三区视频| 青娱乐精品在线视频| 亚洲精品在线观看视频| 国产a区久久久| 亚洲视频一区在线| 欧美午夜影院一区| 美女视频一区二区| 欧美激情一区二区三区在线| 色综合天天狠狠| 日韩黄色免费网站| 精品国产凹凸成av人导航| 成人国产精品免费观看| 亚洲综合免费观看高清完整版在线| 欧美绝品在线观看成人午夜影视| 久久99精品久久久久婷婷| 国产精品午夜在线| 91高清在线观看| 久久精品国产精品亚洲综合| 日本一区二区视频在线观看| 91黄视频在线观看| 精品亚洲成a人在线观看| 18欧美亚洲精品| 91精品国产入口| 高清在线观看日韩| 亚欧色一区w666天堂| 国产丝袜欧美中文另类| 欧美日韩国产乱码电影| 国产传媒日韩欧美成人| 天堂影院一区二区| 日本一区二区三区在线不卡 | 奇米色一区二区| 亚洲色大成网站www久久九九| 欧美一二三四在线| 色婷婷久久久久swag精品| 久草精品在线观看| 一个色在线综合| 日本一区二区在线不卡| 欧美美女激情18p| 91丨porny丨最新| 国产自产视频一区二区三区| 亚洲一区二区不卡免费| 国产欧美日韩麻豆91| 不卡在线视频中文字幕| 精品一区二区在线视频| 亚洲一级在线观看| 国产精品网站在线观看| 日韩三级高清在线| 日本韩国视频一区二区| 99精品热视频| 高清国产一区二区| 国产真实乱对白精彩久久| 亚洲一区二区三区四区的| 亚洲欧美怡红院| 久久久精品人体av艺术| 精品久久久久99| 在线电影欧美成精品| 欧美日韩高清不卡| 色欧美日韩亚洲| 91啪亚洲精品| 色伊人久久综合中文字幕| 99久久国产免费看| 不卡的电影网站| 99re热这里只有精品免费视频| 国产91丝袜在线播放| 国产在线日韩欧美| 久久99国内精品| 国产自产2019最新不卡| 精品一区二区三区的国产在线播放| 三级亚洲高清视频| 日本不卡视频在线| 美女精品一区二区| 韩国欧美国产一区| 精品写真视频在线观看| 国内外成人在线| 国产裸体歌舞团一区二区| 国产一区中文字幕| 国产成a人亚洲精| 成人av资源下载| 一本色道久久综合精品竹菊 | 成人午夜视频在线| 岛国精品在线播放| 一本一道久久a久久精品| 91国产精品成人| 欧美高清你懂得| 欧美xxxxxxxxx| 欧美国产乱子伦| 亚洲欧美另类小说| 亚洲成人中文在线| 精品在线视频一区| 成人精品视频网站| 91高清在线观看| 日韩欧美另类在线| 国产精品每日更新在线播放网址| 亚洲私人影院在线观看| 午夜私人影院久久久久| 日本不卡的三区四区五区| 国产激情视频一区二区在线观看 | 成人一级黄色片| 91美女蜜桃在线| 欧美一区二区三区人| 久久久不卡网国产精品一区| 亚洲人一二三区| 日本中文在线一区| 成人不卡免费av| 欧美精品一二三| 国产丝袜美腿一区二区三区| 亚洲一级在线观看| 国产精品综合在线视频| 欧美午夜一区二区三区免费大片| 欧美电视剧在线观看完整版| 亚洲色图在线播放| 麻豆精品在线播放| 91在线精品一区二区三区| 欧美一级在线观看| 成人欧美一区二区三区| 久久精品国产99国产| 91久久一区二区| 久久―日本道色综合久久 | 亚洲欧美色图小说| 久久99在线观看| 欧美最猛黑人xxxxx猛交| 久久品道一品道久久精品| 亚洲国产欧美在线人成| 粉嫩13p一区二区三区| 在线成人小视频| 亚洲美腿欧美偷拍| 国产成人免费av在线| 日韩欧美国产电影| 亚洲免费看黄网站| 国产盗摄精品一区二区三区在线| 欧美精品777| 亚洲宅男天堂在线观看无病毒| 国产美女精品一区二区三区| 欧美精品一级二级三级| 亚洲另类春色校园小说| 成人h精品动漫一区二区三区| 精品国一区二区三区| 日韩av一级片| 欧美日本一区二区| 亚洲综合色噜噜狠狠| 97精品超碰一区二区三区| 欧美国产日韩在线观看| 九一九一国产精品| 欧美一级欧美三级| 亚洲电影一区二区三区| 色综合天天做天天爱| 国产精品乱人伦中文| 成人激情校园春色| 国产拍欧美日韩视频二区| 国产伦精品一区二区三区免费 | 狠狠v欧美v日韩v亚洲ⅴ| 91精品国产色综合久久| 日韩制服丝袜av| 欧美一级片免费看| 裸体健美xxxx欧美裸体表演| 欧美久久久一区| 全国精品久久少妇| 欧美xfplay| 国产精品自拍一区| 国产日产欧产精品推荐色| 国产精品一区二区在线播放|