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

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

?? charget.c

?? 該程序是C語言編寫的
?? C
字號:
/****************************************************************/
/* Getch() routines of the PCcurses package			*/
/*								*/
/****************************************************************/
/* This version of curses is based on ncurses, a curses version	*/
/* originally written by Pavel Curtis at Cornell University.	*/
/* I have made substantial changes to make it run on IBM PC's,	*/
/* and therefore consider myself free to make it public domain.	*/
/*				Bjorn Larsson (bl@infovox.se)	*/
/****************************************************************/
/* 1.4:  Routines that ended in while-loops now end		*/
/*	 with return(ERR) to avoid compiler warnings.		*/
/*	 Use of short wherever possible. Portability		*/
/*	 improvements:					900114	*/
/* 1.3:	 MSC -W3, Turbo'C' -w -w-pro checkes:		881005	*/
/* 1.2:	 #undef:ine of getch now covers all the file, to	*/
/*	 make sure this module's getch() calls go to DOS,	*/
/*	 not to the PCCurses 'getch()' function. Fixed		*/
/*	 thanks to N.D. Pentcheff:			881002	*/
/* 1.1:	 Bug fixes: call to _curseskeytest() changed		*/
/*	 _curseskeytst(). Test of that routine also		*/
/*	 lacked () in one place:			870907	*/
/* 1.0:	 Release:					870515	*/
/****************************************************************/

#include <curses.h>
#include <curspriv.h>

#undef getch				/* We use MSC getch() below */
#undef ungetch

#include <conio.h>

static	short	rawgetch();		/* get raw char via BIOS */
static	short	sysgetch();		/* get char via system */
static	short	validchar();		/* keypad xlate and char check */

char _curses_charget_rcsid[] = "@(#)charget.c    v.1.4  - 900114";

static	short	buffer[_INBUFSIZ];	/* character buffer */
static	short	pindex = 0;		/* putter index */
static	short	gindex = 1;		/* getter index */
static	WINDOW *w;			/* to reduce stack usage */
static	short	ungind = 0;		/* wungetch() push index */
static	short	ungch[NUNGETCH];	/* array of ungotten chars */

/* Table for key code translation of function keys in keypad mode */
/* These values are for strict IBM keyboard compatibles only */

static	short	kptab[] =
  {
  0x3b,KEY_F(1),  0x3c,KEY_F(2),  0x3d,KEY_F(3),  0x3e,KEY_F(4),
  0x3f,KEY_F(5),  0x40,KEY_F(6),  0x41,KEY_F(7),  0x42,KEY_F(8),
  0x43,KEY_F(9),  0x44,KEY_F(10), 0x47,KEY_HOME,  0x48,KEY_UP,
  0x49,KEY_PPAGE, 0x4b,KEY_LEFT,  0x4d,KEY_RIGHT, 0x4f,KEY_LL,
  0x50,KEY_DOWN,  0x51,KEY_NPAGE, 0x52,KEY_IC,    0x53,KEY_DC,
  0x54,KEY_F(11), 0x55,KEY_F(12), 0x56,KEY_F(13), 0x57,KEY_F(14),
  0x58,KEY_F(15), 0x59,KEY_F(16), 0x5a,KEY_F(17), 0x5b,KEY_F(18),
  0x5c,KEY_F(19), 0x5d,KEY_F(20), 0x5e,KEY_F(21), 0x5f,KEY_F(22),
  0x60,KEY_F(23), 0x61,KEY_F(24), 0x62,KEY_F(25), 0x63,KEY_F(26),
  0x64,KEY_F(27), 0x65,KEY_F(28), 0x66,KEY_F(29), 0x67,KEY_F(30),
  0x73,KEY_LEFT,  0x74,KEY_RIGHT,  0x75,KEY_LL,   0x76,KEY_NPAGE,
  0x77,KEY_HOME,  0x84,KEY_PPAGE,  0x100,        -1
  };

/****************************************************************/
/* Wgetch(win) gets a character from the terminal, in normal,	*/
/* cbreak or raw mode, optionally echoing to window  'win'.	*/
/****************************************************************/

int wgetch(win)
  WINDOW	*win;
  {
  short	key;
  short	cbr;

  if (ungind)					/* if ungotten char exists */
    return(ungch[--ungind]);			/* remove and return it */

  if ((!_cursvar.raw) && (!_cursvar.cbreak))	/* if normal */
    if (gindex < pindex)			/* and data in buffer */
      return(buffer[gindex++]);

  w = win;					/* static for speed & stack */
  pindex = 0;					/* prepare to buffer data */
  gindex = 0;
  while(1)					/* loop for any buffering */
    {
    if (_cursvar.raw)				/* get a raw character */
      key = rawgetch();
    else					/* get a system character */
      {
      cbr = _cursesgcb();			/* get ^BREAK status */
      _cursesscb(_cursvar.orgcbr);		/* if break return proper */
      key = sysgetch();
      _cursesscb(cbr);				/* restore as it was */
      }
    if (w->_nodelay && (key == -1))		/* if nodelay and no char */
      return(-1);
    if ((key == '\r') && _cursvar.autocr && !_cursvar.raw) /* translate cr */
      key = '\n';
    if (_cursvar.echo && (key < 0x100))		/* check if echo */
      {
      waddch(w,key);
      wrefresh(w);
      }
    if (_cursvar.raw || _cursvar.cbreak)	/* if no buffering */
      return(key);
    if (pindex < _INBUFSIZ-2)			/* if no overflow, */
      buffer[pindex++] = key;			/* put data in buffer */
    if ((key == '\n') || (key == '\r'))		/* if we got a line */
      return(buffer[gindex++]);
    } /* while */
  return (ERR);					/* Can't happen */
  } /* wgetch */

/****************************************************************/
/* Flushinp() kills any pending input characters.		*/
/****************************************************************/

void flushinp()
  {
  while(_curseskeytst())		/* empty keyboard buffer */
    _curseskey();
  while(kbhit())			/* empty system's buffers */
    (void) getch();
  gindex = 1;				/* set indices to kill buffer */
  pindex = 0;
  ungind = 0;				/* clear ungch array */
  } /* flushinp */

/****************************************************************/
/* Wungetch() pushes back it's argument on the input stream. If	*/
/* OK, returns 1, otherwise returns 0.				*/
/****************************************************************/

int	wungetch(ch)
  int 	ch;
  {
  if (ungind >= NUNGETCH)		/* pushback stack full */
    return(0);
  ungch[ungind++] = ch;
  return(1);
  } /* wungetch() */

/****************************************************************/
/* Mvgetch() first moves the stdscr cursor to a new location,	*/
/* then does a wgetch() on stdscr.				*/
/****************************************************************/

int	mvgetch(y,x)
  int y;
  int x;
  {
  wmove(stdscr,y,x);
  return(wgetch(stdscr));
  } /* mvgetch */

/****************************************************************/
/* Mvwgetch() first moves the cursor of window 'win' to a new	*/
/* location, then does a wgetch() in 'win'.			*/
/****************************************************************/

int mvwgetch(win,y,x)
  WINDOW *win;
  int y;
  int x;
  {
  wmove(win,y,x);
  return(wgetch(win));
  } /* mvwgetch */

/****************************************************************/
/* rawgetch() gets a character without any interpretation at	*/
/* all and returns it. If keypad mode is active for the desig-	*/
/* nated window, function key translation will be performed.	*/
/* Otherwise, function keys are ignored.If nodelay mode is	*/
/* active in the window, then rawgetch() returns -1 if no cha-	*/
/* racter is available.						*/
/****************************************************************/

static short rawgetch()
  {
  short	c;

  if (w->_nodelay && !_curseskeytst())
    return(-1);
  while(1)  					/* loop to get valid char */
    {
    if ((c = validchar(_curseskey())) >= 0)
      return(c);
    } /* while */
  return (ERR);					/* Can't happen */
  } /* rawgetch */

/****************************************************************/
/* Sysgetch() gets a character with normal ^S, ^Q, ^P and ^C	*/
/* interpretation and returns it. If keypad mode is active for	*/
/* the designated window, function key translation will be per-	*/
/* formed. Otherwise, function keys are ignored. If nodelay	*/
/* mode is active in the window, then sysgetch() returns -1 if	*/
/* no character is available.					*/
/****************************************************************/

static short sysgetch()
  {
  short	c;

  if (w->_nodelay && !kbhit())
    return(-1);
  while(1)
    {
    c = getch();
    if (c)					/* if not a function key */
      return(c & 0xff);				/* avoids sign-extending */
    c = getch();
    if ((c = validchar(c << 8)) >= 0)		/* get & check next char */
      return(c);
    } /* while */
  return (ERR);					/* Can't happen */
  } /* sysgetch */

/****************************************************************/
/* Validchar(c) chacks that 'c' is a valid character, and	*/
/* if so returns it, with function key translation applied if	*/
/* 'w' has keypad mode set. If char is invalid, returns -1.	*/
/****************************************************************/

static short validchar(c)
  int	c;
  {
  short *scanp;

  if (c == 0x0300)			/* special case, ^@ = NULL */
    return(0);
  if (!(c & 0xff00))			/* normal character */
    return(c);
  if (!(w->_keypad))			/* skip f keys if not keypad mode */
    return(-1);
  c = (c >> 8) & 0xff;
  scanp = kptab;
  while(*scanp <= c)			/* search for value */
    {					/* (stops on table entry 0x100) */
    if (*scanp++ == c)
      return(*scanp);			/* found, return it */
    scanp++;
    }
  return(-1);				/* not found, invalid */
  } /* validchar */

/****************************************************************/
/* _cursespendch() returns 1 if there is any character avai-	*/
/* lable, and 0 if there is none. This is not for programmer	*/
/* usage, but for the updatew routines.				*/
/****************************************************************/

bool	_cursespendch()
  {
  if (ungind)				/* ungotten char */
    return(TRUE);
  if (pindex > gindex)			/* buffered char */
    return(TRUE);
  if (_cursvar.raw)			/* raw mode test */
    return(_curseskeytst());
  return((bool)kbhit());		/* normal mode test */
  } /* _cursespendch */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美视频中文字幕| 日韩你懂的在线观看| 极品少妇xxxx精品少妇| 午夜精品一区二区三区免费视频 | 91视频xxxx| 丰满放荡岳乱妇91ww| 国产综合色视频| 国产一区二区三区香蕉| 精品在线播放免费| 国产精品1024久久| 成人网在线免费视频| 不卡视频在线看| 91视视频在线直接观看在线看网页在线看| 国产91在线观看丝袜| 成a人片国产精品| 97精品视频在线观看自产线路二| 97国产一区二区| 欧美亚洲国产一卡| 欧美精品99久久久**| 日韩欧美国产综合一区| 精品av久久707| 日本一区二区视频在线| 亚洲青青青在线视频| 亚洲高清免费在线| 日韩av一二三| 韩国精品主播一区二区在线观看 | 欧美日韩成人一区| 日韩午夜在线观看视频| 久久久久久久电影| 一区二区三区四区激情 | 91精品国产综合久久精品性色 | 麻豆成人免费电影| 粉嫩aⅴ一区二区三区四区| 91免费在线看| 日韩午夜在线播放| 国产精品国产精品国产专区不片| 亚洲一区二区在线免费看| 久久成人麻豆午夜电影| 成av人片一区二区| 欧美岛国在线观看| 亚洲色图欧美在线| 精品一区二区三区视频在线观看| 成人免费高清在线| 日韩亚洲欧美在线| 亚洲免费av高清| 黄网站免费久久| 色婷婷激情久久| 久久久久国产精品人| 亚洲最大色网站| 国产成人精品午夜视频免费| 欧美精品色一区二区三区| 国产偷国产偷亚洲高清人白洁 | 狠狠色2019综合网| 在线一区二区三区做爰视频网站| 欧美一区二区三区成人| 亚洲免费资源在线播放| 国产麻豆视频一区| 欧美一级精品大片| 亚洲图片有声小说| 91在线播放网址| 久久免费看少妇高潮| 午夜精品久久久久久久99水蜜桃| 99热精品国产| 国产网站一区二区三区| 九九久久精品视频| 日韩一区二区在线观看| 亚洲国产日韩一级| av色综合久久天堂av综合| 久久这里都是精品| 久久9热精品视频| 91精品国产综合久久精品app| 亚洲欧美激情小说另类| av电影在线观看不卡| 中文字幕第一区第二区| 国产v综合v亚洲欧| 国产肉丝袜一区二区| 国产精品一二三四| 久久这里都是精品| 国产不卡视频在线播放| 欧美激情资源网| 大尺度一区二区| 中文字幕不卡在线播放| av影院午夜一区| 亚洲欧洲韩国日本视频| 一本到不卡精品视频在线观看| 国产精品乱人伦| 99国产一区二区三精品乱码| 亚洲色欲色欲www| 色婷婷精品大在线视频| 亚洲午夜三级在线| 欧美日韩国产精品自在自线| 日韩av高清在线观看| 日韩欧美激情在线| 国产成人综合视频| 自拍偷拍亚洲综合| 欧美日韩国产综合久久| 蜜臀久久久久久久| 欧美成人欧美edvon| 粉嫩av一区二区三区| 亚洲裸体在线观看| 欧美一区二区三区日韩| 国产最新精品免费| 日韩一区日韩二区| 制服丝袜中文字幕一区| 国产综合一区二区| 樱桃国产成人精品视频| 在线综合亚洲欧美在线视频| 国模少妇一区二区三区| 亚洲精品成人悠悠色影视| 制服丝袜亚洲精品中文字幕| 国产91露脸合集magnet| 亚洲一区二区综合| 国产色91在线| 91国产免费看| 久草中文综合在线| 一区二区三区在线免费观看| 日韩你懂的在线播放| 91在线porny国产在线看| 美国三级日本三级久久99| 国产精品久久久久9999吃药| 欧美妇女性影城| 成人精品高清在线| 麻豆成人av在线| 亚洲综合激情另类小说区| 久久久蜜桃精品| 欧美精品高清视频| 91免费视频观看| 国产一区二区三区在线看麻豆 | 欧美日韩激情一区二区| 久久成人18免费观看| 一区二区三区在线影院| 国产片一区二区三区| 欧美一区二区高清| 欧美日韩综合在线| 成人免费视频播放| 紧缚奴在线一区二区三区| 亚洲成人第一页| 亚洲三级免费观看| 国产欧美一区二区在线观看| 日韩三级免费观看| 欧美人伦禁忌dvd放荡欲情| 一本色道综合亚洲| 99精品视频在线观看免费| 国产乱妇无码大片在线观看| 日本欧美韩国一区三区| 亚洲第一搞黄网站| 一区二区三区四区不卡在线| 亚洲同性同志一二三专区| 国产日韩精品久久久| 久久久久久久久久电影| 欧美精品一区二区在线播放 | 欧美变态tickle挠乳网站| 欧美色成人综合| 欧美自拍偷拍一区| 色菇凉天天综合网| 欧美中文字幕一区二区三区亚洲| 成人app软件下载大全免费| 懂色av一区二区三区免费看| 国产成人一区二区精品非洲| 国产乱码精品一区二区三区忘忧草| 美女性感视频久久| 国产在线精品视频| 国产精品中文字幕日韩精品 | 国产精品私人影院| 国产精品福利一区二区三区| 中文字幕一区日韩精品欧美| 亚洲欧美日韩电影| 亚洲资源中文字幕| 亚洲第一激情av| 蜜臀av国产精品久久久久| 韩国av一区二区三区| 成人av集中营| 91久久国产最好的精华液| 欧美无乱码久久久免费午夜一区| 欧美精品久久天天躁| 日韩美女主播在线视频一区二区三区| 日韩精品一区二区三区视频播放 | 丁香婷婷综合色啪| 91色乱码一区二区三区| 欧美日韩国产高清一区二区| 欧美va在线播放| 欧美激情综合在线| 一级日本不卡的影视| 五月婷婷综合激情| 国产美女精品人人做人人爽| 色婷婷久久久综合中文字幕| 91精品麻豆日日躁夜夜躁| 国产欧美日韩麻豆91| 亚洲成人av中文| 国产精品一区二区免费不卡| 色综合久久中文字幕| 日韩欧美亚洲国产另类| 中文字幕亚洲在| 热久久免费视频| 成人妖精视频yjsp地址| 欧美日韩二区三区| 国产精品三级视频| 免费欧美日韩国产三级电影| 成年人网站91| 精品国产伦一区二区三区观看体验|