ReactOS 0.4.15-dev-7660-g0086d05
num_get.cpp File Reference
#include "stlport_prefix.h"
#include <locale>
#include <istream>
#include <algorithm>
Include dependency graph for num_get.cpp:

Go to the source code of this file.

Functions

_STLP_BEGIN_NAMESPACE _STLP_MOVE_TO_PRIV_NAMESPACE bool _STLP_CALL __valid_grouping (const char *first1, const char *last1, const char *first2, const char *last2)
 
_STLP_DECLSPEC unsigned char _STLP_CALL __digit_val_table (unsigned __index)
 
_STLP_DECLSPEC const char *_STLP_CALL __narrow_atoms ()
 
bool _STLP_CALL __get_fdigit (wchar_t &c, const wchar_t *digits)
 
bool _STLP_CALL __get_fdigit_or_sep (wchar_t &c, wchar_t sep, const wchar_t *digits)
 

Variables

_STLP_MOVE_TO_STD_NAMESPACE template class _STLP_CLASS_DECLSPEC istreambuf_iterator< char, char_traits< char > >
 
template class _STLP_CLASS_DECLSPEC istreambuf_iterator< wchar_t, char_traits< wchar_t > >
 

Function Documentation

◆ __digit_val_table()

_STLP_DECLSPEC unsigned char _STLP_CALL __digit_val_table ( unsigned  __index)

Definition at line 54 of file num_get.cpp.

54 {
55 static const unsigned char __val_table[128] = {
56 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
57 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
58 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
59 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
60 0xFF,10,11,12,13,14,15,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
61 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
62 0xFF,10,11,12,13,14,15,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
63 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
64 };
65
66 return __val_table[__index];
67}

Referenced by __get_digit_from_table().

◆ __get_fdigit()

bool _STLP_CALL __get_fdigit ( wchar_t c,
const wchar_t digits 
)

Definition at line 78 of file num_get.cpp.

78 {
79 const wchar_t* p = find(digits, digits + 10, c);
80 if (p != digits + 10) {
81 c = (char)('0' + (p - digits));
82 return true;
83 }
84 else
85 return false;
86}
static TAGID TAGID find
Definition: db.cpp:155
unsigned char
Definition: typeof.h:29
const GLubyte * c
Definition: glext.h:8905
GLfloat GLfloat p
Definition: glext.h:8902
static const int digits[]
Definition: decode.c:71

Referenced by __get_fdigit_or_sep().

◆ __get_fdigit_or_sep()

bool _STLP_CALL __get_fdigit_or_sep ( wchar_t c,
wchar_t  sep,
const wchar_t digits 
)

Definition at line 88 of file num_get.cpp.

89 {
90 if (c == sep) {
91 c = (char)',';
92 return true;
93 }
94 else
95 return __get_fdigit(c, digits);
96}
bool _STLP_CALL __get_fdigit(wchar_t &c, const wchar_t *digits)
Definition: num_get.cpp:78

◆ __narrow_atoms()

_STLP_DECLSPEC const char *_STLP_CALL __narrow_atoms ( )

Definition at line 69 of file num_get.cpp.

70{ return "+-0xX"; }

Referenced by __get_base_or_zero().

◆ __valid_grouping()

_STLP_BEGIN_NAMESPACE _STLP_MOVE_TO_PRIV_NAMESPACE bool _STLP_CALL __valid_grouping ( const char first1,
const char last1,
const char first2,
const char last2 
)

Definition at line 38 of file num_get.cpp.

39 {
40 if (first1 == last1 || first2 == last2) return true;
41
42 --last1; --last2;
43
44 while (first1 != last1) {
45 if (*last1 != *first2)
46 return false;
47 --last1;
48 if (first2 != last2) ++first2;
49 }
50
51 return *last1 <= *first2;
52}

Referenced by __copy_grouped_digits(), __get_integer(), and __get_monetary_value().

Variable Documentation

◆ istreambuf_iterator< char, char_traits< char > >

◆ istreambuf_iterator< wchar_t, char_traits< wchar_t > >