include: Add IProvideRuntimeContext and a few annotations.
[wine/hramrach.git] / include / msvcrt / conio.h
blob18f3d24b730829bb3369d448962a6f2cae805e9c
1 /*
2 * Console I/O definitions
4 * Derived from the mingw header written by Colin Peters.
5 * Modified for Wine use by Jon Griffiths and Francois Gouget.
6 * This file is in the public domain.
7 */
8 #ifndef __WINE_CONIO_H
9 #define __WINE_CONIO_H
11 #include <crtdefs.h>
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
17 char* __cdecl _cgets(char*);
18 int __cdecl _cprintf(const char*,...);
19 int __cdecl _cputs(const char*);
20 int __cdecl _cscanf(const char*,...);
21 int __cdecl _getch(void);
22 int __cdecl _getche(void);
23 int __cdecl _kbhit(void);
24 int __cdecl _putch(int);
25 int __cdecl _ungetch(int);
27 #ifdef _M_IX86
28 int __cdecl _inp(unsigned short);
29 __msvcrt_ulong __cdecl _inpd(unsigned short);
30 unsigned short __cdecl _inpw(unsigned short);
31 int __cdecl _outp(unsigned short, int);
32 __msvcrt_ulong __cdecl _outpd(unsigned short, __msvcrt_ulong);
33 unsigned short __cdecl _outpw(unsigned short, unsigned short);
34 #endif
36 #ifdef __cplusplus
38 #endif
41 static inline char* cgets(char* str) { return _cgets(str); }
42 static inline int cputs(const char* str) { return _cputs(str); }
43 static inline int getch(void) { return _getch(); }
44 static inline int getche(void) { return _getche(); }
45 static inline int kbhit(void) { return _kbhit(); }
46 static inline int putch(int c) { return _putch(c); }
47 static inline int ungetch(int c) { return _ungetch(c); }
48 #ifdef _M_IX86
49 static inline int inp(unsigned short i) { return _inp(i); }
50 static inline unsigned short inpw(unsigned short i) { return _inpw(i); }
51 static inline int outp(unsigned short i, int j) { return _outp(i, j); }
52 static inline unsigned short outpw(unsigned short i, unsigned short j) { return _outpw(i, j); }
53 #endif
55 #if defined(__GNUC__) && (__GNUC__ < 4)
56 extern int __cdecl cprintf(const char*,...) __attribute__((alias("_cprintf"),format(printf,1,2)));
57 extern int __cdecl cscanf(const char*,...) __attribute__((alias("_cscanf"),format(scanf,1,2)));
58 #else
59 #define cprintf _cprintf
60 #define cscanf _cscanf
61 #endif /* __GNUC__ */
63 #endif /* __WINE_CONIO_H */