ReactOS  0.4.14-dev-55-g2da92ac
msvcrt.h File Reference
#include <stdarg.h>
#include <signal.h>
#include "windef.h"
#include "winbase.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  _sig_element
 
struct  ioinfo
 

Macros

#define _UNKNOWN_APP   0
 
#define _CONSOLE_APP   1
 
#define _GUI_APP   2
 
#define _IOYOURBUF   0x0100
 
#define _IOAPPEND   0x0200
 
#define _IOSETVBUF   0x0400
 
#define _IOFEOF   0x0800
 
#define _IOFLRTN   0x1000
 
#define _IOCTRLZ   0x2000
 
#define _IOCOMMIT   0x4000
 
#define _IOFREE   0x10000
 
#define MSVCRT__WRITE_ABORT_MSG   1
 
#define MSVCRT__CALL_REPORTFAULT   2
 
#define MSVCRT_LC_ALL   LC_ALL
 
#define MSVCRT_LC_COLLATE   LC_COLLATE
 
#define MSVCRT_LC_CTYPE   LC_CTYPE
 
#define MSVCRT_LC_MONETARY   LC_MONETARY
 
#define MSVCRT_LC_NUMERIC   LC_NUMERIC
 
#define MSVCRT_LC_TIME   LC_TIME
 
#define MSVCRT_LC_MIN   LC_MIN
 
#define MSVCRT_LC_MAX   LC_MAX
 
#define MSVCRT__OUT_TO_DEFAULT   0
 
#define MSVCRT__OUT_TO_STDERR   1
 
#define MSVCRT__OUT_TO_MSGBOX   2
 
#define MSVCRT__REPORT_ERRMODE   3
 
#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)
 
#define MSVCRT_malloc   malloc
 
#define MSVCRT_free   free
 

Typedefs

typedef void *(__cdeclmalloc_func_t) (size_t)
 
typedef void(__cdeclfree_func_t) (void *)
 
typedef void(* float_handler) (int, int)
 
typedef struct _sig_element sig_element
 

Functions

void __cdecl _purecall (void)
 
 __declspec (noreturn) void __cdecl _amsg_exit(int errnum)
 
char ** SnapshotOfEnvironmentA (char **)
 
wchar_t ** SnapshotOfEnvironmentW (wchar_t **)
 
void *__cdecl MSVCRT_operator_new (size_t)
 
void __cdecl MSVCRT_operator_delete (void *)
 
void msvcrt_init_mt_locks (void)
 
void msvcrt_free_mt_locks (void)
 
BOOL msvcrt_init_locale (void)
 
void msvcrt_init_math (void)
 
void msvcrt_init_io (void)
 
void msvcrt_free_io (void)
 
void msvcrt_init_console (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)
 
unsigned create_io_inherit_block (WORD *, BYTE **)
 
char *__cdecl __unDName (char *, const char *, int, malloc_func_t, free_func_t, unsigned short int)
 
void _default_handler (int signal)
 
char_setlocale (int, const char *)
 
NTSYSAPI VOID NTAPI RtlAssert (PVOID FailedAssertion, PVOID FileName, ULONG LineNumber, PCHAR Message)
 

Variables

unsigned int __lc_codepage
 
int __lc_collate_cp
 
int __mb_cur_max
 
const unsigned short _ctype [257]
 
char ** _environ
 
wchar_t ** _wenviron
 

Macro Definition Documentation

◆ _CONSOLE_APP

#define _CONSOLE_APP   1

Definition at line 59 of file msvcrt.h.

◆ _GUI_APP

#define _GUI_APP   2

Definition at line 60 of file msvcrt.h.

◆ _IOAPPEND

#define _IOAPPEND   0x0200

Definition at line 64 of file msvcrt.h.

◆ _IOCOMMIT

#define _IOCOMMIT   0x4000

Definition at line 69 of file msvcrt.h.

◆ _IOCTRLZ

#define _IOCTRLZ   0x2000

Definition at line 68 of file msvcrt.h.

◆ _IOFEOF

#define _IOFEOF   0x0800

Definition at line 66 of file msvcrt.h.

◆ _IOFLRTN

#define _IOFLRTN   0x1000

Definition at line 67 of file msvcrt.h.

◆ _IOFREE

#define _IOFREE   0x10000

Definition at line 70 of file msvcrt.h.

◆ _IOSETVBUF

#define _IOSETVBUF   0x0400

Definition at line 65 of file msvcrt.h.

◆ _IOYOURBUF

#define _IOYOURBUF   0x0100

Definition at line 63 of file msvcrt.h.

◆ _UNKNOWN_APP

#define _UNKNOWN_APP   0

Definition at line 58 of file msvcrt.h.

◆ MSVCRT__CALL_REPORTFAULT

#define MSVCRT__CALL_REPORTFAULT   2

Definition at line 104 of file msvcrt.h.

◆ MSVCRT__OUT_TO_DEFAULT

#define MSVCRT__OUT_TO_DEFAULT   0

Definition at line 115 of file msvcrt.h.

◆ MSVCRT__OUT_TO_MSGBOX

#define MSVCRT__OUT_TO_MSGBOX   2

Definition at line 117 of file msvcrt.h.

◆ MSVCRT__OUT_TO_STDERR

#define MSVCRT__OUT_TO_STDERR   1

Definition at line 116 of file msvcrt.h.

◆ MSVCRT__REPORT_ERRMODE

#define MSVCRT__REPORT_ERRMODE   3

Definition at line 118 of file msvcrt.h.

◆ MSVCRT__WRITE_ABORT_MSG

#define MSVCRT__WRITE_ABORT_MSG   1

Definition at line 103 of file msvcrt.h.

◆ MSVCRT_free

#define MSVCRT_free   free

Definition at line 152 of file msvcrt.h.

◆ MSVCRT_LC_ALL

#define MSVCRT_LC_ALL   LC_ALL

Definition at line 106 of file msvcrt.h.

◆ MSVCRT_LC_COLLATE

#define MSVCRT_LC_COLLATE   LC_COLLATE

Definition at line 107 of file msvcrt.h.

◆ MSVCRT_LC_CTYPE

#define MSVCRT_LC_CTYPE   LC_CTYPE

Definition at line 108 of file msvcrt.h.

◆ MSVCRT_LC_MAX

#define MSVCRT_LC_MAX   LC_MAX

Definition at line 113 of file msvcrt.h.

◆ MSVCRT_LC_MIN

#define MSVCRT_LC_MIN   LC_MIN

Definition at line 112 of file msvcrt.h.

◆ MSVCRT_LC_MONETARY

#define MSVCRT_LC_MONETARY   LC_MONETARY

Definition at line 109 of file msvcrt.h.

◆ MSVCRT_LC_NUMERIC

#define MSVCRT_LC_NUMERIC   LC_NUMERIC

Definition at line 110 of file msvcrt.h.

◆ MSVCRT_LC_TIME

#define MSVCRT_LC_TIME   LC_TIME

Definition at line 111 of file msvcrt.h.

◆ MSVCRT_malloc

#define MSVCRT_malloc   malloc

Definition at line 151 of file msvcrt.h.

◆ UNDNAME_32_BIT_DECODE

#define UNDNAME_32_BIT_DECODE   (0x0800)

Definition at line 136 of file msvcrt.h.

◆ UNDNAME_COMPLETE

#define UNDNAME_COMPLETE   (0x0000)

Definition at line 123 of file msvcrt.h.

◆ UNDNAME_NAME_ONLY

#define UNDNAME_NAME_ONLY   (0x1000) /* Only report the variable/method name */

Definition at line 137 of file msvcrt.h.

◆ UNDNAME_NO_ACCESS_SPECIFIERS

#define UNDNAME_NO_ACCESS_SPECIFIERS   (0x0080) /* Don't show access specifier (public/protected/private) */

Definition at line 132 of file msvcrt.h.

◆ UNDNAME_NO_ALLOCATION_LANGUAGE

#define UNDNAME_NO_ALLOCATION_LANGUAGE   (0x0010)

Definition at line 128 of file msvcrt.h.

◆ UNDNAME_NO_ALLOCATION_MODEL

#define UNDNAME_NO_ALLOCATION_MODEL   (0x0008)

Definition at line 127 of file msvcrt.h.

◆ UNDNAME_NO_ARGUMENTS

#define UNDNAME_NO_ARGUMENTS   (0x2000) /* Don't show method arguments */

Definition at line 138 of file msvcrt.h.

◆ UNDNAME_NO_COMPLEX_TYPE

#define UNDNAME_NO_COMPLEX_TYPE   (0x8000)

Definition at line 140 of file msvcrt.h.

◆ UNDNAME_NO_CV_THISTYPE

#define UNDNAME_NO_CV_THISTYPE   (0x0040)

Definition at line 130 of file msvcrt.h.

◆ UNDNAME_NO_FUNCTION_RETURNS

#define UNDNAME_NO_FUNCTION_RETURNS   (0x0004) /* Don't show function/method return value */

Definition at line 126 of file msvcrt.h.

◆ UNDNAME_NO_LEADING_UNDERSCORES

#define UNDNAME_NO_LEADING_UNDERSCORES   (0x0001) /* Don't show __ in calling convention */

Definition at line 124 of file msvcrt.h.

◆ UNDNAME_NO_MEMBER_TYPE

#define UNDNAME_NO_MEMBER_TYPE   (0x0200) /* Don't show static/virtual specifier */

Definition at line 134 of file msvcrt.h.

◆ UNDNAME_NO_MS_KEYWORDS

#define UNDNAME_NO_MS_KEYWORDS   (0x0002) /* Don't show calling convention at all */

Definition at line 125 of file msvcrt.h.

◆ UNDNAME_NO_MS_THISTYPE

#define UNDNAME_NO_MS_THISTYPE   (0x0020)

Definition at line 129 of file msvcrt.h.

◆ UNDNAME_NO_RETURN_UDT_MODEL

#define UNDNAME_NO_RETURN_UDT_MODEL   (0x0400)

Definition at line 135 of file msvcrt.h.

◆ UNDNAME_NO_SPECIAL_SYMS

#define UNDNAME_NO_SPECIAL_SYMS   (0x4000)

Definition at line 139 of file msvcrt.h.

◆ UNDNAME_NO_THISTYPE

#define UNDNAME_NO_THISTYPE   (0x0060)

Definition at line 131 of file msvcrt.h.

◆ UNDNAME_NO_THROW_SIGNATURES

#define UNDNAME_NO_THROW_SIGNATURES   (0x0100)

Definition at line 133 of file msvcrt.h.

Typedef Documentation

◆ float_handler

typedef void(* float_handler) (int, int)

Definition at line 142 of file msvcrt.h.

◆ free_func_t

typedef void(__cdecl * free_func_t) (void *)

Definition at line 82 of file msvcrt.h.

◆ malloc_func_t

typedef void*(__cdecl * malloc_func_t) (size_t)

Definition at line 81 of file msvcrt.h.

◆ sig_element

Function Documentation

◆ __declspec()

__declspec ( noreturn  )

Definition at line 53 of file thread.c.

58 {
59  /* Attempt to call the Thread Start Address */
60  _SEH2_TRY
61  {
62  /* Legacy check which is still used today for Win32 threads */
63  if (NtCurrentTeb()->NtTib.Version == (30 << 8)) // OS/2 V3.0 ("Cruiser")
64  {
65  /* This registers the termination port with CSRSS */
67  }
68 
69  /* Get the exit code from the Thread Start */
70  ExitThread((lpStartAddress)((PVOID)lpParameter));
71  }
73  {
74  /* Get the Exit code from the SEH Handler */
76  {
77  /* Kill the whole process, usually */
79  }
80  else
81  {
82  /* If running inside CSRSS, kill just this thread */
84  }
85  }
86  _SEH2_END;
87 }
VOID WINAPI ExitProcess(IN UINT uExitCode)
Definition: proc.c:1487
_SEH2_TRY
Definition: create.c:4250
LONG WINAPI UnhandledExceptionFilter(IN PEXCEPTION_POINTERS ExceptionInfo)
Definition: except.c:262
#define _SEH2_GetExceptionInformation()
Definition: pseh2_64.h:11
VOID WINAPI ExitThread(IN DWORD uExitCode)
Definition: thread.c:364
BOOLEAN BaseRunningInServerProcess
Definition: dllmain.c:20
LPVOID lpParameter
Definition: kernel32.h:241
NTSTATUS NTAPI CsrNewThread(VOID)
Definition: api.c:27
_SEH2_END
Definition: create.c:4424
FORCEINLINE struct _TEB * NtCurrentTeb(VOID)
Definition: psfuncs.h:420
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:6
#define _SEH2_GetExceptionCode()
Definition: pseh2_64.h:12

◆ __unDName()

char* __cdecl __unDName ( char ,
const char ,
int  ,
malloc_func_t  ,
free_func_t  ,
unsigned short int   
)

Definition at line 1645 of file undname.c.

1648 {
1649  return __unDNameEx(buffer, mangled, buflen, memget, memfree, NULL, flags);
1650 }
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:1598
GLuint buffer
Definition: glext.h:5915
smooth NULL
Definition: ftsmooth.c:416
GLbitfield flags
Definition: glext.h:7161

◆ _default_handler()

void _default_handler ( int  signal)

Definition at line 120 of file signal.c.

121 {
122  _exit(3);
123 }
void _exit(int exitcode)
Definition: _exit.c:25

Referenced by raise().

◆ _purecall()

void __cdecl _purecall ( void  )

Definition at line 429 of file adapter.cpp.

430 {
431  return 0;
432 }

◆ _setlocale()

char* _setlocale ( int  ,
const char  
)

◆ create_io_inherit_block()

unsigned create_io_inherit_block ( WORD ,
BYTE **   
)

Definition at line 411 of file file.c.

412 {
413  int fd, last_fd;
414  char* wxflag_ptr;
415  HANDLE* handle_ptr;
416  ioinfo* fdinfo;
417 
418  for (last_fd=MSVCRT_MAX_FILES-1; last_fd>=0; last_fd--)
420  break;
421  last_fd++;
422 
423  *size = sizeof(unsigned) + (sizeof(char) + sizeof(HANDLE)) * last_fd;
424  *block = calloc(1, *size);
425  if (!*block)
426  {
427  *size = 0;
428  return FALSE;
429  }
430  wxflag_ptr = (char*)*block + sizeof(unsigned);
431  handle_ptr = (HANDLE*)(wxflag_ptr + last_fd);
432 
433  *(unsigned*)*block = last_fd;
434  for (fd = 0; fd < last_fd; fd++)
435  {
436  /* to be inherited, we need it to be open, and that DONTINHERIT isn't set */
437  fdinfo = get_ioinfo(fd);
438  if ((fdinfo->wxflag & (WX_OPEN | WX_DONTINHERIT)) == WX_OPEN)
439  {
440  *wxflag_ptr = fdinfo->wxflag;
441  *handle_ptr = fdinfo->handle;
442  }
443  else
444  {
445  *wxflag_ptr = 0;
446  *handle_ptr = INVALID_HANDLE_VALUE;
447  }
448  release_ioinfo(fdinfo);
449  wxflag_ptr++; handle_ptr++;
450  }
451  return TRUE;
452 }
static unsigned int block
Definition: xmlmemory.c:118
#define TRUE
Definition: types.h:120
static ioinfo * get_ioinfo_nolock(int fd)
Definition: file.c:158
Definition: file.c:40
#define WX_DONTINHERIT
Definition: file.c:97
static HANDLE
Definition: file.c:109
#define INVALID_HANDLE_VALUE
Definition: compat.h:391
static int fd
Definition: io.c:51
HANDLE handle
Definition: file.c:41
unsigned char wxflag
Definition: file.c:42
GLsizeiptr size
Definition: glext.h:5919
#define WX_OPEN
Definition: file.c:91
ioinfo * get_ioinfo(int fd)
Definition: file.c:181
void release_ioinfo(ioinfo *info)
Definition: file.c:263
#define calloc
Definition: rosglue.h:14
#define MSVCRT_MAX_FILES
Definition: file.c:112

◆ msvcrt_free_args()

void msvcrt_free_args ( void  )

◆ msvcrt_free_console()

void msvcrt_free_console ( void  )

◆ msvcrt_free_io()

void msvcrt_free_io ( void  )

Definition at line 1100 of file file.c.

1101 {
1102  unsigned int i;
1103  int j;
1104 
1105  _flushall();
1106  _fcloseall();
1107 
1108  for(i=0; i<sizeof(__pioinfo)/sizeof(__pioinfo[0]); i++)
1109  {
1110  if(!__pioinfo[i])
1111  continue;
1112 
1113  for(j=0; j<MSVCRT_FD_BLOCK_SIZE; j++)
1114  {
1115  if(__pioinfo[i][j].exflag & EF_CRIT_INIT)
1117  }
1118  free(__pioinfo[i]);
1119  }
1120 
1121  for(j=0; j<MSVCRT_stream_idx; j++)
1122  {
1123  FILE *file = msvcrt_get_file(j);
1125  {
1126  ((file_crit*)file)->crit.DebugInfo->Spare[0] = 0;
1127  DeleteCriticalSection(&((file_crit*)file)->crit);
1128  }
1129  }
1130 
1131  for(i=0; i<sizeof(MSVCRT_fstream)/sizeof(MSVCRT_fstream[0]); i++)
1132  free(MSVCRT_fstream[i]);
1133 }
#define MSVCRT_FD_BLOCK_SIZE
Definition: file.c:113
static int MSVCRT_stream_idx
Definition: file.c:135
#define free
Definition: debug_ros.c:5
#define EF_CRIT_INIT
Definition: file.c:105
ioinfo * __pioinfo[MSVCRT_MAX_FILES/MSVCRT_FD_BLOCK_SIZE]
Definition: file.c:121
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 _IOB_ENTRIES
Definition: stdio.h:23
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
int CDECL _fcloseall(void)
Definition: file.c:1081
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)
static FILE * msvcrt_get_file(int i)
Definition: file.c:269
int CDECL _flushall(void)
Definition: file.c:893
FILE _iob[_IOB_ENTRIES]
Definition: file.c:133
static file_crit * MSVCRT_fstream[MSVCRT_MAX_FILES/MSVCRT_FD_BLOCK_SIZE]
Definition: file.c:134
Definition: fci.c:126

◆ msvcrt_free_mt_locks()

void msvcrt_free_mt_locks ( void  )

Definition at line 77 of file lock.c.

78 {
79  int i;
80 
81  TRACE(": uninitializing all mtlocks\n" );
82 
83  /* Uninitialize the table */
84  for( i=0; i < _TOTAL_LOCKS; i++ )
85  {
86  if( lock_table[ i ].bInit )
87  {
89  }
90  }
91 }
static LOCKTABLEENTRY lock_table[_TOTAL_LOCKS]
Definition: lock.c:28
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 TRACE(s)
Definition: solgame.cpp:4
static __inline void msvcrt_uninitialize_mlock(int locknum)
Definition: lock.c:41
#define _TOTAL_LOCKS
Definition: mtdll.h:70

◆ msvcrt_free_popen_data()

void msvcrt_free_popen_data ( void  )

Definition at line 29 of file popen.c.

30 {
32 }
#define free
Definition: debug_ros.c:5
struct popen_handle * popen_handles
Definition: popen.c:26

Referenced by DllMain().

◆ msvcrt_free_signals()

void msvcrt_free_signals ( void  )

◆ msvcrt_init_args()

void msvcrt_init_args ( void  )

◆ msvcrt_init_console()

void msvcrt_init_console ( void  )

◆ msvcrt_init_io()

void msvcrt_init_io ( void  )

Definition at line 457 of file file.c.

458 {
459  STARTUPINFOA si;
460  unsigned int i;
461  ioinfo *fdinfo;
462 
463  GetStartupInfoA(&si);
464  if (si.cbReserved2 >= sizeof(unsigned int) && si.lpReserved2 != NULL)
465  {
466  BYTE* wxflag_ptr;
467  HANDLE* handle_ptr;
468  unsigned int count;
469 
470  count = *(unsigned*)si.lpReserved2;
471  wxflag_ptr = si.lpReserved2 + sizeof(unsigned);
472  handle_ptr = (HANDLE*)(wxflag_ptr + count);
473 
474  count = min(count, (si.cbReserved2 - sizeof(unsigned)) / (sizeof(HANDLE) + 1));
476  for (i = 0; i < count; i++)
477  {
478  if ((*wxflag_ptr & WX_OPEN) && *handle_ptr != INVALID_HANDLE_VALUE)
479  {
480  fdinfo = get_ioinfo_alloc_fd(i);
481  if(fdinfo != &__badioinfo)
482  msvcrt_set_fd(fdinfo, *handle_ptr, *wxflag_ptr);
483  release_ioinfo(fdinfo);
484  }
485 
486  wxflag_ptr++; handle_ptr++;
487  }
488  }
489 
491  if (!(fdinfo->wxflag & WX_OPEN) || fdinfo->handle == INVALID_HANDLE_VALUE) {
493  DWORD type = GetFileType(h);
494 
495  msvcrt_set_fd(fdinfo, h, WX_OPEN|WX_TEXT|((type&0xf)==FILE_TYPE_CHAR ? WX_TTY : 0)
496  |((type&0xf)==FILE_TYPE_PIPE ? WX_PIPE : 0));
497  }
498  release_ioinfo(fdinfo);
499 
501  if (!(fdinfo->wxflag & WX_OPEN) || fdinfo->handle == INVALID_HANDLE_VALUE) {
503  DWORD type = GetFileType(h);
504 
505  msvcrt_set_fd(fdinfo, h, WX_OPEN|WX_TEXT|((type&0xf)==FILE_TYPE_CHAR ? WX_TTY : 0)
506  |((type&0xf)==FILE_TYPE_PIPE ? WX_PIPE : 0));
507  }
508  release_ioinfo(fdinfo);
509 
511  if (!(fdinfo->wxflag & WX_OPEN) || fdinfo->handle == INVALID_HANDLE_VALUE) {
513  DWORD type = GetFileType(h);
514 
515  msvcrt_set_fd(fdinfo, h, WX_OPEN|WX_TEXT|((type&0xf)==FILE_TYPE_CHAR ? WX_TTY : 0)
516  |((type&0xf)==FILE_TYPE_PIPE ? WX_PIPE : 0));
517  }
518  release_ioinfo(fdinfo);
519 
520  TRACE(":handles (%p)(%p)(%p)\n", get_ioinfo_nolock(STDIN_FILENO)->handle,
523 
524  memset(_iob,0,3*sizeof(FILE));
525  for (i = 0; i < 3; i++)
526  {
527  /* FILE structs for stdin/out/err are static and never deleted */
528  _iob[i]._file = i;
529  _iob[i]._tmpfname = NULL;
530  _iob[i]._flag = (i == 0) ? _IOREAD : _IOWRT;
531  }
532  MSVCRT_stream_idx = 3;
533 }
static ioinfo * get_ioinfo_nolock(int fd)
Definition: file.c:158
static int MSVCRT_stream_idx
Definition: file.c:135
Definition: file.c:40
GLuint GLuint GLsizei count
Definition: gl.h:1545
ioinfo __badioinfo
Definition: file.c:126
VOID WINAPI GetStartupInfoA(IN LPSTARTUPINFOA lpStartupInfo)
Definition: proc.c:1320
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define INVALID_HANDLE_VALUE
Definition: compat.h:391
HANDLE WINAPI GetStdHandle(IN DWORD nStdHandle)
Definition: console.c:152
#define WX_PIPE
Definition: file.c:95
DWORD WINAPI GetFileType(HANDLE hFile)
Definition: fileinfo.c:419
char * _tmpfname
Definition: mbstring.h:27
#define STDIN_FILENO
Definition: syshdrs.h:88
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
#define WX_TEXT
Definition: file.c:100
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 WX_TTY
Definition: file.c:99
#define _IOREAD
Definition: stdio.h:125
#define FILE_TYPE_CHAR
Definition: winbase.h:257
HANDLE handle
Definition: file.c:41
smooth NULL
Definition: ftsmooth.c:416
PBYTE lpReserved2
Definition: winbase.h:810
#define STDOUT_FILENO
Definition: syshdrs.h:89
#define STD_INPUT_HANDLE
Definition: winbase.h:264
unsigned char wxflag
Definition: file.c:42
#define TRACE(s)
Definition: solgame.cpp:4
#define WX_OPEN
Definition: file.c:91
#define STD_ERROR_HANDLE
Definition: winbase.h:266
#define _IOWRT
Definition: stdio.h:126
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned char BYTE
Definition: mem.h:68
int _flag
Definition: mbstring.h:23
#define STD_OUTPUT_HANDLE
Definition: winbase.h:265
void release_ioinfo(ioinfo *info)
Definition: file.c:263
#define FILE_TYPE_PIPE
Definition: winbase.h:258
WORD cbReserved2
Definition: winbase.h:809
static ioinfo * get_ioinfo_alloc_fd(int fd)
Definition: file.c:216
#define min(a, b)
Definition: monoChain.cc:55
static void msvcrt_set_fd(ioinfo *fdinfo, HANDLE hand, int flag)
Definition: file.c:325
int _file
Definition: mbstring.h:24
FILE _iob[_IOB_ENTRIES]
Definition: file.c:133
#define memset(x, y, z)
Definition: compat.h:39
#define STDERR_FILENO
Definition: syshdrs.h:90
#define MSVCRT_MAX_FILES
Definition: file.c:112

◆ msvcrt_init_locale()

BOOL msvcrt_init_locale ( void  )

◆ msvcrt_init_math()

void msvcrt_init_math ( void  )

◆ msvcrt_init_mt_locks()

void msvcrt_init_mt_locks ( void  )

Definition at line 54 of file lock.c.

55 {
56  int i;
57 
58  TRACE( "initializing mtlocks\n" );
59 
60  /* Initialize the table */
61  for( i=0; i < _TOTAL_LOCKS; i++ )
62  {
64  }
65 
66  /* Initialize our lock table lock */
68 }
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 _LOCKTAB_LOCK
Definition: mtdll.h:54
#define TRACE(s)
Definition: solgame.cpp:4
static __inline void msvcrt_initialize_mlock(int locknum)
Definition: lock.c:35
#define _TOTAL_LOCKS
Definition: mtdll.h:70
static __inline void msvcrt_mlock_set_entry_initialized(int locknum, BOOL initialized)
Definition: lock.c:30

◆ msvcrt_init_signals()

void msvcrt_init_signals ( void  )

◆ MSVCRT_operator_delete()

void __cdecl MSVCRT_operator_delete ( void )

Definition at line 91 of file heap.c.

92 {
93  TRACE("(%p)\n", mem);
95 }
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
Definition: mem.c:156
#define HeapFree(x, y, z)
Definition: compat.h:394

◆ MSVCRT_operator_new()

void* __cdecl MSVCRT_operator_new ( size_t  )
  • FIXME: This should be declared in new.h but it's not an extern "C" so

Definition at line 52 of file heap.c.

53 {
54  void *retval;
55  int freed;
56 
57  do
58  {
59  retval = HeapAlloc(GetProcessHeap(), 0, size);
60  if(retval)
61  {
62  TRACE("(%ld) returning %p\n", size, retval);
63  return retval;
64  }
65 
66  LOCK_HEAP;
68  freed = (*MSVCRT_new_handler)(size);
69  else
70  freed = 0;
72  } while(freed);
73 
74  TRACE("(%ld) out of memory\n", size);
75  return NULL;
76 }
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define LOCK_HEAP
Definition: heap.c:28
static MSVCRT_new_handler_func MSVCRT_new_handler
Definition: heap.c:41
#define UNLOCK_HEAP
Definition: heap.c:29

Referenced by MSVCRT_operator_new_dbg().

◆ RtlAssert()

NTSYSAPI VOID NTAPI RtlAssert ( PVOID  FailedAssertion,
PVOID  FileName,
ULONG  LineNumber,
PCHAR  Message 
)

◆ SnapshotOfEnvironmentA()

char** SnapshotOfEnvironmentA ( char **  )

◆ SnapshotOfEnvironmentW()

wchar_t** SnapshotOfEnvironmentW ( wchar_t **  )

Variable Documentation

◆ __lc_codepage

unsigned int __lc_codepage

Definition at line 34 of file locale.c.

Referenced by ___lc_codepage_func(), __init_global_locale(), and setlocale().

◆ __lc_collate_cp

int __lc_collate_cp

◆ __mb_cur_max

int __mb_cur_max

Definition at line 37 of file locale.c.

Referenced by __init_global_locale(), and setlocale().

◆ _ctype

const unsigned short _ctype[257]

Definition at line 36 of file ctype.c.

Referenced by MSVCRT__create_locale().

◆ _environ

char** _environ

Definition at line 22 of file environ.c.

◆ _wenviron

wchar_t** _wenviron

Definition at line 23 of file environ.c.

Referenced by __p__wenviron(), BlockEnvToEnvironW(), and SetEnv().