c771f83d134f31159291498a898e5ced1f131c9c
2 * Copyright 2001 Jon Griffiths
3 * Copyright 2004 Dimitrie O. Paun
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 #ifndef __WINE_MSVCRT_H
21 #define __WINE_MSVCRT_H
28 extern unsigned int __lc_codepage
;
29 extern int __lc_collate_cp
;
30 extern int __mb_cur_max
;
31 extern const unsigned short _ctype
[257];
33 void __cdecl
_purecall(void);
34 void __cdecl
_amsg_exit(int errnum
);
36 extern char **_environ
;
37 extern wchar_t **_wenviron
;
38 extern char ** SnapshotOfEnvironmentA(char **);
39 extern wchar_t ** SnapshotOfEnvironmentW(wchar_t **);
41 /* Application type flags */
42 #define _UNKNOWN_APP 0
43 #define _CONSOLE_APP 1
46 /* I/O Streamming flags missing from stdio.h */
47 #define _IOYOURBUF 0x0100
48 #define _IOAPPEND 0x0200
49 #define _IOSETVBUF 0x0400
50 #define _IOFEOF 0x0800
51 #define _IOFLRTN 0x1000
52 #define _IOCTRLZ 0x2000
53 #define _IOCOMMIT 0x4000
54 #define _IOFREE 0x10000
56 //wchar_t *wstrdupa(const char *);
58 ///* FIXME: This should be declared in new.h but it's not an extern "C" so
59 // * it would not be much use anyway. Even for Winelib applications.
61 //int __cdecl _set_new_mode(int mode);
63 void* __cdecl
MSVCRT_operator_new(size_t);
64 void __cdecl
MSVCRT_operator_delete(void*);
65 typedef void* (__cdecl
*malloc_func_t
)(size_t);
66 typedef void (__cdecl
*free_func_t
)(void*);
68 extern char* __cdecl
__unDName(char *,const char*,int,malloc_func_t
,free_func_t
,unsigned short int);
69 extern char* __cdecl
__unDNameEx(char *,const char*,int,malloc_func_t
,free_func_t
,void *,unsigned short int);
71 /* Setup and teardown multi threaded locks */
72 extern void msvcrt_init_mt_locks(void);
73 extern void msvcrt_free_mt_locks(void);
75 extern BOOL
msvcrt_init_locale(void);
76 extern void msvcrt_init_math(void);
77 extern void msvcrt_init_io(void);
78 extern void msvcrt_free_io(void);
79 extern void msvcrt_init_console(void);
80 extern void msvcrt_free_console(void);
81 extern void msvcrt_init_args(void);
82 extern void msvcrt_free_args(void);
83 extern void msvcrt_init_signals(void);
84 extern void msvcrt_free_signals(void);
86 extern unsigned create_io_inherit_block(WORD
*, BYTE
**);
88 /* _set_abort_behavior codes */
89 #define MSVCRT__WRITE_ABORT_MSG 1
90 #define MSVCRT__CALL_REPORTFAULT 2
92 #define MSVCRT__OUT_TO_DEFAULT 0
93 #define MSVCRT__OUT_TO_STDERR 1
94 #define MSVCRT__OUT_TO_MSGBOX 2
95 #define MSVCRT__REPORT_ERRMODE 3
97 typedef void (*float_handler
)(int, int);
98 void _default_handler(int signal
);
99 typedef struct _sig_element
103 __p_sig_fn_t handler
;
106 #define MSVCRT_malloc malloc
107 #define MSVCRT_free free
108 char* _setlocale(int,const char*);
109 NTSYSAPI VOID NTAPI
RtlAssert(PVOID FailedAssertion
,PVOID FileName
,ULONG LineNumber
,PCHAR Message
);
111 #endif /* __WINE_MSVCRT_H */