ReactOS 0.4.16-dev-716-g2b2bdab
corecrt_internal_strtox.h File Reference
#include <corecrt_internal.h>
#include <corecrt_internal_big_integer.h>
#include <corecrt_internal_fltintrn.h>
#include <corecrt_internal_ptd_propagation.h>
#include <corecrt_internal_stdio.h>
#include <ctype.h>
#include <fenv.h>
#include <locale.h>
#include <stdint.h>
Include dependency graph for corecrt_internal_strtox.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  __crt_strtox::is_signed< long >
 
struct  __crt_strtox::is_signed< long long >
 
struct  __crt_strtox::is_signed< unsigned long >
 
struct  __crt_strtox::is_signed< unsigned long long >
 
struct  __crt_strtox::make_signed< long >
 
struct  __crt_strtox::make_signed< long long >
 
struct  __crt_strtox::make_signed< unsigned long >
 
struct  __crt_strtox::make_signed< unsigned long long >
 
struct  __crt_strtox::make_unsigned< long >
 
struct  __crt_strtox::make_unsigned< long long >
 
struct  __crt_strtox::make_unsigned< unsigned long >
 
struct  __crt_strtox::make_unsigned< unsigned long long >
 
struct  __crt_strtox::floating_point_string
 
class  __crt_strtox::floating_point_value
 
class  __crt_strtox::c_string_character_source< Character >
 
class  __crt_strtox::input_adapter_character_source< InputAdapter >
 

Namespaces

namespace  __crt_strtox
 

Macros

#define _INVALID_PARAMETER(expr)   _invalid_parameter_noinfo()
 
#define _VALIDATE_RETURN(expr, errorcode, retexpr)
 
#define _VALIDATE_RETURN_VOID(expr, errorcode)
 
#define DIGIT_RANGE_TEST(zero)
 

Enumerations

enum  : unsigned { __crt_strtox::FL_SIGNED = 0x01 , __crt_strtox::FL_NEGATIVE = 0x02 , __crt_strtox::FL_OVERFLOW = 0x04 , __crt_strtox::FL_READ_DIGIT = 0x08 }
 
enum  SLD_STATUS { SLD_OK , SLD_NODIGITS , SLD_UNDERFLOW , SLD_OVERFLOW }
 
enum class  __crt_strtox::floating_point_parse_result {
  __crt_strtox::decimal_digits , __crt_strtox::hexadecimal_digits , __crt_strtox::zero , __crt_strtox::infinity ,
  __crt_strtox::qnan , __crt_strtox::snan , __crt_strtox::indeterminate , __crt_strtox::no_digits ,
  __crt_strtox::underflow , __crt_strtox::overflow
}
 
enum  { __crt_strtox::maximum_temporary_decimal_exponent = 5200 , __crt_strtox::minimum_temporary_decimal_exponent = -5200 }
 

Functions

__forceinline int __cdecl __crt_strtox::wide_character_to_digit (wchar_t const c) throw ()
 
__forceinline unsigned __cdecl __crt_strtox::parse_digit (char const c) throw ()
 
__forceinline unsigned __cdecl __crt_strtox::parse_digit (wchar_t const c) throw ()
 
__forceinline bool __cdecl __crt_strtox::is_digit_or_nondigit (int const c) throw ()
 
__forceinline bool __cdecl __crt_strtox::is_space (char const c, _locale_t const locale) throw ()
 
__forceinline bool __cdecl __crt_strtox::is_space (wchar_t const c, _locale_t) throw ()
 
long __crt_strtox::minimum_signed_value (unsigned long) throw ()
 
long __crt_strtox::maximum_signed_value (unsigned long) throw ()
 
__int64 __crt_strtox::minimum_signed_value (unsigned __int64) throw ()
 
__int64 __crt_strtox::maximum_signed_value (unsigned __int64) throw ()
 
template<typename UnsignedInteger >
bool __crt_strtox::is_overflow_condition (unsigned const flags, UnsignedInteger const number) throw ()
 
template<typename UnsignedInteger , typename CharacterSource , bool TrimWhitespace = true>
UnsignedInteger __cdecl __crt_strtox::parse_integer (__crt_cached_ptd_host &ptd, CharacterSource source, int base, bool const is_result_signed) throw ()
 
template<typename UnsignedInteger , typename CharacterSource >
UnsignedInteger __cdecl __crt_strtox::parse_integer (_locale_t const locale, CharacterSource source, int base, bool const is_result_signed) throw ()
 
template<typename FloatingType >
void __cdecl __crt_strtox::assemble_floating_point_zero (bool const is_negative, FloatingType &result) throw ()
 
void __cdecl __crt_strtox::assemble_floating_point_zero (bool const is_negative, floating_point_value const &result) throw ()
 
template<typename FloatingType >
void __cdecl __crt_strtox::assemble_floating_point_infinity (bool const is_negative, FloatingType &result) throw ()
 
void __cdecl __crt_strtox::assemble_floating_point_infinity (bool const is_negative, floating_point_value const &result) throw ()
 
template<typename FloatingType >
void __cdecl __crt_strtox::assemble_floating_point_qnan (bool const is_negative, FloatingType &result) throw ()
 
void __cdecl __crt_strtox::assemble_floating_point_qnan (bool const is_negative, floating_point_value const &result) throw ()
 
template<typename FloatingType >
void __cdecl __crt_strtox::assemble_floating_point_snan (bool const is_negative, FloatingType &result) throw ()
 
void __cdecl __crt_strtox::assemble_floating_point_snan (bool const is_negative, floating_point_value const &result) throw ()
 
template<typename FloatingType >
void __cdecl __crt_strtox::assemble_floating_point_ind (FloatingType &result) throw ()
 
void __cdecl __crt_strtox::assemble_floating_point_ind (floating_point_value const &result) throw ()
 
__forceinline bool __cdecl __crt_strtox::should_round_up (bool const is_negative, bool const lsb_bit, bool const round_bit, bool const has_tail_bits) throw ()
 
__forceinline uint64_t __cdecl __crt_strtox::right_shift_with_rounding (bool const is_negative, uint64_t const value, uint32_t const shift, bool const has_zero_tail) throw ()
 
template<typename FloatingType >
SLD_STATUS __cdecl __crt_strtox::assemble_floating_point_value_t (bool const is_negative, int32_t const exponent, uint64_t const mantissa, FloatingType &result) throw ()
 
SLD_STATUS __cdecl __crt_strtox::assemble_floating_point_value (uint64_t const initial_mantissa, int32_t const initial_exponent, bool const is_negative, bool const has_zero_tail, floating_point_value const &result) throw ()
 
SLD_STATUS __cdecl __crt_strtox::assemble_floating_point_value_from_big_integer (big_integer const &integer_value, uint32_t const integer_bits_of_precision, bool const is_negative, bool const has_nonzero_fractional_part, floating_point_value const &result) throw ()
 
__forceinline void __cdecl __crt_strtox::accumulate_decimal_digits_into_big_integer (uint8_t const *const first_digit, uint8_t const *const last_digit, big_integer &result) throw ()
 
SLD_STATUS __cdecl __crt_strtox::convert_decimal_string_to_floating_type_common (floating_point_string const &data, floating_point_value const &result) throw ()
 
template<typename FloatingType >
SLD_STATUS __cdecl __crt_strtox::convert_decimal_string_to_floating_type (floating_point_string const &data, FloatingType &result) throw ()
 
SLD_STATUS __cdecl __crt_strtox::convert_hexadecimal_string_to_floating_type_common (floating_point_string const &data, floating_point_value const &result) throw ()
 
template<typename FloatingType >
SLD_STATUS __cdecl __crt_strtox::convert_hexadecimal_string_to_floating_type (floating_point_string const &data, FloatingType &result) throw ()
 
void __cdecl __crt_strtox::assemble_floating_point_zero (bool const is_negative, _LDBL12 &result) throw ()
 
void __cdecl __crt_strtox::assemble_floating_point_infinity (bool const is_negative, _LDBL12 &result) throw ()
 
void __cdecl __crt_strtox::assemble_floating_point_qnan (bool const is_negative, _LDBL12 &result) throw ()
 
void __cdecl __crt_strtox::assemble_floating_point_snan (bool const is_negative, _LDBL12 &result) throw ()
 
void __cdecl __crt_strtox::assemble_floating_point_ind (_LDBL12 &result) throw ()
 
SLD_STATUS __cdecl __crt_strtox::convert_decimal_string_to_floating_type (floating_point_string const &data, _LDBL12 &result) throw ()
 
SLD_STATUS __cdecl __crt_strtox::convert_hexadecimal_string_to_floating_type (floating_point_string const &data, _LDBL12 &result) throw ()
 
template<typename Character , typename CharacterSource >
bool __cdecl __crt_strtox::parse_next_characters_from_source (Character const *const uppercase, Character const *const lowercase, size_t const count, Character &c, CharacterSource &source) throw ()
 
template<typename Character , typename CharacterSource >
bool __cdecl __crt_strtox::parse_floating_point_possible_nan_is_snan (Character &c, CharacterSource &source) throw ()
 
template<typename Character , typename CharacterSource >
bool __cdecl __crt_strtox::parse_floating_point_possible_nan_is_ind (Character &c, CharacterSource &source) throw ()
 
template<typename Character , typename CharacterSource , typename StoredState >
floating_point_parse_result __cdecl __crt_strtox::parse_floating_point_possible_infinity (Character &c, CharacterSource &source, StoredState stored_state) throw ()
 
template<typename Character , typename CharacterSource , typename StoredState >
floating_point_parse_result __cdecl __crt_strtox::parse_floating_point_possible_nan (Character &c, CharacterSource &source, StoredState stored_state) throw ()
 
template<typename CharacterSource >
floating_point_parse_result __cdecl __crt_strtox::parse_floating_point_from_source (_locale_t const locale, CharacterSource &source, floating_point_string &fp_string) throw ()
 
template<typename FloatingType >
SLD_STATUS __cdecl __crt_strtox::parse_floating_point_write_result (floating_point_parse_result const parse_result, floating_point_string const &fp_string, FloatingType *const result) throw ()
 
template<typename CharacterSource , typename FloatingType >
SLD_STATUS __cdecl __crt_strtox::parse_floating_point (_locale_t const locale, CharacterSource source, FloatingType *const result) throw ()
 
template<typename Character , typename EndPointer >
c_string_character_source< Character > __cdecl __crt_strtox::make_c_string_character_source (Character const *const string, EndPointer const end) throw ()
 
template<typename Integer , typename Character , typename EndPointer >
__forceinline Integer __cdecl __crt_strtox::parse_integer_from_string (Character const *const string, EndPointer const end, int const base, _locale_t const locale) throw ()
 
template<typename InputAdapter >
input_adapter_character_source< InputAdapter > __cdecl __crt_strtox::make_input_adapter_character_source (InputAdapter *const input_adapter, uint64_t const width, bool *const succeeded) throw ()
 
template<typename Character , typename EndPointer , bool TrimWhitespace = false>
__forceinline long __cdecl _tcstol_internal (__crt_cached_ptd_host &ptd, Character const *const string, EndPointer const end, int const base) throw ()
 

Macro Definition Documentation

◆ _INVALID_PARAMETER

#define _INVALID_PARAMETER (   expr)    _invalid_parameter_noinfo()

Definition at line 35 of file corecrt_internal_strtox.h.

◆ _VALIDATE_RETURN

#define _VALIDATE_RETURN (   expr,
  errorcode,
  retexpr 
)
Value:
{ \
int _Expr_val = !!(expr); \
_ASSERT_EXPR((_Expr_val), _CRT_WIDE(#expr)); \
if (!(_Expr_val)) \
{ \
*_errno() = (errorcode); \
_INVALID_PARAMETER(_CRT_WIDE(#expr)); \
return (retexpr); \
} \
}
_CRTIMP int *__cdecl _errno(void)
Definition: errno.c:17
Definition: query.h:86
#define _CRT_WIDE(_String)
Definition: vcruntime.h:20

Definition at line 38 of file corecrt_internal_strtox.h.

◆ _VALIDATE_RETURN_VOID

#define _VALIDATE_RETURN_VOID (   expr,
  errorcode 
)
Value:
{ \
int _Expr_val = !!(expr); \
_ASSERT_EXPR((_Expr_val), _CRT_WIDE(#expr)); \
if (!(_Expr_val)) \
{ \
*_errno() = (errorcode); \
_INVALID_PARAMETER(_CRT_WIDE(#expr)); \
return; \
} \
}

Definition at line 50 of file corecrt_internal_strtox.h.

◆ DIGIT_RANGE_TEST

#define DIGIT_RANGE_TEST (   zero)
Value:
if (c < zero) \
return -1; \
\
if (c < zero + 10) \
return c - zero;
const GLubyte * c
Definition: glext.h:8905
int zero
Definition: sehframes.cpp:29

Enumeration Type Documentation

◆ SLD_STATUS

Enumerator
SLD_OK 
SLD_NODIGITS 
SLD_UNDERFLOW 
SLD_OVERFLOW 

Definition at line 379 of file corecrt_internal_strtox.h.

380{
381 SLD_OK,
382
384
387} SLD_STATUS;

Function Documentation

◆ _tcstol_internal()

template<typename Character , typename EndPointer , bool TrimWhitespace = false>
__forceinline long __cdecl _tcstol_internal ( __crt_cached_ptd_host &  ptd,
Character const *const  string,
EndPointer const  end,
int const  base 
)
throw (
)

Definition at line 2028 of file corecrt_internal_strtox.h.

2034{
2035 return static_cast<long>(__crt_strtox::parse_integer<unsigned long, __crt_strtox::c_string_character_source<Character>, TrimWhitespace>(
2036 ptd,
2038 base,
2039 true // long is signed
2040 ));
2041}
_In_ size_t const _In_ int _In_ bool const _In_ unsigned const _In_ __acrt_rounding_mode const _Inout_ __crt_cached_ptd_host & ptd
Definition: cvt.cpp:355
GLuint GLuint end
Definition: gl.h:1545
c_string_character_source< Character > __cdecl make_c_string_character_source(Character const *const string, EndPointer const end)

Referenced by __crt_stdio_output::output_processor< Character, OutputAdapter, ProcessorBase >::parse_int_from_format_string(), __crt_stdio_output::positional_parameter_base< Character, OutputAdapter >::update_field_width(), __crt_stdio_output::positional_parameter_base< Character, OutputAdapter >::update_precision(), and __crt_stdio_output::positional_parameter_base< Character, OutputAdapter >::validate_and_update_state_at_beginning_of_format_character().