2002-03-09 23:29:33 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2001 Jon Griffiths
|
2004-06-25 01:19:15 +00:00
|
|
|
* Copyright 2004 Dimitrie O. Paun
|
2002-03-09 23:29:33 +00:00
|
|
|
*
|
|
|
|
* 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
|
2006-05-18 12:49:52 +00:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2002-03-09 23:29:33 +00:00
|
|
|
*/
|
|
|
|
|
2001-01-10 23:59:25 +00:00
|
|
|
#ifndef __WINE_MSVCRT_H
|
|
|
|
#define __WINE_MSVCRT_H
|
|
|
|
|
2020-11-30 13:37:27 +00:00
|
|
|
#include <errno.h>
|
2001-11-06 20:57:11 +00:00
|
|
|
#include <stdarg.h>
|
2020-11-20 11:35:52 +00:00
|
|
|
#include <stdint.h>
|
2020-12-01 23:54:03 +00:00
|
|
|
#define _NO_CRT_STDIO_INLINE
|
2020-11-30 13:37:33 +00:00
|
|
|
#include <stdio.h>
|
2020-12-01 12:51:23 +00:00
|
|
|
#include <stdlib.h>
|
2020-11-20 11:35:52 +00:00
|
|
|
#include <wchar.h>
|
2001-11-06 20:57:11 +00:00
|
|
|
|
2001-01-10 23:59:25 +00:00
|
|
|
#include "windef.h"
|
|
|
|
#include "winbase.h"
|
2020-12-01 23:54:09 +00:00
|
|
|
#undef strncpy
|
2021-05-04 19:23:01 +00:00
|
|
|
#undef wcsncpy
|
2001-01-10 23:59:25 +00:00
|
|
|
|
2021-01-26 18:42:03 +00:00
|
|
|
extern BOOL sse2_supported DECLSPEC_HIDDEN;
|
|
|
|
|
2020-07-23 13:38:40 +00:00
|
|
|
#define DBL80_MAX_10_EXP 4932
|
|
|
|
#define DBL80_MIN_10_EXP -4951
|
2010-08-29 14:59:35 +00:00
|
|
|
|
2020-11-30 13:37:22 +00:00
|
|
|
typedef void (__cdecl *terminate_function)(void);
|
|
|
|
typedef void (__cdecl *unexpected_function)(void);
|
|
|
|
typedef void (__cdecl *_se_translator_function)(unsigned int code, struct _EXCEPTION_POINTERS *info);
|
|
|
|
void __cdecl terminate(void);
|
|
|
|
|
2011-03-16 08:22:24 +00:00
|
|
|
typedef void (__cdecl *MSVCRT_security_error_handler)(int, void *);
|
2004-06-25 01:19:15 +00:00
|
|
|
|
2010-12-01 21:26:26 +00:00
|
|
|
typedef struct {ULONG x80[3];} MSVCRT__LDOUBLE; /* Intel 80 bit FP format has sizeof() 12 */
|
2006-12-17 17:56:50 +00:00
|
|
|
|
2020-11-26 18:19:09 +00:00
|
|
|
typedef struct __lc_time_data {
|
2012-04-11 13:22:12 +00:00
|
|
|
union {
|
2019-12-04 14:30:45 +00:00
|
|
|
const char *str[43];
|
2012-04-11 13:22:12 +00:00
|
|
|
struct {
|
2019-12-04 14:30:45 +00:00
|
|
|
const char *short_wday[7];
|
|
|
|
const char *wday[7];
|
|
|
|
const char *short_mon[12];
|
|
|
|
const char *mon[12];
|
|
|
|
const char *am;
|
|
|
|
const char *pm;
|
|
|
|
const char *short_date;
|
|
|
|
const char *date;
|
|
|
|
const char *time;
|
2012-04-11 13:22:12 +00:00
|
|
|
} names;
|
|
|
|
} str;
|
2016-01-20 10:42:08 +00:00
|
|
|
#if _MSVCR_VER < 110
|
2011-12-07 12:48:22 +00:00
|
|
|
LCID lcid;
|
2016-01-20 10:42:08 +00:00
|
|
|
#endif
|
2020-11-18 16:26:15 +00:00
|
|
|
int unk;
|
2022-02-03 10:50:12 +00:00
|
|
|
LONG refcount;
|
2021-02-02 17:55:12 +00:00
|
|
|
#if _MSVCR_VER == 0 || _MSVCR_VER >= 100
|
2015-06-08 23:24:00 +00:00
|
|
|
union {
|
2020-11-27 13:16:49 +00:00
|
|
|
const wchar_t *wstr[43];
|
2015-06-08 23:24:00 +00:00
|
|
|
struct {
|
2020-11-27 13:16:49 +00:00
|
|
|
const wchar_t *short_wday[7];
|
|
|
|
const wchar_t *wday[7];
|
|
|
|
const wchar_t *short_mon[12];
|
|
|
|
const wchar_t *mon[12];
|
|
|
|
const wchar_t *am;
|
|
|
|
const wchar_t *pm;
|
|
|
|
const wchar_t *short_date;
|
|
|
|
const wchar_t *date;
|
|
|
|
const wchar_t *time;
|
2015-06-08 23:24:00 +00:00
|
|
|
} names;
|
|
|
|
} wstr;
|
2021-02-02 17:55:12 +00:00
|
|
|
#endif
|
2016-01-20 10:42:08 +00:00
|
|
|
#if _MSVCR_VER >= 110
|
2020-11-27 13:16:49 +00:00
|
|
|
const wchar_t *locname;
|
2016-01-20 10:42:08 +00:00
|
|
|
#endif
|
2011-12-07 12:48:22 +00:00
|
|
|
char data[1];
|
2020-11-26 18:19:09 +00:00
|
|
|
} __lc_time_data;
|
2011-05-24 15:22:42 +00:00
|
|
|
|
2020-11-26 18:19:13 +00:00
|
|
|
typedef struct threadmbcinfostruct {
|
2022-02-03 10:50:12 +00:00
|
|
|
LONG refcount;
|
2011-05-24 15:22:42 +00:00
|
|
|
int mbcodepage;
|
|
|
|
int ismbcodepage;
|
|
|
|
int mblcid;
|
|
|
|
unsigned short mbulinfo[6];
|
2011-10-12 09:55:35 +00:00
|
|
|
unsigned char mbctype[257];
|
|
|
|
unsigned char mbcasemap[256];
|
2020-11-26 18:19:13 +00:00
|
|
|
} threadmbcinfo;
|
2011-05-24 15:22:42 +00:00
|
|
|
|
2016-03-16 20:01:50 +00:00
|
|
|
typedef struct _frame_info
|
|
|
|
{
|
|
|
|
void *object;
|
|
|
|
struct _frame_info *next;
|
|
|
|
} frame_info;
|
2002-07-19 03:24:50 +00:00
|
|
|
|
2016-03-16 20:02:04 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
frame_info frame_info;
|
|
|
|
EXCEPTION_RECORD *rec;
|
2018-03-20 14:36:43 +00:00
|
|
|
CONTEXT *context;
|
2016-03-16 20:02:04 +00:00
|
|
|
} cxx_frame_info;
|
|
|
|
|
2016-04-07 13:36:32 +00:00
|
|
|
frame_info* __cdecl _CreateFrameInfo(frame_info *fi, void *obj);
|
2018-03-20 14:36:43 +00:00
|
|
|
BOOL __cdecl __CxxRegisterExceptionObject(EXCEPTION_POINTERS*, cxx_frame_info*);
|
2016-03-16 20:03:19 +00:00
|
|
|
void __cdecl __CxxUnregisterExceptionObject(cxx_frame_info*, BOOL);
|
2016-03-18 11:40:33 +00:00
|
|
|
void CDECL __DestructExceptionObject(EXCEPTION_RECORD*);
|
2016-03-16 20:03:19 +00:00
|
|
|
|
2001-01-10 23:59:25 +00:00
|
|
|
/* TLS data */
|
2012-01-02 20:57:56 +00:00
|
|
|
extern DWORD msvcrt_tls_index DECLSPEC_HIDDEN;
|
2001-01-10 23:59:25 +00:00
|
|
|
|
2020-11-25 19:24:26 +00:00
|
|
|
#define LOCALE_FREE 0x1
|
|
|
|
#define LOCALE_THREAD 0x2
|
|
|
|
|
2011-05-24 15:23:57 +00:00
|
|
|
/* Keep in sync with msvcr90/tests/msvcr90.c */
|
2004-06-25 01:19:15 +00:00
|
|
|
struct __thread_data {
|
2011-05-24 15:22:02 +00:00
|
|
|
DWORD tid;
|
|
|
|
HANDLE handle;
|
2004-06-25 01:19:15 +00:00
|
|
|
int thread_errno;
|
2020-11-27 13:17:05 +00:00
|
|
|
__msvcrt_ulong thread_doserrno;
|
2011-05-24 15:22:14 +00:00
|
|
|
int unk1;
|
2006-01-14 16:27:28 +00:00
|
|
|
unsigned int random_seed; /* seed for rand() */
|
2006-01-14 16:24:49 +00:00
|
|
|
char *strtok_next; /* next ptr for strtok() */
|
2020-11-27 13:16:49 +00:00
|
|
|
wchar_t *wcstok_next; /* next ptr for wcstok() */
|
2011-05-24 15:22:14 +00:00
|
|
|
unsigned char *mbstok_next; /* next ptr for mbstok() */
|
|
|
|
char *strerror_buffer; /* buffer for strerror */
|
2020-11-27 13:16:49 +00:00
|
|
|
wchar_t *wcserror_buffer; /* buffer for wcserror */
|
2011-05-24 15:23:13 +00:00
|
|
|
char *tmpnam_buffer; /* buffer for tmpname() */
|
2020-11-27 13:16:49 +00:00
|
|
|
wchar_t *wtmpnam_buffer; /* buffer for wtmpname() */
|
2011-05-24 15:23:13 +00:00
|
|
|
void *unk2[2];
|
2006-01-14 16:22:03 +00:00
|
|
|
char *asctime_buffer; /* buffer for asctime */
|
2020-11-27 13:16:49 +00:00
|
|
|
wchar_t *wasctime_buffer; /* buffer for wasctime */
|
2020-11-30 13:37:12 +00:00
|
|
|
struct tm *time_buffer; /* buffer for localtime/gmtime */
|
2011-05-24 15:22:14 +00:00
|
|
|
char *efcvt_buffer; /* buffer for ecvt/fcvt */
|
|
|
|
int unk3[2];
|
2013-03-05 10:05:42 +00:00
|
|
|
void *unk4[3];
|
|
|
|
EXCEPTION_POINTERS *xcptinfo;
|
2004-06-25 01:19:15 +00:00
|
|
|
int fpecode;
|
2020-11-26 18:19:13 +00:00
|
|
|
pthreadmbcinfo mbcinfo;
|
2020-11-26 18:19:09 +00:00
|
|
|
pthreadlocinfo locinfo;
|
2020-11-25 19:24:26 +00:00
|
|
|
int locale_flags;
|
2011-05-24 15:22:42 +00:00
|
|
|
int unk5[1];
|
2020-11-30 13:37:22 +00:00
|
|
|
terminate_function terminate_handler;
|
|
|
|
unexpected_function unexpected_handler;
|
|
|
|
_se_translator_function se_translator; /* preserve offset to exc_record and processing_throw */
|
2020-04-21 11:11:56 +00:00
|
|
|
void *unk6;
|
2004-06-25 01:19:15 +00:00
|
|
|
EXCEPTION_RECORD *exc_record;
|
2018-03-20 14:36:43 +00:00
|
|
|
CONTEXT *ctx_record;
|
2018-03-20 14:36:48 +00:00
|
|
|
int processing_throw;
|
2016-03-16 20:01:50 +00:00
|
|
|
frame_info *frame_info_head;
|
|
|
|
void *unk8[6];
|
2015-06-24 13:13:07 +00:00
|
|
|
LCID cached_lcid;
|
2018-05-09 15:36:17 +00:00
|
|
|
BOOL cached_sname;
|
|
|
|
int unk9[2];
|
2015-06-24 13:13:07 +00:00
|
|
|
DWORD cached_cp;
|
|
|
|
char cached_locale[131];
|
|
|
|
void *unk10[100];
|
2016-06-20 15:48:19 +00:00
|
|
|
#if _MSVCR_VER >= 140
|
2020-12-04 14:49:53 +00:00
|
|
|
_invalid_parameter_handler invalid_parameter_handler;
|
2021-05-05 10:03:12 +00:00
|
|
|
HMODULE module;
|
2016-06-20 15:48:19 +00:00
|
|
|
#endif
|
2004-06-25 01:19:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct __thread_data thread_data_t;
|
|
|
|
|
2020-11-10 15:58:37 +00:00
|
|
|
extern thread_data_t *CDECL msvcrt_get_thread_data(void) DECLSPEC_HIDDEN;
|
2004-06-25 01:19:15 +00:00
|
|
|
|
2020-11-26 18:19:24 +00:00
|
|
|
LCID locale_to_LCID(const char*, unsigned short*, BOOL*) DECLSPEC_HIDDEN;
|
2020-11-26 18:19:18 +00:00
|
|
|
extern _locale_t MSVCRT_locale DECLSPEC_HIDDEN;
|
2020-11-26 18:19:09 +00:00
|
|
|
extern __lc_time_data cloc_time_data DECLSPEC_HIDDEN;
|
2011-12-21 14:59:09 +00:00
|
|
|
extern unsigned int MSVCRT___lc_codepage;
|
2008-12-15 15:03:32 +00:00
|
|
|
extern int MSVCRT___lc_collate_cp;
|
|
|
|
extern WORD MSVCRT__ctype [257];
|
2019-01-23 10:59:05 +00:00
|
|
|
extern BOOL initial_locale DECLSPEC_HIDDEN;
|
2020-07-21 10:21:20 +00:00
|
|
|
extern WORD *MSVCRT__pwctype;
|
2004-06-25 01:19:15 +00:00
|
|
|
|
2014-09-02 15:06:06 +00:00
|
|
|
void msvcrt_set_errno(int) DECLSPEC_HIDDEN;
|
|
|
|
#if _MSVCR_VER >= 80
|
2021-08-20 16:45:08 +00:00
|
|
|
void throw_bad_alloc(void) DECLSPEC_HIDDEN;
|
2017-03-23 10:41:36 +00:00
|
|
|
#endif
|
2001-04-10 23:25:25 +00:00
|
|
|
|
2008-07-03 07:08:22 +00:00
|
|
|
void __cdecl _purecall(void);
|
|
|
|
void __cdecl _amsg_exit(int errnum);
|
2002-07-19 03:24:50 +00:00
|
|
|
|
2008-01-08 04:20:30 +00:00
|
|
|
extern char **MSVCRT__environ;
|
2020-11-27 13:16:49 +00:00
|
|
|
extern wchar_t **MSVCRT__wenviron;
|
2002-07-23 20:59:12 +00:00
|
|
|
|
2012-01-02 20:57:56 +00:00
|
|
|
extern char ** msvcrt_SnapshotOfEnvironmentA(char **) DECLSPEC_HIDDEN;
|
2020-11-27 13:16:49 +00:00
|
|
|
extern wchar_t ** msvcrt_SnapshotOfEnvironmentW(wchar_t **) DECLSPEC_HIDDEN;
|
2002-07-23 20:59:12 +00:00
|
|
|
|
2020-11-27 13:16:49 +00:00
|
|
|
wchar_t *msvcrt_wstrdupa(const char *) DECLSPEC_HIDDEN;
|
2008-01-07 13:22:23 +00:00
|
|
|
|
2013-01-18 10:03:13 +00:00
|
|
|
extern unsigned int MSVCRT__commode;
|
|
|
|
|
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.
|
|
|
|
*/
|
2020-12-01 12:51:32 +00:00
|
|
|
void* __cdecl operator_new(size_t);
|
|
|
|
void __cdecl operator_delete(void*);
|
|
|
|
int __cdecl _set_new_mode(int mode);
|
2003-03-17 21:21:59 +00:00
|
|
|
|
2020-11-27 13:17:05 +00:00
|
|
|
typedef void* (__cdecl *malloc_func_t)(size_t);
|
2012-05-05 11:42:00 +00:00
|
|
|
typedef void (__cdecl *free_func_t)(void*);
|
2003-03-17 21:21:59 +00:00
|
|
|
|
2002-02-21 20:22:00 +00:00
|
|
|
/* Setup and teardown multi threaded locks */
|
2012-01-02 20:57:56 +00:00
|
|
|
extern void msvcrt_init_mt_locks(void) DECLSPEC_HIDDEN;
|
2014-06-24 09:57:47 +00:00
|
|
|
extern void msvcrt_free_locks(void) DECLSPEC_HIDDEN;
|
2012-01-02 20:57:56 +00:00
|
|
|
|
2012-09-07 09:01:17 +00:00
|
|
|
extern void msvcrt_init_exception(void*) DECLSPEC_HIDDEN;
|
2012-01-02 20:57:56 +00:00
|
|
|
extern BOOL msvcrt_init_locale(void) DECLSPEC_HIDDEN;
|
2020-11-18 15:14:50 +00:00
|
|
|
extern void msvcrt_init_math(void*) DECLSPEC_HIDDEN;
|
2012-01-02 20:57:56 +00:00
|
|
|
extern void msvcrt_init_io(void) DECLSPEC_HIDDEN;
|
|
|
|
extern void msvcrt_free_io(void) DECLSPEC_HIDDEN;
|
|
|
|
extern void msvcrt_free_console(void) DECLSPEC_HIDDEN;
|
|
|
|
extern void msvcrt_init_args(void) DECLSPEC_HIDDEN;
|
|
|
|
extern void msvcrt_free_args(void) DECLSPEC_HIDDEN;
|
|
|
|
extern void msvcrt_init_signals(void) DECLSPEC_HIDDEN;
|
|
|
|
extern void msvcrt_free_signals(void) DECLSPEC_HIDDEN;
|
2013-01-18 10:03:51 +00:00
|
|
|
extern void msvcrt_free_popen_data(void) DECLSPEC_HIDDEN;
|
2014-04-22 12:38:47 +00:00
|
|
|
extern BOOL msvcrt_init_heap(void) DECLSPEC_HIDDEN;
|
|
|
|
extern void msvcrt_destroy_heap(void) DECLSPEC_HIDDEN;
|
2019-10-16 11:20:58 +00:00
|
|
|
extern void msvcrt_init_clock(void) DECLSPEC_HIDDEN;
|
2012-01-02 20:57:56 +00:00
|
|
|
|
2017-03-23 10:41:05 +00:00
|
|
|
#if _MSVCR_VER >= 100
|
2021-08-18 14:09:09 +00:00
|
|
|
extern void msvcrt_init_concurrency(void*) DECLSPEC_HIDDEN;
|
|
|
|
extern void msvcrt_free_concurrency(void) DECLSPEC_HIDDEN;
|
2017-03-23 10:41:05 +00:00
|
|
|
extern void msvcrt_free_scheduler_thread(void) DECLSPEC_HIDDEN;
|
|
|
|
#endif
|
|
|
|
|
2021-11-11 22:32:45 +00:00
|
|
|
extern BOOL msvcrt_create_io_inherit_block(WORD*, BYTE**) DECLSPEC_HIDDEN;
|
2004-09-03 01:05:30 +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
|
|
|
|
|
2020-12-01 12:51:39 +00:00
|
|
|
extern FILE MSVCRT__iob[];
|
2020-06-29 20:12:22 +00:00
|
|
|
|
2017-11-15 08:47:23 +00:00
|
|
|
#define MSVCRT_NO_CONSOLE_FD (-2)
|
|
|
|
#define MSVCRT_NO_CONSOLE ((HANDLE)MSVCRT_NO_CONSOLE_FD)
|
|
|
|
|
2020-12-01 23:53:28 +00:00
|
|
|
#define MSVCRT_stdin (MSVCRT__iob+STDIN_FILENO)
|
|
|
|
#define MSVCRT_stdout (MSVCRT__iob+STDOUT_FILENO)
|
|
|
|
#define MSVCRT_stderr (MSVCRT__iob+STDERR_FILENO)
|
2004-06-25 01:19:15 +00:00
|
|
|
|
2020-12-01 23:53:28 +00:00
|
|
|
/* internal file._flag flags */
|
2014-06-26 10:29:59 +00:00
|
|
|
#define MSVCRT__USERBUF 0x0100
|
2013-01-18 10:03:13 +00:00
|
|
|
#define MSVCRT__IOCOMMIT 0x4000
|
2004-06-25 01:19:15 +00:00
|
|
|
|
2020-11-27 13:17:05 +00:00
|
|
|
#define _MAX__TIME64_T (((__time64_t)0x00000007 << 32) | 0x93406FFF)
|
2010-10-11 10:24:20 +00:00
|
|
|
|
2020-11-26 18:19:18 +00:00
|
|
|
_locale_t CDECL get_current_locale_noalloc(_locale_t locale) DECLSPEC_HIDDEN;
|
|
|
|
void CDECL free_locale_noalloc(_locale_t locale) DECLSPEC_HIDDEN;
|
2020-11-26 18:19:09 +00:00
|
|
|
pthreadlocinfo CDECL get_locinfo(void) DECLSPEC_HIDDEN;
|
2020-11-26 18:19:13 +00:00
|
|
|
pthreadmbcinfo CDECL get_mbcinfo(void) DECLSPEC_HIDDEN;
|
|
|
|
threadmbcinfo* create_mbcinfo(int, LCID, threadmbcinfo*) DECLSPEC_HIDDEN;
|
2020-11-26 18:19:09 +00:00
|
|
|
void free_locinfo(pthreadlocinfo) DECLSPEC_HIDDEN;
|
2020-11-26 18:19:13 +00:00
|
|
|
void free_mbcinfo(pthreadmbcinfo) DECLSPEC_HIDDEN;
|
2020-07-16 12:46:47 +00:00
|
|
|
int __cdecl __crtLCMapStringA(LCID, DWORD, const char*, int, char*, int, unsigned int, int) DECLSPEC_HIDDEN;
|
2010-04-15 12:25:13 +00:00
|
|
|
|
2020-07-23 13:38:28 +00:00
|
|
|
enum fpmod {
|
|
|
|
FP_ROUND_ZERO, /* only used when dropped part contains only zeros */
|
|
|
|
FP_ROUND_DOWN,
|
|
|
|
FP_ROUND_EVEN,
|
|
|
|
FP_ROUND_UP,
|
|
|
|
FP_VAL_INFINITY,
|
|
|
|
FP_VAL_NAN
|
|
|
|
};
|
|
|
|
|
|
|
|
struct fpnum {
|
|
|
|
int sign;
|
|
|
|
int exp;
|
|
|
|
ULONGLONG m;
|
|
|
|
enum fpmod mod;
|
|
|
|
};
|
2020-11-27 13:16:49 +00:00
|
|
|
struct fpnum fpnum_parse(wchar_t (*)(void*), void (*)(void*),
|
2020-11-26 18:19:09 +00:00
|
|
|
void*, pthreadlocinfo, BOOL) DECLSPEC_HIDDEN;
|
2020-07-23 13:38:28 +00:00
|
|
|
int fpnum_double(struct fpnum*, double*) DECLSPEC_HIDDEN;
|
2010-10-29 13:38:46 +00:00
|
|
|
/* Maybe one day we'll enable the invalid parameter handlers with the full set of information (msvcrXXd)
|
|
|
|
* #define MSVCRT_INVALID_PMT(x) MSVCRT_call_invalid_parameter_handler(x, __FUNCTION__, __FILE__, __LINE__, 0)
|
|
|
|
* #define MSVCRT_CHECK_PMT(x) ((x) ? TRUE : MSVCRT_INVALID_PMT(#x),FALSE)
|
|
|
|
* Until this is done, just keep the same semantics for CHECK_PMT(), but without generating / sending
|
|
|
|
* any information
|
2020-12-01 12:51:23 +00:00
|
|
|
* NB : MSVCRT_call_invalid_parameter_handler is a wrapper around _invalid_parameter in order
|
2010-10-29 13:38:46 +00:00
|
|
|
* to do the Ansi to Unicode transformation
|
|
|
|
*/
|
2020-12-01 12:51:23 +00:00
|
|
|
#define MSVCRT_INVALID_PMT(x,err) (*_errno() = (err), _invalid_parameter(NULL, NULL, NULL, 0, 0))
|
2012-07-26 09:05:32 +00:00
|
|
|
#define MSVCRT_CHECK_PMT_ERR(x,err) ((x) || (MSVCRT_INVALID_PMT( 0, (err) ), FALSE))
|
2020-11-30 13:37:27 +00:00
|
|
|
#define MSVCRT_CHECK_PMT(x) MSVCRT_CHECK_PMT_ERR((x), EINVAL)
|
2004-06-25 01:19:15 +00:00
|
|
|
|
2011-04-20 12:42:16 +00:00
|
|
|
typedef int (*puts_clbk_a)(void*, int, const char*);
|
2020-11-27 13:16:49 +00:00
|
|
|
typedef int (*puts_clbk_w)(void*, int, const wchar_t*);
|
2011-04-20 12:42:16 +00:00
|
|
|
typedef union _printf_arg
|
|
|
|
{
|
|
|
|
void *get_ptr;
|
|
|
|
int get_int;
|
|
|
|
LONGLONG get_longlong;
|
|
|
|
double get_double;
|
|
|
|
} printf_arg;
|
2021-10-22 09:12:09 +00:00
|
|
|
typedef printf_arg (*args_clbk)(void*, int, int, va_list*);
|
2020-11-26 18:19:18 +00:00
|
|
|
int pf_printf_a(puts_clbk_a, void*, const char*, _locale_t,
|
2021-10-22 09:12:09 +00:00
|
|
|
DWORD, args_clbk, void*, va_list*) DECLSPEC_HIDDEN;
|
2020-11-27 13:16:49 +00:00
|
|
|
int pf_printf_w(puts_clbk_w, void*, const wchar_t*, _locale_t,
|
2021-10-22 09:12:09 +00:00
|
|
|
DWORD, args_clbk, void*, va_list*) DECLSPEC_HIDDEN;
|
|
|
|
int create_positional_ctx_a(void*, const char*, va_list) DECLSPEC_HIDDEN;
|
|
|
|
int create_positional_ctx_w(void*, const wchar_t*, va_list) DECLSPEC_HIDDEN;
|
|
|
|
printf_arg arg_clbk_valist(void*, int, int, va_list*) DECLSPEC_HIDDEN;
|
|
|
|
printf_arg arg_clbk_positional(void*, int, int, va_list*) DECLSPEC_HIDDEN;
|
2011-04-20 12:42:16 +00:00
|
|
|
|
2013-02-24 11:23:29 +00:00
|
|
|
extern char* __cdecl __unDName(char *,const char*,int,malloc_func_t,free_func_t,unsigned short int);
|
|
|
|
|
|
|
|
/* __unDName/__unDNameEx flags */
|
|
|
|
#define UNDNAME_COMPLETE (0x0000)
|
|
|
|
#define UNDNAME_NO_LEADING_UNDERSCORES (0x0001) /* Don't show __ in calling convention */
|
|
|
|
#define UNDNAME_NO_MS_KEYWORDS (0x0002) /* Don't show calling convention at all */
|
|
|
|
#define UNDNAME_NO_FUNCTION_RETURNS (0x0004) /* Don't show function/method return value */
|
|
|
|
#define UNDNAME_NO_ALLOCATION_MODEL (0x0008)
|
|
|
|
#define UNDNAME_NO_ALLOCATION_LANGUAGE (0x0010)
|
|
|
|
#define UNDNAME_NO_MS_THISTYPE (0x0020)
|
|
|
|
#define UNDNAME_NO_CV_THISTYPE (0x0040)
|
|
|
|
#define UNDNAME_NO_THISTYPE (0x0060)
|
|
|
|
#define UNDNAME_NO_ACCESS_SPECIFIERS (0x0080) /* Don't show access specifier (public/protected/private) */
|
|
|
|
#define UNDNAME_NO_THROW_SIGNATURES (0x0100)
|
|
|
|
#define UNDNAME_NO_MEMBER_TYPE (0x0200) /* Don't show static/virtual specifier */
|
|
|
|
#define UNDNAME_NO_RETURN_UDT_MODEL (0x0400)
|
|
|
|
#define UNDNAME_32_BIT_DECODE (0x0800)
|
|
|
|
#define UNDNAME_NAME_ONLY (0x1000) /* Only report the variable/method name */
|
|
|
|
#define UNDNAME_NO_ARGUMENTS (0x2000) /* Don't show method arguments */
|
|
|
|
#define UNDNAME_NO_SPECIAL_SYMS (0x4000)
|
|
|
|
#define UNDNAME_NO_COMPLEX_TYPE (0x8000)
|
|
|
|
|
2020-11-30 13:37:33 +00:00
|
|
|
#define UCRTBASE_PRINTF_MASK ( \
|
|
|
|
_CRT_INTERNAL_PRINTF_LEGACY_VSPRINTF_NULL_TERMINATION | \
|
|
|
|
_CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR | \
|
|
|
|
_CRT_INTERNAL_PRINTF_LEGACY_WIDE_SPECIFIERS | \
|
|
|
|
_CRT_INTERNAL_PRINTF_LEGACY_MSVCRT_COMPATIBILITY | \
|
|
|
|
_CRT_INTERNAL_PRINTF_LEGACY_THREE_DIGIT_EXPONENTS | \
|
|
|
|
_CRT_INTERNAL_PRINTF_STANDARD_ROUNDING )
|
2015-11-03 18:40:35 +00:00
|
|
|
|
2015-11-03 18:40:36 +00:00
|
|
|
#define MSVCRT_PRINTF_POSITIONAL_PARAMS (0x0100)
|
|
|
|
#define MSVCRT_PRINTF_INVOKE_INVALID_PARAM_HANDLER (0x0200)
|
|
|
|
|
2020-11-30 13:37:33 +00:00
|
|
|
#define UCRTBASE_SCANF_MASK ( \
|
|
|
|
_CRT_INTERNAL_SCANF_SECURECRT | \
|
|
|
|
_CRT_INTERNAL_SCANF_LEGACY_WIDE_SPECIFIERS | \
|
|
|
|
_CRT_INTERNAL_SCANF_LEGACY_MSVCRT_COMPATIBILITY )
|
2015-11-03 18:40:41 +00:00
|
|
|
|
2016-12-13 00:44:44 +00:00
|
|
|
#define COOPERATIVE_TIMEOUT_INFINITE ((unsigned int)-1)
|
2016-12-12 21:21:47 +00:00
|
|
|
#define COOPERATIVE_WAIT_TIMEOUT ~0
|
|
|
|
|
2017-03-27 08:28:19 +00:00
|
|
|
#define INHERIT_THREAD_PRIORITY 0xF000
|
2020-11-20 11:44:42 +00:00
|
|
|
|
2001-01-10 23:59:25 +00:00
|
|
|
#endif /* __WINE_MSVCRT_H */
|