• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

c++标准库conio.h文件

原作者: [db:作者] 来自: [db:来源] 收藏 邀请
/* * conio.h * * Low level console I/O functions. Pretty please try to use the ANSI * standard ones if you are writing new code. * * $Id: conio.h,v 7f0aa41f8caf 2018/10/21 15:39:35 keith $ * * Written by Colin Peters <[email protected]> * Copyright (C) 1997, 1999-2001, 2003, 2004, 2007, 2018, MinGW.org Project. * * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice, this permission notice, and the following * disclaimer shall be included in all copies or substantial portions of * the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OF OR OTHER * DEALINGS IN THE SOFTWARE. * */ #ifndef _CONIO_H #pragma GCC system_header /* When including <wchar.h>, some of the definitions and declarations * which are nominally provided in <conio.h> must be duplicated. Rather * than require duplicated maintenance effort, we provide for partial * inclusion of <conio.h> by <wchar.h>; only when not included in * this partial fashion... */ #ifndef __WCHAR_H_SOURCED__ /* ...which is exclusive to <wchar.h>, do we assert the multiple * inclusion guard for <conio.h> itself. */ #define _CONIO_H /* All MinGW.org headers are expected to include <_mingw.h>; when * selectively included by <wchar.h>, that responsibility has already * been addressed, but for free-standing inclusion we do so now. */ #include <_mingw.h> #endif /* !__WCHAR_H_SOURCED__ */ #ifndef RC_INVOKED /* There is nothing here which is useful to the resource compiler; * for any other form of compilation, and regardless of the scope in * which <conio.h> is included, we need definitions for wchar_t, and * wint_t; get them by selective inclusion of <stddef.h>. */ #define __need_wint_t #define __need_wchar_t #include <stddef.h> _BEGIN_C_DECLS #ifdef _CONIO_H /* The following declarations are to be exposed only on free-standing * inclusion of <conio.h> */ _CRTIMP __cdecl __MINGW_NOTHROW char *_cgets (char*); _CRTIMP __cdecl __MINGW_NOTHROW int _cprintf (const char*, ...); _CRTIMP __cdecl __MINGW_NOTHROW int _cputs (const char*); _CRTIMP __cdecl __MINGW_NOTHROW int _cscanf (char*, ...); _CRTIMP __cdecl __MINGW_NOTHROW int _getch (void); _CRTIMP __cdecl __MINGW_NOTHROW int _getche (void); _CRTIMP __cdecl __MINGW_NOTHROW int _kbhit (void); _CRTIMP __cdecl __MINGW_NOTHROW int _putch (int); _CRTIMP __cdecl __MINGW_NOTHROW int _ungetch (int); #if _WIN32_WINNT >= _WIN32_WINNT_WINXP || __MSVCRT_VERSION__ >= __MSVCR70_DLL /* Wide character variants of the console I/O functions were first * introduced in non-free MSVCR70.DLL, and subsequently supported by * MSVCRT.DLL from WinXP onwards. Some are declared in <wchar.t> in * addition to <conio.h>; the following are exclusive to <conio.h> */ _CRTIMP __cdecl __MINGW_NOTHROW wint_t _putwch (wchar_t); #if __MSVCRT_VERSION__ >= __MSVCR80_DLL /* Variants which do not perform thread locking require non-free * MSVCR80.DLL, or later; they are not supported by MSVCRT.DLL */ _CRTIMP __cdecl __MINGW_NOTHROW int _getch_nolock (void); _CRTIMP __cdecl __MINGW_NOTHROW int _getche_nolock (void); _CRTIMP __cdecl __MINGW_NOTHROW int _putch_nolock (int); _CRTIMP __cdecl __MINGW_NOTHROW wint_t _putwch_nolock (wchar_t); _CRTIMP __cdecl __MINGW_NOTHROW int _ungetch_nolock (int); #endif /* MSVCR80.DLL or later */ #endif /* WinXP, MSVCR70.DLL, or later */ #ifndef _NO_OLDNAMES /* Early versions of the Microsoft runtime library provided a subset * of the above functions, named without the ugly initial underscore; * these remain supported, and should be used when coding to support * legacy Windows platforms. */ _CRTIMP __cdecl __MINGW_NOTHROW int getch (void); _CRTIMP __cdecl __MINGW_NOTHROW int getche (void); _CRTIMP __cdecl __MINGW_NOTHROW int kbhit (void); _CRTIMP __cdecl __MINGW_NOTHROW int putch (int); _CRTIMP __cdecl __MINGW_NOTHROW int ungetch (int); #endif /* !_NO_OLDNAMES */ #endif /* _CONIO_H */ #if ! (defined _CONIO_H && defined _WCHAR_H) /* The following are to be exposed either on free-standing inclusion * of <conio.h>, or on selective inclusion by <wchar.h>, but if both * guards are defined, then this is free-standing inclusion, and we * have already declared these by selective inclusion; there is no * need to declare them a second time. */ #if _WIN32_WINNT >= _WIN32_WINNT_WINXP || __MSVCRT_VERSION__ >= __MSVCR70_DLL /* Wide character variants of the console I/O functions, in this group, * were first introduced in non-free Microsoft runtimes, from MSVCR70.DLL * onwards; they were not supported by MSVCRT.DLL prior to WinXP. */ _CRTIMP __cdecl __MINGW_NOTHROW wint_t _getwch (void); _CRTIMP __cdecl __MINGW_NOTHROW wint_t _getwche (void); _CRTIMP __cdecl __MINGW_NOTHROW wint_t _ungetwch (wint_t); #if __MSVCRT_VERSION__ >= __MSVCR80_DLL /* Variants which do not perform thread locking require non-free * MSVCR80.DLL, or later; they are not supported by MSVCRT.DLL */ _CRTIMP __cdecl __MINGW_NOTHROW wint_t _getwch_nolock (void); _CRTIMP __cdecl __MINGW_NOTHROW wint_t _getwche_nolock (void); _CRTIMP __cdecl __MINGW_NOTHROW wint_t _ungetwch_nolock (wint_t); #endif /* MSVCR80.DLL or later */ #endif /* WinXP, MSVCR70.DLL, or later */ #endif /* ! (_CONIO_H && _WCHAR_H) */ _END_C_DECLS #endif /* ! RC_INVOKED */ #endif /* !_CONIO_H: $RCSfile: conio.h,v $: end of file */

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C#多线程编程(1):线程的启动给多线程传参的三种方式发布时间:2022-07-14
下一篇:
C#二维list发布时间:2022-07-14
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap