Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

131 lines
3.1 KiB

  1. /***
  2. *conio.h - console and port I/O declarations
  3. *
  4. * Copyright (c) 1985-2001, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. * This include file contains the function declarations for
  8. * the MS C V2.03 compatible console I/O routines.
  9. *
  10. * [Public]
  11. *
  12. ****/
  13. #if _MSC_VER > 1000
  14. #pragma once
  15. #endif
  16. #ifndef _INC_CONIO
  17. #define _INC_CONIO
  18. #if !defined(_WIN32)
  19. #error ERROR: Only Win32 target supported!
  20. #endif
  21. #ifdef __cplusplus
  22. extern "C" {
  23. #endif
  24. /* Define _CRTIMP */
  25. #ifndef _CRTIMP
  26. #ifdef _DLL
  27. #define _CRTIMP __declspec(dllimport)
  28. #else /* ndef _DLL */
  29. #define _CRTIMP
  30. #endif /* _DLL */
  31. #endif /* _CRTIMP */
  32. #if !defined(_WCHAR_T_DEFINED) && !defined(_NATIVE_WCHAR_T_DEFINED)
  33. typedef unsigned short wchar_t;
  34. #define _WCHAR_T_DEFINED
  35. #endif
  36. #ifndef _WCTYPE_T_DEFINED
  37. typedef unsigned short wint_t;
  38. typedef unsigned short wctype_t;
  39. #define _WCTYPE_T_DEFINED
  40. #endif
  41. /* Define __cdecl for non-Microsoft compilers */
  42. #if ( !defined(_MSC_VER) && !defined(__cdecl) )
  43. #define __cdecl
  44. #endif
  45. /* Function prototypes */
  46. _CRTIMP char * __cdecl _cgets(char *);
  47. _CRTIMP int __cdecl _cprintf(const char *, ...);
  48. _CRTIMP int __cdecl _cputs(const char *);
  49. _CRTIMP int __cdecl _cscanf(const char *, ...);
  50. _CRTIMP int __cdecl _getch(void);
  51. _CRTIMP int __cdecl _getche(void);
  52. #ifdef _M_IX86
  53. int __cdecl _inp(unsigned short);
  54. unsigned short __cdecl _inpw(unsigned short);
  55. unsigned long __cdecl _inpd(unsigned short);
  56. #endif /* _M_IX86 */
  57. _CRTIMP int __cdecl _kbhit(void);
  58. #ifdef _M_IX86
  59. int __cdecl _outp(unsigned short, int);
  60. unsigned short __cdecl _outpw(unsigned short, unsigned short);
  61. unsigned long __cdecl _outpd(unsigned short, unsigned long);
  62. #endif /* _M_IX86 */
  63. _CRTIMP int __cdecl _putch(int);
  64. _CRTIMP int __cdecl _ungetch(int);
  65. #ifndef _WCONIO_DEFINED
  66. /* wide function prototypes, also declared in wchar.h */
  67. #ifndef WEOF
  68. #define WEOF (wint_t)(0xFFFF)
  69. #endif
  70. _CRTIMP wchar_t * __cdecl _cgetws(wchar_t *);
  71. _CRTIMP wint_t __cdecl _getwch(void);
  72. _CRTIMP wint_t __cdecl _getwche(void);
  73. _CRTIMP wint_t __cdecl _putwch(wchar_t);
  74. _CRTIMP wint_t __cdecl _ungetwch(wint_t);
  75. _CRTIMP int __cdecl _cputws(const wchar_t *);
  76. _CRTIMP int __cdecl _cwprintf(const wchar_t *, ...);
  77. _CRTIMP int __cdecl _cwscanf(const wchar_t *, ...);
  78. #define _WCONIO_DEFINED
  79. #endif /* _WCONIO_DEFINED */
  80. #if !__STDC__
  81. /* Non-ANSI names for compatibility */
  82. _CRTIMP char * __cdecl cgets(char *);
  83. _CRTIMP int __cdecl cprintf(const char *, ...);
  84. _CRTIMP int __cdecl cputs(const char *);
  85. _CRTIMP int __cdecl cscanf(const char *, ...);
  86. #ifdef _M_IX86
  87. int __cdecl inp(unsigned short);
  88. unsigned short __cdecl inpw(unsigned short);
  89. #endif /* _M_IX86 */
  90. _CRTIMP int __cdecl getch(void);
  91. _CRTIMP int __cdecl getche(void);
  92. _CRTIMP int __cdecl kbhit(void);
  93. #ifdef _M_IX86
  94. int __cdecl outp(unsigned short, int);
  95. unsigned short __cdecl outpw(unsigned short, unsigned short);
  96. #endif /* _M_IX86 */
  97. _CRTIMP int __cdecl putch(int);
  98. _CRTIMP int __cdecl ungetch(int);
  99. #endif /* __STDC__ */
  100. #ifdef __cplusplus
  101. }
  102. #endif
  103. #endif /* _INC_CONIO */