conio.h revision 040b4a09341f574825386333398110f4db3e1e51
671242f350d172e106580348e24bab66b0d7e6a5vboxsync/*
671242f350d172e106580348e24bab66b0d7e6a5vboxsync * Console I/O definitions
671242f350d172e106580348e24bab66b0d7e6a5vboxsync *
671242f350d172e106580348e24bab66b0d7e6a5vboxsync * Derived from the mingw header written by Colin Peters.
671242f350d172e106580348e24bab66b0d7e6a5vboxsync * Modified for Wine use by Jon Griffiths and Francois Gouget.
671242f350d172e106580348e24bab66b0d7e6a5vboxsync * This file is in the public domain.
671242f350d172e106580348e24bab66b0d7e6a5vboxsync */
671242f350d172e106580348e24bab66b0d7e6a5vboxsync/*
671242f350d172e106580348e24bab66b0d7e6a5vboxsync * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
671242f350d172e106580348e24bab66b0d7e6a5vboxsync * other than GPL or LGPL is available it will apply instead, Sun elects to use only
671242f350d172e106580348e24bab66b0d7e6a5vboxsync * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
671242f350d172e106580348e24bab66b0d7e6a5vboxsync * a choice of LGPL license versions is made available with the language indicating
671242f350d172e106580348e24bab66b0d7e6a5vboxsync * that LGPLv2 or any later version may be used, or where a choice of which version
671242f350d172e106580348e24bab66b0d7e6a5vboxsync * of the LGPL is applied is otherwise unspecified.
671242f350d172e106580348e24bab66b0d7e6a5vboxsync */
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsync#ifndef __WINE_CONIO_H
671242f350d172e106580348e24bab66b0d7e6a5vboxsync#define __WINE_CONIO_H
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsync#include <crtdefs.h>
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsync#ifdef __cplusplus
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncextern "C" {
671242f350d172e106580348e24bab66b0d7e6a5vboxsync#endif
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncchar* __cdecl _cgets(char*);
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncint __cdecl _cprintf(const char*,...);
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncint __cdecl _cputs(const char*);
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncint __cdecl _cscanf(const char*,...);
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncint __cdecl _getch(void);
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncint __cdecl _getche(void);
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncint __cdecl _kbhit(void);
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncint __cdecl _putch(int);
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncint __cdecl _ungetch(int);
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsync#ifdef _M_IX86
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncint __cdecl _inp(unsigned short);
671242f350d172e106580348e24bab66b0d7e6a5vboxsync__msvcrt_ulong __cdecl _inpd(unsigned short);
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncunsigned short __cdecl _inpw(unsigned short);
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncint __cdecl _outp(unsigned short, int);
671242f350d172e106580348e24bab66b0d7e6a5vboxsync__msvcrt_ulong __cdecl _outpd(unsigned short, __msvcrt_ulong);
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncunsigned short __cdecl _outpw(unsigned short, unsigned short);
671242f350d172e106580348e24bab66b0d7e6a5vboxsync#endif
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsync#ifdef __cplusplus
671242f350d172e106580348e24bab66b0d7e6a5vboxsync}
671242f350d172e106580348e24bab66b0d7e6a5vboxsync#endif
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncstatic inline char* cgets(char* str) { return _cgets(str); }
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncstatic inline int cputs(const char* str) { return _cputs(str); }
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncstatic inline int getch(void) { return _getch(); }
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncstatic inline int getche(void) { return _getche(); }
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncstatic inline int kbhit(void) { return _kbhit(); }
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncstatic inline int putch(int c) { return _putch(c); }
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncstatic inline int ungetch(int c) { return _ungetch(c); }
671242f350d172e106580348e24bab66b0d7e6a5vboxsync#ifdef _M_IX86
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncstatic inline int inp(unsigned short i) { return _inp(i); }
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncstatic inline unsigned short inpw(unsigned short i) { return _inpw(i); }
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncstatic inline int outp(unsigned short i, int j) { return _outp(i, j); }
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncstatic inline unsigned short outpw(unsigned short i, unsigned short j) { return _outpw(i, j); }
671242f350d172e106580348e24bab66b0d7e6a5vboxsync#endif
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsync#if defined(__GNUC__) && (__GNUC__ < 4)
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncextern int __cdecl cprintf(const char*,...) __attribute__((alias("_cprintf"),format(printf,1,2)));
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncextern int __cdecl cscanf(const char*,...) __attribute__((alias("_cscanf"),format(scanf,1,2)));
671242f350d172e106580348e24bab66b0d7e6a5vboxsync#else
671242f350d172e106580348e24bab66b0d7e6a5vboxsync#define cprintf _cprintf
671242f350d172e106580348e24bab66b0d7e6a5vboxsync#define cscanf _cscanf
671242f350d172e106580348e24bab66b0d7e6a5vboxsync#endif /* __GNUC__ */
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsync#endif /* __WINE_CONIO_H */
671242f350d172e106580348e24bab66b0d7e6a5vboxsync