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

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

?? getch.c

?? C標準庫源代碼,能提高對C的理解,不錯的哦
?? C
?? 第 1 頁 / 共 2 頁
字號:
/***
*getch.c - contains _getch(), _getche(), _ungetch() and kbhit for Win32
*
*       Copyright (c) 1989-1997, Microsoft Corporation. All rights reserved.
*
*Purpose:
*       Defines the "direct console" functions listed above.
*
*       NOTE: The real-mode DOS versions of these functions read from
*       standard input and are therefore redirected when standard input
*       is redirected. However, these versions ALWAYS read from the console,
*       even when standard input is redirected.
*
*******************************************************************************/

#include <cruntime.h>
#include <oscalls.h>
#include <conio.h>
#include <internal.h>
#include <mtdll.h>
#include <stdio.h>
#include <stdlib.h>
#include <dbgint.h>

typedef struct {
        unsigned char LeadChar;
        unsigned char SecondChar;
        } CharPair;

typedef struct {
        unsigned short ScanCode;
        CharPair RegChars;
        CharPair ShiftChars;
        CharPair CtrlChars;
        CharPair AltChars;
        } EnhKeyVals;

typedef struct {
        CharPair RegChars;
        CharPair ShiftChars;
        CharPair CtrlChars;
        CharPair AltChars;
        } NormKeyVals;

/*
 * Table of key values for enhanced keys
 */
static EnhKeyVals EnhancedKeys[] = {
        { 28, {  13,   0 }, {  13,   0 }, {  10,   0 }, {   0, 166 } },
        { 53, {  47,   0 }, {  63,   0 }, {   0, 149 }, {   0, 164 } },
        { 71, { 224,  71 }, { 224,  71 }, { 224, 119 }, {   0, 151 } },
        { 72, { 224,  72 }, { 224,  72 }, { 224, 141 }, {   0, 152 } },
        { 73, { 224,  73 }, { 224,  73 }, { 224, 134 }, {   0, 153 } },
        { 75, { 224,  75 }, { 224,  75 }, { 224, 115 }, {   0, 155 } },
        { 77, { 224,  77 }, { 224,  77 }, { 224, 116 }, {   0, 157 } },
        { 79, { 224,  79 }, { 224,  79 }, { 224, 117 }, {   0, 159 } },
        { 80, { 224,  80 }, { 224,  80 }, { 224, 145 }, {   0, 160 } },
        { 81, { 224,  81 }, { 224,  81 }, { 224, 118 }, {   0, 161 } },
        { 82, { 224,  82 }, { 224,  82 }, { 224, 146 }, {   0, 162 } },
        { 83, { 224,  83 }, { 224,  83 }, { 224, 147 }, {   0, 163 } }
        };

/*
 * macro for the number of elements of in EnhancedKeys[]
 */
#define NUM_EKA_ELTS    ( sizeof( EnhancedKeys ) / sizeof( EnhKeyVals ) )

/*
 * Table of key values for normal keys. Note that the table is padded so
 * that the key scan code serves as an index into the table.
 */
static NormKeyVals NormalKeys[] = {

        /* padding */
        { /*  0 */ {   0,   0 }, {   0,   0 }, {   0,   0 }, {   0,   0 } },

        { /*  1 */ {  27,   0 }, {  27,   0 }, {  27,   0 }, {   0,   1 } },
        { /*  2 */ {  49,   0 }, {  33,   0 }, {   0,   0 }, {   0, 120 } },
        { /*  3 */ {  50,   0 }, {  64,   0 }, {   0,   3 }, {   0, 121 } },
        { /*  4 */ {  51,   0 }, {  35,   0 }, {   0,   0 }, {   0, 122 } },
        { /*  5 */ {  52,   0 }, {  36,   0 }, {   0,   0 }, {   0, 123 } },
        { /*  6 */ {  53,   0 }, {  37,   0 }, {   0,   0 }, {   0, 124 } },
        { /*  7 */ {  54,   0 }, {  94,   0 }, {  30,   0 }, {   0, 125 } },
        { /*  8 */ {  55,   0 }, {  38,   0 }, {   0,   0 }, {   0, 126 } },
        { /*  9 */ {  56,   0 }, {  42,   0 }, {   0,   0 }, {   0, 127 } },
        { /* 10 */ {  57,   0 }, {  40,   0 }, {   0,   0 }, {   0, 128 } },
        { /* 11 */ {  48,   0 }, {  41,   0 }, {   0,   0 }, {   0, 129 } },
        { /* 12 */ {  45,   0 }, {  95,   0 }, {  31,   0 }, {   0, 130 } },
        { /* 13 */ {  61,   0 }, {  43,   0 }, {   0,   0 }, {   0, 131 } },
        { /* 14 */ {   8,   0 }, {   8,   0 }, { 127,   0 }, {   0,  14 } },
        { /* 15 */ {   9,   0 }, {   0,  15 }, {   0, 148 }, {   0,  15 } },
        { /* 16 */ { 113,   0 }, {  81,   0 }, {  17,   0 }, {   0,  16 } },
        { /* 17 */ { 119,   0 }, {  87,   0 }, {  23,   0 }, {   0,  17 } },
        { /* 18 */ { 101,   0 }, {  69,   0 }, {   5,   0 }, {   0,  18 } },
        { /* 19 */ { 114,   0 }, {  82,   0 }, {  18,   0 }, {   0,  19 } },
        { /* 20 */ { 116,   0 }, {  84,   0 }, {  20,   0 }, {   0,  20 } },
        { /* 21 */ { 121,   0 }, {  89,   0 }, {  25,   0 }, {   0,  21 } },
        { /* 22 */ { 117,   0 }, {  85,   0 }, {  21,   0 }, {   0,  22 } },
        { /* 23 */ { 105,   0 }, {  73,   0 }, {   9,   0 }, {   0,  23 } },
        { /* 24 */ { 111,   0 }, {  79,   0 }, {  15,   0 }, {   0,  24 } },
        { /* 25 */ { 112,   0 }, {  80,   0 }, {  16,   0 }, {   0,  25 } },
        { /* 26 */ {  91,   0 }, { 123,   0 }, {  27,   0 }, {   0,  26 } },
        { /* 27 */ {  93,   0 }, { 125,   0 }, {  29,   0 }, {   0,  27 } },
        { /* 28 */ {  13,   0 }, {  13,   0 }, {  10,   0 }, {   0,  28 } },

        /* padding */
        { /* 29 */ {   0,   0 }, {   0,   0 }, {   0,   0 }, {   0,   0 } },

        { /* 30 */ {  97,   0 }, {  65,   0 }, {   1,   0 }, {   0,  30 } },
        { /* 31 */ { 115,   0 }, {  83,   0 }, {  19,   0 }, {   0,  31 } },
        { /* 32 */ { 100,   0 }, {  68,   0 }, {   4,   0 }, {   0,  32 } },
        { /* 33 */ { 102,   0 }, {  70,   0 }, {   6,   0 }, {   0,  33 } },
        { /* 34 */ { 103,   0 }, {  71,   0 }, {   7,   0 }, {   0,  34 } },
        { /* 35 */ { 104,   0 }, {  72,   0 }, {   8,   0 }, {   0,  35 } },
        { /* 36 */ { 106,   0 }, {  74,   0 }, {  10,   0 }, {   0,  36 } },
        { /* 37 */ { 107,   0 }, {  75,   0 }, {  11,   0 }, {   0,  37 } },
        { /* 38 */ { 108,   0 }, {  76,   0 }, {  12,   0 }, {   0,  38 } },
        { /* 39 */ {  59,   0 }, {  58,   0 }, {   0,   0 }, {   0,  39 } },
        { /* 40 */ {  39,   0 }, {  34,   0 }, {   0,   0 }, {   0,  40 } },
        { /* 41 */ {  96,   0 }, { 126,   0 }, {   0,   0 }, {   0,  41 } },

        /* padding */
        { /* 42 */ {    0,  0 }, {   0,   0 }, {   0,   0 }, {   0,   0 } },

        { /* 43 */ {  92,   0 }, { 124,   0 }, {  28,   0 }, {   0,   0 } },
        { /* 44 */ { 122,   0 }, {  90,   0 }, {  26,   0 }, {   0,  44 } },
        { /* 45 */ { 120,   0 }, {  88,   0 }, {  24,   0 }, {   0,  45 } },
        { /* 46 */ {  99,   0 }, {  67,   0 }, {   3,   0 }, {   0,  46 } },
        { /* 47 */ { 118,   0 }, {  86,   0 }, {  22,   0 }, {   0,  47 } },
        { /* 48 */ {  98,   0 }, {  66,   0 }, {   2,   0 }, {   0,  48 } },
        { /* 49 */ { 110,   0 }, {  78,   0 }, {  14,   0 }, {   0,  49 } },
        { /* 50 */ { 109,   0 }, {  77,   0 }, {  13,   0 }, {   0,  50 } },
        { /* 51 */ {  44,   0 }, {  60,   0 }, {   0,   0 }, {   0,  51 } },
        { /* 52 */ {  46,   0 }, {  62,   0 }, {   0,   0 }, {   0,  52 } },
        { /* 53 */ {  47,   0 }, {  63,   0 }, {   0,   0 }, {   0,  53 } },

        /* padding */
        { /* 54 */ {   0,   0 }, {   0,   0 }, {   0,   0 }, {   0,   0 } },

        { /* 55 */ {  42,   0 }, {   0,   0 }, { 114,   0 }, {   0,   0 } },

        /* padding */
        { /* 56 */ {   0,   0 }, {   0,   0 }, {   0,   0 }, {   0,   0 } },

        { /* 57 */ {  32,   0 }, {  32,   0 }, {  32,   0 }, {  32,   0 } },

        /* padding */
        { /* 58 */ {   0,   0 }, {   0,   0 }, {   0,   0 }, {   0,   0 } },

        { /* 59 */ {   0,  59 }, {   0,  84 }, {   0,  94 }, {   0, 104 } },
        { /* 60 */ {   0,  60 }, {   0,  85 }, {   0,  95 }, {   0, 105 } },
        { /* 61 */ {   0,  61 }, {   0,  86 }, {   0,  96 }, {   0, 106 } },
        { /* 62 */ {   0,  62 }, {   0,  87 }, {   0,  97 }, {   0, 107 } },
        { /* 63 */ {   0,  63 }, {   0,  88 }, {   0,  98 }, {   0, 108 } },
        { /* 64 */ {   0,  64 }, {   0,  89 }, {   0,  99 }, {   0, 109 } },
        { /* 65 */ {   0,  65 }, {   0,  90 }, {   0, 100 }, {   0, 110 } },
        { /* 66 */ {   0,  66 }, {   0,  91 }, {   0, 101 }, {   0, 111 } },
        { /* 67 */ {   0,  67 }, {   0,  92 }, {   0, 102 }, {   0, 112 } },
        { /* 68 */ {   0,  68 }, {   0,  93 }, {   0, 103 }, {   0, 113 } },

        /* padding */
        { /* 69 */ {    0,  0 }, {   0,   0 }, {   0,   0 }, {   0,   0 } },
        { /* 70 */ {    0,  0 }, {   0,   0 }, {   0,   0 }, {   0,   0 } },

        { /* 71 */ {   0,  71 }, {  55,   0 }, {   0, 119 }, {   0,   0 } },
        { /* 72 */ {   0,  72 }, {  56,   0 }, {   0, 141 }, {   0,   0 } },
        { /* 73 */ {   0,  73 }, {  57,   0 }, {   0, 132 }, {   0,   0 } },
        { /* 74 */ {   0,   0 }, {  45,   0 }, {   0,   0 }, {   0,   0 } },
        { /* 75 */ {   0,  75 }, {  52,   0 }, {   0, 115 }, {   0,   0 } },
        { /* 76 */ {   0,   0 }, {  53,   0 }, {   0,   0 }, {   0,   0 } },
        { /* 77 */ {   0,  77 }, {  54,   0 }, {   0, 116 }, {   0,   0 } },
        { /* 78 */ {   0,   0 }, {  43,   0 }, {   0,   0 }, {   0,   0 } },
        { /* 79 */ {   0,  79 }, {  49,   0 }, {   0, 117 }, {   0,   0 } },
        { /* 80 */ {   0,  80 }, {  50,   0 }, {   0, 145 }, {   0,   0 } },
        { /* 81 */ {   0,  81 }, {  51,   0 }, {   0, 118 }, {   0,   0 } },
        { /* 82 */ {   0,  82 }, {  48,   0 }, {   0, 146 }, {   0,   0 } },
        { /* 83 */ {   0,  83 }, {  46,   0 }, {   0, 147 }, {   0,   0 } },

        /* padding */
        { /* 84 */ {   0,   0 }, {   0,   0 }, {   0,   0 }, {   0,   0 } },
        { /* 85 */ {   0,   0 }, {   0,   0 }, {   0,   0 }, {   0,   0 } },
        { /* 86 */ {   0,   0 }, {   0,   0 }, {   0,   0 }, {   0,   0 } },

        { /* 87 */ { 224, 133 }, { 224, 135 }, { 224, 137 }, { 224, 139 } },
        { /* 88 */ { 224, 134 }, { 224, 136 }, { 224, 138 }, { 224, 140 } }

};


/*
 * This is the one character push-back buffer used by _getch(), _getche()
 * and _ungetch().
 */
static int chbuf = EOF;


/*
 * Declaration for console handle
 */
extern int _coninpfh;

/*
 * Function that looks up the extended key code for a given event.
 */
static CharPair * __cdecl _getextendedkeycode(KEY_EVENT_RECORD *);


/***
*int _getch(), _getche() - read one char. from console (without and with echo)
*
*Purpose:
*       If the "_ungetch()" push-back buffer is not empty (empty==-1) Then
*           Mark it empty (-1) and RETURN the value that was in it
*       Read a character using ReadConsole in RAW mode
*       Return the Character Code
*       _getche(): Same as _getch() except that the character value returned
*       is echoed (via "_putch()")
*
*Entry:
*       None, reads from console.
*
*Exit:
*       If an error is returned from the API
*           Then EOF
*       Otherwise
*            next byte from console
*       Static variable "chbuf" may be altered
*
*Exceptions:
*
*******************************************************************************/

#ifdef _MT

int __cdecl _getch (
        void
        )
{
        int ch;

        _mlock(_CONIO_LOCK);            /* secure the console lock */
        ch = _getch_lk();               /* input the character */
        _munlock(_CONIO_LOCK);          /* release the console lock */

        return ch;
}

int __cdecl _getche (
        void
        )
{
        int ch;

        _mlock(_CONIO_LOCK);            /* secure the console lock */
        ch = _getche_lk();              /* input and echo the character */
        _munlock(_CONIO_LOCK);          /* unlock the console */

        return ch;
}

#endif  /* _MT */


#ifdef _MT
int __cdecl _getch_lk (
#else  /* _MT */
int __cdecl _getch (
#endif  /* _MT */
        void
        )
{
        INPUT_RECORD ConInpRec;
        DWORD NumRead;
        CharPair *pCP;
        int ch = 0;                     /* single character buffer */
        DWORD oldstate;

        /*
         * check pushback buffer (chbuf) a for character
         */
        if ( chbuf != EOF ) {
            /*
             * something there, clear buffer and return the character.
             */
            ch = (unsigned char)(chbuf & 0xFF);
            chbuf = EOF;
            return ch;
        }

        if (_coninpfh == -1)
            return EOF;

        /*
         * _coninpfh, the handle to the console input, is created the first
         * time that either _getch() or _cgets() or _kbhit() is called.
         */

        if ( _coninpfh == -2 )
            __initconin();

        /*
         * Switch to raw mode (no line input, no echo input)
         */
        GetConsoleMode( (HANDLE)_coninpfh, &oldstate );
        SetConsoleMode( (HANDLE)_coninpfh, 0L );

        for ( ; ; ) {

            /*
             * Get a console input event.
             */
            if ( !ReadConsoleInput( (HANDLE)_coninpfh,
                                    &ConInpRec,
                                    1L,
                                    &NumRead )
                 || (NumRead == 0L) )
            {
                ch = EOF;
                break;
            }

            /*
             * Look for, and decipher, key events.
             */
            if ( (ConInpRec.EventType == KEY_EVENT) &&
                 ConInpRec.Event.KeyEvent.bKeyDown ) {
                /*
                 * Easy case: if uChar.AsciiChar is non-zero, just stuff it
                 * into ch and quit.
                 */

                if ( ch = (unsigned char)ConInpRec.Event.KeyEvent.uChar.AsciiChar )
                    break;

                /*

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧美日韩国产另类专区| 综合久久给合久久狠狠狠97色| 欧美私人免费视频| 91在线观看免费视频| 99久久国产综合精品色伊| 欧美精品第1页| 欧美日韩黄色影视| 欧美一级二级在线观看| 日韩你懂的电影在线观看| 欧美mv日韩mv国产网站app| 日韩免费看的电影| 中文字幕成人av| 国产精品二三区| 亚洲综合视频网| 日本午夜精品视频在线观看| 美女尤物国产一区| 风间由美性色一区二区三区| 99久久婷婷国产综合精品| 在线观看日韩精品| 欧美电影免费观看高清完整版在线观看 | 日韩精品中文字幕在线不卡尤物| 日韩精品中文字幕一区| 中文字幕不卡三区| 亚洲成人av一区二区| 久久不见久久见免费视频7| 国产精品一二三| 日本久久电影网| 精品美女被调教视频大全网站| 久久综合色8888| 亚洲精品日日夜夜| 国产在线精品免费| 91蜜桃网址入口| 精品久久久久99| 亚洲一区二区av在线| 精品制服美女久久| 在线观看亚洲精品视频| 2021久久国产精品不只是精品| 中文字幕一区二区三| 久久成人av少妇免费| 99热精品一区二区| 久久噜噜亚洲综合| 亚洲18女电影在线观看| 国产成人亚洲综合a∨猫咪| 欧美日韩免费观看一区三区| 国产亚洲欧美日韩俺去了| 亚洲成a人片在线观看中文| 成人性生交大片免费看视频在线| 日韩一区二区在线看| 樱桃国产成人精品视频| 成人午夜大片免费观看| 日韩美女视频一区二区在线观看| 有坂深雪av一区二区精品| 国产黄人亚洲片| 日韩欧美一二三| 亚洲成人动漫av| 99精品欧美一区二区蜜桃免费| www激情久久| 日韩国产一二三区| 欧美日韩一区视频| 亚洲精品免费视频| 白白色亚洲国产精品| 久久免费视频色| 国内精品伊人久久久久av一坑| 欧美高清视频不卡网| 亚洲视频在线观看一区| 99精品视频中文字幕| 国产精品免费aⅴ片在线观看| 国产一区免费电影| 欧美xxxx在线观看| 久久成人羞羞网站| 精品国产免费久久| 激情小说欧美图片| 日韩精品在线网站| 国产一区不卡视频| 久久亚洲免费视频| 国产91高潮流白浆在线麻豆| 国产欧美日韩卡一| 国产一区二区三区不卡在线观看| 欧美xxxxx裸体时装秀| 激情六月婷婷久久| 久久人人97超碰com| 国产91丝袜在线播放| 国产女主播视频一区二区| 成人网男人的天堂| 亚洲情趣在线观看| 在线免费精品视频| 日韩精品五月天| 欧美成人vr18sexvr| 国产麻豆精品视频| 国产精品亲子伦对白| 色久综合一二码| 亚洲国产成人91porn| 日韩视频免费观看高清完整版在线观看| 奇米精品一区二区三区四区| 久久综合999| 91啪九色porn原创视频在线观看| 亚洲一区二区美女| 日韩视频在线观看一区二区| 91亚洲精品乱码久久久久久蜜桃 | 99re亚洲国产精品| 亚洲成av人影院在线观看网| 精品免费一区二区三区| 成人听书哪个软件好| 亚洲一卡二卡三卡四卡无卡久久| 91麻豆精品国产91久久久久久久久 | 国产一区在线精品| 中文字幕日韩一区| 日韩一区二区三区免费看| 成人黄色在线网站| 日本最新不卡在线| **欧美大码日韩| 欧美刺激脚交jootjob| 成人av电影在线观看| 午夜久久福利影院| 国产精品国产三级国产aⅴ入口 | 亚洲午夜久久久久中文字幕久| 欧美一级欧美一级在线播放| 成人毛片视频在线观看| 日韩在线卡一卡二| 亚洲视频免费观看| 国产性做久久久久久| 91精品国产手机| 91麻豆国产香蕉久久精品| 国产综合久久久久久鬼色 | 日韩美女主播在线视频一区二区三区 | 欧美国产欧美综合| 欧美乱妇一区二区三区不卡视频| 成人的网站免费观看| 精东粉嫩av免费一区二区三区| 一区二区三区精品视频| 国产精品麻豆网站| 精品欧美一区二区在线观看| 91久久免费观看| 成人国产精品免费观看动漫| 精品一区二区av| 石原莉奈在线亚洲三区| 一区二区三区四区不卡在线| 国产精品美女久久久久久久久| www国产精品av| 久久综合色天天久久综合图片| 日韩你懂的在线播放| 日韩一区二区精品在线观看| 欧美性大战xxxxx久久久| 91视频精品在这里| 97精品久久久午夜一区二区三区 | 在线这里只有精品| 99国产精品久久久久| 北岛玲一区二区三区四区| 成人网男人的天堂| 99精品在线免费| 99久久精品费精品国产一区二区| 成人黄色小视频| 欧美日韩国产综合一区二区三区| 91国偷自产一区二区使用方法| 91麻豆免费在线观看| 日本高清无吗v一区| 欧美在线小视频| 欧美写真视频网站| 欧美日韩激情在线| 日韩精品一区国产麻豆| 久久精品在线观看| 日本一二三四高清不卡| 成人免费在线视频| 亚洲主播在线播放| 奇米影视一区二区三区| 激情图片小说一区| 成人黄动漫网站免费app| 色婷婷激情综合| 精品视频123区在线观看| 6080yy午夜一二三区久久| 欧美大肚乱孕交hd孕妇| 久久久久久久网| 悠悠色在线精品| 久久成人18免费观看| 国产99久久久国产精品| bt欧美亚洲午夜电影天堂| 欧美亚日韩国产aⅴ精品中极品| 717成人午夜免费福利电影| 精品对白一区国产伦| 亚洲欧美成人一区二区三区| 亚洲国产视频a| 国模大尺度一区二区三区| 色欧美日韩亚洲| 精品国产伦一区二区三区免费| 日韩一区在线看| 免费观看成人av| proumb性欧美在线观看| 欧美伦理影视网| 中文字幕 久热精品 视频在线| 性做久久久久久久免费看| 国产成人精品免费| 欧美美女黄视频| 国产精品日日摸夜夜摸av| 日韩中文欧美在线| 不卡在线观看av| 精品久久久久久久人人人人传媒 | 蜜桃视频在线观看一区| 99久久免费国产| 精品少妇一区二区三区| 夜夜操天天操亚洲|