ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

_num_get.c
Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 1999
00003  * Silicon Graphics Computer Systems, Inc.
00004  *
00005  * Copyright (c) 1999
00006  * Boris Fomitchev
00007  *
00008  * This material is provided "as is", with absolutely no warranty expressed
00009  * or implied. Any use is at your own risk.
00010  *
00011  * Permission to use or copy this software for any purpose is hereby granted
00012  * without fee, provided the above notices are retained on all copies.
00013  * Permission to modify the code and to distribute modified code is granted,
00014  * provided the above notices are retained, and a notice that the code was
00015  * modified is included with the above copyright notice.
00016  *
00017  */
00018 #ifndef _STLP_NUM_GET_C
00019 #define _STLP_NUM_GET_C
00020 
00021 #ifndef _STLP_INTERNAL_NUM_GET_H
00022 #  include <stl/_num_get.h>
00023 #endif
00024 
00025 #ifndef _STLP_INTERNAL_LIMITS
00026 #  include <stl/_limits.h>
00027 #endif
00028 
00029 _STLP_BEGIN_NAMESPACE
00030 
00031 _STLP_MOVE_TO_PRIV_NAMESPACE
00032 
00033 _STLP_DECLSPEC unsigned char _STLP_CALL __digit_val_table(unsigned);
00034 _STLP_DECLSPEC const char* _STLP_CALL __narrow_atoms();
00035 
00036 // __do_get_integer, __do_get_float and its helper functions.
00037 
00038 inline bool _STLP_CALL __get_fdigit(char __c, const char*)
00039 { return __c >= '0' && __c <= '9'; }
00040 
00041 inline bool _STLP_CALL __get_fdigit_or_sep(char& __c, char __sep, const char *__digits) {
00042   if (__c == __sep) {
00043     __c = ',' ;
00044     return true ;
00045   }
00046   else
00047     return  __get_fdigit(__c, __digits);
00048 }
00049 
00050 inline int _STLP_CALL
00051 __get_digit_from_table(unsigned __index)
00052 { return (__index > 127 ? 0xFF : __digit_val_table(__index)); }
00053 
00054 template <class _InputIter, class _CharT>
00055 int
00056 __get_base_or_zero(_InputIter& __in_ite, _InputIter& __end,
00057                    ios_base::fmtflags __flags, const ctype<_CharT>& __c_type) {
00058   _CharT __atoms[5];
00059   __c_type.widen(__narrow_atoms(), __narrow_atoms() + 5, __atoms);
00060 
00061   bool __negative = false;
00062   _CharT __c = *__in_ite;
00063 
00064   if (__c == __atoms[1] /* __xminus_char */ ) {
00065     __negative = true;
00066     ++__in_ite;
00067   }
00068   else if (__c == __atoms[0] /* __xplus_char */ )
00069     ++__in_ite;
00070 
00071   int __base;
00072   int __valid_zero = 0;
00073 
00074   ios_base::fmtflags __basefield = __flags & ios_base::basefield;
00075 
00076   switch (__basefield) {
00077   case ios_base::oct:
00078     __base = 8;
00079     break;
00080   case ios_base::dec:
00081     __base = 10;
00082     break;
00083   case ios_base::hex:
00084     __base = 16;
00085     if (__in_ite != __end && *__in_ite == __atoms[2] /* __zero_char */ ) {
00086       ++__in_ite;
00087       if (__in_ite != __end &&
00088           (*__in_ite == __atoms[3] /* __x_char */ || *__in_ite == __atoms[4] /* __X_char */ ))
00089         ++__in_ite;
00090       else
00091         __valid_zero = 1; // That zero is valid by itself.
00092     }
00093     break;
00094   default:
00095     if (__in_ite != __end && *__in_ite == __atoms[2] /* __zero_char */ ) {
00096       ++__in_ite;
00097       if (__in_ite != __end &&
00098           (*__in_ite == __atoms[3] /* __x_char */ || *__in_ite == __atoms[4] /* __X_char */ )) {
00099         ++__in_ite;
00100         __base = 16;
00101       }
00102       else
00103         {
00104           __base = 8;
00105           __valid_zero = 1; // That zero is still valid by itself.
00106         }
00107     }
00108     else
00109       __base = 10;
00110     break;
00111   }
00112   return (__base << 2) | ((int)__negative << 1) | __valid_zero;
00113 }
00114 
00115 
00116 template <class _InputIter, class _Integer, class _CharT>
00117 bool _STLP_CALL
00118 __get_integer(_InputIter& __first, _InputIter& __last,
00119               int __base, _Integer& __val,
00120               int __got, bool __is_negative, _CharT __separator, const string& __grouping, const __true_type& /*_IsSigned*/) {
00121   bool __ovflow = false;
00122   _Integer __result = 0;
00123   bool __is_group = !__grouping.empty();
00124   char __group_sizes[64];
00125   char __current_group_size = 0;
00126   char* __group_sizes_end = __group_sizes;
00127 
00128   _Integer __over_base = (numeric_limits<_Integer>::min)() / __STATIC_CAST(_Integer, __base);
00129 
00130    for ( ; __first != __last ; ++__first) {
00131 
00132      const _CharT __c = *__first;
00133 
00134      if (__is_group && __c == __separator) {
00135        *__group_sizes_end++ = __current_group_size;
00136        __current_group_size = 0;
00137        continue;
00138      }
00139 
00140      int __n = __get_digit_from_table(__c);
00141 
00142      if (__n >= __base)
00143        break;
00144 
00145      ++__got;
00146      ++__current_group_size;
00147 
00148      if (__result < __over_base)
00149        __ovflow = true;  // don't need to keep accumulating
00150      else {
00151        _Integer __next = __STATIC_CAST(_Integer, __base * __result - __n);
00152        if (__result != 0)
00153          __ovflow = __ovflow || __next >= __result;
00154        __result = __next;
00155      }
00156    }
00157 
00158    if (__is_group && __group_sizes_end != __group_sizes) {
00159      *__group_sizes_end++ = __current_group_size;
00160    }
00161 
00162    // fbp : added to not modify value if nothing was read
00163    if (__got > 0) {
00164        __val = __ovflow ? __is_negative ? (numeric_limits<_Integer>::min)()
00165                                         : (numeric_limits<_Integer>::max)()
00166                         : __is_negative ? __result
00167                                         : __STATIC_CAST(_Integer, -__result);
00168    }
00169   // overflow is being treated as failure
00170   return ((__got > 0) && !__ovflow) &&
00171           (__is_group == 0 ||
00172            __valid_grouping(__group_sizes, __group_sizes_end,
00173                             __grouping.data(), __grouping.data()+ __grouping.size()));
00174 }
00175 
00176 template <class _InputIter, class _Integer, class _CharT>
00177 bool _STLP_CALL
00178 __get_integer(_InputIter& __first, _InputIter& __last,
00179               int __base, _Integer& __val,
00180               int __got, bool __is_negative, _CharT __separator, const string& __grouping, const __false_type& /*_IsSigned*/) {
00181   bool __ovflow = false;
00182   _Integer __result = 0;
00183   bool __is_group = !__grouping.empty();
00184   char __group_sizes[64];
00185   char __current_group_size = 0;
00186   char* __group_sizes_end = __group_sizes;
00187 
00188   _Integer  __over_base = (numeric_limits<_Integer>::max)() / __STATIC_CAST(_Integer, __base);
00189 
00190   for ( ; __first != __last ; ++__first) {
00191 
00192     const _CharT __c = *__first;
00193 
00194     if (__is_group && __c == __separator) {
00195       *__group_sizes_end++ = __current_group_size;
00196       __current_group_size = 0;
00197       continue;
00198     }
00199 
00200     int __n = __get_digit_from_table(__c);
00201 
00202     if (__n >= __base)
00203       break;
00204 
00205     ++__got;
00206     ++__current_group_size;
00207 
00208     if (__result > __over_base)
00209       __ovflow = true;  //don't need to keep accumulating
00210     else {
00211       _Integer __next = __STATIC_CAST(_Integer, __base * __result + __n);
00212       if (__result != 0)
00213         __ovflow = __ovflow || __next <= __result;
00214         __result = __next;
00215       }
00216   }
00217 
00218   if (__is_group && __group_sizes_end != __group_sizes) {
00219       *__group_sizes_end++ = __current_group_size;
00220   }
00221 
00222   // fbp : added to not modify value if nothing was read
00223   if (__got > 0) {
00224       __val = __ovflow ? (numeric_limits<_Integer>::max)()
00225                        : (__is_negative ? __STATIC_CAST(_Integer, -__result)
00226                                         : __result);
00227   }
00228 
00229   // overflow is being treated as failure
00230   return ((__got > 0) && !__ovflow) &&
00231           (__is_group == 0 ||
00232            __valid_grouping(__group_sizes, __group_sizes_end,
00233                             __grouping.data(), __grouping.data()+ __grouping.size()));
00234 }
00235 
00236 
00237 template <class _InputIter, class _Integer, class _CharT>
00238 bool _STLP_CALL
00239 __get_decimal_integer(_InputIter& __first, _InputIter& __last, _Integer& __val, _CharT* /*dummy*/) {
00240   string __grp;
00241   //Here there is no grouping so separator is not important, we just pass the default character.
00242   return __get_integer(__first, __last, 10, __val, 0, false, _CharT() /*separator*/, __grp, __false_type());
00243 }
00244 
00245 template <class _InputIter, class _Integer, class _CharT>
00246 _InputIter _STLP_CALL
00247 __do_get_integer(_InputIter& __in_ite, _InputIter& __end, ios_base& __str,
00248                  ios_base::iostate& __err, _Integer& __val, _CharT* /*__pc*/) {
00249   locale __loc = __str.getloc();
00250   const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
00251 
00252 #if defined (__HP_aCC) && (__HP_aCC == 1)
00253   bool _IsSigned = !((_Integer)(-1) > 0);
00254 #else
00255   typedef typename __bool2type<numeric_limits<_Integer>::is_signed>::_Ret _IsSigned;
00256 #endif
00257 
00258   const int __base_or_zero = __get_base_or_zero(__in_ite, __end, __str.flags(), __ctype);
00259   int  __got = __base_or_zero & 1;
00260 
00261   bool __result;
00262 
00263   if (__in_ite == __end) {      // We may have already read a 0.  If so,
00264 
00265     if (__got > 0) {       // the result is 0 even if we're at eof.
00266       __val = 0;
00267       __result = true;
00268     }
00269     else
00270       __result = false;
00271   }
00272   else {
00273     const numpunct<_CharT>& __np = use_facet<numpunct<_CharT> >(__loc);
00274     const bool __negative = (__base_or_zero & 2) != 0;
00275     const int __base = __base_or_zero >> 2;
00276 
00277 #if defined (__HP_aCC) && (__HP_aCC == 1)
00278     if (_IsSigned)
00279       __result = __get_integer(__in_ite, __end, __base,  __val, __got, __negative, __np.thousands_sep(), __np.grouping(), __true_type() );
00280     else
00281       __result = __get_integer(__in_ite, __end, __base,  __val, __got, __negative, __np.thousands_sep(), __np.grouping(), __false_type() );
00282 #else
00283     __result = __get_integer(__in_ite, __end, __base,  __val, __got, __negative, __np.thousands_sep(), __np.grouping(), _IsSigned());
00284 # endif
00285   }
00286 
00287   __err = __STATIC_CAST(ios_base::iostate, __result ? ios_base::goodbit : ios_base::failbit);
00288 
00289   if (__in_ite == __end)
00290     __err |= ios_base::eofbit;
00291   return __in_ite;
00292 }
00293 
00294 // __read_float and its helper functions.
00295 template <class _InputIter, class _CharT>
00296 _InputIter  _STLP_CALL
00297 __copy_sign(_InputIter __first, _InputIter __last, __iostring& __v,
00298             _CharT __xplus, _CharT __xminus) {
00299   if (__first != __last) {
00300     _CharT __c = *__first;
00301     if (__c == __xplus)
00302       ++__first;
00303     else if (__c == __xminus) {
00304       __v.push_back('-');
00305       ++__first;
00306     }
00307   }
00308   return __first;
00309 }
00310 
00311 
00312 template <class _InputIter, class _CharT>
00313 bool _STLP_CALL
00314 __copy_digits(_InputIter& __first, _InputIter __last,
00315               __iostring& __v, const _CharT* __digits) {
00316   bool __ok = false;
00317 
00318   for ( ; __first != __last; ++__first) {
00319     _CharT __c = *__first;
00320     if (__get_fdigit(__c, __digits)) {
00321       __v.push_back((char)__c);
00322       __ok = true;
00323     }
00324     else
00325       break;
00326   }
00327   return __ok;
00328 }
00329 
00330 template <class _InputIter, class _CharT>
00331 bool _STLP_CALL
00332 __copy_grouped_digits(_InputIter& __first, _InputIter __last,
00333                       __iostring& __v, const _CharT * __digits,
00334                       _CharT __sep, const string& __grouping,
00335                       bool& __grouping_ok) {
00336   bool __ok = false;
00337   char __group_sizes[64];
00338   char*__group_sizes_end = __group_sizes;
00339   char __current_group_size = 0;
00340 
00341   for ( ; __first != __last; ++__first) {
00342     _CharT __c = *__first;
00343     bool __tmp = __get_fdigit_or_sep(__c, __sep, __digits);
00344     if (__tmp) {
00345       if (__c == ',') {
00346         *__group_sizes_end++ = __current_group_size;
00347         __current_group_size = 0;
00348       }
00349       else {
00350         __ok = true;
00351         __v.push_back((char)__c);
00352         ++__current_group_size;
00353       }
00354     }
00355     else
00356       break;
00357   }
00358 
00359   if (__group_sizes_end != __group_sizes)
00360     *__group_sizes_end++ = __current_group_size;
00361   __grouping_ok = __valid_grouping(__group_sizes, __group_sizes_end, __grouping.data(), __grouping.data() + __grouping.size());
00362   return __ok;
00363 }
00364 
00365 
00366 template <class _InputIter, class _CharT>
00367 bool _STLP_CALL
00368 __read_float(__iostring& __buf, _InputIter& __in_ite, _InputIter& __end,
00369              const ctype<_CharT> &__ct, const numpunct<_CharT> &__numpunct) {
00370   // Create a string, copying characters of the form
00371   // [+-]? [0-9]* .? [0-9]* ([eE] [+-]? [0-9]+)?
00372 
00373   string __grouping = __numpunct.grouping();
00374   bool __digits_before_dot /* = false */;
00375   bool __digits_after_dot = false;
00376   bool __ok;
00377 
00378   bool   __grouping_ok = true;
00379 
00380   _CharT __dot = __numpunct.decimal_point();
00381   _CharT __sep = __numpunct.thousands_sep();
00382 
00383   _CharT __digits[10];
00384   _CharT __xplus;
00385   _CharT __xminus;
00386 
00387   _CharT __pow_e;
00388   _CharT __pow_E;
00389 
00390   _Initialize_get_float(__ct, __xplus, __xminus, __pow_e, __pow_E, __digits);
00391 
00392   // Get an optional sign
00393   __in_ite = __copy_sign(__in_ite, __end, __buf, __xplus, __xminus);
00394 
00395   // Get an optional string of digits.
00396   if (!__grouping.empty())
00397     __digits_before_dot = __copy_grouped_digits(__in_ite, __end, __buf, __digits,
00398                                                 __sep, __grouping, __grouping_ok);
00399   else
00400     __digits_before_dot = __copy_digits(__in_ite, __end, __buf, __digits);
00401 
00402   // Get an optional decimal point, and an optional string of digits.
00403   if (__in_ite != __end && *__in_ite == __dot) {
00404     __buf.push_back('.');
00405     ++__in_ite;
00406     __digits_after_dot = __copy_digits(__in_ite, __end, __buf, __digits);
00407   }
00408 
00409   // There have to be some digits, somewhere.
00410   __ok = __digits_before_dot || __digits_after_dot;
00411 
00412   // Get an optional exponent.
00413   if (__ok && __in_ite != __end && (*__in_ite == __pow_e || *__in_ite == __pow_E)) {
00414     __buf.push_back('e');
00415     ++__in_ite;
00416     __in_ite = __copy_sign(__in_ite, __end, __buf, __xplus, __xminus);
00417     __ok = __copy_digits(__in_ite, __end, __buf, __digits);
00418     // If we have an exponent then the sign
00419     // is optional but the digits aren't.
00420   }
00421 
00422   return __ok;
00423 }
00424 
00425 template <class _InputIter, class _Float, class _CharT>
00426 _InputIter _STLP_CALL
00427 __do_get_float(_InputIter& __in_ite, _InputIter& __end, ios_base& __str,
00428                ios_base::iostate& __err, _Float& __val, _CharT* /*__pc*/) {
00429   locale __loc = __str.getloc();
00430   const ctype<_CharT> &__ctype = use_facet<ctype<_CharT> >(__loc);
00431   const numpunct<_CharT> &__numpunct = use_facet<numpunct<_CharT> >(__loc);
00432 
00433   __iostring __buf ;
00434   bool __ok = __read_float(__buf, __in_ite, __end, __ctype, __numpunct);
00435   if (__ok) {
00436     __string_to_float(__buf, __val);
00437     __err = ios_base::goodbit;
00438   }
00439   else {
00440     __err = ios_base::failbit;
00441   }
00442   if (__in_ite == __end)
00443     __err |= ios_base::eofbit;
00444   return __in_ite;
00445 }
00446 
00447 template <class _InputIter, class _CharT>
00448 _InputIter _STLP_CALL
00449 __do_get_alphabool(_InputIter& __in_ite, _InputIter& __end, ios_base& __str,
00450                    ios_base::iostate& __err, bool& __x, _CharT* /*__pc*/) {
00451   const numpunct<_CharT>& __np = use_facet<numpunct<_CharT> >(__str.getloc());
00452   const basic_string<_CharT, char_traits<_CharT>, allocator<_CharT> > __truename  = __np.truename();
00453   const basic_string<_CharT, char_traits<_CharT>, allocator<_CharT> > __falsename = __np.falsename();
00454   bool __true_ok  = true;
00455   bool __false_ok = true;
00456 
00457   size_t __n = 0;
00458   for ( ; __in_ite != __end; ++__in_ite) {
00459     _CharT __c = *__in_ite;
00460     __true_ok  = __true_ok  && (__c == __truename[__n]);
00461     __false_ok = __false_ok && (__c == __falsename[__n]);
00462     ++__n;
00463 
00464     if ((!__true_ok && !__false_ok) ||
00465         (__true_ok  && __n >= __truename.size()) ||
00466         (__false_ok && __n >= __falsename.size())) {
00467       ++__in_ite;
00468       break;
00469     }
00470   }
00471   if (__true_ok  && __n < __truename.size())  __true_ok  = false;
00472   if (__false_ok && __n < __falsename.size()) __false_ok = false;
00473 
00474   if (__true_ok || __false_ok) {
00475     __err = ios_base::goodbit;
00476     __x = __true_ok;
00477   }
00478   else
00479     __err = ios_base::failbit;
00480 
00481   if (__in_ite == __end)
00482     __err |= ios_base::eofbit;
00483 
00484   return __in_ite;
00485 }
00486 
00487 _STLP_MOVE_TO_STD_NAMESPACE
00488 
00489 //
00490 // num_get<>, num_put<>
00491 //
00492 
00493 template <class _CharT, class _InputIterator>
00494 locale::id num_get<_CharT, _InputIterator>::id;
00495 
00496 #if !defined (_STLP_NO_BOOL)
00497 template <class _CharT, class _InputIter>
00498 _InputIter
00499 num_get<_CharT, _InputIter>::do_get(_InputIter __in_ite, _InputIter __end,
00500                                     ios_base& __s, ios_base::iostate& __err, bool& __x) const {
00501   if (__s.flags() & ios_base::boolalpha) {
00502     return _STLP_PRIV __do_get_alphabool(__in_ite, __end, __s, __err, __x, (_CharT*)0);
00503   }
00504   else {
00505     long __lx;
00506     _InputIter __tmp = _STLP_PRIV __do_get_integer(__in_ite, __end, __s, __err, __lx, (_CharT*)0 );
00507     if (!(__err & ios_base::failbit)) {
00508       if (__lx == 0)
00509         __x = false;
00510       else if (__lx == 1)
00511         __x = true;
00512       else
00513         __err |= ios_base::failbit;
00514     }
00515     return __tmp;
00516   }
00517 }
00518 #endif
00519 
00520 #if defined (_STLP_FIX_LIBRARY_ISSUES)
00521 template <class _CharT, class _InputIter>
00522 _InputIter
00523 num_get<_CharT, _InputIter>::do_get(_InputIter __in_ite, _InputIter __end, ios_base& __str,
00524                                     ios_base::iostate& __err, short& __val) const
00525 { return _STLP_PRIV __do_get_integer(__in_ite, __end, __str, __err, __val, (_CharT*)0 ); }
00526 
00527 template <class _CharT, class _InputIter>
00528 _InputIter
00529 num_get<_CharT, _InputIter>::do_get(_InputIter __in_ite, _InputIter __end, ios_base& __str,
00530                                     ios_base::iostate& __err, int& __val) const
00531 { return _STLP_PRIV __do_get_integer(__in_ite, __end, __str, __err, __val, (_CharT*)0 ); }
00532 
00533 #endif
00534 
00535 template <class _CharT, class _InputIter>
00536 _InputIter
00537 num_get<_CharT, _InputIter>::do_get(_InputIter __in_ite, _InputIter __end, ios_base& __str,
00538                                     ios_base::iostate& __err, long& __val) const
00539 { return _STLP_PRIV __do_get_integer(__in_ite, __end, __str, __err, __val, (_CharT*)0 ); }
00540 
00541 template <class _CharT, class _InputIter>
00542 _InputIter
00543 num_get<_CharT, _InputIter>::do_get(_InputIter __in_ite, _InputIter __end, ios_base& __str,
00544                                     ios_base::iostate& __err,
00545                                     unsigned short& __val) const
00546 { return _STLP_PRIV __do_get_integer(__in_ite, __end, __str, __err, __val, (_CharT*)0 ); }
00547 
00548 template <class _CharT, class _InputIter>
00549 _InputIter
00550 num_get<_CharT, _InputIter>::do_get(_InputIter __in_ite, _InputIter __end, ios_base& __str,
00551                                     ios_base::iostate& __err,
00552                                     unsigned int& __val) const
00553 { return _STLP_PRIV __do_get_integer(__in_ite, __end, __str, __err, __val, (_CharT*)0 ); }
00554 
00555 template <class _CharT, class _InputIter>
00556 _InputIter
00557 num_get<_CharT, _InputIter>::do_get(_InputIter __in_ite, _InputIter __end, ios_base& __str,
00558                                     ios_base::iostate& __err,
00559                                     unsigned long& __val) const
00560 { return _STLP_PRIV __do_get_integer(__in_ite, __end, __str, __err, __val, (_CharT*)0 ); }
00561 
00562 template <class _CharT, class _InputIter>
00563 _InputIter
00564 num_get<_CharT, _InputIter>::do_get(_InputIter __in_ite, _InputIter __end, ios_base& __str,
00565                                     ios_base::iostate& __err,
00566                                     float& __val) const
00567 { return _STLP_PRIV __do_get_float(__in_ite, __end, __str, __err, __val, (_CharT*)0 ); }
00568 
00569 template <class _CharT, class _InputIter>
00570 _InputIter
00571 num_get<_CharT, _InputIter>::do_get(_InputIter __in_ite, _InputIter __end, ios_base& __str,
00572                                     ios_base::iostate& __err,
00573                                     double& __val) const
00574 { return _STLP_PRIV __do_get_float(__in_ite, __end, __str, __err, __val, (_CharT*)0 ); }
00575 
00576 #if !defined (_STLP_NO_LONG_DOUBLE)
00577 template <class _CharT, class _InputIter>
00578 _InputIter
00579 num_get<_CharT, _InputIter>::do_get(_InputIter __in_ite, _InputIter __end, ios_base& __str,
00580                                     ios_base::iostate& __err,
00581                                     long double& __val) const
00582 { return _STLP_PRIV __do_get_float(__in_ite, __end, __str, __err, __val, (_CharT*)0 ); }
00583 #endif
00584 
00585 template <class _CharT, class _InputIter>
00586 _InputIter
00587 num_get<_CharT, _InputIter>::do_get(_InputIter __in_ite, _InputIter __end, ios_base& __str,
00588                                     ios_base::iostate& __err,
00589                                     void*& __p) const {
00590 #if defined (_STLP_LONG_LONG) && !defined (__MRC__)    //*ty 12/07/2001 - MrCpp can not cast from long long to void*
00591   unsigned _STLP_LONG_LONG __val;
00592 #else
00593   unsigned long __val;
00594 #endif
00595   iter_type __tmp = _STLP_PRIV __do_get_integer(__in_ite, __end, __str, __err, __val, (_CharT*)0 );
00596   if (!(__err & ios_base::failbit))
00597     __p = __REINTERPRET_CAST(void*, __val);
00598   return __tmp;
00599 }
00600 
00601 #if defined (_STLP_LONG_LONG)
00602 template <class _CharT, class _InputIter>
00603 _InputIter
00604 num_get<_CharT, _InputIter>::do_get(_InputIter __in_ite, _InputIter __end, ios_base& __str,
00605                                     ios_base::iostate& __err,
00606                                     _STLP_LONG_LONG& __val) const
00607 { return _STLP_PRIV __do_get_integer(__in_ite, __end, __str, __err, __val, (_CharT*)0 ); }
00608 
00609 template <class _CharT, class _InputIter>
00610 _InputIter
00611 num_get<_CharT, _InputIter>::do_get(_InputIter __in_ite, _InputIter __end, ios_base& __str,
00612                                     ios_base::iostate& __err,
00613                                     unsigned _STLP_LONG_LONG& __val) const
00614 { return _STLP_PRIV __do_get_integer(__in_ite, __end, __str, __err, __val, (_CharT*)0 ); }
00615 #endif
00616 
00617 _STLP_END_NAMESPACE
00618 
00619 #endif /* _STLP_NUMERIC_FACETS_C */
00620 
00621 // Local Variables:
00622 // mode:C++
00623 // End:

Generated on Sat May 26 2012 04:27:54 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.