ReactOS 0.4.16-dev-2104-gb84fa49
msvcrt.h File Reference
#include <errno.h>
#include <locale.h>
#include <stdarg.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <wchar.h>
#include "windef.h"
#include "winbase.h"
#include "winnls.h"
Include dependency graph for msvcrt.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  MSVCRT__LDOUBLE
 
struct  __lc_time_data
 
struct  threadmbcinfostruct
 
struct  _frame_info
 
struct  cxx_frame_info
 
struct  __thread_data
 
struct  fpnum
 
union  _printf_arg
 

Macros

#define MSVCRT__NOBUF   _IONBF
 
#define _NO_CRT_STDIO_INLINE
 
#define DBL80_MAX_10_EXP   4932
 
#define DBL80_MIN_10_EXP   -4951
 
#define LOCALE_FREE   0x1
 
#define LOCALE_THREAD   0x2
 
#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
 
#define MSVCRT_NO_CONSOLE_FD   (-2)
 
#define MSVCRT_NO_CONSOLE   ((HANDLE)MSVCRT_NO_CONSOLE_FD)
 
#define __acrt_iob_func(idx)   (MSVCRT__iob+(idx))
 
#define MSVCRT__USERBUF   0x0100
 
#define MSVCRT__IOCOMMIT   0x4000
 
#define _MAX__TIME64_T   (((__time64_t)0x00000007 << 32) | 0x93406FFF)
 
#define MSVCRT_INVALID_PMT(x, err)   (*_errno() = (err), _invalid_parameter(NULL, NULL, NULL, 0, 0))
 
#define MSVCRT_CHECK_PMT_ERR(x, err)   ((x) || (MSVCRT_INVALID_PMT( 0, (err) ), FALSE))
 
#define MSVCRT_CHECK_PMT(x)   MSVCRT_CHECK_PMT_ERR((x), EINVAL)
 
#define UCRTBASE_PRINTF_MASK
 
#define MSVCRT_PRINTF_POSITIONAL_PARAMS   (0x0100)
 
#define MSVCRT_PRINTF_INVOKE_INVALID_PARAM_HANDLER   (0x0200)
 
#define UCRTBASE_SCANF_MASK
 
#define COOPERATIVE_TIMEOUT_INFINITE   ((unsigned int)-1)
 
#define COOPERATIVE_WAIT_TIMEOUT   ~0
 
#define INHERIT_THREAD_PRIORITY   0xF000
 

Typedefs

typedef void(__cdeclterminate_function) (void)
 
typedef void(__cdeclunexpected_function) (void)
 
typedef void(__cdecl_se_translator_function) (unsigned int code, struct _EXCEPTION_POINTERS *info)
 
typedef void(__cdeclMSVCRT_security_error_handler) (int, void *)
 
typedef struct __lc_time_data __lc_time_data
 
typedef struct threadmbcinfostruct threadmbcinfo
 
typedef struct _frame_info frame_info
 
typedef struct __thread_data thread_data_t
 
typedef void *(__cdeclmalloc_func_t) (size_t)
 
typedef void(__cdeclfree_func_t) (void *)
 
typedef int(* puts_clbk_a) (void *, int, const char *)
 
typedef int(* puts_clbk_w) (void *, int, const wchar_t *)
 
typedef union _printf_arg printf_arg
 
typedef printf_arg(* args_clbk) (void *, int, int, va_list *)
 

Enumerations

enum  fpmod {
  FP_ROUND_ZERO , FP_ROUND_DOWN , FP_ROUND_EVEN , FP_ROUND_UP ,
  FP_VAL_INFINITY , FP_VAL_NAN , FP_ROUND_ZERO , FP_ROUND_DOWN ,
  FP_ROUND_EVEN , FP_ROUND_UP , FP_VAL_INFINITY , FP_VAL_NAN ,
  FP_ROUND_ZERO , FP_ROUND_DOWN , FP_ROUND_EVEN , FP_ROUND_UP ,
  FP_VAL_INFINITY , FP_VAL_NAN
}
 

Functions

void __cdecl terminate (void)
 
frame_info *__cdecl _CreateFrameInfo (frame_info *fi, void *obj)
 
BOOL __cdecl __CxxRegisterExceptionObject (EXCEPTION_POINTERS *, cxx_frame_info *)
 
void __cdecl __CxxUnregisterExceptionObject (cxx_frame_info *, BOOL)
 
void CDECL __DestructExceptionObject (EXCEPTION_RECORD *)
 
void **__cdecl __current_exception (void)
 
int *__cdecl __processing_throw (void)
 
thread_data_t *CDECL msvcrt_get_thread_data (void)
 
BOOL locale_to_sname (const char *, unsigned short *, BOOL *, WCHAR *)
 
void msvcrt_set_errno (int)
 
void __cdecl _purecall (void)
 
void __cdecl _amsg_exit (int errnum)
 
int env_init (BOOL, BOOL)
 
wchar_tmsvcrt_wstrdupa (const char *)
 
void *__cdecl operator_new (size_t)
 
void __cdecl operator_delete (void *)
 
int __cdecl _set_new_mode (int mode)
 
void msvcrt_init_mt_locks (void)
 
void msvcrt_free_locks (void)
 
void msvcrt_init_exception (void *)
 
BOOL msvcrt_init_locale (void)
 
void msvcrt_init_math (void *)
 
void msvcrt_init_io (void)
 
void msvcrt_free_io (void)
 
void msvcrt_free_console (void)
 
void msvcrt_init_args (void)
 
void msvcrt_free_args (void)
 
void msvcrt_init_signals (void)
 
void msvcrt_free_signals (void)
 
void msvcrt_free_popen_data (void)
 
BOOL msvcrt_init_heap (void)
 
void msvcrt_destroy_heap (void)
 
void msvcrt_init_clock (void)
 
BOOL msvcrt_create_io_inherit_block (WORD *, BYTE **)
 
_locale_t CDECL get_current_locale_noalloc (_locale_t locale)
 
void CDECL free_locale_noalloc (_locale_t locale)
 
pthreadlocinfo CDECL get_locinfo (void)
 
pthreadmbcinfo CDECL get_mbcinfo (void)
 
threadmbcinfocreate_mbcinfo (int, LCID, threadmbcinfo *)
 
void free_locinfo (pthreadlocinfo)
 
void free_mbcinfo (pthreadmbcinfo)
 
int __cdecl __crtLCMapStringA (LCID, DWORD, const char *, int, char *, int, unsigned int, int)
 
struct fpnum fpnum_parse (wchar_t(*)(void *), void(*)(void *), void *, pthreadlocinfo, BOOL)
 
int fpnum_double (struct fpnum *, double *)
 
int pf_printf_a (puts_clbk_a, void *, const char *, _locale_t, DWORD, args_clbk, void *, va_list *)
 
int pf_printf_w (puts_clbk_w, void *, const wchar_t *, _locale_t, DWORD, args_clbk, void *, va_list *)
 
int create_positional_ctx_a (void *, const char *, va_list)
 
int create_positional_ctx_w (void *, const wchar_t *, va_list)
 
printf_arg arg_clbk_valist (void *, int, int, va_list *)
 
printf_arg arg_clbk_positional (void *, int, int, va_list *)
 
char *__cdecl __unDName (char *, const char *, int, malloc_func_t, free_func_t, unsigned short int)
 
static UINT get_aw_cp (void)
 
static int convert_acp_utf8_to_wcs (const char *str, wchar_t *wstr, int len)
 
static int convert_wcs_to_acp_utf8 (const wchar_t *wstr, char *str, int len)
 
static wchar_twstrdupa_utf8 (const char *str)
 
static charastrdupw_utf8 (const wchar_t *wstr)
 

Variables

BOOL sse2_supported
 
DWORD msvcrt_tls_index
 
_locale_t MSVCRT_locale
 
__lc_time_data cloc_time_data
 
unsigned int MSVCRT___lc_codepage
 
int MSVCRT___lc_collate_cp
 
WORD MSVCRT__ctype [257]
 
BOOL initial_locale
 
WORDMSVCRT__pwctype
 
char ** MSVCRT__environ
 
wchar_t ** MSVCRT__wenviron
 
char ** MSVCRT___initenv
 
wchar_t ** MSVCRT___winitenv
 
unsigned int MSVCRT__commode
 
FILE MSVCRT__iob []
 

Macro Definition Documentation

◆ __acrt_iob_func

#define __acrt_iob_func (   idx)    (MSVCRT__iob+(idx))

Definition at line 332 of file msvcrt.h.

◆ _MAX__TIME64_T

#define _MAX__TIME64_T   (((__time64_t)0x00000007 << 32) | 0x93406FFF)

Definition at line 339 of file msvcrt.h.

◆ _NO_CRT_STDIO_INLINE

#define _NO_CRT_STDIO_INLINE

Definition at line 59 of file msvcrt.h.

◆ _RT_ABORT

#define _RT_ABORT   10

Definition at line 303 of file msvcrt.h.

◆ _RT_BANNER

#define _RT_BANNER   255

Definition at line 325 of file msvcrt.h.

◆ _RT_BREAK

#define _RT_BREAK   14

Definition at line 306 of file msvcrt.h.

◆ _RT_CRNL

#define _RT_CRNL   252

Definition at line 324 of file msvcrt.h.

◆ _RT_DOMAIN

#define _RT_DOMAIN   120

Definition at line 321 of file msvcrt.h.

◆ _RT_EXECENV

#define _RT_EXECENV   7

Definition at line 300 of file msvcrt.h.

◆ _RT_EXECFORM

#define _RT_EXECFORM   6

Definition at line 299 of file msvcrt.h.

◆ _RT_EXECMEM

#define _RT_EXECMEM   5

Definition at line 298 of file msvcrt.h.

◆ _RT_FLOAT

#define _RT_FLOAT   2

Definition at line 296 of file msvcrt.h.

◆ _RT_FPTR

#define _RT_FPTR   13

Definition at line 305 of file msvcrt.h.

◆ _RT_HEAP

#define _RT_HEAP   18

Definition at line 310 of file msvcrt.h.

◆ _RT_HEAPINIT

#define _RT_HEAPINIT   28

Definition at line 320 of file msvcrt.h.

◆ _RT_INT

#define _RT_INT   15

Definition at line 307 of file msvcrt.h.

◆ _RT_INTDIV

#define _RT_INTDIV   3

Definition at line 297 of file msvcrt.h.

◆ _RT_INVALDISP

#define _RT_INVALDISP   23

Definition at line 315 of file msvcrt.h.

◆ _RT_LOCK

#define _RT_LOCK   17

Definition at line 309 of file msvcrt.h.

◆ _RT_LOWIOINIT

#define _RT_LOWIOINIT   27

Definition at line 319 of file msvcrt.h.

◆ _RT_NOMAIN

#define _RT_NOMAIN   21

Definition at line 313 of file msvcrt.h.

◆ _RT_NONCONT

#define _RT_NONCONT   22

Definition at line 314 of file msvcrt.h.

◆ _RT_NPTR

#define _RT_NPTR   12

Definition at line 304 of file msvcrt.h.

◆ _RT_NULLPTR

#define _RT_NULLPTR   1

Definition at line 295 of file msvcrt.h.

◆ _RT_ONEXIT

#define _RT_ONEXIT   24

Definition at line 316 of file msvcrt.h.

◆ _RT_OPENCON

#define _RT_OPENCON   19

Definition at line 311 of file msvcrt.h.

◆ _RT_PUREVIRT

#define _RT_PUREVIRT   25

Definition at line 317 of file msvcrt.h.

◆ _RT_QWIN

#define _RT_QWIN   20

Definition at line 312 of file msvcrt.h.

◆ _RT_SING

#define _RT_SING   121

Definition at line 322 of file msvcrt.h.

◆ _RT_SPACEARG

#define _RT_SPACEARG   8

Definition at line 301 of file msvcrt.h.

◆ _RT_SPACEENV

#define _RT_SPACEENV   9

Definition at line 302 of file msvcrt.h.

◆ _RT_STACK

#define _RT_STACK   0

Definition at line 294 of file msvcrt.h.

◆ _RT_STDIOINIT

#define _RT_STDIOINIT   26

Definition at line 318 of file msvcrt.h.

◆ _RT_THREAD

#define _RT_THREAD   16

Definition at line 308 of file msvcrt.h.

◆ _RT_TLOSS

#define _RT_TLOSS   122

Definition at line 323 of file msvcrt.h.

◆ COOPERATIVE_TIMEOUT_INFINITE

#define COOPERATIVE_TIMEOUT_INFINITE   ((unsigned int)-1)

Definition at line 417 of file msvcrt.h.

◆ COOPERATIVE_WAIT_TIMEOUT

#define COOPERATIVE_WAIT_TIMEOUT   ~0

Definition at line 418 of file msvcrt.h.

◆ DBL80_MAX_10_EXP

#define DBL80_MAX_10_EXP   4932

Definition at line 72 of file msvcrt.h.

◆ DBL80_MIN_10_EXP

#define DBL80_MIN_10_EXP   -4951

Definition at line 73 of file msvcrt.h.

◆ INHERIT_THREAD_PRIORITY

#define INHERIT_THREAD_PRIORITY   0xF000

Definition at line 420 of file msvcrt.h.

◆ LOCALE_FREE

#define LOCALE_FREE   0x1

Definition at line 172 of file msvcrt.h.

◆ LOCALE_THREAD

#define LOCALE_THREAD   0x2

Definition at line 173 of file msvcrt.h.

◆ MSVCRT__IOCOMMIT

#define MSVCRT__IOCOMMIT   0x4000

Definition at line 337 of file msvcrt.h.

◆ MSVCRT__NOBUF

#define MSVCRT__NOBUF   _IONBF

Definition at line 51 of file msvcrt.h.

◆ MSVCRT__USERBUF

#define MSVCRT__USERBUF   0x0100

Definition at line 336 of file msvcrt.h.

◆ MSVCRT_CHECK_PMT

#define MSVCRT_CHECK_PMT (   x)    MSVCRT_CHECK_PMT_ERR((x), EINVAL)

Definition at line 378 of file msvcrt.h.

◆ MSVCRT_CHECK_PMT_ERR

#define MSVCRT_CHECK_PMT_ERR (   x,
  err 
)    ((x) || (MSVCRT_INVALID_PMT( 0, (err) ), FALSE))

Definition at line 377 of file msvcrt.h.

◆ MSVCRT_INVALID_PMT

#define MSVCRT_INVALID_PMT (   x,
  err 
)    (*_errno() = (err), _invalid_parameter(NULL, NULL, NULL, 0, 0))

Definition at line 376 of file msvcrt.h.

◆ MSVCRT_NO_CONSOLE

#define MSVCRT_NO_CONSOLE   ((HANDLE)MSVCRT_NO_CONSOLE_FD)

Definition at line 328 of file msvcrt.h.

◆ MSVCRT_NO_CONSOLE_FD

#define MSVCRT_NO_CONSOLE_FD   (-2)

Definition at line 327 of file msvcrt.h.

◆ MSVCRT_PRINTF_INVOKE_INVALID_PARAM_HANDLER

#define MSVCRT_PRINTF_INVOKE_INVALID_PARAM_HANDLER   (0x0200)

Definition at line 410 of file msvcrt.h.

◆ MSVCRT_PRINTF_POSITIONAL_PARAMS

#define MSVCRT_PRINTF_POSITIONAL_PARAMS   (0x0100)

Definition at line 409 of file msvcrt.h.

◆ UCRTBASE_PRINTF_MASK

#define UCRTBASE_PRINTF_MASK

◆ UCRTBASE_SCANF_MASK

#define UCRTBASE_SCANF_MASK
Value:

Definition at line 412 of file msvcrt.h.

Typedef Documentation

◆ __lc_time_data

◆ _se_translator_function

typedef void(__cdecl * _se_translator_function) (unsigned int code, struct _EXCEPTION_POINTERS *info)

Definition at line 77 of file msvcrt.h.

◆ args_clbk

typedef printf_arg(* args_clbk) (void *, int, int, va_list *)

Definition at line 389 of file msvcrt.h.

◆ frame_info

◆ free_func_t

typedef void(__cdecl * free_func_t) (void *)

Definition at line 264 of file msvcrt.h.

◆ malloc_func_t

typedef void *(__cdecl * malloc_func_t) (size_t)

Definition at line 263 of file msvcrt.h.

◆ MSVCRT_security_error_handler

typedef void(__cdecl * MSVCRT_security_error_handler) (int, void *)

Definition at line 80 of file msvcrt.h.

◆ printf_arg

typedef union _printf_arg printf_arg

◆ puts_clbk_a

typedef int(* puts_clbk_a) (void *, int, const char *)

Definition at line 380 of file msvcrt.h.

◆ puts_clbk_w

typedef int(* puts_clbk_w) (void *, int, const wchar_t *)

Definition at line 381 of file msvcrt.h.

◆ terminate_function

typedef void(__cdecl * terminate_function) (void)

Definition at line 75 of file msvcrt.h.

◆ thread_data_t

Definition at line 224 of file msvcrt.h.

◆ threadmbcinfo

◆ unexpected_function

typedef void(__cdecl * unexpected_function) (void)

Definition at line 76 of file msvcrt.h.

Enumeration Type Documentation

◆ fpmod

Enumerator
FP_ROUND_ZERO 
FP_ROUND_DOWN 
FP_ROUND_EVEN 
FP_ROUND_UP 
FP_VAL_INFINITY 
FP_VAL_NAN 
FP_ROUND_ZERO 
FP_ROUND_DOWN 
FP_ROUND_EVEN 
FP_ROUND_UP 
FP_VAL_INFINITY 
FP_VAL_NAN 
FP_ROUND_ZERO 
FP_ROUND_DOWN 
FP_ROUND_EVEN 
FP_ROUND_UP 
FP_VAL_INFINITY 
FP_VAL_NAN 

Definition at line 350 of file msvcrt.h.

350 {
351 FP_ROUND_ZERO, /* only used when dropped part contains only zeros */
357};
@ FP_VAL_NAN
Definition: msvcrt.h:356
@ FP_ROUND_EVEN
Definition: msvcrt.h:353
@ FP_VAL_INFINITY
Definition: msvcrt.h:355
@ FP_ROUND_UP
Definition: msvcrt.h:354
@ FP_ROUND_ZERO
Definition: msvcrt.h:351
@ FP_ROUND_DOWN
Definition: msvcrt.h:352

Function Documentation

◆ __crtLCMapStringA()

int __cdecl __crtLCMapStringA ( LCID  lcid,
DWORD  mapflags,
const char src,
int  srclen,
char dst,
int  dstlen,
unsigned int  codepage,
int  xflag 
)

Definition at line 877 of file locale.c.

880 {
881 WCHAR buf_in[32], *in = buf_in;
882 WCHAR buf_out[32], *out = buf_out;
883 int in_len, out_len, r;
884
885 TRACE("(lcid %lx, flags %lx, %s(%d), %p(%d), %x, %d), partial stub!\n",
886 lcid, mapflags, src, srclen, dst, dstlen, codepage, xflag);
887
889 if (!in_len) return 0;
890 if (in_len > ARRAY_SIZE(buf_in))
891 {
892 in = malloc(in_len * sizeof(WCHAR));
893 if (!in) return 0;
894 }
895
897 if (!r) goto done;
898
899 if (mapflags & LCMAP_SORTKEY)
900 {
901 r = LCMapStringW(lcid, mapflags, in, in_len, (WCHAR*)dst, dstlen);
902 goto done;
903 }
904
905 r = LCMapStringW(lcid, mapflags, in, in_len, NULL, 0);
906 if (!r) goto done;
907 out_len = r;
908 if (r > ARRAY_SIZE(buf_out))
909 {
910 out = malloc(r * sizeof(WCHAR));
911 if (!out)
912 {
913 r = 0;
914 goto done;
915 }
916 }
917
918 r = LCMapStringW(lcid, mapflags, in, in_len, out, out_len);
919 if (!r) goto done;
920
921 r = WideCharToMultiByte(codepage, 0, out, out_len, dst, dstlen, NULL, NULL);
922
923done:
924 if (in != buf_in) free(in);
925 if (out != buf_out) free(out);
926 return r;
927}
#define ARRAY_SIZE(A)
Definition: main.h:20
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
#define NULL
Definition: types.h:112
#define WideCharToMultiByte
Definition: compat.h:111
#define MultiByteToWideChar
Definition: compat.h:110
LCID lcid
Definition: locale.c:5656
INT WINAPI DECLSPEC_HOTPATCH LCMapStringW(LCID lcid, DWORD flags, const WCHAR *src, int srclen, WCHAR *dst, int dstlen)
Definition: locale.c:6959
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
GLenum src
Definition: glext.h:6340
GLuint in
Definition: glext.h:9616
GLenum GLenum dst
Definition: glext.h:6340
#define MB_ERR_INVALID_CHARS
Definition: unicode.h:41
static DWORD LPDWORD LPCSTR DWORD srclen
Definition: directory.c:52
static DWORD dstlen
Definition: directory.c:51
#define TRACE(s)
Definition: solgame.cpp:4
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
Definition: wcsftime.cpp:383
int codepage
Definition: win_iconv.c:156
#define LCMAP_SORTKEY
Definition: winnls.h:199
__wchar_t WCHAR
Definition: xmlstorage.h:180

◆ __current_exception()

void **__cdecl __current_exception ( void  )

◆ __CxxRegisterExceptionObject()

BOOL __cdecl __CxxRegisterExceptionObject ( EXCEPTION_POINTERS ep,
cxx_frame_info frame_info 
)

Definition at line 968 of file except.c.

969{
971
972 TRACE("(%p, %p)\n", ep, frame_info);
973
974 if (!ep || !ep->ExceptionRecord)
975 {
976 frame_info->rec = (void*)-1;
977 frame_info->context = (void*)-1;
978 return TRUE;
979 }
980
981 frame_info->rec = data->exc_record;
982 frame_info->context = data->ctx_record;
983 data->exc_record = ep->ExceptionRecord;
984 data->ctx_record = ep->ContextRecord;
986 return TRUE;
987}
#define TRUE
Definition: types.h:120
frame_info *CDECL _CreateFrameInfo(frame_info *fi, void *obj)
Definition: except.c:889
thread_data_t *CDECL msvcrt_get_thread_data(void)
Definition: thread.c:45
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
PEXCEPTION_RECORD ExceptionRecord
Definition: rtltypes.h:200
PCONTEXT ContextRecord
Definition: rtltypes.h:201
ULONG_PTR ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS]
Definition: compat.h:213

◆ __CxxUnregisterExceptionObject()

void __cdecl __CxxUnregisterExceptionObject ( cxx_frame_info frame_info,
BOOL  in_use 
)

Definition at line 992 of file except.c.

993{
995
996 TRACE("(%p)\n", frame_info);
997
998 if(frame_info->rec == (void*)-1)
999 return;
1000
1001 _FindAndUnlinkFrame(&frame_info->frame_info);
1002 if(data->exc_record->ExceptionCode == CXX_EXCEPTION && !in_use
1003 && _IsExceptionObjectToBeDestroyed((void*)data->exc_record->ExceptionInformation[1]))
1004 __DestructExceptionObject(data->exc_record);
1005 data->exc_record = frame_info->rec;
1006 data->ctx_record = frame_info->context;
1007}
#define CXX_EXCEPTION
Definition: cppexcept.h:34
void CDECL __DestructExceptionObject(EXCEPTION_RECORD *rec)
Definition: except.c:950
void CDECL _FindAndUnlinkFrame(frame_info *fi)
Definition: except.c:904
BOOL __cdecl _IsExceptionObjectToBeDestroyed(const void *obj)
Definition: except.c:932

◆ __DestructExceptionObject()

void CDECL __DestructExceptionObject ( EXCEPTION_RECORD rec)

Definition at line 950 of file except.c.

951{
953 void *object = (void*)rec->ExceptionInformation[1];
954
955 TRACE("(%p)\n", rec);
956
957 if (!is_cxx_exception( rec )) return;
958
959 if (!info || !info->destructor)
960 return;
961
962 call_dtor( rtti_rva( info->destructor, rec->ExceptionInformation[3] ), object );
963}
static void call_dtor(void *func, void *this)
Definition: cppexcept.h:207
static BOOL is_cxx_exception(EXCEPTION_RECORD *rec)
Definition: cppexcept.h:146
static void * rtti_rva(unsigned int rva, uintptr_t base)
Definition: cxx.h:469

◆ __processing_throw()

int *__cdecl __processing_throw ( void  )

◆ __unDName()

char *__cdecl __unDName ( char buffer,
const char mangled,
int  buflen,
malloc_func_t  memget,
free_func_t  memfree,
unsigned short int  flags 
)

Definition at line 1783 of file undname.c.

1786{
1787 return __unDNameEx(buffer, mangled, buflen, memget, memfree, NULL, flags);
1788}
char *CDECL __unDNameEx(char *buffer, const char *mangled, int buflen, malloc_func_t memget, free_func_t memfree, void *unknown, unsigned short int flags)
Definition: undname.c:1736
GLuint buffer
Definition: glext.h:5915
GLbitfield flags
Definition: glext.h:7161

Referenced by type_info_name().

◆ _amsg_exit()

void __cdecl _amsg_exit ( int  errnum)

Definition at line 233 of file exit.c.

234{
235 TRACE("(%d)\n", errnum);
236
239 {
240 char text[32];
241 sprintf(text, "Error: R60%d",errnum);
242 DoMessageBox("Runtime error!", text);
243 }
244 else
245 _cprintf("\nruntime error R60%d\n",errnum);
246 _aexit_rtn(255);
247}
aexit_t _aexit_rtn
Definition: amsg.c:39
const WCHAR * text
Definition: package.c:1794
int WINAPIV _cprintf(const char *format,...)
Definition: console.c:563
static void DoMessageBox(const char *lead, const char *message)
Definition: exit.c:220
int MSVCRT_app_type
Definition: data.c:59
static int MSVCRT_error_mode
Definition: exit.c:58
#define _OUT_TO_MSGBOX
Definition: stdlib.h:75
#define _OUT_TO_DEFAULT
Definition: stdlib.h:73
#define sprintf
Definition: sprintf.c:45

◆ _CreateFrameInfo()

frame_info *__cdecl _CreateFrameInfo ( frame_info fi,
void obj 
)

Definition at line 889 of file except.c.

890{
892
893 TRACE("(%p, %p)\n", fi, obj);
894
895 fi->next = data->frame_info_head;
896 data->frame_info_head = fi;
897 fi->object = obj;
898 return fi;
899}

◆ _purecall()

void __cdecl _purecall ( void  )

Definition at line 494 of file exit.c.

495{
496 TRACE("(void)\n");
497
500 _amsg_exit( 25 );
501}
static _purecall_handler purecall_handler
Definition: exit.c:35
void CDECL _amsg_exit(int errnum)
Definition: exit.c:233

◆ _set_new_mode()

int __cdecl _set_new_mode ( int  mode)

Definition at line 227 of file heap.c.

228{
229 if(!MSVCRT_CHECK_PMT(mode == 0 || mode == 1)) return -1;
231}
#define InterlockedExchange
Definition: armddk.h:54
static LONG MSVCRT_new_mode
Definition: heap.c:49
#define MSVCRT_CHECK_PMT(x)
Definition: msvcrt.h:378
GLenum mode
Definition: glext.h:6217

◆ arg_clbk_positional()

printf_arg arg_clbk_positional ( void ctx,
int  pos,
int  type,
va_list valist 
)

Definition at line 870 of file wcs.c.

871{
873 return args[pos];
874}
Definition: match.c:390

Referenced by vfprintf_helper(), and vfwprintf_helper().

◆ arg_clbk_valist()

printf_arg arg_clbk_valist ( void ctx,
int  arg_pos,
int  type,
va_list valist 
)

Definition at line 847 of file wcs.c.

848{
850
851 if(type == VT_I8)
852 ret.get_longlong = va_arg(*valist, LONGLONG);
853 else if(type == VT_INT)
854 ret.get_int = va_arg(*valist, int);
855 else if(type == VT_R8)
856 ret.get_double = va_arg(*valist, double);
857 else if(type == VT_PTR)
858 ret.get_ptr = va_arg(*valist, void*);
859 else {
860 ERR("Incorrect type\n");
861 ret.get_int = 0;
862 }
863
864 return ret;
865}
#define ERR(fmt,...)
Definition: precomp.h:57
@ VT_INT
Definition: compat.h:2316
@ VT_PTR
Definition: compat.h:2320
@ VT_R8
Definition: compat.h:2300
@ VT_I8
Definition: compat.h:2314
#define va_arg(v, l)
Definition: stdarg.h:27
return ret
Definition: mutex.c:146
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
static va_list valist
Definition: printf.c:46
int64_t LONGLONG
Definition: typedefs.h:68

Referenced by _vcprintf(), _vcprintf_l(), _vcwprintf(), _vcwprintf_l(), vfprintf_helper(), and vfwprintf_helper().

◆ astrdupw_utf8()

static char * astrdupw_utf8 ( const wchar_t wstr)
inlinestatic

Definition at line 452 of file msvcrt.h.

453{
454 int len = convert_wcs_to_acp_utf8(wstr, NULL, 0);
455 char *str;
456
457 if (!len) return NULL;
458 str = malloc(len * sizeof(char));
459 if (!str) return NULL;
461 return str;
462}
static int convert_wcs_to_acp_utf8(const wchar_t *wstr, char *str, int len)
Definition: msvcrt.h:435
GLenum GLsizei len
Definition: glext.h:6722
const WCHAR * str

Referenced by _fullpath(), _getcwd(), _getdcwd(), and _tempnam().

◆ convert_acp_utf8_to_wcs()

static int convert_acp_utf8_to_wcs ( const char str,
wchar_t wstr,
int  len 
)
inlinestatic

Definition at line 430 of file msvcrt.h.

431{
432 return MultiByteToWideChar(get_aw_cp(), MB_PRECOMPOSED, str, -1, wstr, len);
433}
static UINT get_aw_cp(void)
Definition: msvcrt.h:422
#define MB_PRECOMPOSED
Definition: winnls.h:299

Referenced by msvcrt_valisttos_aw(), and wstrdupa_utf8().

◆ convert_wcs_to_acp_utf8()

static int convert_wcs_to_acp_utf8 ( const wchar_t wstr,
char str,
int  len 
)
inlinestatic

Definition at line 435 of file msvcrt.h.

436{
437 return WideCharToMultiByte(get_aw_cp(), 0, wstr, -1, str, len, NULL, NULL);
438}

Referenced by _fullpath(), _getcwd(), _getdcwd(), astrdupw_utf8(), finddata32_wtoa(), finddata64_wtoa(), and finddata64i32_wtoa().

◆ create_mbcinfo()

threadmbcinfo * create_mbcinfo ( int  cp,
LCID  lcid,
threadmbcinfo old_mbcinfo 
)

Definition at line 219 of file mbcs.c.

220{
221 threadmbcinfo *mbcinfo;
222 int newcp;
223 CPINFO cpi;
224 BYTE *bytes;
225 WORD chartypes[256];
226 char bufA[256];
227 WCHAR bufW[256], lowW[256], upW[256];
228 int charcount, maxchar;
229 int ret;
230 int i;
231
232 if(old_mbcinfo && cp==old_mbcinfo->mbcodepage
233 && (lcid==-1 || lcid==old_mbcinfo->mblcid)) {
234 InterlockedIncrement(&old_mbcinfo->refcount);
235 return old_mbcinfo;
236 }
237
238 mbcinfo = malloc(sizeof(threadmbcinfo));
239 if(!mbcinfo)
240 return NULL;
241 mbcinfo->refcount = 1;
242
243 switch (cp)
244 {
245 case _MB_CP_ANSI:
246 newcp = GetACP();
247 break;
248 case _MB_CP_OEM:
249 newcp = GetOEMCP();
250 break;
251 case _MB_CP_LOCALE:
252 newcp = get_locinfo()->lc_codepage;
253 if(newcp)
254 break;
255 /* fall through (C locale) */
256 case _MB_CP_SBCS:
257 newcp = 20127; /* ASCII */
258 break;
259 default:
260 newcp = cp;
261 break;
262 }
263
264 if(lcid == -1) {
266 sprintf(bufA, ".%d", newcp);
267 mbcinfo->mblcid = locale_to_sname(bufA, NULL, NULL, wbuf) ? LocaleNameToLCID(wbuf, LOCALE_ALLOW_NEUTRAL_NAMES) : -1;
268 } else {
269 mbcinfo->mblcid = lcid;
270 }
271
272 if(mbcinfo->mblcid == -1)
273 {
274 WARN("Can't assign LCID to codepage (%d)\n", mbcinfo->mblcid);
275 mbcinfo->mblcid = 0;
276 }
277
278 if (!GetCPInfo(newcp, &cpi))
279 {
280 WARN("Codepage %d not found\n", newcp);
281 free(mbcinfo);
282 return NULL;
283 }
284
285 /* setup the _mbctype */
286 memset(mbcinfo->mbctype, 0, sizeof(unsigned char[257]));
287 memset(mbcinfo->mbcasemap, 0, sizeof(unsigned char[256]));
288
289 bytes = cpi.LeadByte;
290 while (bytes[0] || bytes[1])
291 {
292 for (i = bytes[0]; i <= bytes[1]; i++)
293 mbcinfo->mbctype[i + 1] |= _M1;
294 bytes += 2;
295 }
296
297 if (cpi.MaxCharSize == 2)
298 {
299 /* trail bytes not available through kernel32 but stored in a structure in msvcrt */
300 struct cp_extra_info_t *cpextra = g_cpextrainfo;
301
302 mbcinfo->ismbcodepage = 1;
303 while (TRUE)
304 {
305 if (cpextra->cp == 0 || cpextra->cp == newcp)
306 {
307 if (cpextra->cp == 0)
308 FIXME("trail bytes data not available for DBCS codepage %d - assuming all bytes\n", newcp);
309
310 bytes = cpextra->TrailBytes;
311 while (bytes[0] || bytes[1])
312 {
313 for (i = bytes[0]; i <= bytes[1]; i++)
314 mbcinfo->mbctype[i + 1] |= _M2;
315 bytes += 2;
316 }
317 break;
318 }
319 cpextra++;
320 }
321 }
322 else
323 mbcinfo->ismbcodepage = 0;
324
325 maxchar = (newcp == CP_UTF8) ? 128 : 256;
326
327 /* we can't use GetStringTypeA directly because we don't have a locale - only a code page
328 */
329 charcount = 0;
330 for (i = 0; i < maxchar; i++)
331 if (!(mbcinfo->mbctype[i + 1] & _M1))
332 bufA[charcount++] = i;
333
334 ret = MultiByteToWideChar(newcp, 0, bufA, charcount, bufW, charcount);
335 if (ret != charcount)
336 {
337 ERR("MultiByteToWideChar of chars failed for cp %d, ret=%d (exp %d), error=%ld\n",
338 newcp, ret, charcount, GetLastError());
339 }
340
341 GetStringTypeW(CT_CTYPE1, bufW, charcount, chartypes);
342 LCMapStringW(mbcinfo->mblcid, LCMAP_LOWERCASE, bufW, charcount, lowW, charcount);
343 LCMapStringW(mbcinfo->mblcid, LCMAP_UPPERCASE, bufW, charcount, upW, charcount);
344
345 charcount = 0;
346 for (i = 0; i < maxchar; i++)
347 if (!(mbcinfo->mbctype[i + 1] & _M1))
348 {
349 if (chartypes[charcount] & C1_UPPER)
350 {
351 mbcinfo->mbctype[i + 1] |= _SBUP;
352 bufW[charcount] = lowW[charcount];
353 }
354 else if (chartypes[charcount] & C1_LOWER)
355 {
356 mbcinfo->mbctype[i + 1] |= _SBLOW;
357 bufW[charcount] = upW[charcount];
358 }
359 charcount++;
360 }
361
362 ret = WideCharToMultiByte(newcp, 0, bufW, charcount, bufA, charcount, NULL, NULL);
363 if (ret != charcount)
364 {
365 ERR("WideCharToMultiByte failed for cp %d, ret=%d (exp %d), error=%ld\n",
366 newcp, ret, charcount, GetLastError());
367 }
368
369 charcount = 0;
370 for (i = 0; i < maxchar; i++)
371 {
372 if(!(mbcinfo->mbctype[i + 1] & _M1))
373 {
374 if(mbcinfo->mbctype[i + 1] & (_SBUP | _SBLOW))
375 mbcinfo->mbcasemap[i] = bufA[charcount];
376 charcount++;
377 }
378 }
379
380 if (newcp == 932) /* CP932 only - set _MP and _MS */
381 {
382 /* On Windows it's possible to calculate the _MP and _MS from CT_CTYPE1
383 * and CT_CTYPE3. But as of Wine 0.9.43 we return wrong values what makes
384 * it hard. As this is set only for codepage 932 we hardcode it what gives
385 * also faster execution.
386 */
387 for (i = 161; i <= 165; i++)
388 mbcinfo->mbctype[i + 1] |= _MP;
389 for (i = 166; i <= 223; i++)
390 mbcinfo->mbctype[i + 1] |= _MS;
391 }
392
393 mbcinfo->mbcodepage = newcp;
394 return mbcinfo;
395}
static unsigned char bytes[4]
Definition: adnsresfilter.c:74
#define InterlockedIncrement
Definition: armddk.h:53
#define FIXME(fmt,...)
Definition: precomp.h:53
#define WARN(fmt,...)
Definition: precomp.h:61
LCID WINAPI LocaleNameToLCID(_In_ LPCWSTR lpName, _In_ DWORD dwFlags)
UINT WINAPI GetACP(void)
Definition: locale.c:2023
BOOL WINAPI GetCPInfo(UINT codepage, LPCPINFO cpinfo)
Definition: locale.c:2146
BOOL WINAPI GetStringTypeW(DWORD type, LPCWSTR src, INT count, LPWORD chartype)
Definition: locale.c:3098
INT WINAPI LCMapStringW(LCID lcid, DWORD flags, LPCWSTR src, INT srclen, LPWSTR dst, INT dstlen)
Definition: locale.c:3808
UINT WINAPI GetOEMCP(void)
Definition: locale.c:2062
#define _M2
Definition: mbctype.h:39
#define _MP
Definition: mbctype.h:37
#define _MB_CP_OEM
Definition: mbctype.h:52
#define _MB_CP_ANSI
Definition: mbctype.h:53
#define _MB_CP_LOCALE
Definition: mbctype.h:54
#define _M1
Definition: mbctype.h:38
#define _SBLOW
Definition: mbctype.h:42
#define _SBUP
Definition: mbctype.h:41
#define _MS
Definition: mbctype.h:36
#define _MB_CP_SBCS
Definition: mbctype.h:51
BOOL locale_to_sname(const char *locale, unsigned short *codepage, BOOL *sname_match, WCHAR *sname)
Definition: locale.c:335
unsigned short WORD
Definition: ntddk_ex.h:93
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define C1_LOWER
Definition: unicode.h:32
#define C1_UPPER
Definition: unicode.h:31
POINT cp
Definition: magnifier.c:59
static struct cp_extra_info_t g_cpextrainfo[]
Definition: mbcs.c:48
#define for
Definition: utility.h:88
#define LOCALE_NAME_MAX_LENGTH
#define CP_UTF8
Definition: nls.h:20
#define memset(x, y, z)
Definition: compat.h:39
BYTE LeadByte[MAX_LEADBYTES]
Definition: winnls.h:652
UINT MaxCharSize
Definition: winnls.h:650
BYTE TrailBytes[MAX_LEADBYTES]
Definition: mbcs.c:45
unsigned char mbcasemap[256]
Definition: msvcrt.h:139
unsigned char mbctype[257]
Definition: msvcrt.h:138
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define get_locinfo()
Definition: winesup.h:25
#define LOCALE_ALLOW_NEUTRAL_NAMES
Definition: winnls.h:25
#define CT_CTYPE1
Definition: winnls.h:255
#define LCMAP_UPPERCASE
Definition: winnls.h:198
#define LCMAP_LOWERCASE
Definition: winnls.h:197
unsigned char BYTE
Definition: xxhash.c:193

◆ create_positional_ctx_a()

int create_positional_ctx_a ( void ,
const char ,
va_list   
)

◆ create_positional_ctx_w()

int create_positional_ctx_w ( void ,
const wchar_t ,
va_list   
)

◆ env_init()

int env_init ( BOOL  unicode,
BOOL  modif 
)

Definition at line 30 of file environ.c.

31{
32 if (!unicode && !MSVCRT___initenv)
33 {
34 char *environ_strings = GetEnvironmentStringsA();
35 int count = 1, len = 1, i = 0; /* keep space for the trailing NULLS */
36 char *ptr;
37
38 for (ptr = environ_strings; *ptr; ptr += strlen(ptr) + 1)
39 {
40 /* Don't count environment variables starting with '=' which are command shell specific */
41 if (*ptr != '=') count++;
42 len += strlen(ptr) + 1;
43 }
46 {
47 FreeEnvironmentStringsA(environ_strings);
48 return -1;
49 }
50
51 memcpy(&MSVCRT___initenv[count], environ_strings, len);
52 for (ptr = (char *)&MSVCRT___initenv[count]; *ptr; ptr += strlen(ptr) + 1)
53 {
54 /* Skip special environment strings set by the command shell */
55 if (*ptr != '=') MSVCRT___initenv[i++] = ptr;
56 }
58 FreeEnvironmentStringsA(environ_strings);
59
61 }
62
63 if (!unicode && modif && MSVCRT__environ == MSVCRT___initenv)
64 {
65 int i = 0;
66
67 while(MSVCRT___initenv[i]) i++;
68 MSVCRT__environ = malloc((i + 1) * sizeof(char *));
69 if (!MSVCRT__environ) return -1;
70 for (i = 0; MSVCRT___initenv[i]; i++)
73 }
74
75 if (unicode && !MSVCRT___winitenv)
76 {
77 wchar_t *wenviron_strings = GetEnvironmentStringsW();
78 int count = 1, len = 1, i = 0; /* keep space for the trailing NULLS */
79 wchar_t *wptr;
80
81 for (wptr = wenviron_strings; *wptr; wptr += wcslen(wptr) + 1)
82 {
83 /* Don't count environment variables starting with '=' which are command shell specific */
84 if (*wptr != '=') count++;
85 len += wcslen(wptr) + 1;
86 }
87 MSVCRT___winitenv = malloc(count * sizeof(*MSVCRT___winitenv) + len * sizeof(wchar_t));
89 {
90 FreeEnvironmentStringsW(wenviron_strings);
91 return -1;
92 }
93
94 memcpy(&MSVCRT___winitenv[count], wenviron_strings, len * sizeof(wchar_t));
95 for (wptr = (wchar_t *)&MSVCRT___winitenv[count]; *wptr; wptr += wcslen(wptr) + 1)
96 {
97 /* Skip special environment strings set by the command shell */
98 if (*wptr != '=') MSVCRT___winitenv[i++] = wptr;
99 }
101 FreeEnvironmentStringsW(wenviron_strings);
102
104 }
105
106 if (unicode && modif && MSVCRT__wenviron == MSVCRT___winitenv)
107 {
108 int i = 0;
109
110 while(MSVCRT___winitenv[i]) i++;
111 MSVCRT__wenviron = malloc((i + 1) * sizeof(wchar_t *));
112 if (!MSVCRT__wenviron) return -1;
113 for (i = 0; MSVCRT___winitenv[i]; i++)
116 }
117
118 return 0;
119}
BOOL WINAPI FreeEnvironmentStringsA(IN LPSTR EnvironmentStrings)
Definition: environ.c:379
BOOL WINAPI FreeEnvironmentStringsW(IN LPWSTR EnvironmentStrings)
Definition: environ.c:389
LPWSTR WINAPI DECLSPEC_HOTPATCH GetEnvironmentStringsW(void)
Definition: process.c:1538
wchar_t ** MSVCRT___winitenv
Definition: data.c:58
char ** MSVCRT___initenv
Definition: data.c:57
wchar_t ** MSVCRT__wenviron
Definition: data.c:56
char ** MSVCRT__environ
Definition: data.c:55
_ACRTIMP size_t __cdecl wcslen(const wchar_t *)
Definition: wcs.c:2983
_ACRTIMP size_t __cdecl strlen(const char *)
Definition: string.c:1592
static char * strdup(const char *buf)
Definition: string.h:83
static wchar_t * wcsdup(const wchar_t *str)
Definition: string.h:94
GLuint GLuint GLsizei count
Definition: gl.h:1545
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
static PVOID ptr
Definition: dispmode.c:27
#define GetEnvironmentStringsA
Definition: winbase.h:3562

Referenced by __wgetmainargs(), env_set(), msvcrt_init_args(), wgetenv_helper(), and wputenv_helper().

◆ fpnum_double()

int fpnum_double ( struct fpnum fp,
double d 
)

Definition at line 365 of file string.c.

366{
367 ULONGLONG bits = 0;
368
369 if (fp->mod == FP_VAL_INFINITY)
370 {
371 *d = fp->sign * INFINITY;
372 return 0;
373 }
374
375 if (fp->mod == FP_VAL_NAN)
376 {
377 bits = ~0;
378 if (fp->sign == 1)
379 bits &= ~((ULONGLONG)1 << (MANT_BITS + EXP_BITS - 1));
380 *d = *(double*)&bits;
381 return 0;
382 }
383
384 TRACE("%c %#I64x *2^%d (round %d)\n", fp->sign == -1 ? '-' : '+',
385 fp->m, fp->exp, fp->mod);
386 if (!fp->m)
387 {
388 *d = fp->sign * 0.0;
389 return 0;
390 }
391
392 /* make sure that we don't overflow modifying exponent */
393 if (fp->exp > 1<<EXP_BITS)
394 {
395 *d = fp->sign * INFINITY;
396 return ERANGE;
397 }
398 if (fp->exp < -(1<<EXP_BITS))
399 {
400 *d = fp->sign * 0.0;
401 return ERANGE;
402 }
403 fp->exp += MANT_BITS - 1;
404
405 /* normalize mantissa */
406 while(fp->m < (ULONGLONG)1 << (MANT_BITS-1))
407 {
408 fp->m <<= 1;
409 fp->exp--;
410 }
411 while(fp->m >= (ULONGLONG)1 << MANT_BITS)
412 {
413 if (fp->m & 1 || fp->mod != FP_ROUND_ZERO)
414 {
415 if (!(fp->m & 1)) fp->mod = FP_ROUND_DOWN;
416 else if(fp->mod == FP_ROUND_ZERO) fp->mod = FP_ROUND_EVEN;
417 else fp->mod = FP_ROUND_UP;
418 }
419 fp->m >>= 1;
420 fp->exp++;
421 }
422 fp->exp += (1 << (EXP_BITS-1)) - 1;
423
424 /* handle subnormals */
425 if (fp->exp <= 0)
426 {
427 if (fp->m & 1 && fp->mod == FP_ROUND_ZERO) fp->mod = FP_ROUND_EVEN;
428 else if (fp->m & 1) fp->mod = FP_ROUND_UP;
429 else if (fp->mod != FP_ROUND_ZERO) fp->mod = FP_ROUND_DOWN;
430 fp->m >>= 1;
431 }
432 while(fp->m && fp->exp<0)
433 {
434 if (fp->m & 1 && fp->mod == FP_ROUND_ZERO) fp->mod = FP_ROUND_EVEN;
435 else if (fp->m & 1) fp->mod = FP_ROUND_UP;
436 else if (fp->mod != FP_ROUND_ZERO) fp->mod = FP_ROUND_DOWN;
437 fp->m >>= 1;
438 fp->exp++;
439 }
440
441 /* round mantissa */
442 if (fp->mod == FP_ROUND_UP || (fp->mod == FP_ROUND_EVEN && fp->m & 1))
443 {
444 fp->m++;
445
446 /* handle subnormal that falls into regular range due to rounding */
447 if (fp->m == (ULONGLONG)1 << (MANT_BITS - 1))
448 {
449 fp->exp++;
450 }
451 else if (fp->m >= (ULONGLONG)1 << MANT_BITS)
452 {
453 fp->exp++;
454 fp->m >>= 1;
455 }
456 }
457
458 if (fp->exp >= (1<<EXP_BITS)-1)
459 {
460 *d = fp->sign * INFINITY;
461 return ERANGE;
462 }
463 if (!fp->m || fp->exp < 0)
464 {
465 *d = fp->sign * 0.0;
466 return ERANGE;
467 }
468
469 if (fp->sign == -1)
470 bits |= (ULONGLONG)1 << (MANT_BITS + EXP_BITS - 1);
471 bits |= (ULONGLONG)fp->exp << (MANT_BITS - 1);
472 bits |= fp->m & (((ULONGLONG)1 << (MANT_BITS - 1)) - 1);
473
474 TRACE("returning %#I64x\n", bits);
475 *d = *(double*)&bits;
476 return 0;
477}
#define EXP_BITS
Definition: bnum.h:22
#define MANT_BITS
Definition: bnum.h:23
#define ERANGE
Definition: errno.h:55
#define INFINITY
Definition: math.h:272
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits
Definition: glext.h:10929
#define d
Definition: ke_i.h:81
enum fpmod mod
Definition: msvcrt.h:363
ULONGLONG m
Definition: msvcrt.h:362
int exp
Definition: msvcrt.h:361
int sign
Definition: msvcrt.h:360
uint64_t ULONGLONG
Definition: typedefs.h:67

Referenced by _wcstod_l().

◆ fpnum_parse()

struct fpnum fpnum_parse ( wchar_t(*)(void *)  ,
void(*)(void *)  ,
void ,
pthreadlocinfo  ,
BOOL   
)

Referenced by _wcstod_l().

◆ free_locale_noalloc()

void CDECL free_locale_noalloc ( _locale_t  locale)

Definition at line 1162 of file locale.c.

1163{
1164 free_locinfo(locale->locinfo);
1165 free_mbcinfo(locale->mbcinfo);
1166}
Definition: _locale.h:75
void free_mbcinfo(pthreadmbcinfo mbcinfo)
Definition: locale.c:1138
void free_locinfo(pthreadlocinfo locinfo)
Definition: locale.c:1061

◆ free_locinfo()

void free_locinfo ( pthreadlocinfo  locinfo)

Definition at line 1061 of file locale.c.

1062{
1063 int i;
1064
1065 if(!locinfo)
1066 return;
1067
1068 for(i=LC_MIN+1; i<=LC_MAX; i++) {
1069 if(!locinfo->lc_category[i].refcount
1070 || !InterlockedDecrement((LONG *)locinfo->lc_category[i].refcount)) {
1071 free(locinfo->lc_category[i].locale);
1072 free(locinfo->lc_category[i].refcount);
1073 }
1074 if(!locinfo->lc_category[i].wrefcount
1075 || !InterlockedDecrement((LONG *)locinfo->lc_category[i].wrefcount)) {
1076#if _MSVCR_VER >= 110
1077 free(locinfo->lc_name[i]);
1078#endif
1079 free(locinfo->lc_category[i].wrefcount);
1080 }
1081 }
1082
1083 if(locinfo->lconv_num_refcount
1084 && !InterlockedDecrement((LONG *)locinfo->lconv_num_refcount)) {
1085 free(locinfo->lconv->decimal_point);
1086 free(locinfo->lconv->thousands_sep);
1087 free(locinfo->lconv->grouping);
1088#if _MSVCR_VER >= 100
1089 free(locinfo->lconv->_W_decimal_point);
1090 free(locinfo->lconv->_W_thousands_sep);
1091#endif
1092 free(locinfo->lconv_num_refcount);
1093 }
1094 if(locinfo->lconv_mon_refcount
1095 && !InterlockedDecrement((LONG *)locinfo->lconv_mon_refcount)) {
1096 free(locinfo->lconv->int_curr_symbol);
1097 free(locinfo->lconv->currency_symbol);
1098 free(locinfo->lconv->mon_decimal_point);
1099 free(locinfo->lconv->mon_thousands_sep);
1100 free(locinfo->lconv->mon_grouping);
1101 free(locinfo->lconv->positive_sign);
1102 free(locinfo->lconv->negative_sign);
1103#if _MSVCR_VER >= 100
1104 free(locinfo->lconv->_W_int_curr_symbol);
1105 free(locinfo->lconv->_W_currency_symbol);
1106 free(locinfo->lconv->_W_mon_decimal_point);
1107 free(locinfo->lconv->_W_mon_thousands_sep);
1108 free(locinfo->lconv->_W_positive_sign);
1109 free(locinfo->lconv->_W_negative_sign);
1110#endif
1111 free(locinfo->lconv_mon_refcount);
1112 }
1113 if(locinfo->lconv_intl_refcount
1114 && !InterlockedDecrement((LONG *)locinfo->lconv_intl_refcount)) {
1115 free(locinfo->lconv_intl_refcount);
1116 free(locinfo->lconv);
1117 }
1118
1119 if(locinfo->ctype1_refcount
1120 && !InterlockedDecrement((LONG *)locinfo->ctype1_refcount)) {
1121 free(locinfo->ctype1_refcount);
1122 free(locinfo->ctype1);
1123 free((void*)locinfo->pclmap);
1124 free((void*)locinfo->pcumap);
1125 }
1126
1127 if(locinfo->lc_time_curr && !InterlockedDecrement(&locinfo->lc_time_curr->refcount)
1128 && locinfo->lc_time_curr != &cloc_time_data)
1129 free(locinfo->lc_time_curr);
1130
1131 if(InterlockedDecrement((LONG *)&locinfo->refcount))
1132 return;
1133
1134 free(locinfo);
1135}
#define InterlockedDecrement
Definition: armddk.h:52
#define LC_MAX
Definition: locale.h:32
#define LC_MIN
Definition: locale.h:31
__lc_time_data cloc_time_data
Definition: locale.c:60
else locinfo
Definition: scanf.h:225
long LONG
Definition: pedump.c:60

◆ free_mbcinfo()

void free_mbcinfo ( pthreadmbcinfo  mbcinfo)

Definition at line 1138 of file locale.c.

1139{
1140 if(!mbcinfo)
1141 return;
1142
1143 if(InterlockedDecrement(&mbcinfo->refcount))
1144 return;
1145
1146 free(mbcinfo);
1147}

◆ get_aw_cp()

static UINT get_aw_cp ( void  )
inlinestatic

Definition at line 422 of file msvcrt.h.

423{
424#if _MSVCR_VER>=140
425 if (___lc_codepage_func() == CP_UTF8) return CP_UTF8;
426#endif
427 return CP_ACP;
428}
#define CP_ACP
Definition: compat.h:109
_ACRTIMP unsigned int __cdecl ___lc_codepage_func(void)
Definition: locale.c:1047

Referenced by convert_acp_utf8_to_wcs(), convert_wcs_to_acp_utf8(), and msvcrt_argvtos_aw().

◆ get_current_locale_noalloc()

_locale_t CDECL get_current_locale_noalloc ( _locale_t  locale)

Definition at line 1149 of file locale.c.

1150{
1152
1154 locale->locinfo = data->locinfo;
1155 locale->mbcinfo = data->mbcinfo;
1156
1157 grab_locinfo(locale->locinfo);
1158 InterlockedIncrement(&locale->mbcinfo->refcount);
1159 return locale;
1160}
static void update_thread_locale(thread_data_t *data)
Definition: locale.c:609
static void grab_locinfo(pthreadlocinfo locinfo)
Definition: locale.c:587

◆ get_locinfo()

pthreadlocinfo CDECL get_locinfo ( void  )

Definition at line 635 of file locale.c.

635 {
638 return data->locinfo;
639}

◆ get_mbcinfo()

pthreadmbcinfo CDECL get_mbcinfo ( void  )

Definition at line 642 of file locale.c.

642 {
645 return data->mbcinfo;
646}

◆ locale_to_sname()

BOOL locale_to_sname ( const char locale,
unsigned short codepage,
BOOL sname_match,
WCHAR sname 
)

Definition at line 335 of file locale.c.

336{
338 const char *cp, *region;
339 BOOL is_sname = FALSE;
340 DWORD locale_cp;
341
342 if (!strcmp(locale, data->cached_locale)) {
343 if (codepage)
344 *codepage = data->cached_cp;
345 if (sname_match)
346 *sname_match = data->cached_sname_match;
347 wcscpy(sname, data->cached_sname);
348 return TRUE;
349 }
350
351 cp = strchr(locale, '.');
352 region = strchr(locale, '_');
353
354 if(!locale[0] || (cp == locale && !region)) {
356 } else {
357 char search_language_buf[MAX_ELEM_LEN] = { 0 }, search_country_buf[MAX_ELEM_LEN] = { 0 };
359 BOOL remapped = FALSE;
360
361 memset(&search, 0, sizeof(locale_search_t));
362 lstrcpynA(search_language_buf, locale, MAX_ELEM_LEN);
363 if(region) {
364 lstrcpynA(search_country_buf, region+1, MAX_ELEM_LEN);
365 if(region-locale < MAX_ELEM_LEN)
366 search_language_buf[region-locale] = '\0';
367 } else
368 search_country_buf[0] = '\0';
369
370 if(cp) {
371 if(region && cp-region-1<MAX_ELEM_LEN)
372 search_country_buf[cp-region-1] = '\0';
374 search_language_buf[cp-locale] = '\0';
375 }
376
377 if ((remapped = remap_synonym(search_language_buf)))
378 {
379 search.allow_sname = TRUE;
380 }
381
382#if _MSVCR_VER >= 110
383 if(!cp && !region)
384 {
385 search.allow_sname = TRUE;
386 }
387#endif
388
389 MultiByteToWideChar(CP_ACP, 0, search_language_buf, -1, search.search_language, MAX_ELEM_LEN);
390 if (search.allow_sname && IsValidLocaleName(search.search_language))
391 {
392 search.match_flags = FOUND_SNAME;
393 wcscpy(sname, search.search_language);
394 }
395 else
396 {
397 MultiByteToWideChar(CP_ACP, 0, search_country_buf, -1, search.search_country, MAX_ELEM_LEN);
399
400 if (!search.match_flags)
401 return FALSE;
402
403 /* If we were given something that didn't match, fail */
404 if (search.search_language[0] && !(search.match_flags & (FOUND_SNAME | FOUND_LANGUAGE)))
405 return FALSE;
406 if (search.search_country[0] && !(search.match_flags & FOUND_COUNTRY))
407 return FALSE;
408
409 wcscpy(sname, search.found_lang_sname);
410 }
411
412 is_sname = !remapped && (search.match_flags & FOUND_SNAME) != 0;
413 }
414
415 /* Obtain code page */
416 if (!cp || !cp[1] || !_strnicmp(cp, ".ACP", 4)) {
417 GetLocaleInfoEx(sname, LOCALE_IDEFAULTANSICODEPAGE | LOCALE_RETURN_NUMBER,
418 (WCHAR *)&locale_cp, sizeof(DWORD)/sizeof(WCHAR));
419 if (!locale_cp)
420 locale_cp = GetACP();
421 } else if (!_strnicmp(cp, ".OCP", 4)) {
422 GetLocaleInfoEx(sname, LOCALE_IDEFAULTCODEPAGE | LOCALE_RETURN_NUMBER,
423 (WCHAR *)&locale_cp, sizeof(DWORD)/sizeof(WCHAR));
424#if _MSVCR_VER >= 140
425 } else if (!_strnicmp(cp, ".UTF-8", 6)
426 || !_strnicmp(cp, ".UTF8", 5)) {
427 locale_cp = CP_UTF8;
428#endif
429 } else {
430 locale_cp = atoi(cp + 1);
431 }
432 if (!IsValidCodePage(locale_cp))
433 return FALSE;
434
435 if (!locale_cp)
436 return FALSE;
437
438 if (codepage)
439 *codepage = locale_cp;
440 if (sname_match)
441 *sname_match = is_sname;
442
443 if (strlen(locale) < sizeof(data->cached_locale)) {
444 strcpy(data->cached_locale, locale);
445 data->cached_cp = locale_cp;
446 data->cached_sname_match = is_sname;
447 wcscpy(data->cached_sname, sname);
448 }
449
450 return TRUE;
451}
BOOL WINAPI EnumSystemLocalesEx(LOCALE_ENUMPROCEX proc, DWORD flags, LPARAM lparam, LPVOID reserved)
INT WINAPI GetLocaleInfoEx(LPCWSTR locale, LCTYPE info, LPWSTR buffer, INT len)
INT WINAPI GetUserDefaultLocaleName(LPWSTR lpLocaleName, INT cchLocaleName)
BOOL WINAPI IsValidLocaleName(LPCWSTR lpLocaleName)
#define FALSE
Definition: types.h:117
#define lstrcpynA
Definition: compat.h:751
#define _strnicmp(_String1, _String2, _MaxCount)
Definition: compat.h:23
BOOL WINAPI IsValidCodePage(UINT codepage)
Definition: locale.c:2081
_ACRTIMP int __cdecl atoi(const char *)
Definition: string.c:1715
_ACRTIMP char *__cdecl strchr(const char *, int)
Definition: string.c:3286
_ACRTIMP int __cdecl strcmp(const char *, const char *)
Definition: string.c:3319
#define FOUND_LANGUAGE
Definition: locale.c:240
static BOOL CALLBACK find_best_locale_proc(WCHAR *name, DWORD locale_flags, LPARAM lParam)
Definition: locale.c:277
static BOOL remap_synonym(char *name)
Definition: locale.c:222
#define FOUND_SNAME
Definition: locale.c:239
#define FOUND_COUNTRY
Definition: locale.c:241
#define MAX_ELEM_LEN
Definition: locale.c:41
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
LONG_PTR LPARAM
Definition: minwindef.h:175
static short search(int val, const short *table, int size)
Definition: msg711.c:255
wcscpy
strcpy
Definition: string.h:131
#define LOCALE_IDEFAULTCODEPAGE
Definition: winnls.h:44
#define LOCALE_IDEFAULTANSICODEPAGE
Definition: winnls.h:45

Referenced by create_locinfo(), and create_mbcinfo().

◆ msvcrt_create_io_inherit_block()

BOOL msvcrt_create_io_inherit_block ( WORD size,
BYTE **  block 
)

Definition at line 675 of file file.c.

676{
677 int fd, last_fd;
678 char* wxflag_ptr;
679 HANDLE* handle_ptr;
680 ioinfo* fdinfo;
681
682 for (last_fd=MSVCRT_MAX_FILES-1; last_fd>=0; last_fd--)
684 break;
685 last_fd++;
686
687 *size = sizeof(unsigned) + (sizeof(char) + sizeof(HANDLE)) * last_fd;
688 *block = calloc(1, *size);
689 if (!*block)
690 {
691 *size = 0;
692 return FALSE;
693 }
694 wxflag_ptr = (char*)*block + sizeof(unsigned);
695 handle_ptr = (HANDLE*)(wxflag_ptr + last_fd);
696
697 *(unsigned*)*block = last_fd;
698 for (fd = 0; fd < last_fd; fd++)
699 {
700 /* to be inherited, we need it to be open, and that DONTINHERIT isn't set */
701 fdinfo = get_ioinfo_nolock(fd);
702 if ((fdinfo->wxflag & (WX_OPEN | WX_DONTINHERIT)) == WX_OPEN)
703 {
704 *wxflag_ptr = fdinfo->wxflag;
705 *handle_ptr = fdinfo->handle;
706 }
707 else
708 {
709 *wxflag_ptr = 0;
710 *handle_ptr = INVALID_HANDLE_VALUE;
711 }
712 wxflag_ptr++; handle_ptr++;
713 }
714 return TRUE;
715}
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define WX_OPEN
Definition: file.c:80
#define MSVCRT_MAX_FILES
Definition: file.c:125
static ioinfo * get_ioinfo_nolock(int fd)
Definition: file.c:394
GLsizeiptr size
Definition: glext.h:5919
static unsigned(__cdecl *hash_bstr)(bstr_t s)
#define calloc
Definition: rosglue.h:14
#define WX_DONTINHERIT
Definition: file.c:97
static int fd
Definition: io.c:51
Definition: file.c:128
unsigned char wxflag
Definition: file.c:130
HANDLE handle
Definition: file.c:129
PVOID HANDLE
Definition: typedefs.h:73
static unsigned int block
Definition: xmlmemory.c:101

◆ msvcrt_destroy_heap()

void msvcrt_destroy_heap ( void  )

Definition at line 840 of file heap.c.

841{
842#if _MSVCR_VER <= 100 && !defined(__REACTOS__)
844#endif
845 if(sb_heap)
847}
static HANDLE heap
Definition: heap.c:44
static HANDLE sb_heap
Definition: heap.c:44
BOOL WINAPI HeapDestroy(HANDLE hHeap)
Definition: heapmem.c:85

◆ msvcrt_free_args()

void msvcrt_free_args ( void  )

Definition at line 462 of file data.c.

463{
464 /* FIXME: more things to free */
469}
#define GetProcessHeap()
Definition: compat.h:736
#define HeapFree(x, y, z)
Definition: compat.h:735
char * MSVCRT__pgmptr
Definition: data.c:60
char ** MSVCRT___argv
Definition: data.c:50
WCHAR * MSVCRT__wpgmptr
Definition: data.c:61
static wchar_t ** wargv_expand
Definition: data.c:52

◆ msvcrt_free_console()

void msvcrt_free_console ( void  )

Definition at line 68 of file console.c.

69{
70 TRACE(":Closing console handles\n");
73}
#define CloseHandle
Definition: compat.h:739
static HANDLE MSVCRT_console_out
Definition: console.c:37
static HANDLE MSVCRT_console_in
Definition: console.c:36

◆ msvcrt_free_io()

void msvcrt_free_io ( void  )

Definition at line 1392 of file file.c.

1393{
1394 unsigned int i;
1395 int j;
1396
1397 _flushall();
1398 _fcloseall();
1399
1400 for(i=0; i<ARRAY_SIZE(MSVCRT___pioinfo); i++)
1401 {
1402 if(!MSVCRT___pioinfo[i])
1403 continue;
1404
1405 for(j=0; j<MSVCRT_FD_BLOCK_SIZE; j++)
1406 {
1409 }
1411 }
1412
1413 for(j=0; j<MSVCRT_stream_idx; j++)
1414 {
1417
1418 if(cs)
1419 {
1420 cs->DebugInfo->Spare[0] = 0;
1422 }
1423 }
1424
1425 for(i=0; i<ARRAY_SIZE(MSVCRT_fstream); i++)
1427}
static file_crit * MSVCRT_fstream[MSVCRT_MAX_FILES/MSVCRT_FD_BLOCK_SIZE]
Definition: file.c:278
ioinfo * MSVCRT___pioinfo[MSVCRT_MAX_FILES/MSVCRT_FD_BLOCK_SIZE]
Definition: file.c:155
static BOOL ioinfo_is_crit_init(ioinfo *info)
Definition: file.c:201
int CDECL _fcloseall(void)
Definition: file.c:1373
static FILE * msvcrt_get_file(int i)
Definition: file.c:520
static CRITICAL_SECTION * file_get_cs(FILE *f)
Definition: file.c:270
int CDECL _flushall(void)
Definition: file.c:1174
#define MSVCRT_FD_BLOCK_SIZE
Definition: file.c:126
static int MSVCRT_stream_idx
Definition: file.c:279
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
#define cs
Definition: i386-dis.c:442
Definition: fci.c:127
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)

◆ msvcrt_free_locks()

void msvcrt_free_locks ( void  )

Definition at line 149 of file lock.c.

150{
151 int i;
152
153 TRACE( ": uninitializing all mtlocks\n" );
154
155 /* Uninitialize the table */
156 for( i=0; i < _TOTAL_LOCKS; i++ )
157 {
158 if( lock_table[ i ].bInit )
159 {
161 }
162 }
163}
static LOCKTABLEENTRY lock_table[_TOTAL_LOCKS]
Definition: lock.c:38
static void msvcrt_uninitialize_mlock(int locknum)
Definition: lock.c:52
#define _TOTAL_LOCKS
Definition: mtdll.h:59

◆ msvcrt_free_popen_data()

void msvcrt_free_popen_data ( void  )

Definition at line 1034 of file process.c.

1035{
1037}
static struct popen_handle * popen_handles

Referenced by DllMain().

◆ msvcrt_free_signals()

void msvcrt_free_signals ( void  )

Definition at line 640 of file except.c.

641{
643}
BOOL WINAPI DECLSPEC_HOTPATCH SetConsoleCtrlHandler(PHANDLER_ROUTINE HandlerRoutine, BOOL Add)
Definition: console.c:2111
static BOOL WINAPI msvcrt_console_handler(DWORD ctrlType)
Definition: except.c:507

◆ msvcrt_get_thread_data()

thread_data_t *CDECL msvcrt_get_thread_data ( void  )

Definition at line 45 of file thread.c.

46{
48 DWORD err = GetLastError(); /* need to preserve last error */
49
51 {
52 if (!(ptr = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*ptr) )))
55 ptr->tid = GetCurrentThreadId();
56 ptr->handle = INVALID_HANDLE_VALUE;
57 ptr->random_seed = 1;
58 ptr->locinfo = MSVCRT_locale->locinfo;
59 ptr->mbcinfo = MSVCRT_locale->mbcinfo;
60 ptr->cached_locale[0] = 'C';
61 ptr->cached_locale[1] = 0;
62#if _MSVCR_VER >= 140
63 ptr->module = NULL;
64#endif
65 }
67 return ptr;
68}
#define SetLastError(x)
Definition: compat.h:752
#define HeapAlloc
Definition: compat.h:733
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
LPVOID WINAPI TlsGetValue(IN DWORD Index)
Definition: thread.c:1240
BOOL WINAPI TlsSetValue(IN DWORD Index, IN LPVOID Value)
Definition: thread.c:1276
DWORD msvcrt_tls_index
Definition: main.c:29
#define _RT_THREAD
Definition: msvcrt.h:308
#define err(...)
#define MSVCRT_locale
Definition: locale.h:80
DWORD WINAPI GetCurrentThreadId(void)
Definition: thread.c:459

Referenced by __CxxDetectRethrow(), __CxxExceptionFilter(), __CxxRegisterExceptionObject(), __CxxUnregisterExceptionObject(), __doserrno(), __fpecode(), __pxcptinfoptrs(), __uncaught_exception(), __wcserror(), _configthreadlocale(), _CreateFrameInfo(), _ecvt(), _errno(), _fcvt(), _FindAndUnlinkFrame(), _get_terminate(), _get_unexpected(), _gmtime64(), _invalid_parameter(), _IsExceptionObjectToBeDestroyed(), _localtime64(), _mbstok(), _mbstok_l(), _set_se_translator(), _setmbcp(), _strerror(), _tasctime(), _wasctime(), _wcserror(), _wtmpnam(), asctime(), call_catch_block(), cxx_frame_handler(), find_catch_block(), get_current_locale_noalloc(), get_locinfo(), get_mbcinfo(), locale_to_sname(), rand(), set_terminate(), set_unexpected(), setlocale(), srand(), strerror(), strtok(), terminate(), tmpnam(), unexpected(), and wcstok().

◆ msvcrt_init_args()

void msvcrt_init_args ( void  )

Definition at line 404 of file data.c.

405{
407
414
415 TRACE("got %s, wide = %s argc=%d\n", debugstr_a(MSVCRT__acmdln),
417
425 TRACE( "winver %08x winmajor %08x winminor %08x osver %08x\n",
427#ifdef _CRTDLL
431#endif
432
436#ifndef __REACTOS__
438#endif
439
441
443 if (MSVCRT__pgmptr)
444 {
446 MSVCRT__pgmptr[0] = '\0';
447 else
448 MSVCRT__pgmptr[MAX_PATH - 1] = '\0';
449 }
450
452 if (MSVCRT__wpgmptr)
453 {
455 MSVCRT__wpgmptr[0] = '\0';
456 else
457 MSVCRT__wpgmptr[MAX_PATH - 1] = '\0';
458 }
459}
#define _strdup
Definition: debug_ros.c:7
#define _O_TEXT
Definition: cabinet.h:50
unsigned int CRTDLL__baseminor_dll
Definition: dllmain.c:38
unsigned int CRTDLL__basemajor_dll
Definition: dllmain.c:37
unsigned int CRTDLL__baseversion_dll
Definition: dllmain.c:39
#define MAX_PATH
Definition: compat.h:34
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
Definition: loader.c:600
DWORD WINAPI GetModuleFileNameA(HINSTANCE hModule, LPSTR lpFilename, DWORD nSize)
Definition: loader.c:539
BOOL WINAPI GetVersionExW(IN LPOSVERSIONINFOW lpVersionInformation)
Definition: version.c:37
LPWSTR WINAPI GetCommandLineW(void)
Definition: process.c:1338
LPSTR WINAPI GetCommandLineA(void)
Definition: process.c:1329
DWORD WINAPI GetVersion(void)
Definition: version.c:1458
unsigned int MSVCRT__winmajor
Definition: data.c:37
wchar_t ** MSVCRT___wargv
Definition: data.c:51
unsigned int MSVCRT__osplatform
Definition: data.c:36
unsigned int MSVCRT___unguarded_readlc_active
Definition: data.c:48
unsigned int MSVCRT___setlc_active
Definition: data.c:47
unsigned int MSVCRT__osver
Definition: data.c:35
static char ** build_argv(WCHAR **wargv)
Definition: data.c:63
int MSVCRT__fmode
Definition: data.c:34
static WCHAR ** cmdline_to_argv(const WCHAR *src, int *ret_argc)
Definition: data.c:85
static int initial_argc
Definition: data.c:30
unsigned int MSVCRT__winminor
Definition: data.c:38
double MSVCRT__HUGE
Definition: data.c:49
static WCHAR ** initial_wargv
Definition: data.c:29
unsigned int MSVCRT__winver
Definition: data.c:39
int MSVCRT___argc
Definition: data.c:31
wchar_t * MSVCRT__wcmdln
Definition: data.c:54
char * MSVCRT__acmdln
Definition: data.c:53
int env_init(BOOL unicode, BOOL modif)
Definition: environ.c:30
_ACRTIMP wchar_t *__cdecl _wcsdup(const wchar_t *) __WINE_DEALLOC(free) __WINE_MALLOC
Definition: wcs.c:81
#define HUGE_VAL
Definition: math.h:274
#define debugstr_a
Definition: kernel32.h:31
#define debugstr_w
Definition: kernel32.h:32
ULONG dwPlatformId
Definition: rtltypes.h:241
ULONG dwOSVersionInfoSize
Definition: rtltypes.h:237
ULONG dwMajorVersion
Definition: rtltypes.h:238
ULONG dwBuildNumber
Definition: rtltypes.h:240
ULONG dwMinorVersion
Definition: rtltypes.h:239
OSVERSIONINFO osvi
Definition: ver.c:28
struct _OSVERSIONINFOW OSVERSIONINFOW

◆ msvcrt_init_clock()

void msvcrt_init_clock ( void  )

Definition at line 49 of file time.c.

50{
51 LARGE_INTEGER systime;
52
53 NtQuerySystemTime(&systime);
54 init_time = systime.QuadPart;
55}
static LONGLONG init_time
Definition: time.c:47
NTSTATUS NTAPI NtQuerySystemTime(OUT PLARGE_INTEGER SystemTime)
Definition: time.c:569
LONGLONG QuadPart
Definition: typedefs.h:114

Referenced by DllMain().

◆ msvcrt_init_exception()

void msvcrt_init_exception ( void )

Referenced by DllMain().

◆ msvcrt_init_heap()

BOOL msvcrt_init_heap ( void  )

Definition at line 830 of file heap.c.

831{
832#if _MSVCR_VER <= 100 && !defined(__REACTOS__)
833 heap = HeapCreate(0, 0, 0);
834#else
836#endif
837 return heap != NULL;
838}
HANDLE WINAPI HeapCreate(DWORD flOptions, SIZE_T dwInitialSize, SIZE_T dwMaximumSize)
Definition: heapmem.c:45

◆ msvcrt_init_io()

void msvcrt_init_io ( void  )

Definition at line 720 of file file.c.

721{
722 STARTUPINFOA si;
723 int i;
724 ioinfo *fdinfo;
725
726 GetStartupInfoA(&si);
727 if (si.cbReserved2 >= sizeof(unsigned int) && si.lpReserved2 != NULL)
728 {
729 BYTE* wxflag_ptr;
730 HANDLE* handle_ptr;
731 unsigned int count;
732
733 count = *(unsigned*)si.lpReserved2;
734 wxflag_ptr = si.lpReserved2 + sizeof(unsigned);
735 handle_ptr = (HANDLE*)(wxflag_ptr + count);
736
737 count = min(count, (si.cbReserved2 - sizeof(unsigned)) / (sizeof(HANDLE) + 1));
739 for (i = 0; i < count; i++)
740 {
741 if ((*wxflag_ptr & WX_OPEN) && GetFileType(*handle_ptr) != FILE_TYPE_UNKNOWN)
742 {
743 fdinfo = get_ioinfo_alloc_fd(i);
744 if(fdinfo != &MSVCRT___badioinfo)
745 msvcrt_set_fd(fdinfo, *handle_ptr, *wxflag_ptr);
746 release_ioinfo(fdinfo);
747 }
748
749 wxflag_ptr++; handle_ptr++;
750 }
751 }
752
754 if (!(fdinfo->wxflag & WX_OPEN) || fdinfo->handle == INVALID_HANDLE_VALUE) {
758
759 if (type == FILE_TYPE_UNKNOWN) {
761 flags |= WX_TTY;
762 } else if ((type & 0xf) == FILE_TYPE_CHAR) {
763 flags |= WX_TTY;
764 } else if ((type & 0xf) == FILE_TYPE_PIPE) {
765 flags |= WX_PIPE;
766 }
767
768 msvcrt_set_fd(fdinfo, h, flags);
769 }
770 release_ioinfo(fdinfo);
771
773 if (!(fdinfo->wxflag & WX_OPEN) || fdinfo->handle == INVALID_HANDLE_VALUE) {
777
778 if (type == FILE_TYPE_UNKNOWN) {
780 flags |= WX_TTY;
781 } else if ((type & 0xf) == FILE_TYPE_CHAR) {
782 flags |= WX_TTY;
783 } else if ((type & 0xf) == FILE_TYPE_PIPE) {
784 flags |= WX_PIPE;
785 }
786
787 msvcrt_set_fd(fdinfo, h, flags);
788 }
789 release_ioinfo(fdinfo);
790
792 if (!(fdinfo->wxflag & WX_OPEN) || fdinfo->handle == INVALID_HANDLE_VALUE) {
796
797 if (type == FILE_TYPE_UNKNOWN) {
799 flags |= WX_TTY;
800 } else if ((type & 0xf) == FILE_TYPE_CHAR) {
801 flags |= WX_TTY;
802 } else if ((type & 0xf) == FILE_TYPE_PIPE) {
803 flags |= WX_PIPE;
804 }
805
806 msvcrt_set_fd(fdinfo, h, flags);
807 }
808 release_ioinfo(fdinfo);
809
810 TRACE(":handles (%p)(%p)(%p)\n", get_ioinfo_nolock(STDIN_FILENO)->handle,
813
814 for (i = 0; i < 3; i++)
815 {
816 FILE *f = iob_get_file(i);
818
819 /* FILE structs for stdin/out/err are static and never deleted */
822 f->_tmpfname = NULL;
823 f->_flag = (i == 0) ? _IOREAD : _IOWRT;
824
825 if (cs)
826 {
828 cs->DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": file_crit.crit");
829 }
830 }
832}
HANDLE WINAPI GetStdHandle(IN DWORD nStdHandle)
Definition: console.c:203
DWORD WINAPI GetFileType(HANDLE hFile)
Definition: fileinfo.c:269
VOID WINAPI GetStartupInfoA(IN LPSTARTUPINFOA lpStartupInfo)
Definition: proc.c:1320
BOOL WINAPI InitializeCriticalSectionEx(OUT LPCRITICAL_SECTION lpCriticalSection, IN DWORD dwSpinCount, IN DWORD flags)
Definition: sync.c:107
static ioinfo * get_ioinfo_alloc_fd(int fd)
Definition: file.c:467
ioinfo MSVCRT___badioinfo
Definition: file.c:148
#define WX_TTY
Definition: file.c:86
static void msvcrt_set_fd(ioinfo *fdinfo, HANDLE hand, int flag)
Definition: file.c:576
static FILE * iob_get_file(int i)
Definition: file.c:265
#define WX_PIPE
Definition: file.c:83
static void release_ioinfo(ioinfo *info)
Definition: file.c:514
#define WX_TEXT
Definition: file.c:87
#define _IOWRT
Definition: stdio.h:16
#define _IOREAD
Definition: stdio.h:15
#define STDOUT_FILENO
Definition: stdio.h:25
#define STDERR_FILENO
Definition: stdio.h:26
#define STDIN_FILENO
Definition: stdio.h:24
#define MSVCRT_NO_CONSOLE_FD
Definition: msvcrt.h:327
#define MSVCRT_NO_CONSOLE
Definition: msvcrt.h:328
GLfloat f
Definition: glext.h:7540
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
#define min(a, b)
Definition: monoChain.cc:55
#define DWORD_PTR
Definition: treelist.c:76
#define STD_OUTPUT_HANDLE
Definition: winbase.h:292
#define STD_INPUT_HANDLE
Definition: winbase.h:291
#define FILE_TYPE_UNKNOWN
Definition: winbase.h:282
#define STD_ERROR_HANDLE
Definition: winbase.h:293
#define FILE_TYPE_CHAR
Definition: winbase.h:284
#define FILE_TYPE_PIPE
Definition: winbase.h:285
#define RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO
Definition: winnt_old.h:1146

◆ msvcrt_init_locale()

BOOL msvcrt_init_locale ( void  )

Definition at line 2151 of file locale.c.

2152{
2153 int i;
2154
2155 _lock_locales();
2156 MSVCRT_locale = _create_locale(0, "C");
2158 if(!MSVCRT_locale)
2159 return FALSE;
2160
2165 for(i=LC_MIN; i<=LC_MAX; i++)
2168 return TRUE;
2169}
_ACRTIMP int __cdecl _setmbcp(int)
Definition: mbcs.c:400
unsigned short * MSVCRT__pctype
Definition: locale.c:44
int MSVCRT___lc_collate_cp
Definition: locale.c:46
unsigned int MSVCRT___lc_codepage
Definition: locale.c:45
void CDECL _lock_locales(void)
Definition: locale.c:574
_locale_t CDECL _create_locale(int category, const char *locale)
Definition: locale.c:1981
LCID MSVCRT___lc_handle[LC_MAX - LC_MIN+1]
Definition: locale.c:47
int MSVCRT___mb_cur_max
Definition: locale.c:48
void CDECL _unlock_locales(void)
Definition: locale.c:582
_locale_t MSVCRT_locale
Definition: locale.c:43
pthreadlocinfo locinfo
Definition: corecrt.h:260
unsigned int lc_collate_cp
Definition: corecrt.h:285
unsigned int lc_codepage
Definition: corecrt.h:278
unsigned short * pctype
Definition: corecrt.h:276
__msvcrt_ulong lc_handle[6]
Definition: corecrt.h:286

◆ msvcrt_init_math()

void msvcrt_init_math ( void module)

Definition at line 74 of file math.c.

75{
77#if _MSVCR_VER <=71
79#else
81#endif
82}
BOOL WINAPI IsProcessorFeaturePresent(IN DWORD ProcessorFeature)
Definition: sysinfo.c:169
static BOOL sse2_enabled
Definition: math.c:72
BOOL sse2_supported
Definition: math.c:71
#define PF_XMMI64_INSTRUCTIONS_AVAILABLE
Definition: ketypes.h:186

◆ msvcrt_init_mt_locks()

void msvcrt_init_mt_locks ( void  )

Definition at line 66 of file lock.c.

67{
68 int i;
69
70 TRACE( "initializing mtlocks\n" );
71
72 /* Initialize the table */
73 for( i=0; i < _TOTAL_LOCKS; i++ )
74 {
76 }
77
78 /* Initialize our lock table lock */
80}
static void msvcrt_mlock_set_entry_initialized(int locknum, BOOL initialized)
Definition: lock.c:40
static void msvcrt_initialize_mlock(int locknum)
Definition: lock.c:45
#define _LOCKTAB_LOCK
Definition: mtdll.h:41

◆ msvcrt_init_signals()

void msvcrt_init_signals ( void  )

Definition at line 635 of file except.c.

◆ msvcrt_set_errno()

void msvcrt_set_errno ( int  err)

Definition at line 132 of file errno.c.

133{
134 int *errno_ptr = _errno();
135 __msvcrt_ulong *doserrno = __doserrno();
136
137 *doserrno = err;
138
139 switch(err)
140 {
141#define ERR_CASE(oserr) case oserr:
142#define ERR_MAPS(oserr, crterr) case oserr: *errno_ptr = crterr; break
185 default:
186 /* Remaining cases map to EINVAL */
187 /* FIXME: may be missing some errors above */
188 *errno_ptr = EINVAL;
189 }
190}
#define ERROR_BUSY
Definition: dderror.h:12
#define ERROR_OUTOFMEMORY
Definition: deptool.c:13
#define ERROR_INVALID_HANDLE
Definition: compat.h:98
#define ERROR_ACCESS_DENIED
Definition: compat.h:97
#define ERR_MAPS(oserr, crterr)
__msvcrt_ulong *CDECL __doserrno(void)
Definition: errno.c:223
int *CDECL _errno(void)
Definition: errno.c:215
#define ERR_CASE(oserr)
unsigned long __msvcrt_ulong
Definition: corecrt.h:168
#define ENOENT
Definition: errno.h:25
#define ENOSPC
Definition: errno.h:49
#define EEXIST
Definition: errno.h:39
#define EINVAL
Definition: errno.h:44
#define ECHILD
Definition: errno.h:33
#define ENOEXEC
Definition: errno.h:31
#define EDEADLK
Definition: errno.h:56
#define EPIPE
Definition: errno.h:53
#define EMFILE
Definition: errno.h:46
#define ENOMEM
Definition: errno.h:35
#define EIO
Definition: errno.h:28
#define EBUSY
Definition: errno.h:38
#define ENOTEMPTY
Definition: errno.h:61
#define ENODEV
Definition: errno.h:41
#define E2BIG
Definition: errno.h:30
#define EACCES
Definition: errno.h:36
#define EBADF
Definition: errno.h:32
#define EAGAIN
Definition: errno.h:34
#define ERROR_ALREADY_EXISTS
Definition: disk.h:80
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79
#define ERROR_BAD_NETPATH
Definition: winerror.h:267
#define ERROR_NOT_ENOUGH_QUOTA
Definition: winerror.h:1480
#define ERROR_CURRENT_DIRECTORY
Definition: winerror.h:241
#define ERROR_IO_DEVICE
Definition: winerror.h:977
#define ERROR_NESTING_NOT_ALLOWED
Definition: winerror.h:392
#define ERROR_BAD_ENVIRONMENT
Definition: winerror.h:235
#define ERROR_SHARING_VIOLATION
Definition: winerror.h:257
#define ERROR_POSSIBLE_DEADLOCK
Definition: winerror.h:991
#define ERROR_TOO_MANY_OPEN_FILES
Definition: winerror.h:229
#define ERROR_INVALID_BLOCK
Definition: winerror.h:234
#define ERROR_PATH_NOT_FOUND
Definition: winerror.h:228
#define ERROR_BAD_PATHNAME
Definition: winerror.h:355
#define ERROR_NO_PROC_SLOTS
Definition: winerror.h:295
#define ERROR_DISK_FULL
Definition: winerror.h:308
#define ERROR_BROKEN_PIPE
Definition: winerror.h:305
#define ERROR_NOT_LOCKED
Definition: winerror.h:352
#define ERROR_CHILD_NOT_COMPLETE
Definition: winerror.h:323
#define ERROR_DIR_NOT_EMPTY
Definition: winerror.h:339
#define ERROR_FILE_EXISTS
Definition: winerror.h:287
#define ERROR_LOCK_VIOLATION
Definition: winerror.h:258
#define ERROR_SEEK_ON_DEVICE
Definition: winerror.h:326
#define ERROR_CANNOT_MAKE
Definition: winerror.h:288
#define ERROR_FAIL_I24
Definition: winerror.h:289
#define ERROR_NO_MORE_FILES
Definition: winerror.h:243
#define ERROR_WAIT_NO_CHILDREN
Definition: winerror.h:322
#define ERROR_BAD_FORMAT
Definition: winerror.h:236
#define ERROR_FILENAME_EXCED_RANGE
Definition: winerror.h:385
#define ERROR_DRIVE_LOCKED
Definition: winerror.h:304
#define ERROR_LOCK_FAILED
Definition: winerror.h:358
#define ERROR_MAX_THRDS_REACHED
Definition: winerror.h:357
#define ERROR_INVALID_ACCESS
Definition: winerror.h:237
#define ERROR_NETWORK_ACCESS_DENIED
Definition: winerror.h:279
#define ERROR_ARENA_TRASHED
Definition: winerror.h:232
#define ERROR_INVALID_DRIVE
Definition: winerror.h:240
#define ERROR_BAD_NET_NAME
Definition: winerror.h:281
#define ERROR_BAD_DEVICE
Definition: winerror.h:1032

◆ msvcrt_wstrdupa()

wchar_t * msvcrt_wstrdupa ( const char str)

Definition at line 373 of file data.c.

374{
375 const unsigned int len = strlen(str) + 1 ;
376 wchar_t *wstr = malloc(len* sizeof (wchar_t));
377 if (!wstr)
378 return NULL;
380 return wstr;
381}

◆ operator_delete()

void __cdecl operator_delete ( void mem)

Definition at line 177 of file heap.c.

178{
179 TRACE("(%p)\n", mem);
181}
static BOOL msvcrt_heap_free(void *ptr)
Definition: heap.c:106
Definition: mem.c:349

◆ operator_new()

void *__cdecl operator_new ( size_t  size)

Definition at line 143 of file heap.c.

144{
145 void *retval;
146
147 do
148 {
150 if(retval)
151 {
152 TRACE("(%Iu) returning %p\n", size, retval);
153 return retval;
154 }
155 } while(_callnewh(size));
156
157 TRACE("(%Iu) out of memory\n", size);
158#if _MSVCR_VER >= 80
159 throw_bad_alloc();
160#endif
161 return NULL;
162}
static void * msvcrt_heap_alloc(DWORD flags, size_t size)
Definition: heap.c:56
int CDECL _callnewh(size_t size)
Definition: heap.c:131
int retval
Definition: wcstombs.cpp:91

◆ pf_printf_a()

◆ pf_printf_w()

◆ terminate()

void __cdecl terminate ( void  )

Definition at line 698 of file cpp.c.

699{
701 if (data->terminate_handler) data->terminate_handler();
702 abort();
703}
#define abort()
Definition: i386-dis.c:34

◆ wstrdupa_utf8()

static wchar_t * wstrdupa_utf8 ( const char str)
inlinestatic

Definition at line 440 of file msvcrt.h.

441{
443 wchar_t *wstr;
444
445 if (!len) return NULL;
446 wstr = malloc(len * sizeof(wchar_t));
447 if (!wstr) return NULL;
449 return wstr;
450}
static int convert_acp_utf8_to_wcs(const char *str, wchar_t *wstr, int len)
Definition: msvcrt.h:430

Referenced by _access(), _chdir(), _chmod(), _execl(), _execle(), _execlp(), _execlpe(), _findfirst32(), _findfirst64(), _findfirst64i32(), _fsopen(), _fullpath(), _loaddll(), _mkdir(), _mktemp(), _mktemp_s(), _popen(), _rmdir(), _sopen_dispatch(), _spawnl(), _spawnle(), _spawnlp(), _spawnlpe(), _spawnve(), _spawnvpe(), _stat64(), _tempnam(), _unlink(), freopen(), rename(), and system().

Variable Documentation

◆ cloc_time_data

__lc_time_data cloc_time_data
extern

Definition at line 60 of file locale.c.

Referenced by create_locinfo(), free_locinfo(), and strftime_impl().

◆ initial_locale

BOOL initial_locale
extern

Definition at line 49 of file locale.c.

Referenced by setlocale(), tolower(), and toupper().

◆ MSVCRT___initenv

char** MSVCRT___initenv
extern

Definition at line 57 of file data.c.

Referenced by __p___initenv(), and env_init().

◆ MSVCRT___lc_codepage

unsigned int MSVCRT___lc_codepage
extern

Definition at line 45 of file locale.c.

◆ MSVCRT___lc_collate_cp

int MSVCRT___lc_collate_cp
extern

Definition at line 46 of file locale.c.

◆ MSVCRT___winitenv

wchar_t** MSVCRT___winitenv
extern

Definition at line 58 of file data.c.

Referenced by __p___winitenv(), env_init(), and env_set().

◆ MSVCRT__commode

unsigned int MSVCRT__commode
extern

Definition at line 33 of file data.c.

◆ MSVCRT__ctype

WORD MSVCRT__ctype[257]
extern

Definition at line 34 of file ctype.c.

◆ MSVCRT__environ

char** MSVCRT__environ
extern

Definition at line 55 of file data.c.

◆ MSVCRT__iob

FILE MSVCRT__iob[]
extern

Definition at line 263 of file file.c.

◆ MSVCRT__pwctype

WORD* MSVCRT__pwctype
extern

Definition at line 128 of file ctype.c.

◆ MSVCRT__wenviron

wchar_t** MSVCRT__wenviron
extern

Definition at line 56 of file data.c.

◆ MSVCRT_locale

_locale_t MSVCRT_locale
extern

Definition at line 43 of file locale.c.

◆ msvcrt_tls_index

DWORD msvcrt_tls_index
extern

Definition at line 29 of file main.c.

◆ sse2_supported

BOOL sse2_supported
extern

Definition at line 71 of file math.c.

Referenced by _clearfp(), _control87(), _fpreset(), _set_SSE2_enable(), memmove(), and msvcrt_init_math().