source: trunk/src/msvcrt/msvcrt.h@ 10367

Last change on this file since 10367 was 10005, checked in by sandervl, 22 years ago

PF: MSVCRT update

File size: 4.2 KB
Line 
1/*
2 * Copyright 2001 Jon Griffiths
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
18
19#ifndef __WINE_MSVCRT_H
20#define __WINE_MSVCRT_H
21
22#include <stdarg.h>
23
24#include "winbase.h"
25#include "winnls.h"
26#include "winerror.h"
27#include "msvcrt/eh.h"
28
29/* TLS data */
30extern DWORD MSVCRT_tls_index;
31
32typedef struct __MSVCRT_thread_data
33{
34 int msv_errno;
35 unsigned long doserrno;
36 char *mbstok_next; /* next ptr for mbstok() */
37 char *efcvt_buffer; /* buffer for ecvt/fcvt */
38 terminate_function terminate_handler;
39 unexpected_function unexpected_handler;
40 _se_translator_function se_translator;
41 EXCEPTION_RECORD *exc_record;
42} MSVCRT_thread_data;
43
44extern MSVCRT_thread_data *msvcrt_get_thread_data(void);
45
46extern int MSVCRT_current_lc_all_cp;
47
48void _purecall(void);
49void MSVCRT__set_errno(int);
50char* msvcrt_strndup(const char*,unsigned int);
51LPWSTR msvcrt_wstrndup(LPCWSTR, unsigned int);
52
53void MSVCRT__amsg_exit(int errnum);
54
55extern char **MSVCRT__environ;
56extern WCHAR **MSVCRT__wenviron;
57
58extern char ** msvcrt_SnapshotOfEnvironmentA(char **);
59extern WCHAR ** msvcrt_SnapshotOfEnvironmentW(WCHAR **);
60
61/* FIXME: This should be declared in new.h but it's not an extern "C" so
62 * it would not be much use anyway. Even for Winelib applications.
63 */
64int MSVCRT__set_new_mode(int mode);
65
66/* Setup and teardown multi threaded locks */
67extern void msvcrt_init_mt_locks(void);
68extern void msvcrt_free_mt_locks(void);
69
70extern void msvcrt_init_io(void);
71extern void msvcrt_free_io(void);
72extern void msvcrt_init_console(void);
73extern void msvcrt_free_console(void);
74extern void msvcrt_init_args(void);
75extern void msvcrt_free_args(void);
76extern void msvcrt_init_vtables(void);
77
78/* run-time error codes */
79#define _RT_STACK 0
80#define _RT_NULLPTR 1
81#define _RT_FLOAT 2
82#define _RT_INTDIV 3
83#define _RT_EXECMEM 5
84#define _RT_EXECFORM 6
85#define _RT_EXECENV 7
86#define _RT_SPACEARG 8
87#define _RT_SPACEENV 9
88#define _RT_ABORT 10
89#define _RT_NPTR 12
90#define _RT_FPTR 13
91#define _RT_BREAK 14
92#define _RT_INT 15
93#define _RT_THREAD 16
94#define _RT_LOCK 17
95#define _RT_HEAP 18
96#define _RT_OPENCON 19
97#define _RT_QWIN 20
98#define _RT_NOMAIN 21
99#define _RT_NONCONT 22
100#define _RT_INVALDISP 23
101#define _RT_ONEXIT 24
102#define _RT_PUREVIRT 25
103#define _RT_STDIOINIT 26
104#define _RT_LOWIOINIT 27
105#define _RT_HEAPINIT 28
106#define _RT_DOMAIN 120
107#define _RT_SING 121
108#define _RT_TLOSS 122
109#define _RT_CRNL 252
110#define _RT_BANNER 255
111
112/* Signal types */
113
114#define SIGINT_W 2 /* interrupt */
115#define SIGILL_W 4 /* illegal instruction - invalid function image */
116#define SIGFPE_W 8 /* floating point exception */
117#define SIGSEGV_W 11 /* segment violation */
118#define SIGTERM_W 15 /* Software termination signal from kill */
119#define SIGBREAK_W 21 /* Ctrl-Break sequence */
120#define SIGABRT_W 22 /* abnormal termination triggered by abort call */
121
122#define SIG_DFL_W (void (__cdecl *)(int))0 /* default signal action */
123#define SIG_IGN_W (void (__cdecl *)(int))1 /* ignore signal */
124#define SIG_SGE_W (void (__cdecl *)(int))3 /* signal gets error */
125#define SIG_ACK_W (void (__cdecl *)(int))4 /* acknowledge */
126
127/* signal error value (returned by signal call on error) */
128
129#define SIG_ERR (void (__cdecl *)(int))-1 /* signal error value */
130
131
132#endif /* __WINE_MSVCRT_H */
Note: See TracBrowser for help on using the repository browser.