2002-03-10 00:29:33 +01:00
|
|
|
/*
|
|
|
|
* Copyright 2001 Jon Griffiths
|
2004-06-25 03:19:15 +02:00
|
|
|
* Copyright 2004 Dimitrie O. Paun
|
2002-03-10 00:29:33 +01: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 14:49:52 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2002-03-10 00:29:33 +01:00
|
|
|
*/
|
|
|
|
|
2001-01-11 00:59:25 +01:00
|
|
|
#ifndef __WINE_MSVCRT_H
|
|
|
|
#define __WINE_MSVCRT_H
|
|
|
|
|
2020-11-30 14:37:27 +01:00
|
|
|
#include <errno.h>
|
2001-11-06 21:57:11 +01:00
|
|
|
#include <stdarg.h>
|
2020-11-20 12:35:52 +01:00
|
|
|
#include <stdint.h>
|
2020-12-02 00:54:03 +01:00
|
|
|
#define _NO_CRT_STDIO_INLINE
|
2020-11-30 14:37:33 +01:00
|
|
|
#include <stdio.h>
|
2020-12-01 13:51:23 +01:00
|
|
|
#include <stdlib.h>
|
2020-11-20 12:35:52 +01:00
|
|
|
#include <wchar.h>
|
2001-11-06 21:57:11 +01:00
|
|
|
|
2001-01-11 00:59:25 +01:00
|
|
|
#include "windef.h"
|
|
|
|
#include "winbase.h"
|
2020-12-02 00:54:09 +01:00
|
|
|
#undef strncpy
|
2021-05-04 21:23:01 +02:00
|
|
|
#undef wcsncpy
|
2001-01-11 00:59:25 +01:00
|
|
|
|
2021-01-26 19:42:03 +01:00
|
|
|
extern BOOL sse2_supported DECLSPEC_HIDDEN;
|
|
|
|
|
2020-07-23 15:38:40 +02:00
|
|
|
#define DBL80_MAX_10_EXP 4932
|
|
|
|
#define DBL80_MIN_10_EXP -4951
|
2010-08-29 16:59:35 +02:00
|
|
|
|
2020-11-30 14:37:22 +01: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 09:22:24 +01:00
|
|
|
typedef void (__cdecl *MSVCRT_security_error_handler)(int, void *);
|
2004-06-25 03:19:15 +02:00
|
|
|
|
2010-12-01 22:26:26 +01:00
|
|
|
typedef struct {ULONG x80[3];} MSVCRT__LDOUBLE; /* Intel 80 bit FP format has sizeof() 12 */
|
2006-12-17 18:56:50 +01:00
|
|
|
|
2020-11-26 19:19:09 +01:00
|
|
|
typedef struct __lc_time_data {
|
2012-04-11 15:22:12 +02:00
|
|
|
union {
|
2019-12-04 15:30:45 +01:00
|
|
|
const char *str[43];
|
2012-04-11 15:22:12 +02:00
|
|
|
struct {
|
2019-12-04 15:30:45 +01: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 15:22:12 +02:00
|
|
|
} names;
|
|
|
|
} str;
|
2016-01-20 11:42:08 +01:00
|
|
|
#if _MSVCR_VER < 110
|
2011-12-07 13:48:22 +01:00
|
|
|
LCID lcid;
|
2016-01-20 11:42:08 +01:00
|
|
|
#endif
|
2020-11-18 17:26:15 +01:00
|
|
|
int unk;
|
2022-02-03 11:50:12 +01:00
|
|
|
LONG refcount;
|
2021-02-02 18:55:12 +01:00
|
|
|
#if _MSVCR_VER == 0 || _MSVCR_VER >= 100
|
2015-06-09 01:24:00 +02:00
|
|
|
union {
|
2020-11-27 14:16:49 +01:00
|
|
|
const wchar_t *wstr[43];
|
2015-06-09 01:24:00 +02:00
|
|
|
struct {
|
2020-11-27 14:16:49 +01: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-09 01:24:00 +02:00
|
|
|
} names;
|
|
|
|
} wstr;
|
2021-02-02 18:55:12 +01:00
|
|
|
#endif
|
2016-01-20 11:42:08 +01:00
|
|
|
#if _MSVCR_VER >= 110
|
2020-11-27 14:16:49 +01:00
|
|
|
const wchar_t *locname;
|
2016-01-20 11:42:08 +01:00
|
|
|
#endif
|
2011-12-07 13:48:22 +01:00
|
|
|
char data[1];
|
2020-11-26 19:19:09 +01:00
|
|
|
} __lc_time_data;
|
2011-05-24 17:22:42 +02:00
|
|
|
|
2020-11-26 19:19:13 +01:00
|
|
|
typedef struct threadmbcinfostruct {
|
2022-02-03 11:50:12 +01:00
|
|
|
LONG refcount;
|
2011-05-24 17:22:42 +02:00
|
|
|
int mbcodepage;
|
|
|
|
int ismbcodepage;
|
|
|
|
int mblcid;
|
|
|
|
unsigned short mbulinfo[6];
|
2011-10-12 11:55:35 +02:00
|
|
|
unsigned char mbctype[257];
|
|
|
|
unsigned char mbcasemap[256];
|
2020-11-26 19:19:13 +01:00
|
|
|
} threadmbcinfo;
|
2011-05-24 17:22:42 +02:00
|
|
|
|
2016-03-16 21:01:50 +01:00
|
|
|
typedef struct _frame_info
|
|
|
|
{
|
|
|
|
void *object;
|
|
|
|
struct _frame_info *next;
|
|
|
|
} frame_info;
|
2002-07-19 05:24:50 +02:00
|
|
|
|
2016-03-16 21:02:04 +01:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
frame_info frame_info;
|
|
|
|
EXCEPTION_RECORD *rec;
|
2018-03-20 15:36:43 +01:00
|
|
|
CONTEXT *context;
|
2016-03-16 21:02:04 +01:00
|
|
|
} cxx_frame_info;
|
|
|
|
|
2016-04-07 15:36:32 +02:00
|
|
|
frame_info* __cdecl _CreateFrameInfo(frame_info *fi, void *obj);
|
2018-03-20 15:36:43 +01:00
|
|
|
BOOL __cdecl __CxxRegisterExceptionObject(EXCEPTION_POINTERS*, cxx_frame_info*);
|
2016-03-16 21:03:19 +01:00
|
|
|
void __cdecl __CxxUnregisterExceptionObject(cxx_frame_info*, BOOL);
|
2016-03-18 12:40:33 +01:00
|
|
|
void CDECL __DestructExceptionObject(EXCEPTION_RECORD*);
|
2016-03-16 21:03:19 +01:00
|
|
|
|
2001-01-11 00:59:25 +01:00
|
|
|
/* TLS data */
|
2012-01-02 21:57:56 +01:00
|
|
|
extern DWORD msvcrt_tls_index DECLSPEC_HIDDEN;
|
2001-01-11 00:59:25 +01:00
|
|
|
|
2020-11-25 20:24:26 +01:00
|
|
|
#define LOCALE_FREE 0x1
|
|
|
|
#define LOCALE_THREAD 0x2
|
|
|
|
|
2011-05-24 17:23:57 +02:00
|
|
|
/* Keep in sync with msvcr90/tests/msvcr90.c */
|
2004-06-25 03:19:15 +02:00
|
|
|
struct __thread_data {
|
2011-05-24 17:22:02 +02:00
|
|
|
DWORD tid;
|
|
|
|
HANDLE handle;
|
2004-06-25 03:19:15 +02:00
|
|
|
int thread_errno;
|
2020-11-27 14:17:05 +01:00
|
|
|
__msvcrt_ulong thread_doserrno;
|
2011-05-24 17:22:14 +02:00
|
|
|
int unk1;
|
2006-01-14 17:27:28 +01:00
|
|
|
unsigned int random_seed; /* seed for rand() */
|
2006-01-14 17:24:49 +01:00
|
|
|
char *strtok_next; /* next ptr for strtok() */
|
2020-11-27 14:16:49 +01:00
|
|
|
wchar_t *wcstok_next; /* next ptr for wcstok() */
|
2011-05-24 17:22:14 +02:00
|
|
|
unsigned char *mbstok_next; /* next ptr for mbstok() */
|
|
|
|
char *strerror_buffer; /* buffer for strerror */
|
2020-11-27 14:16:49 +01:00
|
|
|
wchar_t *wcserror_buffer; /* buffer for wcserror */
|
2011-05-24 17:23:13 +02:00
|
|
|
char *tmpnam_buffer; /* buffer for tmpname() */
|
2020-11-27 14:16:49 +01:00
|
|
|
wchar_t *wtmpnam_buffer; /* buffer for wtmpname() */
|
2011-05-24 17:23:13 +02:00
|
|
|
void *unk2[2];
|
2006-01-14 17:22:03 +01:00
|
|
|
char *asctime_buffer; /* buffer for asctime */
|
2020-11-27 14:16:49 +01:00
|
|
|
wchar_t *wasctime_buffer; /* buffer for wasctime */
|
2020-11-30 14:37:12 +01:00
|
|
|
struct tm *time_buffer; /* buffer for localtime/gmtime */
|
2011-05-24 17:22:14 +02:00
|
|
|
char *efcvt_buffer; /* buffer for ecvt/fcvt */
|
|
|
|
int unk3[2];
|
2013-03-05 11:05:42 +01:00
|
|
|
void *unk4[3];
|
|
|
|
EXCEPTION_POINTERS *xcptinfo;
|
2004-06-25 03:19:15 +02:00
|
|
|
int fpecode;
|
2020-11-26 19:19:13 +01:00
|
|
|
pthreadmbcinfo mbcinfo;
|
2020-11-26 19:19:09 +01:00
|
|
|
pthreadlocinfo locinfo;
|
2020-11-25 20:24:26 +01:00
|
|
|
int locale_flags;
|
2011-05-24 17:22:42 +02:00
|
|
|
int unk5[1];
|
2020-11-30 14:37:22 +01: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 13:11:56 +02:00
|
|
|
void *unk6;
|
2004-06-25 03:19:15 +02:00
|
|
|
EXCEPTION_RECORD *exc_record;
|
2018-03-20 15:36:43 +01:00
|
|
|
CONTEXT *ctx_record;
|
2018-03-20 15:36:48 +01:00
|
|
|
int processing_throw;
|
2016-03-16 21:01:50 +01:00
|
|
|
frame_info *frame_info_head;
|
|
|
|
void *unk8[6];
|
2015-06-24 15:13:07 +02:00
|
|
|
LCID cached_lcid;
|
2018-05-09 17:36:17 +02:00
|
|
|
BOOL cached_sname;
|
|
|
|
int unk9[2];
|
2015-06-24 15:13:07 +02:00
|
|
|
DWORD cached_cp;
|
|
|
|
char cached_locale[131];
|
|
|
|
void *unk10[100];
|
2016-06-20 17:48:19 +02:00
|
|
|
#if _MSVCR_VER >= 140
|
2020-12-04 15:49:53 +01:00
|
|
|
_invalid_parameter_handler invalid_parameter_handler;
|
2021-05-05 12:03:12 +02:00
|
|
|
HMODULE module;
|
2016-06-20 17:48:19 +02:00
|
|
|
#endif
|
2004-06-25 03:19:15 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct __thread_data thread_data_t;
|
|
|
|
|
2020-11-10 16:58:37 +01:00
|
|
|
extern thread_data_t *CDECL msvcrt_get_thread_data(void) DECLSPEC_HIDDEN;
|
2004-06-25 03:19:15 +02:00
|
|
|
|
2020-11-26 19:19:24 +01:00
|
|
|
LCID locale_to_LCID(const char*, unsigned short*, BOOL*) DECLSPEC_HIDDEN;
|
2020-11-26 19:19:18 +01:00
|
|
|
extern _locale_t MSVCRT_locale DECLSPEC_HIDDEN;
|
2020-11-26 19:19:09 +01:00
|
|
|
extern __lc_time_data cloc_time_data DECLSPEC_HIDDEN;
|
2011-12-21 15:59:09 +01:00
|
|
|
extern unsigned int MSVCRT___lc_codepage;
|
2008-12-15 16:03:32 +01:00
|
|
|
extern int MSVCRT___lc_collate_cp;
|
|
|
|
extern WORD MSVCRT__ctype [257];
|
2019-01-23 11:59:05 +01:00
|
|
|
extern BOOL initial_locale DECLSPEC_HIDDEN;
|
2020-07-21 12:21:20 +02:00
|
|
|
extern WORD *MSVCRT__pwctype;
|
2004-06-25 03:19:15 +02:00
|
|
|
|
2014-09-02 17:06:06 +02:00
|
|
|
void msvcrt_set_errno(int) DECLSPEC_HIDDEN;
|
|
|
|
#if _MSVCR_VER >= 80
|
2021-08-20 18:45:08 +02:00
|
|
|
void throw_bad_alloc(void) DECLSPEC_HIDDEN;
|
2017-03-23 11:41:36 +01:00
|
|
|
#endif
|
2001-04-11 01:25:25 +02:00
|
|
|
|
2008-07-03 09:08:22 +02:00
|
|
|
void __cdecl _purecall(void);
|
|
|
|
void __cdecl _amsg_exit(int errnum);
|
2002-07-19 05:24:50 +02:00
|
|
|
|
2008-01-08 05:20:30 +01:00
|
|
|
extern char **MSVCRT__environ;
|
2020-11-27 14:16:49 +01:00
|
|
|
extern wchar_t **MSVCRT__wenviron;
|
2002-07-23 22:59:12 +02:00
|
|
|
|
2012-01-02 21:57:56 +01:00
|
|
|
extern char ** msvcrt_SnapshotOfEnvironmentA(char **) DECLSPEC_HIDDEN;
|
2020-11-27 14:16:49 +01:00
|
|
|
extern wchar_t ** msvcrt_SnapshotOfEnvironmentW(wchar_t **) DECLSPEC_HIDDEN;
|
2002-07-23 22:59:12 +02:00
|
|
|
|
2020-11-27 14:16:49 +01:00
|
|
|
wchar_t *msvcrt_wstrdupa(const char *) DECLSPEC_HIDDEN;
|
2008-01-07 14:22:23 +01:00
|
|
|
|
2013-01-18 11:03:13 +01:00
|
|
|
extern unsigned int MSVCRT__commode;
|
|
|
|
|
2002-06-01 01:06:46 +02:00
|
|
|
/* FIXME: This should be declared in new.h but it's not an extern "C" so
|
2001-04-11 01:25:25 +02:00
|
|
|
* it would not be much use anyway. Even for Winelib applications.
|
|
|
|
*/
|
2020-12-01 13:51:32 +01:00
|
|
|
void* __cdecl operator_new(size_t);
|
|
|
|
void __cdecl operator_delete(void*);
|
|
|
|
int __cdecl _set_new_mode(int mode);
|
2003-03-17 22:21:59 +01:00
|
|
|
|
2020-11-27 14:17:05 +01:00
|
|
|
typedef void* (__cdecl *malloc_func_t)(size_t);
|
2012-05-05 13:42:00 +02:00
|
|
|
typedef void (__cdecl *free_func_t)(void*);
|
2003-03-17 22:21:59 +01:00
|
|
|
|
2002-02-21 21:22:00 +01:00
|
|
|
/* Setup and teardown multi threaded locks */
|
2012-01-02 21:57:56 +01:00
|
|
|
extern void msvcrt_init_mt_locks(void) DECLSPEC_HIDDEN;
|
2014-06-24 11:57:47 +02:00
|
|
|
extern void msvcrt_free_locks(void) DECLSPEC_HIDDEN;
|
2012-01-02 21:57:56 +01:00
|
|
|
|
2012-09-07 11:01:17 +02:00
|
|
|
extern void msvcrt_init_exception(void*) DECLSPEC_HIDDEN;
|
2012-01-02 21:57:56 +01:00
|
|
|
extern BOOL msvcrt_init_locale(void) DECLSPEC_HIDDEN;
|
2020-11-18 16:14:50 +01:00
|
|
|
extern void msvcrt_init_math(void*) DECLSPEC_HIDDEN;
|
2012-01-02 21:57:56 +01: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 11:03:51 +01:00
|
|
|
extern void msvcrt_free_popen_data(void) DECLSPEC_HIDDEN;
|
2014-04-22 14:38:47 +02:00
|
|
|
extern BOOL msvcrt_init_heap(void) DECLSPEC_HIDDEN;
|
|
|
|
extern void msvcrt_destroy_heap(void) DECLSPEC_HIDDEN;
|
2019-10-16 13:20:58 +02:00
|
|
|
extern void msvcrt_init_clock(void) DECLSPEC_HIDDEN;
|
2012-01-02 21:57:56 +01:00
|
|
|
|
2017-03-23 11:41:05 +01:00
|
|
|
#if _MSVCR_VER >= 100
|
2021-08-18 16:09:09 +02:00
|
|
|
extern void msvcrt_init_concurrency(void*) DECLSPEC_HIDDEN;
|
|
|
|
extern void msvcrt_free_concurrency(void) DECLSPEC_HIDDEN;
|
2017-03-23 11:41:05 +01:00
|
|
|
extern void msvcrt_free_scheduler_thread(void) DECLSPEC_HIDDEN;
|
|
|
|
#endif
|
|
|
|
|
2021-11-11 23:32:45 +01:00
|
|
|
extern BOOL msvcrt_create_io_inherit_block(WORD*, BYTE**) DECLSPEC_HIDDEN;
|
2004-09-03 03:05:30 +02:00
|
|
|
|
2002-07-20 22:30:57 +02: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 13:51:39 +01:00
|
|
|
extern FILE MSVCRT__iob[];
|
2020-06-29 22:12:22 +02:00
|
|
|
|
2017-11-15 09:47:23 +01:00
|
|
|
#define MSVCRT_NO_CONSOLE_FD (-2)
|
|
|
|
#define MSVCRT_NO_CONSOLE ((HANDLE)MSVCRT_NO_CONSOLE_FD)
|
|
|
|
|
2020-12-02 00:53:28 +01: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 03:19:15 +02:00
|
|
|
|
2020-12-02 00:53:28 +01:00
|
|
|
/* internal file._flag flags */
|
2014-06-26 12:29:59 +02:00
|
|
|
#define MSVCRT__USERBUF 0x0100
|
2013-01-18 11:03:13 +01:00
|
|
|
#define MSVCRT__IOCOMMIT 0x4000
|
2004-06-25 03:19:15 +02:00
|
|
|
|
2020-11-27 14:17:05 +01:00
|
|
|
#define _MAX__TIME64_T (((__time64_t)0x00000007 << 32) | 0x93406FFF)
|
2010-10-11 12:24:20 +02:00
|
|
|
|
2020-11-26 19:19:18 +01: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 19:19:09 +01:00
|
|
|
pthreadlocinfo CDECL get_locinfo(void) DECLSPEC_HIDDEN;
|
2020-11-26 19:19:13 +01:00
|
|
|
pthreadmbcinfo CDECL get_mbcinfo(void) DECLSPEC_HIDDEN;
|
|
|
|
threadmbcinfo* create_mbcinfo(int, LCID, threadmbcinfo*) DECLSPEC_HIDDEN;
|
2020-11-26 19:19:09 +01:00
|
|
|
void free_locinfo(pthreadlocinfo) DECLSPEC_HIDDEN;
|
2020-11-26 19:19:13 +01:00
|
|
|
void free_mbcinfo(pthreadmbcinfo) DECLSPEC_HIDDEN;
|
2020-07-16 14:46:47 +02:00
|
|
|
int __cdecl __crtLCMapStringA(LCID, DWORD, const char*, int, char*, int, unsigned int, int) DECLSPEC_HIDDEN;
|
2010-04-15 14:25:13 +02:00
|
|
|
|
2020-07-23 15:38:28 +02: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 14:16:49 +01:00
|
|
|
struct fpnum fpnum_parse(wchar_t (*)(void*), void (*)(void*),
|
2020-11-26 19:19:09 +01:00
|
|
|
void*, pthreadlocinfo, BOOL) DECLSPEC_HIDDEN;
|
2020-07-23 15:38:28 +02:00
|
|
|
int fpnum_double(struct fpnum*, double*) DECLSPEC_HIDDEN;
|
2010-10-29 15:38:46 +02: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 13:51:23 +01:00
|
|
|
* NB : MSVCRT_call_invalid_parameter_handler is a wrapper around _invalid_parameter in order
|
2010-10-29 15:38:46 +02:00
|
|
|
* to do the Ansi to Unicode transformation
|
|
|
|
*/
|
2020-12-01 13:51:23 +01:00
|
|
|
#define MSVCRT_INVALID_PMT(x,err) (*_errno() = (err), _invalid_parameter(NULL, NULL, NULL, 0, 0))
|
2012-07-26 11:05:32 +02:00
|
|
|
#define MSVCRT_CHECK_PMT_ERR(x,err) ((x) || (MSVCRT_INVALID_PMT( 0, (err) ), FALSE))
|
2020-11-30 14:37:27 +01:00
|
|
|
#define MSVCRT_CHECK_PMT(x) MSVCRT_CHECK_PMT_ERR((x), EINVAL)
|
2004-06-25 03:19:15 +02:00
|
|
|
|
2011-04-20 14:42:16 +02:00
|
|
|
typedef int (*puts_clbk_a)(void*, int, const char*);
|
2020-11-27 14:16:49 +01:00
|
|
|
typedef int (*puts_clbk_w)(void*, int, const wchar_t*);
|
2011-04-20 14:42:16 +02:00
|
|
|
typedef union _printf_arg
|
|
|
|
{
|
|
|
|
void *get_ptr;
|
|
|
|
int get_int;
|
|
|
|
LONGLONG get_longlong;
|
|
|
|
double get_double;
|
|
|
|
} printf_arg;
|
2021-10-22 11:12:09 +02:00
|
|
|
typedef printf_arg (*args_clbk)(void*, int, int, va_list*);
|
2020-11-26 19:19:18 +01:00
|
|
|
int pf_printf_a(puts_clbk_a, void*, const char*, _locale_t,
|
2021-10-22 11:12:09 +02:00
|
|
|
DWORD, args_clbk, void*, va_list*) DECLSPEC_HIDDEN;
|
2020-11-27 14:16:49 +01:00
|
|
|
int pf_printf_w(puts_clbk_w, void*, const wchar_t*, _locale_t,
|
2021-10-22 11:12:09 +02: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 14:42:16 +02:00
|
|
|
|
2013-02-24 12:23:29 +01: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 14:37:33 +01: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 19:40:35 +01:00
|
|
|
|
2015-11-03 19:40:36 +01:00
|
|
|
#define MSVCRT_PRINTF_POSITIONAL_PARAMS (0x0100)
|
|
|
|
#define MSVCRT_PRINTF_INVOKE_INVALID_PARAM_HANDLER (0x0200)
|
|
|
|
|
2020-11-30 14:37:33 +01:00
|
|
|
#define UCRTBASE_SCANF_MASK ( \
|
|
|
|
_CRT_INTERNAL_SCANF_SECURECRT | \
|
|
|
|
_CRT_INTERNAL_SCANF_LEGACY_WIDE_SPECIFIERS | \
|
|
|
|
_CRT_INTERNAL_SCANF_LEGACY_MSVCRT_COMPATIBILITY )
|
2015-11-03 19:40:41 +01:00
|
|
|
|
2016-12-13 01:44:44 +01:00
|
|
|
#define COOPERATIVE_TIMEOUT_INFINITE ((unsigned int)-1)
|
2016-12-12 22:21:47 +01:00
|
|
|
#define COOPERATIVE_WAIT_TIMEOUT ~0
|
|
|
|
|
2017-03-27 10:28:19 +02:00
|
|
|
#define INHERIT_THREAD_PRIORITY 0xF000
|
2020-11-20 12:44:42 +01:00
|
|
|
|
2001-01-11 00:59:25 +01:00
|
|
|
#endif /* __WINE_MSVCRT_H */
|