Skip to content

Commit f73c6da

Browse files
committed
[MSVCRT] Add msvcrt includes from wine-10.0
1 parent 88e8fa6 commit f73c6da

62 files changed

Lines changed: 6634 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

dll/win32/msvcrt/include/assert.h

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*
2+
* Assert support
3+
*
4+
* Copyright 2011 Alexandre Julliard
5+
*
6+
* This library is free software; you can redistribute it and/or
7+
* modify it under the terms of the GNU Lesser General Public
8+
* License as published by the Free Software Foundation; either
9+
* version 2.1 of the License, or (at your option) any later version.
10+
*
11+
* This library is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14+
* Lesser General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU Lesser General Public
17+
* License along with this library; if not, write to the Free Software
18+
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19+
*/
20+
21+
#include <corecrt.h>
22+
23+
#ifdef __cplusplus
24+
extern "C" {
25+
#endif
26+
27+
#undef assert
28+
#ifdef NDEBUG
29+
#define assert(_expr) ((void)0)
30+
#else
31+
_ACRTIMP DECLSPEC_NORETURN void __cdecl _assert(const char *, const char *, unsigned int);
32+
#define assert(_expr) (void)((!!(_expr)) || (_assert(#_expr, __FILE__, __LINE__), 0))
33+
#endif
34+
35+
#ifdef __cplusplus
36+
}
37+
#endif

dll/win32/msvcrt/include/complex.h

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/**
2+
* This file has no copyright assigned and is placed in the Public Domain.
3+
* This file is part of the Wine project.
4+
*/
5+
6+
#ifndef _COMPLEX_H_DEFINED
7+
#define _COMPLEX_H_DEFINED
8+
9+
#include <corecrt.h>
10+
11+
#ifndef _C_COMPLEX_T
12+
#define _C_COMPLEX_T
13+
typedef struct _C_double_complex
14+
{
15+
double _Val[2];
16+
} _C_double_complex;
17+
18+
typedef struct _C_float_complex
19+
{
20+
float _Val[2];
21+
} _C_float_complex;
22+
#endif
23+
24+
typedef _C_double_complex _Dcomplex;
25+
typedef _C_float_complex _Fcomplex;
26+
27+
#endif /* _COMPLEX_H_DEFINED */

dll/win32/msvcrt/include/conio.h

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
/*
2+
* Console I/O definitions
3+
*
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
10+
11+
#include <corecrt.h>
12+
13+
#ifdef __cplusplus
14+
extern "C" {
15+
#endif
16+
17+
_ACRTIMP char* __cdecl _cgets(char*);
18+
_ACRTIMP int __cdecl _cprintf(const char*,...);
19+
_ACRTIMP int __cdecl _cputs(const char*);
20+
_ACRTIMP int __cdecl _cscanf(const char*,...);
21+
_ACRTIMP int __cdecl _getch(void);
22+
_ACRTIMP int __cdecl _getche(void);
23+
_ACRTIMP int __cdecl _kbhit(void);
24+
_ACRTIMP int __cdecl _putch(int);
25+
_ACRTIMP int __cdecl _ungetch(int);
26+
27+
#ifdef _M_IX86
28+
_ACRTIMP int __cdecl _inp(unsigned short);
29+
_ACRTIMP __msvcrt_ulong __cdecl _inpd(unsigned short);
30+
_ACRTIMP unsigned short __cdecl _inpw(unsigned short);
31+
_ACRTIMP int __cdecl _outp(unsigned short, int);
32+
_ACRTIMP __msvcrt_ulong __cdecl _outpd(unsigned short, __msvcrt_ulong);
33+
_ACRTIMP unsigned short __cdecl _outpw(unsigned short, unsigned short);
34+
#endif
35+
36+
#ifdef __cplusplus
37+
}
38+
#endif
39+
40+
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
54+
55+
#if defined(__GNUC__) && (__GNUC__ < 4)
56+
_ACRTIMP int __cdecl cprintf(const char*,...) __attribute__((alias("_cprintf"),format(printf,1,2)));
57+
_ACRTIMP 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__ */
62+
63+
#endif /* __WINE_CONIO_H */

0 commit comments

Comments
 (0)