ReactOS 0.4.16-dev-835-gd769f56
corecrt_internal_traits.h File Reference
#include <corecrt_internal.h>
#include <corecrt_internal_win32_buffer.h>
#include <stdio.h>
#include <string.h>
Include dependency graph for corecrt_internal_traits.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  __crt_char_traits< char >
 
struct  __crt_char_traits< wchar_t >
 
struct  __crt_integer_traits< long >
 
struct  __crt_integer_traits< long long >
 

Macros

#define _CORECRT_APPLY_TO_MAPPINGS(_APPLY)
 
#define _APPLY(name, narrow_name, wide_name)   _CORECRT_GENERATE_FORWARDER(static, __cdecl, name, narrow_name)
 
#define _APPLY(name, narrow_name, wide_name)   _CORECRT_GENERATE_FORWARDER(static, __cdecl, name, wide_name)
 
#define _GENERATE_TCHAR_STRING_FUNCTIONS(name, string)
 
#define _CORECRT_APPLY_TO_MAPPINGS(_APPLY)
 
#define _APPLY(name, name_32, name_64)   _CORECRT_GENERATE_FORWARDER(static, __cdecl, name, name_32)
 
#define _APPLY(name, name_32, name_64)   _CORECRT_GENERATE_FORWARDER(static, __cdecl, name, name_64)
 

Functions

size_t __crt_compute_required_transform_buffer_count (unsigned const code_page, _In_z_ char const *const string)
 
size_t __crt_compute_required_transform_buffer_count (unsigned const code_page, _In_z_ wchar_t const *const string)
 
 _Success_ (return > 0 &&return<=buffer_count) inline size_t __crt_transform_string(unsigned const code_page
 
_In_z_ char const *const _Out_writes_z_ (buffer_count) wchar_t *const buffer
 
return static_cast< size_t > (__acrt_MultiByteToWideChar(code_page, 0, string, -1, buffer, int_count))
 
return static_cast< size_t > (__acrt_WideCharToMultiByte(code_page, 0, string, -1, buffer, int_count, nullptr, nullptr))
 

Variables

_In_z_ char const *const string
 
_In_z_ char const *const size_t const buffer_count
 

Macro Definition Documentation

◆ _APPLY [1/4]

#define _APPLY (   name,
  name_32,
  name_64 
)    _CORECRT_GENERATE_FORWARDER(static, __cdecl, name, name_32)

Definition at line 209 of file corecrt_internal_traits.h.

◆ _APPLY [2/4]

#define _APPLY (   name,
  name_32,
  name_64 
)    _CORECRT_GENERATE_FORWARDER(static, __cdecl, name, name_64)

Definition at line 209 of file corecrt_internal_traits.h.

◆ _APPLY [3/4]

#define _APPLY (   name,
  narrow_name,
  wide_name 
)    _CORECRT_GENERATE_FORWARDER(static, __cdecl, name, narrow_name)

Definition at line 209 of file corecrt_internal_traits.h.

◆ _APPLY [4/4]

#define _APPLY (   name,
  narrow_name,
  wide_name 
)    _CORECRT_GENERATE_FORWARDER(static, __cdecl, name, wide_name)

Definition at line 209 of file corecrt_internal_traits.h.

◆ _CORECRT_APPLY_TO_MAPPINGS [1/2]

#define _CORECRT_APPLY_TO_MAPPINGS (   _APPLY)

Definition at line 188 of file corecrt_internal_traits.h.

◆ _CORECRT_APPLY_TO_MAPPINGS [2/2]

#define _CORECRT_APPLY_TO_MAPPINGS (   _APPLY)
Value:
_APPLY(lseek, _lseek, _lseeki64 ) \
_APPLY(lseek_nolock, _lseek_nolock, _lseeki64_nolock) \
_APPLY(futime, _futime32, _futime64 ) \
_APPLY(gmtime_s, _gmtime32_s, _gmtime64_s ) \
_APPLY(loctotime, __loctotime32_t, __loctotime64_t ) \
_APPLY(time, _time32, _time64 )
_Check_return_opt_ long __cdecl _lseek_nolock(_In_ int _FileHandle, _In_ long _Offset, _In_ int _Origin)
_Check_return_opt_ __int64 __cdecl _lseeki64_nolock(_In_ int _FileHandle, _In_ __int64 _Offset, _In_ int _Origin)
__time32_t __cdecl __loctotime32_t(int, int, int, int, int, int, int)
Definition: loctotime.cpp:93
__time64_t __cdecl __loctotime64_t(int, int, int, int, int, int, int)
Definition: loctotime.cpp:106
#define _APPLY(name, narrow_name, wide_name)
_CRTIMP int __cdecl _futime32(_In_ int _FileDes, _In_opt_ struct __utimbuf32 *_Time)
_Check_return_ _CRTIMP long __cdecl _ftell_nolock(_Inout_ FILE *_File)
__MINGW_EXTENSION _Check_return_ _CRTIMP __int64 __cdecl _ftelli64_nolock(_Inout_ FILE *_File)
#define lseek
Definition: syshdrs.h:47
__u16 time
Definition: mkdosfs.c:8
_Check_return_opt_ _CRTIMP long __cdecl _lseek(_In_ int _FileHandle, _In_ long _Offset, _In_ int _Origin)
__CRT_INLINE errno_t __cdecl localtime_s(struct tm *_Tm, const time_t *_Time)
Definition: time.h:417
_CRTIMP __time32_t __cdecl _time32(_Out_opt_ __time32_t *_Time)
_Check_return_wat_ _CRTIMP errno_t __cdecl _gmtime32_s(_In_ struct tm *_Tm, _In_ const __time32_t *_Time)
_CRTIMP errno_t __cdecl _localtime32_s(_Out_ struct tm *_Tm, _In_ const __time32_t *_Time)
_Check_return_wat_ _ACRTIMP errno_t __cdecl _localtime64_s(_Out_ struct tm *_Tm, _In_ __time64_t const *_Time)
_Check_return_wat_ _ACRTIMP errno_t __cdecl _gmtime64_s(_Out_ struct tm *_Tm, _In_ __time64_t const *_Time)
_ACRTIMP __time64_t __cdecl _time64(_Out_opt_ __time64_t *_Time)
__int64 CDECL _lseeki64(int fd, __int64 offset, int whence)
Definition: file.c:1138
_ACRTIMP int __cdecl _futime64(_In_ int _FileHandle, _In_opt_ struct __utimbuf64 *_Time)

Definition at line 188 of file corecrt_internal_traits.h.

◆ _GENERATE_TCHAR_STRING_FUNCTIONS

#define _GENERATE_TCHAR_STRING_FUNCTIONS (   name,
  string 
)
Value:
static char const* __cdecl _CRT_CONCATENATE(get_, name)(char) throw() { return string; } \
static wchar_t const* __cdecl _CRT_CONCATENATE(get_, name)(wchar_t) throw() { return _CRT_WIDE(string); } \
static size_t const _CRT_CONCATENATE(name, _length) = _countof(string) - 1; \
static size_t const _CRT_CONCATENATE(name, _count ) = _countof(string);
#define __cdecl
Definition: accygwin.h:79
_In_z_ char const *const string
unsigned char
Definition: typeof.h:29
#define _countof(array)
Definition: sndvol32.h:70
Definition: name.c:39
#define wchar_t
Definition: wchar.h:102
#define _CRT_WIDE(_String)
Definition: vcruntime.h:20
#define _CRT_CONCATENATE(a, b)
Definition: vcruntime.h:23

Definition at line 172 of file corecrt_internal_traits.h.

Function Documentation

◆ __crt_compute_required_transform_buffer_count() [1/2]

size_t __crt_compute_required_transform_buffer_count ( unsigned const  code_page,
_In_z_ char const *const  string 
)
inline

Definition at line 278 of file corecrt_internal_traits.h.

282{
283 return static_cast<size_t>(__acrt_MultiByteToWideChar(code_page, 0, string, -1, nullptr, 0));
284}
_Out_opt_ UINT * code_page

Referenced by compute_required_transform_buffer_count(), and initialize_environment_by_cloning_nolock().

◆ __crt_compute_required_transform_buffer_count() [2/2]

size_t __crt_compute_required_transform_buffer_count ( unsigned const  code_page,
_In_z_ wchar_t const *const  string 
)
inline

Definition at line 286 of file corecrt_internal_traits.h.

290{
291 return static_cast<size_t>(__acrt_WideCharToMultiByte(code_page, 0, string, -1, nullptr, 0, nullptr, nullptr));
292}
return __acrt_WideCharToMultiByte(code_page, 0, buffer.get(), -1, result_size !=0 ? result :nullptr, result_size, nullptr, nullptr)

◆ _Out_writes_z_()

_In_z_ char const *const _Out_writes_z_ ( buffer_count  ) const

◆ _Success_()

_Success_ ( return  ,
0 &&return<=  buffer_count 
) const

◆ static_cast< size_t >() [1/2]

return static_cast< size_t > ( __acrt_MultiByteToWideChar(code_page, 0, string, -1, buffer, int_count )

◆ static_cast< size_t >() [2/2]

Variable Documentation

◆ buffer_count

Initial value:
{
int const int_count = static_cast<int>(buffer_count)
_In_z_ char const *const size_t const buffer_count
unsigned int int_count
Definition: shader.c:6189

Definition at line 299 of file corecrt_internal_traits.h.

◆ string