2002-03-09 23:29:33 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2001 Jon Griffiths
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*/
|
|
|
|
|
2001-01-10 23:59:25 +00:00
|
|
|
#ifndef __WINE_MSVCRT_H
|
|
|
|
#define __WINE_MSVCRT_H
|
|
|
|
|
2001-11-06 20:57:11 +00:00
|
|
|
#include <stdarg.h>
|
|
|
|
#include <ctype.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
2001-01-10 23:59:25 +00:00
|
|
|
#include "windef.h"
|
|
|
|
#include "winbase.h"
|
|
|
|
#include "winerror.h"
|
|
|
|
#include "winnls.h"
|
|
|
|
|
2002-12-19 04:21:30 +00:00
|
|
|
#include "msvcrt/string.h"
|
2002-07-19 03:24:50 +00:00
|
|
|
#include "msvcrt/eh.h"
|
|
|
|
|
2001-01-10 23:59:25 +00:00
|
|
|
/* TLS data */
|
|
|
|
extern DWORD MSVCRT_tls_index;
|
|
|
|
|
|
|
|
typedef struct __MSVCRT_thread_data
|
|
|
|
{
|
2002-07-19 03:24:50 +00:00
|
|
|
int errno;
|
|
|
|
unsigned long doserrno;
|
2003-02-01 00:59:22 +00:00
|
|
|
char *mbstok_next; /* next ptr for mbstok() */
|
2003-03-20 23:47:25 +00:00
|
|
|
char *efcvt_buffer; /* buffer for ecvt/fcvt */
|
2002-07-19 03:24:50 +00:00
|
|
|
terminate_function terminate_handler;
|
|
|
|
unexpected_function unexpected_handler;
|
|
|
|
_se_translator_function se_translator;
|
2002-10-31 02:10:15 +00:00
|
|
|
EXCEPTION_RECORD *exc_record;
|
2001-01-10 23:59:25 +00:00
|
|
|
} MSVCRT_thread_data;
|
|
|
|
|
2002-07-19 03:24:50 +00:00
|
|
|
extern MSVCRT_thread_data *msvcrt_get_thread_data(void);
|
2001-01-10 23:59:25 +00:00
|
|
|
|
2001-07-23 23:50:18 +00:00
|
|
|
extern int MSVCRT_current_lc_all_cp;
|
|
|
|
|
|
|
|
void _purecall(void);
|
2001-04-10 23:25:25 +00:00
|
|
|
void MSVCRT__set_errno(int);
|
|
|
|
char* msvcrt_strndup(const char*,unsigned int);
|
2002-12-19 04:21:30 +00:00
|
|
|
MSVCRT_wchar_t *msvcrt_wstrndup(const MSVCRT_wchar_t*, unsigned int);
|
2001-04-10 23:25:25 +00:00
|
|
|
|
2002-07-19 03:24:50 +00:00
|
|
|
void MSVCRT__amsg_exit(int errnum);
|
|
|
|
|
2002-07-23 20:59:12 +00:00
|
|
|
extern char **MSVCRT__environ;
|
2002-12-19 04:21:30 +00:00
|
|
|
extern MSVCRT_wchar_t **MSVCRT__wenviron;
|
2002-07-23 20:59:12 +00:00
|
|
|
|
|
|
|
extern char ** msvcrt_SnapshotOfEnvironmentA(char **);
|
2002-12-19 04:21:30 +00:00
|
|
|
extern MSVCRT_wchar_t ** msvcrt_SnapshotOfEnvironmentW(MSVCRT_wchar_t **);
|
2002-07-23 20:59:12 +00:00
|
|
|
|
2002-05-31 23:06:46 +00:00
|
|
|
/* FIXME: This should be declared in new.h but it's not an extern "C" so
|
2001-04-10 23:25:25 +00:00
|
|
|
* it would not be much use anyway. Even for Winelib applications.
|
|
|
|
*/
|
|
|
|
int MSVCRT__set_new_mode(int mode);
|
2001-01-10 23:59:25 +00:00
|
|
|
|
2003-03-17 21:21:59 +00:00
|
|
|
void MSVCRT_operator_delete(void*);
|
|
|
|
|
|
|
|
typedef void* (*MSVCRT_malloc_func)(MSVCRT_size_t);
|
|
|
|
typedef void (*MSVCRT_free_func)(void*);
|
|
|
|
|
|
|
|
extern char* MSVCRT___unDName(int,const char*,int,MSVCRT_malloc_func,MSVCRT_free_func,unsigned int);
|
|
|
|
|
2002-02-21 20:22:00 +00:00
|
|
|
/* Setup and teardown multi threaded locks */
|
2002-07-05 21:23:07 +00:00
|
|
|
extern void msvcrt_init_mt_locks(void);
|
|
|
|
extern void msvcrt_free_mt_locks(void);
|
|
|
|
|
|
|
|
extern void msvcrt_init_io(void);
|
|
|
|
extern void msvcrt_free_io(void);
|
|
|
|
extern void msvcrt_init_console(void);
|
|
|
|
extern void msvcrt_free_console(void);
|
|
|
|
extern void msvcrt_init_args(void);
|
|
|
|
extern void msvcrt_free_args(void);
|
|
|
|
extern void msvcrt_init_vtables(void);
|
2002-02-21 20:22:00 +00:00
|
|
|
|
2002-07-20 20:30:57 +00:00
|
|
|
/* run-time error codes */
|
|
|
|
#define _RT_STACK 0
|
|
|
|
#define _RT_NULLPTR 1
|
|
|
|
#define _RT_FLOAT 2
|
|
|
|
#define _RT_INTDIV 3
|
|
|
|
#define _RT_EXECMEM 5
|
|
|
|
#define _RT_EXECFORM 6
|
|
|
|
#define _RT_EXECENV 7
|
|
|
|
#define _RT_SPACEARG 8
|
|
|
|
#define _RT_SPACEENV 9
|
|
|
|
#define _RT_ABORT 10
|
|
|
|
#define _RT_NPTR 12
|
|
|
|
#define _RT_FPTR 13
|
|
|
|
#define _RT_BREAK 14
|
|
|
|
#define _RT_INT 15
|
|
|
|
#define _RT_THREAD 16
|
|
|
|
#define _RT_LOCK 17
|
|
|
|
#define _RT_HEAP 18
|
|
|
|
#define _RT_OPENCON 19
|
|
|
|
#define _RT_QWIN 20
|
|
|
|
#define _RT_NOMAIN 21
|
|
|
|
#define _RT_NONCONT 22
|
|
|
|
#define _RT_INVALDISP 23
|
|
|
|
#define _RT_ONEXIT 24
|
|
|
|
#define _RT_PUREVIRT 25
|
|
|
|
#define _RT_STDIOINIT 26
|
|
|
|
#define _RT_LOWIOINIT 27
|
|
|
|
#define _RT_HEAPINIT 28
|
|
|
|
#define _RT_DOMAIN 120
|
|
|
|
#define _RT_SING 121
|
|
|
|
#define _RT_TLOSS 122
|
|
|
|
#define _RT_CRNL 252
|
|
|
|
#define _RT_BANNER 255
|
|
|
|
|
2001-01-10 23:59:25 +00:00
|
|
|
#endif /* __WINE_MSVCRT_H */
|