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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? getchturbo.c

?? linux下想使用turboc的人有福了
?? C
字號:
/*  TurboC, a library for porting Borland Turbo C to GNU gcc.  Copyright 2002 Ronald S. Burkey   This library is free software; you can redistribute it and/or  modify it under the terms of the GNU Lesser General Public  License as published by the Free Software Foundation; either  version 2.1 of the License, or (at your option) any later version.  This 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  Lesser General Public License for more details.  You should have received a copy of the GNU Lesser General Public  License along with this library; if not, write to the Free Software  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA    Contact Ron Burkey at info@sandroid.org.  Filename:	getchTurbo.c  Purpose:	A Turbo C conio function getch.  Mod history:	01/31/02 RSB	Created.  		03/02/02 RSB	Added actual code.		03/16/02 RSB	In the n2g array, changed the comments 				from hex to octal, to make it easier'				to match against ncurses.h.		03/32/02 RSB	Added KEY_RESIZE/N_RESIZE.		04/20/02 RSB	Found yet other function-key sequences				for F1-F5,F10 when running remotely.		05/09/02 RSB	Allowed for secondary keyboard buffer, for				getting input from the graphics window.						*/#include <stdio.h>#include "conio.h"#include "fnkeys.h"//-----------------------------------------------------------------------// ncurses returns various special keys as codes in the range 0x100-0x1ff.// Borland's getch function returns these as 2-code sequences:  // 0, followed by some other code (from fnkeys.h).  The following table// converts (where non-zero) from ncurses to the 2nd Borland code.static const char n2g[] = {  /* 0400 */ 0, 0, N_DOWN, N_UP, N_LEFT, N_RIGHT, 0, 0,  /* 0410 */ 0, N_F1, N_F2, N_F3, N_F4, N_F5, N_F6, N_F7,  /* 0420 */ N_F8, N_F9, N_F10, 0, 0, S_F1, S_F2, S_F3,  /* 0430 */ S_F4, S_F5, S_F6, S_F7, S_F8, 0, 0, 0,  /* 0440 */ 0, 0, 0, 0, 0, 0, 0, 0,  /* 0450 */ 0, 0, 0, 0, 0, 0, 0, 0,  /* 0460 */ 0, 0, 0, 0, 0, 0, 0, 0,  /* 0470 */ 0, 0, 0, 0, 0, '=', '/', '*',  /* 0500 */ N_PADMINUS, N_PADPLUS, 0, 0, 0, 0, 0, 0,  /* 0510 */ 0, 0, N_DEL, N_INS, 0, 0, 0, 0,  /* 0520 */ 0, 0, N_PGDN, N_PGUP, 0, 0, 0, '\r',  /* 0530 */ 0, 0, 0, 0, 0, 0, 0, 0,  /* 0540 */ 0, 0, 0, 0, 0, 0, 0, 0,  /* 0550 */ 0, 0, N_HOME, 0, 0, 0, 0, 0,  /* 0560 */ 0, 0, 0, 0, 0, 0, 0, 0,  /* 0570 */ 0, 0, 0, 0, 0, 0, 0, '.',  /* 0600 */ 0, N_END, 0, 0, 0, 0, 0, 0,  /* 0610 */ 0, 0, 0, 0, 0, 0, 0, 0,  /* 0620 */ 0, 0, 0, 0, 0, 0, 0, 0};// Alternate keys.static const enum N_NAMES AltAlphabetic[] ={  A_A, A_B, A_C, A_D, A_E, A_F, A_G, A_H, A_I, A_J, A_K, A_L, A_M,  A_N, A_O, A_P, A_Q, A_R, A_S, A_T, A_U, A_V, A_W, A_X, A_Y, A_Z};static const enum N_NAMES AltDigits[] ={  A_0, A_1, A_2, A_3, A_4, A_5, A_6, A_7, A_8, A_9};//-----------------------------------------------------------------------// A buffer, for ungetching.#define MAX_UNGETCH 128static int NumUngetch = 0;static char UngetchBuffer[MAX_UNGETCH];FILE *KeyLog = NULL;//----------------------------------------------------------------------// Trap numeric keypad digits.voidKeypadDigit (int *KeyCode){  switch (*KeyCode)    {    case 0x188:      *KeyCode = '0';      break;    case 0x182:      *KeyCode = '1';      break;    case 0x18c:      *KeyCode = '2';      break;    case 0x150:      *KeyCode = '3';      break;    case 0x189:      *KeyCode = '4';      break;    case 0x17a:      *KeyCode = '5';      break;    case 0x192:      *KeyCode = '6';      break;    case 0x187:      *KeyCode = '7';      break;    case 0x18e:      *KeyCode = '8';      break;    case 0x151:      *KeyCode = '9';      break;    default:      break;    }}//-----------------------------------------------------------------------intgetchTurbo (void){#define MAX_ESCAPE_SEQUENCE 16  char c;  int KeyCode;  int EscapeSequence[MAX_ESCAPE_SEQUENCE], NumEscapeSequence = 0;  //if (!ConioInitialized)  //  textmode (LASTMODE);  // First take care of any ungetched keystrokes, or buffered multi-code   // keystrokes like up/down arrows.  if (NumUngetch)    return (UngetchBuffer[--NumUngetch]);  // No buffered codes.  Wait for a real keystroke.   for (;;)    {      while (kbhit () == 0);      if (TcExtractKeybuf (&c))	KeyCode = getchNcurses ();      else	KeyCode = c;      if (KeyLog != NULL)	fwrite (&KeyCode, sizeof (KeyCode), 1, KeyLog);      if (KeyCode == KEY_RESIZE)	continue;      KeypadDigit (&KeyCode);      // Trap escape sequences.       if (KeyCode == '\x1b')	{	  NumEscapeSequence = 0;	  while (kbhit () != 0 && NumEscapeSequence < MAX_ESCAPE_SEQUENCE)	    {	      if (TcExtractKeybuf (&c))		KeyCode = getchNcurses ();	      else		KeyCode = c;	      if (KeyLog != NULL)		fwrite (&KeyCode, sizeof (KeyCode), 1, KeyLog);	      EscapeSequence[NumEscapeSequence++] = KeyCode;	      if (KeyCode == 0x7e)		break;	    }	  // The interpretation of some of these escape sequences is	  // more certain than others. Alt-anything seems to pretty	  // consistently return Esc-anything.  On the other hand,	  // things like Shift-Fn can be wildly different.  I'm simply 	  // assuming that the behavior I see on my Linux iMax	  // is correct and I'll try to work out the inconsistencies	  // later.  All unrecognized escape sequences are discarded.	  if (NumEscapeSequence == 1)	    {	      KeyCode = EscapeSequence[0];	      if (KeyCode >= 'A' && KeyCode <= 'Z')		{		  ungetchTurbo (AltAlphabetic[KeyCode - 'A']);		  return (0);		}	      if (KeyCode >= 'a' && KeyCode <= 'z')		{		  ungetchTurbo (AltAlphabetic[KeyCode - 'a']);		  return (0);		}	      KeypadDigit (&KeyCode);	      if (KeyCode >= '0' && KeyCode <= '9')		{		  ungetchTurbo (AltDigits[KeyCode - '0']);		  return (0);		}	      if (KeyCode == '-' || KeyCode == 0x140)		{		  ungetchTurbo (A_MINUS);		  return (0);		}	      if (KeyCode == '=')		{		  ungetchTurbo (A_EQUALS);		  return (0);		}	      // Unknown escape code.  Discard it.	      continue;	    }	  // Shifted-function-key escape sequences, as I've seen them	  // in xterm.	  if (NumEscapeSequence == 6 && EscapeSequence[0] == 0x5b	      && EscapeSequence[3] == 0x3b && EscapeSequence[4] == 0x32	      && EscapeSequence[5] == 0x7e)	    {	      if (EscapeSequence[1] == 0x31)		{		  if (EscapeSequence[2] == 0x31)		    {		      ungetchTurbo (S_F1);		      return (0);		    }		  if (EscapeSequence[2] == 0x32)		    {		      ungetchTurbo (S_F2);		      return (0);		    }		  if (EscapeSequence[2] == 0x33)		    {		      ungetchTurbo (S_F3);		      return (0);		    }		  if (EscapeSequence[2] == 0x34)		    {		      ungetchTurbo (S_F4);		      return (0);		    }		  if (EscapeSequence[2] == 0x35)		    {		      ungetchTurbo (S_F5);		      return (0);		    }		  if (EscapeSequence[2] == 0x37)		    {		      ungetchTurbo (S_F6);		      return (0);		    }		  if (EscapeSequence[2] == 0x38)		    {		      ungetchTurbo (S_F7);		      return (0);		    }		  if (EscapeSequence[2] == 0x39)		    {		      ungetchTurbo (S_F8);		      return (0);		    }		}	      else if (EscapeSequence[1] == 0x32)		{		  if (EscapeSequence[2] == 0x30)		    {		      ungetchTurbo (S_F9);		      return (0);		    }		  if (EscapeSequence[2] == 0x31)		    {		      ungetchTurbo (S_F10);		      return (0);		    }		}	    }	  // Ctrl-PgUp Ctrl-PgDn, as I've seen them in xterm.	  if (NumEscapeSequence == 5 && EscapeSequence[0] == 0x5b	      && EscapeSequence[2] == 0x3b && EscapeSequence[3] == 0x35	      && EscapeSequence[4] == 0x7e)	    {	      if (EscapeSequence[2] == 0x35)		{		  ungetchTurbo (C_PGUP);		  return (0);		}	      if (EscapeSequence[2] == 0x36)		{		  ungetchTurbo (C_PGDN);		  return (0);		}	    }	  // Ctrl-arrows, as I've seen them in xterm.	  if (NumEscapeSequence == 3 && EscapeSequence[0] == 0x4f	      && EscapeSequence[1] == 0x35)	    {	      if (EscapeSequence[2] == 0x43)		{		  ungetchTurbo (C_RIGHT);		  return (0);		}	      if (EscapeSequence[2] == 0x44)		{		  ungetchTurbo (C_LEFT);		  return (0);		}	      if (EscapeSequence[2] == 0x46)		{		  ungetchTurbo (C_END);		  return (0);		}	      if (EscapeSequence[2] == 0x48)		{		  ungetchTurbo (C_HOME);		  return (0);		}	    }	  // Some function keys, as I've seen them in KDE Konsole.	  if (NumEscapeSequence == 2 && EscapeSequence[0] == 0x4f)	    {	      if (EscapeSequence[1] == 0x50)		{		  ungetchTurbo (N_F1);		  return (0);		}	      if (EscapeSequence[1] == 0x51)		{		  ungetchTurbo (N_F2);		  return (0);		}	      if (EscapeSequence[1] == 0x52)		{		  ungetchTurbo (N_F3);		  return (0);		}	      if (EscapeSequence[1] == 0x53)		{		  ungetchTurbo (N_F4);		  return (0);		}	    }	  // Some function keys, as I've seen them running remotely.	  if (NumEscapeSequence == 4 && EscapeSequence[0] == 0x5b	      && EscapeSequence[3] == 0x7e)	    {	      if (EscapeSequence[1] == 0x31)		{		  if (EscapeSequence[2] == 0x31)		    {		      ungetchTurbo (N_F1);		      return (0);		    }		  if (EscapeSequence[2] == 0x32)		    {		      ungetchTurbo (N_F2);		      return (0);		    }		  if (EscapeSequence[2] == 0x33)		    {		      ungetchTurbo (N_F3);		      return (0);		    }		  if (EscapeSequence[2] == 0x34)		    {		      ungetchTurbo (N_F4);		      return (0);		    }		  if (EscapeSequence[2] == 0x35)		    {		      ungetchTurbo (N_F5);		      return (0);		    }		}	      else if (EscapeSequence[1] == 0x32)		{		  if (EscapeSequence[2] == 0x31)		    {		      ungetchTurbo (N_F10);		      return (0);		    }		}	    }	  // Discard unknown escape sequences.	  if (NumEscapeSequence > 0)	    continue;	}      // Treat backspace key specially, because it doesn't follow the      // pattern of being converted to a 2-code sequence.      if (KeyCode == 0x107)	KeyCode = C_H;      // If it's a regular 7-bit ASCII keystroke, we can simply return it      // right now.  Otherwise, we have to interpret it as a multi-code      // keystroke and buffer some of it.      if (KeyCode < 128)	return (KeyCode);      if (KeyCode >= 0x100)	{	  KeyCode -= 0x100;	  if (KeyCode < sizeof (n2g) && n2g[KeyCode] != 0)	    {	      ungetchTurbo (n2g[KeyCode]);	      return (0);	    }	}    }}//----------------------------------------------------------------------intungetchTurbo (int ch){  if (NumUngetch >= MAX_UNGETCH)    return (EOF);  UngetchBuffer[NumUngetch++] = ch;  return (ch);}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美无砖砖区免费| 久久尤物电影视频在线观看| 色诱亚洲精品久久久久久| 亚洲一本大道在线| 久久蜜桃av一区精品变态类天堂| 91论坛在线播放| 久久se这里有精品| 亚洲电影视频在线| 亚洲欧美一区二区视频| 精品国产亚洲一区二区三区在线观看| 91性感美女视频| 国产精品资源网| 日韩精品五月天| 亚洲精品少妇30p| 国产亚洲欧洲997久久综合| 91麻豆精品国产自产在线| 91论坛在线播放| 成人国产精品免费观看| 九一久久久久久| 奇米四色…亚洲| 亚洲成av人影院在线观看网| 亚洲另类在线视频| 中文字幕乱码亚洲精品一区| 久久先锋资源网| 欧美刺激脚交jootjob| 欧美卡1卡2卡| 欧美伦理电影网| 欧美午夜一区二区三区免费大片| 成人国产精品免费网站| 懂色av中文字幕一区二区三区| 精品一区二区三区在线播放视频| 日本女优在线视频一区二区 | 亚洲欧美电影院| 国产精品天美传媒沈樵| 久久久av毛片精品| 久久精品综合网| 国产欧美日韩激情| 国产精品麻豆欧美日韩ww| 欧美激情一区在线观看| 国产三级欧美三级日产三级99 | www.亚洲色图.com| 国产99久久精品| 国产91在线|亚洲| 粉嫩av亚洲一区二区图片| 国产不卡在线视频| av亚洲精华国产精华精华| 成人app软件下载大全免费| av电影天堂一区二区在线观看| 成人免费av资源| av影院午夜一区| 在线区一区二视频| 欧美日韩欧美一区二区| 欧美一区二区三区在线视频| 日韩欧美中文字幕公布| 久久综合五月天婷婷伊人| 日韩国产在线观看一区| 日韩电影在线一区二区| 久久er99精品| 成人午夜激情影院| 色综合 综合色| 91精品国产色综合久久不卡蜜臀 | 精品国产乱码91久久久久久网站| 精品国产免费人成电影在线观看四季| 日韩网站在线看片你懂的| 久久精品亚洲精品国产欧美| 国产精品久久综合| 亚洲国产精品一区二区久久恐怖片| 图片区小说区国产精品视频| 麻豆91免费看| 波多野结衣亚洲一区| 精品婷婷伊人一区三区三| 欧美xfplay| 亚洲免费大片在线观看| 日本不卡免费在线视频| 成人三级伦理片| 欧美日韩一区二区三区在线 | 91精品在线一区二区| 国产亚洲欧美一级| 一区二区三区四区不卡在线| 日本视频一区二区三区| 福利视频网站一区二区三区| 在线视频国产一区| 久久久久久久久97黄色工厂| 亚洲夂夂婷婷色拍ww47 | 久久99精品一区二区三区三区| 粉嫩13p一区二区三区| 欧美日韩国产欧美日美国产精品| 精品播放一区二区| 一区二区三区丝袜| 国产高清精品网站| 欧美日韩一区二区在线视频| 国产亚洲美州欧州综合国| 亚洲大型综合色站| 不卡视频免费播放| 精品少妇一区二区三区在线视频| 亚洲精品中文在线| 国产一区二区三区在线观看免费| 欧美三级一区二区| 国产精品免费网站在线观看| 日av在线不卡| 色综合夜色一区| 国产欧美一区二区精品久导航| 五月天激情综合| 一本高清dvd不卡在线观看| 国产日产欧产精品推荐色 | 久久久久久9999| 视频在线观看一区| 91网站视频在线观看| 亚洲制服丝袜av| 国产成人精品一区二区三区四区 | 中文无字幕一区二区三区| 青青青伊人色综合久久| 在线精品视频免费播放| 亚洲国产精品v| 国产精品一级黄| 精品日韩成人av| 日韩国产高清影视| 欧美日韩精品一二三区| 综合欧美一区二区三区| 成人高清视频免费观看| 国产网站一区二区| 国内成人自拍视频| 日韩一区二区三区免费看| 亚洲成人av在线电影| 在线一区二区观看| 亚洲欧美电影院| 99久久99久久精品国产片果冻| 欧美激情中文不卡| 国产精品中文有码| 久久久久亚洲综合| 国产精品中文字幕日韩精品 | 亚洲高清久久久| 91成人免费网站| 亚洲午夜精品一区二区三区他趣| 成人av网在线| 亚洲欧美另类图片小说| 91福利精品第一导航| 亚洲精品视频在线观看网站| 99re8在线精品视频免费播放| 国产精品国产三级国产| av午夜一区麻豆| 亚洲美女屁股眼交3| 在线观看一区二区视频| 天堂av在线一区| 日韩美女在线视频| 国产乱一区二区| 国产欧美视频一区二区| 成人毛片在线观看| 日韩毛片在线免费观看| 欧美亚日韩国产aⅴ精品中极品| 亚洲综合成人网| 欧美一区二区三区四区视频| 激情久久五月天| 中文字幕不卡在线| 91精品福利在线| 日韩电影在线一区二区三区| 26uuu精品一区二区| 高清国产一区二区| 亚洲精品一二三| 欧美一二区视频| 国产成人av一区二区三区在线 | 欧美精品在线一区二区| 秋霞电影网一区二区| 久久精品日韩一区二区三区| 99re热这里只有精品免费视频| 一区二区三区精品视频在线| 91精品国产麻豆国产自产在线| 韩国一区二区视频| 成人免费小视频| 欧美欧美欧美欧美| 5566中文字幕一区二区电影| 激情综合网最新| 国产精品久久久久久久久免费丝袜| 色老汉一区二区三区| 日韩高清一区在线| 中文在线免费一区三区高中清不卡| 在线观看不卡一区| 韩国av一区二区三区四区| 亚洲欧美日韩成人高清在线一区| 欧美一区二区成人| av在线播放成人| 蜜臀av一级做a爰片久久| 日韩一区在线看| 精品少妇一区二区三区免费观看| 97超碰欧美中文字幕| 蜜臀av性久久久久av蜜臀妖精| 中文字幕在线不卡一区二区三区| 欧美高清视频不卡网| 成人一区二区三区中文字幕| 日韩国产欧美在线播放| 亚洲视频精选在线| 精品美女一区二区| 欧美亚洲精品一区| 成人免费毛片app| 蜜桃视频第一区免费观看| 亚洲男人的天堂在线观看| 国产亚洲综合在线| 91精品麻豆日日躁夜夜躁| 成人免费电影视频| 精品午夜一区二区三区在线观看 |