% Librarian A09-23j7ԦtI{7Ԧ d(  ALGORITHM.t ALGORITHM.CCBITSET.  BITSET.CC<CASSERT._CCTYPE.>CERRNO.@CFLOAT.BCISO646.DCLIMITS.uCLOCALE.vCMATH.COMPLEX.CSETJMP.CSIGNAL.CSTDARG.CSTDDEF.CSTDIO.>CSTDLIB.eCSTRING.CTIME.CWCHAR.CWCTYPE.RCXXL.HXXaCXXL_SHARE.HXXyCXX_EXCEPTION.HDEQUE.DEQUE.CC DEQUE_SPEC.H EXCEPTION.FSTREAM. GENERIC.HIOS.CC[ GENERIC.HXXIOMANIP. IOMANIP.H IOMANIP.HXXIOMANIP_IMPL.HXXIOMANIP_STDIMPL.HXXIOS.IOS.CC*IOSFWD.A IOSTREAM.C IOSTREAM.HE IOSTREAM.HXXHIOSTREAM_IMPL.HXXsIOSTREAM_STDIMPL.HXXISTREAM. ISTREAM.CC ITERATOR.LIMITS.6 LIMITS.CCALIST.LIST.CC LIST_SPEC.HLOCALE.MAP.MEMORY.! MESSAGES.HXXMUTEX.H+ MUTEX.HXX/NEW.?NEW.H)FSTREAM. GENERIC.HLIST.RW_INTERNAL_ALGOBASE.HRW_INTERNAL_EXCEPTION.HRW_INTERNAL_LOC_COLLATE.HRW_INTERNAL_LOC_MONEYPUNCT.H RW_INTERNAL_LOC_NUM_PUT.H RW_INTERNAL_MESSAGES.CC RW_INTERNAL_RELOPS.H STREAM.HWCHAR_OVRLD_IMPL.tLIST.CC LIST_SPEC.HLOCALE.MAP.GMATH_OVRLD_IMPL.MEMORY.! MESSAGES.HXXMUTEX.H+ MUTEX.HXX/NEW.?NEW.HBNEW.HXXR NEWEXT.HXXXNUMERIC.i OBJECTION.Hk OBJECTION.HXXqOSTREAM. OSTREAM.CCQUEUE. RW_CONFIG.HRW_INTERNAL_ALGOBASE.CCRW_INTERNAL_ALGOBASE.HY.H&RW_INTERNAL_AUTOPTR.H4RW_INTERNAL_CAT.H?RW_INTERNAL_CODECVT.CCERW_INTERNAL_CODECVT.HaRW_INTERNAL_ARRAY.H&RW_INTERNAL_AUTOPTR.H4RW_INTERNAL_CAT.H?RW_INTERNAL_CODECVT.CCERW_INTERNAL_CODECVT.H|RW_INTERNAL_COLLATE.CCRW_INTERNAL_COLLATE.HRW_INTERNAL_CONFIG.HRW_INTERNAL_CTYPE.CCRW_INTERNAL_CTYPE.HRW_INTERNAL_DEFS.H@RW_INTERNAL_ERROR.HRW_INTERNAL_EXCEPTION.HRW_INTERNAL_FILE.HRW_INTERNAL_FUNCBASE.HRW_INTERNAL_IOITER.HRW_INTERNAL_IOSBASE.HRW_INTERNAL_ITERATOR.HcRW_INTERNAL_FILE.HRW_INTERNAL_FUNCBASE.HRW_INTERNAL_IOITER.HRW_INTERNAL_IOSBASE.HRW_INTERNAL_ITERATOR.HRW_INTERNAL_ITERBASE.HMRW_INTERNAL_LOCALE.H|RW_INTERNAL_LOC_ACCESS.HRW_INTERNAL_LOC_CODECVT.CCRW_INTERNAL_LOC_CODECVT.HRW_INTERNAL_LOC_COLLATE.CCRW_INTERNAL_LOC_COLLATE.HRW_INTERNAL_LOC_CTYPE.CCRW_INTERNAL_LOC_CTYPE.HRW_INTERNAL_LOC_FACET.H RW_INTERNAL_LOC_ISO2022.HFRW_INTERNAL_LOC_CTYPE.CCRW_INTERNAL_LOC_CTYPE.HRW_INTERNAL_LOC_FACET.H RW_INTERNAL_LOC_ISO2022.H RW_INTERNAL_LOC_LOCALE.H6 RW_INTERNAL_LOC_LOCALEDEF.Hm RW_INTERNAL_LOC_MESSAGES.CCy RW_INTERNAL_LOC_MESSAGES.H RW_INTERNAL_LOC_MONEYPUNCT.CC RW_INTERNAL_LOC_MONEYPUNCT.H RW_INTERNAL_LOC_MONEY_GET.CC RW_INTERNAL_LOC_MONEY_GET.H RW_INTERNAL_LOC_MONEY_PUT.CC RW_INTERNAL_LOC_MONEY_PUT.H RW_INTERNAL_LOC_NUMPUNCT.CCO RW_INTERNAL_LOC_MONEY_GET.CC RW_INTERNAL_LOC_MONEY_GET.H RW_INTERNAL_LOC_MONEY_PUT.CC RW_INTERNAL_LOC_MONEY_PUT.H RW_INTERNAL_LOC_NUMPUNCT.CC RW_INTERNAL_LOC_NUMPUNCT.H RW_INTERNAL_LOC_NUM_GET.CC RW_INTERNAL_LOC_NUM_GET.HRW_INTERNAL_LOC_NUM_PUT.CCC RW_INTERNAL_LOC_NUM_PUT.HT RW_INTERNAL_LOC_PUNCT.CCd RW_INTERNAL_LOC_PUNCT.Hp RW_INTERNAL_LOC_RW_LOCALE.H RW_INTERNAL_LOC_RW_MESSAGES.HLT RW_INTERNAL_LOC_PUNCT.CCd RW_INTERNAL_LOC_PUNCT.Hp RW_INTERNAL_LOC_RW_LOCALE.H RW_INTERNAL_LOC_RW_MESSAGES.H RW_INTERNAL_LOC_RW_SETLOCALE.H RW_INTERNAL_LOC_TIME_GET.CC RW_INTERNAL_LOC_TIME_GET.H RW_INTERNAL_LOC_TIME_PUT.CCWRW_INTERNAL_LOC_TIME_PUT.H RW_INTERNAL_MESSAGES.CC RW_INTERNAL_MESSAGES.H RW_INTERNAL_MONEY.CC# RW_INTERNAL_MONEY.Hb RW_INTERNAL_MUTEX.H RW_INTERNAL_NUMERIC.CC RW_INTERNAL_NUMERIC.Hb RW_INTERNAL_MESSAGES.H RW_INTERNAL_MONEY.CC# RW_INTERNAL_MONEY.Hb RW_INTERNAL_MUTEX.H RW_INTERNAL_NUMERIC.CC RW_INTERNAL_NUMERIC.H RW_INTERNAL_PAIR.H>RW_INTERNAL_PODARRAY.H. RW_INTERNAL_PUNCT.CCr RW_INTERNAL_PUNCT.H RW_INTERNAL_RANDOM.CC RW_INTERNAL_RANDOM.H RW_INTERNAL_RELOPS.H RW_INTERNAL_SPECIALIZED.H RW_INTERNAL_STRREF.H RW_INTERNAL_TIME.CC7 RW_INTERNAL_TIME.H\ RW_INTERNAL_TRAITS.H} RW_INTERNAL_SPECIALIZED.H RW_INTERNAL_STRREF.H RW_INTERNAL_TIME.CC7 RW_INTERNAL_TIME.H\ RW_INTERNAL_TRAITS.Hz RW_INTERNAL_TREE.CC RW_INTERNAL_TREE.H SET.SSTREAM.1 SSTREAM.CCPSTACK.^ STDEXCEPT.j STDIOSTREAM.H STDIOSTREAM.HXXUSTDLIB_OVRLD_IMPL.t STOPWATCH.Hw STOPWATCH.HXXSTREAM.HTREAMBUF.STRING. STRING.CCh STRING.HXX STRSTREAM.  STRSTREAM.H STRSTREAM.HXXk7Ԧ// -*- C++ -*-L/*************************************************************************** *B * algorithm - declarations and inline definitions of the Standard" * Library algorithms *. * $Id: //stdlib/3.0-rel/include/algorithm#2 $ *L *************************************************************************** * > * Copyright 2002 Compaq Information Technologies Group, L.P. *C * Compaq and the Compaq logo are trademarks of Compaq Information@ * Technologies Group, L.P. in the U.S. and/or other countries. *J * Confidential computer software. Valid license from Compaq required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** * * Cop yright (c) 1994 * Hewlett-Packard Company *E * Permission to use, copy, modify, distribute and sell this softwareG * and its documentation for any purpose is hereby granted without fee,D * provided that the above copyright notice appear in all copies andD * that both that copyright notice and this permission notice appearA * in supporting documentation. Hewlett-Packard Company makes noA * representations about the suitability of this software for anyH * purpose. It is provided "as is " without express or implied warranty. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * t ransmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The R ights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/!#ifndef _RWSTD_ALGORITHM_INCLUDED!#define _RWSTD_ALGORITHM_INCLUDED#include #include !#include !#include #include #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif#ifdef _INLINE_RECURSIVE# define _INLINE inline#else# define _INLINE#endif_RWSTD_NAMESPACE (std) { B// 25.1 - Non-modifying sequence operations [lib.alg.nonmodifying]&// 25.1.1 - For Each [lib.alg.foreach],template inline _Function?for_each (_InputIter __first, _InputIter __last, _Function __f){* _RWSTD_ASSERT_RANGE (__first, __last);, for ( ; !(__first == __last); ++__first) __f (*__first); return __f;}// 25.1.2 - Find [lib.alg.find])template inline _InputIterCfind (_InputIter __first, _InputIter __last, const _TypeT& __value){* _RWSTD_ASSERT_RANGE (__first, __last);; while (!(__first == __last) && !(*__first == __value))  ++__first; return __first;}-template inline _InputIterBfind_if (_InputIter __first, _InputIter __last, _Predicate __pred){* _RWSTD_ASSERT_RANGE (__first, __last);6 while (!(__first == __last) && !__pred (*__first)) ++__first; return __first;}5// helpers to work around the lack of iterator_traits<template N_FwdIter1 __find_end (_FwdIter1, _FwdIter1, _FwdIter2, _FwdIter2, _Distance*);,template A_FwdIter1 __find_end (_FwdIter1, _FwdIter1, _FwdIter2, _FwdIter2,4 _BinaryPredicate, _Distance*);'// 25.1.3 - Find End [lib.alg.find.end]+template Ainline _FwdIter1 find_end (_FwdIter1 __first1, _FwdIter1 __last1,A _FwdIter2 __first2, _FwdIter2 __last2){, _RWSTD_ASSERT_RANGE (__first1, __last1);, _RWSTD_ASSERT_RANGE (__first2, __last2);< return __find_end (__first1, __last1, __first2, __last2,; _RWSTD_DIFFERENCE_TYPE (_FwdIter1));}Ctemplate :_FwdIter1 find_end (_FwdIter1 __first1, _FwdIter1 __last1,: _FwdIter2 __first2, _FwdIter2 __last2,, _BinaryPredicate __pred){, _RWSTD_ASSERT_RANGE (__first1, __last1);, _RWSTD_ASSERT_RANGE (__first2, __last2);9 return __find_end (__first1,__last1,__first2,__last2,C __pred, _RWSTD_DIFFERENCE_TYPE (_FwdIter1));}.// 25.1.4 - Find First [lib.alg.find.first.of]+template E_FwdIter1 find_first_of (_FwdIter1, _FwdIter1, _FwdIter2, _FwdIter2);>template C_FwdIter1 find_first_of (_FwdIter1,_FwdIter1, _FwdIter2, _FwdIter2,& _BinaryPred);1// 25.1.5 - Adjacent Find [lib.alg.adjacent.find]template ,_FwdIter adjacent_find (_FwdIter, _FwdIter);1template >_FwdIter adjacent_find (_FwdIter, _FwdIter, _BinaryPredicate);$#ifndef _RWSTD_NO_CLASS_PARTIAL_SPEC!// 25.1.6 - Count [lib.alg.count])template =inline _TYPENAME iterator_traits<_InputIter>::difference_typeDcount (_InputIter __first, _InputIter __last, const _TypeT& __value){* _RWSTD_ASSERT_RANGE (__first, __last);C _TYPENAME iterator_traits<_InputIter>::difference_type __n = 0;, for ( ; !(__first == __last); ++__first) if (*__first == __value) ++__n; return __n;}-template =inline _TYPENAME iterator_traits<_InputIter>::difference_typeCcount_if (_InputIter __first, _InputIter __last, _Predicate __pred){* _RWSTD_ASSERT_RANGE (__first, __last);C _TYPENAME iterator_traits<_InputIter>::difference_type __n = 0;, for ( ; !(__first == __last); ++__first) if (__pred (*__first)) ++__n; return __n;}(#endif // _RWSTD_NO_CLASS_PARTIAL_SPECF// provided as a backward-compatibility extension (or as a workaround)/#if !defined (_RWSTD_NO_EXT_VOID_COUNT) \- || defined (_RWSTD_NO_CLASS_PARTIAL_SPEC)6template 9inline void count (_InputIter __first, _InputIter __last,5 const _TypeT& __value, _Size& __n){* _RWSTD_ASSERT_RANGE (__first, __last);- for ( ; !(__first == __last); ++__first) if (*__first == __value) ++__n;}:template <inline void count_if (_InputIter __first, _InputIter __last,4 _Predicate __pred, _Size& __n){* _RWSTD_ASSERT_RANGE (__first, __last);, for ( ; !(__first == __last); ++__first) if (__pred (*__first)) ++__n;}E#endif // !_RWSTD_NO_EXT_VOID_COUNT || _RWSTD_NO_CLASS_PARTIAL_SPEC#// 25.1.7 - Mismatch [lib.mismatch]!// 25.1.8 - Equal [lib.alg.equal]// defined in <_algobase.h>5// helpers to work around the lack of iterator_traitsOte mplate ?_FwdIter1 __search (_FwdIter1, _FwdIter1, _FwdIter2, _FwdIter2,. _Distance1*, _Distance2*);+template ?_FwdIter1 __search (_FwdIter1, _FwdIter1, _FwdIter2, _FwdIter2,> _BinaryPredicate, Distance1*, Distance2*);#// 25.1.9 - Search [lib.alg.search] // 25.1.9, p1+templa te ?inline _FwdIter1 search (_FwdIter1 __first1, _FwdIter1 __last1,? _FwdIter2 __first2, _FwdIter2 __last2){: return __search (__first1, __last1, __first2, __last2,8 _RWSTD_DIFFERENCE_TYPE (_FwdIter1),9 _RWSTD_DIFFERENCE_TYPE (_FwdIter2));}Ctemplate >inline _FwdIter1 search (_FwdIter1 __first1,_FwdIter1 __last1,> ! _FwdIter2 __first2,_FwdIter2 __last2,1 _BinaryPredicate __pred){B return __search (__first1, __last1, __first2, __last2, __pred,8 _RWSTD_DIFFERENCE_TYPE (_FwdIter1),9 _RWSTD_DIFFERENCE_TYPE (_FwdIter2));}4// helper to work around the lack of iterator_traitsEtemplate K_FwdIter __search_n (_FwdIter, _FwdIter, _Distance*, _Size, const _TypeT&); " Etemplate ;_FwdIter __search_n (_FwdIter, _FwdIter, _Distance*, _Size,6 const _TypeT&, _BinaryPredicate); // 25.1.9, p44template <inline _FwdIter search_n (_FwdIter __first, _FwdIter __last,? _Size __count, const _TypeT& __value){ if (__count) N return __search_n (__first, __last, _RWSTD#_DIFFERENCE_TYPE (_FwdIter),- __count, __value); return __first;}Ltemplate <inline _FwdIter search_n (_FwdIter __first, _FwdIter __last,? _Size __count, const _TypeT& __value,2 _BinaryPredicate __pred){ if (__count) + return __search_n (__first, __last,= _RWSTD_DIFFERENCE_TYPE (_FwdIter),4 $ __count,__value, __pred); return __first;}E// 25.2 - Mutating sequence operations [lib.alg.modifying,operations]// 25.2.1 - Copy [lib.alg.copy]// 25.2.2, p1 swap// defined in <_algobase.h> // 25.2.2, p3+template 8_FwdIter2 swap_ranges (_FwdIter1, _FwdIter1, _FwdIter2);)// 25.2.3 - Transform [lib.alg.transform]Etemplate M_OutputIter transform (_InputI %ter, _InputIter, _OutputIter, _UnaryOperation);Btemplate J_OutputIter transform (_InputIter1, _InputIter1, _InputIter2, _OutputIter,) _BinaryOperation);%// 25.2.4 - Replace [lib.alg.replace]'template @void replace (_FwdIter, _FwdIter, const _TypeT&, const _TypeT&);9template @void replace_if (_&FwdIter, _FwdIter, _Predicate, const _TypeT&);<template >_OutputIter replace_copy (_InputIter, _InputIter, _OutputIter,8 const _TypeT&, const _TypeT&);Itemplate C_OutputIter replace_copy_if (_Iter, _Iter, _OutputIter, _Predicate,, const _TypeT&);// 25.2.5 - Fill [lib.alg.fill]// defined in <_algobase.h>'// 25.2.6 '- Generate [lib.alg.generate]+template /void generate (_FwdIter, _FwdIter, _Generator);;template 1void generate_n (_OutputIter, _Size, _Generator);#// 25.2.7 - Remove [lib.alg.remove]<template =_OutputIter remove_copy (_InputIter, _InputIter, _OutputIter,( const _TypeT&);@template M_OutputIter remove_copy_if (_InputIter, _InputIter, _OutputIter, _Predicate);'template inline _FwdIterAremove (_FwdIter __first, _FwdIter __last, const _TypeT& __value){4 __first = _STD::find (__first, __last, __value); _FwdIter __next = __first; return __first == __last ?I __first : _STD::remove_copy (++__next, __last, __first, __value);}+template Pinline _FwdIter remove_if )(_FwdIter __first, _FwdIter __last, _Predicate __pred){6 __first = _STD::find_if (__first, __last, __pred); _FwdIter __next = __first; return __first == __last ?K __first : _STD::remove_copy_if (++__next, __last, __first, __pred);}+template P_FwdIter __unique_copy (_InputIter, _InputIter, _FwdIter, forward_iterator_tag);-template inline _BidirIterH__unique_copy (_InputIter __first, _Inpu*tIter __last, _BidirIter __res, * bidirectional_iterator_tag){K return __unique_copy (__first, __last, __res, forward_iterator_tag ());}4template inline _RandomAccessIter5__unique_copy (_InputIter __first, _InputIter __last,C _RandomAccessIter __res, random_access_iterator_tag){K return __unique_copy (__first, __last, __res, forward_iterator_tag ());}<template I_OutputIter __unique_copy (_InputIter, _InputIter, _OutputIter, _TypeT*);.template Hinline _OutputIter __unique_copy (_InputIter __first, _InputIter __last,I _OutputIter __res, output_iterator_tag){1 return __unique_copy (__first, __last, __res,: _RWSTD_VALUE_TYPE (_InputIter));}.template inline _OutputIterFunique_copy (_Inpu,tIter __first, _InputIter __last, _OutputIter __res){& return __first == __last ? __res :. __unique_copy (__first, __last, __res,F _RWSTD_ITERATOR_CATEGORY (_OutputIter, __res));}Ctemplate K_FwdIter __unique_copy (_InputIter, _InputIter, _FwdIter, _BinaryPredicate,. forward_iterator_tag);Etemplate inline _ -BidirIterH__unique_copy (_InputIter __first, _InputIter __last, _BidirIter __res, C _BinaryPredicate __pred, bidirectional_iterator_tag){9 return __unique_copy (__first, __last, __res, __pred,3 forward_iterator_tag ());}Ltemplate inline _RandomAccessIterO__unique_copy (_InputIter __first, _InputIter __last, _RandomAccessIter __res, C _BinaryPredicate __pred., random_access_iterator_tag){: return __unique_copy (__first, __last, __res, __pred, 3 forward_iterator_tag ());}Ftemplate ?_OutputIter __unique_copy (_InputIter, _InputIter, _OutputIter,6 _BinaryPredicate, _TypeT*);Ftemplate inline _OutputIterH__unique_copy (_InputIter __first,/ _InputIter __last, _OutputIter __res,< _BinaryPredicate __pred, output_iterator_tag){9 return __unique_copy (__first, __last, __res, __pred,: _RWSTD_VALUE_TYPE (_InputIter));}Ftemplate inline _OutputIterFunique_copy (_InputIter __first, _InputIter __last, _OutputIter __res,% _BinaryPredicate __pred){& return __first == __last ? __res :6 __unique_copy (_0_first, __last, __res, __pred,F _RWSTD_ITERATOR_CATEGORY (_OutputIter, __res));}template :inline _FwdIter unique (_FwdIter __first, _FwdIter __last){4 __first = _STD::adjacent_find (__first, __last);8 return _STD::unique_copy (__first, __last, __first);}1template :inline _FwdIter unique (_FwdIter __first, _FwdIter __last,0 _BinaryPredicate __pred){< __first = _S1TD::adjacent_find (__first, __last, __pred);@ return _STD::unique_copy (__first, __last, __first, __pred);}template Dvoid __reverse (_BidirIter, _BidirIter, bidirectional_iterator_tag);"template Dvoid __reverse (_RandomAccessIter __first, _RandomAccessIter __last,, random_access_iterator_tag);template ;inline void reverse (_BidirIter __first, _BidirIter __last){P __reverse (__first, __last2, _RWSTD_ITERATOR_CATEGORY (_BidirIter, __first));}.template ?_OutputIter reverse_copy (_BidirIter, _BidirIter, _OutputIter);*template Ovoid __rotate (_FwdIter, _FwdIter, _FwdIter, _Distance*, forward_iterator_tag);,template inline voidE__rotate (_BidirIter __first, _BidirIter __middle, _BidirIter __last,1 _Distance*, bidirectional_iterator_tag){& _STD::3reverse (__first, __middle);% _STD::reverse (__middle, __last);$ _STD::reverse (__first, __last);}&template K_EuclideanRingElement __gcd (_EuclideanRingElement, _EuclideanRingElement);Atemplate Mvoid __rotate_cycle (_RandomAccessIter, _RandomAccessIter, _RandomAccessIter,) _Distance, _TypeT*);3template Gvoid __rotate (_Ra4ndomAccessIter, _RandomAccessIter, _RandomAccessIter,7 _Distance*, random_access_iterator_tag);template Iinline void rotate (_FwdIter __first, _FwdIter __middle, _FwdIter __last){5 if (!(__first == __middle || __middle == __last)), __rotate (__first, __middle, __last,4 _RWSTD_DIFFERENCE_TYPE (_FwdIter),@ _RWSTD_ITERATOR_CATEGORY (_FwdIter, __first));},template inli5ne _OutputIterBrotate_copy (_FwdIter __first, _FwdIter __middle, _FwdIter __last, _OutputIter __res){P return _STD::copy (__first, __middle, _STD::copy (__middle, __last, __res));}3template Ivoid __random_shuffle (_RandomAccessIter, _RandomAccessIter, _Distance*);"template 6inline void random_shuffle (_RandomAccessIter __first,5 _RandomAccessIter __last){& __ra6ndom_shuffle (__first, __last,B _RWSTD_DIFFERENCE_TYPE (_RandomAccessIter));}@template :void random_shuffle (_RandomAccessIter, _RandomAccessIter,. _RandomNumberGenerator&);-template :_BidirIter partition (_BidirIter, _BidirIter, _Predicate);>template _BidirIterK__inplace_stable_partition (_Bid 7irIter, _BidirIter, _Predicate, _Distance);=template _BidirIterK__stable_partition_adaptive (_BidirIter, _BidirIter, _Predicate, _Distance,G _Pointer, _Distance, _Distance&, _TypeT*);Ltemplate B_BidirIter __stable_partition (_BidirIter, _BidirIter, _Predicate,4 _TypeT*8, _Distance*);-template inline _BidirIterKstable_partition (_BidirIter __first, _BidirIter __last, _Predicate __pred){7 return __stable_partition (__first, __last, __pred,> _RWSTD_VALUE_TYPE (_BidirIter),D _RWSTD_DIFFERENCE_TYPE (_BidirIter));}"// 25.3.1 - Sorting [lib.alg.sort]@template _RandomAccessIter<__unguarded_9partition (_RandomAccessIter, _RandomAccessIter,) _TypeT, _Compare);@template Avoid __quick_sort_loop_aux (_RandomAccessIter, _RandomAccessIter,/ _TypeT*, _Compare);2template inline voidG__quick_sort_loop (_RandomAccessIter __first, _RandomAccessIter __last,# _Compare __comp){+ __quick_sort_loop_aux (__first, __:last,J _RWSTD_VALUE_TYPE (_RandomAccessIter), __comp);}@template Evoid __unguarded_linear_insert (_RandomAccessIter, _TypeT, _Compare);0template 8inline void __linear_insert (_RandomAccessIter __first, ? _RandomAccessIter __last, _TypeT*){ _TypeT __value = *__last; if (__value < *__first) {: _STD::copy_backward (_;_first, __last, __last + 1); *__first = __value; } else4 __unguarded_linear_insert (__last, __value);}@template inline voidN__linear_insert (_RandomAccessIter __first, _RandomAccessIter __last, _TypeT*,! _Compare __comp){ _TypeT __value = *__last;% if (__comp (__value, *__first)) {: _STD::copy_backward (__first, __last, __last + 1); *__first = __value; <} else; __unguarded_linear_insert(__last, __value, __comp);}2template Gvoid __insertion_sort (_RandomAccessIter, _RandomAccessIter, _Compare);2template inline voidP__unguarded_insertion_sort (_RandomAccessIter __first, _RandomAccessIter __last,, _Compare __comp){* _RWSTD_ASSERT_RANGE (__first, __last);B for (_RandomAccessIter __i = __first; !(__i == _=_last); ++__i)6 __unguarded_linear_insert (__i, *__i, __comp);}Ctemplate <void __introsort_loop (_RandomAccessIter, _RandomAccessIter,, _Distance, _Compare);2template Mvoid __final_insertion_sort (_RandomAccessIter, _RandomAccessIter, _Compare); // 25.3.1.12template inline voidKsort (_RandomAccessIter __firs>t, _RandomAccessIter __last, _Compare __comp){ if (!(__first == __last)) {? // introsort guarantees O(N * log(N)) in the worst caseE __introsort_loop (__first, __last, __last - __first, __comp);9 __final_insertion_sort (__first, __last, __comp); }}"template Finline void sort (_RandomAccessIter __first, _RandomAccessIter __last){B _STD::sort (__first, __last, _RWSTD_LESS (_RandomAccessIter));}<template @void __merge_without_buffer (_BidirIter, _BidirIter, _BidirIter,= _Distance, _Distance, _Compare);2template _INLINE voidK__inplace_stable_sort (_RandomAccessIter __first, _RandomAccessIter __last,' _Compare __comp){ if (__last - __first < 15)3 __insertion_sort (__first, __last, __comp); else {F _RandomAccessIter __middle = __fir @st + (__last - __first) / 2;: __inplace_stable_sort (__first, __middle, __comp);9 __inplace_stable_sort (__middle, __last, __comp);: __merge_without_buffer (__first, __middle, __last,O __middle - __first, __last - __middle, __comp); }}=template @void __merge_sort_loop (_RandomAccessIter1, _RandomAccessIter1, A A_RandomAccessIter2, _Distance, _Compare);Ctemplate Mvoid __chunk_insertion_sort (_RandomAccessIter, _RandomAccessIter, _Distance,' _Compare);Ctemplate Dvoid __merge_sort_with_buffer (_RandomAccessIter, _RandomAccessIter,H _Pointer, _Distance*, _TypeT*, _Compare);Ctemplate B Bvoid __stable_sort_adaptive (_RandomAccessIter, _RandomAccessIter,E _Pointer, _Distance, _TypeT*, _Compare);Atemplate inline voidC__stable_sort (_RandomAccessIter __first, _RandomAccessIter __last,4 _TypeT*, _Distance*, _Compare __comp){J // call an extensi Con of get_temporary_buffer<>() in case partial classI // specialization (and iterator_traits<>) isn't supported by compiler" pair<_TypeT*, _Distance> __p =N _STD::get_temporary_buffer (_Distance (__last - __first), (_TypeT*)0); if (__p.first == 0)8 __inplace_stable_sort (__first, __last, __comp); else {= _Distance __len = (_STD::min)(_Distance (__p.second),D _Distance (__last - __first));- _STD::copy (__first,D __first + __len,I raw_storage_iterator<_TypeT*, _TypeT>(__p.first));G __stable_sort_adaptive (__first, __last, __p.first, __p.second,4 (_TypeT*)0, __comp);9 _RW::__rw_destroy (__p.first, __p.first + __len);2 _STD::return_temporary_buffer (__p.first); }} // 25.3.1.22template Minline void stable_sort (_RandomAccessIter __first, _RandomAccessIter __last,) E _Compare __comp){ if (!(__first == __last))' __stable_sort (__first, __last,= _RWSTD_VALUE_TYPE (_RandomAccessIter),K _RWSTD_DIFFERENCE_TYPE (_RandomAccessIter), __comp);}"template Minline void stable_sort (_RandomAccessIter __first, _RandomAccessIter __last){I _STD::stable_sort (__first, __last, _RWSTD_LESS (_RandomAccessIter));}4// helper to work around the lac Fk of iterator_traits@template :void __partial_sort (_RandomAccessIter, _RandomAccessIter,; _RandomAccessIter, _TypeT*, _Compare); // 25.3.1.32template 4inline void partial_sort (_RandomAccessIter __first,5 _RandomAccessIter __middle,D _RandomAccessIter __last, _Compare __comp){* _RWSTD_ASSERT_RANGE (__first, __last);,G _RWSTD_ASSERT_RANGE (__first, __middle); if (!(__first == __middle))2 __partial_sort (__first, __middle, __last,= _RWSTD_VALUE_TYPE(_RandomAccessIter), __comp);}"template inline voidDpartial_sort (_RandomAccessIter __first, _RandomAccessIter __middle,' _RandomAccessIter __last){2 _STD::partial_sort (__first, __middle, __last,9 _RWSTD_LESS (_RandomAccessHIter));}4// helper to work around the lack of iterator_traitsDtemplate _RandomAccessIter,__partial_sort_copy (_InputIter, _InputIter,: _RandomAccessIter, _RandomAccessIter,4 _Compare, _Distance*, _TypeT*); // 25.3.1.4Dtemplate inline _RandomAccessIter9partial_sort_copy (_InputIte Ir __first, _InputIter __last,1 _RandomAccessIter __res_first,A _RandomAccessIter __res_last, _Compare __comp){, return __first == __last ? __res_first :N __partial_sort_copy (__first, __last, __res_first, __res_last, __comp,H _RWSTD_DIFFERENCE_TYPE (_RandomAccessIter),D _RWSTD_VALUE_TYPE (_RandomAccessIter));}4template inline _RandomAcceJssIter;partial_sort_copy (_InputIter __first1, _InputIter __last1,I _RandomAccessIter __first2, _RandomAccessIter __last2){I return _STD::partial_sort_copy (__first1, __last1, __first2, __last2,> _RWSTD_LESS (_InputIter));}@template 9void __nth_element (_RandomAccessIter, _RandomAccessIter,: _RandomAccessIter, _TypeT*, _Compare);-// 25.3.2 - Nth elemKent [lib.alg.nth.element]2template Linline void nth_element (_RandomAccessIter __first, _RandomAccessIter __nth,C _RandomAccessIter __last, _Compare __comp){ if (!(__first == __last)). __nth_element (__first, __nth, __last,F _RWSTD_VALUE_TYPE (_RandomAccessIter), __comp);}"template Linline void nth_element (_RandomAccessIter __first, _RandomAccessIter __nth,2L _RandomAccessIter __last){P _STD::nth_element (__first, __nth, __last, _RWSTD_LESS (_RandomAccessIter));}1// 25.3.3 - Binary search [lib.alg.binary.search]Htemplate D_FwdIter __lower_bound (_FwdIter, _FwdIter, const _TypeT&, _Compare,: _Distance*, forward_iterator_tag);Htemplate inline _FwdIter1__lowe Mr_bound (_FwdIter __first, _FwdIter __last,B const _TypeT& __value, _Compare __comp, _Distance*,* bidirectional_iterator_tag){; return __lower_bound (__first, __last, __value, __comp,B (_Distance*)0, forward_iterator_tag ());}@template F_RandomAccessIter __lower_bound (_RandomAccessIter, _RandomAccessIter,E const _Ty NpeT&, _Compare, _Distance*,= random_access_iterator_tag); // 25.3.3.17template >inline _FwdIter lower_bound (_FwdIter __first,_FwdIter __last,D const _TypeT& __value, _Compare __comp){; return __lower_bound (__first, __last, __value, __comp,< _RWSTD_DIFFERENCE_TYPE (_FwdIter),H _RWSTD_ITERATOR_CATEGORY (_FwdIter, __first));}O'template inline _FwdIterFlower_bound (_FwdIter __first, _FwdIter __last, const _TypeT& __value){7 return _STD::lower_bound (__first, __last, __value,6 _RWSTD_LESS (_FwdIter));}Htemplate D_FwdIter __upper_bound (_FwdIter, _FwdIter, const _TypeT&, _Compare,: _Distance*, forward_iterator_tag);Htemplate inline _FwdIterH__upper_bound (_FwdIter __first, _FwdIter __last, const _TypeT& __value,G _Compare __comp, _Distance*, bidirectional_iterator_tag){; return __upper_bound (__first, __last, __value, __comp,B (_Distance*)0, forward_iterator_tag ());}@template F_RandomAccessIter __upper_bound (_RandomAccessIter, _RandomAcces QsIter,E const _TypeT&, _Compare, _Distance*,= random_access_iterator_tag); // 25.3.3.27template inline _FwdIter.upper_bound (_FwdIter __first,_FwdIter __last,4 const _TypeT& __value, _Compare __comp){; return __upper_bound (__first, __last, __value, __comp,< _RWSTD_DIFFERENCE_TYPE (_FwdIter),H _RWSTD_ITERATORR_CATEGORY (_FwdIter, __first));}'template inline _FwdIterFupper_bound (_FwdIter __first, _FwdIter __last, const _TypeT& __value){7 return _STD::upper_bound (__first, __last, __value,6 _RWSTD_LESS (_FwdIter));}Htemplate pair<_FwdIter, _FwdIter>1__equal_range (_FwdIter, _FwdIter, const _TypeT&,; _Compare, _Distance*, forward_iterator_Stag);Htemplate inline pair<_FwdIter, _FwdIter>H__equal_range (_FwdIter __first, _FwdIter __last, const _TypeT& __value,G _Compare __comp, _Distance*, bidirectional_iterator_tag){; return __equal_range (__first, __last, __value, __comp,A (_Distance*)0, forward_iterator_tag());}@template *pa Tir<_RandomAccessIter, _RandomAccessIter>4__equal_range (_RandomAccessIter, _RandomAccessIter,P const _TypeT&, _Compare, _Distance*, random_access_iterator_tag); // 25.3.3.37template inline pair<_FwdIter, _FwdIter>/equal_range (_FwdIter __first, _FwdIter __last,4 const _TypeT& __value, _Compare __comp){; return __equal_range (__first, __last, __value, __comp,< _RWSTD_DIFFERENCE_TYPEU (_FwdIter),H _RWSTD_ITERATOR_CATEGORY (_FwdIter, __first));}'template inline pair<_FwdIter, _FwdIter>Fequal_range (_FwdIter __first, _FwdIter __last, const _TypeT& __value){7 return _STD::equal_range (__first, __last, __value,6 _RWSTD_LESS (_FwdIter));} // 25.3.3.47template =inline bool binary_search (_FwdIter __first, _FwdIter __last,B V const _TypeT& __value, _Compare __comp){H _FwdIter __i = _STD::lower_bound (__first, __last, __value, __comp);6 return !(__i == __last) && !__comp(__value, *__i);}'template inline boolHbinary_search (_FwdIter __first, _FwdIter __last, const _TypeT& __value){9 return _STD::binary_search (__first, __last, __value,8 _RWSTD_LESS (_FwdIter));}!// 25.3.4 - Merge [lib.alg.merge]B Wtemplate =_OutputIter merge (_InputIter1 __first1, _InputIter1 __last1,= _InputIter2 __first2, _InputIter2 __last2,7 _OutputIter __res, _Compare __comp);Btemplate =_OutputIter merge (_InputIter1 __first1, _InputIter1 __last1,= _InputIter2 __first2, _InputIter2 __last2,% _OutputXIter __res){D return _STD::merge (__first1, __last1, __first2, __last2, __res,3 _RWSTD_LESS (_InputIter1));}Btemplate _BidirIter3E__merge_backward (_BidirIter1, _BidirIter1, _BidirIter2, _BidirIter2,) _BidirIter3, _Compare);Jtemplate :void __merge_adaptive (_ YBidirIter, _BidirIter, _BidirIter,J _Distance, _Distance, _Pointer, _Distance, _TypeT*,! _Compare);Jtemplate 9void __inplace_merge (_BidirIter, _BidirIter, _BidirIter,5 _Distance*, _TypeT*, _Compare); // 25.3.4, p6+template inline voidJinplace_merge (_BidirIter __first, _BidirIter __middle, _BidirIter __last, Z _Compare __comp){5 if (!(__first == __middle || __middle == __last))3 __inplace_merge (__first, __middle, __last,= _RWSTD_DIFFERENCE_TYPE (_BidirIter),A _RWSTD_VALUE_TYPE (_BidirIter), __comp);} // 25.3.4, p6template inline voidJinplace_merge (_BidirIter __first, _BidirIter __middle, _BidirIter __last){N _STD::inplace_merge (__first, __middle, __last, _RWSTD_LESS (_BidirIter));}/ [// 25.3.5 - Set operations on sorted structures // 25.3.5.1?template Mbool includes (_InputIter1, _InputIter1, _InputIter2, _InputIter2, _Compare);/template @inline bool includes (_InputIter1 __first1, _InputIter1 __last1,@ _InputIter2 __first2, _InputIter2 __last2){@ return _STD::includes (__first1, __last1, __first2, __last2,6 _RWSTD_LESS (\_InputIter1));} // 25.3.5.2Btemplate _OutputIter>set_union (_InputIter1, _InputIter1, _InputIter2, _InputIter2," _OutputIter, _Compare);Btemplate inline _OutputIter5set_union (_InputIter1 __first1, _InputIter1 __last1,H _InputIter2 __first2, _InputIter2 __last2, _OutputIter __res){H return _STD::set_union (__firs]t1, __last1, __first2, __last2, __res,7 _RWSTD_LESS (_InputIter1));} // 25.3.5.3Btemplate _OutputIterEset_intersection (_InputIter1, _InputIter1, _InputIter2, _InputIter2,) _OutputIter, _Compare);Btemplate inline _OutputIter<set_intersection (_InputIter1 __first1, _InputIter1 __last1,O ^ _InputIter2 __first2, _InputIter2 __last2, _OutputIter __res){H return _STD::set_intersection (__first1, __last1, __first2, __last2,E __res, _RWSTD_LESS (_InputIter1));} // 25.3.5.4Ctemplate _OutputIterDset_difference (_InputIter1, _InputIter1, _InputIter2, _InputIter2, ' _OutputIter, _Compare);Btemplate inline _OutputIter:set_difference (_InputIter1 __first1, _InputIter1 __last1,M _InputIter2 __first2, _InputIter2 __last2, _OutputIter __res){F return _STD::set_difference (__first1, __last1, __first2, __last2,C __res, _RWSTD_LESS (_InputIter1));} // 25.3.5.5Btemplate _OutputIterMset_symmetric_difference (_InputIt `er1, _InputIter1, _InputIter2, _InputIter2,1 _OutputIter, _Compare);Btemplate inline _OutputIterDset_symmetric_difference (_InputIter1 __first1, _InputIter1 __last1,D _InputIter2 __first2, _InputIter2 __last2,, _OutputIter __res){= return _STD::set_symmetric_difference (__first1, __last1,= __first2, __last2,Ma __res, _RWSTD_LESS (_InputIter1));}// 25.3.6 - Heap operations4// helper to work around the lack of iterator_traitsAtemplate Mvoid __push_heap (_RandomAccessIter, _Distance, _Distance, _TypeT, _Compare);Ctemplate inline voidA__push_heap (_RandomAccessIter __first, _RandomAccessIter __last,)b _Distance*, _Compare __comp){7 __push_heap (__first, _Distance (__last - __first),0 _Distance (), *__last, __comp);} // 25.3.6.12template Kinline void push_heap (_RandomAccessIter __first, _RandomAccessIter __last,' _Compare __comp){* _RWSTD_ASSERT_RANGE (__first, __last); if (!(__first == __last))' __push_heap (__first, --__last,I _RWSTD_DIFFERcENCE_TYPE (_RandomAccessIter), __comp);} // 25.3.6.1"template Kinline void push_heap (_RandomAccessIter __first, _RandomAccessIter __last){G _STD::push_heap (__first, __last, _RWSTD_LESS (_RandomAccessIter));}Atemplate Ovoid __adjust_heap (_RandomAccessIter, _Distance, _Distance, _TypeT, _Compare);4// helper to work around the lack of iterator_traits@templadte inline void@__pop_heap (_RandomAccessIter __first, _RandomAccessIter __last,N _RandomAccessIter __res, _TypeT __val, _Compare __cmp, _Distance*){ *__res = *__first;) __adjust_heap (__first, _Distance (),? _Distance (__last - __first), __val, __cmp);} // 25.3.6.22template inline voidOpop_heap (_RandomAccessIter __fierst, _RandomAccessIter __last, _Compare __comp){* _RWSTD_ASSERT_RANGE (__first, __last); if (!(__first == __last)) { --__last;= __pop_heap (__first, __last, __last, *__last, __comp,@ _RWSTD_DIFFERENCE_TYPE (_RandomAccessIter)); }} // 25.3.6.2"template Jinline void pop_heap (_RandomAccessIter __first, _RandomAccessIter __last){F _STD::pop_heap (__first, __last, _RWSTD_LESS (_RandomAccessIter));}f@template 7void __make_heap (_RandomAccessIter, _RandomAccessIter,1 _Compare, _TypeT*, _Distance*); // 25.3.6.32template Kinline void make_heap (_RandomAccessIter __first, _RandomAccessIter __last,' _Compare __comp){* _RWSTD_ASSERT_RANGE (__first, __last); if (!(__last - __first < 2))- __make_heap (__fgirst, __last, __comp,; _RWSTD_VALUE_TYPE (_RandomAccessIter),A _RWSTD_DIFFERENCE_TYPE (_RandomAccessIter));} // 25.3.6.3"template Kinline void make_heap (_RandomAccessIter __first, _RandomAccessIter __last){G _STD::make_heap (__first, __last, _RWSTD_LESS (_RandomAccessIter));} // 25.3.6.42template Kinline void sort_heap (_RandomAccessIter __first, _RandomAccessIhter __last,' _Compare __comp){* _RWSTD_ASSERT_RANGE (__first, __last);* for (; __last - __first > 1; --__last)1 _STD::pop_heap (__first, __last, __comp);} // 25.3.6.4"template Kinline void sort_heap (_RandomAccessIter __first, _RandomAccessIter __last){G _STD::sort_heap (__first, __last, _RWSTD_LESS (_RandomAccessIter));}// 25.3.7 - Minimum and maximum // 25.3.7, p7)template 4_FwdIter min_element (_FwdIter, _FwdIter, _Compare);template ?inline _FwdIter min_element (_FwdIter __first, _FwdIter __last){G return _STD::min_element (__first, __last, _RWSTD_LESS (_FwdIter));} // 25.3.7, p9)template 4_FwdIter max_element (_FwdIter, _FwdIter, _Compare);template ?inline _FwdIter max_element (_FwdIter __first, _FwdIter __last){G return _STD::max_element (__first, _j_last, _RWSTD_LESS (_FwdIter));}C// 25.3.9 - Permutation generators [lib.alg.permutation.generators] // 25.3.9, p1+template 9bool next_permutation (_BidirIter, _BidirIter, _Compare);template Dinline bool next_permutation (_BidirIter __first, _BidirIter __last){N return _STD::next_permutation (__first, __last, _RWSTD_LESS (_BidirIter));} // 25.3.9, p3+template 9bool prev_permkutation (_BidirIter, _BidirIter, _Compare);template Dinline bool prev_permutation (_BidirIter __first, _BidirIter __last){N return _STD::prev_permutation (__first, __last, _RWSTD_LESS (_BidirIter));}//!// Modifying sequence operations.// +template inline _FwdIter2Gswap_ranges (_FwdIter1 __first1, _FwdIter1 __last1, _FwdIter2 __first2){, _RWSTD_ASSERT_RANGE (__first1, __last1);: for (; !(__first1 == __llast1); ++__first1, ++__first2)- _STD::iter_swap (__first1, __first2); return __first2;}Etemplate inline _OutputIterDtransform (_InputIter __first, _InputIter __last, _OutputIter __res,& _UnaryOperation __unary_op){* _RWSTD_ASSERT_RANGE (__first, __last);4 for (; !(__first == __last); ++__res, ++__first)' *__res = __unary_op (*__first); return __res;}/template inline _OutputIter5transform (_InputIter1 __first1, _InputIter1 __last1,3 _InputIter2 __first2, _OutputIter __res,( _BinaryOperation __binary_op){, _RWSTD_ASSERT_RANGE (__first1, __last1);C for (; !(__first1 == __last1); ++__res, ++__first1, ++__first2)4 *__res = __binary_op (*__first1, *__first2); return __res;}'template 7inlinne void replace (_FwdIter __first, _FwdIter __last,J const _TypeT& __old_value, const _TypeT& __new_value){* _RWSTD_ASSERT_RANGE (__first, __last);, for (; !(__first == __last); ++__first) $ if (*__first == __old_value)# *__first = __new_value;}9template :inline void replace_if (_FwdIter __first, _FwdIter __last,E _Predicate __pred, const _TypeT& __new_value){*o _RWSTD_ASSERT_RANGE (__first, __last);+ for (; !(__first == __last); ++__first) if (__pred(*__first))# *__first = __new_value;}<template inline _OutputIterGreplace_copy (_InputIter __first, _InputIter __last, _OutputIter __res,C const _TypeT& __old_value, const _TypeT& __new_value){* _RWSTD_ASSERT_RANGE (__first, __last);4 for (; !(__first == __last); ++__first, ++__res)B p *__res = *__first == __old_value ? __new_value : *__first; return __res;}+template Jinline void generate (_FwdIter __first, _FwdIter __last, _Generator __gen){* _RWSTD_ASSERT_RANGE (__first, __last);+ for (; !(__first == __last); ++__first) *__first = __gen ();};template Iinline void generate_n (_OutputIter __first, _Size __n, _Generator __gen){% for (; __n > 0q; --__n, ++__first) *__first = __gen ();}template >inline void __reverse (_BidirIter __first, _BidirIter __last, 2 bidirectional_iterator_tag){I // Complexity: exactly (last - first) / 2 calls to std::iter_swap<>()E for (; !(__first == __last) && !(__first == --__last); ++__first)* _STD::iter_swap (__first, __last);}"template Kinline void __reverse (_RandomAccessIter __first, _RandomAccressIter __last,2 random_access_iterator_tag){I // Complexity: exactly (last - first) / 2 calls to std::iter_swap<>() if (!(__first == __last))- for (; __first < --__last; ++__first). _STD::iter_swap (__first, __last);}.template inline _OutputIterGreverse_copy (_BidirIter __first, _BidirIter __last, _OutputIter __res){* _RWSTD_ASSERT_RANGE (__first, __last);) for (; !(__first == __last); ++__res) *__res = *--__last; return __res;}} // namespace std#undef _INLINEE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif##ifdef _RWSTD_NO_IMPLICIT_INCLUSION# include #endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif%#endif // _RWSTD_ALGORITHM_INCLUDEDwwO(m7Ԧ// -*- C++ -*-L/*************************************************************************** *# * iostream - iostream declarationsC *- * $Id: //stdlib/3.0-rel/include/iostream#2 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 1 uj k7ԦL/*************************************************************************** *L * algorithm.cc - Non-inline definitions for the Standard Library algorithms *1 * $Id: //stdlib/3.0-rel/include/algorithm.cc#2 $ *L *************************************************************************** * B * Copyright 2003, 2007 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Cons vistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** * * Copyright (c) 1994 * Hewlett-Packard Company *E * Permission to use, copy, modify, distribute and sell this softwareG * and its documentation for any purpose is hereby grant wed without fee,D * provided that the above copyright notice appear in all copies andD * that both that copyright notice and this permission notice appearA * in supporting documentation. Hewlett-Packard Company makes noA * representations about the suitability of this software for anyH * purpose. It is provided "as is" without express or implied warranty. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. x All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies y thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CzFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endif#include #include E#if defined(__VMS) && defined(__DECCXX) && !defined({__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) { <template <_FwdIter1 __find_end (_FwdIter1 __first1, _FwdIter1 __last1,< _FwdIter2 __first2, _FwdIter2 __last2,! _Distance*){, _RWSTD_ASSERT_RANGE (__first1, __last1);, _RWSTD_ASSERT_RANGE (__first2, __last2);A _Distance __dist1 = _DISTANCE (__first2, __last2|, _Distance); if (!__dist1) return __last1;A _Distance __dist2 = _DISTANCE (__first1, __last1, _Distance); _FwdIter1 __res = __last1; while (__dist2 >= __dist1) {0 if (equal (__first2, __last2, __first1)) __res = __first1;= __dist2 = _DISTANCE (++__first1, __last1, _Distance); } return __res;}+template <_FwdIter1 __find_end (_F}wdIter1 __first1, _FwdIter1 __last1,< _FwdIter2 __first2, _FwdIter2 __last2,: _BinaryPredicate __pred, _Distance*){, _RWSTD_ASSERT_RANGE (__first1, __last1);, _RWSTD_ASSERT_RANGE (__first2, __last2);A _Distance __dist1 = _DISTANCE (__first2, __last2, _Distance); if (!__dist1) return __last1;A _Distance __dist2 = _DISTANCE (__first1, __last1, _Distance); _FwdIter1 __save = __last1; while (__dist2 >= __~dist1) {> if (_STD::equal (__first2, __last2, __first1, __pred)) __save = __first1;= __dist2 = _DISTANCE (++__first1, __last1, _Distance); } return __save;}+template ?_FwdIter1 find_first_of (_FwdIter1 __first1, _FwdIter1 __last1,? _FwdIter2 __first2, _FwdIter2 __last2){, _RWSTD_ASSERT_RANGE (__first1, __last1);, _RWSTD_ASSERT_RANGE (__first2, __last2); if (__first2 == __last2) return __last1; _FwdIter1 __next = __first1;" while (!(__next == __last1)) {B if (!(_STD::find (__first2, __last2, *__next) == __last2)) return __next; ++__next; } return __last1;}+template ?_FwdIter1 find_first_of (_FwdIter1 __first1, _FwdIter1 __last1,? _FwdIter2 __first2, _FwdIter2 __last2,1 _BinaryPredicate __pred){, _RWSTD_ASSERT_RANGE (__first1, __last1);, _RWSTD_ASSERT_RANGE (__first2, __last2); if (__first2 == __last2) return __last1;E for (_FwdIter1 __next = __first1; !(__next == __last1); ++__next)I for (_FwdIter2 __iter = __first2; !(__iter == __last2); ++__iter)* if (__pred (*__next, *__iter)) return __next; return __last1;}template :_FwdIter adjacent_find (_FwdIter __first, _FwdIter __last){* _RWSTD_ASSERT_RANGE (__first, __last);) if (__first == __last) return __last; _FwdIter __next = __first;# while (!(++__next == __last)) {0 if (*__first == *__next) return __first; __first = __next; } return __last;}1template :_FwdIter adjacent_find (_FwdIter __first, _FwdIter __last,0 _BinaryPredicate __pred){* _RWSTD_ASSERT_RANGE (__first, __last);) if (__first == __last) return __last; _FwdIter __next = __first;# while (!(++__next == __last)) {' if (__pred (*__first, *__next)) return __first; __first = __next; } return __last;}+template :_FwdIter1 __search (_FwdIter1 __first1, _FwdIter1 __last1,: _FwdIter2 __first2, _FwdIter2 __last2,- _Distance1*, _Distance2*){,  _RWSTD_ASSERT_RANGE (__first1, __last1);, _RWSTD_ASSERT_RANGE (__first2, __last2);C _Distance1 __dist1 = _DISTANCE (__first1, __last1, _Distance1);C _Distance2 __dist2 = _DISTANCE (__first2, __last2, _Distance2);* if (__dist1 < __dist2) return __last1; _FwdIter1 __cur1 = __first1; _FwdIter2 __cur2 = __first2;" while (!(__cur2 == __last2)) {$ if (!(*__cur1 == *__cur2)) { ++__cur1; ++__cur2;% if (__dist1-- == __dist2) return __last1; else {$ __cur1 = ++__first1;" __cur2 = __first2; } } else { ++__cur1; ++__cur2; } }4 return (__cur2 == __last2) ? __first1 : __last1;}+template :_FwdIter1 __search (_FwdIter1 __first1, _FwdIter1 __last1,: _FwdIter2 __first2, _FwdIter2 __last2,F _BinaryPredicate __pred, _Distance1*, _Distance2*){, _RWSTD_ASSERT_RANGE (__first1, __last1);, _RWSTD_ASSERT_RANGE (__first2, __last2);C _Distance1 __dist1 = _DISTANCE (__first1, __last1, _Distance1);C _Distance2 __dist2 = _DISTANCE (__first2, __last2, _Distance2);* if (__dist1 < __dist2) return __last1; _FwdIter1 __cur1 = __first1; _FwdIter2 __cur2 = __first2;" while (!(__cur2 == __last2)) {) if (!__pred (*__cur1, *__cur2)) { ++__cur1; ++__cur2;% if (__dist1-- == __dist2) return __last1; else {$ __cur1 = ++__first1;" __cur2 = __first2; } } else { ++__cur1; ++__cur2; } }4 return (__cur2 == __last2) ? __first1 : __last1;}Etemplate 7_FwdIter __search_n (_FwdIter __first, _FwdIter __last,D _Distance*, _Size __count, const _TypeT& __val){* _RWSTD_ASSERT_RANGE (__first, __last);> _Distance __dist = _DISTANCE (__first, __last, _Distance);8 if (__dist < __count || __count <= 0) return __last;2 _Distance __span = __dist - __count;# _Size __matches = 0;) _FwdIter __current = __first;$ while (!(__current == __last)) {% if (!(*__current == __val)) {' if (__span < __matches + 1) return __last;& __span -= __matches + 1; __matches = 0;$ __first = ++__current; } else {' if (++__matches == __count) return __first; ++__current; } } return __last;}Etemplate 7_FwdIter __search_n (_FwdIter __first, _FwdIter __last,D _Distance*, _Size __count, const _TypeT& __val,- _BinaryPredicate __pred){* _RWSTD_ASSERT_RANGE (__first, __last);> _Distance __dist = _DISTANCE (__first, __last, _Distance);8 if (__dist < __count || __count <= 0) return __last;2 _Distance __span = __dist - __count;# _Size __matches = 0;! _FwdIter __current = __first;$ while (!(__current == __last)) {* if (!__pred (*__current, __val)) {' if (__span < __matches + 1) return __last;& __span -= __matches + 1; __matches = 0;$ __first = ++__current; } else {' if (++__matches == __count) return __first; ++__current; } } return __last;}//!// Modifying sequence operations.//Itemplate 9_OutputIter replace_copy_if (_Iter __first, _Iter __last,B _OutputIter __res, _Predicate __pred,7 const _TypeT& __new_value){* _RWSTD_ASSERT_RANGE (__first, __last);4 for (; !(__first == __last); ++__res, ++__first) if (__pred (*__first))! *__res = __new_value; else *__res = *__first; return __res;}<template ?_OutputIter remove_copy (_InputIter __first, _InputIter __last,@ _OutputIter __res, const _TypeT& __val){* _RWSTD_ASSERT_RANGE (__first, __last);+ for (; !(__first == __last); ++__first)# if (!(*__first == __val)) { *__res = *__first; ++__res; } return __res;}@template B_OutputIter remove_copy_if (_InputIter __first, _InputIter __last,A _OutputIter __res, _Predicate __pred){* _RWSTD_ASSERT_RANGE (__first, __last);+ for (; !(__first == __last); ++__first)! if (!__pred (*__first)) { *__res = *__first; ++__res; } return __res;}+template >_FwdIter __unique_copy (_InputIter __first, _InputIter __last,= _FwdIter __res, forward_iterator_tag){* _RWSTD_ASSERT_RANGE (__first, __last); *__res = *__first;" while (!(++__first == __last))" if (!(*__res == *__first)) *++__res = *__first; return ++__res;}<template A_OutputIter __unique_copy (_InputIter __first, _InputIter __last,6 _OutputIter __res, _TypeT*){* _RWSTD_ASSERT_RANGE (__first, __last); _TypeT __val = *__first; *__res = __val;$ while (!(++__first == __last)) {# if (!(__val == *__first)) { __val = *__first; *++__res = __val; } } return ++__res;}Ctemplate >_FwdIter __unique_copy (_InputIter __first, _InputIter __last,' _FwdIter __res,0 _BinaryPredicate __pred,- forward_iterator_tag){* _RWSTD_ASSERT_RANGE (__first, __last); *__res = *__first;" while (!(++__first == __last))' if (!__pred (*__res, *__first)) *++__res = *__first; return ++__res;}Ftemplate A_OutputIter __unique_copy (_InputIter __first, _InputIter __last,- _OutputIter __res,< _BinaryPredicate __pred, _TypeT*){* _RWSTD_ASSERT_RANGE (__first, __last); _TypeT __val = *__first; *__res = __val;% while (!(++__first == __last)) {* if (!__pred (__val, *__first)) { __val = *__first; *++__res = __val; } } return ++__res;}*template 3void __rotate (_FwdIter __first, _FwdIter __middle,A _FwdIter __last, _Distance*, forward_iterator_tag){8 _RWSTD_ASSERT_IN_RANGE (__middle, __first, __last);  _FwdIter __i = __middle; for (; ; ) {' _STD::iter_swap (__first, __i); ++__first; ++__i;  if (__first == __middle) {& if (__i == __last) return; __middle = __i; } else if (__i == __last) __i = __middle; }}&template 7_EuclideanRingElement __gcd (_EuclideanRingElement __m,7 _EuclideanRingElement __n){0 while (!(__n == _EuclideanRingElement ())) {. _EuclideanRingElement __r = __m % __n; __m = __n; __n = __r; } return __m;}Atemplate Ivoid __rotate_cycle (_RandomAccessIter __first, _RandomAccessIter __last,M _RandomAccessIter __initial, _Distance __shift, _TypeT*){* _RWSTD_ASSERT_RANGE (__first, __last); _TypeT __val = *__initial;) _RandomAccessIter __ptr1 = __initial;0 _RandomAccessIter __ptr2 = __ptr1 + __shift;" while (!(__ptr2 == __initial)) { *__ptr1 = *__ptr2; __ptr1 = __ptr2;& if (__last - __ptr2 > __shift) __ptr2 += __shift; else= __ptr2 = __first + (__shift - (__last - __ptr2)); } *__ptr1 = __val;}3template Evoid __rotate (_RandomAccessIter __first, _RandomAccessIter __middle,4 _RandomAccessIter __last, _Distance*,* random_access_iterator_tag){7 _RWSTD_ASSERT_IN_RANGE (__middle, __first, __last); A _Distance __n = __gcd (__last - __first, __middle - __first); while (__n--)K __rotate_cycle (__first, __last, __first + __n, __middle - __first,> _RWSTD_VALUE_TYPE (_RandomAccessIter));}3template Kvoid __random_shuffle (_RandomAccessIter __first, _RandomAccessIter __last, _Distance*){* _RWSTD_ASSERT_RANGE (__first, __last); if (!(__first == __last))C for (_RandomAccessIter __i = __first + 1; !(__i == __last); ++__i) _STD::iter_swap (__i,M __first + _RW::__rw_random (__i - __first + 1));}@template Ivoid random_shuffle (_RandomAccessIter __first, _RandomAccessIter __last,4 _RandomNumberGenerator& __rand){* _RWSTD_ASSERT_RANGE (__first, __last); if (! (__first == __last))J for (_RandomAccessIter __i = __first + 1; !(__i == __last); ++__i)J _STD::iter_swap (__i, __first + __rand ((__i - __first) + 1));}-template <_BidirIter partition (_BidirIter __first, _BidirIter __last,( _Predicate __pred){* _RWSTD_ASSERT_RANGE (__first, __last); while (true) { while (true) {" if (__first == __last) return __first;' else if (__pred (*__first)) ++__first; else break; } --__last; while (true) {" if (__first == __last) return __first;' else if (!__pred (*__last)) --__last; else break; }* _STD::iter_swap (__first, __last); ++__first; }}>template M_BidirIter __inplace_stable_partition (_BidirIter __first, _BidirIter __last,K _Predicate __pred, _Distance __dist){* _RWSTD_ASSERT_RANGE (__first, __last);A if (__dist == 1) return __pred (*__first) ? __last : __first;" _BidirIter __middle = __first;) _STD::advance (__middle, __dist / 2); _BidirIterL __first_cut = __inplace_stable_partition (__first, __middle, __pred,> __dist / 2); _BidirIterL __second_cut = __inplace_stable_partition (__middle, __last, __pred, F __dist - __dist / 2);7 _STD::rotate (__first_cut, __middle, __second_cut);; __dist = _DISTANCE (__middle, __second_cut, _Distance);( _STD::advance (__first_cut, __dist); return __first_cut;}=template N_BidirIter __stable_partition_adaptive (_BidirIter __first, _BidirIter __last,L _Predicate __pred, _Distance __dist,7 _Pointer __buf,= _Distance __buf_size,K _Distance& __fill_pointer, _TypeT*){* _RWSTD_ASSERT_RANGE (__first, __last); if (__dist <= __buf_size) { __dist = 0;$ _BidirIter __res1 = __first; _Pointer __res2 = __buf;J for (; !(__first == __last) && __dist < __fill_pointer; ++__first) {$ if (__pred (*__first)) {# *__res1 = *__first; ++__res1; } else {# *__res2 = *__first; ++__res2; ++__dist; } }! if (!(__first == __last)) {C raw_storage_iterator<_Pointer, _TypeT> __res3 (__res2);3 for (; !(__first == __last); ++__first) {( if (__pred (*__first)) {' *__res1 = *__first; ++__res1; } else {' *__res3 = *__first; ++__res3; ++__dist; } }$ __fill_pointer = __dist; }3 _STD::copy (__buf, __buf + __dist, __res1); return __res1; }" _BidirIter __middle = __first;) _STD::advance (__middle, __dist / 2);A // (__dist / 2)'s type may not be the same as that o f __dist,0 // hence the seemingly redundant casts below _BidirIter __first_cut =? __stable_partition_adaptive (__first, __middle, __pred,< _Distance (__dist / 2),7 __buf, __buf_size,A __fill_pointer, (_TypeT*)0); _BidirIter __second_cut => __stable_partition_adaptive (__middle, __last, __pred,E _Distance (__dist - __dist / 2),7 __buf, __buf_size,A __fill_pointer, (_TypeT*)0);7 _STD::rotate (__first_cut, __middle, __second_cut);; __dist = _DISTANCE (__middle, __second_cut, _Distance);( _STD::advance (__first_cut, __dist); return __first_cut;}Ltemplate E_BidirIter __stable_partition (_BidirIter __first, _BidirIter __last,F  _Predicate __pred, _TypeT*, _Distance*){* _RWSTD_ASSERT_RANGE (__first, __last);> _Distance __dist = _DISTANCE (__first, __last, _Distance); if (!__dist) return __last; J // call an extension of get_temporary_buffer<>() in case partial classI // specialization (and iterator_traits<>) isn't supported by compiler% pair<_TypeT*, _Distance> __pair =8 _STD::get_temporary_buffer (__dist, (_TypeT*)0); if (__pair.first == 0)L return __inplace_stable_partition (__first, __last, __pred, __dist);! _Distance __fill_pointer = 0; _BidirIter __res =E __stable_partition_adaptive (__first, __last, __pred, __dist,A __pair.first, __pair.second,A __fill_pointer, (_TypeT*)0);D _RW::__rw_destroy (__pair.first, __pair.first + __fill_pointer);1 _STD::return_temporary_buffer (__pair.first); return __res;}//"// Sorting and related operations.//@template C_RandomAccessIter __unguarded_partition (_RandomAccessIter __first,B _RandomAccessIter __last,I _TypeT __pivot, _Compare __comp){* _RWSTD_ASSERT_RANGE (__first, __last); while (true) {* while (__comp (*__first, __pivot)) ++__first;+ while (__comp (__pivot, *--__last)) ; if (!(__first < __last)) return __first;* _STD::iter_swap (__first, __last); ++__first; }}'template Dinline const _TypeT& __median (const _TypeT& __a, const _TypeT& __b,B const _TypeT& __c, _Compare __comp){ return __comp (__a, __b)A ? __comp (__b, __c) ? __b : __comp (__a, __c) ? __c : __aB : __comp (__a, __c) ? __a : __comp (__b, __c) ? __c : __b;}const int __stl_threshold = 16;@template 6void __quick_sort_loop_aux (_RandomAccessIter __first,> _RandomAccessIter __last, _TypeT*,, _Compare __comp){* _RWSTD_ASSERT_RANGE (__first, __last);. while (__last - __first > __stl_threshold) {! _RandomAccessIter __cut =3 __unguarded_partition (__first, __last,> _Type T (__median (*__first,A * (__first +N (__last - __first)/2),D * (__last - 1),> __comp)), __comp);0 if (__cut - __first >= __last - __cut) {1 __quick_sort_loop_aux (__cut, __last,I _RWSTD_VALUE_TYPE (_RandomAccessIter),+ __comp); __last = __cut; } else {2 __quick_sort_loop_aux (__first, __cut,I _RWSTD_VALUE_TYPE (_RandomAccessIter),+ __comp); __first = __cut; } }}2template 1void __insertion_sort (_RandomAccessIter __first,A _RandomAccessIter __last, _Compare __comp){* _RWSTD_ASSERT_RANGE (__first, __last); if (! (__first == __last))J for (_RandomAccessIter __i = __first + 1; !(__i == __last); ++__i)* __linear_insert (__first, __i,L _RWSTD_VALUE_TYPE (_RandomAccessIter), __comp);}@template Gvoid __unguarded_linear_insert (_RandomAccessIter __last, _TypeT __val,0 _Compare __comp){J for (_RandomAccessIter __next = __last; __comp (__val, *--__next); ) { *__last = *__next; __last = __next; } *__last = __val;}2template 7void __final_insertion_sort (_RandomAccessIter __first,G _RandomAccessIter __last, _Compare __comp){* _RWSTD_ASSERT_RANGE (__first, __last);+ if (__last - __first > __stl_threshold) {F __insertion_sort (__first, __first + __stl_threshold, __comp);F __unguarded_insertion_sort (__first + __stl_threshold, __last,, __comp); } else3 __insertion_sort (__first, __last, __comp);}=template 3void __merge_sort_loop (_RandomAccessIter1 __first,2 _RandomAccessIter1 __last,C _RandomAccessIter2 __res, _Distance __step,( _Compare __comp){* _RWSTD_ASSERT_RANGE (__first, __last);& _Distance __two_step = 2 * __step;, while (__last - __first >= __two_step) {7 __res = _STD::merge (__first, __first + __step,K __first + __step, __first + __two_step, __res,% __comp); __first += __two_step; }? __step = (_STD::min)(_Distance (__last - __first), __step);E _STD::merge (__first, __first + __step, __first + __step, __last,  __res, __comp);}Ctemplate 7void __chunk_insertion_sort (_RandomAccessIter __first,6 _RandomAccessIter __last,E _Distance __chunk_size, _Compare __comp){* _RWSTD_ASSERT_RANGE (__first, __last);, while (__last - __first >= __chunk_size) {C __insertion_sort (__first, __first + __chunk_size, __comp); __first += __chunk_size; }/ __insertion_sort (__first, __last, __comp);}Ctemplate 9void __merge_sort_with_buffer (_RandomAccessIter __first,H _RandomAccessIter __last, _Pointer __buf,D _Distance*, _TypeT*, _Compare __comp){* _RWSTD_ASSERT_RANGE (__first, __last);( _Distance __dist = __last - __first;) _Pointer __buf_last = __buf + __dist;# const int __stl_chunk_size = 7;( _Distance __step = __stl_chunk_size;= __chunk_insertion_sort (__first, __last, __step, __comp); while (__step < __dist) {C __merge_sort_loop (__first, __last, __buf, __step, __comp); __step *= 2;> __merge_sort_loop (__buf, __buf_last, __first, __step,# __comp); __step *= 2; }}Ctemplate 7void __stable_sort_adaptive (_RandomAccessIter __first,F _RandomAccessIter __last, _Pointer __buf,; _Distance __buf_size, _TypeT*,- _Compare __comp){* _RWSTD_ASSERT_RANGE (__first, __last);2 _Distance __dist = (__last - __first + 1) / 2;2 _RandomAccessIter __middle = __first + __dist; if (__dist > __buf_size) {E __stable_sort_adaptive (__first, __middl e, __buf, __buf_size,4 (_TypeT*)0, __comp);D __stable_sort_adaptive (__middle, __last, __buf, __buf_size,4 (_TypeT*)0, __comp); } else {; __merge_sort_with_buffer (__first, __middle, __buf,D (_Distance*)0, (_TypeT*)0, __comp);: __merge_sort_with_buffer (__middle, __last, __buf,D (_Distance*)0, (_TypeT*)0, __comp); }0 __merge_adaptive (__first, __middle, __last,5 _Distance (__middle - __first),F _Distance (__last - __middle), __buf, __buf_size,* (_TypeT*)0, __comp);}@template Kvoid __partial_sort (_RandomAccessIter __first, _RandomAccessIter __middle,H _RandomAccessIter __last, _TypeT*, _Compare __comp){7 _RWSTD_ASSERT_IN_RANGE (__middle, __first, __last);0 _STD::make_heap (__first, __middle, __comp);? for (_RandomAccessIter __i = __middle; __i < __last; ++__i)$ if (__comp (*__i, *__first))= __pop_heap (__first, __middle, __i, *__i, __comp,D _RWSTD_DIFFERENCE_TYPE (_RandomAccessIter));0 _STD::sort_heap (__first, __middle, __comp);}Dtemplate :_RandomAccessIter __partial_sort_copy (_InputIter __first,9 _InputIter __last,B _RandomAccessIter __first2,A _RandomAccessIter __last2,7 _Compare __comp,; _Distance*, _TypeT*){* _RWSTD_ASSERT_RANGE (__first, __last);, _RWSTD_ASSERT_RANGE (__first2, __last2);, if (__first2 == __last2) return __last2;' _RandomAccessIter __res = __first2;7 for (; !(__first == __last) && !(__res == __last2); ++__first, ++__res) *__res = *__first;. _STD::make_heap (__first2, __res, __comp);+ for (; !(__first == __last); ++__first) {) if (__comp (*__first, *__first2))P __adjust_heap (__first2, _Distance (), _Distance (__res - __first2),- *__first, __comp); }. _STD::sort_heap (__first2, __res, __comp); return __res;}4// David R. Musser's Intro spective Sorting algorithm/// (see www.cs.rpi.edu/~musser/gp/introsort.ps)'// O(N * log (N)) worst case complexityCtemplate Kvoid __introsort_loop (_RandomAccessIter __first, _RandomAccessIter __last,> _Distance __max_depth, _Compare __comp){!#ifdef __RW_FIX_APACHE_STDCXX_3973 for ( ; __stl_threshold < __last - __first; ) {#elseB for (; __last - __first > __stl_threshold; __max_depth /= 2) {#end if if (0 == __max_depth) {4 __partial_sort (__first, __last, __last,K _RWSTD_VALUE_TYPE (_RandomAccessIter), __comp); break; }! _RandomAccessIter __cut =3 __unguarded_partition (__first, __last,6 __median (*__first,P *(__first + (__last - __first) /2),M *(__last - 1), __comp), __comp);G // limit the depth of the recursion tree to log2 (last - first)L // where first and last are the initial values passed in from sort()!#ifdef __RW_FIX_APACHE_STDCXX_397C __introsort_loop (__cut, __last, __max_depth /= 2, __comp);#else> __introsort_loop (__cut, __last, __max_depth, __comp);#endif __last = __cut; }}@template Gvoid __nth_element (_RandomAccessIter __first, _Rand omAccessIter __nth,G _RandomAccessIter __last, _TypeT*, _Compare __comp){4 _RWSTD_ASSERT_IN_RANGE (__nth, __first, __last); while (__last - __first > 3) {! _RandomAccessIter __cut =3 __unguarded_partition (__first, __last,> _TypeT (__median (*__first,A * (__first +N (__last - __first)/2),D  * (__last - 1),> __comp)), __comp); if (!(__nth < __cut)) __first = __cut; else __last = __cut; }/ __insertion_sort (__first, __last, __comp);}//// Binary search.//Htemplate :_FwdIter __lower_bound (_FwdIter __first, _FwdIter __last,=  const _TypeT& __val, _Compare __comp,9 _Distance*, forward_iterator_tag){* _RWSTD_ASSERT_RANGE (__first, __last); > _Distance __dist = _DISTANCE (__first, __last, _Distance); _Distance __half; _FwdIter __middle; while (__dist > 0) { __half = __dist / 2; __middle = __first;) _STD::advance (__middle, __half);& if (__comp (*__middle, __val)) { __first = __middle; ++__first;) __dist = __dist - __half - 1; } else __dist = __half; } return __first;}@template ;_RandomAccessIter __lower_bound (_RandomAccessIter __first,: _RandomAccessIter __last,5 const _TypeT& __val,1 _Compare __comp,, _Distance*,< random_access_iterator_tag){* _RWSTD_ASSERT_RANGE (__first, __last);( _Distance __dist = __last - __first; _Distance __half; _RandomAccessIter __middle; while (__dist > 0) { __half = __dist / 2;$ __middle = __first + __half;& if (__comp (*__middle, __val)) {# __first = __middle + 1;) __dist = __dist - __half - 1; } else __dist = __half; } return __first;}Htemplate :_FwdIter __upper_bound (_FwdIter __first, _FwdIter __last,= const _TypeT& __val, _Compare __comp,9 _Distance*, forward_iterator_tag){* _RWSTD_ASSERT_RANGE (__first, __last);> _Distance __dist = _DISTANCE (__first, __last, _Distance); _Distance __half; _FwdIter __middle; while (__dist > 0) { __half = __dist / 2; __middle = __first;) _STD::advance (__middle, __half);& if (__comp (__val, *__middle)) __dist = __half; else { __first = __middle; ++__first;) __dist = __dist - __half - 1; } } return __first;}@template ;_RandomAccessIter __upper_bound (_RandomAccessIter __first,:  _RandomAccessIter __last,5 const _TypeT& __val,= _Compare __comp, _Distance*,< random_access_iterator_tag){* _RWSTD_ASSERT_RANGE (__first, __last);( _Distance __dist = __last - __first; _Distance __half; _RandomAccessIter __middle; while (__dist > 0) { __half = __dist / 2;$ __middle = __first + __half;& if (__comp (__val, *__middle)) __dist = __half; else {# __first = __middle + 1;) __dist = __dist - __half - 1; } } return __first;}Htemplate pair<_FwdIter, _FwdIter>F__equal_range (_FwdIter __first, _FwdIter __last, const _TypeT& __val,A _Compare __comp, _Distance*, forward_iterator_tag){* _RWSTD_ASSERT_RANGE (__first, __last);> _Distance __dist = _DISTANCE (__first, __last, _Distance); _Distance __half;' _FwdIter __middle, __left, __right; while (__dist > 0) { __half = __dist / 2; __middle = __first;) _STD::advance (__middle, __half);& if (__comp (*__middle, __val)) { __first = __middle; ++__first;) __dist = __dist - __half - 1; }+ else if (__comp (__val, *__middle)) __dist = __half; else {J  __left = _STD::lower_bound (__first, __middle, __val, __comp);, _STD::advance (__first, __dist);M __right = _STD::upper_bound (++__middle, __first, __val, __comp);= pair<_FwdIter, _FwdIter> __tmp (__left, __right); return __tmp; } }6 pair<_FwdIter, _FwdIter> __tmp (__first, __first); return __tmp;}@template *pair<_RandomAccessIter, _RandomAccessIter>C__equal_range (_RandomAccessIter __first, _RandomAccessIter __last,@ const _TypeT& __val, _Compare __comp, _Distance*,* random_access_iterator_tag){* _RWSTD_ASSERT_RANGE (__first, __last);( _Distance __dist = __last - __first; _Distance __half;0 _RandomAccessIter __middle, __left, __right; while (__dist > 0) { __half = __dist / 2;$ __middle = __first + __half;& if (__comp (*__middle, __val)) {# __first = __middle + 1;) __dist = __dist - __half - 1; }+ else if (__comp (__val, *__middle)) __dist = __half; else {K __left = _STD::lower_bound (__first, __middle, __val, __comp);F __right = _STD::upper_bound (++__middle, __first + __dist,8 __val, __comp);N pair<_RandomAccessIter, _RandomAccessIter> __tmp(__left, __right);  return __tmp; } }H pair<_RandomAccessIter, _RandomAccessIter> __tmp (__first, __first); return __tmp;}//// Merge//Btemplate =_OutputIter merge (_InputIter1 __first1, _InputIter1 __last1,= _InputIter2 __first2, _InputIter2 __last2,6 _OutputIter __res, _Compare __comp){, _RWSTD_ASSERT_RANGE (__first1, __last1);, _RWSTD_ASSERT_RANGE (__first2, __last2);E for (; !(__first1 == __last1) && !(__first2 == __last2); ++__res) {, if (__comp (*__first2, *__first1)) { *__res = *__first2; ++__first2; } else { *__res = *__first1; ++__first1; } }P return _STD::copy (__first2, __last2, _STD::copy(__first1, __last1, __res));}<template 0void __merge_without_buffer (_BidirIter __first,1 _BidirIter __middle,/ _BidirIter __last,B _Distance __dist1, _Distance __dist2,- _Compare __comp){7 _RWSTD_ASSERT_IN_RANGE (__middle, __first, __last);- if (__dist1 == 0 || __dist2 == 0) return; if (__dist1 + __dist2 == 2) {) if (__comp (*__middle, *__first))0 _STD::iter_swap (__first, __middle); return; }% _BidirIter __first_cut = __first;' _BidirIter __second_cut = __middle; _Distance __dist11; _Distance __dist22; if (__dist1 > __dist2) { __dist11 = __dist1 / 2;. _STD::advance (__first_cut, __dist11);; __second_cut = _STD::lower_bound (__middle, __last,@ *__first_cut, __comp);A __dist22 = _DISTANCE (__middle, __second_cut, _Distance); } else { __dist22 = __dist2 / 2;/ _STD::advance (__second_cut, __dist22);; __first_cut = _STD::upper_bound (__first, __middle,C *__second_cut, __comp);? __dist11 = _DISTANCE (__first, __first_cut, _Distance); }7 _STD::rotate (__first_cut, __middle, __second_cut);' _BidirIter __middle2 = __first_cut;( _STD::advance (__middle2, __dist22);< __merge_without_buffer (__first, __first_cut, __middle2,8 __dist11, __dist22, __comp);< __merge_without_buffer (__middle2, __second_cut, __last,L __dist1 - __dist11, __dist2 - __dist22, __comp);}@template 3_BidirIter1 __rotate_adaptive (_BidirIter1 __first,4 _BidirIter1 __middle,2 _BidirIter1 __last,D _Distance __dist1, _Distance __dist2,1 _BidirIter2 __buf,4  _Distance __buf_size){7 _RWSTD_ASSERT_IN_RANGE (__middle, __first, __last); _BidirIter2 __buf_end;3 if (__dist1 > __dist2 && __dist2 <= __buf_size) {9 __buf_end = _STD::copy (__middle, __last, __buf);8 _STD::copy_backward (__first, __middle, __last);6 return _STD::copy (__buf, __buf_end, __first); }# else if (__dist1 <= __buf_size) {: __buf_end = _STD::copy (__first, __middle, __buf);/ _STD::copy (__middle, __last, __first);> return _STD::copy_backward (__buf, __buf_end, __last); } else {1 _STD::rotate (__first, __middle, __last);) _STD::advance (__first, __dist2); return __first; }}/template 3_BidirIter3 __merge_backward (_BidirIter1 __first1,2 _BidirIter1 __last1,3 _BidirIter2 __first2,2  _BidirIter2 __last2,0 _BidirIter3 __res){, _RWSTD_ASSERT_RANGE (__first1, __last1);, _RWSTD_ASSERT_RANGE (__first2, __last2); if (__first1 == __last1)> return _STD::copy_backward (__first2, __last2, __res); if (__first2 == __last2)> return _STD::copy_backward (__first1, __last1, __res); --__last1; --__last2; while (true) { if (*__last2 < *__last1) { *--__res = *__last1;$ if (__first1 == __last1)H return _STD::copy_backward (__first2, ++__last2, __res); --__last1; } else { *--__res = *__last2;$ if (__first2 == __last2)H return _STD::copy_backward (__first1, ++__last1, __res); --__last2; } }}/template 3_BidirIter3 __merge_backward (_BidirIter1 __first1,2 _BidirIter1 __last1,3 _BidirIter2 __first2,2 _BidirIter2 __last2,0 _BidirIter3 __res,. _Compare __comp){, _RWSTD_ASSERT_RANGE (__first1, __last1);, _RWSTD_ASSERT_RANGE (__first2, __last2); if (__first1 == __last1)> return _STD::copy_backward (__first2, __last2, __res); if (__first2 == __last2)>  return _STD::copy_backward (__first1, __last1, __res); --__last1; --__last2; while (true) {( if (__comp (*__last2, *__last1)) { *--__res = *__last1;$ if (__first1 == __last1)H return _STD::copy_backward (__first2, ++__last2, __res); --__last1; } else { *--__res = *__last2;$ if (__first2 == __last2)H return _STD::copy_backward (__first1, ++__last1, __res); --__last2; } }}Jtemplate ?void __merge_adaptive (_BidirIter __first, _BidirIter __middle,) _BidirIter __last,< _Distance __dist1, _Distance __dist2,E _Pointer __buf, _Distance __buf_size, _TypeT*,' _Compare __comp){7 _RWSTD_ASSERT_IN_RANGE (__middle, __first, __last); 4 if (__dist1 <= __dist2 && __dist1 <= __buf_size) {C _Pointer __buf_end = _STD::copy (__first, __middle, __buf);J _STD::merge (__buf, __buf_end, __middle, __last, __first, __comp); }# else if (__dist2 <= __buf_size) {B _Pointer __buf_end = _STD::copy (__middle, __last, __buf);F __merge_backward (__first, __middle, __buf, __buf_end, __last," __comp); } else {) _BidirIter __first_cut = __first;+ _BidirIter __second_cut = __middle; _Distance __dist11; _Distance __dist22; if (__dist1 > __dist2) {# __dist11 = __dist1 / 2;2 _STD::advance (__first_cut, __dist11);M __second_cut = _STD::lower_bound (__middle, __last, *__first_cut,6 __comp);E __dist22 = _DISTANCE (__middle, __second_cut, _Distance); } else {# __dist22 = __dist2 / 2;3 _STD::advance (__second_cut, __dist22);N __first_cut = _STD::upper_bound (__first, __middle, *__second_cut,8 __comp);C __dist11 = _DISTANCE (__first, __first_cut, _Distance); } _BidirIter __middle2 =C __rotate_adaptive (__first_cut, __middle, __second_cut,< __dist1 - __dist11, __dist22,2  __buf, __buf_size);: __merge_adaptive (__first, __first_cut, __middle2,- __dist11, __dist22, __buf,1 __buf_size, (_TypeT*)0," __comp);: __merge_adaptive (__middle2, __second_cut, __last,A __dist1 - __dist11, __dist2 - __dist22,A __buf, __buf_size, (_TypeT*)0, __comp); }}Jtemplate >void __inplace_merge (_BidirIter __first, _BidirIter __middle,N _BidirIter __last, _Distance*, _TypeT*, _Compare __comp){A _Distance __dist1 = _DISTANCE (__first, __middle, _Distance);@ _Distance __dist2 = _DISTANCE (__middle, __last, _Distance); J // call an extension of get_temporary_buffer<>() in case partial classI // specialization (and iterator_traits<>) isn't supported by compiler% pair<_TypeT*, _Distance> __pair =C _STD::get_temporary_buffer (__dist1 + __dist2, (_TypeT*)0); if (__pair.first == 0) {L __merge_without_buffer (__first, __middle, __last, __dist1, __dist2,( __comp); } else {I _Distance __dist = (_STD::min)(__pair.second, __dist1 + __dist2); K _STD::fill_n (raw_storage_iterator<_TypeT*, _TypeT> (__pair.first),( __dist, *__first);F __merge_adaptive (__first, __middle, __last, __dist1, __dist2,6 __pair.first, __pair.second,. (_TypeT*)0, __comp);@ _RW::__rw_destroy (__pair.first, __pair.first + __dist);5 _STD::return_temporary_buffer (__pair.first); }}//+// Set operations. Assume sorted sequences.//G// 25.3.5.1 - returns true iff every (not necessarily distinct) elementH// in [first2, last2) occurs (at least as many times) in [first1, last1)?template 9bool includes (_InputIter1 __first1, _InputIter1 __last1,9 _InputIter2 __first2, _InputIter2 __last2, _Compare __comp){, _RWSTD_ASSERT_RANGE (__first1, __last1);, _RWSTD_ASSERT_RANGE (__first2, __last2);> while (!(__first1 == __last1) && !(__first2 == __last2)) {* if (__comp (*__first2, *__first1)) return false;+ if (!__comp (*__first1, *__first2)) ++__first2; ++__first1; } return __first2 == __last2;}Btemplate A_OutputIter set_union (_InputIter1 __first1, _InputIter1 __last1,A _InputIter2 __first2, _InputIter2 __last2,: _OutputIter __res, _Compare __comp){, _RWSTD_ASSERT_RANGE (__first1, __last1);, _RWSTD_ASSERT_RANGE (__first2, __last2);G for (; !(__first1 == __last1) && !(__first2 == __last2); ++__res) {, if (__comp (*__first1, *__first2)) { *__res = *__first1; ++__first1; }1 else if (__comp (*__first2, *__first1)) { *__res = *__first2; ++__first2; } else { *__res = *__first1; ++__first1; ++__first2; } }) return _STD::copy (__first2, __last2,> _STD::copy (__first1, __last1, __res));}Btemplate H_OutputIter set_intersection (_InputIter1 __first1, _InputIter1 __last1,H _InputIter2 __first2, _InputIter2 __last2,A _OutputIter __res, _Compare __comp){, _RWSTD_ASSERT_RANGE (__first1, __last1);, _RWSTD_ASSERT_RANGE (__first2, __last2);< while (!(__first1 == __last1) && !(__first2 == __last2)) {* if (__comp (*__first1, *__first2)) ++__first1;/ else if (__comp (*__first2, *__first1)) ++__first2; else { *__res = *__first1; ++__res; ++__first1; ++__first2; } } return __res;}Btemplate F_OutputIter set_difference (_InputIter1 __first1, _InputIter1 __last1,F _InputIter2 __first2, _InputIter2 __last2,? _OutputIter __res, _Compare __comp){, _RWSTD_ASSERT_RANGE (__first1, __last1);, _RWSTD_ASSERT_RANGE (__first2, __last2);< while (!(__first1 == __last1) && !(__first2 == __last2)) {, if (__comp (*__first1, *__first2)) { *__res = *__first1; ++__res; ++__first1; }/ else if (__comp (*__first2, *__first1)) ++__first2; else { ++__first1;  ++__first2; } }1 return _STD::copy (__first1, __last1, __res);}Btemplate ;_OutputIter set_symmetric_difference (_InputIter1 __first1,: _InputIter1 __last1,; _InputIter2 __first2,: _InputIter2 __last2,8 _OutputIter __res,6  _Compare __comp){, _RWSTD_ASSERT_RANGE (__first1, __last1);, _RWSTD_ASSERT_RANGE (__first2, __last2);< while (!(__first1 == __last1) && !(__first2 == __last2)) {, if (__comp (*__first1, *__first2)) { *__res = *__first1; ++__res; ++__first1; }1 else if (__comp (*__first2, *__first1)) { *__res = *__first2; ++__res; ++__first2; }  else { ++__first1; ++__first2; } }P return _STD::copy (__first2, __last2, _STD::copy(__first1, __last1, __res));}//// Heap operations.//Atemplate Cvoid __push_heap (_RandomAccessIter __first, _Distance __holeIndex,F _Distance __topIndex, _TypeT __val, _Compare __comp){5 for (_Distance __parent = (__holeIndex - 1) / 2; L __holeIndex > __topIndex && __comp (* (__first + __parent), __val);9 __parent = ((__holeIndex = __parent) - 1) / 2) {9 *(__first + __holeIndex) = *(__first + __parent); }% *(__first + __holeIndex) = __val;}Atemplate Evoid __adjust_heap (_RandomAccessIter __first, _Distance __holeIndex,D _Distance __dist, _TypeT __val, _Compare __comp){' _Distance __topIndex = __holeIndex; _Distance __2ndChild;9 while ((__2ndChild = 2 * __holeIndex + 2) < __dist) {L if (__comp (*(__first + __2ndChild), *(__first + (__2ndChild - 1)))) __2ndChild--;; *(__first + __holeIndex) = *(__first + __2ndChild);! __holeIndex = __2ndChild; } if (__2ndChild == __dist) {A *(__first + __holeIndex) = *(__first + (__2ndChild - 1));% __holeIndex = __2ndChild - 1; }B __push_heap (__first, __holeIndex, __topIndex, __val, __comp);}@template Fvoid __make_heap (_RandomAccessIter __first, _RandomAccessIter __last,7 _Compare __comp, _TypeT*, _Distance*){* _RWSTD_ASSERT_RANGE (__first, __last);( _Distance __dist = __last - __first;( _Distance __parent = (__dist - 2)/2; while (true) {I __adjust_heap (__first, __parent, __dist, * (__first + __parent),  __comp); if (__parent == 0) return; __parent--; }}//// Minimum and maximum.//)template I_FwdIter min_element (_FwdIter __first, _FwdIter __last, _Compare __comp){* _RWSTD_ASSERT_RANGE (__first, __last); if (__first == __last) return __first; _FwdIter __res = __first;" while (!(++__first == __last))& if (__comp (*__first, *__res)) __res = __first; return __res;})template I_FwdIter max_element (_FwdIter __first, _FwdIter __last, _Compare __comp){* _RWSTD_ASSERT_RANGE (__first, __last); if (__first == __last) return __first; _FwdIter __res = __first;" while (!(++__first == __last))& if (__comp (*__res, *__first)) __res = __first; return __res;}//// Permutations.//+template Nbool next_permutation (_BidirIter __first, _BidirIter __last, _Compare __comp){* _RWSTD_ASSERT_RANGE (__first, __last); if (__first == __last) return false; _BidirIter __i = __first; if (++__i == __last) return false; __i = __last; for (--__i; ; ) { _BidirIter __ii = __i;% if (__comp (*--__i, *__ii)) {$ _BidirIter __j = __last;+ while (!__comp (*__i, *--__j));' _STD::iter_swap (__i, __j);) _STD::reverse (__ii, __last); return true; } if (__i == __first) {, _STD::reverse (__first, __last); break; } } return false;}+template Nbool prev_permutation (_BidirIter __first, _BidirIter __last, _Compare __comp){* _RWSTD_ASSERT_RANGE (__first, __last); if (__first == __last) return false; _BidirIter __i = __first; if (++__i == __last) return false; __i = __last; for (--__i; ; ) { _BidirIter __ii = __i;% if (__comp (*__ii, *--__i)) {$ _BidirIter __j = __last;, while (!__comp (*--__j, *__i)) ;' _STD::iter_swap (__i, __j);) _STD::reverse (__ii, __last); return true; } if (__i == __first) {, _STD::reverse (__first, __last); break; } } return false;}} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endifwwSpk7Ԧ// -*- C++ -*-L/*************************************************************************** */ * - definition of the bitset template *+ * $Id: //stdlib/3.0-rel/include/bitset#4 $ *L *************************************************************************** * > * Copyright 2002 Compaq Information Technologies Group, L.P. *C * Compaq and the Compaq logo are trademarks of Compaq Information@ * Technologies Group, L.P. in the U.S. and/or other countr ies. *J * Confidential computer software. Valid license from Compaq required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Righ ts Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof m ay not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/#ifndef _RWSTD_BITSET_INCLUDED#define _RWSTD_BITSET_INCLUDED#include #ifdef __USE_STD_IOSTREAM#include #elseclass ostream;class istream;#endif#include #include #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (__rw) { '// helper, implements bitset<>::count() _RWSTD_SIZE_TB__rw_bit_count (const unsigned long*, _RWSTD_SIZE_T) _THROWS (());?// helpers, implement bitset<>::operator<<=() and operator>>=()Jvoid __rw_shl (unsigned long*, _RWSTD_SIZE_T, _RWSTD_SIZE_T) _THROWS (());Jvoid __rw_shr (unsigned long*, _RWSTD_SIZE_T, _RWSTD_SIZE_T) _THROWS (());} // namespace __rw_RWSTD_NAMESPACE (std) { template <_RWSTD_SIZE_T _Size> class bitset{D enum { _C_elembits = _RWSTD_CHAR_BIT * sizeof (unsigned long) };E enum { _C_nelems = _Size ? 1 + (_Size - 1) / _C_elembits : 0 };7 // must have at least one element even if size is 06 unsigned long _C_bits [_C_nelems ? _C_nelems : 1];@ bool _C_valid_pos (_RWSTD_SIZE_T __pos) const _THROWS (()) {) // prevent warnings if _Size == 0% return _Size + 1 > __pos + 1; }public: class reference {# friend class bitset<_Size>; bitset<_Size>& _C_ref; _RWSTD_SIZE_T _C_pos;F reference (bitset<_Size> &__r, _RWSTD_SIZE_T __p) _THROWS (()), : _C_ref (__r), _C_pos (__p) { } public:8 reference& operator= (bool __val) _THROWS (()) {5 return _C_ref.set (_C_pos, __val), *this; }D reference& operator= (const reference &__rhs) _THROWS (()) {( return *this = bool (__rhs); }. bool operator~ () const _THROWS (()) {! return !bool (*this); }- operator bool () const _THROWS (()) {L return _RWSTD_CONST_CAST (const bitset<_Size>&, _C_ref)[_C_pos]; }* reference& flip () _THROWS (()) { / return _C_ref.flip (_C_pos), *this; } }; // 23.3.5.1, p1 bitset () _THROWS (()) { reset (); } // 23.3.5.1, p2- bitset (unsigned long __n) _THROWS (()) { reset (); _C_bits [0] =6 __n & (~0UL >> ((_Size > _C_elembits ? 0 :P _C_elembits - _Size % _C_elembits) % _C_elembits)); }"#ifndef _RWSTD_NO_MEMBER_TEMPLATESC // using string::npos below rather than basic_string<...>::npos) // to work around a bug in g++ 2.95.2 // 23.3.5.1, p3< template _EXPLICIT= bitset (const basic_string<_CharT, _Traits, _Allocator>&,3 _TYPENAME basic_string<_CharT, _Traits,> _Allocator>::size_type = 0,3 _TYPENAME basic_string<_CharT, _Traits,J _Allocator>::size_type = string::npos);#else // 23.3.5.1, p3 _EXPLICIT bitset (const string&,D _RWSTD_SIZE_T = 0, _RWSTD_SIZE_T = (_RWSTD_SIZE_T)(-1));$#endif // _RWSTD_NO_MEMBER_TEMPLATES // 23.3.5.2, p1; bitset& operator&= (const bitset &__rhs) _THROWS (()) {< for (_RWSTD_SIZE_T __i = 0; __i != _C_nelems; ++__i)1 _C_bits [__i] &= __rhs._C_bits [__i]; return *this; } // 23.3.5.2, p3; bitset& operator|= (const bitset &__rhs) _THROWS (()) {< for (_RWSTD_SIZE_T __i = 0; __i != _C_nelems; ++__i)0 _C_bits[__i] |= __rhs._C_bits [__i]; return *this; } // 23.3.5.2, p5; bitset& operator^= (const bitset& __rhs) _THROWS (()) {< for (_RWSTD_SIZE_T __i = 0; __i != _C_nelems; ++__i)1 _C_bits [__i] ^= __rhs._C_bits [__i]; return *this; } // 23.3.5.2, p75 bitset& operator<<= (_RWSTD_SIZE_T) _THROWS (()); // 23.3.5.2, p95 bitset& operator>>= (_RWSTD_SIZE_T) _THROWS (()); // 23.3.5.2, p11  bitset& set () _THROWS (());B // 23.3.5.2, p13: follows proposed resolution of lwg issue 186- bitset& set (_RWSTD_SIZE_T, bool = true); // 23.3.5.2, p17# bitset& reset () _THROWS (()) {7 return 1 == _C_nelems ? (void)(_C_bits [0] = 0)A : (void)memset (_C_bits, 0, sizeof (_C_bits)), *this; } // 23.3.5.2, p19) bitset& reset (_RWSTD_SIZE_T __pos) {" return set (__pos, false); } // 23.3.5.2, p23, bitset operator~ () const _THROWS (()) {& return bitset (*this).flip (); } // 23.3.5.2, p25" bitset& flip () _THROWS (()) {= for (_RWSTD_SIZE_T __i = 0; __i != _C_nelems; __i++) + _C_bits [__i] = ~_C_bits [__i];, _C_bits [_C_nelems - !!_C_nelems] &=F ~0UL >> (_C_elembits - _Size % _C_elembits) % _C_elembits; return *this; } // 23.3.5.2, p27( bitset& flip (_RWSTD_SIZE_T __pos) {. _RWSTD_REQUIRES (_C_valid_pos (__pos),4  (_RWSTD_ERROR_OUT_OF_RANGE,? _RWSTD_FUNC ("bitset::flip(size_t)"),- __pos, _C_nelems));D _C_bits [__pos / _C_elembits] ^= 1UL << __pos % _C_elembits; return *this; } // 23.3.5.2, p??> bool operator[] (_RWSTD_SIZE_T __pos) const _THROWS (()) {- _RWSTD_ASSERT (_C_valid_pos (__pos));P return !!(_C_bits [__pos / _C_elembits] & (1UL << __pos % _C_elembits)); } // 23.3.5.2, p??= reference operator[] (_RWSTD_SIZE_T __pos) _THROWS (()) {- _RWSTD_ASSERT (_C_valid_pos (__pos));) return reference (*this, __pos);  } // 23.3.5.2, p31$ unsigned long to_ulong () const;.#if !defined (_RWSTD_NO_MEMBER_TEMPLATES) \3 && !defined (_RWSTD_NO_TEMPLATE_ON_RETURN_TYPE) // 23.3.5.2, p33< template A basic_string<_CharT, _Traits, _Allocator> to_string () const;-# define _RWSTD_BITSET_TO_STRING(char_type) \E template to_string > ()#else // 23.3.5.2, p33 string to_string () const;6# define _RWSTD_BITSET_TO_STRING(ignore) to_string ()M#endif // !_RWSTD_NO_MEMBER_TEMPLATES && !_RWSTD_NO_TEMPLATE_ON_RETURN_TYPE // 23.3.5.2, p35/ _RWSTD_SIZE_T count () const _THROWS (()) {D return _Size ? _RW::__rw_bit_count (_C_bits, _C_nelems) : 0; } // 23.3.5.2, p36. _RWSTD_SIZE_T size () const _THROWS (()) { return _Size; } // 23.3.5.2, p37> bool operator== (const bitset& __rhs) const _THROWS (()) {< for (_RWSTD_SIZE_T __i = 0; __i != _C_nelems; ++__i)5 if (_C_bits [__i] != __rhs._C_bits [__i]) return false; return true; } // 23.3.5.2, p38> bool operator!= (const bitset& __rhs) const _THROWS (()) {! return !(*this == __rhs); } // 23.3.5.2, p39+ bool test (_RWSTD_SIZE_T __pos) const {. _RWSTD_REQUIRES (_C_valid_pos (__pos),4 (_RWSTD_ERROR_OUT_OF_RANGE,E _RWSTD_FUNC ("bitset::test(size_t) const"),- __pos, _C_nelems));P return !!(_C_bits [__pos / _C_elembits] & (1UL << __pos % _C_elembits)); } // 23.3.5.2, p42$ bool any () const _THROWS (()) {< for (_RWSTD_SIZE_T __i = 0; __i != _C_nelems; ++__i) if (_C_bits [__i])  return true; return false; } // 23.3.5.2, p43% bool none () const _THROWS (()) { return !any (); } // 23.3.5.2, p44@ bitset operator<< (_RWSTD_SIZE_T __pos) const _THROWS (()) {( return bitset (*this) <<= __pos; } // 23.3.5.2, p45@ bitset operator>> (_RWSTD_SIZE_T __pos) const _THROWS (()) {( return bitset (*this) >>= __pos; }};// 23.3.5.2, p11template <_RWSTD_SIZE_T _Size>inline bitset<_Size>&"bitset<_Size>::set () _THROWS (()){ if (_C_nelems == 1) _C_bits [0] = ~0L; else- memset (_C_bits, ~0, sizeof _C_bits);) _C_bits [_C_nelems - !!_C_nelems] >>=: (_C_elembits - _Size % _C_elembits) % _C_elembits; return *this;}// 23.3.5.2, p13template <_RWSTD_SIZE_T _Size>inline bitset<_Size>&4bitset<_Size>::set (_RWSTD_SIZE_T __pos, bool __val){* _RWSTD_REQUIRES (_C_valid_pos (__pos),0 (_RWSTD_ERROR_OUT_OF_RANGE,@ _RWSTD_FUNC ("bitset::set(size_t, bool)"),) __pos, _C_nelems)); if (__val)G _C_bits [__pos / _C_elembits] |= (1UL << __pos % _C_elembits); elseG _C_bits [__pos / _C_elembits] &= ~(1UL << __pos % _C_elembits); return *this;}// 23.3.5.2, p7template <_RWSTD_SIZE_T _Size>inline bitset<_Size>&;bitset<_Size>::operator<<= (_RWSTD_SIZE_T __n) _THROWS (()){ if (_Size >= _C_elembits) 0 _RW::__rw_shl (_C_bits, _C_nelems, __n); elseF // prevent shifting by sizeof (_C_bits) * CHAR_BIT (undefined) _C_bits [0] <<= __n;& // clear bits shifted past the MSB if (_Size % _C_elembits) {2 // prevent warnings about shifting too far, _C_bits [_C_nelems - !!_C_nelems] &=F ~0UL >> (_C_elembits - _Size % _C_elembits) % _C_elembits; } return *this;}// 23.3.5.2, p9template <_RWSTD_SIZE_T _Size>inline bitset<_Size>&;bitset<_Size>::operator>>= (_RWSTD_SIZE_T __n) _THROWS (()){ if (_Size >= _C_elembits)0 _RW::__rw_shr (_C_bits, _C_nelems, __n); elseF // prevent shifting by sizeof (_C_bits) * CHAR_BIT (undefined) _C_bits [0] >>= __n; return *this;}// 23.3.5.2, p31template <_RWSTD_SIZE_T _Size>inline unsigned long bitset<_Size>::to_ulong () const{B // add 1 to prevent warnings about pointless comparison with 0? for (_RWSTD_SIZE_T __i = 1; __i + 1 < _C_nelems + 1; ++__i)' _RWSTD_REQUIRES (!_C_bits[__i],6 (_RWSTD_ERROR_OVERFLOW_ERROR,E _RWSTD_FUNC ("bitset::to_ulong() const"))); return _C_bits [0];} .#if !defined (_RWSTD_NO_MEMBER_TEMPLATES) \3 && !defined (_RWSTD_NO_TEMPLATE_ON_RETURN_TYPE)// 23.3.5.2, p33template <_RWSTD_SIZE_T _Size>8template 0inline basic_string<_CharT, _Traits, _Allocator>"bitset<_Size>::to_string () const {0 // extension: allocate but do not initializeF basic_string<_CharT, _Traits, _Allocator> __s ((_CharT*)0, _Size);4 for (_RWSTD_SIZE_T __i = 0; __i != _Size; ++__i)J _Traits::assign (__s [_Size - 1 - __i], (*this)[__i] ? '1' : '0'); return __s;}J#else // _RWSTD_NO_MEMBER_TEMPLATES || _RWSTD_NO_TEMPLATE_ON_RETURN_TYPE// 23.3.5.2, p33template <_RWSTD_SIZE_T _Size>0inline string bitset<_Size>::to_string () const {0  // extension: allocate but do not initialize! string __s ((char*)0, _Size);4 for (_RWSTD_SIZE_T __i = 0; __i != _Size; ++__i)9 __s [_Size - 1 - __i] = (*this)[__i] ? '1' : '0'; return __s;}M#endif // !_RWSTD_NO_MEMBER_TEMPLATES && !_RWSTD_NO_TEMPLATE_ON_RETURN_TYPE// 23.3.5.3, p1template <_RWSTD_SIZE_T _Size>inline bitset<_Size>Ooperator& (const bitset<_Size>& __lhs, const bitset<_Size>& __rhs) _THROWS (()){) return bitset<_Size>(__lhs) &= __rhs;}// 23.3.5.3, p2template <_RWSTD_SIZE_T _Size>inline bitset<_Size>Ooperator| (const bitset<_Size>& __lhs, const bitset<_Size>& __rhs) _THROWS (()){) return bitset<_Size>(__lhs) |= __rhs;}// 23.3.5.3, p3template <_RWSTD_SIZE_T _Size>inline bitset<_Size> Ooperator^ (const bitset<_Size>& __lhs, const bitset<_Size>& __rhs) _THROWS (()){) return bitset<_Size>(__lhs) ^= __rhs;}} // namespace std#ifdef __USE_STD_IOSTREAM_RWSTD_NAMESPACE (__rw) { <template <_RWSTD_SIZE_T _Size, class _CharT, class _Traits> '_STD::basic_istream<_CharT, _Traits>& ;__rw_extract_bitset (_STD::basic_istream<_CharT, _Traits>&,+ _STD::bitset<_Size>&);} // namespace __rw#endif // __USE_STD_IOSTREAM_RWSTD_NAMESPACE (std) { #ifdef __USE_STD_IOSTREAM*#if !defined (_MSC_VER) || _MSC_VER > 1300// 23.3.5.3, p8<template 'inline basic_ostream<_CharT,_Traits>& Koperator<< (basic_ostream<_CharT, _Traits>& __os, const bitset<_Size>& __x){8 return __os << __x._RWSTD_BITSET_TO_STRING (_CharT);}// 23.3.5.3, p4<template 'inline basic_istream<_CharT,_Traits>& Goperator>> (basic_istream<_CharT, _Traits>& __strm, bitset<_Size>& __x){2 return _RW::__rw_extract_bitset (__strm, __x);}4#else // if defined (_MSC_VER) && _MSC_VER <= 1300K// MSVC 6.0 fails to compile (and wi th a fix to generate code) for the callC// to extract_bitset below if `Size' is the last template parameter;typedef _RWSTD_SIZE_T _Size_t; // prevent an MSVC 6.0 ICE6template <_Size_t _Size, class _CharT, class _Traits> 'inline basic_istream<_CharT,_Traits>& Goperator>> (basic_istream<_CharT, _Traits>& __strm, bitset<_Size>& __x){2 return _RW::__rw_extract_bitset (__strm, __x);}template <_Size_t _Size> Finline ostream& operator<< (ostream &__strm, const bitset<_Size>&  __x){8 return __strm << __x._RWSTD_BITSET_TO_STRING (char);}template <_Size_t _Size> Hinline wostream& operator<< (wostream &__strm, const bitset<_Size>& __x){" string __s = __x.to_string ();K wstring __tmp (0, __s.length ()); // extension: allocate uninitialzed@ for (string::size_type __i = 0; __i != __tmp.size (); ++__i) __tmp [__i] = __s [__i]; return __strm << __tmp;}2#endif // !defined (_MSC_VER) || _MSC_VER > 1300#else // __USE_STD_IOS TREAM//2// Inserters and Extractors for pre-ANSI iostreams// template inline ostream&. operator<< (ostream& os, const bitset& x) {)#ifndef _RWSTD_NO_TEMPLATE_ON_RETURN_TYPEH return os << x.to_string,allocator >();#else return os << x.to_string();#endif } template istream&( operator>> (istream& is, bitset& x) { string str(N, '0');4 for (size_t count = 0; count < N && !is.eof(); )  { char c = 0; is >> c; if (c == '1' || c == '0') {  str.append(1, c); count++;  } else { is.putback(c); break; } } if (str.size() == 0) is.clear(ios::failbit); x = bitset(str); return is; }#endif // __USE_STD_IOSTREAM} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif##ifdef _RWSTD_NO_IMPLICIT_INCLUSION# include #endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif"#endif // _RWSTD_BITSET_INCLUDEDww {'k7ԦL/*************************************************************************** *5 * bitset - definitions of out-of-line bitset members *. * $Id: //stdlib/3.0-rel/include/bitset.cc#2 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and  12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is provi dedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) { )#if !defined (_RWSTD_NO_MEMBER_TEMPLATES)template <_RWSTD_SIZE_T _Size>8template bitset<_Size>::Lbitset (const basic_string<_CharT,_Traits,_Allocator> &__str,L _TYPENAME basic_string<_CharT,_Traits,_Allocator>::size_type __pos,J _TYPENAME basic_string<_CharT,_Traits,_Allocator>::size_type __n)#elsetemplate <_RWSTD_SIZE_T _Size>bitset<_Size>::Ebitset (const string& __str, _RWSTD_SIZE_T __pos, _RWSTD_SIZE_T __n) $#endif // _RWSTD_NO_MEMBER_TEMPLATES{/ const _RWSTD_SIZE_T __slen = __str.size ();% _RWSTD_REQUIRES (__pos <= __slen,0 (_RWSTD_ERROR_OUT_OF_RANGE,J _RWSTD_FUNC ("bitset::bitset (const basic_string&, "G "size_t, size_t)"), __pos, __slen));O const _RWSTD_SIZE_T __rlen = __n < (__slen - __pos) ? __n : __slen - __pos;B const _RWSTD_SIZE_T __M = _Size >= __rlen ? __rlen : _Size; reset ();? for (_RWSTD_SIZE_T __j = __pos; __j < __M + __pos; __j++) {2 const char __c = __str [__slen - __j - 1];2 _RWSTD_REQUIRES (__c == '0' || __c == '1',8 (_RWSTD_ERROR_INVALID_ARGUMENT,N _RWSTD_FUNC ("bitset::bitset (const basic_string&, "< "size_t, size_t)"))); if (__c == '1')  set (__j - __pos); }}} // namespace std#ifdef __USE_STD_IOSTREAM_RWSTD_NAMESPACE (__rw) { <template <_RWSTD_SIZE_T _Size, class _CharT, class _Traits> '_STD::basic_istream<_CharT, _Traits>& B__rw_extract_bitset (_STD::basic_istream<_CharT, _Traits> &__strm,? _STD::bitset<_Size> &__x){ _STD::string __str; __str.reserve (_Size);: typedef _STD::basic_istream<_CharT, _Traits> _Istream;7 _TYPENAME _Istream::iostate __err (__strm.goodbit);5 const _TYPENAME _Istream::sentry __ipfx (__strm); if (__ipfx) { _TRY {9 // 23.3.5.3, p5 - extract at most _Size chars/ // get next char without extractingH _TYPENAME _Traits::int_type __c = __strm.rdbuf ()->sgetc ();> for (_RWSTD_SIZE_T __i = 0; __i != _Size; ++__i) {B if (_Traits::eq_int_type (_Traits::eof (), __c)) {* __err = __strm.eofbit; break; }% // convert and narrow! const char __ch =K __strm.narrow (_Traits::to_char_type (__c), _CharT ());/ if ('0' != __ch && '1' != __ch) break;% // append and advance __str += __ch;1 __c = __strm.rdbuf ()->snextc (); } } _CATCH (...) {" __err = __strm.badbit; } }$ if (_Size && 0 == __str.size ()) __err |= __strm.failbit;& else if (!(__strm.badbit & __err))) __x = _STD::bitset<_Size>(__str); if (__err) __strm.setstate (__err); return __strm;}} // namespace __rw#endif // __USE_STD_IOSTREAME#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endifwwO3k7Ԧ// -*- C++ -*-L/*************************************************************************** *F * - definitions of the template complex and specializations *, * $Id: //stdlib/3.0-rel/include/complex#2 $ *L *************************************************************************** * > * Copyright 2002 Compaq Information Technologies Group, L.P. *C * Compaq and the Compaq logo are trademarks of Compaq Information@ * Technologies Group, L.P. in the U. S. and/or other countries. *J * Confidential computer software. Valid license from Compaq required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave So ftware, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/#ifndef _RWSTD_COMPLEX_INCLUDED#define _RWSTD_COMPLEX_INCLUDED#include #ifdef __USE_STD_IOSTREAM#include #include #else#include #endif#include #include _RWSTD_CMATH#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif#ifdef _MSC_VER# pragma warning (push)H // disable conversion from 'double' to 'float', possible loss of dataL // until a conforming header with float and long double overloads% // fo r the C functions is provided!# pragma warning (disable: 4244)#endif // _MSC_VER_RWSTD_NAMESPACE (std) { // 26.2.2template class complex; // 26.2.3_RWSTD_SPECIALIZED_CLASSclass complex; // 26.2.3_RWSTD_SPECIALIZED_CLASSclass complex;#ifndef _RWSTD_NO_LONG_DOUBLE // 26.2.3_RWSTD_SPECIALIZED_CLASSclass complex;!#endif // _RWSTD_NO_LONG_DOUBLEK// 26.2.6 complex non-member operations (used from wit!hin member functions) // 26.2.6, p7template inline complex<_TypeT>Foperator* (const complex<_TypeT> &__lhs, const complex<_TypeT> &__rhs){B return complex<_TypeT>(_TypeT ( __lhs.real () * __rhs.real ()D - __lhs.imag () * __rhs.imag ()),B _TypeT ( __lhs.imag () * __rhs.real ()E + __lhs.real () * __rhs.imag ()));} // 26.2.6, p8template inline com "plex<_TypeT>Foperator/ (const complex<_TypeT> &__lhs, const complex<_TypeT> &__rhs){M _TypeT __den = __rhs.real() * __rhs.real() + __rhs.imag() * __rhs.imag();B return complex<_TypeT>(_TypeT ( __lhs.real () * __rhs.real ()L + __lhs.imag () * __rhs.imag ()) / __den,B _TypeT ( __lhs.imag () * __rhs.real ()M - __lhs.real () * __rhs.imag ()) / __den);}"#ifndef _RWSTD_NO_MEMBER_TEMPLAT#ES)# define _RWSTD_MEMBER_TEMPLATE(name) \) template \B complex& name (const complex<_TypeX> &__rhs)2#else // if defined (_RWSTD_NO_MEMBER_TEMPLATES),# define _RWSTD_MEMBER_TEMPLATE(name) \: complex& name (const complex &__rhs)&#endif // _RWSTD_NO_MEMBER_TEMPLATES#// 26.2.3 - complex specializations_RWSTD_SPECIALIZED_CLASSclass complex{public: typedef float value_type; $ // implicit conversionN complex (value_type __re = value_type (), value_type __im = value_type ())& : _C_re (__re), _C_im (__im) { }E // defined after the definition of the incomplete complex/ _EXPLICIT complex (const complex&); #ifndef _RWSTD_NO_LONG_DOUBLEJ // defined after the definition of the incomplete complex4 _EXPLICIT complex (const complex&);!#endif // _RWSTD_NO_LONG_DOUBLE value_type imag () con%st { return _C_im; } value_type real () const { return _C_re; };#if defined (_COMPILER_VERSION) && _COMPILER_VERSION <= 730D // working around a MIPSpro 7.3.1 bug (SGI serial #0800690BCFC2)G complex& operator= (const complex& __rhs) {C return (_C_re = __rhs._C_re), (_C_im = __rhs._C_im), *this; }$#endif // _COMPILER_VERSION <= 730!#ifndef _RWSTD_NO_MEMBER_TEMPLATE template C &complex& operator= (const complex<_TypeT>& __rhs) {C return (_C_re = __rhs._C_re), (_C_im = __rhs._C_im), *this; }%#endif // _RWSTD_NO_MEMBER_TEMPLATE ) _RWSTD_MEMBER_TEMPLATE (operator+=) {I return (_C_re += __rhs.real ()), (_C_im += __rhs.imag ()), *this; }) _RWSTD_MEMBER_TEMPLATE (operator-=) {I return (_C_re -= __rhs.real ()), (_C_im -= __rhs.imag ()), *this; }) _RWSTD_MEMBER_TEMPLATE (operator*=) {: re'turn *this = *this * complex(__rhs); }) _RWSTD_MEMBER_TEMPLATE (operator/=) {: return *this = *this / complex(__rhs); }7 complex& operator= (value_type __rhs) {? return (_C_re = __rhs), (_C_im = value_type ()), *this; }8 complex& operator+= (value_type __rhs) {% return _C_re += __rhs, *this; }8 complex& operator-= (value_type __rhs) {% return _C_re -= __rhs, *(this; }8 complex& operator*= (value_type __rhs) {9 return (_C_re *= __rhs), (_C_im *= __rhs), *this; }8 complex& operator/= (value_type __rhs) {9 return (_C_re /= __rhs), (_C_im /= __rhs), *this; }private: value_type _C_re, _C_im;};_RWSTD_SPECIALIZED_CLASSclass complex{public: typedef double value_type; // implicit conversionN complex (value_type __re = value_type (), value_type _)_im = value_type ())& : _C_re (__re), _C_im (__im) { } // implicit conversion) complex (const complex &__rhs): : _C_re (__rhs.real ()), _C_im (__rhs.imag ()) { } #ifndef _RWSTD_NO_LONG_DOUBLEJ // defined after the definition of the incomplete complex4 _EXPLICIT complex (const complex&);!#endif // _RWSTD_NO_LONG_DOUBLE value_type imag () const { return _C_im; } value_type real () const { * return _C_re; };#if defined (_COMPILER_VERSION) && _COMPILER_VERSION <= 730D // working around a MIPSpro 7.3.1 bug (SGI serial #0800690BCFC2)G complex& operator= (const complex& __rhs) {C return (_C_re = __rhs._C_re), (_C_im = __rhs._C_im), *this; }$#endif // _COMPILER_VERSION <= 730!#ifndef _RWSTD_NO_MEMBER_TEMPLATE template C complex& operator= (const complex<_TypeT>& __rhs) {C +return (_C_re = __rhs._C_re), (_C_im = __rhs._C_im), *this; }%#endif // _RWSTD_NO_MEMBER_TEMPLATE ) _RWSTD_MEMBER_TEMPLATE (operator+=) {I return (_C_re += __rhs.real ()), (_C_im += __rhs.imag ()), *this; }) _RWSTD_MEMBER_TEMPLATE (operator-=) {I return (_C_re -= __rhs.real ()), (_C_im -= __rhs.imag ()), *this; }) _RWSTD_MEMBER_TEMPLATE (operator*=) {: return *this = *this * complex(__rhs); }) _RWSTD_MEM,BER_TEMPLATE (operator/=) {: return *this = *this / complex(__rhs); }7 complex& operator= (value_type __rhs) {? return (_C_re = __rhs), (_C_im = value_type ()), *this; }8 complex& operator+= (value_type __rhs) {% return _C_re += __rhs, *this; }8 complex& operator-= (value_type __rhs) {% return _C_re -= __rhs, *this; }8 complex& operator*= (value_type __rhs) {-9 return (_C_re *= __rhs), (_C_im *= __rhs), *this; }8 complex& operator/= (value_type __rhs) {9 return (_C_re /= __rhs), (_C_im /= __rhs), *this; }private: value_type _C_re, _C_im;};#ifndef _RWSTD_NO_LONG_DOUBLE_RWSTD_SPECIALIZED_CLASSclass complex{public:# typedef long double value_type; // implicit conversionN complex (value_type __re = value_type (), value_type __im = value_type ())& : ._C_re (__re), _C_im (__im) { } // implicit conversion) complex (const complex &__rhs): : _C_re (__rhs.real ()), _C_im (__rhs.imag ()) { }  // implicit conversion* complex (const complex &__rhs): : _C_re (__rhs.real ()), _C_im (__rhs.imag ()) { } value_type imag () const { return _C_im; } value_type real () const { return _C_re; }) _RWSTD_MEMBER_TEMPLATE (operator+=) {I return (_C_re +=/ __rhs.real ()), (_C_im += __rhs.imag ()), *this; }) _RWSTD_MEMBER_TEMPLATE (operator-=) {I return (_C_re -= __rhs.real ()), (_C_im -= __rhs.imag ()), *this; }) _RWSTD_MEMBER_TEMPLATE (operator*=) {: return *this = *this * complex(__rhs); }) _RWSTD_MEMBER_TEMPLATE (operator/=) {: return *this = *this / complex(__rhs); };#if defined (_COMPILER_VERSION) && _COMPILER_VERSION <= 730D // working around 0a MIPSpro 7.3.1 bug (SGI serial #0800690BCFC2)G complex& operator= (const complex& __rhs) {C return (_C_re = __rhs._C_re), (_C_im = __rhs._C_im), *this; }$#endif // _COMPILER_VERSION <= 730!#ifndef _RWSTD_NO_MEMBER_TEMPLATE template 7 complex& operator= (const complex<_TypeT>& __rhs) {C return (_C_re = __rhs._C_re), (_C_im = __rhs._C_im), *this; }%#endif // _RWSTD_NO_MEMBER_TEMPLATE, complex& ope1rator+= (value_type __rhs) {% return _C_re += __rhs, *this; }, complex& operator-= (value_type __rhs) {% return _C_re -= __rhs, *this; }, complex& operator*= (value_type __rhs) {9 return (_C_re *= __rhs), (_C_im *= __rhs), *this; }, complex& operator/= (value_type __rhs) {9 return (_C_re /= __rhs), (_C_im /= __rhs), *this; }private: value_type _C_re, _C_im;};!#endif // _RWSTD_NO_LONG_DOUBLE=inline compl2ex::complex (const complex &__rhs)= : _C_re (_RWSTD_STATIC_CAST (value_type, __rhs.real ())),< _C_im (_RWSTD_STATIC_CAST (value_type, __rhs.imag ())){ } #ifndef _RWSTD_NO_LONG_DOUBLEBinline complex::complex (const complex &__rhs)= : _C_re (_RWSTD_STATIC_CAST (value_type, __rhs.real ())),< _C_im (_RWSTD_STATIC_CAST (value_type, __rhs.imag ())){ }Cinline complex::complex (const complex &__rhs)= : _C3_re (_RWSTD_STATIC_CAST (value_type, __rhs.real ())),< _C_im (_RWSTD_STATIC_CAST (value_type, __rhs.imag ())){ }!#endif // _RWSTD_NO_LONG_DOUBLE // 26.2.2template class complex{public: typedef _TypeT value_type;4 complex (const value_type &__re = value_type (),4 const value_type &__im = value_type ())( : _C_re (__re), _C_im (__im) { } value_type imag () const { return _C_im; } value_type rea4l () const { return _C_re; }!#ifndef _RWSTD_NO_MEMBER_TEMPLATE template * complex (const complex<_TypeU>& __rhs)A : _C_re (_RWSTD_STATIC_CAST (value_type, __rhs.real ())),D _C_im (_RWSTD_STATIC_CAST (value_type, __rhs.imag ())) { } template 7 complex& operator= (const complex<_TypeU>& __rhs) {B // not recursive: calls the compiler-generated operator=()' return *this = complex (__rhs); }5%#endif // _RWSTD_NO_MEMBER_TEMPLATE ) _RWSTD_MEMBER_TEMPLATE (operator+=) {% return *this = *this + __rhs; }) _RWSTD_MEMBER_TEMPLATE (operator-=) {% return *this = *this - __rhs; }) _RWSTD_MEMBER_TEMPLATE (operator*=) {% return *this = *this * __rhs; }) _RWSTD_MEMBER_TEMPLATE (operator/=) {% return *this = *this / __rhs; }+ complex& operator= (value_type __rhs) {? return (_C_re = __rhs), (_C_6im = value_type ()), *this; }, complex& operator+= (value_type __rhs) {% return _C_re += __rhs, *this; }, complex& operator-= (value_type __rhs) {% return _C_re -= __rhs, *this; }, complex& operator*= (value_type __rhs) {9 return (_C_re *= __rhs), (_C_im *= __rhs), *this; }, complex& operator/= (value_type __rhs) {9 return (_C_re /= __rhs), (_C_im /= __rhs), *this; }private: value_type _C_re, _C_im;};7'// 26.2.6 complex non-member operations // 26.2.6, p1template inline complex<_TypeT>(operator+ (const complex<_TypeT> &__rhs){ return __rhs;} // 26.2.6, p3template inline complex<_TypeT>Foperator+ (const complex<_TypeT> &__lhs, const complex<_TypeT> &__rhs){B return complex<_TypeT>(_TypeT (__lhs.real () + __rhs.real ()),C _TypeT (__lhs.imag () + __rhs.imag ()));}template inli8ne complex<_TypeT>=operator+ (const complex<_TypeT> &__lhs, const _TypeT &__rhs){A return complex<_TypeT>(__lhs.real () + __rhs, __lhs.imag ());}template inline complex<_TypeT>=operator+ (const _TypeT &__lhs, const complex<_TypeT> &__rhs){ return __rhs + __lhs;} // 26.2.6, p4template inline complex<_TypeT>(operator- (const complex<_TypeT> &__rhs){; return complex<_TypeT>(-__rhs.real (), -__rhs.imag ());} // 26.92.6, p6template inline complex<_TypeT>Foperator- (const complex<_TypeT> &__lhs, const complex<_TypeT> &__rhs){B return complex<_TypeT>(_TypeT (__lhs.real () - __rhs.real ()),C _TypeT (__lhs.imag () - __rhs.imag ()));}template inline complex<_TypeT>=operator- (const complex<_TypeT> &__lhs, const _TypeT &__rhs){A return complex<_TypeT>(__lhs.real () - __rhs, __lhs.imag ());}template inli:ne complex<_TypeT>=operator- (const _TypeT &__lhs, const complex<_TypeT> &__rhs){C return complex<_TypeT>(__lhs - __rhs.real (), - __rhs.imag ());} // 26.2.6, p7template inline complex<_TypeT>=operator* (const complex<_TypeT> &__lhs, const _TypeT &__rhs){I return complex<_TypeT>(__lhs.real () * __rhs, __lhs.imag () * __rhs);}template inline complex<_TypeT>=operator* (const _TypeT &__lhs, const complex<_TypeT> &__rhs){ ;return __rhs * __lhs;} // 26.2.6, p8template inline complex<_TypeT>=operator/ (const complex<_TypeT> &__lhs, const _TypeT &__rhs){1 return complex<_TypeT>(__lhs.real () / __rhs,2 __lhs.imag () / __rhs);}template inline complex<_TypeT>=operator/ (const _TypeT &__lhs, const complex<_TypeT> &__rhs){M _TypeT __den = __rhs.real() * __rhs.real() + __rhs.imag() * __rhs.imag();B return complex<_TypeT>(_<TypeT (__lhs * __rhs.real ()) / __den,D -_TypeT (__lhs * __rhs.imag ()) / __den);} // 26.2.6, p9template inline boolGoperator== (const complex<_TypeT> &__lhs, const complex<_TypeT> &__rhs){L return __lhs.real () == __rhs.real () && __lhs.imag () == __rhs.imag ();} template Jinline bool operator== (const complex<_TypeT> &__lhs, const _TypeT &__rhs){@ return __lhs.real () == __rhs && __lhs.imag () == _TypeT (=);} template Jinline bool operator== (const _TypeT &__lhs, const complex<_TypeT> &__rhs){ return __rhs == __lhs;} // 26.2.6, p11template inline boolGoperator!= (const complex<_TypeT> &__lhs, const complex<_TypeT> &__rhs){ return !(__lhs == __rhs);} template Jinline bool operator!= (const complex<_TypeT> &__lhs, const _TypeT &__rhs){ return !(__lhs == __rhs);} template Jinline> bool operator!= (const _TypeT &__lhs, const complex<_TypeT> &__rhs){ return !(__lhs == __rhs);} $// 26.2.7 - complex value operations // 26.2.7, p1template/inline _TypeT real (const complex<_TypeT> &__a){ return __a.real ();} // 26.2.7, p2template/inline _TypeT imag (const complex<_TypeT> &__a){ return __a.imag ();} // 26.2.7, p3template .inline _TypeT abs (const complex<_TypeT> &__a){' ? return _RWSTD_C::sqrt (norm (__a));} // 26.2.7, p4template .inline _TypeT arg (const complex<_TypeT>& __a){- // guarantee that arg (complex()) == 0/ return __a == complex<_TypeT>() ? _TypeT ()5 : _RWSTD_C::atan2 (__a.imag (), __a.real ());} // 26.2.7, p5template /inline _TypeT norm (const complex<_TypeT> &__a){A return __a.real () * __a.real () + __a.imag () * __a.imag ();} // 26.2.7, p6template 8inline complex<_TypeT> conj (const complex<_TypeT> &__a){6 return complex<_TypeT>(__a.real (), -__a.imag ());}// 26.2.7, p7, lwg issue 79template 2inline complex<_TypeT> polar (const _TypeT &__rho,@ const _TypeT &__theta = _TypeT ()){; return complex<_TypeT>(__rho * _RWSTD_C::cos (__theta),< __rho * _RWSTD_C::sin (__theta));}#// 26.2.8 - complex transcendentals'// complex cosinAe of complex number `a'4// cos (a) = cos u * cosh v - i * sin u * sinh vtemplate 7inline complex<_TypeT> cos (const complex<_TypeT>& __a){8 return complex<_TypeT>( _RWSTD_C::cos (__a.real ()): * _RWSTD_C::cosh (__a.imag ()),9 -_RWSTD_C::sin (__a.real ()); * _RWSTD_C::sinh (__a.imag ()));}2// complex hyperbolic cosine of complex number `a'4// cosh (a) = cosh u * cosv + i * Bsinh u * sin vtemplate 8inline complex<_TypeT> cosh (const complex<_TypeT>& __a){9 return complex<_TypeT>( _RWSTD_C::cosh (__a.real ())9 * _RWSTD_C::cos (__a.imag ()),9 _RWSTD_C::sinh (__a.real ()): * _RWSTD_C::sin (__a.imag ()));},// complex exponential of complex number `a'-// exp (a) = exp(u) * (cos v + i * sin v)template 7inline complex<_TypeT> exp (const Ccomplex<_TypeT>& __a){- _TypeT __e = _RWSTD_C::exp (__a.real ());= return complex<_TypeT>(__e * _RWSTD_C::cos (__a.imag ()),> __e * _RWSTD_C::sin (__a.imag ()));}2// complex natural log of complex number `a'#// log (a) = log(r) + i * thetatemplate 7inline complex<_TypeT> log (const complex<_TypeT>& __a){A return complex<_TypeT>(_RWSTD_C::log (abs (__a)), arg (__a));}template /complex<_TypDeT> log10 (const complex<_TypeT>&);//// For all the power functions://// 0**0 == 1// 0**x == 0 for x != 0//4// complex number `a' raised to an integer power `n'5// a**n = r**n * (cos(n theta) + i sin (n theta))template @inline complex<_TypeT> pow (const complex<_TypeT>& __a, int __n){! if (__a == complex<_TypeT>())) return complex<_TypeT>(0 == __n);# if (_TypeT () == __a.imag ()) {$ if (__a.real () < _TypeT ())3 E return pow (__a, complex<_TypeT>(__n));A return complex<_TypeT>(_RWSTD_C::pow (__a.real (), __n)); }: _TypeT __r = _RWSTD_C::pow (_TypeT (abs (__a)), __n);" _TypeT __th = __n * arg (__a);6 return complex<_TypeT>(__r * _RWSTD_C::cos (__th),7 __r * _RWSTD_C::sin (__th));}0// complex number `a' raised to a real power `s'// a**s = exp(s * log(a))template Jinline complex<_TypeT> pow (const complex<_TypeT> &_F_a, const _TypeT &__s){! if (__a == complex<_TypeT>())1 return complex<_TypeT>(_TypeT () == __s);# if (_TypeT () == __a.imag ()) {$ if (__a.real () < _TypeT ())3 return pow (__a, complex<_TypeT>(__s));A return complex<_TypeT>(_RWSTD_C::pow (__a.real (), __s)); }! return exp (__s * log (__a));}0// real number `s' raised to a complex power `a'// s**a = exp(a * log (s))template Jinline complex<_TypeT> pow (Gconst _TypeT& __s, const complex<_TypeT>& __a){ if (_TypeT() == __s)9 return complex<_TypeT>(complex<_TypeT>() == __a); if (__s < _TypeT ())/ return pow (complex<_TypeT>(__s), __a);! if (_TypeT () == __a.imag ())A return complex<_TypeT>(_RWSTD_C::pow (__s, __a.real ()));D return complex<_TypeT>(exp(__a * _TypeT (_RWSTD_C::log (__s))));}=// complex number `a1' raised to `a' complex power `a2'-// a1**a2 = rho * (cos(phi) + i sin(Hphi))-// rho = r1 ** u2 * exp (-v2 * theta1)'// phi = v2 * log(r1) + u2 * theta1template inline complex<_TypeT><pow (const complex<_TypeT>& __x, const complex<_TypeT>& __y){! if (complex<_TypeT>() == __x)9 return complex<_TypeT>(complex<_TypeT>() == __y); _TypeT __r1 = abs (__x); _TypeT __u2 = real (__y); _TypeT __v2 = imag (__y); _TypeT __th1 = arg (__x);N _TypeT __rho = _RWSTD_C::pow (__r1, __u2) * _RWSTD_C::exp (-__Iv2 * __th1);> _TypeT __phi = __v2 * _RWSTD_C::log (__r1) + __u2 * __th1;9 return complex<_TypeT>(__rho * _RWSTD_C::cos (__phi),: __rho * _RWSTD_C::sin (__phi));} +// complex sine of complex number `a'4// sin (a) = sin u * cosh v + i * cos u * sinh vtemplate 7inline complex<_TypeT> sin (const complex<_TypeT>& __a){8 return complex<_TypeT>( _RWSTD_C::sin (__a.real ()): * _RWSTD_C::cosh (_J_a.imag ()),8 _RWSTD_C::cos (__a.real ()); * _RWSTD_C::sinh (__a.imag ()));}6// complex hyperbolic sine of complex number `a'/// sinh (a) = sinh u cos v + i cosh u sin vtemplate 8inline complex<_TypeT> sinh (const complex<_TypeT>& __a){9 return complex<_TypeT>( _RWSTD_C::sinh (__a.real ())9 * _RWSTD_C::cos (__a.imag ()),9 _RWSTD_C::cosh (__a.rKeal ()): * _RWSTD_C::sin (__a.imag ()));}2// complex square root of complex number `a'=// sqrt(a) = sqrt(r) * ( cos (theta/2) + i sin (theta/2))template 8inline complex<_TypeT> sqrt (const complex<_TypeT>& __a){+ _TypeT __r = _RWSTD_C::sqrt(abs(__a));+ _TypeT __th = arg (__a) / _TypeT (2.0);6 return complex<_TypeT>(__r * _RWSTD_C::cos (__th),7 __r * _RWSTD_C::sin (__th));}template <Lclass _TypeT>7inline complex<_TypeT> tan (const complex<_TypeT>& __a){2 return complex<_TypeT>(sin (__a) / cos (__a));}template 8inline complex<_TypeT> tanh (const complex<_TypeT>& __a){4 return complex<_TypeT>(sinh (__a) / cosh (__a));}template 9inline complex<_TypeT> log10 (const complex<_TypeT>& __a){K const _TypeT __log10e = _TypeT (0.4342944819032518276511289189166051L); return __log10e * log (__a);}#ifdef __UMSE_STD_IOSTREAM.// 26.2.6, p12: MT-safe extractor (not atomic)4template 'inline basic_istream<_CharT, _Traits >&Koperator>> (basic_istream<_CharT, _Traits>& __strm, complex<_TypeT> &__val){; // read a complex number in one of the following forms: // "r", "(r)", "(r, i)" _TypeT __re = _TypeT (), __im = _TypeT (); _CharT __ch; if (!(__strm >> __ch)) return __strm; if ('(' == __ch) { N__strm >> __re >> __ch; if (',' == __ch)" __strm >> __im >> __ch; if (')' != __ch)+ __strm.setstate (__strm.failbit); } else if (__strm) { __strm.putback (__ch); __strm >> __re; } if (__strm)* __val = complex<_TypeT>(__re, __im); return __strm;}'// 26.2.6, p15: MT-safe atomic inserter4template &inline basic_ostream<_CharT, _Traits>&4operator<< (basic_ostrOeam<_CharT, _Traits >& __strm,3 const complex<_TypeT>& __val){B basic_ostringstream<_CharT, _Traits, allocator<_CharT> > __ss;! __ss.flags (__strm.flags ());" __ss.imbue (__strm.getloc ());) __ss.precision (__strm.precision ());@ __ss << '(' << __val.real () << ',' << __val.imag () << ')';! return __strm << __ss.str ();}#else//2// Inserters and Extractors for pre-ANSI iostreams// template 2 istream& operator>> (istream"P& is, complex& x) { //7 // operator >> reads a complex number x in the form // u // (u) // (u, v) // T u = 0, v = 0; char c; is >> c; if (c == '(') { is >> u >> c;% if (c == ',') { is >> v >> c;} if (c != ')' ) { is.clear(ios::failbit); } }  else { is.putback(c); is >> u; } if (is) x = complex(u,v); return is; } tempQlate 8 ostream& operator<< (ostream& os, const complex& x) {3#if defined(__DECCXX) && !defined(__DECFIXCXXL1107); return os << '(' << x.real() << "," << x.imag() << ')';#else4 os << '(' << x.real() << "," << x.imag() << ')';#endif }#endif // __USE_STD_IOSTREAM} // namespace std#ifdef _MSC_VER# pragma warning (pop)#endif // _MSC_VERE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __resto re#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif##endif // _RWSTD_COMPLEX_INCLUDEDwwS/Gk7Ԧ#ifndef __CXXL_HXX#define __CXXL_HXX//// B// Copyright 2003, 2004 Hewlett-Packard Development Company, L.P.//F// Confidential computer software. Valid license from HP required forF// possession, use or copying. Consistent with FAR 12.211 and 12.212,F// Commercial Computer Software, Computer Software Documentation, andK// Technical Data for Commercial Items are licensed to the U.S. Government/// under vendor's standard commercial license.//////T++#// FACILITY: DEC C++ Class Library//(// SUBSYSTEM: General-purpose utilities//// MODULE: cxxl//// INFORMATION HIDDEN://?// General-purpose aspects of the platform which is being used.//>// The set of available packages in the DEC C++ Class Library.//// MODULE DESCRIPTION://F// This header is used for misc. platform-hiding definitions or other,I// possibly "temporary", definitions which may affect every module in the// DEC C++ Class Library.//A// This header U is used for things which know the set of availableI// packages, such as the message set numbers passed to the Messages classG// constructor by other packages which issue messages, and how they are0// initialized before they are used at run-time.//// IMPLICIT INPUT PARAMETERS:// // __DECCXX:.// Defined: Identifies a DEC C++ compiler.2// Undefined: Identifies another C++ compiler.)// (Probably for an older C++ dialect.)// __CXXL_MODULE_NAME:H// Defined: Identifies a D VEC C++ Class Library (CXXL) source module.:// Undefined: Identifies a module which is using CXXL.//// __CXXL_MODULE_VERSION:I// The CXXL module version number (if __CXXL_MODULE_NAME is defined).//0// IMPLICIT OUTPUT PARAMETERS AND SIDE EFFECTS://*// __CXXL_PI: Defined as the value for pi.,// __CXXL_PI2: Defined as the value for 2pi.G// __SCOPE(x): Expands to nothing for older dialects, x for newer; used+// where scope classname:: is now needed.I// __NOSCOPE(x): Expands t Wo x for older dialects, nothing for newer; used;// where size of array to be deleted is no longer needed.;// volatile: Only defined to be nothing for older dialects.//// DESIGN ISSUES://B// Preprocessor symbols are defined to hide platform-dependencies.//J// On VMS, preprocessor code is used to construct the prefixes required byG// the naming conventions. pragma __extern_prefix is used to cause the>// compiler to prepend the appropriate prefixes. Also, pragmaK// __extern_model Xis used to select the appropriate external linkage model.//J// In order to ensure that message set numbers etc. are initialized beforeH// they can be used, a class similar to (Iostream_init in the 'iostream'// package) is used.//I// In order to isolate other code from changes to the message set numbers&// etc., local constants are not used.////--////+// MACRO DEFINITIONS FOR SHAREABLE IMAGES.?// These macros must be defined before any class declarations.//// #ifd"Yef _NT#include #else#include #endif//// // LINKAGE////#pragma __environment save)#pragma __environment cxx_header_defaults////// MACRO DEFINITIONS////K// This will have to be revised for the precision available on the platform#ifndef __CXXL_PI+# define __CXXL_PI 3.14159265358979323846#endif#ifndef __CXXL_PI2%# define __CXXL_PI2 (2 * __CXXL_PI)#endif2# define __SCOPE(x) x /* expand to parameter Z*/0# define __NOSCOPE(x) /* expand to nothing */////// STATIC DATA////F// When building CXXL itself, store the module name and version (etc.)#if defined(__CXXL_MODULE_NAME)H# if defined(__VMS) && defined(__DECCXX) && !defined (__CXXL_INIT_CXX)# pragma __module \' __CXXL_FLOAT_OPTION_MODULE_EVAL( \ __CXXL_FLOAT_FUNC_PREFIX, \ __CXXL_MODULE_NAME \ ) \ __CXXL_MODULE_VERSION # endifM // Note that __FILE__ is useless here; it always points [to ./cxxl.hxx andL // not the name of the module top-level source file. This also seems toK // apply to the case where a macro is defined as __FILE__ in the moduleO // top-level source file and that macro is used here. So we have to settleN // for using the module name instead of the file name in the "what" stringN // (since we don't want to go modify every module top-level source file toL // have the following gunk in it). (An alternative might be to define aJ // mac\ro for this in here and then invoke the macro in every top-level // source file.)% static const char *__cxxl_ident =3 "@(#)" // recognized by "what" on ULTRIX (etc.)3 __CXXL_QUOTED_STRING_EVAL(__CXXL_MODULE_NAME) "\t" __CXXL_MODULE_VERSION "\t" "DEC C++ Class Library\t" __DATE__ "\t" __TIME__;#endif ////// TYPE DEFINITIONS////O// type for an integer register (for when we have to get at the machine itself)P#if defined(__VMS) && (defined(__alpha) || d]efined(__ia64)) && defined(__32BITS)"typedef __int64 __cxxl_register_t;#elsetypedef long __cxxl_register_t;#endif9// type for an integer that is the same size as a pointerZ#if defined(__VMS) && (!defined(__INITIAL_POINTER_SIZE) || (__INITIAL_POINTER_SIZE != 64))typedef int __cxxl_ptrint_t;#else*typedef __cxxl_register_t __cxxl_ptrint_t;#endif class __cxxl_packages_t//++// CLASS DESCRIPTION://J// This class has information on which packages exist in the DEC C++ C^lass0// Library and where their messages are located.// // DESIGN://I// In order to reduce name space pollution, static class members are usedH// instead of global variables or local constants in every module. They2// are initialized by __cxxl_init_t::initialize().////--{public:'#if defined(__VMS) && defined(__DECCXX)4# pragma __extern_prefix __CXXL_PLAIN_DATA_LINKAGE#endif3 static const char *__CXXL_XFER_DECL(file_name);7 static const char *__CXXL_XFER_DEC_L(file_location);* static int __CXXL_XFER_DECL(set_cxxl);- static int __CXXL_XFER_DECL(set_generic);. static int __CXXL_XFER_DECL(set_iostream);/ static int __CXXL_XFER_DECL(set_objection);/ static int __CXXL_XFER_DECL(set_stopwatch);, static int __CXXL_XFER_DECL(set_string);, static int __CXXL_XFER_DECL(set_vector);. static int __CXXL_XFER_DECL(set_messages);}; class __cxxl_init_t//++// CLASS DESCRIPTION://J// Constructing an object of this class `initializes the CXXL package if itJ// has not yet been initialized, in particular, the static data members of// the __cxxl_packages_t class.// // DESIGN://7// This class is modeled after the Iostream_init class.////--{private:'#if defined(__VMS) && defined(__DECCXX)4# pragma __extern_prefix __CXXL_PLAIN_DATA_LINKAGE#endif+ static int __CXXL_XFER_DECL(initcount);public:'#if defined(__VMS) && defined(__DECCXX)4# pragma __extern_prefix __CXXL_PLAIN_FUNC_LINKAGE#endif __cxxl_init_t(); ~__cxxl_init_t(); static void initialize();}; #pragma __environment restore#endif// end of cxxl.hxxwwbbUk7Ԧ#ifndef __CXXL_SHARE_HXX#define __CXXL_SHARE_HXX//// B// Copyright 2001, 2005 Hewlett-Packard Development Company, L.P.//F// Confidential computer software. Valid license from HP required forF// Commercial Computer Software, Computer Software Documentation, andF// possession, use or copying. Consistent with FAR 12.211 and 12.212,K// Technical Data for Commercial Items are licensed to the U.S. Government/// under vendor's standard commercial license.c//////++#// FACILITY: DEC C++ Class Library//(// SUBSYSTEM: General-purpose utilities//// MODULE: cxxl_share.hxx//// INFORMATION HIDDEN://F// Specific aspects of shareable image implementation on the platform // which is being used.//// MODULE DESCRIPTION://E// This header is used for defining macros which are used to support )// shareable images on various platforms.//// IMPLICIT INPUT PARAMETERS://// __CXXL_MODULE_NAME:C// Defined: Identifies t dhe module that includes this header as <// belonging to Digital's implementation of the C++ Class 7// Library. Several macros are defined in this case.D// Undefined: Identifies the module that includes this header as<// not part of Digital's C++ Class Library implementation.//// __CXXL_NO_XFER_VEC:B// Defined: Prevent creation of indirection for use through a ;// transfer vector on platforms where one normally would // be created.G// Undefined: Create indirectione for use through a transfer vector 6// on platforms where one normally would be created.//1// __CXXL_INCLUDE_ONLY_DOUBLE_FLOAT: See below.//1// __CXXL_INCLUDE_ONLY_EITHER_FLOAT: See below.// // __VMS:4// Defined: Run on the OpenVMS operating system.2// Undefined: Run on another operating system.//// DESIGN ISSUES://B// Preprocessor symbols are defined to hide platform-dependencies.//J// On VMS, preprocessor code is used to construct the prefixes required byG// f the naming conventions. pragma __extern_prefix is used to cause the>// compiler to prepend the appropriate prefixes. Also, pragmaK// __extern_model is used to select the appropriate external linkage model.//J// In order to ensure that message set numbers etc. are initialized beforeH// they can be used, a class similar to (Iostream_init in the 'iostream'// package) is used.//I// In order to isolate other code from changes to the message set numbers&// etc., local constants are not usegd.////--////// LINKAGE PREFIX DEFINITIONS////#ifdef __PRAGMA_ENVIRONMENT# pragma __environment save,# pragma __environment cxx_header_defaults#endif$#define __CXXL_INCLUDING_NO_FLOAT 1*#define __CXXL_INCLUDING_SINGLE_FLOAT 1*#define __CXXL_INCLUDING_DOUBLE_FLOAT 1*#define __CXXL_INCLUDING_EITHER_FLOAT 1L//--------------------------------------------------------------------------@// Macros to put quotes around names that are constructed out of// h separate pieces.L//--------------------------------------------------------------------------8#define __CXXL_QUOTED_STRING(CXXL_SYMBOL) #CXXL_SYMBOL0#define __CXXL_QUOTED_STRING_EVAL(CXXL_SYMBOL) \( __CXXL_QUOTED_STRING(CXXL_SYMBOL)'#if defined(__VMS) && defined(__DECCXX)P //--------------------------------------------------------------------------K // Define the prefixes that will be used in generating both the module J // name (which is NOT a quoted string) and the i #pragma __extern_prefix$ // (which is a quoted string).  //F // Use __CXXL_xxxxx_xxxx_PREFIX in building the full module name.B // Use __CXXL_xxxxx_xxxx_LINKAGE with #pragma __extern_prefix.P //--------------------------------------------------------------------------# if defined(__VMS_POSIX)'# define __CXXL_PLAIN_FUNC_PREFIX PXXL$*# define __CXXL_PREFIX(body) PXXL$ ## body # else)# if defined(__INITIAL_POINTER_SIZE)(# if __INITIAL_POINTER_SIZE == j64*# define __CXXL_PLAIN_FUNC_PREFIX CX6L$-# define __CXXL_PREFIX(body) CX6L$ ## body # else*# define __CXXL_PLAIN_FUNC_PREFIX CXXL$-# define __CXXL_PREFIX(body) CXXL$ ## body# endif # else.# define __CXXL_PLAIN_FUNC_PREFIX CXXL$1# define __CXXL_PREFIX(body) CXXL$ ## body # endif # endif6# define __CXXL_PLAIN_DATA_PREFIX __CXXL_PREFIX(GA_)# if (__G_FLOAT)8# define __CXXL_FLOAT_FUNC_PREFIX __CXXL_PREFIX(FG_);# defi kne __CXXL_FLOAT_DATA_PREFIX __CXXL_PREFIX(GA_FG_)# elif (__IEEE_FLOAT)8# define __CXXL_FLOAT_FUNC_PREFIX __CXXL_PREFIX(ST_);# define __CXXL_FLOAT_DATA_PREFIX __CXXL_PREFIX(GA_ST_)# else8# define __CXXL_FLOAT_FUNC_PREFIX __CXXL_PREFIX(FD_);# define __CXXL_FLOAT_DATA_PREFIX __CXXL_PREFIX(GA_FD_) # endifP //--------------------------------------------------------------------------G // Define the linkage names to be used in #pragma __external_prefixB // Ulse __CXXL_xxxxx_xxxx_LINKAGE with #pragma __extern_prefix.P //--------------------------------------------------------------------------[# define __CXXL_PLAIN_FUNC_LINKAGE __CXXL_QUOTED_STRING_EVAL(__CXXL_PLAIN_FUNC_PREFIX)[# define __CXXL_PLAIN_DATA_LINKAGE __CXXL_QUOTED_STRING_EVAL(__CXXL_PLAIN_DATA_PREFIX)X# define __CXXL_FLOAT_FUNC_LINKAGE __CXXL_QUOTED_STRING_EVAL(__CXXL_FLOAT_FUNC_PREFIX)X# define __CXXL_FLOAT_DATA_LINKAGE __CXXL_QUOTED_STRING_EVAL(__CXXL_FLOAT_DATA_PRE mFIX)P //--------------------------------------------------------------------------G // Generate the module name for this compilation. It is created by< // concatinating the proper prefix with the module name.P //--------------------------------------------------------------------------O# define __CXXL_FLOAT_OPTION_MODULE(CXXL_LINKAGE_PREFIX, CXXL_MODULE_NAME) \, CXXL_LINKAGE_PREFIX##CXXL_MODULE_NAMES# define __CXXL_FLOAT_OPTION_MODULE_EVAL(CXXL_LINKAGE_PREFIX, CXnXL_MODULE_NAME) \G __CXXL_FLOAT_OPTION_MODULE(CXXL_LINKAGE_PREFIX, CXXL_MODULE_NAME)"# if defined(__CXXL_MODULE_NAME)P //------------------------------------------------------------------------K // Switches to select which routines to be included for compiles with+ // floating point selection switches. //L // Each section of the CXXL source code will have one of the following% // conditionals surrounding it. //0 // #if __CXXL_INC oLUDING_NO_FLOAT or4 // #if __CXXL_INCLUDING_SINGLE_FLOAT or4 // #if __CXXL_INCLUDING_DOUBLE_FLOAT or- // #if __CXXL_INCLUDING_EITHER_FLOAT //2 // By default ALL of these values will be 1. //M // When compiling the CXXL source code multiple times to get different J // floating point representations, only portions of the source code J // should be included on subsequent compiles. If it is necessary toH // exclude porti pons of the source, define the following to get the3 // portion of the source code that is needed. //9 // $ CXX/define=__CXXL_INCLUDE_ONLY_DOUBLE_FLOAT: // will include only those portions surrounded with:4 // __CXXL_INCLUDING_DOUBLE_FLOAT and* // __CXXL_INCLUDING_EITHER_FLOAT //9 // $ CXX/define=__CXXL_INCLUDE_ONLY_EITHER_FLOAT: // will include only those portions surrounded with:4 // __CXXL_INCLUDING_SINGLE_FLOATq and4 // __CXXL_INCLUDING_DOUBLE_FLOAT and* // __CXXL_INCLUDING_EITHER_FLOAT //P //------------------------------------------------------------------------2# if defined(__CXXL_INCLUDE_ONLY_DOUBLE_FLOAT)"# undef __CXXL_INCLUDING_NO_FLOAT&# undef __CXXL_INCLUDING_SINGLE_FLOAT)# define __CXXL_INCLUDING_NO_FLOAT 0)# define __CXXL_INCLUDING_SINGLE_FLOAT 0 # endif2# if defined(__CXXL_INCLUDE_ONLY_EITHER_FLOAT)"# undef __CXXL_INrCLUDING_NO_FLOAT)# define __CXXL_INCLUDING_NO_FLOAT 0 # endif # endif#endif////*// SHAREABLE IMAGE TRANSFER VECTOR MACROS//////++K// __CXXL_XFER_VEC should be defined as 1 when compiling class library codeP// for shared images that contain a transfer vector and 0 otherwise. To disableP// this from the command line (e.g. sometimes useful for building a copy of _theN// library_ for debugging purposes), use /DEFINE=__CXXL_NO_XFER_VEC ... but do:// NOT refersence __CXXL_NO_XFER_VEC elsewhere in the code.//--G#if defined(__VMS) && defined(__DECCXX) && !defined(__CXXL_NO_XFER_VEC)!# define __CXXL_XFER_VEC 1#else!# define __CXXL_XFER_VEC 0#endif8#undef __CXXL_NO_XFER_VEC /* prevent extraneous uses *///++ // MACRO NAME: __CXXL_XFER_DECL//// FUNCTIONAL DESCRIPTION://H// Change name of identifier to a reference to that identifier (adds oneA// level of indirection) if __CXXL_XFER_VEC is defined to be 1. /// Othterwise the identifier will be left alone.//H// To be used in declarations of static member or global non-member dataC// that need to be placed in a transfer vector for shareable image.//0// example: extern int __CXXL_XFER_DECL(mydata);//// FORMAL PARAMETERS://#// NAME: Identifier being declared.//// EXPANSION VALUE://+// The identifier itself or prepended by &.////--#if __CXXL_XFER_VEC0# define __CXXL_XFER_DECL(NAME) (&NAME)#else-# define __CXXL_XFERu_DECL(NAME) NAME#endif//++// MACRO NAME: __CXXL_XFER_DEF//// FUNCTIONAL DESCRIPTION://H// Change name of identifier to the name of the target data that will beK// pointed to by the tranfer vector if __CXXL_XFER_VEC is defined to be 1. H// Otherwise the only the identifier will be used with no modifications.//G// To be used in definitions of global non-member data that need to be 3// placed in a transfer vector for shareable image.///// example: extern int __CXXL_vXFER_DEF(mydata);//// FORMAL PARAMETERS://"// NAME: Identifier being defined.//// EXPANSION VALUE://B// Either the identifier with no modifications or suffixed by the // string "_data".// // DESIGN://>// The ## operator is used to concatenate identifier segments.////--#if __CXXL_XFER_VEC3# define __CXXL_XFER_DEF(NAME) NAME##_data#else,# define __CXXL_XFER_DEF(NAME) NAME#endif//++#// MACRO NAME: __CXXL_XFER_MEM_DEF//// FUNCTIONALw DESCRIPTION://H// Change name of identifier to the name of the target data that will beK// pointed to by the tranfer vector if __CXXL_XFER_VEC is defined to be 1. @// Otherwise the identifier will just be prefixed with "CLASS::"//C// To be used in definitions of static member data that need to be 3// placed in a transfer vector for shareable image.//<// example: extern int __CXXL_XFER_MEM_DEF(myclass, mydata);//// FORMAL PARAMETERS://;// CLASS: The class or package which is dexfining this data."// NAME: Identifier being defined.//// EXPANSION VALUE://G// This will either expand to the identifier suffixed with "_data" when;// __CXXL_XFER_VEC is 1 or prefixed with CLASS:: otherwise.// // DESIGN://>// The ## operator is used to concatenate identifier segments.////--#if __CXXL_XFER_VECG# define __CXXL_XFER_MEM_DEF(CLASS, NAME) CLASS##_##NAME##_data#else=# define __CXXL_XFER_MEM_DEF(CLASS, NAME) CLASS::NAME#endif#ifdef __PRAGMA_ENVIRONMENT # pragma __environment restore#endif#endif// end of cxxl_share.hxxww zngk7Ԧ#ifndef __CXX_EXCEPTION_H#define __CXX_EXCEPTION_H/*** B** Copyright 2003, 2007 Hewlett-Packard Development Company, L.P.**F** Confidential computer software. Valid license from HP required forF** possession, use or copying. Consistent with FAR 12.211 and 12.212,F** Commercial Computer Software, Computer Software Documentation, andK** Technical Data for Commercial Items are licensed to the U.S. Government/** under vendor's standard commercial license.**{*/#include #pragma __environment save)#pragma __environment cxx_header_defaults#if defined(__VMS)I/* Certain OpenVMS conditions (as described in the DEC C Run-TIme LibraryH// Reference Manual for OpenVMS Systems) normally result in the deliveryF// of signals. You can call function cxxl$set_condition to change theB// behavior so that these VMS conditions are treated as exceptions1// by putting the following call in your program://)// cxxl$set_condition (cxx_ex|ception);//>// Note that you can catch such exceptions using catch(...) orI// catch(struct chf$signal_array *). Type chf$signal_array is defined in#// the system header file chfdef.h.//L// To revert back to the default signal behavior, you can make the following// call://'// cxxl$set_condition (unix_signal);//L// To disable catching VMS conditions altogether, you can make the following// call://%// cxxl$set_condition (pure_unix);//<// Function cxxl$set_condition ret }urns the previous setting.//2// This function affects all threads in a process.//L// There is a second entry point to control whether the exception conditionsK// CMA$_ALERTED (value 4227460) and CMA$_EXIT_THREAD (value 4227492) can beN// caught by catch clauses. The default is that CMA$_ALERTED cannot be caught,// while CMA$_EXIT_THREAD can. The function//H// int cxxl$catchable_condition (int condition_value, int yes_or_no);//K// can be used to alter that behavior. The function ~returns the previous N// behavior value. The behavior is undefined for any other condition passed.//*/Henum condition_behavior { unix_signal=0, cxx_exception=1, pure_unix=2 };#ifdef __cplusplus extern "C" {#endif #if __INITIAL_POINTER_SIZE == 646# define cxxl$set_condition CX6L$SET_CONDITION<# define cxxl$catchable_condition CX6L$CATCHABLE_CONDITION#else6# define cxxl$set_condition CXXL$SET_CONDITION<# define cxxl$catchable_condition CXXL$CATCHABLE_CONDITION#endifKcondition_behavior cxxl$set_condition (condition_behavior __signal_or_exc);Fint cxxl$catchable_condition (int __condition_value, int __on_or_off);#ifdef __cplusplus} // extern "C"#endif#ifdef __cplusplus:// The following structure instantiated with the values of@// CMA$_ALERTED and CMA$_EXIT_THREAD provide two types which may>// be used in catch handlers to specifically catch the signals2// CMA$_ALERTED and CMA$_EXIT_THREAD respectively.9template struct _VMS_Exception {4 int sig_name(void) { return _VMS_Condition_Code; }}; #if __INITIAL_POINTER_SIZE == 640#define __cxx_pthread_cancel CX6L$PTHREAD_CANCEL.#define __cxx_pthread_exit CX6L$PTHREAD_EXIT#else0#define __cxx_pthread_cancel CXXL$PTHREAD_CANCEL.#define __cxx_pthread_exit CXXL$PTHREAD_EXIT#endifItypedef _VMS_Exception __cxx_pthread_cancel;Ktypedef _VMS_Exception __cxx_pthread_exit;#endif#else=// Entry point for determining information about a propagated(// exception within a catch(...) clause.#if !defined(__linux)#include #ifdef __cplusplus extern "C"#endif*system_exrec_type *__cxx_exception_info();#endif #endif //VMS#pragma __environment restore!#endif // End of cxx_exception.hwwJ;qk7Ԧ// -*- C++ -*-L/*************************************************************************** *J * deque - Declaration and definition for the Standard Library deque class ** * $Id: //stdlib/3.0-rel/include/deque#2 $ *L *************************************************************************** * > * Copyright 2002 Compaq Information Technologies Group, L.P. *C * Compaq and the Compaq logo are trademarks of Compaq Information@ * Technologies Group, L.P. in the U.S. and/or other countries. *J * Confidential computer software. Valid license from Compaq required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** * * Copyright (c) 1994 * Hewlett-Pac kard Company *E * Permission to use, copy, modify, distribute and sell this softwareG * and its documentation for any purpose is hereby granted without fee,D * provided that the above copyright notice appear in all copies andD * that both that copyright notice and this permission notice appearA * in supporting documentation. Hewlett-Packard Company makes noA * representations about the suitability of this software for anyH * purpose. It is provided "as is" without express or implied war ranty. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in a ccordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/#ifndef _RWSTD_DEQUE_INCLUDED#define _RWSTD_DEQUE_INCLUDED#include #include !#include !#include #include #include #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) { )template class deque;5template class __rw_deque_iterB : public iterator {A typedef iterator _C_iter_base;public:D typedef _Allocator allocator_type;? typedef _TYPENAME allocato r_type::size_type size_type;@ typedef _TYPENAME _C_iter_base::value_type value_type;E typedef _TYPENAME _C_iter_base::difference_type difference_type;= typedef _TYPENAME _C_iter_base::pointer pointer;? typedef _TYPENAME _C_iter_base::reference reference;G typedef random_access_iterator_tag iterator_category; 8 typedef __rw_deque_iter _C_mutable_iter;L typedef _RWSTD_REBIND (allocator_type, value_type*) _C_map_alloc_type;I typedef _TYPENAME _C_map_alloc_type::pointer _C_map_pointer; $ static size_type _C_bufsize () {D // deque only uses __rw_new_capacity to retrieve the minimumB // allocation amount; this may be specialized to provide a$ // customized minimum amountH return _RW::__rw_new_capacity(0, (deque<_TypeT, _Allocator>*)0); }  __rw_deque_iter () { }9 // dummy first argument used to easily switch between7 // iterators with and without support for debugging5 __rw_deque_iter (pointer __x, _C_map_pointer __y) : _C_current (__x), % _C_first (__y ? *__y : 0), 5 _C_last (__y ? *__y + _C_bufsize () : 0) ,  _C_node (__y) {3 _RWSTD_ASSERT (__x && __y || !__x && !__y); }> // no copy ctor other than the one below defined; will useE // a compiler generated one if __rw_deque_iter != _C_mutable_iter2 __rw_deque_iter (const _C_mutable_iter &__rhs)( : _C_current (__rhs._C_current),% _C_first (__rhs._C_first), " _C_last (__rhs._C_last),% _C_node (__rhs._C_node) { } $ __rw_deque_iter& operator++ () {$ if (++_C_current == _C_last)K _C_last = (_C_current = _C_first = *++_C_node) + _C_bufsize (); return *this; } $ __rw_deque_iter& operator-- () {% if (_C_current == _C_first) {M _C_last = (_C_current = (_C_first = *--_C_node) + _C_bufsize ()); } --_C_current; return *this; } & __rw_deque_iter operator++ (int) {& __rw_deque_iter __tmp = *this; return ++*this, __tmp; }& __rw_deque_iter operator-- (int) {& __rw_deque_iter __tmp = *this; return --*this, __tmp; }6 __rw_deque_iter& operator+= (difference_type __n); 7 __rw_deque_iter& operator-= (difference_type __n) { return *this += -__n; }; __rw_deque_iter operator+ (difference_type __n) const {. return __rw_deque_iter (*this) += __n; }; __rw_deque_iter operator- (difference_type __n) const {. return __rw_deque_iter (*this) -= __n; }" reference operator* () const { return *_C_current; }8 _RWSTD_OPERATOR_ARROW (pointer operator-> () const); 6 reference operator[] (difference_type __n) const { return *(*this + __n); } pointer _C_current; pointer _C_first; pointer _C_last; _C_map_pointer _C_node;};5template Iinline __rw_deque_iter<_TypeT, _DiffT, _Pointer, _Reference, _Allocator>&C__rw_deque_iter<_TypeT, _DiffT, _Pointer, _Reference, _Allocator>:: operator+= (difference_type __n){= difference_type __offset = __n + (_C_current - _C_first);G difference_type __jump = __offset >= 0 ? __offset / _C_bufsize ()N : -(difference_type)((-__offset + _C_bufsize () - 1) / _C_bufsize ()); if (!__jump) _C_current += __n; else {* _C_first = *(_C_node += __jump);. _C_last = _C_first + _C_bufsize ();D _C_current = _C_first + (__offset - __jump * _C_bufsize ()); } return *this;}// for symmetryKtemplate :inline __rw_deque_iter<_TypeT, _DiffT, _Ptr, _Ref, _Alloc>Loperator+ (_DiffT __lhs,L const __rw_deque_iter<_TypeT, _DiffT, _Ptr, _Ref, _Alloc> &__rhs){ return __rhs + __lhs;}#define _RWSTD_DEQUE_ITER(n) \A __rw_deque_iter<_TypeT, _DiffT, _Ptr##n, _Ref##n, _Alloc>%template inli ne _DiffTLoperator- (const _RWSTD_DEQUE_ITER(1) &__x, const _RWSTD_DEQUE_ITER(2) &__y){I return __x._C_node == __y._C_node ? __x._C_current - __y._C_current E : _DiffT (__x._C_bufsize () * (__x._C_node - __y._C_node - 1)O + (__x._C_current - __x._C_first) + (__y._C_last - __y._C_current));}%template inline boolMoperator== (const _RWSTD_DEQUE_ITER(1) &__x, const _RWSTD_DEQUE_ITER(2) &__y){. return __x._C_current == __y._C_current4 || ( ( __x._C_current == __x._C_first5 || __y._C_current == __y._C_first)" && __x - __y == 0);}%template inline boolLoperator< (const _RWSTD_DEQUE_ITER(1) &__x, const _RWSTD_DEQUE_ITER(2) &__y){I return __x._C_node == __y._C_node ? (__x._C_current < __y._C_current)& : (__x._C_node < __y._C_node);}%template inline boolMoperator!= (const _RWSTD_DEQUE_ITER(1) &__x, const _RWSTD_DEQUE_ITER(2) &__y){ return !(__x == __y);}%template inline boolMoperator<= (const _RWSTD_DEQUE_ITER(1) &__x, const _RWSTD_DEQUE_ITER(2) &__y){ return !(__y < __x);}%template inline boolMoperator>= (const _RWSTD_DEQUE_ITER(1) &__x, const _RWSTD_DEQUE_ITER(2) &__y){ return !(__x < __y);}%template inline boolLoperator> (const _RWSTD_DEQUE_ITER(1) &__x, const _RWSTD_DEQUE_ITER(2) &__y){ return __y < __x;}#undef _RWSTD_DEQUE_ITERtemplate ) > class deque : private _Allocator{public:A typedef _TypeT value_type;E typedef _Allocator allocator_type;@ typedef _TYPENAME allocator_type::size_type size_type;F typedef _TYPENAME allocator_type::difference_type difference_type;>  typedef _TYPENAME allocator_type::pointer pointer;D typedef _TYPENAME allocator_type::const_pointer const_pointer;@ typedef _TYPENAME allocator_type::reference reference;F typedef _TYPENAME allocator_type::const_reference const_reference;O typedef _RWSTD_ALLOC_TYPE (allocator_type, value_type) _C_value_alloc_type;G // following two typedefs are used for convenience with debug itersA typedef __rw_deque_iter _C_deque_iter; G typedef __rw_deque_iter _C_deque_citer;L typedef _RWSTD_REBIND (allocator_type, value_type*) _C_map_alloc_type;I typedef _TYPENAME _C_map_alloc_type::pointer _C_map_pointer;#ifndef _RWSTD_NO_DEBUG_ITERE typedef _RW::__rw_debug_iter iterator; F typedef _RW::__rw_debug_iter const_iterator; ; iterator _C_make_iter (const _C_deque_iter& __iter) { ( return iterator (*this, __iter); }G const_iterator _C_make_iter (const _C_deque_citer& __citer) const {/ return const_iterator (*this, __citer); },#else // if defined (_RWSTD_NO_DEBUG_ITER) * typedef _C_deque_iter iterator;0 typedef _C_deque_citer const_iterator; : iterator _C_make_iter (const _C_deque_iter& __iter) { return __iter; }G const_iterator _C_make_iter (const _C_deque_citer& __citer) const { return __citer; } #endif // _RWSTD_NO_DEBUG_ITER$ static size_type _C_bufsize () {, return _C_deque_iter::_C_bufsize (); }%#ifndef _RWSTD_NO_CLASS_PARTIAL_SPEC J typedef _STD::reverse_iterator const_reverse_iterator;D typedef _STD::reverse_iterator reverse_iterator;4#else // if defined (_RWSTD_NO_CLASS_PARTIAL_SPEC)3 typedef _STD::reverse_iterator const_reverse_iterator;- typedef _STD::reverse_iterator reverse_iterator;)#endif // _RWSTD_NO_CLASS_PARTIAL_SPEC protected: _C_deque_iter _C_begin; _C_deque_iter _C_end; size_type _C_size; _C_map_pointer _C_map; size_type _C_map_size;  void _C_init () { _C_begin =( _C_end = _C_deque_iter (0, 0); _C_size = 0; _C_map = 0; }" void _C_alloc_at_begin ();  void _C_alloc_at_end (); void _C_free_at_begin (); void _C_free_at_end ();M void __insert_aux (iterator __pos, size_type __n, const_reference __val);"#ifndef _RWSTD_NO_MEMBER_TEMPLATES template& void __insert_aux (iterator __pos,= _InputIter __first, _InputIter __last,5 _RWSTD_DISPATCH_INT (false)) {/ __insert_aux2 (__pos, __first, __last); } template& void __insert_aux (iterator __pos,= _InputIter __first, _InputIter __last,4 _RWSTD_DISPATCH_INT (true)) {9 __insert_aux (__pos, (size_type)__first, __last); } template: void __insert_aux2 (iterator, _InputIter, _InputIter); template 4 void __insert_interval_dispatch (iterator __pos,8 _InputIter __first,7 _InputIter __last,< forward_iterator_tag) {L __insert_aux (__pos, __first, __last, _RWSTD_DISPATCH (_InputIter)); } template 6 void __insert_interval_dispatch (iterator __pos,9 _InputIter __first, 7 _InputIter __last,: input_iterator_tag) {, _RWSTD_ASSERT_RANGE (__pos, end ());. _RWSTD_ASSERT_RANGE (__first, __last);6 for ( ; __first != __last; ++__pos, ++__first). __pos = insert (__pos, *__first);  } &#endif // _RWSTD_NO_MEMBER_TEMPLATESpublic: _EXPLICIT= deque (const allocator_type &__alloc = allocator_type ())3 : allocator_type (__alloc), _C_map_size (0) { _C_init (); } _EXPLICITA deque (size_type __n, const_reference __val = value_type (), = const allocator_type& __alloc = allocator_type ())5 : allocator_type (__alloc), _C_map_size (0) { _C_init ();& insert (begin (), __n, __val); }"#ifndef _RWSTD_NO_MEMBER_TEMPLATES template1 deque (_InputIter __first, _InputIter __last,: const allocator_type& __al = allocator_type ())2 : allocator_type (__al), _C_map_size (0) { _C_init ();. _RWSTD_ASSERT_RANGE (__first, __last);O __insert_aux (begin (), __first, __last, _RWSTD_DISPATCH (_InputIter)); }2#else // if defined (_RWSTD_NO_MEMBER_TEMPLATES)9 deque (const_iterator __first, const_iterator __last,= const allocator_type& __alloc = allocator_type ())5 : allocator_type (__alloc), _C_map_size (0) { _C_init ();. _RWSTD_ASSERT_RANGE (__first, __last);6 copy (__first, __last, back_inserter (*this)); } 7 deque (const_pointer __first, const_pointer __last,= const allocator_type& __alloc = allocator_type ())5 : allocator_type (__alloc), _C_map_size (0) { _C_init ();. _RWSTD_ASSERT_RANGE (__first, __last);6 copy (__first, __last, back_inserter (*this)); }$#endif // _RWSTD_NO_MEMBER_TEMPLATES deque (const deque &__x)B : allocator_type (__x.get_allocator ()), _C_map_size (0) { _C_init ();? copy (__x.begin (), __x.end (), back_inserter (*this)); } ~deque () { while (!empty ()) pop_front (); }) deque& operator= (const deque &__x) { if (this != &__x) {( if (size () >= __x.size ()) J erase (copy (__x.begin (), __x.end (), begin ()), end ()); else : copy (__x.begin () + size (), __x.end (), & inserter (*this,3 copy (__x.begin (),J __x.begin () + size (), begin ()))); } return *this; }"#ifndef _RWSTD_NO_MEMBER_TEMPLATES template9 void assign (_InputIter __first, _InputIter __last) {. _RWSTD_ASSERT_RANGE (__first, __last);  clear ();O __insert_aux (begin (), __first, __last, _RWSTD_DISPATCH (_InputIter)); }6 void assign (size_type __n, const_reference __t) { clear ();$ insert (begin (), __n, __t); }2#else // if defined (_RWSTD_NO_MEMBER_TEMPLATES)A void assign (const_iterator __first, const_iterator __last) {. _RWSTD_ASSERT_RANGE (__first, __last); clear ();+ insert (begin (), __first, __last); }? void assign (const_pointer __first, const_pointer __last) { clear ();+ insert (begin (), __first, __last); }6 void assign (size_type __n, const_reference __x) { clear ();$ insert (begin (), __n, __x); }$#endif // _RWSTD_NO_MEMBER_TEMPLATES+ allocator_type get_allocator () const { return *this; } iterator begin () {' return _C_make_iter (_C_begin); }# const_iterator begin () const {' return _C_make_iter (_C_begin); } iterator end () {$ return _C_make_iter(_C_end); }! const_iterator end () const {% return _C_make_iter (_C_end); } reverse_iterator rbegin () {) return reverse_iterator (end ()); }- const_reverse_iterator rbegin () const { / return const_reverse_iterator (end ()); }  reverse_iterator rend () { + return reverse_iterator (begin ()); }+ const_reverse_iterator rend () const { 1 return const_reverse_iterator (begin ()); } bool empty () const { return 0 == size (); } size_type size () const { return _C_size; }! size_type max_size () const {E return _RWSTD_VALUE_ALLOC (_C_value_alloc_type, max_size ()); }( void resize (size_type, value_type);$ void resize (size_type __size) {' resize (__size, value_type ()); }* reference operator[] (size_type __n) {#ifdef _RWSTD_BOUNDS_CHECKING return at (__n);#else! return *(begin () + __n);#endif }6 const_reference operator[] (size_type __n) const {#ifdef _RWSTD_BOUNDS_CHECKING return at (__n);#else! return *(begin () + __n);#endif }/ const_reference at (size_type __n) const { : return _RWSTD_CONST_CAST (deque*, this)->at (__n); }" reference at (size_type __n) {' _RWSTD_REQUIRES (__n < size (),4 (_RWSTD_ERROR_OUT_OF_RANGE,O _RWSTD_FUNC ("deque::at(size_type)"), __n, size ()));! return *(begin () + __n); } reference front () {" _RWSTD_ASSERT (!empty ()); return *begin (); }$ const_reference front () const {" _RWSTD_ASSERT (!empty ()); return *begin (); } reference back () {" _RWSTD_ASSERT (!empty ()); return *(end () - 1); }#  const_reference back () const {" _RWSTD_ASSERT (!empty ()); return *(end () - 1); }& void push_front (const_reference);% void push_back (const_reference);0 iterator insert (iterator, const_reference);"#ifndef _RWSTD_NO_MEMBER_TEMPLATES template I void insert (iterator __pos, _InputIter __first, _InputIter __last) {F insert (__pos, __first, __last, _RWSTD_DISPATCH (_InputIter)); } template G void insert (iterator __pos, _InputIter __first, _InputIter __last,/ _RWSTD_DISPATCH_INT (false)) {. _RWSTD_ASSERT_RANGE (begin (), __pos);. _RWSTD_ASSERT_RANGE (__first, __last);; __insert_interval_dispatch (__pos, __first, __last,I _RWSTD_ITERATOR_CATEGORY (_InputIter,H __first)); }F void insert (iterator __pos, size_type __n, const_reference __val,2 _RWSTD_DISPATCH_INT (true) = 0) {) __insert_aux (__pos, __n, __val); }2#else // if defined (_RWSTD_NO_MEMBER_TEMPLATES)H void insert (iterator __pos, size_type __n, const_reference __val) {) __insert_aux (__pos, __n, __val); }9 void insert (iterator, const_pointer, const_pointer);; void insert (iterator, const_iterator, const_iterator);$#endif // _RWSTD_NO_MEMBER_TEMPLATES void pop_front (); void pop_back (); iterator erase (iterator);, iterator erase (iterator, iterator);  void swap (deque &); void clear () {! erase (begin (), end ());! _RWSTD_ASSERT (empty ()); }};)template inline void=deque<_TypeT, _Allocator>::push_front (const_reference __val){ if ( empty ()5 || _C_begin._C_current == _C_begin._C_first)  _C_alloc_at_begin (); --_C_begin._C_current;, _RWSTD_VALUE_ALLOC (_C_value_alloc_type,@ construct (_C_begin._C_current, __val)); ++_C_size; _RWSTD_ASSERT (!empty ());})template inline void<deque<_TypeT, _Allocator>::push_back (const_reference __val){ if ( empty ()0 || _C_end._C_current == _C_end._C_last)  _C_alloc_at_end ();, _RWSTD_VALUE_ALLOC (_C_value_alloc_type,> construct (_C_end._C_current, __val)); ++_C_end._C_current; ++_C_size; _RWSTD_ASSERT (!empty ());})template inline void'deque<_TypeT, _Allocator>::pop_front (){ _RWSTD_ASSERT (!empty ());# _C_deque_iter __tmp = _C_begin; ++_C_begin._C_current; --_C_size; , _RWSTD_VALUE_ALLOC (_C_value_alloc_type,4 destroy (__tmp._C_current)); if ( empty ()4 || _C_begin._C_current == _C_begin._C_last)  _C_free_at_begin ();})template inline void&deque<_TypeT, _Allocator>::pop_back (){ _RWSTD_ASSERT (!empty ()); --_C_end._C_current; --_C_size; , _RWSTD_VALUE_ALLOC (_C_value_alloc_type,5 destroy (_C_end._C_current)); if ( empty ()1 || _C_end._C_current == _C_end._C_first)  _C_free_at_end ();})template inline void@deque<_TypeT, _Allocator>::swap (deque<_TypeT, _Allocator>& __x){3 if (get_allocator () == __x.get_allocator ()) {/ _STD::swap (_C_begin, __x._C_begin);- _STD::swap (_C_end, __x._C_end);. _STD::swap (_C_size, __x._C_size);- _STD::swap (_C_map, __x._C_map);2 _STD::swap (_C_map_size, __x._C_map_size); } else { deque __tmp = *this; *this = __x; __x = __tmp; }}3#if defined(__DECCXX) && !defined(__DECFIXCXXL1910))template inline void'swap (deque<_TypeT, _Allocator> &__lhs,' deque<_TypeT, _Allocator> &__rhs){ __lhs.swap (__rhs);}#endif)template inline bool1operator== (const deque<_TypeT, _Allocator>& __x,1 const deque<_TypeT, _Allocator>& __y){( return __x.size () == __y.size ()= && equal (__x.begin (), __x.end (), __y.begin ());})template inline bool0operator< (const deque<_TypeT, _Allocator>& __x,0 const deque<_TypeT, _Allocator>& __y){= return lexicographical_compare (__x.begin (), __x.end (),> __y.begin (), __y.end ());})template inline bool1operator!= (const deque<_TypeT, _Allocator>& __x,1 const deque<_TypeT, _Allocator>& __y){ return !(__x == __y);})template inline bool1operator<= (const deque<_TypeT, _Allocator>& __x,1 const deque<_TypeT, _Allocator>& __y){ return !(__y < __x);})template inline bool0operator> (const deque<_TypeT, _Allocator>& __x,0 const deque<_TypeT, _Allocator>& __y){ return __y < __x;})template inline bool1operator>= (const deque<_TypeT, _Allocator>& __x,1 const deque<_TypeT, _Allocator>& __y){ return !(__x < __y);})template inline voidFdeque<_TypeT, _Allocator>::resize (size_type __size, value_type __val){ if (__size > size ())1 insert (end (), __size - size (), __val); else if (__size < size ())* erase (begin () + __size, end ());}} // namespace endE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif##ifdef _RWSTD_NO_IMPLICIT_INCLUSION# include #endif$#ifndef _RWSTD_NO_STL_SPECIALIZATION# include "deque_spec.h"(#endif // _RWSTD_NO_STL_SPECIALIZATION#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif!#endif // _RWSTD_DEQUE_INCLUDEDww ؆k7ԦL/*************************************************************************** *J * deque.cc - Non-iniline definitions for the Standard Library deque class *- * $Id: //stdlib/3.0-rel/include/deque.cc#2 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent  with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** * * Copyright (c) 1994 * Hewlett-Packard Company *E * Permission to use, copy, modify, distribute and sell this softwareG * and its documentation for any purpose is hereby granted wit hout fee,D * provided that the above copyright notice appear in all copies andD * that both that copyright notice and this permission notice appearA * in supporting documentation. Hewlett-Packard Company makes noA * representations about the suitability of this software for anyH * purpose. It is provided "as is" without express or implied warranty. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies there of may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) { )template 4void deque<_TypeT, _Allocator>::_C_alloc_at_begin (){ pointer __ptr =0 _RWSTD_VALUE_ALLOC (_C_value_alloc_type,4 allocate (_C_bufsize (),< _C_begin._C_current)); if (!empty ()) {) if (_C_begin._C_node == _C_map) {. _C_map_alloc_type __alloc (*this);3 difference_type __dist = _C_end._C_node# - _C_begin._C_node;6 size_type new_map_size = (__dist + 1) * 2;! _C_map_pointer __tmp; _TRY {@ __tmp = __alloc.allocate (new_map_size, _C_map); } _CATCH (...) {8 _RWSTD_VALUE_ALLOC (_C_value_alloc_type,G deallocate (__ptr, _C_bufsize ())); _RETHROW; } # copy (_C_begin._C_node,%  _C_end._C_node + 1,0 __tmp + new_map_size / 4 + 1);5 __alloc.deallocate (_C_map, _C_map_size); _C_map = __tmp;- _C_map[new_map_size / 4] = __ptr;= _C_begin = _C_deque_iter (__ptr + _C_bufsize (), @ _C_map + new_map_size / 4);7 _C_end = _C_deque_iter (_C_end._C_current, K _C_map + new_map_size / 4 + __dist + 1);' _C_map_size = new_map_size; } else { --_C_begin._C_node;& *_C_begin._C_node = __ptr;< _C_begin = _C_deque_iter (__ptr + _C_bufsize (),7 _C_begin._C_node); } } else { _TRY {H _C_map = _C_map_alloc_type (*this).allocate (_C_bufsize (), G _C_map); } _CATCH (...) {4 _RWSTD_VALUE_ALLOC (_C_value_alloc_type,C deallocate (__ptr, _C_bufsize ())); _RETHROW; } $ _C_map_size = _C_bufsize ();( _C_map[_C_map_size / 2] = __ptr;A _C_begin = _C_deque_iter (__ptr + _C_bufsize () / 2 + 1, ; _C_map + _C_map_size / 2); _C_end = _C_begin; }})template 2void deque<_TypeT, _Allocator>::_C_alloc_at_end (){ pointer __ptr =0 _RWSTD_VALUE_ALLOC (_C_value_alloc_type,4 allocate (_C_bufsize (),< _C_begin._C_current)); if (!empty ()) {9 if (_C_end._C_node == _C_map + _C_map_size - 1) {. _C_map_alloc_type __alloc (*this);3 difference_type __dist = _C_end._C_node# - _C_begin._C_node;6 size_type new_map_size = (__dist + 1) * 2;! _C_map_pointer __tmp; _TRY {@  __tmp = __alloc.allocate (new_map_size, _C_map); } _CATCH (...) {8 _RWSTD_VALUE_ALLOC (_C_value_alloc_type,G deallocate (__ptr, _C_bufsize ())); _RETHROW; } # copy (_C_begin._C_node,% _C_end._C_node + 1,, __tmp + new_map_size / 4);5 __alloc.deallocate (_C_map, _C_map_size); _C_map = __tmp;:  _C_map[new_map_size / 4 + __dist + 1] = __ptr;: _C_begin = _C_deque_iter (_C_begin._C_current,@ _C_map + new_map_size / 4);S _C_end = _C_deque_iter (__ptr, _C_map + new_map_size / 4 + __dist + 1);' _C_map_size = new_map_size; } else { ++_C_end._C_node;$ *_C_end._C_node = __ptr;; _C_end = _C_deque_iter (__ptr, _C_end._C_node); } } else {$  _C_map_size = _C_bufsize (); _TRY { _C_map =I _C_map_alloc_type (*this).allocate (_C_map_size, _C_map); } _CATCH (...) {4 _RWSTD_VALUE_ALLOC (_C_value_alloc_type,C deallocate (__ptr, _C_bufsize ())); _RETHROW; } ( _C_map[_C_map_size / 2] = __ptr;= _C_begin = _C_deque_iter (__ptr + _C_bufsize () / 2, ; _C_map + _C_map_size / 2); _C_end = _C_begin; }})template 3void deque<_TypeT, _Allocator>::_C_free_at_begin (){, _RWSTD_VALUE_ALLOC (_C_value_alloc_type,8 deallocate (*_C_begin._C_node++,4 _C_bufsize ())); if (empty ()) {1 _C_begin = _C_end = _C_deque_iter (0, 0);C _C_map_alloc_type (*this).deallocate (_C_map, _C_map_size); } else4 _C_begin = _C_deque_iter (*_C_begin._C_node,3 _C_begin._C_node);})template 1void deque<_TypeT, _Allocator>::_C_free_at_end (){, _RWSTD_VALUE_ALLOC (_C_value_alloc_type,6 deallocate (*_C_end._C_node--,4 _C_bufsize ())); if (empty ()) {1 _C_begin = _C_end = _C_deque_iter (0, 0);C _C_map_alloc_type (*this).deallocate (_C_map, _C_map_size); } else/ _C_end = _C_deque_iter (*_C_end._C_node/ + _C_bufsize (),/ _C_end._C_node);})template ._TYPENAME deque<_TypeT, _Allocator>::iterator Ideque<_TypeT, _Allocator>::insert (iterator __pos, const_reference __val){* _RWSTD_ASSERT_RANGE (begin (), __pos); if (__pos == begin ()) { push_front (__val); return begin (); } if (__pos == end ()) {  push_back (__val); return end () - 1; }- difference_type __inx = __pos - begin ();' if ((size_type)__inx < size ()/2) { push_front (*begin ());@ copy (begin () + 2, begin () + __inx + 1, begin () + 1); } else {" push_back (*(end () - 1));A copy_backward (begin () + __inx, end () - 2, end () - 1); } *(begin () + __inx) = __val; return begin () + __inx;})template void deque<_TypeT, _Allocator>::C__insert_aux (iterator __pos, size_type __n, const_reference __val){* _RWSTD_ASSERT_RANGE (begin (), __pos);- difference_type __inx = __pos - begin ();, difference_type __rem = size () - __inx; if (__rem > __inx) {% if (__n > (size_type)__inx) { C for (difference_type __i = __n - __inx; __i > 0; --__i)# push_front (__val);9 for (difference_type __j = __inx; __j; --__j)5  push_front (*(begin () + (__n - 1)));C fill (begin () + __n, begin () + (__n + __inx), __val); } else {7 for (difference_type __i = __n; __i; --__i)3 push_front (*(begin () + __n - 1));? copy (begin () + __n + __n, begin () + __n + __inx," begin () + __n);C fill (begin () + __inx, begin () + __n + __inx, __val); } } else {1 difference_type orig_len = __inx + __rem;% if (__n > (size_type)__rem) {C for (difference_type __i = __n - __rem; __i > 0; --__i)" push_back (__val);= for (difference_type __j = 0; __j < __rem; ++__j)6 push_back (*(begin () + __inx + __j));@ fill (begin () + __inx, begin () + orig_len, __val); } else {$ difference_type __i = 0;( while ((size_type)__i < __n)A push_back (*(begin () + orig_len - __n + __i++));H copy_backward (begin () + __inx, begin () + orig_len - __n, 0 begin () + orig_len);C fill (begin () + __inx, begin () + __inx + __n, __val); } }}"#ifndef _RWSTD_NO_MEMBER_TEMPLATES)template template void deque<_TypeT, _Allocator>::E__insert_aux2 (iterator __pos, _InputIter __first, _InputIter __last){* _RWSTD_ASSERT_RANGE (begin (), __pos);* _RWSTD_ASSERT_RANGE (__first, __last);- difference_type __inx = __pos - begin ();, difference_type __rem = size () - __inx;C size_type __n = _DISTANCE (__first, __last, size_type); if (__rem > __inx) {! if (__n > (size_type)__inx) {< // FIXME: operator-() being applied to InputIterator. // assumes RandomAccessIterator( _InputIter __m = __last - __inx; while (__m != __first) push_front (*--__m);$  difference_type __i = __inx; while (__i--)/ push_front (*(begin () + __n - 1));6 copy (__last - __inx, __last, begin () + __n); } else {" difference_type __i = __n; while (__i--)/ push_front (*(begin () + __n - 1));L copy (begin () + __n + __n, begin () + __n + __inx, begin () + __n);1 copy (__first, __last, begin () + __inx); } } else {/ difference_type orig_len = __inx + __rem;! if (__n > (size_type)__rem) {) _InputIter __m = __first + __rem;& for ( ; __m != __last; ++__m ) push_back (*__m); difference_type __i = 0; while (__i < __rem)4 push_back (*(begin () + __inx + __i++));: copy (__first, __first + __rem, begin () + __inx); } else { difference_type __i = 0;$ while ((size_type)__i < __n)= push_back (*(begin () + orig_len - __n + __i++));D copy_backward (begin () + __inx, begin () + orig_len - __n, + begin () + orig_len);1 copy (__first, __last, begin () + __inx); } } }2#else // if defined (_RWSTD_NO_MEMBER_TEMPLATES)(template void deque<_TypeT, _Allocator>::Finsert (iterator __pos, const_iterator __first, const_iterator __last){* _RWSTD_ASSERT_RANGE (begin (), __pos);* _RWSTD_ASSERT_RANGE (__first, __last);- difference_type __inx = __pos - begin ();, difference_type __rem = size () - __inx;C size_type __n = _DISTANCE (__first, __last, size_type); if (__rem > __inx) {! if (__n > (size_type)__inx) {, const_iterator __m = __last - __inx; while (__m != __first) push_front (*--__m);$ difference_type __i = __inx; while (__i--)/ push_front (*(begin () + __n - 1));6 copy (__last - __inx, __last, begin () + __n); } else {" difference_type __i = __n; while (__i--)/ push_front (*(begin () + __n - 1));L copy (begin () + __n + __n, begin () + __n + __inx, begin () + __n);1 copy (__first, __last, begin () + __inx); } } else {/ difference_type orig_len = __inx + __rem;! if (__n > (size_type)__rem) {- const_iterator __m = __first + __rem;& for ( ; __m != __last; ++__m ) push_back (*__m); difference_type __i = 0; while (__i < __rem)4 push_back (*(begin () + __inx + __i++));: copy (__first, __first + __rem, begin () + __inx); } else { difference_type __i = 0;$ while ((size_type)__i < __n)= push_back (*(begin () + orig_len - __n + __i++));D copy_backward (begin () + __inx, begin () + orig_len - __n, + begin () + orig_len);1  copy (__first, __last, begin () + __inx); } } }(template void deque<_TypeT, _Allocator>::Dinsert (iterator __pos, const_pointer __first, const_pointer __last){* _RWSTD_ASSERT_RANGE (begin (), __pos);* _RWSTD_ASSERT_RANGE (__first, __last);- difference_type __inx = __pos - begin ();, difference_type __rem = size () - __inx;C size_type __n = _DISTANCE (__first, __last, size_type); if (__rem > __inx) {! if (__n > (size_type)__inx) {+ const_pointer __m = __last - __inx; while (__m != __first) push_front (*--__m);$ difference_type __i = __inx; while (__i--)/ push_front (*(begin () + __n - 1));6 copy (__last - __inx, __last, begin () + __n); } else {" difference_type __i = __n;9 while (__i--) push_front (*(begin () + __n - 1));L copy (begin () + __n + __n, begin () + __n + __inx, begin () + __n);1 copy (__first, __last, begin () + __inx); } } else {/ difference_type orig_len = __inx + __rem;! if (__n > (size_type)__rem) {, const_pointer __m = __first + __rem;& for ( ; __m != __last; ++__m ) push_back (*__m); difference_type __i = 0; while (__i < __rem)4 push_back (*(begin () + __inx + __i++));: copy (__first, __first + __rem, begin () + __inx); } else { difference_type __i = 0;$ while ((size_type)__i < __n)= push_back (*(begin () + orig_len - __n + __i++));D copy_backward (begin () + __inx, begin () + orig_len - __n, + begin () + orig_len);1 copy (__first, __last, begin () + __inx); } }}&#endif // _RWSTD_NO_MEMBER_TEMPLATES)template ._TYPENAME deque<_TypeT, _Allocator>::iterator 1deque<_TypeT, _Allocator>::erase (iterator __pos){* _RWSTD_ASSERT_RANGE (begin (), __pos);, if (end () - __pos > __pos - begin ()) {4 copy_backward (begin (), __pos, __pos + 1);  pop_front ();7 return begin () == end () ? end () : __pos + 1; }% copy (__pos + 1, end (), __pos);  pop_back (); return __pos;} )template ._TYPENAME deque<_TypeT, _Allocator>::iterator Ddeque<_TypeT, _Allocator>::erase (iterator __first, iterator __last){* _RWSTD_ASSERT_RANGE (__first, __last);, _RWSTD_ASSERT_RANGE (begin (), __first);+ difference_type __n = __last - __first;/ if (end () - __last > __first - begin ()) {2 copy_backward (begin (), __first, __last); while (__n-- > 0) pop_front (); return __last; }# copy (__last, end (), __first); while (__n-- > 0) pop_back (); return __first;}} // namespace s tdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endifww Ðk7Ԧ// -*- C++ -*-L/*************************************************************************** *8 * deque_spec.h - deque <_TypeT*> partial specialization *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** * * Copyright (c) 1994 * Hewlett-Packard Company *E * Permission to use, copy, modify, distribute and sell this softwareG * and its documentation for any purpose is hereby granted without fee,D * provided that the above copyright notic e appear in all copies andD * that both that copyright notice and this permission notice appearA * in supporting documentation. Hewlett-Packard Company makes noA * representations about the suitability of this software for anyH * purpose. It is provided "as is" without express or implied warranty. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made availabl e to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/#ifndef __STD_DEQUE_SPEC__#define __STD_DEQUE_SPEC__#include #ifndef __STD_DEQUE__#include #endif // __STD_DEQUE__#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) { 1template class deque >;template +class deque <_TypeT*, allocator <_TypeT*> >{= typedef allocator <_TypeT*> _Allocator;? typedef _RWSTD_REBIND (_Allocator, void*) __imp_alloc_type;8 typedef deque __imp_type;4 __imp_type __imp;public:= typedef _TypeT* value_type;= typedef _Allocator allocator_type; class iterator; class const_iterator; friend class iterator; friend class const_iterator;@ typedef _TYPENAME allocator_type::reference reference;F typedef _TYPENAME allocator_type::const_reference const_reference;@ typedef _TYPENAME allocator_type::size_type size_type;F typedef _TYPENAME allocator_type::difference_type difference_type;> typedef _TYPENAME allocator_type::pointer pointer;D typedef _TYPENAME allocator_type::const_pointer const_pointer; protected:C typedef _RWSTD_REBIND (_Allocator, pointer) __map_alloc_type;? typedef _TYPENAME __map_alloc_type::pointer __map_pointer;C typedef _STD::iterator __it;D typedef _STD::iterator __cit;public: class const_iterator; class iterator : public __it {: typedef _TYPENAME __imp_type::iterator __imp_iter; __imp_iter __imp;8 friend class deque<_TypeT, allocator <_TypeT> >;$ friend class const_iterator;N // implicit conversions from and to implementation-specific iterator! // used only internally( iterator (const __imp_iter &imp) : __imp (imp) {} operator __imp_iter () { return __imp; } public: iterator () {}7 __iterator_base::reference operator* () const {7 return __iterator_base::reference (*__imp); }'#ifndef _RWSTD_NO_NONCLASS_ARROW_RETURN6 __iterator_base::pointer operator-> () const {6 return __iterator_base::pointer (&*__imp); }+#endif // _RWSTD_NO_NONCLASS_ARROW_RETURN" iterator& operator++ () {  ++__imp; return *this; }# iterator operator++ (int) {! iterator tmp = *this; ++*this; return tmp; }! iterator& operator-- () { --__imp; return *this; }# iterator operator-- (int) {! iterator tmp = *this; --*this; return tmp; }C iterator& operator+= (__iterator_base::difference_type n) { __imp += n; return *this; }C iterator& operator-= (__iterator_base::difference_type n) { __imp -= n; return *this; }N __iterator_base::difference_type operator- (const iterator& x) const {# return __imp - x.__imp; }A iterator operator- (__iterator_base::difference_type n) { return __imp - n; }A iterator operator+ (__iterator_base::difference_type n) { return __imp + n; }T __iterator_base::reference operator[] (__iterator_base::difference_type n) { return __imp [n]; }3 bool operator== (const iterator &x) const {$ return __imp == x.__imp; }2 bool operator< (const iterator &x) const {# return __imp < x.__imp; }2 bool operator> (const iterator &x) const {# return x.__imp < *this; }3 bool operator!= (const iterator &x) const {' return !(*this == x.__imp); }3 bool operator<= (const iterator &x) const {' return !(*x.__imp < *this); }3 bool operator>= (const iterator &x) const {& return !(x.__imp < *this); } };' class const_iterator : public __cit {@ typedef _TYPENAME __imp_type::const_iterator __imp_iter; __imp_iter __imp;8 friend class deque<_TypeT, allocator <_TypeT> >;> const_iterator (const __imp_iter &imp): __imp (imp) {} public:  const_iterator () {}? const_iterator (const iterator &x) : __imp (x.__imp) {}, const_reference operator* () const {, return const_reference (*__imp); }'#ifndef _RWSTD_NO_NONCLASS_ARROW_RETURN+ const_pointer operator-> () const {+ return const_pointer (&*__imp); },#endif // _RWSTD_NO_NONCLASS_ARROW_RETURN( const_iterator& operator++ () {  ++__imp; return *this; }) const_iterator operator++ (int) {' const_iterator tmp = *this; ++*this; return tmp; }' const_iterator& operator-- () { --__imp; return *this; }) const_iterator operator-- (int) {' const_iterator tmp = *this; --*this; return tmp; }I const_iterator& operator+= (__iterator_base::difference_type n) { __imp += n; return *this; }I const_iterator& operator-= (__iterator_base::difference_type n) { __imp -= n; return *this; }T __iterator_base::difference_type operator- (const const_iterator& x) const {#  return __imp - x.__imp; }G const_iterator operator- (__iterator_base::difference_type n) { return __imp - n; }G const_iterator operator+ (__iterator_base::difference_type n) { return __imp + n; }I const_reference operator[] (__iterator_base::difference_type n) { return __imp [n]; }9 bool operator== (const const_iterator &x) const {$ return __imp == x.__imp;  }8 bool operator< (const const_iterator &x) const {# return __imp < x.__imp; }8 bool operator> (const const_iterator &x) const {# return x.__imp < *this; }9 bool operator!= (const const_iterator &x) const {' return !(*this == x.__imp); }9 bool operator<= (const const_iterator &x) const {' return !(*x.__imp < *this); }9 bool operator>= (const const_iterator &x) const {& return !(x.__imp < *this); } };%#ifndef _RWSTD_NO_CLASS_PARTIAL_SPEC J typedef _STD::reverse_iterator const_reverse_iterator;D typedef _STD::reverse_iterator reverse_iterator;#else3 typedef _STD::reverse_iterator const_reverse_iterator;- typedef _STD::reverse_iterator reverse_iterator;#endifpublic:Q _EXPLICIT deque (const _Allocator &alloc _RWSTD_DEFAULT_ARG (_Allocator ()))  : __imp (alloc) { }&#ifdef _RWSTD_NO_DEFAULT_TEMPLATE_ARGS deque ()  : __imp () { }* deque (size_type n, const_reference x) : __imp (n, x) { })#endif // _RWSTD_NO_DEFAULT_TEMPLATE_ARGS! _EXPLICIT deque (size_type n) : __imp (n) { }* deque (size_type n, const_reference x,E const _Allocator& alloc _RWSTD_DEFAULT_ARG (_Allocator()))! : __imp (n, x, alloc) { }"#ifndef _RWSTD_NO_MEMBER_TEMPLATES" template 3 deque (InputIterator first, InputIterator last,F const _Allocator& alloc _RWSTD_DEFAULT_ARG (_Allocator ()))( : __imp (first, last, alloc) { }2#else // if defined (_RWSTD_NO_MEMBER_TEMPLATES)5 deque (const_iterator first, const_iterator last,D const _Allocator& alloc _RWSTD_DEFAULT_ARG(_Allocator()))( : __imp (first, last, alloc) { } 3 deque (const_pointer first, const_pointer last,D const _Allocator& alloc _RWSTD_DEFAULT_ARG(_Allocator()))( : __imp (first, last, alloc) { }&#ifdef _RWSTD_NO_DEFAULT_TEMPLATE_ARGS5 deque (const_iterator first, const_iterator last)! : __imp (first, last) { } 3 deque (const_pointer first, const_pointer last)! : __imp (first, last) { })#endif // _RWSTD_NO_DEFAULT_TEMPLATE_ARGS$#endif // _RWSTD_NO_MEMBER_TEMPLATES deque (const deque &x) : __imp (x.__imp) { }' deque& operator= (const deque &x) { __imp = x.__imp; return *this; }"#ifndef _RWSTD_NO_MEMBER_TEMPLATES! template; void assign (InputIterator first, InputIterator last) {# __imp.assign (first, last); }2#else // if defined (_RWSTD_NO_MEMBER_TEMPLATES)= void assign (const_iterator first, const_iterator last) {# __imp.assign (first, last); }; void assign (const_pointer first, const_pointer last) {# __imp.assign (first, last); }$#endif // _RWSTD_NO_MEMBER_TEMPLATES2 void assign (size_type n, const_reference x) { __imp.assign (n, x); }) allocator_type get_allocator () const {$ return __imp.get_allocator (); } iterator begin () { return __imp.begin (); }# const_iterator begin () const { return __imp.begin (); } iterator end () { return __imp.end (); }! const_iterator end () const { return __imp.end (); } reverse_iterator rbegin () {) return reverse_iterator (end ()); }, const_reverse_iterator rbegin () const {) return reverse_iterator (end ()); } reverse_iterator rend () {+ return reverse_iterator (begin ()); }* const_reverse_iterator rend () const {+ return reverse_iterator (begin ()); } bool empty () const { return __imp.empty (); } size_type size () const { return __imp.size (); }! size_type max_size () const {! return __imp.max_size (); }& void resize (size_type new_size) { __imp.resize (new_size); }9 void resize (size_type new_size, const_reference x) {# __imp.resize (new_size, x); }( reference operator[] (size_type n) {% return reference (__imp [n]); }4 const_reference operator[] (size_type n) const {+ return const_reference (__imp [n]); }, const_reference at (size_type n) const { return __imp.at (n); } reference at (size_type n) { return __imp.at (n); } reference front () {* return reference (__imp.front ()); }$ const_reference front () const {0 return const_reference (__imp.front ()); } reference back () {) return reference (__imp.back ()); }# const_reference back () const {/ return const_reference (__imp.back ()); }) void push_front (const_reference x) { __imp.push_front (x); }( void push_back (const_reference x) { __imp.push_back (x); } void pop_front () { __imp.pop_front (); }  void pop_back () { __imp.pop_back (); }7 iterator insert (iterator pos, const_reference x) {% return __imp.insert (pos, x); }"#ifndef _RWSTD_NO_MEMBER_TEMPLATES" template I void insert (iterator pos, InputIterator first, InputIterator last) {( __imp.insert (pos, first, last); }2#else // if defined (_RWSTD_NO_MEMBER_TEMPLATES)K void insert (iterator pos, const_iterator first, const_iterator last) {(  __imp.insert (pos, first, last); } $#endif // _RWSTD_NO_MEMBER_TEMPLATES@ void insert (iterator pos, size_type n, const_reference x) {! __imp.insert (pos, n, x); }# iterator erase (iterator pos) {! return __imp.erase (pos); }4 iterator erase (iterator first, iterator last) {) return __imp.erase (first, last); } void swap (deque &x) { __imp.swap (x.__imp); } void clear () { __imp.clear (); }};template Ginline bool operator== (const deque <_TypeT*, allocator <_TypeT*> > &x,G const deque <_TypeT*, allocator <_TypeT*> > &y){N return x.size () == y.size () && equal (x.begin (), x.end (), y.begin ());}template Finline bool operator< (const deque <_TypeT*, allocator <_TypeT*> > &x,F const deque <_TypeT*, allocator <_TypeT*> > &y){P return lexicographical_compare (x.begin (), x.end (), y.begin (), y.end ());}M#if !defined (_RWSTD_NO_NAMESPACE) || !defined (_RWSTD_NO_PART_SPEC_OVERLOAD)template Ginline bool operator!= (const deque <_TypeT*, allocator <_TypeT*> > &x,G const deque <_TypeT*, allocator <_TypeT*> > &y){ return !(x == y);}template Finline bool operator> (const deque <_TypeT*, allocator <_TypeT*> > &x,F const deque <_TypeT*, allocator <_TypeT*> > &y){ return y < x;}template Ginline bool operator>= (const deque <_TypeT*, allocator <_TypeT*> > &x,G const deque <_TypeT*, allocator <_TypeT*> > &y){ return !(x < y);}template Ginline bool operator<= (const deque <_TypeT*, allocator <_TypeT*> > &x,G const deque <_TypeT*, allocator <_TypeT*> > &y){ return !(y < x);}template ;inline void swap (deque <_TypeT*, allocator <_TypeT*> > &a,; deque <_TypeT*, allocator <_TypeT*> > &b){ a.swap(b);}Q#endif // !defined(_RWSTD_NO_NAMESPACE) || !defined(_RWSTD_NO_PART_SPEC_OVERLOAD)} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif#endif /*__STD_DEQUE_SPEC__*/wwk7Ԧ// -*- C++ -*-L/*************************************************************************** *D * exception - declarations for the Standard Library exception class *. * $Id: //stdlib/3.0-rel/include/exception#7 $ *L *************************************************************************** * > * Copyright 2002 Compaq Information Technologies Group, L.P. *C * Compaq and the Compaq logo are trademarks of Compaq Information@ * Technologies Group, L.P. in the U. S. and/or other countries. *J * Confidential computer software. Valid license from Compaq required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave So ftware, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/!#ifndef _RWSTD_EXCEPTION_INCLUDED!#define _RWSTD_EXCEPTION_INCLUDED#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endif#include #include E#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif#if 0 // def __HP_aCCF// HP aCC on HP-UX has whose contents HP prefers to ours,// # include # include #else // if defined (__HP_aCC)#ifndef _RWSTD_NO_STD_EXCEPTION_RWSTD_NAMESPACE (std) {##endif // _RWSTD_NO_STD_EXCEPTION // 18.6.1#struct _RWSTD_EXPORT exception {K#if !defined (_MSC_VER) || \K (defined (_MSC_VER) && ( \K (_MSC_VER >= 1300 && defined(_MT)) || \ defined (_WIN64)))& // 18.6.1, p2 - compiler generated$ // exception () _THROWS (()) { }& // 18.6.1, p4 - compiler generated4 // exception (const exception&) _THROWS (()) { } // 18.6.1, p4 : exception& operator= (const exception&) _THROWS (()) { return *this; } // 18.6.1, p6* virtual ~exception () _THROWS (()) { } // 18.6.1, p85 virtual const char* what () const _THROWS (()) {& return _RWSTD_ERROR_EXCEPTION; } #else // _MSC_VER exception();" exception(const const char*&);, exception(const exception&) _THROWS (())+ : _C_dummy_what (0), _C_dummy_free (0) { }- exception& operator= (const exception&" ) { _C_dummy_what = 0; _C_dummy_free = 0; return *this; } virtual ~exception();% virtual const char* what() const; protected:##define _C_dummy_what _C_dummy_what const char* _C_dummy_what; int _C_dummy_free;#endif // _MSC_VER};#ifndef _RWSTD_NO_STD_EXCEPTION} // namespace std/#else // if defined (_RWSTD_NO_STD_EXCEPTION)# ifndef _RWSTD_NO_NAMESPACEnamespace std {using ::exception;} // namespace std !# endif // _RWSTD_NO_NAMESPACE##endif // _RWSTD_NO_STD_EXCEPTION##ifndef _RWSTD_NO_STD_BAD_EXCEPTION_RWSTD_NAMESPACE (std) {'#endif // _RWSTD_NO_STD_BAD_EXCEPTION // 18.6.2.1$struct bad_exception: exception {  // 18.6.2.1, p54 virtual const char* what () const _THROWS (()) {* return _RWSTD_ERROR_BAD_EXCEPTION; }};##ifndef _RWSTD_NO_STD_BAD_EXCEPTION} // namespace std3#else // if defined (_RWSTD_NO_STD_BAD_EXCEPTION) # ifndef _RWSTD_NO_NAMESPACEnamespace std {using ::bad_exception;} // namespace std!# endif // _RWSTD_NO_NAMESPACE'#endif // _RWSTD_NO_STD_BAD_EXCEPTION_RWSTD_NAMESPACE (std) { // 18.6.2.2&typedef void (*unexpected_handler) (); // 18.6.2.3'_RWSTD_EXPORT extern unexpected_handler1set_unexpected (unexpected_handler) _THROWS (()); // 18.6.2.4_RWSTD_EXPORT extern void5unexpected () _RWSTD_GNUC_ATTRIBUTE ((__noreturn__)); // 18.6.3.1%typede f void (*terminate_handler) (); // 18.6.3.2&_RWSTD_EXPORT extern terminate_handler/set_terminate (terminate_handler) _THROWS (()); // 18.6.3.3_RWSTD_EXPORT extern void4terminate () _RWSTD_GNUC_ATTRIBUTE ((__noreturn__));4#if !defined (_RWSTD_NO_STD_UNCAUGHT_EXCEPTION) \5 || !defined (_RWSTD_NO_GLOBAL_UNCAUGHT_EXCEPTION) // 18.6.4_RWSTD_EXPORT extern bool#uncaught_exception () _THROWS (());$#endif // ...NO_UNCAUGHT_EXCEPTION} // namespace std#endif // __HP_aCCE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif%#endif // _RWSTD_EXCEPTION_INCLUDEDww:)k7Ԧ#ifndef __FSTREAM_HEADER#define __FSTREAM_HEADER L/*************************************************************************** * . * Copyright 2000 Compaq Computer Corporation *: * COMPAQ Registered in U.S. Patent and Trademark Office. *J * Confidential computer software. Valid license from Compaq required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *N ****************************************************************************//*:This file either includes fstream_stdimpl or fstream_impl 1based upon whether __USE_STD_IOSTREAM is defined.*/#include #ifdef __USE_STD_IOSTREAM#include #else#include #endif#endifww |k7Ԧ/*** >** Copyright 2003 Compaq Information Technologies Group, L.P.**C** Compaq and the Compaq logo are trademarks of Compaq Information@** Technologies Group, L.P. in the U.S. and/or other countries.**J** Confidential computer software. Valid license from Compaq required forF** possession, use or copying. Consistent with FAR 12.211 and 12.212,F** Commercial Computer Software, Computer Software Documentation, andK** Technical Data for Commercial Items are li censed to the U.S. Government/** under vendor's standard commercial license.***/#ifndef __FSTREAM_HXX#include #endifww *-m7Ԧ/*** >** Copyright 2003 Compaq Information Technologies Group, L.P.**C** Compaq and the Compaq logo are trademarks of Compaq Information.@** Technologies Group, L.P. in the U.S. and/or other countries.**J** Confidential computer software. Valid license from Compaq required forF** possession, use or copying. Consistent with FAR 12.211 and 12.212,F** Commercial Computer Software, Computer Software Documentation, andK** Technical Data for Commercial Items are li Tk7Ԧ#ifndef __FSTREAMHXX#define __FSTREAMHXXL/*************************************************************************** * > * Copyright 2003 Compaq Information Technologies Group, L.P. *C * Compaq and the Compaq logo are trademarks of Compaq Information@ * Technologies Group, L.P. in the U.S. and/or other countries. *J * Confidential computer software. Valid license from Compaq required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *N ****************************************************************************/h#if (defined(__STD_STRICT_ANSI) || defined(__STD_STRICT_ANSI_ERRORS)) && !defined(__NO_USE_STD_IOSTREAM)#error "cannot include fstream.hxx -- do not compile strict_ansi OR define __NO_USE_STD_IOSTREAM - see section 7.1.2 of the C++ Using Guide"#else$ /* duplicate for /head8 * includes fstream_stdimpl.hxx or fstream_impl.hxx 8 * based upon whether __USE_STD_IOSTREAM is defined. */!/* # include */# ifdef __USE_STD_IOSTREAM&# include # else## include # endif#endif#endifww?k7Ԧ#ifndef __FSTREAM_HXX#define __FSTREAM_HXX//// B// Copyright 2003, 2005 Hewlett-Packard Development Company, L.P.//F// Confidential computer software. Valid license from HP required forF// possession, use or copying. Consistent with FAR 12.211 and 12.212,F// Commercial Computer Software, Computer Software Documentation, andK// Technical Data for Commercial Items are licensed to the U.S. Government/// under vendor's standard commercial license.//////++#// FACILITY: DEC C++ Class Library//$// SUBSYSTEM: The iostream package.//4// MODULE: Include file for the fstream subpackage.//// MODULE DESCRIPTION://I// The fstream subpackage provides the file I/O functionality of theH// iostream package. It relies on the iostream (core) subpackage's baseJ// classes to derive classes that are specialized for file I/O operations.//// DESIGN ISSUES://K// The description of this subpackage in AT&T's documentation is quiteK// incomplete. Also, it wasn't always possible to experimentally determineK// the compatible behavior because of the problems in the version of cfront // (Glockenspiel) we were using.////-- //++// INCLUDE FILES//--/* #include */#ifdef __USE_STD_IOSTREAM #error "cannot include fstream.hxx -- do not compile strict_ansi OR define __NO_USE_STD_IOSTREAM - see section 7.1.2 of the C++ Using Guide"#else#include #include extern "C"{#if defined(__VMS_POSIX)# include # include #elif defined(__VMS)# include # include # ifndef SEEK_SET# define SEEK_SET 0 # endif# ifndef SEEK_CUR# define SEEK_CUR 1 # endif# ifndef SEEK_EOF# define SEEK_EOF 2 # endif# ifndef SEEK_END0# define SEEK_END 2 /* ANSI C defintion */ # endif#endif}#pragma __environment save)#pragma __environment cxx_header_defaultsE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1802)#pragma __extern_prefix __save1#pragma __extern_prefix __CXXL_PLAIN_FUNC_LINKAGE#endif class filebuf : public streambuf//++// FUNCTIONAL DESCRIPTION://G// This class provides a stream buffer for I/O through file descriptorsG// (common uses, however, do not require the program to manipulate file// descriptors).//--{!// Static data member definitions'#if defined(__VMS) && defined(__DECCXX)4# pragma __extern_prefix __CXXL_PLAIN_DATA_LINKAGE#endifpublic:O static const int __CXXL_XFER_DECL(openprot); // Default protection for open// Function member definitions'#if defined(__VMS) && defined(__DECCXX)4# pragma __extern_prefix __CXXL_PLAIN_FUNC_LINKAGE#endif filebuf(); filebuf(int fd);% filebuf(int fd, char *p, int len); ~filebuf(); filebuf *attach(int fd); filebuf *close();-#if defined(__VMS) && (__VMS_VER < 70000000)  inline int fd();#else int fd();#endif #ifdef __VMS inline int is_open();#else int is_open();#endifD filebuf *open(const char *name, int mode, int prot = openprot);% virtual int overflow(int = EOF);K virtual streampos seekoff(streamoff, __SCOPE(ios::)seek_dir, int mode);3 virtual streampos seekpos(streampos, int mode);0 virtual streambuf *setbuf(char *p, int len); virtual int sync(); virtual int underflow(); filebuf *__attach(int fd); filebuf *__close(); inline int __fd(); inline int __is_open();D filebuf *__open(const char *name, int mode, int prot=openprot);N// Data member definitions -- each platform has own backward compatible layout#if defined(__VMS)private:D unsigned long m_lcchFile_bOpen; // open flag and file size // open flag is lsb2 long m_fpBuffer; // file position#endif#if defined(__unix__)private: int m_fd; int m_cchDeltaFp;& char m_bFileIsOpen;) char m_bFilebufOwnsFd;% char m_bNeedsSync; char __fill1; int __fill2;# long m_fpBuffer; long __fill3;# long m_lcchFile;#endif#if defined(_NT)private: int m_fd;# long m_fpBuffer;# long m_lcchFile;& int m_bFileIsOpen;) int m_bFilebufOw nsFd;% int m_bNeedsSync; int m_cchDeltaFp;#endif}; #if !defined(__VMS)E// Class fstreambase provides a mechanism to include a single filebuf=// in all fstream classes. It saves a memory allocation when?// creating a filebuf object, but it complicates initialization?// and sync_with_stdio(). Its primary purpose is compatibilityH// with previous versions of the C++ class library provided on DEC OSF/1(class fstreambase : virtual public ios {public!: fstreambase(); fstreambase(int);! fstreambase(int, char *, int);' fstreambase(const char *, int, int); ~fstreambase(); void attach(int); void close() ;' void open(const char *, int, int); void setbuf(char *, int) ;private: filebuf m_filebuf;};#endif #if !defined(__VMS)3class ifstream : public fstreambase, public istream#elseclass ifstream : public istream#endif//++// FUNCTIONAL DESCRIPTION://K// This class suppor"ts formatted input from files. It uses a filebuf to doH// the I/O. Common operations (such as opening and closing) can be done@// directly on streams without the explicit mention of filebufs.//--{public: ifstream();1 ifstream(const char *name, int mode = ios::in," int prot = filebuf::openprot); ifstream(int fd);& ifstream(int fd, char *p, int len); ~ifstream(); void attach(int fd); void close();5 void open(const char *name, int mode = ios::in,# " int prot = filebuf::openprot); filebuf *rdbuf();# void setbuf(char *p, int len);}; #if !defined(__VMS)3class ofstream : public fstreambase, public ostream#elseclass ofstream : public ostream#endif//++// FUNCTIONAL DESCRIPTION://J// This class supports formatted output to files. It uses a filebuf to doH// the I/O. Common operations (such as opening and closing) can be done@// directly on streams without the explicit mention of filebufs.//--{pu$blic: ofstream();2 ofstream(const char *name, int mode = ios::out," int prot = filebuf::openprot); ofstream(int fd);& ofstream(int fd, char *p, int len); ~ofstream(); void attach(int fd); void close();6 void open(const char *name, int mode = ios::out, " int prot = filebuf::openprot); filebuf *rdbuf();# void setbuf(char *p, int len);}; #if !defined(__VMS)3class fstream : public fstreambase, public iostream#elseclass fstream : pu%blic iostream#endif//++// FUNCTIONAL DESCRIPTION://J// This class supports formatted I/O to and from files. It uses a filebufI// to do the I/O. Common operations (such as opening and closing) can beE// done directly on streams without the explicit mention of filebufs.//--{public: fstream();& fstream(const char *name, int mode," int prot = filebuf::openprot); fstream(int fd);% fstream(int fd, char *p, int len); ~fstream(); void attach(int f&d); void close();* void open(const char *name, int mode,# int prot = filebuf::openprot) ; filebuf *rdbuf();# void setbuf(char *p, int len);}; //++// INLINED FUNCTIONS//-- inline int filebuf::__fd( )//++// FUNCTIONAL DESCRIPTION://I// Returns the file descriptor the filebuf is connected to, or EOF if the// filebuf is closed.//--{ if (__is_open())#if defined(__VMS) return streambuf::fd();#else return' m_fd;#endif else return EOF;},#if defined(__VMS) && (__VMS_VER < 70000000))inline int filebuf::fd() {return __fd();}5#endif //if defined(__VMS) && (__VMS_VER < 70000000)  #ifdef __VMSinline int filebuf::is_open( )//++// FUNCTIONAL DESCRIPTION://K// Returns non-zero when the filebuf is connected to a file descriptor, and// zero otherwise.//--{ return __is_open();}#endif inline int filebuf::__is_open( )//++// FUNCTIONAL DESCRIPTION://K// Returns non-zero when the filebuf is connected to a file descriptor, and// zero otherwise.//--{#if defined(__VMS)! return m_lcchFile_bOpen & 01;#else return m_bFileIsOpen;#endif} E#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1802)!#pragma __extern_prefix __restore#endif#pragma __environment restore#endif // __USE_STD_IOSTREAM#endif// End of fstream.hxxww)k7Ԧ// -*- C++ -*-L/*************************************************************************** *@ * fstream.cc - Definition for the Standard Library file streams */ * $Id: //stdlib/3.0-rel/include/fstream.cc#5 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Co *nsistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright + laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. Thi,s computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 U-SA. *L **************************************************************************/#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1574)E#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1829)##if defined(__HIDE_FORBIDDEN_NAMES)extern "C" int fsync(int);#endif#endif#endifE#if defined(__.VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) { %templatebasic_filebuf<_CharT, _Traits>* basic_filebuf<_CharT, _Traits>::Aopen (const char *__name, ios_base::openmode __mode, long __prot){ _RWSTD_ASSERT (0 != __name);) _RWSTD_ASSERT (this->_C_is_valid ());2 if ((__mode & ~_RWSTD_IOS_MASK) || is_open ()) return 0; / this->_C_iomode = __mode;> _C_file._C_open (__name, __mode & ~ios_base::ate, __prot);  if (!is_open ()) return 0; this->setg (0, 0, 0); this->setp (0, 0); ! if (__mode & ios_base::ate) {G if ((_C_cur_pos = _C_beg_pos = _C_file_seek (0, ios_base::end))% == _RWSTD_INVALID_FPOS) { close (); return 0; } } else. _C_cur_pos = _C_beg_pos = pos_type();  return this;}0%templatebasic_filebuf<_CharT, _Traits>*(basic_filebuf<_CharT, _Traits>::close (){) _RWSTD_ASSERT (this->_C_is_valid ()); if (!is_open ()) return 0; // failure: // avoid expensive call to overflow() unless necessaryI if (this->pptr () != this->pbase () && this->_C_is_eof (overflow ())) return 0; // failure2 // write out any unshift sequence if necessary= // (applies to multibyte, state dependent encodings only1)/ if (this->_C_out_last () && !_C_unshift ()) return 0; // failure this->setg (0, 0, 0); this->setp (0, 0); if (!_C_file._C_close ()) return 0; // failure& _C_file = _RWSTD_INVALID_FILE; 2 _C_cur_pos = _C_beg_pos = _RWSTD_INVALID_FPOS; return this;}%template streamsize,basic_filebuf<_CharT, _Traits>::showmanyc (){) _RWSTD_ASSERT (this->_C_is_valid ());O if (!this->_C_is_in () || 2!is_open () || _C_cur_pos == _RWSTD_INVALID_FPOS) return -1;1 // start with the number of chars in get area9 streamsize __retval = this->egptr () - this->gptr ();5 // no prob if this fails for non-seekable devices9 pos_type __end_pos = _C_file_seek (0, ios_base::end);+ if (__end_pos != _RWSTD_INVALID_FPOS) {> // restore position within file only if seek succeeded1 _C_file_seek (_C_cur_pos, ios_base::beg); # const _C_codecvt_t3 &__cvt =7 _USE_FACET (_C_codecvt_t, this->getloc ());$ if (__cvt.always_noconv ()) / __retval += __end_pos - _C_cur_pos; else8 // make most pessimistic conversion estimateG __retval += (__end_pos - _C_cur_pos) / __cvt.max_length (); } ' return __retval > 0 ? __retval : 0;}%template2_TYPENAME basic_filebuf<_CharT, _Traits>::int_type(basic_filebuf<_CharT, _Traits>::uflow (){4& const int_type __c = underflow ();  if (!this->_C_is_eof(__c))  this->gbump (1);  return __c;}%template2_TYPENAME basic_filebuf<_CharT, _Traits>::int_type,basic_filebuf<_CharT, _Traits>::underflow (){) _RWSTD_ASSERT (this->_C_is_valid ());6 this->setp (0, 0); // invalidate put area5 this->_C_out_last (false); // needed by close () * if (!this->_C_is_in () || !is_open()) # return5 traits_type::eof (); C char_type* const __to_end = this->_C_buffer + this->_C_bufsize;5 typedef _TYPENAME traits_type::int_type _IntType;! _IntType __ret = _IntType (); $ // fill the buffer if it's emptyM if (this->gptr () == this->egptr()) { // N.B.: gptr() could be null here G // determine the maximum possible size of putback area (if any)> // make sure putback area isn't too big - try to honor: // _RWSTD_PBACK_SIZE if 6possible, otherwise shrinkK _C_pbacksize = (min)(this->_C_putback_avail (), _RWSTD_PBACK_SIZE);. _RWSTD_ASSERT (0 != this->_C_bufsize);- if (_C_pbacksize == this->_C_bufsize)0 _C_pbacksize = this->_C_bufsize - 1;G traits_type::move (this->eback(), this->gptr () - _C_pbacksize,) _C_pbacksize); J // fill the get area from the file, performing code conversion if // necessaryA streamsi 7ze __nread = 0; // number of bytes read from file ! _C_beg_pos = _C_cur_pos;  O const _C_codecvt_t &__cvt = _USE_FACET (_C_codecvt_t, this->getloc ());& if (__cvt.always_noconv ()) { % // no conversion requiredB __nread = (__to_end - this->_C_buffer) - _C_pbacksize;F __nread = _C_file._C_read (this->_C_buffer + _C_pbacksize,D sizeof (char_type), __nread); if (__nread 8< 0)H return traits_type::eof (); // error while reading( this->setg (this->_C_buffer,7 this->_C_buffer + _C_pbacksize,B this->_C_buffer + _C_pbacksize + __nread);7 // adjust the current position in the file,> // taking into account CR/LF conversion on windows; __nread += _C_crlf_intern_count (this->gptr (),F this->gptr () + __nread);9 }% else { // conversion required 9 char __xbuf[_RWSTD_DEFAULT_BUFSIZE];/ char* __from_base = __xbuf;* const char* __from_next = 0;G char_type* __to_base = this->_C_buffer + _C_pbacksize;2 char_type* __to_next = __to_base;< state_type __state = _C_cur_pos.state ();: codecvt_base::result __res = codecvt_base::ok;+ const ctype &__ctp =? _USE_FACET (ctype, this->getloc ());K while (__to_next != __to_end && codecvt_base::error != __res) {M // read only as many characters as we have positions left in O // internal buffer - guarantees we won't read more charactersO // than we can put into the internal buffer after conversion L // and ending file position isn't in the middle of a shift // ; sequenceO // N.B.: area between __xbuf and __from_base contains partially@ // converted sequences left from previous read streamsize __n =B (min)(_RWSTD_PTRDIFF_T (__to_end - __to_next),; _RWSTD_PTRDIFF_T ( sizeof __xbufG - (__from_base - __xbuf)));H __n = _C_file._C_read (__from_base, sizeof (char), __n); if (0 > __n)H < return traits_type::eof (); // error while reading if (0 == __n)+ break; // reached eof> // take into account CR/LF conversion on Win32 __nread += __n +J _C_crlf_extern_count (__from_base, __from_base + __n);L // adjust 'n' to hold the number of external chars in buffer, __n += __from_base - __xbuf;M // convert any partially convert =ed sequence from the previousG // iteration (possibly empty) plus what we just read inM __res = __cvt.in (__state, __xbuf, __xbuf + __n, __from_next,B __to_base, __to_end, __to_next); switch (__res) {& case codecvt_base::ok:G // there may be yet unconverted elements at the endE // of the source sequence, fall through and treat6 // as part>ial (`n' below may be 0)+ case codecvt_base::partial:I // compute the length of partially converted sequence0 __n -= __from_next - __xbuf;= // copy the sequence to beginning of xbuf7 memmove (__xbuf, __from_next, __n);H // will append external chars to end of the sequence/ __from_base = __xbuf + __n; break;* case codec ?vt_base::noconv:L // note that according to lwg issue 19, codecvt::in() may not return noconv since internT and4 // externT are not the same typeM // since codecvt::always_noconv() is requiredL // to return true, this branch only executes for a user-K // defined codecvt facet with internT and externT* // being the same type @I // FIXME: do not widen external buffer just memcpy itE // to internal buffer (externT == internT)B __ctp.widen (__xbuf, __xbuf + __n, __to_base);0 __to_next = __to_base + __n; break;) case codecvt_base::error:; // failed to convert part of the bufferA // retain the part that has been successfully8 // convertedA, and disregard the rest0 __ret = traits_type::eof (); break; default:4 // bad return value from codecvt/ return traits_type::eof (); }K __to_base = __to_next; // continue at end of converted seq }' _C_cur_pos.state (__state);H this->setg (this->_C_buffer, this->_C_buffer + _C_pbacksize,# __to_next);B# } // end conversion block  if (__nread == 0)' return traits_type::eof (); _C_cur_pos += __nread; }: return traits_type::eq_int_type (__ret, _IntType ()) ?: traits_type::to_int_type (*this->gptr ()) : __ret;}%template2_TYPENAME basic_filebuf<_CharT, _Traits>::int_typeFbasic_filebuf<_CharT, _Traits>::overflow (int_type __c /* = eof () */){) _RWSTD_ASSERT (this->_C_is_valid ());>C this->setg (0, 0, 0); // invalidate the get area+ if (!this->_C_is_out () || !is_open()) # return traits_type::eof (); M const char_type* __from_beg; // pointer to start of sequence to writeK const char_type* __from_end; // pointer to end of sequence to writeB const char_type __c_to_char = traits_type::to_char_type (__c);$ if (this->_C_is_unbuffered ()) {" __from_beg = &__c_to_char;$ __from_end = __from_beg + 1; } D else {% __from_beg = this->_C_buffer;# __from_end = this->pptr (); } ; if (this->pptr () == 0 && !this->_C_is_unbuffered ()) {> // put area not valid yet - just need to initialize it: this->setp (this->_C_buffer, this->_C_buf_end ()); } / else if ( this->pptr () == this->epptr ()% || this->_C_is_eof (__c), || this->_C_is_unbuffered ()) {# // flush put area to file,3 // performing c Eode conversion if necessary I streamsize __nwrote = 0; // num chars to writeF state_type __state = _C_cur_pos.state (); // state of stream ? // N.B. the sentry constructed by the ostream currently= // seeks to the end of the file when in append mode< // but we're going to seek anyway because the user7 // can manipulate the buffer directly 5 if (this->_C_iomode & ios_base::app) 9 F _C_cur_pos = _C_file_seek (0, ios_base::end); _C_beg_pos = _C_cur_pos;O const _C_codecvt_t &__cvt = _USE_FACET (_C_codecvt_t, this->getloc ());( if (__cvt.always_noconv ()) {  // no conversion 0 __nwrote = __from_end - __from_beg;; M if (!_C_file._C_write (__from_beg, sizeof (char_type), __nwrote))O return traits_type::eof (); // error while writing G }  else { @ // conversion required: we do this a chunk at a time5 // to avoid dynamic allocation of memory < char __xbuf[_RWSTD_DEFAULT_BUFSIZE];B char* __xbuf_end = __xbuf + sizeof __xbuf;- char* __to_next = 0;- const char_type* __from_next = 0; 6 for (const char_type* __base = __from_beg;+ __from_ne Hxt != __from_end;( __base = __from_next) {2 const codecvt_base::result __res =H __cvt.out (__state, __base, __from_end, __from_next,> __xbuf, __xbuf_end, __to_next); switch (__res) {) case codecvt_base::error:G // write out the sequence successfully converted upI // to the point of the error in the internal sequence // I and failA _C_file._C_write (__base, sizeof (char_type),; __from_end - __base);/ return traits_type::eof (); * case codecvt_base::noconv:1 // write the entire sequence F if (!_C_file._C_write (__base, sizeof (char_type),@ __from_end - __base))3 return traits_type::eof ();3 J __nwrote += __from_end - __baseD + _C_crlf_intern_count (__base, __from_end);D __from_next = __from_end; // effectively 'break' break;  default:? _RWSTD_ASSERT ( codecvt_base::ok == __resF || codecvt_base::partial == __res); B // a partial conversion will result if there'sC K // not enough space in the conversion buffer toB // hold the converted sequence, but we're O.K.G // since we'll be passing any remaining unconvertedG // characters (starting at __from_next) in the next // iterationA if (!_C_file._C_write (__xbuf, sizeof (char),? __to_next - __xbuf))3 return traits_type::eof (); L 4 __nwrote += __to_next - __xbuf +A _C_crlf_extern_count (__xbuf, __to_next); } } } 2 // adjust the current position in the file _C_cur_pos += __nwrote;# _C_cur_pos.state (__state);  // reset the put area' if (!this->_C_is_unbuffered ())> this->setp (this->_C_buffer, this->_C_buf_end ()); } D // now that there's room iMn the buffer, call sputc() recursivelyC // to actually place the character in the buffer (unless we're9 // in unbuffered mode because we just wrote it out)= if (!this->_C_is_eof (__c) && !this->_C_is_unbuffered ())" this->sputc (__c_to_char);5 this->_C_out_last (true); // needed by close () & return traits_type::not_eof (__c);}%template2_TYPENAME basic_filebuf<_CharT, _Traits>::int_type8basic_filebuf<_CharT, _Traits>::Npbackfail (int_type __c){) _RWSTD_ASSERT (this->_C_is_valid ()); if (!is_open ())# return traits_type::eof ();? // we could get here if gptr = eback or if __c != *(gptr-1)% if (!this->_C_putback_avail ()) {/ // try to make a putback area available E if (this->seekoff (-1, ios_base::cur) == _RWSTD_INVALID_FPOS)' return traits_type::eof (); + if (this->_C_is_eof (underflow ()))' return traits_type::eof O();  this->gbump (1);  } O if (traits_type::eq (traits_type::to_char_type (__c), *(this->gptr () - 1))# || this->_C_is_eof (__c)) {$ // "put back" original value this->gbump (-1);* return traits_type::not_eof (__c); }" else if (this->_C_is_out ()) {2 // overwrite existing value with new value this->gbump (-1);9 *this->gptr () = traits_type::to_char_type (__c); return __c; } Pelse# return traits_type::eof ();} %template!basic_streambuf<_CharT, _Traits>*Kbasic_filebuf<_CharT, _Traits>::setbuf (char_type *__buf, streamsize __len){) _RWSTD_ASSERT (this->_C_is_valid ());D // sync the buffer to the external file so it can be deallocated if (sync () != 0) return 0;- bool __own_old_buf = this->_C_own_buf ();  if (__len > 0) { // replace the buffer... if (__buf Q== 0) {+ // ...newly allocated buffer...M __buf = new char_type[__len]; // try to allocate before deleting $ this->_C_own_buf (true); } else) // ...or with supplied buffer% this->_C_own_buf (false);  if (__own_old_buf)& delete [] this->_C_buffer; ! this->_C_buffer = __buf;! this->_C_bufsize = __len;) this->_C_set_unbuffered (false);  } Relse { // unbuffer this streamK if (__buf != 0) // invalid input (__len == 0 => __buf == 0) return 0;A // character buffer is preserved (used as get area only),2 // streambuf object unbuffered for writingK // to put a streambuf object into an unbuffered mode (see 27.8.1.4,J // p10) and affect the size of the get area, setbuf() should firstI // be called with the desired (non-zero) size and then again with! S// both arguments being 0' this->_C_set_unbuffered (true); }  this->setg (0, 0, 0); this->setp (0, 0);4 // a character buffer of nonzero size must exist // even in unbuffered mode) _RWSTD_ASSERT (0 != this->_C_buffer);* _RWSTD_ASSERT (0 != this->_C_bufsize); return this; } // 27.8.1.4, p 11%template2_TYPENAME basic_filebuf<_CharT, _Traits>::pos_type basic_filebuf<_CharT, _Traits>::Eseekoff (off_typTe __off, ios_base::seekdir __way, ios_base::openmode){) _RWSTD_ASSERT (this->_C_is_valid ()); if (!is_open ())# return _RWSTD_INVALID_FPOS;J int __width = _USE_FACET (_C_codecvt_t, this->getloc ()).encoding (); 2 // offset must be zero with multibyte encoding$ if (0 != __off && __width <= 0) # return _RWSTD_INVALID_FPOS;B // sync the buffer... (this also invalidates the get/put area) if (sync () != 0)# return _RWSTD_INVALID_FPOS;U @ // ...and, if last op was output, append an unshift sequence if (this->_C_out_last ()) _C_unshift ();  // perform the seek pos_type __new_pos; if (__width > 0): __new_pos = _C_file_seek (__width * __off, __way); else, __new_pos = _C_file_seek (0, __way);) if (__new_pos != _RWSTD_INVALID_FPOS), _C_cur_pos = _C_beg_pos = __new_pos; 4 this->_C_out_last (false); // needed by close() return __new_posV;}%template2_TYPENAME basic_filebuf<_CharT, _Traits>::pos_typeLbasic_filebuf<_CharT, _Traits>::seekpos (pos_type __pos, ios_base::openmode){ ) _RWSTD_ASSERT (this->_C_is_valid ()); if (!is_open ())# return _RWSTD_INVALID_FPOS;) // flush the output area if it exists if (this->pptr () != 0) {C if (this->_C_is_eof (this->overflow (traits_type::eof ())))' return _RWSTD_INVALID_FPOS; }C if (_C_filWe_seek (__pos, ios_base::beg) == _RWSTD_INVALID_FPOS)# return _RWSTD_INVALID_FPOS; $ _C_cur_pos = _C_beg_pos = __pos;  this->setg (0, 0, 0); this->setp (0, 0); 4 this->_C_out_last (false); // needed by close() return __pos;}%templateint'basic_filebuf<_CharT, _Traits>::sync (){) _RWSTD_ASSERT (this->_C_is_valid ()); // put area active if (this->pptr () != 0) {' // flush the buffeXr to the file= if (this->_C_is_eof (overflow (traits_type::eof ()))) return -1; }  // get area active if (this->gptr () != 0) {A // pbacksize may need to be adjusted if it's greater thanD // the available putback area (e.g., after calling putback()$ // at the end of the buffer)F _C_pbacksize = (min)(_C_pbacksize, this->_C_putback_avail ());. _RWSTD_ASSERT (0 != this->_C_bufsize);- if (_C_pbacksize == th Yis->_C_bufsize)0 _C_pbacksize = this->_C_bufsize - 1;O const _C_codecvt_t &__cvt = _USE_FACET (_C_codecvt_t, this->getloc ());( int __width = __cvt.encoding (); if (__width > 0) {= // get the number of chars consumed in the bufferK const streamoff __consumed = (this->gptr () - this->eback ())8 - _C_pbacksize;) // constant width conversion:= // adjust the current posi Ztion/state in the file,< // taking into account CR/LF conversion on Win32$ _C_cur_pos = _C_beg_pos;0 _C_cur_pos += (__width * __consumed)F + _C_crlf_intern_count (this->eback () + _C_pbacksize,6 this->gptr()); } else {M // This gets a bit tricky here because we don't know the externalA // file position corresponding to the position in theG // internal bu[ffer. To figure this out, we'll use the knownK // file position/state corresponding to the start of the bufferA // (which we have carefully saved in _C_beg_pos) and G // convert the characters up to the current position in theF // buffer, counting how many external chars result. We can@ // then use the offset from _C_beg_pos and the stateI // returned from codecvt::out() to construct the current file // position \ I streamoff __ext_chars = 0; // converted external chars < char __xbuf[_RWSTD_DEFAULT_BUFSIZE];B char* __xbuf_end = __xbuf + sizeof __xbuf;- char* __to_next = 0;- const char_type* __from_next = 0;9 const char_type* __from_end = this->gptr ();? state_type __state = _C_beg_pos.state ();I const char_type* __base = this- ]>eback () + _C_pbacksize; / while (__from_next != __from_end) {2 const codecvt_base::result __res =H __cvt.out (__state, __base, __from_end, __from_next,> __xbuf, __xbuf_end, __to_next); switch (__res) {) case codecvt_base::error: return -1;* case codecvt_base::noconv:: __ext_chars += (__from_end - __base) +B ^ _C_crlf_intern_count ( __base,__from_end);D __from_next = __from_end; // effectively 'break' break;9 default: // __res = ok or partialB // take into account CR/LF conversion on Win329 __ext_chars += (__to_next - __xbuf) +A _C_crlf_extern_count (__xbuf, __to_next); }) // repeat with next chunk' __base = __from__next; }2 _C_cur_pos = _C_beg_pos + __ext_chars;' _C_cur_pos.state (__state); }L if (_C_file_seek (_C_cur_pos, ios_base::beg) == _RWSTD_INVALID_FPOS) return -1;G traits_type::move (this->eback(), this->gptr () - _C_pbacksize,) _C_pbacksize);@ this->setg (this->eback(), this->eback() + _C_pbacksize,2 this->eback() + _C_pbacksize); } _C_beg_pos = _C_`cur_pos; this->setp (0, 0);#ifndef _RWSTD_NO_EXT_FILEBUFE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1574)* if ( this->_C_iomode & ios_base::out ) {9 if ( _RWsync_with_device ) ::fsync( this->fd() ); }#endif#endif //_RWSTD_NO_EXT_FILEBUF return 0;}%template streamsizeObasic_filebuf<_CharT, _Traits>::xsputn (const char_type* __s, streamsize __len){) _RWSTD_ASSERT (this->_C_is_valid (a));4 if (!__s || (__len == 0) || !this->_C_is_out ()) return 0;I if (this->pptr () != 0 && (this->pptr () + __len) < this->epptr ()) {6 traits_type::copy (this->pptr (), __s, __len);! this->pbump (int(__len)); } else {= for (streamsize __n = 0; __n < __len; ++__n, ++__s) {5 if (this->_C_is_eof (this->sputc (*__s))) return __n; } } return __len;}%templatebasic_filebuf<_CharT, _Traits>*Abasic_filebuf<_CharT, _Traits>::_C_open (_RW::__rw_file_t __frep,: char_type *__buf,: streamsize __n) { C if (is_open () || !setbuf (__buf,__n) || !__frep._C_is_open ()) return 0; _C_file = __frep;- this->_C_iomode = _C_file._C_get_mode (); this->setg (0, 0, 0); this->setp (0, 0); L _C_cur_pos = _C_beg_pos = pos_type(); // coffset == 0, state = state()  return this;}?// write out an unshift sequence if not in initial shift state%templatebool-basic_filebuf<_CharT, _Traits>::_C_unshift (){K const _C_codecvt_t &__cvt = _USE_FACET (_C_codecvt_t, this->getloc ());F // unshifting isn't necessary if encoding isn't state dependent orH // if state is equivalent to initial state (determined by unshift()) if (__cvt.encoding () >= 0) return true;d < // buf to hold unshift sequence - assumes that the shift; // sequence will be less than 64 chars (we can't safely< // use dynamic allocation because this function could be4 // called as a result of memory alloc exception) char __useq [64]; char* __useq_end = 0;- state_type __state = _C_cur_pos.state ();& const codecvt_base::result __res =L __cvt.unshift (__state, __useq, __useq + sizeof __useq, __useq_end);3 const streamoff __nbytes = _e_useq_end - __useq; E // in the unlikely event that the buffer isn't big enough, assert4 _RWSTD_ASSERT (__res != codecvt_base::partial);  % if (__res == codecvt_base::error) return false; // & if (__res == codecvt_base::noconv) return true;; if (_C_file._C_write (__useq, sizeof (char), __nbytes)) return false;E _C_cur_pos += __nbytes; // CR/LF conversion not an issue here  return true;}} // namespa ce stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endifwwgyl7Ԧ// -*- C++ -*-L/*************************************************************************** *I * fstream -- Declarations for the Standard Library file bufs and streams *, * $Id: //stdlib/3.0-rel/include/fstream#2 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copyi hng. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. cop iyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rightsj. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 8k0301 USA. *L **************************************************************************/#ifndef _RWSTD_FSTREAM_INCLUDED#define _RWSTD_FSTREAM_INCLUDED#include '#ifndef _RWSTD_NO_REDUNDANT_DEFINITIONS# include # include +#endif // _RWSTD_NO_REDUNDANT_DEFINITIONS #include #include #include #include #ifndef __USE_STD_IOSTREAM{#error "cannot includel fstream -- define __USE_STD_IOSTREAM to override default - see section 7.1.2 of the C++ Using Guide"#else#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif6#define _RWSTD_INVALID_FPOS pos_type (off_type (-1)),#define _RWSTD_PmBACK_SIZE streamsize (4)_RWSTD_NAMESPACE (std) { %template<class basic_filebuf: public basic_streambuf<_CharT, _Traits>{public:6 typedef _CharT char_type;8 typedef _Traits traits_type;5 typedef _TYPENAME traits_type::int_type int_type;5 typedef _TYPENAME traits_type::pos_type pos_type;5 typedef _TYPENAME traits_type::off_type off_type; // 27.8.1.2, p1 basic_filebuf ()n. : basic_streambuf<_CharT, _Traits> (),( _C_file (_RWSTD_INVALID_FILE),+ _C_cur_pos (_RWSTD_INVALID_FPOS),+ _C_beg_pos (_RWSTD_INVALID_FPOS), _C_pbacksize (0)#ifndef _RWSTD_NO_EXT_FILEBUFE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1574)" ,_RWsync_with_device (0)#endif#endif //_RWSTD_NO_EXT_FILEBUF {+ setbuf (0, _RWSTD_DEFAULT_BUFSIZE); }4#if defined (_RWSTD_NOo_EXT_FILEBUF) \4 && !defined (_RWSTD_NO_STATIC_IOSTREAM_INIT) \0 && (!defined (__GNUG__) || _GNUC_MINOR > 96)private:M // g++ 2.95 error: `std::ios_base::Init' does not declare a template type friend class ios_base::Init;D#endif // _RWSTD_NO_EXT_FILEBUF && !_RWSTD_NO_STATIC_IOSTREAM_INIT= // ctor extensions - associate this with an open file and= // optionally set buffer size and caller-allocated buffer5 // NOTE: passed in buffer will NOT be de pallocated _EXPLICIT4 basic_filebuf (int __fd, char_type* __buf = 0,? streamsize __bufsz = _RWSTD_DEFAULT_BUFSIZE)1 : basic_streambuf+ (_RW::__rw_file_t::_C_get_mode (__fd)), _C_file (__fd),) _C_cur_pos (_RWSTD_INVALID_FPOS),) _C_beg_pos (_RWSTD_INVALID_FPOS), _C_pbacksize (0)#ifndef _RWSTD_NO_EXT_FILEBUFE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1574) ,_RWsyqnc_with_device (0)#endif#endif //_RWSTD_NO_EXT_FILEBUF { setbuf (__buf, __bufsz); }public:#ifndef _RWSTD_NO_EXT_FILEBUF _EXPLICIT5 basic_filebuf (FILE *__fptr, char_type* __bf = 0,> streamsize __bfsz = _RWSTD_DEFAULT_BUFSIZE)2 : basic_streambuf- (_RW::__rw_file_t::_C_get_mode (__fptr)), _C_file (__fptr),) _C_cur_pos (_RWSTD_INVALID_FPOS),) _C_beg_posr (_RWSTD_INVALID_FPOS), _C_pbacksize (0)E#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1574)" ,_RWsync_with_device (0)#endif { setbuf (__bf,__bfsz); }#endif //_RWSTD_NO_EXT_FILEBUF // 27.8.1.2, p3 virtual ~basic_filebuf ();< // 27.8.1.3, p2 (last optional argument is an extension)* basic_filebuf*F open (const char *__name, ios_base::openmode, long __prot = 0666);s #ifndef _RWSTD_NO_EXT_FILEBUF8 // extensions - associate this with an open file and= // optionally set buffer size and caller-allocated buffer5 // NOTE: passed in buffer will NOT be deallocated* basic_filebuf*) open (int __fd, char_type *__buf = 0,8 streamsize __bufsz = _RWSTD_DEFAULT_BUFSIZE) {0 return (_C_open (__fd, __buf, __bufsz)); }* basic_filebuf*- open (FILE *__fptr, char_type *_t_buf = 0,8 streamsize __bufsz = _RWSTD_DEFAULT_BUFSIZE) {2 return (_C_open (__fptr, __buf, __bufsz)); } . // extension - return the file descriptor. int fd () const {% return _C_file._C_get_fd ( ); }E#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1574)= // extension - instructs the library to call ::fsync() on? // basic_ostream::flush method and std::endl and std::flush // manipulatorsC bool __sync_with_devuice() const { return _RWsync_with_device; }' bool __sync_with_device(bool state) {0 bool previous_state = _RWsync_with_device;" _RWsync_with_device = state; return previous_state; }#endif#endif //_RWSTD_NO_EXT_FILEBUF  // 27.8.1.3, p64 basic_filebuf* close (); // 27.8.1.3, p1 bool is_open () const {% return _C_file._C_is_open (); } protected: // 27.8.1.4, p1$ virtual streamsizev showmanyc (); // 27.8.1.4, p3" virtual int_type underflow (); // 27.8.1.4, p4 virtual int_type uflow (); // 27.8.1.4, p8? virtual int_type overflow (int_type = traits_type::eof ()); // 27.8.1.4, p5@ virtual int_type pbackfail (int_type = traits_type::eof ()); // 27.8.1.4, p10 E // setbuf (0, 0) sets unbuffered mode (safe to use at any time)H // setbuf (0, N) sets buffered mode with internal buffer of size NG // setbuf (b, N) w set buffered mode with user-allocated buffer `b'F // of size `N' (user responsible for deallocation)4 virtual basic_streambuf* $ setbuf (char_type*, streamsize);  // 27.8.1.4, p11O virtual pos_type seekoff (off_type, ios_base::seekdir, ios_base::openmode =< ios_base::in | ios_base::out); // 27.8.1.4, p14< virtual pos_type seekpos (pos_type, ios_base::openmode =< ios_xbase::in | ios_base::out);B // 27.8.1.4, p16 - in input mode, repopulates buffer from file virtual int sync ();= virtual streamsize xsputn (const char_type*, streamsize);private: // for convenience< typedef _TYPENAME traits_type::state_type state_type;> typedef codecvt _C_codecvt_t;* basic_filebuf*. _C_open (_RW::__rw_file_t, char_type* = 0,2 streamsize = _RWSTD_DEFAULT_BUFSIZE);7 ypos_type _C_file_seek (off_type __off, int __way) {. return _C_file._C_seek (__off, __way); }K // count newlines in char sequence to handle CR/LF translation on win329 // calculates seek offsets in external representationC off_type _C_crlf_extern_count (const char*, const char*) const; 9 // calculates seek offsets in internal representationM off_type _C_crlf_intern_count (const char_type*, const char_type*) const;M // write unshift sequence to file z(multibyte, state-dependent encondings) bool _C_unshift (); N _RW::__rw_file_t _C_file; // underlying FILE ptr or file descriptorM pos_type _C_cur_pos; // offset/state in file corresponding toO // end of buffer, and actual pos in file M pos_type _C_beg_pos; // offset/state in file corresponding to= // beginning of buffer D streamsize _C_pbacksize; // curren{t size of putback area#ifndef _RWSTD_NO_EXT_FILEBUFE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1574)) bool _RWsync_with_device;#endif#endif //_RWSTD_NO_EXT_FILEBUF};%template8inline basic_filebuf<_CharT, _Traits>::~basic_filebuf (){ close (); if (this->_C_own_buf ())" delete [] this->_C_buffer;}%template9inline _TYPENAME basic_filebuf<_CharT, _Traits>:|:off_type basic_filebuf<_CharT, _Traits>::F_C_crlf_extern_count (const char* __start, const char* __finish) const{( _RWSTD_ASSERT (__start <= __finish); off_type __n = 0;#ifdef _RWSTD_CRLF_CONVENTION0 if (!(this->_C_iomode & ios_base::binary)) {# while (__start != __finish)9 if (char_traits::eq ('\n', *__start++)) ++__n; }/#else // if !defined (_RWSTD_CRLF_CONVENTION) _RWSTD_UNUSED (__start); _RWSTD_UNUSE}D (__finish);"#endif // _RWSTD_CRLF_CONVENTION return __n;}%template9inline _TYPENAME basic_filebuf<_CharT, _Traits>::off_type basic_filebuf<_CharT, _Traits>::/_C_crlf_intern_count (const char_type* __start,6 const char_type* __finish) const{( _RWSTD_ASSERT (__start <= __finish); off_type __n = 0;#ifdef _RWSTD_CRLF_CONVENTION0 if (!(this->_C_iomode & ios_base::binary)) {= const char_type __~eol = _USE_FACET (ctype,J this->getloc ()).widen ('\n');# while (__start != __finish)4 if (traits_type::eq (__eol, *__start++)) ++__n; }/#else // if !defined (_RWSTD_CRLF_CONVENTION) _RWSTD_UNUSED (__start); _RWSTD_UNUSED (__finish);"#endif // _RWSTD_CRLF_CONVENTION return __n;}%template;class basic_ifstream: public basic_istream<_Char T, _Traits>{public:6 typedef _CharT char_type;8 typedef _Traits traits_type;5 typedef _TYPENAME traits_type::int_type int_type;5 typedef _TYPENAME traits_type::pos_type pos_type;5 typedef _TYPENAME traits_type::off_type off_type;? // NOTE: the ctors below pass the address of an unitialized> // member variable, _C_filebuf, to a base class ctor= // the variable will be initialized only *after* the base // class ctor returns basic_ifstream ()> : basic_istream (rdbuf ()) { }8 _EXPLICIT basic_ifstream (const char *__name,G ios_base::openmode __mode = ios_base::in,? long __prot = 0666)< : basic_istream (rdbuf ()) {& open (__name, __mode, __prot); }#ifndef _RWSTD_NO_EXT_FILEBUFC // extensions - associate this with an open file and set buffer3 basic_ifstream (int __fd, char_type *__buf = 0,< streamsize __n = _RWSTD_DEFAULT_BUFSIZE)< : basic_istream (rdbuf ()) { open (__fd, __buf, __n); }7 basic_ifstream (FILE *__fptr, char_type *__buf = 0,< streamsize __n = _RWSTD_DEFAULT_BUFSIZE)< : basic_istream (rdbuf ()) {" open (__fptr, __buf, __n); }#endif //_RWSTD_NO_EXT_FILEBUF D // NOTE: the pointer returned from rdbuf() may be different fromD // the one passed to basic_ios<>::rdbuf (basic_filebuf<>*): basic_filebuf* rdbuf() const {* // necessary to help SunPro 5.0/T9D typedef basic_ifstream __self_type;C return &_RWSTD_CONST_CAST (__self_type*, this)->_C_filebuf; } bool is_open () const {$ return rdbuf ()->is_open (); }* void open (con st char *__name,9 ios_base::openmode __mode = ios_base::in,3 long __prot = 0666) {L this->clear (rdbuf ()->open (__name, __mode |= ios_base::in, __prot)> ? ios_base::goodbit : ios_base::failbit); }#ifndef _RWSTD_NO_EXT_FILEBUFC // extensions - associate this with an open file and set buffer, void open (int __fd, char_type *__buf=0,7 streamsize __n=_RWSTD_DEFAULT_BUFSIZE) {8  this->clear (rdbuf ()->open (__fd, __buf, __n) ?< ios_base::goodbit : ios_base::failbit); }0 void open (FILE *__fptr, char_type *__buf=0,8 streamsize __n= _RWSTD_DEFAULT_BUFSIZE) {: this->clear (rdbuf ()->open (__fptr, __buf, __n) ?< ios_base::goodbit : ios_base::failbit); }#endif //_RWSTD_NO_EXT_FILEBUF void close () { if (!rdbuf ()->close ())/ this->setstate (ios_base::failbit); }private:5 basic_filebuf _C_filebuf;};%template;class basic_ofstream: public basic_ostream<_CharT, _Traits>{public:6 typedef _CharT char_type;8 typedef _Traits traits_type;5 typedef _TYPENAME traits_type::int_type int_type;5 typedef _TYPENAME traits_type::pos_type pos_type;5 typedef _TYPENAME traits_type::off_type off_type;? // NOTE: the cto rs below pass the address of an unitialized> // member variable, _C_filebuf, to a base class ctor= // the variable will be initialized only *after* the base // class ctor returns basic_ofstream ()> : basic_ostream (rdbuf ()) { }9 _EXPLICIT basic_ofstream (const char *__name,I ios_base::openmode __mode = ios_base::out,@ long __prot = 0666)< : basic_ostream (rdbuf ()) {& open (__name, __mode, __prot); }#ifndef _RWSTD_NO_EXT_FILEBUFC // extensions - associate this with an open file and set buffer1 basic_ofstream (int __fd, char_type *__buf=0,; streamsize __n= _RWSTD_DEFAULT_BUFSIZE)< : basic_ostream (rdbuf ()) { open (__fd, __buf, __n); } 5 basic_ofstream (FILE *__fptr, char_type *__buf=0,; streamsize __n= _RWSTD_DEFAULT_BUFSIZE)< : basic_ostream (rdbuf ()) {" open (__fptr, __buf, __n); }#endif //_RWSTD_NO_EXT_FILEBUF D // NOTE: the pointer returned from rdbuf() may be different fromD // the one passed to basic_ios<>::rdbuf (basic_filebuf<>*); basic_filebuf* rdbuf () const {* // necessary to help SunPro 5.0/T9? typedef basic_ofstream _SelfT;>  return &_RWSTD_CONST_CAST (_SelfT*, this)->_C_filebuf; } bool is_open () const {$ return rdbuf ()->is_open (); } * void open (const char *__name,: ios_base::openmode __mode = ios_base::out,3 long __prot = 0666) {M this->clear (rdbuf ()->open (__name, __mode |= ios_base::out, __prot)> ? ios_base::goodbit : ios_base::failbit); }#ifndef _RWSTD_NO_EXT_FILEBUFC // extensions - associate this with an open file and set buffer- void open (int __fd, char_type *__buf=0,7 streamsize __n=_RWSTD_DEFAULT_BUFSIZE) {8 this->clear (rdbuf ()->open (__fd, __buf, __n) ?< ios_base::goodbit : ios_base::failbit); }. void open (FILE *__fp, char_type *__buf=0,8 streamsize __n= _RWSTD_DEFAULT_BUFSIZE) {8 this->clear (rdbuf ()->open (__fp, __buf, __n) ?< ios_base::goodbit : ios_base::failbit); }#endif //_RWSTD_NO_EXT_FILEBUF  void close() { if (!rdbuf ()->close ())/ this->setstate (ios_base::failbit); }private:5 basic_filebuf _C_filebuf;};%template;class basic_fstream: public basic_iostream<_CharT, _Traits>{public:6 typedef _CharT char_type;8 typedef _Traits traits_type;5 typedef _TYPENAME traits_type::int_type int_type;5 typedef _TYPENAME traits_type::pos_type pos_type;5 typedef _TYPENAME traits_type::off_type off_type;? // NOTE: the ctors below pass the address of an unitialized> // member variable, _C_filebuf, to a base class ctor= // the variable will be initialized only *after* the base // class ctor returns basic_fstream ()> : basic_iostream(rdbuf ()) { } _EXPLICIT. basic_fstream (const  char *__name,M ios_base::openmode __mode = ios_base::in | ios_base::out,5 long __prot = 0666)< : basic_iostream(rdbuf ()) {& open (__name, __mode, __prot); }#ifndef _RWSTD_NO_EXT_FILEBUFC // extensions - associate this with an open file and set buffer0 basic_fstream (int __fd, char_type *__buf=0,; streamsize __n = _RWSTD_DEFAULT_BUFSIZE)< : basic_iostream(rdbuf ()) { open (__fd, __buf, __n); }4 basic_fstream (FILE *__fptr, char_type *__buf=0,; streamsize __n = _RWSTD_DEFAULT_BUFSIZE)< : basic_iostream(rdbuf ()) {" open (__fptr, __buf, __n); }#endif //_RWSTD_NO_EXT_FILEBUFD // NOTE: the pointer returned from rdbuf() may be different fromD // the one passed to basic_ios<>::rdbuf (basic_filebuf<>*): basic_filebuf<char_type, traits_type>* rdbuf() const {* // necessary to help SunPro 5.0/T9> typedef basic_fstream _SelfT;> return &_RWSTD_CONST_CAST (_SelfT*, this)->_C_filebuf; } bool is_open () const {$ return rdbuf ()->is_open (); }* void open (const char *__name,I ios_base::openmode __mode = ios_base::in | ios_base::out,3 long __prot = 0666) {< this->clear (rdbuf ()->open (__name, __mode, __prot)> ? ios_base::goodbit : ios_base::failbit); }#ifndef _RWSTD_NO_EXT_FILEBUFD // extensions - associate this with an open file and set buffer", void open (int __fd, char_type *__buf=0,8 streamsize __n= _RWSTD_DEFAULT_BUFSIZE) {8 this->clear (rdbuf ()->open (__fd, __buf, __n) ?< ios_base::goodbit : ios_base::failbit); } 0 void open (FILE *__fptr, char_type *__buf=0,8  streamsize __n= _RWSTD_DEFAULT_BUFSIZE) {: this->clear (rdbuf ()->open (__fptr, __buf, __n) ?< ios_base::goodbit : ios_base::failbit); }#endif //_RWSTD_NO_EXT_FILEBUF void close () { if (!rdbuf ()->close ())/ this->setstate (ios_base::failbit); }private:5 basic_filebuf _C_filebuf;};)_RWSTD_INSTANTIATE_2 (class _RWSTD_EXPORT? basic_filebuf >);#ifndef _RWSTD_NO_WCHAR_T)_RWSTD_INSTANTIATE_2 (class _RWSTD_EXPORTE basic_filebuf >);#endif // _RWSTD_NO_WCHAR_T} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif*#if _RWSTD_DEFINE_TEMPLATE (BASIC_FILEBUF)# include #endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif#endif // __USE_STD_IOSTREAM##endif // _RWSTD_FSTREAM_INCLUDEDwwG7l7Ԧ// -*- C++ -*-L/*************************************************************************** *) * functional - global template functions */ * $Id: //stdlib/3.0-rel/include/functional#2 $ *L *************************************************************************** * > * Copyright 2002 Compaq Information Technologies Group, L.P. *C * Compaq and the Compaq logo are trademarks of Compaq Information@ * Technologies Group, L.P. in the U.S. and/or other countries. *J * Confidential computer software. Valid license from Compaq required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** * * Copyright (c) 1994 * Hewlett-Packard Company *E * Permi ssion to use, copy, modify, distribute and sell this softwareG * and its documentation for any purpose is hereby granted without fee,D * provided that the above copyright notice appear in all copies andD * that both that copyright notice and this permission notice appearA * in supporting documentation. Hewlett-Packard Company makes noA * representations about the suitability of this software for anyH * purpose. It is provided "as is" without express or implied warranty. *L ************* ************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms o f suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/"#ifndef _RWSTD_FUNCTIONAL_INCLUDED"#define _RWSTD_FUNCTIONAL_INCLUDED!#include #include #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) { !// 20.3.2 - Arithmetic operations // 20.3.2, p2template 5struct plus : binary_function<_TypeT, _TypeT, _TypeT>{: _RWSTD_BINARY_FUNCTION_TYPES (_TypeT, _TypeT, _TypeT);< result_type operator() (const first_argument_type &__x,D const second_argument_type &__y) const { return __x + __y; }}; // 20.3.2, p3template 6struct minus : binary_function<_TypeT, _TypeT, _TypeT>{: _RWSTD_BINARY_FUNCTION_TYPES (_TypeT, _TypeT, _TypeT);< result_type operator() (const first_argument_type &__x,D const second_argument_type &__y) const { return __x - __y; }}; // 20.3.2, p4template ;struct multiplies : binary_function<_TypeT, _TypeT, _TypeT>{: _RWSTD_BINARY_FUNCTION_TYPES (_TypeT, _TypeT, _TypeT);< result_type operator() (const first_argument_type &__x,D const second_argument_type &__y) const { return __x * __y; }}; // 20.3.2, p5template 8struct divides : binary_function<_TypeT, _TypeT, _TypeT>{: _RWSTD_BINARY_FUNCTION_TYPES (_TypeT, _TypeT, _TypeT);< result_type operator() (const first_argument_type &__x,D const second_argument_type &__y) const { return __x / __y; }}; // 20.3.2, p6template 8struct modulus : binary_function<_TypeT, _TypeT, _TypeT>{: _RWSTD_BINARY_FUNCTION_TYPES (_TypeT, _TypeT, _TypeT);< result_type operator() (const first_argument_type &__x,D const second_argument_type &__y) const { return __x % __y; }}; // 20.3.2, p7template .struct negate : unary_function<_TypeT, _TypeT>{1 _RWSTD_UNARY_FUNCTION_TYPES (_TypeT, _TypeT);= result_type operator() (const argument_type &__x) const { return -__x; }};// 20.3.3 - Comparisons // 20.3.3, p2template 7struct equal_to : binary_function<_TypeT, _TypeT, bool>{8 _RWSTD_BINARY_FUNCTION_TYPES (_TypeT, _TypeT, bool);< result_type operator() (const first_argument_type &__x,D const second_argument_type &__y) const { return __x == __y; }}; // 20.3.3, p3template ;struct not_equal_to : binary_function<_TypeT, _TypeT, bool>{8 _RWSTD_BINARY_FUNCTION_TYPES (_TypeT, _TypeT, bool);< result_type operator() (const first_argument_type &__x,D const second_argument_type &__y) const { return __x != __y; }}; // 20.3.3, p4template 6struct greater : binary_function<_TypeT, _TypeT, bool>{8 _RWSTD_BINARY_FUNCTION_TYPES (_TypeT, _TypeT, bool);< result_type operator() (const first_argument_type &__x,D const second_argument_type &__y) const { return __x > __y; }};(// 20.3.3, p5 - defined in <_funcbase.h>template struct less; // 20.3.3, p6template <struct greater_equal : binary_function<_TypeT, _TypeT, bool>{8 _RWSTD_BINARY_FUNCTION_TYPES (_TypeT, _TypeT, bool);< result_type operator() (const first_argument_type &__x,D const second_argument_type &__y) const { return __x >= __y; }}; // 20.3.3, p7template 9struct less_equal : binary_function<_TypeT, _TypeT, bool>{8 _RWSTD_BINARY_FUNCTION_TYPES (_TypeT, _TypeT, bool);< result_type operator() (const first_argument_type &__x,D  const second_argument_type &__y) const { return __x <= __y; }};// 20.3.4 - Logical operations // 20.3.4, p2template :struct logical_and : binary_function<_TypeT, _TypeT, bool>{8 _RWSTD_BINARY_FUNCTION_TYPES (_TypeT, _TypeT, bool);< result_type operator() (const first_argument_type &__x,D const second_argument_type &__y) const { return __x && __y; }}; // 20.3.4, p3template <class _TypeT>9struct logical_or : binary_function<_TypeT, _TypeT, bool>{8 _RWSTD_BINARY_FUNCTION_TYPES (_TypeT, _TypeT, bool);< result_type operator() (const first_argument_type &__x,D const second_argument_type &__y) const { return __x || __y; }}; // 20.3.4, p4template 1struct logical_not : unary_function<_TypeT, bool>{/ _RWSTD_UNARY_FUNCTION_TYPES (_TypeT, bool);6 result_type operator() (const _TypeT &__x) const { return !__x; }};// 20.3.5 - Negators // 20.3.5, p2template class unary_negateF : public unary_function<_TYPENAME _Predicate::argument_type, bool>{ _Predicate _C_pred;public:L _RWSTD_UNARY_FUNCTION_TYPES (_TYPENAME _Predicate::argument_type, bool);L _EXPLICIT unary_negate (const _Predicate &__pred) : _C_pred (__pred) { }= result_type operator() (const argument_type &__x) const { return !_C_pred (__x); }}; // 20.3.5, p3template ?inline unary_negate<_Predicate> not1 (const _Predicate &__pred){, return unary_negate<_Predicate>(__pred);} // 20.3.5, p4template class binary_negateG : public binary_function<_TYPENAME _Predicate::first_argument_type,N _TYPENAME _Predicate::second_argument_type, bool>{ _Predicate _C_pred;public:L _RWSTD_BINARY_FUNCTION_TYPES (_TYPENAME _Predicate::first_argument_type,M _TYPENAME _Predicate::second_argument_type,( bool);M _EXPLICIT binary_negate (const _Predicate &__pred) : _C_pred (__pred) { }< result_type operator() (const first_argument_type &__x,D const second_argument_type &__y) const {# return !_C_pred (__x, __y); }}; // 20.3.5, p5template @inline binary_negate<_Predicate> not2 (const _Predicate &__pred){- return binary_negate<_Predicate>(__pred);}// 20.3.6 - Binders // 20.3.6.1template class binder1stG : public unary_function<_TYPENAME _Operation::second_argument_type,> _TYPENAME _Operation::result_type>{ protected:1 _Operation op;4 _TYPENAME _Operation::first_argument_type value;public:L _RWSTD_UNARY_FUNCTION_TYPES (_TYPENAME _Operation::second_argument_type,D _TYPENAME _Operation::result_type);G binder1st (const _Operation &__oper,D const _TYPENAME _Operation::first_argument_type &__x)& : op (__oper), value (__x) { } result_type1 operator() (const argument_type &__y) const { return op (value, __y); }3#if defined(__DECCXX) && !defined(__DECFIXCXXL1633)H _TYPENAME unary_function<_TYPENAME _Operation::second_argument_type,5 _TYPENAME _Operation::result_type>::result_typeT operator() (_TYPENAME unary_function<_TYPENAME _Operation::second_argument_type,K _TYPENAME _Operation::result_type>::argument_type& x) const { return op(value, x);  }#endif}; // 20.3.6.2)template inline binder1st<_Operation>5bind1st (const _Operation &__oper, const _TypeT &__x){J typedef _TYPENAME _Operation::first_argument_type first_argument_type;D return binder1st<_Operation>(__oper, first_argument_type (__x));} // 20.3.6.3template class binder2ndF : public unary_function<_TYPENAME _Operation::first_argument_type,> _TYPENAME _Operation::result_type>{ protected:2 _Operation op;5 _TYPENAME _Operation::second_argument_type value;public:K _RWSTD_UNARY_FUNCTION_TYPES (_TYPENAME _Operation::first_argument_type,D  _TYPENAME _Operation::result_type);H binder2nd (const _Operation &__oper,E const _TYPENAME _Operation::second_argument_type &__y)& : op (__oper), value (__y) { } result_type1 operator() (const argument_type &__x) const { return op (__x, value); }3#if defined(__DECCXX) && !defined(__DECFIXCXXL1633)G _TYPENAME unary_function<_TYPENAME _Operation::first_argument_type,5 _TYPENAME _Operation::result_type>::result_typeS operator() (_TYPENAME unary_function<_TYPENAME _Operation::first_argument_type,K _TYPENAME _Operation::result_type>::argument_type& x) const { return op(x, value);  }#endif}; // 20.3.6.4)template inline binder2nd<_Operation>5bind2nd (const _Operation &__oper, const _TypeT &__x){L typedef _TYPENAME _Operation::second_argument_type second_argument_type;E return binder2nd<_Operation>(__oper, second_argument_type (__x));}.// 20.3.7 - Adaptors for pointers to functions // 20.3.7, p2$template @struct pointer_to_unary_function : unary_function<_Arg, _Result>{0 _RWSTD_UNARY_FUNCTION_TYPES (_Arg, _Result);M _EXPLICIT pointer_to_unary_function (result_type (*__fun)(argument_type)) : _C_fn (__fun) {}6 result_type operator() (argument_type __x) const { return _C_fn (__x); }private:( result_type (*_C_fn)(argument_type);}; // 20.3.7, p3$template /inline pointer_to_unary_function<_Arg, _Result> ptr_fun (_Result (*__fun)(_Arg)){; return pointer_to_unary_function<_Arg, _Result>(__fun);} // 20.3.7, p42template !struct pointer_to_binary_function, : binary_function<_Arg1, _Arg2, _Result>{9 _RWSTD_BINARY_FUNCTION_TYPES (_Arg1, _Arg2, _Result); _EXPLICITI pointer_to_binary_function (result_type (*__fun)(first_argument_type,J second_argument_type)) : _C_fn (__fun) { }4 result_type operator() (first_argument_type __x,= second_argument_type __y) const { return _C_fn (__x, __y); }private:D result_type (*_C_fn)(first_argument_type, second_argument_type);}; // 20.3.7, p52template 8inline pointer_to_binary_function<_Arg1, _Arg2, _Result>(ptr_fun (_Result (*__fun)(_Arg1, _Arg2)){D return pointer_to_binary_function<_Arg1, _Arg2, _Result>(__fun);},// 20.3.8 - Adaptors for pointers to membersK// 20.3.8, p2 - adaptor for a non-const member function taking no arguments<// operating on a pointer to a non-const object&template 2struct mem_fun_t: unary_function<_TypeT*, _Result>{3 _RWSTD_UNARY_FUNCTION_TYPES (_TypeT*, _Result);L _EXPLICIT mem_fun_t (result_type (_TypeT::*__fun)()) : _C_fn (__fun) { }6 result_type operator() (argument_type __x) const { return (__x->*_C_fn)(); }private:# result_type (_TypeT::*_C_fn)();};K// 20.3.8, p3 - adaptor for a non-const member function taking one argument<// operating on a pointer to a non-const object2template :struct mem_fun1_t: binary_function<_TypeT*, _Arg, _Result>{:  _RWSTD_BINARY_FUNCTION_TYPES (_TypeT*, _Arg, _Result); _EXPLICITC mem_fun1_t (result_type (_TypeT::*__fun)(second_argument_type)) : _C_fn (__fun) { }5 result_type operator() (first_argument_type __x,= second_argument_type __y) const {" return (__x->*_C_fn)(__y); }private:7 result_type (_TypeT::*_C_fn)(second_argument_type);}; // 20.3.8, p4&template Finline mem_fun_t<_Result, _TypeT> mem_fun (_Result (_TypeT::*__fun)()){- return mem_fun_t<_Result, _TypeT>(__fun);}2template (inline mem_fun1_t<_Result, _TypeT, _Arg>(mem_fun (_Result (_TypeT::*__fun)(_Arg)){4 return mem_fun1_t<_Result, _TypeT, _Arg>(__fun);}K// 20.3.8, p5 - adaptor for a non-const member function taking no arguments/// operating on a non-const object&template 5struct mem_fun_ref_t: unary_function<_TypeT, _Result>{2 _RWSTD_UNARY_FUNCTION_TYPES (_TypeT, _Result);P _EXPLICIT mem_fun_ref_t (result_type (_TypeT::*__fun)()) : _C_fn (__fun) { }7 result_type operator() (argument_type &__x) const { return (__x.*_C_fn)(); }private:# result_type (_TypeT::*_C_fn)();};K// 20.3.8, p6 - adaptor for a non-const member function taking one argument/// operating on a non-const object2template >struct mem_fun1_ref_t : binary_function<_TypeT, _Arg, _Result>{9 _RWSTD_BINARY_FUNCTION_TYPES (_TypeT, _Arg, _Result); _EXPLICITG mem_fun1_ref_t (result_type (_TypeT::*__fun)(second_argument_type)) : _C_fn (__fun) { }6 result_type operator() (first_argument_type &__x,> second_argument_type __y) const {! return (__x.*_C_fn)(__y); }private:7 result_type (_TypeT::*_C_fn)(second_argument_type);}; // 20.3.8, p7&template %inline mem_fun_ref_t<_Result, _TypeT>'mem_fun_ref(_Result (_TypeT::*__fun)()){1 return mem_fun_ref_t<_Result, _TypeT>(__fun);}2template ,inline mem_fun1_ref_t<_Result, _TypeT, _Arg>+mem_fun_ref(_Result (_TypeT::*__fun)(_Arg)){9 return mem_fun1_ref_t<_Result, _TypeT, _Arg> (__fun);}G// 20.3.8, p8 - adaptor for a const member function taking no arguments+// operating on a const object&template >struct const_mem_fun_t: unary_function{9 _RWSTD_UNARY_FUNCTION_TYPES (const _TypeT*, _Result);D _EXPLICIT const_mem_fun_t (result_type (_TypeT::*__fun)() const) : _C_fn (__fun) { }6 result_type operator() (argument_type __x) const { return (__x->*_C_fn)(); }private:) result_type (_TypeT::*_C_fn)() const;};G// 20.3.8, p9 - adaptor for a const member function taking  one argument+// operating on a const object2template Fstruct const_mem_fun1_t: binary_function{@ _RWSTD_BINARY_FUNCTION_TYPES (const _TypeT*, _Arg, _Result); _EXPLICITO const_mem_fun1_t (result_type (_TypeT::*__fun)(second_argument_type) const) : _C_fn (__fun) { }5 result_type operator() (first_argument_type __x,= second_argument_type __y) const {" return (__x->*_C_fn)(__y); }private:= result_type (_TypeT::*_C_fn)(second_argument_type) const;};// 20.3.8, p10&template 'inline const_mem_fun_t<_Result, _TypeT>*mem_fun (_Result (_TypeT::*__fun)() const){3 return const_mem_fun_t<_Result, _TypeT>(__fun);}2template .inline const_mem_fun1_t<_Result, _TypeT, _Arg>.mem_fun (_Result (_TypeT::*__fun)(_Arg) const){: return const_mem_fun1_t<_Result, _TypeT, _Arg>(__fun);}H// 20.3.8, p11 - adaptor for a const member function taking no arguments<// operating on a const reference to an object&template ;struct const_mem_fun_ref_t: unary_function<_TypeT, _Result>{2 _RWSTD_UNARY_FUNCTION_TYPES (_TypeT, _Result);H _EXPLICIT const_mem_fun_ref_t (result_type (_TypeT::*__fun)() const) : _C_fn (__fun) { }= result_type operator() (const argument_type &__x) const { return (__x.*_C_fn)(); }private:) result_type (_TypeT::*_C_fn)() const;};M// 20.3.8, p12 - adaptor for a const member function taking a single argument<// operating on a const reference to an object2template Dstruct const_mem_fun1_ref_t : binary_function<_TypeT, _Arg, _Result>{9 _RWSTD_BINARY_FUNCTION_TYPES (_TypeT, _Arg, _Result); _EXPLICIT const_mem_fun1_ref_tB (result_type (_TypeT::*__fun)(second_argument_type) const) : _C_fn (__fun) { }; result_type operator() (const first_argument_type &__x,C second_argument_type __y) const {! return (__x.*_C_fn)(__y); }private:= result_type (_TypeT::*_C_fn)(second_argument_type) const;};// 20.3.8, p13&template +inline const_mem_fun_ref_t<_Result, _TypeT>.mem_fun_ref (_Result (_TypeT::*__fun)() const){7 return const_mem_fun_ref_t<_Result, _TypeT>(__fun);}2template 2inline const_mem_fun1_ref_t<_Result, _TypeT, _Arg>2mem_fun_ref (_Result (_TypeT::*__fun)(_Arg) const){> return const_mem_fun1_ref_t<_Result, _TypeT, _Arg>(__fun);}} // namespace std_RWSTD_NAMESPACE (__rw) { "// extension: returns the argumenttemplate 6struct identity : _STD::unary_function<_TypeT, _TypeT>{1 _RWSTD_UNARY_FUNCTION_TYPES (_TypeT, _TypeT);? result_type operator() (const argument_type &__val) const { return __val; }};K// extension: returns the result of applying the unary plus operator to argtemplate 8struct unary_plus : _STD::unary_function<_TypeT, _TypeT>{1 _RWSTD_UNARY_FUNCTION_TYPES (_TypeT, _TypeT);? result_type operator() (const argument_type &__val) const { return +__val; }};<// extension: returns the bitwise complement of the argumenttemplate @struct bitwise_complement : _STD::unary_function<_TypeT, _TypeT>{1 _RWSTD_UNARY_FUNCTION_TYPES (_TypeT, _TypeT);? result_type operator() (const argument_type &__val) const { return ~__val; }};9// extension: returns the bitwise or of the two argumentstemplate Astruct bitwise_or : _STD::binary_function<_TypeT, _TypeT, _TypeT>{: _RWSTD_BINARY_FUNCTION_TYPES (_TypeT, _TypeT, _TypeT);< result_type operator() (const first_argument_type &__x,D const second_argument_type &__y) const { return __x | __y; }};:// extension: returns the bitwise and of the two argumentstemplate Bstruct bitwise_and : _STD::binary_function<_TypeT, _TypeT, _TypeT>{: _RWSTD_BINARY_FUNCTION_TYPES (_TypeT, _TypeT, _TypeT);< result_type operator() (const first_argument_type &__x,D const second_argument_type &__y) const { return __x & __y; }};A// extension: returns the exclusive or (XOR) of the two argumentstemplate Cstruct exclusive_or : _STD::binary_function<_TypeT, _TypeT, _TypeT>{: _RWSTD_BINARY_FUNCTION_TYPES (_TypeT, _TypeT, _TypeT);< result_type operator() (const first_argument_type &__x,D const second_argument_type &__y) const { return __x ^ __y; }};J// extension: returns the left argument shifted left by the right argumenttemplate Astruct shift_left : _STD::binary_function<_TypeT, _TypeT, _TypeT>{: _RWSTD_BINARY_FUNCTION_TYPES (_TypeT, _TypeT, _TypeT);< result_type operator() (const first_argument_type &__x,D const second_argument_type &__y) const { return __x << __y; }};K// extension: returns the left argument shifted right by the right argumenttemplate Bstruct shift_right : _STD::binary_function<_TypeT, _TypeT, _TypeT>{: _RWSTD_BINARY_FUNCTION_TYPES (_TypeT, _TypeT, _TypeT);< result_type operator() (const first_argument_type &__x,D const second_argument_type &__y) const { return __x >> __y; }};} // namespace __rw"#undef _RWSTD_UNARY_FUNCTION_TYPES##undef _RWSTD_BINARY_FUNCTION_TYPESE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif&#endif // _RWSTD_FUNCTIONAL_INCLUDEDww $,l7Ԧ/*** >** Copyright 2003 Compaq Information Technologies Group, L.P.**C** Compaq and the Compaq logo are trademarks of Compaq Information@** Technologies Group, L.P. in the U.S. and/or other countries.**J** Confidential computer software. Valid license from Compaq required forF** possession, use or copying. Consistent with FAR 12.211 and 12.212,F** Commercial Computer Software, Computer Software Documentation, andK** Technical Data for Commercial Items are li censed to the U.S. Government/** under vendor's standard commercial license.***/#ifndef __GENERIC_HXX#include #endifww| Dl7Ԧ#ifndef __GENERIC_HXX#define __GENERIC_HXX//// B// Copyright 2003, 2004 Hewlett-Packard Development Company, L.P.//F// Confidential computer software. Valid license from HP required forF// possession, use or copying. Consistent with FAR 12.211 and 12.212,F// Commercial Computer Software, Computer Software Documentation, andK// Technical Data for Commercial Items are licensed to the U.S. Government/// under vendor's standard commercial license.//// //++#// FACILITY: DEC C++ Class Library//I// SUBSYSTEM: Generic data structures (primordial parameterized classes)//// MODULE: generic//// MODULE DESCRIPTION://H// This module provides a generic/parameterized type facility which uses3// the macro preprocessor instead of C++ templates.////--////// INCLUDE FILES////#include extern "C"{#include }#pragma __environment save)#pragma __environment cxx_header_defaults#//// // LINKAGE////'#if defined(__VMS) && defined(__DECCXX)*# pragma __extern_model __relaxed_refdef4# pragma __extern_prefix __CXXL_PLAIN_FUNC_LINKAGE# if defined __VAX## pragma __nomember_alignment# else!# pragma __member_alignment # endif#endif////// TYPE DEFINITIONS/////// pointer to a generic error handling function typedef int (*GPT)(int, char *);////// EXTERNAL FUNCTIONS////&// the default error handling function%extern int genericerror(int, char *); //++// MACRO NAME: name2//// FUNCTIONAL DESCRIPTION://H// Concatenate identifier (segments) during compilation preprocessing to// form a new identifier.//// FORMAL PARAMETERS:///// S1: Segment 1 of the concatenated identifier/// S2: Segment 2 of the concatenated identifier//// EXPANSION VALUE://G// The identifier formed by the concatenation of the actual parameters.// // DESIGN://>// The ## operator is used to concatenate identifier segments.E// It is invoked in a sub-macro to allow parameter expansion to work.////--(#define name2(S1, S2) cxxl_name2(S1, S2)!#define cxxl_name2(S1, S2) S1##S2 //++// MACRO NAME: name3//// FUNCTIONAL DESCRIPTION://H// Concatenate identifier (segments) during compilation preprocessing to// form a new identifier.//// FORMAL PARAMETERS:///// S1: Segment 1 of the concatenated identifier/// S2: Segment 2 of the concatenated identifier/// S3: Segment 3 of the concatenated identifier//// EXPANSION VALUE://G// The identifier formed by the concatenation of the actual parameters.// // DESIGN://>// The ## operator is used to concatenate identifier segments.E// It is invoked in a sub-macro to allow parameter expansion to work.////--0#define name3(S1, S2, S3) cxxl_name3(S1, S2, S3))#define cxxl_name3(S1, S2, S3) S1##S2##S3 //++// MACRO NAME: name4//// FUNCTIONAL DESCRIPTION://H// Concatenate identifier (segments) during compilation preprocessing to// form a new identifier.//// FORMAL PARAMETERS:///// S1: Segment 1 of the concatenated identifier/// S2: Segment 2 of the concatenated identifier/// S3: Segment 3 of the concatenated identifier/// S4: Segment 4 of the concatenated identifier//// EXPANSION VALUE://G// The identifier formed by the concatenation of the actual parameters.// // DESIGN://>// The ## operator is used to concatenate identifier segments.E// It is invoked in a sub-macro to allow parameter expansion to work.////--8#define name4(S1, S2, S3, S4) cxxl_name4(S1, S2, S3, S4)1#define cxxl_name4(S1, S2, S3, S4) S1##S2##S3##S4 //++// MACRO NAME: declare//// FUNCTIONAL DESCRIPTION://<// Declare a generic (parameterized) class for a given type.>// This also defines the inline member functions of the class.//// FORMAL PARAMETERS:// // CLASS:// The generic class name.// (e.g. vector)// T:?// The type parameter to instantiate the generic class for.-// (e.g. int to get a vector of integers)H// Note that the type must be an identifier (e.g. char* is invalid).//// IMPLICIT INPUT PARAMETERS://G// A macro with the name of the generic class name followed by the word#// "declare". (e.g. vectordeclare)//// EXPANSION VALUE://=// Invocation of the user-defined macro to declare the class.#// (See implicit input parameters.)//0// IMPLICIT OUTPUT PARAMETERS AND SIDE EFFECTS://H// Declares the class (and possibly functions) which are declared by the// user-defined macro.// // DESIGN://<// A sub-macro is used to allow parameter expansion to work.////--0#define declare(CLASS, T) cxxl_declare(CLASS, T)7#define cxxl_declare(CLASS, T) name2(CLASS, declare)(T) //++// MACRO NAME: implement//// FUNCTIONAL DESCRIPTION://>// Implement a generic (parameterized) class for a given type.=// This defines the non-inline member functions of the class.//// FORMAL PARAMETERS:// // CLASS:// The generic class name.// (e.g. vector)// T:?// The type parameter to instantiate the generic class for.-// (e.g. int to get a vector of integers)H// Note that the type must be an identifier (e.g. char* is invalid).//// IMPLICIT INPUT PARAMETERS://G// A macro with the name of the generic class name followed by the word'// "implement". (e.g. vectorimplement)//// EXPANSION VALUE://@// Invocation of the user-defined macro to define the non-inline!// member functions of the class.#// (See implicit input parameters.)//0// IMPLICIT OUTPUT PARAMETERS AND SIDE EFFECTS://E// Defines the functions which are defined by the user-defined macro.// // DESIGN://<// A sub-macro is used to allow parameter expansion to work.////--4#define implement(CLASS, T) cxxl_implement(CLASS, T);#define cxxl_implement(CLASS, T) name2(CLASS, implement)(T) //++// MACRO NAME: declare2//// FUNCTIONAL DESCRIPTION://=// Declare a generic (parameterized) class for 2 given types.>// This also defines the inline member functions of the class.//// FORMAL PARAMETERS:// // CLASS:// The generic class name.// (e.g. vector) // T1, T2:@// The type parameters to instantiate the generic class for.-// (e.g. int to get a vector of integers)H// Note that the type must be an identifier (e.g. char* is invalid).//// IMPLICIT INPUT PARAMETERS://G// A macro with the name of the generic class name followed by the word#// "declare". (e.g. vectordeclare)//// EXPANSION VALUE://=// Invocation of the user-defined macro to declare the class.#// (See implicit input parameters.)//0// IMPLICIT OUTPUT PARAMETERS AND SIDE EFFECTS://H// Declares the class (and possibly functions) which are declared by the// user-defined macro.// // DESIGN://<// A sub-macro is used to allow parameter expansion to work.////--<#define declare2(CLASS, T1, T2) cxxl_declare2(CLASS, T1, T2)B#define cxxl_declare2(CLASS, T1, T2) name2(CLASS, declare)(T1, T2) //++// MACRO NAME: implement2//// FUNCTIONAL DESCRIPTION://?// Implement a generic (parameterized) class for 2 given types.=// This defines the non-inline member functions of the class.//// FORMAL PARAMETERS:// // CLASS:// The generic class name.// (e.g. vector) // T1, T2:@// The type parameters to instantiate the generic class for.-// (e.g. int to get a vector of integers)H// Note that the type must be an identifier (e.g. char* is invalid).//// IMPLICIT INPUT PARAMETERS://G// A macro with the name of the generic class name followed by the word'// "implement". (e.g. vectorimplement)//// EXPANSION VALUE://@// Invocation of the user-defined macro to define the non-inline!// member functions of the class.#// (See implicit input parameters.)//0// IMPLICIT OUTPUT PARAMETERS AND SIDE EFFECTS://E// Defines the functions which are defined by the user-defined macro.// // DESIGN://<// A sub-macro is used to allow parameter expansion to work.////--@#define implement2(CLASS, T1, T2) cxxl_implement2(CLASS, T1, T2)F#define cxxl_implement2(CLASS, T1, T2) name2(CLASS, implement)(T1, T2) //++// MACRO NAME: set_handler//// FUNCTIONAL DESCRIPTION://H// Set the current error handler for a given instance of a parameterized<// class to be the specified function. (The initial one wasF// genericerror(int, char*).) In addition to being used as a functionA// call, this macro can also be used in a function declaration or// definition.//// FORMAL PARAMETERS:// // CLASS:// The generic class name.// (e.g. vector)// T:@// The type parameters to instantiate the generic class for.-// (e.g. int to get a vector of integers)H// Note that the type must be an identifier (e.g. char* is invalid).// GPT HANDLER:3// A pointer to the new error handler function.//// EXPANSION VALUE://J// The name of the function to set the pointer to the error handler (for aJ// specific instance of a parameterized class) followed by a parenthesizedH// actual argument/formal argument type (e.g. set_intvector_handler(f)).//0// IMPLICIT OUTPUT PARAMETERS AND SIDE EFFECTS://D// Subsequent calls to the callerror macro will invoke the specified // function.////--O#define set_handler(CLASS, T, HANDLER) name4(set_, T, CLASS, _handler)(HANDLER) //++// MACRO NAME: errorhandler//// FUNCTIONAL DESCRIPTION://H// The name of the pointer to the error handler (for a specific instance// of a parameterized class).//// FORMAL PARAMETERS:// // CLASS:// The generic class name.// (e.g. vector)// T:@// The type parameters to instantiate the generic class for.-// (e.g. int to get a vector of integers)H// Note that the type must be an identifier (e.g. char* is invalid).//// EXPANSION VALUE://H// The name of the pointer to the error handler (for a specific instance5// of a parameterized class) (e.g. intvectorhandler).////--7#define errorhandler(CLASS, T) name3(T, CLASS, handler) //++// MACRO NAME: callerror//// FUNCTIONAL DESCRIPTION://I// Call the current error handler for a given instance of a parameterized // class.//// FORMAL PARAMETERS:// // CLASS:// The generic class name.// (e.g. vector)// T:@// The type parameters to instantiate the generic class for.-// (e.g. int to get a vector of integers)H// Note that the type must be an identifier (e.g. char* is invalid). // int N:=// The first argument to pass to genericerror(int, char*)9// or other, current generic error handling function. // char *S:>// The second argument to pass to genericerror(int, char*)9// or other, current generic error handling function.//// IMPLICIT INPUT PARAMETERS://// errorhandler(CLASS, T):5// Points to the error handling function to call.//// EXPANSION VALUE://>// A call to the function pointed to by errorhandler(CLASS, T)// with the given arguments.////--A#define callerror(CLASS, T, N, S) (*errorhandler(CLASS, T))(N, S) #pragma __environment restore#endif// End of generic.hxx wwQfQl7Ԧ#ifndef __IOMANIP_HEADER#define __IOMANIP_HEADERL/*************************************************************************** * . * Copyright 2000 Compaq Computer Corporation *: * COMPAQ Registered in U.S. Patent and Trademark Office. *J * Confidential computer software. Valid license from Compaq required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *N ****************************************************************************//*:This file either includes iomanip_stdimpl or iomanip_impl 1based upon whether __USE_STD_IOSTREAM is defined.*/#include #ifdef __USE_STD_IOSTREAM#include #else#include #endif#endifww p\l7Ԧ/*** >** Copyright 2003 Compaq Information Technologies Group, L.P.**C** Compaq and the Compaq logo are trademarks of Compaq Information@** Technologies Group, L.P. in the U.S. and/or other countries.**J** Confidential computer software. Valid license from Compaq required forF** possession, use or copying. Consistent with FAR 12.211 and 12.212,F** Commercial Computer Software, Computer Software Documentation, andK** Technical Data for Commercial Items are li censed to the U.S. Government/** under vendor's standard commercial license.***/#ifndef __IOMANIP_HXX#include #endifww gl7Ԧ#ifndef __IOMANIPHXX#define __IOMANIPHXXL/*************************************************************************** * > * Copyright 2003 Compaq Information Technologies Group, L.P. *C * Compaq and the Compaq logo are trademarks of Compaq Information@ * Technologies Group, L.P. in the U.S. and/or other countries. *J * Confidential computer software. Valid license from Compaq required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *N ****************************************************************************/h#if (defined(__STD_STRICT_ANSI) || defined(__STD_STRICT_ANSI_ERRORS)) && !defined(__NO_USE_STD_IOSTREAM)#error "cannot include iomanip.hxx -- do not compile strict_ansi OR define __NO_USE_STD_IOSTREAM - see section 7.1.2 of the C++ Using Guide"#else$ /* duplicate for /head7 * includes iomanip_stdimpl.hxx or iomanip_impl.hxx8 * based upon whether __USE_STD_IOSTREAM is defined. */!/* # include */# ifdef __USE_STD_IOSTREAM&# include # else## include # endif#endif#endifwwTrl7Ԧ#ifndef __IOMANIP_HXX#define __IOMANIP_HXX//// B// Copyright 2003, 2004 Hewlett-Packard Development Company, L.P.//F// Confidential computer software. Valid license from HP required forF// possession, use or copying. Consistent with FAR 12.211 and 12.212,F// Commercial Computer Software, Computer Software Documentation, andK// Technical Data for Commercial Items are licensed to the U.S. Government/// under vendor's standard commercial license.//////++#// FACILITY: DEC C++ Class Library//#// SUBSYSTEM: The iostream package//1// MODULE: Header file of the iomanip subpackage//// MODULE DESCRIPTION://H// The iomanip subpackage defines macros for parameterized manipulators.K// It consists of just this header file, because the code of all predefinedA// parameterized manipulators is contained in the iostream (core)// subpackage.//// DESIGN ISSUES://J// The second argument of operator<< is declared as const everywhere belowH// to prevent the creation of temporaries for nonconst references. ThisJ// conforms to the Annotated C++ Reference Manual, unlike the interface of-// iomanip documented for AT&T's Release 2.1.////-- //++// INCLUDE FILES//--/* #include */#ifdef __USE_STD_IOSTREAM #error "cannot include iomanip.hxx -- do not compile strict_ansi OR define __NO_USE_STD_IOSTREAM - see section 7.1.2 of the C++ Using Guide"#else#include #include #include #include #pragma __environment save)#pragma __environment cxx_header_defaults//+ // LINKAGE//--'#if defined(__VMS) && defined(__DECCXX)+# pragma __extern_model __relaxed_refdef4# pragma __extern_prefix __CXXL_PLAIN_FUNC_LINKAGE# if defined __VAX## pragma __nomember_alignment# else!# pragma __member_alignment # endif#endif //++// MACRO DEFINITIONS//--"#define SMANIP(T)name2(smanip_, T) #define SAPP(T)name2(sapply_, T)"#define IMANIP(T)name2(imanip_, T) #define IAPP(T)name2(iapply_, T)"#define OMANIP(T)name2(omanip_, T) #define OAPP(T)name2(oapply_, T)$#define IOMANIP(T)name2(iomanip_, T)"#define IOAPP(T)name2(ioapply_, T)//,// Same as above, only for reference objects//(#define SMANIPREF(T)name2(smanipref_, T)&#define SAPPREF(T)name2(sapplyref_, T)(#define IMANIPREF(T)name2(imanipref_, T)&#define IAPPREF(T)name2(iapplyref_, T)(#define OMANIPREF(T)name2(omanipref_, T)&#define OAPPREF(T)name2(oapplyref_, T)*#define IOMANIPREF(T)name2(iomanipref_, T)(#define IOAPPREF(T)name2(ioapplyref_, T) #define IOMANIPdeclare(T) \\class SMANIP(T) \{ \ private: \ ios &(*fct)(ios &, T); \ T arg; \ public: \> SMANIP(T)(ios &(*f)(ios &, T), T a) : fct(f), arg(a) { } \@ friend istream &operator>>(istream &i, const SMANIP(T) &m) \ { \ ios *s = &i; \ (*m.fct)(*s, m.arg); \ return i; \ } \@  friend ostream &operator<<(ostream &o, const SMANIP(T) &m) \ { \ ios *s = &o; \ (*m.fct)(*s, m.arg); \ return o; \ } \}; \\class SAPP(T) \{ \ private: \ ios &(*fct)(ios &, T); \ public: \/ SAPP(T)(ios &(*f)(ios &, T)) : fct(f) { } \ SMANIP(T) operator()(T a) \ { \# return SMANIP(T)(fct, a); \ } \}; \ \class IMANIP(T) \{ \ private: \$ istream &(*fct)(istream &, T); \ T arg; \ public: \F  IMANIP(T)(istream &(*f)(istream &, T), T a) : fct(f), arg(a) { } \@ friend istream &operator>>(istream &s, const IMANIP(T) &m) \ { \$ return (*m.fct)(s, m.arg); \ } \}; \\class IAPP(T) \{ \ private: \$ istream &(*fct)(istream &, T); \ public: \7 IAPP(T)(istream &(*f)(istream &, T)) : fct(f) { } \ IMANIP(T) operator()(T a) \ { \# return IMANIP(T)(fct, a); \ } \}; \ \class OMANIP(T) \{ \ private: \$ ostream &(*fct)(ostream &, T); \ T arg; \ public: \G OMANIP(T)(ostream &(*f)(ostream &, T), T a ) : fct(f), arg(a) { } \@ friend ostream &operator<<(ostream &s, const OMANIP(T) &m) \ { \# return(*m.fct)(s, m.arg); \ } \}; \\class OAPP(T) \{ \ private: \$ ostream &(*fct)(ostream &, T); \ public: \7 OAPP(T)(ostream &(*f)(ostream &, T)) : fct(f) { } \ OMANIP(T) operator()(T a) \ { \# return OMANIP(T)(fct, a); \ } \}; \ \class IOMANIP(T) \{ \ private: \& iostream &(*fct)(iostream &, T); \ T arg; \ public: \I IOMANIP(T)(iostream &(*f)(iostream &, T), T a) : fct(f), arg(a) { } \B friend istream &operator>>(iostream &s, const IOMANIP(T) &m) \ { \# return(*m.fct)(s, m.arg); \ } \B friend ostream &operator<<(iostream &s, const IOMANIP(T) &m) \ { \# return(*m.fct)(s, m.arg); \ } \}; \\class IOAPP(T) \{ \ private: \& iostream &(*fct)(iostream &, T); \ public: \: IOAPP(T)(iostream &(*f)(iostream &, T)) : fct(f) { } \ IOMANIP(T) operator()(T a) \ { \$ return IOMANIP(T)(fct, a); \ } \}; //#// The macros for REF manipulators.//#define IOMANIPREFdeclare(T) \\class SMANIPREF(T) \{ \ private: \ ios &(*fct)(ios &, T & ); \ T &arg; \ public: \D SMANIPREF(T)(ios &(*f)(ios &, T &), T &a) : fct(f), arg(a) { } \C friend istream &operator>>(istream &i, const SMANIPREF(T) &m) \ { \ ios *s = &i; \ (*m.fct)(*s, m.arg); \ return i; \ } \C friend ostream &operator<<(ostream &o, const SMANIPREF(T) &m) \ { \ ios *s = &o; \ (*m.fct)(*s, m.arg); \ return o; \ } \}; \\class SAPPREF(T) \{ \ private: \ ios &(*fct)(ios &, T &); \ public: \4 SAPPREF(T)(ios &(*f)(ios &, T &)) : fct(f) { } \# SMANIPREF(T) operator()(T &a) \ { \& return SMANIPREF(T)(fct, a); \ } \}; \ \class IMANIPREF(T) \{ \ private: \& istream &(*fct)(istream &, T &); \ T &arg; \ public: \L IMANIPREF(T)(istream &(*f)(istream &, T &), T &a) : fct(f), arg(a) { } \C friend istream &operator>>(istream &s, const IMANIPREF(T) &m) \ { \$ return (*m.fct)(s, m.arg); \ } \}; \\class IAPPREF(T) \{ \ private: \& istream &(*fct)(istream &, T &); \ public: \< IAPPREF(T)(istream &(*f)(istream &, T &)) : fct(f) { } \# IMANIPREF(T) operator()(T &a) \ { \& return IMANIPREF(T)(fct, a); \ } \}; \ \class OMANIPREF(T) \{ \ private: \& ostream &(*fct)(ostream &, T &); \ T &arg; \ public: \M OMANIPREF(T)(ostream &(*f)(ostream &, T &), T &a ) : fct(f), arg(a) { } \C friend ostream &operator<<(ostream &s, const OMANIPREF(T) &m) \ { \# return(*m.fct)(s, m.arg); \ } \}; \\class OAPPREF(T) \{ \ private: \& ostream &(*fct)(ostream &, T &); \ public: \<  OAPPREF(T)(ostream &(*f)(ostream &, T &)) : fct(f) { } \# OMANIPREF(T) operator()(T &a) \ { \& return OMANIPREF(T)(fct, a); \ } \}; \ \class IOMANIPREF(T) \{ \ private: \( iostream &(*fct)(iostream &, T &); \ T &arg; \ public: \O IOMANIPREF(T)(iostream &(*f)(iostream &, T &), T &a) : fct(f), arg(a) { } \E friend istream &operator>>(iostream &s, const IOMANIPREF(T) &m) \ { \# return(*m.fct)(s, m.arg); \ } \E friend ostream &operator<<(iostream &s, const IOMANIPREF(T) &m) \ { \# return(*m.fct)(s, m.arg); \ } \}; \\class IOAPPREF(T) \{ \ private: \( iostream &(*fct)(iostream &, T &); \ public: \? IOAPPREF(T)(iostream &(*f)(iostream &, T &)) : fct(f) { } \$ IOMANIPREF(T) operator()(T &a) \ { \' return IOMANIPREF(T)(fct, a); \ } \}; //++// MANIPULATORS//G// Declare manipulators and applicators for types int and long, Mutex @// Then declare all the predefined parameterized manipulators: D// resetiosflags, setfill, setiosflags, setprecision, setw, lock and // unlock.//--IOMANIPdeclare(int)IOMANIPdeclare(long)!SMANIP(long) resetiosflags(long);SMANIP(int) setfill(int);SMANIP(long) setiosflags(long);SMANIP(int) setprecision(int);SMANIP(int) setw(int);IOMANIPREFdeclare(Mutex)SMANIPREF(Mutex) lock(Mutex &);!SMANIPREF(Mutex) unlock(Mutex &); #pragma __environment restore#endif // __USE_STD_IOSTREAM#endif// End of iomanip.hxxwwl7Ԧ// -*- C++ -*-L/*************************************************************************** *2 * iomanip - Declarations of iostream manipulators *, * $Id: //stdlib/3.0-rel/include/iomanip#5 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other la ws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer softwar e is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/#ifndef _RWSTD_IOMANIP_INCLUDED#define _RWSTD_IOMANIP_INCLUDED#include #include #include #ifndef __USE_STD_IOSTREAM{#error "cannot include fstream -- define __USE_STD_IOSTREAM to override default - see section 7.1.2 of the C++ Using Guide"#else#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) {  // manipulator implementationtemplatestruct __rw_smanip{E __rw_smanip (ios_base& (*__fun)(ios_base&, _CharT), _CharT __arg)+ : _C_fn (__fun), _C_arg (__arg) { } * ios_base& (*_C_fn)(ios_base&, _CharT); _CharT  _C_arg;};// manipulator implementation%templatestruct __rw_smanip_fill{. typedef basic_ios<_CharT, _Traits> _C_ios;F __rw_smanip_fill (_C_ios& (*__fun)(_C_ios&, _CharT), _CharT __arg)+ : _C_fn (__fun), _C_arg (__arg) { }& _C_ios& (*_C_fn)(_C_ios&, _CharT); _CharT _C_arg;}; // manipulator implementationIinline ios_base& __rw_rsios (ios_base &__strm, ios_base::fmtflags __mask){1 __strm.setf (ios_base::fmtflags (0), __mask); return __strm;}// manipulator implementationHinline ios_base& __rw_sios (ios_base &__strm, ios_base::fmtflags __mask){ __strm.setf (__mask); return __strm;}:inline ios_base& __rw_sbase (ios_base &__strm, int __base){#ifndef _RWSTD_NO_EXT_SETBASE" if (__base < 0 || __base > 36) __base = 0;-#else // if defined (_RWSTD_NO_EXT_SETBASE) switch (__base) {, case 0: case 8: case 10: case 16: break;# ifndef _RWSTD_NO_EXT_BIN_IO case 2: break;"# endif // _RWSTD_NO_EXT_BIN_IO default: __base = 0; }!#endif // _RWSTD_NO_EXT_SETBASE: __strm.flags ( __strm.flags () & ~ios_base::basefield@ & ~(_RWSTD_IOS_BASEMASK << _RWSTD_IOS_BASEOFF)2 | __base << _RWSTD_IOS_BASEOFF); return __strm;}// manipulator implementation(template < class _CharT, class _Traits >$inline basic_ios< _CharT, _Traits >&=__rw_sfill (basic_ios< _CharT, _Traits >& __strm, _CharT __c){ __strm.fill (__c); return __strm;}// manipulator implementation:inline ios_base& __rw_sprec (ios_base &__strm, int __prec){1 __strm.precision (_STD::streamsize (__prec)); return __strm;}// manipulator implementation<inline ios_base& __rw_swidth (ios_base &__strm, int __width){. __strm.width (_STD::streamsize (__width)); return __strm;} // 27.6.3, p3&inline __rw_smanip)resetiosflags (ios_base::fmtflags __mask){? return __rw_smanip(__rw_rsios, __mask);} // 27.6.3, p4Ninline __rw_smanip setiosflags (ios_base::fmtflags __mask){> return __rw_smanip(__rw_sios, __mask);} // 27.6.3, p5,inline __rw_smanip setbase (int __base){0 return __rw_smanip(__rw_sbase, __base);} // 27.6.3, p6template Jinline __rw_smanip_fill<_CharT, char_traits<_CharT> > setfill (_CharT __c){K return __rw_smanip_fill<_CharT, char_traits<_CharT> >(__rw_sfill, __c);} // 27.6.3, p71inline __rw_smanip setprecision (int __prec){0 return __rw_smanip(__rw_sprec, __prec);} // 27.6.3, p8*inline __rw_smanip setw (int __width){2 return __rw_smanip(__rw_swidth, __width);}// manipulator implementation4template &inline basic_istream<_CharT, _Traits>&3operator>> (basic_istream<_CharT, _Traits> &__strm,2 const __rw_smanip<_TypeT> &__man){ _TRY {- (*__man._C_fn)(__strm, __man._C_arg); } _CATCH (...) {, __strm.setstate (ios_base::failbit); }  return __strm;}// manipulator implementation4template &inline basic_ostream<_CharT, _Traits>&3operator<< (basic_ostream<_CharT, _Traits> &__strm,2 const __rw_smanip<_TypeT> &__man){ _TRY {- (*__man._C_fn)(__strm, __man._C_arg); } _CATCH (...) {, __strm.setstate (ios_base::failbit); } return __strm;}// manipulator implementation&template &inline basic_istream<_CharT, _Traits>&;operator>>(basic_istream<_CharT, _Traits> &__strm,: const __rw_smanip_fill<_CharT, _Traits> &__man){ _TRY {- (*__man._C_fn)(__strm, __man._C_arg); } _CATCH (...) {, __strm.setstate (ios_base::failbit); } return __strm;}// manipulator implementation&template &inline basic_ostream<_CharT, _Traits>&<operator<< (basic_ostream<_CharT, _Traits> &__strm,; const __rw_smanip_fill<_CharT, _Traits> &__man){ _TRY {- (*__man._C_fn)(__strm, __man._C_arg); } _CATCH (...) {, __strm.setstate (ios_base::failbit); } return __strm;}} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif#endif // __USE_STD_IOSTREAM##endif // _RWSTD_IOMANIP_INCLUDEDwwK%n7Ԧ$#ifndef _RWSTD_VMS_CONFIG_H_INCLUDED$#define _RWSTD_VMS_CONFIG_H_INCLUDED#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaultsR # endifT#endif'#if defined(__DECCXX) && defined(__VMS)HL/*************************************************************************** *E * configuration file for the Rogue Wave Standard Library Version 3.0  *H * Generated for cxx-V6.5-032 V6.5-032 o!l7Ԧ// -*- C++ -*-L/*************************************************************************** *? * ios - Declarations for the Standard Library basic stream I/O *( * $Id: //stdlib/3.0-rel/include/ios#4 $ *L *************************************************************************** * > * Copyright 2002 Compaq Information Technologies Group, L.P. *C * Compaq and the Compaq logo are trademarks of Compaq Information@ * Technologies Group, L.P. in the U.S. and/or other countries. *J * Confidential computer software. Valid license from Compaq required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, In c. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copi es thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48  CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/#ifndef _RWSTD_IOS_INCLUDED#define _RWSTD_IOS_INCLUDED#include #ifndef __USE_STD_IOSTREAMw#error "cannot include ios -- define __USE_STD_IOSTREAM to override default - see section 7.1.2 of the C++ Using Guide"#else#include '#ifnde f _RWSTD_NO_REDUNDANT_DEFINITIONS# include +#endif // _RWSTD_NO_REDUNDANT_DEFINITIONS#include #include #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) { %template class basic_ios: public ios_base{ public:6 typedef _CharT char_type;8 typedef _Traits traits_type;5 typedef _TYPENAME traits_type::int_type int_type;5 typedef _TYPENAME traits_type::pos_type pos_type;5 typedef _TYPENAME traits_type::int_type off_type; protected:D typedef basic_streambuf streambuf_type; A typedef basic_ostream<char_type, traits_type> ostream_type;public:A // 27.4.4.1, p1 - NOTE: `sb' may point to a yet uninitialized< // object; it is unsafe to reference any of its members0 _EXPLICIT basic_ios (streambuf_type *__sb) { init (__sb); } // 27.4.4.3, p1 operator void*() const {- return fail () ? (void*)0 : (void*)1; } // 27.4.4.3, p2 bool operator! () const { return fail (); } // 27.4.4.3, p3 iostate rdstate () const { return _C_state; }3 // extension - throws only exceptions in `mask'1 iostate clear (iostate __st, iostate __mask); // 27.4.4.3, p4) void clear (iostate __st = goodbit) { clear (__st, ~0); }3 // extension - throws only exceptions in `mask'5 iostate setstate (iostate __st, iostate __mask) {1 return clear (rdstate () | __st, __mask); } // 27.4.4.3, p6" void setstate (iostate __st) {" clear (rdstate () | __st); } // 27.4.4.3, p7 bool good () const {% return goodbit == rdstate (); } // 27.4.4.3, p8 bool eof () const {* return 0 != (rdstate () & eofbit); } // 27.4.4.3, p9 bool fail () const {6 return 0 != (rdstate () & (failbit | badbit)); } // 27.4.4.3, p10 bool bad () const {* return 0 != (rdstate () & badbit); } // 27.4.4.3, p11! iostate exceptions () const { return _C_except; } // 27.4.4.3, p12 void exceptions (iostate); // 27.4.4.2, p1 ostream_type* tie () const { return _C_tiestrm; } // 27.4.4.2, p2. ostream_type* tie (ostream_type *__strm) {J return _RWSTD_ATOMIC_IO_SWAP (_C_tiestrm, __strm, this->_C_mutex); }H // 27.4.4.2, p4 - NOTE: the pointer returned from rdbuf() in derivedN // classes may be different from the one passed to rdbuf (streambuf_type*)$ streambuf_type* rdbuf () const { return _C_strmbuf; } // 27.4.4.2, p5, streambuf_type* rdbuf (streambuf_type*); // 27.4.4.2, p15* basic_ios& copyfmt (const basic_ios&); // 27.4.4.2, p12 char_type fill () const; // 27.4.4.2, p13 char_type fill (char_type); // 27.4.4.2, p8! locale imbue (const locale&); // 27.4.4.2, p104 char narrow (char_type __c, char __dflt) const {M return _USE_FACET (ctype, getloc ()).narrow (__c, __dflt); } // 27.4.4.2, p11& char_type widen (char __c) const {D return _USE_FACET (ctype, getloc ()).widen (__c); } protected:@ // initialization of standard iostream objects may depend on7 // the default ctor not to re-initialize the object4 basic_ios () { /* no-op as per 27.4.4.1, p2 */ } // 27.4.4.1, p3 void init (streambuf_type*);E // (conditionally) returns a pointer to a mutex in the associated // basic_streambuf object* _RW::__rw_mutex* _C_bufmutex () const;Z#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1894) && defined(__STD_MS)#elseprivate:#endif> basic_ios (const basic_ios&); // not defined> basic_ios& operator= (const basic_ios&); // not definedK streambuf_type *_C_strmbuf; // pointer to associated streambuf object; ostream_type *_C_tiestrm; // pointer to tied streamF int_type _C_fillch; // fill character (space by default)};I// ios_base::iostate rather ios::iostate used here to make MSVC 6.3 happy%templateinline ios_base::iostateLbasic_ios<_CharT, _Traits>::clear (ios_base::iostate __st /* = goodbit */,L ios_base::iostate __mask /* = ~0 */){C _RWSTD_MT_GUARD (flags () & _RWSTD_IOS_NOLOCK ? 0 : &_C_mutex);E return _C_unsafe_clear (rdbuf () ? __st : __st | badbit, __mask);}%templateAinline void basic_ios<_CharT, _Traits>::exceptions (iostate __ex){C _RWSTD_MT_GUARD (flags () & _RWSTD_IOS_NOLOCK ? 0 : &_C_mutex); _C_except = __ex;B _C_unsafe_clear (rdbuf () ? rdstate () : rdstate () | badbit);}%template=inline _TYPENAME basic_ios<_CharT, _Traits>::streambuf_type* 8basic_ios<_CharT, _Traits>::rdbuf (streambuf_type *__sb){C _RWSTD_MT_GUARD (flags () & _RWSTD_IOS_NOLOCK ? 0 : &_C_mutex);' streambuf_type *__tmp = _C_strmbuf;7 // 27.4.4.3, p4 - set badbit if buffer pointer is 0= _C_unsafe_clear ((_C_strmbuf = __sb) ? goodbit : badbit); return __tmp;}%template6inline _TYPENAME basic_ios<_CharT, _Traits>::char_type)basic_ios<_CharT, _Traits>::fill () const{I // delayed initialization used to allow objects of stream types otherG // than those whose char_type is char or wchar_t to be successfullyJ // constructed even if the global locale doesn't contain a ctype facet1 // specialized on the stream type's char_typeB if (traits_type::eq_int_type (traits_type::eof (), _C_fillch))A _RWSTD_CONST_CAST (basic_ios*, this)->fill (widen (' '));1 return traits_type::to_char_type (_C_fillch);}%template6inline _TYPENAME basic_ios<_CharT, _Traits>::char_type1basic_ios<_CharT, _Traits>::fill (char_type __ch){* // convert to int type before swapping9 const int_type __c = traits_type::to_int_type (__ch);C _RWSTD_MT_GUARD (flags () & _RWSTD_IOS_NOLOCK ? 0 : &_C_mutex);4 // save the previous value of the fill characterF traits_type::assign (__ch, traits_type::to_char_type (_C_fillch)); _C_fillch = __c; return __ch;}%templateEinline locale basic_ios<_CharT, _Traits>::imbue (const locale& __loc){C _RWSTD_MT_GUARD (flags () & _RWSTD_IOS_NOLOCK ? 0 : &_C_mutex);1 const locale __tmp = _C_unsafe_imbue (__loc); if (rdbuf ())# rdbuf ()->pubimbue (__loc); return __tmp;}%templateHinline _RW::__rw_mutex* basic_ios<_CharT, _Traits>::_C_bufmutex () const{" _RWSTD_ASSERT (0 != rdbuf ());J#if !defined (_RWSTD_MULTI_THREAD) || defined (_RWSTD_NO_EXT_REENTRANT_IO)7 // unconditionally return pointer to buffer's mutex1 // (real or fake if not in an MT environment) return &rdbuf ()->_C_mutex;#else? // return pointer to buffer's mutex unless the object is in0 // a state where buffer locking is disabled)E return flags () & _RWSTD_IOS_NOLOCKBUF ? 0 : &rdbuf ()->_C_mutex;?#endif // !_RWSTD_MULTI_THREAD || !_RWSTD_NO_EXT_REENTRANT_IO}} // namespace std&#if _RWSTD_DEFINE_TEMPLATE (BASIC_IOS)E#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif# include E#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif#endif_RWSTD_NAMESPACE (std) { )_RWSTD_INSTANTIATE_2 (class _RWSTD_EXPORT; basic_ios >);#ifndef _RWSTD_NO_WCHAR_T)_RWSTD_INSTANTIATE_2 (class _RWSTD_EXPORTA basic_ios >);#endif // _RWSTD_NO_WCHAR_T} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif#endif // __USE_STD_IOSTREAM#endif // _RWSTD_IOS_INCLUDEDww al7ԦL/*************************************************************************** *9 * ios.cc - Definition for the Standard Library iostreams *+ * $Id: //stdlib/3.0-rel/include/ios.cc#4 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 a nd 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and b !y internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is pro "videdB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L ***************#***********************************************************/#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) {  &template basic_ios<_CharT, _Traits>&<basic_ios<_CharT, $_Traits>::copyfmt (const basic_ios &__rhs){ if (this == &__rhs) return *this;B // may lock, fires erase events (27.4.4.2, p17), never unlocks _C_copyfmt (__rhs);2 // may still be locked, just establish a guard _RW::__rw_guard __guard (0);( if (!(flags () & _RWSTD_IOS_NOLOCK))# __guard._C_set (&_C_mutex);" _C_tiestrm = __rhs._C_tiestrm;! _C_fillch = __rhs._C_fillch; _TRY {L // fire copy events (27.4.4.2, p17), may tempora%rily unlock or throw< _C_fire_event (copyfmt_event, true /* reentrant */);; // assign exceptions last (27.4.4.2, p15, bullet 2)$ _C_except = __rhs._C_except; } _CATCH (...) {' // must still assign exceptions$ _C_except = __rhs._C_except;= // just rethrow caught exception (don't call clear()) _RETHROW; }< // leave state alone but throw an exception if necessary! _C_unsafe_clear (rdstate ()); return *this&;}&template <void basic_ios<_CharT, _Traits>::init (streambuf_type *__sb){8 // not guarded, assumed to be called only from ctors2 // all members are assumed to be uninitialized9 // NOTE: `sb' may point to a yet uninitialized object9 // it is unsafe to reference any of its members8 _C_state = (_C_strmbuf = __sb) ? goodbit : badbit; _C_tiestrm = 0; _C_except = goodbit;9 _C_fmtfl = skipws | dec | 10 << _RWSTD_I 'OS_BASEOFF; _C_wide = 0; _C_prec = 6;$ // invalidate the fill characterH // the character will be initialized the first time fill() is calledK // so that objects of stream types other than those specialized on charL // and wchar_t can be successfully constructed even if the global localeE // doesn't contain a ctype facet specialized on the stream type's // char_type$ _C_fillch = traits_type::eof ();0#if defined (_RWSTD_MULTI_THREAD) \(0 && !defined (_RWSTD_NO_EXT_REENTRANT_IO) \0 && !defined (_RWSTD_NO_REENTRANT_IO_DEFAULT)G // disable locking of iostream objects and their associated buffersH // standard iostream objects will override in ios_base::Init::Init(): _C_fmtfl |= _RWSTD_IOS_NOLOCK | _RWSTD_IOS_NOLOCKBUF;A#endif // _RWSTD_MULTI_THREAD && !_RWSTD_NO_REENTRANT_IO && ...}#ifdef __SUNPRO_CC5// prevent warnings about SunPro being unable to find1// source for (intentionally undefined)) functions&template Ibasic_ios<_CharT, _Traits>::basic_ios (const basic_ios<_CharT, _Traits>&){$ _RWSTD_ASSERT (!"not callable");}&template basic_ios<_CharT, _Traits>&Ibasic_ios<_CharT, _Traits>::operator= (const basic_ios<_CharT, _Traits>&){$ _RWSTD_ASSERT (!"not callable"); return *this;}#endif // __SUNPRO_CC} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__ DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endifww+l7Ԧ// -*- C++ -*-L/*************************************************************************** *2 * iosfwd - forward declarations for the iostreams *+ * $Id: //stdlib/3.0-rel/include/iosfwd#3 $ *L *************************************************************************** * > * Copyright 2002 Compaq Information Technologies Group, L.P. *C * Compaq and the Compaq logo are trademarks of Compaq Information@ * Technologies Group, L.P. in the U.S. and/or other coun ,tries. *J * Confidential computer software. Valid license from Compaq required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Ri -ghts Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof . may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.22/7-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/#ifndef _RWSTD_IOSFWD_INCLUDED#define _RWSTD_IOSFWD_INCLUDED#include #ifndef __USE_STD_IOSTREAMz#error "cannot include iosfwd -- define __USE_STD_IOSTREAM to override default - see section 7.1.2 of the C++ Using Guide"#else#if defined(__DECCXX)# ifde0f __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endif#ifndef _RWSTD_NO_MBSTATE_T># if defined (__GNUG__) && __GNUG__ < 3 &&__GNUC_MINOR__ < 96: // included to work around a g++ 2.95.2 bug# include _RWSTD_CSTRING# endif. // get mbstate_t (and wchar_t for MSVC 6.0)# include _RWSTD_CWCHAR %# if defined (_RWSTD_NO_LIBC_IN_STD)_RWSTD_NAMESPACE (std) { B// bring global mbstat1e_t into namespace std if it's not there yet_USING (::mbstate_t);} // namespace std## endif // _RWSTD_NO_LIBC_IN_STD+#else // if defined (_RWSTD_NO_MBSTATE_T) extern "C" {"# ifndef _RWSTD_MBSTATE_T_DEFINED"# define _RWSTD_MBSTATE_T_DEFINEDtypedef struct { # ifdef _RWSTD_MBSTATE_T_SIZE) char _C_fill [_RWSTD_MBSTATE_T_SIZE]; # else! char _C_fill [sizeof (long)]; # endif } mbstate_t;&# endif // _RWSTD_MBSTATE_T_DEFINED} // extern 2"C"_RWSTD_NAMESPACE (std) { _USING(::mbstate_t);} // namespace std#endif // _RWSTD_NO_MBSTATE_T E#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) { template class allocator;templatestruct char_traits;_RWSTD_SPECIALIZED_CLASSstruct char_traits;#ifndef _RWSTD_NO_WCHAR_T_RWSTD_SPECIALIZED_C3LASSstruct char_traits;#endif // _RWSTD_NO_WCHAR_Ttemplate) >class basic_ios;template) >class basic_streambuf; // 27.2, p4template) >class basic_istream; // 27.2, p5template) >class basic_ostream;template),G class _Allocator _RWSTD_COMPLEX_DEFAULT (allocator<_CharT>) > class basic_stringbuf;template),H class _Allocator _RWSTD_COMPLEX_DEFAULT (allocator<_CharT>) > class basic_istringstream;template),G class _Allocator _RWSTD_COMPLEX_DEFAULT (allocator<_CharT>) > class basic_ostringstream;template) >class basic_filebuf;template) >class basic_ifstream;template) >class basi6c_ofstream;template) > class ostreambuf_iterator;template) > struct istreambuf_iterator; // 27.2, p6template) >class basic_iostream;template) >clas7s basic_fstream;template),H class _Allocator _RWSTD_COMPLEX_DEFAULT (allocator<_CharT>) > class basic_stringstream;+#ifndef _RWSTD_NO_COMPLEX_DEFAULT_TEMPLATES?typedef basic_ios ios;Etypedef basic_streambuf streambuf;Ctypedef basic_istream istream;Ctypedef basic_ostream 8 ostream;Etypedef basic_stringbuf stringbuf;Itypedef basic_istringstream istringstream;Itypedef basic_ostringstream ostringstream;Ctypedef basic_filebuf filebuf;Dtypedef basic_ifstream ifstream;Dtypedef basic_ofstream ofstream;Ctypedef basic_fstream 9 fstream;Dtypedef basic_iostream iostream;Htypedef basic_stringstream stringstream;#ifndef _RWSTD_NO_WCHAR_T@typedef basic_ios wios;Ftypedef basic_streambuf wstreambuf;Dtypedef basic_istream wistream;Dtypedef basic_ostream wostream;Ftypedef basic_:stringbuf wstringbuf;Jtypedef basic_istringstream wistringstream;Jtypedef basic_ostringstream wostringstream;Dtypedef basic_filebuf wfilebuf;Etypedef basic_ifstream wifstream;Etypedef basic_ofstream wofstream;Dtypedef basic_fstream wfstream;Etypedef basi ;c_iostream wiostream;Itypedef basic_stringstream wstringstream;#endif // _RWSTD_NO_WCHAR_T#else?typedef basic_ios > ios;Etypedef basic_streambuf > streambuf;Ctypedef basic_istream > istream;Ctypedef basic_ostream > ostream;Btypedef basic_stringbuf, < allocator > stringbuf;Ftypedef basic_istringstream, allocator > istringstream;Ftypedef basic_ostringstream, allocator > ostringstream;Ctypedef basic_filebuf > filebuf;Dtypedef basic_ifstream > ifstream;Dtypedef basic_ofstream > ofstream;Ctypedef basic_fstream > fstre =am;Dtypedef basic_iostream > iostream;Etypedef basic_stringstream, allocator > stringstream;#ifndef _RWSTD_NO_WCHAR_T@typedef basic_ios > wios;Ftypedef basic_streambuf > wstreambuf;Dtypedef basic_istream > wistream;Dtypedef basic_ostream > wostream;Ktypedef basic_stringbuf< >wchar_t, char_traits, allocator > wstringbuf;Otypedef basic_istringstream, allocator > wistringstream;Otypedef basic_ostringstream, allocator > wostringstream;Dtypedef basic_filebuf > wfilebuf;Etypedef basic_ifstream > wifstream;Etypedef basic_ofstream > wofstream;D?typedef basic_fstream > wfstream;Etypedef basic_iostream > wiostream;Mtypedef basic_stringstream, allocator > wstringstream;#endif // _RWSTD_NO_WCHAR_T-#endif // _RWSTD_NO_COMPLEX_DEFAULT_TEMPLATES // 27.2, p8template class fpos;C// 27.2, p9 - identical to std::fpos::state_type>K// and std::fpos::@state_type>, respectivelyEtypedef fpos streampos;Ftypedef fpos wstreampos;} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif#endif // __USE_STD_IOSTREAM"#endif // _RWSTD_IOSFWD_INCLUDEDwwBYl7Ԧ#ifndef __IOSTREAM_HEADER#define __IOSTREAM_HEADERL/*************************************************************************** * . * Copyright 2000 Compaq Computer Corporation *: * COMPAQ Registered in U.S. Patent and Trademark Office. *J * Confidential computer software. Valid license from Compaq required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *N ****************************************************************************//*DThis file either includes iostream_stdimpl.hxx or iostream_impl.hxx 1based upon whether __USE_STD_IOSTREAM is defined.*/#include #ifdef __USE_STD_IOSTREAM#include #else#include #endif#endifww Dܻl7Ԧ/*** >** Copyright 2003 Compaq Information Technologies Group, L.P.**C** Compaq and the Compaq logo are trademarks of Compaq Information@** Technologies Group, L.P. in the U.S. and/or other countries.**J** Confidential computer software. Valid license from Compaq required forF** possession, use or copying. Consistent with FAR 12.211 and 12.212,F** Commercial Computer Software, Computer Software Documentation, andK** Technical Data for Commercial Items are li censed to the U.S. Government/** under vendor's standard commercial license.***/#ifndef __IOSTREAM_HXX#include #endifww FҦl7Ԧ#ifndef __IOSTREAMHXX#define __IOSTREAMHXXL/*************************************************************************** * > * Copyright 2003 Compaq Information Technologies Group, L.P. *C * Compaq and the Compaq logo are trademarks of Compaq Information@ * Technologies Group, L.P. in the U.S. and/or other countries. *J * Confidential computer software. Valid license from Compaq required forF * possession, use or copying. Consistent with FAR 12.211 and 12. G212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *N ****************************************************************************/h#if (defined(__STD_STRICT_ANSI) || defined(__STD_STRICT_ANSI_ERRORS)) && !defined(__NO_USE_STD_IOSTREAM)#error "cannot include iostream.hxx -- do not compile strict_ansi OR define __NO_USE_STD_IOSTREAM - see section 7.1.2 of the C++ Using Guide"#else% /* duplicate for /head: * includes iostream_stdimpl.hxx or iostream_impl.hxx 8 * based upon whether __USE_STD_IOSTREAM is defined. */ /* # include */# ifdef __USE_STD_IOSTREAM&# include # else## include # endif#endif#endifwwIl7Ԧ#ifndef __IOSTREAM_HXX#define __IOSTREAM_HXX#define IOSTREAMH//// B// Copyright 2003, 2005 Hewlett-Packard Development Company, L.P.//F// Confidential computer software. Valid license from HP required forF// possession, use or copying. Consistent with FAR 12.211 and 12.212,F// Commercial Computer Software, Computer Software Documentation, andK// Technical Data for Commercial Items are licensed to the U.S. Government/// under vendor's standard commercialJ license.//////++#// FACILITY: DEC C++ Class Library//$// SUBSYSTEM: The iostream package.//<// MODULE: Include file for the iostream (core) subpackage.//// MODULE DESCRIPTION://F// The iostream (core) subpackage provides all the basic functionalityE// of the iostream package in a self-contained subset of classes. InH// addition, some of its base classes are used for derivation of classesI// in iostream's other subpackages, and in other packages such as String.//K// DESIGN ISSUES://@// The design of the Iostream_init class, as described in AT&T'sI// documentation, seems to rely on cfront's bug in its handling of externA// declarations, and therefore could not be implemented here in a// compatible fashion.////-- //++// INCLUDE FILES//--/* #include */#ifdef __USE_STD_IOSTREAM #error "cannot include iostream.hxx -- do not compile strict_ansi OR define __NO_USE_STD_IOSTREAM - see section 7.1.2 of the C++ Using GuideL"#else#include #include extern "C"{?// platform specific include files, for backwards compatibility#if defined(__VMS)# include # include # include # if defined(__VMS_POSIX)# include # else# include # endif#endif#if defined(__unix__)# include #endif}#pragma __environment save)#pragma __environment cxx_header_defaultsE#if defined(__VMS) && defiMned(__DECCXX) && !defined(__DECFIXCXXL1802)#pragma __extern_prefix __save1#pragma __extern_prefix __CXXL_PLAIN_FUNC_LINKAGE#endif//++// GLOBAL DEFINITIONS//--"typedef long streamoff, streampos; #ifndef EOF# define EOF (-1)#endif#ifndef zapeof# define zapeof(c) ((c)&0377)#endifclass streambuf;class ostream; class Mutex; class ios//++// FUNCTIONAL DESCRIPTION://A// The stream classes derived from class ios provide a high levelA// interfaNce that supports transferring formatted and unformatted*// information into and out of streambufs.//G// Several enumerations are declared in class ios (open_mode, io_state,H// seek_dir, and format flags) to avoid polluting the global name space.//--{public:'#if defined(__VMS) && defined(__DECCXX)4# pragma __extern_prefix __CXXL_PLAIN_DATA_LINKAGE#endif; enum io_state { goodbit = 0, eofbit = 01, failbit = 02, badbit = 04 };N enum open_mode { in = 01, out O = 02, ate = 04, app = 010, trunc = 020,= nocreate = 040, noreplace = 0100 };8 enum seek_dir { beg = 0, cur = 01, end = 02 };$ // Flags for controlling format.& enum { skipws = 01,8 // Skip whitespace on input.@ left = 02, right = 04, internal = 010,0 // Padding location.< dec = 020, oct = 040, hex = 0100, / P // Conversion base.O showbase = 0200, showpoint = 0400, uppercase = 01000,* showpos = 02000,) // Modifiers.= scientific = 04000, fixed = 010000,7 // Floating point notation.= unitbuf = 020000, stdio = 040000 };0 // Flushing options.'#if defined(__VMS) && defined(__DECCXX)4# pragma __extern_prefix __CXXQL_PLAIN_FUNC_LINKAGE#endif) ios(streambuf *); virtual ~ios(); inline int bad() const;# static long bitalloc();& inline void clear(int state = 0); inline int eof() const; inline int fail() const; inline char fill() const; char fill(char); inline long flags() const;$ long flags(long); inline int good() const; long &iword(int); inline int operator!(); inline Roperator void *();" inline int precision() const;' int precision(int); void *&pword(int); inline streambuf *rdbuf(); inline int rdstate() const;7 long setf(long setbits, long field);# long setf(long);* static void sync_with_stdio(); inline ostream *tie() const; ostream *tie(ostream *);% long unsetf(long); inline int width() const; int width(int);! static intS xalloc();&#if defined(__osf__) || defined(__VAX)> inline Mutex *__get_mutex_info() { return m_mutex_info; }#endif;#if defined(__VMS) && (defined(__alpha) || defined(__ia64))< inline long __get_mutex_info() { return m_mutex_info; }#endif protected: ios();* void init(streambuf *); void setstate(int state);' inline void __setstate(int state); inline int __width(int); private: # ios(ios T&);) void operator=(ios &);N// Data member definitions -- each platform has own backward compatible layout#if defined(__VMS)private: streambuf* volatile m_psb;! volatile char m_chFill;'#if defined(__alpha) || defined(__ia64) char m_mutex_info;#endif! volatile long m_lFlags;% volatile short m_iPrecision; protected: volatile int state;private:! ostream * volatile m_posTie;# volatile short m_cchFieldU;#if defined(__VAX) > Mutex * m_mutex_info; // __xalloc_buf in previous version7 int __fill2; // __xalloc_size in previous version#endif#endif#if defined(__unix__) private: long m_nXalloc; long * m_pXalloc; protected: streambuf* volatile m_psb; volatile int state; int ispecial; int ospecial;. int m_is_fstream; // allow __flush to // check for fstream // VMS will use __fd() int osfx_special;V int __fill4;" ostream* volatile m_posTie; volatile long m_lFlags;" volatile short m_iPrecision; volatile char m_chFill; char __fill5; volatile short m_cchField; short __fill6;#if defined(__osf__) Mutex * m_mutex_info;#endif#endif!// Static data member definitions'#if defined(__VMS) && defined(__DECCXX)4# pragma __extern_prefix __CXXL_PLAIN_DATA_LINKAGE#endifpublic:4 static const long __CXXL_XFER_DECL(basefWield);. // dec | oct | hex6 static const long __CXXL_XFER_DECL(adjustfield);6 // left | right | internal5 static const long __CXXL_XFER_DECL(floatfield);1 // scientific | fixedprivate:1 static long __CXXL_XFER_DECL(cxxl_bitalloc);. static int __CXXL_XFER_DECL(cxxl_xalloc);'#if defined(__VMS) && defined(__DECCXX)4# pragma __extern_prefix __CXXL_PLAIN_FUNC_LINKAGE#endif#if defined(X__unix__) protected:4 static int xalloc_count() {return cxxl_xalloc;}public:M int skip(int); // compatibility with previous version#endif friend class Iostream_init;$ friend class istream_withassign;$ friend class ostream_withassign;% friend class iostream_withassign;}; '#if defined(__VMS) && defined(__DECCXX)4# pragma __extern_prefix __CXXL_PLAIN_FUNC_LINKAGE#endifclass streambuf//++// FUNCTIONAL DESCRIPTION://A// ThiYs base class implements the buffer abstraction for streams.J// Characters can be inserted (put) into buffers or extracted (gotten) out // of them.//--{public:$ streambuf();4 streambuf(char *p, int len); void dbp();Q#if (defined(__alpha) || defined(__ia64)) && (defined(__osf__) || defined(__VMS))' inline void __set_mutex_info(int);; inline int __get_mutex_info() { return m_mutex_info; }#endifprivate:Z/ streambuf(streambuf &);/ void operator=(streambuf &); int snextcUnderflow();- int __gets(char *ptr, int n, int flag);0 int __getl(long &l, int skipws, int base);: int __getul(unsigned long &l, int skipws, int base);( int __getd(double &d, int skipws); protected: int allocate(); inline char *base(); inline int blen(); inline char *eback();-#if defined(__VMS) && (__VMS_VER < 70000000)  in[line char *ebuf(); inline void gbump(int n); inline void pbump(int n);# inline void unbuffered(int n);#else char *ebuf(); void gbump(int n); void pbump(int n); void unbuffered(int n);#endif inline char *egptr(); inline char *epptr(); inline char *gptr(); inline char *pbase(); inline char *pptr();- void setb(char *b, char *eb, int a = 0);, void setg(char *eb, char *g, char *eg);" void setp(char *p, char *\ep); inline int unbuffered(); #ifdef __VMS) inline char *GetDataMaxPtr();/ inline void SetDataMaxPtr(char *b);#else# char *GetDataMaxPtr();) void SetDataMaxPtr(char *b);#endif int __allocate(); inline void __gbump(int n); inline void __pbump(int n);/ void __setb(char *b, char *eb, int a = 0);. void __setg(char *eb, char *g, char *eg);$ void __setp(char *p, char *ep);+ inline char *__GetDa]taMaxPtr();1 inline void __SetDataMaxPtr(char *b);public:-#if defined(__VMS) && (__VMS_VER < 70000000)  inline int in_avail(); inline int out_waiting(); inline int sbumpc(); inline int sgetc(); inline int snextc();#else int in_avail(); int out_waiting(); int sbumpc(); int sgetc(); int snextc();#endif2 streambuf *setbuf(char *ptr, int len, int i);" int sgetn(char *ptr, int n); int sp^utbackc(char c); int sputc(int c = EOF);& int sputn(const char *s, int n); void stossc(); inline int __in_avail(); inline int __out_waiting(); inline int __sbumpc(); inline int __sgetc();* inline int __sgetn(char *ptr, int n); inline int __snextc();$ inline int __sputbackc(char c); int __sputc(int c = EOF);. inline int __sputn(const char *s, int n); inline void __stossc();4 inline int __FastFill(const char,_ int);6 inline int __FastSputn(const char*, int);O// Virtual member functions -- each platform has own backward compatible layout#if defined(__VMS)public:% virtual ~streambuf(); protected:% virtual int doallocate();public:. virtual int overflow(int c = EOF);) virtual int pbackfail(int c);E virtual streampos seekpos(streampos, int = ios::in | ios::out);B virtual streampos seekoff(streamoff, __SCOPE(ios::)seek_`dir, int = ios::in | ios::out);2 virtual streambuf *setbuf(char *ptr, int len); virtual int sync();$ virtual int underflow();#endif(#if defined(__osf__) || defined(__linux) protected:% virtual int doallocate();public:. virtual int overflow(int c = EOF);$ virtual int underflow();) virtual int pbackfail(int c); virtual int sync();B virtual streampos seekoff(streamoff, __SCOPE(ios::)seek_dir,a int = ios::in | ios::out);E virtual streampos seekpos(streampos, int = ios::in | ios::out);#if defined (__osf__)+ virtual int xsputn(const char *, int);% virtual int xsgetn(char *, int);#endif2 virtual streambuf *setbuf(char *ptr, int len);% virtual ~streambuf();#endif#// System specific member functions#if defined(__VMS)public:=// VMS has public functions for accessing streambuf file info inline int fd(); inline FILE *fp();b#if (__VMS_VER < 70000000)  inline void fd(int); inline void fp(FILE *);#else void fd(int); void fp(FILE *);#endif void __fd(int);private:O// VMS has private obsolete functions accessed through the shard library vector int StdioSgetc(); int StdioSnextc();#endif#if defined(__osf__)private:F// OSF has private obsolete functions accessed through old inline code int x_snextc();public:- streambuf* setbuf(unsigned char *, in ct);#endifN// Data member definitions -- each platform has own backward compatible layout#if defined(__VMS) protected:M // The following field contains two flags and a 2**29-1 count for filebufL // the flags and the count were placed here to avoid increasing the size= // of filebuf objects and breaking backward compatiblity.B // The flags are in the 3 least significant bits of the field,- // the count is in the rest of the field.B // This field is private to the stre dambuf and filebuf classes.= enum buffer_state { DoAutoDelete = 01, // streambuf flag" OwnsFd = 02, // filebuf flag& NeedsSync = 04 }; // filebuf flagA unsigned int m_bBufferFlags; // 3 flags for stream/file buf % // changed file pos for filebuf: char * volatile m_pchDataMax; // buffer maximum size2 char * volatile m_pchBase; // base of buffer9 volatile int m_cchBuffer; // length of buffer% char * volatile m_pchEback; // $ char * volateile m_pchEgptr; //$ char * volatile m_pchEpptr; //7 volatile int m_fd; // file descriptor for filebuf/ FILE * volatile m_pfile; // file variable# char * volatile m_pchGptr; //$ char * volatile m_pchPbase; //# char * volatile m_pchPptr; //F volatile short m_bIsOkToAllocate; // buffered/unbuffered flag'#if defined(__alpha) || defined(__ia64)- int m_mutex_info; // Mutex array index#endif#endif#if defined(__unix__)private:" short f m_bDoAutoDelete;* volatile short m_bIsOkToAllocate;#if defined(__osf__). int m_mutex_info; // Mutex array index#endif char * volatile m_pchBase; char * volatile m_pchPbase; char * volatile m_pchPptr; char * volatile m_pchEpptr; char * volatile m_pchGptr; char * volatile m_pchEgptr; char * volatile m_pchEback;$ volatile int m_cchBuffer;% volatile int m_cchDataMax;#endif friend class istream;( friendg void ios::sync_with_stdio();}; "class istream : virtual public ios//++// FUNCTIONAL DESCRIPTION://H// This class provides formatted and unformatted input (extraction) from// an associated streambuf.//--{public:- istream(streambuf *);# virtual ~istream();9 istream &get(char *ptr, int len, char delim = '\n');B istream &get(unsigned char *ptr, int len, char delim = '\n'); istream &get(char &);) inline ist hream &get(unsigned char &);4 istream &get(streambuf &sb, char delim = '\n'); int get();= istream &getline(char *ptr, int len, char delim = '\n');2 istream &getline(unsigned char *ptr, int len, char delim = '\n');> istream &ignore(int len = 1, int delim = EOF); int ipfx(int need = 0); void isfx(); int peek(); istream &putback(char);. istream &read(char *s, int n);2 inline istream &read(unsigned char *s,i int n); istream &seekg(streampos);7 istream &seekg(streamoff, __SCOPE(ios::)seek_dir);$ void skipwhite(); int sync(); streampos tellg();! istream &operator>>(char *);! istream &operator>>(char &);" istream &operator>>(short &); istream &operator>>(int &);! istream &operator>>(long &);;#if defined(__VMS) && (defined(__alpha) || defined(__ia64))$ istream &operator>>(__int64 &);#elseu#if defined(__DECCXX) && !j(defined(__STD_STRICT_ANSI) || defined(__STD_STRICT_ANSI_ERRORS)) && !defined(__CXXLFIX634)( istream &operator>>(long long& ld) > { long l; if (*this >> l) ld = (long long) l; return *this; }1 istream &operator>>(unsigned long long& ld) G { long l; if (*this >> l) ld = (unsigned long long) l; return *this; }#endif#endif inline int gcount();'#if defined(__VMS) && defined(__DECCXX)4# pragma __extern_prefix __CXXL_FLOAT_FUNC_LINKAGE#endif" istream &operator>>(flokat &);# istream &operator>>(double &);!#if __X_FLOAT && defined(__osf__)+ istream &operator>>(long double & ld);#else+ istream &operator>>(long double & ld) B { double d; if (*this >> d) ld = (long double) d; return *this; }#endifr#if defined(__DECCXX) && defined(__DECCXX_VER) && (__DECCXX_VER >= 60000000) && defined(__BOOL_IS_A_RESERVED_WORD)" istream &operator>>(bool& b) 7 { int i; if (*this >> i) b = (bool) i; return *this; }#endif'#if defined(__VMS) && defineld(__DECCXX)4# pragma __extern_prefix __CXXL_PLAIN_FUNC_LINKAGE#endif* istream &operator>>(unsigned char *);* istream &operator>>(unsigned char &);+ istream &operator>>(unsigned short &);) istream &operator>>(unsigned int &);* istream &operator>>(unsigned long &);;#if defined(__VMS) && (defined(__alpha) || defined(__ia64))- istream &operator>>(unsigned __int64 &);#endif& istream &operator>>(streambuf *);9 inline istream &operator>>(istream &(*f)(istmream &));+ istream &operator>>(ios &(*f)(ios &)); protected: istream();private:! volatile int m_cchGet; int __ipfx(int need = 0);#if defined(__osf__) E// The following are provided for binary compatibility with previous// versions of DEC OSF/1 int do_ipfx(int need = 0); void xget(char *);E// The following are provided for compatibility with obsolete streamG// interfaces that are provided for binary compatibility with previous// nversions of DEC OSF/1public:< /* obsolete */ istream(streambuf *, int, ostream * = 0);4 /* obsolete */ istream(int, int, ostream * = 0);- /* obsolete */ istream(int, char *, int);#endif$ friend class istream_withassign;% friend class iostream_withassign;}; "class ostream : virtual public ios//++// FUNCTIONAL DESCRIPTION://H// This class provides formatted and unformatted output (insertion) into// an associated streambuf.//--{public:'#if defioned(__VMS) && defined(__DECCXX)4# pragma __extern_prefix __CXXL_PLAIN_FUNC_LINKAGE#endif ostream(streambuf *); virtual ~ostream();! ostream &flush();" inline ostream &__flush_tie(); int opfx(); void osfx(); ostream &put(char);* ostream &seekp(streampos);B ostream &seekp(streamoff, __SCOPE(ios::)seek_dir);3 streampos tellp(); , ostream &write(const char *ptr, int n);; pinline ostream &write(const unsigned char *ptr, int n);2 ostream &operator<<(const char *); ostream &operator<<(char);& inline ostream &operator<<(short);) ostream &operator<<(int);* ostream &operator<<(long);;#if defined(__VMS) && (defined(__alpha) || defined(__ia64))- ostream &operator<<(__int64);#endif. inline ostream &operator<<(unsigned char);/ inline ostream &operator<<(unsigned short);( ostream &oper qator<<(unsigned int); 3 ostream &operator<<(unsigned long);;#if defined(__VMS) && (defined(__alpha) || defined(__ia64))6 ostream &operator<<(unsigned __int64);#elseu#if defined(__DECCXX) && !(defined(__STD_STRICT_ANSI) || defined(__STD_STRICT_ANSI_ERRORS)) && !defined(__CXXLFIX634)/ inline ostream &operator<<(long long);8 inline ostream &operator<<(unsigned long long);#endif#endif2 ostream &operator<<(const void *);1 osrtream &operator<<(streambuf *);9 inline ostream &operator<<(ostream &(*f)(ostream &));6 ostream &operator<<(ios &(*f)(ios &));'#if defined(__VMS) && defined(__DECCXX)4# pragma __extern_prefix __CXXL_FLOAT_FUNC_LINKAGE#endif+ ostream &operator<<(float);, ostream &operator<<(double);!#if __X_FLOAT && defined(__osf__)* ostream &operator<<(long double);#else1 inline ostream &operator<<(long double);#endsifr#if defined(__DECCXX) && defined(__DECCXX_VER) && (__DECCXX_VER >= 60000000) && defined(__BOOL_IS_A_RESERVED_WORD)% inline ostream &operator<<(bool);#endif'#if defined(__VMS) && defined(__DECCXX)4# pragma __extern_prefix __CXXL_PLAIN_FUNC_LINKAGE#endif#if defined(__VMS) // OpenVMS specific function0 ostream &operator<<(const unsigned char *);#endif protected:" ostream();private:> void __WriteJustifiedString(const char *, const chtar *); int __opfx();# ostream &__flush();#if defined(__osf__)L// The following functions are obsolete and only provided for compatibility<// with the stream interface that was provided on DEC OSF/1public: ostream(int); ostream(int, char*); #if defined(__CXXL_IOSTREAM_CXX)E// The following functions are obsolete and only provided for binaryH// compatibility with the previous iostream implementation on DEC OSF/1 int do_opfx(); void do_ousfx();, ostream &operator<<(void *);#endif#endif}; /class iostream : public istream, public ostream//++// FUNCTIONAL DESCRIPTION://E// This class, derived from both istream and ostream, is intended forA// bidirectional I/O operations on a single stream of characters.//--{public: iostream(streambuf *); virtual ~iostream(); protected: iostream();}; )class istream_withassign : public istream//++// FUNCTIONAL DESCRIPTION:v//H// This class adds an assignment operator, as well as a constructor with&// no arguments, to the istream class.//--{public: istream_withassign();# virtual ~istream_withassign();- istream_withassign &operator=(istream &);/ istream_withassign &operator=(streambuf *);\ istream_withassign &operator=(istream_withassign& s) { return operator=((istream&) s); }}; )class ostream_withassign : public ostream//++// FUNCTIONAL DESCRIPTION://H// This clasws adds an assignment operator, as well as a constructor with&// no arguments, to the ostream class.//--{public: ostream_withassign();# virtual ~ostream_withassign();- ostream_withassign &operator=(ostream &);/ ostream_withassign &operator=(streambuf *);\ ostream_withassign &operator=(ostream_withassign& s) { return operator=((ostream&) s); }}; +class iostream_withassign : public iostream//++// FUNCTIONAL DESCRIPTION://H// This class adds an assignxment operator, as well as a constructor with'// no arguments, to the iostream class.//--{public: iostream_withassign();$ virtual ~iostream_withassign();/ iostream_withassign &operator=(iostream &);0 iostream_withassign &operator=(streambuf *);_ iostream_withassign &operator=(iostream_withassign& s) { return operator=((iostream&) s); }}; class Iostream_init//++// FUNCTIONAL DESCRIPTION://J// This class is present for technical reasons relating toy initialization.G// It has no public members. The Iostream_init constructor initializesG// the predefined streams. Because an object of this class is declaredH// here in the header file, the constructor is called once each time theD// header is included (although the real initialization is done onlyI// once), and therefore the predefined streams will be initialized beforeI// they are used (in some cases, global constructors may need to call the8// Iostream_init constructor explicitly to eznsure this).//--{public: Iostream_init(); ~Iostream_init(); void initialize();private:'#if defined(__VMS) && defined(__DECCXX)4# pragma __extern_prefix __CXXL_PLAIN_DATA_LINKAGE#endif, static int __CXXL_XFER_DECL(initcount); friend class ios;}; //++// GLOBAL DECLARATIONS//--// Predefined streams//<// cin - The standard input (file descriptor 0), buffered.=// cout - The standard output (file descriptor 1), buffered.F// { cerr - The standard error (file descriptor 2), unit-buffered (thatB// is, characters are flushed after each inserter operation).<// clog - The standard error (file descriptor 2), buffered.'#if defined(__VMS) && defined(__DECCXX)4# pragma __extern_prefix __CXXL_PLAIN_DATA_LINKAGE#endif0extern istream_withassign __CXXL_XFER_DECL(cin);1extern ostream_withassign __CXXL_XFER_DECL(cout);1extern ostream_withassign __CXXL_XFER_DECL(cerr);1extern ostream_withassign __CXXL_XFER_DECL(c|log);// Manipulators//I// A manipulator is a value that can be inserted into or extracted from a,// stream to cause some special side effect.'#if defined(__VMS) && defined(__DECCXX)4# pragma __extern_prefix __CXXL_PLAIN_FUNC_LINKAGE#endifios &dec(ios &);ios &hex(ios &);ios &oct(ios &);ostream &endl(ostream &i);ostream &ends(ostream &i);ostream &flush(ostream &);istream &ws(istream &);ios &lock(ios &);ios &unlock(ios &); inline int ios::bad( ) co}nst//++// FUNCTIONAL DESCRIPTION://H// This function is called to check if badbit is set in the error state.I// If the bit is set, it usually indicates that some operation has failedI// with a severe error from which recovery is probably impossible. I.e.,K// it will probably be impossible to continue I/O operations on the stream.//// RETURN VALUE://@// Non-zero if badbit is set in the error state; zero otherwise.//--{ return state & badbit;} inline void ~ios::clear(J int __state // The new value of the state variable; defaults to zero. )//++// FUNCTIONAL DESCRIPTION://H// Stores the value of its argument as the error state. If the value isI// zero, this clears all state bits. To set a bit without clearing otherA// bits requires something like clear(ios::badbit | s.rdstate()).//// SIDE EFFECTS:///// Modifies the error state as described above.//--{2 state = __state & (eofbit | failbit | badbit);} inline int ios::eof( ) const//++// FUNCTIONAL DESCRIPTION://H// This function is called to check if eofbit is set in the error state.F// Normally, this bit is set when and end-of-file has been encountered// during an extraction.//// RETURN VALUE://@// Non-zero if eofbit is set in the error state; zero otherwise.//--{ return state & eofbit;} inline int ios::fail( ) const//++// FUNCTIONAL DESCRIPTION://I// This function is called to check if either badbit or failbit is set inH// the error state. See the description of the bad() function above forH// information about the bad bit. If the fail bit is set, this normallyJ// indicates that some extraction or conversion has failed, but the streamE// is still usable. That is, once the failbit is cleared, I/O on the// stream can usually continue.//// RETURN VALUE://G// Non-zero if either badbit or failbit is set in the error state; zero // otherwise.////--{& return state & (failbit | badbit);} inline char ios::fill( ) const//++// FUNCTIONAL DESCRIPTION://=// This function is called to get the current fill character.//// RETURN VALUE://9// The value of the fill-character format state variable.//--{ return m_chFill;} inline long ios::flags( ) const//++// FUNCTIONAL DESCRIPTION://@// This function is called to get the current format flags mask.//// RETURN VALUE://*// The! value of the format flags variable.//--{ return m_lFlags;} inline int ios::good( ) const//++// FUNCTIONAL DESCRIPTION://E// This function is called to check if the stream is in "good" state,)// meaning that it has no error bits set.//// RETURN VALUE://?// Non-zero if the error state has no bits set; zero otherwise.////--{ return state == goodbit;} inline int ios::operator!( )//++// FUNCTIONAL DESCRIPTION://H// This operator allows convenient checking of the error state of an ios4// by using expressions such as "if (cin >> x) ...".//// RETURN VALUE://K// Non-zero if failbit or badbit is set in the error state; zero otherwise.//--{& return state & (failbit | badbit);} inline ios::operator void *( )//++// FUNCTIONAL DESCRIPTION://H// This operator allows convenient checking of the error state of an iosG// by using expressions such as "if (cin) ..." and "if (cin >> x) ...".J// The operator converts an ios to a pointer so that it can be compared toK// zero. The conversion will return a non-zero pointer value (not meant toA// be used) if failbit and badbit are not set in the error state.//// RETURN VALUE://// As described above.//--{3 return (state & (failbit | badbit)) ? 0 : this;} inline int ios::precision( ) const//++// FUNCTIONAL DESCRIPTION://H// This function is called to get the current precision used b#y floating// point inserters.//// RETURN VALUE://'// The precision format state variable.//--{ return m_iPrecision;} inline streambuf *ios::rdbuf( )//++// FUNCTIONAL DESCRIPTION://G// This function is called to get a pointer to the streambuf associated// with the current stream.//// RETURN VALUE://%// The pointer-to-streambuf variable.//--{ return m_psb;} inline int ios::rdstate( ) const//++// FUNCTIONAL DESCRIPTION://H// This function is called to get the current error state of the stream.//// RETURN VALUE://// The error state variable.//--{ return state;} @//==============================================================// Method: ios::__setstate()//// FUNCTIONAL DESCRIPTION://F// This function is called to selectively set state bits. Unlike=// clear(int state), this function only changes the bitsG// specified in the state argument. This function is for internal!// use only. It does no locking.//// SIDE EFFECTS://3// The streambuf's state variable is modified.//@//--------------------------------------------------------------inline void ios::__setstate(8 int __state) // A mask of the state bits to be set.{3 state |= __state & (eofbit | failbit | badbit);} inline ostream *ios::tie( ) const//++// FUNCTIONAL DESCRIPTION://C// This function is called to get a pointer to the ostream which isI// automatically flushed when the current stream needs more characters or!// has characters to be consumed.//// RETURN VALUE://// The tie variable.//--{ return m_posTie;} inline int ios::width( ) const//++// FUNCTIONAL DESCRIPTION://E// Returns the current field width used by inserters and extractors. //// RETURN VALUE://#// The field-width format variable.//--{ return m_cchField;} inline char *streambuf::base( )//++// FUNCTIONAL DESCRIPTION://D// This function is called to get a pointer to the first byte of theH// reserve area. Thus, the reserve area is the space between base() and // ebuf().//// RETURN VALUE://!// The streambuf's base variable.//--{ return m_pchBase;} inline int streambuf::blen( )//++// FUNCTIONAL DESCRIPTION://D// This function is called to get the size, in chars, of the current// reserve area.//// RE TURN VALUE://#// The streambuf's length variable.//--{ return m_cchBuffer;} inline char *streambuf::eback( )//++// FUNCTIONAL DESCRIPTION://I// This function is called to get a pointer to the lower bound imposed onF// gptr(). Space between eback() and gptr() is available for putback.//// RETURN VALUE://+// The streambuf's end-of-putback variable.//--{ return m_pchEback;} inline char *streambuf::egptr( )//++// FUNCTIONAL DESCRIPTION://K// This function is called to get a pointer to the byte after the last byte// of the get area.//// RETURN VALUE:///// The streambuf's end-of-get-pointer variable.//--{ return m_pchEgptr;} inline char *streambuf::epptr( )//++// FUNCTIONAL DESCRIPTION://K// This function is called to get a pointer to the byte after the last byte// of the put area.//// RETURN VALUE:///// The streambuf's end-of-put-pointer variable.//--{ return m_pchEpptr;} inline void streambuf::__gbump(3 int n // Value to be added to the get pointer. )//++// FUNCTIONAL DESCRIPTION://K// This function increments gptr() by n, which may be positive or negative.F// No checks are made on whether the new value of gptr() is in bounds.//// SIDE EFFECTS://+// The value of the get pointer is changed.//--{ m_pchGptr += n;} inline char *streambuf::gptr( )//++// FUNCTIONAL DESCRIPTION://H// This function is called to get a pointer to the first byte of the getH// area. The available characters are those between gptr() and egptr().K// Thus, the next character fetched will be *gptr(), unless egptr() is less// than or equal to gptr().//// RETURN VALUE://(// The streambuf's get-pointer variable.//--{ return m_pchGptr;} inline char *streambuf::pbase( )//++// FUNCTIONAL DESCRIPTION://H// This function is called to get a pointer to the base of the put area.I// Characters between pbase() and pptr() have been stored into the buffer// and not yet consumed.//// RETURN VALUE://*// The streambuf's put-area-base variable.//--{ return m_pchPbase;} inline void streambuf::__pbump(3 int n // Value to be added to the put pointer. )//++// FUNCTIONAL DESCRIPTION://K// This function increments pptr() by n, which may be positive or negative.F// No checks are made on whether the new value of pptr() is in bounds.//// SIDE EFFECTS://// The put pointer is changed.//--{ m_pchPptr += n;} inline char *streambuf::pptr( )//++// FUNCTIONAL DESCRIPTION://H// This function is called to get a pointer to the first byte of the put?// area. The space between pptr() and epptr() is the put area.//// RETURN VALUE://(// The streambuf's put-pointer variable.//--{ return m_pchPptr;} !inline int streambuf::unbuffered( )//++// FUNCTIONAL DESCRIPTION://I// This function is called to get the current buffering state flag, whichE// is independent of the actual allocation of a reserve area, and itsD// primary purpose is to control whether a reserve area is allocatedD// automatically by allocate(). If the flag is set to non-zero, the>// automatic allocation is disabled; otherwise, it is enabled.//// RETURN VALUE://'// The streambuf's unbuffered variable.//--{ return m_bIsOkToAllocate;} -#if defined(__VMS) && (__VMS_VER < 70000000) D inline char *streambuf::ebuf() {return m_pchBase + m_cchBuffer;}6 inline void streambuf::gbump(int n) {__gbump(n);}6 inline void streambuf::pbump(int n) {__pbump(n);}M inline void streambuf::unbuffered(int n) {m_bIsOkToAllocate = (n != 0);}#endif #if defined (__VMS)inline int streambuf::fd( )//++// FUNCTIONAL DESCRIPTION://=// Returns the file descriptor associated with the" streambuf.//// RETURN VALUE://5// The file descriptor associated with the streambuf.//--{ return m_fd;}#endif #if defined(__VMS)inline FILE *streambuf::fp( )//++// FUNCTIONAL DESCRIPTION://:// Returns the file pointer associated with the streambuf.//// RETURN VALUE://2// The file pointer associated with the streambuf.//--{ return m_pfile;}#endif ,#if defined(__VMS) && (__VMS_VER < 70000000)"inline void streambuf::fd(int f) { m_fd = f; m_pfile = 0;}$inline void streambuf::fp(FILE *f) { m_pfile = f; m_fd = -1;}4#endif //if defined(__VMS) && (__VMS_VER < 70000000) ,#if defined(__VMS) && (__VMS_VER < 70000000)7inline int streambuf::in_avail() {return __in_avail();}=inline int streambuf::out_waiting() {return __out_waiting();}3inline int streambuf::sbumpc() {return __sbumpc();}1inline int streambuf::sgetc() {return __sgetc();}3inline int streambuf::snextc() {return __snextc();}5#endif //if defined(__VMS) && (__VMS_VER < 70000000) !inline int streambuf::__in_avail( )//++// FUNCTIONAL DESCRIPTION://I// Returns the number of characters that are immediately available in theE// get area for fetching. It is the number of characters that may be<// fetched with a guarantee that no errors will be reported.//// RETURN VALUE://G// Number of characters that are immediately available in the get area.//--{? return m_pchGptr < m_pchEgptr ? m_pchEgptr - m_pchGptr : 0;} $inline int streambuf::__out_waiting( )//++// FUNCTIONAL DESCRIPTION://F// Returns the number of characters in the put area that have not been'// consumed (by the ultimate consumer).//// RETURN VALUE://H// Number of characters in the put area that have not yet been consumed.//--{B return (m_pchPbase && m_pchPptr) ? m_pchPptr - m_pchPbase : 0;} inline int streambuf::__sbumpc( )//++// FUNCTIONAL DESCRIPTION://I// Moves the get pointer forward one character, and returns the characterI// it moved past. Returns EOF if the get pointer is currently at the end// of the sequence.//// RETURN VALUE://8// The character pointed to by the original get pointer.//--{ if (m_pchGptr >= m_pchEgptr) if (underflow() == EOF) return EOF; return zapeof(*m_pchGptr++);} inline int streambuf::__sgetc( )//++// FUNCTIONAL DESCRIPTION://F// Returns the character after the get pointer. Contrary to what mostI// people expect, sgetc does not move the get pointer. It returns EOF if#// there is no character available.//// RETURN VALUE://9// The character currently pointed to by the get pointer.//--{ if (m_pchGptr >= m_pchEgptr) if (underflow() == EOF) return EOF; return zapeof(*m_pchGptr);} inline int streambuf::__snextc( )//++// FUNCTIONAL DESCRIPTION://H// Moves the get pointer forward one character and returns the characterJ// following the new position. It returns EOF if the pointer is currentlyH// at the end of the sequence, or is at the end of sequence after moving // forward.//// RETURN VALUE://3// The character pointed to by the new get pointer.//--{" if (++m_pchGptr >= m_pchEgptr)! return snextcUnderflow(); else" return zapeof(*m_pchGptr);} (inline char *streambuf::__GetDataMaxPtr( )//++// FUNCTION!AL DESCRIPTION://>// Returns the buffer pointer. Used only for class strstream.//// RETURN VALUE://// The address of the buffer.//--{#if defined(__VMS) return m_pchDataMax;#else$ return m_pchBase + m_cchDataMax;#endif} #ifdef __VMS&inline char *streambuf::GetDataMaxPtr( )//++// FUNCTIONAL DESCRIPTION://>// Returns the buffer pointer. Used only for class strstream.//// RETURN VALUE://// The address of the buffer.//--{ return __GetDataMaxPtr();}#endif 'inline void streambuf::__SetDataMaxPtr(D char *b // The new buffer pointer associated with the streambuf. )//++// FUNCTIONAL DESCRIPTION://;// Sets the buffer pointer. Used only for class strstream.//// RETURN VALUE://// None.//--{#if defined(__VMS) m_pchDataMax = b;#else! m_cchDataMax = b - m_pchBase;#endif} #ifdef __VMS%inline void streambuf::SetDataMaxPtr(D char *b // The new buffer pointer associated with the streambuf. )//++// FUNCTIONAL DESCRIPTION://;// Sets the buffer pointer. Used only for class strstream.//// RETURN VALUE://// None.//--{ __SetDataMaxPtr(b);}#endif inline int istream::gcount( )//++// FUNCTIONAL DESCRIPTION://P// Returns the number of characters extracted by the last unformatted inputP// function (formatted input functions may call unformatted input functions'// and thereby reset this number).//// RETURN VALUE://J// Number of characters extracted by the last unformatted input operation.//--{ return m_cchGet;} inline istream &istream::get(H unsigned char &c // Reference to the unsigned char being read into. )//++// FUNCTIONAL DESCRIPTION://E// Just like get(char &c), except for the different type of its first // argument.//// RETURN VALUE://-// Reference to the istream being acted upon.//--{  return get((char &)c);} inline istream &istream::read(N unsigned char *s, // Pointer to the unsigned char string being read into.> int n // The number of characters to be read. )//++// FUNCTIONAL DESCRIPTION://G// Just like read(char *s, int n), except for the different type of its// first argument.//// RETURN VALUE://-// Reference to the istream being acted upon.//--{ return read((char *) s, n);} $inline istream &istream::operator>>(J istream &(*f)(istream &) // The function to be used as a manipulator. )//++// FUNCTIONAL DESCRIPTION://A// A direct extraction from one istream to another, with no other// processing invoved.//// RETURN VALUE://-// Reference to the istream being acted upon.//--{ return (*f)(*this);} inline ostream &ostream::write(N const unsigned char *ptr, // Pointer to the char string to be written to.I int n // The number of characters to be written. )//++// FUNCTIONAL DESCRIPTION://I// Just like write(const char *ptr, int n), except for the different type// of its first argument.//// RETURN VALUE://-// Reference to the ostream being acted upon.//--{' return write((const char *)ptr, n);} $inline ostream &ostream::operator<<(9 short i // The variable whose value is to be output. )//++// FUNCTIONAL DESCRIPTION://J// For general information  on formatted inserters, outs << x, see comments%// about operator<<(const char *str).//G// If x is of any integral type except char and unsigned char, then theF// following applies. If x is positive, the representation contains aJ// sequence of decimal, octal, or hexadecimal digits with no leading zerosI// according to whether ios::dec, ios::oct, or ios::hex, respectively, isI// set in ios's format flags. If none of those flags are set, conversionH// defaults to decimal. If x is negat ive, decimal conversion includes aC// minus sign (-) followed by decimal digits. If x is positive andC// ios::showpos is set, decimal conversion includes a plus sign (+)I// followed by decimal digits. The other conversions treat all values asE// unsigned. If ios::showbase is set, the hexadecimal representationH// contains 0x before the hexadecimal digits, or 0X if ios::uppercase isE// set. If ios::showbase is set, the octal representation contains a // leading 0.//// RETURN VALUE://-// Reference to the ostream being acted upon.//--{ return *this << (long)i;} $inline ostream &ostream::operator<<(A unsigned char c // The variable whose value is to be output. )//++// FUNCTIONAL DESCRIPTION://C// Just like operator<<(char), except for the different type of its // argument.//// RETURN VALUE://-// Reference to the ostream being acted upon.//--{ return *this << (char)c;} $inline ostream &ostream::operator<<(B unsigned short i // The variable whose value is to be output. )//++// FUNCTIONAL DESCRIPTION://D// Just like operator<<(short), except for the different type of its // argument.//// RETURN VALUE://-// Reference to the ostream being acted upon.//--{% return *this << (unsigned long)i;} $inline ostream &ostream::operator<<(N ostream &(*f)(ostream &) // The function to be inserted into the ostream. )//++// FUNCTIONAL DESCRIPTION://C// "outs << manip" is equivalent to "manip(outs)", where outs is anK// outstream and manip is a function with the type ostream &(*)(ostream &).K// Syntactically, this looks like an insertion operation, but semantically,C// it does an arbitrary operation rather than converting manip to a8// sequence of characters as do the insertion operators.//// RETURN VALUE://-// Reference to the ostream being acted upon.//--{ return (*f)(*this);} !#if !__X_FLOAT || defined(__VMS) $inline ostream &ostream::operator<<(? long double d // The variable whose value is to be output. )//++// FUNCTIONAL DESCRIPTION:// // Just like operator<<(double).//// RETURN VALUE://-// Reference to the ostream being acted upon.//--{ return *this << (double)d;}#endif#if !defined(__VMS) && defined(__DECCXX) && !(defined(__STD_STRICT_ANSI) || defined(__STD_STRICT_ANSI_ERRORS)) && !defined(__CXXLFIX634) $inline ostream &ostream::operato r<<(= long long d // The variable whose value is to be output. )//++// FUNCTIONAL DESCRIPTION://// Just like operator<<(long).//// RETURN VALUE://-// Reference to the ostream being acted upon.//--{ return *this << (long)d;}$inline ostream &ostream::operator<<(F unsigned long long d // The variable whose value is to be output. )//++// FUNCTIONAL DESCRIPTION://// Just like operator<<(long).//// RETURN VALUE://-// Reference to the ostream being acted upon.//--{ return *this << (long)d;}#endif r#if defined(__DECCXX) && defined(__DECCXX_VER) && (__DECCXX_VER >= 60000000) && defined(__BOOL_IS_A_RESERVED_WORD)$inline ostream &ostream::operator<<(8 bool b // The variable whose value is to be output. )//++// FUNCTIONAL DESCRIPTION://// Just like operator<<(int).//// RETURN VALUE://-// Reference to the ostream being acted upon.//--{ return *this << (int)b;}#endif E#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1802)!#pragma __extern_prefix __restore#endif#pragma __environment restore#endif // __USE_STD_IOSTREAM#endif// End of iostream.hxxww 2.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by in ternationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is provide dB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/ #ifndef _RWSTD_IOSTREAM_INCLUDED #define _RWSTD_IOSTREAM_INCLUDED#include #include #include #include #ifndef __USE_STD_IOSTREAM{#error "cannot include fstream -- define __USE_STD_IOSTREAM to override default - see section 7.1.2 of the C++ Using Guide"#else#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif&#ifndef _RWSTD_NO_STATIC_IOSTREAM_INIT_RWSTD_NAMESPACE (__rw) { E// static stream initializer object defined in every translation unitE// that (directly or otherwise) #includes this header (except the oneE// that defines iostream objects to prevent undesirable dependencies)4static _STD::ios_base::Init __rw_stream_initializer;} // namespace __rw*#endif // _RWSTD_NO_STATIC_IOSTREAM_INIT_RWSTD_NAMESPACE (std) { :_RWSTD_EXPORT extern istream _RWSTD_IOSTREAM_OBJECT (cin);;_RWSTD_EXPORT extern ostream _RWSTD_IOSTREAM_OBJECT (cout);;_RWSTD_EXPORT extern ostream _RWSTD_IOSTREAM_OBJECT (cerr);;_RWSTD_EXPORT extern ostream _RWSTD_IOSTREAM_OBJECT (clog);#ifndef _RWSTD_NO_WCHAR_T<_RWSTD_EXPORT extern wistream _RWSTD_IOSTREAM_OBJECT (wcin);=_RWSTD_EXPORT extern wostream _RWSTD_IOSTREAM_OBJECT (wcout);=_RWSTD_EXPORT extern wostream _RWSTD_IOSTREAM_OBJECT (wcerr);=_RWSTD_EXPORT extern wostream _RWSTD_IOSTREAM_OBJECT (wclog);#endif // _RWSTD_NO_WCHAR_T} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif#endif // __USE_STD_IOSTREAM$#endif // _RWSTD_IOSTREAM_INCLUDEDwwam7Ԧ// -*- C++ -*-L/*************************************************************************** *; * istream - Declarations for the Standard Library istreams *, * $Id: //stdlib/3.0-rel/include/istream#4 $ *L *************************************************************************** * > * Copyright 2002 Compaq Information Technologies Group, L.P. *C * Compaq and the Compaq logo are trademarks of Compaq Information@ * Technologies Group, L.P. in the U.S. and/or other countries. *J * Confidential computer software. Valid license from Compaq required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, In c. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copi es thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/#ifndef _RWSTD_ISTREAM_INCLUDED#define _RWSTD_ISTREAM_INCLUDED#include #ifndef __USE_STD_IOSTREAM{#error "cannot include istream -- define __USE_STD_IOSTREAM to override default - see section 7.1.2 of the C++ Using Guide"#else#include '#ifndef _RWSTD_NO_REDUNDANT_DEFINITIONS# include +#endif // _RWSTD_NO_REDUNDANT_DEFINITIONS #include #include #include #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (__rw) { 9template %_STD::basic_istream<_CharT, _Traits>&C__rw_extract (_STD::basic_istream<_CharT, _Traits>&, _NativeType&);} // namespace __rw_RWSTD_NAMESPACE (std) {  ?template */>>class basic_istream: virtual public basic_ios<_CharT, _Traits>{public:@ typedef _CharT char_t ype;B typedef _Traits traits_type;? typedef _TYPENAME traits_type::int_type int_type;? typedef _TYPENAME traits_type::pos_type pos_type;? typedef _TYPENAME traits_type::off_type off_type;  // 27.6.1.1.1, p1K _EXPLICIT basic_istream (basic_streambuf *__sb) : _C_chcount (0) { this->init (__sb); }? // called from sentry's ctor to prepare stream before input! basic_istream& _C_ipfx (int);. // allow access to ios_base::_C_bufmutex() class sentry; friend class sentry; // 27.6.1.1.2( class sentry: public _RW::__rw_guard { bool _C_ok;; sentry (const sentry&); // not defined; sentry& operator= (const sentry&); // not defined public:8 // 27.6.1.1.2, p2 - assumes 0 != __strm.rdbuf ()I _EXPLICIT sentry (basic_istream &__strm, bool __noskipws = false)7 : _RW::__rw_guard (__strm._C_bufmutex ()),N _C_ok (__strm._C_ipfx (__noskipws + 0).good ()) { /* no-op */ } // 27.6.1.1.2, p8 operator bool () const { return _C_ok; } }; // 27.6.1.2.3, p1H basic_istream& operator>> (basic_istream& (*__pf)(basic_istream&)) { return (*__pf)(*this); } // 27.6.1.2.3, p2H basic_istream& operator>>(basic_ios& (*__pf)E  (basic_ios&)) {% return (*__pf)(*this), *this; } // 27.6.1.2.3, p4> basic_istream& operator>> (ios_base& (*__pf)(ios_base&)) {% return (*__pf)(*this), *this; }) // 27.6.1.2.2 - Arithmetic Extractors#ifndef _RWSTD_NO_NATIVE_BOOL- basic_istream& operator>> (bool &__val) {0 return _RW::__rw_extract (*this, __val); }!#endif // _RWSTD_NO_NATIVE_BOOL- basic_istream& operator>>(short &__val) {0 return _RW::__rw_extract (*this, __val); }6 basic_istream& operator>>(unsigned short &__val) {0 return _RW::__rw_extract (*this, __val); }+ basic_istream& operator>>(int &__val) {0 return _RW::__rw_extract (*this, __val); }4 basic_istream& operator>>(unsigned int &__val) {0 return _RW::__rw_extract (*this, __val); }, basic_istream& operator>>(long &__val) {0 return _RW::__rw_extract (*this, __val); }5 basic_istream& operator>>(unsigned long &__val) {0 return _RW::__rw_extract (*this, __val); }- basic_istream& operator>>(float &__val) {0 return _RW::__rw_extract (*this, __val); }. basic_istream& operator>>(double &__val) {0 return _RW::__rw_extract (*this, __val); }3 basic_istream& operator>>(long double &__val) {0 return _RW::__rw_extract (*this, __val); }#ifdef _RWSTD_LONG_LONG8 basic_istream& operator>>(_RWSTD_LONG_LONG &__val) {0 return _RW::__rw_extract (*this, __val); }A basic_istream& operator>>(unsigned _RWSTD_LONG_LONG &__val) {0 return _RW::__rw_extract (*this, __val); }#endif // _RWSTD_LONG_LONG- basic_istream& operator>>(void* &__val) {0 return _RW::__rw_extract (*this, __val); } // extensionO basic_istream& operator>> (basic_streambuf &__sb) { // call extension0 return get (&__sb, traits_type::eof ()); } // 27.6.1.2.3, p13N basic_istream& operator>>(basic_streambuf *__sb) {% return __sb ? *this >> *__sbC : (this->setstate (ios_base::failbit), *this); }- // 27.6.1.3 - Unformatted input functions // 27.6.1.3, p3 int_type get () {% return sentry (*this, true) ?> _C_unsafe_get (&_C_chcount, traits_type::eof (),5 _ C_faileof | _C_eatnull)" : traits_type::eof (); } // 27.6.1.3, p5* basic_istream& get (char_type& __ch) {M return read (&__ch, 1, traits_type::eof (), _C_failnoi | _C_eatnull); }E // 27.6.1.3, p7: extract at most n - 1 chars, delim not extractedE // always null-terminate, fail if no char extractedL basic_istream& get (char_type *__s, streamsize __n, char_type __delim) {B return read (__s, __n, traits_type::to_int_type (__delim),< _C_nullterm | _C_failnoi | _C_eatnull); }0 // 27.6.1.3, p9: extract at most n - 1 charsE // always null-terminate, fail if no char extracted9 basic_istream& get (char_type *__s, streamsize __n) {2 return get (__s, __n, this->widen ('\n')); }G // extension - first arg is a pointer to disambiguate the overloadsH // in case both int_type and char_type are the same typeL basic_istream& get (basic_ streambuf*, int_type);B // 27.6.1.3, p12: extract up to but not including delim or eofF basic_istream& get (basic_streambuf& __sb,K char_type __delim) { // using extension? return get (&__sb, traits_type::to_int_type (__delim)); } // 27.6.1.3, p15H basic_istream& get (basic_streambuf& __sb) {. return get (__sb, this->widen ('\n')); }K // 27.6.1.3, p16: extract at most n - 1, delim extracted but not stored= // fail if either 0 or n - 1 are extractedP basic_istream& getline (char_type *__s, streamsize __n, char_type __delim) { // using extensionB return read (__s, __n, traits_type::to_int_type (__delim),= _C_nullterm | _C_eatdelim | _C_eatnull0 | _C_failend | _C_failnoi); } // 27.6.1.3, p23= basic_istream& g etline (char_type *__s, streamsize __n) {6 return getline (__s, __n, this->widen ('\n')); }7 // 27.6.1.3, p24: extract at most n including delim. basic_istream& ignore (streamsize __n = 1,D int_type __delim = traits_type::eof ()) {A // using extension - passing null pointer to ignore input@ return read (0, __n, __delim, _C_eatdelim | _C_eatnull); } // extension@ basic_istream& read (char_type*, streamsize, int_type, int);4 // 27.6.1.3, p28: extract at most n, fail on eof1 basic_istream& read (char_type*, streamsize);C // 27.6.1.3, p30: extract at most min (rdbuf()->in_avail(), n))1 streamsize readsome (char_type*, streamsize); // 27.6.1.3, p27 int_type peek ();  // 27.6.1.3, p37 pos_type tellg (); // 27.6.1.3, p38$ basic_istream& seekg (pos_type); // 27.6.1.3, p407 basic_istream& seekg (off_type, ios_base::seekdir); // 27.6.1.3, p36 int sync (); // 27.6.1.3, p32' basic_istream& putback (char_type); // 27.6.1.3, p34 basic_istream& unget (); // 27.6.1.3, p2 streamsize gcount () const { return _C_chcount; }9 // flags used by read() extension and _C_unsafe_get() enum {5 _C_nullterm = 0x01, // null-terminate input> _C_wsterm = 0x02, // terminate input on whitespace8 _C_skipws = 0x04, // skip leading whitespace2 _C_eatdeli m = 0x08, // extract delimiter= _C_faileof = 0x10, // set ios_base::failbit on eofG _C_failend = 0x20, // set ios_base::failbit on end of bufferB _C_failnoi = 0x40, // set ios_base::failbit on no input2 _C_eatnull = 0x80 // extract null char };< // does not construct a sentry, does not affect gcount()7 // extracts character unless it is equal to __delim, int_type _C_unsafe_get (streamsize* = 0,> int_type  = traits_type::eof (),- int = 0); protected:9 streamsize _C_chcount; // number of chars extracted};// 27.6.1.4, p1%template&inline basic_istream<_CharT, _Traits>&+ws (basic_istream<_CharT, _Traits> &__strm){E#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1836) return __strm._C_ipfx (2);#else return __strm._C_ipfx (0);#endif}%template& inline basic_istream<_CharT, _Traits>&6basic_istream<_CharT, _Traits>::seekg (pos_type __pos){( _RWSTD_ASSERT (0 != this->rdbuf ()); if (!this->fail ()) {/ _RWSTD_MT_GUARD (this->_C_bufmutex ());A // 27.6.1.3, p 38 requires that pubseekpos be called with> // a single argument; the implemented behavior follows3 // the proposed resolution of lwg issue 136C if (-1 == this->rdbuf ()->pubseekpos (__pos, ios_base::in))B this->setstate (ios_base::failbit); // lwg issue 129 } return *this;}%template&inline basic_istream<_CharT, _Traits>&Obasic_istream<_CharT, _Traits>::seekg (off_type __off, ios_base::seekdir __dir){( _RWSTD_ASSERT (0 != this->rdbuf ()); if (!this->fail ()) {/ _RWSTD_MT_GUARD (this->_C_bufmutex ());A // 27.6.1.3, p 40 requires that pubseekoff be called with: // two arguments; the implemented behavior follows3 // the proposed resolution of lwg issue 136J if (-1 == this->rdbuf ()->pubseekoff (__off, __dir, ios_base::in))B this->setstate (ios_base::failbit); // lwg issue 129 } return *this;}// 27.6.1.2.3, p10template $inline basic_istream&2operator>> (basic_istream& __strm, . unsigned char& __c){: return __strm >> _RWSTD_REINTERPRET_CAST (char&, __c);}template $inline basic_istream&2operator>> (basic_istream& __strm, . signed char& __c){: return __strm >> _RWSTD_REINTERPRET_CAST (char&, __c);}// 27.6.1.2.3, p6template $inline basic_istream&2operator>> (basic_istream& __strm, . unsigned char* __s){: return __strm >> _RWSTD_REINTERPRET_CAST (char*, __s);}template $inline basic_istream&2operator>> (basic_istream& __strm,  signed char* __s){: return __strm >> _RWSTD_REINTERPRET_CAST (char*, __s);}%template9inline _TYPENAME basic_istream<_CharT, _Traits>::int_type'basic_istream<_CharT, _Traits>::peek (){( _RWSTD_ASSERT (0 != this->rdbuf ()); _C_chcount = 0;: return sentry (*this, true) ? this->rdbuf ()->sgetc ()6 : traits_type::eof ();}// 27.6.1.2.3, p10%template&inline basic_istream<_CharT, _Traits>&@operator>> (basic_istream<_CharT, _Traits> &__strm, _CharT &__c){> // read the first non-space char, set failbit if none read1 return __strm.read (&__c, 1, _Traits::eof (),R __strm._C_skipws | __strm._C_failnoi | __strm._C_eatnull);}// 27.6.1.2.3, p6%template&inline basic_istream<_CharT, _Traits>&@operator>> (ba sic_istream<_CharT, _Traits> &__strm, _CharT *__s){ _RWSTD_ASSERT (0 != __s);? // store at most this many chars including terminating nullC const streamsize __maxlen = __strm.width () ? __strm.width () :H (numeric_limits::max)() - 1;G // read at most __maxlen non-space chars up to the first whitespaceK __strm.read (__s, __maxlen, _Traits::to_int_type (__strm.widen ('\n')),8 __strm._C_nullterm | __strm._C_wsterm; | __strm._C_skipws | __strm._C_failnoi); __strm.width (0); return __strm;}7templatebasic_istream<_CharT, _Traits>&,operator>> (basic_istream<_CharT, _Traits>&,8 basic_string<_CharT, _Traits, _Allocator>&);]#if defined(__DECCXX) && !defined(__DECFIXCXXL1922) && !defined(_RWSTD_NO_IMPLICIT_INCLUSION)#else7templatebasic_istream<_CharT, _Traits>&)getline (basic_istream<_CharT, _Traits>&,4 basic_string<_CharT, _Traits, _Allocator>&, _CharT);7template'inline basic_istream<_CharT, _Traits>& 9getline (basic_istream<_CharT, _Traits>& __is,: basic_string<_CharT, _Traits, _Allocator>& __str){4 return getline (__is, __str, __is.widen ('\n'));}#endif /* __DECFIXCXXL1922 */ // 27.6.1.5Atemplate */>class basic_iostream, : public basic_istream<_CharT, _Traits>,, public basic_ostream<_CharT, _Traits> {public:; // prevent ambiguity between types defined in the bases6 typedef _CharT char_type;8 typedef _Traits traits_type;5 typedef _TYPENAME traits_type::int_type int_type;5 typedef _TYPENAME traits_type::pos_type pos_type;5 typedef _TYPENAME traits_type::off_type off_type;E  _EXPLICIT basic_iostream (basic_streambuf<_CharT, _Traits> *__sb)0 : basic_istream<_CharT, _Traits>(__sb), . basic_ostream<_CharT, _Traits>(__sb) { /* 27.6.1.5.1, p1 */ }};)_RWSTD_INSTANTIATE_2 (class _RWSTD_EXPORT? basic_istream >);M_RWSTD_INSTANTIATE_1 (_RWSTD_EXPORT istream& operator>> (istream&, string&));,_RWSTD_INSTANTIATE_1 (_RWSTD_EXPORT istream&9 getline (istream&, string&, char));#ifndef _RWSTD_NO_WCHAR_T)_RWSTD_INSTANTIATE_2 (class _RWSTD_EXPORTE basic_istream >);-_RWSTD_INSTANTIATE_1 (_RWSTD_EXPORT wistream&8 operator>> (wistream&, wstring&));-_RWSTD_INSTANTIATE_1 (_RWSTD_EXPORT wistream&> getline (wistream&, wstring&, wchar_t));#endif // _RWSTD_NO_WCHAR_T} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif*#if _RWSTD_DEFINE_TEMPLATE (BASIC_ISTREAM)# include #endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif#endif // __USE_STD_IOSTREAM##endif // _RWSTD_ISTREAM_INCLUDEDww&m7ԦL/*************************************************************************** *# * istream.cc - istream definitions */ * $Id: //stdlib/3.0-rel/include/istream.cc#4 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Co mmercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** * * Copyright (c) 1994 * Hewlett-Packard Company *E * Permission to use, copy, modify, distribute and sell this softwareG * and its documentation for any purpose is hereby granted without fee,D * provided that the abo ve copyright notice appear in all copies andD * that both that copyright notice and this permission notice appearA * in supporting documentation. Hewlett-Packard Company makes noA * representations about the suitability of this software for anyH * purpose. It is provided "as is" without express or implied warranty. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * other wise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (__rw) { 9template %_STD::basic_istream<_CharT, _Traits>&;__rw_extract (_STD::basic_istream<_CharT, _Traits> &__strm,: _NativeType &__val){) _RWSTD_ASSERT (0 != __strm.rdbuf ());= typedef _STD::istreambuf_iterator<_CharT, _Traits> _Iter;? typedef _STD::num_get<_CharT, _Iter> _NumGet;< _STD::ios_base::iostate __err = _STD::ios_base::goodbit; // eat leading whitespace@ const _TYPENAME _STD::basic_istream<_CharT, _Traits>::sentry __ipfx (__strm); if (__ipfx) { _TRY {6 _STD_USE_FACET (_NumGet, __strm.getloc ())F .get (_Iter (__strm), _Iter (), __strm, __err, __val); } _CATCH (...) {K if (__strm.setstate (_STD::ios_base::badbit, 0 /* no throw */)) _RETHROW; } }) if (_STD::ios_base::goodbit != __err) __strm.setstate (__err); return __strm;}} // namespace __rw_RWSTD_NAMESPACE (std) { %templatebasic_istream<_CharT, _Traits>&8basic_istream<_CharT, _Traits>::_C_ipfx (int __noskipws){( _RWSTD_ASSERT (0 != this->rdbuf ());< if (!__noskipws && !(this->flags () & ios_base::skipws)) __noskipws = 1;/ ios_base::iostate __err = this->rdstate ();B // extension - zero out irrespective of state so that gcount()D // called after any failed extraction (even formatted) reports 02 // and always count _all_ extracted characters _C_chcount = 0;% if (ios_base::goodbit == __err) { if (this->tie ())# this->tie ()->flush ();E#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1836)> // ws manipulator calls _C_ipfx() with __noskipws == 2D // all other functions call it with __noskipws either 0 or 1@ if (__noskipws != 1) { // skip over leading whitespace#else< if (!__noskipws) { // skip over leading whitespace#endif4 int_type __c = this->rdbuf ()->sgetc ();0 for (const ctype &__ctp =F _USE_FACET (ctype, this->getloc ()); ; ++_C_chcount) {J if (traits_type::eq_int_type (__c, traits_type::eof ())) {. __err = ios_base::eofbit; break; }1 if (!__ctp.is (ctype_base::space,@ traits_type::to_char_type (__c))) break;0 __c = this->rdbuf ()->snextc (); } } }E // call setstate only after preparation is done in case it throws% if (ios_base::goodbit != __err) {E#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1836)K // according to 27.6.1.4, p1, the ws manipulator should set eofbit, // but not failbit. if ( __noskipws != 2 )#endif# __err |= ios_base::failbit; this->setstate (__err); } return *this;}%template2_TYPENAME basic_istream<_CharT, _Traits>::int_type basic_istream<_CharT, _Traits>::@_C_unsafe_get (streamsize *__cnt /* = 0 */, 1 int_type __delim /* = eof() */,1 int __flags /* = 0 */){( _RWSTD_ASSERT (0 != this->rdbuf ());0 ios_base::iostate __err = ios_base::goodbit;. // initialize in case sgetc() below throws' int_type __c = traits_type::eof (); _TRY {+ // get next char without extracting' __c = this->rdbuf ()->sgetc ();4 // extract delimiter or eos only if asked to@ // extract whitespace only if it doesn't terminate input@ if (traits_type::eq_int_type (__c, traits_type::eof ()))& __err = ios_base::eofbitE | (__flags & _C_faileof ? ios_ba se::failbit : 0);- else if ( ( _C_eatdelim & __flagsA || !traits_type::eq_int_type (__c, __delim)), && ( _C_eatnull & __flagsJ || !traits_type::eq (traits_type::to_char_type (__c),8 char_type ())). && ( !(_C_wsterm & __flags)C || !(isspace)(traits_type::to_char_type (__c),6 this->getloc()))) {D if (traits_type::eq_int_type (this->rdbuf ()->sbumpc (),? traits_type::eof ()))* __err = ios_base::failbit; else if (__cnt)B ++*__cnt; // increment number of extracted chars } } _CATCH (...) {@ if (this->setstate (ios_base::badbit, 0 /* no throw */)) _RETHROW; } if (__err) this->setstate (__err); return __c; }%templatebasic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>::Eget (basic_streambuf *__sb, int_type __delim){ _RWSTD_ASSERT (0 != __sb);( _RWSTD_ASSERT (0 != this->rdbuf ());3 ios_base::iostate __err = ios_base::goodbit; 5 const sentry __ipfx (*this, true /* noskipws */); if (__ipfx) {  _TRY { for ( ; ; ) {8 int_type __c = this->rdbuf ()->sgetc ();J if (traits_type::eq_int_type (__c, traits_type::eof ())) {- __err = ios_base::eofbit; break; }< if (traits_type::eq_int_type (__c, __delim)) break; _TRY {J // do not rethrow on failure - 27.6.1.3, p12, bullet 4H __c = __sb->sputc (traits_type::to_char_type (__c)); } _CATCH (...) {. __c = traits_type::eof (); }J if (traits_type::eq_int_type (__c, traits_type::eof ())) {0 __err = ios_base::failbit;  break; } ++_C_chcount;, this->rdbuf ()->sbumpc (); } } _CATCH (...) {D if (this->setstate (ios_base::badbit, 0 /* no throw */)) _RETHROW; } if (__err)# this->setstate (__err);  } // 27.6.1.3, p13 if (!gcount ())+ this->setstate (ios_base::failbit); return *this;}%templatebasic_istream<_CharT, _Traits>&6basic_istream<_CharT, _Traits>::read (char_type *__s,6 streamsize __n,: int_type __delim,: int __flags){E // if __s is 0 function doesn't store characters (used by ignore) _RWSTD_ASSERT (0 <= __n);( _RWSTD_ASSERT (0 != this->rdbuf ());) const char_type __eos = char_type ();9 const bool __getline = (_C_failend | _C_nullterm)E == ((_C_failend | _C_nullterm) & __flags);9 // "clear" buffer if reading a null-terminated string7 // follows the proposed resolution of lwg issue 243 if (__getline)* traits_type::assign (*__s, __eos);I // read and readline are unformatted (noskipws), others are formatted8 const sentry __ipfx (*this, !(_C_skipws & __flags));B // 27.6.1.2.1, p1 and 27.6.1.3, p1: proceed iff sentry is okay if (__ipfx) {> // read at most n - 1 characters when null-terminating while (__n) {+ // handle 27.6.1.3, p17 and p186 if (0 == --__n && _C_nullterm & __flags) { int_type __c;! if ( !__getlineP || !traits_type::eq_int_type (__c = this->rdbuf ()->sgetc(),F traits_type::eof ())@ && !traits_type::eq_int_type (__c, __delim)) break;K __flags &= ~_C_failend; // prevent failbit from being set7 // will break out in the check below... }/ // get (possibly extract) next charO const int_type __c = _C_unsafe_get (&_C_chcount, __delim, __flags);3 // eof or delimiter may terminat e inputE if ( traits_type::eq_int_type (__c, traits_type::eof()); || traits_type::eq_int_type (__c, __delim)) break;C const char_type __ch = traits_type::to_char_type (__c);4 // space or eos char may terminate inputK if ( !(_C_eatnull & __flags) && traits_type::eq (__ch, __eos)K || _C_wsterm & __flags && (isspace)(__ch, this->getloc ())) break;* // ignore input if __s is null if (__s)3 traits_type::assign (*__s++, __ch); }) if (_C_nullterm & __flags && __s). traits_type::assign (*__s, __eos); }F // fail if no chars extracted or if end of buffer has been reached- if ( _C_failnoi & __flags && !gcount ()( || _C_failend & __flags && !__n)+ this->setstate (ios_base::failbit); return *this;}// 27.6.1.3, p28%templatebasic_istream<_CharT, _Traits>&Ebasic_istream<_CharT, _Traits>::read (char_type *__s, streamsize __n){ _RWSTD_ASSERT (0 <= __n);( _RWSTD_ASSERT (0 != this->rdbuf ());= // 27.6.1.3, p28: sets ios_base::failbit if !this->good()5 const sentry __ipfx (*this, true /* noskipws */); if (__ipfx) {> streamsize __nread = this->rdbuf ()->sgetn (__s, __n); if (__nread >= 0)! _C_chcount = __nread;F // 27.6.1.2.1, p1 and 27.6.1.3, p1: proceed iff sentry is okay if (__n != __nread)B this->setstate (ios_base::eofbit | ios_base::failbit); } return *this;}%template+streamsize basic_istream<_CharT, _Traits>::)readsome (char_type *__s, streamsize __n){ _RWSTD_ASSERT (0 != __s); _RWSTD_ASSERT (0 <= __n);' _RWSTD_ASSERT (0 != this->rdbuf()); _C_chcount = 0; if (!this->good ()) {+ this->setstate (ios_base::failbit);  return 0; } 6 streamsize __navail = this->rdbuf ()->in_avail ();  if(-1 == __navail) { * this->setstate (ios_base::eofbit); return 0; } if (0 == __navail) return 0; if (__n > __navail) __n = __navail; read (__s, __n); return __n;}%template2_TYPENAME basic_istream<_CharT, _Traits>::pos_type(basic_istream<_CharT, _Traits>::tellg (){! pos_type __p = off_type (-1); if (!this->fail ()) { _TRY {N __p = this->rdbuf ()->pubseekoff (0, ios_base::cur, ios_base::in); } _CATCH (...) {D if (this->setstate (ios_base::badbit, 0 /* no throw */)) _RETHROW; } } return __p;}%templatebasic_istream<_CharT, _Traits>&7basic_istream<_CharT, _Traits>::putback (char_type __c){0 ios_base::iostate __err = ios_base::goodbit; if (this->rdbuf ()) { 9 const sentry __ipfx (*this, true /* noskipws */); if (__ipfx) {  _TRY {O if (traits_type::eq_int_type (this->rdbuf ()->sputbackc (__c), C traits_type::eof ()))- __err = ios_base::badbit; } _CATCH (...) {H if (this->setstate (ios_base::badbit, 0 /* no throw */)) _RETHROW; } } } else! __err = ios_base::badbit; if (__err) this->setstate (__err); return *this;}%templatebasic_istream<_CharT, _Traits>&(basic_istream<_CharT, _Traits>::unget (){0 ios_base::iostate __err = ios_base::goodbit; if (this->rdbuf ()) {9 const sentry __ipfx (*this, true /* noskipws */); if (__ipfx) { _TRY {J if (traits_type::eq_int_type (this->rdbuf ()->sungetc (), C traits_type::eof ()))/ __err = ios_base::badbit; } _CATCH (...) {H if (this->setstate (ios_base::badbit, 0 /* no throw */)) _RETHROW; } } } else! __err = ios_base::badbit; if (__err) this->setstate (__err);  return *this;}%template+int basic_istream<_CharT, _Traits>::sync (){ if (!this->rdbuf ()) return -1;5 const sentry __ipfx (*this, true /* noskipws */); if (__ipfx) { _TRY {1 if (-1 != this->rdbuf ()->pubsync ()) return 0; } _CATCH (...) {D if (this->setstate (ios_base::badbit, 0 /* no throw */)) _RETHROW; }* this->setstate (ios_base::badbit); } return -1;}7templatebasic_istream<_CharT, _Traits>&=operator>> (basic_istream<_CharT, _Traits>& __is, = basic_string<_CharT, _Traits, _Allocator>& __str){' _RWSTD_ASSERT (0 != __is.rdbuf ());0 ios_base::iostate __err = ios_base::goodbit; _TRY {M const _TYPENAME basic_istream<_CharT, _Traits>::sentry __ipfx (__is); if (__ipfx) {I // FIXME: code commented out to work around an HP aCC 3.14.10 // bug #JAGac86264 // typedef _TYPENAMEG // basic_string<_CharT, _Traits, _Allocator>::size_type* const _RWSTD_SIZE_T __maxlen =B __is.width () ? __is.width () : __str.max_size ();" _RWSTD_SIZE_T __i = 0; __str.erase ();G for ( ; __maxlen != __i; ++__i, __is.rdbuf ()->sbumpc ()) {P const _TYPENAME _Traits::int_type __c = __is.rdbuf ()->sgetc ();B if (_Traits::eq_int_type (__c, _Traits::eof ())) {- __err = ios_base::eofbit; break; }G // convert to char_type so that isspace works correctly2 const _TYPENAME _Traits::char_type7 __ch = _Traits::to_char_type (__c);4 if ((isspace)(__ch, __is.getloc ())) break;' __str.push_back (__ch); }  __is.width (0); if (!__i)+ __err |= ios_base::failbit; } } _CATCH (...) {? if (__is.setstate (ios_base::badbit, 0 /* no throw */)) _RETHROW; } if (__err) __is.setstate (__err); return __is;} ]#if defined(__DECCXX) && !defined(__DECFIXCXXL1922) && !defined(_RWSTD_NO_IMPLICIT_INCLUSION)#else7templatebasic_istream<_CharT, _Traits>&:getline (basic_istream<_CharT, _Traits>& __is, ; basic_string<_CharT, _Traits, _Allocator>& __str, < _CharT __delim){' _RWSTD_ASSERT (0 != __is.rdbuf ());: const _TYPENAME basic_istream<_CharT, _Traits>::sentry+ __ipfx (__is, true /* noskipws */); if (__ipfx) { 4 ios_base::iostate __err = ios_base::failbit; _TRY { __str.erase ();I // FIXME: code commented out to work around an HP aCC 3.14.10 // bug #JAGac86264 // typedef _TYPENAMEG // basic_string<_CharT, _Traits, _Allocator>::size_typeJ for (_RWSTD_SIZE_T __i = 0; __str.max_size () != __i; ++__i) {7 const _TYPENAME _Traits::int_type __c =- __is.rdbuf ()->sbumpc ();B if (_Traits::eq_int_type (__c, _Traits::eof ())) {# // 21.3.7.9, p7. __err = ios_base::eofbitL | (__i ? ios_base::goodbit : ios_base::failbit); break; }I if (_Traits::eq (_Traits::to_char_type (__c), __delim)) {. __err = ios_base::goodbit; break; }> __str.push_back (_Traits::to_char_type (__c)); } } _CATCH (...) {C if (__is.setstate (ios_base::badbit, 0 /* no throw */)) _RETHROW; } if (__err)" __is.setstate (__err); } return __is;} #endif /* __DECFIXCXXL1922 */} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endifwwk5m7Ԧ// -*- C++ -*-L/*************************************************************************** *F * iterator - Definitions of the C++ Standard Library Iterator Library *- * $Id: //stdlib/3.0-rel/include/iterator#2 $ *L *************************************************************************** * > * Copyright 2002 Compaq Information Technologies Group, L.P. *C * Compaq and the Compaq logo are trademarks of Compaq Information@ * Technologies Group, L.P. in the U.S. and/or other countries. *J * Confidential computer software. Valid license from Compaq required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or an y other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/ #ifndef _RWSTD_ITERATOR_INCLUDED #define _RWSTD_ITERATOR_INCLUDED#include #ifdef __USE_STD_IOSTREAM#include #endif6#include // for char_traits;#include // for stream iterators4#include // for iterators$#endif // _RWSTD_ITERATOR_INCLUDEDwwOBDm7Ԧ// -*- C++ -*-L/*************************************************************************** *L * - definitions of the numeric_limits template and specializations *+ * $Id: //stdlib/3.0-rel/include/limits#3 $ *L *************************************************************************** * > * Copyright 2002 Compaq Information Technologies Group, L.P. *C * Compaq and the Compaq logo are trademarks of Compaq Information@ * Technologies Group, L.P. in the U.S. and/or other countries. *J * Confidential computer software. Valid license from Compaq required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue W ave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software o r any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restric ted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endif#include K/******************************************************************* ******* *+ * Assumptions made in this implementation: *B * 1) numeric_limits::digits is 1 for bool and is computed asA * (CHAR_BIT * sizeof (T) - numeric_limits::is_signed for * all native integral T *C * 2) numeric_limits::radix is the same (2 by default) for all, * specializations of native integral T *H * 3) numeric_limits::is_modulo is true if numeric_limits::max()= * + 1 == numeric_limits::min for all specializations * of n ative integral T *L **************************************************************************/E#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endifX#if defined(__VMS) && defined(__ia64) && defined(__DECCXX) && !defined(__DECFIXCXXL1904)#pragma __extern_prefix __save#pragma __extern_prefix "")extern "C" unsigned int __read_rnd(void);!#pragma __extern_prefix __restoreA#define _RWSTD_FP_ RND_RN 1 // FP_RND_RN defined as 1 in H#define _IVMS_ROUND_ERROR (__read_rnd() == _RWSTD_FP_RND_RN ? 0.5 : 1.0)#endif /* __DECFIXCXXL1904 */// quiet NAN (QNAN) supported?#ifndef _RWSTD_NO_QUIET_NAN# ifdef _IEEE_FP## define _RWSTD_HAS_QUIET_NAN true# else$# define _RWSTD_HAS_QUIET_NAN false# endif+#else // if defined (_RWSTD_NO_QUIET_NAN)$# define _RWSTD_HAS_QUIET_NAN false#endif // _RWSTD_NO_QUIET_NAN-// do math operations (such as 0.0/0.0) trap?#ifn def _RWSTD_NO_DBL_TRAPS # define _RWSTD_FLT_TRAPS true # define _RWSTD_DBL_TRAPS true # define _RWSTD_LDBL_TRAPS true+#else // if defined (_RWSTD_NO_DBL_TRAPS)$ // invalid operations return QNAN!# define _RWSTD_FLT_TRAPS false!# define _RWSTD_DBL_TRAPS false!# define _RWSTD_LDBL_TRAPS false#endif // _RWSTD_NO_DBL_TRAPS$#define _RWSTD_HAS_DENORM_LOSS false#ifdef _IEEE_FP##define _RWSTD_HAS_INFINITY true#else$#define _RWSTD_HAS_INFINITY false#endif _RWSTD_NAMESPACE (__rw) { #ifdef _IEEE_FP9_RWSTD_EXPORT extern const float __rw_flt_infinity;9_RWSTD_EXPORT extern const double __rw_dbl_infinity;5_RWSTD_EXPORT extern const float __rw_flt_qNaN;5_RWSTD_EXPORT extern const double __rw_dbl_qNaN;5_RWSTD_EXPORT extern const float __rw_flt_sNaN;5_RWSTD_EXPORT extern const double __rw_dbl_sNaN;;_RWSTD_EXPORT extern const float __rw_flt_denorm_min;;_RWSTD_EXPORT extern const double __rw_dbl_denorm_min;#ifndef _RWSTD_NO_LONG_DOUBLE:_RWSTD_EXPORT extern const long double __rw_ldbl_infinity;6_RWSTD_EXPORT extern const long double __rw_ldbl_qNaN;6_RWSTD_EXPORT extern const long double __rw_ldbl_sNaN;<_RWSTD_EXPORT extern const long double __rw_ldbl_denorm_min;#endif#endif} // namespace __rw#ifdef _IEEE_FP4#define _RWSTD_FLT_INFINITY _RW::__rw_flt_infinity4#define _RWSTD_DBL_INFINITY _RW::__rw_dbl_infinity0#define _RWSTD_FLT_QNAN _RW::__rw_flt_qNaN0#define _RWSTD_DBL_QNAN _RW::__rw_dbl_qNaN0#define _RWSTD_FLT_SNAN _RW::__rw_flt_sNaN0#define _RWSTD_DBL_SNAN _RW::__rw_dbl_sNaN6#define _RWSTD_FLT_DENORM_MIN _RW::__rw_flt_denorm_min6#define _RWSTD_DBL_DENORM_MIN _RW::__rw_dbl_denorm_min#ifndef _RWSTD_NO_LONG_DOUBLE5#define _RWSTD_LDBL_INFINITY _RW::__rw_ldbl_infinity1#define _RWSTD_LDBL_QNAN _RW::__rw_ldbl_qNaN1#define _RWSTD_LDBL_SNAN _RW::__rw_ldbl_sNaN8#define _RWSTD_LDBL_DENORM_MIN _RW::__rw_ldbl_denorm_min#endif#else"#define _RWSTD_FLT_INFINITY 0.0f!#define _RWSTD_DBL_INFINITY 0.0"#define _RWSTD_FLT_QNAN 0.0f!#define _RWSTD_DBL_QNAN 0.0"#define _RWSTD_FLT_SNAN 0.0f!#define _RWSTD_DBL_SNAN 0.0"#define _RWSTD_FLT_DENORM_MIN 0.0f!#define _RWSTD_DBL_DENORM_MIN 0.0#ifndef _RWSTD_NO_LONG_DOUBLE"#define _RWSTD_LDBL_INFINITY 0.0L"#define _RWSTD_LDBL_QNAN 0.0L"#define _RWSTD_LDBL_SNAN 0.0L##define _RWSTD_LDBL_DENORM_MIN 0.0L#endif#endif#ifndef _RWSTD_NO_SIGNALING_NAN#ifdef _IEEE_FP!# define _RWSTD_HAS_SIG_NAN true#else"# define _RWSTD_HAS_SIG_NAN false#endif#else"# define _RWSTD_HAS_SIG_NAN false##endif // _RWSTD_NO_SIGNALING_NAN#undef _RWSTD_CLASS_BEGIN#undef _RWSTD_CLASS_END#undef _RWSTD_TYPEDEF#undef _RWSTD_STATIC#undef _RWSTD_STATIC_FUN#ifndef _RWSTD_DEFINE_EXPORTS4// declarations - expanded in every translation unit// that #includes ?# define _RWSTD_CLASS_BEGIN(name)  \7 _RWSTD_SPECIALIZED_CLASS struct _RWSTD_EXPORT name {*# define _RWSTD_CLASS_END };4# define _RWSTD_TYPEDEF(def) typedef def;?# define _RWSTD_STATIC(ignore, type, name, value) \2 _RWSTD_STATIC_CONST (type, name = value)?# define _RWSTD_STATIC_FUN(type, name, value) \< static type name () _THROWS (()) { return value; }*#else // defined (_RWSTD_DEFINE_EXPORTS)C// definitions - expanded in a single translation unit that definesL// static const data members outside of each numeric_limits<> specialization$# define _RWSTD_CLASS_BEGIN(ignore)# define _RWSTD_CLASS_END # define _RWSTD_TYPEDEF(ignore)?# define _RWSTD_STATIC(limtype, type, name, value) \J _RWSTD_DEFINE_STATIC_CONST (const type numeric_limits::name)-# define _RWSTD_STATIC_FUN(ign1, ign2, ign3)!#endif // _RWSTD_DEFINE_EXPORTS// 18.2.1.2, p6 - 7'#define _RWSTD_DIGITS(type, min, m ax) \K (1 == (max) ? 1 : (_RWSTD_CHAR_BIT * sizeof (type) - ((min) != 0)))// 18.2.1.2, p9;#define _RWSTD_DIGITS10(digits) (((digits) * 301) / 1000)#undef _RWSTD_LIMITS_BODYM#define _RWSTD_LIMITS_BODY(type, cpfx) \M _RWSTD_STATIC (type, bool, is_specialized, true); \M \M _RWSTD_STATIC_FUN (type, (min), cpfx##_MIN)  \M _RWSTD_STATIC_FUN (type, (max), cpfx##_MAX) \M \M _RWSTD_STATIC (type, bool, is_signed, cpfx##_MIN != 0); \M _RWSTD_STATIC (type, bool, is_integer, true); \M _RWSTD_STATIC (type, bool, is_exact, true); \M \M _RWSTD_STATIC (type, int, digits, \M _RWSTD_DIGITS (type, cpfx##_MIN, cpfx##_MAX)); \M \M /* spelled out to work around a bug in IBM xlC 5.0 */ \M _RWSTD_STATIC (type, int, digits10, \M _RWSTD_DIGITS10 (_RWSTD_DIGITS (type, cpfx##_MIN, \M  cpfx##_MAX))); \M \M _RWSTD_STATIC (type, int, radix, 2); \M \M _RWSTD_STATIC_FUN (type, epsilon, 0) \M _RWSTD_STATIC_FUN (type, round_error, 0) \M  \M _RWSTD_STATIC (type, int, min_exponent, 0); \M _RWSTD_STATIC (type, int, min_exponent10, 0); \M _RWSTD_STATIC (type, int, max_exponent, 0); \M _RWSTD_STATIC (type, int, max_exponent10, 0); \M \M _RWSTD_STATIC (type, bool, has_infinity, false); \M _RWSTD_STATIC (type, bool, has_quiet_NaN, false); \M _RWSTD_STATIC (type, bool, has_signaling_NaN, false); \M _RWSTD_STATIC (type, float_denorm_style, has_denorm, denorm_absent); \M _RWSTD_STATIC (type, bool, has_denorm_loss, false); \M \M _RWSTD_STATIC_FUN (type, infinity, 0) \M _RWSTD_STATIC_FUN (type, quiet_NaN, 0) \M _RWSTD_STATIC_FUN (type, signaling_NaN, 0) \M _RWSTD_STATIC_FUN (type, denorm_min, 0) \M \M _RWSTD_STATIC (type, bool, is_iec559, false); \M _RWSTD_STATIC (type, bool, is_bounded, true); \M _RWSTD_STATIC (type, bool, is_modulo, 1 != cpfx##_MAX);  \M \M _RWSTD_STATIC (type, bool, traps, false); \M _RWSTD_STATIC (type, bool, tinyness_before, false); \L _RWSTD_STATIC (type, float_round_style, round_style, round_toward_zero);#undef _RWSTD_SPECIALIZE_LIMITS/#define _RWSTD_SPECIALIZE_LIMITS(type, cpfx) \/_RWSTD_CLASS_BEGIN (numeric_limits) \/ _RWSTD_LIMITS_BODY (type, cpfx) \_RWSTD_CLASS_END&#ifndef _RWSTD_LIMITS_TEMPLATE_DEFINED&#define _RWSTD_LIMITS_TEMPLATE_DEFINED_RWSTD_NAMESPACE (std) { enum float_round_style{# round_indeterminate = -1,# round_toward_zero = 0,# round_to_nearest = 1,# round_toward_infinity = 2," round_toward_neg_infinity = 3};=#define _RWSTD_ROUND_STYLE \= 0 == _RWSTD_FLT_ROUNDS ? round_toward_zero \= : 1 == _RWSTD_FLT_ROUNDS ? round_to_nearest \= : 2 == _RWSTD_FLT_ROUNDS ? round_toward_infinity \= : 3 == _RWSTD_FLT_ROUNDS ? round_toward_neg_infinity \ : round_indeterminateenum float_denorm_style{ denorm_indeterminate = -1, denorm_absent = 0, denorm_present = 1};template struct numeric_limits{? // static consts below must be initialized in class so thatB // they can be used where const expressions are required (such! // as in template parameters)7 _RWSTD_STATIC_CONST (bool, is_specialized = false);< static _TypeT (min)() _THROWS (()) { return _TypeT (); }< static _TypeT (max)() _THROWS (()) { return _TypeT (); }, _RWSTD_STATIC_CONST (int, digits = 0);, _RWSTD_STATIC_CONST (int, digits10 = 0);3 _RWSTD_STATIC_CONST (bool, is_signed = false);3 _RWSTD_STATIC_CONST (bool, is_integer = false);3 _RWSTD_STATIC_CONST (bool, is_exac t = false);) _RWSTD_STATIC_CONST (int, radix = 0);C static _TypeT epsilon () _THROWS (()) { return _TypeT (); }C static _TypeT round_error () _THROWS (()) { return _TypeT (); }2 _RWSTD_STATIC_CONST (int, min_exponent = 0);2 _RWSTD_STATIC_CONST (int, min_exponent10 = 0);2 _RWSTD_STATIC_CONST (int, max_exponent = 0);2 _RWSTD_STATIC_CONST (int, max_exponent10 = 0);A _RWSTD_STATIC_CONST (bool, has_infinity = false);A _RWSTD_STATIC_CONS !T (bool, has_quiet_NaN = false);A _RWSTD_STATIC_CONST (bool, has_signaling_NaN = false);I _RWSTD_STATIC_CONST (float_denorm_style, has_denorm = denorm_absent);A _RWSTD_STATIC_CONST (bool, has_denorm_loss = false);E static _TypeT infinity () _THROWS (()) { return _TypeT (); }E static _TypeT quiet_NaN () _THROWS (()) { return _TypeT (); }E static _TypeT signaling_NaN () _THROWS (()) { return _TypeT (); }E static _TypeT denorm_min (") _THROWS (()) { return _TypeT (); }9 _RWSTD_STATIC_CONST (bool, is_iec559 = false);9 _RWSTD_STATIC_CONST (bool, is_bounded = false);9 _RWSTD_STATIC_CONST (bool, is_modulo = false);9 _RWSTD_STATIC_CONST (bool, traps = false);9 _RWSTD_STATIC_CONST (bool, tinyness_before = false);M _RWSTD_STATIC_CONST (float_round_style, round_style = round_toward_zero);};} // namespace std*#endif // _RWSTD_LIMITS_TEMPLATE_DEFINED##ifndef _RWSTD_LIMITS_INCLUDED#define _RWSTD_LIMITS_INCLUDED_RWSTD_NAMESPACE (std) { *_RWSTD_CLASS_BEGIN (numeric_limits)6 _RWSTD_STATIC (float, bool, is_specialized, true);4 _RWSTD_STATIC_FUN (float, (min), _RWSTD_FLT_MIN)4 _RWSTD_STATIC_FUN (float, (max), _RWSTD_FLT_MAX)> _RWSTD_STATIC (float, int, digits, _RWSTD_FLT_MANT_DIG);9 _RWSTD_STATIC (float, int, digits10, _RWSTD_FLT_DIG);2 _RWSTD_STATIC (float, bool, is_signed, true);3 _RWSTD_STA $TIC (float, bool, is_integer, false);3 _RWSTD_STATIC (float, bool, is_exact, false);> _RWSTD_STATIC (float, int, radix, _RWSTD_FLT_RADIX);> _RWSTD_STATIC_FUN (float, epsilon, _RWSTD_FLT_EPSILON)X#if defined(__VMS) && defined(__ia64) && defined(__DECCXX) && !defined(__DECFIXCXXL1904)= _RWSTD_STATIC_FUN (float, round_error, _IVMS_ROUND_ERROR)#else,#if __IEEE_FLOAT && __BIASED_FLT_ROUNDS != 20 _RWSTD_STATIC_FUN (float, round_error, 1.0f)#else0 _RWSTD_STA %TIC_FUN (float, round_error, 0.5f)#endif#endifC _RWSTD_STATIC (float, int, min_exponent, _RWSTD_FLT_MIN_EXP);F _RWSTD_STATIC (float, int, min_exponent10, _RWSTD_FLT_MIN_10_EXP);C _RWSTD_STATIC (float, int, max_exponent, _RWSTD_FLT_MAX_EXP);F _RWSTD_STATIC (float, int, max_exponent10, _RWSTD_FLT_MAX_10_EXP);H _RWSTD_STATIC (float, bool, has_infinity, _RWSTD_HAS_INFINITY);I _RWSTD_STATIC (float, bool, has_quiet_NaN, _RWSTD_HAS_QUIET_NAN);G _RWSTD_STATI &C (float, bool, has_signaling_NaN, _RWSTD_HAS_SIG_NAN);9 _RWSTD_STATIC (float, float_denorm_style, has_denorm,#ifdef _IEEE_FP# denorm_present);#else" denorm_absent);#endifI _RWSTD_STATIC (float, bool, has_denorm_loss, _RWSTD_HAS_DENORM_LOSS);A _RWSTD_STATIC_FUN (float, infinity, _RWSTD_FLT_INFINITY)= _RWSTD_STATIC_FUN (float, quiet_NaN, _RWSTD_FLT_QNAN)= _RWSTD_STATIC_FUN (float, signaling_NaN, _RWSTD_FLT_SNAN)C _R'WSTD_STATIC_FUN (float, denorm_min, _RWSTD_FLT_DENORM_MIN)#if __IEEE_FLOAT2 _RWSTD_STATIC (float, bool, is_iec559, true);#else3 _RWSTD_STATIC (float, bool, is_iec559, false);#endif2 _RWSTD_STATIC (float, bool, is_bounded, true);3 _RWSTD_STATIC (float, bool, is_modulo, false);9 _RWSTD_STATIC (float, bool, traps, _RWSTD_FLT_TRAPS);8 _RWSTD_STATIC (float, bool, tinyness_before, false);N _RWSTD_STATIC (float, float_round_style, round_style, _RWSTD_ROUND_S(TYLE);+_RWSTD_CLASS_END // numeric_limits+_RWSTD_CLASS_BEGIN (numeric_limits)7 _RWSTD_STATIC (double, bool, is_specialized, true);5 _RWSTD_STATIC_FUN (double, (min), _RWSTD_DBL_MIN)5 _RWSTD_STATIC_FUN (double, (max), _RWSTD_DBL_MAX)? _RWSTD_STATIC (double, int, digits, _RWSTD_DBL_MANT_DIG);: _RWSTD_STATIC (double, int, digits10, _RWSTD_DBL_DIG);3 _RWSTD_STATIC (double, bool, is_signed, true);4 _RWSTD_STATIC (double, bool, is_intege )r, false);4 _RWSTD_STATIC (double, bool, is_exact, false);? _RWSTD_STATIC (double, int, radix, _RWSTD_FLT_RADIX);? _RWSTD_STATIC_FUN (double, epsilon, _RWSTD_DBL_EPSILON)X#if defined(__VMS) && defined(__ia64) && defined(__DECCXX) && !defined(__DECFIXCXXL1904)> _RWSTD_STATIC_FUN (double, round_error, _IVMS_ROUND_ERROR)#else,#if __IEEE_FLOAT && __BIASED_FLT_ROUNDS != 21 _RWSTD_STATIC_FUN (double, round_error, 1.0f)#else0 _RWSTD_STATIC_FUN (double, round *_error, 0.5)#endif#endifD _RWSTD_STATIC (double, int, min_exponent, _RWSTD_DBL_MIN_EXP);G _RWSTD_STATIC (double, int, min_exponent10, _RWSTD_DBL_MIN_10_EXP);D _RWSTD_STATIC (double, int, max_exponent, _RWSTD_DBL_MAX_EXP);G _RWSTD_STATIC (double, int, max_exponent10, _RWSTD_DBL_MAX_10_EXP);I _RWSTD_STATIC (double, bool, has_infinity, _RWSTD_HAS_INFINITY);J _RWSTD_STATIC (double, bool, has_quiet_NaN, _RWSTD_HAS_QUIET_NAN);H _RWSTD_STATIC (double, bool, + has_signaling_NaN, _RWSTD_HAS_SIG_NAN);: _RWSTD_STATIC (double, float_denorm_style, has_denorm,#ifdef _IEEE_FP# denorm_present);#else" denorm_absent);#endifL _RWSTD_STATIC (double, bool, has_denorm_loss, _RWSTD_HAS_DENORM_LOSS);B _RWSTD_STATIC_FUN (double, infinity, _RWSTD_DBL_INFINITY)> _RWSTD_STATIC_FUN (double, quiet_NaN, _RWSTD_DBL_QNAN)> _RWSTD_STATIC_FUN (double, signaling_NaN, _RWSTD_DBL_SNAN)D _RWSTD_STATIC_FU,N (double, denorm_min, _RWSTD_DBL_DENORM_MIN)#if __IEEE_FLOAT3 _RWSTD_STATIC (double, bool, is_iec559, true);#else4 _RWSTD_STATIC (double, bool, is_iec559, false);#endif3 _RWSTD_STATIC (double, bool, is_bounded, true);4 _RWSTD_STATIC (double, bool, is_modulo, false);: _RWSTD_STATIC (double, bool, traps, _RWSTD_DBL_TRAPS);9 _RWSTD_STATIC (double, bool, tinyness_before, false);O _RWSTD_STATIC (double, float_round_style, round_style, _RWSTD_ROUND_STYLE);-,_RWSTD_CLASS_END // numeric_limits#ifndef _RWSTD_NO_LONG_DOUBLE0_RWSTD_CLASS_BEGIN (numeric_limits)< _RWSTD_STATIC (long double, bool, is_specialized, true);< _RWSTD_STATIC_FUN (long double, (min), _RWSTD_LDBL_MIN) < _RWSTD_STATIC_FUN (long double, (max), _RWSTD_LDBL_MAX) E _RWSTD_STATIC (long double, int, digits, _RWSTD_LDBL_MANT_DIG);@ _RWSTD_STATIC (long double, int, digits10, _RWSTD_LDBL_DIG);8 _RWSTD_STATIC (long double, bool ., is_signed, true);9 _RWSTD_STATIC (long double, bool, is_integer, false);9 _RWSTD_STATIC (long double, bool, is_exact, false);D _RWSTD_STATIC (long double, int, radix, _RWSTD_FLT_RADIX);F _RWSTD_STATIC_FUN (long double, epsilon, _RWSTD_LDBL_EPSILON) X#if defined(__VMS) && defined(__ia64) && defined(__DECCXX) && !defined(__DECFIXCXXL1904)D _RWSTD_STATIC_FUN (long double, round_error, _IVMS_ROUND_ERROR) #else,#if __IEEE_FLOAT && __BIASED_FLT_ROUNDS != 27 /_RWSTD_STATIC_FUN (long double, round_error, 1.0L) #else7 _RWSTD_STATIC_FUN (long double, round_error, 0.5L) #endif#endifJ _RWSTD_STATIC (long double, int, min_exponent, _RWSTD_LDBL_MIN_EXP);M _RWSTD_STATIC (long double, int, min_exponent10, _RWSTD_LDBL_MIN_10_EXP);J _RWSTD_STATIC (long double, int, max_exponent, _RWSTD_LDBL_MAX_EXP);M _RWSTD_STATIC (long double, int, max_exponent10, _RWSTD_LDBL_MAX_10_EXP);N _RWSTD_STATIC (long double, bool, has_infinity, 0 _RWSTD_HAS_INFINITY);O _RWSTD_STATIC (long double, bool, has_quiet_NaN, _RWSTD_HAS_QUIET_NAN);M _RWSTD_STATIC (long double, bool, has_signaling_NaN, _RWSTD_HAS_SIG_NAN);? _RWSTD_STATIC (long double, float_denorm_style, has_denorm,#ifdef _IEEE_FP# denorm_present);#else" denorm_absent);#endifO _RWSTD_STATIC (long double, bool, has_denorm_loss, _RWSTD_HAS_DENORM_LOSS);H _RWSTD_STATIC_FUN (long double, infinity, _RWSTD_LD1BL_INFINITY)D _RWSTD_STATIC_FUN (long double, quiet_NaN, _RWSTD_LDBL_QNAN)D _RWSTD_STATIC_FUN (long double, signaling_NaN, _RWSTD_LDBL_SNAN)J _RWSTD_STATIC_FUN (long double, denorm_min, _RWSTD_LDBL_DENORM_MIN)#if __IEEE_FLOAT8 _RWSTD_STATIC (long double, bool, is_iec559, true);#else9 _RWSTD_STATIC (long double, bool, is_iec559, false);#endif8 _RWSTD_STATIC (long double, bool, is_bounded, true);9 _RWSTD_STATIC (long double, bool, is_modulo, false);@ 2 _RWSTD_STATIC (long double, bool, traps, _RWSTD_LDBL_TRAPS);> _RWSTD_STATIC (long double, bool, tinyness_before, false);? _RWSTD_STATIC (long double, float_round_style, round_style,' _RWSTD_ROUND_STYLE);2_RWSTD_CLASS_END // numeric_limits!#endif // _RWSTD_NO_LONG_DOUBLE3// define numeric_limits<> integral specializations9_RWSTD_SPECIALIZE_LIMITS (char, _RWSTD_CHAR):_RWSTD_SPECIALIZE_LIMITS (unsigned char, _RWSTD_UCHAR) 3:_RWSTD_SPECIALIZE_LIMITS (signed char, _RWSTD_SCHAR)9_RWSTD_SPECIALIZE_LIMITS (short int, _RWSTD_SHRT):_RWSTD_SPECIALIZE_LIMITS (unsigned short, _RWSTD_USHRT)8_RWSTD_SPECIALIZE_LIMITS (int, _RWSTD_INT)9_RWSTD_SPECIALIZE_LIMITS (unsigned int, _RWSTD_UINT)9_RWSTD_SPECIALIZE_LIMITS (long int, _RWSTD_LONG):_RWSTD_SPECIALIZE_LIMITS (unsigned long int, _RWSTD_ULONG)#ifndef _RWSTD_NO_WCHAR_T"# ifndef _RWSTD_NO_NATIVE_WCHAR_T2_RWSTD_SPECIALIZ4E_LIMITS (wchar_t, _RWSTD_WCHAR_T)&# endif // _RWSTD_NO_NATIVE_WCHAR_T#endif // _RWSTD_NO_WCHAR_T#ifndef _RWSTD_NO_BOOL# ifndef _RWSTD_NO_NATIVE_BOOL,_RWSTD_SPECIALIZE_LIMITS (bool, _RWSTD_BOOL)## endif // _RWSTD_NO_NATIVE_BOOL#endif // _RWSTD_NO_BOOL#ifdef _RWSTD_LONG_LONG9_RWSTD_SPECIALIZE_LIMITS (_RWSTD_LONG_LONG, _RWSTD_LLONG)C_RWSTD_SPECIALIZE_LIMITS (unsigned _RWSTD_LONG_LONG, _RWSTD_ULLONG)#endif // _RWSTD_LONG_LONG} // namespace std5E#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore## define __EXTERN_PREFIX_RESTORED#endif##ifdef _RWSTD_NO_IMPLICIT_INCLUSION# include #endif"#endif // _RWSTD_LIMITS_INCLUDEDE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)!# ifndef __EXTERN_PREFIX_RESTORED$# pragma __extern_prefix __restore# else"# undef __EXTERN_PREFIX_RESTORED# endif#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endifww 7Rm7ԦL/*************************************************************************** *@ * limits.cc - definitions of numeric_limits static data members *. * $Id: //stdlib/3.0-rel/include/limits.cc#2 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 812.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other la 9ws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer softwar :e is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L *******;*******************************************************************/#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) { 6#if !defined (_RWSTD_NO_STATIC_CONST_MEMBER_INIT) \' && !defined (_RWSTD_DEFI<NE_EXPORTS)template 2const bool numeric_limits<_TypeT>::is_specialized;template )const int numeric_limits<_TypeT>::digits;template +const int numeric_limits<_TypeT>::digits10;template -const bool numeric_limits<_TypeT>::is_signed;template .const bool numeric_limits<_TypeT>::is_integer;template ,const bool numeric_limits<_TypeT>::is_exact;template (const int =numeric_limits<_TypeT>::radix;template /const int numeric_limits<_TypeT>::min_exponent;template 1const int numeric_limits<_TypeT>::min_exponent10;template /const int numeric_limits<_TypeT>::max_exponent;template 1const int numeric_limits<_TypeT>::max_exponent10;template 0const bool numeric_limits<_TypeT>::has_infinity;template 1const bool numeric_limits<_TypeT>::has_quiet_NaN;>template 5const bool numeric_limits<_TypeT>::has_signaling_NaN;template <const float_denorm_style numeric_limits<_TypeT>::has_denorm;template 3const bool numeric_limits<_TypeT>::has_denorm_loss;template -const bool numeric_limits<_TypeT>::is_iec559;template .const bool numeric_limits<_TypeT>::is_bounded;template -const bool numeric_limits<_TypeT>::is_modulo;template )const bool numeric_limits<_TypeT>::traps;template 3const bool numeric_limits<_TypeT>::tinyness_before;template <const float_round_style numeric_limits<_TypeT>::round_style;I#endif // !_RWSTD_NO_STATIC_CONST_MEMBER_INIT && !_RWSTD_DEFINE_EXPORTS} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endifwwxNn7ԦK/**************************************************************************  *, * _error.h - Definitions for error messages *E * This is an internal header file used to implement the C++ Standard? * Library. It should never be #included directly by a program.G *0 * $Id: //stdlib/3.0-rel/include/rw/_error.h#2 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *FB\m7Ԧ// -*- C++ -*-L/*************************************************************************** *4 * list - list declarations for the Standard Library *) * $Id: //stdlib/3.0-rel/include/list#2 $ *L *************************************************************************** * > * Copyright 2002 Compaq Information Technologies Group, L.P. *C * Compaq and the Compaq logo are trademarks of Compaq Information@ * Technologies Group, L.P. in the U.S. and/or other counCtries. *J * Confidential computer software. Valid license from Compaq required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** * * Copyright (c) 1994 * Hewlett-Packard Company *E * P Dermission to use, copy, modify, distribute and sell this softwareG * and its documentation for any purpose is hereby granted without fee,D * provided that the above copyright notice appear in all copies andD * that both that copyright notice and this permission notice appearA * in supporting documentation. Hewlett-Packard Company makes noA * representations about the suitability of this software for anyH * purpose. It is provided "as is" without express or implied warranty. *L ********* E****************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the ter Fms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@G * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/#ifndef _RWSTD_LIST_INCLUDED#define _RWSTD_LIST_INCLUDED#include #include !#include !#include #include #include #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) { template struct __rw_list_node{7 __rw_list_node* _IC_next; // pointer to next node; __rw_list_node* _C_prev; // pointer to previous node. _TypeT _C_data; // client data}; Gtemplate class __rw_list_iter2 : public iterator {1 typedef iterator  _C_iter_ Jbase;public:? typedef _TYPENAME _C_iter_base::value_type value_type;D typedef _TYPENAME _C_iter_base::difference_type difference_type;< typedef _TYPENAME _C_iter_base::pointer pointer;> typedef _TYPENAME _C_iter_base::reference reference;H // const_pointer and const_reference must be explicity typedef'ed toE // const value_type* and const value_type& since we don't know ifI // _Pointer and _Reference are const types (they aren't if this isn'tK // a const iterator)C typedef const value_type* const_pointer; E typedef const value_type& const_reference; F typedef bidirectional_iterator_tag iterator_category;8 typedef __rw_list_iter _C_mutable_iter;H typedef __rw_list_node* _C_link_type;  __rw_list_iter () { }. __rw_lisLt_iter (const _C_link_type& __rhs) : _C_node (__rhs) { }> // no copy ctor other than the one below defined; will useD // a compiler generated one if __rw_list_iter != _C_mutable_iter1 __rw_list_iter (const _C_mutable_iter &__rhs)% : _C_node (__rhs._C_node) { }# __rw_list_iter& operator++ () {6 _C_node = (_C_link_type)((*_C_node)._C_next);  return *this; } # __rw_list_iter& operator-- () {5 _C_node = (_C_link_type)((*_C_Mnode)._C_prev); return *this; } % __rw_list_iter operator++ (int) {% __rw_list_iter __tmp = *this; return ++*this, __tmp; } % __rw_list_iter operator-- (int) {% __rw_list_iter __tmp = *this; return --*this, __tmp; } " reference operator* () const {" return (*_C_node)._C_data; }8 _RWSTD_OPERATOR_ARROW (pointer operator-> () const); = difference_type operator- (const __rw_list_iter&N) const { return 0; }: bool operator== (const __rw_list_iter& __iter) const {) return _C_node == __iter._C_node; }: bool operator!= (const __rw_list_iter& __iter) const {" return !(*this == __iter); } // private: _C_link_type _C_node;};#undef _ITER_NODE2#define _ITER_NODE(it) (_ITER_BASE (it)._C_node) ?template inline boolDoperator== (const __rw_list_iter<_TypeT, _DiffT, _Ptr1, _Ref1> &__x,D const __rw_list_iter<_TypeT, _DiffT, _Ptr2, _Ref2> &__y){& return __x._C_node == __y._C_node;}?template inline boolDoperator!= (const __rw_list_iter<_TypeT, _DiffT, _Ptr1, _Ref1> &__x,D const __rw_list_iter<_TypeT, _DiffT, _Ptr2, _RPef2> &__y){ return !(__x == __y);}template ) >class list : private _Allocator{public:A typedef _TypeT value_type;E typedef _Allocator allocator_type;@ typedef _TYPENAME allocator_type::reference reference;F typedef _TYPENAME allocator_type::const_reference const_reference;@ typedef _TYPENAME allo Qcator_type::size_type size_type;F typedef _TYPENAME allocator_type::difference_type difference_type;> typedef _TYPENAME allocator_type::pointer pointer;D typedef _TYPENAME allocator_type::const_pointer const_pointer;C typedef __rw_list_node _C_list_node;C typedef _C_list_node* _C_link_type; struct _C_list_node_buffer; N typedef _RWSTD_REBIND (allocator_type, _C_list_node) _C_node_alloc_typRe;O typedef _RWSTD_ALLOC_TYPE (allocator_type, value_type) _C_value_alloc_type;)#if !defined (_RWSTD_NO_LIST_NODE_BUFFER)? typedef _RWSTD_REBIND (allocator_type, _C_list_node_buffer) _C_buf_alloc_type;J typedef _TYPENAME _C_buf_alloc_type::pointer _C_buf_pointer; struct _C_list_node_buffer {% _C_buf_pointer _C_next_buf;$ size_type _C_bufsize;# _C_link_type _C_buffer; };/#endif // defined (_RWSTD_USE_LIST_NODE_BUSFFER)K typedef __rw_list_iter _C_list_iter; F typedef __rw_list_iter _C_list_citer;#ifndef _RWSTD_NO_DEBUG_ITERB typedef _RW::__rw_debug_iter iterator; C typedef _RW::__rw_debug_iter  const_iterator; 8 iterator _C_make_iter (conTst _C_link_type &__node) {7 return iterator (*this, _C_list_iter (__node)); }D const_iterator _C_make_iter (const _C_link_type &__node) const {> return const_iterator (*this, _C_list_citer (__node)); },#else // if defined (_RWSTD_NO_DEBUG_ITER)* typedef _C_list_iter iterator;0 typedef _C_list_citer const_iterator;8 iterator _C_make_iter (const _C_link_type &__node) {! return iterator (__node); }D const_iteratorU _C_make_iter (const _C_link_type &__node) const {' return const_iterator (__node); } #endif // _RWSTD_NO_DEBUG_ITER,#if !defined (_RWSTD_NO_CLASS_PARTIAL_SPEC) J typedef _STD::reverse_iterator const_reverse_iterator;D typedef _STD::reverse_iterator reverse_iterator;4#else // if defined (_RWSTD_NO_CLASS_PARTIAL_SPEC)0 typedef std::reverse_iterator const_reverse_iterator;, typedef std::reverse_iterator reverse_iterator;(#endif // _RWSTD_NO_CLASS_PARTIAL_SPEC protected:)#if !defined (_RWSTD_NO_LIST_NODE_BUFFER)# _C_buf_pointer _C_buflist;% _C_link_type _C_free_list;%#endif // _RWSTD_USE_LIST_NODE_BUFFER& _C_link_type _C_next_avail;W _C_link_type _C_last; _C_link_type _C_node;" size_type _C_length;)#if !defined (_RWSTD_NO_LIST_NODE_BUFFER) void _C_add_buffer (bool); void _C_free_buffers ();= _C_link_type _C_get_node (bool __is_list_empty = false) { if ( _C_free_list ) {. _C_link_type __tmp = _C_free_list;1 _C_free_list = _C_free_list->_C_next; return __tmp; }' if (_C_next_avail == _C_last) {8 X _C_add_buffer (__is_list_empty); }  return _C_next_avail++;#else! _C_link_type _C_get_node () {G return _C_node_alloc_type (*this).allocate (1, (void*)_C_last);.#endif // defined (_RWSTD_NO_LIST_NODE_BUFFER) }, void _C_put_node (_C_link_type __link) {)#if !defined (_RWSTD_NO_LIST_NODE_BUFFER)' __link->_C_next = _C_free_list;! _C_free_list = __link;#else: _C_node_alloc_type (*this).deallocYate (__link, 1);.#endif // defined (_RWSTD_NO_LIST_NODE_BUFFER) }0 // here and only here is _C_node initialized)#if !defined (_RWSTD_NO_LIST_NODE_BUFFER)0 void _C_init(bool __is_list_empty = false) {0 _C_node = _C_get_node (__is_list_empty);#else void _C_init() {! _C_node = _C_get_node ();.#endif // defined (_RWSTD_NO_LIST_NODE_BUFFER)% (*_C_node)._C_next = _C_node;& (*_C_node)._C_prev = _C_node;  } ; void _C_init (size_tZype __n, const value_type& __val) { _C_init(); _TRY {* insert (begin (), __n, __val); } _CATCH (...) {)#if !defined (_RWSTD_NO_LIST_NODE_BUFFER) _C_free_buffers ();.#endif // defined (_RWSTD_NO_LIST_NODE_BUFFER) _RETHROW; } }public: _EXPLICIT< list (const allocator_type& __alloc = allocator_type ()))#if !defined (_RWSTD_NO_LIST_NODE_BUFFER)F : allocator_type (__alloc), _C_buflis[t (0), _C_free_list (0),F _C_next_avail (0), _C_last (0), _C_node (0), _C_length (0) { _C_init (true);#else7 : allocator_type (__alloc), _C_next_avail (0), 7 _C_last (0), _C_node (0), _C_length (0) { _C_init ();.#endif // defined (_RWSTD_NO_LIST_NODE_BUFFER) } _EXPLICIT% list (size_type __n, 8 const_reference __x = value_type (),< const allocator_type &__alloc = allocator_type ())\)#if !defined (_RWSTD_NO_LIST_NODE_BUFFER)F : allocator_type (__alloc), _C_buflist (0), _C_free_list (0),F _C_next_avail (0), _C_last (0), _C_node (0), _C_length (0) {#else7 : allocator_type (__alloc), _C_next_avail (0), 7 _C_last (0), _C_node (0), _C_length (0) {.#endif // defined (_RWSTD_NO_LIST_NODE_BUFFER) _C_init (__n, __x); }2#if !defined (_RWSTD_NO_INLINE_MEMBER_TEMPLATES) \0 && (!defined (_MSC_VER) || _MSC_VER >= 1300)"] templateA void _C_init (_InputIterator __first, _InputIterator __last, 0 _RWSTD_DISPATCH_INT (false)) {. _RWSTD_ASSERT_RANGE (__first, __last); _C_init(); _TRY {/ insert (begin (), __first, __last); } _CATCH (...) {)#if !defined (_RWSTD_NO_LIST_NODE_BUFFER) _C_free_buffers ();.#endif // defined (_RWSTD_NO_LIST_NODE_BUFFER) _RETHROW; } }" templa ^teA void _C_init (_InputIterator __first, _InputIterator __last, / _RWSTD_DISPATCH_INT (true)) {. _RWSTD_ASSERT_RANGE (__first, __last);" _C_init (__first, __last); }" template9 list (_InputIterator __first, _InputIterator __last, < const allocator_type& __alloc = allocator_type ()))#if !defined (_RWSTD_NO_LIST_NODE_BUFFER)F : allocator_type (__alloc), _C_buflist (0), _C_free_list _(0),F _C_next_avail (0), _C_last (0), _C_node (0), _C_length (0) {#else7 : allocator_type (__alloc), _C_next_avail (0), 7 _C_last (0), _C_node (0), _C_length (0) {.#endif // defined (_RWSTD_NO_LIST_NODE_BUFFER). _RWSTD_ASSERT_RANGE (__first, __last);D _C_init (__first, __last, _RWSTD_DISPATCH (_InputIterator)); }9#else // if defined (_RWSTD_NO_INLINE_MEMBER_TEMPLATES)9 list (const_iterator __first, const_iterator __last, < ` const allocator_type& __alloc = allocator_type ()))#if !defined (_RWSTD_NO_LIST_NODE_BUFFER)F : allocator_type (__alloc), _C_buflist (0), _C_free_list (0),F _C_next_avail (0), _C_last (0), _C_node (0), _C_length (0) {#else7 : allocator_type (__alloc), _C_next_avail (0), 7 _C_last (0), _C_node (0), _C_length (0) {.#endif // defined (_RWSTD_NO_LIST_NODE_BUFFER). _RWSTD_ASSERT_RANGE (__first, __last); _C_init(); _TRY {/ a insert (begin (), __first, __last); } _CATCH (...) {)#if !defined (_RWSTD_NO_LIST_NODE_BUFFER) _C_free_buffers ();.#endif // defined (_RWSTD_NO_LIST_NODE_BUFFER) _RETHROW; } }7 list (const_pointer __first, const_pointer __last, < const allocator_type& __alloc = allocator_type ()))#if !defined (_RWSTD_NO_LIST_NODE_BUFFER)F : allocator_type (__alloc), _C_buflist (0), _C_free_list (0),F _C_next_bavail (0), _C_last (0), _C_node (0), _C_length (0) {#else7 : allocator_type (__alloc), _C_next_avail (0), 7 _C_last (0), _C_node (0), _C_length (0) {.#endif // defined (_RWSTD_NO_LIST_NODE_BUFFER). _RWSTD_ASSERT_RANGE (__first, __last); _C_init(); _TRY {/ insert (begin (), __first, __last); } _CATCH (...) {)#if !defined (_RWSTD_NO_LIST_NODE_BUFFER) _C_free_buffers ();.#endif // defined (_RWSTD_NO_LIScT_NODE_BUFFER) _RETHROW; } }+#endif // _RWSTD_NO_INLINE_MEMBER_TEMPLATES list (const list &__rhs))#if !defined (_RWSTD_NO_LIST_NODE_BUFFER)B : allocator_type (__rhs.get_allocator ()), _C_buflist (0),< _C_free_list (0), _C_next_avail (0), _C_last (0), & _C_node (0), _C_length (0) {#else4 : allocator_type (__rhs.get_allocator ()), * _C_next_avail (0), _C_last (0), & _C_node (0), _C_length (0) {.#endifd // defined (_RWSTD_NO_LIST_NODE_BUFFER) _C_init(); _TRY {< insert (begin (), __rhs.begin (), __rhs.end ()); } _CATCH (...) {)#if !defined (_RWSTD_NO_LIST_NODE_BUFFER) _C_free_buffers ();.#endif // defined (_RWSTD_NO_LIST_NODE_BUFFER) _RETHROW; } } ~list () { if (_C_node) { clear ();" _C_put_node (_C_node);)#if !defined (_RWSTD_NO_LIST_NODE_BUFFER) _Ce_free_buffers ();.#endif // defined (_RWSTD_NO_LIST_NODE_BUFFER) } }% list& operator= (const list&); 3#if !defined (_RWSTD_NO_INLINE_MEMBER_TEMPLATES) \0 && (!defined (_MSC_VER) || _MSC_VER >= 1300)" templateA void assign (_InputIterator __first, _InputIterator __last) {. _RWSTD_ASSERT_RANGE (__first, __last); clear ();- _C_insert (begin (), __first, __last,5 _RWSTD_DISPATCH (_InputIterfator)); }8 void assign (size_type __n, const_reference __val) { clear ();& insert (begin (), __n, __val); }#else A void assign (const_iterator __first, const_iterator __last) {. _RWSTD_ASSERT_RANGE (__first, __last); clear ();+ insert (begin (), __first, __last); }? void assign (const_pointer __first, const_pointer __last) {. _RWSTD_ASSERT_RANGE (__first, __last); clear ();+ insertg (begin (), __first, __last); }8 void assign (size_type __n, const_reference __val) { clear ();& insert (begin (), __n, __val); }+#endif // _RWSTD_NO_INLINE_MEMBER_TEMPLATES+ allocator_type get_allocator () const { return *this; } iterator begin () {1 return _C_make_iter ((*_C_node)._C_next); }# const_iterator begin () const {1 return _C_make_iter ((*_C_node)._C_next); } iterator end () h{& return _C_make_iter (_C_node); }! const_iterator end () const {& return _C_make_iter (_C_node); }! reverse_iterator rbegin () { ) return reverse_iterator (end ()); }- const_reverse_iterator rbegin () const { / return const_reverse_iterator (end ()); } reverse_iterator rend () { + return reverse_iterator (begin ()); }* const_reverse_iterator rend () const {1 return const_reverse_iteraitor (begin ()); } bool empty () const { return 0 == size (); } size_type size () const { return _C_length; }! size_type max_size () const {6 return _C_node_alloc_type (*this).max_size (); }( void resize (size_type, value_type);! void resize (size_type __n) {$ resize (__n, value_type ()); } reference front () {" _RWSTD_ASSERT (!empty ()); return *begin (); }$ const_jreference front () const {" _RWSTD_ASSERT (!empty ()); return *begin (); } reference back () {" _RWSTD_ASSERT (!empty ()); return *--end (); }# const_reference back () const {" _RWSTD_ASSERT (!empty ()); return *--end (); }+ void push_front (const_reference __x) { insert (begin (), __x);" _RWSTD_ASSERT (!empty ()); }+ void push_back (const_reference __x) { insert (end k(), __x);" _RWSTD_ASSERT (!empty ()); }  void pop_front () {" _RWSTD_ASSERT (!empty ()); erase (begin ()); } void pop_back () {" _RWSTD_ASSERT (!empty ()); erase (--end ()); }9 iterator insert (iterator __it, const_reference __x);3#if !defined (_RWSTD_NO_INLINE_MEMBER_TEMPLATES) \0 && (!defined (_MSC_VER) || _MSC_VER >= 1300)& // handles bidirectional iterators# template )l void _C_insert (const iterator &__it,C _InputIterator __first, _InputIterator __last, 1 bidirectional_iterator_tag) {- _RWSTD_ASSERT_RANGE (begin (), __it);. _RWSTD_ASSERT_RANGE (__first, __last);0 for ( ; !(__first == __last); ++__first)% insert (__it, *__first);  } // handles input iterators# template " void _C_insert (iterator __it,C _InputIterator _m_first, _InputIterator __last, ) input_iterator_tag) {- _RWSTD_ASSERT_RANGE (begin (), __it);. _RWSTD_ASSERT_RANGE (__first, __last);8 for ( ; !(__first == __last); ++__first, ++__it), __it = insert (__it, *__first);  } // handles nonintegral types" template) void _C_insert (const iterator &__it,D _InputIterator __first, _InputIterator __last, 2 _RWSTD_DISnPATCH_INT (false)) {* _C_insert (__it, __first, __last, 9 _RWSTD_ITERATOR_CATEGORY (_InputIterator, __first)); } // handles integral types" template* void _C_insert (const iterator &__it, D _InputIterator __first, _InputIterator __last, 1 _RWSTD_DISPATCH_INT (true)) {* _C_insert (__it, __first, __last); }" template void insert (iterator __it, B o _InputIterator __first, _InputIterator __last ) {- _RWSTD_ASSERT_RANGE (begin (), __it);. _RWSTD_ASSERT_RANGE (__first, __last);C // calling insert on a list specialized on an integral typeJ // may lead to ambiguities if the actual function arguments do notF // exactly match those of the non-templatized function (below)B // the dispatch mechanism determines whether the argumentsG // really are iterators or whether they are just integpral types< // and calls the appropriate implementation functionM _C_insert (__it, __first, __last, _RWSTD_DISPATCH (_InputIterator)); }G void insert (iterator __it, size_type __n, const_reference __val) {- _RWSTD_ASSERT_RANGE (begin (), __it);% _C_insert (__it, __n, __val); }9#else // if defined (_RWSTD_NO_INLINE_MEMBER_TEMPLATES)E void insert (iterator __it, size_type __n, const_reference __x) {- _RWSTD_ASSERT_RANGE (beginq (), __it);# _C_insert (__it, __n, __x); }N void insert (iterator __it, const_pointer __first, const_pointer __last) {- _RWSTD_ASSERT_RANGE (begin (), __it);. _RWSTD_ASSERT_RANGE (__first, __last);/ for (; !(__first == __last); ++__first)$ insert (__it, *__first); } void insert (iterator __it,A const_iterator __first, const_iterator __last) {- _RWSTD_ASSERT_RANGE (begin (), __it);. _RWSTD_ArSSERT_RANGE (__first, __last);/ for (; !(__first == __last); ++__first)$ insert (__it, *__first); }-#endif // _RWSTD_NO_INLINE_MEMBER_TEMPLATES iterator erase (iterator);( iterator erase (iterator, iterator); void swap (list&); void clear () {! erase (begin (), end ()); } protected: ; void _C_transfer (iterator, iterator, iterator, list&);9 void _C_advance (iterator &__it, difference_type __n,- s const iterator &__end) {) while (__n-- && !(__it == __end)) ++__it; } G // uses transfer_node to merge in list by transfering nodes to list: void _C_adjacent_merge (iterator, iterator, iterator);"#ifndef _RWSTD_NO_MEMBER_TEMPLATESG // uses transfer_node to merge in list by transfering nodes to list templateD void _C_adjacent_merge (iterator, iterator, iterator, _Compare);2#else // if defined (_RWSTD_NO_MEMtBER_TEMPLATES)9 void _C_adjacent_merge (iterator, iterator, iterator,G bool (*)(const_reference, const_reference));&#endif // _RWSTD_NO_MEMBER_TEMPLATES H void _C_insert (iterator __it, size_type __n, const_reference __x) {- _RWSTD_ASSERT_RANGE (begin (), __it); while (__n--) insert (__it, __x); }public: // 23.2.2.4, p4" void splice (iterator, list&); // 23.2.2.4, p7, void splice (iuterator, list&, iterator); // 23.2.2.4, p116 void splice (iterator, list&, iterator, iterator);" void remove (const_reference); void unique (); void merge (list&); void reverse (); void sort ();"#ifndef _RWSTD_NO_MEMBER_TEMPLATES template void remove_if (_Predicate);$ template# void unique (_BinaryPredicate); template% void merge (list &__x, _Compare); vtemplate void sort (_Compare);2#else // if defined (_RWSTD_NO_MEMBER_TEMPLATES)/ void remove_if (bool (*)(const_reference));= void unique (bool (*)(const_reference, const_reference));G void merge (list &__x, bool (*)(const_reference, const_reference));; void sort (bool (*)(const_reference, const_reference));$#endif // _RWSTD_NO_MEMBER_TEMPLATES};)template inline bool1operator== (const list<_TypeT, _wAllocator>& __x, 0 const list<_TypeT, _Allocator>& __y){( return __x.size () == __y.size ()= && equal (__x.begin (), __x.end (), __y.begin ());})template inline bool0operator< (const list<_TypeT, _Allocator>& __x, / const list<_TypeT, _Allocator>& __y){> return lexicographical_compare (__x.begin (), __x.end (), > __y.begin (), __y.end ());})template inline bool1operator!= (const list<_TypeT, _Allocator>& __x, 0 const list<_TypeT, _Allocator>& __y){ return !(__x == __y);})template inline bool1operator<= (const list<_TypeT, _Allocator>& __x, 0 const list<_TypeT, _Allocator>& __y){ return !(__y < __x);})template inline bool0operator> (const list<_TypeT, _Allocator>& __x, 0 const liyst<_TypeT, _Allocator>& __y){ return __y < __x;})template inline bool1operator>= (const list<_TypeT, _Allocator>& __x, 0 const list<_TypeT, _Allocator>& __y){ return !(__x < __y);}$#ifndef _RWSTD_NO_PART_SPEC_OVERLOAD)template 1inline void swap (list<_TypeT, _Allocator>& __x, 0 list<_TypeT, _Allocator>& __y){ __x.swap (__y);}(#endif // _RWSTD_NO_PAzRT_SPEC_OVERLOAD)template 4inline _TYPENAME list<_TypeT, _Allocator>::iterator Elist<_TypeT, _Allocator>::insert (iterator __it, const_reference __x){) _RWSTD_ASSERT_RANGE (begin (), __it);> // create temporary allocator for non-conforming compilers- // which need to use allocator_interface( _C_link_type __tmp = _C_get_node (); _TRY {0 _RWSTD_VALUE_ALLOC (_C_value_alloc_type,9 construct (_RWSTD_{VALUE_ALLOC< (_C_value_alloc_type,K address ((*__tmp)._C_data)), __x)); } _CATCH (...) { _C_put_node (__tmp); _RETHROW; }) (*__tmp)._C_next = _ITER_NODE (__it);4 (*__tmp)._C_prev = (*_ITER_NODE (__it))._C_prev;E (*(_C_link_type ((*_ITER_NODE (__it))._C_prev)))._C_next = __tmp;) (*_ITER_NODE (__it))._C_prev = __tmp; ++_C_length; return _C_make_iter |(__tmp);})template 4inline _TYPENAME list<_TypeT, _Allocator>::iterator Clist<_TypeT, _Allocator>::erase (iterator __first, iterator __last){, _RWSTD_ASSERT_RANGE (begin (), __first);* _RWSTD_ASSERT_RANGE (__first, __last);" while (!(__first == __last)) {" __first = erase (__first); }  return __first;})template 4inline _TYPENAME list<_TypeT, _Allocator>::iterator /list<_Ty}peT, _Allocator>::erase (iterator __it){) _RWSTD_ASSERT_RANGE (begin (), __it); if (__it == end ()) return end (); iterator __tmp =C _C_make_iter (_C_link_type ((*_ITER_NODE (__it))._C_next));> (*(_C_link_type ((*_ITER_NODE (__it))._C_prev)))._C_next =% (*_ITER_NODE (__it))._C_next;> (*(_C_link_type ((*_ITER_NODE (__it))._C_next)))._C_prev =% (*_ITER_NODE (__it))._C_prev; --_C_length;, _RWSTD_VALUE_ALLOC (_C_value_alloc~_type,I destroy (_RWSTD_VALUE_ALLOC (_C_value_alloc_type,F address ((*_ITER_NODE (__it))._C_data))));$ _C_put_node (_ITER_NODE (__it)); return __tmp;})template inline void*list<_TypeT, _Allocator>::swap (list &__x){3 if (get_allocator () == __x.get_allocator ()) {+ _STD::swap (_C_node, __x._C_node); . _STD::swap (_C_length, __x._C_length);)#if !defined (_RWSTD_NO_LIST_NODE_BUFFER)0 _STD::swap (_C_buflist, __x._C_buflist);4 _STD::swap (_C_free_list, __x._C_free_list);.#endif // defined (_RWSTD_NO_LIST_NODE_BUFFER)6 _STD::swap (_C_next_avail, __x._C_next_avail);* _STD::swap (_C_last, __x._C_last); } else { list &__tmp = *this; *this = __x; __x = __tmp; }})template &inline void list<_TypeT, _Allocator>::I_C_adjacent_merge (iterator __first1, iterator __last1, iterator __last2){I difference_type __n = _DISTANCE (__first1, __last1, difference_type);M for (iterator __first2 = __last1; __n >= 0 && !(__first2 == __last2); ) {$ if (*__first2 < *__first1) {' iterator __next = __first2;> _C_transfer (__first1, __first2, ++__next, *this); __first2 = __next; } else { ++__first1; --__n; } }}"#ifndef _RWSTD_NO_MEMBER_TEMPLATES)template template&inline void list<_TypeT, _Allocator>::I_C_adjacent_merge (iterator __first1, iterator __last1, iterator __last2," _Compare __cmp)2#else // if defined (_RWSTD_NO_MEMBER_TEMPLATES))template &inline void list<_TypeT, _Allocator>::I_C_adjacent_merge (iterator __first1, iterator __last1, iterator __last2,C bool (*__cmp)(const_reference, const_reference))&#endif // _RWSTD_NO_MEMBER_TEMPLATES{I difference_type __n = _DISTANCE (__first1, __last1, difference_type);M for (iterator __first2 = __last1; __n >= 0 && !(__first2 == __last2); ) {+ if (__cmp (*__first2, *__first1)) {' iterator __next = __first2;> _C_transfer (__first1, __first2, ++__next, *this); __first2 = __next; } else { ++__first1; --__n; } }}} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif##ifdef _RWSTD_NO_IMPLICIT_INCLUSION# include #endif$#ifndef _RWSTD_NO_STL_SPECIALIZATION# include "list_spec.h"(#endif // _RWSTD_NO_STL_SPECIALIZATION#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif#endif //_RWSTD_LIST_INCLUDEDww A/lm7ԦL/*************************************************************************** *@ * list.cc - Non-nline list definitions for the Standard Library *, * $Id: //stdlib/3.0-rel/include/list.cc#3 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12 .211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** * * Copyright (c) 1994 * Hewlett-Packard Company *E * Permission to use, copy, modify, distribute and sell this softwareG * and its documentation for any purpose is hereby granted without fee,D  * provided that the above copyright notice appear in all copies andD * that both that copyright notice and this permission notice appearA * in supporting documentation. Hewlett-Packard Company makes noA * representations about the suitability of this software for anyH * purpose. It is provided "as is" without express or implied warranty. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reser ved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not b e provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) { )#if !defined (_RWSTD_NO_LIST_NODE_BUFFER))template Cvoid list<_TypeT, _Allocator>::_C_add_buffer (bool __is_list_empty){ // empty list gets one node) _RWSTD_SIZE_T __next_buffer_size = 1; if(!__is_list_empty) { if ((void*)_C_buflist) {! __next_buffer_size = D _RW::__rw_new_capacity(_C_buflist->_C_bufsize,this); } else {@ __next_buffer_size = _RW::__rw_new_capacity(0,this); }  } _C_buf_pointer __tmp = B _C_buf_alloc_type (*this).allocate (1, (void*)_C_buflist); _TRY { __tmp->_C_buffer = C _C_node_alloc_type (*this).allocate (__next_buffer_size,@ (void*)_C_last); } _CATCH (...) {8 _C_buf_alloc_type (*this).deallocate (__tmp, 1); _RETHROW; }$ __tmp->_C_next_buf = _C_buflist;,  __tmp->_C_bufsize = __next_buffer_size; _C_buflist = __tmp;+ _C_next_avail = _C_buflist->_C_buffer; 7 _C_last = _C_next_avail + __next_buffer_size;})template 1void list<_TypeT, _Allocator>::_C_free_buffers (){ while ((void*)_C_buflist) {* _C_buf_pointer __tmp = _C_buflist;- _C_buflist = _C_buflist->_C_next_buf;A _C_node_alloc_type (*this).deallocate (__tmp->_C_buffer, B  __tmp->_C_bufsize);8 _C_buf_alloc_type (*this).deallocate (__tmp, 1); } _C_free_list = 0; _C_next_avail = 0; _C_last = 0;}.#endif // defined (_RWSTD_NO_LIST_NODE_BUFFER))template Mvoid list<_TypeT, _Allocator>::_C_transfer (iterator __it, iterator __first, F iterator __last, list& __x){) _RWSTD_ASSERT_RANGE (begin (), __it);* _RWSTD_ASSERT_RANGE (__first, __last); if (this == &__x) {D (*(_C_link_type ((*_ITER_NODE (__last))._C_prev)))._C_next = _ITER_NODE (__it);E (*(_C_link_type ((*_ITER_NODE (__first))._C_prev)))._C_next = _ITER_NODE (__last);B (*(_C_link_type ((*_ITER_NODE (__it))._C_prev)))._C_next =! _ITER_NODE (__first); I _C_link_type __tmp = _C_link_type ((*_ITER_NODE (__it))._C_prev); I (*_ITER_NODE (__it))._C_prev = (*_ITER_NODE (__last))._C_prev;K (*_ITER_NODE (__last))._C_prev = (*_ITER_NODE (__first))._C_prev; 0 (*_ITER_NODE (__first))._C_prev = __tmp; } else {' insert (__it, __first, __last);$ __x.erase (__first, __last); }})template Fvoid list<_TypeT, _Allocator>::resize (size_type __size, _TypeT __val){ if (__size > size ())1 insert (end (), __size - size (), __val); else if (__size < size ()) {"  iterator __tmp = begin (); advance (__tmp, __size); erase (__tmp, end ()); }})template list<_TypeT, _Allocator>&Klist<_TypeT, _Allocator>::operator= (const list<_TypeT, _Allocator>& __rhs){ if (this != &__rhs) {+ iterator __first1 = begin ();) iterator __last1 = end ();1 const_iterator __first2 = __rhs.begin ();/ const_iterator __last2 = __rhs.end ();A for ( ; !(__first1 == __last1) && !(__first2 == __last2);% ++__first1, ++__first2)" *__first1 = *__first2; if (__first2 == __last2)& erase (__first1, __last1); else0 insert (__last1, __first2, __last2); } return *this;})template @void list<_TypeT, _Allocator>::splice (iterator __it, list &__x){ // assert 23.2.2.4, p3! _RWSTD_ASSERT (&__x != this);) _RWSTD_ASSERT_RANGE (begin (), __it);)#if !defined (_RWSTD_NO_LIST_NODE_BUFFER) // linear complexity, insert (__it, __x.begin (), __x.end ()); __x.clear ();#else3 if (get_allocator () == __x.get_allocator ()) { // constant complexity* // relink `it' and the head of `x'B (*(_C_link_type ((*_ITER_NODE (__it))._C_prev)))._C_next =! __x._C_node->_C_next;E __x._C_node->_C_next->_C_prev = (*_ITER_NODE (__it))._C_prev;= (*_ITER_NODE (__it))._C_prev = __x._C_node->_C_prev;: __x._C_node->_C_prev->_C_next = _ITER_NODE (__it); // empty out `x' __x._C_node->_C_next =+ __x._C_node->_C_prev = __x._C_node; // adjust sizes' _C_length += __x._C_length; __x._C_length = 0; } else { // linear complexity0 insert (__it, __x.begin (), __x.end ()); __x.clear (); }$#endif // _RWSTD_NO_LIST_NODE_BUFFER})template Mvoid list<_TypeT, _Allocator>::splice (iterator __i, list &__x, iterator __j){( _RWSTD_ASSERT_RANGE (begin (), __i);, _RWSTD_ASSERT_RANGE (__x.begin (), __j);  if ( !(__x.end () == __j)9 && !(__i == __j) && !(__i == ++iterator (__j))) {)#if !defined (_RWSTD_NO_LIST_NODE_BUFFER) // linear complexity insert (__i, *__j); __x.erase (__j);#else7 if (get_allocator () == __x.get_allocator ()) {" // constant complexity! // relink `i' and `j'E (*(_C_link_type ((*_ITER_NODE (__i))._C_prev)))._C_next =! _ITER_NODE (__j);' // save position before `i'= _C_link_type __tmp = (*_ITER_NODE (__i))._C_prev;; (*_ITER_NODE (__i))._C_prev = _ITER_NODE (__j);O (*_ITER_NODE (__j))._C_prev->_C_next = (*_ITER_NODE (__j))._C_next;O (*_ITER_NODE (__j))._C_next->_C_prev = (*_ITER_NODE (__j))._C_prev;; (*_ITER_NODE (__j))._C_next = _ITER_NODE (__i);0 (*_ITER_NODE (__j))._C_prev = __tmp; // adjust sizes ++_C_length; --__x._C_length; } else { // linear complexity insert (__i, *__j); __x.erase (__j); }&#endif // _RWSTD_NO_LIST_NODE_BUFFER }})template void list<_TypeT, _Allocator>::<splice (iterator __i, list &__x, iterator __j, iterator __k){( _RWSTD_ASSERT_RANGE (begin (), __i);, _RWSTD_ASSERT_RANGE (__x.begin (), __j);# _RWSTD_ASSERT_RANGE (__j, __k);/ // 23.2.2.4, p12 - check undefined behavior= _RWSTD_ASSERT (&__x != this || __i != __j && __i != __k); if (__j == __k) return;)#if !defined (_RWSTD_NO_LIST_NODE_BUFFER) insert (__i, __j, __k); __x.erase (__j, __k);#else3 if (get_allocator () == __x.get_allocator ()) {# ifdef _RWSTDDEBUG8 for (iterator __it = __j; __it != __k; ++__it) {E // 23.2.2.4, p12 - check undefined behavior (linear time)7 _RWSTD_ASSERT (&__x != this || __i != __j); ++_C_length; --__x._C_length; }%# else // if !defined (_RWSTDDEBUG) if (&__x != this) {! // adjust sizes first< for (iterator __it = __j; __it != __k; ++__it) { ++_C_length; --__x._C_length;  } }# endif // _RWSTDDEBUGA (*(_C_link_type ((*_ITER_NODE (__k))._C_prev)))._C_next = _ITER_NODE (__i);A (*(_C_link_type ((*_ITER_NODE (__j))._C_prev)))._C_next = _ITER_NODE (__k);A (*(_C_link_type ((*_ITER_NODE (__i))._C_prev)))._C_next = _ITER_NODE (__j); H _C_link_type __tmp = _C_link_type ((*_ITER_NODE (__i))._C_prev); B (*_ITER_NODE (__i))._C_prev = (*_ITER_NODE (__k))._C_prev;C (*_ITER_NODE (__k))._C_prev = (*_ITER_NODE (__j))._C_prev; , (*_ITER_NODE (__j))._C_prev = __tmp; } else { insert (__i, __j, __k); __x.erase (__j, __k); }&#endif // _RWSTD_NO_LIST_NODE_BUFFER})template =void list<_TypeT, _Allocator>::remove (const_reference __val){P for (iterator __first = begin (), __last = end (); !(__first == __last); ) {" iterator __next = __first;  ++__next; if (*__first == __val) erase (__first); __first = __next; }})template (void list<_TypeT, _Allocator>::unique (){ iterator __first = begin (); iterator __last = end (); if (__first == __last) return; iterator __next = __first;# while (!(++__next == __last)) { if (*__first == *__next) erase (__next); else __first = __next; __next = __first; }})template Dvoid list<_TypeT, _Allocator>::merge (list<_TypeT, _Allocator>& __x){ if (&__x == this) return;! iterator __first1 = begin (); iterator __last1 = end ();% iterator __first2 = __x.begin ();# iterator __last2 = __x.end ();> while (!(__first1 == __last1) && !(__first2 == __last2)) {" if (*__first2 < *__first1) {% iterator __next = __first2;: _C_transfer (__first1, __first2, ++__next, __x); __first2 = __next; } else ++__first1; } if (!(__first2 == __last2))6 _C_transfer (__last1, __first2, __last2, __x);})template )void list<_TypeT, _Allocator>::reverse (){ if (size () < 2) return;A for (iterator __first = ++begin (); !(__first == end ()); ) {! iterator __tmp = __first;8 _C_transfer (begin (), __tmp, ++__first, *this); }}J// sorts list by moving nodes within list; preserves iterators pointing to// elements of the list.)template &void list<_TypeT, _Allocator>::sort (){6 for (size_type __n = 1; __n < size (); __n *= 2) {! iterator __i1 = begin (),! __i2 = begin (),! __i3 = begin ();8 _C_advance (__i2, (difference_type)__n, end ());> _C_advance (__i3, (difference_type)(2 * __n), end ()); for (size_type __m = 0;> __m < (size () + (2 * __n)) / (__n * 2); __m++) {9 if (!(__i1 == end ()) && !(__i2 == end ())) {5 _C_adjacent_merge (__i1, __i2, __i3);# __i1 = __i2 = __i3;A _C_advance (__i2, (difference_type) __n, end ());E _C_advance (__i3, (difference_type) 2 * __n, end ()); } } }}"#ifndef _RWSTD_NO_MEMBER_TEMPLATES(templatetemplate<void list<_TypeT, _Allocator>::remove_if (_Predicate __pred)2#else // if defined (_RWSTD_NO_MEMBER_TEMPLATES)(templateJvoid list<_TypeT, _Allocator>::remove_if (bool (*__pred)(const_reference))&#endif // _RWSTD_NO_MEMBER_TEMPLATES{ iterator __first = begin (); iterator __last = end ();" while (!(__first == __last)) {" iterator __next = __first; ++__next; if (__pred (*__first)) erase (__first); __first = __next; }}"#ifndef _RWSTD_NO_MEMBER_TEMPLATES(template template?void list<_TypeT, _Allocator>::unique (_BinaryPredicate __pred)2#else // if defined (_RWSTD_NO_MEMBER_TEMPLATES)(templatevoid list<_TypeT, _Allocator>::9unique (bool (*__pred)(const_reference, const_reference))&#endif // _RWSTD_NO_MEMBER_TEMPLATES{ iterator __first = begin (); iterator __last = end (); if (__first == __last) return; iterator __next = __first;# while (!(++__next == __last)) {' if (__pred (*__first, *__next)) erase (__next); else __first = __next; __next = __first; }}"#ifndef _RWSTD_NO_MEMBER_TEMPLATES(templatetemplatevoid list<_TypeT, _Allocator>::5merge (list<_TypeT, _Allocator>& __x, _Compare __cmp)2#else // if defined (_RWSTD_NO_MEMBER_TEMPLATES)(templatevoid list<_TypeT, _Allocator>::%merge (list<_TypeT, _Allocator>& __x,7 bool (*__cmp)(const_reference, const_reference))&#endif // _RWSTD_NO_MEMBER_TEMPLATES{ if (&__x == this) return;! iterator __first1 = begin (); iterator __last1 = end ();% iterator __first2 = __x.begin ();# iterator __last2 = __x.end ();> while (!(__first1 == __last1) && !(__first2 == __last2)) {) if (__cmp (*__first2, *__first1)) {% iterator __next = __first2;: _C_transfer (__first1, __first2, ++__next, __x); __first2 = __next; } else ++__first1; } if (!(__first2 == __last2))6 _C_transfer (__last1, __first2, __last2, __x);}"#ifndef _RWSTD_NO_MEMBER_TEMPLATES)template template4void list<_TypeT, _Allocator>::sort (_Compare __cmp)2#else // if defined (_RWSTD_NO_MEMBER_TEMPLATES))template void list<_TypeT, _Allocator>::6sort (bool (*__cmp)(const_reference, const_reference))&#endif // _RWSTD_NO_MEMBER_TEMPLATES{6 for (size_type __n = 1; __n < size (); __n *= 2) {# iterator __it1 = begin (), # __it2 = begin (), " __it3 = begin ();( _C_advance (__it2, __n, end ());,  _C_advance (__it3, 2 * __n, end ()); for (size_type __m = 0;? __m != (size () + (2 * __n)) / (__n * 2); ++__m) { ; if (!(__it1 == end ()) && !(__it2 == end ())) {? _C_adjacent_merge (__it1, __it2, __it3, __cmp); __it1 = __it3; __it2 = __it3;0 _C_advance (__it2, __n, end ());4 _C_advance (__it3, 2 * __n, end ()); } } }}} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endifww`wm7Ԧ// -*- C++ -*-#ifndef __STD_LIST_SPEC__#define __STD_LIST_SPEC__L/*************************************************************************** *6 * list_spec.h - list <_TypeT*> partial specialization *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consiste nt with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** * * Copyright (c) 1994 * Hewlett-Packard Company *E * Permission to use, copy, modify, distribute and sell this softwareG * and its documentation for any purpose is hereby granted w ithout fee,D * provided that the above copyright notice appear in all copies andD * that both that copyright notice and this permission notice appearA * in supporting documentation. Hewlett-Packard Company makes noA * representations about the suitability of this software for anyH * purpose. It is provided "as is" without express or implied warranty. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. Al l Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies the reof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/#include #ifndef __STD_LIST__# include #endif // __STD_LIST__#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) { 0template class list >;template *class list <_TypeT*, allocator <_TypeT*> >{A typedef allocator <_TypeT*> _Allocator;C typedef _RWSTD_REBIND (_Allocator, void*) __imp_alloc_type;< typedef list __imp_type;@ typede f _TYPENAME __imp_type::iterator __imp_iterator;F typedef _TYPENAME __imp_type::const_iterator __imp_const_iterator;7 __imp_type __imp;public:G typedef _TypeT* value_type;G typedef _Allocator allocator_type;A typedef _TYPENAME allocator_type::reference reference;G typedef _TYPENAME allocator_type::const_reference const_reference;? typedef _TYPENAME allocator_type::pointer pointer;E typedef _TYPENAME allocator_type::const_pointer const_pointer;A typedef _TYPENAME allocator_type::size_type size_type;G typedef _TYPENAME allocator_type::difference_type difference_type; protected:C typedef _STD::iterator __it;D typedef _STD::iterator __cit;public: class const_iterator; class iterator : public __it {: typedef _TYPENAME __imp_type::iterator __imp_iter; __imp_iter __imp;7 friend class list<_TypeT, allocator <_TypeT> >;$ friend class const_iterator;N // implicit conversions from and to implementation-specific iterator! // used only internally( iterator (const __imp_iter &imp) : __imp (imp) {} operator __imp_iter () { return __imp; } public: iterator () {}3 bool operator== (const iterator& x) const {$ return __imp == x.__imp; }3 bool operator!= (const iterator& x) const {! return !(*this == x); }7 __iterator_base::reference operator* () const {7 return __iterator_base::reference (*__imp); }'#ifndef _RWSTD_NO_NONCLASS_ARROW_RETURN6 __iterator_base::pointer operator-> () const {6 return __iterator_base::pointer (&*__imp); }+#endif // _RWSTD_NO_NONCLASS_ARROW_RETURN" iterator& operator++ () {  ++__imp; return *this; }# iterator operator++ (int) {! iterator tmp = *this; ++*this; return tmp; }! iterator& operator-- () { --__imp; return *this;  }# iterator operator-- (int) {! iterator tmp = *this; --*this; return tmp; } };' class const_iterator : public __cit {@ typedef _TYPENAME __imp_type::const_iterator __imp_iter; __imp_iter __imp;5 friend class list<_TypeT,allocator<_TypeT> >;. const_iterator (const __imp_iter &imp) : __imp (imp) { } public: const_iterator () { }*  const_iterator (const iterator &x)! : __imp (x.__imp) { }9 bool operator== (const const_iterator& x) const {$ return __imp == x.__imp; }9 bool operator!= (const const_iterator &x) const {! return !(*this == x); } , const_reference operator* () const {, return const_reference (*__imp); }'#ifndef _RWSTD_NO_NONCLASS_ARROW_RETURN+ const_pointer operator-> () const {+  return const_pointer (&*__imp); },#endif // _RWSTD_NO_NONCLASS_ARROW_RETURN( const_iterator& operator++ () {  ++__imp; return *this; }) const_iterator operator++ (int) {' const_iterator tmp = *this; ++*this; return tmp; }' const_iterator& operator-- () { --__imp; return *this; }) const_iterator operator-- (int) {' const_iterator tmp = *this; --*this; return tmp; } };,#if !defined (_RWSTD_NO_CLASS_PARTIAL_SPEC) K typedef _STD::reverse_iterator const_reverse_iterator;E typedef _STD::reverse_iterator reverse_iterator;#else2 typedef __reverse_bi_iterator  const_reverse_iterator;, typedef __reverse_bi_iterator  reverse_iterator;#endifO _EXPLICIT list (const _Allocator &alloc _RWSTD_DEFAULT_ARG (_Allocator()))  : __imp (alloc) { } _EXPLICIT list (size_type n,I const_reference x _RWSTD_DEFAULT_ARG (value_type ()),P const _Allocator &alloc _RWSTD_DEFAULT_ARG (_Allocator ())) !  : __imp (n, x, alloc) { }(#ifdef _RWSTD_NO_DEFAULT_TEMPLATE_ARGS list () : __imp () { }) list (size_type n, const_reference x) : __imp (n, x) { })#endif // _RWSTD_NO_DEFAULT_TEMPLATE_ARGS"#ifndef _RWSTD_NO_MEMBER_TEMPLATES! template2 list (InputIterator first, InputIterator last,E const _Allocator& alloc _RWSTD_DEFAULT_ARG (_Allocator ()))( : __imp (first, last, alloc) { }4 list (const_iterator first, const_iterator last,E const _Allocator& alloc _RWSTD_DEFAULT_ARG (_Allocator ()))( : __imp (first, last, alloc) { }&#ifdef _RWSTD_NO_DEFAULT_TEMPLATE_ARGS4 list (const_iterator first, const_iterator last)! : __imp (first, last) { })#endif // _RWSTD_NO_DEFAULT_TEMPLATE_ARGS$#endif // _RWSTD_NO_MEMBER_TEMPLATES list (const list& x) : __imp (x.__imp) { }% list& operator= (const list& x) { __imp = x.__imp;  return *this; }"#ifndef _RWSTD_NO_MEMBER_TEMPLATES" template ; void assign (InputIterator first, InputIterator last) {# __imp.assign (first, last); }/#else // defined (_RWSTD_NO_MEMBER_TEMPLATES)= void assign (const_iterator first, const_iterator last) {# __imp.assign (first, last); }$#endif // _RWSTD_NO_MEMBER_TEMPLATES2 void assign (size_type n, const_reference x) { __imp.assign (n, x); }+ allocator_type get_allocator () const {7 return allocator_type (__imp.get_allocator ()); } iterator begin () { return __imp.begin (); }# const_iterator begin () const { return __imp.begin (); } iterator end () { return __imp.end (); }! const_iterator end () const { return __imp.end (); }! reverse_iterator rbegin () { ' return reverse_iterator (end ()); }- const_reverse_iterator rbegin () const { - return const_reverse_iterator (end ()); } reverse_iterator rend () { ) return reverse_iterator (begin ()); }* const_reverse_iterator rend () const {/ return const_reverse_iterator (begin ()); } bool empty () const { return __imp.empty (); } size_type size () const { return __imp.size (); }! size_type max_size () const {! return __imp.max_size (); }& void resize (size_type new_size) { __imp.resize (new_size); }9 void resize (size_type new_size, const_reference x) {# __imp.resize (new_size, x); } reference front () {* return reference (__imp.front ()); }$ const_reference front () const {0 return const_reference (__imp.front ()); } reference back () {) return reference (__imp.back ()); }# const_reference back () const {/  return const_reference (__imp.back ()); }) void push_front (const_reference x) { __imp.push_front (x); }( void push_back (const_reference x) { __imp.push_back (x); } void pop_front () { __imp.pop_front (); } void pop_back () { __imp.pop_back (); }7 iterator insert (iterator pos, const_reference x) {% return __imp.insert (pos, x); }"#ifndef _RWSTD_NO_MEMBER_TEMPLATES" template I void insert (iterator pos, InputIterator first, InputIterator last) {( __imp.insert (pos, first, last); }2#else // if defined (_RWSTD_NO_MEMBER_TEMPLATES)K void insert (iterator pos, const_iterator first, const_iterator last) {( __imp.insert (pos, first, last); } $#endif // _RWSTD_NO_MEMBER_TEMPLATES@ void insert (iterator pos, size_type n, const_reference x) {! __imp.insert (pos, n, x); }# iterator erase (iterator pos) {! return __imp.erase (pos); }4 iterator erase (iterator first, iterator last) {) return __imp.erase (first, last); } void swap (list &x) { __imp.swap (x.__imp); } void clear () { __imp.clear (); }) void splice (iterator pos, list &x) {$ __imp.splice (pos, x.__imp); }5 void splice (iterator pos, list &x, iterator i) {' __imp.splice (pos, x.__imp, i); }H void splice (iterator pos, list &x, iterator first, iterator last) {1 __imp.splice (pos, x.__imp, first, last); }% void remove (const_reference x) { __imp.remove (x); } void unique () { __imp.unique (); } void merge (list &x) { __imp.merge (x.__imp); } void reverse () { __imp.reverse (); } void sort () { __imp.sort (); }"#ifndef _RWSTD_NO_MEMBER_TEMPLATES template % void remove_if (Predicate pred) { __imp.remove_if (pred); }$ template ( void unique (BinaryPredicate pred) { __imp.unique (pred); } template ) void merge (list &x, _Compare comp) { __imp.merge (x, comp); } template  void sort (_Compare comp) { __imp.sort (comp); }$#endif // _RWSTD_NO_MEMBER_TEMPLATES #ifndef _RWSTD_NO_EXT_ALLOC_SIZE( size_type allocation_size () const {( return __imp.allocation_size (); }5 size_type allocation_size (size_type new_size) { . return __imp.allocation_size (new_size); }"#endif // _RWSTD_NO_EXT_ALLOC_SIZE};template Finline bool operator== (const list <_TypeT*, allocator <_TypeT*> > &x,F const list <_TypeT*, allocator <_TypeT*> > &y){N return x.size () == y.size () && equal (x.begin (), x.end (), y.begin ());}template Einline bool operator< (const list <_TypeT*, allocator <_TypeT*> > &x,E const list <_TypeT*, allocator <_TypeT*> > &y){P return lexicographical_compare (x.begin (), x.end (), y.begin (), y.end ());}M#if !defined (_RWSTD_NO_NAMESPACE) || !defined (_RWSTD_NO_PART_SPEC_OVERLOAD)template Finline bool operator!= (const list <_TypeT*, allocator <_TypeT*> > &x,F const list <_TypeT*, allocator <_TypeT*> > &y){ return !(x == y);}template Einline bool operator> (const list <_TypeT*, allocator <_TypeT*> > &x,E const list <_TypeT*, allocator <_TypeT*> > &y){ return y < x;}template Finline bool operator>= (const list <_TypeT*, allocator <_TypeT*> > &x,F const list <_TypeT*, allocator <_TypeT*> > &y){ return !(x < y);}template Finline bool operator<= (const list <_TypeT*, allocator <_TypeT*> > &x,F const list <_TypeT*, allocator <_TypeT*> > &y){ return !(y < x);}template :inline void swap (list <_TypeT*, allocator <_TypeT*> > &a,: list <_TypeT*, allocator <_TypeT*> > &b){ a.swap (b);}Q#endif // !defined(_RWSTD_NO_NAMESPACE) || !defined(_RWSTD_NO_PART_SPEC_OVERLOAD)} // namespace stdE#if defined(__VMS) && defined(__DECCXX ) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif#endif /*__STD_LIST_SPEC__*/wwm7Ԧ// -*- C++ -*-L/*************************************************************************** *@ * locale - Declarations for the Standard Library locale classes *+ * $Id: //stdlib/3.0-rel/include/locale#2 $ *L *************************************************************************** * > * Copyright 2002 Compaq Information Technologies Group, L.P. *C * Compaq and the Compaq logo are trademarks of Compaq Information@ * Technologies Group, L.P. in the U.S. and /or other countries. *J * Confidential computer software. Valid license from Compaq required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software , Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/#ifndef _RWSTD_LOCALE_INCLUDED#define _RWSTD_LOCALE_INCLUDED#include #ifndef __USE_STD_IOSTREAMw#error "cannot include ios -- define __USE_STD_IOSTREAM to override default - see section 7.1.2 of the C++ Using Guide"#else#ifdef _V3_LOCALE##include $#include $#include "#include &#include &#include '#include $#include $#include %#include %#include %#include %#include #else#include #include #include #include #include #include #include !#include #endif // _V3_LOCALE#endif // __USE_STD_IOSTREAM"#endif // _RWSTD_LOCALE_INCLUDEDwwm7Ԧ// -*- C++ -*-L/*************************************************************************** *8 * map - declarations for the Standard Library map class *( * $Id: //stdlib/3.0-rel/include/map#2 $ *L *************************************************************************** * > * Copyright 2002 Compaq Information Technologies Group, L.P. *C * Compaq and the Compaq logo are trademarks of Compaq Information@ * Technologies Group, L.P. in the U.S. and/or other countries. *J * Confidential computer software. Valid license from Compaq required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** * * Copyright (c) 1994 * Hewlett-Packard Company *E *  Permission to use, copy, modify, distribute and sell this softwareG * and its documentation for any purpose is hereby granted without fee,D * provided that the above copyright notice appear in all copies andD * that both that copyright notice and this permission notice appearA * in supporting documentation. Hewlett-Packard Company makes noA * representations about the suitability of this software for anyH * purpose. It is provided "as is" without express or implied warranty. *L ******* ******************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the t erms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/#ifndef _RWSTD_MAP_INCLUDED#define _RWSTD_MAP_INCLUDED,#include // for allocator/#include // for less4#include // for __rb_tree#include #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (__rw) { :// This is used in the implementation of map and multimap.%template @struct __select1st : public _STD::unary_function<_TypeT, _TypeU>{9 const _TypeU& operator () (const _TypeT& __x) const { return __x.first; }};} // namespace __rw_RWSTD_NAMESPACE (std) { 9// prevent comma from messing up macro argument expansionA#define _RWSTD_MAP_ALLOCATOR(K, T) allocator >#template class _Compare _RWSTD_COMPLEX_DEFAULT (less<_Key>),   class _AllocatorN _RWSTD_COMPLEX_DEFAULT (_RWSTD_MAP_ALLOCATOR (_Key, _TypeT)) > class map{public:9 typedef _Key key_type;< typedef _TypeT mapped_type;; typedef pair value_type;< typedef _Compare key_compare;? typedef _Allocator allocator_type; private: 0 typedef _RW::__rb_tree, + key_compare, allocator_type> _C_repT; _C_repT _C_rep;public:@ typedef _TYPENAME _C_repT::reference reference;F typedef _TYPENAME _C_repT::const_reference const_reference;? typedef _TYPENAME _C_repT::iterator iterator;E typedef _TYPENAME _C_repT::const_iterator const_iterator;@ typedef _TYPENAME _C_repT::size_type size_type;F typedef _TYPENAME _C_r epT::difference_type difference_type;> typedef _TYPENAME _C_repT::pointer pointer;D typedef _TYPENAME _C_repT::const_pointer const_pointer;G typedef _TYPENAME _C_repT::reverse_iterator reverse_iterator;M typedef _TYPENAME _C_repT::const_reverse_iterator const_reverse_iterator;I struct value_compare: binary_function {6 // explictly specified template arg-list below6 // to work around an MSVC 6.0  bug (PR #26908)= friend class map<_Key, _TypeT, _Compare, _Allocator>;O bool operator () (const value_type &__x, const value_type &__y) const {/ return comp (__x.first, __y.first); } protected: _Compare comp;8 value_compare (_Compare __cmp) : comp (__cmp) {} }; // 23.3.1.1, p1 _EXPLICIT8 map (const key_compare &__cmp = key_compare (),< const allocator_type &__alloc = allocator_type ()) , : _C_rep (__cmp, false, __alloc) { }2#if !defined (_RWSTD_NO_INLINE_MEMBER_TEMPLATES) \0 && (!defined (_MSC_VER) || _MSC_VER >= 1300) // 23.3.1.1, p3 template0 map (_InputIter __first, _InputIter __last, - const _Compare& __cmp = _Compare (),3 const _Allocator& __alloc = _Allocator ()): : _C_rep (__first, __last, __cmp, false, __alloc) {}9#else // if defined (_RWSTD_NO_INLINE_MEMBER_TEMPLATES)> map (const value_type* __first, const value_type* __last, 3 const key_compare &__cmp = key_compare (),; const allocator_type &__alloc = allocator_type ()): : _C_rep (__first, __last, __cmp, false, __alloc) {}8 map (const_iterator __first, const_iterator __last, 3 const key_compare &__cmp = key_compare (),; const allocator_type &__alloc = allocator_type ()): : _C_rep (__first, __last, __cmp, false, __alloc) {}-#endif // _RWSTD_NO_INLINE_MEMBER_TEMPLATES7 map (const map &__x): _C_rep (__x._C_rep, false) {}% map& operator= (const map &__x) {+ _C_rep = __x._C_rep; return *this;  }+ allocator_type get_allocator () const {' return _C_rep.get_allocator (); } iterator begin () { return _C_rep.begin (); }# const_iterator begin () const { return _C_rep.begin (); } iterator end () { return _C_rep.end (); }! const_iterator end () const { return _C_rep.end (); } reverse_iterator rbegin () { return _C_rep.rbegin (); }, const_reverse_iterator rbegin () const { return _C_rep.rbegin (); } reverse_iterator rend () { return _C_rep.rend (); }* const_reverse_iterator rend () const { return _C_rep.rend (); } bool empty () const { return _C_rep.empty (); } size_type size () const { return _C_rep.size (); }! size_type max_size () const {" return _C_rep.max_size (); }3 mapped_type& operator[] (const key_type &__k) {A // note: temporary is necessary to avoid bug with xlC 5.0G iterator __i = insert (value_type (__k, mapped_type ())).first; return (*__i).second; }9 pair insert (const value_type &__x) {# return _C_rep.insert (__x); }< iterator insert (iterator __it, const value_type &__x) {) return _C_rep.insert (__it, __x); }2#if !defined (_RWSTD_NO_INLINE_MEMBER_TEMPLATES) \0 && (!defined (_MSC_VER) || _MSC_VER >= 1300) template9 void insert (_InputIter __first, _InputIter __last) {( _C_rep.insert (__first, __last); }9#else // if defined (_RWSTD_NO_INLINE_MEMBER_TEMPLATES)G void insert (const value_type* __first, const value_type* __last) {( _C_rep.insert (__first, __last); }A void insert (const_iterator __first, const_iterator __last) {( _C_rep.insert (__first, __last); }-#endif // _RWSTD_NO_INLINE_MEMBER_TEMPLATES void erase (iterator __it) { _C_rep.erase (__it); }+ size_type erase (const key_type& __x) {" return _C_rep.erase (__x); }5 void erase (iterator __first, iterator __last) {& _C_rep.erase (__first,__last); } void swap (map &__x) {! _C_rep.swap (__x._C_rep); } void clear () { erase (begin (),end ()); }# key_compare key_comp () const {" return _C_rep.key_comp (); }' value_compare value_comp () const {2 return value_compare (_C_rep.key_comp ()); }) iterator find (const key_type& __x) {! return _C_rep.find (__x); }5 const_iterator find (const key_type& __x) const {! return _C_rep.find (__x); }1 size_type count (const key_type& __x) const {" return _C_rep.count (__x); }0 iterator lower_bound (const key_type& __x) {( return _C_rep.lower_bound (__x); }0 iterator upper_bound (const key_type& __x) {( return _C_rep.upper_bound (__x); }< const_iterator lower_bound (const key_type& __x) const {) return _C_rep.lower_bound (__x);  }< const_iterator upper_bound (const key_type& __x) const {) return _C_rep.upper_bound (__x);  }? pair equal_range (const key_type& __x) {( return _C_rep.equal_range (__x); }( pair- equal_range (const key_type& __x) const {( return _C_rep.equal_range (__x); }};#template class _Compare _RWSTD_COMPLEX_DEFAULT (less<_Key>),  class _AllocatorN _RWSTD_COMPLEX_DEFAULT (_RWSTD_MAP_ALLOCATOR (_Key, _TypeT)) >class multimap{public:9 typedef _Key key_type;< typedef _TypeT mapped_type;; typedef pair value_type;< typedef _Compare key_compare;? typedef _Allocator allocator_type;private: 1 typedef _RW::__rb_tree, ) key_compare, allocator_type> _C_repT; _C_repT _C_rep;public:@ typedef _TYPENAME _C_repT::reference  reference;F typedef _TYPENAME _C_repT::const_reference const_reference;? typedef _TYPENAME _C_repT::iterator iterator;F typedef _TYPENAME _C_repT::const_iterator const_iterator; @ typedef _TYPENAME _C_repT::size_type size_type;F typedef _TYPENAME _C_repT::difference_type difference_type;> typedef _TYPENAME _C_repT::pointer pointer;E typedef _TYPENAME _C_repT::const_pointer const_pointer; G typedef _TYPENAME _C_repT::reverse_iterator reverse_iterator;M typedef _TYPENAME _C_repT::const_reverse_iterator const_reverse_iterator;I struct value_compare: binary_function {6 // explictly specified template arg-list below6 // to work around an MSVC 6.0 bug (PR #26908)B friend class multimap<_Key, _TypeT, _Compare, _Allocator>;O bool operator () (const value_type &__x, const value_type &__y) const {/ return comp (__x.first, __y.first); } protected: _Compare comp;8 value_compare (_Compare __cmp): comp (__cmp) { } }; _EXPLICIT8 multimap (const key_compare &__cmp = key_compare (),@ const allocator_type &__alloc = allocator_type ())) : _C_rep (__cmp, true, __alloc) { }2#if !defined (_RWSTD_NO_INLINE_MEMBER_TEMPLATES) \0 && (!defined (_MSC_VER) || _MSC_VER >= 1300) template5 multimap (_InputIter  __first, _InputIter __last, 2 const _Compare& __cmp = _Compare (),9 const _Allocator& __alloc = _Allocator ()) : : _C_rep (__first, __last, __cmp, true, __alloc) { }9#else // if defined (_RWSTD_NO_INLINE_MEMBER_TEMPLATES)C multimap (const value_type* __first, const value_type* __last, 8 const key_compare &__cmp = key_compare (),@ const allocator_type &__alloc = allocator_type ()): : _C_rep (__first, __last, __cmp, true, __alloc) { }< multimap (const_iterator __first, const_iterator __last,8 const key_compare &__cmp = key_compare (),@ const allocator_type &__alloc = allocator_type ()): : _C_rep (__first, __last, __cmp, true, __alloc) { }-#endif // _RWSTD_NO_INLINE_MEMBER_TEMPLATES" multimap (const multimap &__x)' : _C_rep (__x._C_rep, true) { }/ multimap& operator= (const multimap &__x) {+ _C_rep = __x._C_rep; return *this;  }+  allocator_type get_allocator () const {' return _C_rep.get_allocator (); } iterator begin () { return _C_rep.begin (); }# const_iterator begin () const { return _C_rep.begin (); } iterator end () { return _C_rep.end (); }! const_iterator end () const { return _C_rep.end (); } reverse_iterator rbegin () { return _C_rep.rbegin (); }, const_reverse_iterator rbegin () const { return _C_rep.rbegin (); } reverse_iterator rend () { return _C_rep.rend (); }* const_reverse_iterator rend () const { return _C_rep.rend (); } bool empty () const { return _C_rep.empty (); } size_type size () const { return _C_rep.size (); }" size_type max_size () const {" return _C_rep.max_size (); }- iterator insert (const value_type& __x) {) return _C_rep.insert (__x).first; }< iterator insert (iterator __it, const value_type& __x) {) return _C_rep.insert (__it, __x); }2#if !defined (_RWSTD_NO_INLINE_MEMBER_TEMPLATES) \0 && (!defined (_MSC_VER) || _MSC_VER >= 1300) template9 void insert (_InputIter __first, _InputIter __last) {( _C_rep.insert (__first, __last); }8#else // if defined (_RWSTD_NO_INLINE_MEMBER_TEMPLATES)G void insert (const value_type* __first, const value_type* __last) {( _C_rep.insert (__first, __last); }A void insert (const_iterator __first, const_iterator __last) {( _C_rep.insert (__first, __last); }-#endif // _RWSTD_NO_INLINE_MEMBER_TEMPLATES! void erase (iterator __it) { _C_rep.erase (__it); }+ size_type erase (const key_type& __x) {" return _C_rep.erase (__x); }4 void erase (iterator __first, iterator __last) {' _C_rep.erase (__first, __last); } void clear () { erase (begin (),end ()); } void swap (multimap &__x) {! _C_rep.swap (__x._C_rep); }$ key_compare key_comp () const {" return _C_rep.key_comp (); }' value_compare value_comp () const {2 return value_compare (_C_rep.key_comp ()); }) iterator find (const key_type& __x) {! return _C_rep.find (__x); }5 const_iterator find (const key_type& __x) const {!  return _C_rep.find (__x); }2 size_type count (const key_type& __x) const {" return _C_rep.count (__x); }0 iterator lower_bound (const key_type& __x) {( return _C_rep.lower_bound (__x); }0 iterator upper_bound (const key_type& __x) {( return _C_rep.upper_bound (__x); }= const_iterator lower_bound (const key_type& __x) const {) return _C_rep.lower_bound (__x);  }= const_iterator upper_bound (const key_type& __x) const {) return _C_rep.upper_bound (__x);  }? pair equal_range (const key_type& __x) {( return _C_rep.equal_range (__x); }' pair- equal_range (const key_type& __x) const {( return _C_rep.equal_range (__x); }};// 23.1, p5 - table 65Etemplate Kinline bool operator== (const map<_Key, _TypeT, _Compare, _Allocator> &__x,K const map<_Key, _TypeT, _Compare, _Allocator> &__y){( return __x.size () == __y.size ()= && equal (__x.begin (), __x.end (), __y.begin ());}// 23.1, p5 - table 65Etemplate Kinline bool operator< (const map<_Key, _TypeT, _Compare, _Allocator> &__x, J const map<_Key, _TypeT, _Compare, _Allocator> &__y){= return lexicographical_compare (__x.begin (), __x.end (),> __y.begin (), __y.end ());}// 23.1, p5 - table 65Etemplate Linline bool operator!= (const map<_Key, _TypeT, _Compare, _Allocator> &__x, K const map<_Key, _TypeT, _Compare, _Allocator> &__y){ return !(__x == __y);}// 23.1, p5 - table 65Etemplate Kinline bool operator> (const map<_Key, _TypeT, _Compare, _Allocator> &__x, J const map<_Key, _TypeT, _Compare, _Allocator> &__y){ return __y < __x;}// 23.1, p5 - table 65Etemplate Linline bool operator>= (const map<_Key, _TypeT, _Compare, _Allocator> &__x, K const map<_Key, _TypeT, _Compare, _Allocator> &__y){ return !(__x < __y);}// 23.1, p5 - table 65Etemplate Linline bool operator<= (const map<_Key, _TypeT, _Compare, _Allocator> &__x, K const map<_Key, _TypeT, _Compare, _Allocator> &__y){ return !(__y < __x);}$#ifndef _RWSTD_NO_PART_SPEC_OVERLOAD // 23.3.1.4Etemplate @inline void swap (map<_Key, _TypeT, _Compare, _Allocator> &__y, ? map<_Key, _TypeT, _Compare, _Allocator> &__x){ __x.swap (__y);}(#endif // _RWSTD_NO_PART_SPEC_OVERLOAD// 23.1, p5 - table 65Etemplate inline boolEoperator== (const multimap<_Key, _TypeT, _Compare, _Allocator> &__x, D const multimap<_Key, _TypeT, _Compare, _Allocator> &__y){( return __x.size () == __y.size ()= && equal (__x.begin (), __x.end (), __y.begin ());}// 23.1, p5 - table 65Etemplate inline boolDoperator< (const multimap<_Key, _TypeT, _Compare, _Allocator> &__x, C const multimap<_Key, _TypeT, _Compare, _Allocator> &__y){= return lexicographical_compare (__x.begin (), __x.end (),> __y.begin (), __y.end ());}// 23.1, p5 - table 65Etemplate inline boolEoperator!= (const multimap<_Key, _TypeT, _Compare, _Allocator> &__x, D  const multimap<_Key, _TypeT, _Compare, _Allocator> &__y){ return !(__x == __y);}// 23.1, p5 - table 65Etemplate inline boolDoperator> (const multimap<_Key, _TypeT, _Compare, _Allocator> &__x, C const multimap<_Key, _TypeT, _Compare, _Allocator> &__y){ return __y < __x;}// 23.1, p5 - table 65Etemplate inline boolEoperator>= (const multimap<_Key, _TypeT, _Compare, _Allocator> &__x, D const multimap<_Key, _TypeT, _Compare, _Allocator> &__y){ return !(__x < __y);}// 23.1, p5 - table 65Etemplate inline boolEoperator<= (const multimap<_Key, _TypeT, _Compare, _Allocator> &__x, D const multimap<_Key, _TypeT, _Compare, _Allocator> &__y){ return !(__y < __x);}$#ifndef _RWSTD_NO_PART_SPEC_OVERLOAD // 23.3.2.3Etemplate >void swap (multimap<_Key, _TypeT, _Compare, _Allocator> &__x, = multimap<_Key, _TypeT, _Compare, _Allocator> &__y){ __x.swap (__y);}(#endif // _RWSTD_NO_PART_SPEC_OVERLOAD} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif#endif // _RWSTD_MAP_INCLUDEDwwRm7Ԧ// -*- C++ -*-L/*************************************************************************** *G * memory - declarations for the Standard Library memory implementation *, * $Id: //stdlib/3.0-rel/include/memory#3 $  *L *************************************************************************** * > * Copyright 2002 Compaq Information Technologies Group, L.P. *C * Compaq and the Compaq logo are trademarks of Compaq Information@ * Technologies Group, L.P. in the U.S. and/or other countries. *J * Confidential computer software. Valid license from Compaq required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** * * Copyright (c) 1994 * Hewlett-Pac kard Company *E * Permission to use, copy, modify, distribute and sell this softwareG * and its documentation for any purpose is hereby granted without fee,D * provided that the above copyright notice appear in all copies andD * that both that copyright notice and this permission notice appearA * in supporting documentation. Hewlett-Packard Company makes noA * representations about the suitability of this software for anyH * purpose. It is provided "as is" without express or implied war ranty. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in a ccordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *M **************************************************************************/ #ifndef _RWSTD_MEMORY_INCLUDED#define _RWSTD_MEMORY_INCLUDED#include #include #include !#include #include $#include #include #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (__rw) { "// [de]allocate storage (in bytes);_RWSTD_EXPORT void* __rw_allocate (_RWSTD_SIZE_T, int = 0);D_RWSTD_EXPORT void __rw_deallocate (void*, _RWSTD_SIZE_T, int = 0);$#ifndef _RWSTD_NO_NONDEDUCED_CONTEXTD# define _RWSTD_CONTAINER_SIZE_TYPE _TYPENAME _Container::size_type#else2# define _RWSTD_CONTAINER_SIZE_TYPE _RWSTD_SIZE_T(#endif // _RWSTD_NO_NONDEDUCED_CONTEXTF// returns a suggested new capacity for a container needing more spacetemplate !inline _RWSTD_CONTAINER_SIZE_TYPEH__rw_new_capacity (_RWSTD_CONTAINER_SIZE_TYPE __size, const _Container*){. typedef _RWSTD_CONTAINER_SIZE_TYPE _SizeT;. _SizeT __cap = _RWSTD_STATIC_CAST (_SizeT,K __size * _RWSTD_NEW_CAPACITY_RATIO);L return (__size += _RWSTD_MINIMUM_NEW_CAPACITY) > __cap ? __size : __cap;} !#undef _RWSTD_CONTAINER_SIZE_TYPE} // namespace __rw_RWSTD_NAMESPACE (std) { template class allocator;_RWSTD_SPECIALIZED_CLASSclass allocator{public: typedef void* pointer;& typedef const void* const_pointer;# typedef void value_type; #ifdef _RWSTD_ALLOCATOR template  struct rebind {( typedef allocator<_TypeU> other; };#endif /* _RWSTD_ALLOCATOR */ };template class allocator{public:* typedef _RWSTD_SIZE_T size_type;0 typedef _RWSTD_PTRDIFF_T difference_type;+ typedef _TypeT value_type;( typedef value_type* pointer;. typedef const value_type* const_pointer;* typedef value_type& reference;0 typedef const value_type& const_reference;! allocator () _THROWS (()) { }5 allocator (const allocator &__rhs) _THROWS (()) {/ // working around an HP aCC warning 431 _RWSTD_UNUSED (__rhs); }#ifdef _RWSTD_ALLOCATOR template  struct rebind {( typedef allocator<_TypeU> other; }; template 9 allocator (const allocator<_TypeU>&) _THROWS (()) { } template  allocator&8 operator= (const allocator<_TypeU>&) _THROWS (()) {  return *this;  }#endif // _RWSTD_ALLOCATOR+ pointer address (reference __x) const { // lwg issue 3500 return _RWSTD_REINTERPRET_CAST (pointer,: &_RWSTD_REINTERPRET_CAST (char&, __x)); } 7 const_pointer address (const_reference __x) const { // lwg issue 3506 return _RWSTD_REINTERPRET_CAST (const_pointer,@ &_RWSTD_REINTERPRET_CAST (const char&, __x)); }J pointer allocate (size_type __n, allocator::const_pointer = 0) {#ifdef _RWSTD_ALLOCATOR+ return _RWSTD_STATIC_CAST (pointer,C _RW::__rw_allocate (__n * sizeof (value_type)));#elseF return _RWSTD_STATIC_CAST (pointer, _RW::__rw_allo cate (__n));#endif // _RWSTD_ALLOCATOR }#ifdef _RWSTD_ALLOCATOR 0 void deallocate (pointer __p, size_type __n)#else. void deallocate (void* __p, size_type __n)#endif // _RWSTD_ALLOCATOR {( _RW::__rw_deallocate (__p, __n); }I // 20.4.1.1, p11 - the largest N for which allocate (N) might succeed/ size_type max_size () const _THROWS (()) { 5 return size_type (~0) / sizeof (value_type) ?M size_type (size_type (~0) /  sizeof (value_type)) : size_type (1); }9 void construct (pointer __p, const_reference __val) {) _RW::__rw_construct (__p, __val); } void destroy (pointer __p) {! _RWSTD_ASSERT (0 != __p); __p->~_TypeT (); }};0#if !defined (_RWSTD_NO_CLASS_PARTIAL_SPEC) \/ && !defined (_RWSTD_NO_EXT_CONST_ALLOCATOR):// extension: allocates/constructs/destroys const elementstemplate class allocator{ public:* typedef _RWSTD_SIZE_T size_type;0 typedef _RWSTD_PTRDIFF_T difference_type;+ typedef const _TypeT value_type;( typedef const value_type* pointer;. typedef const value_type* const_pointer;* typedef const value_type& reference;0 typedef const value_type& const_reference;! allocator () _THROWS (()) { }5 allocator (const allocator &__rhs) _THROWS (()) {/ // working around an HP aCC warning 431 _RWSTD_UNUSED (__r hs); }#ifdef _RWSTD_ALLOCATOR template  struct rebind {( typedef allocator<_TypeU> other; }; template 9 allocator (const allocator<_TypeU>&) _THROWS (()) { } template C allocator& operator= (const allocator<_TypeU>&) _THROWS (()) {  return *this;  }#endif // _RWSTD_ALLOCATOR8 const_pointer address (const_reference __x) const {  // lwg issue 3506 return _ RWSTD_REINTERPRET_CAST (const_pointer,@ &_RWSTD_REINTERPRET_CAST (const char&, __x)); }< // avoid the use of allocator::const_pointer below2 // to work around a SunPro 5.3 (and prior) bug> const_pointer allocate (size_type __n, const void* = 0) { #ifdef _RWSTD_ALLOCATOR1 return _RWSTD_STATIC_CAST (const_pointer,2 _RWSTD_CONST_CAST (const void*,H _RW::__rw_allocate (__n * sizeof (value_type))));#else1 return _RWSTD_STATIC_CAST (const_pointer,2 _RWSTD_CONST_CAST (const void*,2 _RW::__rw_allocate (__n)));#endif // _RWSTD_ALLOCATOR }#ifdef _RWSTD_ALLOCATOR E void deallocate (const_pointer __p, size_type __n /* elements */)#else@ void deallocate (const void* __p, size_type __n /* bytes */)#endif // _RWSTD_ALLOCATOR {E _RW::__rw_deallocate (_RWSTD_CONST_CAST (_TypeT*, __p), __n); }I //  20.4.1.1, p11 - the largest N for which allocate (N) might succeed/ size_type max_size () const _THROWS (()) { 5 return ~size_type (0) / sizeof (value_type) ?M size_type (size_type (~0) / sizeof (value_type)) : size_type (1); }? void construct (const_pointer __p, const_reference __val) {F _RW::__rw_construct (_RWSTD_CONST_CAST (_TypeT*, __p), __val); } & void destroy (const_pointer __p) {! _RWSTD_ASSERT (0 != __p); __p->~_TypeT (); }};L#endif // !_RWSTD_NO_CLASS_PARTIAL_SPEC && !_RWSTD_NO_EXT_CONST_ALLOCATOR)F// allocator_interface provides all types and typed functions. MemoryC// allocated as raw bytes using the class provided by the Allocator@// template parameter. allocator_interface casts appropriately.//?// Multiple allocator_interface objects can attach to a single A// allocator, thus allowing one allocator to allocate all storage>// for a container, regardless of how many types are involved.//>// The only real restriction is that pointer and reference areD// hard coded as _TypeT* and _TypeT&. Partial specialization would // get around this.//#ifndef _RWSTD_ALLOCATOR)template class allocator_interface {public:E typedef _Allocator allocator_type;A typedef _TypeT value_type;> typedef value_type* pointer;D typede f const value_type* const_pointer;@ typedef value_type& reference;F typedef const value_type& const_reference;@ typedef _TYPENAME allocator_type::size_type size_type;F typedef _TYPENAME allocator_type::difference_type difference_type; protected: allocator_type _C_alloc;public:, allocator_interface() _THROWS (()) { }E allocator_interface (const allocator_type &__alloc) _THROWS (()) : _C_alloc (__alloc) { }! operator allocator_type& () { return _C_alloc; }+ pointer address (reference __x) const { // lwg issue 3500 return _RWSTD_REINTERPRET_CAST (pointer,: &_RWSTD_REINTERPRET_CAST (char&, __x)); } 7 const_pointer address (const_reference __x) const { // lwg issue 3500 return _RWSTD_REINTERPRET_CAST (pointer,@ &_RWSTD_REINTERPRET_CAST (const char&, __x));  }" size_type max_size () const { : return _C_alloc.max_size () / sizeof (value_type); }; pointer allocate (size_type __n, const void* __p = 0) {K return (pointer)_C_alloc.allocate (__n * sizeof (value_type), __p); }2 void deallocate (pointer __p, size_type __n) {' _C_alloc.deallocate (__p, __n); }9 void construct (pointer __p, const_reference __val) {( _RW::__rw_construct(__p, __val); }& void destroy (pointer __p) const {! _RWSTD_ASSERT (0 != __p); __p->~_TypeT (); }};_RWSTD_SPECIALIZED_CLASS1class allocator_interface, void> {public:+ typedef allocator allocator_type;$ typedef void* pointer;0 typedef const void* const_pointer; ' typedef void value_type; protected: allocator_type _C_alloc;public:+ allocator_interface () _THROWS (()) { }C allocator_interface (const allocator& __rhs) _THROWS (()) : _C_alloc (__rhs) { }};Atemplate inline bool8operator== (const allocator_interface<_TypeT, _TypeU>&, D const allocator_interface<_TypeV, _TypeW>&) _THROWS (()){ return true;}#endif // _RWSTD_ALLOCATOR%template inline boolMoperator== (const allocator<_TypeT>&, const allocator<_TypeU>&) _THROWS (()){ return true;}#ifndef _RWSTD_NO_NAMESPACE%template inline bool)operator!= (const allocator<_TypeT>& __x,7 const allocator<_TypeU>& __y) _THROWS (()){ return !(__x == __y);}#endif // _RWSTD_NO_NAMESPACE // 20.4.2.template class raw_storage_iteratorB : public iterator{ _OutputIterator _C_iter;public:& // for completeness and genericity* typedef _OutputIterator iterator_type; // 20.4.2, p2J _EXPLICIT raw_storage_iterator (iterator_type __x) : _C_iter (__x) { } // 20.4.2, p3( raw_storage_iterator& operator* () { return *this; } // 20.4.2, p4; raw_storage_iterator& operator= (const _TypeT& __rhs) {+ ::new (&(*_C_iter)) _TypeT (__rhs); return *this; } // 20.4.2, p6) raw_storage_iterator& operator++ () { ++_C_iter; return *this; } // 20.4.2, p7+ raw_storage_iterator operator++ (int) {+ raw_storage_iterator __tmp = *this; ++*this; return __tmp; }};} // namespace std_RWSTD_NAMESPACE (__rw) { D// __rw_indestructible specializations should be objects with staticI// storage duration that must "survive" all other static objects and that-// do not need to be destroyed; this is a PODtemplate class __rw_indestructible{ union {O  long double _C_pad; // guarantee suitable alignmentO char _C_data [sizeof (_TypeT)]; // data to back _TypeT up with  };public:) typedef _TypeT value_type;( typedef value_type& reference;. typedef const value_type& const_reference;& typedef value_type* pointer;, typedef const value_type* const_pointer;= // no ctor to allow static POD initialization (3.6.2, p1); // allow this to be used as a an obejct of another type operator reference () {= return _RWSTD_REINTERPRET_CAST (reference, *_C_data); }' operator const_reference () const {C return _RWSTD_REINTERPRET_CAST (const_reference, *_C_data); }( // calls a conversion operator above pointer operator& () {C // deprecated C-style cast used to make SunPro 5.0/T9 happy9 // return &_RWSTD_STATIC_CAST (reference, *this);! return &(reference)*this; } ( // calls a conversion operator above& const_pointer operator& () const {C // deprecated C-style cast used to make SunPro 5.0/T9 happy? // return &_RWSTD_STATIC_CAST (const_reference, *this);' return &(const_reference)*this; }};8// [de]allocates a previously allocated temporary bufferG// the constant _RWSTD_TMPBUF_SIZE controls the size of a static buffer?// if request for area larger than _RWSTD_TMPBUF_SIZE comes in,F// space is allocated dynamically, otherwise the static buffer is used+// return value meaningful only if __n != 0._RWSTD_EXPORT _STD::pair3__rw_reallocate_temp_buffer (void*, _RWSTD_SIZE_T);} // namespace __rw_RWSTD_NAMESPACE (std) { K// 20.4.3 only specifies a get_temporary_buffer<>() that takes a ptrdiff_t.N// We overload on all types so that signed integral types other than ptrdiff_tG// can be used. This is important in getting algorithms to compile withK// user-defined iterator s (not derived from iterator<...>) whose difference*// type is something other than ptrdiff_t.E// having this overload is important in some cases for compilers thatJ// do not support partial class specialization (and where as a consequence%// iterator_traits<> isn't available)(template Minline pair<_TypeT*, _Distance> get_temporary_buffer (_Distance __n, _TypeT*){' pair __pair =D _RW::__rw_reallocate_temp_buffer (0, __n *  sizeof (_TypeT));A return make_pair (_RWSTD_STATIC_CAST (_TypeT*, __pair.first),C _Distance (__pair.second / sizeof (_TypeT)));})#ifndef _RWSTD_NO_TEMPLATE_ON_RETURN_TYPE // 20.4.3, p1template &inline pair<_TypeT*, _RWSTD_PTRDIFF_T>+get_temporary_buffer (_RWSTD_PTRDIFF_T __n){2 return get_temporary_buffer (__n, (_TypeT*)0);}-#endif // _RWSTD_NO_TEMPLATE_ON_RETURN_TYPE // 20.4.3, p3template 1inline void return_temporary_buffer (_TypeT *__p){. _RW::__rw_reallocate_temp_buffer (__p, 0);}} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif"#endif // _RWSTD_MEMORY_INCLUDEDww"m7Ԧ#ifndef __MESSAGES_HXX#define __MESSAGES_HXX//// B// Copyright 2003, 2004 Hewlett-Packard Development Company, L.P.//F// Confidential computer software. Valid license from HP required forF// possession, use or copying. Consistent with FAR 12.211 and 12.212,F// Commercial Computer Software, Computer Software Documentation, andK// Technical Data for Commercial Items are licensed to the U.S. Government/// under vendor's standard commercial license.//#////++#// FACILITY: DEC C++ Class Library//+// SUBSYSTEM: Internationalizable messages//// MODULE: messages//// INFORMATION HIDDEN://J// Data structure required to represent a set of messages on any supported // platform.//// MODULE DESCRIPTION://G// This module implements the representation of objects of the MessagesH// class, which is an abstraction of an internationalizable message file// or message catalog.//// DESIGN ISSUES://K// Some data (the file$name and the default location of the message catalog)K// are only used on ULTRIX, although for portability values are required on3// VMS too. (NULL is an adequate value for these.)//J// The message set number is originally from ULTRIX, but is used on VMS asG// a "base" message id to which the message number (a small integer) is4// added (after shifting it over the severity bits).////--////// INCLUDE FILES////#include extern "C"{#include #include #include }#pragma __environment save)#pragma __environment cxx_header_defaults//// // LINKAGE////'#if defined(__VMS) && defined(__DECCXX)*# pragma __extern_model __relaxed_refdef4# pragma __extern_prefix __CXXL_PLAIN_FUNC_LINKAGE# if defined __VAX## pragma __nomember_alignment# else!# pragma __member_alignment # endif#endif////// STATIC DATA////9extern int cxxl_messages_print_cerr(const &char *msg_arg);>extern int cxxl_messages_print_cerr_clog(const char *msg_arg); class Messages//++// CLASS DESCRIPTION://K// Messages is an abstraction of a message file, which associates a message// number with a text string.// // DESIGN://K// cxxl_filename: Points to a copy of the message file name string that was!// passed to the constructor.H// NULL: ok if a platform (e.g. VMS) doesn't open a file at runtime.0// (However, a value must explicitly be given.) '//K// cxxl_default_file_location: Points to a copy of the default message fileK// pathname (a valid value for the NLSPATH environment variable) string*// that was passed to the constructor.D// NULL: ok if a platform (e.g. VMS) doesn't need open a file atC// runtime. If the platform does (e.g. ULTRIX), and this is NULL,B// then there is one less place to check (e.g. NLSPATH had better // point to where the file is).//F// cxxl_set: The default message set number passed to (the constructor.F// 0: None was provided; a default set or a set passed to the text// function is to be used.//?// cxxl_buffer: Pointer to dynamically-allocated message bufferC// NULL: ok if a platform (e.g. VMS) doesn't need to explicitly// allocate a message buffer////--{private:'#if defined(__VMS) && defined(__DECCXX)4# pragma __extern_prefix __CXXL_PLAIN_DATA_LINKAGE#endif6 char *cxxl_filename; // Copy of message file name; int cxxl_set; // M)essage set number (0 = default set)N char *cxxl_default_file_location; // Copy of default message file location/ char *cxxl_buffer; // Message text bufferB int cxxl_buffer_len; // Message text buffer length (in chars)'#if defined(__VMS) && defined(__DECCXX)4# pragma __extern_prefix __CXXL_PLAIN_FUNC_LINKAGE#endifpublic:7 Messages(const char *filename_arg, int set_arg = 0,? const char *default_file_location_arg = (const char *)(NULL)); ~Messages();@ const char *text(int msg_arg, const char *fallback_text_arg, int set_arg = 0);};#pragma __environment restore#endif// End of messages.hxxww censed to the U.S. Government/** under vendor's standard commercial license.***/#ifndef __MUTEX_HXX#include #endifww ,m7Ԧ#ifndef __CXXL_MUTEX_HXX#define __CXXL_MUTEX_HXXL/*************************************************************************** * B * Copyright 2003, 2004 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to th-e U.S. Government/ * under vendor's standard commercial license. *N ****************************************************************************///++#// FACILITY: DEC C++ Class Library//!// SUBSYSTEM: The Mutex package.//2// MODULE: Include file for the Mutex subpackage.//// MODULE DESCRIPTION:////// DESIGN ISSUES:////-- //++// INCLUDE FILES//--#include #pragma __environment save)#pragma __environment cxx_header_defaultsclass .InternalMutex;//@// Publicly visible Mutex class. Make sure no inlining is done.// class Mutex { public:'#if defined(__VMS) && defined(__DECCXX)4# pragma __extern_prefix __CXXL_PLAIN_FUNC_LINKAGE#endif Mutex(); ~Mutex(); void lock(); void unlock();6 // Return 1 if the mutex got locked, 0 otherwise. int tryLock(); private: InternalMutex *ptr;2 // Disallow assignment and copy constructors.* Mutex & operator=(const Mutex & rhs); Mutex(const Mutex &);};#pragma __environment restore#endif /* __CXXL_MUTEX_HXX */ww0m7Ԧ /* Edison Design Group, 1992. *//*@new -- Include file for C++ default operator new (see ARM 12.5).*//*G Note: to facilitate header file processing on OpenVMS and Digital UNIXH and must be identical. Changes to one of these headers must be applied to the other.*/#ifndef __NEW_LOADED#define __NEW_LOADED 1//// B// Copyright 2003, 2007 Hewlett-Packard Development Company, L.P.//F// Confidential computer software. Valid license from H1P required forF// possession, use or copying. Consistent with FAR 12.211 and 12.212,F// Commercial Computer Software, Computer Software Documentation, andK// Technical Data for Commercial Items are licensed to the U.S. Government/// under vendor's standard commercial license.////#include #ifdef __PRAGMA_ENVIRONMENT# pragma __environment __save.# pragma __environment __cxx_header_defaults#endif#ifdef __CLASS_LIBRARY_BUILD #ifdef __VMS!# pragma __ext2ern_prefix __save"# pragma __extern_prefix "decc$"#endif-extern void (*set_new_handler (void(*)()))();8inline void* operator new(size_t, void* p) { return p; } #ifdef __VMS$# pragma __extern_prefix __restore#endif#else // __CLASS_LIBRARY_BUILD#include E#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save'#pragma __extern_prefix _EXTERN_PREFIX #endifnamespace std {A/* This lets users disable the EDG s3upplied exception classes. */"#ifndef __NO_EDG_EXCEPTION_CLASSES$class bad_alloc : public exception {public: bad_alloc() _THROWS (());- bad_alloc(const bad_alloc&) _THROWS (());8 bad_alloc& operator=(const bad_alloc&) _THROWS (());& virtual ~bad_alloc() _THROWS (());2 virtual const char* what() const _THROWS (());};.#endif /* ifndef __NO_EDG_EXCEPTION_CLASSES */struct nothrow_t { };G// Declaration of object nothrow to permit the use of the placement new// s4yntax: new (nothrow) T;G// according to 18.4 [lib.support.dynamic] the nothrow object must have// external linkageextern const nothrow_t nothrow;}H#if defined(__VMS) && defined(__DECCXX) && (__INITIAL_POINTER_SIZE != 0)# pragma pointer_size save%# if (__INITIAL_POINTER_SIZE == 64)# pragma pointer_size long'# elif (__INITIAL_POINTER_SIZE == 32)# pragma pointer_size short # endif#endif/* Array new.*/Y#if defined(__GLOBAL_ARRAY_NEW) && !define5d(__STD_MS) // tied to -global_array_new switch4void *operator new[](size_t) throw (std::bad_alloc);#endif3#if defined(__DECCXX) && !defined(__DECFIXCXXC6676)/* Array delete.*/Y#if defined(__GLOBAL_ARRAY_NEW) && !defined(__STD_MS) // tied to -global_array_new switch+void operator delete[](void*) _THROWS (());#endif#endif/* Nothrow version of operator new.*/?void *operator new(size_t, const std::nothrow_t&) _THROWS (());3#if defined(__DECCXX) && !defined(__DECFIXCXXL10624)/*#Nothrow version of operator delete.*/3#if defined(__DECCXX) && !defined(__DECFIXCXXL1675)#ifndef __EXCEPTIONS#pragma message save%#pragma message disable nouseplacedel#endif#endifDvoid operator delete(void* ptr, const std::nothrow_t&) _THROWS (());3#if defined(__DECCXX) && !defined(__DECFIXCXXL1675)#ifndef __EXCEPTIONS#pragma message restore#endif#endif#endif/*Nothrow version of array new.*/Y#if defined(__GLOBAL_ARRAY_NEW) && !defined(__STD_MS) // tied 7to -global_array_new switchvoid *operator new[](size_t,9 const std::nothrow_t&) _THROWS (());#endif3#if defined(__DECCXX) && !defined(__DECFIXCXXL1024)/* Nothrow version of array delete.*/Y#if defined(__GLOBAL_ARRAY_NEW) && !defined(__STD_MS) // tied to -global_array_new switch3#if defined(__DECCXX) && !defined(__DECFIXCXXL1675)#ifndef __EXCEPTIONS#pragma message save%#pragma message disable nouseplacedel#endif#endifFvoid operator delete[](void* ptr8, const std::nothrow_t&) _THROWS (());3#if defined(__DECCXX) && !defined(__DECFIXCXXL1675)#ifndef __EXCEPTIONS#pragma message restore#endif#endif#endif#endifI#if defined(__VMS) && defined(__DECCXX) && (__INITIAL_POINTER_SIZE != 0)# pragma pointer_size restore#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#ifndef __STDNEW//// Not compiled with -stdnew // #ifdef __VMS#ifndef __9MODEL_ANSI!# pragma __extern_prefix __save"# pragma __extern_prefix "decc$"1 extern void (*set_new_handler (void(*)()))();$# pragma __extern_prefix __restore#else1 extern void (*set_new_handler (void(*)()))();#endif //__MODEL_ANSI0#if defined(__DECCXX) && (__VMS_VER >= 70000000)3 extern void (*set_new_handler32 (void(*)()))();3 extern void (*set_new_handler64 (void(*)()))();#endif#else1 extern void (*set_new_handler (void(*)()))();#endif // __VMS8in:line void* operator new(size_t, void* p) { return p; }#elseE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save'#pragma __extern_prefix _EXTERN_PREFIX #endifnamespace std {typedef void (*new_handler)();6new_handler set_new_handler(new_handler) _THROWS (());0#if defined(__DECCXX) && (__VMS_VER >= 70000000)8new_handler set_new_handler32(new_handler) _THROWS (());8new_handler set_new_handler64(new_handler) _THROWS (());#endif;} /* namespace std */H#if defined(__VMS) && defined(__DECCXX) && (__INITIAL_POINTER_SIZE != 0)# pragma pointer_size save%# if (__INITIAL_POINTER_SIZE == 64)# pragma pointer_size long'# elif (__INITIAL_POINTER_SIZE == 32)# pragma pointer_size short # endif#endif/*Normal operator new routine.*/6void *operator new(size_t) _THROWS ((std::bad_alloc));3#if defined(__DECCXX) && !defined(__DECFIXCXXC6676)/*Normal operator delete routine.*/ #ifndef <__VMS-void operator delete(void* ptr) _THROWS (());#else#ifndef __MODEL_ANSI!# pragma __extern_prefix __save"# pragma __extern_prefix "decc$"-void operator delete(void* ptr) _THROWS (());$# pragma __extern_prefix __restore#else-void operator delete(void* ptr) _THROWS (());#endif // __MODEL_ANSI#endif // __VMS#endif // __DECCXX .../*BPlacement new. This was not in the ARM, but it is now standard inib.new.delete.placement].*//void *operator new(size_t, voi=d*) _THROWS (());/*Placement delete.*/#ifdef __EXCEPTIONS0void operator delete(void*, void*) _THROWS (());#endif /*Placement array new.*/Y#if defined(__GLOBAL_ARRAY_NEW) && !defined(__STD_MS) // tied to -global_array_new switch1void *operator new[](size_t, void*) _THROWS (());#endif/*Placement array delete.*/Y#if defined(__GLOBAL_ARRAY_NEW) && !defined(__STD_MS) // tied to -global_array_new switch#ifdef __EXCEPTIONS2void operator delete[](void*, void*) _>THROWS (());#endif #endifH#if defined(__VMS) && defined(__DECCXX) && (__INITIAL_POINTER_SIZE != 0)# pragma pointer_size restore#endif//-// implementation-defined default new handler//=void __cxxl_default_new_handler() _THROWS ((std::bad_alloc));E#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#endif // __NOSTDNEW#endif // __CLASS_LIBRARY_BUILD#ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __restore#endif:#endif /* __NEW_LOADED */ww@m7Ԧ#ifndef __NEW_LOADEDM/******************************************************************************** - C++ definitions**M******************************************************************************* Header is nonstandardM******************************************************************************* >** Copyright 2003 Compaq Information Technologies Group, L.P.**C** Compaq and the Compaq logo are trademarks of Compaq Information@** Tech Anologies Group, L.P. in the U.S. and/or other countries.**J** Confidential computer software. Valid license from Compaq required forF** possession, use or copying. Consistent with FAR 12.211 and 12.212,F** Commercial Computer Software, Computer Software Documentation, andK** Technical Data for Commercial Items are licensed to the U.S. Government/** under vendor's standard commercial license.**N*******************************************************************************/#include #endif /* __NEW_LOADED */wwC}nm7Ԧ /* Edison Design Group, 1992. *//*@new -- Include file for C++ default operator new (see ARM 12.5).*//*G Note: to facilitate header file processing on OpenVMS and Digital UNIXH and must be identical. Changes to one of these headers must be applied to the other.*/#ifndef __NEW_LOADED#define __NEW_LOADED 1//// B// Copyright 2003, 2007 Hewlett-Packard Development Company, L.P.//F// Confidential computer software. Valid license from HDP required forF// possession, use or copying. Consistent with FAR 12.211 and 12.212,F// Commercial Computer Software, Computer Software Documentation, andK// Technical Data for Commercial Items are licensed to the U.S. Government/// under vendor's standard commercial license.////#include #ifdef __PRAGMA_ENVIRONMENT# pragma __environment __save.# pragma __environment __cxx_header_defaults#endif#ifdef __CLASS_LIBRARY_BUILD #ifdef __VMS!# pragma __extEern_prefix __save"# pragma __extern_prefix "decc$"#endif-extern void (*set_new_handler (void(*)()))();8inline void* operator new(size_t, void* p) { return p; } #ifdef __VMS$# pragma __extern_prefix __restore#endif#else // __CLASS_LIBRARY_BUILD#include E#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save'#pragma __extern_prefix _EXTERN_PREFIX #endifnamespace std {A/* This lets users disable the EDG sFupplied exception classes. */"#ifndef __NO_EDG_EXCEPTION_CLASSES$class bad_alloc : public exception {public: bad_alloc() _THROWS (());- bad_alloc(const bad_alloc&) _THROWS (());8 bad_alloc& operator=(const bad_alloc&) _THROWS (());& virtual ~bad_alloc() _THROWS (());2 virtual const char* what() const _THROWS (());};.#endif /* ifndef __NO_EDG_EXCEPTION_CLASSES */struct nothrow_t { };G// Declaration of object nothrow to permit the use of the placement new// sGyntax: new (nothrow) T;G// according to 18.4 [lib.support.dynamic] the nothrow object must have// external linkageextern const nothrow_t nothrow;}H#if defined(__VMS) && defined(__DECCXX) && (__INITIAL_POINTER_SIZE != 0)# pragma pointer_size save%# if (__INITIAL_POINTER_SIZE == 64)# pragma pointer_size long'# elif (__INITIAL_POINTER_SIZE == 32)# pragma pointer_size short # endif#endif/* Array new.*/Y#if defined(__GLOBAL_ARRAY_NEW) && !defineHd(__STD_MS) // tied to -global_array_new switch4void *operator new[](size_t) throw (std::bad_alloc);#endif3#if defined(__DECCXX) && !defined(__DECFIXCXXC6676)/* Array delete.*/Y#if defined(__GLOBAL_ARRAY_NEW) && !defined(__STD_MS) // tied to -global_array_new switch+void operator delete[](void*) _THROWS (());#endif#endif/* Nothrow version of operator new.*/?void *operator new(size_t, const std::nothrow_t&) _THROWS (());3#if defined(__DECCXX) && !defined(__DECFIXCXXL10I24)/*#Nothrow version of operator delete.*/3#if defined(__DECCXX) && !defined(__DECFIXCXXL1675)#ifndef __EXCEPTIONS#pragma message save%#pragma message disable nouseplacedel#endif#endifDvoid operator delete(void* ptr, const std::nothrow_t&) _THROWS (());3#if defined(__DECCXX) && !defined(__DECFIXCXXL1675)#ifndef __EXCEPTIONS#pragma message restore#endif#endif#endif/*Nothrow version of array new.*/Y#if defined(__GLOBAL_ARRAY_NEW) && !defined(__STD_MS) // tied Jto -global_array_new switchvoid *operator new[](size_t,9 const std::nothrow_t&) _THROWS (());#endif3#if defined(__DECCXX) && !defined(__DECFIXCXXL1024)/* Nothrow version of array delete.*/Y#if defined(__GLOBAL_ARRAY_NEW) && !defined(__STD_MS) // tied to -global_array_new switch3#if defined(__DECCXX) && !defined(__DECFIXCXXL1675)#ifndef __EXCEPTIONS#pragma message save%#pragma message disable nouseplacedel#endif#endifFvoid operator delete[](void* ptrK, const std::nothrow_t&) _THROWS (());3#if defined(__DECCXX) && !defined(__DECFIXCXXL1675)#ifndef __EXCEPTIONS#pragma message restore#endif#endif#endif#endifI#if defined(__VMS) && defined(__DECCXX) && (__INITIAL_POINTER_SIZE != 0)# pragma pointer_size restore#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#ifndef __STDNEW//// Not compiled with -stdnew // #ifdef __VMS#ifndef __LMODEL_ANSI!# pragma __extern_prefix __save"# pragma __extern_prefix "decc$"1 extern void (*set_new_handler (void(*)()))();$# pragma __extern_prefix __restore#else1 extern void (*set_new_handler (void(*)()))();#endif //__MODEL_ANSI0#if defined(__DECCXX) && (__VMS_VER >= 70000000)3 extern void (*set_new_handler32 (void(*)()))();3 extern void (*set_new_handler64 (void(*)()))();#endif#else1 extern void (*set_new_handler (void(*)()))();#endif // __VMS8inMline void* operator new(size_t, void* p) { return p; }#elseE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save'#pragma __extern_prefix _EXTERN_PREFIX #endifnamespace std {typedef void (*new_handler)();6new_handler set_new_handler(new_handler) _THROWS (());0#if defined(__DECCXX) && (__VMS_VER >= 70000000)8new_handler set_new_handler32(new_handler) _THROWS (());8new_handler set_new_handler64(new_handler) _THROWS (());#endifN} /* namespace std */H#if defined(__VMS) && defined(__DECCXX) && (__INITIAL_POINTER_SIZE != 0)# pragma pointer_size save%# if (__INITIAL_POINTER_SIZE == 64)# pragma pointer_size long'# elif (__INITIAL_POINTER_SIZE == 32)# pragma pointer_size short # endif#endif/*Normal operator new routine.*/6void *operator new(size_t) _THROWS ((std::bad_alloc));3#if defined(__DECCXX) && !defined(__DECFIXCXXC6676)/*Normal operator delete routine.*/ #ifndef O__VMS-void operator delete(void* ptr) _THROWS (());#else#ifndef __MODEL_ANSI!# pragma __extern_prefix __save"# pragma __extern_prefix "decc$"-void operator delete(void* ptr) _THROWS (());$# pragma __extern_prefix __restore#else-void operator delete(void* ptr) _THROWS (());#endif // __MODEL_ANSI#endif // __VMS#endif // __DECCXX .../*BPlacement new. This was not in the ARM, but it is now standard inib.new.delete.placement].*//void *operator new(size_t, voiPd*) _THROWS (());/*Placement delete.*/#ifdef __EXCEPTIONS0void operator delete(void*, void*) _THROWS (());#endif /*Placement array new.*/Y#if defined(__GLOBAL_ARRAY_NEW) && !defined(__STD_MS) // tied to -global_array_new switch1void *operator new[](size_t, void*) _THROWS (());#endif/*Placement array delete.*/Y#if defined(__GLOBAL_ARRAY_NEW) && !defined(__STD_MS) // tied to -global_array_new switch#ifdef __EXCEPTIONS2void operator delete[](void*, void*) _QTHROWS (());#endif #endifH#if defined(__VMS) && defined(__DECCXX) && (__INITIAL_POINTER_SIZE != 0)# pragma pointer_size restore#endif//-// implementation-defined default new handler//=void __cxxl_default_new_handler() _THROWS ((std::bad_alloc));E#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#endif // __NOSTDNEW#endif // __CLASS_LIBRARY_BUILD#ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __restore#endif:#endif /* __NEW_LOADED */wwSm7Ԧ#ifndef __NEWEXT_HXX#define __NEWEXT_HXX 1//// <// Copyright 2006 Hewlett-Packard Development Company, L.P.//F// Confidential computer software. Valid license from HP required forF// possession, use or copying. Consistent with FAR 12.211 and 12.212,F// Commercial Computer Software, Computer Software Documentation, andK// Technical Data for Commercial Items are licensed to the U.S. Government/// under vendor's standard commercial license.////#incluTde #if __INITIAL_POINTER_SIZE namespace __deccxx {# enum addr_32_space { addr_32 };# enum addr_64_space { addr_64 }; } // namespace __deccxx using namespace __deccxx; # pragma __pointer_size __save # pragma __pointer_size __longC inline void *operator new (size_t __s, __deccxx::addr_64_space,M int __pointer_size = __INITIAL_POINTER_SIZE) {9 return (__pointer_size == 64) ? _malloc64(__s) : 0; }M U inline void operator delete (void* __ptr, __deccxx::addr_64_space, int) { if (__ptr) free(__ptr); }#if defined(__GLOBAL_ARRAY_NEW)L inline void *operator new[] (size_t __s, __deccxx::addr_64_space __addr,O int __pointer_size = __INITIAL_POINTER_SIZE) {8 return operator new (__s, __addr, __pointer_size); }O inline void operator delete[] (void* __ptr, __deccxx::addr_64_space, int) { if (__ptr) free(__ptr); }#eVndif!# pragma __pointer_size __shortE inline void *operator new (size_t __s, __deccxx::addr_32_space) { return _malloc32(__s); }H inline void operator delete (void* __ptr, __deccxx::addr_32_space) { if (__ptr) free(__ptr); }#if defined(__GLOBAL_ARRAY_NEW)N inline void *operator new[] (size_t __s, __deccxx::addr_32_space __addr) {( return operator new (__s, __addr); }J inline void operator delete[] (void* __ptr, __deccxx::addr_32_ space) { if (__ptr) free(__ptr); }#endif## pragma __pointer_size __restore##endif /* __INITIAL_POINTER_SIZE */#endif /* __NEWEXT_HXX */ww p7ԦL/*************************************************************************** *@ * _time_put.h - definition of the std::time_put class templates *E * This is an internal header file used to implement the C++ StandardD? * Library. It should never be #included directly by a program.N *4 * $Id: //stdlib/3.0-rel/include/loc/_time_put.h#4 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard DevelopYxm7Ԧ// -*- C++ -*-L/*************************************************************************** *= * numeric - Declarations for the Standard Library algorithms *, * $Id: //stdlib/3.0-rel/include/numeric#2 $ *L *************************************************************************** * > * Copyright 2002 Compaq Information Technologies Group, L.P. *C * Compaq and the Compaq logo are trademarks of Compaq Information@ * Technologies Group, L.P. in the U.S. and/o Zr other countries. *J * Confidential computer software. Valid license from Compaq required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** * * Copyright (c) 1994 * Hewlett-Packard Compa [ny *E * Permission to use, copy, modify, distribute and sell this softwareG * and its documentation for any purpose is hereby granted without fee,D * provided that the above copyright notice appear in all copies andD * that both that copyright notice and this permission notice appearA * in supporting documentation. Hewlett-Packard Company makes noA * representations about the suitability of this software for anyH * purpose. It is provided "as is" without express or implied warranty. * \L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance ]with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Softw^are clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/#ifndef _RWSTD_NUMERIC_INCLUDED#define _RWSTD_NUMERIC_INCLUDED!#include #include #if defi_ned(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) { // 26.4.1 - Accumulate)template Linline _TypeT accumulate (_InputIter __first, _InputIter __last, _TypeT __n){( for (; _`_first != __last; ++__first) __n += *__first; return __n;}Atemplate @inline _TypeT accumulate (_InputIter __first, _InputIter __last,> _TypeT __n, _BinaryOperation __oper){( for (; __first != __last; ++__first)% __n = __oper (__n, *__first); return __n;}// 26.4.2 - Inner product=template Ginline _TypeT inner_praoduct (_InputIter1 __first1, _InputIter1 __last1,@ _InputIter2 __first2, _TypeT __n) {7 for (; __first1 != __last1; ++__first1, ++__first2)% __n += *__first1 * *__first2; return __n;}0template inline _TypeT9inner_product (_InputIter1 __first1, _InputIter1 __last1,0 _InputIter2 __first2, _TypeT __n,D b _BinaryOperation1 __oper1, _BinaryOperation2 __oper2){8 for (; __first1 != __last1; ++__first1, ++__first2) < __n = __oper1 (__n, __oper2 (*__first1, *__first2)); return __n;}<template inline _OutputIterH__partial_sum (_InputIter __first, _InputIter __last, _OutputIter __res, _TypeT*){ _TypeT __value = *__first;! while (++__first != __last) {% __value = __value + *__first; c *++__res = __value; } return ++__res;}// 26.4.3 - Partial sum.template inline _OutputIterFpartial_sum (_InputIter __first, _InputIter __last, _OutputIter __res){ return __first == __last% ? __res : (*__res = *__first,9 __partial_sum (__first, __last, __res,C _RWSTD_VALUE_TYPE (_InputIter)));}.template Hinline _OutputIter __partial_sum (_InputIter __first, _InputIter __last,= _OutputIter __res, _TypeT*,: _BinaryOperation __oper){ _TypeT __value = *__first;! while (++__first != __last) {, __value = __oper(__value, *__first); *++__res = __value; } return ++__res;}Ftemplate Finline _OutputIter partieal_sum (_InputIter __first, _InputIter __last,K _OutputIter __res, _BinaryOperation __oper){ return __first == __last ?# __res : (*__res = *__first,7 __partial_sum (__first, __last, __res,H _RWSTD_VALUE_TYPE (_InputIter),__oper));}<template inline _OutputIterP__adjacent_difference (_InputIter __first, _InputIter __last, _OutputIter __res, f _TypeT*){ _TypeT __value = *__first;! while (++__first != __last) { _TypeT __tmp = *__first;# *++__res = __tmp - __value; __value = __tmp; } return ++__res;}// 26.4.4 - Adjacent difference.template inline _OutputIterOadjacent_difference (_InputIter __first, _InputIter __last, _OutputIter __res){ return __first == __last ? __res : (*__res = *__first,g8 __adjacent_difference(__first, __last, __res,B _RWSTD_VALUE_TYPE (_InputIter)));}.template inline _OutputIter>__adjacent_difference (_InputIter __first, _InputIter __last, K _OutputIter __res, _TypeT*, _BinaryOperation __oper){ _TypeT __value = *__first;! while (++__first != __last) { _TypeT __tmp = *__first;* h *++__res = __oper(__tmp, __value); __value = __tmp; } return ++__res;}Ftemplate inline _OutputIter;adjacent_difference (_InputIter __first, _InputIter __last,@ _OutputIter __res, _BinaryOperation __oper){ return __first == __last ? __res : (*__res = *__first,8 __adjacent_difference(__first, __last, __res,J _RWSTD_VALUE_TYPE (_InputIter), __oper));}} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif##endif // _RWSTD_NUMERIC_INCLUDEDww jm7Ԧ/*** >** Copyright 2003 Compaq Information Technologies Group, L.P.**C** Compaq and the Compaq logo are trademarks of Compaq Information@** Technologies Group, L.P. in the U.S. and/or other countries.**J** Confidential computer software. Valid license from Compaq required forF** possession, use or copying. Consistent with FAR 12.211 and 12.212,F** Commercial Computer Software, Computer Software Documentation, andK** Technical Data for Commercial Items are li censed to the U.S. Government/** under vendor's standard commercial license.***/#ifndef __OBJECTION_HXX #ifdef _NT#include #else#include #endif#endifwwl%#m7Ԧ#ifndef __OBJECTION_HXX#define __OBJECTION_HXX//// B// Copyright 2003, 2004 Hewlett-Packard Development Company, L.P.//F// Confidential computer software. Valid license from HP required forF// possession, use or copying. Consistent with FAR 12.211 and 12.212,F// Commercial Computer Software, Computer Software Documentation, andK// Technical Data for Commercial Items are licensed to the U.S. Government/// under vendor's standard commercial license.//"m////++#// FACILITY: DEC C++ Class Library//8// SUBSYSTEM: Objection (primordial exception handling)//// MODULE: objection//// INFORMATION HIDDEN://"// Representation of an Objection.+// Algorithms for operations on Objections.//// MODULE DESCRIPTION://F// This module implements the representation of Objections and defines'// the functions which operate on them.////--////// INCLUDE FILES////#include extern "C"{#include!n }#pragma __environment save)#pragma __environment cxx_header_defaults//// // LINKAGE////'#if defined(__VMS) && defined(__DECCXX)*# pragma __extern_model __relaxed_refdef4# pragma __extern_prefix __CXXL_PLAIN_FUNC_LINKAGE# if defined __VAX## pragma __nomember_alignment# else!# pragma __member_alignment # endif#endif////// TYPE DEFINITIONS////+typedef int Objection_action(const char *); class Objection//o++// CLASS DESCRIPTION://F// An Objection is information about a potential error condition whichD// a program can encounter. An Objection can contain a pointer to aK// default error handling procedure and a current error handling procedure.J// After raising an objection, depending on the error handling procedures,// execution may resume.//--{private:F Objection_action *action; // Pointer to the current error handlerM Objection_action *default_action; // Pointer to the depfault error handler: int ignore_objection; // non-0: Ignore the objection;) // do not invoke any error handlers.' // 0: Do not ignore the objection; // invoke error handlers.public: Objection();, Objection(Objection_action *new_action);# int raise(const char *msg ="");< Objection_action *appoint(Objection_action *new_action); Objection_action *appoint(); Objection_action *ignore();}; #pragma __environment restore#endif// End of objection.hxxwwrn7Ԧ// -*- C++ -*-L/*************************************************************************** *B * ostream - Declarations for the Standard Library ostream classes *, * $Id: //stdlib/3.0-rel/include/ostream#4 $ *L *************************************************************************** * > * Copyright 2002 Compaq Information Technologies Group, L.P. *C * Compaq and the Compaq logo are trademarks of Compaq Information@ * Technologies Group, L.P. in the U.S. a snd/or other countries. *J * Confidential computer software. Valid license from Compaq required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Softwa tre, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any othe ur copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rightsv at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/#ifndef _RWSTD_OSTREAM_INCLUDED#define _RWSTD_OSTREAM_INCLUDED#include #ifndef __USE_STD_IOSTREAM{#error "cannot include ostream -- define __USE_STD_IOSTREAM to override default - see section 7.1.2 of the C++ Using Guide"#else#include <wios>#include '#ifndef _RWSTD_NO_REDUNDANT_DEFINITIONS!# include # include +#endif // _RWSTD_NO_REDUNDANT_DEFINITIONS #include #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefixx _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (__rw) { @// helper - implements insertion of arithmetic and pointer types9template %_STD::basic_ostream<_CharT, _Traits>&A__rw_insert (_STD::basic_ostream<_CharT, _Traits>&, _NativeType);4// helper - implements insertion of character strigs5template%_STD::basic_ostream<_CharT, _Traits>&D__rw_insert (_STD::basic_ostream<_CharT, _Traits>&, const _SytringT*,1 _STD::streamsize, _STD::streamsize);} // namespace __rw_RWSTD_NAMESPACE (std) { %template>class basic_ostream: virtual public basic_ios<_CharT, _Traits>{public:9 typedef _CharT char_type;; typedef _Traits traits_type;8 typedef _TYPENAME traits_type::int_type int_type;8 typedef _TYPENAME traits_type::pos_type pos_type;8 typedef _TYPENAME trzaits_type::off_type off_type; 8 typedef basic_ios ios_type; // 27.6.2.2, p1M _EXPLICIT basic_ostream (basic_streambuf *__sb) { this->init (__sb); } // implements sentry ctor basic_ostream& _C_opfx ();. // allow access to ios_base::_C_bufmutex() class sentry; friend class sentry; // 27.6.2.3* class sentry: public _RW::__rw_guard {; sentry (const sentry&); { // not defined; sentry& operator= (const sentry&); // not defined public: _EXPLICIT> sentry (basic_ostream &__strm)L : _RW::__rw_guard (__strm.rdbuf () ? __strm._C_bufmutex () : 0), _C_strm (__strm) {3 _C_ok = _C_strm._C_opfx ().good (); } // 27.6.2.3, p4 ~sentry () {; if ( ( _C_strm.flags () & ios_base::unitbuf, || _C_|strm._C_is_sync ()K && _C_strm._C_is_std ()) // [w]cout, [w]cerr, [w]clog+ && !_UNCAUGHT_EXCEPTION ()9 && -1 == _C_strm.rdbuf ()->pubsync ()) {6 // prevent exceptions from propagating7 _C_strm.setstate (ios_base::badbit, 0); } } operator bool () const { return _C_ok; } private:= basic_ostream& _C_strm; // stream guarded by sentr}y4 bool _C_ok; // is stream okay? };, // 27.6.2.5 - Formatted output functions // 27.6.2.5.3, p1H basic_ostream& operator<< (basic_ostream& (*__pf)(basic_ostream&)) { return (*__pf)(*this); } // 27.6.2.5.3, p2> basic_ostream& operator<< (ios_base& (*__pf)(ios_base&)) {% return (*__pf)(*this), *this; } // 27.6.2.5.3, p4> basic_ostream& operator<< (ios_type& (*__pf)(ios_type&)) {% return (*__pf)(*~this), *this; }( // 27.6.2.5.2 - Arithmetic inserters#ifndef _RWSTD_NO_NATIVE_BOOL+ basic_ostream& operator<<(bool __val) {/ return _RW::__rw_insert (*this, __val); }!#endif // _RWSTD_NO_NATIVE_BOOL& basic_ostream& operator<< (short);6 basic_ostream& operator<< (unsigned short __val) {B return *this << _RWSTD_STATIC_CAST (unsigned long, __val); }$ basic_ostream& operator<< (int);4 basic_ostream& operator<< (unsigned int __val) {B return *this << _RWSTD_STATIC_CAST (unsigned long, __val); }, basic_ostream& operator<< (long __val) {/ return _RW::__rw_insert (*this, __val); }5 basic_ostream& operator<< (unsigned long __val) {/ return _RW::__rw_insert (*this, __val); }- basic_ostream& operator<< (float __val) {; return *this << _RWSTD_STATIC_CAST (double, __val); }. basic_ostream& operator<< (double __val) {/ return _RW::__rw_insert (*this, __val); }3 basic_ostream& operator<< (long double __val) {/ return _RW::__rw_insert (*this, __val); }#ifdef _RWSTD_LONG_LONG // extensionA basic_ostream& operator<< (unsigned _RWSTD_LONG_LONG __val) {/ return _RW::__rw_insert (*this, __val); } // extension8 basic_ostream& operator<< (_RWSTD_LONG_LONG __val) {/ return _RW::__rw_insert (*this, __val); }#endif // _RWSTD_LONG_LONG3 basic_ostream& operator<< (const void *__val) {/ return _RW::__rw_insert (*this, __val); } // extensionI basic_ostream& operator<< (basic_streambuf&); // 27.6.2.6.3, p6 basic_ostream&@ operator<< (basic_streambuf *__sb) {$ return __sb ? *this << *__sbA : (this->setstate (ios_base::badbit), *this); }. // 27.6.2.6 - Unformatted output functions // 27.6.2.6, p2( basic_ostream& put (char_type __c) {@ return _RW::__rw_insert (*this, &__c, 1, 0 /* width */); } // 27.6.2.6, p5C basic_ostream& write (const char_type *__s, streamsize __len) {C return _RW::__rw_insert (*this, __s, __len, 0 /* width */); } // 27.6.2.6, p7 basic_ostream& flush (); // 27.6.2.4 - Seek members // 27.6.2.4, p1 pos_type tellp (); // 27.6.2.4, p2$ basic_ostream& seekp (pos_type); // 27.6.2.4, p47 basic_ostream& seekp (off_type, ios_base::seekdir);% // is `*this' a [w]cout, [w]cerr? bool _C_is_cout () const { return false; } bool _C_is_cerr () const { return false; }7 // is `*this' one of { [w]cout, [w]cerr, [w]clog }? bool _C_is_std () const { return false; } A // pad output with fill chars, return number of chars written# streamsize _C_pad (streamsize);};*#if defined (_MSC_VER) && _MSC_VER <= 1300H// explicit instantiation followed by explicit specialization is illegalI// according to 14.6.4.1, p7 but MSVC allows it (linker errors otherwise))_RWSTD_INSTANTIATE_2 (class _RWSTD_EXPORT? basic_ostream >);#ifndef _RWSTD_NO_WCHAR_T)_RWSTD_INSTANTIATE_2 (class _RWSTD_EXPORTE basic_ostream >);#endif // _RWSTD_NO_WCHAR_T2#endif // defined (_MSC_VER) && _MSC_VER <= 1300%temp late&inline basic_ostream<_CharT, _Traits>&8basic_ostream<_CharT, _Traits>::operator<< (short __val){6 const int __bf = this->flags () & this->basefield;E // make sure negative values format properly in non-decimal basesE // i.e., -1 must format as hex "ffff" when (sizeof (short) == 2),0 // and not, for example, "ffffffff" in ILP324 const long __lval = !__bf || this->dec == __bf ?I long (__val) : long (_RWSTD_STATIC_CAST (unsigned short, __val));, return _RW::__rw_insert (*this, __lval);}%template&inline basic_ostream<_CharT, _Traits>&6basic_ostream<_CharT, _Traits>::operator<< (int __val){6 const int __bf = this->flags () & this->basefield;E // make sure negative values format properly in non-decimal basesG // i.e., -1 must format as hex "ffffffff" when (sizeof (int) == 4),6 // and not, for example "ffffffffffffffff" in LP644 const long __lval = !__bf || this->dec == __bf ?G long (__val) : long (_RWSTD_STATIC_CAST (unsigned int, __val));, return _RW::__rw_insert (*this, __lval);}%templateinline streamsize9basic_ostream<_CharT, _Traits>::_C_pad (streamsize __len){& // note that __len can be negative2 for (streamsize __i = 0; __i < __len; ++__i) {M if (traits_type::eq_int_type (this->rdbuf ()->sputc (this->fill ()), = traits_type::eof ())) { return __i; } } return __len;}} // namespace std_RWSTD_NAMESPACE (__rw) {6// avoid having to bring standard iostreams into scope4_RWSTD_EXPORT extern const void* __rw_std_streams[];} // namespace __rw_RWSTD_NAMESPACE (std) {_RWSTD_SPECIALIZED_FUNCTION inline bool<basic_ostream >::_C_is_cout () const{) // upcast to a virtual base necessaryS return _RWSTD_STATIC_CAST (const ios_base*, this) == _RW::__rw_std_streams [1];}_RWSTD_SPECIALIZED_FUNCTION inline bool<basic_ostream >::_C_is_cerr () const{) // upcast to a virtual base necessaryS return _RWSTD_STATIC_CAST (const ios_base*, this) == _RW::__rw_std_streams [2];}_RWSTD_SPECIALIZED_FUNCTION inline bool<basic_ostream >::_C_is_std () const{) // upcast to a virtual base necessary, return _C_is_cout () || _C_is_cerr ()S || _RWSTD_STATIC_CAST (const ios_base*, this) == _RW::__rw_std_streams [3];}#ifndef _RWSTD_NO_WCHAR_T_RWSTD_SPECIALIZED_FUNCTION inline boolCbasic_ostream >::_C_is_cout () const{) // upcast to a virtual base necessaryS return _RWSTD_STATIC_CAST (const ios_base*, this) == _RW::__rw_std_streams [5];}_RWSTD_SPECIALIZED_FUNCTION inline boolCbasic_ostream >::_C_is_cerr () const{) // upcast to a virtual base necessaryS return _RWSTD_STATIC_CAST (const ios_base*, this) == _RW::__rw_std_streams [6];}_RWSTD_SPECIALIZED_FUNCTION inline boolBbasic_ostream >::_C_is_std () const{) // upcast to a virtual base necessary, return _C_is_cout () || _C_is_cerr ()S || _RWSTD_STATIC_CAST (const ios_base*, this) == _RW::__rw_std_streams [7];}#endif // _RWSTD_NO_WCHAR_T%template&inline basic_ostream<_CharT, _Traits>&(basic_ostream<_CharT, _Traits>::flush (){ if (this->rdbuf ()) {/ _RWSTD_MT_GUARD (this->_C_bufmutex ());- if (-1 == this->rdbuf ()->pubsync ()). this->setstate (ios_base::badbit); } return *this;} %template&inline basic_ostream<_CharT, _Traits>&6basic_ostream<_CharT, _Traits>::seekp (pos_type __pos){( _RWSTD_ASSERT (0 != this->rdbuf ()); if (!this->fail ()) {/ _RWSTD_MT_GUARD (this->_C_bufmutex ());D if (-1 == this->rdbuf ()->pubseekpos (__pos, ios_base::out))B this->setstate (ios_base::failbit); // lwg issue 129 } return *this;}%template&inline basic_ostream<_CharT, _Traits>&Obasic_ostream<_CharT, _Traits>::seekp (off_type __off, ios_base::seekdir __dir){( _RWSTD_ASSERT (0 != this->rdbuf ()); if (!this->fail ()) {/ _RWSTD_MT_GUARD (this->_C_bufmutex ());J if (-1 == this->rdbuf()->pubseekoff (__off, __dir, ios_base::out))B this->setstate (ios_base::failbit); // lwg issue 129 } return *this;}%template9inline _TYPENAME basic_ostream<_CharT, _Traits>::pos_type(basic_ostream<_CharT, _Traits>::tellp (){( _RWSTD_ASSERT (0 != this->rdbuf ()); if (!this->fail ()) {/ _RWSTD_MT_GUARD (this->_C_bufmutex ());K return this->rdbuf()->pubseekoff (0, ios_base::cur, ios_base::out); }$ return pos_type (off_type (-1));}5// 27.6.2.5.4 - Character inserter template functions%template&inline basic_ostream<_CharT, _Traits>&?operator<< (basic_ostream<_CharT, _Traits> &__strm, _CharT __c){B _RW::__rw_insert (__strm, &__c, 1, __strm.width ()).width (0); return __strm;}} // namespace std_RWSTD_NAMESPACE (__rw) { D// explicitly instantiate prior to defining complete specializations?// to prevent bogus MSVC warnings/errors (see, e.g., PR #26611)_RWSTD_INSTANTIATE_1 ( _RWSTD_EXPORT _STD::ostream&- __rw_insert (_STD::ostream&, const char*,4 _STD::streamsize, _STD::streamsize));#ifndef _RWSTD_NO_WCHAR_T_RWSTD_INSTANTIATE_1 (! _RWSTD_EXPORT _STD::wostream&. __rw_insert (_STD::wostream&, const char*,4 _STD::streamsize, _STD::streamsize));_RWSTD_INSTANTIATE_1 (! _RWSTD_EXPORT _STD::wostream&1 __rw_insert (_STD::wostream&, const wchar_t*,4 _STD::streamsize, _STD::streamsize));#endif // _RWSTD_NO_WCHAR_T} // namespace __rw_RWSTD_NAMESPACE (std) { /#ifndef _RWSTD_NO_OVERLOAD_OF_TEMPLATE_FUNCTION%template&inline basic_ostream<_CharT, _Traits>&=operator<< (basic_ostream<_CharT, _Traits> &__strm, char __c){B _RW::__rw_insert (__strm, &__c, 1, __strm.width ()).width (0); return __strm;}##ifndef _RWSTD_NO_FUNC_PARTIAL_SPECtemplate $inline basic_ostream&;operator<< (basic_ostream &__strm, char __c){B _RW::__rw_insert (__strm, &__c, 1, __strm.width ()).width (0); return __strm;}3#else // if defined (_RWSTD_NO_FUNC_PARTIAL_SPEC)/inline basic_ostream >&Foperator<< (basic_ostream > &__strm, char __c){B _RW::__rw_insert (__strm, &__c, 1, __strm.width ()).width (0); return __strm;}%#endif // _RWSTD_NO_FUNC_PARTIAL_SPEC1#endif // _RWSTD_NO_OVERLOAD_OF_TEMPLATE_FUNCTION%template&inline basic_ostream<_CharT, _Traits>&Foperator<< (basic_ostream<_CharT, _Traits> &__strm, const _CharT *__s){9 _RW::__rw_insert (__strm, __s, _Traits::length (__s),1 __strm.width ()).width (0); return __strm;}/#ifndef _RWSTD_NO_OVERLOAD_OF_TEMPLATE_FUNCTION%template&inline basic_ostream<_CharT, _Traits>&Doperator<< (basic_ostream<_CharT, _Traits> &__strm, const char *__s){C _RW::__rw_insert (__strm, __s, char_traits::length (__s),1 __strm.width ()).width (0); return __strm;}##ifndef _RWSTD_NO_FUNC_PARTIAL_SPECtemplate $inline basic_ostream&Boperator<< (basic_ostream &__strm, const char *__s){C _RW::__rw_insert (__strm, __s, char_traits::length (__s),1 __strm.width ()).width (0); return __strm;}3#else // if defined (_RWSTD_NO_FUNC_PARTIAL_SPEC)/inline basic_ostream >&Moperator<< (basic_ostream >& __strm, const char *__s){C _RW::__rw_insert (__strm, __s, char_traits::length (__s),1 __strm.width ()).width (0); return __strm;}%#endif // _RWSTD_NO_FUNC_PARTIAL_SPEC1#endif // _RWSTD_NO_OVERLOAD_OF_TEMPLATE_FUNCTIONtemplate $inline basic_ostream&Doperator<< (basic_ostream &__strm, unsigned char __c){4 return __strm << _RWSTD_STATIC_CAST (char, __c);}template $inline basic_ostream&Boperator<< (basic_ostream &__strm, signed char __c){4 return __strm << _RWSTD_STATIC_CAST (char, __c);}template $inline basic_ostream&Koperator<< (basic_ostream &__strm, const unsigned char *__s){@ return __strm << _RWSTD_REINTERPRET_CAST (const char*, __s);}template $inline basic_ostream&Ioperator<< (basic_ostream& __strm, const signed char *__s){@ return __strm << _RWSTD_REINTERPRET_CAST (const char*, __s);}// 27.6.2.7, p1%template&inline basic_ostream<_CharT, _Traits>&-endl (basic_ostream<_CharT, _Traits>& __strm){5 return __strm.put (__strm.widen ('\n')).flush ();}// 27.6.2.7, p3%template&inline basic_ostream<_CharT, _Traits>&-ends (basic_ostream<_CharT, _Traits>& __strm){" return __strm.put (_CharT ());}// 27.6.2.7, p5%template&inline basic_ostream<_CharT, _Traits>&.flush (basic_ostream<_CharT, _Traits>& __strm){ return __strm.flush ();} ;// 21.3.7.9, p3 - defined here, declared inline in 7template&inline basic_ostream<_CharT, _Traits>&Eoperator<< (basic_ostream<_CharT, _Traits> & __strm,C const basic_string<_CharT, _Traits, _Allocator> &__str){= _RW::__rw_insert (__strm, __str.data (), __str.length (),1 __strm.width ()).width (0); return __strm;}*#if defined (_MSC_VER) && _MSC_VER <= 1300C// working around an MSVC 6.0 bug that causes it to pick the memberD// operator<<(const void*) over the above if overloaded in user code_RWSTD_SPECIALIZED_FUNCTION&inline ostream& endl (ostream& __strm){5 return __strm.put (__strm.widen ('\n')).flush ();}_RWSTD_SPECIALIZED_FUNCTION&inline ostream& ends (ostream& __strm){ return __strm.put (char ());}_RWSTD_SPECIALIZED_FUNCTION'inline ostream& flush (ostream& __strm){ return __strm.flush ();}#ifndef _RWSTD_NO_WCHAR_T_RWSTD_SPECIALIZED_FUNCTION(inline wostream& endl (wostream& __strm){5 return __strm.put (__strm.widen ('\n')).flush ();}_RWSTD_SPECIALIZED_FUNCTION(inline wostream& ends (wostream& __strm){ return __strm.put (char ());}_RWSTD_SPECIALIZED_FUNCTION)inline wostream& flush (wostream& __strm){ return __strm.flush ();}#endif // _RWSTD_NO_WCHAR_T#else.// working around an MSVC 6.0 bug that causes:I// - warning C4660: template-class specialization is already instantiatedJ// - many linker errors for (inline or otherwise) members of basic_ostream)_RWSTD_INSTANTIATE_2 (class _RWSTD_EXPORT? basic_ostream >);#ifndef _RWSTD_NO_WCHAR_T)_RWSTD_INSTANTIATE_2 (class _RWSTD_EXPORTE basic_ostream >);#endif // _RWSTD_NO_WCHAR_T(#endif // !_MSC_VER || _MSC_VER > 1300} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif*#if _RWSTD_DEFINE_TEMPLATE (BASIC_OSTREAM)# include #endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif#endif // __USE_STD_IOSTREAM##endif // _RWSTD_OSTREAM_INCLUDEDww _n7ԦL/*************************************************************************** *D * ostream.cc - Definitions for the Standard Library ostream classes */ * $Id: //stdlib/3.0-rel/include/ostream.cc#3 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent wit h FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and ot her laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer s oftware is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endif#include .#include _RWSTD_CSTDIO // for stderr, stdoutE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (__rw) { 9template %_STD::basic_ostream<_CharT, _Traits>&:__rw_insert (_STD::basic_ostream<_CharT, _Traits> &__strm,9 _NativeType __val){< _STD::ios_base::iostate __err = _STD::ios_base::goodbit;K _TYPENAME _STD::basic_ostream<_CharT, _Traits>::sentry __opfx (__strm); _TRY { if (__opfx) {E typedef _STD::ostreambuf_iterator<_CharT, _Traits> _Iter;G typedef _STD::num_put<_CharT, _Iter> _NumPut;: if (_STD_USE_FACET (_NumPut, __strm.getloc ()), .put (_Iter(__strm), __strm,7 __strm.fill (), __val).failed ())/ __err = _STD::ios_base::badbit; __strm.width (0); }  } _CATCH (...) {8 if (__strm.setstate (_STD::ios_base::badbit, 0)) _RETHROW; } if (__err) __strm.setstate (__err); return __strm;}8// generic case (e.g., basic_ostream, wchar_t*)&template inline _STD::streamsize9__rw_sputn (_STD::basic_ostream<_CharT, _Traits> &__strm,5 const _CharT*__s, _STD::streamsize __len){/ return __strm.rdbuf ()->sputn (__s, __len);}##ifndef _RWSTD_NO_FUNC_PARTIAL_SPEC>// specialized for char* (e.g., basic_ostream, char*)&template inline _STD::streamsize9__rw_sputn (_STD::basic_ ostream<_CharT, _Traits> &__strm,4 const char *__s, _STD::streamsize __len){4 _RWSTD_ASSERT (!__len || __len > 0 && 0 != __s);& const _STD::ctype<_CharT>& __ctp =? _STD_USE_FACET (_STD::ctype<_CharT>, __strm.getloc ());8 for (_STD::streamsize __i = 0; __i < __len; ++__i) {F _TYPENAME _STD::basic_ostream<_CharT, _Traits>::int_type __n == __strm.rdbuf ()->sputc (__ctp.widen (__s [__i]));8 if (_Traits::eq_int_type (__n, _Traits::eof ())) return __i; } return __len;}0// specialized for basic_ostream and char*template inline _STD::streamsize7__rw_sputn (_STD::basic_ostream &__strm,3 const char*__s, _STD::streamsize __len){/ return __strm.rdbuf ()->sputn (__s, __len);}3#else // if defined (_RWSTD_NO_FUNC_PARTIAL_SPEC)H// specialized for basic_ostream<[w]char[_t], char_traits<[w]char[_t]> >J// and char*; any other specialization (e.g., user-defined traits) will be&// generated from the primary template_RWSTD_SPECIALIZED_FUNCTIONinline _STD::streamsizeH__rw_sputn (_STD::basic_ostream > &__strm,3 const char*__s, _STD::streamsize __len){/ return __strm.rdbuf ()->sputn (__s, __len);}inline _STD::streamsizeN__rw_sputn (_STD::basic_ostream > &__strm,3 const char*__s, _STD::streamsize __len){4 _RWSTD_A SSERT (!__len || __len > 0 && 0 != __s);' const _STD::ctype& __ctp =@ _STD_USE_FACET (_STD::ctype, __strm.getloc ());8 for (_STD::streamsize __i = 0; __i < __len; ++__i) {O _STD::basic_ostream >::int_type __n? = __strm.rdbuf ()->sputc (__ctp.widen (__s [__i]));9 if (_STD::char_traits::eq_int_type (__n,P _STD::char_traits::eof ()))  return __i; } return __len;}'#endif // _RWSTD_NO_FUNC_PARTIAL_SPEC5template%_STD::basic_ostream<_CharT, _Traits>&:__rw_insert (_STD::basic_ostream<_CharT, _Traits> &__strm,7 const _StringT *__s,8 _STD::streamsize __len,: _STD::streamsize __width){) _RWSTD_ASSERT (0 != __strm.rdbuf ()); _RWSTD_ASSERT (0 != __s); < _STD::ios_base::iostate __err = _STD::ios_base::goodbit;9 // will write out max(len, width) characters, padding9 // appropriately (with fill character) if len < width _TRY { O _TYPENAME _STD::basic_ostream<_CharT, _Traits>::sentry __opfx (__strm); if (__opfx) {; // compute the number of fill chars to pad withB // according to the rules described in 22.2.2.2.2, p19; const _STD::streamsize __pad = __w idth - __len;G const int __padbits = __strm.adjustfield & __strm.flags ();G // output left padding (output is right-aligned by default)+ if ( __strm.left != __padbits2 && __pad != __strm._C_pad (__pad))& __err = __strm.badbit;A // write out (not necessarily null-terminated) string* if ( __strm.goodbit == __errE && __len && __len != __rw_sputn (__strm, __s, __len))& __err = __strm.badbit;< // output right padding (output is left-aligned)* if ( __strm.goodbit == __err+ && __strm.left == __padbits2 && __pad != __strm._C_pad (__pad))& __err = __strm.badbit; } } _CATCH (...) {= if (__strm.setstate (__strm.badbit, 0 /* nothrow */)) _RETHROW; } if (__err)" __strm.setstate (__err);  return __strm;}} // namespace __rw_RWSTD_NAMESPACE (std) { %templatebasic_ostream<_CharT, _Traits>&*basic_ostream<_CharT, _Traits>::_C_opfx (){ if (this->tie ()) this->tie ()->flush (); if (this->_C_is_sync ()) { '#if defined(__DECCXX) && defined(__VMS)#pragma __message __save&#pragma __message __disable __dollarid#endif+ if (_C_is_cout ()) // [w]cout fflush (stdout);6 else if (_C_is_std ()) // [w]cerr or [w]clog fflush (stderr); }'#if defined(__DECCXX) && defined(__VMS)#pragma __message __restore#endif9 // cast to ios_base::seekdir makes MSVC 6.0/sp3 happy if ( this->rdbuf () 6 && this->rdbuf ()->_C_mode () & ios_base::app)I this->rdbuf ()->pubseekoff (0, ios_base::seekdir (ios_base::end),3 ios_base::out); return *this;}%templatebasic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>::3operator<< (basic_streambuf<_CharT, _Traits>& __sb){0 ios_base::iostate __err = ios_base::goodbit;K bool __extracted = false; // successfully extracted chars from __sb? ) if (__sb._C_mode () & ios_base::in) { sentry __opfx (*this); _TRY { if (__opfx) {J if (_Traits::eq_int_type (__sb.sgetc (), _Traits::eof ())). __err = ios_base::failbit; else {!  for ( ; ; ) {6 int_type __c = __sb.sbumpc ();H if (_Traits::eq_int_type (__c, _Traits::eof ()))" break;I if (_Traits::eq_int_type (this->rdbuf ()->sputc (O _Traits::to_char_type (__c)),E _Traits::eof ())) {6 __err = ios_base::failbit;"  break; }+ __extracted = true; }  } } } _CATCH (...) {5 if (this->setstate (ios_base::badbit, 0)) _RETHROW; } } // 27.6.2.5.3.8 if (!__extracted) " __err = ios_base::failbit;  if (__err) this->setstate (__err); return *this;}} // namespace stdE#if defined(__VMS) && define d(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endifww;fn7Ԧ// -*- C++ -*-L/*************************************************************************** *> * queue - declarations for the Standard Library queue classes *L *************************************************************************** * > * Copyright 2002 Compaq Information Technologies Group, L.P. *C * Compaq and the Compaq logo are trademarks of Compaq Information@ * Technologies Group, L.P. in the U.S. and/or other countries. *J * Confidential computer software. Valid license from Compaq required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** * * Copyright (c) 1994 * Hewlett-Packard Company *E * Permission to use, copy, modify, distri bute and sell this softwareG * and its documentation for any purpose is hereby granted without fee,D * provided that the above copyright notice appear in all copies andD * that both that copyright notice and this permission notice appearA * in supporting documentation. Hewlett-Packard Company makes noA * representations about the suitability of this software for anyH * purpose. It is provided "as is" without express or implied warranty. *L *********************************************** **************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the in clusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/#ifndef _RWSTD_QUEUE_INCLUDED#define _RWSTD_QUEUE_INCLUDED#include #include #include #include #include #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) { Qtemplate ) >  class queue;+ template ? inline bool operator== (const queue<_TypeT,_Container>& __x, ? const queue<_TypeT,_Container>& __y);+ template > inline bool operator< (const queue<_TypeT,_Container>& __x, > const queue<_TypeT,_Container>& __y);+ template class queue {8 friend bool _RWSTD_SPECIALIZED_FRIEND (operator==)/ (const queue& __x, const queue& __y);7 friend bool _RWSTD_SPECIALIZED_FRIEND (operator<)/ (const queue& __x, const queue& __y); public:@ typedef _TYPENAME _Container::value_type value_type;? typedef _TYPENAME _Container::size_type size_type;? typedef _TYPENAME _Container::reference reference;E typedef _TYPENAME _Container::const_reference const_reference;D typedef _Container container_type; protected: _Container c; public: _EXPLICIT9 queue (const container_type &__c = container_type ()) : c (__c) { }K bool empty () const { return c.empty(); }K size_type size () const { return c.size(); }K reference front () { return c.front(); }K const_reference front () const { return c.front(); }K reference back () { return c.back(); }K const_reference back () const { return c.back(); }O void push (const value_type& __x) { c.push_back(__x); }K void pop () { c.pop_front(); } };+ template ? inline bool operator== (const queue<_TypeT,_Container>& __x, > const queue<_TypeT,_Container>& __y) { return __x.c == __y.c; }+ template > inline bool operator< (const queue<_TypeT,_Container>& __x, = const queue<_TypeT,_Container>& __y) { return __x.c < __y.c; }+ template ? inline bool operator!= (const queue<_TypeT,_Container>& __x, > const queue<_TypeT,_Container>& __y) { return !(__x == __y); }+ template > inline bool operator> (const queue<_TypeT,_Container>& __x, = const queue<_TypeT,_Container>& __y) { return __y < __x; }+ template ? inline bool operator>= (const queue<_TypeT,_Container>& __x, > const queue<_TypeT,_Container>& __y) { return !(__x < __y); }+ template ? inline bool operator<= (const queue<_TypeT,_Container>& __x, > const queue<_TypeT,_Container>& __y) { return !(__y < __x); }+#ifndef _RWSTD_NO_COMPLEX_DEFAULT_TEMPLATES; template,; class _Compare = less<_TYPENAME _Container::value_type> >#else; template #endif class priority_queue { public:@ typedef _TYPENAME _Container::value_type value_type;? typedef _TYPENAME _Container::size_type size_type;E typedef _TYPENAME _Container::const_reference const_reference;D typedef _Container container_type; protected: _Container c; _Compare comp; public: _EXPLICIT? priority_queue (const _Compare & __cmp = _Compare (),B const container_type &__c = container_type ()) : c (__c), comp (__cmp) { ; }"#ifndef _RWSTD_NO_MEMBER_TEMPLATES template ; priority_queue (_InputIter __first, _InputIter __last, 5 const _Compare& __x = _Compare(),9 const _Container& __y = _Container()) : c(__y), comp(__x)  {' c.insert(c.end(),__first,__last);* make_heap(c.begin(), c.end(), comp); }#elseA priority_queue (_TYPENAME _Container::const_iterator __first,@ _TYPENAME _Container::const_iterator __last,8 const _Compare& __cmp = _Compare ())C : c(__first, __last, _Container::allocator_type()), comp(__x) {* make_heap(c.begin(), c.end(), comp); }#endif > bool empty () const { return c.empty(); }> size_type size () const { return c.size(); }> const_reference top () const { return c.front(); }# void push (const_reference __x) { < c.push_back(__x); push_heap(c.begin(), c.end(), comp); } void pop () {8 pop_heap(c.begin(), c.end(), comp); c.pop_back();  } };} // namespace stdE#if defined(__VMS) && defined(__DECC XX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif!#endif // _RWSTD_QUEUE_INCLUDEDww n OSF1 V5.0 and modified for VMS *L *************************************************************************** * B * Copyright 2003, 2006 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *M ***************************************************************************/// #define _RWSTD_NO_CASSERT// #define _RWSTD_NO_CCTYPE// #define _RWSTD_NO_CERRNO// #define _RWSTD_NO_CFLOAT// #define _RWSTD_NO_CISO646// #define _RWSTD_NO_CLIMITS// #define _RWSTD_NO_CLOCALE// #define _RWSTD_NO_CMATH// #define _RWSTD_NO_CSETJMP// #define _RWSTD_NO_CSIGNAL// #define _RWSTD_NO_CSTDARG// #define _RWSTD_NO_CSTDDEF// #define _RWSTD_NO_CSTDIO// #define _RWSTD_NO_CSTDLIB// #define _RWSTD_NO_CSTRING// #define _RWSTD_NO_CTIME// #define _RWSTD_NO_CWCHAR// #define _RWSTD_NO_CWCTYPE#define _RWSTD_NO_TYPEINFO_H// #define _RWSTD_NO_NAMESPACE// #define _RWSTD_NO_ACOS// #define _RWSTD_NO_ASIN// #define _RWSTD_NO_ATAN// #define _RWSTD_NO_ATAN2// #define _RWSTD_NO_CEIL// #define _RWSTD_NO_COS// #define _RWSTD_NO_COSH// #define _RWSTD_NO_EXP// #define _RWSTD_NO_FABS// #define _RWSTD_NO_FLOOR// #define _RWSTD_NO_FMOD// #define _RWSTD_NO_FREXP// #define _RWSTD_NO_LDEXP// #define _RWSTD_NO_LOG// #define _RWSTD_NO_LOG10// #define _RWSTD_NO_MODF// #define _RWSTD_NO_POW// #define _RWSTD_NO_SIN// #define _RWSTD_NO_SINH// #define _RWSTD_NO_SQRT// #define _RWSTD_NO_TAN// #define _RWSTD_NO_TANH// #define _RWSTD_NO_ACOSF// #define _RWSTD_NO_ASINF// #define _RWSTD_NO_ATANF// #define _RWSTD_NO_ATAN2F// #define _RWSTD_NO_CEILF// #define _RWSTD_NO_COSF// #define _RWSTD_NO_COSHF// #define _RWSTD_NO_EXPF// #define _RWSTD_NO_FABSF// #define _RWSTD_NO_FLOORF// #define _RWSTD_NO_FMODF// #define _RWSTD_NO_FREXPF// #define _RWSTD_NO_LDEXPF// #define _RWSTD_NO_LOGF// #define _RWSTD_NO_LOG10F// #define _RWSTD_NO_MODFF// #define _RWSTD_NO_POWF// #define _RWSTD_NO_SINF// #define _RWSTD_NO_SINHF// #define _RWSTD_NO_SQRTF// #define _RWSTD_NO_TANF// #define _RWSTD_NO_TANHF// #define _RWSTD_NO_ACOSL// #define _RWSTD_NO_ASINL// #define _RWSTD_NO_ATANL// #define _RWSTD_NO_ATAN2L// #define _RWSTD_NO_CEILL// #define _RWSTD_NO_COSL// #define _RWSTD_NO_COSHL// #define _RWSTD_NO_EXPL// #define _RWSTD_NO_FABSL// #define _RWSTD_NO_FLOORL// #define _RWSTD_NO_FMODL// #define _RWSTD_NO_FREXPL// #define _RWSTD_NO_LDEXPL// #define _RWSTD_NO_LOGL// #define _RWSTD_NO_LOG10L// #define _RWSTD_NO_MODFL// #define _RWSTD_NO_POWL// #define _RWSTD_NO_SINL// #define _RWSTD_NO_SINHL// #define _RWSTD_NO_SQRTL// #define _RWSTD_NO_TANL// #define _RWSTD_NO_TANHL// #define _RWSTD_NO_CLEARERR// #define _RWSTD_NO_FCLOSE// #define _RWSTD_NO_FEOF// #define _RWSTD_NO_FERROR// #define _RWSTD_NO_FFLUSH// #define _RWSTD_NO_FGETC// #define _RWSTD_NO_FGETPOS// #define _RWSTD_NO_FGETS// #define _RWSTD_NO_FOPEN// #define _RWSTD_NO_FPRINTF// #define _RWSTD_NO_FPUTC// #define _RWSTD_NO_FPUTS// #define _RWSTD_NO_FREAD// #define _RWSTD_NO_FREOPEN// #define _RWSTD_NO_FSCANF// #define _RWSTD_NO_FSEEK// #define _RWSTD_NO_FSETPOS// #define _RWSTD_NO_FTELL// #define _RWSTD_NO_FWRITE// #define _RWSTD_NO_GETC// #define _RWSTD_NO_GETCHAR// #define _RWSTD_NO_GETS// #define _RWSTD_NO_PERROR// #define _RWSTD_NO_PRINTF// #define _RWSTD_NO_PUTC// #define _RWSTD_NO_PUTCHAR// #define _RWSTD_NO_PUTS// #define _RWSTD_NO_REMOVE// #define _RWSTD_NO_RENAME// #define _RWSTD_NO_REWIND// #define _RWSTD_NO_SCANF// #define _RWSTD_NO_SETBUF// #define _RWSTD_NO_SETVBUF// #define _RWSTD_NO_SPRINTF// #define _RWSTD_NO_SSCANF// #define _RWSTD_NO_TMPFILE// #define _RWSTD_NO_TMPNAM// #define _RWSTD_NO_UNGETC// #define _RWSTD_NO_VFPRINTF%// #define _RWSTD_NO_VFPRINTF_IN_LIBC// #define _RWSTD_NO_VPRINTF$// #define _RWSTD_NO_VPRINTF_IN_LIBC// #define _RWSTD_NO_VSPRINTF%// #define _RWSTD_NO_VSPRINTF_IN_LIBC// #define _RWSTD_NO_FILENO#// #define _RWSTD_NO_FILENO_IN_LIBC// #define _RWSTD_NO_ABORT// #define _RWSTD_NO_ABS // #define _RWSTD_NO_ABS_IN_LIBC// #define _RWSTD_NO_ATEXIT// #define _RWSTD_NO_ATOF// #define _RWSTD_NO_ATOI// #define _RWSTD_NO_ATOL// #define _RWSTD_NO_ATOLL"// #define _RWSTD_NO_ATOLL_IN_LIBC// #define _RWSTD_NO_BSEARCH// #define _RWSTD_NO_CALLOC// #define _RWSTD_NO_DIV // #define _RWSTD_NO_DIV_IN_LIBC// #define _RWSTD_NO_EXIT// #define _RWSTD_NO_FREE// #define _RWSTD_NO_GETENV// #define _RWSTD_NO_LABS// #define _RWSTD_NO_LDIV// #define _RWSTD_NO_LLABS"// #define _RWSTD_NO_LLABS_IN_LIBC// #define _RWSTD_NO_LLDIV"// #define _RWSTD_NO_LLDIV_IN_LIBC// #define _RWSTD_NO_MALLOC// #define _RWSTD_NO_MBLEN// #define _RWSTD_NO_MBSTOWCS// #define _RWSTD_NO_MBTOWC// #define _RWSTD_NO_QSORT// #define _RWSTD_NO_RAND// #define _RWSTD_NO_REALLOC// #define _RWSTD_NO_SRAND// #define _RWSTD_NO_STRTOD// #define _RWSTD_NO_STRTOL// #define _RWSTD_NO_STRTOUL// #define _RWSTD_NO_SYSTEM// #define _RWSTD_NO_WCSTOMBS// #define _RWSTD_NO_WCTOMB#define _RWSTD_NO_STRTOF #define _RWSTD_NO_STRTOF_IN_LIBC#define _RWSTD_NO_STRTOLD!#define _RWSTD_NO_STRTOLD_IN_LIBC// #define _RWSTD_NO_STRTOLL$// #define _RWSTD_NO_STRTOLL_IN_LIBC// #define _RWSTD_NO_STRTOULL%// #define _RWSTD_NO_STRTOULL_IN_LIBC// #define _RWSTD_NO_MEMCHR// #define _RWSTD_NO_MEMCMP// #define _RWSTD_NO_MEMCPY// #define _RWSTD_NO_MEMMOVE// #define _RWSTD_NO_MEMSET// #define _RWSTD_NO_STRCAT// #define _RWSTD_NO_STRCHR// #define _RWSTD_NO_STRCMP// #define _RWSTD_NO_STRCOLL// #define _RWSTD_NO_STRCPY// #define _RWSTD_NO_STRCSPN// #define _RWSTD_NO_STRERROR// #define _RWSTD_NO_STRLEN// #define _RWSTD_NO_STRNCAT// #define _RWSTD_NO_STRNCMP// #define _RWSTD_NO_STRNCPY// #define _RWSTD_NO_STRPBRK// #define _RWSTD_NO_STRRCHR// #define _RWSTD_NO_STRSPN// #define _RWSTD_NO_STRSTR// #define _RWSTD_NO_STRTOK// #define _RWSTD_NO_STRXFRM// #define _RWSTD_NO_BTOWC// #define _RWSTD_NO_FGETWC#// #define _RWSTD_NO_FGETWC_IN_LIBC// #define _RWSTD_NO_FGETWS#// #define _RWSTD_NO_FGETWS_IN_LIBC// #define _RWSTD_NO_FPUTWC#// #define _RWSTD_NO_FPUTWC_IN_LIBC// #define _RWSTD_NO_FPUTWS#// #define _RWSTD_NO_FPUTWS_IN_LIBC// #define _RWSTD_NO_FWIDE"// #define _RWSTD_NO_FWIDE_IN_LIBC// #define _RWSTD_NO_FWPRINTF%// #define _RWSTD_NO_FWPRINTF_IN_LIBC// #define _RWSTD_NO_FWSCANF$// #define _RWSTD_NO_FWSCANF_IN_LIBC// #define _RWSTD_NO_GETWC"// #define _RWSTD_NO_GETWC_IN_LIBC// #define _RWSTD_NO_GETWCHAR// #define _RWSTD_NO_MBRLEN// #define _RWSTD_NO_MBRTOWC// #define _RWSTD_NO_MBSINIT// #define _RWSTD_NO_MBSRTOWCS// #define _RWSTD_NO_PUTWC"// #define _RWSTD_NO_PUTWC_IN_LIBC// #define _RWSTD_NO_PUTWCHAR// #define _RWSTD_NO_SWPRINTF// #define _RWSTD_NO_SWSCANF// #define _RWSTD_NO_UNGETWC$// #define _RWSTD_NO_UNGETWC_IN_LIBC// #define _RWSTD_NO_VFWPRINTF&// #define _RWSTD_NO_VFWPRINTF_IN_LIBC#define _RWSTD_NO_VSNPRINTF##define _RWSTD_NO_VSNPRINTF_IN_LIBC// #define _RWSTD_NO_VSWPRINTF&// #define _RWSTD_NO_VSWPRINTF_IN_LIBC// #define _RWSTD_NO_VWPRINTF%// #define _RWSTD_NO_VWPRINTF_IN_LIBC// #define _RWSTD_NO_VWSCANF$// #define _RWSTD_NO_VWSCANF_IN_LIBC// #define _RWSTD_NO_WCRTOMB// #define _RWSTD_NO_WCSCAT// #define _RWSTD_NO_WCSCHR// #define _RWSTD_NO_WCSCMP// #define _RWSTD_NO_WCSCOLL// #define _RWSTD_NO_WCSCPY// #define _RWSTD_NO_WCSCSPN// #define _RWSTD_NO_WCSFTIME%// #define _RWSTD_NO_WCSFTIME_IN_LIBC// #define _RWSTD_NO_WCSLEN// #define _RWSTD_NO_WCSNCAT// #define _RWSTD_NO_WCSNCMP// #define _RWSTD_NO_WCSNCPY// #define _RWSTD_NO_WCSPBRK// #define _RWSTD_NO_WCSRCHR// #define _RWSTD_NO_WCSRTOMBS// #define _RWSTD_NO_WCSSPN// #define _RWSTD_NO_WCSSTR// #define _RWSTD_NO_WCSTOD// #define _RWSTD_NO_WCSTOD#define _RWSTD_NO_WCSTOF #define _RWSTD_NO_WCSTOF_IN_LIBC// #define _RWSTD_NO_WCSTOK#// #define _RWSTD_NO_WCSTOK_IN_LIBC// #define _RWSTD_NO_WCSTOL#define _RWSTD_NO_WCSTOLD!#define _RWSTD_NO_WCSTOLD_IN_LIBC#define _RWSTD_NO_WCSTOLL!#define _RWSTD_NO_WCSTOLL_IN_LIBC// #define _RWSTD_NO_WCSTOMBS%// #define _RWSTD_NO_WCSTOMBS_IN_LIBC// #define _RWSTD_NO_WCSTOUL#define _RWSTD_NO_WCSTOULL"#define _RWSTD_NO_WCSTOULL_IN_LIBC// #define _RWSTD_NO_WCSXFRM// #define _RWSTD_NO_WCTOB// #define _RWSTD_NO_WCTOMB#// #define _RWSTD_NO_WCTOMB_IN_LIBC// #define _RWSTD_NO_WMEMCHR// #define _RWSTD_NO_WMEMCMP// #define _RWSTD_NO_WMEMCPY// #define _RWSTD_NO_WMEMMOVE// #define _RWSTD_NO_WMEMSET// #define _RWSTD_NO_WPRINTF// #define _RWSTD_NO_WSCANF// #define _RWSTD_NO_ISWALPHA// #define _RWSTD_NO_ISWALNUM// #define _RWSTD_NO_ISWCNTRL// #define _RWSTD_NO_ISWDIGIT// #define _RWSTD_NO_ISWGRAPH// #define _RWSTD_NO_ISWLOWER// #define _RWSTD_NO_ISWPRINT// #define _RWSTD_NO_ISWPUNCT// #define _RWSTD_NO_ISWSPACE// #define _RWSTD_NO_ISWUPPER// #define _RWSTD_NO_ISWXDIGIT// #define _RWSTD_NO_WCTYPE// #define _RWSTD_NO_ISWCTYPE// #define _RWSTD_NO_TOWLOWER// #define _RWSTD_NO_TOWUPPER// #define _RWSTD_NO_WCTRANS// #define _RWSTD_NO_TOWCTRANS// #define _RWSTD_NO_ATOMIC_OPS// #define _RWSTD_NO_BOOLE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1894)# if defined(__STD_MS)(# define _RWSTD_NO_CLASS_PARTIAL_SPEC# endif#else'// #define _RWSTD_NO_CLASS_PARTIAL_SPEC#endif+// #define _RWSTD_NO_COLLAPSE_STATIC_LOCALS-// #define _RWSTD_NO_COLLAPSE_TEMPLATE_LOCALS.// #define _RWSTD_NO_COLLAPSE_TEMPLATE_STATICS// #define _RWSTD_NO_CONST_CAST*// #define _RWSTD_NO_DEFAULT_TEMPLATE_ARGS// #define _RWSTD_NO_TYPENAME'// #define _RWSTD_NO_DEPENDENT_TEMPLATE+// #define _RWSTD_NO_DEPRECATED_LIBC_IN_STD// #define _RWSTD_NO_HONOR_STD"// #define _RWSTD_NO_STD_TERMINATE!// #define _RWSTD_NO_DYNAMIC_CAST*// #define _RWSTD_NO_EMPTY_MEM_INITIALIZER/#if defined(__DECCXX) && !defined(__EXCEPTIONS)#define _RWSTD_NO_EXCEPTIONS#endif*#if defined(__DECCXX) && defined(__STD_MS)+#define _RWSTD_NO_EXCEPTION_SPECIFICATION 1#else,// #define _RWSTD_NO_EXCEPTION_SPECIFICATION#endif3// #define _RWSTD_NO_EXCEPTION_SPECIFICATION_ON_NEW// #define _RWSTD_NO_EXPLICIT!// #define _RWSTD_NO_EXPLICIT_ARG0// #define _RWSTD_NO_EXPLICIT_FUNC_INSTANTIATION+// #define _RWSTD_NO_EXPLICIT_INSTANTIATION#define _RWSTD_NO_EXPORT+// #define _RWSTD_NO_EXTERN_C_COMPATIBILITY&// #define _RWSTD_NO_EXTERN_C_OVERLOAD#define _RWSTD_NO_EXTERN_INLINE$// #define _RWSTD_NO_FOR_LOCAL_SCOPE// #define _RWSTD_NO_FPOS_T#define _RWSTD_NO_FUNC'// #define _RWSTD_NO_FUNCTION_TRY_BLOCK&// #define _RWSTD_NO_FUNC_PARTIAL_SPEC// #define _RWSTD_NO_SETRLIMIT"#define _RWSTD_NO_GLOBAL_BAD_ALLOC!#define _RWSTD_NO_GLOBAL_BAD_CAST#// #define _RWSTD_NO_STD_UNEXPECTED&#define _RWSTD_NO_GLOBAL_BAD_EXCEPTION// #define _RWSTD_NO_TYPEINFO##define _RWSTD_NO_GLOBAL_BAD_TYPEID"#define _RWSTD_NO_GLOBAL_EXCEPTION #define _RWSTD_NO_GLOBAL_NOTHROW"#define _RWSTD_NO_GLOBAL_NOTHROW_T+// #define _RWSTD_NO_GLOBAL_SET_NEW_HANDLER&#define _RWSTD_NO_GLOBAL_SET_TERMINATE'#define _RWSTD_NO_GLOBAL_SET_UNEXPECTED"#define _RWSTD_NO_GLOBAL_TERMINATE+#define _RWSTD_NO_GLOBAL_UNCAUGHT_EXCEPTION##define _RWSTD_NO_GLOBAL_UNEXPECTED// #define _RWSTD_NO_ICONV%// #define _RWSTD_NO_ICONV_CONST_CHAR'// #define _RWSTD_NO_IMPLICIT_INCLUSION+// #define _RWSTD_NO_IMPLICIT_INSTANTIATION // #define _RWSTD_NO_LONG_DOUBLE// #define _RWSTD_NO_DBL_TRAPS#define _RWSTD_NO_INFINITY,// #define _RWSTD_NO_INLINE_MEMBER_TEMPLATES-// #define _RWSTD_NO_INSTANTIATE_DEFAULT_ARGS #define _RWSTD_NO_LCONV_INT_FMAT// #define _RWSTD_NO_LCONV6#define _RWSTD_LCONV { /* sizeof (lconv) == 104 */ \ char* decimal_point; \ char* thousands_sep; \ char* grouping; \ char* int_curr_symbol; \ char* currency_symbol; \ char* mon_decimal_point; \ char* mon_thousands_sep; \ char* mon_grouping; \ char* positive_sign; \ char* negative_sign; \ char int_frac_digits; \ char frac_digits; \ char p_cs_precedes; \ char p_sep_by_space; \ char n_cs_precedes; \ char n_sep_by_space; \ char p_sign_posn; \ char n_sign_posn; \- char _C_fill [16]; /* fill to size */ \ }// #define _RWSTD_NO_FLOAT_H'// #define _RWSTD_NO_LDBL_PRINTF_PREFIX&#define _RWSTD_LDBL_PRINTF_PREFIX "ll"// #define _RWSTD_NO_WCHAR_H// #define _RWSTD_NO_WCTYPE_H// #define _RWSTD_NO_NEW_HEADERE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1892)# ifdef __NONAMESPACE_STD!# define _RWSTD_NO_LIBC_IN_STD# endif#else // #define _RWSTD_NO_LIBC_IN_STD#endif#// #define _RWSTD_NO_LIB_EXCEPTIONS// #define _RWSTD_NO_LIMITS_H#// #define _RWSTD_NO_STRTOD_IN_LIBC// #define _RWSTD_NO_LONG_LONG// #define _RWSTD_NO_WCHAR_T// #define _RWSTD_NO_LIMITS#define _RWSTD_CHAR_BIT 83#define _RWSTD_BOOL_MIN !!0 /* sizeof (bool) = 1 */#define _RWSTD_BOOL_MAX !03#define _RWSTD_CHAR_MAX 127 /*  sizeof (char) = 1 */.#define _RWSTD_CHAR_MIN (-_RWSTD_CHAR_MAX - 1);#define _RWSTD_SCHAR_MAX 127 /* sizeof (signed char) = 1 */0#define _RWSTD_SCHAR_MIN (-_RWSTD_SCHAR_MAX - 1)>#define _RWSTD_UCHAR_MAX 255U /* sizeof (unsigned char) = 1 */#define _RWSTD_UCHAR_MIN 06#define _RWSTD_SHRT_MAX 32767 /* sizeof (short) = 2 */.#define _RWSTD_SHRT_MIN (-_RWSTD_SHRT_MAX - 1)A#define _RWSTD_USHRT_MAX 65535U /* sizeof (unsigned short) = 2 */#define _RWSTD_USHRT_MIN 08#define _RWSTD_INT_MAX 2147483 647 /* sizeof (int) = 4 */,#define _RWSTD_INT_MIN (-_RWSTD_INT_MAX - 1)C#define _RWSTD_UINT_MAX 4294967295U /* sizeof (unsigned int) = 4 */#define _RWSTD_UINT_MIN 0;#define _RWSTD_LONG_MAX 2147483647L /* sizeof (long) = 4 *//#define _RWSTD_LONG_MIN (-_RWSTD_LONG_MAX - 1L)F#define _RWSTD_ULONG_MAX 4294967295UL /* sizeof (unsigned long) = 4 */#define _RWSTD_ULONG_MIN 0K#define _RWSTD_LLONG_MAX 9223372036854775807LL /* sizeof (long long) = 8 */2#define _RWSTD_LLONG_MIN (-_RWSTD_LLONG_MAX - 1LL)W#define _RWSTD_ULLONG_MAX 18446744073709551615ULL /* sizeof (unsigned long long) = 8 */#define _RWSTD_ULLONG_MIN 0@#define _RWSTD_WCHAR_T_MAX 4294967295 /* sizeof (wchar_t) = 4 */#define _RWSTD_WCHAR_T_MIN 0.#define _RWSTD_MB_LEN_MAX 8 /* libc value */#define _RWSTD_INT8_T char$#define _RWSTD_UINT8_T unsigned char#define _RWSTD_INT16_T short&#define _RWSTD_UINT16_T unsigned short#define _RWSTD_INT32_T int$#define _RWSTD_UINT32_T unsigned int #define _RWSTD_INT64_T long long*#define _RWSTD_UINT64_T unsigned long long#ifdef __BIASED_FLT_ROUNDS3# define _RWSTD_FLT_ROUNDS (__BIASED_FLT_ROUNDS-1)#else# define _RWSTD_FLT_ROUNDS 1#endif#define _RWSTD_FLT_RADIX 2 #if __IEEE_FLOAT#define _RWSTD_DBL_DIG 15 #define _RWSTD_DBL_MANT_DIG 53 "#define _RWSTD_DBL_MAX_10_EXP 308 #define _RWSTD_DBL_MAX_EXP 1024 %#define _RWSTD_DBL_MIN_10_EXP (-307) ##define _RWSTD_DBL_MIN_EXP (-1021) #define _RWSTD_FLT_MAX_EXP 128 $#define _RWSTD_FLT_MIN_10_EXP (-37) " #define _RWSTD_FLT_MIN_EXP (-125) 0#define _RWSTD_DBL_MAX 1.79769313486231570e+308 '#define _RWSTD_FLT_MAX 3.40282347e+38f 2#define _RWSTD_DBL_EPSILON 2.2204460492503131e-16 /#define _RWSTD_DBL_MIN 2.2250738585072014e-308 +#define _RWSTD_FLT_EPSILON 1.19209290e-07f '#define _RWSTD_FLT_MIN 1.17549435e-38f #elif __G_FLOAT#define _RWSTD_DBL_DIG 15 #define _RWSTD_DBL_MANT_DIG 53 "#define _RWSTD_DBL_MAX_10_EXP 307 #define _RWSTD_DBL_MAX_EXP 1023 %#define _RWSTD_DBL_MIN_10_EXP (-308) ##define _RWSTD_DBL_MIN_EXP (-1023) 0#define _RWSTD_DBL_MAX 8.98846567431157854e+307 D#define _RWSTD_DBL_EPSILON (1.0 / (1 << 20) / (1 << 16) / (1 << 16))0#define _RWSTD_DBL_MIN 5.56268464626800346e-309 #else /* __D_FLOAT */#define _RWSTD_DBL_DIG 16 #define _RWSTD_DBL_MANT_DIG 56 !#define _RWSTD_DBL_MAX_10_EXP 38 #define _RWSTD_DBL_MAX_EXP 127 $#define _RWSTD_DBL_MIN_10_EXP (-38) "#define _RWSTD_DBL_MIN_EXP (-127) /#define _RWSTD_DBL_MAX 1.70141183460469213e+38 D#define _RWSTD_D BL_EPSILON (1.0 / (1 << 20) / (1 << 16) / (1 << 16))/#define _RWSTD_DBL_MIN 2.93873587705571877e-39 #endif#define _RWSTD_LDBL_DIG 33 !#define _RWSTD_LDBL_MANT_DIG 113 $#define _RWSTD_LDBL_MAX_10_EXP 4932 "#define _RWSTD_LDBL_MAX_EXP 16384 '#define _RWSTD_LDBL_MIN_10_EXP (-4931) %#define _RWSTD_LDBL_MIN_EXP (-16381) L#if defined(__DECCXX) && defined(__ia64) && !defined(__DECFIX_CXXC_BUGS9857)@#define _RWSTD_LDBL_MAX 1.1897314953572317650213E+4932L #elseS#define _RWSTD_LDBL_ MAX 1.189731495357231765085759326628007016196477e4932l #endifL#define _RWSTD_LDBL_EPSILON 1.9259299443872358530559779425849273185381e-34l J#define _RWSTD_LDBL_MIN 3.3621031431120935062626778173217526025981e-4932l #define _RWSTD_FLT_DIG 6#define _RWSTD_FLT_MANT_DIG 24 #define _RWSTD_FLT_MAX_10_EXP 38#if __G_FLOAT || __D_FLOAT6#define _RWSTD_FLT_EPSILON ((float)(1.0 / (1 << 23))) &#define _RWSTD_FLT_MAX 1.7014117e+38f #define _RWSTD_FLT_MAX_EXP 127 9#define _RWSTD_FLT_MIN ((float) 2.93873587705571877e-39) $#define _RWSTD_FLT_MIN_10_EXP (-38) "#define _RWSTD_FLT_MIN_EXP (-127) #endif3// #define _RWSTD_NO_STRTOF_UFLOW // 34 (ERANGE)3// #define _RWSTD_NO_STRTOD_UFLOW // 34 (ERANGE)3// #define _RWSTD_NO_STRTOLD_UFLOW // 34 (ERANGE)(// #define _RWSTD_NO_LLONG_PRINTF_PREFIX'#define _RWSTD_LLONG_PRINTF_PREFIX "ll"%// #define _RWSTD_NO_LOCALE_NAME_FMAT#define _RWSTD_LC_ALL (-1)#define _RWSTD_LC_COLLATE 0#define _RWSTD_LC_CTYPE 1#define _RWSTD_LC_MO NETARY 2#define _RWSTD_LC_NUMERIC 3#define _RWSTD_LC_TIME 4#define _RWSTD_LC_MESSAGES 5>#define _RWSTD_CAT_0(pfx) { 0, "LC_COLLATE", pfx::_C_collate }:#define _RWSTD_CAT_1(pfx) { 1, "LC_CTYPE", pfx::_C_ctype }@#define _RWSTD_CAT_2(pfx) { 2, "LC_MONETARY", pfx::_C_monetary }>#define _RWSTD_CAT_3(pfx) { 3, "LC_NUMERIC", pfx::_C_numeric }8#define _RWSTD_CAT_4(pfx) { 4, "LC_TIME", pfx::_C_time }@#define _RWSTD_CAT_5(pfx) { 5, "LC_MESSAGES", pfx::_C_messages }*// #define _RWSTD_NO_SETLOCALE_ENVIRONMENT#define _RWSTD_NO_CAT_NAMES// #define _RWSTD_CAT_SEP " "#define _RWSTD_NO_CAT_EQ!#define _RWSTD_NO_INITIAL_CAT_SEP#// #define _RWSTD_NO_CONDENSED_NAME#// #define _RWSTD_NO_MATH_EXCEPTION#// #define _RWSTD_NO_MATH_OVERLOADS#define _RWSTD_NO_ABS_DBL#define _RWSTD_NO_ABS_FLT#define _RWSTD_NO_ABS_LDBL#define _RWSTD_NO_ACOS_FLT#define _RWSTD_NO_ACOS_LDBL#define _RWSTD_NO_ASIN_FLT#define _RWSTD_NO_ASIN_LDBL#define _RWSTD_NO_ATAN_FLT#define _RWSTD_NO_ATAN_LDBL#define _RWSTD_NO_ATAN2_FLT#define _RWSTD_NO_ATAN2_LDBL#define _RWSTD_NO_CEIL_FLT#define _RWSTD_NO_CEIL_LDBL#define _RWSTD_NO_COS_FLT#define _RWSTD_NO_COS_LDBL#define _RWSTD_NO_COSH_FLT#define _RWSTD_NO_COSH_LDBL#define _RWSTD_NO_EXP_FLT#define _RWSTD_NO_EXP_LDBL#define _RWSTD_NO_FABS_FLT#define _RWSTD_NO_FABS_LDBL#define _RWSTD_NO_FLOOR_FLT#define _RWSTD_NO_FLOOR_LDBL#define _RWSTD_NO_FMOD_FLT#define _RWSTD_NO_FMOD_LDBL#define _RWSTD_NO_FREXP_FLT#define _RWSTD_NO_FREXP_LDBL#define _RWSTD_NO_LDEXP_FLT_INT #define _RWSTD_NO_LDEXP_LDBL_INT#define _RWSTD_NO_LOG_FLT#define _RWSTD_NO_LOG_LDBL#define _RWSTD_NO_LOG10_FLT#define _RWSTD_NO_LOG10_LDBL#define _RWSTD_NO_MODF_FLT#define _RWSTD_NO_MODF_LDBL#define _RWSTD_NO_POW_FLT#define _RWSTD_NO_POW_LDBL#define _RWSTD_NO_POW_DBL_INT#define _RWSTD_NO_POW_FLT_INT#define _RWSTD_NO_POW_LDBL_INT#define _RWSTD_NO_SIN_FLT#define _RWSTD_NO_SIN_LDBL#define _RWSTD_NO_SINH_FLT#define _RWSTD_NO_SINH_LDBL#define _RWSTD_NO_SQRT_FLT#define _RWSTD_NO_SQRT_LDBL#define _RWSTD_NO_TAN_FLT#define _RWSTD_NO_TAN_LDBL#define _RWSTD_NO_TANH_FLT#define _RWSTD_NO_TANH_LDBL// #define _RWSTD_NO_MBSTATE_T #define _RWSTD_MBSTATE_T_SIZE 24// #define _RWSTD_NO_USE_CONFIG2// #define _RWSTD_NO_MEMBER_EXPLICIT_INSTANTIATION%// #define _RWSTD_NO_MEMBER_TEMPLATES// #define _RWSTD_NO_MUNMAP"#define _RWSTD_MUNMAP_ARG1_T void*// #define _RWSTD_NO_NAN#// #define _RWSTD_NO_NATIVE_ WCHAR_T.// #define _RWSTD_NO_NEW_CLASS_TEMPLATE_SYNTAX-// #define _RWSTD_NO_NEW_FUNC_TEMPLATE_SYNTAX#define _RWSTD_NO_NEW_THROWS// #define _RWSTD_NO_NL_TYPES_H*// #define _RWSTD_NO_NONCLASS_ARROW_RETURN'// #define _RWSTD_NO_NONDEDUCED_CONTEXT"// #define _RWSTD_NO_SIGNALING_NAN*// #define _RWSTD_NO_OPERATOR_DELETE_ARRAY"// #define _RWSTD_NO_STD_NOTHROW_T2// #define _RWSTD_NO_OPERATOR_DELETE_ARRAY_NOTHROW4// #define _RWSTD_NO_OPERATOR_DELETE_ARRAY_PLACEMENT,// #define _RWSTD_NO_OPERATO R_DELETE_NOTHROW.// #define _RWSTD_NO_OPERATOR_DELETE_PLACEMENT'// #define _RWSTD_NO_OPERATOR_NEW_ARRAY/// #define _RWSTD_NO_OPERATOR_NEW_ARRAY_NOTHROW1// #define _RWSTD_NO_OPERATOR_NEW_ARRAY_PLACEMENT)// #define _RWSTD_NO_OPERATOR_NEW_NOTHROW+// #define _RWSTD_NO_OPERATOR_NEW_PLACEMENT2// #define _RWSTD_NO_OVERLOAD_OF_TEMPLATE_FUNCTION'// #define _RWSTD_NO_PART_SPEC_OVERLOAD%// #define _RWSTD_NO_PLACEMENT_DELETE!#define _RWSTD_NO_PRETTY_FUNCTION'// #define _RWSTD_NO_PTR_EXCEPTION_SPEC&// #define _RWSTD_NO_PUTENV_CONST_CHAR#if !__IEEE_FLOAT#define _RWSTD_NO_QUIET_NAN#endif%// #define _RWSTD_NO_REINTERPRET_CAST"// #define _RWSTD_NO_STD_BAD_ALLOC!// #define _RWSTD_NO_STD_BAD_CAST'// #define _RWSTD_NO_STD_SET_UNEXPECTED&// #define _RWSTD_NO_STD_BAD_EXCEPTION#// #define _RWSTD_NO_STD_BAD_TYPEID"// #define _RWSTD_NO_STD_EXCEPTION(// #define _RWSTD_NO_STD_SET_NEW_HANDLER&// #define _RWSTD_NO_STD_SET_TERMINATE+// #define _RWSTD_NO_STD_UNCAUGHT_EXCEPTION#// #define _RWSTD_NO_RUNTIME_IN_STD// #define _RWSTD_NO_SETLOCALE!// #define _RWSTD_NO_SIG_ATOMIC_T#define _RWSTD_SIG_DFL 0#define _RWSTD_SIG_ERR -1#define _RWSTD_SIG_IGN 1#define _RWSTD_SIGABRT 6#define _RWSTD_SIGFPE 8#define _RWSTD_SIGILL 4#define _RWSTD_SIGINT 2#define _RWSTD_SIGSEGV 11#define _RWSTD_SIGTERM 15#define _RWSTD_SIG_ATOMIC_T int// #define _RWSTD_NO_SIZE_T#define _RWSTD_CLOCK_T int#define _RWSTD_PTRDIFF_T int"#define _RWSTD_SIZE_T unsigned int"#define _RWSTD_TIME_T unsigned int#define _RWSTD_VA_LIST_SIZE 16%#define _RWSTD_CLOCKS_PER_SEC 1000000#define _RWSTD_RAND_MAX 32767#define _RWSTD_EOF -1#define _RWSTD_WEOF -1#define _RWSTD_L_TMPNAM 21#define _RWSTD_FPOS_T long'// #define _RWSTD_NO_SPECIALIZED_FRIEND // #define _RWSTD_NO_STATIC_CAST0// #define _RWSTD_NO_STATIC_TEMPLATE_MEMBER_INIT#if defined(__ia64) // #define _RWSTD_NO_STD_NOTHROW#else#define _RWSTD_NO_STD_NOTHROW#endif// #define _RWSTD_NO_STRUCT_TMF#define _RWSTD_STRUCT_TM { /* sizeof (struct tm) == 56 */ \F int tm_sec; /* seconds after the minute [O..61] */ \F int tm_min; /* minutes after the hour [0..59] */ \F int tm_hour; /* hours since midnight [0..23] */ \F int tm_mday; /* day of the month [1..31] */ \F int tm_mon; /* months since January [0..11] */ \F int tm_year; /* years since 1900 */ \F int tm _wday; /* days since Sunday [0..6] */ \F int tm_yday; /* days since January 1 [0..365] */ \F int tm_isdst; /* Daylight Saving Time */ \G char _C_fill [20]; /* fill to size */ \ },// #define _RWSTD_NO_TEMPLATE_ON_RETURN_TYPE##define _RWSTD_NO_THREAD_SAFE_ERRNO // #define _RWSTD_NO_UNISTD_DECL>#define _RWSTD_STDIN_FILENO 0 // STDIN_FILENO?#define _RWSTD_STDOUT_FILENO  0x1 // STDOUT_FILENO?#define _RWSTD_STDERR_FILENO 0x2 // STDERR_FILENO:#define _RWSTD_O_RDONLY 0 // O_RDONLY:#define _RWSTD_O_WRONLY 0x1 // O_WRONLY8#define _RWSTD_O_RDWR 0x2 // O_RDWR;#define _RWSTD_O_ACCMODE 0x3 // O_ACCMODE:#define _RWSTD_O_APPEND 0x8 // O_APPEND8#define _RWSTD_O_EXCL 0x800 // O_EXCL9#define _RWSTD_O_CREAT 0x200 // O_CR EAT9#define _RWSTD_O_TRUNC 0x400 // O_TRUNC:#define _RWSTD_SEEK_SET 0 // SEEK_SET:#define _RWSTD_SEEK_CUR 0x1 // SEEK_CUR:#define _RWSTD_SEEK_END 0x2 // SEEK_END9#define _RWSTD_F_GETFL 0x3 // F_GETFLE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1947)2# if defined(_LARGEFILE) || defined(_USE_STD_STAT)+# define _RWSTD_OFF_T __int64 // off_t# else'# define _RWSTD_OFF_T int // off_t# endif#else$#define _RWSTD_OFF_T int // off_t#endif'#define _RWSTD_SSIZE_T int // ssize_t*// #define _RWSTD_NO_WCSFTIME_WCHAR_T_FMAT-// #define _RWSTD_WCSFTIME_ARG3_T const char*// #define _RWSTD_NO_WCTRANS_T#define _RWSTD_WCTRANS_T int// #define _RWSTD_NO_WCTYPE_T#define _RWSTD_WCTYPE_T int// #define _RWSTD_NO_WINT_T#define _RWSTD_WINT_T intE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1894)# if defined(__STD_MS)!# define _RWSTD_NO_VECTOR_BOOL# endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)# if defined(__ia64)$# if __INITIAL_POINTER_SIZE == 64$# define _EXTERN_PREFIX "CX6L$" # else$# define _EXTERN_PREFIX "CXXL$" # endif# else"# define _EXTERN_PREFIX "CXXL$"# endif#endif-#endif // defined(__DECCXX) && defined(__VMS)#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif(#endif // _RWSTD_VMS_CONFIG_H_INCLUDEDww  2n7ԦL/*************************************************************************** *L * _algobase.cc - Definitions of out-of-line C++ Standard Library algorithms *4 * $Id: //stdlib/3.0-rel/include/rw/_algobase.cc#3 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Co nsistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** * * Copyright (c) 1994 * Hewlett-Packard Company *E * Permission to use, copy, modify, distribute and sell this softwareG * and its documentation for any purpose is hereby gra nted without fee,D * provided that the above copyright notice appear in all copies andD * that both that copyright notice and this permission notice appearA * in supporting documentation. Hewlett-Packard Company makes noA * representations about the suitability of this software for anyH * purpose. It is provided "as is" without express or implied warranty. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, In c. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copi es thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) { /template Hbool lexicographical_compare (_InputIter1 __first1, _InputIter1 __last1,H _InputIter2 __first2, _InputIter2 __last2){, _RWSTD_ASSERT_RANGE (__first1, __last1);, _RWSTD_ASSERT_RANGE (__first2, __last2);' for ( ; ; ++__first2, ++__first1) { if (__first1 == __last1)* return !(__first2 == __last2);9 if (__first2 == __last2 || *__first2 < *__first1) break;" if (*__first1 < *__first2) return true; } return false;}?template Hbool lexicographical_compare (_InputIter1 __first1, _InputIter1 __last1,H _InputIter2 __first2, _InputIter2 __last2,. _Compare __comp){, _RWSTD_ASSERT_RANGE (__first1, __last1);, _RWSTD_ASSERT_RANGE (__first2, __last2);' for ( ; ; ++__first2, ++__first1) { if (__first1 == __last1)* return !(__first2 == __last2);A if (__first2 == __last2 || __comp (*__first2, *__first1)) break;* if (__comp (*__first1, *__first2)) return true; } return false;}} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endifww 0=n7ԦL/*************************************************************************** *G * _algobase.h - Declarations and inline definitions of frequently used0 * C++ Standard Library algorithms *E * This is an internal header file used to implement the C++ Standard? * Library. It should never be #included directly by a program. *3 * $Id: //stdlib/3.0-rel/include/rw/_algobase.h#2 $ *L ***************************************************************************  * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L ***************************************************************************  * * Copyright (c) 1994 * Hewlett-Packard Company *E * Permission to use, copy, modify, distribute and sell this softwareG * and its documentation for any purpose is hereby granted without fee,D * provided that the above copyright notice appear in all copies andD * that both that copyright notice and this permission notice appearA * in supporting documentation. Hewlett-Packard Company makes noA * representations about the suitability of this software for anyH * purpose. It is pro vided "as is" without express or implied warranty. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, c opied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) ( ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/"#ifndef _RWSTD_ALGOBASE_H_INCLUDED"#define _RWSTD_ALGOBASE_H_INCLUDED #include / / for pair#ifndef _RWSTD_NO_DEBUG_ITER## include #endif // _RWSTD_NO_DEBUG_ITER#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) { // 25.3.7, p1template @inline const _TypeT& (min)(const _TypeT& __a, const _TypeT& __b){! return __b < __a ? __b : __a;}'template Pinline const _TypeT& (min)(const _TypeT& __a, const _TypeT& __b, _Compare __cmp){( return __cmp (__b, __a) ? __b : __a;} // 25.3.7, p3template @inline const _TypeT& (max)(const _TypeT& __a, const _TypeT& __b){" return __a < __b ? __b : __a;}'template Pinline const  _TypeT& (max)(const _TypeT& __a, const _TypeT& __b, _Compare __cmp){( return __cmp (__a, __b) ? __b : __a;} // 25.2.1, p1.template inline _OutputIter?copy (_InputIter __first, _InputIter __last, _OutputIter __res){* _RWSTD_ASSERT_RANGE (__first, __last);3 for (; !(__first == __last); ++__first,++__res) *__res = *__first; return __res;} // 25.2.1, p5/template inline _BidirIter2Jcopy_backward (_BidirIter1 __first, _BidirIter1 __last, _BidirIter2 __res){* _RWSTD_ASSERT_RANGE (__first, __last); while (!(__first == __last)) *--__res = *--__last; return __res;} // 25.2.5'template Kinline void fill (_FwdIter __first, _FwdIter __last, const _TypeT& __value){* _RWSTD_ASSERT_RANGE (__first, __last);, for ( ; !(__first == __last); ++__first) *__first = __value;}7template Jinline void fill_n (_OutputIter __first, _Size __n, const _TypeT& __value){# for (;__n > 0;--__n, ++__first) *__first = __value;}} // namespace std_RWSTD_NAMESPACE (__rw) { G// `less than' qusi-function object - used by algorithms for code reusetemplate struct __rw_lt{F bool operator() (const _TypeT &__lhs, const _TypeT &__rhs) const { return __lhs < __rhs; }};$#ifndef _RWSTD_NO_CLASS_PARTIAL_SPEC# define _RWSTD_LESS(iterT) \I _RW::__rw_lt<_TYPENAME _STD::iterator_traits< iterT >::value_type>()4#else // if defined (_RWSTD_NO_PARTIAL_CLASS_SPEC)# define _RWSTD_LESS(iterT) \2 _RW::__rw_make_lt (_RWSTD_VALUE_TYPE (iterT))template ,__rw_lt<_TypeT> __rw_make_lt (const _TypeT*){ return __rw_lt<_TypeT>();}(#endif // _RWSTD_NO_PARTIAL_CLASS_SPEC.// swaps values of 2 (possibly distinct) types%template 0inline void __rw_swap (_TypeT& __a, _TypeU& __b){; // _TypeT must satisfy Assignable and CopyConstructible _TypeT __tmp = __a; __a = __b; __b = __tmp;}} // namespace __rw_RWSTD_NAMESPACE (std) { // 25.2.2, p1template +inline void swap (_TypeT& __a, _TypeT& __b){K // lwg issue 227 - _TypeT must satisfy Assignable and CopyConstructible _TypeT __tmp = __a; __a = __b; __b = __tmp;} // 25.2.2, p7+template 4inline void iter_swap (_FwdIter1 __a, _FwdIter2 __b){B // std::iterator_traits<_FwdIter[12]>::value_type must satisfy, // both Assignable and CopyConstructible _RW::__rw_swap (*__a, *__b);}// 25.1.7 - Mismatch/template %inline pair<_InputIter1, _InputIter2>Jmismatch (_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2){, _RWSTD_ASSERT_RANGE (__first1, __last1);> while (!(__first1 == __last1) && *__first1 == *__first2) { ++__first1; ++__first2; }? return pair<_InputIter1, _InputIter2> (__first1, __first2);}Gtemplate %inline pair<_InputIter1, _InputIter2>4mismatch (_InputIter1 __first1, _InputIter1 __last1,8 _InputIter2 __first2, _BinaryPredicate __pred){, _RWSTD_ASSERT_RANGE (__first1, __last1);E while (!(__first1 == __last1) && __pred (*__first1, *__first2)) { ++__first1; ++__first2; }? return pair<_InputIter1, _InputIter2> (__first1, __first2);}// 25.1.8 - Equal/template inline boolGequal (_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2){I return __last1 == _STD::mismatch (__first1, __last1, __first2).first;}Gtemplate =inline bool equal (_InputIter1 __first1, _InputIter1 __last1,A _InputIter2 __first2, _BinaryPredicate __pred){8 return __last1 == _STD::mismatch (__first1, __last1,> __first2, __pred).first;}&// 25.3.8 - Lexicographical Comparison/template Hbool lexicographical_compare (_InputIter1 __first1, _InputIter1 __last1,I _InputIter2 __first2, _InputIter2 __last2);?template Gbool lexicographical_compare(_InputIter1 __first1, _InputIter1 __last1,G _InputIter2 __first2, _InputIter2 __last2,. _Compare __comp);} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif##ifdef _RWSTD_NO_IMPLICIT_INCLUSION$# include #endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif&#endif // _RWSTD_ALGOBASE_H_INCLUDEDww HHn7ԦL/*************************************************************************** *> * _array.h - Declarations for the Standard Library __rw_array *E * This is an internal header file used to implement the C++ Standard? * Library. It should never be #included directly by a program. *0 * $Id: //stdlib/3.0-rel/include/rw/_array.h#2 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development C ompany, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies there of may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/#ifndef _RWSTD_ARRAY_H_INCLUDED#define _RWSTD_ARRAY_H_INCLUDED#include #include #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (__rw) { template class __rw_array{public:( typedef _RWSTD_SIZE_T size_type;) typedef _TypeT value_type;& typedef value_type* pointer;( typedef value_type& reference;, typedef const value_type* const_pointer;. typedef const value_type& const_reference; __rw_array () : _C_size (0), _C_data (0) { }% // allocate but do not initialize __rw_array (size_type);) // allocate and initialize from value, __rw_array (const_reference, size_type);, // allocate and initialize from an array* __rw_array (const_pointer, size_type);) __rw_array (const __rw_array &__rhs); ~__rw_array () { resize (0); }4 __rw_array& operator= (const __rw_array &__rhs); size_type size () const { return _C_size; }3 value_type operator[] (size_type __inx) const {( _RWSTD_ASSERT (__inx < size ()); return begin () [__inx]; }, reference operator[] (size_type __inx) {( _RWSTD_ASSERT (__inx < size ()); return begin () [__inx]; }" void swap (__rw_array &__rhs); pointer begin () { return _C_data; }" const_pointer begin () const { return _C_data; } pointer  end () {" return begin () + size (); } const_pointer end () const {" return begin () + size (); }= void resize (size_type, const_reference = value_type ());private:. size_type _C_size; // number of elements- pointer _C_data; // array of elements};template 5inline __rw_array<_TypeT>::__rw_array (size_type __n) : _C_size (__n){ if (__n) {. _C_data = _RWSTD_STATIC_CAST (pointer,N ! ::operator new (__n * sizeof *_C_data)); } else _C_data = 0;}template Linline __rw_array<_TypeT>::__rw_array (const_reference __val, size_type __n) : _C_size (__n){ if (__n) {. _C_data = _RWSTD_STATIC_CAST (pointer,N ::operator new (__n * sizeof *_C_data));> _STD::uninitialized_fill_n (begin (), size (), __val); } else _C_data = 0;}template <"class _TypeT>Kinline __rw_array<_TypeT>::__rw_array (const_pointer __data, size_type __n) : _C_size (__n){  if (__n) {. _C_data = _RWSTD_STATIC_CAST (pointer,N ::operator new (__n * sizeof *_C_data));B _STD::uninitialized_copy (__data, __data + __n, begin ()); } else _C_data = 0;}template Ginline __rw_array<_TypeT>::__rw_array (const __rw_array<_TypeT> &__rhs) : _C_size (__rhs.size #()){  if (__rhs.size ()) {. _C_data = _RWSTD_STATIC_CAST (pointer,P ::operator new (_C_size * sizeof *_C_data));J _STD::uninitialized_copy (__rhs.begin (), __rhs.end (), begin ()); } else _C_data = 0;}template inline __rw_array<_TypeT>&?__rw_array<_TypeT>::operator= (const __rw_array<_TypeT> &__rhs){! if (__rhs.size () == size ())4 // do not allocate, just copy for efficiency< $ _STD::copy (__rhs.begin (), __rhs.end (), begin ()); else8 // allocate and copy into a temporary, then swap1 __rw_array <_TypeT> (__rhs).swap (*this); return *this;}template @inline void __rw_array<_TypeT>::swap (__rw_array<_TypeT> &__rhs){$ pointer __tmp_data = begin ();# size_type __tmp_size = size ();# _C_data = __rhs.begin ();" _C_size = __rhs.size (); __rhs._C_data = __tmp_data; __rhs._C_s%ize = __tmp_size;}template inline void __rw_array<_TypeT>::Fresize (size_type __size, const_reference __val /* = value_type () */){ if (begin ()) {( __rw_destroy (begin (), end ());% ::operator delete (begin ()); _C_data = 0; } if ((_C_size = __size)) {. _C_data = _RWSTD_STATIC_CAST (pointer,J ::operator new (_C_size * sizeof *_C_data));= _STD::uninitialized_fill_n (_C_data, _C_size, __val); }}} // namespace __rwE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif##endif // _RWSTD_ARRAY_H_INCLUDEDww'ERn7Ԧ// -*- C++ -*-L/*************************************************************************** *9 * _autoptr.h - definition of the class template auto_ptr *E * This is an internal header file used to implement the C++ Standard? * Library. It should never be #included directly by a program. *2 * $Id: //stdlib/3.0-rel/include/rw/_autoptr.h#2 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard ( Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Softwa )re, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any othe *r copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights+ at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *M **************************************************************************/ !#ifndef _RWSTD_AUTOPTR_H_INCLUDED!#define _RWSTD_AUTOPTR_H_INCLUDED#include #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#i,f defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) { #// 20.4.5 - Template class auto_ptrtemplate class auto_ptr;F// 20.4.5, p2 (defined outside of auto_ptr<> according to the proposed// resolution of lwg issue 127)template class auto_ptr_ref {"#ifndef _RWSTD_NO_MEMBER_TEMPLATES template  frie-nd class auto_ptr;: // implicit conversion from auto_ptr available only> // if U* is implicitly convertible to T* (via inheritance) template J auto_ptr_ref (auto_ptr<_TypeU>& __rhs, const _TypeU* = 0) _THROWS (())I : _C_ptr (_RWSTD_REINTERPRET_CAST (auto_ptr<_TypeT>&, __rhs)) { }2#else // if defined (_RWSTD_NO_MEMBER_TEMPLATES)public:D // useless, auto_ptr_ref necessary only for auto_ptr conversionsJ auto_ptr_ref (auto_ptr<_TypeT>& __rh.s, const _TypeT* = 0) _THROWS (()) : _C_ptr (__rhs) { }&#endif // _RWSTD_NO_MEMBER_TEMPLATES. // reference to the owning auto_ptr object auto_ptr<_TypeT>& _C_ptr;};templateclass auto_ptr{public: typedef _TypeT element_type; // 20.4.5.1, p1; _EXPLICIT auto_ptr (element_type* __p = 0) _THROWS (()) : _C_ptr (__p) { } // 20.4.5.1, p2+ auto_ptr (auto_ptr& __rhs) _THROWS (())$ : _C_ptr (__rhs.release ()) { }/ // 20.4.5.1, p79 auto_ptr& operator= (auto_ptr& __rhs) _THROWS (()) { ! reset (__rhs.release ()); return *this; } // 20.4.5.1, p13 ~auto_ptr () _THROWS (()) { delete _C_ptr; }"#ifndef _RWSTD_NO_MEMBER_TEMPLATES // 20.4.5.1, p4 template 3 auto_ptr (auto_ptr<_TypeU>& __rhs) _THROWS (())# : _C_ptr (__rhs.release ()) { } // 20.4.5.1, p10 template B auto_ptr& operator= (a0uto_ptr<_TypeU>& __rhs) _THROWS (()) { ! reset (__rhs.release ()); return *this; } // 20.4.5.3, p3 template 2 operator auto_ptr_ref<_TypeU>() _THROWS (()) {A // convertible only if T* is implicitly convertible to U*3 return auto_ptr_ref<_TypeU>(*this, _C_ptr); } // 20.4.5.3, p4 template . operator auto_ptr<_TypeU>() _THROWS (()) {, return auto_ptr<_TypeU>(release ()); }2#e1lse // if defined (_RWSTD_NO_MEMBER_TEMPLATES)' // 20.4.5.3, p3 (limited to T == U)2 operator auto_ptr_ref<_TypeT>() _THROWS (()) {3 return auto_ptr_ref<_TypeT>(*this, _C_ptr); }&#endif // _RWSTD_NO_MEMBER_TEMPLATES // 20.4.5.2, p13 element_type& operator* () const _THROWS (()) {$ _RWSTD_ASSERT (0 != get ()); return *get ();  } // 20.4.5.2, p3J _RWSTD_OPERATOR_ARROW (element_type* operator-> () const _THROWS (())) 2// 20.4.5.2, p4- element_type* get () const _THROWS (()) { return _C_ptr; } // 20.4.5.2, p5, element_type* release () _THROWS (()) { % element_type* __tmp = _C_ptr; _C_ptr = 0; return __tmp;  } // 20.4.5.2, p76 void reset (element_type* __p = 0) _THROWS (()) {  if (_C_ptr != __p) { delete _C_ptr; _C_ptr = __p; } } // 20.4.5.3, p1: auto_ptr (auto_ptr_ref __r) _THROWS (())( : _C_ptr (__r._C_ptr.release ()) { }+ // 20.4.5.3, p? - follows lwg issue 127I auto_ptr& operator= (auto_ptr_ref __rhs) _THROWS (()) {( reset (__rhs._C_ptr.release ()); return *this; }private: element_type* _C_ptr;};} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif%#endif // _RWSTD_AUTOPTR_H_INCLUDEDww5_\n7ԦL/*************************************************************************** ** * _cat.h - Declarations for XPG4 messages *E * This is an internal header file used to implement the C++ Standard? * Library. It should never be #included directly by a program. *. * $Id: //stdlib/3.0-rel/include/rw/_cat.h#2 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * 6Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F7 * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided 8 or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applic9able. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/#ifndef _RWSTD_CAT_H_INCLUDED#define _RWSTD_CAT_H_INCLUDED#include #include "#include #include (#if defined (_WIN32) || defined (_WIN64)# define _RWSTD_USE_RC 1# include #endif#if defined(__DECCXX)# ifdef __:PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endifN#define NL_SETD 1 /* XPG3 Conformant Default set number. */;#define NL_CAT_LOCALE (-1) /* XPG4 requirement */;#define NL_CAT_LOCALE (-1) /* XPG4 requirement */+#define _RWCAT_C!;OOKIE 0xAB34BC56_RWSTD_NAMESPACE (__rw) { #ifndef _RWSTD_USE_RC%// NULL implementation (does nothing)class __rw_cat{public:" __rw_cat(const char*, int) { } ~__rw_cat() { } __rw_cat* id () { return this; } bool good () const { return false; }5 const char* catgets (int, int, const char *__s) { return __s; }};%#else // if defined (_RWSTD_USE_RC)#define NL_TEXTMAX 8024 9// Cat<alog type hold relationship between cat id and fileclass __rw_cat{public:9 typedef _STD::map,M _STD::allocator<_STD::pair > > __cat_type;. typedef __cat_type::value_type __msg_type; protected: HINSTANCE __cat; __cat_type __msgs;public:' __rw_cat (const char *__fname, int)K : __cat (__fname ? LoadLibrary (__fname) : GetModuleHandle (0)) { } ~__rw_cat () = { if (__cat) FreeLibrary (__cat); } __rw_cat* id () { return this; } bool good () { return !!__cat; } HINSTANCE cat () { return __cat; }0 const char* catgets (int, int, const char*);};#endif //_RWSTD_USE_RC} // namespace __rwtypedef _RW::__rw_cat* nl_catd;typedef int nl_item;int catclose (nl_catd);5const char* catgets (nl_catd, int, int, const char*);'nl_catd catopen (const char*, int);E#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif #endif // _RWSTD_CAT_H_INCLUDEDww " кp7ԦL/*************************************************************************** *? * _podarray.h - definition of a fast array-like class template7 *E * This is an internal header file used to implement the C++ Standard ? * Library. It should never be #included directly by a program.N *3 * $Id: //stdlib/3.0-rel/include/rw/_podarray.h#3 $A *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Develop @efn7ԦL/*************************************************************************** *K * _codecvt.cc - Definitions for the Standard Library code conversion facet *3 * $Id: //stdlib/3.0-rel/include/rw/_codecvt.cc#3 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Co Ansistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright B laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. ThiCs computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 UDSA. *L **************************************************************************/#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) { 6template 2locale::id codecvt<_InternT,_ExternT,_StateT>::id;} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endifww Fηpn7ԦL/*************************************************************************** *9 * _codecvt.h - Definitions of the code conversion facets *E * This is an internal header file used to implement the C++ Standard? * Library. It should never be #included directly by a program. *2 * $Id: //stdlib/3.0-rel/include/rw/_codecvt.h#2 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Com Gpany, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Ri Hghts Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof I may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.22J7-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/!#ifndef _RWSTD_CODECVT_H_INCLUDED!#define _RWSTD_CODECVT_H_INCLUDED#include #ifdef _V3_LOCALE&# include #else#include #include #include _RWSTD_CSTDLIB#if defined(__DECCXX)# ifdeKf __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) { $// 22.2.1.5 - Template class codecvtclass codecvt_base{public:/ enum result { ok, partial, error, noconv };};O// primary template - a stub implementation that doesn'tL perform any conversionG// specializations on user-defined character types or state type can be%// implemented to do something useful8template $class codecvt: public locale::facet," public codecvt_base{public:! typedef _InternT intern_type;! typedef _ExternT extern_type; typedef _StateT state_type; protected:% // 22.2.1.5.2 - virtual functionsC // inline virtual functions defined first to allow M compilers toB // inline their definitions when being called from nonvirtuals // 22.2.1.5.2, p1' virtual result do_out (state_type&,B const intern_type*, const intern_type*,/ const intern_type*&,M extern_type*, extern_type*, extern_type*&) const { return noconv; }: virtual result do_in (state_type&, const extern_type*,B const extern_type*, const extern_typNe*&,L intern_type*, intern_type*, intern_type*&) const { return noconv; }, // 22.2.1.5.2, p5 - stores no characters> virtual result do_unshift (state_type&, extern_type *__to,M extern_type*, extern_type *&__to_next) const { __to_next = __to; return noconv; } // 22.2.1.5.2, p73 virtual int do_encoding () const _THROWS (()) {I return 1; // 1 external char converts to a singlOe internal char } // 22.2.1.5.2, p89 virtual bool do_always_noconv () const _THROWS (()) {4 return true; // conversion never necessary } // 22.2.1.5.2, p9 virtual int6 do_length (state_type&, const extern_type* __from,H const extern_type *__end, _RWSTD_SIZE_T __maxlen) const {- // will not hold for shift sencodings+ _RWSTD_SIZE_T __n = __end - __from;5 return int (__n < __maxlen ? __n : __maxlen); }P // 22.2.1.5.2, p115 virtual int do_max_length () const _THROWS (()) {L // returns the max value do_length (s, from, from_end, 1) can returnI // for any valid range [from, from_end) - see LWG issue 74 (a DR) return 1; } public:J _EXPLICIT codecvt (_RWSTD_SIZE_T __ref = 0): locale::facet (__ref) { } // 22,2,1,5,1, p1$ result out (state_type& __state,I const intern_type* __from, const intern_type* __from_end,0 Q const intern_type*& __from_next,; extern_type* __to, extern_type* __to_limit,0 extern_type*& __to_next) const {< return do_out(__state,__from,__from_end,__from_next,1 __to,__to_limit,__to_next); } // 22,2,1,5,1, p2; result unshift (state_type& __state, extern_type* __to,M extern_type* __to_limit, extern_type*& __to_next) const {> return do_unshift (__state,__to,__to_limit,__to_next);R } // 22,2,1,5,1, p3> result in (state_type& __state, const extern_type* __from,N const extern_type* __from_end, const extern_type*& __from_next,: intern_type* __to, intern_type* __to_limit,/ intern_type*& __to_next) const {< return do_in (__state,__from,__from_end,__from_next,1 __to,__to_limit,__to_next); } // 22,2,1,5,1, p5. bool always_noconv () const _THROWS (()) {" return do_alSways_noconv(); } // 22,2,1,5,1, p4( int encoding () const _THROWS (()) { return do_encoding(); } // 22,2,1,5,1, p6? int length (state_type& __state, const extern_type* __from,G const extern_type* end, _RWSTD_SIZE_T __maxlen) const {: return do_length (__state, __from, end, __maxlen); } // 22,2,1,5,1, p7* int max_length() const _THROWS (()) { return do_max_length(); } static locale::id id;T // Rogue Wave extension:> typedef basic_string,1 allocator > external_string_type;> typedef basic_string,1 allocator > internal_string_type;A internal_string_type in (const external_string_type &) const;B external_string_type out (const internal_string_type &) const; // Implementation:> enum { _C_faUcet_cat = locale::ctype, _C_ok_implicit = 1 };private:!#ifdef _RWSTD_NO_MEMBER_TEMPLATES( locale::id &_C_get_id (void) const { return id; }#endif};(// 22.2.1.5, p3 - performs no conversion_RWSTD_SPECIALIZED_CLASS2class _RWSTD_EXPORT codecvt : public locale::facet, public codecvt_base{public:% typedef char extern_type; " typedef char intern_type;! typedef mbstate_t state_type; protecVted:' virtual result do_out (state_type&,I const intern_type *__from, const intern_type*,; const intern_type *&__from_next,; extern_type *__to, extern_type*,; extern_type *&__to_next) const { __from_next = __from; __to_next = __to; return noconv;  }& virtual result do_in (state_type&,H const extern_type *__from, con Wst extern_type*,: const extern_type *&__from_next,9 intern_type *__to, intern_type*,: intern_type*& __to_next) const { __from_next = __from; __to_next = __to; return noconv;  }, // 22.2.1.5.2, p5 - stores no characters> virtual result do_unshift (state_type&, extern_type *__to,M extern_type*, extern_type *&__to_next) const { __to_next = X__to; return noconv; }3 virtual int do_encoding () const _THROWS (()) {I return 1; // 1 external char converts to a single internal char }8 virtual bool do_always_noconv () const _THROWS (()){4 return true; // conversion never necessary }- virtual int do_length (const state_type&,5 const extern_type *__from,9 const extern_type *__from_end,? _RWSTD_SIZEY_T __maxlen) const {) // 22.2.1.5.2, p9 - preconditions- _RWSTD_ASSERT (__from <= __from_end); // 22.2.1.5.2, p102 _RWSTD_SIZE_T __len = __from_end - __from;9 return int (__len < __maxlen ? __len : __maxlen); }5 virtual int do_max_length () const _THROWS (()) {& return 1; // 22.2.1.5.2, p11 }public:0 _EXPLICIT codecvt (_RWSTD_SIZE_T __refs = 0)3 : locale::facet (__refs, locale::ctype) { }$ result Z out (state_type &__state,I const intern_type *__from, const intern_type* __from_end,0 const intern_type *&__from_next,; extern_type* __to, extern_type* __to_limit,0 extern_type *&__to_next) const {@ return do_out (__state, __from, __from_end, __from_next,4 __to, __to_limit, __to_next); }( result unshift (state_type &__state,? extern_type *__to, extern_type *__to_limit,4 [ extern_type*& __to_next) const {A return do_unshift (__state, __to, __to_limit, __to_next); }# result in (state_type &__state,H const extern_type *__from, const extern_type *__from_end,/ const extern_type *&__from_next,: intern_type *__to, intern_type *__to_limit,/ intern_type *&__to_next) const {? return do_in (__state, __from, __from_end, __from_next,3 __to, __to_limit\, __to_next); }( int encoding () const _THROWS (()) { return do_encoding (); }. bool always_noconv () const _THROWS (()) {# return do_always_noconv (); }E int length (const state_type &__state, const extern_type *__from,J const extern_type *__end, _RWSTD_SIZE_T __maxlen) const {< return do_length (__state, __from, __end, __maxlen); }* int max_length () const _THROWS (()) { return do_max_length (); ] } static locale::id id;#ifndef _RWSTD_NO_EXT_LOCALE // Rogue Wave extension:( typedef string internal_string_type;( typedef string external_string_type;F internal_string_type in (const external_string_type & __s) const { return __s; }F external_string_type out (const internal_string_type &__s) const { return __s; } #endif // _RWSTD_NO_EXT_LOCALE // Implementation:> enum { _C_facet_cat = locale::ctype, _C_ok_impli^cit = 1 };!#ifdef _RWSTD_NO_MEMBER_TEMPLATESprivate:$ locale::id& _C_get_id () const { return id; }&#endif // _RWSTD_NO_MEMBER_TEMPLATES};#ifndef _RWSTD_NO_WCHAR_T=// 22.2.1.5, p3 - converts between wide and narrow characters9// of the native character set (i.e., widens and narrows)_RWSTD_SPECIALIZED_CLASS5class _RWSTD_EXPORT codecvt : public locale::facet, public codecvt_base{public:" typedef wc_har_t intern_type;" typedef char extern_type;! typedef mbstate_t state_type; protected: inline virtual result@ do_out (state_type&, const intern_type*, const intern_type*, const intern_type*&,= extern_type*, extern_type*, extern_type*&) const;  inline virtual result do_in (state_type&,G const extern_type*, const extern_type*, const extern_type*&,< intern_type*, intern_type*, intern_type*&) const;, //` 22.2.1.5.2, p5 - stores no characters> virtual result do_unshift (state_type&, extern_type *__to,M extern_type*, extern_type *&__to_next) const { __to_next = __to; return noconv; }9 virtual bool do_always_noconv () const _THROWS (()) {6 return false; // conversion always necessary }3 virtual int do_encoding () const _THROWS (()) {I return 1; // 1 external char converts to a single internal char a} virtual int< do_length (const state_type&, const extern_type* __from,M const extern_type* __from_end, _RWSTD_SIZE_T __maxlen) const {) // 22.2.1.5.2, p9 - preconditions- _RWSTD_ASSERT (__from <= __from_end); // 22.2.1.5.2, p102 _RWSTD_SIZE_T __len = __from_end - __from;9 return int (__len < __maxlen ? __len : __maxlen); }5 virtual int do_max_length () const _THROWS (()) { return 1; }public: b0 _EXPLICIT codecvt (_RWSTD_SIZE_T __refs = 0)1 : locale::facet(__refs,locale::ctype) { }$ result out (state_type& __state,I const intern_type *__from, const intern_type *__from_end,0 const intern_type *&__from_next,; extern_type *__to, extern_type* __to_limit,1 extern_type *& __to_next) const {F return do_out (__state, __from, __from_end, __from_next, __to,. __to_limit, __to_next); c }( result unshift (state_type &__state,? extern_type *__to, extern_type *__to_limit,4 extern_type *&__to_next) const {A return do_unshift (__state, __to, __to_limit, __to_next); }# result in (state_type& __state,H const extern_type *__from, const extern_type *__from_end,/ const extern_type *&__from_next,: intern_type *__to, intern_type *__to_limit,/ intern_type *&__to_dnext) const {? return do_in (__state, __from, __from_end, __from_next,3 __to, __to_limit, __to_next); }( int encoding () const _THROWS (()) { return do_encoding(); }. bool always_noconv () const _THROWS (()) {# return do_always_noconv (); }* int length (const state_type &__state,D const extern_type *__from, const extern_type *__end,/ _RWSTD_SIZE_T __maxlen) const {< return do_elength (__state, __from, __end, __maxlen); }* int max_length () const _THROWS (()) { return do_max_length (); } static locale::id id; // Rogue Wave extension:( typedef string external_string_type;) typedef wstring internal_string_type; inline@ internal_string_type in (const external_string_type&) const;A external_string_type out (const internal_string_type&) const; // Implementation:> enum { _C_facet_cat = locale::ctype, _fC_ok_implicit = 1 };!#ifdef _RWSTD_NO_MEMBER_TEMPLATESprivate:$ locale::id& _C_get_id () const { return id; }&#endif // _RWSTD_NO_MEMBER_TEMPLATES};inline codecvt_base::result#codecvt::do_out (state_type&,A const intern_type *__from, const intern_type *__from_end,( const intern_type *&__from_next,P extern_type *__to, extern_type *__to_end, extern_type *&__to_next) const{% // 22.2.1.5.2, p1 - precongditions) _RWSTD_ASSERT (__from <= __from_end);' _RWSTD_ASSERT (__to <= __to_end);) // copy internal sequence to external0 for (__from_next = __from, __to_next = __to;< __from_next != __from_end && __to_next != __to_end;$ ++__from_next, ++__to_next)= // prevent conversion problems due to char signednessF *__to_next = _RWSTD_STATIC_CAST (unsigned char, *__from_next); return ok;}inline codecvt_base::result!codecvt::do_in (state_type&,@ const extern_type *__from, const extern_type *__from_end,' const extern_type *&__from_next,O intern_type *__to, intern_type *__to_end, intern_type *&__to_next) const{% // 22.2.1.5.2, p1 - preconditions) _RWSTD_ASSERT (__from <= __from_end);' _RWSTD_ASSERT (__to <= __to_end);) // copy external sequence to internal0 for (__from_next = __from, __to_next = __to;< __from_next != __from_end && __to_next != __tio_end;& ++__from_next, ++__to_next) {= // prevent conversion problems due to char signednessF *__to_next = _RWSTD_STATIC_CAST (unsigned char, *__from_next); } return ok;}inline wstring?codecvt::in (const string &__s) const{7 // use an extension: allocate but do not initialize$ wstring __res ((wchar_t*)0, 64); for ( ; ; ) {7 // try to convert, resizing buffer if necessary _RWSTD_SIZE_T __n j=C mbstowcs (&__res [0], __s.c_str (), __res.capacity ());% if (__res.capacity () == __n) // increase capacity2 __res.reserve (__res.capacity () * 2);, else if ((_RWSTD_SIZE_T)(-1) == __n)4 return wstring (); // mbstowcs() error else {" // shrink if necessary __res.resize (__n); break; } } return __res;} inline stringAcodecvt::out (const wstring &__s) const{7 // use an extension: allocate but do not initialize string __res ((char*)0, 64); for ( ; ; ) {7 // try to convert, resizing buffer if necessary _RWSTD_SIZE_T __n =C wcstombs (&__res [0], __s.c_str (), __res.capacity ());% if (__res.capacity () == __n) // increase capacity2 __res.reserve (__res.capacity () * 2);, else if ((_RWSTD_SIZE_T)(-1) == __n)3 returnl string (); // wcstombs() error else {" // shrink if necessary __res.resize (__n); break; } } return __res;}#endif // _RWSTD_NO_WCHAR_T // 22.2.1.68template Aclass codecvt_byname: public codecvt<_InternT, _ExternT, _StateT>{public: ! typedef _InternT intern_type;! typedef _ExternT extern_type;! typedef _StateT state_type; C _EXPLICImT codecvt_byname (const char*, _RWSTD_SIZE_T __ref = 0); : codecvt <_InternT, _ExternT, _StateT> (__ref) { } protected: virtual codecvt_base::result do_out (state_type&,H const intern_type*, const intern_type*, const intern_type*&,> extern_type*, extern_type*, extern_type*&) const {# return codecvt_base::error; } virtual codecvt_base::result do_in (state_type&,G const extern_type*, const extern_type*, const extern_ntype*&,= intern_type*, intern_type*, intern_type*&) const {# return codecvt_base::error; } virtual codecvt_base::result do_unshift (state_type&,B extern_type*, extern_type*, extern_type*&) const {# return codecvt_base::error; }3 virtual int do_encoding () const _THROWS (()) { return -1; }9 virtual bool do_always_noconv () const _THROWS (()) { return false; }};6template B_TYPENAME codecvt<_InternT,_ExternT,_StateT>::internal_string_typeNcodecvt<_InternT,_ExternT,_StateT>::in (const external_string_type &__s) const{C // Calculate the number of intern_type's that will be produced.@ // I'm not sure what to use for max in the do_length call --C // too bad char_traits can't tell me. This needs to be revisedD // to use separate in and out versions of do_length once someone& // comes up with the right syntax.A p // FIXME: get rid of this hardcoded size and dynamically grow6 // (use the result string to avoid copying); int __n = 1000; // do_length(state_type(0),__s.c_str(),1 // __s.c_str()+__s.length(),H // numeric_limits::max() / do_max_length()); ) const extern_type* __unused_from = 0;) intern_type* __unused_to = 0; < intern_type *__conversion_buffer = new intern_type[__n];% state_type __stt = stateq_type (); __n = do_in (__stt,H __s.c_str(), __s.c_str() + __s.length(), __unused_from,N __conversion_buffer, __conversion_buffer + __n, __unused_to);4 internal_string_type __res (__conversion_buffer,; __conversion_buffer + __n);! delete[] __conversion_buffer; return __res;}_RWSTD_SPECIALIZED_CLASS<class _RWSTD_EXPORT codecvt_byname. : public codecvt{public:G _EXPLICIT codecvt_byname (const char* = 0, _RWSTD_SIZE_T __ref = 0)7 : codecvt (__ref) { } protected: virtual codecvt_base::result do_out (state_type&,H const intern_type*, const intern_type*, const intern_type*&,= extern_type*, extern_type*, extern_type*&) const; virtual codecvt_base::result do_in (state_type&,G const extern_type*, const extern_type*, const extern_type*&, s< intern_type*, intern_type*, intern_type*&) const; virtual codecvt_base::result do_unshift (state_type&,A extern_type*, extern_type*, extern_type*&) const;3 virtual int do_encoding () const _THROWS (()) {K // 7.20.7.2 of C99: if first arg is 0, mbtowc returns non-zero or 0L // if multibyte character encodings, respectively, do or do not have$ // state-dependent encodings4 return _RWSTD_MBRTOWC (0, 0, 0, 0) ? -1 : 1; t}9 virtual bool do_always_noconv () const _THROWS (()) {6 return false; // conversion always necessary }5 virtual int do_max_length () const _THROWS (()) {L // returns the max value do_length (s, from, from_end, 1) can returnI // for any valid range [from, from_end) - see LWG issue 74 (a DR)" // FIXME: call setlocale() return MB_CUR_MAX; }};inline codecvt_base::result+codecvt_byname ::do_unsuhift (mbstate_t& __state,5 extern_type* __to, extern_type* __to_end,* extern_type*& __to_next) const{0 intern_type __c = intern_type ();# const intern_type *__dummy = 0;@ // converting a null character to an external representation@ // will write out '\0' preceded by an "unshift" sequence and) // switch to initial conversion state4 return do_out (__state, &__c, &__c + 1, __dummy,. __to, __to_end, __to_next);}v} // namespace std_RWSTD_NAMESPACE (__rw) { ##ifndef _RWSTD_NO_FUNC_PARTIAL_SPECtemplate ;inline _STD::codecvt_byname<_CharT, char, _STD::mbstate_t>*P__rw_create_classic_facet (_STD::codecvt_byname<_CharT, char, _STD::mbstate_t>*){H return new _STD::codecvt_byname<_CharT, char, _STD::mbstate_t>("C");}template 4inline _STD::codecvt<_CharT, char, _STD::mbstate_t>*G__rw_create_named_facet (_STD::codecvt<_CharT, char, _STD::mbstate_t>*w,A const char *__name, _RWSTD_SIZE_T __ref){ returnO new _STD::codecvt_byname<_CharT, char, _STD::mbstate_t>(__name, __ref);}template ;inline _STD::codecvt_byname<_CharT, char, _STD::mbstate_t>*N__rw_create_named_facet (_STD::codecvt_byname<_CharT, char, _STD::mbstate_t>*,A const char *__name, _RWSTD_SIZE_T __ref){ return O new _STD::codecvt_byname<_CharT, char, _STD::mbstate_t>(__name, __rexf);}3#else // if defined (_RWSTD_NO_FUNC_PARTIAL_SPEC)_RWSTD_SPECIALIZED_FUNCTION9inline _STD::codecvt_byname*N__rw_create_classic_facet (_STD::codecvt_byname*){F return new _STD::codecvt_byname("C");}_RWSTD_SPECIALIZED_FUNCTION9inline _STD::codecvt_byname*L__rw_create_named_facet (_STD::codecvt_byname*,A y const char *__name, _RWSTD_SIZE_T __ref){P return new _STD::codecvt_byname(__name, __ref);}_RWSTD_SPECIALIZED_FUNCTION2inline _STD::codecvt*E__rw_create_named_facet (_STD::codecvt*,A const char *__name, _RWSTD_SIZE_T __ref){P return new _STD::codecvt_byname(__name, __ref);}#ifndef _RWSTD_NO_WCHAR_T_RWSTD_SPECIALzIZED_FUNCTION<inline _STD::codecvt_byname*P__rw_create_classic_facet (_STD::codecvt_byname*){I return new _STD::codecvt_byname("C");}_RWSTD_SPECIALIZED_FUNCTION5inline _STD::codecvt*H__rw_create_named_facet (_STD::codecvt*,A const char *__name, _RWSTD_SIZE_T __ref){ returnP new _S{TD::codecvt_byname(__name, __ref);}_RWSTD_SPECIALIZED_FUNCTION<inline _STD::codecvt_byname*O__rw_create_named_facet (_STD::codecvt_byname*,A const char *__name, _RWSTD_SIZE_T __ref){ returnP new _STD::codecvt_byname(__name, __ref);}#endif // _RWSTD_NO_WCHAR_T'#endif // _RWSTD_NO_FUNC_PARTIAL_SPEC} // namespace __rwE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif$#if _RWSTD_DEFINE_TEMPLATE (CODECVT)## include #endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif#endif // _V3_LOCALE%#endif // _RWSTD_CODECVT_H_INCLUDEDww}}n7ԦL/*************************************************************************** *I * _collate.cc - Definitions for the Standard Library character collation * facet *3 * $Id: //stdlib/3.0-rel/include/rw/_collate.cc#2 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possessi ~on, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * prote cted by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (__rw) { template __rw_collate_table<_CharT>J__rw_collate_impl<_CharT>::_C_default_table = { 0, { 0, 0, 0, 0, 0, 0 } };} // namespace __rw_RWSTD_NAMESPACE (std) { )// --------------------------------------*// Facet collate<_CharT> member templates.)// --------------------------------------template locale::id collate<_CharT>::id;template int collate<_CharT>::8do_compare (const _CharT* __low1, const _CharT* __high1,> const _CharT* __low2, const _CharT* __high2) const{& _RWSTD_ASSERT (__high1 >= __low1);& _RWSTD_ASSERT (__high2 >= __low2);% size_t __len1 = __high1 - __low1;% size_t __len2 = __high2 - __low2;6 size_t __len = __len1 < __len2 ? __len1 : __len2;* for ( ; __len--; __low1++, __low2++) {; typedef _TYPENAME string_type::traits_type _Traits;1 // avoid arithmetic on unknown char typesA _TYPENAME _Traits::int_type __i1 = _Traits::to_int_type (+ this->_C_coll_order (*__low1));A _TYPENAME _Traits::int_type __i2 = _Traits::to_int_type (+ this->_C_coll_order (*__low2)); I // use int_type to prevent signed versus unsigned char comparison0 if (!_Traits::eq_int_type (__i1, __i2)) ( return __i1 < __i2 ? -1 : 1;  }; return __len1 < __len2 ? -1 : __len2 < __len1 ? +1 : 0;}template &_TYPENAME collate<_CharT>::string_typeOcollate<_CharT>::do_transform (const _CharT *__low, const _CharT *__high) const{$ _RWSTD_ASSERT (__low <= __high);= // convert ptrdiff_t to size_type to prevent any amiguity7 typedef _TYPENAME string_type::size_type size_type;O // use an extension: allocate uninitialized string of (high - low) elementsE string_type __res ((const _CharT*)0, size_type (__high - __low));; _TYPENAME string_type::iterator __out = __res.begin ();. for ( ; __low != __high; ++__low, ++__out). *__out = this->_C_coll_order (*__low); return __res;}template Plong collate<_CharT>::do_hash (const _CharT *__start, const _CharT *__end) const{K // hash the result of do_transform, so that keys that transform equally/ // will hash equally, as per 22.2.4.1.2, p3: const string_type __s = do_transform (__start, __end); __start = __s.data ();& __end = __start + __s.length ();O // Peter Weinberger's generic hashing algorithm, adapted by Andrew BinstockO // from a version by Allen Holub (see Andrew Binstock, "Hashing Revisited",E // Dr. Dobb's Journal, April 1996) and templatized by Rogue Wave.A const int __long_bits = _RWSTD_CHAR_BIT * sizeof (long);1 const int __one_eighth = __long_bits / 8;5 const int __three_fourths = __long_bits * 3 / 4;F // subexpression parenthesized to prevent MSVC 13.00 warning C4554F const long __high_bits = ~0L << ( __long_bits - __one_eighth); long __res = 0;* for ( ; __start != __end; ++__start) {; typedef _TYPENAME string_type::traits_type _Traits;J __res = (__res << __one_eighth) + _Traits::to_int_type (*__start);) long __tmp = __res & __high_bits; if (__tmp)H __res = (__res ^ (__tmp >> __three_fourths)) & ~__high_bits; } return __res;}} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endifww =n7ԦL/*************************************************************************** *= * _collate.h - Definitions of the character collation facets *E * This is an internal header file used to implement the C++ Standard? * Library. It should never be #included directly by a program. *2 * $Id: //stdlib/3.0-rel/include/rw/_collate.h#2 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development  Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. Al l Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies the reof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/!#ifndef _RWSTD_COLLATE_H_INCLUDED!#define _RWSTD_COLLATE_H_INCLUDED#include #ifdef _V3_LOCALE&# include #else#include #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (__rw) { >// -----------------------------------------------------------?// Implementation class template -- __rw_collate_table<_CharT>.>// -----------------------------------------------------------I// Data structure that drives the collate<_CharT> process. It contains aL// binary tree of nodes, each of which defines the collation treatment to be$// applied to a range of characters.template struct __rw_collate_table{ struct _C_node {I _C_node *_C_left; // Node for _CharT values that are too small? _C_node *_C_right; // (resp. too large) for this node7 const _CharT *_C_table; // Translate table or NULL _CharT _C_min_c,F _C_max_c; // Range of _CharT-s covered by this nodeK _CharT _C_offset; // Amount to add to _CharT if _C_table is NULL };O long _C_length; // Length of memory block containing all the nodes5 _C_node _C_root; // Root node of _C_table};=// ---------------------------------------------------------->// Implementation class template -- __rw_collate_data<_CharT>.=// ----------------------------------------------------------M// collate<_CharT> derives from this (via __rw::__rw_collate_impl) to get its// private data members.template class __rw_collate_data{public:2 typedef __rw_collate_table<_CharT> table_type;4 typedef _TYPENAME table_type::_C_node node_type; const table_type *__table;@ __rw_collate_data (const table_type &__t): __table(&__t) { }( _CharT _C_coll_order (_CharT) const;};template Iinline _CharT __rw_collate_data<_CharT>::_C_coll_order (_CharT __c) const{- const node_type *__t = &__table->_C_root; while (__t) if (__c < __t->_C_min_c) __t = __t->_C_left;% else if (__c > __t->_C_max_c) __t = __t->_C_right; else { if (__t->_C_table)K __c = __t->_C_table [(_RWSTD_SIZE_T)(__c - __t->_C_min_c)]; else/ __c += _CharT (__t->_C_offset); break; } return __c;}=// ---------------------------------------------------------->// Implementation class template -- __rw_collate_impl<_CharT>.=// ----------------------------------------------------------J// Facet collate<_CharT> derives from this to get the part of its behavior,// that is specialized for char and wchar_t.template 9class __rw_collate_impl: public __rw_collate_data<_CharT>{7 static __rw_collate_table<_CharT> _C_default_table;public: __rw_collate_impl (void)9 : __rw_collate_data<_CharT>(_C_default_table) { }};C_RWSTD_INSTANTIATE_1 (class _RWSTD_EXPORT __rw_collate_impl);#ifndef _RWSTD_NO_WCHAR_TF_RWSTD_INSTANTIATE_1 (class _RWSTD_EXPORT __rw_collate_impl);#endif // _RWSTD_NO_WCHAR_T} // namespace __rw_RWSTD_NAMESPACE (std) { 8// -----------------------------------------------------9// Standard character collation facet -- collate<_CharT>.8// -----------------------------------------------------template class collate : public locale::facet,+ public _RW::__rw_collate_impl<_CharT>{public: typedef _CharT char_type;; typedef basic_string,/ allocator > string_type;0 _EXPLICIT collate (_RWSTD_SIZE_T __refs = 0)5 : locale::facet (__refs, locale::collate) { }C int compare (const char_type* __low1, const char_type* __high1,K const char_type* __low2, const char_type* __high2) const {< return do_compare(__low1, __high1, __low2, __high2); } string_typeG transform (const char_type* __low, const char_type* __high) const {+ return do_transform(__low, __high); }G long hash (const char_type* __low, const char_type* __high) const {& return do_hash(__low, __high); } static locale::id id; // Implementation:@ enum { _C_facet_cat = locale::collate, _C_ok_implicit = 1 }; protected: virtual int3 do_compare (const char_type*, const char_type*,: const char_type*, const char_type*) const; virtual string_type< do_transform (const char_type*, const char_type*) const;D virtual long do_hash (const char_type*, const char_type*) const;private: !#ifdef _RWSTD_NO_MEMBER_TEMPLATES( locale::id &_C_get_id (void) const { return id; }#endif};9_RWSTD_INSTANTIATE_1 (class _RWSTD_EXPORT collate);#ifndef _RWSTD_NO_WCHAR_T<_RWSTD_INSTANTIATE_1 (class _RWSTD_EXPORT collate);#endif // _RWSTD_NO_WCHAR_T3// ------------------------------------------------4// Standard derived facet -- collate_byname<_CharT>.3// ------------------------------------------------template ,class collate_byname: public collate<_CharT>{public: typedef _CharT char_type;: typedef basic_string,. allocator > string_type;J _EXPLICIT collate_byname (const char* __name, _RWSTD_SIZE_T __ref = 0)& : collate (__ref) {, this->_C_locale_name (__name, true); }};9// ------------------------------------------------------9// Standard facet specialization -- collate_byname.9// ------------------------------------------------------_RWSTD_SPECIALIZED_CLASS>class _RWSTD_EXPORT collate_byname: public collate{public:J _EXPLICIT collate_byname (const char* __name, _RWSTD_SIZE_T __ref = 0)B : collate(__ref), _C_collate_name (__name) { } protected: virtual int3 do_compare (const char_type*, const char_type*,: const char_type*, const char_type*) const;K virtual string do_transform (const char_type*, const char_type*) const;private: string _C_collate_name;};#ifndef _RWSTD_NO_WCHAR_T<// ---------------------------------------------------------<// Standard facet specialization -- collate_byname.<// ---------------------------------------------------------_RWSTD_SPECIALIZED_CLASSDclass _RWSTD_EXPORT collate_byname: public collate{public:J _EXPLICIT collate_byname (const char* __name, _RWSTD_SIZE_T __ref = 0)& : collate(__ref) {, this->_C_locale_name (__name, true); } protected: virtual int3 do_compare (const char_type*, const char_type*,: const char_type*, const char_type*) const;P virtual string_type do_transform (const char_type*, const char_type*) const;};#endif // _RWSTD_NO_WCHAR_T} // namespace std_RWSTD_NAMESPACE (__rw) { ##ifndef _RWSTD_NO_FUNC_PARTIAL_SPECtemplate inline _STD::collate<_CharT>*0__rw_create_named_facet (_STD::collate<_CharT>*,A const char *__name, _RWSTD_SIZE_T __ref){; return new _STD::collate_byname<_CharT>(__name, __ref);}template $inline _STD::collate_byname<_CharT>*7__rw_create_named_facet (_STD::collate_byname<_CharT>*,A const char *__name, _RWSTD_SIZE_T __ref){; return new _STD::collate_byname<_CharT>(__name, __ref);}template $inline _STD::collate_byname<_CharT>*9__rw_create_classic_facet (_STD::collate_byname<_CharT>*){0 return new _STD::collate_byname<_CharT>("");}3#else // if defined (_RWSTD_NO_FUNC_PARTIAL_SPEC)_RWSTD_SPECIALIZED_FUNCTIONinline _STD::collate*B__rw_create_named_facet (_STD::collate*, const char *__name,- _RWSTD_SIZE_T __ref){9 return new _STD::collate_byname(__name, __ref);}_RWSTD_SPECIALIZED_FUNCTION"inline _STD::collate_byname*I__rw_create_named_facet (_STD::collate_byname*, const char *__name,- _RWSTD_SIZE_T __ref){9 return new _STD::collate_byname(__name, __ref);}_RWSTD_SPECIALIZED_FUNCTION"inline _STD::collate_byname*7__rw_create_classic_facet (_STD::collate_byname*){. return new _STD::collate_byname("");}#ifndef _RWSTD_NO_WCHAR_T_RWSTD_SPECIALIZED_FUNCTIONinline _STD::collate*1__rw_create_named_facet (_STD::collate*,A const char *__name, _RWSTD_SIZE_T __ref){< return new _STD::collate_byname(__name, __ref);}_RWSTD_SPECIALIZED_FUNCTION%inline _STD::collate_byname*L__rw_create_named_facet (_STD::collate_byname*, const char *__name,- _RWSTD_SIZE_T __ref){< return new _STD::collate_byname(__name, __ref);}_RWSTD_SPECIALIZED_FUNCTION%inline _STD::collate_byname*:__rw_create_classic_facet (_STD::collate_byname*){1 return new _STD::collate_byname("");}#endif // _RWSTD_NO_WCHAR_T'#endif // _RWSTD_NO_FUNC_PARTIAL_SPEC} // namespace __rwE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif$#if _RWSTD_DEFINE_TEMPLATE (COLLATE)## include #endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif#endif // _V3_LOCALE%#endif // _RWSTD_COLLATE_H_INCLUDEDww n7ԦL/*************************************************************************** *? * _config.h - Compiler and C library configuration definitions *E * This is an internal header file used to implement the C++ Standard? * Library. It should never be #included directly by a program. *2 * $Id: //stdlib/3.0-rel/include/rw/_config.h#13 $ *L *************************************************************************** * B * Copyright 2003, 2006 Hewlett-Packard Developme nt Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** * J * Copyright (c) 1994-2002 Rogue Wave Software, Inc.  All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies  thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/ #ifndef _RWSTD_CONFIG_H_INCLUDED #define _RWSTD_CONFIG_H_INCLUDED#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endif#ifdef _RWSTD_USE_CONFIG# include #else%# include #endif // _RWSTD_USE_CONFIG// library version number// #define _RWSTD_VER 0x03000000// | | | |// AABBCCDD// | | | |H// | | | +--- DD = Point release or "patch" release. L// | | | Left D-digit is reserved for alpha releasesD// | | | and right D-digit for beta releases!// | | | 8// | | +----- CC = Maintenance number:// | +------- BB = Minor Release number:// +--------- AA = Major Release number#ifdef _RWSTD_NO_V3_LOCALE# undef _RWSTD_VER# define _RWSTD_VER 0x02020800#endifF/*********************************************************************F * OVERRIDES FOR CONFIGURATION MACROS *G *********************************************************************/E#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1829)#else9#if defined(__DECCXX) && !(defined(__STD_STRICT_ANSI) ||\G defined(__STD_STRICT_ANSI_ERRORS)) && !defined(__DECFIXCXXL661)% /* #define _RWSTD_NO_EXTENSIONS 1 */#else #define _RWSTD_NO_EXTENSIONS 1#endif#endif // __DECFIXCXXL1829C#if defined (_RWSTD_NO_EXTENSIONS) && !defined (_RWSTD_STRICT_ANSI)# define _RWSTD_STRICT_ANSI7#endif // _RWSTD_NO_EXTENSIONS && !_RWSTD_STRICT_ANSIG/********************** Apogee C++ ***********************************/>// Apogee C++ uses an EDG front end but doesn't define __EDG__#ifdef __APOGEE__#endif // __APOGEE__G/********************** IBM xlC **************************************/ #ifdef _AIX# if defined (__IBMCPP__)"# ifndef _RWSTD_NO_PURE_C_HEADERS$# define _RWSTD_NO_PURE_C_HEADERS&# endif // _RWSTD_NO_PURE_C_HEADERS"# if defined _RWSTD_NO_NEW_HEADER# undef _RWSTD_NO_NEW_HEADER"# endif // _RWSTD_NO_NEW_HEADERB// our libc headers put the libc functions in namespace std# ifdef _RWSTD_NO_LIBC_IN_STD # undef _RWSTD_NO_LIBC_IN_STD## endif // _RWSTD_NO_LIBC_IN_STD(# ifndef _RWSTD_NO_DEPRECATED_C_HEADERS*# define _RWSTD_NO_DEPRECATED_C_HEADERS# endif# ifdef _RWSTD_USE_CONFIG!# undef _RWSTD_ANSI_C_ASSERT_H # undef _RWSTD_ANSI_C_CTYPE_H # undef _RWSTD_ANSI_C_ERRNO_H # undef _RWSTD_ANSI_C_FLOAT_H!# undef _RWSTD_ANSI_C_ISO646_H!# undef _RWSTD_ANSI_C_LIMITS_H!# undef _RWSTD_ANSI_C_LOCALE_H# undef _RWSTD_ANSI_C_MATH_H!# undef _RWSTD_ANSI_C_SETJMP_H!# undef _RWSTD_ANSI_C_SIGNAL_H!# undef _RWSTD_ANSI_C_STDARG_H!# undef _RWSTD_ANSI_C_STDDEF_H # undef _RWSTD_ANSI_C_STDIO_H!# undef _RWSTD_ANSI_C_STDLIB_H!# undef _RWSTD_ANSI_C_STRING_H# undef _RWSTD_ANSI_C_TIME_H # undef _RWSTD_ANSI_C_WCHAR_H!# undef _RWSTD_ANSI_C_WCTYPE_H#endif //_RWSTD_USE_CONFIGG // static data members of cass templa tes aren't properly collapsedH // (compiler emits one copy per each translation unit that contains. // the definition of the template member)/# define _RWSTD_NO_COLLAPSE_TEMPLATE_STATICS> // the above prevents correct static mutex initialization9 // (but the alternative approach is also unreliable)'# define _RWSTD_NO_STATIC_MUTEX_INITB // temporarily disabled to prevent yet uncharacterized errors,# define _RWSTD_NO_EXPLICIT_INSTANTIATION(# define _RWSTD_N O_PRAGMA_INSTANTIATE9/* // avoid pulling in native headers until ours work!# define _RWSTD_NO_LIBC_IN_STD"# define _RWSTD_NO_NEW_HEADER*/I // disable bogus warning: ``A template dependent name that is a type+ // must be qualified with "typename"''&# pragma report (disable, CPPC0152)L // AIX, VisualAge for C++ version >= 5.0.2.0, the compiler defines the I // macro __TEMPINC__ unles the option -qnotempinc is present on the C // command line; when this happens, we disable II explicitly ;5 // also disable it for versions prior to 5.0.2.01# if __IBMCPP__ < 502 || !defined(__TEMPINC__)*# undef _RWSTD_NO_IMPLICIT_INCLUSION*# define _RWSTD_NO_IMPLICIT_INCLUSION # endif3# if __IBMCPP__ >= 502 && defined (__TEMPINC__))# undef _RWSTD_NO_IMPLICIT_INCLUSION-# endif // VAC++ >= 5.0.2 && __TEMPINC__## if !defined (_RWSTD_WCTRANS_T) # undef _RWSTD_NO_WCTRANS_T9# define _RWSTD_WCTRANS_T win_t(*wctrans_t)(wint_t)# endif // _RWSTD_WCTRANS_T# endif // __IBMCPP___#endif // _AIXG/********************** DEC cxx **************************************/8// Compaq C++ uses an EDG front end and #defines __EDG__#ifdef __DECCXX# if __DECCXX_VER < 60390008; // version of Compaq C++ prior to C++ do not implement/ // C++ C library headers (the kind) # define _RWSTD_NO_NEW_HEADER%# endif // __DECCXX_VER < 60390008# ifndef _RWSTD_SHARED_LIB8 // disable explicit instantiation in static library* // to prevent duplicate symbol errors,# define _RWSTD_NO_EXPLICIT_INSTANTIATION(# define _RWSTD_NO_PRAGMA_INSTANTIATE# endifG# if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1999)< // In standard gnu mode, implicit inclusion is disabled# if defined(__STD_GNU)0# if !defined(_RWSTD_NO_IMPLICIT_INCLUSION),# define _RWSTD_NO_IMPLICIT_INCLUSION # endif # endif# endif#endif // __DECCXXG/********************** EDG eccp *************************************/B// NOTE: the __EDG__ macro is #defined by most edg-based compilersK#if defined (__EDG__) && !defined (__DECCXX) && !defined (__INTEL_COMPILER)# ifndef __linux__# // not supported except on Linux$# define _RWSTD_NO_PURE_C_HEADERS*# define _RWSTD_NO_DEPRECATED_C_HEADERS# endif // __linux__# undef _RWSTD_NO_NEW_HEADER# undef _RWSTD_NO_LIBC_IN_STDA // the vanilla front-end doesn't actually #include the header,C // but it treats it specially instead, which throws off the test # undef _RWSTD_ANSI_C_STDARG_H +# define _RWSTD_ANSI_C_STDARG_H # ifdef _RWSTD_MULTI_THREADG // std::uncaught_exception() not thread-safe in the front-end demo(# define _RWSTD_NO_UNCAUGHT_EXCEPTION!# endif // _RWSTD_MULTI_THREAD#endif // __EDG__G/********************** gcc ******************************************/#ifdef __GNUG__&# ifndef _RWSTD_NO_IMPLICIT_INCLUSION(# define _RWSTD_NO_IMPLICIT_INCLUSION# endif*# if !defined (_RWSTD_USE_PURE_C_HEADERS)& // disabled except when requested$# define _RWSTD_NO_PURE_C_HEADERS(# endif // !_RWSTD_USE_PURE_C_HEADERS!# ifdef _RWSTD_NO_PURE_C_HEADERSE // deprecated C headers (the kind) are fully implementedD // in terms of the pure C++ C library headers (the kind)*# define _RWSTD_NO_DEPRECATED_C_HEADERS&# endif // _RWSTD_NO_PURE_C _HEADERSK# if !defined (_RWSTD_STRICT_ANSI) && __GNUG__ <= 2 && __GNUC_MINOR__ < 97 // prevent gcc 2.9x ICE&# define _RWSTD_NO_PLACEMENT_DELETE!# endif // !_RWSTD_STRICT_ANSIK# if __GNUG__ <= 2 && __GNUC_MINOR__ < 97 && defined (_RWSTD_NO_HONOR_STD)M // standard iostream objects are declared as objects of their respectiveM // types by defined as POD's to prevent their destruction during programH // lifetime (done to work around a g++ 2.95.2 bug that prevents g++M // from deducing the type of references to the objects in template code)*# define _RWSTD_NO_IOSTREAM_OBJECT_REFSH# endif //__GNUG__ <= 2 && __GNUC_MINOR__ < 97 && _RWSTD_NO_HONOR_STD<# define _RWSTD_GNUC_ATTRIBUTE(attr) __attribute__ (attr)# ifdef __linux__# ifdef _RWSTD_NO_NEW_HEADER!# undef _RWSTD_NO_NEW_HEADER$# endif // _RWSTD_NO_NEW_HEADERG // our libc headers put the libc functions in namespace std # ifdef _RWSTD_NO_LIBC_IN_STD"# undef _RWSTD_NO_LIBC_IN_STD%# endif // _RWSTD_NO_LIBC_IN_STD!# ifdef _RWSTD_ANSI_C_LIMITS_H( // prevent system header warnings## undef _RWSTD_ANSI_C_LIMITS_H:# define _RWSTD_ANSI_C_LIMITS_H <../include/limits.h>%# endif // _RWSTD_ANSI_C_LIMITS_H# endif # ifdef _AIXI // functions called from member functions of explicitly instantiatedG // class templates aren't "implicitly" instantiated (compiler bug),# define _RWSTD_NO_IMPLICIT_INSTANTIATION# endif# ifdef __hpux? // disable explicit instantiation in the library (causing 7 // uncharacterized linker problems on HP-UX 11.00)!# define _RWSTD_NO_INSTANTIATE# endif // __hpux& // force using /usr/include/math.h E // prevent recursion caused by pulling in gcc's own "fixed" header# undef _RWSTD_ANSI_C_MATH_H // use new C++ libc headers# undef _RWSTD_NO_NEW_HEADER# ifdef _RWSTD_USE_CONFIG # undef _RWSTD_NO_LIBC_IN_STD# endif)# undef _RWSTD_NO_DEPRECATED_LIBC_IN_STD# ifdef __CYGWIN__$ // use our own C++ libc headers# undef _RWSTD_NO_NEW_HEADER8 // disable long long handling (no libc support yet)# define _RWSTD_NO_LONG_LONG) // libc is wrapped in namespaces std # undef _RWSTD_NO_LIBC_IN_STDL // deprecated C++ libc headers don't introduce names into namespace std,# ifndef _RWSTD_NO_DEPRECATED_LIBC_IN_STD.# define _RWSTD_NO_DEPRECATED_LIBC_IN_STD # endif# endif // __CYGWIN__# ifdef __osf__D // sizeof (long double) == sizeof (double), 'L' causes SIGSEGV+# define _RWSTD_LDBL_PRINTF_PREFIX "",# define _RWSTD_LDBL_SCANF_PREFIX "l"# endif // __osf__# ifdef __sun__+# if __GNUG__ == 3 && __GNUC_MINOR__ < 1C // Avoid gcc 3.0.1 header configuration confusion with wchar"# ifndef _RWSTD_NO_NEW_HEADER$# define _RWSTD_NO_NEW_HEADER # endif## ifndef _RWSTD_NO_LIBC_IN_STD%# define _RWSTD_NO_LIBC_IN_STD # endif2# endif // __GNUG__ == 3 && __GNUC_MINOR__ < 1# endif // __sun__!#else // if !defined (__GNUG__)'# define _RWSTD_GNUC_ATTRIBUTE(ignore)#endif // __GNUG__G/********************** HP aCC ***************************************/#ifdef __HP_aCC$ // new C++ libc headers supported# undef _RWSTD_NO_NEW_HEADER"# ifndef _RWSTD_NO_PURE_C_HEADERS // disable for now$# define _RWSTD_NO_PURE_C_HEADERS&# endif // _RWSTD_NO_PURE_C_HEADERSJ // deprecated C++ libc headers don't introduce names into namespace std*# ifndef _RWSTD_NO_DEPRECATED_LIBC_IN_STD,# define _RWSTD_NO_DEPRECATED_LIBC_IN_STD# endif- // deprecated C++ libc headers aren't used(# define _RWSTD_NO_DEPRECATED_C_HEADERSD // prevents Error (future) 553: Expected type arguments to follow7 // class template name.&# define _RWSTD_REDUNDANT_TMPL_PARAMS9# if (__HP_aCC < 33300) && !defined(_RWSTD_NO_MBSTATE_T)L // mbstate_t definition is guarded in _mbstate_t.h and is available only : // if _INCLUDE__STDC_A1_SOURCE is defined; see comptest# define _RWSTD_NO_MBSTATE_T# endif#endif // __HP_aCCG/********************** Intel C++ ***********************************/#ifdef __INTEL_COMPILER+// # define _RWSTD_NO_DEPRECATED_C_HEADERS# undef _RWSTD_NO_NEW_HEADER# undef _RWSTD_NO_LIBC_IN_STD!# undef _RWSTD_NO_PURE_C_HEADERS#endif // __INTEL_COMPILERG/************************ SGI MIPSpro ********************************/@// SGI MIPSpro uses an EDG front end but doesn't #define __EDG__ #ifdef __sgiD// Currently, we identify the SGI MIPS Pro compiler only by the fact>// that we're on an sgi platform and g++ _isn't_ identifiable.# if !defined (__GNUG__)"# ifndef _RWSTD_NO_PURE_C_HEADERS$# define _RWSTD_NO_PURE_C_HEADERS&# endif // _RWSTD_NO_PURE_C_HEADERS"# if defined _RWSTD_NO_NEW_HEADER# undef _RWSTD_NO_NEW_HEADER"# endif // _RWSTD_NO_NEW_HEADERB// our libc headers put the libc functions in namespace std# ifdef _RWSTD_NO_LIBC_IN_STD # undef _RWSTD_NO_LIBC_IN_STD## endif // _RWSTD_NO_LIBC_IN_STD(# ifndef _RWSTD_NO_DEPRECATED_C_HEADERS*# define _RWSTD_NO_DEPRECATED_C_HEADERS# endif&# define _RWSTD_NO_PLACEMENT_DELETEA# // The comptest sets compile instantiate when it shouldn't.# // override it here..# if defined (_RWSTD_NO_IMPLICIT_INCLUSION))# undef _RWSTD_NO_IMPLICIT_INCLUSION # endif# endif#endifG/************************ MSVC ***************************************/#if defined (_MSC_VER) )// enable the form of libc headers1// we can only use the rw version in include/ansi"# ifndef _RWSTD_NO_PURE_C_HEADERS$# define _RWSTD_NO_PURE_C_HEADERS&# endif // _RWSTD_NO_PURE_C_HEADERS"# if defined _RWSTD_NO_NEW_HEADER# undef _RWSTD_NO_NEW_HEADER"# endif // _RWSTD_NO_NEW_HEADERB// our li bc headers put the libc functions in namespace std# ifdef _RWSTD_NO_LIBC_IN_STD # undef _RWSTD_NO_LIBC_IN_STD## endif // _RWSTD_NO_LIBC_IN_STD(# ifndef _RWSTD_NO_DEPRECATED_C_HEADERS*# define _RWSTD_NO_DEPRECATED_C_HEADERS,# endif // _RWSTD_NO_DEPRECATED_C_HEADERSE // static data members of cass templates aren't properly collapsedF // (compiler emits one copy per each translation unit that containsD // the definition of the template member, and the linker fails to6 // multiple copies that reside in shared libraries)-# ifndef _RWSTD_NO_COLLAPSE_TEMPLATE_STATICS/# define _RWSTD_NO_COLLAPSE_TEMPLATE_STATICS1# endif // _RWSTD_NO_COLLAPSE_TEMPLATE_STATICS# if _MSC_VER < 1100B# error Only Visual C++ versions 6.0 and better are supported.# endif // _MSC_VER < 1100%# if _MSC_VER < 1300 // MSVC < 7.0A // MSVC 6.0 calls an arbiitrary specialization of a function< // template unless the template argument is used in the1  // function argument list, even as a default4# define _RWSTD_DUMMY_DEFAULT(T) , const T* = 0# endif# if _MSC_VER <= 1300# define _RWSTD_NO_TYPENAME+# define _RWSTD_EXCEPTION_HANDLER_IN_STD!# define _RWSTD_NO_STATIC_DEF31# define _RWSTD_NO_PTR_VALUE_TEMPLATE_OVERLOAD(# define _RWSTD_NO_PRAGMA_INSTANTIATE= // disable explicit instantiation extensions if building= // optimized client code (all templates still explicitly& // instantiated in the library); ; // *** Not currently done for MSVC7, since an implicit= // instantiation bug causes multiply defined symbols# // in downstream libraries.# if _MSC_VER < 1300 \. && !defined (_RWSTD_LIB_SRC) \. && !defined (_RWSTDDEBUG) \ && !defined (_WIN64)D // temporarily commented out because of a duplication of facet A // id's in user code that causes errors in streaming numbers"// #define _ RWSTD_NO_INSTANTIATE:# endif // !_RWSTD_LIB_SRC && !_RWSTDDEBUG && !_WIN64# else // if _MSC_VER > 1300E // explicit instantiation enabled, symbols exported from the libF // library headers declare instantiations as imported (dllimport)D // this causes inline member functions of the exported templateA // specializations that are defined outside of the bodies ofA // the templates of which they are members not to be inlined( // by the optimizer (see PR #26654)# endif // MSVC >= 7.0: // Enable iostream support for extra-long integer type."# define _RWSTD_LONG_LONG __int64" // not declared/defined in libc*# if !defined (_RWSTD_NO_STRTOLL_IN_LIBC)%# define _RWSTD_NO_STRTOLL_IN_LIBC'# endif // _RWSTD_NO_STRTOLL_IN_LIBC+# if !defined (_RWSTD_NO_STRTOULL_IN_LIBC)&# define _RWSTD_NO_STRTOULL_IN_LIBC(# endif // _RWSTD_NO_STRTOULL_IN_LIBC, // declared but not defined in msvcrt.dll(#if defined (_DLL) || (_MSC_VER >= 1300)# ifndef _RWSTD_NO_WCTOB# define _RWSTD_NO_WCTOB# endif // _RWSTD_NO_WCTOB!# ifndef _RWSTD_NO_WCTOB_IN_LIBC## define _RWSTD_NO_WCTOB_IN_LIBC%# endif // _RWSTD_NO_WCTOB_IN_LIBC# ifndef _RWSTD_NO_MBRTOWC# define _RWSTD_NO_MBRTOWC# endif // _RWSTD_NO_MBRTOWC## ifndef _RWSTD_NO_MBRTOWC_IN_LIBC%# define _RWSTD_NO_MBRTOWC_IN_LIBC'# endif // _RWSTD_NO_MBRTOWC_IN_LIBC# ifndef _RWSTD_NO_WCRTOMB# define _RWSTD_NO_WCRTOMB# endif // _RWSTD_NO_WCRTOMB## ifndef _RWSTD_NO_WCRTOMB_IN_LIBC%# define _RWSTD_NO_WCRTOMB_IN_LIBC'# endif // _RWSTD_NO_WCRTOMB_IN_LIBC# ifndef _RWSTD_NO_MBSTOWCS# define _RWSTD_NO_MBSTOWCS # endif // _RWSTD_NO_MBSTOWCS$# ifndef _RWSTD_NO_MBSTOWCS_IN_LIBC&# define _RWSTD_NO_MBSTOWCS_IN_LIBC(# endif // _RWSTD_NO_MBSTOWCS_IN_LIBC# ifndef _RWSTD_NO_MBRLEN# define _RWSTD_NO_MBRLEN# endif // _RWSTD_NO_MBRLEN"# ifndef _RWSTD_NO_MBRLEN_IN_LIBC$#  define _RWSTD_NO_MBRLEN_IN_LIBC&# endif // _RWSTD_NO_MBRLEN_IN_LIBC# ifndef _RWSTD_NO_WCSRTOMBS# define _RWSTD_NO_WCSRTOMBS!# endif // _RWSTD_NO_WCSRTOMBS%# ifndef _RWSTD_NO_WCSRTOMBS_IN_LIBC'# define _RWSTD_NO_WCSRTOMBS_IN_LIBC)# endif // _RWSTD_NO_WCSRTOMBS_IN_LIBC# ifndef _RWSTD_NO_BTOWC# define _RWSTD_NO_BTOWC# endif // _RWSTD_NO_BTOWC!# ifndef _RWSTD_NO_BTOWC_IN_LIBC## define _RWSTD_NO_BTOWC_IN_LIBC%# endif // _RWSTD_NO_BTOWC_IN_LIBC# ifndef _RWSTD_NO_MBSRTOWCS# define _RWSTD_NO_MBSRTOWCS!# endif // _RWSTD_NO_MBSRTOWCS%# ifndef _RWSTD_NO_MBSRTOWCS_IN_LIBC'# define _RWSTD_NO_MBSRTOWCS_IN_LIBC)# endif // _RWSTD_NO_MBSRTOWCS_IN_LIBC#endif // _DLL# if defined (_WIN64)D // FIXME: handle by forward declaring fuctions in &# define _RWSTD_NO_FWD_DECLARATIONS'# if !defined (_RWSTD_NO_SSIZE_TYPE)"# define _RWSTD_NO_SSIZE_TYPE$# endif // _RWSTD_NO_SSIZE_TYPE# endif // _WIN647 // disable "Same type qualifier used more than once"!# pragma warning (disable: 4114)8 // disable "return type for operator->' is not a UDT"!# pragma warning (disable: 4284). // disable "decorated name length exceeded"!# pragma warning (disable: 4503): // disable "identifier was truncated to 255 characters"!# pragma warning (disable: 4786))# if defined (WIN32) && !defined(_WIN32)# define _WIN32# endif # ifdef _MT# ifndef _RWSTD_MULTI_THREAD## define _RWSTD_MULTI_THREAD 1 # endif# endif //_MT8 // clean C++ C headers (the kind) not provided"# ifndef _RWSTD_NO_PURE_C_HEADERS$# define _RWSTD_NO_PURE_C_HEADERS&# endif // _RWSTD_NO_PURE_C_HEADERS"#define _RWSTD_MUNMAP_ARG1_T void*#define _RWSTD_NO_NL_LANGINFO# if defined (_CPPRTTI)9 // override in case library was configured with -GR-" // (i.e., with RTTI disabled)!# undef _RWSTD_NO_DYNAMIC_CAST)# elif !defined (_RWSTD_NO_DYNAMIC_CAST)8 // override in case library was configured with -GR! // (i.e., with RTTI enabled)"# define _RWSTD_NO_DYNAMIC_CAST# endif // _CPPRTTI#endif // _MSC_VERG/********************** SNI CDS++ ************************************/ #ifdef SNI/# define _RWSTD_NO_PTR_VALUE_TEMPLATE_OVERLOAD# if __STDC__ == 1# ifndef _RWSTD_STRICT_ANSI # define _RWSTD_STRICT_ANSI # endif# endif"# if defined __SNI_THREAD_SUPPORT# define _RWSTD_NO_MBRTOWC# define _RWSTD_NO_WCRTOMB# endif#endif // SNIG/********************** SunPro ***************************************/#ifdef __SUNPRO_CC2# if __SUNPRO_CC >= 0x530 && __SUNPRO_CC <= 0x540F // test fails due to a SunPro 5.3 bug (PR RW #26641/Sun #4526136)%# undef _RWSTD_NO_MEMBER_TEMPLATES# endif // SunPro 5.3, 5.4# if __SUNPRO_CC <= 0x540= // works around a partial specialization bug (PR #28119))# ifndef _RWSTD_NO_EXT_CONST_ALLOCATOR+# define _RWSTD_NO_EXT_CONST_ALLOCATOR # endif# endif // SunPro < 5.4#endif // __SUNPRO_CCH/********************** OS2 *******************************************/#ifdef __OS2__%# define _RWSTD_NO_STATIC_MUTEX_INIT#endif // __OS2__H/********************** Win 32/64 *************************************/(#if defined (_WIN32) || defined (_WIN64)%# define _RWSTD_NO_STATIC_MUTEX_INIT#endif // _WIN32H/********************* Path separator *********************************/#if defined (_MSC_VER)) // MS Windows uses \ as path separator## define _RWSTD_PATH_SEP '\\'#else$ // Unices use / as path separator"# define _RWSTD_PATH_SEP '/'#endif // defined (_MSC_VER)H/********************** Threads ***************************************/#ifdef _RWSTD_DCE_THREADS%# define _RWSTD_NO_STATIC_MUTEX_INIT#endif // _RWSTD_DCE_THREADSH/********************** Miscellaneous *********************************/G//  g++ cannot inline functions that take a variable number of arguments5// or functions that contain static (local) variables>#if !defined (__GNUG__) || __GNUG__ > 2 || __GNUG_MINOR__ > 96%# define _INLINE_VARARGS inline.# if !defined (__HP_aCC) || __HP_aCC > 012100+ // working around a known aCC 1.21 bug'# define _INLINE_WITH_STATICS inline,# endif // !__HP_aCC || __HP_aCC > 012100<#endif // !__GNUG__ || __GNUG__ > 2 || __GNUG_MINOR__ > 968#if defined (_RWSTD_NO_CO LLAPSE_TEMPLATE_STATICS) \6 || defined (_RWSTD_NO_STATIC_TEMPLATE_MEMBER_INIT)D // static mutex initialization depends on the compiler's (and theD // linker's in gcc's case) ability to correctly handle explicitly3 // initialized static members of class templates%# ifndef _RWSTD_NO_STATIC_MUTEX_INIT'# define _RWSTD_NO_STATIC_MUTEX_INIT# endifJ#endif // NO_COLLAPSE_TEMPLATE_STATICS || NO_STATIC_TEMPLATE_MEMBER_INITF/********************** Environment *********************************/C// Most (but not all) non-unix systems convert new line to carriage // return + line feed on output:=#if defined (__OS2__) || defined (_WIN32) || defined (_WIN64) # define _RWSTD_CRLF_CONVENTION#endif5// undefine wherever atomic instructions are providedF// affects the size of string reference (i.e., is binary incompatible)5#if defined (__DECCXX) \5 || (defined (__i386__) && defined (__GNUG__)) \5 || defined (_WIN32) && !defined (_WIN64) \5 || defined (_AIX43) && defined(__IBMCPP__) \- || defined(__sgi) && defined(__host_mips)# undef _RWSTD_NO_TEST_AND_SET#else"# define _RWSTD_NO_TEST_AND_SET 1 #endif  9// sparc atomic ops not currently used in gnu make builds#if defined(__sparc) \4 && (defined (__SUNPRO_CC) || defined (__GNUG__)) # if defined(_RWSTD_USE_CONFIG))# define _RWSTD_NO_TEST_AND_SET 1)# define _RWSTD_NO_ATOMIC_OPERATIONS 1# else!# undef _RWSTD_NO_TEST_AND_SET# endif#endif<// pa-risc2 atomic ops not currently used in gnu make builds-#if defined(_PA_RISC2_0) && defined(__HP_aCC) # if defined(_RWSTD_USE_CONFIG))# define _RWSTD_NO_TEST_AND_SET 1)# define _RWSTD_NO_ATOMIC_OPERATIONS 1# else, // atomic operations with constraints; ! // only used by __string_ref)# define _RWSTD_STRING_TEST_AND_SET 13# define _RWSTD_STRING_REF_OFFSET _RWSTD_INT_MAX# endif#else #endif F#if defined (_RWSTD_NO_WCHAR_T) && !defined (_RWSTD_NO_NATIVE_WCHAR_T)"# define _RWSTD_NO_NATIVE_WCHAR_T#endif$#ifndef _RWSTD_NO_STL_SPECIALIZATION&// #ifdef _RWSTD_NO_CLASS_PARTIAL_SPEC<// disable partial specialization for void* of STL sequences&# define _RWSTD_NO_STL_SPECIALIZATION+// #endif // _RWSTD_NO_CLASS_PARTIAL_SPEC(#endif // _RWSTD_NO_STL_SPECIALIZATION// *// Macro for path to the ANSI 'C' headers 6// Must be set specifically for each platform when the)// C++ wrappers for 'C' headers are used.//(#define _RWSTD_ANSIC(x) "// define unless already specified!#ifndef _RWSTD_LDBL_PRINTF_PREFIX)# define _RWSTD_LDBL_PRINTF_PREFIX "L"%#endif // _RWSTD_LDBL_PRINTF_PREFIX #ifndef _RWSTD_LDBL_SCANF_PREFIX(# define _RWSTD_LDBL_SCANF_PREFIX "L"$#endif // _RWSTD_LDBL_SCANF_PREFIXN/********************** Library Option Dependencies *************************//*L * The following macro sets the default size of file stream internal buffers */D#ifndef _RWSTD_DEFAULT_BUFSIZE // specified on command line?&# define _RWSTD_DEFAULT_BUFSIZE 512#endif#ifndef _RWSTD_NO_LONG_LONG3 // Win32/64 #defines _RWSTD_LONG_LONG to __int64# ifndef _RWSTD_LONG_LONG&# define _RWSTD_LONG_LONG long long# endif // _RWSTD_LONG_LONG#endif // _RWSTD_NO_LONG_LONG-// disable all extensions in strict ANSI mode#ifdef _RWSTD_STRICT_ANSIC // long long is not in ANSI C++ yet (although it is in ANSI C99)E#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1823)#else# undef _RWSTD_LONG_LONG#endif# define _RWSTD_NO_EXT_FILEBUF+# define _RWSTD_NO_EXT_VECTOR_BOOL_REF_OPS# define _RWSTD_NO_EXT_LOCALE(# define _RWSTD_NO_EXT_DEEP_STRING_COPY> // no support for exceptions derived from ios_base::failure# define _RWSTD_NO_EXT_FAILURE: // no support for writing out integral values in base 2# define _RWSTD_NO_EXT_BIN_IOA // std::setbase manipulator accepts onl y required bases (i.e.,G // 0, 8, 10, 16, and 2 unless _RWSTD_NO_EXT_BIN_IO is also #defined)# define _RWSTD_NO_EXT_SETBASE> // no support for member overloads on all fundamental types# define _RWSTD_NO_EXT_NUM_GET# define _RWSTD_NO_EXT_NUM_PUT. // no support for extended member overloads # define _RWSTD_NO_EXT_TIME_GET5 // no support for optional mt-locking in iostreams$# define _RWSTD_NO_EXT_REENTRANT_IO% // allocator not possible'# define _RWSTD_NO_EXT_ CONST_ALLOCATOR@ // no definitions provided for missing operator new or delete$# define _RWSTD_NO_EXT_OPERATOR_NEW> // void std::count<>() not provided (except when necessary)"# define _RWSTD_NO_EXT_VOID_COUNT* // void std::distance<>() not provided%# define _RWSTD_NO_EXT_VOID_DISTANCE#endif // _RWSTD_STRICT_ANSI5 // macros that are enabled in library source files#ifdef _RWSTD_LIB_SRC8 // don't instantiate templates in library source code: // (but see _RWSTD_INSTA NTIATE_TEMPLATES macro below) (# define _RWSTD_NO_TEMPLATE_DEFINITIONS; // don't provide definitions of operator new in library $# define _RWSTD_NO_EXT_OPERATOR_NEW#endif // _RWSTD_LIB_SRC#if _MSC_VER <= 1300A // msvc60 expects a definition to be provided for all variantsF // of operator new/delete that are declared. This means that eitherL // the operators must be defined - preventing redefinition in user code -I // or that they must be undeclared - preventing them from being called> // directly in user code. We have chosen the former option.## undef _RWSTD_NO_EXT_OPERATOR_NEW#endif // _MSC_VER##ifdef _RWSTD_INSTANTIATE_TEMPLATES@ // instantiate templates (this macro appears in instance.cpp)'# undef _RWSTD_NO_TEMPLATE_DEFINITIONS#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif$#endif // _RWSTD_CONFIG_H_INCLUDEDwwߞn7ԦL/*************************************************************************** *= * _ctype.cc - Definitions for the Standard Library character# * classification facet *1 * $Id: //stdlib/3.0-rel/include/rw/_ctype.cc#3 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possessi on, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * prote cted by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) { template locale::id ctype<_CharT>::id;} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endifww  in7ԦL/*************************************************************************** *@ * _ctype.h - Definitions of the character classification facets *E * This is an internal header file used to implement the C++ Standard? * Library. It should never be #included directly by a program. *0 * $Id: //stdlib/3.0-rel/include/rw/_ctype.h#3 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development  Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. Al l Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies the reof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/#ifndef _RWSTD_CTYPE_H_INCLUDED#define _RWSTD_CTYPE_H_INCLUDED#include #ifdef _V3_LOCALE$# include #else#include #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) { // 22.2.1struct _RWSTD_EXPORT ctype_base{ enum mask { space = 0x0001, print = 0x0002, cntrl = 0x0004, upper = 0x0008, lower = 0x0010, alpha = 0x0020, digit  = 0x0040, punct = 0x0080, xdigit = 0x0100, alnum = alpha | digit, graph = 0x0200 };};} // namespace std_RWSTD_NAMESPACE (__rw) { template class __rw_ctype_helper{#ifndef _MSC_VER( friend class __rw_digit_map<_CharT>;#elsepublic:#endif( __rw_digit_map<_CharT> _C_digit_map;};} // namespace __rw_RWSTD_NAMESPACE (std) { _RWSTD_SPECIALIZED_CLASS'class _RWSTD_EXPORT ctype_byname;_RWSTD_SPECIALIZED_CLASSclass _RWSTD_EXPORT ctype. : public locale::facet, public ctype_base,) public _RW::__rw_ctype_helper{& friend class _RWSTD_EXPORT locale;2 friend class _RWSTD_EXPORT ctype_byname;#ifndef _RWSTD_NO_WCHAR_T. friend class _RWSTD_EXPORT ctype;#endifpublic: typedef char char_type;- bool is (mask __m, char_type __c) const {#if _RWSTD_UCHAR_MAX <= 255: return (_C_table [(unsigned char)__c] & __m) != 0;#elseN return __c < table_size && (_C_table [(unsigned char)__c] & __m) != 0;#endif } protected:C // inline virtual functions defined first to allow compilers toB // inline their definitions when being called from nonvirtuals- const mask* table () const _THROWS (()) { return _C_table; }6 static const mask* classic_table () _THROWS (()) { return _C_classic_table; } virtual ~ctype () { if (_C_delete_it)9 delete[] _RWSTD_CONST_CAST (mask*, _C_table);! delete[] _C_to_upper_tab;! delete[] _C_to_lower_tab; }# inline virtual const char_type*4 do_toupper (char_type*, const char_type*) const;# inline virtual const char_type*4 do_tolower (char_type*, const char_type*) const;8 virtual char_type do_toupper (char_type __c) const { return is (lower, __c) ?F _C_to_upper_tab [(unsigned char)__c - _C_lower_min] : __c; }8 virtual char_type do_tolower (char_type __c) const { return is (upper, __c) ?F _C_to_lower_tab [(unsigned char)__c - _C_upper_min] : __c; }6 virtual char_type do_widen (char_type __c) const { return __c; } virtual const char_type*> do_widen (const char_type* __low, const char_type* __high,& char_type* __to) const {- memcpy (__to, __low, __high - __low); return __high; }B virtual char_type do_narrow (char_type __c, char_type) const { return __c; } virtual const char_type*? do_narrow (const char_type* __low, const char_type* __high,2 char_type, char_type* __to) const {- memcpy (__to, __low, __high - __low); return __high; }. virtual void _C_initfacet (const locale&);public:3 _RWSTD_STATIC_CONST (size_t, table_size = 256);@ _EXPLICIT ctype (const mask* = 0, bool = false, size_t = 0);J const char_type* is (const char_type*, const char_type*, mask*) const;N const char_type* scan_is (mask, const char_type*, const char_type*) const;O const char_type* scan_not (mask, const char_type*, const char_type*) const;. char_type (toupper)(char_type __c) const { return do_toupper (__c); }. char_type (tolower)(char_type __c) const { return do_tolower (__c); }+ char_type widen (char_type __c) const { return do_widen (__c); }@  char_type narrow (char_type __c, char_type __dfault) const {) return do_narrow (__c, __dfault); }P const char_type* (toupper)(char_type* __low, const char_type* __high) const{* return do_toupper (__low, __high); }P const char_type* (tolower)(char_type* __low, const char_type* __high) const{* return do_tolower (__low, __high); } const char_type*8 widen (const char_type* __lo, const char_type* __hi,# char_type* __to) const {+ return do_widen (__lo, __hi, __to); } const char_type*9 narrow (const char_type* __lo, const char_type* __hi,8 char_type __dfault, char_type* __to) const {6 return do_narrow (__lo, __hi, __dfault, __to); } static locale::id id;#ifndef _RWSTD_NO_EXT_LOCALE typedef string string_type; // extensions:1 string_type widen (const string &__s) const { return __s; }= string narrow (const string_type &__s, char_type) const { return __s; } #endif // _RWSTD_NO_EXT_LOCALE // Implementation.> enum { _C_facet_cat = locale::ctype, _C_ok_implicit = 1 };private:3 static const mask _C_classic_table[table_size]; const mask* _C_table;# bool _C_delete_it;# int _C_lower_min,# _C_lower_max;# int _C_upper_min,# _C_upper_max;& char_type* _C_to_upper_tab;& char_type* _C_to_lower_tab;!#ifdef _RWSTD_NO_MEMBER_TEMPLATES$ locale::id& _C_get_id () const { return id; }#endif};$inline const ctype::char_type* ctype::Dis (const char_type* __lo, const char_type* __hi, mask* __vec) const{ while (__lo != __hi)4 *__vec++ = _C_table[(unsigned char)*__lo++]; return __hi;}$inline const ctype::char_type*+ctype::scan_is (ctype_base::mask __m,I const char_type* __lo, const char_type* __hi) const{C while (__lo != __hi && !(_C_table[(unsigned char)*__lo] & __m)) ++__lo; return __lo;}$inline const ctype::char_type*,ctype::scan_not (ctype_base::mask __m,J const char_type* __lo, const char_type* __hi) const{B while (__lo != __hi && (_C_table[(unsigned char)*__lo] & __m)) ++__lo; return __lo;}$inline const ctype::char_type*Ictype::do_toupper (char_type* __low, const char_type* __high) const{" for ( ; __low<__high; ++__low) if (is (lower, *__low))I *__low = _C_to_upper_tab[(unsigned char)*__low-_C_lower_min]; return __low;}$inline const ctype::char_type*Ictype::do_tolower (char_type* __low, const char_type* __high) const{# for (; __low < __high; ++__low) if (is (upper, *__low))I *__low = _C_to_lower_tab[(unsigned char)*__low-_C_upper_min]; return __low;}#ifndef _RWSTD_NO_WCHAR_T_RWSTD_SPECIALIZED_CLASS"class _RWSTD_EXPORT ctype. : public locale::facet, public ctype_base,, public _RW::__rw_ctype_helper{' static bool _C_fits (wchar_t __c) {9 return ((~(wchar_t)_RWSTD_UCHAR_MAX) & __c) == 0; }+ static mask _C_mask_of (wchar_t __c) {P return _C_fits (__c) ? ctype::classic_table ()[(unsigned char)__c]# : (ctype_base::mask) 0; }public: typedef wchar_t char_type;  virtual ~ctype() {! _C_locale_name(0, false); } protected: 4 // _C_mask_of_ch returns the mask of one wchar_t> static _STD::ctype_base::mask _C_mask_of_ch (wchar_t __c);C // inline virtual functions defined first to allow compilers toB // inline their definitions when being called from nonvirtuals/ virtual bool do_is (mask, char_type) const; virtual const char_type*< do_is (const char_type*, const char_type*, mask*) const; virtual const char_type*@ do_scan_is (mask, const char_type*, const char_type*) const; virtual const char_type*A do_scan_not (mask, const char_type*, const char_type*) const; virtual const char_type*4 do_toupper (char_type*, const char_type*) const;7 virtual char_type do_toupper (char_type __c) const; virtual const char_type*4 do_tolower (char_type*, const char_type*) const;3 virtual char_type do_tolower (char_type) const; virtual const char*: do_widen (const char*, const char*, char_type*) const;1 virtual char_type do_widen (char __c) const {- return (char_type)(unsigned char)__c; } virtual const char_type*F do_narrow (const char_type*, const char_type*, char, char*) const;3 virtual char do_narrow (char_type, char) const;public:& _EXPLICIT ctype (size_t __ref = 0)1 : locale::facet (__ref, locale::ctype) {}- bool is (mask __m, char_type __c) const {! return do_is ( __m, __c); } const char_type*J is (const char_type* __lo, const char_type* __hi, mask* __vec) const {) return do_is (__lo, __hi, __vec); } const char_type*L scan_is (mask __m, const char_type* __lo, const char_type* __hi) const {, return do_scan_is (__m, __lo, __hi); } const char_type*M scan_not (mask __m, const char_type* __lo, const char_type* __hi) const {- return do_scan_not (__m, __lo, __hi); }. char_type (toupper)(char_type __c) const { return do_toupper (__c); }N const char_type* (toupper)(char_type* __lo, const char_type* __hi) const {' return do_toupper (__lo, __hi); }. char_type (tolower)(char_type __c) const { return do_tolower (__c); }N const char_type* (tolower)(char_type* __lo, const char_type* __hi) const {' return do_tolower (__lo, __hi); }& char_type widen (char __c) const { return do_widen (__c); } const char*G widen (const char* __lo, const char* __hi, char_type* __to) const {+ return do_widen (__lo, __hi, __to); }6 char narrow (char_type __c, char __dfault) const {) return do_narrow (__c, __dfault); } const char_type*H narrow (const char_type* __lo, const char_type* __hi, char __dfault, char* __to) const {6 return do_narrow (__lo, __hi, __dfault, __to); } static locale::id id;#ifndef _RWSTD_NO_EXT_LOCALE // extensions: typedef wstring string_type;, string_type widen (const string&) const;3 string narrow (const string_type&, char) const; #endif // _RWSTD_NO_EXT_LOCALE // Implementation:> enum { _C_facet_cat = locale::ctype, _C_ok_implicit = 1 };private:!#ifdef _RWSTD_NO_MEMBER_TEMPLATES5 locale::id &_C_get_id (void) const { return id; }#endif};#ifndef _RWSTD_NO_EXT_LOCALE"inline ctype::string_type/ctype::widen (const string &__s) const{' string_type __res (__s.size (), 0);L do_widen (__s.c_str (), __s.c_str () + __s.length (), &*__res.begin ()); return __res;} inline stringDctype::narrow (const string_type &__s, char __dfault) const{" string __res (__s.size (), 0);D do_narrow (__s.c_str (), __s.c_str () + __s.length (), __dfault,! &*__res.begin ()); return __res;}#endif //_RWSTD_NO_EXT_LOCALE#endif // _RWSTD_NO_WCHAR_T // 22.2.1.1template 6class ctype : public locale::facet, public ctype_base,3 public _RW::__rw_ctype_helper<_CharT>{public: typedef _CharT char_type; protected:C // inline virtual functions defined first to allow compilers toB // inline their definitions when being called from nonvirtuals // 22.2.1.1.2, p10 virtual bool do_is (mask, char_type) const { return false; } virtual const char_type*D do_is (const char_type*, const char_type* __high, mask*) const { return __high; } // 22.2.1.1.2, p3 virtual const char_type*H do_scan_is (mask, const char_type*, const char_type* __high) const { return __high; } // 22.2.1.1.2, p5 virtual const char_type*I do_scan_not (mask, const char_type*, const char_type* __high) const { return __high; } // 22.2.1.1.2, p78 virtual char_type do_toupper (char_type __c) const { return __c; } virtual const char_type*< do_toupper (char_type*, const char_type* __high) const { return __high; } // 22.2.1.1.2, p98 virtual char_type do_tolower (char_type __c) const { return __c; } virtual const char_type*< do_tolower (char_type*, const char_type* __high) const { return __high; } // 22.2.1.1.2, p111 virtual char_type do_widen (char __c) const { return char_type (__c); } virtual const char*L do_widen (const char* __lo, const char* __hi, char_type* __dest) const { while (__lo < __hi), *__dest++ = char_type (*__lo++); return __hi; } // 22.2.1.1.2, p13= virtual char do_narrow (char_type, char __dfault) const { return __dfault; } virtual const char_type*L do_narrow (const char_type*, const char_type* __hi, char, char*) const { return __hi; }public:& _EXPLICIT ctype (size_t __ref = 0)2 : locale::facet (__ref, locale::ctype) { } // 22.2.1.1.1, p1- bool is (mask __m, char_type __c) const {! return do_is ( __m, __c); } const char_type*M is (const char_type* __low, const char_type* __high, mask* __vec) const {, return do_is (__low, __high, __vec); } // 22.2.1.1.1, p2 const char_type*O scan_is (mask __m, const char_type* __low, const char_type* __high) const {0 return do_scan_is ( __m, __low, __high); } // 22.2.1.1.1, p3 const char_type*P scan_not (mask __m, const char_type* __low, const char_type* __high) const {1 return do_scan_not ( __m, __low, __high); } // 22.2.1.1.1, p4. char_type (toupper)(char_type __c) const { return do_toupper (__c); }P const char_type* (toupper)(char_type* __low, const char_type* __high) const{* return do_toupper (__low, __high); } // 22.2.1.1.1, p5. char_type (tolower)(char_type __c) const { return do_tolower (__c); }P const char_type* (tolower)(char_type* __low, const char_type* __high) const{* return do_tolower (__low, __high); } // 22.2.1.1.1, p6' char_type widen (char __c) const { return do_widen (__c); } const char*G widen (const char* __lo, const char* __hi, char_type* __to) const {+ return do_widen (__lo, __hi, __to); } // 22.2.1.1.1, p76 char narrow (char_type __c, char __dfault) const {) return do_narrow (__c, __dfault); }J const char_type* narrow (const char_type* __lo, const char_type* __hi,? char __dfault, char* __to) const {6 return do_narrow (__lo, __hi, __dfault, __to); } static locale::id id;#ifndef _RWSTD_NO_EXT_LOCALE // extensions: typedefJ basic_string, allocator > string_type;, string_type widen (const string&) const;3 string narrow (const string_type&, char) const; #endif // _RWSTD_NO_EXT_LOCALE // Implementation:> enum { _C_facet_cat = locale::ctype, _C_ok_implicit = 1 };private:!#ifdef _RWSTD_NO_MEMBER_TEMPLATES$ locale::id &_C_get_id () const { return id; }&#endif // _RWSTD_NO_MEMBER_TEMPLATES};_RWSTD_SPECIALIZED_CLASS:class _RWSTD_EXPORT ctype_by name: public ctype{public:; _EXPLICIT ctype_byname (const char*, size_t __ref = 0);private:7 static const mask *_C_get_mask_table (const char*);};#ifndef _RWSTD_NO_WCHAR_T_RWSTD_SPECIALIZED_CLASS@class _RWSTD_EXPORT ctype_byname: public ctype{public:? _EXPLICIT ctype_byname (const char* name, size_t __ref = 0)" : ctype (__ref) {# _C_locale_name(name, true); }};#endif // _RWSTD_NO_WC HAR_T // 22.2.1.2template (class ctype_byname: public ctype<_CharT>{public:: _EXPLICIT ctype_byname (const char*, size_t __ref = 0)" : ctype<_CharT>(__ref) { }};$// convenience interfaces: is*(char)<// names parenthesized to avoid clashing with masking macrostemplate 6inline bool (isspace)(_CharT __c, const locale& __loc){I return _USE_FACET (ctype<_CharT>, __loc).is (ctype_base::space, __c);}template 6inline bool (isprint)(_CharT __c, const locale& __loc){I return _USE_FACET (ctype<_CharT>, __loc).is (ctype_base::print, __c);}template 6inline bool (iscntrl)(_CharT __c, const locale& __loc){H return _USE_FACET (ctype<_CharT>, __loc).is(ctype_base::cntrl, __c);}template 6inline bool (isupper)(_CharT __c, const locale& __loc){I return _USE_FACET (ctype<_CharT>, __loc).is (ctype_base::upper, __c);}template 6inline bool (islower)(_CharT __c, const locale& __loc){I return _USE_FACET (ctype<_CharT>, __loc).is (ctype_base::lower, __c);}template 6inline bool (isalpha)(_CharT __c, const locale& __loc){I return _USE_FACET (ctype<_CharT>, __loc).is (ctype_base::alpha, __c);}template 6inline bool (isdigit)(_CharT __c, const locale& __loc){I return _USE_FACET (ctype<_CharT>, __loc).is (ctype_base::digit, __c);}template 6inline bool (ispunct)(_CharT __c, const locale& __loc){H return _USE_FACET (ctype<_CharT>, __loc).is(ctype_base::punct, __c);}template 7inline bool (isxdigit)(_CharT __c, const locale& __loc){J return _USE_FACET (ctype<_CharT>, __loc).is (ctype_base::xdigit, __c);}template 6inline bool (isalnum)(_CharT __c, const locale& __loc){I return _USE_FACET (ctype<_CharT>, __loc).is (ctype_base::alnum, __c);}template 6inline bool (isgraph)(_CharT __c, const locale& __loc){I return _USE_FACET (ctype<_CharT>, __loc).is (ctype_base::graph, __c);}template 8inline _CharT (toupper)(_CharT __c, const locale& __loc){< return (_USE_FACET (ctype<_CharT>, __loc).toupper)(__c);}template 8inline _CharT (tolower)(_CharT __c, const locale& __loc){< return (_USE_FACET (ctype<_CharT>, __loc).tolower)(__c);}} // namespace std_RWSTD_NAMESPACE (__rw) { "inline const __rw_digit_map&G__rw_digit_map::_C_get_digit_map (const _STD::ctype& __ctp){ return __ctp._C_digit_map;}_RWSTD_SPECIALIZED_FUNCTIONinline _STD::ctype*__rw_create_named_facet@(_STD::ctype*, const char *__name, _RWSTD_C::size_t __ref){7 return new _STD::ctype_byname(__name, __ref);}_RWSTD_SPECIALIZED_FUNCTION inline _STD::ctype_byname*__rw_create_named_facetG(_STD::ctype_byname<char>*, const char *__name, _RWSTD_C::size_t __ref){7 return new _STD::ctype_byname(__name, __ref);}_RWSTD_SPECIALIZED_FUNCTION inline _STD::ctype_byname*5__rw_create_classic_facet (_STD::ctype_byname*){- return new _STD::ctype_byname("C");}_RWSTD_SPECIALIZED_FUNCTIONinline _STD::ctype*.__rw_create_classic_facet (_STD::ctype*){. return new _STD::ctype(0, false, 0);}#ifndef _RWSTD_NO_WCHAR_T_RWSTD_SPECIALIZED_FUNCTIONinline _STD::ctype*/__rw_create_named_facet (_STD::ctype*,D const char *__name, _RWSTD_C::size_t __ref){: return new _STD::ctype_byname(__name, __ref);}_RWSTD_SPECIALIZED_FUNCTION#inline _STD::ctype_byname*6__rw_create_named_facet (_STD::ctype_byname*,D const char *__name, _RWSTD_C::size_t __ref){: return new _STD::ctype_byname(__name, __ref);}_RWSTD_SPECIALIZED_FUNCTION#inline _STD::ctype_byname*8__rw_create_classic_facet (_STD::ctype_byname*){/ return new _STD::ctype_byname("");}#endif // _RWSTD_NO_WCHAR_T} // namespace __rwE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif"#if _RWSTD_DEFINE_TEMPLATE (CTYPE)!# include #endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif#endif // _V3_LOCALE##endif // _RWSTD_CTYPE_H_INCLUDEDww ߴn7ԦL/*************************************************************************** *J * _defs.h - Common macro definitions to be included by every library file *E * This is an internal header file used to implement the C++ Standard? * Library. It should never be #included directly by a program. */ * $Id: //stdlib/3.0-rel/include/rw/_defs.h#7 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard D evelopment Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software , Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/#ifndef _RWSTD_DEFS_H_INCLUDED#define _RWSTD_DEFS_H_INCLUDED// set implicit using std#ifdef __IMPLICIT_USING_STDnamespace std {}using namespace std;'#endif /* ifdef __IMPLICIT_USING_STD */i#if (defined(__STD_STRICT_ANSI) || defined(__STD_STRICT_ANSI_ERRORS)) && !defined(__NO_USE_STD_IOSTREAM) # ifndef __USE_STD_IOSTREAM# define __USE_STD_IOSTREAM# endif#endif'#if defined(__DECCXX) && defined(__VMS)#ifndef _RWSTD_USE_CONFIG#define _RWSTD_USE_CONFIG#endif#endif'#if defined(__DECCXX) && defined(__VMS)#ifndef _RWSTD_MULTI_THREAD#define _RWSTD_MULTI_THREAD#endif#endif#include "#if !defined (_RWSTD_NO_V3_LOCALE)# define _V3_LOCALE std#endif=// provide definitions for C++ versions of standard C headersC// if a header is not available its name is #defined to the name of:// this file (it's harmless and avoids polluting code with*// tons of ugly platform-specific #ifdefs)#ifndef _RWSTD_NO_NEW_HEADER$# define _RWSTD_CASSERT ## define _RWSTD_CCTYPE ## define _RWSTD_CERRNO ## define _RWSTD_CFLOAT $# define _RWSTD_CISO646 $# define _RWSTD_CLIMITS $# define _RWSTD_CLOCALE "# define _RWSTD_CMATH $# define _RWSTD_CSETJMP $# define _RWSTD_CSIGNAL .# if defined (__EDG__) && !defined (__DECCXX)B // HACK: fool the vanilla front end into actually #includingD // the file (it normally doesn't and treats cstdarg specially)*# define _RWSTD_CSTDARG # else%# define _RWSTD_CSTDARG # endif$# define _RWSTD_CSTDDEF ## define _RWSTD_CSTDIO $# define _RWSTD_CSTDLIB $# define _RWSTD_CSTRING "# define _RWSTD_CTIME # ifndef _RWSTD_NO_WCHAR_H## define _RWSTD_CWCHAR # else$# define _RWSTD_CWCHAR <_defs.h># endif // _RWSTD_NO_WCHAR_H# ifndef _RWSTD_NO_WCTYPE_H$# define _RWSTD_CWCTYPE # else$# define _RWSTD_CWCTYPE <_defs.h> # endif // _RWSTD_NO_WCTYPE_H,#else // if defined (_RWSTD_NO_NEW_HEADER)%# define _RWSTD_CASSERT $# define _RWSTD_CCTYPE $ # define _RWSTD_CERRNO $# define _RWSTD_CFLOAT %# define _RWSTD_CISO646 %# define _RWSTD_CLIMITS %# define _RWSTD_CLOCALE ## define _RWSTD_CMATH %# define _RWSTD_CSETJMP %# define _RWSTD_CSIGNAL %# define _RWSTD_CSTDARG %# define _RWSTD_CSTDDEF $# define _RWSTD_CSTDIO %# define _RWSTD_CSTDLIB %# define _RWSTD_CSTRING ## define _RWSTD_CTIME # ifndef _RWSTD_NO_WCHAR_H$# define _RWSTD_CWCHAR # else$# define _RWSTD_CWCHAR <_defs.h># endif // _RWSTD_NO_WCHAR_H# ifndef _RWSTD_NO_WCTYPE_H%# define _RWSTD_CWCTYPE # else$# define _RWSTD_CWCTYPE <_defs.h> # endif // _RWSTD_NO_WCTYPE_H #endif // _RWSTD_NO_NEW_HEADER#if defined(_WIN64)(# define _RWSTD_SYS_TYPES_H #elif defined(_WIN32)&# define _RWSTD_SYS_TYPES_H  <_defs.h>#else*# define _RWSTD_SYS_TYPES_H #endif // _WIN329// provide default #definitions of ANSI C library headers#if defined(_WIN64)F#if !defined (_RWSTD_NO_ASSERT_H) && !defined (_RWSTD_ANSI_C_ASSERT_H)@# define _RWSTD_ANSI_C_ASSERT_H <../include/win64/crt/assert.h>#endifD#if !defined (_RWSTD_NO_CTYPE_H) && !defined (_RWSTD_ANSI_C_CTYPE_H)># define _RWSTD_ANSI_C_CTYPE_H <../include/win64/crt/ctype.h>#endifD#if !defined (_RWSTD_NO_ERRNO_H) && !defined (_RWS !TD_ANSI_C_ERRNO_H)># define _RWSTD_ANSI_C_ERRNO_H <../include/win64/crt/errno.h>#endifD#if !defined (_RWSTD_NO_FLOAT_H) && !defined (_RWSTD_ANSI_C_FLOAT_H)># define _RWSTD_ANSI_C_FLOAT_H <../include/win64/crt/float.h>#endifF#if !defined (_RWSTD_NO_ISO646_H) && !defined (_RWSTD_ANSI_C_ISO646_H)@# define _RWSTD_ANSI_C_ISO646_H <../include/win64/crt/iso646.h>7#endif // _RWSTD_NO_ASSERT_H && _RWSTD_ANSI_C_ASSERT_H%#if !defined (_RWSTD_ANSI_C_LIMITS_H)## if !defined (_RWSTD_NO_LIMITS_H")B# define _RWSTD_ANSI_C_LIMITS_H <../include/win64/crt/limits.h># else,# define _RWSTD_ANSI_C_LIMITS_H <_defs.h># endif!#endif // _RWSTD_ANSI_C_LIMITS_HF#if !defined (_RWSTD_NO_LOCALE_H) && !defined (_RWSTD_ANSI_C_LOCALE_H)@# define _RWSTD_ANSI_C_LOCALE_H <../include/win64/crt/locale.h>#endifB#if !defined (_RWSTD_NO_MATH_H) && !defined (_RWSTD_ANSI_C_MATH_H)<# define _RWSTD_ANSI_C_MATH_H <../include/win64/crt/math.h>#endifF#if !defined (_RWSTD_NO_SETJMP_H) && !defined #(_RWSTD_ANSI_C_SETJMP_H)@# define _RWSTD_ANSI_C_SETJMP_H <../include/win64/crt/setjmp.h>#endifF#if !defined (_RWSTD_NO_SIGNAL_H) && !defined (_RWSTD_ANSI_C_SIGNAL_H)@# define _RWSTD_ANSI_C_SIGNAL_H <../include/win64/crt/signal.h>#endifF#if !defined (_RWSTD_NO_STDARG_H) && !defined (_RWSTD_ANSI_C_STDARG_H)@# define _RWSTD_ANSI_C_STDARG_H <../include/win64/crt/stdarg.h>#endifF#if !defined (_RWSTD_NO_STDDEF_H) && !defined (_RWSTD_ANSI_C_STDDEF_H)@# define _RWSTD_ANSI_C_STDDEF_H <../inclu $de/win64/crt/stddef.h>#endifD#if !defined (_RWSTD_NO_STDIO_H) && !defined (_RWSTD_ANSI_C_STDIO_H)># define _RWSTD_ANSI_C_STDIO_H <../include/win64/crt/stdio.h>#endifF#if !defined (_RWSTD_NO_STDLIB_H) && !defined (_RWSTD_ANSI_C_STDLIB_H)@# define _RWSTD_ANSI_C_STDLIB_H <../include/win64/crt/stdlib.h>#endifF#if !defined (_RWSTD_NO_STRING_H) && !defined (_RWSTD_ANSI_C_STRING_H)@# define _RWSTD_ANSI_C_STRING_H <../include/win64/crt/string.h>#endifB#if !defined (_RWSTD_NO_TIME_H) && !defi%ned (_RWSTD_ANSI_C_TIME_H)<# define _RWSTD_ANSI_C_TIME_H <../include/win64/crt/time.h>#endifD#if !defined (_RWSTD_NO_WCHAR_H) && !defined (_RWSTD_ANSI_C_WCHAR_H)># define _RWSTD_ANSI_C_WCHAR_H <../include/win64/crt/wchar.h>#endif%#if !defined (_RWSTD_ANSI_C_WCTYPE_H)## if !defined (_RWSTD_NO_WCTYPE_H)B# define _RWSTD_ANSI_C_WCTYPE_H <../include/win64/crt/wctype.h># else,# define _RWSTD_ANSI_C_WCTYPE_H <_defs.h># endif"#endif // _RWSTD_ANSI_C_WCTYPE_H.#elif defined &(_RWSTD_USE_USR_INCLUDE_HEADERS)F#if !defined (_RWSTD_NO_ASSERT_H) && !defined (_RWSTD_ANSI_C_ASSERT_H)8# define _RWSTD_ANSI_C_ASSERT_H #endifD#if !defined (_RWSTD_NO_CTYPE_H) && !defined (_RWSTD_ANSI_C_CTYPE_H)6# define _RWSTD_ANSI_C_CTYPE_H #endifD#if !defined (_RWSTD_NO_ERRNO_H) && !defined (_RWSTD_ANSI_C_ERRNO_H)6# define _RWSTD_ANSI_C_ERRNO_H #endifD#if !defined (_RWSTD_NO_FLOAT_H) && !defined (_RWSTD_ANSI_C_FLOAT_'H)6# define _RWSTD_ANSI_C_FLOAT_H #endifF#if !defined (_RWSTD_NO_ISO646_H) && !defined (_RWSTD_ANSI_C_ISO646_H)8# define _RWSTD_ANSI_C_ISO646_H 7#endif // _RWSTD_NO_ASSERT_H && _RWSTD_ANSI_C_ASSERT_H%#if !defined (_RWSTD_ANSI_C_LIMITS_H)## if !defined (_RWSTD_NO_LIMITS_H):# define _RWSTD_ANSI_C_LIMITS_H # else,# define _RWSTD_ANSI_C_LIMITS_H <_defs.h># endif!#endif // _RWSTD_ANSI_C_LIMITS_HF#if !d (efined (_RWSTD_NO_LOCALE_H) && !defined (_RWSTD_ANSI_C_LOCALE_H)8# define _RWSTD_ANSI_C_LOCALE_H #endifB#if !defined (_RWSTD_NO_MATH_H) && !defined (_RWSTD_ANSI_C_MATH_H)4# define _RWSTD_ANSI_C_MATH_H #endifF#if !defined (_RWSTD_NO_SETJMP_H) && !defined (_RWSTD_ANSI_C_SETJMP_H)8# define _RWSTD_ANSI_C_SETJMP_H #endifF#if !defined (_RWSTD_NO_SIGNAL_H) && !defined (_RWSTD_ANSI_C_SIGNAL_H)8# define _RWSTD_ANSI_C_SIGNAL_H < )/usr/include/signal.h>#endifF#if !defined (_RWSTD_NO_STDARG_H) && !defined (_RWSTD_ANSI_C_STDARG_H)8# define _RWSTD_ANSI_C_STDARG_H #endifF#if !defined (_RWSTD_NO_STDDEF_H) && !defined (_RWSTD_ANSI_C_STDDEF_H)8# define _RWSTD_ANSI_C_STDDEF_H #endifD#if !defined (_RWSTD_NO_STDIO_H) && !defined (_RWSTD_ANSI_C_STDIO_H)6# define _RWSTD_ANSI_C_STDIO_H #endifF#if !defined (_RWSTD_NO_STDLIB_H) && !defined (_RWSTD_ANSI_C_STD*LIB_H)8# define _RWSTD_ANSI_C_STDLIB_H #endifF#if !defined (_RWSTD_NO_STRING_H) && !defined (_RWSTD_ANSI_C_STRING_H)8# define _RWSTD_ANSI_C_STRING_H #endifB#if !defined (_RWSTD_NO_TIME_H) && !defined (_RWSTD_ANSI_C_TIME_H)4# define _RWSTD_ANSI_C_TIME_H #endifD#if !defined (_RWSTD_NO_WCHAR_H) && !defined (_RWSTD_ANSI_C_WCHAR_H)6# define _RWSTD_ANSI_C_WCHAR_H #endif%#if !defined (_RWSTD_ANSI_C_+WCTYPE_H)## if !defined (_RWSTD_NO_WCTYPE_H):# define _RWSTD_ANSI_C_WCTYPE_H # else,# define _RWSTD_ANSI_C_WCTYPE_H <_defs.h># endif"#endif // _RWSTD_ANSI_C_WCTYPE_H#elseF#if !defined (_RWSTD_NO_ASSERT_H) && !defined (_RWSTD_ANSI_C_ASSERT_H)6# define _RWSTD_ANSI_C_ASSERT_H <../include/assert.h>#endifD#if !defined (_RWSTD_NO_CTYPE_H) && !defined (_RWSTD_ANSI_C_CTYPE_H)4# define _RWSTD_ANSI_C_CTYPE_H <../include/ctype.h>#endifD#if !defined (_R ,WSTD_NO_ERRNO_H) && !defined (_RWSTD_ANSI_C_ERRNO_H)4# define _RWSTD_ANSI_C_ERRNO_H <../include/errno.h>#endifD#if !defined (_RWSTD_NO_FLOAT_H) && !defined (_RWSTD_ANSI_C_FLOAT_H)4# define _RWSTD_ANSI_C_FLOAT_H <../include/float.h>#endifF#if !defined (_RWSTD_NO_ISO646_H) && !defined (_RWSTD_ANSI_C_ISO646_H)6# define _RWSTD_ANSI_C_ISO646_H <../include/iso646.h>7#endif // _RWSTD_NO_ASSERT_H && _RWSTD_ANSI_C_ASSERT_H%#if !defined (_RWSTD_ANSI_C_LIMITS_H)## if !defined (_RWSTD_NO_LIMI-TS_H)8# define _RWSTD_ANSI_C_LIMITS_H <../include/limits.h># else,# define _RWSTD_ANSI_C_LIMITS_H <_defs.h># endif!#endif // _RWSTD_ANSI_C_LIMITS_HF#if !defined (_RWSTD_NO_LOCALE_H) && !defined (_RWSTD_ANSI_C_LOCALE_H)6# define _RWSTD_ANSI_C_LOCALE_H <../include/locale.h>#endifB#if !defined (_RWSTD_NO_MATH_H) && !defined (_RWSTD_ANSI_C_MATH_H)2# define _RWSTD_ANSI_C_MATH_H <../include/math.h>#endifF#if !defined (_RWSTD_NO_SETJMP_H) && !defined (_RWSTD_ANSI_C_SETJMP_H)6 .# define _RWSTD_ANSI_C_SETJMP_H <../include/setjmp.h>#endifF#if !defined (_RWSTD_NO_SIGNAL_H) && !defined (_RWSTD_ANSI_C_SIGNAL_H)6# define _RWSTD_ANSI_C_SIGNAL_H <../include/signal.h>#endifF#if !defined (_RWSTD_NO_STDARG_H) && !defined (_RWSTD_ANSI_C_STDARG_H)6# define _RWSTD_ANSI_C_STDARG_H <../include/stdarg.h>#endifF#if !defined (_RWSTD_NO_STDDEF_H) && !defined (_RWSTD_ANSI_C_STDDEF_H)6# define _RWSTD_ANSI_C_STDDEF_H <../include/stddef.h>#endifD#if !defined (_RWSTD_NO_STDIO_H) & /& !defined (_RWSTD_ANSI_C_STDIO_H)4# define _RWSTD_ANSI_C_STDIO_H <../include/stdio.h>#endifF#if !defined (_RWSTD_NO_STDLIB_H) && !defined (_RWSTD_ANSI_C_STDLIB_H)6# define _RWSTD_ANSI_C_STDLIB_H <../include/stdlib.h>#endifF#if !defined (_RWSTD_NO_STRING_H) && !defined (_RWSTD_ANSI_C_STRING_H)6# define _RWSTD_ANSI_C_STRING_H <../include/string.h>#endifB#if !defined (_RWSTD_NO_TIME_H) && !defined (_RWSTD_ANSI_C_TIME_H)2# define _RWSTD_ANSI_C_TIME_H <../include/time.h>#endifD#if !def0ined (_RWSTD_NO_WCHAR_H) && !defined (_RWSTD_ANSI_C_WCHAR_H)4# define _RWSTD_ANSI_C_WCHAR_H <../include/wchar.h>#endif%#if !defined (_RWSTD_ANSI_C_WCTYPE_H)## if !defined (_RWSTD_NO_WCTYPE_H)8# define _RWSTD_ANSI_C_WCTYPE_H <../include/wctype.h># else,# define _RWSTD_ANSI_C_WCTYPE_H <_defs.h># endif"#endif // _RWSTD_ANSI_C_WCTYPE_H#endif // !_WIN64B// These macros tune the speed vs. space optimization of containerI// performance with regard to allocation of me 1mory. These have been tunedB// with speed efficiency as a primary conern. Space efficiency was@// considered, but was secondary. (refer to Onyx QA Entry #4920)//G// The ratio parameter must be above one for an amortized constant timeG// algorithm. Lowering the ratio will lower rapidity and improve spaceC// efficiency. This effect will be most noticable when working withK// containers of few elements (few being less than 32 for the general case)H// If your use case is with containers tha 2t typically have many elements8// lowering the ratio will have less effect on rapidity.//H// The minimum elements parameter refers to minimum amount of additionalH// capcity requested (in number of elements) when more memory is needed.K// Rapidity with containers of few elements will be affected most noticably"// as this amount this is lowered.//G// For strings, the specializations on char and wchar_t were seen as anH// exploitable common case, and have their own more specialized template 3E// function overloads in the string header. These are tweakable here+// with the STRING version of these macros.//)#if !defined(_RWSTD_MINIMUM_NEW_CAPACITY)+# define _RWSTD_MINIMUM_NEW_CAPACITY 32U#endif'#if !defined(_RWSTD_NEW_CAPACITY_RATIO)H // using long doubles to eliminate bogus warnings on g++ 2.95.2/sparcA // (-W -O2/3 only): warning: overflow on truncation to integer*# define _RWSTD_NEW_CAPACITY_RATIO 1.618L#endif,#if !defined(_RWSTD_MINIMUM_STRING_CAPACITY)/# 4 define _RWSTD_MINIMUM_STRING_CAPACITY 128U#endif*#if !defined(_RWSTD_STRING_CAPACITY_RATIO)-# define _RWSTD_STRING_CAPACITY_RATIO 1.618L#endif:// working around an HP aCC 3.33 bug (PR #25354 and 22610)?#if !defined (__HP_aCC) || __HP_aCC < 33300 || __HP_aCC > 334003# define _RWSTD_NEW_CAPACITY(ignore, what, from) \) _RW::__rw_new_capacity (from, what)#else2# define _RWSTD_NEW_CAPACITY(T, what, from) \+ _RW::__rw_new_capacity(from, what)#endif // HP aCC 5/// set up Win32/64 DLL export/import directivesA// _DLL - defined by the compiler when either -MD or -MDd is usedI// RWDLL - defined for all Rogue Wave products to be built as shared libsB// _RWSHARED - defined for stdlib to be built/used as a shared lib/#if (defined (_WIN32) || defined (_WIN64)) \/ && (defined (RWDLL) || defined (_RWSHARED))# ifdef _RWBUILD_std+ // building a shared lib, export names2# define _RWSTD_EXPORT __declspec (dllexport)# else( // 6using a shared lib, import names2# define _RWSTD_EXPORT __declspec (dllimport)# endif // disable warnings:C // C4251: class needs to have dll-interface to be used by cliensI // C4275: non dll-interface class used as base for dll-interface class!# pragma warning (disable: 4251)!# pragma warning (disable: 4275)#else // disable Windows hacks# define _RWSTD_EXPORT#endif // _WIN32 || _WIN64#ifdef _RWSTD_NO_BOOL# define bool int# define false 0"7# define true 1#endif // _RWSTD_NO_BOOL#ifndef _RWSTD_NO_TYPENAME# define _TYPENAME typename#else# define _TYPENAME#endif#ifndef _RWSTD_NO_EXPLICIT# define _EXPLICIT explicit#else# define _EXPLICIT#endif#ifndef _RWSTD_NO_EXPORT# define _EXPORT export#else# define _EXPORT#endif#ifndef _RWSTD_NO_MUTABLE# define _MUTABLE mutable#else# define _MUTABLE#endif//K// Macro for forming or omitting default template arguments in8 constructors//'#ifndef _RWSTD_NO_DEFAULT_TEMPLATE_ARGS## define _RWSTD_DEFAULT_ARG(n) = n#else# define _RWSTD_DEFAULT_ARG(n)#endifC// MSVC version 12.00.xxxx (and perhaps prior) can't parse templateC// re-declarations if the previous declaration contains two or more*// default template parameters (go figure)*#if defined (_MSC_VER) && _MSC_VER <= 13000# define _RWSTD_REDECLARED_DEFAULT(arg) = arg:#else // if !(!defined (_MSC_VER) || (_MSC_VER <= 1300))+# define _R9WSTD_REDECLARED_DEFAULT(ignore)5#endif // !defined (_MSC_VER) || (_MSC_VER <= 1300)//>// Macro for forming or ommitting default template parameters.//*#ifndef _RWSTD_NO_SIMPLE_DEFAULT_TEMPLATES'# define _RWSTD_SIMPLE_DEFAULT(a) = a-# ifndef _RWSTD_NO_COMPLEX_DEFAULT_TEMPLATES*# define _RWSTD_COMPLEX_DEFAULT(a) = a# else%# define _RWSTD_COMPLEX_DEFAULT(a)# endif:#else // if defined (_RWSTD_NO_SIMPLE_DEFAULT_TEMPLATES)-# ifndef _RWSTD_NO_COMPLEX_DEFAULT_TEMPLA:TES/# define _RWSTD_NO_COMPLEX_DEFAULT_TEMPLATES# endif"# define _RWSTD_SIMPLE_DEFAULT(a)## define _RWSTD_COMPLEX_DEFAULT(a)%# ifndef _RWSTD_NO_DEFAULT_TEMPLATES'# define _RWSTD_NO_DEFAULT_TEMPLATES# endif.#endif // _RWSTD_NO_SIMPLE_DEFAULT_TEMPLATES3// Macro for casting, using either the "old" method// or the new C++ cast system#ifdef _RWSTD_NO_STATIC_CAST.# define _RWSTD_STATIC_CAST(x, y) ((x)y).# define _RWSTD_REINTERPRET_CAST(x, y) ((x)y).# define ;_RWSTD_CONST_CAST(x, y) ((x)y)#else;# define _RWSTD_STATIC_CAST(x, y) static_cast< x >(y)@# define _RWSTD_REINTERPRET_CAST(x, y) reinterpret_cast< x >(y):# define _RWSTD_CONST_CAST(x, y) const_cast< x >(y)!#endif // _RWSTD_NO_STATIC_CAST//4// Macros for the new template specialization syntax//)#ifdef _RWSTD_NO_NEW_FUNC_TEMPLATE_SYNTAX%# define _RWSTD_SPECIALIZED_FUNCTION#else0# define _RWSTD_SPECIALIZED_FUNCTION template<>#endif*#ifdef _RWSTD_NO_N<EW_CLASS_TEMPLATE_SYNTAX"# define _RWSTD_SPECIALIZED_CLASS#else-# define _RWSTD_SPECIALIZED_CLASS template<>#endif?// for compilers or environments that do not support namespaces#ifndef _RWSTD_NO_NAMESPACE2# define _RWSTD_NAMESPACE(name) namespace name.# define _USING(name) using name # undef _STD# define _STD std# define _RW __rw+#else // if defined (_RWSTD_NO_NAMESPACE)2# define _RWSTD_NAMESPACE(ignore) extern "C++"F# define _USING(i=gnore) typedef void __rw_unused_typedef # undef _STD# define _STD # define _RW#endif // _RWSTD_NO_NAMESPACE//4// for compilers that don't like specialized friends)// such as operator== in template classes//##ifdef _RWSTD_NO_SPECIALIZED_FRIEND# ifdef __TURBOC__:# define _RWSTD_SPECIALIZED_FRIEND(name) (_STD::name)%# else // if !defined (__TURBOC__)2# define _RWSTD_SPECIALIZED_FRIEND(name) name# endif // __TURBOC__4#else // if defined >(_RWSTD_NO_SPECIALIZED_FRIEND)# ifdef __TURBOC__:# define _RWSTD_SPECIALIZED_FRIEND(name) (_STD::name)%# else // if !defined (__TURBOC__)6 // the space between `name' and `<>' is necessaryI // to prevent ..._FRIEND (operator<) from expanding into operator<<>3 // (only the GNU preprocessor inserts a space)5# define _RWSTD_SPECIALIZED_FRIEND(name) name <># endif // __TURBOC__(#endif // _RWSTD_NO_SPECIALIZED_FRIEND//D// If compiler supports member and? default templates then it support// the _RWSTD_ALLLOCATOR//6#if !defined (_RWSTD_NO_INLINE_MEMBER_TEMPLATES) \6 && !defined (_RWSTD_NO_SIMPLE_DEFAULT_TEMPLATES) \0 && (!defined (_MSC_VER) || _MSC_VER >= 1300)# define _RWSTD_ALLOCATOR#endifF#define _RWSTD_MB_CUR_MAX 16 // FIXME: must be determined dynamicallyG// type used in instantiating the rw_get_static_mutex template function_RWSTD_NAMESPACE (__rw) {8// file may be #included from within an extern "C" block@extern "C++" {7template struct __rw_type { };} // extern "C++"} // namespace __rw"// helper macros for token pasting'#define _RWSTD_DO_PASTE(a, b) a ## b7#define _RWSTD_PASTE(a, b) _RWSTD_DO_PASTE (a, b)#ifdef _RWSTD_MULTI_THREAD<// synchronizes access by all objects holding the same mutex## define _RWSTD_MT_GUARD(mutex) \B _RW::__rw_guard _RWSTD_PASTE (__guard, __LINE__) (mutex)=// synchronizes access by all threads hold Aing the same mutex F# define _RWSTD_MT_STATIC_GUARD(type) \F typedef _RW::__rw_type _UniqueType; \, _RWSTD_MT_CLASS_GUARD(_UniqueType)6// synchronizes access by all objects of the same typeF# define _RWSTD_MT_CLASS_GUARD(type) \A _RWSTD_MT_GUARD (_RW::__rw_get_static_mutex ((type*)0))F# define _RWSTD_ATOMIC_PREINCREMENT(x, mutex) \2 _RW::__rw_at Bomic_preincrement (x, mutex)F# define _RWSTD_ATOMIC_PREDECREMENT(x, mutex) \2 _RW::__rw_atomic_predecrement (x, mutex)F# define _RWSTD_ATOMIC_SWAP(x, y, mutex) \2 _RW::__rw_atomic_exchange (x, y, mutex)$# ifndef _RWSTD_NO_EXT_REENTRANT_IO%// conditional swap used in iostreamsF# define _RWSTD_ATOMIC_IO_SWAP(x, y, mutex) \F ((this->flags () & _RWSTD_IOS_NOLOCK) ? \F C _RW::__rw_ordinary_exchange (x, y) \9 : _RW::__rw_atomic_exchange (x, y, mutex))# elseF# define _RWSTD_ATOMIC_IO_SWAP(x, y, mutex) \+ _RWSTD_ATOMIC_SWAP(x, y, mutex))# endif // _RWSTD_NO_EXT_REENTRANT_IO ?#if defined(_PA_RISC2_0) && defined(_RWSTD_STRING_TEST_AND_SET)7# define _RWSTD_STRING_ATOMIC_PREINCREMENT(x, mutex) \9 _RW::__rw_string_atomic_preincrement (x, mutex)7# define _R DWSTD_STRING_ATOMIC_PREDECREMENT(x, mutex) \9 _RW::__rw_string_atomic_predecrement (x, mutex)2# define _RWSTD_STRING_ATOMIC_SWAP(x, y, mutex) \9 _RW::__rw_string_atomic_exchange (x, y, mutex)#else7# define _RWSTD_STRING_ATOMIC_PREINCREMENT(x, mutex) \. _RWSTD_ATOMIC_PREINCREMENT(x, mutex)7# define _RWSTD_STRING_ATOMIC_PREDECREMENT(x, mutex) \. _RWSTD_ATOMIC_PREDECREMENT(x, mutex)2# define _RWSTD_STRING_ATOMIC_SWAP(x, y, mutex) \) _RWSTD E_ATOMIC_SWAP(x, y, mutex)#endif*#else // if !defined _RWSTD_MULTI_THREAD=# define _RWSTD_MT_GUARD(ignore) ((void)0)J# define _RWSTD_MT_STATIC_GUARD(name) _RWSTD_MT_GUARD (name)J# define _RWSTD_MT_CLASS_GUARD(type) _RWSTD_MT_GUARD (type)9# define _RWSTD_ATOMIC_PREINCREMENT(x, ignore) ++(x)9# define _RWSTD_ATOMIC_PREDECREMENT(x, ignore) --(x)-# define _RWSTD_ATOMIC_SWAP(x, y, ignore) \5 _RW::__rw_atomic_exchange F((x), (y), false)0# define _RWSTD_ATOMIC_IO_SWAP(x, y, ignore) \0 _RW::__rw_ordinary_exchange ((x), (y))7# define _RWSTD_STRING_ATOMIC_PREINCREMENT(x, mutex) \. _RWSTD_ATOMIC_PREINCREMENT(x, mutex)7# define _RWSTD_STRING_ATOMIC_PREDECREMENT(x, mutex) \. _RWSTD_ATOMIC_PREDECREMENT(x, mutex)2# define _RWSTD_STRING_ATOMIC_SWAP(x, y, mutex) \) _RWSTD_ATOMIC_SWAP(x, y, mutex)#endif // _RWSTD_MULTI_THREAD<// macro for qualifying C library Gnames in the std namespace#ifndef _RWSTD_NO_LIBC_IN_STD# define _RWSTD_C std#else# define _RWSTD_C#endif##define _RWSTD_INVALID_FILE_DESC -1##define _RWSTD_INVALID_FILE_PTR 0#ifndef _RWSTD_NO_NATIVE_IO## define _RWSTD_INVALID_FILE -1## define _RWSTD_INVALID_OPENMODE -1#else*# define _RWSTD_INVALID_FILE (FILE*)0## define _RWSTD_INVALID_OPENMODE 0#endif // _RWSTD_NO_NATIVE_IO2// std::ios_base static const data members' values'#define _RWSTD_IOS_BOO HLALPHA 0x00001'#define _RWSTD_IOS_DEC 0x00002'#define _RWSTD_IOS_FIXED 0x00004'#define _RWSTD_IOS_HEX 0x00008'#define _RWSTD_IOS_INTERNAL 0x00010'#define _RWSTD_IOS_LEFT 0x00020'#define _RWSTD_IOS_OCT 0x00040'#define _RWSTD_IOS_RIGHT 0x00080'#define _RWSTD_IOS_SCIENTIFIC 0x00100'#define _RWSTD_IOS_SHOWBASE 0x00200'#define _RWSTD_IOS_SHOWPOINT 0x00400'#define _RWSTD_IOS_SHOWPOS 0x00800'#define _RWSTD_IOS_SKIPW IS 0x01000'#define _RWSTD_IOS_UNITBUF 0x02000'#define _RWSTD_IOS_UPPERCASE 0x04000'#define _RWSTD_IOS_BIN 0x08000N// NOLOCK[BUF] used rather than LOCK[BUF] to maintain functional compatibilityH// with release 2.2 (which was always safe when these bits were cleared)'#define _RWSTD_IOS_NOLOCK 0x10000'#define _RWSTD_IOS_NOLOCKBUF 0x20000J#define _RWSTD_IOS_FLOATFIELD (_RWSTD_IOS_FIXED | _RWSTD_IOS_SCIENTIFIC)##define _RWSTD_IOS_ADJUSTFIELD \B J (_RWSTD_IOS_LEFT | _RWSTD_IOS_RIGHT | _RWSTD_IOS_INTERNAL)#ifndef _RWSTD_NO_EXT_BIN_IO## define _RWSTD_IOS_BASEFIELD \M (_RWSTD_IOS_DEC | _RWSTD_IOS_HEX | _RWSTD_IOS_OCT | _RWSTD_IOS_BIN)#else## define _RWSTD_IOS_BASEFIELD \< (_RWSTD_IOS_DEC | _RWSTD_IOS_HEX | _RWSTD_IOS_OCT) #endif // _RWSTD_NO_EXT_BIN_IO?// offset of most significant bits where numeric base is stored##define _RWSTD_IOS_BASEMASK 63##define _RWSTD_IOS_BASEOFF 26%#definKe _RWSTD_IOS_GOODBIT 0x00%#define _RWSTD_IOS_BADBIT 0x01%#define _RWSTD_IOS_EOFBIT 0x02%#define _RWSTD_IOS_FAILBIT 0x04%#define _RWSTD_IOS_APP 0x01%#define _RWSTD_IOS_BINARY 0x02%#define _RWSTD_IOS_IN 0x04%#define _RWSTD_IOS_OUT 0x08%#define _RWSTD_IOS_TRUNC 0x10%#define _RWSTD_IOS_ATE 0x20#ifndef _RWSTD_STRICT_ANSI%# define _RWSTD_IOS_NOCREATE 0x40%# define _RWSTD_IOS_NOREPLACE 0x80L#else"# define _RWSTD_IOS_NOCREATE 0"# define _RWSTD_IOS_NOREPLACE 0#endif1#define _RWSTD_IOS_MASK \1 ( _RWSTD_IOS_APP | _RWSTD_IOS_BINARY \1 | _RWSTD_IOS_IN | _RWSTD_IOS_OUT \1 | _RWSTD_IOS_TRUNC | _RWSTD_IOS_ATE \6 | _RWSTD_IOS_NOCREATE | _RWSTD_IOS_NOREPLACE)3#if !defined (_RWSTD_NO_STATIC_IOSTREAM_INIT) \0 && !defined (_RWSTD_NO_IOSTREAM_OBJECT_REFS). // standard iostream objects are referenc Mes.# define _RWSTD_IOSTREAM_OBJECT(name) &name#else? // standard iostream objects are declared to be real objects> // they may be implemented as real objects of the same type> // that get destroyed during program lifetime or as objects7 // of some POD type that do not get destroyed at all-# define _RWSTD_IOSTREAM_OBJECT(name) nameN#endif // _RWSTD_NO_STATIC_IOSTREAM_INIT && !_RWSTD_NO_IOSTREAM_OBJECT_REFSJ// exceptions can be completely disabled (bodies of catch bloc Nks are stillH// compiled but will be removed by the optimizing stage of the compiler)L// this approach reveals any errors even if _RWSTD_NO_EXCEPTIONS is #defined#ifndef _RWSTD_NO_EXCEPTIONS# define _TRY try## define _CATCH(ex) catch (ex)!# define _THROW(ex) throw ex# define _RETHROW throw,#else // if defined (_RWSTD_NO_EXCEPTIONS)# define _TRY$# define _CATCH(ignore) while (0)$# define _THROW(ignore) ((void)0)$# define _RETHROW ((void)0) O #endif // _RWSTD_NO_EXCEPTIONSF// for compilers that can't handle standard allocators we provide fourJ// workarounds: _RWSTD_REBIND, used in place of _Allocator::rebind, allows@// containers to use the same allocator for different data typesG// _RWSTD_ALLOC_TYPE is required to "rebind", or rather wrap, the userG// supplied non-conforming allocator in allocator_interface so that theL// container need not be aware of the allocator's special properties (namelyF// the fact that the alloc Pator allocates in terms of bytes rather than// elemements)//E// _RWSTD_VALUE_ALLOC creates a temporary allocator_interface wrapperE// from the given parameter (usually *this) when allocating values in:// the sequence containers with non-conforming allocators.F// _RWSTD_VALUE_ALLOC_CAST casts the given container to a reference toD// a value allocator, allowing access to inherited allocator membersE// outside of the class. For non-conforming compilers, this macro is$// equivalent to _RWST QD_VALUE_ALLOC.//E// NOTE: the spaces around type below are necessary to prevent errorsB// if `to' is a template-id and the preprocessor doesn't put@// the spaces there automatically (GNU does, Sun does not)#ifdef _RWSTD_ALLOCATOR&# ifndef _RWSTD_NO_DEPENDENT_TEMPLATE%# define _RWSTD_REBIND(from, to) \9 _TYPENAME from::template rebind < to >::other# else%# define _RWSTD_REBIND(from, to) \1 _TYPENAME from:: rebind < to >::other*# endif / R/ _RWSTD_NO_DEPENDENT_TEMPLATE@# define _RWSTD_ALLOC_TYPE(_Allocator, _ValueType) _AllocatorJ# define _RWSTD_VALUE_ALLOC(ignore, call) allocator_type::call+# define _RWSTD_VALUE_ALLOC_CAST(rvalue) \6 _RWSTD_STATIC_CAST (allocator_type&, rvalue))#else // if !defined (_RWSTD_ALLOCATOR)## define _RWSTD_REBIND(from, to) \0 _STD::allocator_interface < from, to >7# define _RWSTD_ALLOC_TYPE(_Allocator, _ValueType) \0 _RWSTD_REBIND (_Allocator, _ SValueType)># define _RWSTD_VALUE_ALLOC(type, call) type(*this).callI# define _RWSTD_VALUE_ALLOC_CAST(rvalue) _C_value_alloc_type(rvalue)#endif // _RWSTD_ALLOCATORE// for compilers that can't deal with template functions parametrizedC// on the function's return type (as opposed to function arguments)//E// NOTE: the spaces around type below are necessary to prevent errorsD// if `type' is a template-id and the preprocessor doesn't put@// the spaces there automa Ttically (GNU does, Sun does not))#ifndef _RWSTD_NO_TEMPLATE_ON_RETURN_TYPED# define _STD_HAS_FACET(type, arg) _STD::has_facet < type >(arg)># define _HAS_FACET(type, arg) has_facet < type >(arg)D# define _STD_USE_FACET(type, arg) _STD::use_facet < type >(arg)># define _USE_FACET(type, arg) use_facet < type >(arg)J# define _GET_TEMP_BUFFER(type, size) get_temporary_buffer < type >(size)9#else // if defined (_RWSTD_NO_TEMPLATE_ON_RETURN_TYPE)H# define _STD_H UAS_FACET(type, arg) _STD::has_facet (arg, (type*)(0))B# define _HAS_FACET(type, arg) has_facet (arg, (type*)(0))H# define _STD_USE_FACET(type, arg) _STD::use_facet (arg, (type*)(0))B# define _USE_FACET(type, arg) use_facet (arg, (type*)(0))L# define _GET_TEMP_BUFFER(type, size) get_temporary_buffer (size, (type*)0)-#endif // _RWSTD_NO_TEMPLATE_ON_RETURN_TYPEK// working around g++ 2.95.2 -fno-honor-std inability to use std::use_facetC#if defined (__GNUG__) && V __GNUC__ <= 2 && __GNUC_MINOR__ < 97 \$ && defined (_RWSTD_NO_HONOR_STD)H // use_facet is introduced into namespace _RW via a using declaration# undef _STD_USE_FACET=# define _STD_USE_FACET(type, arg) _USE_FACET (type, arg)7#endif // // __GNUG__ >= 2.97 || !_RWSTD_NO_HONOR_STD,// Support for building the new locale (v.3))#ifndef _RWSTD_NO_TEMPLATE_ON_RETURN_TYPE## if defined (_RWSTD_NO_HONOR_STD):# define _V3_USE_FACET(type,arg) use_facet< type >(arg)# elseF# W define _V3_USE_FACET(type,arg) _V3_LOCALE::use_facet< type >(arg)# endif#else## if defined (_RWSTD_NO_HONOR_STD)># define _V3_USE_FACET(type,arg) use_facet(arg, (type*)(0))# elseJ# define _V3_USE_FACET(type,arg) _V3_LOCALE::use_facet(arg, (type*)(0))# endif+#endif // _RWSTD_NO_TEMPLATE_ON_RETURN_TYPE'#ifndef _RWSTD_NO_NONCLASS_ARROW_RETURN0 // expected signature: "_TypeT* operator->()"< // and/or: "const _TypeT* operator->() const"H# define _RWSTD_OXPERATOR_ARROW(signature) signature { return &**this; }#else'# define _RWSTD_OPERATOR_ARROW(ignore)+#endif // _RWSTD_NO_NONCLASS_ARROW_RETURN-// to prevent warnings about unused arguments)#define _RWSTD_UNUSED(arg) ((void)&arg)<// allows all externs to be declared/defined only in headers<// and defined just by first #defining _RWSTD_DEFINE_EXTERNS0// and then #including the header in a .cpp file#ifndef _RWSTD_DEFINE_EXTERNS3# define _RWSTD_EXTERN(decl, ignore) extern dYecl#else;# define _RWSTD_EXTERN(decl, value) extern decl = value!#endif // _RWSTD_DEFINE_EXTERNSG// allows static const integral or enum class members to be initialized?// inside the class and defined (w/o being initialized) outside*// of the class (as required by 9.4.2, p4)E#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1894)# if defined(__STD_MS).# define _RWSTD_NO_STATIC_CONST_MEMBER_INIT# endif#endif1#if !defined (_RWSTD_NO_STATIC_CONST_MEM ZBER_INIT)C# define _RWSTD_STATIC_CONST(type, init) static const type init,# if !defined (_MSC_VER) || _MSC_VER > 13003# define _RWSTD_DEFINE_STATIC_CONST(decl) decl# elseG // MSVC 7.0 allows initializers static const integral data membersH // but out-of-line definitions cause multiply defined symbol errors // (see PR #26562).# define _RWSTD_DEFINE_STATIC_CONST(ignore)# endif // MSVC > 7.0#else:# define _RWSTD_STATIC_CONST(ignore, init) enum { init [ },# define _RWSTD_DEFINE_STATIC_CONST(ignore).#endif // _RWSTD_NO_STATIC_CONST_MEMBER_INITG// Selection of vendor dependent "format" string argument to wcsftime()#ifndef _RWSTD_NO_WCSFTIMEG // 7.24.5.1 of C99 - wcsftime()'s 3rd arg is const wchar* [restrict]L // HP-UX 11 (and perhaps others) still uses const char*)# ifndef _RWSTD_NO_WCSFTIME_WCHAR_T_FMAT5# define _RWSTD_FMT_TYPE(arg) const wchar_t* arg)# define _RWSTD_FMT_ASSGN(str) L##str# els\e2# define _RWSTD_FMT_TYPE(arg) const char* arg&# define _RWSTD_FMT_ASSGN(str) str# endif*#else // if defined (_RWSTD_NO_WCSFTIME)2# define _RWSTD_FMT_TYPE(arg) const char* arg&# define _RWSTD_FMT_ASSGN(str) str#endif // _RWSTD_NO_WCSFTIME// _Iterator typedefsA// (note that you must use a semi-colon at the end of this macro)H#define _RWSTD_ITERATOR_TYPES(_Iterator) \H typedef _TYPENAME _Iterator::difference_type difference_typ ]e; \H typedef _TYPENAME _Iterator::value_type value_type; \H typedef _TYPENAME _Iterator::pointer pointer; \H typedef _TYPENAME _Iterator::reference reference; \E typedef _TYPENAME _Iterator::iterator_category iterator_category9// helpers making working w/o iterator_traits transparent$#ifndef _RWSTD_NO_CLASS_PARTIAL_SPEC$# define _RWSTD_VALUE_TYPE(iterT) \? (_TYPENAME _STD::iterator_traits< iterT >::value_type*) ^0+# define _RWSTD_DIFFERENCE_TYPE(iterT) \D (_TYPENAME _STD::iterator_traits< iterT >::difference_type*)0D# if defined (SNI) || defined (__SUNPRO_CC) && __SUNPRO_CC <= 0x530D // hacking around the inability of Siemens CDS++ and SunPro 5.3C // to use the ctor syntax for type-dependent nested type names5# define _RWSTD_ITERATOR_CATEGORY(iterT, ignore) \O (const _TYPENAME _STD::iterator_traits< iterT >::iterator_category&) \( (_STD::forward_iterator_tag_ ())# else5# define _RWSTD_ITERATOR_CATEGORY(iterT, ignore) \G _TYPENAME _STD::iterator_traits< iterT >::iterator_category ()# endif4#else // if defined (_RWSTD_NO_CLASS_PARTIAL_SPEC);# define _RWSTD_VALUE_TYPE(iterT) __value_type ((iterT*)0)3 // assume default ctor is defined and accessible+# define _RWSTD_DIFFERENCE_TYPE(iterT) \' _STD::__distance_type (iterT ())@ // macro cannot use the default ctor to construct a temporary@ // with the type `of the first argument since the default ctor? // may not exist or be accessible (e.g., istream_iterator<>)2# define _RWSTD_ITERATOR_CATEGORY(ignore, iter) \' _STD::__iterator_category (iter)(#endif // _RWSTD_NO_CLASS_PARTIAL_SPECC// Use -D_RWSTDDEBUG to compile a version of the libraries to debugE// the user's code. This will perform pre- and post-condition checksB// upon entering routines, but will be larger and run more slowly.B// This option affects the binary compatibil aity of generated code.#if defined (_RWSTDDEBUG)## ifndef _RWSTD_NO_PRETTY_FUNCTION7 // gcc and HP aCC both support __PRETTY_FUNCTION__L# define _RWSTD_ASSERT(expr) \L ((expr) ? (void)0 : _RW::__rw_assert_fail (#expr, __FILE__, __LINE__, \E __PRETTY_FUNCTION__))!# elif !defined (_RWSTD_NO_FUNC)5 // C99 specifies the __func__ special identifierL# define _RWSTD_ASSERT(expr) b \L ((expr) ? (void)0 : _RW::__rw_assert_fail (#expr, __FILE__, __LINE__, \: __func__))+# else // if !__GNUG__ && _RWSTD_NO_FUNC## define _RWSTD_ASSERT(expr) \N ((expr) ? (void)0 : _RW::__rw_assert_fail (#expr, __FILE__, __LINE__, 0))# endif%#else // if !defined (_RWSTDDEBUG)+# define _RWSTD_ASSERT(ignore) ((void)0)#endif // _RWSTDDEBUG?// compile-time assertion - asserts cocnstant expressions duringG// compilation with no runtime overhead; failed assertions are reported// as compilation errors_RWSTD_NAMESPACE (__rw) { 8// file may be #included from within an extern "C" blockextern "C++" {template struct __rw_compile_assert;_RWSTD_SPECIALIZED_CLASS5struct __rw_compile_assert { enum { _C_ok }; };+#define _RWSTD_COMPILE_ASSERT(const_expr) \= ((void)_RW::__rw_compile_assert<(const_expr)>::_C_ok)E#if defined(__DECCXXd) && defined(__VMS) && !defined(__DECFIXCXXL1754)!# pragma __extern_prefix __save)# pragma __extern_prefix _EXTERN_PREFIX#endif// called for failed assertionsvoid _RWSTD_EXPORT%__rw_assert_fail (const char *__expr,F const char *__file, int __line, const char *__func);E#if defined(__DECCXX) && defined(__VMS) && !defined(__DECFIXCXXL1754)$# pragma __extern_prefix __restore#endif} // extern "C++"} // namespace __rw # define _RWSTD_STR(x) e #x+# define _RWSTD_STRSTR(x) _RWSTD_STR(x)# ifdef __GNUG__G# define _RWSTD_FUNC(ignore) _RWSTD_FILE_LINE, __PRETTY_FUNCTION__!# elif !defined (_RWSTD_NO_FUNC)<# define _RWSTD_FUNC(ignore) _RWSTD_FILE_LINE, __func__# else8# define _RWSTD_FUNC(name) _RWSTD_FILE_LINE, name# endifB# define _RWSTD_FILE_LINE __FILE__ ":" _RWSTD_STRSTR (__LINE__)/#if defined(__DECCXX) && !defined(__EXCEPTIONS)# include _RWSTD_CASSERT6# define _RWSTD_REQUIRES(prfed, args) assert((pred))#else8# if !defined (__DECCXX_VER) || __DECCXX_VER > 60290024Q# define _RWSTD_REQUIRES(pred, args) (pred) ? (void)0 : _RW::__rw_throw args# else$ // working around a DEC cxx bugO# define _RWSTD_REQUIRES(pred, args) if (pred) ; else _RW::__rw_throw args# endif#endif#// function exception specification(#if !defined (_RWSTD_NO_EXCEPTIONS) \3 && !defined (_RWSTD_NO_EXCEPTION_SPECIFICATION)9 // type_id_list is a possibly empty pargenthesized list! //of comma-separated type-id's4# define _THROWS(type_id_list) throw type_id_listG#else // if _RWSTD_NO_EXCEPTIONS || _RWSTD_NO_EXCEPTION_SPECIFICATION# define _THROWS(ignore)G#endif // !_RWSTD_NO_EXCEPTIONS && !_RWSTD_NO_EXCEPTION_SPECIFICATION// for convenience9#if !defined (_RWSTD_NO_CLASS_PARTIAL_SPEC) \6 && (!defined (__SUNPRO_CC) || __SUNPRO_CC > 0x540)E# define _DISTANCE(first, last, ignore) _STD::distance (first, last)#else6//h working around a SunPro 5.{3,4} bug (see PR #25958)O# define _DISTANCE(first, last, type) _RW::__rw_distance (first, last, type())(#endif // _RWSTD_NO_CLASS_PARTIAL_SPEC_RWSTD_NAMESPACE (__rw) { 8// file may be #included from within an extern "C" blockextern "C++" {;// pointers to the incomplete types declared below are used5// to disambiguate calls to template member functions<// bodies provided only to work around an HP aCC 3.14.10 bugtemplate struct __rw_seleict { };_RWSTD_SPECIALIZED_CLASSstruct __rw_select { };1#if !defined (__SUNPRO_CC) || __SUNPRO_CC > 0x530@#define _RWSTD_DISPATCH_INT(yes) const _RW::__rw_select < yes >*#define _RWSTD_DISPATCH(iter) \B ((_RW::__rw_select::is_integer>*)0)#else // SunPro <= 5.3K// working around a SunPro 5.3 bug (PR RW#23810/SUN#4496589) which needs anJ// enum, not a static const integral data member in order for this to worktemplate stjruct __rw_is_integer{( enum { _C_is = _TypeT::is_integer };};@#define _RWSTD_DISPATCH_INT(yes) const _RW::__rw_select < yes >*#define _RWSTD_DISPATCH(I) \P ((_RW::__rw_select<_RW::__rw_is_integer<_STD::numeric_limits >::_C_is>*)0)#endif // SunPro > 5.3} // extern "C++"} // namespace __rw+#if defined (__IBMCPP__) && __IBMCPP <= 500 // working around an xlC 5.0 bug_USING (__rw::__rw_select);#endif>// select appropriate C multibyte conversion k function based on1// whether "restartable" functions are available.#ifndef _RWSTD_NO_MBRTOWC> // reentrant versions return size_t - see 7.24.6.3.2 of C991# define _RWSTD_MBRTOWC(to, from, size, state) \3 _RWSTD_C::mbrtowc (to, from, size, state)!#elif !defined (_RWSTD_NO_MBTOWC)= // non-reentrant versions return int - see 7.20.7.2 of C998# define _RWSTD_MBRTOWC(to, from, size, ignore_state) \> _RWSTD_C::size_t (_RWSTD_C::mbtowc (to, from, size))#else // lmbtowc not supportedF# define _RWSTD_MBRTOWC(ign1, ign2, ign3, ign4) _RWSTD_C::size_t (-1)#endif // _RWSTD_NO_MBRTOWC#ifndef _RWSTD_NO_WCRTOMB+# define _RWSTD_WCRTOMB(to, from, state) \- _RWSTD_C::wcrtomb (to, from, state))#else // if defined (_RWSTD_NO_WCRTOMB)2# define _RWSTD_WCRTOMB(to, from, ignore_state) \8 _RWSTD_C::size_t (_RWSTD_C::wctomb (to, from))#endif // _RWSTD_NO_WCRTOMBE// enable only in debug mode and only id partial class specializat mionD// is supported; prevent multiple definition of _RWSTD_NO_DEBUG_ITERH#if defined(_RWSTDDEBUG) && !defined (_RWSTD_NO_CLASS_PARTIAL_SPEC) \8 && !defined (_RWSTD_NO_DEBUG_ITER) && !defined (SNI),# define _RWSTD_ASSERT_RANGE(first, last) \9 _RWSTD_ASSERT (_RW::__rw_valid_range (first, last))3# define _RWSTD_ASSERT_IN_RANGE(it, first, last) \: _RWSTD_ASSERT (_RW::__rw_in_range (it, first, last))## define _RWSTD_ASSERT_DEREF(it) \4 _RWSTD_ASSERT (_RW::__rw_dereferennceable (it))#else# ifndef _RWSTD_NO_DEBUG_ITER!# define _RWSTD_NO_DEBUG_ITER"# endif // _RWSTD_NO_DEBUG_ITER<# define _RWSTD_ASSERT_RANGE(ign1, ign2) ((void)0)<# define _RWSTD_ASSERT_IN_RANGE(ign1, ign2, ign3) ((void)0)<# define _RWSTD_ASSERT_DEREF(ignore) ((void)0)7#endif // _RWSTDDEBUG && _RWSTD_NO_CLASS_PARTIAL_SPECM// convenience macro to get the "real" iterator embedded in __rw_debug_iter<>#ifndef _RWSTD_NO_DEBUG_ITER)# define _ITER_BASEo(it) ((it).base ()),#else // if defined (_RWSTD_NO_DEBUG_ITER)# define _ITER_BASE(it) (it) #endif // _RWSTD_NO_DEBUG_ITERF// will use the deduced native type rather than the typedef to preventI// conflicts caused by inconsistent definition of wint_t (gcc 2.95.2/AIX)#ifndef _RWSTD_WINT_T6 // hardcode if wint_t is not available in 4 // used by std::traits and std::basic_[i|o]stream# define _RWSTD_WINT_T int#endif // _RWSTD_WINT_T2// used by std::traipts and std::basic_[i|o]stream,%// required to be int by 21.1.3.1, p2#define _RWSTD_INT_T int // ssize_t is defined by POSIX.1#ifndef _RWSTD_SSIZE_T# ifdef _WIN64"# define _RWSTD_SSIZE_T SSIZE_T# else# define _RWSTD_SSIZE_T long# endif#endif // _RWSTD_SSIZE_T#if defined(SNI)4# define _RWSTD_USING_SNI(name) _USING(__SNI::name)!# if defined(_RWSTD_STRICT_ANSI).# define fileno(p) (int) ((p)->_file)# endif#elseF# define _RWSTD_USING_SNI(ignorqe) typedef void __rw_unused_typedef#endif#ifndef _RWSTD_TMPBUF_SIZE!# define _RWSTD_TMPBUF_SIZE 4096#endif#ifndef _RWSTD_NO_STRTOLL$# define _STRTOLL strtoll#else- // libc has no strtoll, use strtol instead5# define _STRTOLL (_RWSTD_LONG_LONG)strtol#endif // _RWSTD_NO_STRTOLL#ifndef _RWSTD_NO_STRTOULL%# define _STRTOULL strtoull#else/ // libc has no strtoull, use strtoul instead?# define _STRTOULL (unsigned _ rRWSTD_LONG_LONG)strtoul#endif // _RWSTD_NO_STRTOULL6#if defined (_RWSTD_INSTANTIATE_TEMPLATES) \6 && !defined (_RWSTD_NO_EXPLICIT_INSTANTIATION) \' && !defined (_RWSTD_NO_INSTANTIATE)9# define _RWSTD_INSTANTIATE_1(arg) template arg<# define _RWSTD_INSTANTIATE_2(a1, a2) template a1, a2@# define _RWSTD_INSTANTIATE_3(a1, a2, a3) template a1, a2, a3#else6# if defined (_MSC_VER) \6 && !defined (_RWSTD_NO_EXPLICIT_ sINSTANTIATION) \) && !defined (_RWSTD_NO_INSTANTIATE); // disable warning C4231: nonstandard extension used :? // 'extern' before template explicit instantiation## pragma warning (disable: 4231)@# define _RWSTD_INSTANTIATE_1(arg) extern template argC# define _RWSTD_INSTANTIATE_2(a1, a2) extern template a1, a2G# define _RWSTD_INSTANTIATE_3(a1, a2, a3) extern template a1, a2, a3# else4# define _RWSTD_INSTANTIATE_1(ignore) \, t typedef void __rw_unused_typedef4# define _RWSTD_INSTANTIATE_2(ign1, ign2) \, typedef void __rw_unused_typedef4# define _RWSTD_INSTANTIATE_3(ign1, ign2, ign3) \, typedef void __rw_unused_typedef# endif(#endif // _RWSTD_INSTANTIATE_TEMPLATES(#ifndef _RWSTD_NO_STD_UNCAUGHT_EXCEPTIOND // function defined in namespace std in compiler support library <# define _UNCAUGHT_EXCEPTION() _STD::uncaught_exception()4#elif !defined (_RWSTD_NO_GLOBAL_U uNCAUGHT_EXCEPTION)G // function defined in global namespace in compiler support library 6# define _UNCAUGHT_EXCEPTION() uncaught_exception()G#else // if NO_STD_UNCAUGHT_EXCEPTION && NO_GLOBAL_UNCAUGHT_EXCEPTION7 // function not defined in compiler support library &# define _UNCAUGHT_EXCEPTION() trueE#endif // NO_STD_UNCAUGHT_EXCEPTION && NO_GLOBAL_UNCAUGHT_EXCEPTIOND// allows for efficient compilation without implicit inclusion; onlyG// specializations explicitly instanti vated in the library are available:#if defined _RWSTD_NO_IMPLICIT_INCLUSION \: && ( !defined (_RWSTD_NO_TEMPLATE_DEFINITIONS) \: || defined (_RWSTD_NO_EXPLICIT_INSTANTIATION) \: || defined (_RWSTD_NO_IMPLICIT_INSTANTIATION) \, || defined (_RWSTD_NO_INSTANTIATE))O# define _RWSTD_DEFINE_TEMPLATE(name) !(_RWSTD_NO_ ## name ## _DEFINITION)#else,# define _RWSTD_DEFINE_TEMPLATE(ignore) 0#endif:// define if neither wctrans() functwion declaration exists>// (temporary until a reliable wctrans_t test is put in place)"#if !defined (_RWSTD_NO_WCTRANS_T)B# if defined (_RWSTD_NO_WCTRANS) && defined (_RWSTD_NO_TOWCTRANS)# define _RWSTD_NO_WCTRANS_T# endif#endif // _RWSTD_NO_WCTRANS_T#ifndef _RWSTD_DUMMY_DEFAULT&# define _RWSTD_DUMMY_DEFAULT(ignore) #endif // _RWSTD_DUMMY_DEFAULTF// introduce namespace std so that "using namespace std;" always works_RWSTD_NAMESPACE (std) { } // namespace std"#endif // _RWSTD_DEFS_H_INCLUDEDww y * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved.z *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be prov {ided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as ap|plicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *M ***************************************************************************/#ifndef _RWSTD_ERROR_H_INCLUDED#define _RWSTD_ERROR_H_INCLUDED#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)}#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif#ifndef _RWSTD_NO_INCLUDES9 // prevent inclusion if compiling a .rc file with MSVC# include _RWSTD_NAMESPACE (__rw) { G// throws an exception identified by first argument, optional arguments?// (if any) used to format the exception object's what() string)void _RWSTD_EXPORT __rw_throw (int, ...);C// throws an exception identified by first argument with the secondB// argument ~containing the exception object's what() string, which<// if non-0, is dynamically allocated and must be delete[]'d>// may be assigned to a user-defined handler (e.g., to prevent@// the library from throwing exceptions or to implement logging)9extern void _RWSTD_EXPORT (*__rw_throw_proc)(int, char*);} // namespace __rw#endif // _RWSTD_NO_INCLUDES#ifndef _RWSTD_ERROR_CATALOGE // name of catalog optionally followed by a colon and a set number8 // catalog looked up according to rules of catopen(3)9 // may be customized at lib build time (pathname okay)+# define _RWSTD_ERROR_CATALOG "rwstderr:1" #endif // _RWSTD_ERROR_CATALOG#ifndef _RWSTD_ERROR_ENVVAR@ // environment variable name - overrides _RWSTD_ERROR_CATALOG) // may be customized at lib build time(# define _RWSTD_ERROR_ENVVAR "RWSTDERR"#endif // _RWSTD_ERROR_ENVVAR#ifndef _RWSTD_ERROR_FIRSTB // id of first message - 1, may be customized at lib build time# define _RWSTD_ERROR_FIRST  0#endif // _RWSTD_ERROR_FIRSTK// these must be macros to accomodate MSVC's resource compiler, with valuesB// expected to be consecutive starting with _RWSTD_ERROR_FIRST + 1O// # define _RWSTD_ERROR_EXCEPTION (_RWSTD_ERROR_FIRST + 1)O// # define _RWSTD_ERROR_BAD_EXCEPTION (_RWSTD_ERROR_FIRST + 2)O// # define _RWSTD_ERROR_BAD_ALLOC (_RWSTD_ERROR_FIRST + 3)L# define _RWSTD_ERROR_BAD_CAST (_RWSTD_ERROR_FIRST + 4)L# define _RWSTD_ERROR_LOGIC_ERROR (_RWSTD_ERROR_FIRST + 5)L# define _RWSTD_ERROR_DOMAIN_ERROR (_RWSTD_ERROR_FIRST + 6)L# define _RWSTD_ERROR_INVALID_ARGUMENT (_RWSTD_ERROR_FIRST + 7)L# define _RWSTD_ERROR_LENGTH_ERROR (_RWSTD_ERROR_FIRST + 8)L# define _RWSTD_ERROR_OUT_OF_RANGE (_RWSTD_ERROR_FIRST + 9)L# define _RWSTD_ERROR_RUNTIME_ERROR (_RWSTD_ERROR_FIRST + 10)L# define _RWSTD_ERROR_RANGE_ERROR (_RWSTD_ERROR_FIRST + 11)L# define _RWSTD_ERROR_OVERFLOW_ERROR (_RWSTD_ERROR_FIRST + 12)L# define _RWSTD_ERROR_UNDERFLOW_ERROR (_RWSTD_ERROR_FIRST + 13)L# define _RWSTD_ERROR_FAILBIT_SET (_RWSTD_ERROR_FIRST + 14)L# define _RWSTD_ERROR_BADBIT_SET (_RWSTD_ERROR_FIRST + 15)L# define _RWSTD_ERROR_EOFBIT_SET (_RWSTD_ERROR_FIRST + 16)L# define _RWSTD_ERROR_IOSTATE_BIT_SET (_RWSTD_ERROR_FIR ST + 17)L# define _RWSTD_ERROR_FACET_NOT_FOUND (_RWSTD_ERROR_FIRST + 18)L# define _RWSTD_ERROR_LOCALE_BAD_NAME (_RWSTD_ERROR_FIRST + 19)L# define _RWSTD_ERROR_LOCALE_ERROR_NAME (_RWSTD_ERROR_FIRST + 20)L# define _RWSTD_ERROR_CODECVT (_RWSTD_ERROR_FIRST + 21)L# define _RWSTD_ERROR_BAD_POINTER (_RWSTD_ERROR_FIRST + 22)L# define _RWSTD_ERROR_TRANSFORM (_RWSTD_ERROR_FIRST + 23)L# define _RWSTD_ERROR_L OCALE_BAD_CAT (_RWSTD_ERROR_FIRST + 24)A# define _RWSTD_ERROR_STRINGS \A "%s: %s: unspecified error", \A "%s: %s: exception", \A "%s: %s: unexpected exception", \A "%s: %s: bad_alloc: out of memory", \A "%s: %s: bad cast", \A "%s: %s: logic error",  \A "%s: %s: out of memory", \A "%s: %s: bad cast", \A "%s: %s: length error: size %u out of range [0, %u)", \A "%s: %s: argument value %u out of range [0, %u)", \A "%s: %s: runtime error", \A "%s: %s: range error: invalid range [%d, %d)", \A "%s: %s: overflow error", \A  "%s: %s: underflow error", \A /* the following take a single arg because */ \A /* they are generated in a .cpp file */ \A "%s: stream object has set ios::failbit", \A "%s: stream object has set ios::badbit", \A "%s: stream object has set ios::eofbit", \A "%s: stream object has set %s", \A "%s: %s: facet %u not fo und in locale (\"%s\")", \A "%s: %s: bad locale name: \"%s\"", \A "%s: %s: failed to construct locale name", \A "%s: %s: conversion failed", \A "%s: %s: invalid pointer %p", \A "%s: %s: transformation failed", \+ "%s: %s: bad category value: %#x".#define _RWSTD_ERROR_EXCEPTION "exception"9#define _RWSTD_ERROR_BAD_EXCEPTION "unexpected exception"=#define _RWSTD_ERROR_BAD_ALLOC "bad_alloc: out of memory"E#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif##endif // _RWSTD_ERROR_H_INCLUDEDww Hn7ԦL/*************************************************************************** *G * _exception.h - Declarations for the Standard Library exception class *E * This is an internal header file used to implement the C++ Standard? * Library. It should never be #included directly by a program. *4 * $Id: //stdlib/3.0-rel/include/rw/_exception.h#4 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard  Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Softwa re, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any othe r copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/##ifndef _RWSTD_EXCEPTION_H_INCLUDED##define _RWSTD_EXCEPTION_H_INCLUDED#include #include #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) { 3// forward declarations avoid circular dependencies8template class basic_string;template struct char_traits;template class allocator;Gtypedef basic_string, allocator > string;} // namespace std_RWSTD_NAMESPACE (__rw) {  9// base exception class inherited by all other exceptions:class _RWSTD_EXPORT __rw_exception: public _STD::exception{public: __rw_exception&A _C_assign (const char*, _RWSTD_SIZE_T = (_RWSTD_SIZE_T)(-1));" __rw_exception () _THROWS (())- : _STD::exception (), _C_what (0) { }0 __rw_exception (const __rw_exception &__rhs)0 : _STD::exception (__rhs), _C_what (0) {" _C_assign (__rhs.what ()); }3 _EXPLICIT __rw_exception (const _STD::string&); 1 _EXPLICIT __rw_exception (const char *__what)+ : _STD::exception (), _C_what (0) { _C_assign (__what); }, virtual ~__rw_exception () _THROWS (());C // empty exception specification necessary in order to preserve? // the no-exception guarantee provided by std::exception to* // derived classes (e.g., logic_error)J __rw_exception& operator= (const __rw_exception &__rhs) _THROWS (()) {) return _C_assign (__rhs.what ()); }4 virtual const char* what () const _THROWS (()) {8 _RWSTD_ASSERT (0 != _C_what); // must be non-0 return _C_what; }private:* char *_C_what; // description string};} // namespace __rwE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif'#endif // _RWSTD_EXCEPTION_H_INCLUDEDww 6 Tp7ԦL/*************************************************************************** *3 * _num_put.cc - definition of std::num_put members. *4 * $Id: //stdlib/3.0-rel/include/loc/_num_put.cc#3 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 n7ԦL/*************************************************************************** *B * _file.h - Wrapper definitions for platform independent file I/O *E * This is an internal header file used to implement the C++ Standard? * Library. It should never be #included directly by a program. */ * $Id: //stdlib/3.0-rel/include/rw/_file.h#2 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Developme nt Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies t hereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/#ifndef _RWSTD_FILE_H_INCLUDED#define _RWSTD_FILE_H_INCLUDED#include #include _RWSTD_CSTDIOC#if (defined (_WIN32) || defined (_WIN64)) && !defined (__CYGWIN__)# include # include #endif // _WIN32 || _WIN64(#if defined (_WIN32) || defined (_WIN64)# define _BINARY _O_BINARY#else # define _BINARY 0#endif _RWSTD_NAMESPACE (__rw) { ,extern "C" int open (const char*, int, ...);extern "C" int close (int);;extern "C" _RWSTD_SSIZE_T read (int, void*, _RWSTD_SIZE_T);Bextern "C" _RWSTD_SSIZE_T write (int, const void*, _RWSTD_SIZE_T);7extern "C" _RWSTD_OFF_T lseek (int, _RWSTD_OFF_T, int);%extern "C" int fcntl (int, int, ...);I// declare fileno in case it's not declared (for strict ANSI conformance))extern "C" int (fileno)(_RWSTD_C::FILE*); #ifdef fileno%# define _RWSTD_FILENO(f) fileno (f)3#elif __SUNPRO_CC == 0x530 && defined (__SunOS_5_6)> // working around a SunPro 5.3 bug on SunOS 5.6 (PR #26283)%# define _RWSTD_FILENO(f) (f)->_file#else*# define _RWSTD_FILENO(f) _RW::fileno (f)#endif // fileno} // namespace __rw#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (__rw) { I// __rw_file_t implements a file abstraction used by std::basic_filebuf<>A// the size of the object is guaranteed to be the same regardlessD// of whether FILE* or int (for file descriptor) is used - switchingC// between one and the other (for efficiency) is controlled via the// macro _RWSTD_NO_NATIVE_IOunion _RWSTD_EXPORT __rw_file_t{private:3 static bool _C_is_open (_RWSTD_C::FILE *__fp) {D return !(__fp == (_RWSTD_C::FILE*)_RWSTD_INVALID_FILE_PTR); }1 static int _C_fileno (_RWSTD_C::FILE *__fp) {= return _C_is_open (__fp) ? _RWSTD_FILENO (__fp) : -1; }public:! static int _C_get_mode (int);2 static int _C_get_mode (_RWSTD_C::FILE *__fp);#ifndef _RWSTD_NO_NATIVE_IO: __rw_file_t (): _C_fdsc (_RWSTD_INVALID_FILE_DESC) { }F __rw_file_t (_RWSTD_C::FILE *__fp): _C_fdsc (_C_fileno (__fp)) { } . __rw_file_t (int __fd): _C_fdsc (__fd) { }D __rw_file_t (const __rw_file_t &__f) : _C_fdsc (__f._C_fdsc) { }6 __rw_file_t & operator= (const __rw_file_t &__f) { _C_fdsc = __f._C_fdsc; return *this; }  int _C_get_mode () const;$ int _C_get_mode_arg (int) const; int _C_get_fd () const { return _C_fdsc; } bool _C_is_open () const {4 return _C_fdsc != _RWSTD_INVALID_FILE_DESC; } bool _C_is_stdin () const {. return _RWSTD_STDIN_FILENO == _C_fdsc; } bool _C_is_stdout () const {/ return _RWSTD_STDOUT_FILENO == _C_fdsc; } bool _C_is_stderr () const {/ return _RWSTD_STDERR_FILENO == _C_fdsc; } bool _C_is_std () const {D return _C_is_stdin () || _C_is_stdout () || _C_is_stderr (); }G __rw_file_t& _C_open (const char *__name, int __mode, long __prot); bool _C_close () {$ return 0 == close (_C_fdsc); } _RWSTD_SIZE_TD _C_read (void *__buf, _RWSTD_SIZE_T __size, _RWSTD_SIZE_T __n) {F _RWSTD_SSIZE_T __nbytes = read (_C_fdsc, __buf, __size * __n);O return __nbytes < 0 ? 0 : _RWSTD_STATIC_CAST (_RWSTD_SIZE_T, __nbytes); }P bool _C_write (const void* __buf, _RWSTD_SIZE_T __size, _RWSTD_SIZE_T __n) {E return (_RWSTD_SIZE_T)write (_C_fdsc, __buf, __size * __n) == __size * __n; }0 long _C_seek (long __offset, int __origin) {3 return lseek (_C_fdsc, __offset, __origin); }, // For non-native i/o facilitation only. int _C_flush ( ) { return 0; })#else // if defined (_RWSTD_NO_NATIVE_IO) , const char* _C_get_mode_arg (int) const;% __rw_file_t ( ) : _C_fptr (0) { }: __rw_file_t (_RWSTD_C::FILE *__fp): _C_fptr (__fp) { } __rw_file_t (int);C __rw_file_t (const __rw_file_t &__f): _C_fptr (__f._C_fptr) { }5 __rw_file_t& operator= (const __rw_file_t &__f) { _C_fptr = __f._C_fptr; return *this; } int _C_get_mode () const; int _C_get_fd () const {# return _C_fileno (_C_fptr); } bool _C_is_open () const { return !!_C_fptr; } bool _C_is_stdin () const {: return _RWSTD_STDOUT_FILENO ==_C_fileno (_C_fptr); } bool _C_is_stdout () const {:  return _RWSTD_STDOUT_FILENO ==_C_fileno (_C_fptr); } bool _C_is_stderr () const {: return _RWSTD_STDERR_FILENO ==_C_fileno (_C_fptr); }  bool _C_is_std () const {D return _C_is_stdin () || _C_is_stdout () || _C_is_stderr (); } __rw_file_t &3 _C_open (const char *__name, int __mode, long); bool _C_close () {= return !_C_is_open () ? true : 0 == fclose (_C_fptr); } Q _RWSTD_SIZE_T _C_read(void *__buf, _RWSTD_SIZE_T __size, _RWSTD_SIZE_T __n) {< return __size * fread (__buf, __size, __n, _C_fptr); }P bool _C_write (const void* __buf, _RWSTD_SIZE_T __size, _RWSTD_SIZE_T __n) {; return fwrite (__buf, __size, __n, _C_fptr) == __n; }0 long _C_seek (long __offset, int __origin) {9 long __pos = fseek (_C_fptr, __offset, __origin); if (__pos < 0) return __pos; return ftell (_C_fptr); } int _C_flush () {< return _C_is_open () ? fflush(_C_fptr) : _RWSTD_EOF; }#endif //_RWSTD_NO_NATIVE_IOprivate:O _RWSTD_C::FILE *_C_fptr; // file used with _RWSTD_NO_NATIVE_IO is undef'dL int _C_fdsc; // file descriptor - used otherwise (default)};.inline int __rw_file_t::_C_get_mode (int __fd){8// FIXME -- need to have equivalent of fcntl() on win32.#ifdef _WIN32 & return __fd == _RWSTD_STDIN_FILENO ? _RWSTD_IOS_INM : __fd == _RWSTD_STDOUT_FILENO || __fd == _RWSTD_STDERR_FILENOE ? _RWSTD_IOS_OUT : _RWSTD_IOS_OUT | _RWSTD_IOS_IN; #else * int __m = fcntl (__fd, _RWSTD_F_GETFL); if (__m == -1)& return _RWSTD_INVALID_OPENMODE;; int __mode = __m & _RWSTD_O_APPEND ? _RWSTD_IOS_APP : 0;$ switch (__m & _RWSTD_O_ACCMODE) {< case _RWSTD_O_RDONLY: __mode |= _RWSTD_IOS_IN; break;= case _RWSTD_O_WRONLY: __mode |= _RWSTD_IOS_OUT; break;M case _RWSTD_O_RDWR: __mode |= _RWSTD_IOS_IN | _RWSTD_IOS_OUT; break; } return __mode;#endif}:inline int __rw_file_t::_C_get_mode (_RWSTD_C::FILE *__fp){* return _C_get_mode (_C_fileno (__fp));}#ifndef _RWSTD_NO_NATIVE_IO#ifdef _INLINE_WITH_STATICS_INLINE_WITH_STATICS int0__rw_file_t::_C_get_mode_arg (int __index) const{2#if !(defined (__osf__) && defined (__GNUG__) \, && __GNUG__ == 2 && __GNUG_MINOR__ < 96)? // static not used to prevent a g++ 2.95.2 warning on Tru64@ // sorry: semantics of inline function static data are wrong, // (you'll wind up with multiple copies) static#endif const int __modetbl [] = { -1,; _RWSTD_O_WRONLY | _RWSTD_O_APPEND | _RWSTD_O_CREAT, -1 | _BINARY,F _RWSTD_O_WRONLY | _BINARY | _RWSTD_O_APPEND | _RWSTD_O_CREAT, _RWSTD_O_RDONLY,* _RWSTD_O_RDONLY | _RWSTD_O_APPEND," _RWSTD_O_RDONLY | _BINARY,E _RWSTD_O_RDONLY | _BINARY | _RWSTD_O_APPEND | _R WSTD_O_CREAT,; _RWSTD_O_TRUNC | _RWSTD_O_WRONLY | _RWSTD_O_CREAT,; _RWSTD_O_WRONLY | _RWSTD_O_APPEND | _RWSTD_O_CREAT,D _RWSTD_O_TRUNC | _RWSTD_O_WRONLY | _RWSTD_O_CREAT | _BINARY,E _RWSTD_O_WRONLY | _BINARY | _RWSTD_O_APPEND | _RWSTD_O_CREAT, _RWSTD_O_RDWR,9 _RWSTD_O_RDWR | _RWSTD_O_APPEND | _RWSTD_O_CREAT, _RWSTD_O_RDWR | _BINARY,D _RWSTD_O_RDWR | _BINARY | _RWSTD_O_APPEND | _RWSTD_O_CREAT, _RWSTD_O_TRUNC,) _R WSTD_O_TRUNC | _RWSTD_O_APPEND,! _RWSTD_O_TRUNC | _BINARY,3 _RWSTD_O_TRUNC | _RWSTD_O_APPEND | _BINARY,) _RWSTD_O_TRUNC | _RWSTD_O_RDONLY,; _RWSTD_O_TRUNC | _RWSTD_O_RDONLY | _RWSTD_O_APPEND,3 _RWSTD_O_TRUNC | _RWSTD_O_RDONLY | _BINARY,F _RWSTD_O_TRUNC | _RWSTD_O_RDONLY | _BINARY | _RWSTD_O_APPEND,: _RWSTD_O_TRUNC | _RWSTD_O_WRONLY | _RWSTD_O_CREAT,L _RWSTD_O_TRUNC | _RWSTD_O_WRONLY | _RWSTD_O_APPEND | _RWSTD_O_CREAT,E _RWS TD_O_TRUNC | _RWSTD_O_WRONLY | _BINARY | _RWSTD_O_CREAT,F _RWSTD_O_TRUNC | _RWSTD_O_WRONLY | _BINARY | _RWSTD_O_APPEND | _RWSTD_O_CREAT,8 _RWSTD_O_TRUNC | _RWSTD_O_RDWR | _RWSTD_O_CREAT,J _RWSTD_O_TRUNC | _RWSTD_O_RDWR | _RWSTD_O_APPEND | _RWSTD_O_CREAT,C _RWSTD_O_TRUNC | _RWSTD_O_RDWR | _RWSTD_O_CREAT | _BINARY,D _RWSTD_O_TRUNC | _RWSTD_O_RDWR | _BINARY | _RWSTD_O_APPEND | _RWSTD_O_CREAT }; if ( 0 > __indexA || int (sizeof __modetbl / sizeof *__modetbl) <= __index)' return _RWSTD_INVALID_OPENMODE; return __modetbl[__index];} #endif // _INLINE_WITH_STATICSinline __rw_file_t&B__rw_file_t::_C_open (const char *__name, int __mode, long __prot){' int __m = _C_get_mode_arg ( __modeP & ~(_RWSTD_IOS_NOCREATE | _RWSTD_IOS_NOREPLACE)); ( if (__m == _RWSTD_INVALID_OPENMODE){) _C_fdsc = _RWSTD_INVALID_FILE_DESC; return *this; } " if (__mode & _RWSTD_IOS_OUT) {3#if defined(__DECCXX) && !defined(__DECFIXCXXL1732)#if _RWSTD_IOS_NOCREATE) if (__mode & _RWSTD_IOS_NOCREATE)# __m &= ~_RWSTD_O_CREAT;#endif#else) if (__mode & _RWSTD_IOS_NOCREATE)# __m &= ~_RWSTD_O_CREAT;#endif3#if defined(__DECCXX) && !defined(__DECFIXCXXL1732)#if _RWSTD_IOS_NOREPLACE* if (__mode & _RWSTD_IOS_NOREPLACE)! __m |= _RWSTD_O_EXCL;#endif#else*  if (__mode & _RWSTD_IOS_NOREPLACE)! __m |= _RWSTD_O_EXCL;#endif }* _C_fdsc = open (__name, __m, __prot);  return *this;},inline int __rw_file_t::_C_get_mode () const{! return _C_get_mode (_C_fdsc);}+#else // if defined (_RWSTD_NO_NATIVE_IO)Cinline const char* __rw_file_t::_C_get_mode_arg (int __index) const{2#if !(defined (__osf__) && defined (__GNUG__) \, && __GNUG__ == 2 && __GNUG_MINOR__ < 96)? // static not used t o prevent a g++ 2.95.2 warning on Tru64@ // sorry: semantics of inline function static data are wrong, // (you'll wind up with multiple copies) static#endif" const char __modetbl [][4] = {6 "", // no flags error 06 "a", // app 16 "", // binary 26 "ab", // binary|app 36 "r", // in 46 "a",  // in|app 56 "rb", // in|binary 66 "ab", // in|binary|app 76 "w", // out 86 "a", // out|app 97 "wb", // out|binary 107 "ab", // out|binary|app 117 "r+", // out|in 127 "a+", // out|in|app 137 "r +b", // out|in|binary 147 "a+b", // out|in|binary|app 157 "w", // trunc 167 "w", // trunc|app 177 "wb", // trunc|binary 187 "wb", // trunc|binary|app 197 "", // trunc|in 207 "", // trunc|in|app 217 "", // trunc|in|binary  227 "", // trunc|in|binary|app 237 "w", // trunc|out 247 "w", // trunc|out|app 257 "wb", // trunc|out|binary 269 "wb", // trunc|out|binary|app 27 7 "w+", // trunc|out|in 287 "w+", // trunc|out|in|app 297 "w+b", // trunc|out|in|binary 307 "w+b" // trunc|out|in|binary|app 31 }; if ( 0 > __index@ || int (sizeof __modetbl / sizeof *__modetbl) <= __index) return 0; return __modetbl[__index];}*inline __rw_file_t::__rw_file_t (int __fd){> const char *__mode = _C_get_mode_arg (_C_get_mode (__fd));> _C_fptr = __mode && __fd > -1 ? fdopen (__fd, __mode) : 0;}Oinline __rw_file_t& __rw_file_t::_C_open (const char *__name, int __mode, long){/ const char *__m = _C_get_mode_arg (__mode); if (!__m) { _C_fptr = 0; return *this; } " _C_fptr = fopen (__name, __m); if (_C_is_open ( ))( setvbuf (_C_fptr, 0, _IONBF, 0); return *this;},inline int __rw_file_t::_C_get_mode () const{! return _C_get_mode (_C_fptr);}#endif // _RWSTD_NO_NATIVE_IO} // namespace __rwE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif #endif // _RWSTD_FILE_H_INCLUDEDwwn7Ԧ// -*- C++ -*-L/*************************************************************************** *= * _funcbase.h - definitions of function objects base classes *3 * $Id: //stdlib/3.0-rel/include/rw/_funcbase.h#2 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** * * Copyright (c) 1994 * Hewlett-Packard Company *E * Permission to use, copy, modify, distribute and sell this softwareG * and its documentation for any purpose is hereby g ranted without fee,D * provided that the above copyright notice appear in all copies andD * that both that copyright notice and this permission notice appearA * in supporting documentation. Hewlett-Packard Company makes noA * representations about the suitability of this software for anyH * purpose. It is provided "as is" without express or implied warranty. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other co pies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/"#ifndef _RWSTD_FUNCBASE_H_INCLUDED"#define _RWSTD_FUNCBASE_H_INCLUDED#include #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) { // 20.3.1 - Base$template struct unary_function{" typedef _Arg argument_type; typedef _Result result_type;};N#define _RWSTD_UNARY_FUNCTION_TYPES(T, U) \N typedef _TYPENAME _STD::unary_function::argument_type argument_type; \I typedef _TYPENAME _STD::unary_function::result_type result_type2template struct binary_function{( typedef _Arg1 first_argument_type;) typedef _Arg2 second_argument_type; typedef _Result result_type;};L#define _RWSTD_BINARY_FUNCTION_TYPES(T, U, V) \L typedef _TYPENAME _STD::binary_function::second_argument_type \L second_argument_type;  \L typedef _TYPENAME _STD::binary_function::first_argument_type \L first_argument_type; \L typedef _TYPENAME _STD::binary_function::result_type \ result_type // 20.3.3, p5template 2struct less: binary_function<_TypeT, _TypeT, bool>{8 _RWSTD_BINARY_FUNCTION_TYPES (_TypeT, _TypeT, bool);< result_type operator() (const first_argument_type &__x,D  const second_argument_type &__y) const { return __x < __y; }};} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif&#endif // _RWSTD_FUNCBASE_H_INCLUDEDww *On7ԦL/*************************************************************************** *7 * _ioiter.h - Definitions of stream iterator templates *E * This is an internal header file used to implement the C++ Standard? * Library. It should never be #included directly by a program. *1 * $Id: //stdlib/3.0-rel/include/rw/_ioiter.h#2 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Compa ny, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Righ ts Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof m ay not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/ #ifndef _RWSTD_IOITER_H_INCLUDED #define _RWSTD_IOITER_H_INCLUDED#include #ifdef __USE_STD_IOSTREAM#include #elseclass istream;class ostream;class streambuf;#endif!#include #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) { Etemplate class istream_iterator;Etemplate Mbool operator== (const istream_iterator<_TypeT, _CharT, _Traits, _Distance>&,N const istream_iterator<_TypeT, _CharT, _Traits, _Distance>&); // 24.5.1*#if !defined (_MSC_VER) || _MSC_VER > 1300template ),D class _Distance _RWSTD_COMPLEX_DEFAULT (_RWSTD_PTRDIFF_T)>#else// prevent MSVC 6.0 ICEEtemplate #endifclass istream_iterator< : public iterator{6 friend bool _RWSTD_SPECIALIZED_FRIEND (operator==); (const istream_iterator&, const istream_iterator&);; typedef iterator _C_base;public: < typedef _CharT char_type;> typedef _Traits traits_type;#ifdef __USE_STD_IOSTREAM? typedef basic_istream istream_type;#else? typedef istream istream_type;#endif // for convenience= typedef _TYPENAME _C_base::value_type value_type; // 24.5.1.1, p1( istream_iterator (): _C_strm (0) { } // 24.5.1.1, p2( istream_iterator (istream_type& __s) : _C_strm (&__s) { ++*this; } // 24.5.1.2, p1* const value_type& operator* () const { return _C_val; } // 24.5.1.2, p2A _RWSTD_OPERATOR_ARROW (const value_type* operator->() const); // 24.5.1.2, p3% istream_iterator& operator++ () {D return _C_strm && !!*_C_strm && (*_C_strm >> _C_val), *this; } // 24.5.1.2, p5' istream_iterator operator++ (int) {' istream_iterator __tmp = *this; return ++*this, __tmp; } protected:1  istream_type *_C_strm; // associated stream4 value_type _C_val; // last extracted value};// 24.5.1.2, p6Etemplate inline boolLoperator== (const istream_iterator<_TypeT, _CharT, _Traits, _Distance>& __x,L const istream_iterator<_TypeT, _CharT, _Traits, _Distance>& __y){N return (__x._C_strm && !!*__x._C_strm) == (__y._C_strm && !!*__y._C_strm);}Etemplate inline boolLoperator!= (const istream_iterator<_TypeT, _CharT, _Traits, _Distance>& __x,L const istream_iterator<_TypeT, _CharT, _Traits, _Distance>& __y){ return !(__x == __y);} // 24.5.2template ) >Nstruct ostream_iterator: iterator{< typedef _CharT char_type;> typedef _Traits traits_type;#ifdef __USE_STD_IOSTREAM? typedef basic_ostream ostream_type;#else? typedef ostream ostream_type;#endif // 24.5.2.1, p1, ostream_iterator (ostream_type& __strm) ) : _C_strm (&__strm), _C_str (0) { } // 24.5.2.1, p2B ostream_iterator (ostream_type& __strm, const char_type* __s) + : _C_strm (&__strm), _C_str (__s) { } // 24.5.2.2, p18 ostream_iterator& operator= (const _TypeT &__val) {  *_C_strm << __val; if (_C_str) *_C_strm << _C_str; return *this; } // 24.5.2.2, p2$ ostream_iterator& operator* () { return *this; } // 24.5.2.2, p3% ostream_iterator& operator++ () { return *this; } ( ostream_iterator& operator++ (int) { return *this; }private:4 ostream_type* _C_strm; // associated streamA const char_type* _C_str; // string to separate values with}; // 24.5.3%templatestruct istreambuf_iterator+ : iterator{> typedef _CharT char_type;@ typedef _Traits traits_type;= typedef _TYPENAME traits_type::int_type int_type;#ifdef __USE_STD_IOSTREAMC typedef basic_streambuf streambuf_type;A typedef basic_istream istream_type;#elseC typedef streambuf streambuf_type;A typedef istream istream_type;#endif // 24.5.3.1 class proxy { char_type _C_keep; streambuf_type *_C_sb;3 proxy (char_type __c, streambuf_type *__sb)-  : _C_keep (__c), _C_sb (__sb) { } public: & char_type operator* () const { return _C_keep; }B friend struct istreambuf_iterator; }; // 24.5.3.2, p1? istreambuf_iterator (streambuf_type *__sb = 0) _THROWS (()) : _C_sb (__sb) { } // 24.5.3.2, p2; istreambuf_iterator (istream_type &__strm) _THROWS (())" : _C_sb (__strm.rdbuf ()) { }  // 24.5.3.2, p3; istreambuf_iterator (const proxy &__proxy) _THROWS (()) : _C_sb (__proxy._C_sb) { } // 24.5.3.3, p1! char_type operator*() const {A return traits_type::to_char_type (_C_sb ? _C_sb->sgetc ()B : traits_type::eof ()) ; } // 24.5.3.4, p1( istreambuf_iterator& operator++ () { if (_C_sb) _C_sb->sbumpc (); return *this; } // 24.5.3.4, p3 proxy operator++ (int);E // 24.5.3.5, p1 - const follows the accepted resolution of DR 1109 bool equal (const istreambuf_iterator& __rhs) const {) return traits_type::eq_int_type (A _C_sb ? _C_sb->sgetc () : traits_type::eof (),N __rhs._C_sb ? __rhs._C_sb->sgetc () : traits_type::eof ()); }private: streambuf_type *_C_sb;};%template=inline _TYPENAME istreambuf_iterator<_CharT, _Traits>::proxy 5istreambuf_iterator<_CharT, _Traits>::operator++(int){A int_type __c = _C_sb ? _C_sb->sgetc () : traits_type::eof ();= if (!traits_type::eq_int_type (__c, traits_type::eof ())) _C_sb->sbumpc ();: return proxy (traits_type::to_char_type (__c), _C_sb);} // 24.5.3.6%template inline bool<operator== (const istreambuf_iterator<_CharT, _Traits>& __x,< const istreambuf_iterator<_CharT, _Traits>& __y){ return __x.equal (__y);} // 24.5.3.7%template inline bool=operator!= (const istreambuf_iterator<_CharT, _Traits>& __x, < const istreambuf_iterator<_CharT, _Traits>& __y){ return !(__x == __y);} // 24.5.4%templateclass ostreambuf_iterator B : public iterator{public:> typedef _CharT char_type;@ typedef _Traits traits_t ype;#ifdef __USE_STD_IOSTREAMC typedef basic_streambuf streambuf_type;A typedef basic_ostream ostream_type;#elseC typedef streambuf streambuf_type;A typedef ostream ostream_type;#endif // 24.5.4.1, p1; ostreambuf_iterator (ostream_type &__strm) _THROWS (()) : _C_sb (__strm.rdbuf ()) {@ _RWSTD_ASSERT (__strm.rdbuf () != 0); // lwg issue 112 } // 24.5.4.1, p2; ostreambuf_iterator (streambuf_type *__sb) _THROWS (()) : _C_sb (__sb) {" _RWSTD_ASSERT (__sb != 0); } // 24.5.4.2, p3' ostreambuf_iterator& operator* () { return *this; } // 24.5.4.2, p4( ostreambuf_iterator& operator++ () { return *this; } // 24.5.4.2, p4+ ostreambuf_iterator& operator++ (int) { return *this; } // 24.5.4.2, p15 ostreambuf_iterator& operator= (char_type __c) { G if (!failed () && traits_type::eq_int_type (_C_sb->sputc (__c),I traits_type::eof ())) _C_sb = 0; return *this; } // 24.5.4.2, p5' bool failed () const _THROWS (()) { return !_C_sb; }private: streambuf_type *_C_sb;};} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_ prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif$#endif // _RWSTD_IOITER_H_INCLUDEDww n7ԦL/*************************************************************************** *F * _iosbase.h - Declarations for the Standard Library basic stream I/O *E * This is an internal header file used to implement the C++ Standard? * Library. It should never be #included directly by a program. *2 * $Id: //stdlib/3.0-rel/include/rw/_iosbase.h#3 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Dev elopment Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other co pies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/!#ifndef _RWSTD_IOSBASE_H_INCLUDED!#define _RWSTD_IOSBASE_H_INCLUDED#include #include #include #include #include #ifndef _RWSTD_NO_EXCEPTIONS$# include #endif // _RWSTD_NO_EXCEPTIONS#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) {5struct _RWSTD_EXPORT ios_base: _RW::__rw_synchronized{ // 27.4.2.1.17 struct _RWSTD_EXPORT failure: _RW::__rw_exception {0 _EXPLICIT failure (const string &__what). : _RW::__rw_exception (__what) { } // extension2 _EXPLICIT failure (const char *__what = 0). : _RW::__rw_exception (__what) { } };#ifndef _RWSTD_NO_EXT_FAILURE // extensions1 struct _RWSTD_EXPORT badbit_set: failure { };1 struct _RWSTD_EXPORT eofbit_set: failure { };2 struct _RWSTD_EXPORT failbit_set: failure { };!#endif // _RWSTD_NO_EXT_FAILURE // 27.4.2.1.2 typedef int fmtflags;9 // insert and extract bool type in alphabetic format G _RWSTD_STATIC_CONST (fmtflags, boolalpha = _RWSTD_IOS_BOOLALPHA);I // converts integer input or generates integer output in decimal baseA _RWSTD_STATIC_CONST (fmtflags, dec = _RWSTD_IOS_DEC);= // generate floating-point output in fixed-point notationC _RWSTD_STATIC_CONST (fmtflags, fixed = _RWSTD_IOS_FIXED);M // converts integer input or generates integer output in hexadecimal baseA _RWSTD_STATIC_CONST (fmtflags, hex = _RWSTD_IOS_HEX);O // adds fill characters at a designated internal point in certain generatedC // output, or identical to right if no such point is designatedF _RWSTD_STATIC_CONST (fmtflags, internal = _RWSTD_IOS_INTERNAL);D // adds fill characters on the right of certain generated outputB _RWSTD_STATIC_CONST (fmtflags, left = _RWSTD_IOS_LEFT);G // convert s integer input or generates integer output in octal baseA _RWSTD_STATIC_CONST (fmtflags, oct = _RWSTD_IOS_OCT);C // adds fill characters on the left of certain generated outputC _RWSTD_STATIC_CONST (fmtflags, right = _RWSTD_IOS_RIGHT);= // generates floating-point output in scientific notationH _RWSTD_STATIC_CONST (fmtflags, scientific = _RWSTD_IOS_SCIENTIFIC);J // generates a prefix indicating the numeric base of generated integer= // output (bin  - none, oct - "0", dec - none, hex - "0x")F _RWSTD_STATIC_CONST (fmtflags, showbase = _RWSTD_IOS_SHOWBASE);G // generates a decimal-point character unconditionally in generated // floating-point outputG _RWSTD_STATIC_CONST (fmtflags, showpoint = _RWSTD_IOS_SHOWPOINT);B // generates a + sign in non-negative generated numeric outputE _RWSTD_STATIC_CONST (fmtflags, showpos = _RWSTD_IOS_SHOWPOS);@ // skips leading white space before certain input operations D _RWSTD_STATIC_CONST (fmtflags, skipws = _RWSTD_IOS_SKIPWS);1 // flushes output after each output operationE _RWSTD_STATIC_CONST (fmtflags, unitbuf = _RWSTD_IOS_UNITBUF);J // replaces certain lowercase letters with their uppercase equivalents // in generated outputG _RWSTD_STATIC_CONST (fmtflags, uppercase = _RWSTD_IOS_UPPERCASE);#ifndef _RWSTD_NO_EXT_BIN_IOE // extension - converts integer input or generates integer output // in binary baseA _RWSTD_STATIC_CONST (fmtflags, bin = _RWSTD_IOS_BIN); #endif // _RWSTD_NO_EXT_BIN_IOG _RWSTD_STATIC_CONST (fmtflags, basefield = _RWSTD_IOS_BASEFIELD);I _RWSTD_STATIC_CONST (fmtflags, adjustfield = _RWSTD_IOS_ADJUSTFIELD);H _RWSTD_STATIC_CONST (fmtflags, floatfield = _RWSTD_IOS_FLOATFIELD);"#ifndef _RWSTD_NO_EXT_REENTRANT_IO; // extension: never locks the object in MT environmentsD _RWSTD_STATIC_CONST (fmtflags, nolock = _RWSTD_IOS_NOLOCK);> // extension: never locks stream buffer in MT environmentsG _RWSTD_STATIC_CONST (fmtflags, nolockbuf = _RWSTD_IOS_NOLOCKBUF);&#endif // _RWSTD_NO_EXT_REENTRANT_IO // 27.4.2.1.3 typedef int iostate;@ _RWSTD_STATIC_CONST (iostate, goodbit = _RWSTD_IOS_GOODBIT);C // indicates a loss of integrity in an input or output sequence: // (such as an irrecoverable read error from a file); ? _RWSTD_STATIC_CONST (iostate, badbit = _RWSTD_IOS_BADBIT);M // ind icates that an input operation reached the end of an input sequence? _RWSTD_STATIC_CONST (iostate, eofbit = _RWSTD_IOS_EOFBIT);D // indicates that an input operation failed to read the expectedE // characters, or that an output operation failed to generate the // desired characters@ _RWSTD_STATIC_CONST (iostate, failbit = _RWSTD_IOS_FAILBIT); // 27.4.2.1.4 typedef int openmode;% // seek to end before each write < _RWSTD_STATIC_CONST (openmode, app  = _RWSTD_IOS_APP);H // perform input and output in binary mode (as opposed to text mode)? _RWSTD_STATIC_CONST (openmode, binary = _RWSTD_IOS_BINARY); // open for input; _RWSTD_STATIC_CONST (openmode, in = _RWSTD_IOS_IN); // open for output< _RWSTD_STATIC_CONST (openmode, out = _RWSTD_IOS_OUT);/ // truncate an existing stream when opening> _RWSTD_STATIC_CONST (openmode, trunc = _RWSTD_IOS_TRUNC);6 // open and seek to end immediately after opening < _RWSTD_STATIC_CONST (openmode, ate = _RWSTD_IOS_ATE);#ifndef _RWSTD_STRICT_ANSI8 // do not create a (file) stream if it doesn't existF _RWSTD_STATIC_CONST (openmode, nocreate = _RWSTD_IOS_NOCREATE);. // do not eplace an existing (file) streamG _RWSTD_STATIC_CONST (openmode, noreplace = _RWSTD_IOS_NOREPLACE);#endif // _RWSTD_STRICT_ANSI enum _C_seekdir {! _C_beg = _RWSTD_SEEK_SET,! _C_cur = _RWSTD_SEEK_CUR, _C_end = _RWSTD_SEEK_END };*#ifndef _RWSTD_NO_STATIC_CONST_MEMBER_INIT typedef _C_seekdir seekdir;#else typedef int seekdir;.#endif // _RWSTD_NO_STATIC_CONST_MEMBER_INIT // 27.4.2.1.5, p10 _RWSTD_STATIC_CONST (seekdir, beg = _C_beg);0 _RWSTD_STATIC_CONST (seekdir, cur = _C_cur);0 _RWSTD_STATIC_CONST (seekdir, end = _C_end); #ifndef _RWSTD_NO_DEPRECATED  // D.6, p1% typedef seekdir seek_dir;& typedef openmode open_mode;%  typedef iostate io_state;& typedef _STD::streamoff streamoff;& typedef _STD::streampos streampos;"#endif // _RWSTD_NO_DEPRECATED    // 27.4.2.1.6 struct _RWSTD_EXPORT Init { Init (); ~Init (); private:3 static int _C_initcnt; // initialization counter }; // 27.4.2.2, p1 fmtflags flags () const { return _C_fmtfl; } // 27.4.2.2, p2 fmtflags flags (fmtflags); // 27.4.2.2, p4" fmtflags setf (fmtflags __f) {& return flags (flags () | __f); } // 27.4.2.2, p63 fmtflags setf (fmtflags __f, fmtflags __mask) {9 return flags (flags () & ~__mask | __f & __mask); } // 27.4.2.2, p8 void unsetf (fmtflags __f) { flags (flags () & ~__f); } // 27.4.2.2, p9# streamsize precision () const { return _C_prec; } // 27.4.2.2, p10+ streamsize precision (streamsize __p) {>  return _RWSTD_ATOMIC_IO_SWAP (_C_prec, __p, _C_mutex); } // 27.4.2.2, p12 streamsize width () const { return _C_wide; } // 27.4.2.2, p13' streamsize width (streamsize __w) {> return _RWSTD_ATOMIC_IO_SWAP (_C_wide, __w, _C_mutex); } // 27.4.2.3, p1! locale imbue (const locale&);G // extension: avoids reference counting in MT builds (may result inM // a speedup of up to 50%); this is an alternative to caching a referenceC // (pointer) to a facet in each stream and stream buffer object locale& getloc () { return _C_loc; } // 27.4.2.3, p4 locale getloc () const { return _C_loc; } // 27.4.2.5, p1 static int xalloc () {@ return _RWSTD_ATOMIC_PREINCREMENT (_C_index, false) - 1; } // 27.4.2.5, p2 long& iword (int); // 27.4.2.5, p4 void*& pword (int);; enum event { erase_event, imbue_event, copyfmt_event };: typedef void (*event_callback)(event, ios_base&, int); // 27.5.2.6, p11 void register_callback (event_callback, int);  static bool _C_is_sync () {" return _C_sync_with_stdio; } // 27.4.2.4, p16 static bool sync_with_stdio (bool __sync = true) {C // always atomic in MT environments since _C_sync is staticF return _RWSTD_ATOMIC_SWAP (_C_sync_with_stdio, __sync, false); } // 27.5.2.7, p2 virtual ~ios_base (); 3 // returns a numeric base as per 22.2.2.1.2, p4 int _C_base () const {M return _RWSTD_STATIC_CAST (unsigned, flags ()) >> _RWSTD_IOS_BASEOFF; } protected:H // will be reentrant if __reentrant is true, non-reentrant otherwise1 void _C_fire_event (event, bool __reentrant);; // unsafe members - not synchronized in MT environments& void _C_copyfmt (const ios_base&);G // may throw (second argument is a bitmap of exceptions considered)N // returns exceptions that would have been thrown had they not been masked> iostate _C_unsafe_clear (iostate = goodbit, iostate = ~0);( // called from basic_ios<>::imbue ()+ locale _C_unsafe_imbue (const locale&); // 27.5.2.7, p1 ios_base ();/ fmtflags _C_fmtfl; // formatting flags0 streamsize _C_prec; // current precision, streamsize _C_wide; // current width+ iostate _C_state; // stream state0 iostate _C_except; // active exceptions private:< ios_base (const ios_base&); // not defined< ios_base& operator= (const ios_base&); // not defined struct _C_event_cb {! int _C_index; event_callback _C_fn; };> locale _C_loc; // locale associated with stream/ long *_C_iarray; // user long data0 void* *_C_parray; // user void* data> size_t _C_isize; // size of _C_iarray in elements> size_t  _C_psize; // size of _C_parray in elementsC _C_event_cb *_C_cbarray; // array of user-registered callbacks< size_t _C_cbsize; // size of _C_cbarray in elemsH static int _C_index; // used by xalloc to obtain a unique index$ static bool _C_sync_with_stdio;};inline ios_base::ios_base () : _C_iarray (0), _C_parray (0), _C_isize (0), _C_psize (0), _C_cbarray (0), _C_cbsize (0){}inline ios_base::~ios_base(){5 // MT guard or reentrancy not necessary in a dtor; _C_fire_event (erase_event, false /* not reentrant */); delete [] _C_iarray; delete [] _C_parray; delete [] _C_cbarray;}=inline locale ios_base::_C_unsafe_imbue (const locale& __loc){ locale __tmp = _C_loc; _C_loc = __loc;6 _C_fire_event (imbue_event, true /* reentrant */); return __tmp; }3inline locale ios_base::imbue (const locale& __loc){C _RWSTD_MT_GUARD (flags () & _RWSTD_IOS_NOLOCK ? 0 : &_C_mutex);# return _C_unsafe_imbue (__loc);}#// 27.4.5.1 - fmtflags manipulators// 27.4.5.1, p25+inline ios_base& unitbuf (ios_base& __strm){$ __strm.setf (ios_base::unitbuf); return __strm;}// 27.4.5.1, p27-inline ios_base& nounitbuf (ios_base& __strm){& __strm.unsetf (ios_base::unitbuf); return __strm;}// 27.4.5.1, p1-inline ios_base& boolalpha (ios_base& __strm){& __strm.setf (ios_base::boolalpha); return __strm;}// 27.4.5.1, p3/inline ios_base& noboolalpha (ios_base& __strm){( __strm.unsetf (ios_base::boolalpha); return __strm;}// 27.4.5.1, p5,inline ios_base& showbase (ios_base& __strm){% __strm.setf (ios_base::showbase); return __strm;}// 27.4.5.1, p7.inline ios_base& noshowbase (ios_base& __strm){' __strm.unsetf (ios_base::showbase); return __strm;}// 27.4.5.1, p9-inline ios_base& showpoint (ios_ base& __strm){ & __strm.setf (ios_base::showpoint); return __strm;}// 27.4.5.1, p11/inline ios_base& noshowpoint (ios_base& __strm){( __strm.unsetf (ios_base::showpoint); return __strm;}// 27.4.5.1, p13+inline ios_base& showpos (ios_base& __strm){$ __strm.setf (ios_base::showpos); return __strm;}// 27.4.5.1, p15-inline ios_base& noshowpos (ios_base& __strm){& __strm.unsetf (ios_base::showpos); return __strm;}// 27.4.5.1, p17*inline ios_base& skipws (ios_base& __strm){# __strm.setf (ios_base::skipws); return __strm;}// 27.4.5.1, p19,inline ios_base& noskipws (ios_base& __strm){% __strm.unsetf (ios_base::skipws); return __strm;}// 27.4.5.1, p21-inline ios_base& uppercase (ios_base& __strm){& __strm.setf (ios_base::uppercase); return __strm;}// 27.4.5.1, p23/inline ios_base& nouppercase (ios_base& __strm){( __strm.unsetf (ios_base::uppercase); return __strm;}&// 27.4.5.2 - adjustfield manipulators// 27.4.5.2, p1,inline ios_base& internal (ios_base& __strm){< __strm.setf (ios_base::internal, ios_base::adjustfield); return __strm;}// 27.4.5.2, p3(inline ios_base& left (ios_base& __strm){8 __strm.setf (ios_base::left, ios_base::adjustfield); return __strm;}// 27.4.5.2, p5)inline ios_base& right (ios_base& __strm){9 __strm.setf (ios_base::right, ios_base::adjustfield); return __strm;}$// 27.4.5.3 - basefield manipulators// 27.4.5.3, p1'inline ios_base& dec (ios_base& __strm){5 __strm.setf (ios_base::dec, ios_base::basefield); return __strm;}// 27.4.5.3, p3'inline ios_base& hex (ios_base& __strm){5 __strm.setf (ios_base::hex, ios_base::basefield); return __strm;}// 27.4.5.3, p5'inline ios_base& oct (ios_base& __strm){5 __strm.setf (ios_base::oct, ios_base::basefield); return __strm;}#ifndef _RWSTD_NO_EXT_BIN_IO // extension'inline ios_base& bin (ios_base& __strm){5 __strm.setf (ios_base::bin, ios_base::basefield); return __strm;} #endif // _RWSTD_NO_EXT_BIN_IO%// 27.4.5.4 - floatfield manipulators// 27.4.5.4, p1)inline ios_base& fixed (ios_base& __strm){8 __strm.setf (ios_base::fixed, ios_base::floatfield); return __strm;}// 27.4.5.4, p3.inline ios_base& scientific (ios_base& __strm){= __strm.setf (ios_base::scientific, ios_base::floatfield); return __strm;}} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif%#endif // _RWSTD_IOSBASE_H_INCLUDEDww Y o7ԦL/*************************************************************************** *? * _iterator.h - Iterator declarations for the Standard Library *E * This is an internal header file used to implement the C++ Standard? * Library. It should never be #included directly by a program. *3 * $Id: //stdlib/3.0-rel/include/rw/_iterator.h#2 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Develop ment Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** * * Copyright (c) 1994 * Hewlett-Packard Company  *E * Permission to use, copy, modify, distribute and sell this softwareG * and its documentation for any purpose is hereby granted without fee,D * provided that the above copyright notice appear in all copies andD * that both that copyright notice and this permission notice appearA * in supporting documentation. Hewlett-Packard Company makes noA * representations about the suitability of this software for anyH * purpose. It is provided "as is" without express or implied warranty. *L * ************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with  the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/"#ifndef _RWSTD_ITERATOR_H_INCLUDED"#define _RWSTD_ITERATOR_H_INCLUDED!#include #include #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) { // Reverse iterator. //E// Macros for reverse iterators to accomodate non-standard compilers//%#ifndef _RWSTD_NO_CLASS_PARTIAL_SPEC 9# define _RWS TD_ITER_TEMPLATE template ,# define _RWSTD_ITER_ID(i) i <_Iterator>H# define _RWSTD_ITER_DIFF_TYPE(i, ignore) \? _TYPENAME iterator_traits<_Iterator>::difference_type#elseH# define _RWSTD_ITER_TEMPLATE \H template H# define _RWSTD_ITER_ID(i)  \K i <_Iterator, _Category, _TypeT, _Reference, _Pointer, _Distance>D# define _RWSTD_ITER_DIFF_TYPE(ignore, distance) distance )#endif // _RWSTD_NO_CLASS_PARTIAL_SPEC %#ifndef _RWSTD_NO_CLASS_PARTIAL_SPEC template class reverse_iteratorO : public iterator<_TYPENAME iterator_traits<_Iterator>::iterator_category, H _TYPENAME iterator_traits<_Iterator>::value_type, L _TYPENAME iterator_traits<_Iterator>::difference_type,E _TYPENAME iterator_traits<_Iterator>::pointer, F _TYPENAME iterator_traits<_Iterator>::reference>{? typedef iterator_traits<_Iterator> traits_type;public:C typedef _TYPENAME traits_type::difference_type difference_type;> typedef _TYPENAME traits_type::value_type value_type;; typedef _TYPENAME traits_type::pointer pointer;= typedef _TYPENAME traits_type::reference reference;4#else // if defined (_RWSTD_NO_CLASS_PARTIAL_SPEC)9template class reverse_iteratorI : public iterator<_Category, _TypeT, _Distance, _Pointer, _Reference>{public:' typedef _Distance difference_type;" typedef _TypeT value_type;! typedef _Reference reference; typedef _Pointer pointer;(#endif // _RWSTD_NO_CLASS_PARTIAL_SPEC$ typedef _Iterator iterator_type;3#if defined(__DECCXX) && !defined(__DECFIXCXXL1629)( reverse_iterator () : current () { }#else reverse_iterator () { }#endif // 24.4.1.3.1, p1J _EXPLICIT reverse_iterator (iterator_type __rhs) : current (__rhs) { } "#ifndef _RWSTD_NO_MEMBER_TEMPLATES'# ifndef _RWSTD_NO_CLASS_PARTIAL_SPEC  // 24.4.1.3.1, p2 template < reverse_iterator (const reverse_iterator<_TypeU>& __rhs)% : current (__rhs.base ()) { }6# else // if defined (_RWSTD_NO_CLASS_PARTIAL_SPEC) // 24.4.1.3.1, p2? template L reverse_iterator (const reverse_iterator<_Iterator2, _Category2, _TypeU,A _Reference2, _Pointer2,  _Distance2>& __rhs)% : current (__rhs.base ()) { }+# endif // _RWSTD_NO_CLASS_PARTIAL_SPEC &#endif // _RWSTD_NO_MEMBER_TEMPLATES // 24.4.1.3.2, p1! iterator_type base () const { return current; } // 24.4.1.3.3, p1" reference operator* () const {& iterator_type __tmp (base ()); return *--__tmp; } // 24.4.1.3.4, p17 _RWSTD_OPERATOR_ARROW (pointer operator->() const); // 24.4.1.3.5, p1% reverse_ iterator& operator++ () { return --current, *this; } // 24.4.1.3.5, p3' reverse_iterator operator++ (int) {' reverse_iterator __tmp (*this); return ++*this, __tmp; } // 24.4.1.3.6, p1% reverse_iterator& operator-- () { return ++current, *this; } // 24.4.1.3.6, p3' reverse_iterator operator-- (int) {' reverse_iterator __tmp (*this); return --*this, __tmp; } // 24.4.1.3.8, p18   reverse_iterator& operator+= (difference_type __n) {% return current -= __n, *this; } // 24.4.1.3.10, p18 reverse_iterator& operator-= (difference_type __n) { return *this += -__n; } // 24.4.1.3.7, p1< reverse_iterator operator+ (difference_type __n) const {/ return reverse_iterator (*this) += __n; } // 24.4.1.3.9, p1< reverse_iterator operator- (difference_type __n) const {/ return reverse_iterator (*this) -= _ _n; } // 24.4.1.3.11, p16 reference operator[] (difference_type __n) const { return *(*this + __n); } protected: iterator_type current;};// 24.4.1.3.12_RWSTD_ITER_TEMPLATEEinline bool operator== (const _RWSTD_ITER_ID (reverse_iterator)& __x,E const _RWSTD_ITER_ID (reverse_iterator)& __y){& return __x.base () == __y.base ();}// 24.4.1.3.13_RWSTD_ITER_TEMPLATEDinline bool operator< (const _RWSTD_ITER_ID (r everse_iterator)& __x,D const _RWSTD_ITER_ID (reverse_iterator)& __y){# return __y.base() < __x.base();}// 24.4.1.3.14_RWSTD_ITER_TEMPLATEFinline bool operator!= (const _RWSTD_ITER_ID (reverse_iterator)& __x, E const _RWSTD_ITER_ID (reverse_iterator)& __y){ return !(__x == __y);}// 24.4.1.3.15_RWSTD_ITER_TEMPLATEEinline bool operator> (const _RWSTD_ITER_ID (reverse_iterator)& __x, D const _RWSTD_ITER_ID (reverse_iterator)& __y){ return __y < __x;}// 24.4.1.3.16_RWSTD_ITER_TEMPLATEFinline bool operator>= (const _RWSTD_ITER_ID (reverse_iterator)& __x, E const _RWSTD_ITER_ID (reverse_iterator)& __y){ return !(__x < __y);}// 24.4.1.3.17_RWSTD_ITER_TEMPLATEEinline bool operator<= (const _RWSTD_ITER_ID (reverse_iterator)& __x,E const _RWSTD_ITER_ID (reverse_iterator)& __y){ return !(__y < __x);}// 24.4.1.3.18_RWSTD_ITER_TEMPLATE3inline _RWSTD_ITER_DIFF_TYPE (_Iterator, _Distance)9operator- (const _RWSTD_ITER_ID (reverse_iterator)& __x, 8 const _RWSTD_ITER_ID (reverse_iterator)& __y){% return __y.base () - __x.base ();}// 24.4.1.3.19_RWSTD_ITER_TEMPLATE(inline _RWSTD_ITER_ID (reverse_iterator)=operator+ (_RWSTD_ITER_DIFF_TYPE (_Iterator, _Distance) __n, < const _RWSTD_ITER_ID (reverse_iterator)& __x){ return __x + __n;}#undef _RWSTD_ITER_DIFF_TYPE##ifdef _RWSTD_NO_CLASS_PARTIAL_SPEC} // namespace std_RWSTD_NAMESPACE (__rw) { )// Reverse bidirectional iterator. B// This is needed to get around non-standard compilers that insist@// on instantiating all members of a class whether they're used // or not.:template class __reverse_bi_iteratorO : public _STD::iterator<_Category, _TypeT, _Distance, _Pointer, _Reference>{public:' typedef _Distance difference_type;" typedef _TypeT value_type;! typedef _Reference reference; typedef _Pointer pointer;% typedef _Iterator iterator_type;3#if defined(__DECCXX) && !defined(__DECFIXCXXL1629)- __reverse_bi_iterator () : current () { }#else __reverse_bi_iterator () { }#endifA _EXPLICIT __reverse_bi_iterator (const iterator_type &__rhs)  : current (__rhs) { }"#ifndef _RWSTD_NO_MEMBER_TEMPLATES'# ifndef _RWSTD_NO_CLASS_PARTIAL_SPEC  template H __reverse_bi_iterator (const __reverse_bi_iterator<_TypeU>& __rhs)' : current (__rhs.base ()) { }7# else // if defined (_RWSTD_NO_CLASS_PARTIAL_SPEC )A template D __reverse_bi_iterator (const __reverse_bi_iterator<_Iterator2,D _Category2,@ _TypeU,E _Reference2,C _Pointer2,L _Distance2>& __rhs)' : current (__rhs.base ()) { }# endif$#endif // _RWSTD_NO_MEMBER_TEMPLATES! iterator_type base () const { return current; }" reference operator* () const {& iterator_type __tmp = base (); return *--__tmp; }7 _RWSTD_OPERATOR_ARROW (pointer operator->() const);* __reverse_bi_iterator& operator++ () { return --current, *this; }- __reverse_bi_iterator operator++ (int) {, __reverse_bi_iterator __tmp (*this); ++*this; return __tmp; }* __reverse_bi_iterator& operator-- () { return ++current, *this; }, __reverse_bi_iterator operator-- (int) {, __reverse_bi_iterator __tmp (*this); --*this; return __tmp; } protected: iterator_type current;};_RWSTD_ITER_TEMPLATEKinline bool operator== (const _RWSTD_ITER_ID (__reverse_bi_iterator)& __x, J const _RWSTD_ITER_ID (__reverse_bi_iterator)& __y){& return __x.base () == __y.base ();}_RWSTD_ITER_TEMPLATEJinline bool operator!= (const _RWSTD_ITER_ID (__reverse_bi_iterator)& __x,J const _RWSTD_ITER_ID (__reverse_bi_iterator)& __y){ return !(__x == __y);}#undef _RWSTD_ITER_TEMPLATE#undef _RWSTD_ITER_ID} // namespace __rw_RWSTD_NAMESPACE (std) { (#endif // _RWSTD_NO_CLASS_PARTIAL_SPEC$#ifndef _RWSTD_NO_CLASS_PARTIAL_SPEC5# define _RWSTD_INSERT_ITERATOR_BASE(ig nore) \? iterator#elseH // necessary to allow __iterator_category, __value_type, etc. to work5# define _RWSTD_INSERT_ITERATOR_BASE(cont) \5 iterator(#endif // _RWSTD_NO_CLASS_PARTIAL_SPECtemplate Kclass back_insert_iterator: public _RWSTD_INSERT_ITERATOR_BASE (_Container){public:& typedef _Container container_type;: _EXPLICIT back_insert_iterator (container_type& __rhs) : container (&__rhs) { } back_insert_iterator&? operator= (_TYPENAME container_type::const_reference __x) {1 return container->push_back (__x), *this; }) back_insert_iterator& operator* () { return *this; }) back_insert_iterator& operator++ () { return *this; }+ back_insert_iterator operator++ (int) { return *this; } protected: container_type* container;};template Ginline back_insert_iterator<_Container> back_inserter (_Container& __x){1 return back_insert_iterator<_Container>(__x);}template Lclass front_insert_iterator: public _RWSTD_INSERT_ITERATOR_BASE (_Container){public:& typedef _Container container_type;; _EXPLICIT front_insert_iterator (container_type& __rhs) : container (&__rhs) { } front_insert_iterator&@ operator= (_TYPENAME container_type::const_reference __x) { 2 return container->push_front (__x), *this; }) front_insert_iterator& operator* () { return *this; }* front_insert_iterator& operator++ () { return *this; }, front_insert_iterator operator++ (int) { return *this; } protected: container_type* container;};template Iinline front_insert_iterator<_Container> front_inserter (_Container& __x){2 return front_insert_iterator<_Container>(__x);}template Fclass insert_iterator: public _RWSTD_INSERT_ITERATOR_BASE (_Container){public:& typedef _Container container_type;< insert_iterator (container_type &__x,=  _TYPENAME container_type::iterator __it)) : iter (__it), container (&__x) { } insert_iterator&@ operator= (_TYPENAME container_type::const_reference __x) { - iter = container->insert (iter, __x); return ++iter, *this; }# insert_iterator& operator* () { return *this; }$ insert_iterator& operator++ () { return *this; }' insert_iterator& operator++ (int) { return *this; } protected:, _TYPENAME container_type::iterator iter;1 container_type* container;};,template Minline insert_iterator<_Container> inserter (_Container& __x, _Iterator __it){1 typedef _TYPENAME _Container::iterator _Iter;; return insert_iterator<_Container> (__x, _Iter (__it));}} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif&#endif // _RWSTD_ITERATOR_H_INCLUDEDww ~ o7ԦL/*************************************************************************** *3 * _iterbase.h - Definitions of iterator primitives *E * This is an internal header file used to implement the C++ Standard? * Library. It should never be #included directly by a program. *3 * $Id: //stdlib/3.0-rel/include/rw/_iterbase.h#3 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company , L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** * * Copyright (c) 1994 * Hewlett-Packard Company *E * Permi !ssion to use, copy, modify, distribute and sell this softwareG * and its documentation for any purpose is hereby granted without fee,D * provided that the above copyright notice appear in all copies andD * that both that copyright notice and this permission notice appearA * in supporting documentation. Hewlett-Packard Company makes noA * representations about the suitability of this software for anyH * purpose. It is provided "as is" without express or implied warranty. *L ************* "************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms o #f suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * a$t DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/"#ifndef _RWSTD_ITERBASE_H_INCLUDED"#define _RWSTD_ITERBASE_H_INCLUDED#include #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# % pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) { // 24.3.1 - Iterator traitstemplate struct iterator_traits{> typedef _TYPENAME _Iterator::value_type value_type;C typedef _TYPENAME _Iterator::difference_type difference_ &type;; typedef _TYPENAME _Iterator::pointer pointer;= typedef _TYPENAME _Iterator::reference reference;E typedef _TYPENAME _Iterator::iterator_category iterator_category;};"// 24.3.3 - Standard iterator tagsstruct input_iterator_tag { };struct output_iterator_tag { };<struct forward_iterator_tag : public input_iterator_tag { };Dstruct bidirectional_iterator_tag : public forward_iterator_tag { };Jstruct random_access_iterator_tag : public bidirectional_i'terator_tag { };$#ifndef _RWSTD_NO_CLASS_PARTIAL_SPECtemplate struct iterator_traits<_TypeT*>{2 typedef _TypeT value_type;7 typedef _RWSTD_PTRDIFF_T difference_type;/ typedef value_type* pointer;1 typedef value_type& reference;9 typedef random_access_iterator_tag iterator_category;};template %struct iterator_traits{2 typedef _TypeT ( value_type;7 typedef _RWSTD_PTRDIFF_T difference_type;/ typedef const value_type* pointer;1 typedef const value_type& reference;9 typedef random_access_iterator_tag iterator_category;};(#endif // _RWSTD_NO_CLASS_PARTIAL_SPEC// 24.3.2 - Basic iterator*template struct iterator{" typedef _TypeT value_type;' typedef _Distance difference_type; typedef _Pointer pointer;! typedef _Reference reference;) typedef _Category iterator_category;};&// returns the category of an iteratortemplate Einline random_access_iterator_tag __iterator_category (const _TypeT*){) return random_access_iterator_tag ();}:template inline _Category6__iterator_category (const iterator<_Category, _TypeT,F _Distance, _Pointer, _Reference>&){E typedef _TYPENAME iterator<_Category, _TypeT, _Distance, _TypeT*,I _TypeT&>::iterator_category _IterCategory; return _IterCategory ();}template &inline bool __is_input_iterator (_Tag){ return false;}temp+late .inline bool __is_bidirectional_iterator (_Tag){ return false;}template .inline bool __is_random_access_iterator (_Tag){ return false;}_RWSTD_SPECIALIZED_FUNCTION 4inline bool __is_input_iterator (input_iterator_tag){ return true;}_RWSTD_SPECIALIZED_FUNCTION Dinline bool __is_bidirectional_iterator (bidirectional_iterator_tag){ return true;}_RWSTD_SPECIALIZED_FUNCTION Dinline bool __is_bidirection,al_iterator (random_access_iterator_tag){ return true;}_RWSTD_SPECIALIZED_FUNCTION Dinline bool __is_random_access_iterator (random_access_iterator_tag){ return true;}$#ifndef _RWSTD_NO_CLASS_PARTIAL_SPECtemplate 8inline _TYPENAME iterator_traits<_Iterator>::value_type*__value_type (const _Iterator*){ return 0;}4#else // if defined (_RWSTD_NO_CLASS_PARTIAL_SPEC):template inline _TypeT*:__value_type (const iterator<_Category, _TypeT, _Distance,4 _Pointer, _Reference>*){ return 0;}template 2inline _TypeT* __value_type (const _TypeT* const*){ return 0;}(#endif // _RWSTD_NO_CLASS_PARTIAL_SPEC$#ifndef _RWSTD_NO_CLASS_PARTIAL_SPECtemplate =inline _TYPENAME iterator_traits<_Iterator>::difference_type*__distance_type (_Iterat.or){ return 0;}4#else // if defined (_RWSTD_NO_CLASS_PARTIAL_SPEC):template inline _Distance* N__distance_type (iterator<_Category, _TypeT, _Distance, _Pointer, _Reference>){ return 0;}template 8inline _RWSTD_PTRDIFF_T* __distance_type (const _TypeT*){ return 0;}(#endif // _RWSTD_NO_CLASS_PARTIAL_SPEC// 24.3.4 - Iterator operation/s0template Oinline void __advance (_InputIterator &__it, _Distance __n, input_iterator_tag){( _RWSTD_ASSERT (__n == 0 || __n > 0); while (__n > 0) { --__n; ++__it; }}2template =inline void __advance (_ForwardIterator &__it, _Distance __n,, forward_iterator_tag){1 __advance (__it, __n, input_iterator_tag ());}8template Dinline void __advance (_BidirectionalIterator &__it, _Distance __n, 2 bidirectional_iterator_tag){ if (__n > 0)5 __advance (__it, __n, input_iterator_tag ()); else while (__n) { ++__n; --__it; }}7template Cinline void __advance (_RandomAccessIterator& __it, _Distance __n, 2 random_access_iterato1r_tag){ __it += __n;} // 24.3.4, p20template 9inline void advance (_InputIterator& __it, _Distance __n){K __advance (__it, __n, _RWSTD_ITERATOR_CATEGORY (_InputIterator, __it));}0template 6inline void __distance (const _InputIterator &__first,5 const _InputIterator &__last,2 _Distance &__n,+ input_iterator2_tag){B for (_InputIterator __it = __first; !(__it == __last); ++__it) ++__n;}2template 8inline void __distance (const _ForwardIterator &__first,7 const _ForwardIterator &__last,4 _Distance &__n,- forward_iterator_tag){= __distance (__first, __last, __n, input_iterator_tag ());}8template > 3inline void __distance (const _BidirectionalIterator &__first,> const _BidirectionalIterator &__last, : _Distance &__n,3 bidirectional_iterator_tag){= __distance (__first, __last, __n, input_iterator_tag ());}7template =inline void __distance (const _RandomAccessIterator &__first,= const _RandomAccessIterator &__last, 9 4 _Distance &__n,3 random_access_iterator_tag){ __n = __last - __first;}$#ifndef _RWSTD_NO_CLASS_PARTIAL_SPEC // 24.3.4, p4!template Cinline _TYPENAME iterator_traits<_ForwardIterator>::difference_typeJdistance (const _ForwardIterator &__first, const _ForwardIterator &__last){I _TYPENAME iterator_traits<_ForwardIterator>::difference_type __n = 0;% __distance (__first, __last,5 __n,F _RWSTD_ITERATOR_CATEGORY (_ForwardIterator, __first)); return __n;}(#endif // _RWSTD_NO_CLASS_PARTIAL_SPECT#if !defined (_RWSTD_NO_EXT_VOID_DISTANCE) || defined (_RWSTD_NO_CLASS_PARTIAL_SPEC)2template 6inline void distance (const _ForwardIterator &__first,5 const _ForwardIterator &__last,2 _Distance &__n){% __distance (__first, __last, __n,F 6 _RWSTD_ITERATOR_CATEGORY (_ForwardIterator, __first));}'#endif // _RWSTD_NO_EXT_VOID_DISTANCE} // namespace std_RWSTD_NAMESPACE (__rw) { D// __rw_distance: Same purpose as 3-parameter distance function, but// with return value.2template inline _Distance/__rw_distance (const _ForwardIterator &__first,. const _ForwardIterator &__last,+ _Distance __n){+ _STD::__distan7ce (__first, __last, __n,L _RWSTD_ITERATOR_CATEGORY (_ForwardIterator, __first)); return __n;}} // namespace __rw#ifndef _RWSTD_NO_DEBUG_ITER_RWSTD_NAMESPACE (__rw) { <// __rw_debug_iter - iterator adapter with debugging supportA// _Iterator is either iterator or const_iterator; if the latter,<// _MutableIterator should be iterator to allow for implicitA// conversions from non-const (mutable) to const_iterator objectsDtemplate class __rw_debug_iter{E typedef _Container container_type;D typedef _Iterator iterator_type;B typedef _STD::iterator_traits traits_type;public:A typedef _TYPENAME traits_type::value_type value_type;F typedef _TYPENAME traits_type::difference_type difference_type;@ typedef _TYPENAME traits_type::reference reference; 9> typedef _TYPENAME traits_type::pointer pointer;H typedef _TYPENAME traits_type::iterator_category iterator_category;> typedef __rw_debug_iter _C_mutable_iterator;' __rw_debug_iter (): _C_cont (0) { }M __rw_debug_iter (const container_type &__cont, const iterator_type &__it)/ : _C_iter (__it), _C_cont (&__cont) { }7 // no copy ctor other than the one below i:s definedI // will use a compiler generated one if _Iterator != _MutableIterator6 __rw_debug_iter (const _C_mutable_iterator &__rhs)> : _C_iter (__rhs._C_iter), _C_cont (__rhs._C_cont) { }? __rw_debug_iter& operator= (const __rw_debug_iter &__rhs) { if (this != &__rhs) {$ _C_iter = __rhs._C_iter;$ _C_cont = __rhs._C_cont; } return *this; }" reference operator* () const {1 _RWSTD_ASSERT (_C_is_dereference;able ()); return *_C_iter; }6 reference operator[] (difference_type __n) const {? _RWSTD_ASSERT ((*this + __n)._C_is_dereferenceable ()); return _C_iter [__n]; }8 _RWSTD_OPERATOR_ARROW (pointer operator-> () const);$ __rw_debug_iter& operator++ () {& _RWSTD_ASSERT (!_C_is_end ()); return ++_C_iter, *this; }$ __rw_debug_iter& operator-- () {( _RWSTD_ASSERT (!_C_is_begin ()); return --_C_iter, *this;< }& __rw_debug_iter operator++ (int) {& __rw_debug_iter __tmp = *this; return ++*this, __tmp; }& __rw_debug_iter operator-- (int) {& __rw_debug_iter __tmp = *this; return --*this, __tmp; }7 __rw_debug_iter& operator+= (difference_type __n) { _C_iter += __n;@ _RWSTD_ASSERT ( !(_C_iter < _C_cont->begin ()._C_iter)@ && !(_C_cont->end ()._C_iter < _C_iter)); return *this; }7= __rw_debug_iter& operator-= (difference_type __n) { _C_iter -= __n;@ _RWSTD_ASSERT ( !(_C_iter < _C_cont->begin ()._C_iter)@ && !(_C_cont->end ()._C_iter < _C_iter)); return *this; }; __rw_debug_iter operator+ (difference_type __n) const {. return __rw_debug_iter (*this) += __n; }; __rw_debug_iter operator- (difference_type __n) const {. return __rw_debug_iter (*this) -= __n; } bool _C_is_b>egin () const {5 return _C_cont && _C_cont->begin () == *this; } bool _C_is_end () const {3 return _C_cont && _C_cont->end () == *this; }) bool _C_is_dereferenceable () const { return !_C_is_end (); }= bool _C_valid_range (const __rw_debug_iter &__it) const {2 return _C_cont && _C_cont == __it._C_cont; }( const iterator_type& base () const { return _C_iter; } iterator_type& base () { ? return _C_iter; }.#if !defined (_RWSTD_NO_MEMBER_TEMPLATES) \2 && (!defined (__IBMCPP__) || __IBMCPP__ > 502)A // IBM xlC 5.0 fails to find these member template operators,A // yet it complains about ambiguity if they are defined along$ // with the non-members below...C // operators are templatized to assure const/non-const symmetry template  difference_type; operator- (const __rw_debug_iter &__rhs) const {< _RWSTD_ASSERT (_C_cont && _C_cont == __rhs._C_cont);' return _C_iter - __rhs._C_iter; } template  bool< operator== (const __rw_debug_iter &__rhs) const {( return _C_iter == __rhs._C_iter; }  template  bool; operator< (const __rw_debug_iter &__rhs) const {' return _C_iter < __rhs._C_iter; } template  bool< operator!= (const __rw_debug_iter &__rhs) const {+ return !(_C_iter == __rhs._C_iter); } template  bool< operator<= (const __rw_debug_iter B&__rhs) const {* return !(__rhs._C_iter < _C_iter); } template  bool; operator> (const __rw_debug_iter &__rhs) const {' return __rhs._C_iter < _C_iter; } template  bool< operator>= (const __rw_debug_iter &__rhs) const {* return !(_C_iter < __rhs._C_Citer); };#endif // !_RWSTD_NO_MEMBER_TEMPLATES && __IBMCPP__ > 5028 iterator_type _C_iter; // wrapped iterator< const container_type *_C_cont; // associated container};} // namespace __rw_RWSTD_NAMESPACE (std) { $#ifndef _RWSTD_NO_NONDEDUCED_CONTEXT@# define _RWSTD_CONT_DIFF_TYPE _TYPENAME _Cont::difference_type #else0# define _RWSTD_CONT_DIFF_TYPE _RWSTD_PTRDIFF_T #endif3template 4inline _RWD::__rw_debug_iter<_Cont, _Iter, _MutIter> Coperator+ (_RWSTD_CONT_DIFF_TYPE __n,C const _RW::__rw_debug_iter<_Cont, _Iter, _MutIter> &__x){ return __x + __n;}#undef _RWSTD_CONT_DIFF_TYPE /#if defined (_RWSTD_NO_MEMBER_TEMPLATES) \0 || defined (__IBMCPP__) && __IBMCPP__ <= 502:// IBM xlC 5.0 fails to find the member template operators1// defined above in the presence of namespaces...D// with no support for member templa Etes namespace-scope (non-member)C// operators must be used - these will cause ambiguities with those8// in std::rel_ops if the latter are found during lookupC// _Iter1 may differ from _Iter2 if the function operands are const:// and non-const iterators, respectively (allows symmetry)Btemplate 'inline _TYPENAME _Cont::difference_typeDoperator- (const _RW::__rw_debug_iter<_Cont, _Iter1, _MutIter> &__x,D const _RW::__rw_dFebug_iter<_Cont, _Iter2, _MutIter> &__y){> _RWSTD_ASSERT (__x._C_cont && __x._C_cont == __y._C_cont);% return __x._C_iter - __y._C_iter;} Btemplate inline boolEoperator== (const _RW::__rw_debug_iter<_Cont, _Iter1, _MutIter> &__x,E const _RW::__rw_debug_iter<_Cont, _Iter2, _MutIter> &__y){& return __x._C_iter == __y._C_iter;}Btemplate inGline boolDoperator< (const _RW::__rw_debug_iter<_Cont, _Iter1, _MutIter> &__x,D const _RW::__rw_debug_iter<_Cont, _Iter2, _MutIter> &__y){> _RWSTD_ASSERT (__x._C_cont && __x._C_cont == __y._C_cont);% return __x._C_iter < __y._C_iter;}Btemplate inline boolEoperator!= (const _RW::__rw_debug_iter<_Cont, _Iter1, _MutIter> &__x,E const _RW::__rw_debug_iter<_Cont, _Iter2, _MutIter> &__y){ returnH !(__x == __y);}Btemplate inline boolEoperator<= (const _RW::__rw_debug_iter<_Cont, _Iter1, _MutIter> &__x,E const _RW::__rw_debug_iter<_Cont, _Iter2, _MutIter> &__y){ return !(__y < __x);}Btemplate inline boolEoperator>= (const _RW::__rw_debug_iter<_Cont, _Iter1, _MutIter> &__x,E const _RW::__rw_debug_iter<_Cont, _Iter2, _MutIter> &_I_y){ return !(__x < __y);}Btemplate inline boolDoperator> (const _RW::__rw_debug_iter<_Cont, _Iter1, _MutIter> &__x,D const _RW::__rw_debug_iter<_Cont, _Iter2, _MutIter> &__y){ return __y < __x;};#endif // _RWSTD_NO_MEMBER_TEMPLATES && __IBMCPP__ <= 502} // namespace std_RWSTD_NAMESPACE (__rw) { M#define _RWSTD_DEBUG_ITER(cont, it, mutit) __rw_debug_iter< cont, it, mutit >3teJmplate inline boolK__rw_valid_range (const _RWSTD_DEBUG_ITER(_Cont, _Iter, _MutIter) &__first,J const _RWSTD_DEBUG_ITER(_Cont, _Iter, _MutIter) &__last){@ return __first._C_cont && __first._C_cont == __last._C_cont;}template inline bool7__rw_valid_range (const _Iterator &, const _Iterator &){ return true;}3template inline boolE__rw_in_raKnge (const _RWSTD_DEBUG_ITER(_Cont, _Iter, _MutIter) &__it,H const _RWSTD_DEBUG_ITER(_Cont, _Iter, _MutIter) &__first,G const _RWSTD_DEBUG_ITER(_Cont, _Iter, _MutIter) &__last){. return __rw_valid_range (__first, __it). && __rw_valid_range (__it, __last);}template inline boolD__rw_in_range (const _Iterator&, const _Iterator&, const _Iterator&){ return true;}3template inline boolL__rw_dereferenceable (const _RWSTD_DEBUG_ITER(_Cont, _Iter, _MutIter) &__it){) return __it._C_is_dereferenceable ();}template inline bool'__rw_dereferenceable (const _Iterator&){ return true;}template inline bool*__rw_dereferenceable (const _TypeT *__ptr){ return 0 != __ptr;}} // namespace __rw#undef _RWSTD_DEBUG_ITER #endif // _RWSTD_NO_DEBUG_ITERE#if defined(__VMS) && define d(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif&#endif // _RWSTD_ITERBASE_H_INCLUDEDww No7ԦL/*************************************************************************** *C * _locale.h - Declarations for the Standard Library locale classes *E * This is an internal header file used to implement the C++ Standard? * Library. It should never be #included directly by a program. *1 * $Id: //stdlib/3.0-rel/include/rw/_locale.h#3 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Devel Oopment Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, In Pc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copi Qes thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48R CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/##ifndef _RWSTD_RW_LOCALE_H_INCLUDED##define _RWSTD_RW_LOCALE_H_INCLUDED#include #ifdef _V3_LOCALE%# include #else#include #include #include #include #include _RWSTD_CTIME#include _RWSTD_CLOCALE#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (__rw) { *class _RWSTD_EXPORT __rw_use_c_lib_locale;} // namespace __rw_RWSTD_NAMESPACE (std)T { class _RWSTD_EXPORT locale;template class collate;)#ifndef _RWSTD_NO_TEMPLATE_ON_RETURN_TYPEtemplate /inline const _Facet& use_facet (const locale&);template 3inline bool has_facet (const locale&) _THROWS (());9#else // if defined (_RWSTD_NO_TEMPLATE_ON_RETURN_TYPE)template 8inline const _Facet& use_facet (const locale&, _Facet*);template <inline bool has_facet (const locale&, _FUacet*) _THROWS (());+#endif // _RWSTD_NO_TEMPLATE_ON_RETURN_TYPEclass _RWSTD_EXPORT locale{* typedef _RW::__rw_locale_imp _C_imp_t;public: class facet; class id;, friend class _RW::__rw_use_c_lib_locale; friend class facet; friend class id; typedef int category;A _RWSTD_STATIC_CONST (category, none = _C_imp_t::_C_none);D _RWSTD_STATIC_CONST (category, collate = _C_imp_t::_C_collate);B _RWSTD_STATIC_CONST (category, ctype V= _C_imp_t::_C_ctype);E _RWSTD_STATIC_CONST (category, monetary = _C_imp_t::_C_monetary);D _RWSTD_STATIC_CONST (category, numeric = _C_imp_t::_C_numeric);A _RWSTD_STATIC_CONST (category, time = _C_imp_t::_C_time);E _RWSTD_STATIC_CONST (category, messages = _C_imp_t::_C_messages);@ _RWSTD_STATIC_CONST (category, all = _C_imp_t::_C_all); K // The default constructor creates a copy of the current global locale,H // the locale specified in the most recent call Wto locale::global().M // If locale::global() has not been called, it is the classic "C" locale." inline locale () _THROWS (());L // The copy constructor (and the assignment operator, below) can be usedN // freely. Like a string, most of a locale's contents are in a separate, H // reference-counted implementation object, so copying and assigning$ // locales/ has little overhead.4 inline locale (const locale& __rhs) _THROWS (())! : _C_imp (__rhs._C_imp) {L X _RWSTD_ATOMIC_PREINCREMENT (_C_imp->_C_ref_count, _C_imp->_C_mutex); }L // The following constructor creates a locale composed of by-name facetsK // and assigns it a name. The valid arguments are "", "C", and a set ofH // strings defined by the compiler vendor. These cause the facets ofI // the locale to be obtained, respectively, from the user's preferredE // locale, from the classic locale, or from the compiler's localeE // database. (In many cases, the prefeYrred locale is specified byI // environment variables such as LANG or LC_ALL.) If the argument is< // not recognized, the constructor throws runtime_error.# _EXPLICIT locale (const char*);E // The following constructor copies its first argument except forE // the facets in the categories identified by the third argument,< // which are obtained by name using the second argument. // Can throw runtime_error.2 locale (const locale&, const char*, category);MZ // The following templatized constructor copies its first argument except' // the single _Facet of type _Facet"#ifndef _RWSTD_NO_MEMBER_TEMPLATES template $ locale (const locale&, _Facet*);#elseN // If your compiler does not support member function templates, we provideI // the following work-around to let you accrete facets onto a locale.G // This constructor copies its first argument except for the singleC // _Facet of the type of the s [econd argument, for which it usesI // the second argument. To determine the type of the second argument,G // it calls the non-standard virtual method _C_get_id in the secondI // argument. If you are creating your own _Facet types on a compilerH // that does not support member templates, you must code a _C_get_idK // member as follows in each new base class _Facet (i.e. in each _FacetC // class that has its own static member id of type locale::id): //C // virt\ual locale::id &_C_get_id (void) const { return id; } //K // See the _C_get_id members in the standard facets below for examples.# locale (const locale&, facet*);$#endif // _RWSTD_NO_MEMBER_TEMPLATESE // The following constructor copies its first argument except forE // the facets in the categories identified by the third argument,3 // which are obtained from the second argument.4 locale (const locale&, const locale&, category); ~locale () {G ]// HACK: _C_imp should normally never be 0; internally, though,G // it's set to 0 in locale::_C_make_facet to prevent a deadlockL if (_C_imp && 0 == _RWSTD_ATOMIC_PREDECREMENT (_C_imp->_C_ref_count,I _C_imp->_C_mutex)) delete _C_imp; }: const locale& operator = (const locale&) _THROWS (());J // The following member function returns a copy of this locale (*this)N // except the single _Facet of t^ype _Facet obtained from the other locale."#ifndef _RWSTD_NO_MEMBER_TEMPLATES)#ifndef _RWSTD_NO_TEMPLATE_ON_RETURN_TYPE template 0 locale combine (const locale &__rhs) const {K // The cast from (const _Facet*) to (_Facet*) highlights a possible: // defect in the Standard ... see the issues list. return locale (*this,P _RWSTD_CONST_CAST(_Facet*, &_USE_FACET (_Facet, __rhs))); }+#endif // _RWSTD_NO_TEMPLATE_ON_RE_TURN_TYPE$#endif // _RWSTD_NO_MEMBER_TEMPLATESN // The following returns the locale name, or "*" if the locale is unnamed. string name () const;J // Two locales are equal if they are the same object, or one is a copyD // of the other (i.e. they have the same implementation object),6 // or both are named and their names are the same.1 bool operator== (const locale &__rhs) const {: return this == &__rhs || _C_imp == __rhs._C_imp; || name() ! `= "*" && name () == __rhs.name(); }2 bool operator != (const locale& __rhs) const {! return !(*this == __rhs); }K // The following templatized operator () satisfies STL requirements forE // a comparator predicate template argument for comparing stringsI // according to the collating sequence of the locale. It lets you use: // a locale directly as a comparator using syntax like' // sort(v.begin(), v.end(), loc),C // where v is a vector of somea string type and loc is a locale."#ifndef _RWSTD_NO_MEMBER_TEMPLATES< template  boolF operator() (const basic_string<_CharT, _Traits, _Allocator>& __x, L const basic_string<_CharT, _Traits, _Allocator>& __y) const;2#else // if defined (_RWSTD_NO_MEMBER_TEMPLATES)A bool operator() (const string &__x, const string &__y) const;#ifndef _RWSTD_NO_WCHAR_TC bool operator() (const wstring &__x, const wstribng &__y) const;#endif // _RWSTD_NO_WCHAR_T&#endif // _RWSTD_NO_MEMBER_TEMPLATES) // Replaces the current global locale) static locale global (const locale&);% // Returns the classic "C" locale$ static const locale& classic ();: // class _Facet -- base class for locale feature sets.N // Any class deriving from _Facet that wants to be perceived as a distinctL // _Facet, as opposed to a re-implementation of an existing _Facet, must: // declare a stactic member: static std::locale::id id;= class _RWSTD_EXPORT facet: public _RW::__rw_facet_base {* friend class _RW::__rw_locale_imp; friend class locale; protected:9 _EXPLICIT facet (size_t __ref = 0, int __cat = 0)5 : _RW::__rw_facet_base (__ref, __cat) { } !#ifdef _RWSTD_NO_MEMBER_TEMPLATES/ virtual id &_C_get_id (void) const = 0;#endif private:7 facet (const facet&); // not defined7 vo did operator= (const facet&); // not defined };* // class id -- _Facet type identifier.J // This is an implementation class. It is used internally as an indexI // to find facets within a locale. Each distinct _Facet (i.e. each TJ // that can be the parameter of a use_facet<_TypeT> call) has a uniqueK // static member of type locale::id named id. The class is made publicJ // to enable extension of the set of standard facets. Objects of thisC // type don't neeed to be constructed or referenced in any other // circumstances.A // the class must be `exported' in order for MSVC to collapseE // the static in _C_init into a single object if linking to a DLL class _RWSTD_EXPORT id { friend class locale;. _MUTABLE size_t _C_id; // unique id  void _C_init () const;" operator size_t () const { return _C_id; } public: id (): _C_id (0) { } privfate:2 id (const id&); // undefined2 void operator= (const id&); // undefined };A // Typedef for the implementation-defined call-back functions4 // that must be passed to _C_make_facet (below).: typedef _RW::__rw_facet_maker_func __facet_maker_func;0 // MT-safe std::use_facet<>() implementationO const facet& _C_use_facet (const id &__id, bool __implicit, category __cat,A __facet_maker_func __maker) const;$ g // same as above but not MT-safeF const facet& _C_unsafe_use_facet (const id &__id, bool __implicit,5 category __cat,H __facet_maker_func __maker) const;I // The following function retrieves an implicit _Facet from a cache, A // or creates one if needed (via call to the passed call-back@ // function), and makes it an explicit _Facet of the locale.; facet* _C_make_facet (const id &__id, bool __imphlicit, G category __cat, __facet_maker_func) const;0 facet* _C_get_facet (const id &__id) const {H return _RWSTD_STATIC_CAST (facet*, _C_imp->_C_get_facet (__id)); }N // allow installing of const facets, e.g., those returned from use_facet() voidM _C_install_facet (const _RW::__rw_facet_base *__f, const id &__i) const {O _C_install_facet (_RWSTD_CONST_CAST (_RW::__rw_facet_base*, __f), __i); }C void _C_install_faceit (_RW::__rw_facet_base*, const id&) const;private:& friend class _RW::__rw_locale_imp;8 // Construct a locale from an implementation object.- _EXPLICIT locale (_RW::__rw_locale_imp*);- // Create initial implementation objects. static void _C_init ();6 // remove all facets satisfying the given category, inline void _C_remove_facets (category);H static _RW::__rw_locale_imp *_C_classic; // the classic "C" localeI static _RW::__rw_locale_imp *_C_najtive; // the native "C++" localeC static _RW::__rw_locale_imp *_C_global; // the global localeN _RW::__rw_locale_imp *_C_imp; // pointer to a ref counted implementation};K#if defined (_RWSTD_MULTI_THREAD) && !defined (_RWSTD_NO_STATIC_MUTEX_INIT)} // namespace std_RWSTD_NAMESPACE (__rw) { C#if defined (__GNUG__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 97 \$ && defined (_RWSTD_NO_HONOR_STD)H// work around g++ 2.95.2 -fno-honor-std inability to use std::ukse_facet)// see the definition of _STD_USE_FACET()_USING (std::use_facet);7#endif // // __GNUG__ >= 2.97 || !_RWSTD_NO_HONOR_STDJ// explicitly instantiated to work around a g++ 2.95.2 bug on COFF systemsK// (such as IBM AIX or DEC OSF1) where it "forgets" to do so implicitly for-// explicitly initialized static data membersK_RWSTD_INSTANTIATE_1 (class _RWSTD_EXPORT __rw_static_mutex<_STD::locale>);} // namespace __rw_RWSTD_NAMESPACE (std) { ?#endif // _RWSTD_MULTIl_THREAD && !_RWSTD_NO_STATIC_MUTEX_INIT// ----------------------------// Class locale inline members.// ----------------------------J// Private constructor for use by implementation, constructs a locale from+// a __rw_locale_imp implementation object.3inline locale::locale (_RW::__rw_locale_imp *__rhs) : _C_imp (__rhs){ _RWSTD_ASSERT (0 != __rhs); if (!_C_global) _C_init ();L // no lock here to prevent a deadlock, called only from guarded comntexts ++_C_imp->_C_ref_count;}D// Default constructor, returns a copy of the current global locale.%inline locale::locale () _THROWS (()){ if (!_C_global) _C_init (); _C_imp = _C_global; _RWSTD_ASSERT (0 != _C_imp);H _RWSTD_ATOMIC_PREINCREMENT (_C_imp->_C_ref_count, _C_imp->_C_mutex);}"#ifndef _RWSTD_NO_MEMBER_TEMPLATES5// Constructor to accrete or replace a single _Facet.template <inline locale::locale (const localne& __rhs, _Facet* __facet){& _RWSTD_ASSERT (0 != __rhs._C_imp);- _RWSTD_MT_GUARD (__rhs._C_imp->_C_mutex);> // Identical, EXCEPT no name -- so we can't just increment> // the ref count on the existing imp -- we need a new imp.< _C_imp = new _RW::__rw_locale_imp (*__rhs._C_imp, 0, 1); if (__facet) {/ _C_install_facet (__facet, _Facet::id); }}M// Operator () compares two strings according to the collate<_CharT> facet ofH// the locale. It let os you use a locale object directly as a comparatorK// predicate for strings in various algorithms. For instance, you can sortK// a vector according to the collating sequence of a locale with an5// expression like: sort(v.begin(),v.end(),mylocale).8template inline boolGlocale::operator() (const basic_string<_CharT,_Traits,_Allocator>& __x,M const basic_string<_CharT,_Traits,_Allocator>& __y) const{4 returnp _USE_FACET (_STD::collate<_CharT>, *this); .compare (__x.data (), __x.data () + __x.length (),@ __y.data (), __y.data () + __y.length ()) < 0;}2#else // if defined (_RWSTD_NO_MEMBER_TEMPLATES)<inline locale::locale (const locale& __rhs, facet* __facet): _C_imp (0){- _RWSTD_MT_GUARD (__rhs._C_imp->_C_mutex);< _C_imp = new _RW::__rw_locale_imp (*__rhs._C_imp, 0, 1); if (__facet): _C_install_facet (__facet, __facet->_C_get_id ());}q&#endif // _RWSTD_NO_MEMBER_TEMPLATES#ifdef _INLINE_WITH_STATICS6_INLINE_WITH_STATICS void locale::id::_C_init () const{C // implicit initialization used to prevent a g++ 2.95.2 warningD // on Tru64: sorry: semantics of inline function static data are2 // wrong (you'll wind up with multiple copies)& static size_t _C_id_gen /* = 0 */; if (!_C_id)> _C_id = _RWSTD_ATOMIC_PREINCREMENT (_C_id_gen, false);} #endif // _INLINE_WITH_STATICSinline c ronst locale::facet&Flocale::_C_use_facet (const id &__id, bool __implicit, category __cat,7 __facet_maker_func __maker) const{ _RWSTD_ASSERT (0 != _C_imp);. // not guarded (heavily used in iostreams)/ const facet *__facet = _C_get_facet (__id);M // If facet is not explicitly present in locale yet, use private functionI // locale::_C_make_facet to construct it or retrieve it from a cache,I // and install it in the locale. This function can thsrow bad_cast or // other exceptions. if (!__facet) {+ _RWSTD_MT_GUARD (_C_imp->_C_mutex);C __facet = _C_make_facet (__id, __implicit, __cat, __maker); } _RWSTD_ASSERT (__facet); return *__facet;}>// same as above but not guarded; called during initialization9// of the num_get<> and num_put<> facets (this is a hack)inline const locale::facet&Mlocale::_C_unsafe_use_facet (const id &__id, bool __implicit, category __cat,> t __facet_maker_func __maker) const{ _RWSTD_ASSERT (0 != _C_imp);/ const facet *__facet = _C_get_facet (__id); if (!__facet)C __facet = _C_make_facet (__id, __implicit, __cat, __maker); _RWSTD_ASSERT (__facet); return *__facet;}} // namespace std_RWSTD_NAMESPACE (__rw) { :// -------------------------------------------------------:// Implementation function template -- create_named_facet.:// ---------------------------------u----------------------// N// The default for facets with no derived byname version is to create a _Facet9// with classic ("C") behavior, ignoring the passed name.template inline _Facet*M__rw_create_named_facet (_Facet*, const char *__name, _RWSTD_C::size_t __ref){ _RWSTD_UNUSED (__name);@ // 22.1.1.1.2, p1: a facet class need not have a public copyE // constructor, assignment, default constructor, destructor, etc.; // this, of course, makes the asvsumption that a default // ctor is available$ _Facet *__facet = new _Facet (); __facet->_C_set_ref (__ref); return __facet;}8// -----------------------------------------------------8// Implementation helper class -- __rw_use_c_lib_locale.8// -----------------------------------------------------)class _RWSTD_EXPORT __rw_use_c_lib_locale{ int _C_saved_cat;" char *_C_previous_locale_name;* char *_C_setlocale (const char*, int);public:> __wrw_use_c_lib_locale (const _STD::locale&, int = LC_ALL);: __rw_use_c_lib_locale (const char* = 0, int = LC_ALL); ~__rw_use_c_lib_locale ();};*// ---------------------------------------*// Inline members of __rw_use_c_lib_locale*// ---------------------------------------N// Destructor restores the C library locale that was in effect when the object// was constructed.7inline __rw_use_c_lib_locale::~__rw_use_c_lib_locale (){" if (_C_previous_locale_name) {D _RxWSTD_C::setlocale (_C_saved_cat, _C_previous_locale_name);) delete[] _C_previous_locale_name; }}} // namespace __rwM// functions below are defined here as a hack to allow explicit instantiationN// with automatic template instantiation (and implicit file inclusion); neededL// to guarantee that definitions of all instantiated entities have been seen_RWSTD_NAMESPACE (std) { H// Template use_facet<>() returns a reference to a facet. Its result isI// guarantyeed by locale's value semantics to last at least as long as the1// locale or any copy of the locale it came from.)#ifndef _RWSTD_NO_TEMPLATE_ON_RETURN_TYPE%# define _RWSTD_SELECT_FACET(ignore)#else+# define _RWSTD_SELECT_FACET(type) , type*#endif(#ifndef _RWSTD_INLINE_INSTANTIATION_HACKtemplate inline const _Facet&<use_facet (const locale &__loc _RWSTD_SELECT_FACET (_Facet)){> const _Facet &__facet = _RWSTD_STATIC_CAST (const _Facet&,> z __loc._C_use_facet (_Facet::id,J _Facet::_C_ok_implicit,H _Facet::_C_facet_cat,N _RW::__rw_facet_maker<_Facet>::_C_maker_func)); return __facet;},#endif // _RWSTD_INLINE_INSTANTIATION_HACKtemplate inline boolIhas_facet (const locale &__loc _RWSTD_SELECT_FACET (_Facet)) _THROWS (()){E return _Facet::_C_ok_i{mplicit || __loc._C_get_facet (_Facet::id);}#undef _RWSTD_SELECT_FACET9// This struct is a wrapper for the string class. It is ?// used in locale.cpp to prevent ar from crashing with SIGSEGV /// on Sun machines when string is used in maps.Gstruct _Str : basic_string,allocator > {};} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX) # ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif#endif // _V3_LOCALE'#endif // _RWSTD_RW_LOCALE_H_INCLUDEDww}]%%o7ԦL/*************************************************************************** * * access.h *2 * $Id: //stdlib/3.0-rel/include/loc/_access.h#1 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer So ~ftware, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This c omputer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Us e, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/ 8/* This header should not include in any public headers8 as the sole purpose of the class defined here is to 8 allow library sources to access private data members*/  $#ifndef _RWSTD_LOC_ACCESS_H_INCLUDED$#define _RWSTD_LOC_ACCESS_H_INCLUDED#include "#include ##include #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (__rw) { struct __rw_access {  static _RWSTD_SIZE_T*&" _C_get_pid (__rw_facet &__f) { return __f._C_pid; }   static _RWSTD_SIZE_T&+ _C_get_id (const __rw_facet_id& __id) { return __id._C_id; } % static __rw_facet::_C_facet_type&# _C_get_type (__rw_facet &__f) { return __f._C_type; } + static const __rw_facet::_C_facet_type&) _C_get_type (const __rw_facet &__f) { return __f._C_type; }  static const char*) _C_get_name (const __rw_facet &__f) { return __f._C_name; }  ' static const void *& _C_get_impdata (__rw_facet &__f) { return __f._C_impdata; }  static _RWSTD_SIZE_T&& _C_get_impsize (__rw_facet &__f) { return __f._C_impsize; } static const __rw_facet* F _C_get_facet (const std::locale& __loc, const __rw_facet_id& id) {' return __loc._C_get_facet (id); }};} // namepace __rwE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif(#endif // _RWSTD_LOC_ACCESS_H_INCLUDEDww H50o7ԦL/*************************************************************************** *4 * _codecvt .cc - definition of std::codecvt members *4 * $Id: //stdlib/3.0-rel/include/loc/_codecvt.cc#3 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211  and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and  by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is p rovidedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif _RWSTD_NAMESPACE (_V3_LOCALE) { 8template <_RW::__rw_facet_id codecvt<_InternT, _ExternT, _StateT>::id;} // namespace _V3_LOCALEE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endifww :o7ԦL/*************************************************************************** *9 * _codecvt.h - Definitions of the code conversion facets *E * This is an internal header file used to implement the C++ Standard? * Library. It should never be #included directly by a program. *3 * $Id: //stdlib/3.0-rel/include/loc/_codecvt.h#6 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development C ompany, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies there of may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/%#ifndef _RWSTD_LOC_CODECVT_H_INCLUDED%#define _RWSTD_LOC_CODECVT_H_INCLUDED"#include 2#include // for mbsinit()#include ,#include _RWSTD_CWCHAR // for mbstate_tF#if defined (_RWSTD_NO_MBSTATE_T) && !defined (_RWSTD_CWCHAR_INCLUDED),# include // for mbstate_t#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (__rw) { struct __rw_ctype_t;} // namespace __rw _RWSTD_NAMESPACE (_V3_LOCALE) { $// 22.2.1.5 - Template class codecvtstruct codecvt_base{/ enum result { ok, partial, error, noconv };};O// primary template - a stub implementation that doesn't perform any conversionG// specializations on user-defined character types or state type can be%// implemented to do something useful8template &class codecvt: public _RW::__rw_facet," public codecvt_base{public:! typedef _InternT intern_type;! typedef _ExternT extern_type; typedef _StateT state_type; protected:G // extension: where reasonable, the default behavior of the primaryH // template is the same as that of codecvt ifE // sizeof (intern_type) == sizeof (extern_type) to allow iostreamF // instantiations on signed char or unsigned char to have somewhat // meaningful behavior virtual result do_out (state_type&,H const intern_type*, const intern_type*, const intern_type*&,> extern_type*, extern_type*, extern_type*&) const {M return sizeof (intern_type) == sizeof (extern_type) ? noconv : error; } virtual result do_in (state_type&,G const extern_type*, const extern_type*, const extern_type*&,= intern_type*, intern_type*, intern_type*&) const {M return sizeof (intern_type) == sizeof (extern_type) ? noconv : error; } virtual resultO do_unshift (state_type&, extern_type*, extern_type*, extern_type*&) const {M return sizeof (intern_type) == sizeof (extern_type) ? noconv : error; }3 virtual int do_encoding () const _THROWS (()) {9 return -1; // unknown, possibly state dependent }9 virtual bool do_always_noconv () const _THROWS (()) {< return sizeof (intern_type) == sizeof (extern_type); }5 virtual int do_max_length () const _THROWS (()) { return _RWSTD_INT_MAX; } virtual int do_length (state_type&, M const extern_type*, const extern_type*, _RWSTD_SIZE_T) const { return _RWSTD_INT_MAX; }public:L _EXPLICIT codecvt (_RWSTD_SIZE_T __ref = 0): _RW::__rw_facet (__ref) { } // 22,2,1,5,1, p1$ result out (state_type& __state,I const intern_type* __from, const intern_type* __from_end,0 const intern_type*& __from_next,; extern_type* __to, extern_type* __to_limit,0 extern_type*& __to_next) const {< return do_out(__state,__from,__from_end,__from_next,1 __to,__to_limit,__to_next); } // 22,2,1,5,1, p2; result unshift (state_type& __state, extern_type* __to,M extern_type* __to_limit, extern_type*& __to_next) const {> return do_unshift (__state,__to,__to_limit,__to_next); } // 22,2,1,5,1, p3> result in (state_type& __state, const extern_type* __from,N const extern_type* __from_end, const extern_type*& __from_next,: intern_type* __to, intern_type* __to_limit,/ intern_type*& __to_next) const {< return do_in (__state,__from,__from_end,__from_next,1 __to,__to_limit,__to_next); } // 22,2,1,5,1, p5. bool always_noconv () const _THROWS (()) {" return do_always_noconv(); } // 22,2,1,5,1, p4( int encoding () const _THROWS (()) { return do_encoding(); }# // 22,2,1,5,1, p6, lwg issue 75? int length (state_type& __state, const extern_type* __from,I const extern_type* __end, _RWSTD_SIZE_T __maxlen) const {< return do_length (__state, __from, __end, __maxlen); } // 22,2,1,5,1, p7* int max_length() const _THROWS (()) { return do_max_length(); }! static _RW::__rw_facet_id id;};(// 22.2.1.5, p3 - performs no conversion_RWSTD_SPECIALIZED_CLASS2class _RWSTD_EXPORT codecvt : public _RW::__rw_facet, public codecvt_base{public:% typedef char extern_type; " typedef char intern_type;! typedef mbstate_t state_type; protected: virtual result do_out (state_type&,H const intern_type*, const intern_type*, const intern_type*&,= extern_type*, extern_type*, extern_type*&) const; virtual result do_in (state_type&,G  const extern_type*, const extern_type*, const extern_type*&,< intern_type*, intern_type*, intern_type*&) const;, // 22.2.1.5.2, p5 - stores no characters virtual result do_unshift (state_type&,A extern_type*, extern_type*, extern_type*&) const;2 virtual int do_encoding () const _THROWS (());8 virtual bool do_always_noconv () const _THROWS (());% // signature follows lwg issue 75 virtual int do_length (state_type&,L  const extern_type*, const extern_type*, _RWSTD_SIZE_T) const;4 virtual int do_max_length () const _THROWS (());public:0 _EXPLICIT codecvt (_RWSTD_SIZE_T __refs = 0)& : _RW::__rw_facet (__refs) { }$ result out (state_type &__state,I const intern_type *__from, const intern_type* __from_end,0 const intern_type *&__from_next,; extern_type* __to, extern_type* __to_limit,0 extern_type *&__to_next) const {@ return do_out (__state, __from, __from_end, __from_next,4 __to, __to_limit, __to_next); }( result unshift (state_type &__state,? extern_type *__to, extern_type *__to_limit,4 extern_type*& __to_next) const {A return do_unshift (__state, __to, __to_limit, __to_next); }# result in (state_type &__state,H const extern_type *__from, const extern_type *__from_end,/ const extern_type *&__from_next,: intern_type *__to, intern_type *__to_limit,/ intern_type *&__to_next) const {? return do_in (__state, __from, __from_end, __from_next,3 __to, __to_limit, __to_next); }( int encoding () const _THROWS (()) { return do_encoding (); }. bool always_noconv () const _THROWS (()) {# return do_always_noconv (); }% // signature follows lwg issue 75? int length (state_type &__state, const extern_type *__from,I const extern_type *__end, _RWSTD_SIZE_T __maxlen) const {< return do_length (__state, __from, __end, __maxlen); }* int max_length () const _THROWS (()) { return do_max_length (); }! static _RW::__rw_facet_id id;};#ifndef _RWSTD_NO_WCHAR_T=// 22.2.1.5, p3 - converts between wide and narrow characters9// of the native character set (i.e., widens and narrows)_RWSTD_SPECIALIZED_CLASS5class _RWSTD_EXPORT codecvt : public _RW::__rw_facet, public codecvt_base{public:" typedef wchar_t intern_type;" typedef char extern_type;! typedef mbstate_t state_type; protected: virtual result@ do_out (state_type&, const intern_type*, const intern_type*, const intern_type*&,= extern_type*, extern_type*, extern_type*&) const; virtual result do_in (state_type&,G  const extern_type*, const extern_type*, const extern_type*&,< intern_type*, intern_type*, intern_type*&) const;, // 22.2.1.5.2, p5 - stores no characters virtual resultN do_unshift (state_type&, extern_type*, extern_type*, extern_type*&) const;9 virtual bool do_always_noconv () const _THROWS (()) {6 return false; // conversion always necessary }3 virtual int do_encoding () const _THROWS (()) {/ // 22.2.1.5.2 p6 1(ext.) <=> 1(int.) return 1;  }% // signature follows lwg issue 75 virtual int do_length (state_type&,L const extern_type*, const extern_type*, _RWSTD_SIZE_T) const;5 virtual int do_max_length () const _THROWS (()) { return 1; }public:/ _EXPLICIT codecvt (_RWSTD_SIZE_T __ref = 0)% : _RW::__rw_facet (__ref) { }$ result out (state_type& __state,I const intern_type *__from, const intern_type *__from_end,0  const intern_type *&__from_next,; extern_type *__to, extern_type* __to_limit,1 extern_type *& __to_next) const {F return do_out (__state, __from, __from_end, __from_next, __to,. __to_limit, __to_next); }( result unshift (state_type &__state,? extern_type *__to, extern_type *__to_limit,4 extern_type *&__to_next) const {A return do_unshift (__state, __to, __to_limit, __to_next); }# result in (state_type& __state,H const extern_type *__from, const extern_type *__from_end,/ const extern_type *&__from_next,: intern_type *__to, intern_type *__to_limit,/ intern_type *&__to_next) const {? return do_in (__state, __from, __from_end, __from_next,3 __to, __to_limit, __to_next); }( int encoding () const _THROWS (()) { return do_encoding();  }. bool always_noconv () const _THROWS (()) {# return do_always_noconv (); }% // signature follows lwg issue 75$ int length (state_type &__state,D const extern_type *__from, const extern_type *__end,/ _RWSTD_SIZE_T __maxlen) const {< return do_length (__state, __from, __end, __maxlen); }* int max_length () const _THROWS (()) { return do_max_length (); }! static _RW::__rw_facet_id id;};#endif // _RWSTD_NO_WCHAR_T // 22.2.1.68template Aclass codecvt_byname: public codecvt<_InternT, _ExternT, _StateT>{ char _C_namebuf [32];public:! typedef _InternT intern_type;! typedef _ExternT extern_type;! typedef _StateT state_type; J _EXPLICIT codecvt_byname (const char *__name, _RWSTD_SIZE_T __ref = 0)9 : codecvt <_InternT, _ExternT, _StateT> (__ref) {B this->_C_set_name (__name, _C_namebuf, sizeof _C_namebuf); }};#ifndef _RWSTD_NO_WCHAR_T_RWSTD_SPECIALIZED_CLASS<class _RWSTD_EXPORT codecvt_byname. : public codecvt{ char _C_namebuf [32]; struct { unsigned _C_state :4; unsigned _C_use_ucs :1; unsigned _C_is_utf8 :1; } _C_traits;public:K _EXPLICIT codecvt_byname (const char *__name, _RWSTD_SIZE_T __ref = 0); protected: virtual codecvt_base::result do_out (state_type&,H const intern_type*, const intern_type*, const intern_type*&,= extern_type*, extern_type*, extern_type*&) const; virtual codecvt_base::result do_in (state_type&,G const extern_type*, const extern_type*, const extern_type*&,< intern_type*, intern_type*, intern_type*&) const; virtual codecvt_base::result do_unshift (state_type&,A extern_type*, extern_type*, extern_type*&) const;3 virtual int do_encoding () const _THROWS (()); 9 virtual bool do_always_noconv () const _THROWS (()) {E return false; // conversion always necessary (lwg issue 19) }% // signature follows lwg issue 75 virtual intC do_length (state_type&, const extern_type*, const extern_type*,$ _RWSTD_SIZE_T) const;4 virtual int do_max_length () const _THROWS (());};#endif // _RWSTD_NO_WCHAR_T} // namespace _V3_LOCALEE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif$#if _RWSTD_DEFINE_TEMPLATE (CODECVT)'# include ,#endif // _RWSTD_DEFINE_TEMPLATE (CODECVT)#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif)#endif // _RWSTD_LOC_CODECVT_H_INCLUDEDww a=Ho7ԦL/*************************************************************************** *4 * _collate .cc - definition of std::collate members *4 * $Id: //stdlib/3.0-rel/include/loc/_collate.cc#3 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211  and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and  by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is p rovidedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif _RWSTD_NAMESPACE (_V3_LOCALE) { template '_RW::__rw_facet_id collate<_CharT>::id;template  int collate<_CharT>::>do_compare (const char_type *__low1, const char_type *__high1,D const char_type *__low2, const char_type *__high2) const{; _RWSTD_ASSERT (__low1 <= __high1 && __low2 <= __high2);, _RWSTD_SIZE_T __len1 = __high1 - __low1;, _RWSTD_SIZE_T __len2 = __high2 - __low2;= _RWSTD_SIZE_T __len = __len1 < __len2 ? __len1 : __len2;* for ( ; __len--; __low1++, __low2++) {; typedef _TYPENAME string_type::traits_type _Traits;1 // avoid arithmetic on unknown char typesJ _TYPENAME _Traits::int_type __i1 = _Traits::to_int_type (*__low1);J _TYPENAME _Traits::int_type __i2 = _Traits::to_int_type (*__low2); I // use int_type to prevent signed versus unsigned char comparison0 if (!_Traits::eq_int_type (__i1, __i2)) ( return __i1 < __i2 ? -1 : 1;  }; return __len1 < __len2 ? -1 : __len2 < __len1 ? +1 : 0;}template &_TYPENAME collate<_CharT>::string_typeOcollate<_CharT>::do_transform (const _CharT *__low, const _CharT *__high) const{$ _RWSTD_ASSERT (__low <= __high);/ return string_type (__low, __high - __low);}template Plong collate<_CharT>::do_hash (const _CharT *__start, const _CharT *__end) const{K // hash the result of do_transform, so that keys that transform equally/ // will hash equally, as per 22.2.4.1.2, p3: const string_type __s = do_transform (__ start, __end); __start = __s.data ();& __end = __start + __s.length ();O // Peter Weinberger's generic hashing algorithm, adapted by Andrew BinstockO // from a version by Allen Holub (see Andrew Binstock, "Hashing Revisited",E // Dr. Dobb's Journal, April 1996) and templatized by Rogue Wave.A const int __long_bits = _RWSTD_CHAR_BIT * sizeof (long);1 const int __one_eighth = __long_bits / 8;5 const int __three_fourths = __long_bits * 3 / 4;F // subexpression parenthesized to prevent MSVC 13.00 warning C4554F const long __high_bits = ~0L << ( __long_bits - __one_eighth); long __res = 0;* for ( ; __start != __end; ++__start) {; typedef _TYPENAME string_type::traits_type _Traits;J __res = (__res << __one_eighth) + _Traits::to_int_type (*__start);) long __tmp = __res & __high_bits; if (__tmp)H __res = (__res ^ (__tmp >> __three_fourths)) & ~__high_bits; } return __res;}} // namespace _V3_LOCALEE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endifww HRo7ԦL/*************************************************************************** *> * _collate.h - definition of the std::collate class templates *E * This is an internal header file used to implement the C++ Standard? * Library. It should never be #included directly by a program. *3 * $Id: //stdlib/3.0-rel/include/loc/_collate.h#5 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Developme nt Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies t hereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/%#ifndef _RWSTD_LOC_COLLATE_H_INCLUDED%#define _RWSTD_LOC_COLLATE_H_INCLUDED#include "#include #include #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif _RWSTD_NAMESPACE (_V3_LOCALE) { template %class collate: public _RW::__rw_facet{public: typedef _CharT char_type;; typedef basic_string,/ allocator > string_type;0 _EXPLICIT collate (_RWSTD_SIZE_T __refs = 0)& : _RW::__rw_facet (__refs) { }C int compare (const char_type* __low1, const char_type* __high1,K const char_type* __low2, const char_type* __high2) const {= return do_compare (__low1, __high1, __low2, __high2); } string_typeG transform (const char_type* __low, const char_type* __high) const {, return do_transform (__low, __high); }G long hash (const char_type* __low, const char_type* __high) const {' return do_hash (__low, __high); }! static _RW::__rw_facet_id id; protected: virtual int3 do_compare (const char_type*, const char_type*,: const char_type*, const char_type*) const;  virtual string_type< do_transform (const char_type*, const char_type*) const;D virtual long do_hash (const char_type*, const char_type*) const;};template ,class collate_byname: public collate<_CharT>{ char _C_namebuf [32];public:J _EXPLICIT collate_byname (const char *__name, _RWSTD_SIZE_T __ref = 0)" : collate<_CharT>(__ref) {B this->_C_set_name (__name, _C_namebuf, sizeof _C_namebuf); }};8// Library's instantiation of collate for char, wchar_t9_RWSTD_INSTANTIATE_1 (class _RWSTD_EXPORT collate);#ifndef _RWSTD_NO_WCHAR_T<_RWSTD_INSTANTIATE_1 (class _RWSTD_EXPORT collate);#endif // _RWSTD_NO_WCHAR_T_RWSTD_SPECIALIZED_CLASS>class _RWSTD_EXPORT collate_byname: public collate{ char _C_namebuf [32];public:J _EXPLICIT collate_byname (const char* __name, _RWSTD_SIZE_T __ref = 0)& : collate(__ref){ B this->_C_set_name (__name, _C_namebuf, sizeof _C_namebuf); } protected: virtual int3 do_compare (const char_type*, const char_type*,: const char_type*, const char_type*) const; virtual string_type< do_transform (const char_type*, const char_type*) const;};_RWSTD_SPECIALIZED_CLASSDclass _RWSTD_EXPORT collate_byname: public collate{ char _C_namebuf [32];public:J _EXPLICIT collate_byname (const char* __name, _RWSTD_SIZE_T __ref = 0)& : collate(__ref){ B this->_C_set_name (__name, _C_namebuf, sizeof _C_namebuf); } protected: virtual int3 do_compare (const char_type*, const char_type*,: const char_type*, const char_type*) const; virtual string_type< do_transform (const char_type*, const char_type*) const;};} // namespace _V3_LOCALEE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif$#if _RWSTD_DEFINE_TEMPLATE (COLLATE)'# include ,#endif // _RWSTD_DEFINE_TEMPLATE (COLLATE)#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif)#endif // _RWSTD_LOC_COLLATE_H_INCLUDEDww 7]^o7ԦL/*************************************************************************** *0 * _ctype .cc - definition of std::ctype members *2 * $Id: //stdlib/3.0-rel/include/loc/_ctype.cc#2 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 1 2.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by in ternationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is provide dB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif _RWSTD_NAMESPACE (_V3_LOCALE) { template %_RW::__rw_facet_id ctype<_CharT>::id;template const char* ctype<_CharT>::@do_widen (const char *lo, const char *hi, char_type *dest) const{ _RWSTD_ASSERT (lo <= hi); while (lo < hi)$ *dest++ = char_type (*lo++); return hi;}} // namespace _V3_LOCALEE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endifww"mio7ԦL/*************************************************************************** * * _ctype.h -  *E * This is an internal header file used to implement the C++ Standard? * Library. It should never be #included directly by a program. *1 * $Id: //stdlib/3.0-rel/include/loc/_ctype.h#6 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer so ftware. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/##ifndef _RWSTD_LOC_CTYPE_H_INCLUDED##define _RWSTD_LOC_CTYPE_H_INCLUDED"#include #include #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (__rw) { struct __rw_ctype_t;} // namespace __rw _RWSTD_NAMESPACE (_V3_LOCALE) { struct _RWSTD_EXPORT locale; // 22.2.1struct _RWSTD_EXPORT ctype_base{; // 22.2.1, p1 - mask is a bitmask type (see 17.3.3.1.2) typedef int mask;0 _RWSTD_STATIC_CONST (mask, space = 0x0001);0 _RWSTD_STATIC_CONST (mask, print = 0x0002);0 _RWSTD_STATIC_CONST (mask, cntrl = 0x0004);0 _RWSTD_STATIC_CONST (mask, upper = 0x0008);0 _RWSTD_STATIC_CONST (mask, lower = 0x0010);0 _RWSTD_STATIC_CONST (mask, alpha = 0x0020);0 _RWSTD_STATIC_CONST (mask, digit = 0x0040);0 _RWSTD_STATIC_CONST (mask, punct = 0x0080);0 _RWSTD_STATIC_CONST (mask, xdigit = 0x0100);F _RWSTD_STATIC_CONST (mask, alnum = 0x0060 /* = alpha | digit */);0 _RWSTD_STATIC_CONST (mask, graph = 0x0200);}; // 22.2.1.1template 7class ctype : public _RW::__rw_facet, public ctype_base{public: typedef _CharT char_type; protected:C // inline virtual functions defined first to allow compilers toB // inline their definitions when being called from nonvirtuals // 22.2.1.1.2, p10 virtual bool do_is (mask, char_type) const { return false; } virtual const char_type*B do_is (const char_type*, const char_type *__hi, mask*) const { return __hi; } // 22.2.1.1.2, p3 virtual const char_type*F do_scan_is (mask, const char_type*, const char_type *__hi) const { return __hi; } // 22.2.1.1.2, p5 virtual const char_type*G do_scan_not (mask, const char_type*, const char_type *__hi) const { return __hi; } // 22.2.1.1.2, p78 virtual char_type do_toupper (char_type __c) const { return __c; } virtual const char_type*: do_toupper (char_type*, const char_type *__hi) const { return __hi; } // 22.2.1.1.2, p98 virtual char_type do_tolower (char_type __c) const { return __c; } virtual const char_type*: do_tolower (char_type*, const char_type *__hi) const { return __hi; } // 22.2.1.1.2, p111 virtual char_type do_widen (char __c) const { return char_type (__c); } virtual const char*K do_widen (const char *__lo, const char *__hi, char_type *__dest) const; // 22.2.1.1.2, p13= virtual char do_narrow (char_type, char __dfault) const { return __dfault; } virtual const char_type*L do_narrow (const char_type*, const char_type *__hi, char, char*) const { return __hi; }public:- _EXPLICIT ctype (_RWSTD_SIZE_T __ref = 0)% : _RW::__rw_facet (__ref) { } // 22.2.1.1.1, p1- bool is (mask __m, char_type __c) const {! return do_is ( __m, __c); } const char_type*J is (const char_type* __lo, const char_type *__hi, mask *__vec) const {) return do_is (__lo, __hi, __vec); } // 22.2.1.1.1, p2 const char_type*L scan_is (mask __m, const char_type *__lo, const char_type *__hi) const {- return do_scan_is ( __m, __lo, __hi); } // 22.2.1.1.1, p3 const char_type*M scan_not (mask __m, const char_type *__lo, const char_type *__hi) const {. return do_scan_not ( __m, __lo, __hi); } // 22.2.1.1.1, p4. char_type (toupper)(char_type __c) const { return do_toupper (__c); }M const char_type* (toupper)(char_type *__lo, const char_type *__hi) const{' return do_toupper (__lo, __hi); } // 22.2.1.1.1, p5. char_type (tolower)(char_type __c) const { return do_tolower (__c); }M const char_type* (tolower)(char_type *__lo, const char_type *__hi) const{' return do_tolower (__lo, __hi); } // 22.2.1.1.1, p6& char_type widen (char __c) const { return do_widen (__c); } const char*G widen (const char *__lo, const char *__hi, char_type *__to) const {+ return do_widen (__lo, __hi, __to); } // 22.2.1.1.1, p76 char narrow (char_type __c, char __dfault) const {) return do_narrow (__c, __dfault); }J const char_type* narrow (const char_type *__lo, const char_type *__hi,? char __dfault, char *__to) const {6 return do_narrow (__lo, __hi, __dfault, __to); }! static _RW::__rw_facet_id id;};_RWSTD_SPECIALIZED_CLASSJclass _RWSTD_EXPORT ctype: public _RW::__rw_facet, public ctype_base{! typedef unsigned char _UChar;public: typedef char char_type;- bool is (mask __m, char_type __c) const {#if _RWSTD_UCHAR_MAX <= 2557 return (_C_mask_tab [_UChar (__c)] & __m) != 0;#elseK return __c < table_size && (_C_mask_tab [_UChar (__c)] & __m) != 0;#endif } protected:C // inline virtual functions defined first to allow compilers toB // inline their definitions when being called from nonvirtualsC const mask* table () const _THROWS (()) { return _C_mask_tab; }5 static const mask* classic_table () _THROWS (()); virtual ~ctype (); virtual const char_type*4 do_toupper (char_type*, const char_type*) const; virtual const char_type*5 do_tolower (char_type*, const char_type*) const; 8 virtual char_type do_toupper (char_type __c) const {#if _RWSTD_UCHAR_MAX <= 255, return _C_upper_tab [_UChar (__c)]; #elseE return __c < table_size ? _C_upper_tab [_UChar (__c)] : __c; #endif }8 virtual char_type do_tolower (char_type __c) const {#if _RWSTD_UCHAR_MAX <= 255+ return _C_lower_tab [_UChar (__c)];#elseE return __c < table_size ? _C_lower_tab [_UChar (__c)] : __c; #endif }1 virtual char_type do_widen (char __c) const {1 return _RWSTD_CONST_CAST (ctype*, this)->9 _C_wide_tab [_UChar (__c)] = char_type (__c); } virtual const char_type*< do_widen (const char_type* __lo, const char_type* __hi, % char_type* __to) const;B virtual char_type do_narrow (char_type __c, char_type) const { return __c; } virtual const char_type*G do_narrow (const char_type* __lo, const char_type* __hi, char_type,& char_type* __to) const;public:: _RWSTD_STATIC_CONST (_RWSTD_SIZE_T, table_size = 256);M _EXPLICIT ctype (const mask* = 0, bool = false, _RWSTD_SIZE_T __ref = 0);J const char_type* is (const char_type*, const char_type*, mask*) const;N const char_type* scan_is (mask, const char_type*, const char_type*) const;O const char_type* scan_not (mask, const char_type*, const char_type*) const;. char_type (toupper)(char_type __c) const { return do_toupper (__c); }. char_type (tolower)(char_type __c) const { return do_tolower (__c); } // 22.2.1.1.1, p6! char_type widen (char) const;; char narrow (char_type __c, char_type __dfault) const {) return do_narrow (__c, __dfault); }N const char_type* (toupper)(char_type *__lo, const char_type *__hi) const {' return do_toupper (__lo, __hi); }N const char_type* (tolower)(char_type *__lo, const char_type *__hi) const {' return do_tolower (__lo, __hi); } const char_type*G widen (const char *__lo, const char *__hi, char_type *__to) const {+ return do_widen (__lo, __hi, __to); } const char_type*9 narrow (const char_type *__lo, const char_type *__hi,8 char_type __dfault, char_type *__to) const {6 return do_narrow (__lo, __hi, __dfault, __to); }! static _RW::__rw_facet_id id; protected:B mask *_C_mask_tab; // mask for each characterN unsigned char *_C_upper_tab; // uppercase version of each characterN unsigned char *_C_lower_tab; // lowercase version of each characterG char_type _C_wide_tab [256]; // cached results of do_widen()? int _C_delete_it; // delete tables above?};Ainline ctype::char_type ctype::widen (char __c) const{H const _RWSTD_SIZE_T __inx = _RWSTD_STATIC_CAST (unsigned char, __c);E // optimize away all but the first call to the virtual do_widen() if (#if _RWSTD_CHAR_BIT > 8; __inx < sizeof _C_wide_tab / sizeof *_C_wide_tab &&#endif _C_wide_tab [__inx])# return _C_wide_tab [__inx];J // template argument provided to work around an HP aCC bug (PR #27087)H return _RWSTD_CONST_CAST (ctype*, this)->_C_wide_tab [__inx] = do_widen (__c);} // 22.2.1.2template (class ctype_byname: public ctype<_CharT>{ char _C_namebuf [32];public:H _EXPLICIT ctype_byname (const char *__name, _RWSTD_SIZE_T __ref = 0) : ctype<_CharT>(__ref) {B this->_C_set_name (__name, _C_namebuf, sizeof _C_namebuf); }};_RWSTD_SPECIALIZED_CLASS,class ctype_byname: public ctype{ char _C_namebuf [32];public:< _EXPLICIT ctype_byname (const char*, _RWSTD_SIZE_T = 0);};#ifndef _RWSTD_NO_WCHAR_T_RWSTD_SPECIALIZED_CLASSMclass _RWSTD_EXPORT ctype: public _RW::__rw_facet, public ctype_base{! typedef unsigned char _UChar; enum { _C_tab_size = 256 };public: typedef wchar_t char_type; protected:C // inline virtual functions defined first to allow compilers toB // inline their definitions when being called from nonvirtuals virtual ~ctype (); // 22.2.1.1.2, p1/ virtual bool do_is (mask, char_type) const; virtual const char_type*A do_is (const char_type*, const char_type *__hi, mask*) const;// for convenience"#define _RWSTD_CONVERT(tab, c) \M _RWSTD_STATIC_CAST (_RWSTD_SIZE_T, c) < _C_tab_size ? tab [_UChar (c)] : c // 22.2.1.1.2, p78 virtual char_type do_toupper (char_type __c) const {2 return _RWSTD_CONVERT (_C_upper_tab, __c); } // 22.2.1.1.2, p98 virtual char_type do_tolower (char_type __c) const {2 return _RWSTD_CONVERT (_C_lower_tab, __c); } // 22.2.1.1.2, p111 virtual char_type do_widen (char __c) const {1 return _RWSTD_CONST_CAST (ctype*, this)->9 _C_wide_tab [_UChar (__c)] = char_type (__c); } virtual const char*K do_widen (const char *__lo, const char *__hi, char_type *__dest) const; // 22.2.1.1.2, p13A virtual char do_narrow (char_type __c, char __dfault) const {L return _RWSTD_STATIC_CAST (_RWSTD_SIZE_T, __c) <= _RWSTD_SCHAR_MAX ?6 _RWSTD_STATIC_CAST (char, __c) : __dfault; } virtual const char_type*4 do_toupper (char_type*, const char_type*) const; virtual const char_type*4 do_tolower (char_type*, const char_type*) const; // 22.2.1.1.2, p3 virtual const char_type*@ do_scan_is (mask, const char_type*, const char_type*) const; // 22.2.1.1.2, p5 virtual const char_type*F do_scan_not (mask, const char_type*, const char_type* __hi) const; virtual const char_type*F do_narrow (const char_type*, const char_type*, char, char*) const;public:. _EXPLICIT ctype (_RWSTD_SIZE_T __ref = 0); // 22.2.1.1.1, p1- bool is (mask __m, char_type __c) const {! return do_is ( __m, __c); } const char_type*J is (const char_type *__lo, const char_type *__hi, mask *__vec) const {) return do_is (__lo, __hi, __vec); } // 22.2.1.1.1, p2 const char_type*L scan_is (mask __m, const char_type *__lo, const char_type *__hi) const {- return do_scan_is ( __m, __lo, __hi); } // 22.2.1.1.1, p3 const char_type*M scan_not (mask __m, const char_type *__lo, const char_type *__hi) const {. return do_scan_not ( __m, __lo, __hi); } // 22.2.1.1.1, p4. char_type (toupper)(char_type __c) const { return do_toupper (__c); }N const char_type* (toupper)(char_type *__lo, const char_type *__hi) const {' return do_toupper (__lo, __hi); } // 22.2.1.1.1, p5. char_type (tolower)(char_type __c) const { return do_tolower (__c); }N const char_type* (tolower)(char_type *__lo, const char_type *__hi) const {' return do_tolower (__lo, __hi); } // 22.2.1.1.1, p6! char_type widen (char) const; const char*G widen (const char* __lo, const char *__hi, char_type *__to) const {+ return do_widen (__lo, __hi, __to); } // 22.2.1.1.1, p76 char narrow (char_type __c, char __dfault) const {) return do_narrow (__c, __dfault); }J const char_type* narrow (const char_type *__lo, const char_type *__hi,? char __dfault, char *__to) const {6 return do_narrow (__lo, __hi, __dfault, __to); }! static _RW::__rw_facet_id id;private:' friend class ctype_byname;B mask *_C_mask_tab; // mask for each characterN unsigned char *_C_upper_tab; // uppercase version of each characterN unsigned char *_C_lower_tab;  // lowercase version of each characterG char_type _C_wide_tab [256]; // cached results of do_widen()? int _C_delete_it; // delete tables above?};Ginline ctype::char_type ctype::widen (char __c) const{H const _RWSTD_SIZE_T __inx = _RWSTD_STATIC_CAST (unsigned char, __c);E // optimize away all but the first call to the virtual do_widen() if (#if _RWSTD_CHAR_BIT > 8; __inx < sizeof _C_wide_tab / sizeof *_C_wide_tab &&#endif _C_wide_tab [__inx])# return _C_wide_tab [__inx];J // template argument provided to work around an HP aCC bug (PR #27087)K return _RWSTD_CONST_CAST (ctype*, this)->_C_wide_tab [__inx] = do_widen (__c);}_RWSTD_SPECIALIZED_CLASS2class ctype_byname: public ctype{ char _C_namebuf [32];public:I _EXPLICIT ctype_byname (const char *__name, _RWSTD_SIZE_T __ref = 0); protected:  virtual ~ctype_byname ();/ virtual bool do_is (mask, char_type) const;5 virtual const char_type* do_is (const char_type*,C const char_type*, mask*) const;3 virtual char_type do_toupper (char_type) const;M virtual const char_type* do_toupper (char_type*, const char_type*) const;3 virtual char_type do_tolower (char_type) const;M virtual const char_type* do_tolower (char_type*, const char_type*) const;A virtual const char_type* do_scan_is (mask, const char_type*, A const char_type*) const;B virtual const char_type* do_scan_not (mask, const char_type*, B const char_type*) const; 2 virtual char do_narrow(char_type, char) const;J virtual const char_type* do_narrow(const char_type*, const char_type*,: char, char*) const;, virtual char_type do_widen (char) const;   virtual const char*K do_widen (const char *__lo, const char *__hi, char_type *__dest) const;private:L const void *_C_cvtimpl; // codecvt database mapped by ctype facet? _RWSTD_SIZE_T _C_cvtsize; // size of the above mapping};#endif // _RWSTD_NO_WCHAR_T+#if !defined (_MSC_VER) || _MSC_VER >= 1300template const _Facet&>use_facet (const locale &__loc _RWSTD_DUMMY_DEFAULT (_Facet));_RWSTD_SPECIALIZED_FUNCTION _RWSTD_EXPORT const ctype&Juse_facet >(const locale& _RWSTD_DUMMY_DEFAULT (ctype));# ifndef _RWSTD_NO_WCHAR_T_RWSTD_SPECIALIZED_FUNCTION#_RWSTD_EXPORT const ctype&(use_facet >(const locale&B _RWSTD_DUMMY_DEFAULT (ctype));# endif // _RWSTD_NO_WCHAR_T#endif // MSVC < 7.0$// convenience interfaces: is*(char)<// names parenthesized to avoid clashing with masking macrostemplate 6inline bool (isspace)(_CharT __c, const locale &__loc){L return _V3_USE_FACET (ctype<_CharT>, __loc).is (ctype_base::space, __c);}template 6inline bool (isprint)(_CharT __c, const locale &__loc){L return _V3_USE_FACET (ctype<_CharT>, __loc).is (ctype_base::print, __c);}template 6inline bool (iscntrl)(_CharT __c, const locale &__loc){K return _V3_USE_FACET (ctype<_CharT>, __loc).is(ctype_base::cntrl, __c);}template 6inline bool (isupper)(_CharT __c, const locale &__loc){L return _V3_USE_FACET (ctype<_CharT>, __loc).is (ctype_base::upper, __c);}template 6inline bool (islower)(_CharT __c, const locale &__loc){L return _V3_USE_FACET (ctype<_CharT>, __loc).is (ctype_base::lower, __c);}template 6inline bool (isalpha)(_CharT __c, const locale &__loc){L return _V3_USE_FACET (ctype<_CharT>, __loc).is (ctype_base::alpha, __c);}template 6inline bool (isdigit)(_CharT __c, const locale &__loc){L return _V3_USE_FACET (ctype<_CharT>, __loc).is (ctype_base::digit, __c);}template 6inline bool (ispunct)(_CharT __c, const locale &__loc){K return _V3_USE_FACET (ctype<_CharT>, __loc).is(ctype_base::punct, __c);}template 7inline bool (isxdigit)(_CharT __c, const locale &__loc){M return _V3_USE_FACET (ctype<_CharT>, __loc).is (ctype_base::xdigit, __c);}template 6inline bool (isalnum)(_CharT __c, const locale &__loc){L return _V3_USE_FACET (ctype<_CharT>, __loc).is (ctype_base::alnum, __c);}template 6inline bool (isgraph)(_CharT __c, const locale &__loc){L return _V3_USE_FACET (ctype<_CharT>, __loc).is (ctype_base::graph, __c);}template 8inline _CharT (toupper)(_CharT __c, const locale &__loc){@ return (_V3_USE_FACET (ctype<_CharT>, __loc).toupper) (__c);}template 8inline _CharT (tolower)(_CharT __c, const locale &__loc){@ return (_V3_USE_FACET (ctype<_CharT>, __loc).tolower) (__c);}} // namespace _V3_LOCALEE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif"#if _RWSTD_DEFINE_TEMPLATE (CTYPE)%# include *#endif // _RWSTD_DEFINE_TEMPLATE (CTYPE)#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif'#endif // _RWSTD_LOC_CTYPE_H_INCLUDEDww ݅vo7ԦL/*************************************************************************** *I * _facet.h - definition of the std::locale::facet and locale::id classes *E * This is an internal header file used to implement the C++ Standard? * Library. It should never be #included directly by a program. *1 * $Id: //stdlib/3.0-rel/include/loc/_facet.h#5 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard  Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Softwa re, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any othe r copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/##ifndef _RWSTD_LOC_FACET_H_INCLUDED##define _RWSTD_LOC_FACET_H_INCLUDED#include #include #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) { } // namespace std _RWSTD_NAMESPACE (_V3_LOCALE) { #ifndef _MSC_VER8// make _V3_LOCALE think it's std (if it isn't) to avoidA// having to qualify all references to standard names with _STD::_USING (namespace std);#endifstruct _RWSTD_EXPORT locale;} // namespace _V3_LOCALE_RWSTD_NAMESPACE (__rw) { class _RWSTD_EXPORT __rw_locale;struct __rw_access;2struct _RWSTD_EXPORT __rw_facet: __rw_synchronized{- _EXPLICIT __rw_facet (_RWSTD_SIZE_T = 0); virtual ~__rw_facet ();D // types of standard facets; only globally managed facets (i.e.,H // standard facets created internally) set this member, user-created> // facet objects of any types set their type to _C_unknownL // NOTE: the values and order of all the enumerators below are importantK // any changes may affect the binary compatibility of the library enum _C_facet_type {@ /* -1 */ _C_invalid = -1, // marked e.g., when deleted3 /* 0 */ _C_unknown = 0, // user-defined+ // narrow character specializations8 // classic versions // byname versions // collate category8 /* 1 */ _C_collate, _C_collate_byname, // ctype category8 /* 3 */ _C_codecv t, _C_codecvt_byname,6 /* 5 */ _C_ctype, _C_ctype_byname, // monetary category; /* 7 */ _C_moneypunct, _C_moneypunct_byname,@ /* 9 */ _C_moneypunct_intl, _C_moneypunct_intl_byname,7 /* 11 */ _C_money_get, _C_nonexistent_0,7 /* 13 */ _C_money_put, _C_nonexistent_1, // numeric category9 /* 15 */ _C_numpunct, _C_numpunct_byname,7 /* 17 */ _C_num_get, _C_nonexistent_2 ,7 /* 19 */ _C_num_put, _C_nonexistent_3, // time category9 /* 21 */ _C_time_get, _C_time_get_byname,9 /* 23 */ _C_time_put, _C_time_put_byname, // messages category9 /* 25 */ _C_messages, _C_messages_byname,) // wide character specializations8 // classic versions // byname versions9 /* 27 */ _C_wcollate, _C_wcollate_byname,9 /* 29 */ _C_wcodecvt, _C_w codecvt_byname,7 /* 31 */ _C_wctype, _C_wctype_byname,< /* 33 */ _C_wmoneypunct, _C_wmoneypunct_byname,A /* 35 */ _C_wmoneypunct_intl, _C_wmoneypunct_intl_byname,7 /* 37 */ _C_wmoney_get, _C_nonexistent_4,7 /* 39 */ _C_wmoney_put, _C_nonexistent_5,: /* 41 */ _C_wnumpunct, _C_wnumpunct_byname,7 /* 43 */ _C_wnum_get, _C_nonexistent_6,7 /* 45 */ _C_wnum_put, _C_nonexistent_7,: /* 47 */ _C_wtime_get, _C_wtime_get_byname,: /* 49 */ _C_wtime_put, _C_wtime_put_byname,: /* 51 */ _C_wmessages, _C_wmessages_byname,: // the value of the first available (non-standard); // facet's id is computed as (_C_last_type / 2 + 1)M // note that this value determines the binary footprint of each facetK // changing it affects the binary compatibility of the localization // library3 /* 52 */ _C_last_type  = _C_wmessages_byname };! // unique fundamental type id enum _C_type_id {> _C_signed = 0x100, _C_ptr = 0x200, _C_cont = 0x400,H _C_integral = 0x800, _C_floating = 0x1000, _C_typemask = 0x00ff, _C_bool = 0,& _C_char = 1 | _C_integral,H _C_uchar = 2 | _C_integral, _C_schar = _C_uchar | _C_signed,H _C_ushort = 3 | _C_integral, _C_short = _C_ushort | _C_signed,H _C_uint = 4 | _C_integral, _C_int = _C_uint  | _C_signed,H _C_ulong = 5 | _C_integral, _C_long = _C_ulong | _C_signed,H _C_ullong = 6 | _C_integral, _C_llong = _C_ullong | _C_signed,& _C_float = 7 | _C_floating,& _C_double = 8 | _C_floating,& _C_ldouble = 9 | _C_floating,5 _C_void = 10, _C_pvoid = _C_void | _C_ptr, _C_wchar_t = 11 }; enum {A // SunOS prepends the separator charater to the beginning: // of locale names, e.g., "/en_US/de_DE/fr_F R/..."" _C_prepend_cat_sep = 0x01,? // Linux uses the names of LC_XXX constants in combined // locale names,F // e.g., "LC_CYPE=en_US;LC_COLLATE=de_DE;LC_MONETARY=fr_FR..." _C_use_cat_names = 0x02,? // HP-UX, for instance, keeps even trivial locale names // fully expanded< // (e.g., setlocale ("C") will return "C C C C C C")E // and doesn't include category names in (combined or others) // locale names!  _C_condensed_name = 0x04,A // bits to determine whether and when libc locale will be@ // used as an implementation of C++ locale functionality // // libc libstd effectO // 0 0 use own implementation, fall back on libc if that fails? // 0 1 use own implementation only, never libc? // 1 0 use libc implementation only, never ownH // 1 1 try libc implementation first, own if that fails  _C_use_libc = 0x08, _C_use_libstd = 0x10 };C // global options controlling the behavior of locale and facets static int _C_opts;; // returns a pointer to the facet's implementation data // if it exists, 0 otherwise" const void* _C_data () const {& return _C_impsize ? _C_impdataD : _RWSTD_CONST_CAST (__rw_facet*, this)->_C_get_data (); }& const char* _C_get_name () const {' return _C_name ? _C_name : "C"; }A // returns true iff the facet object is of the specified type // (or derived from it)6 bool _C_is_std_type (_C_facet_type __type) const {$ _RWSTD_ASSERT (0 != _C_pid);G return unsigned (__type) == *_C_pid * 2U - 1U + (0 != _C_name); } protected:D // set facet locale name (will allocate if bufsize is too small)9 void _C_set_name (const char*, char*, _RWSTD_SIZE_T);I const char *_C_name; // name of locale associated with facetK char  *_C_buf; // character buffer name may be stored inF const void *_C_impdata; // implementation data (e.g., punct)@ _RWSTD_SIZE_T _C_impsize; // size of implementation dataprivate:; _C_facet_type _C_type; // facet type (see above): _RWSTD_SIZE_T _C_ref; // reference count (> 0)J _RWSTD_SIZE_T *_C_pid; // pointer to the static Facet::id._C_id> // standard facets' id's are computed as (_C_type + 1) / 2H // standard face t's base type is computed as 2 * Facet::id._C_id - 18 __rw_facet (const __rw_facet&); // not defined8 void operator= (const __rw_facet&); // not defined const void* _C_get_data ();K static __rw_facet* _C_manage (__rw_facet*, _C_facet_type, const char*);% friend struct _V3_LOCALE::locale; friend class __rw_locale; friend struct __rw_facet_id; friend struct __rw_access;};"struct _RWSTD_EXPORT __rw_facet_id{ __rw_facet_id () {J // _C_id member zero-initialized (i.e., invalidated) by the systemK // for __rw_facet_id objects with static storage duartion, the only& // ones locale ever references }private:; __rw_facet_id (const __rw_facet_id&); // not defined; void operator= (const __rw_facet_id&); // not definedA // initialize id to the given value if within the valid range@ // otherwise to the next value generated by the id generator# _RWSTD_SIZE_T _C_init () const; < _MUTABLE _RWSTD_SIZE_T _C_id; // unique id > 0 friend class __rw_locale;% friend struct _V3_LOCALE::locale; friend struct __rw_access;};G// Does the necessary path calculations and mapping of locale databases6const void* __rw_get_facet_data (int, _RWSTD_SIZE_T&, ? const char*, const char* = 0);0// Its counterpart - does the database unmapping:void __rw_release_facet_data (const void*, _RWSTD_SIZE_T);} // namespace __rwE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif'#endif // _RWSTD_LOC_FACET_H_INCLUDEDww o7ԦL/*************************************************************************** * * _rw_iso2022.h *3 * $Id: //stdlib/3.0-rel/include/loc/_iso2022.h#1 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Compute r Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. Th  is computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights.  Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *K ************************************************* ************************* *K * Contains the logic necessary to implement to/from ISO-2022 conversions.8 * The supported conversions will include standards as: * - ISO-2022-JP * - ISO-2022-JP2 * - ISO-2022-KRH * All such conversions will have an internal representation that uses  * UCS-4 encoding. *L **************************************************************************/%#ifndef _RWSTD_LOC_ISO2022_H_INCLUDED%#define _RWSTD_LOC_ISO2022_H_INCLUDED#if define d(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (__rw) { enum encoding_type{ stateless,6 iso2022_jp, /* stateful ISO-2022-JP encoding */= iso2022_jp2, /* stateful ISO-2022-JP2 encoding */6 is o2022_kr, /* stateful ISO-2022-KR encoding */6 iso2022_cn /* stateful ISO-2022-CN encoding */};+typedef enum encoding_type encoding_type_t;3// Type of encoding as indicated in the name string*int __rw_encoding_from_name (const char*);// Conversions for ISO-2022-JP _V3_LOCALE::codecvt_base::result+__rw_iso2022jp_do_in (_RWSTD_C::mbstate_t&,0 const char*&, const char*,+ wchar_t*&, wchar_t*); _V3_LOCALE::codecvt_base::result,__ rw_iso2022jp_do_out (_RWSTD_C::mbstate_t&,7 const wchar_t*&, const wchar_t*,& char*&, char*);!_V3_LOCALE::codecvt_base::result @__rw_iso2022jp_do_unshift (_RWSTD_C::mbstate_t&, char*&, char*);#int __rw_iso2022jp_do_encoding ();Bint __rw_iso2022jp_do_length (_RWSTD_C::mbstate_t&, const char*, ; const char*, _RWSTD_SIZE_T);%int __rw_iso2022jp_do_max_length ();&bool __rw_iso2022_do_always_noconv (); // Conversions for ISO-2022-JP-2 _V3_LOCALE::codecvt_base::result,__rw_iso2022jp2_do_in (_RWSTD_C::mbstate_t&,1 const char*&, const char*,, wchar_t*&, wchar_t*); _V3_LOCALE::codecvt_base::result-__rw_iso2022jp2_do_out (_RWSTD_C::mbstate_t&,7 const wchar_t*&, const wchar_t*,& char*&, char*);!_V3_LOCALE::codecvt_base::result A__rw_iso2022jp2_do_unshift (_RWSTD_C::mbstate_t&, char*&, char*);%in t __rw_iso2022jp2_do_encoding ();Cint __rw_iso2022jp2_do_length (_RWSTD_C::mbstate_t&, const char*, @ const char*, _RWSTD_SIZE_T);&int __rw_iso2022jp2_do_max_length ();*bool __rw_iso2022jp2_do2_always_noconv (); } // __rwE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif'#endif // _RWSTD_LOC_ISO2022_H_INCLUDEDww  o7ԦL/*************************************************************************** *2 * _locale.h - definition of the std::locale class *E * This is an internal header file used to implement the C++ Standard? * Library. It should never be #included directly by a program. *2 * $Id: //stdlib/3.0-rel/include/loc/_locale.h#5 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.  P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Res  erved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not  be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/"#ifndef _RWSTD_LOC_LOCALE_INCLUDED"#define _RWSTD_LOC_LOCALE_INCLUDED#include "#include #include #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_d efaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (__rw) { class _RWSTD_EXPORT __rw_locale;} // namespace __rw _RWSTD_NAMESPACE (_V3_LOCALE) { "// forward declare of the accessorstruct __rw_access;+#if !defined (_MSC_VER) || _MSC_VER >= 1300template &inline bool has_facet (const locale&);template /inline const _Facet& use_facet (const locale&);#endif // MSVC > 6.0@// forward declare standard facets before referencing them belowGtemplate class codecvt;Gtemplate class collate;Etemplate class ctype;Jtemplate struct money_get;Jtemplate  struct money_put;Ktemplate struct moneypunct;Htemplate struct num_get;Htemplate struct num_put;Itemplate struct numpunct;Htemplate class time_get;Itemplate struct time_put;Htemplate  class messages; // 22.1.1struct _RWSTD_EXPORT locale{ // 22.1.1.1.1, p1 typedef int category; // 22.1.1.1.2" typedef _RW::__rw_facet facet; // 22.1.1.1.3" typedef _RW::__rw_facet_id id;J // values (including none) must not conflict with any LC_XXX constants6 _RWSTD_STATIC_CONST (category, none = 0x0100);6 _RWSTD_STATIC_CONST (category, collate = 0x0200);6 _RWSTD_STATIC_CONST (category, ctype = 0x0400); 6 _RWSTD_STATIC_CONST (category, monetary = 0x0800);6 _RWSTD_STATIC_CONST (category, numeric = 0x1000);6 _RWSTD_STATIC_CONST (category, time = 0x2000);6 _RWSTD_STATIC_CONST (category, messages = 0x4000);6 _RWSTD_STATIC_CONST (category, all = 0x7e00); // 22.1.1.2, p1 locale () _THROWS (()); // 22.1.1.2, p3( locale (const locale&) _THROWS (()); // 22.1.1.2, p6# _EXPLICIT locale (const char*); // 22.1.1.2, p92 locale (const ! locale&, const char*, category);"#ifndef _RWSTD_NO_MEMBER_TEMPLATES // 22.1.1.2, p12 template $ locale (const locale&, _Facet*); // 22.1.1.3, p1 template ) locale combine (const locale&) const; // 22.1.1.4, p3< template F bool operator() (const basic_string<_CharT, _Traits, _Allocator>&,M const basic_string<_CharT, _Traits, _Allocator>&) const;2#els " e // if defined (_RWSTD_NO_MEMBER_TEMPLATES)+# ifndef _RWSTD_NO_INLINE_MEMBER_TEMPLATES template 1 locale (const locale &__rhs, _Facet *__facet) : _C_body (0) {= // initialize facet's member id to point to Facet::id* if (__facet && !__facet->_C_pid) {: // unusual cast (to size_t** rather than size_t*&)1 // done to work around an HP aCC 3.3x bugD *_RWSTD_CONST_CAST (_RWSTD_SIZE_T**, &__facet->_C_pid) =" # &_Facet::id._C_id; }G // uninitialized Facet::id will be initialized by has_facet<>()> // prevent passing `facet' the ctor if it is installedB // in `rhs' to potentially avoid creating a whole new body' if ( has_facet<_Facet>(__rhs)4 && &use_facet<_Facet>(__rhs) == __facet) __facet = 0;1 *this = locale (*__rhs._C_body, __facet); } template N locale combine (const locale &__rhs $ _RWSTD_DUMMY_DEFAULT (_Facet)) const {E // unitialized Facet::id will be initialized by has_facet<>()2 _RWSTD_REQUIRES (has_facet<_Facet>(__rhs),7 (_RWSTD_ERROR_FACET_NOT_FOUND,I _RWSTD_FUNC ("locale::combine (const locale&)"),D _Facet::id._C_id, __rhs.name ().c_str ()));9 return locale (__rhs, &use_facet<_Facet>(__rhs)); }< template J % bool operator() (const basic_string<_CharT, _Traits, _Allocator> &__x,R const basic_string<_CharT, _Traits, _Allocator> &__y) const {A // qualify collate to distinguish it from locale::collate= return use_facet<_V3_LOCALE::collate<_CharT> >(*this)? .compare (__x.data (), __x.data () + __x.length (),D __y.data (), __y.data () + __y.length ()) < 0; }0# endif // _RWSTD_NO_INLINE_MEMBER_TEMPLATES&#endif // _RWSTD& _NO_MEMBER_TEMPLATES // 22.1.1.2, p144 locale (const locale&, const locale&, category); // 22.1.1.2, p16 ~locale() _THROWS (()); // 22.1.1.2, p49 const locale& operator= (const locale&) _THROWS (()); // 22.1.1.3, p5 string name () const; // 22.1.1.4, p1* bool operator== (const locale&) const; // 22.1.1.4, p21 bool operator!= (const locale &__rhs) const {! return !(*this == __rhs); } // 22.1.1.5, p1) ' static locale global (const locale&); // 22.1.1.5, p4$ static const locale& classic ();private:; _EXPLICIT locale (_RW::__rw_locale &__rhs) _THROWS (()) : _C_body (&__rhs) { }- locale (_RW::__rw_locale&, const facet*);< _RW::__rw_locale *_C_body; // reference-counted body6#if defined (__SUNPRO_CC) && __SUNPRO_CC <= 0x540 \, || defined (_MSC_VER) && _MSC_VER < 1300G // working around a SunPro member access control bug (see PR #25910)( public:(#endif // SunPro <= 5.4 || MSVC <= 6.0: // (try to) retrieve a facet from a locale given an id9 // will initialize the id if it isn't initialized yet0 const facet* _C_get_facet (const id&) const;# friend class _RW::__rw_locale;# friend struct _RW::__rw_access;+#if !defined (_MSC_VER) || _MSC_VER >= 1300 template * friend bool has_facet (const locale&); template 9 friend const _Facet& use_facet (const loca) le &__loc);#endif // MSVC > 6.0}; // 22.1.2, p1template inline const _Facet&=use_facet (const locale &__loc _RWSTD_DUMMY_DEFAULT (_Facet)){@ // initialize Facet::id and retrieve facet if it's installedF const _RW::__rw_facet *__facet = __loc._C_get_facet (_Facet::id); _RWSTD_REQUIRES (__facet,, (_RWSTD_ERROR_BAD_CAST,B _RWSTD_FUNC ("use_facet (const locale&)")));#ifndef _RWSTD_NO_DYNAMIC_CAST1 * return dynamic_cast(*__facet);#else8 return _RWSTD_STATIC_CAST (const _Facet&, *__facet);"#endif // _RWSTD_NO_DYNAMIC_CAST} // 22.1.2, p5template Iinline bool has_facet (const locale &__loc _RWSTD_DUMMY_DEFAULT (_Facet)){@ // initialize Facet::id and retrieve facet if it's installedE const _RW::__rw_facet *__facet = __loc._C_get_facet (_Facet::id); if (!__facet) return false;#ifndef _RWSTD_NO_DYNAMIC_CAST. + if (!dynamic_cast(__facet)) return false;"#endif // _RWSTD_NO_DYNAMIC_CAST return true;}+#if !defined (_MSC_VER) || _MSC_VER >= 1300H# define _RWSTD_SPECIALIZE_USE_FACET(Facet) \H _RWSTD_SPECIALIZED_FUNCTION _RWSTD_EXPORT \H inline bool has_facet< Facet >(const locale&) { return true; } \H \H _RWSTD_SPECIALIZED_F , UNCTION _RWSTD_EXPORT \4 const Facet& use_facet< Facet >(const locale&)<# define _Codecvt(T) codecvt4# define _MoneyPunct(T, Intl) moneypunct-# define _Facet(name, T, It) name9# define _InIter(T) istreambuf_iterator< T >9# define _OutIter(T) ostreambuf_iterator< T >*_RWSTD_SPECIALIZE_USE_FACET (ctype);._RWSTD_SPECIALIZE_USE_FACET (_Codecvt (char));,_RWSTD_SPECIALIZE_USE_FA - CET (collate);G_RWSTD_SPECIALIZE_USE_FACET (_Facet (money_get, char, _InIter (char)));H_RWSTD_SPECIALIZE_USE_FACET (_Facet (money_put, char, _OutIter (char)));8_RWSTD_SPECIALIZE_USE_FACET (_MoneyPunct (char, false));7_RWSTD_SPECIALIZE_USE_FACET (_MoneyPunct (char, true));E_RWSTD_SPECIALIZE_USE_FACET (_Facet (num_get, char, _InIter (char)));F_RWSTD_SPECIALIZE_USE_FACET (_Facet (num_put, char, _OutIter (char)));-_RWSTD_SPECIALIZE_USE_FACET (numpunct);F_RWSTD_SPECIALIZE_USE_FACET . (_Facet (time_get, char, _InIter (char)));G_RWSTD_SPECIALIZE_USE_FACET (_Facet (time_put, char, _OutIter (char)));-_RWSTD_SPECIALIZE_USE_FACET (messages);# ifndef _RWSTD_NO_WCHAR_T-_RWSTD_SPECIALIZE_USE_FACET (ctype);1_RWSTD_SPECIALIZE_USE_FACET (_Codecvt (wchar_t));/_RWSTD_SPECIALIZE_USE_FACET (collate);M_RWSTD_SPECIALIZE_USE_FACET (_Facet (money_get, wchar_t, _InIter (wchar_t)));N_RWSTD_SPECIALIZE_USE_FACET (_Facet (money_put, wchar_t, _OutIter (wchar_t)) / );;_RWSTD_SPECIALIZE_USE_FACET (_MoneyPunct (wchar_t, false));:_RWSTD_SPECIALIZE_USE_FACET (_MoneyPunct (wchar_t, true));K_RWSTD_SPECIALIZE_USE_FACET (_Facet (num_get, wchar_t, _InIter (wchar_t)));L_RWSTD_SPECIALIZE_USE_FACET (_Facet (num_put, wchar_t, _OutIter (wchar_t)));0_RWSTD_SPECIALIZE_USE_FACET (numpunct);L_RWSTD_SPECIALIZE_USE_FACET (_Facet (time_get, wchar_t, _InIter (wchar_t)));M_RWSTD_SPECIALIZE_USE_FACET (_Facet (time_put, wchar_t, _OutIter (wchar_t)));0_RWSTD_SPECIALIZ0 E_USE_FACET (messages);# endif // _RWSTD_NO_WCHAR_T // clean up$# undef _RWSTD_SPECIALIZE_USE_FACET# undef _Codecvt# undef _MoneyPunct# undef _Facet# undef _InIter# undef _OutIter#endif // MSVC >= 7.0"#ifndef _RWSTD_NO_MEMBER_TEMPLATEStemplate <inline locale::locale (const locale &__rhs, _Facet *__facet) : _C_body (0){9 // initialize facet's member id to point to Facet::id& if (__facet && !__facet->_C_pid) {: 1 // unusual cast (to size_t** rather than size_t*&)1 // done to work around an HP aCC 3.3x bug@ *_RWSTD_CONST_CAST (_RWSTD_SIZE_T**, &__facet->_C_pid) = &_Facet::id._C_id; }C // uninitialized Facet::id will be initialized by has_facet<>(): // prevent passing `facet' the ctor if it is installed> // in `rhs' to potentially avoid creating a whole new body# if ( has_facet<_Facet>(__rhs)0 && &use_facet<_Facet>(__rhs) == __facet) 2 __facet = 0;- *this = locale (*__rhs._C_body, __facet);}template 9inline locale locale::combine (const locale &__rhs) const{A // unitialized Facet::id will be initialized by has_facet<>(). _RWSTD_REQUIRES (has_facet<_Facet>(__rhs),3 (_RWSTD_ERROR_FACET_NOT_FOUND,F _RWSTD_FUNC ("locale::combine (const locale&)"),A _Facet::id._C_id, __rhs.name ().c_str ()));5 return locale (__rhs, 3 &use_facet<_Facet>(__rhs));}8template inline boolIlocale::operator() (const basic_string<_CharT, _Traits, _Allocator> &__x,O const basic_string<_CharT, _Traits, _Allocator> &__y) const{= // qualify collate to distinguish it from locale::collate9 return use_facet<_V3_LOCALE::collate<_CharT> >(*this); .compare (__x.data (), __x.data () + __x.length (),@ __y.data (), __y.data () + __y4 .length ()) < 0;}&#endif // _RWSTD_NO_MEMBER_TEMPLATES} // namespace _V3_LOCALE#ifndef _V3_LOCALE_RWSTD_NAMESPACE (std) {class _RWSTD_EXPORT locale;} // namespace std_RWSTD_NAMESPACE (_V3_LOCALE) {@// template provided to allow code that mixes _V3_LOCALE::locale@// and std::iostreams to compile (i.e., when locale.2 is enabled?// and in namespace std and locale.3 is in namespace _V3_LOCALEtemplate :inline const _Facet& use_facet5 (const _STD::locale &__loc){C // FIXME: this is quite unsafe since the facet may be destroyedB // as soon as the unnamed lacale temporary is destroyedJ return use_facet<_Facet>(_V3_LOCALE::locale (__loc.name ().c_str ()));}} // namespace _V3_LOCALE#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif&#endif // _RWSTD_LOC_LOCALE_INCLUDEDww7 =o7ԦL/*************************************************************************** * * _localedef.h *5 * $Id: //stdlib/3.0-rel/include/loc/_localedef.h#5 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Compu 8 ter Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. 9 This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Right : s. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L ***********************************************; ***************************/'#ifndef _RWSTD_LOC_LOCALEDEF_H_INCLUDED'#define _RWSTD_LOC_LOCALEDEF_H_INCLUDED#include #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (__rw) { //< LC_CTYPE structuresstruct __rw_mask_elm{: wchar_t ch; // the wide character value= _RWSTD_UINT32_T mask; // the mask for that character};struct __rw_upper_elm{6 wchar_t lower; // the lower case wide characterM wchar_t upper; // the upper case wide character that the lower maps to};struct __rw_lower_elm{6 wchar_t upper; // the upper case wide characterM wchar_t lower; // the lower case wide character that the upper maps= to};<// returns a pointer to a character at the given byte offset // from the end of the structure"#define _RWSTD_CHAR_ARRAY(off) \= (_RWSTD_REINTERPRET_CAST (const char*, this + 1) + (off))A// returns a pointer to a wide character at the given byte offset // from the end of the structure%#define _RWSTD_WCHAR_T_ARRAY(off) \E _RWSTD_REINTERPRET_CAST (const wchar_t*, _RWSTD_CHAR_ARRAY (off))##define _RWSTD_UINT_ARRAY(off) \M _RWSTD_REINTERPRET_CAST (const _RWST> D_UINT32_T*, _RWSTD_CHAR_ARRAY (off))4// returns a pointer to the i-th element of an array9// at the given byte offset from the end of the structure<#define _RWSTD_ARRAY_ELM(T, off, i) \< _RWSTD_REINTERPRET_CAST (const T*, \< ( _RWSTD_REINTERPRET_CAST (const char*, this + 1) \% + (off) + (i) * sizeof (T)))struct __rw_codecvt_t{ _RWSTD_UINT32_T codeset_off; _RWSTD_UINT32_T charmap_off;# _RWSTD_UINT32_T n_to? _w_tab_off;# _RWSTD_UINT32_T w_to_n_tab_off;( _RWSTD_UINT32_T utf8_to_ext_tab_off; _RWSTD_UINT32_T wchar_off;$ _RWSTD_UINT32_T xliteration_off;$ _RWSTD_UINT32_T codecvt_ext_off; unsigned char mb_cur_max;' const char* codeset_name () const {/ return _RWSTD_CHAR_ARRAY (codeset_off); }' const char* charmap_name () const {/ return _RWSTD_CHAR_ARRAY (charmap_off); }0 const _RWSTD_UINT32_T* w_to_n_tab () const {2 return@ _RWSTD_UINT_ARRAY (w_to_n_tab_off); }0 const _RWSTD_UINT32_T* n_to_w_tab () const {2 return _RWSTD_UINT_ARRAY (n_to_w_tab_off); } 5 const _RWSTD_UINT32_T* utf8_to_ext_tab () const {7 return _RWSTD_UINT_ARRAY (utf8_to_ext_tab_off); }@ wchar_t get_internal_at_offset (_RWSTD_UINT32_T off) const {A return *(_RWSTD_ARRAY_ELM (wchar_t, wchar_off, off * 2)); }< wchar_t get_ucs4_at_offset (_RWSTD_UINT32_T off) const {E reA turn *(_RWSTD_ARRAY_ELM (wchar_t, wchar_off, off * 2 + 1)); }" const void* get_ext () const {3 return _RWSTD_CHAR_ARRAY (codecvt_ext_off); }9 const _RWSTD_UINT32_T* get_xliteration_tab () const {3 return _RWSTD_UINT_ARRAY (xliteration_off); }};// LC_CTYPE structurestruct __rw_ctype_t{J _RWSTD_UINT32_T codeset_off; // byte offset of the codeset_nameJ _RWSTD_UINT32_T charmap_off; // byte offset of the charmap name B _RWSTD_UINT32_T wmask_s;J _RWSTD_UINT32_T wtoupper_off; // byte offset of the wtoupper_tabJ _RWSTD_UINT32_T wtolower_off; // byte offset of the wtolower_tabK _RWSTD_UINT32_T wmask_off; // byte offset of the wmask_tab_tab3 // this is added to allow for future extensionsE _RWSTD_UINT32_T ctype_ext_off; // extended ctype data offsetG unsigned char toupper_tab[256]; // the narrow char to_upper tableG unsigned char tolower_tab[256]; // theC narrow char to_lower tableF _RWSTD_UINT32_T mask_tab[256]; // the narrow char mask tableM unsigned char mb_cur_max; // max number of bytes per MB character) _RWSTD_UINT32_T wtoupper_s () const {G return (wtolower_off - wtoupper_off) / sizeof (__rw_upper_elm); }) _RWSTD_UINT32_T wtolower_s () const {D return (wmask_off - wtolower_off) / sizeof (__rw_lower_elm); }( _RWSTD_UINT32_T codeset_s () const {) return charmap_off -D codeset_off; }( _RWSTD_UINT32_T charmap_s () const {* return wtoupper_off - charmap_off; }' const char* codeset_name () const {/ return _RWSTD_CHAR_ARRAY (codeset_off); }' const char* charmap_name () const {/ return _RWSTD_CHAR_ARRAY (charmap_off); }= __rw_upper_elm wtoupper_tab (_RWSTD_UINT32_T idx) const {E return *_RWSTD_ARRAY_ELM (__rw_upper_elm, wtoupper_off, idx); }= __rw_lower_elm wtolower_tab (_E RWSTD_UINT32_T idx) const {E return *_RWSTD_ARRAY_ELM (__rw_lower_elm, wtolower_off, idx); }9 __rw_mask_elm wmask_tab (_RWSTD_UINT32_T idx) const {A return *_RWSTD_ARRAY_ELM (__rw_mask_elm, wmask_off, idx); }" const void* get_ext () const {1 return _RWSTD_CHAR_ARRAY (ctype_ext_off); }}; // LC_COLLATE structureE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1953)# pragma __message __save)# pragma __message F __disable __narrowptr#endifstruct __rw_collate_t{F _RWSTD_UINT32_T codeset_off; // byte offset of the codeset_nameF _RWSTD_UINT32_T charmap_off; // byte offset to the charmap name! _RWSTD_UINT32_T n_ce_tab_off;! _RWSTD_UINT32_T w_ce_tab_off;H _RWSTD_UINT32_T weight_tab_off; // offset to the weight informationF _RWSTD_UINT32_T n_char_tab_off; // offset to the first nchar tableM _RWSTD_UINT32_T n_char_off_tab_off; // offset to offset table for nchars G L _RWSTD_UINT32_T n_char_first_char_off; // offset to first character infoO _RWSTD_UINT32_T w_char_tab_off; // offset to the first wide character tableM _RWSTD_UINT32_T w_char_off_tab_off; // offset to offset table for wcharsL _RWSTD_UINT32_T w_char_first_char_off; // offset to first character info% _RWSTD_UINT32_T n_ce_off_tab_off;% _RWSTD_UINT32_T w_ce_off_tab_off;( _RWSTD_UINT32_T n_ce_first_char_off;( _RWSTD_UINT32_T w_ce_first_char_off;' _RWSTD_UINT32_H T n_ce_last_char_off;' _RWSTD_UINT32_T w_ce_last_char_off;) _RWSTD_UINT32_T undefined_weight_idx;N _RWSTD_UINT32_T elm_size; // number of bytes in each coll array elemF _RWSTD_UINT32_T num_elms; // numer of elements in coll arrayL _RWSTD_UINT32_T num_wchars; // number of wide chars in wchar mapping3 // this is added to allow for future extensionsI _RWSTD_UINT32_T collate_ext_off; // extended collate data offset+ _RWSTD_UINT32_T undefi I ned_optimization;@ unsigned char longest_weight; // the longest weight value9 unsigned char num_weights; // number of weights unsigned char largest_ce;B unsigned char weight_type[256]; // weight types (ex. forward)C _RWSTD_UINT32_T get_n_tab_off (_RWSTD_UINT32_T tab_num) const {E return sizeof (_RWSTD_UINT32_T) * (*(const _RWSTD_UINT32_T*)(6 size_t((const char*)this + sizeof (*this) ! + n_char_off_tab_off 6 + (tab_n J um * sizeof (_RWSTD_UINT32_T))))); }F _RWSTD_UINT32_T get_n_ce_tab_off (_RWSTD_UINT32_T tab_num) const {E return sizeof (_RWSTD_UINT32_T) * (*(const _RWSTD_UINT32_T*)(6 size_t((const char*)this + sizeof (*this)  + n_ce_off_tab_off 6 + (tab_num * sizeof (_RWSTD_UINT32_T))))); }F _RWSTD_UINT32_T get_w_ce_tab_off (_RWSTD_UINT32_T tab_num) const {E return sizeof (_RWSTD_UINT32_T) * (*(const _RWSTD_UINT32_T*)(6 size_tK ((const char*)this + sizeof (*this)  + w_ce_off_tab_off 6 + (tab_num * sizeof (_RWSTD_UINT32_T))))); }K unsigned char get_first_char_in_n_tab (_RWSTD_UINT32_T tab_num) const {= return *((const unsigned char*)this + sizeof (*this) ) + n_char_first_char_off 7 + (tab_num * sizeof (unsigned char)));  }N unsigned char get_first_char_in_n_ce_tab (_RWSTD_UINT32_T tab_num) const {= return *((const L unsigned char*)this + sizeof (*this) ' + n_ce_first_char_off 7 + (tab_num * sizeof (unsigned char))); }N unsigned char get_first_char_in_w_ce_tab (_RWSTD_UINT32_T tab_num) const {= return *((const unsigned char*)this + sizeof (*this) ' + w_ce_first_char_off 7 + (tab_num * sizeof (unsigned char))); }M unsigned char get_last_char_in_n_ce_tab (_RWSTD_UINT32_T tab_num) const {= return *((cons M t unsigned char*)this + sizeof (*this) & + n_ce_last_char_off 7 + (tab_num * sizeof (unsigned char))); }M unsigned char get_last_char_in_w_ce_tab (_RWSTD_UINT32_T tab_num) const {= return *((const unsigned char*)this + sizeof (*this) & + w_ce_last_char_off 7 + (tab_num * sizeof (unsigned char))); }F const _RWSTD_UINT32_T* get_n_tab (_RWSTD_UINT32_T tab_num) const {R return (const _RWSTD_UIN N T32_T*)(size_t((const char*) this + sizeof (*this)6 + n_char_tab_off A + get_n_tab_off (tab_num))); }I const _RWSTD_UINT32_T* get_n_ce_tab (_RWSTD_UINT32_T tab_num) const {R return (const _RWSTD_UINT32_T*)(size_t((const char*) this + sizeof (*this)4 + n_ce_tab_off D + get_n_ce_tab_off (tab_num))); }I const _RWSTD_UINT32_T* O get_w_ce_tab (_RWSTD_UINT32_T tab_num) const {R return (const _RWSTD_UINT32_T*)(size_t((const char*) this + sizeof (*this)4 + w_ce_tab_off D + get_w_ce_tab_off (tab_num))); }C _RWSTD_UINT32_T get_w_tab_off (_RWSTD_UINT32_T tab_num) const {E return sizeof (_RWSTD_UINT32_T) * (*(const _RWSTD_UINT32_T*)(6 size_t((const char*)this + sizeof (*this) ! + w_char_off_tab_off 6 P + (tab_num * sizeof (_RWSTD_UINT32_T))))); }K unsigned char get_first_char_in_w_tab (_RWSTD_UINT32_T tab_num) const {= return *((const unsigned char*)this + sizeof (*this) ) + w_char_first_char_off 7 + (tab_num * sizeof (unsigned char)));  }F const _RWSTD_UINT32_T* get_w_tab (_RWSTD_UINT32_T tab_num) const {R return (const _RWSTD_UINT32_T*)(size_t((const char*) this + sizeof (*this)6 Q + w_char_tab_off A + get_w_tab_off (tab_num))); }* const _RWSTD_UINT32_T* coll () const {3 return _RWSTD_UINT_ARRAY (weight_tab_off);  }' const char* codeset_name () const {/ return _RWSTD_CHAR_ARRAY (codeset_off); }' const char* charmap_name () const {/ return _RWSTD_CHAR_ARRAY (charmap_off); }J const _RWSTD_UINT32_T* get_weight_at_idx (_RWSTD_UINT32_T idx) const {D R return (const _RWSTD_UINT32_T*)(size_t((const char*)coll ()  + elm_size * idx)); }" const void* get_ext () const {3 return _RWSTD_CHAR_ARRAY (collate_ext_off); }};E#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1953)# pragma __message __restore#endif2// punct structure for monetary and numeric facetsstruct __rw_punct_t{M _RWSTD_UINT32_T decimal_point_off [2]; // narrow and wide decimal_pointM _RWSTD_UINT32_T th S ousands_sep_off [2]; // narrow and wide thousands_sep? _RWSTD_UINT32_T grouping_off; // grouping stringG _RWSTD_UINT32_T punct_ext_off; // offset of extended dataI // decimal_point (0) points to a char*, decimal_point (1) to wchar_t*; const void* decimal_point (_RWSTD_UINT32_T idx) const {; return _RWSTD_CHAR_ARRAY (decimal_point_off [idx]); }I // thousands_sep (0) points to a char*, thousands_sep (1) to wchar_t*; const void* thouT sands_sep (_RWSTD_UINT32_T idx) const {; return _RWSTD_CHAR_ARRAY (thousands_sep_off [idx]); }# const void* grouping () const {0 return _RWSTD_CHAR_ARRAY (grouping_off); }" const void* get_ext () const {1 return _RWSTD_CHAR_ARRAY (punct_ext_off); }};// LC_MONETARY structurestruct __rw_mon_t{M _RWSTD_UINT32_T codeset_off; // byte offset of the codeset_nameM _RWSTD_UINT32_T charmap_off; // byte offset to U the charmap nameL _RWSTD_UINT32_T curr_symbol_off [2][2]; // byte offset of curr_symbolN _RWSTD_UINT32_T positive_sign_off [2]; // byte offset of positive_signN _RWSTD_UINT32_T negative_sign_off [2]; // byte offset of negative_sign3 // this is added to allow for future extensionsK _RWSTD_UINT32_T monetary_ext_off; // extended monetary data offset2 // monetary format pattern for positive values char pos_format[2][4]; 2 // monetary format pV attern for negative values char neg_format[2][4]; 9 // num of frac digits to write using currency_symbol  char frac_digits[2]; ) // 0 = currency symbol then pos value* // 1 = pos value then currency symbol  char p_cs_precedes[2]; % * // separation of curr symbol and value // 0 - no separationL // 1 = if the symbol and sign are adjacent, a space separates them from M // the value; otherwise, a space W separates the symbol from the value H // 2 = if the symbol and sign are adjacent, a space separates them; @ // otherwise, a space separates the sign from the value char p_sep_by_space[2]; 1 // 0 = currency symbol succeeds the neg value1 // 1 = currency symbol precedes the neg value char n_cs_precedes[2]; 5 // 0 = no space seperates curr sym from neg value0 // 1 = space seperates symbol from neg value1 // 2 = space seperates symbol and sign string X  char n_sep_by_space[2];; // 0 = Parentheses enclose the quantity of the curr sym9 // 1 = Sign string precedes the quantity and curr sym9 // 2 = sign string succeeds the quantity and curr sym/ // 3 = sign string precedes the curr symbol/ // 4 = sign string succeeds the curr symbol char p_sign_posn[2];; // 0 = Parentheses enclose the quantity of the curr sym9 // 1 = Sign string precedes the quantity and curr sym9 // 2 = sign string succeeds the quanY tity and curr sym/ // 3 = sign string precedes the curr symbol/ // 4 = sign string succeeds the curr symbol char n_sign_posn[2];3 const void* curr_symbol (_RWSTD_UINT32_T intl, : _RWSTD_UINT32_T wide) const {@ return _RWSTD_CHAR_ARRAY (curr_symbol_off [intl][wide]); } ; const void* positive_sign (_RWSTD_UINT32_T idx) const {; return _RWSTD_CHAR_ARRAY (positive_sign_off [idx]); }; const void* negative_sign (_RWZ STD_UINT32_T idx) const {; return _RWSTD_CHAR_ARRAY (negative_sign_off [idx]); }' const char* codeset_name () const {/ return _RWSTD_CHAR_ARRAY (codeset_off); }' const char* charmap_name () const {/ return _RWSTD_CHAR_ARRAY (charmap_off); }" const void* get_ext () const {4 return _RWSTD_CHAR_ARRAY (monetary_ext_off); }};// LC_NUMERIC structurestruct __rw_num_t{I _RWSTD_UINT32_T codeset_off; // byte [ offset of the codeset_nameI _RWSTD_UINT32_T charmap_off; // byte offset to the charmap nameL _RWSTD_UINT32_T truename_off [2]; // offset of narrow and wide truenameM _RWSTD_UINT32_T falsename_off [2]; // offset of narrow and wide falsenameH _RWSTD_UINT32_T numeric_ext_off; // extended numeric data offset6 const void* truename (_RWSTD_UINT32_T idx) const {6 return _RWSTD_CHAR_ARRAY (truename_off [idx]); }7 const void* falsename (_RWSTD_UINT32\ _T idx) const {7 return _RWSTD_CHAR_ARRAY (falsename_off [idx]); }' const char* codeset_name () const {/ return _RWSTD_CHAR_ARRAY (codeset_off); }' const char* charmap_name () const {/ return _RWSTD_CHAR_ARRAY (charmap_off); }" const void* get_ext () const {3 return _RWSTD_CHAR_ARRAY (numeric_ext_off); }};// LC_MESSAGES structurestruct __rw_messages_t{ _RWSTD_UINT32_T codeset_off; _RWSTD_UINT32_T ch] armap_off; # _RWSTD_UINT32_T yesexpr_off[2];" _RWSTD_UINT32_T noexpr_off[2];% _RWSTD_UINT32_T messages_ext_off;6 const void* yesexpr (_RWSTD_UINT32_T wide) const {5 return _RWSTD_CHAR_ARRAY (yesexpr_off[wide]); }5 const void* noexpr (_RWSTD_UINT32_T wide) const {4 return _RWSTD_CHAR_ARRAY (noexpr_off[wide]); }' const char* codeset_name () const {/ return _RWSTD_CHAR_ARRAY (codeset_off); }' const char* charmap_na^ me () const {/ return _RWSTD_CHAR_ARRAY (charmap_off); }" const void* get_ext () const {4 return _RWSTD_CHAR_ARRAY (messages_ext_off); }};// LC_TIME structurestruct __rw_time_t{G _RWSTD_UINT32_T codeset_off; // byte offset of the codeset_nameG _RWSTD_UINT32_T charmap_off; // byte offset to the charmap name: _RWSTD_UINT32_T num_eras; // the number of eras@ _RWSTD_UINT32_T num_alt_digits; // the number of alt_digitsG_ _RWSTD_UINT32_T era_off; // bute offset of the first eraH _RWSTD_UINT32_T alt_digits_off; // byte offset to offset array D _RWSTD_UINT32_T abday_off[2][7]; // byte offset of each abdayB _RWSTD_UINT32_T day_off[2][7]; // byte offset of each dayD _RWSTD_UINT32_T abmon_off[2][12]; // byte offset of each abmonB _RWSTD_UINT32_T mon_off[2][12]; // byte offset of each monC _RWSTD_UINT32_T am_pm_off[2][2]; // byte offset of am and pmA _RWSTD_U ` INT32_T d_t_fmt_off[2]; // byte offset of d_t_fmt? _RWSTD_UINT32_T d_fmt_off[2]; // byte offset of d_fmt? _RWSTD_UINT32_T t_fmt_off[2]; // byte offset of t_fmtD _RWSTD_UINT32_T t_fmt_ampm_off[2]; // byte offset of t_fmt_ampmE _RWSTD_UINT32_T era_d_t_fmt_off[2]; // byte offset of era_d_t_fmtC _RWSTD_UINT32_T era_d_fmt_off[2]; // byte offset of era_d_fmtC _RWSTD_UINT32_T era_t_fmt_off[2]; // byte offset of era_t_fmt3 // this is added to allow for a future extensionsC _RWSTD_UINT32_T time_ext_off; // extended time data offset- // %a: abbreviated weekday name [tm_wday]I const void* abday (_RWSTD_UINT32_T idx, _RWSTD_UINT32_T wide) const {9 return _RWSTD_CHAR_ARRAY (abday_off [wide][idx]); }& // %A: full weekday name [tm_wday]G const void* day (_RWSTD_UINT32_T idx, _RWSTD_UINT32_T wide) const {7 return _RWSTD_CHAR_ARRAY (day_off [wide][idx]); }* // %b: abbreviated month name [tm_ b mon]I const void* abmon (_RWSTD_UINT32_T idx, _RWSTD_UINT32_T wide) const {9 return _RWSTD_CHAR_ARRAY (abmon_off [wide][idx]); }# // %B: full month name [tm_mon]G const void* mon (_RWSTD_UINT32_T idx, _RWSTD_UINT32_T wide) const {7 return _RWSTD_CHAR_ARRAY (mon_off [wide][idx]); }< // %p: the locale's equivalent of the AM/PM designations4 // associated with a 12-hour clock [tm_hour]I const void* am_pm (_RWSTD_UINT32_T idx, _RWSTD_UINT32_c T wide) const {9 return _RWSTD_CHAR_ARRAY (am_pm_off [wide][idx]); }7 // %c: the appropriate date and time representation6 const void* d_t_fmt (_RWSTD_UINT32_T wide) const {5 return _RWSTD_CHAR_ARRAY (d_t_fmt_off[wide]); }. // %x: the appropriate date representation4 const void* d_fmt (_RWSTD_UINT32_T wide) const {3 return _RWSTD_CHAR_ARRAY (d_fmt_off[wide]); }. // %X: the appropriate time representation4 const void* t_fmt (_d RWSTD_UINT32_T wide) const {3 return _RWSTD_CHAR_ARRAY (t_fmt_off[wide]); }9 const void* t_fmt_ampm (_RWSTD_UINT32_T wide) const {8 return _RWSTD_CHAR_ARRAY (t_fmt_ampm_off[wide]); } struct era_t {D _RWSTD_UINT32_T name_off [2]; // narrow and wide era namesM _RWSTD_UINT32_T fmt_off [2]; // narrow and wide format of the yearE // negative offset represents direction of '-', otherwise '+'E _RWSTD_INT32_T offset; e // year closest to start_dateD // the beginning of time is represented by INT_MIN stored in: // year [1], and CHAR_MIN in month [1] and day [1]> // the end of time is represented by INT_MAX stored in: // year [1], and CHAR_MAX in month [1] and day [1]= _RWSTD_INT32_T year [2]; // start and end yearF char month [2]; // start and end month [0..11]D char day [2]; // start and end day [1..31] }; f // era description segment2 const era_t* era (_RWSTD_UINT32_T idx) const {6 return _RWSTD_ARRAY_ELM (era_t, era_off, idx); }- // the number of era description segments( _RWSTD_UINT32_T era_count () const { return num_eras; }L const void* era_name (_RWSTD_UINT32_T idx, _RWSTD_UINT32_T wide) const {= return _RWSTD_CHAR_ARRAY (era (idx)->name_off[wide]); }K const void* era_fmt (_RWSTD_UINT32_T idx, _RWSTD_UINT32_T wide) const {< g return _RWSTD_CHAR_ARRAY (era (idx)->fmt_off[wide]); }? // %Ec: the locale's alternate date and time representation: const void* era_d_t_fmt (_RWSTD_UINT32_T wide) const {9 return _RWSTD_CHAR_ARRAY (era_d_t_fmt_off[wide]); }8 // %Ex: the locale's alternative date representation8 const void* era_d_fmt (_RWSTD_UINT32_T wide) const {7 return _RWSTD_CHAR_ARRAY (era_d_fmt_off[wide]); }8 // %EX: the locale's alternative time representation h 8 const void* era_t_fmt (_RWSTD_UINT32_T wide) const {7 return _RWSTD_CHAR_ARRAY (era_t_fmt_off[wide]); }G // alternative symbols for digits, corresponding to the %O modifierN const void* alt_digits (_RWSTD_UINT32_T idx, _RWSTD_UINT32_T wide) const {4 return _RWSTD_CHAR_ARRAY (*_RWSTD_ARRAY_ELM D (_RWSTD_UINT32_T, alt_digits_off, 4 idx * 2 + wide)); // FIXME: uncomment@ // returi n _RWSTD_CHAR_ARRAY (alt_digits_off[wide][idx]); }# // number of alternative digits/ _RWSTD_UINT32_T alt_digits_count () const { return num_alt_digits; }' const char* codeset_name () const {/ return _RWSTD_CHAR_ARRAY (codeset_off); }' const char* charmap_name () const {/ return _RWSTD_CHAR_ARRAY (charmap_off); }" const void* get_ext () const {0 return _RWSTD_CHAR_ARRAY (time_ext_off); }};static inlj ine _RWSTD_SIZE_T9__rw_utf8_encode_character (wchar_t w, unsigned char* to){C const _RWSTD_SIZE_T wc = _RWSTD_STATIC_CAST (_RWSTD_SIZE_T, w);! typedef unsigned char _UChar; if (wc < 0x80U) { to [0] = _UChar (wc); to [1] = 0U; return 1U; } if (wc < 0x800U) {* to [0] = 0xc0U | _UChar (wc >> 6);- to [1] = 0x80U | _UChar (wc & 0x3fU); to [2] = 0U; return 2U; } if (wc < 0x10000U) {+ to [0]k = 0xe0U | _UChar (wc >> 12);3 to [1] = 0x80U | _UChar (wc >> 6 & 0x3fU);3 to [2] = 0x80U | _UChar (wc & 0x3fU); to [3] = 0U; return 3U; } if (wc < 0x200000U) {+ to [0] = 0xf0U | _UChar (wc >> 18);3 to [1] = 0x80U | _UChar (wc >> 12 & 0x3fU);3 to [2] = 0x80U | _UChar (wc >> 6 & 0x3fU);3 to [3] = 0x80U | _UChar (wc & 0x3fU); to [4] = 0U; return 4U; } if (wc < 0x4000000U) {+ l to [0] = 0xf8U | _UChar (wc >> 24);3 to [1] = 0x80U | _UChar (wc >> 18 & 0x3fU);3 to [2] = 0x80U | _UChar (wc >> 12 & 0x3fU);3 to [3] = 0x80U | _UChar (wc >> 6 & 0x3fU);3 to [4] = 0x80U | _UChar (wc & 0x3fU); to [5] = 0U; return 5U; }' to [0] = 0xfcU | _UChar (wc >> 30);/ to [1] = 0x80U | _UChar (wc >> 24 & 0x3fU);/ to [2] = 0x80U | _UChar (wc >> 18 & 0x3fU);/ to [3] = 0x80U | _UChar (wc >> 12 & 0x3fU);/ to [4] = 0x80U | _UChar (wc >> 6 & 0x3fU);/ to [5] = 0x80U | _UChar (wc & 0x3fU); to [6] = 0U; return 6U;}} // namespace __rwE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif,#endif // _RWSTD_LOC_LOCALEDEF_H_INCLUDEDww n ,o7ԦL/*************************************************************************** *5 * _messages.cc - definition of std::messages members *5 * $Id: //stdlib/3.0-rel/include/loc/_messages.cc#3 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12 o .211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws p and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software q is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L *********r *****************************************************************/#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endif(#include E#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif _RWSTD_NAMESPACE (_V3_LOCALE) { template (_RW::__r s w_facet_id messages<_CharT>::id;template '_TYPENAME messages<_CharT>::string_type<messages<_CharT>::do_get (messages_base::catalog __cat,< int __set,> int __msgid,E const string_type &__dfault) const{G const char *__text = _RW::__rw_get_message (__cat, __set, __msgid); if (__text) {L typedef _V3_LOCALE::codecvt<_CharT t , char, _STD::mbstate_t> _CodeCvt;# const _CodeCvt& __codecvt =C _V3_USE_FACET (_CodeCvt, _RW::__rw_get_locale (__cat));M if (sizeof (_CharT) == sizeof (char) && __codecvt.always_noconv ()) {F // lwg issue 19: always_noconv() is only allowed to returnG // true if extern_type and intern_type are one and the sameC return _RWSTD_REINTERPRET_CAST (const _CharT*, __text); }: const _RWSTD_SIZE_T __fr_length = strlen u (__text);( const char *__fr_first = __text;5 const char *__fr_last = __text + __fr_length;+ const char *__fr_next = __fr_first;A // allocate a [wide] string large enough to hold at least@ // as many internal characters as there are bytes in the' // multibyte characater messageA string_type __result_str ((const _CharT*)0, __fr_length);/ _CharT *__to_first = &__result_str [0];6 _CharT *__to_last = __to_first + __fr_lengtv h;( _CharT *__to_next = __to_first;5 _STD::mbstate_t __state = _STD::mbstate_t ();* const codecvt_base::result __res =D __codecvt.in (__state, __fr_first, __fr_last, __fr_next,< __to_first, __to_last, __to_next); switch (__res) { case codecvt_base::ok:6 // shrink the converted string accordingly9 __result_str.resize (__to_next - __to_first); return __result_str;" case w codecvt_base::noconv:3 if (sizeof (_CharT) == sizeof (char)) {F // lwg issue 19: in() is only allowed to return noconvF // if extern_type and intern_type are one and the sameG return _RWSTD_REINTERPRET_CAST (const _CharT*, __text); } else {A // should not happen - bad codecvt implementationF for (_RWSTD_SIZE_T __i = 0; __i != __fr_length; ++__i)4 __to_first [__x i] = __text [__i];$ return __result_str; }# case codecvt_base::partial: // should not happen default: break; } } return __dfault;}} // namespace _V3_LOCALEE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endifww z Go7ԦL/*************************************************************************** *@ * _messages.h - definition of the std::messages class templates *E * This is an internal header file used to implement the C++ Standard? * Library. It should never be #included directly by a program. *4 * $Id: //stdlib/3.0-rel/include/loc/_messages.h#4 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Develop { ment Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. | All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies } thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 C~ FR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/&#ifndef _RWSTD_LOC_MESSAGES_H_INCLUDED&#define _RWSTD_LOC_MESSAGES_H_INCLUDED#include "#include $#include ##include (#include #include #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif _RWSTD_NAMESPACE (_V3_LOCALE) { "struct _RWSTD_EXPORT messages_base{ typedef int catalog;}; // 22.2.7.1template 'class messages: public _RW ::__rw_facet,$ public messages_base{public: typedef _CharT char_type;; typedef basic_string,< allocator > string_type;1 _EXPLICIT messages (_RWSTD_SIZE_T __refs = 0)8 : _RW::__rw_facet (__refs), messages_base () { }C catalog open (const string& __fun, const locale& __loc) const {& return do_open (__fun, __loc); }9 string_type get (catalog __c, int __set, int __msgid,5 const string_type& __df) const {2 return do_get (__c, __set, __msgid, __df); }$ void close (catalog __c) const { do_close (__c); }! static _RW::__rw_facet_id id; protected:M virtual catalog do_open (const string& __fun, const locale&__loc) const {1 return _RW::__rw_cat_open (__fun, __loc); }M virtual string_type do_get (catalog, int, int, const string_type&) const;2 virtual void do_cl ose (catalog __cat) const {  _RW::__rw_cat_close (__cat); }}; // 22.2.7.2template .class messages_byname: public messages<_CharT>{ char _C_namebuf [32];public:L _EXPLICIT messages_byname (const char *__name, _RWSTD_SIZE_T __refs = 0)$ : messages<_CharT>(__refs) {B this->_C_set_name (__name, _C_namebuf, sizeof _C_namebuf); }};} // namespace _V3_LOCALE%#if _RWSTD_DEFINE_TEMPLATE (MESSAGES)(# include -#endif // _RWSTD_DEFINE_TEMPLATE (MESSAGES)6// Library's messages instantiations for char, wchar_t _RWSTD_NAMESPACE (_V3_LOCALE) { :_RWSTD_INSTANTIATE_1 (class _RWSTD_EXPORT messages);#ifndef _RWSTD_NO_WCHAR_T=_RWSTD_INSTANTIATE_1 (class _RWSTD_EXPORT messages);#endif // _RWSTD_NO_WCHAR_T} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif*#endif // _RWSTD_LOC_MESSAGES_H_INCLUDEDww o7ԦL/*************************************************************************** *9 * _moneypunct.cc - definition of std::moneypunct members *7 * $Id: //stdlib/3.0-rel/include/loc/_moneypunct.cc#2 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and othe r laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer sof tware is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L *** ***********************************************************************/#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif _RWSTD_NAMESPACE (_V3_LOCALE) { #template 1_RW::__rw_facet_id moneypunct<_CharT, _Intl>::id;*#ifndef _RWSTD_NO_STATIC_CONST_MEMBER_INIT#template 9const bool moneypunct<_CharT, _Intl>::intl /* = _Intl */;.#endif // _RWSTD_NO_STATIC_CONST_MEMBER_INIT} // namespace _V3_LOCALEE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endifww o7ԦL/*************************************************************************** *D * _moneypunct.h - definition of the std::moneypunct class templates *E * This is an internal header file used to implement the C++ Standard? * Library. It should never be #included directly by a program. *6 * $Id: //stdlib/3.0-rel/include/loc/_moneypunct.h#4 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard D evelopment Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software , Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights a t 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/(#ifndef _RWSTD_LOC_MONEYPUNCT_H_INCLUDED(#define _RWSTD_LOC_MONEYPUNCT_H_INCLUDED#include "#include "#include #include #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pra gma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif _RWSTD_NAMESPACE (_V3_LOCALE) { // 22.2.6.3struct money_base{3 enum part { none, space, symbol, sign, value };' struct pattern { char field [4]; };}; // 22.2.6.3+template 5struct money punct: _RW::__rw_facet, public money_base{ typedef _CharT char_type; typedefJ basic_string, allocator > string_type;3 _EXPLICIT moneypunct (_RWSTD_SIZE_T __refs = 0)5 : _RW::__rw_facet (__refs), money_base () { }& char_type decimal_point () const {# return do_decimal_point (); }& char_type thousands_sep () const {# return do_thousands_sep (); } string grouping () const { return do_grouping (); }& string_type curr_symbol () const {! return do_curr_symbol (); }( string_type positive_sign () const {# return do_positive_sign (); }( string_type negative_sign () const {# return do_negative_sign (); } int frac_digits () const {! return do_frac_digits (); }! pattern pos_format () const { return do_pos_format (); }! pattern neg_format () const {  return do_neg_format (); }! static _RW::__rw_facet_id id;- _RWSTD_STATIC_CONST (bool, intl = _Intl); protected: // 22.2.6.3.1, p11 virtual char_type do_decimal_point () const {, return *_C_get (this, _RW::__rw_dp); } // 22.2.6.3.1, p21 virtual char_type do_thousands_sep () const {, return *_C_get (this, _RW::__rw_ts); } // 22.2.6.3.1, p3) virtual string do_grouping () const { returnO  _RWSTD_REINTERPRET_CAST (const char*, _C_get (this, _RW::__rw_gr)); } // 22.2.6.3.1, p41 virtual string_type do_curr_symbol () const {+ return _C_get (this, _RW::__rw_cs); } // 22.2.6.3.1, p53 virtual string_type do_positive_sign () const {+ return _C_get (this, _RW::__rw_ps); } // 22.2.6.3.1, p53 virtual string_type do_negative_sign () const {+ return _C_get (this, _RW::__rw_ns); } // 22.2.6.3.1, p6)  virtual int do_frac_digits () const {#pragma __message __save&#pragma __message __disable __undpreidG#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1953) \# && __INITIAL_POINTER_SIZE == 64R return _RWSTD_STATIC_CAST(int, _RWSTD_REINTERPRET_CAST (unsigned __int64, #elseO return _RWSTD_STATIC_CAST(int, _RWSTD_REINTERPRET_CAST (_RWSTD_SIZE_T, #endif#pragma __message __restore' _C_get (this, _RW::__rw_fd))); } // 22.2.6.3.1, p7 , virtual pattern do_pos_format () const {8 return *_RWSTD_REINTERPRET_CAST (const pattern*,F _C_get (this, _RW::__rw_pf)); } // 22.2.6.3.1, p5, virtual pattern do_neg_format () const {8 return *_RWSTD_REINTERPRET_CAST (const pattern*,F _C_get (this, _RW::__rw_nf)); }private:A static const char_type* _C_get (const _RW::__rw_facet*, int);};1template inline const _CharT*Imoneypunct<_CharT, _Intl>::_C_get (const _RW::__rw_facet *__pf, int __fl){ if (intl) __fl |= _RW::__rw_intl; __fl |= _RW::__rw_mon;0 return _RWSTD_STATIC_CAST (const char_type*,M _RW::__rw_get_punct(__pf, __fl, char_type()));} // 22.2.6.4+template class moneypunct_byname& : public moneypunct<_CharT, _Intl>{ char _C_namebuf [3 2];public:M _EXPLICIT moneypunct_byname (const char *__name, _RWSTD_SIZE_T __ref = 0), : moneypunct<_CharT, _Intl>(__ref) {F this->_C_set_name (__name, _C_namebuf, sizeof _C_namebuf); }};} // namespace _V3_LOCALEE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif'#if _RWSTD_DEFINE_TEMPLATE (MONEYPUNCT)*# include /#endif // _RWSTD_DEFINE_TEMP LATE (MONEYPUNCT)E#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1901)#elseE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif#endifJ// Library's moneypunct instantiations for (char, wchar_t) * (true, false) _RWSTD_NAMESPACE (_V3_LOCALE) { B_RWSTD_INSTANTIATE_2 (struct _RWSTD_EXPORT moneypunct);C_RWSTD_INSTANTIATE_2 (struct _RWSTD_EXPORT moneypunct);#ifndef _RWSTD_NO_WCHAR_TE_RWSTD_INSTANTIATE_2 (struct _RWSTD_EXPORT moneypunct);F_RWSTD_INSTANTIATE_2 (struct _RWSTD_EXPORT moneypunct);#endif // _RWSTD_NO_WCHAR_T} // namespace std#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif,#endif // _RWSTD_LOC_MONEYPUNCT_H_INCLUDEDww o7ԦL/*************************************************************************** *7 * _money_get.cc - definition of std::money_get members *6 * $Id: //stdlib/3.0-rel/include/loc/_money_get.cc#6 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other la ws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer softwar e is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L ******* *******************************************************************/#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endif#include "#include '#include #include E#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXT ERN_PREFIX#endif_RWSTD_NAMESPACE (__rw) {_RWSTD_EXPORT int+__rw_get_num (void*, const char*, int, int,F const char*, _RWSTD_SIZE_T, const char*, _RWSTD_SIZE_T);_RWSTD_EXPORT int0__rw_check_grouping (const char*, _RWSTD_SIZE_T,1 const char*, _RWSTD_SIZE_T);} // namespace __rw _RWSTD_NAMESPACE (_V3_LOCALE) { )template 5_RW::__rw_facet_id money_get<_CharT, _InputIter>::id;)template 2_TYPENAME money_get<_CharT, _InputIter>::iter_typemoney_get<_CharT, _InputIter>::H_C_get (iter_type __it, iter_type __end, bool __intl, ios_base &__flags,A _IOSTATE &__err, void *__pval, string_type *__pstr) const{. typedef moneypunct<_CharT, false> _Punct0;- typedef moneypunct<_CharT, true> _Punct1;$ const _Punct0 &__pun = __intl ? 2 _RWSTD_REINTERPRET_CAST (const _Punct0&,M _V3_USE_FACET (_Punct1,__fl ags.getloc ()))5 : _V3_USE_FACET (_Punct0, __flags.getloc ());< // retrieve positive and negative sign, currency symbol,1 // the grouping string and the pattern format4 const string_type __ps = __pun.positive_sign ();4 const string_type __ns = __pun.negative_sign ();2 const string_type __cs = __pun.curr_symbol ();/ const string __gr = __pun.grouping ();: const money_base::pattern __pat = __pun.neg_format (); _IOSTATE __ebits = 0;4 bool __nee dws = false; // whitespace required?; bool __seendp = false; // seen decimal point in input! const ctype<_CharT> &__ctp = 9 _V3_USE_FACET (ctype<_CharT>, __flags.getloc ()); char __buf [304]; char *__pcur = __buf;7 typedef _TYPENAME string_type::traits_type _Traits;H char __grpbuf [sizeof __buf]; // holds sizes of discovered groups5 char *__pgrp = __grpbuf; // current groupC const char *__grpstart = 0; // the start of the las t groupA const char *__grpend = 0; // the end of the last group= long __sign = 0; // the sign of the result if detectedL *__pcur++ = '+'; // start with a positive sign, overwrite if necessary& const int __fl = __flags.flags ();O for (_RWSTD_SIZE_T __i = 0; !__ebits && __i != sizeof __pat.field; ++__i) {$ switch (__pat.field [__i]) {* case /* '\1' */ money_base::space: __needws = true; // fall through...+ case /* '\0' */ money_base::none: {G // optional or even required whitespace is consumed only ifF // other characters may be required to complete the format0 if ( sizeof __pat.field == __i + 1D || 2 == __i && money_base::symbol == __pat.field [3]G && (!(__fl & _RWSTD_IOS_SHOWBASE) || 0 == __cs.size ())6 && !( __sign < 0 && __ns.size () > 17 || __sign > 0 && __ns.size () > 1)C  || 1 == __i && money_base::value == __pat.field [0]9 && 0 == __ns.size () && 0 == __ps.size ()H && (0 == __cs.size () || !(__fl & _RWSTD_IOS_SHOWBASE))) break;# _RWSTD_SIZE_T __nc = 0;J while (__it != __end && __ctp.is (ctype_base::space, *__it)) { ++__it; ++__nc; }" if (__needws && !__nc). __ebits |= _RWSTD_IOS_FAILBIT; br eak; }- case /* '\2' */ money_base::symbol: {C // if optional, currency symbol is not extracted unlessB // it is consumed only if it is followed by characters? // required to complete the pattern (see example in // 22.2.6.1.2, p3)- if ( __fl & _RWSTD_IOS_SHOWBASE || __i < 2D || 2 == __i && (money_base::none != __pat.field [3])1 || __sign < 0 && __ns.size () > 14 || __sign > 0 && __ps.size () > 1) {B for (_RWSTD_SIZE_T __nc = 0; __nc != __cs.size ();& ++__nc, ++__it) {M if (__it == __end || !_Traits::eq (*__it, __cs [__nc])) {B // 22.2.6.1.2, p2: unless showbase is set,B // curr_symbol is optional? if (__nc || __fl & _RWSTD_IOS_SHOWBASE): __ebits |= _RWSTD_IOS_FAILBIT; break; } } } break; }+ case /* '\3' */ money_base::sign: {( const char_type __c = *__it;A // 22.2.6.1.2, p3: if the first character of positiveD // and negative sign is the same, the result is positive> if (__ps.size () && _Traits::eq (__c, __ps [0])) { __sign = 1; ++__it; }C  else if (__ns.size () && _Traits::eq (__c, __ns [0])) { __sign = -1; ++__it; } break; }, case /* '\4' */ money_base::value: {" const char_type __ts =I __gr.size () && __gr [0] && __gr [0] != _RWSTD_CHAR_MAX ?; __pun.thousands_sep () : __ctp.widen ('0');, int __fd = __pun.frac_digits ();+ for (; __it != __end; ++__it) {F // r ead and narrow a character (note that narrow() mayD // yield the same narrow char for more than one wideD // character; e.g., there may be two sets of digits)- const char_type __c = *__it;@ const char __ch = __ctp.narrow (__c, '\0');1 if (__ch >= '0' && __ch <= '9') {0 if (!__seendp || __fd-- > 0)) *__pcur++ = __ch; }1 else if ( !__s eendp && __fd > 0H && _Traits::eq (__c, __pun.decimal_point ())) {& __grpend = __pcur;$ __seendp = true; }@ else if (!__seendp && _Traits::eq (__c, __ts)) {N // add the length of the current group to the array groupsO // store UCHAR_MAX if group length exceeds the size of char+ _RWSTD_PTRDIFF_T __len;# if (__grpstart)4 __len = __pcur - __grpstart; else {, __grpstart = __pcur;8 __len = __pcur - __buf - 1; }1 typedef unsigned char _UChar;I *__pgrp++ = char (__len < _UChar (-1) ? __len : -1);( __grpstart = __pcur; } else break; }% if (__pcur - __buf > 1 ) {? // append zeros to a non-empty string of digits2 // up to the number of frac_digits" while (__fd-- > 0)$ *__pcur++ = '0'; } *__pcur = '\0'; break; } default:) __ebits = _RWSTD_IOS_FAILBIT; break; } }* if (!(__ebits & _RWSTD_IOS_FAILBIT)) { if (__buf [1]) {= // process the remainder of a mult icharacter sign. const _RWSTD_SIZE_T __sizes [] = {3 __ps.size () ? __ps.size () -1 : 0,2 __ns.size () ? __ns.size () -1 : 0 };1 const char_type* const __names [] = {- __ps.data () + !!__sizes [0],, __ns.data () + !!__sizes [1] };9 if (__sign && (__sizes [0] || __sizes [1])) {C // if the first character of a multi-character signE // h as been seen, try to extract the rest of the sign( _RWSTD_SIZE_T __inx = 0;A _IOSTATE __errtmp = 1; // no duplicates allowedK __it = _RW::__rw_match_name (__it, __end, __names, __sizes,N sizeof __names / sizeof *__names,x __inx, __errtmp, 0); // MSVC 6 doesn't recognize final default parameter? if (__inx > sizeof __names / sizeof *__n ames) {1 __ebits = _RWSTD_IOS_FAILBIT;# *__buf = '\0'; }G else if (!_Traits::eq (*__ps.data (), *__ns.data ())) {C // if both signs begin with the same character,> // the result is positive (22.2.6.1.2, p3). *__buf = __inx ? '-' : '+';& __sign = 0 - __inx; } }" else if (__sign < 0) { *_ _buf = '-'; }< if (__pstr && !(__ebits & _RWSTD_IOS_FAILBIT)) {N // skip over the leading sign and any redundant zeros after it0 const char *__start = __buf + 1;I for (; '0' == *__start && '0' == __start [1]; ++__start);$ __sign = __sign < 0;L // widen narrow digits optionally preceded by the minus signM // into the basic_string object as required by 22.2.6.1.2, p1=  __pstr->resize ((__pcur - __start) + __sign); if (__sign)F _Traits::assign ((*__pstr)[0], __ctp.widen ('-'));B __ctp.widen (__start, __pcur, &(*__pstr)[__sign]); }% const char *__grs = "";$ _RWSTD_SIZE_T __grn = 0;@ // 22.2.6.1.2, p1: thousands separators are optionalF // add the length of the last group to the array of groupsG // store UCHAR_MAX if gr oup length exceeds the size of char if (__grpstart) {. const _RWSTD_PTRDIFF_T __len =@ (__grpend ? __grpend : __pcur) - __grpstart;- typedef unsigned char _UChar;D *__pgrp++ = char (__len < _UChar (-1) ? __len : -1);! *__pgrp = '\0';) __grs = __gr.data ();) __grn = __gr.size (); } if (__pval) {G // produce a n umber from the extracted string of digits2 // and (optionally) check groupingK __ebits |= _RW::__rw_get_num (__pval, __buf, _C_ldouble, 0,J __grpbuf, __pgrp - __grpbuf,< __grs, __grn); }O else if (0 > _RW::__rw_check_grouping (__grpbuf, __pgrp - __grpbuf,A __grs, __grn)). __ebits |= _RWSTD_IOS_FAILBIT; } else* __ebits |= _RWSTD_IOS_FAILBIT; } if (__it == __end)% __ebits |= _RWSTD_IOS_EOFBIT; __err |= __ebits; return __it;}} // namespace _V3_LOCALEE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endifww ưo7ԦL/*************************************************************************** *B * _money_get.h - definition of the std::money_get class templates *E * This is an internal header file used to implement the C++ Standard? * Library. It should never be #included directly by a program. *5 * $Id: //stdlib/3.0-rel/include/loc/_money_get.h#4 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Dev elopment Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other co pies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at  48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/'#ifndef _RWSTD_LOC_MONEY_GET_H_INCLUDED'#define _RWSTD_LOC_MONEY_GET_H_INCLUDED#include #include "#include #include #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma  __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) { struct _RWSTD_EXPORT ios_base;#define _IOSTATE int} // namespace std _RWSTD_NAMESPACE (_V3_LOCALE) { template ) >!st ruct money_get: _RW::__rw_facet{! typedef _CharT char_type;! typedef _InputIter iter_type; typedefJ basic_string, allocator > string_type;1 _EXPLICIT money_get (_RWSTD_SIZE_T __ref = 0)% : _RW::__rw_facet (__ref) { }C iter_type get (iter_type __begin, iter_type __end, bool __intl,6 ios_base& __flags, _IOSTATE& __err,. long double& __val) const {F return do_ get (__begin, __end, __intl, __flags, __err, __val); }C iter_type get (iter_type __begin, iter_type __end, bool __intl,6 ios_base& __flags, _IOSTATE& __err,. string_type &__str) const {F return do_get (__begin, __end, __intl, __flags, __err, __str); }! static _RW::__rw_facet_id id; protected:#ifndef _RWSTD_NO_LONG_DOUBLE virtual iter_typeI do_get (iter_type __it, iter_type __end, bool __intl, ios_base &__fl,8 _IOSTATE &__err, long double &__val) const {D return _C_get (__it, __end, __intl, __fl, __err, &__val, 0); }-#else // if defined (_RWSTD_NO_LONG_DOUBLE) virtual iter_typeI do_get (iter_type __it, iter_type __end, bool __intl, ios_base &__fl,3 _IOSTATE &__err, double &__val) const {D return _C_get (__it, __end, __intl, __fl, __err, &__val, 0); }!#endif // _RWSTD_NO_LONG_DOUBLE virtual iter_typeI do_get (iter_type  __it, iter_type __end, bool __intl, ios_base &__fl,8 _IOSTATE &__err, string_type &__str) const {D return _C_get (__it, __end, __intl, __fl, __err, 0, &__str); }private:G iter_type _C_get (iter_type, iter_type, bool, ios_base&, _IOSTATE&,1 void*, string_type*) const;};} // namespace _V3_LOCALEE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif&#if _RWSTD_DEFIN E_TEMPLATE (MONEY_GET))# include .#endif // _RWSTD_DEFINE_TEMPLATE (MONEY_GET)E#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif7// Library's money_get instantiations for char, wchar_t _RWSTD_NAMESPACE (_V3_LOCALE) { <_RWSTD_INSTANTIATE_1 (struct _RWSTD_EXPORT money_get);#ifndef _RWSTD_NO_WCHAR_T?_RWSTD_INSTANTIATE_1 (struct _RWSTD_EXPORT money_get);#endif // _RWSTD_NO_WCHAR_T} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif+#endif // _RWSTD_LOC_MONEY_GET_H_INCLUDEDww :o7ԦL/*************************************************************************** *5 * _money_put.cc - definition of std::num_put members *6 * $Id: //stdlib/3.0-rel/include/loc/_money_put.cc#3 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12 .211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L ********* *****************************************************************/#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endif#include '#include "#include E#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMES PACE (__rw) {_RWSTD_EXPORT _RWSTD_SIZE_T8__rw_put_num (char**, _RWSTD_SIZE_T, unsigned, int, int,( const void*, const char*);_RWSTD_EXPORT _RWSTD_SIZE_T7__rw_put_groups (char **, _RWSTD_SIZE_T, _RWSTD_SIZE_T,+ const char*, const char*);} // namespace __rw _RWSTD_NAMESPACE (_V3_LOCALE) { *template 6_RW::__rw_facet_id money_put<_CharT, _OutputIter>::id;*template A/* pri vate */ _TYPENAME money_put<_CharT, _OutputIter>::iter_type money_put<_CharT, _OutputIter>::H_C_put (iter_type __it, int __opts, ios_base &__flags, char_type __fill,: const char_type *__s, _RWSTD_SIZE_T __n, int __fd,< const char *__groups, _RWSTD_SIZE_T __ngroups) const{I // static const arrays of pointers to moneypunct membersE // to avoid "if (intl)" conditionals when retrieving punct values- const bool __intl = !!(__opts & _C_intl);- const bo ol __num = !!(__opts & _C_ldbl);. typedef moneypunct<_CharT, false> _Punct0;- typedef moneypunct<_CharT, true> _Punct1;$ const _Punct0 &__pun = __intl ? 0 _RWSTD_REINTERPRET_CAST (const _Punct0&,5 _V3_USE_FACET(_Punct1,__flags.getloc ()))1 : _V3_USE_FACET(_Punct0,__flags.getloc ()); const ctype<_CharT> &__ctp =7 _V3_USE_FACET(ctype<_CharT>,__flags.getloc ());@ money_base::pattern __fmat; // negative or positive format> string_t ype __sign; // negative or positive sign+ if ('-' == __ctp.narrow (*__s, '\0')) {% __fmat = __pun.neg_format ();( __sign = __pun.negative_sign (); ++__s; --__n; } else {% __fmat = __pun.pos_format ();( __sign = __pun.positive_sign ();/ if ('+' == __ctp.narrow (*__s, '\0')) { ++__s; --__n; } } // optional currency sumbolI const string_type __curr = (__flags.flag s () & _RWSTD_IOS_SHOWBASE) ?. __pun.curr_symbol () : string_type ();E // size of fractional and integral parts, respectively, to output int __dint = __n - __fd;H // must have at least one group (even if there are no thousands_sep)" _RWSTD_ASSERT (__ngroups > 0);C // adjust padding by the sizes of each component, including the4 // number of thousands separators to be insertedD int __pad = __flags.width () - __curr.size () - __sign.size ()K  - !__dint - !!__fd - (__dint > 0 ? __dint : -__dint) - __fd; - ( money_base::space == __fmat.field [1]< || money_base::space == __fmat.field [2])" - (__ngroups - 1);@ const int __adj = __flags.flags () & _RWSTD_IOS_ADJUSTFIELD;C if (__adj != _RWSTD_IOS_INTERNAL && __adj != _RWSTD_IOS_LEFT) {* for (; __pad > 0; --__pad, ++__it) *__it = __fill; }C for (_RWSTD_SIZE_T __i = 0, __j; __i != sizeof __fma t; ++__i) {% switch (__fmat.field [__i]) {E case money_base::symbol: // exactly one occurrence required? for (__j = 0; __j != __curr.size (); ++__j, ++__it)% *__it = __curr [__j]; break;C case money_base::sign: // exactly one occurrence required! if (__sign.size ()) {/ // first character of sign only# *__it = __sign [0]; ++__it; } break;L case money_base::space: // optional (required if none not present)9 // 22.2.6.3, p1: the value space, if present,7 // is neither first nor last.B _RWSTD_REQUIRES (0 != __i && sizeof __fmat != __i - 1,9 (_RWSTD_ERROR_RUNTIME_ERROR,I _RWSTD_FUNC ("std::num_put<>::do_put()")));> // an ordinary space, not `fill', is required here0 // will precede any required padding& *__it = __ctp.widen (' '); ++__it;L case money_base::none: // optional (required if space not present)E // 22.2.6.3, p1: the value none, if present, is not first& _RWSTD_REQUIRES (0 != __i,9 (_RWSTD_ERROR_RUNTIME_ERROR,I _RWSTD_FUNC ("std::num_put<>::do_put()")));J if ( (__adj & _RWSTD_IOS_ADJUSTFIELD) == _RWSTD_IOS_INTERNAL,  && sizeof __fmat != __i - 1)2 for (; __pad > 0; --__pad, ++__it)# *__it = __fill; break;F case money_base::value: { // exactly one occurrence required8 if (__dint < 0 || 0 == __dint && __fd > 0) {; const char_type __zero = __ctp.widen ('0');8 // insert leading zero and decimal point *__it = __zero; ++__it;/ *__it = __pun.decimal_point  (); ++__it;2 // insert leading fractional zeros( for (; __dint++; ++__it)# *__it = __zero;? // prevent insertion of the decimal point below __dint = -1; }' _RWSTD_SIZE_T __grplen = 0;O for (const char_type *__e = __s + __n; __s != __e; ++__it, ++__s) {B if (!__num && !__ctp.is (ctype_base::digit, *__s)) break; - typedef unsigned char _UChar;! if (0 < __dint) {2 _RWSTD_ASSERT (0 != __groups);F if (*__groups && __grplen == _UChar (*__groups)) {: *__it = __pun.thousands_sep ();% __grplen = 0;# ++__groups; ++__it; } }' else if (0 == __dint) {3 *__it = __pu n.decimal_point (); ++__it; } --__dint; ++__grplen; switch (*__s) {F // replace either the period or the comma with theG // decimal point in case a setlocale() call made byA // the program changed the default '.' to ',' case '.':@ case ',': *__it = __pun.decimal_point (); break;@ case ';': *__i t = __pun.thousands_sep (); break;' default: *__it = *__s; } } break; } } }7 // output the remaining characters of sign (if any)D for (_RWSTD_SIZE_T __k = 1; __k < __sign.size (); ++__k, ++__it) *__it = __sign [__k]; // left ajustment& for (; __pad > 0; --__pad, ++__it) *__it = __fill;$ // 22.2.6.2.2, p1: reset width() __flags.width (0); return __it; }*template A/* virtual */ _TYPENAME money_put<_CharT, _OutputIter>::iter_type money_put<_CharT, _OutputIter>::Hdo_put (iter_type __i, bool __intl, ios_base &__flags, char_type __fill, long double __val) const{. typedef moneypunct<_CharT, false> _Punct0;. typedef moneypunct<_CharT, true> _Punct1;$ const _Punct0 &__pun = __intl ? 0 _RWSTD_REINTERPRET_CAST (const _Punct0&,5 _V3_USE_FACET(_Punct1,__flags.getloc ())) 1 : _V3_USE_FACET(_Punct0,__flags.getloc ()); char __buf [304];$ char_type __wbuf [sizeof __buf]; char *__pbuf = __buf;K // format a floating point number in fixed precision into narrow bufferI // will insert thousands_sep placeholders (';') accroding to grouping const _RWSTD_SIZE_T __n =C _RW::__rw_put_num (&__pbuf, sizeof __buf, _RWSTD_IOS_FIXED,F _C_ldouble | _C_ptr, -__pun.frac_digits (),?  &__val, __pun.grouping ().c_str ());@ // widen narrow buffer (necessary even if char_type == char) const ctype<_CharT> &__ctp =7 _V3_USE_FACET(ctype<_CharT>,__flags.getloc ());- __ctp.widen (__buf, __buf + __n, __wbuf);9 // write the widened buffer out, replacing any commas4 // with the actual thousands_sep punct character9 return _C_put (__i, (__intl ? _C_intl : 0) | _C_ldbl,; __flags, __fill, __wbuf, __n, 0, "", 1);}*templa te A/* virtual */ _TYPENAME money_put<_CharT, _OutputIter>::iter_type money_put<_CharT, _OutputIter>::Hdo_put (iter_type __i, bool __intl, ios_base &__flags, char_type __fill,' const string_type &__str) const{. typedef moneypunct<_CharT, false> _Punct0;. typedef moneypunct<_CharT, true> _Punct1;$ const _Punct0 &__pun = __intl ? 0 _RWSTD_REINTERPRET_CAST (const _Punct0&,5 _V3_USE_FACET(_Punct1,__flags.getloc ()))3  : _V3_USE_FACET(_Punct0,__flags.getloc ());; // fractional part does not undergo grouping, remove it* const int __fd = __pun.frac_digits ();0 const string __grouping = __pun.grouping ();D static char __dummy = '\0'; // `groups' must be non-0C char *__groups = &__dummy; // string of group sizesG _RWSTD_SIZE_T __ngroups = 1; // always at least one group if (__grouping.size ()) { char __buf [304]; __groups = __buf;$ const ctype<_CharT> &__ctp =; _V3_USE_FACET(ctype<_CharT>,__flags.getloc ());> typedef string::traits_type _Traits;B typedef _TYPENAME string_type::const_iterator _StringIter;F // narrow digits into a temporary buffer to determine groupingO for (_StringIter __it = __str.begin (); __it != __str.end (); ++__it) {4 if (__ctp.is (ctype_base::digit, *__it))J _Traits::assign (*__groups++, __ ctp.narrow (*__it, '\0'));. else if ( __str.begin () != __it: || '-' != __ctp.narrow (*__it, '\0')) break; }3 if (__fd >= 0 && __fd < __groups - __buf) { __groups -= __fd;N // compute the size of each group relative to the formatted numberK // e.g., with `str' of "9876543210" and `grouping' of "\1\2\3",F // `groups' will point at "\1\3\3\2\1" since `str' will beJ // formatted as "9,876,543,21,0" with thousands_sep's inserted! char *__pbuf = __buf; *__pbuf = '\0'; __ngroups =O _RW::__rw_put_groups (&__pbuf, __groups - __pbuf, sizeof __buf,E 0, __pun.grouping ().c_str ());& __pbuf [__ngroups] = '\0';( __groups = __pbuf; } else __groups = &__dummy; }- return _C_put (__i, __intl ? _C_intl : 0,B __flags, __fill, __str.c_str (), __str.size (),. __fd, __groups, __ngroups);}} // namespace _V3_LOCALEE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endifww %fo7ԦL/*************************************************************************** *@ * _money_put.h - definition of the std::num_put class templates *E * This is an internal header file used to implement the C++ Standard? * Library. It should never be #included directly by a program. *5 * $Id: //stdlib/3.0-rel/include/loc/_money_put.h#4 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Devel opment Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, In c. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copi es thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/'#ifndef _RWSTD_LOC_MONEY_PUT_H_INCLUDED'#define _RWSTD_LOC_MONEY_PUT_H_INCLUDED#include #include "#include #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragm a __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) { struct _RWSTD_EXPORT ios_base;} // namespace std _RWSTD_NAMESPACE (_V3_LOCALE) { // 22.2.6.2template ) >!struct money_put: _RW::__rw_facet{" ty pedef _CharT char_type;" typedef _OutputIter iter_type; typedefJ basic_string, allocator > string_type;1 _EXPLICIT money_put (_RWSTD_SIZE_T __ref = 0)% : _RW::__rw_facet (__ref) { } // 22.2.6.2.1, p1B iter_type put (iter_type __it, bool __intl, ios_base &__flags,? char_type __fill, long double __val) const {= return do_put (__it, __intl, __flags, __fill, __val); }B iter_type put (iter_type __it, bool __intl, ios_base &__flags,F char_type __fill, const string_type &__val) const {= return do_put (__it, __intl, __flags, __fill, __val); }! static _RW::__rw_facet_id id; protected: // 22.2.6.2.2, p1 virtual iter_typeF do_put (iter_type, bool, ios_base&, char_type, long double) const; virtual iter_typeM do_put (iter_type, bool, ios_base&, char_type, const string_type&) const;private:* enum { _C_intl = 0x1, _C_ldbl = 0x2 };; iter_type _C_put (iter_type, int, ios_base&, char_type,; const char_type*, _RWSTD_SIZE_T, int,8 const char*, _RWSTD_SIZE_T) const;};} // namespace _V3_LOCALEE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif&#if _RWSTD_DEFINE_TEMPLATE (MONEY_PUT))# include .#endif // _RWSTD_DEFINE_TEMPLATE (MONEY_PUT)E#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif7// Library's money_put instantiations for char, wchar_t _RWSTD_NAMESPACE (_V3_LOCALE) { <_RWSTD_INSTANTIATE_1 (struct _RWSTD_EXPORT money_put);#ifndef _RWSTD_NO_WCHAR_T?_RWSTD_INSTANTIATE_1 (struct _RWSTD_EXPORT money_put);#endif // _RWSTD_NO_WCHAR_T} // namespace stdE#if defined(__VMS) && defi ned(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif+#endif // _RWSTD_LOC_MONEY_PUT_H_INCLUDEDww o7ԦL/*************************************************************************** *7 * _numpunct.cc - definition of std::moneypunct members *5 * $Id: //stdlib/3.0-rel/include/loc/_numpunct.cc#2 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other la ws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer softwar e is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L ******* *******************************************************************/#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (_V3_LOCALE) {template (_RW::__rw_facet_id numpunct<_CharT>::id;} // namespace _V3_LOCALEE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endifww o7ԦL/*************************************************************************** *@ * _numpunct.h - definition of the std::numpunct class templates *E * This is an internal header file used to implement the C++ Standard? * Library. It should never be #included directly by a program. *4 * $Id: //stdlib/3.0-rel/include/loc/_numpunct.h#4 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Develop ment Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 C FR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/&#ifndef _RWSTD_LOC_NUMPUNCT_H_INCLUDED&#define _RWSTD_LOC_NUMPUNCT_H_INCLUDED#include "#include "#include #include #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __envi ronment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif _RWSTD_NAMESPACE (_V3_LOCALE) { // 22.2.3.1template struct numpunct: _RW::__rw_facet{ typedef _CharT char_type; typedefJ basic_string, allocator > string_type;0  _EXPLICIT numpunct (_RWSTD_SIZE_T __ref = 0)3 : _RW::__rw_facet (__ref), _C_flags (0) { } // 22.2.3.1.1, p1% char_type decimal_point () const; // 22.2.3.1.1, p2% char_type thousands_sep () const; // 22.2.3.1.1, p3 string grouping () const; // 22.2.3.1.1, p4" string_type truename () const; // 22.2.3.1.1, p4# string_type falsename () const;! static _RW::__rw_facet_id id; protected: // 22.2.3.1.2, p11 virtual  char_type do_decimal_point () const {E return *_RW::__rw_get_punct(this, _RW::__rw_dp, char_type()); } // 22.2.3.1.2, p21 virtual char_type do_thousands_sep () const {E return *_RW::__rw_get_punct(this, _RW::__rw_ts, char_type()); } // 22.2.3.1.2, p3) virtual string do_grouping () const {4 return _RWSTD_REINTERPRET_CAST (const char*,I _RW::__rw_get_punct(this, _RW::__rw_gr, char_type())); } // 22.2.3.1.2, p4. virtual string_type do_truename () const {D return _RW::__rw_get_punct(this, _RW::__rw_tn, char_type()); } // 22.2.3.1.2, p4/ virtual string_type do_falsename () const {D return _RW::__rw_get_punct(this, _RW::__rw_fn, char_type()); }private:J int _C_flags; // bitmap of "cached data valid" flagsH string _C_grouping; // cached results of virtual members string_type _C_truename; string_type _C_falsena me;! char_type _C_decimal_point;! char_type _C_thousands_sep;};template ,inline _TYPENAME numpunct<_CharT>::char_type(numpunct<_CharT>::decimal_point () const{ if (_C_flags & _RW::__rw_dp) return _C_decimal_point;A numpunct* const __self = _RWSTD_CONST_CAST (numpunct*, this);7 // [try to] get the decimal point first (may throw)6 // then set a flag to avoid future initializations4 __self->_C_decimal_point = do_decimal_point ();- __self->_C_flags |= _RW::__rw_dp;$ return __self->_C_decimal_point;}template ,inline _TYPENAME numpunct<_CharT>::char_type(numpunct<_CharT>::thousands_sep () const{ if (_C_flags & _RW::__rw_ts) return _C_thousands_sep;A numpunct* const __self = _RWSTD_CONST_CAST (numpunct*, this);4 __self->_C_thousands_sep = do_thousands_sep ();- __self->_C_flags |= _RW::__rw_ts;$ return __self->_C_thousands_sep;} template 1inline string numpunct<_CharT>::grouping () const{ if (_C_flags & _RW::__rw_gr) return _C_grouping;A numpunct* const __self = _RWSTD_CONST_CAST (numpunct*, this);* __self->_C_grouping = do_grouping ();( __self->_C_flags |= _RW::__rw_gr; return __self->_C_grouping;}template .inline _TYPENAME numpunct<_CharT>::string_type#numpunct<_CharT>::truename () const{ if (_C_flags & _RW::__rw_tn)  return _C_truename;A numpunct* const __self = _RWSTD_CONST_CAST (numpunct*, this);* __self->_C_truename = do_truename ();( __self->_C_flags |= _RW::__rw_tn; return __self->_C_truename;}template .inline _TYPENAME numpunct<_CharT>::string_type$numpunct<_CharT>::falsename () const{ if (_C_flags & _RW::__rw_fn) return _C_falsename;A numpunct* const __self = _RWSTD_CONST_CAST (numpunct*, this);, __self->_C_falsename =  do_falsename ();) __self->_C_flags |= _RW::__rw_fn; return __self->_C_falsename;} // 22.2.3.2template class numpunct_byname : public numpunct<_CharT>{ char _C_namebuf [32];public:E _EXPLICIT numpunct_byname (const char *__name, size_t __refs = 0)$ : numpunct<_CharT>(__refs) {B this->_C_set_name (__name, _C_namebuf, sizeof _C_namebuf); }};} // namespace _V3_LOCALEE#if defined(__VMS) && defined(__DE CCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif%#if _RWSTD_DEFINE_TEMPLATE (NUMPUNCT)(# include -#endif // _RWSTD_DEFINE_TEMPLATE (NUMPUNCT)E#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif6// Library's numpunct instantiations for char, wchar_t _RWSTD_NAMESPACE (_V3_LOCALE) { ;_RWSTD_INSTANTIATE_1 (struct _RWSTD_EXPORT numpunct);#ifndef _RWSTD_NO_WCHAR_T>_RWSTD_INSTANTIATE_1 (struct _RWSTD_EXPORT numpunct);#endif // _RWSTD_NO_WCHAR_T} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif*#endif // _RWSTD_LOC_NUMPUNCT_H_INCLUDEDww Gp7ԦL/*************************************************************************** *3 * _num_get.cc - definition of std::num_get members *4 * $Id: //stdlib/3.0-rel/include/loc/_num_get.cc#6 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211  and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and  by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is p  rovidedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L ************* *************************************************************/#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endif#include "#include ##include %#include E#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREF IX#endif_RWSTD_NAMESPACE (__rw) { _RWSTD_EXPORT int, __rw_get_num (void*, const char*, int, int,G const char*, _RWSTD_SIZE_T, const char*, _RWSTD_SIZE_T);} // namespace __rw _RWSTD_NAMESPACE (_V3_LOCALE) { )template 3_RW::__rw_facet_id num_get<_CharT, _InputIter>::id;#ifndef _RWSTD_NO_EXT_NUM_GET)template 0_TYPENAME num_get<_CharT, _InputIter>::iter_typenum_get<_CharT, _Input Iter>::<get (iter_type __begin, iter_type __end, ios_base &__flags, * _IOSTATE &__err, short &__val) const{) _RWSTD_ASSERT_RANGE (__begin, __end);8 // preserve original value in case it's non-zero and8 // do_get() fails for reason other than bad grouping long __tmp = __val;= __begin = do_get (__begin, __end, __flags, __err, __tmp); long __shrt_min; long __shrt_max; if ( __tmp < 0I || (__flags.flags () & _RWSTD_IOS_BASEFIELD) == _RWSTD _IOS_DEC) {< // decimal parsing overflows outside the range below, __shrt_max = long (_RWSTD_SHRT_MAX);, __shrt_min = long (_RWSTD_SHRT_MIN); } else {G // other than decimal parsing overflows outside the range belowE // (unreliable if basefield is 0 and the sequence is decimal)- __shrt_max = long (_RWSTD_USHRT_MAX);- __shrt_min = long (_RWSTD_USHRT_MIN); }' // lwg issue 23: check for overflow if (__tmp < __shrt_m in) {$ __err |= _RWSTD_IOS_FAILBIT;! __val = _RWSTD_SHRT_MIN; }" else if (__tmp > __shrt_max) {$ __err |= _RWSTD_IOS_FAILBIT;! __val = _RWSTD_SHRT_MAX; } else2 __val = _RWSTD_STATIC_CAST (short, __tmp); return __begin;})template 0_TYPENAME num_get<_CharT, _InputIter>::iter_typenum_get<_CharT, _InputIter>::<get (iter_type __begin, iter_type __end, ios_base &__flags, ' _IOSTATE &_ _err, int &__val) const{) _RWSTD_ASSERT_RANGE (__begin, __end);8 // preserve original value in case it's non-zero and8 // do_get() fails for reason other than bad grouping long __tmp = long (__val);= __begin = do_get (__begin, __end, __flags, __err, __tmp);$#if _RWSTD_INT_MAX < _RWSTD_LONG_MAX long __int_min; long __int_max; if ( __tmp < 0I || (__flags.flags () & _RWSTD_IOS_BASEFIELD) == _RWSTD_IOS_DEC) {< // decimal parsing ove rflows outside the range below* __int_max = long (_RWSTD_INT_MAX);* __int_min = long (_RWSTD_INT_MIN); } else {G // other than decimal parsing overflows outside the range belowE // (unreliable if basefield is 0 and the sequence is decimal)+ __int_max = long (_RWSTD_UINT_MAX);+ __int_min = long (_RWSTD_UINT_MIN); }' // lwg issue 23: check for overflow if (__tmp < __int_min) {$ __err |= _RWSTD_IOS_FAILBIT;  __val = _RWSTD_INT_MIN; }! else if (__tmp > __int_max) {$ __err |= _RWSTD_IOS_FAILBIT; __val = _RWSTD_INT_MAX; } else,#endif // _RWSTD_INT_MAX < _RWSTD_LONG_MAX0 __val = _RWSTD_STATIC_CAST (int, __tmp); return __begin;}!#endif // _RWSTD_NO_EXT_NUM_GETMtemplate */>0_TYPENAME num_get<_CharT, _InputIter>::iter_typenum_get<_CharT, _InputIter>::+_C_get (iter_t ype __begin, iter_type __end,K ios_base &__flags, _IOSTATE &__err, int __type, void *__pval) const{#ifdef _V3_LOCALE __err = _RWSTD_IOS_GOODBIT;& const int __fl = __flags.flags ();, const locale &__loc = __flags.getloc ();' const numpunct &__pun = 3 _V3_USE_FACET (numpunct, __loc);; if (_C_bool == __type && __fl & _RWSTD_IOS_BOOLALPHA) { // lwg issue 174 typedef basic_string string_type;4 const string_type __tnm = __pun.truename ();5 const string_type __fnm = __pun.falsename ();, const char_type* const __names[] = {* __fnm.c_str (), __tnm.c_str () };) const _RWSTD_SIZE_T __sizes[] = {( __fnm.size (), __tnm.size () }; _RWSTD_SIZE_T __inx = 0;H _IOSTATE __errtmp = 1; // maximum number of allowed duplicatesI __begin = _RW::__rw_match_name (__begin, __end, __names, __sizes,I  sizeof __names / sizeof *__names,< __inx, __errtmp, 0);) if ((_RWSTD_SIZE_T)(-1) == __inx)( __err |= _RWSTD_IOS_FAILBIT; else: *_RWSTD_STATIC_CAST (bool*, __pval) = !!__inx; __err |= __errtmp; return __begin; } // 22.2.2.1.2, p8: Stage 2N char __buf [128 + 2]; // default buffer (128 bits + 2)L char *__pbuf  = __buf; // pointer to allocated bufferJ char *__pcur = __buf; // currently processed digitI _RWSTD_SIZE_T __bufsize = sizeof __buf; // size of allocated buffer _RWSTD_UNUSED (__bufsize);= const char_type __decimal_point = __pun.decimal_point ();= const char_type __thousands_sep = __pun.thousands_sep ();8 const string __grouping = __pun.grouping (); char __grpbuf [32];< char *__pgrpbuf = __grouping.size () > sizeof __ grpbuf ?1 new char [__grouping.size ()] : __grpbuf; char *__pgrp = __pgrpbuf;@ const char *__grpstart = 0; // the start of the last group> const char *__grpend = 0; // the end of the last group7 int __base = unsigned (__fl) >> _RWSTD_IOS_BASEOFF;; if ( (10 == __base && !(__fl & _RWSTD_IOS_BASEFIELD))/ || _RW::__rw_facet::_C_pvoid == __type) __base = 16;L const ctype &__ctp = _V3_USE_FACET (ctype, __loc);@ int __subtype = __type; // type of the number being parsed3 int __dp_seen = 0; // decimal point seen for ( ; ; ++__begin) { if (__begin == __end) { // 22.2.2.1, p13' __err |= _RWSTD_IOS_EOFBIT; break; }1 if (__pcur == __buf + sizeof __buf - 1) {3 // FIXME: handle long strings of digits( __err |= _RWSTD_IOS_FAILBIT; break; }( const char_type __ch = * __begin;" int __dp = -1;& if ( __subtype & _C_floatingB && char_traits::eq (__ch, __decimal_point)) __dp = '.';A if ( char_traits::eq (__ch, __thousands_sep)$ && __grouping.size ()) {# if (__pcur == __pbuf) {F // 22.2.3.1, p2: thousands_sep not allowed to be firstD // non-fatal error, set failbit but continue parsing, __err |= _RWSTD_IO S_FAILBIT; } if (__dp_seen) break;F // add the length of the current group to the array groupsG // store UCHAR_MAX if group length exceeds the size of char# _RWSTD_PTRDIFF_T __len; if (__grpstart), __len = __pcur - __grpstart; else {$ __grpstart = __pcur;- __len = __pcur - __pbuf;5 if ('-' == *__pbuf || '+' == *__pbuf ) --__len;* else if ( '0' == *__pbufE && ('x' == __pbuf [1] || 'X' == __pbuf [1])) __len -= 2; }) typedef unsigned char _UChar;A *__pgrp++ = char (__len < _UChar (-1) ? __len : -1); __grpstart = __pcur; } else if (-1 == __dp) {I // 22.2.2.1.2, p8: Stage 8 calls for widening of the sequenceH // of narrow digits (" 0123456789abcdefABCDEF+-") and lookingD // up the current wide character in the widened sequenceI // such an algorithm will fail to correctly interpret stringsI // of digits in locales in which more than one wide character+ // can represent a single digitG // the more reliable algorithm below narrows each characterC // first and looks it up in the narrow sequence instead7 const char __c = __ctp.narrow (__ch, '\0')  ;* if (__subtype & _C_floating) {C if (__pcur == __pbuf && ('-' == __c || '+' == __c))$ *__pcur++ = __c;2 else if (__c >= '0' && __c <= '9')$ *__pcur++ = __c;H else if (__pcur != __pbuf && ('e' == __c || 'E' == __c))$ *__pcur++ = 'e';6 else if ( ('-' == __c || '+' == __c)D && __pcur > __pbuf && 'e' == __pcur [-1]) {$  *__pcur++ = __c;K // reached the exponent part of a floating point number: // switch to parsing a decimal integer# __base = 10;' __subtype = _C_int; } elseB break; // invalid character terminates input } else {C if (__pcur == __pbuf && ('-' == __c || '+' == __c))$ *__pcur++ = __c;(  else if (16 == __base) {3 if ( __c >= '0' && __c <= '9'3 || __c >= 'a' && __c <= 'f'3 || __c >= 'A' && __c <= 'F'5 || ('x' == __c || 'X' == __c)3 && ( __pcur == __pbuf + 13 || __pcur == __pbuf + 2C && ('-' == *__pbuf || '+' == *__pbuf)))( *__pcur++ = __c; elseF  break; // invalid character terminates input }' else if (__base > 10) {3 if ( __c >= '0' && __c <= '9'A || __c >= 'a' && __c <= 'a' + __base - 10B || __c >= 'A' && __c <= 'A' + __base - 10)( *__pcur++ = __c; elseF break; // invalid character terminates input }& else if (__base >  1) {9 if (__c >= '0' && __c < '0' + __base)( *__pcur++ = __c; elseF break; // invalid character terminates input } else {" switch (__c) {O case 'i': case 'I': case 'v': case 'V': case 'x': case 'X':O case 'l': case 'L': case 'c': case 'C': case 'd': case 'D':' case 'm': case 'M':(  *__pcur++ = __c; break; default:K if (__pcur == __pbuf && __c >= '0' && __c <= '9') {, *__pcur++ = __c;+ __base = 10; } else {A // invalid character terminates input, goto __loop_end; } }  } } }; else if (__subtype & _C_floating && !__dp_seen++) { __grpend = __pcur;$ *__pcur++ = char (__dp); } else break; } __loop_end:> // add the length of the last group to the array of groups {B // add the length of the current group to the array groupsC // store UCHAR_MAX if group length exceeds the size of char _RWSTD_PTRDIFF_T __len; if (!__grpend)  __grpend = __pcur; if (__grpstart)* __len = __grpend - __grpstart; else {" __grpstart = __grpend;+ __len = __grpend - __pbuf;1 if ('-' == *__pbuf || '+' == *__pbuf) --__len;& else if ( '0' == *__pbufA && ('x' == __pbuf [1] || 'X' == __pbuf [1])) __len -= 2; }% typedef unsigned char _UChar;< *__pgrp++ = char (__ len < _UChar (-1) ? __len : -1); } *__pgrp = '\0'; *__pcur = '\0'; // 22.2.2.1.2, p11: Stage 3= __err |= _RW::__rw_get_num (__pval, __pbuf, __type, __fl,> __pgrpbuf, __pgrp - __pgrpbuf,H __grouping.data (), __grouping.size ());#else _RWSTD_UNUSED (__end); _RWSTD_UNUSED (__flags); _RWSTD_UNUSED (__err); _RWSTD_UNUSED (__type); _RWSTD_UNUSED (__pval);#endif // _V3_LOCALE return __begin;}} // namespace _V3_LOCALEE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endifww #5s7Ԧ// -*- C++ -*-L/*************************************************************************** *N * vector_spec.h - vector <_TypeT*> partial specialization using vector *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * ! ip7ԦL/*************************************************************************** *= * _num_get.h - definition of the std::num_get class template *E * This is an internal header file used to implement the C++ Standard? * Library. It should never be #included directly by a program. *3 * $Id: //stdlib/3.0-rel/include/loc/_num_get.h#6 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Developme " nt Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. # All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies t $ hereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR% 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/%#ifndef _RWSTD_LOC_NUM_GET_H_INCLUDED%#define _RWSTD_LOC_NUM_GET_H_INCLUDED"#include #include #include #include #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pra& gma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) { struct _RWSTD_EXPORT ios_base;#define _FMTFLAGS int#define _IOSTATE int} // namespace std_RWSTD_NAMESPACE (__rw) { } // namespace __rw _RWSTD_NAMESPACE (_V3_LOCALE) { // 22.2.2.1te' mplate ) >struct num_get: _RW::__rw_facet{! typedef _CharT char_type;! typedef _InputIter iter_type;! static _RW::__rw_facet_id id;0 _EXPLICIT num_get (_RWSTD_SIZE_T __refs = 0)& : _RW::__rw_facet (__refs) { }#ifndef _RWSTD_NO_NATIVE_BOOLJ iter_type get (iter_type __begin, iter_type __end, ios_base &__flags, 8 _IOSTATE &__err, bool& __val) con( st {- _RWSTD_ASSERT_RANGE (__begin, __end);> return do_get (__begin, __end, __flags, __err, __val); }!#endif // _RWSTD_NO_NATIVE_BOOLJ iter_type get (iter_type __begin, iter_type __end, ios_base &__flags, C _IOSTATE &__err, unsigned short& __val) const {- _RWSTD_ASSERT_RANGE (__begin, __end);> return do_get (__begin, __end, __flags, __err, __val); }#ifndef _RWSTD_NO_EXT_NUM_GET // extensionN iter_type get (i) ter_type, iter_type, ios_base&, _IOSTATE&, short&) const; // extensionK iter_type get (iter_type, iter_type, ios_base&, _IOSTATE&, int&) const;!#endif // _RWSTD_NO_EXT_NUM_GETJ iter_type get (iter_type __begin, iter_type __end, ios_base &__flags, @ _IOSTATE &__err, unsigned int& __val) const {- _RWSTD_ASSERT_RANGE (__begin, __end);> return do_get (__begin, __end, __flags, __err, __val); }J iter_type get (iter_type __begin, iter_t * ype __end, ios_base &__flags, 8 _IOSTATE &__err, long& __val) const {- _RWSTD_ASSERT_RANGE (__begin, __end);> return do_get (__begin, __end, __flags, __err, __val); }J iter_type get (iter_type __begin, iter_type __end, ios_base &__flags, A _IOSTATE &__err, unsigned long& __val) const {- _RWSTD_ASSERT_RANGE (__begin, __end);> return do_get (__begin, __end, __flags, __err, __val); }J iter_type get (iter_type + __begin, iter_type __end, ios_base &__flags, 9 _IOSTATE &__err, float& __val) const {- _RWSTD_ASSERT_RANGE (__begin, __end);> return do_get (__begin, __end, __flags, __err, __val); }J iter_type get (iter_type __begin, iter_type __end, ios_base &__flags, : _IOSTATE &__err, double& __val) const {- _RWSTD_ASSERT_RANGE (__begin, __end);> return do_get (__begin, __end, __flags, __err, __val); }#ifndef _RWSTD_LON, G_DOUBLEJ iter_type get (iter_type __begin, iter_type __end, ios_base &__flags, ? _IOSTATE &__err, long double& __val) const {- _RWSTD_ASSERT_RANGE (__begin, __end);> return do_get (__begin, __end, __flags, __err, __val); }#endif // _RWSTD_LONG_DOUBLEJ iter_type get (iter_type __begin, iter_type __end, ios_base &__flags, 9 _IOSTATE &__err, void*& __val) const {- _RWSTD_ASSERT_RANGE (__begin, __end);> retu- rn do_get (__begin, __end, __flags, __err, __val); }#ifdef _RWSTD_LONG_LONG // extensionI iter_type get (iter_type __begin, iter_type __end, ios_base &__flags,D _IOSTATE &__err, _RWSTD_LONG_LONG& __val) const {- _RWSTD_ASSERT_RANGE (__begin, __end);> return do_get (__begin, __end, __flags, __err, __val); } // extensionI iter_type get (iter_type __begin, iter_type __end, ios_base &__flags,# _IOSTATE &__err. ,< unsigned _RWSTD_LONG_LONG& __val) const {- _RWSTD_ASSERT_RANGE (__begin, __end);> return do_get (__begin, __end, __flags, __err, __val); }#endif // _RWSTD_LONG_LONG protected:#ifndef _RWSTD_NO_NATIVE_BOOL virtual iter_typeB do_get (iter_type __begin, iter_type __end, ios_base &__flags,1 _IOSTATE &__err, bool &__val) const {H return _C_get (__begin, __end, __flags, __err, _C_bool, &__val); }!#endif / // _RWSTD_NO_NATIVE_BOOL virtual iter_typeB do_get (iter_type __begin, iter_type __end, ios_base &__flags,< _IOSTATE &__err, unsigned short &__val) const {J return _C_get (__begin, __end, __flags, __err, _C_ushort, &__val); } virtual iter_typeB do_get (iter_type __begin, iter_type __end, ios_base &__flags,9 _IOSTATE &__err, unsigned int &__val) const {H return _C_get (__begin, __end, __flags, __err, _C_uint, &__val); }0 virtual iter_typeB do_get (iter_type __begin, iter_type __end, ios_base &__flags,1 _IOSTATE &__err, long &__val) const {H return _C_get (__begin, __end, __flags, __err, _C_long, &__val); } virtual iter_typeB do_get (iter_type __begin, iter_type __end, ios_base &__flags,: _IOSTATE &__err, unsigned long &__val) const {I return _C_get (__begin, __end, __flags, __err, _C_ulong, &__val); } virtual iter_typeB do_get (iter1 _type __begin, iter_type __end, ios_base &__flags,2 _IOSTATE &__err, float &__val) const {I return _C_get (__begin, __end, __flags, __err, _C_float, &__val); } virtual iter_typeB do_get (iter_type __begin, iter_type __end, ios_base &__flags,3 _IOSTATE &__err, double &__val) const {J return _C_get (__begin, __end, __flags, __err, _C_double, &__val); }#ifndef _RWSTD_LONG_DOUBLE virtual iter_typeB do_get (iter_type __begin,2 iter_type __end, ios_base &__flags,8 _IOSTATE &__err, long double &__val) const {K return _C_get (__begin, __end, __flags, __err, _C_ldouble, &__val); }#endif // _RWSTD_LONG_DOUBLE virtual iter_typeB do_get (iter_type __begin, iter_type __end, ios_base &__flags,2 _IOSTATE &__err, void* &__val) const {I return _C_get (__begin, __end, __flags, __err, _C_pvoid, &__val); }#ifdef _RWSTD_LONG_LONG // extension virtual 3 iter_typeB do_get (iter_type __begin, iter_type __end, ios_base &__flags,= _IOSTATE &__err, _RWSTD_LONG_LONG &__val) const {I return _C_get (__begin, __end, __flags, __err, _C_llong, &__val); } // extension virtual iter_typeB do_get (iter_type __begin, iter_type __end, ios_base &__flags,F _IOSTATE &__err, unsigned _RWSTD_LONG_LONG &__val) const {J return _C_get (__begin, __end, __flags, __err, _C_ullong, &__val); }#endif4 // _RWSTD_LONG_LONGprivate: iter_typeJ _C_get (iter_type, iter_type, ios_base&, _IOSTATE&, int, void*) const;};} // namespace _V3_LOCALEE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif$#if _RWSTD_DEFINE_TEMPLATE (NUM_GET)'# include ,#endif // _RWSTD_DEFINE_TEMPLATE (NUM_GET)E#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern5 _prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif5// Library's num_get instantiations for char, wchar_t _RWSTD_NAMESPACE (_V3_LOCALE) { :_RWSTD_INSTANTIATE_1 (struct _RWSTD_EXPORT num_get);#ifndef _RWSTD_NO_WCHAR_T=_RWSTD_INSTANTIATE_1 (struct _RWSTD_EXPORT num_get);#endif // _RWSTD_NO_WCHAR_T} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif)#endif // _RWSTD_LOC_NUM_GET_H_INCLUDEDww 7 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and 8 by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is p 9 rovidedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L *************: *************************************************************/#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endif6#include // for use_facet2#include // for ctypeE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAM; ESPACE (__rw) {_RWSTD_EXPORT _RWSTD_SIZE_T8__rw_put_num (char**, _RWSTD_SIZE_T, unsigned, int, int,( const void*, const char*);} // namespace __rw _RWSTD_NAMESPACE (_V3_LOCALE) { *template 4_RW::__rw_facet_id num_put<_CharT, _OutputIter>::id;Ntemplate */>1_TYPENAME num_put<_CharT, _OutputIter>::iter_typenum_put<_CharT, _OutputIter>::H_C_put (iter_type __it< , ios_base &__flags, char_type __fill, int __type,! const void *__pval) const{% const numpunct &__np =? _V3_USE_FACET (numpunct, __flags.getloc ());4 // FIXME: adjust buffer dynamically as necessary' char __buf [_RWSTD_DBL_MAX_10_EXP]; char *__pbuf = __buf;/ const string __grouping = __np.grouping ();2 const char *__grp = __grouping.c_str ();3 const int __prec = __flags.precision ();E#if defined(__VMS) && de= fined(__DECCXX) && !defined(__DECFIXCXXL1730). const char __nogrouping = _RWSTD_CHAR_MAX; if (!__np.thousands_sep()) __grp = &__nogrouping;#endif% const int __f = __flags.flags ();? // format value, ignore C++ decimal_point and thousands_sep _RWSTD_SIZE_T __res => _RW::__rw_put_num (&__pbuf, sizeof __buf, __f, __type,2 __prec, __pval, __grp);I // for bool values and boolalpha bit set, retrieve the "truth" stringJ ba> sic_string, allocator > __boolstr; if (!__res) {B __boolstr = __pval ? __np.truename () : __np.falsename ();& __res = __boolstr.size (); }' // number of fill chars to pad with) int __pad = __flags.width () - __res;> // adjustfield bits (left, internal, or the default right)3 const int __adj = __f & _RWSTD_IOS_ADJUSTFIELD;J if (__pad > 0 && !(__adj & (_RWSTD_IOS_LEFT | _RWSTD_IOS_INTERNA? L))) {6 // right justify if either no justification or7 // right justification specified in adjustfield for (; __pad--; ++__it) *__it = __fill; }# const ctype &__ctp =< _V3_USE_FACET (ctype, __flags.getloc ()); const char *__p = __buf;4 if (__pad > 0 && _RWSTD_IOS_INTERNAL == __adj) {9 // internal padding only between the leading "0x"4 // prefix or the leading sign and the number'@ if ('+' == *__p || '-' == *__p)+ *__it++ = __ctp.widen (*__p++);R else if ('0' == *__p && __res > 2 && ('x' == __p [1] || 'X' == __p [1])) {+ *__it++ = __ctp.widen (*__p++);+ *__it++ = __ctp.widen (*__p++); }1 // right justify if not internally padded for (; __pad--; ++__it) *__it = __fill; }- if (_RW::__rw_facet::_C_bool == __type) { // boolalpha output@ for (_RWSTD_SIZE A _T __i = 0; __i != __res; ++__i, ++__it)$ *__it = __boolstr [__i]; }O else if (__type & _RW::__rw_facet::_C_integral && !*__grp && __prec >= 0) {4 // optimized for integer output, no groupingL for (const char *__end = __buf + __res; __p != __end; ++__p, ++__it)' *__it = __ctp.widen (*__p); } else {# // all other numeric outputN for (const char *__end = __buf + __res; __p != __end; ++__p, ++__it) { switch (*__pB ) {B // replace either the period or the comma with theC // decimal point in case a setlocale() call made by= // the program changed the default '.' to ',' case '.':; case ',': *__it = __np.decimal_point (); break;; case ';': *__it = __np.thousands_sep (); break;7 default: *__it = __ctp.widen (*__p); break; } } } // left justify if necessary& for (; __pad > 0; ++__it, --__pad) *__it = __fill; return __it;}} // namespace _V3_LOCALEE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endifww D Uw$p7ԦL/*************************************************************************** *> * _num_put.h - definition of the std::num_put class templates *E * This is an internal header file used to implement the C++ Standard? * Library. It should never be #included directly by a program. *3 * $Id: //stdlib/3.0-rel/include/loc/_num_put.h#4 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Developme E nt Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. F All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies t G hereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFRH 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/%#ifndef _RWSTD_LOC_NUM_PUT_H_INCLUDED%#define _RWSTD_LOC_NUM_PUT_H_INCLUDED#include #include "#include %#include #include #if defined(__DECCXX)# ifdef __PRI AGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) { struct _RWSTD_EXPORT ios_base;} // namespace std _RWSTD_NAMESPACE (_V3_LOCALE) { // 22.2.2.2template )>struct num_put: _RW::__rw_facet{" typedef _CharT char_type;" typedef _OutputIter iter_type;) _EXPLICIT num_put (size_t __refs = 0)& : _RW::__rw_facet (__refs) { }#ifndef _RWSTD_NO_BOOLG iter_type put (iter_type __it, ios_base& __flags, char_type __fill,& bool __val) const {5 return do_put (__it, __flags, __fill, __val); }#endif // _RWSTD_NO_BOOLG iter_type put (iter_type __it, ios_base &__flagsK , char_type __fill,& long __val) const {5 return do_put (__it, __flags, __fill, __val); }G iter_type put (iter_type __it, ios_base &__flags, char_type __fill,/ unsigned long __val) const {5 return do_put (__it, __flags, __fill, __val); }G iter_type put (iter_type __it, ios_base &__flags, char_type __fill,( double __val) const {5 return do_put (__it, __flags, __fill, __val); }G it L er_type put (iter_type __it, ios_base &__flags, char_type __fill,- long double __val) const {5 return do_put (__it, __flags, __fill, __val); }G iter_type put (iter_type __it, ios_base &__flags, char_type __fill,- const void* __val) const {5 return do_put (__it, __flags, __fill, __val); }F// prevent gcc warning: cast to pointer from integer of different size#define _TO_VOID(x) \N _RWSTD_REINTERPRET_CAST (const void*, M _RWSTD_STATIC_CAST (_RWSTD_SIZE_T, x))#ifdef _RWSTD_LONG_LONG // extensionsG iter_type put (iter_type __it, ios_base &__flags, char_type __fill,2 _RWSTD_LONG_LONG __val) const {5 return do_put (__it, __flags, __fill, __val); }G iter_type put (iter_type __it, ios_base &__flags, char_type __fill,; unsigned _RWSTD_LONG_LONG __val) const {5 return do_put (__it, __flags, __fill, __val); }#endif // _RWSTD_LONN G_LONG! static _RW::__rw_facet_id id; protected:#ifndef _RWSTD_NO_BOOL virtual iter_type@ do_put (iter_type __it, ios_base &__flags, char_type __fill, bool __val) const {- return _C_put (__it, __flags, __fill,A __flags.flags () & _RWSTD_IOS_BOOLALPHA@ ? _C_bool : _C_int, _TO_VOID (__val)); }#endif // _RWSTD_NO_BOOL virtual iter_type@ do_put (iter_type __it, ios_base &__flags, cO har_type __fill, long __val) const {I return _C_put (__it, __flags, __fill, _C_long, _TO_VOID (__val)); } virtual iter_type@ do_put (iter_type __it, ios_base &__flags, char_type __fill,( unsigned long __val) const {J return _C_put (__it, __flags, __fill, _C_ulong, _TO_VOID (__val)); } virtual iter_type@ do_put (iter_type __it, ios_base &__flags, char_type __fill,! double __val) const {J return _C_put (_P _it, __flags, __fill, _C_double | _C_ptr, &__val); } virtual iter_type@ do_put (iter_type __it, ios_base &__flags, char_type __fill,& long double __val) const {K return _C_put (__it, __flags, __fill, _C_ldouble | _C_ptr, &__val); } virtual iter_type@ do_put (iter_type __it, ios_base &__flags, char_type __fill,& const void *__val) const {? return _C_put (__it, __flags, __fill, _C_pvoid, __val); }#ifdef _RWSTD_LONG_LQ ONG // extensions virtual iter_type@ do_put (iter_type __it, ios_base &__flags, char_type __fill,+ _RWSTD_LONG_LONG __val) const {@ return _C_put (__it, __flags, __fill, _C_llong, &__val); } virtual iter_type@ do_put (iter_type __it, ios_base &__flags, char_type __fill,4 unsigned _RWSTD_LONG_LONG __val) const {A return _C_put (__it, __flags, __fill, _C_ullong, &__val); }#endif // _RWSTD_LONG_LONG#undef _TO_VR OIDprivate:O iter_type _C_put (iter_type, ios_base&, char_type, int, const void*) const;};} // namespace _V3_LOCALEE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif$#if _RWSTD_DEFINE_TEMPLATE (NUM_PUT)'# include ,#endif // _RWSTD_DEFINE_TEMPLATE (NUM_PUT)E#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __exS tern_prefix _EXTERN_PREFIX#endif5// Library's num_put instantiations for char, wchar_t _RWSTD_NAMESPACE (_V3_LOCALE) { :_RWSTD_INSTANTIATE_1 (struct _RWSTD_EXPORT num_put);#ifndef _RWSTD_NO_WCHAR_T=_RWSTD_INSTANTIATE_1 (struct _RWSTD_EXPORT num_put);#endif // _RWSTD_NO_WCHAR_T} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif)#endif // _RWSTD_LOC_NUM_PUT_H_INCLUDEDwwU .p7ԦL/*************************************************************************** * * _punct.cc *2 * $Id: //stdlib/3.0-rel/include/loc/_punct.cc#3 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Soft V ware, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This com W puter software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, X duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L *******************************************************Y *******************/#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endif#ifdef __IBMCPP__< // working around an IBM VisualAge implicit inclusion bug# include #endif // __IBMCPP__"#include E#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX Z #endif_RWSTD_NAMESPACE (__rw) {)template >_InputIter __rw_match_name (_InputIter __it, _InputIter __end,: const _CharT* const *__names,: const _RWSTD_SIZE_T *__sizes,: _RWSTD_SIZE_T __count,8 _RWSTD_SIZE_T &__inx,8 int &__err,: _STD::ios_base *__flags){ [ 7 const _RWSTD_SIZE_T __badval = (_RWSTD_SIZE_T)(-1);> // make sure there are enough bits for all `count' `names'H _RWSTD_ASSERT (__count <= sizeof (_RWSTD_SIZE_T) * _RWSTD_CHAR_BIT);E // on input, `err' contains the maximum allowed number of matches: const _RWSTD_SIZE_T __matchmax = (_RWSTD_SIZE_T)__err; __err = 0;@ _RWSTD_SIZE_T __bits = ~0UL; // a bit for each `name'K _RWSTD_SIZE_T __nmatch = __count; // total number of positive matches@ _RWS\ TD_SIZE_T __pos = 0; // position within input< _RWSTD_SIZE_T __num = __inx; // input as a number% __inx = __badval; // invalidate0 const _STD::ctype<_CharT> *__ctp = __flags ?E &_V3_USE_FACET (_STD::ctype<_CharT>, __flags->getloc ()) : 0; _CharT __ch;F for (; (__bits || __num != __badval) && !__err; ++__it, ++__pos) { if (__it == __end) {' __err |= _RWSTD_IOS_EOFBIT; __ch = _CharT (); } ] else __ch = *__it;) if (__ctp && __num != __badval) {: if (__ctp->is (_STD::ctype_base::digit, __ch))E __num = __num * 10 + __ctp->narrow (__ch, '0') - '0'; else! __num = __badval; }H // iterate over all names, clear bits of those that do not match< for (_RWSTD_SIZE_T __k = 0; __k != __count; ++__k) {& if (__bits & 1UL << __k) {K // `name' is still in the set, ^ see if the next char matchesI // (case insensitive comparison done if `ctp' is nonzero), if ( __pos < __sizes [__k] && !__errH && (__ctp ? __ctp->toupper (__names [__k][__pos])8 == __ctp->toupper (__ch)@ : __names [__k][__pos] == __ch)) {> // next character on `name' mactches input, if (__badval == __inx) {< _ // no prior match, remember this one$ __inx = __k; }, else if ( __k != __inx@ && __sizes [__k] == __sizes [__inx]? && __pos + 1 == __sizes [__inx]) {I // this match is a duplicate of the last best one9 // remove this match from the set0 __bits &= ~(1UL << __k);# -- ` __nmatch; }? else if ( __sizes [__k] < __sizes [__inx]; || __pos >= __sizes [__inx]) {I // this match is either shorter than the last one= // or the last one will be eliminated$ __inx = __k; } } else {( if (1 == __nmatch) {C if (__badval == __inx && __bad a val == __num)( return __it;' goto __endloop; }' if (__inx == __k) {J // if this `name' is the current shortest match...> if (__err && __pos == __sizes [__k]) {G // ...and we're at eof, return successfully( return __it; }5 // otherwise forget the matchb ) __inx = __badval; }H // clear the bit for the `name' that failed to match; // and decrement the numeber of matches, __bits &= ~(1UL << __k); --__nmatch; } } }: if (1 == __nmatch && __pos + 1 == __sizes [__inx]) return ++__it; } __endloop:9 if (__matchmax < __nmatch || __pos < __sizes [__inx]c ) __inx = __badval;D if (__ctp && __badval == __inx && !__err && __num != __badval) {C // if symbolic matching fails, fall back on numeric parsing for ( ; ; ) {" if (++__it == __end) {+ __err |= _RWSTD_IOS_EOFBIT; break; } __ch = *__it;: if (__ctp->is (_STD::ctype_base::digit, __ch))E __num = __num * 10 + __ctp->narrow (__ch, '0') - '0'; else  break; } __inx = __count + __num; } return __it;}} // namespace __rwE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endifww e m8p7ԦL/*************************************************************************** *9 * _punct.h - definition of the __rw_punct class template *E * This is an internal header file used to implement the C++ Standard? * Library. It should never be #included directly by a program. *1 * $Id: //stdlib/3.0-rel/include/loc/_punct.h#3 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Com f pany, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Ri g ghts Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof h may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.22i 7-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/##ifndef _RWSTD_LOC_PUNCT_H_INCLUDED##define _RWSTD_LOC_PUNCT_H_INCLUDED#include #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__j VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) {struct _RWSTD_EXPORT ios_base;} // namespace std_RWSTD_NAMESPACE (__rw) {enum {K // bitset elements representing decimal_point, thousands_sep, grouping,G // truename, falsename, currency_sym, positive_sign, negative_sign,* // frac_digits, pos_format, neg_formatG // values are bitset elements since th k ey are used to indicate whichL // members have already been cached by std::moneypunct and std::numpunctN __rw_dp = 0x0001, __rw_ts = 0x0002, __rw_gr = 0x0004, __rw_tn = 0x0008,N __rw_fn = 0x0010, __rw_cs = 0x0020, __rw_ps = 0x0040, __rw_ns = 0x0080,< __rw_fd = 0x0100, __rw_pf = 0x0200, __rw_nf = 0x0400,> // bitset elements used by std::time_get and std::time_putG __rw_abday = 0x0001, __rw_day = 0x0002, __rw_abmon = 0x0004,G __rw_month = 0x0008, __rw_ampm l = 0x0010, __rw_d_t_fmt = 0x0020,G __rw_d_fmt = 0x0040, __rw_t_fmt = 0x0080, __rw_t_fmt_ampm = 0x0100,> // bitset elements used by std::time_get and std::time_put7 // for alternative date/time representions and erasP __rw_era_d_t_fmt = 0x0200, __rw_era_d_fmt = 0x0400, __rw_era_t_fmt = 0x0800,7 __rw_era_names = 0x1000, __rw_era_fmts = 0x2000, __rw_alt_digits = 0x4000, // other flagsC __rw_wide = 0x100000, __rw_mon = 0x200000, __rw_intl = 0x400000};m struct __rw_facet;template Cconst _CharT* __rw_get_punct (const _RW::__rw_facet*, int, _CharT);_RWSTD_SPECIALIZED_FUNCTION>const char* __rw_get_punct(const _RW::__rw_facet*, int, char);#ifndef _RWSTD_NO_WCHAR_T_RWSTD_SPECIALIZED_FUNCTIONDconst wchar_t* __rw_get_punct(const _RW::__rw_facet*, int, wchar_t);#endif // _RWSTD_NO_WCHAR_T?// extracts as many values from the given range as necessary to>// (not necessarily unambiguously) match one or more nam n es (in=// case of duplicates) in the array of sequences given by the// third and fourth arguments=// case insensitive comparison (characters are compared after>// converting to uppercase using std::ctype::toupper())/// is performed if the last argument is nonzeroB// retuns the iterator pointing one past the last extracted value,A// fills 6th argument with the index of the matched name and setsB// the 7th argument to eofbit if the end of input has been reached@// while trying to m o atch a name (note that the returned iterator>// may be equal to the end iterator and eofbit may not be set))template 3_InputIter __rw_match_name (_InputIter, _InputIter,G const _CharT* const*, const _RWSTD_SIZE_T*,@ _RWSTD_SIZE_T, _RWSTD_SIZE_T&, int&,- _STD::ios_base*);} // namespace __rwE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif##if _RWSTD_DEFINE_TEMPLATE (_PUNCT)%# include (#endif // _RWSTD_NO_IMPLICIT_INCLUSION#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif'#endif // _RWSTD_LOC_PUNCT_H_INCLUDEDww q Cp7ԦL/*************************************************************************** *5 * _rw_locale.h - definition of the __rw_locale class *E * This is an internal header file used to implement the C++ Standard? * Library. It should never be #included directly by a program. *5 * $Id: //stdlib/3.0-rel/include/loc/_rw_locale.h#4 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Com r pany, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Ri s ghts Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof t may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.22u 7-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/'#ifndef _RWSTD_LOC_RW_LOCALE_H_INCLUDED'#define _RWSTD_LOC_RW_LOCALE_H_INCLUDED"#include #include #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defv aults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif _RWSTD_NAMESPACE (_V3_LOCALE) { struct _RWSTD_EXPORT locale;} // namespace _V3_LOCALE_RWSTD_NAMESPACE (__rw) { 9class _RWSTD_EXPORT __rw_locale: public __rw_synchronized{public:G // total number of standard facets (char and wchar specializations)E // ordinary (unnamed) and byname fac w ets share the same array slot< enum { _C_n_std_facets = __rw_facet::_C_last_type / 2 };" enum { _C_namebuf_size = 40 };private:E // standard facets are always present, user defined facets (i.e.,G // non-standard specializations of standard facets, or user-definedH // facets with own id's) are dynamically allocated only if installedH // each standard facet is stored at an index, inx, computed from its> // numeric id, as follows: inx = (Facet::id._C_id - 1) / 2H x // each slot holds either an ordinary (unnamed) or a byname standard# // facet (if the latter exists)4 __rw_facet *_C_std_facets [_C_n_std_facets];J __rw_facet **_C_usr_facets; // array of pointers to user facetsG _RWSTD_SIZE_T _C_n_usr_facets; // number of user-defined facetsH // name buffer sufficiently large to accommodate 6 basic 5-characterH // POSIX locale names such as "en_US" (one for each LC_XXX category)0 char _C_namebuf [_C_namebuf_si y ze];; const char *_C_name; // name of locale (!= 0)< _RWSTD_SIZE_T _C_ref; // reference count (>= 0)M // a bit is set for each standard ordinary (unnamed) or byname facet thatM // is installed in the locale, and clear for each standard facet that hasL // been replaced with a user-defined (or user-constructed) object (i.e.,1 // one with the same id) in the locale object$ _RWSTD_SIZE_T _C_std_facet_bits;G // a bit is set for each standard bynamez facet that is installed inG // the locale object, and clear for each standard byname facet thatI // has been replaced with a user-defined (or user-constructed) object8 // (i.e., one with the same id) in the locale object' _RWSTD_SIZE_T _C_byname_facet_bits;% friend struct _V3_LOCALE::locale;public: enum {D#define _FACET_BIT(name) (1U << (__rw_facet::_C_##name - 1U) / 2U)< // bitmaps of standard facet types for each categoryD // used to set { and test the value _C_{std,byname}_facet_bitsB // to quickly determine the composition of a locale objectC _C_collate = _FACET_BIT (collate) | _FACET_BIT (wcollate),A _C_ctype = _FACET_BIT (codecvt) | _FACET_BIT (ctype)D | _FACET_BIT (wcodecvt) | _FACET_BIT (wctype),N _C_monetary = _FACET_BIT (moneypunct) | _FACET_BIT (moneypunct_intl)P | _FACET_BIT (wmoneypunct) | _FACET_BIT (wmoneypunct_intl)G | | _FACET_BIT (money_get) | _FACET_BIT (money_put)J | _FACET_BIT (wmoney_get) | _FACET_BIT (wmoney_put),F _C_numeric = _FACET_BIT (numpunct) | _FACET_BIT (wnumpunct)C | _FACET_BIT (num_get) | _FACET_BIT (num_put)F | _FACET_BIT (wnum_get) | _FACET_BIT (wnum_put),E _C_time = _FACET_BIT (time_get) | _FACET_BIT (time_put)H | _FACET_BIT (wtime_get) | _FACET_BIT (wtime_put),E _C_mes} sages = _FACET_BIT (messages) | _FACET_BIT (wmessages),; _C_all = _C_collate | _C_ctype | _C_monetary; | _C_numeric | _C_time | _C_messages#undef _FACET_BIT };5 // create a locale body from the name of a locale __rw_locale (const char*);K // create a locale body from the name of a locale combined with a facetA __rw_locale (const char *__name, const __rw_facet *__facet) {# __rw_locale __tmp (__name);& _C_const~ ruct (__tmp, __facet); }E // create a locale body from another locale combined with a facetG __rw_locale (const __rw_locale &__rhs, const __rw_facet *__facet) {& _C_construct (__rhs, __facet); }K // create a locale body from two locales taking cats from the named oneK __rw_locale (const __rw_locale &__rhs, const char *__name, int __cat) {# __rw_locale __tmp (__name);+ _C_construct (__rhs, __tmp, __cat); }B // create a locale bod y from two locales taking cats from `l2'O __rw_locale (const __rw_locale &__l1, const __rw_locale &__l2, int __cat) {) _C_construct (__l1, __l2, __cat); } ~__rw_locale (); // return locale name& const char* _C_get_name () const { return _C_name; }; static _RWSTD_SIZE_T _C_add_ref (__rw_facet &__facet) {B return _RWSTD_ATOMIC_PREINCREMENT (__facet._C_ref, false); }> static _RWSTD_SIZE_T _C_remove_ref (__rw_facet &__facet) {B return _RWSTD_ATOMIC_PREDECREMENT (__facet._C_ref, false); }! _RWSTD_SIZE_T _C_add_ref () {= return _RWSTD_ATOMIC_PREINCREMENT (_C_ref, _C_mutex); }$ _RWSTD_SIZE_T _C_remove_ref () {= return _RWSTD_ATOMIC_PREDECREMENT (_C_ref, _C_mutex); } // access private facet nameD static const char* _C_get_cat_name (const __rw_facet &__facet) { return __facet._C_name; }D // get a string of locale names, one for each inst alled standardE // facet's category; will dynamically allocate string if buf is 08 char* _C_get_cat_names (char*, _RWSTD_SIZE_T) const;A // get a string of locale names, one for each LC_XXX categoryE // if all locales are the same, returns just a single locale name6 static const char* _C_get_cat_names (const char*);F // returns true iff all categories of facets (given by the bitmap)I // in *this are being globally managed, i.e., iff all of *this facetsH // whose category matches the bitmap are also being globally managedE // (when the category is locale::none, the function fails for allC // locales that contain any user-defined facets; otherwise only& // standard facets are considered)# bool _C_is_managed (int) const;private:) // globally manages all named locales> static __rw_locale* _C_manage (__rw_locale*, const char*); static char*O _C_make_name (char*, _RWSTD_SIZE_T, const __rw_locale&, const __rw_facet&); D // called from ctors (only) to fully construct a combined locale> void _C_construct (const __rw_locale&, const __rw_facet*);D void _C_construct (const __rw_locale&, const __rw_locale&, int);N // implements locale template ctor: locale::locale (const locale&, Facet*) static __rw_locale*1 _C_combine (__rw_locale*, const __rw_facet*);N // implements locale ctor: locale (const locale&, const locale&, category) static __rw_locale*1 _C_combine (__rw_locale*, __ rw_locale*, int);F // implements locale ctors and some other (e.g., template) members static __rw_locale*- _C_make_body (__rw_locale*, __rw_locale*,7 const char*, int, const __rw_facet*);5 // returns the index into one of the facet arrays+ // corresponding to the given facet id:. // -1 if the facet isn't installed6 // value < _C_n_std_facets for a standard facetK // value >= _C_n_std_facets otherwise (i.e., for user defined facets)9 _RWSTD_SIZE_T _C_get_facet_inx (_RWSTD_SIZE_T) const;};} // namespace __rwE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif+#endif // _RWSTD_LOC_RW_LOCALE_H_INCLUDEDww x!Sp7ԦL/*************************************************************************** *9 * _rw_messages.h - definition of the __rw_messages class *E * This is an internal header file used to implement the C++ Standard? * Library. It should never be #included directly by a program. *7 * $Id: //stdlib/3.0-rel/include/loc/_rw_messages.h#1 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Developme nt Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies t hereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/)#ifndef _RWSTD_LOC_RW_MESSAGES_H_INCLUDED)#define _RWSTD_LOC_RW_MESSAGES_H_INCLUDED#include #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endif E#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (__rw) { Cint __rw_cat_open (const _STD::string&, const _V3_LOCALE::locale&);-const char* __rw_get_message (int, int, int);0const _V3_LOCALE::locale& __rw_get_locale (int);void __rw_cat_close (int);} // namespace __rwE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __ext ern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif+#endif // _RWSTD_LOC_RW_LOCALE_H_INCLUDEDww Ǫ\p7ԦL/*************************************************************************** * * _rw_setlocale.h  *E * This is an internal header file used to implement the C++ Standard? * Library. It should never be #included directly by a program. *8 * $Id: //stdlib/3.0-rel/include/loc/_rw_setlocale.h#2 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This comp uter software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * oth erwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manuf acturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/*#ifndef _RWSTD_LOC_RW_SETLOCALE_H_INCLUDED*#define _RWSTD_LOC_RW_SETLOCALE_H_INCLUDED#include #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DE CCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (__rw) { C// class provides synchronized access to the C setlocale() facilityB// if the first argument is 0, ctor locks, obtains the name of the;// current C locale (by calling setlocale (0)), and unlocksC// if the first argument is not 0, ctor locks and obtains and savesB// the name of the current C locale, and sets the C locale to thatD// named by the fi rst argument; dtor then resets the global C locale8// to what it was before the ctor invocation and unlocks#struct _RWSTD_EXPORT __rw_setlocale{C __rw_setlocale (const char* = 0, int = _RWSTD_LC_ALL, int = 0); ~__rw_setlocale ();- // returns the saved name (will not be 0) const char* name () const { return _C_name; }private:< __rw_setlocale (const __rw_setlocale&); // not defined< void operator= (const __rw_setlocale&); // not defined 8 char _C_namebuf [80]; // used if locale name fitsL char *_C_name; // _C_namebuf if name fits, otherwise allocatedF int _C_guard; // non-0 when object owns the global lock5 int _C_cat; // saved LC_XXX category};N_RWSTD_EXPORT char* __rw_locale_name (int, const char*, char*, _RWSTD_SIZE_T);} // namespace __rwE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif.#endif // _RWSTD_LOC_RW_SETLOCALE_H_INCLUDEDww fp7ԦL/*************************************************************************** *5 * _time_get.cc - definition of std::time_get members *5 * $Id: //stdlib/3.0-rel/include/loc/_time_get.cc#3 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12 .211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L ********* *****************************************************************/#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endif#include "#include "#include ##include E#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXT ERN_PREFIX#endif_RWSTD_NAMESPACE (__rw) {_RWSTD_EXPORT _RWSTD_SIZE_T-__rw_get_timepunct (const __rw_facet *pfacet,@ int data [4], _RWSTD_C::tm *tmb, int **pmem,@ const void *names[], _RWSTD_SIZE_T sizes[]);} // namespace __rw _RWSTD_NAMESPACE (_V3_LOCALE) { )template 4_RW::__rw_facet_id time_get<_CharT, _InputIter>::id;)template 1_TYPENAME time_get<_CharT, _In putIter>::iter_typetime_get<_CharT, _InputIter>::Fget (iter_type __it, iter_type __end, ios_base &__fl, _IOSTATE &__err,I tm *__tmb, const char_type *__pat, const char_type *__pat_end) const{ _RWSTD_ASSERT (0 != __pat);' _RWSTD_ASSERT (__pat <= __pat_end);# const ctype &__ctp =9 _V3_USE_FACET (ctype, __fl.getloc ()); // extension: `pt' may be 0& tm __tmp = __tmb ? *__tmb : tm (); _IOSTATE __errtmp = 0;# char __fmt [ ] = { '\0', '\0' };) for (; __pat != __pat_end; ++__pat) { if (__errtmp) {0 // failed to match the whole pattern+ __errtmp |= _RWSTD_IOS_FAILBIT; break; }6 const char __ch = __ctp.narrow (*__pat, '\0'); if (__fmt [0]) {+ if ('E' == __ch || 'O' == __ch)! __fmt [1] = __ch; else {I __it = do_get (__it, __end, __fl, __errtmp, &__tmp, __ch,*  __fmt [1]);8 __fmt [0] = __fmt [1] = '\0'; // reset } } else if ('%' == __ch) { __fmt [0] = __ch; }8 else if (__ctp.is (ctype_base::space, *__pat)) {- // skip all whitespace charactersH while (__it != __end && __ctp.is (ctype_base::space, *__it)) ++__it; } else {F if (__it != __end && *__pat == __ctp.narrow (*__it, '\0'))  ++__it; else {5 // mismatch between pattern and input/ __errtmp |= _RWSTD_IOS_FAILBIT; break; } } }" // store value only on success2 if (!(__errtmp & ~_RWSTD_IOS_EOFBIT) && __tmb) *__tmb = __tmp; __err |= __errtmp; return __it;})template ?/* virtual */ _TYPENAME time_get<_CharT, _InputIter>::iter_typetime_get<_CharT, _InputI ter>::8do_get (iter_type __it, iter_type __end, ios_base &__fl,# _IOSTATE &__err, tm *__tmb,7 char __fmt, char __modifier /* = '\0' */) const{: // enough pointers for 100 alternative numeric symbols# const char_type* __names [100];@ _RWSTD_SIZE_T __sizes [sizeof __names / sizeof *__names]; const void** __pv =8 _RWSTD_REINTERPRET_CAST (const void**, __names);& tm __tmp = __tmb ? *__tmb : tm ();3 int *__pmem = 0; // pointer to std::tm m ember: _RWSTD_SIZE_T __dup; // number of allowed duplicates# const ctype &__ctp =9 _V3_USE_FACET (ctype, __fl.getloc ()); switch (__fmt) {5 case 'A': case 'a': case 'B': case 'b': case 'h':> // names of days and months can have duplicates (i.e.,< // it can be either a full name aor an abbreviation) __dup = 2; break;- case 'n': case 't': { // any whitespace  for ( ; ; ++__it) {  if (__it == __end) {+ __err |= _RWSTD_IOS_EOFBIT; break; }5 if (!__ctp.is (ctype_base::space, *__it)) break; } return __it; } default: __dup = 1; } int __data [4] = {D // array of input data for __rw_get_timepunct will on output? // contain data needed to interpret values parsed below@ __fmt, __modifier, sizeof (char_type) > sizeof (char), 0 }; _RWSTD_SIZE_T __cnt =6 _RW::__rw_get_timepunct (this, __data, &__tmp,9 &__pmem, __pv, __sizes); if (1 == __cnt) {) _RWSTD_ASSERT (0 != __names [0]);4 return get (__it, __end, __fl, __err, __tmb,< __names [0], __names [0] + __sizes [0]); } _IOSTATE __errtmp = 0; if (__cnt > 1) { // parse string on input> // set `inx' to 0 to allow numeric input, -1 otherwi seJ _RWSTD_SIZE_T __inx = 'O' == __modifier ? 0 : (_RWSTD_SIZE_T)(-1);/ // on function input, `errtmp' contains+ // the maximum number of duplicates$ __errtmp = _IOSTATE (__dup);C __it = _RW::__rw_match_name (__it, __end, __names, __sizes,D __cnt, __inx, __errtmp, &__fl);+ if (__inx == (_RWSTD_SIZE_T)(-1)) {B // if no name matches, and the first name is the empty@ // (i.e., alt_digi ts 0 is not defined), try to match$ // and extract all zeros0 if ( !__errtmp && 0 == __sizes [0]H && __it != __end && '0' == __ctp.narrow (*__it, '\0')) {; while ('0' == __ctp.narrow (*__it, '\0')) {* if (++__it == __end) {6 __errtmp |= _RWSTD_IOS_EOFBIT; break; } } } else {/ __errtmp |= _R WSTD_IOS_FAILBIT; } } else if ('p' == __fmt) {( _RWSTD_ASSERT (0 != __pmem);( if (!__inx && 11 == *__pmem) *__pmem = 0;$ else if (*__pmem < 12) {, if (!__inx || 11 != *__pmem)4 *__pmem += int (__inx * 12) + 1; else! *__pmem += 1; } else/ __errtmp |= _RWSTD_IOS_FAILBIT; } else {( _RWSTD_ASSERT (0 != __pmem);E if (__inx == __cnt && !__sizes [0] || __inx >= 2 * __cnt). *__pmem = int (__inx - __cnt);# else if (__inx < __cnt)8 *__pmem = int (__inx % (__cnt / __dup)); else/ __errtmp |= _RWSTD_IOS_FAILBIT;K const int __adj = __data [0]; // value to increment result byJ const int __fac = __data [1]; // value to multiply result by. *__pmem  = *__pmem * __fac + __adj;C int __lob = __data [2]; // lower bound on valid inputD int __hib = __data [3]; // higher bound on valid input# // validate input value3 if (*__pmem < __lob || *__pmem > __hib)/ __errtmp |= _RWSTD_IOS_FAILBIT; } } else { // parse numeric input" _RWSTD_SIZE_T __nread = 0; int __mem = 0;& for ( ; ; ++__it, ++__nread) { if (__it == __end) {+ __err |= _RWSTD_IOS_EOFBIT; break; }( const char_type __c = *__it;3 if (!__ctp.is (ctype_base::digit, __c)) break;7 const char __ch = __ctp.narrow (__c, '\0');) if (__ch < '0' || __ch > '9') break;, __mem = 10 * __mem + __ch - '0'; } if (__nread) {K const int __adj = __data [0]; // value to increment re sult byJ const int __fac = __data [1]; // value to multiply result byC int __lob = __data [2]; // lower bound on valid inputD int __hib = __data [3]; // higher bound on valid input if ('y' == __fmt) {H // IEEE Std 1003.1-2001: When a century is not otherwiseH // specified, values in the range [69,99] shall refer toH // years 1969 to 1999 inclusive, and values in the rangeG // [00,68] shall refer to years 2000 to 2068 inclusive.! if (__mem > 99) {# __lob = -1900;3 __hib = _RWSTD_INT_MAX - 1900;" __mem -= 1900; } else { __lob = 69; __hib = 168;# if (__mem < 69)% __mem += 100; } }( _RWSTD_ASSERT (0 != __pmem);,  *__pmem = __mem * __fac + __adj;# // validate input value3 if (*__pmem < __lob || *__pmem > __hib)/ __errtmp |= _RWSTD_IOS_FAILBIT; } else+ __errtmp |= _RWSTD_IOS_FAILBIT; }2 if (!(__errtmp & ~_RWSTD_IOS_EOFBIT) && __tmb) *__tmb = __tmp; __err |= __errtmp; return __it;}} // namespace _V3_LOCALEE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# prag ma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endifwwl݉r7Ԧ#ifndef __STDIOSTREAM_HXX#define __STDIOSTREAM_HXXL//// B// Copyright 2003, 2004 Hewlett-Packard Development Company, L.P.//F// Confidential computer software. Valid license from HP required forF// possession, use or copying. Consistent with FAR 12.211 and 12.212,F// Commercial Computer Software, Computer Software Documentation, andK// Technical Data for Commercial Items are licensed to the U.S. Government/// under vendor's standard commercial license.q Orp7ԦL/*************************************************************************** *@ * _time_get.h - definition of the std::time_get class templates *E * This is an internal header file used to implement the C++ Standard? * Library. It should never be #included directly by a program. *4 * $Id: //stdlib/3.0-rel/include/loc/_time_get.h#4 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Develop ment Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 C FR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/&#ifndef _RWSTD_LOC_TIME_GET_H_INCLUDED&#define _RWSTD_LOC_TIME_GET_H_INCLUDED "#include #include #include #include _RWSTD_CTIME#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma  __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) {struct _RWSTD_EXPORT ios_base;#define _IOSTATE int} // namespace std_RWSTD_NAMESPACE (__rw) {Bconst void* __rw_get_timepunct (const _RW::__rw_facet*, int, int);} // namespace __rw _RWSTD_NAMESPACE (_V3_LOCALE) { // 22.2.5.1struct _RWSTD_EXPORT time_base{3 enum dateorder { no_order, dmy, mdy, ymd, ydm };}; // 22.2.5.1template ) >8class time_get: public _RW::__rw_facet, public time_base{public:5 typedef _CharT char_type;5 typedef _InputIter iter_type;0 _EXPLICIT time_get (_RWSTD_SIZE_T __ref = 0)% : _RW::__rw_ facet (__ref) { }# dateorder date_order() const { return do_date_order();  } iter_typeD get_time (iter_type __start, iter_type __end, ios_base& __flags,2 _IOSTATE &__err, tm* __time) const {E return do_get_time (__start, __end, __flags, __err, __time);  } iter_typeD get_date (iter_type __start, iter_type __end, ios_base& __flags,2 _IOSTATE &__err, tm* __time) const {D return do_get_date(__start, __end, _ _flags, __err, __time);  } iter_typeG get_weekday (iter_type __start, iter_type __end, ios_base& __flags,5 _IOSTATE &__err, tm* __time) const {H return do_get_weekday (__start, __end, __flags, __err, __time);  } iter_typeJ get_monthname (iter_type __start, iter_type __end, ios_base& __flags, 7 _IOSTATE &__err, tm* __time) const {I return do_get_monthname (__start, __end, __flags, __err, __time); }  iter_typeD get_year (iter_type __start, iter_type __end, ios_base& __flags,3 _IOSTATE &__err, tm* __time) const { E return do_get_year (__start, __end, __flags, __err, __time);  }! static _RW::__rw_facet_id id;#ifdef _RWSTD_NO_EXT_TIME_GETprivate:"#endif // _RWSTD_NO_EXT_TIME_GET // extension iter_type9 get (iter_type, iter_type, ios_base&, _IOSTATE&, tm*,3 const char_type*, const char_type*) const; // exten sion iter_type< get (iter_type __it, iter_type __end, ios_base &__flags,% _IOSTATE &__err, tm *__time,4 char __fmt, char __modifier = '\0') const {O return do_get (__it, __end, __flags, __err, __time, __fmt, __modifier); } protected:. virtual dateorder do_date_order() const { return dateorder (); } virtual iter_typeA do_get_time (iter_type __it, iter_type __end, ios_base &__fl,4 _IOSTATE &__err, tm *__tm b) const {= return do_get (__it, __end, __fl, __err, __tmb, 'X'); } virtual iter_typeA do_get_date (iter_type __it, iter_type __end, ios_base &__fl,4 _IOSTATE &__err, tm *__tmb) const {= return do_get (__it, __end, __fl, __err, __tmb, 'x'); } virtual iter_typeD do_get_weekday (iter_type __it, iter_type __end, ios_base &__fl,7 _IOSTATE &__err, tm *__tmb) const {= return do_get (__it, __end, __fl, __err, __tmb, 'a'); } virtual iter_typeF do_get_monthname (iter_type __it, iter_type __end, ios_base &__fl,9 _IOSTATE &__err, tm *__tmb) const {= return do_get (__it, __end, __fl, __err, __tmb, 'b'); } virtual iter_typeA do_get_year (iter_type __it, iter_type __end, ios_base &__fl,4 _IOSTATE &__err, tm *__tmb) const {= return do_get (__it, __end, __fl, __err, __tmb, 'Y'); }#ifdef _RWSTD_NO_EXT_TIME_GET private:"#endif // _RWSTD_NO_EXT_TIME_GET // extension virtual iter_type< do_get (iter_type, iter_type, ios_base&, _IOSTATE&, tm*,% char, char = '\0') const;}; // 22.2.5.2template ) >:class time_get_byname: public time_get<_CharT, _InputIter>{ char _C_namebuf [32];public:K _EXPLICIT time_get_byname (const char *__name, _RWSTD_SIZE_T __ref = 0) # : time_get<_CharT>(__ref) {B this->_C_set_name (__name, _C_namebuf, sizeof _C_namebuf); }};} // namespace _V3_LOCALEE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif%#if _RWSTD_DEFINE_TEMPLATE (TIME_GET)(# include -#endif // _RWSTD_DEFINE_TEMPLATE (TIME_GET)E#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix  __save&#pragma __extern_prefix _EXTERN_PREFIX#endif6// Library's time_get instantiations for char, wchar_t _RWSTD_NAMESPACE (_V3_LOCALE) { :_RWSTD_INSTANTIATE_1 (class _RWSTD_EXPORT time_get);#ifndef _RWSTD_NO_WCHAR_T=_RWSTD_INSTANTIATE_1 (class _RWSTD_EXPORT time_get);#endif // _RWSTD_NO_WCHAR_T} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif*#endif // _RWSTD_LOC_TIME_GET_H_INCLUDEDww _3|p7ԦL/*************************************************************************** *5 * _time_put.cc - definition of std::time_put members *5 * $Id: //stdlib/3.0-rel/include/loc/_time_put.cc#3 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12 .211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L ********* *****************************************************************/#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endif#include #include "#include E#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (__ rw) {template A_CharT* __rw_put_time (const __rw_facet*, _CharT*, _RWSTD_SIZE_T,D _STD::ios_base&, _CharT, const _RWSTD_C::tm*,, char, char, int, int){' _RWSTD_ASSERT (!"not implemented"); return 0;}_RWSTD_SPECIALIZED_FUNCTION=char* __rw_put_time (const __rw_facet*, char*, _RWSTD_SIZE_T,@ _STD::ios_base&, char, const _RWSTD_C::tm*,+ char, char, int, int);#ifn def _RWSTD_NO_WCHAR_T_RWSTD_SPECIALIZED_FUNCTIONCwchar_t* __rw_put_time (const __rw_facet*, wchar_t*, _RWSTD_SIZE_T,F _STD::ios_base&, wchar_t, const _RWSTD_C::tm*,. char, char, int, int);#endif // _RWSTD_NO_WCHAR_T} // namespace __rw _RWSTD_NAMESPACE (_V3_LOCALE) { *template 5_RW::__rw_facet_id time_put<_CharT, _OutputIter>::id;Otemplate */ >@/* virtual */ _TYPENAME time_put<_CharT, _OutputIter>::iter_typetime_put<_CharT, _OutputIter>::<do_put (iter_type __it, ios_base &__flags, char_type __fill,E const tm *__tmb, char __fmt, char __modifier /* = 0 */) const{ char_type __buf [256]; const char_type *__end =J _RW::__rw_put_time (this, __buf + 0, sizeof __buf / sizeof *__buf,O __flags, __fill, __tmb, __fmt, __modifier, -1, -1);' // number of fil l chars to pad with: streamsize __pad = __flags.width () - (__end - __buf);> // adjustfield bits (left, internal, or the default right)@ const int __adj = __flags.flags () & _RWSTD_IOS_ADJUSTFIELD;0 if (__pad > 0 && _RWSTD_IOS_LEFT != __adj) {< // right justify unless left justification requested for (; __pad--; ++__it) *__it = __fill; }E for (const char_type *__p = __buf; __p != __end; ++__p, ++__it) { *__it = *__p; } // left justify if necessary for (; __pad-- > 0; ++__it) *__it = __fill; return __it;}Otemplate */ >2_TYPENAME time_put<_CharT, _OutputIter>::iter_typetime_put<_CharT, _OutputIter>::Jput (iter_type __it, ios_base &__flags, char_type __fill, const tm *__tmb,: const char_type *__pat, const char_type *__end) const{ _RWSTD_ASSERT (0 != __pat);* if (!__end) // convenience ext ension? __end = __pat + char_traits::length (__pat);$ const ctype &__ctp = : _V3_USE_FACET (ctype, __flags.getloc ()); % for (; __pat != __end; ++__pat) {C if ('%' == __ctp.narrow (*__pat, 0) && __pat + 1 < __end) {L char __fmtmod = __ctp.narrow (*++__pat, 0); // format modifierM char __fmt; // format specifier" if ('E' == __fmtmod) {4  __fmt = __ctp.narrow (__pat [1], 0); switch (__fmt) {3 // check valid format modifiersK case 'c': case 'C': case 'x': case 'X': case 'y': case 'Y': ++__pat; break; case '\0': break; default:I __fmt = 0; // `pat' doesn't point to a valid format } }' else if ('O' == __fmtmod) { 4 __fmt = __ctp.narrow (__pat [1], 0); switch (__fmt) {3 // check valid format modifiersK case 'd': case 'e': case 'H': case 'I': case 'm': case 'M':K case 'S': case 'u': case 'U': case 'V': case 'w': case 'W': case 'y': ++__pat; break; case '\0': break; default:I __fmt = 0;  // `pat' doesn't point to a valid format } } else {$ __fmt = __fmtmod; __fmtmod = 0; }% if (char (-1) != __fmt) {N __it = do_put (__it, __flags, __fill, __tmb, __fmt, __fmtmod); continue; } } *__it = *__pat; ++__it; } return __it;}} // namespace _V3_LOCALEE#if defined(__VMS) && define d(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endifww ment Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 C FR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/&#ifndef _RWSTD_LOC_TIME_PUT_H_INCLUDED&#define _RWSTD_LOC_TIME_PUT_H_INCLUDED"#include #include #include #include _RWSTD_CTIME#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __ environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) {struct _RWSTD_EXPORT ios_base;} // namespace std _RWSTD_NAMESPACE (_V3_LOCALE) { // 22.2.5.3template ) > struct time_pu t: _RW::__rw_facet{" typedef _CharT char_type;" typedef _OutputIter iter_type;1 _EXPLICIT time_put (_RWSTD_SIZE_T __refs = 0)& : _RW::__rw_facet (__refs) { } // 22.2.5.3.1, p1> iter_type put (iter_type, ios_base&, char_type, const tm*,= const char_type*, const char_type*) const;H iter_type put (iter_type __it, ios_base& __flags, char_type __fill, L const tm* __tmb, char __fmt, char __modifier = 0) const {I  return do_put (__it, __flags, __fill, __tmb, __fmt, __modifier);  }! static _RW::__rw_facet_id id; protected: // 22.2.5.3.2, p1 virtual iter_typeJ do_put (iter_type, ios_base&, char_type, const tm*, char, char) const;}; // 22.2.5.2template ) >;class time_put_byname: public time_put<_CharT, _OutputIter>{ char _C_namebuf [32];public:K _EXPLICIT time _put_byname (const char *__name, _RWSTD_SIZE_T __ref = 0)# : time_put<_CharT>(__ref) {B this->_C_set_name (__name, _C_namebuf, sizeof _C_namebuf); }};} // namespace _V3_LOCALEE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif%#if _RWSTD_DEFINE_TEMPLATE (TIME_PUT)(# include -#endif // _RWSTD_DEFINE_TEMPLATE (TIME_PUT)E#if defined(__VMS) && defined(__DECCXX ) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif6// Library's time_put instantiations for char, wchar_t _RWSTD_NAMESPACE (_V3_LOCALE) { ;_RWSTD_INSTANTIATE_1 (struct _RWSTD_EXPORT time_put);#ifndef _RWSTD_NO_WCHAR_T>_RWSTD_INSTANTIATE_1 (struct _RWSTD_EXPORT time_put);#endif // _RWSTD_NO_WCHAR_T} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma _ _extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif*#endif // _RWSTD_LOC_TIME_PUT_H_INCLUDEDww jp7ԦL/*************************************************************************** *F * _messages.cc - Definitions for the Standard Library messaging facet *4 * $Id: //stdlib/3.0-rel/include/rw/_messages.cc#2 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consiste nt with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This comp uter software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endif#include E#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) { template locale:: id messages<_CharT>::id;template '_TYPENAME messages<_CharT>::string_type<messages<_CharT>::do_get (__rw_messages_base::catalog __cat,< int __set,> int __msgid,C const string_type &__dflt) const{@ const char *__text = _C_get_message (__cat, __set, __msgid);F // The following is wrong -- it should be using codecvt instead ofM // ctype.widen, but this requires an effective codecvt implementation ... if (__text) {$ const ctype<_CharT>& __ctp =A _USE_FACET (ctype, _C_get_locale (__cat));#ifndef _RWSTD_NO_EXT_LOCALE- return __ctp.widen (string (__text));#else' size_t __len = strlen (__text);8 char_type *__wide_text = new _CharT [__len + 1];: __ctp.widen (__text, __text + __len, __wide_text);= string_type __str (__wide_text, __wide_text + __len); delete[] __wide_text; return __str; #endif // _RWSTD_NO_EXT_LOCALE } return __dflt;}} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endifww p7ԦL/*************************************************************************** *F * _messages.h - Declarations for the Standard Library messaging facet *E * This is an internal header file used to implement the C++ Standard? * Library. It should never be #included directly by a program. *3 * $Id: //stdlib/3.0-rel/include/rw/_messages.h#2 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard D evelopment Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software , Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights a t 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/"#ifndef _RWSTD_MESSAGES_H_INCLUDED"#define _RWSTD_MESSAGES_H_INCLUDED#include #ifdef _V3_LOCALE'# include #else#include #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"#  pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) { "struct _RWSTD_EXPORT messages_base{ typedef int catalog;};<class _RWSTD_EXPORT __rw_messages_base: public messages_base{ string _C_loc_name; protected:E // We require a LC_MESSAGES name to be fixed at construction timeI // so that subsequent operations can be independent of changes to the // C library locale.- __rw_messages_base (const string &__name) : _C_loc_name (__name) { }= catalog _C_cat_open (const string&, const locale&) const;9 const char* _C_get_message (catalog, int, int) const;0 const locale& _C_get_locale (catalog) const;& void _C_cat_close (catalog) const;3 static string _C_get_locale_name (const char *);}; // 22.2.7.1template %class messages: public locale::facet,) public __rw_messages_base{public: typedef _CharT char_type;; typedef basic_string,< allocator > string_type;* _EXPLICIT messages (size_t __refs = 0)3 : locale::facet (__refs, locale::messages)," __rw_messages_base ("C") { }C catalog open (const string& __fun, con st locale& __loc) const {& return do_open (__fun, __loc); }9 string_type get (catalog __c, int __set, int __msgid,5 const string_type& __df) const {2 return do_get (__c, __set, __msgid, __df); }$ void close (catalog __c) const { do_close (__c); } static locale::id id; // Implementation:A enum { _C_facet_cat = locale::messages, _C_ok_implicit = 1 }; protected:2 virtual catalog do_open (const str ing &__name,9 const locale &__loc) const {+ return _C_cat_open (__name, __loc); }M virtual string_type do_get (catalog, int, int, const string_type&) const;/ virtual void do_close (catalog __c) const { _C_cat_close (__c); }2 messages (size_t __refs, const string &__name)4 : locale::facet (__refs, locale::messages),& __rw_messages_base (__name) { }private:!#ifdef _RWSTD_NO_MEMBER_TEMP LATES, virtual locale::id &_C_get_id () const { return id; }&#endif // _RWSTD_NO_MEMBER_TEMPLATES};:_RWSTD_INSTANTIATE_1 (class _RWSTD_EXPORT messages);#ifndef _RWSTD_NO_WCHAR_TYPE=_RWSTD_INSTANTIATE_1 (class _RWSTD_EXPORT messages); #endif // _RWSTD_NO_WCHAR_TYPE // 22.2.7.2template .class messages_byname: public messages<_CharT>{public:= typedef messages_base::catalog catalog;A typede f _TYPENAME messages <_CharT>::string_type string_type;E _EXPLICIT messages_byname (const char *__name, size_t __refs = 0)$ : messages<_CharT> (__refs,L __rw_messages_base::_C_get_locale_name (__name)) { }};} // namespace std_RWSTD_NAMESPACE (__rw) { ##ifndef _RWSTD_NO_FUNC_PARTIAL_SPECtemplate %inline _STD::messages_byname<_CharT>*:__rw_create_classic_facet (_STD::messages_byname<_CharT>*){2 retu rn new _STD::messages_byname<_CharT>("C");}template inline _STD::messages<_CharT>*E__rw_create_named_facet (_STD::messages<_CharT>*, const char *__name,0 _RWSTD_C::size_t __ref){ return9 new _STD::messages_byname<_CharT>(__name, __ref);}template %inline _STD::messages_byname<_CharT>*L__rw_create_named_facet (_STD::messages_byname<_CharT>*, const char *__name,0 _RWSTD_C::size_t __ref) { return 9 new _STD::messages_byname<_CharT>(__name, __ref);}3#else // if defined (_RWSTD_NO_FUNC_PARTIAL_SPEC)_RWSTD_SPECIALIZED_FUNCTION#inline _STD::messages_byname*8__rw_create_classic_facet (_STD::messages_byname*){0 return new _STD::messages_byname("C");}_RWSTD_SPECIALIZED_FUNCTION#inline _STD::messages_byname*J__rw_create_named_facet (_STD::messages_byname*, const char *__name,0 _RWST D_C::size_t __ref){: return new _STD::messages_byname(__name, __ref);}_RWSTD_SPECIALIZED_FUNCTIONinline _STD::messages*C__rw_create_named_facet (_STD::messages*, const char *__name,0 _RWSTD_C::size_t __ref){: return new _STD::messages_byname(__name, __ref);}#ifndef _RWSTD_NO_WCHAR_T_RWSTD_SPECIALIZED_FUNCTION&inline _STD::messages_byname*;__rw_create_classic_facet (_STD::messages_byname*){ 3 return new _STD::messages_byname("C");}_RWSTD_SPECIALIZED_FUNCTIONinline _STD::messages*F__rw_create_named_facet (_STD::messages*, const char *__name,0 _RWSTD_C::size_t __ref){= return new _STD::messages_byname(__name, __ref);}_RWSTD_SPECIALIZED_FUNCTION&inline _STD::messages_byname*M__rw_create_named_facet (_STD::messages_byname*, const char *__name,0 _RWSTD_ C::size_t __ref){= return new _STD::messages_byname(__name, __ref);}#endif // _RWSTD_NO_WCHAR_T'#endif // _RWSTD_NO_FUNC_PARTIAL_SPEC} // namespace __rwE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif%#if _RWSTD_DEFINE_TEMPLATE (MESSAGES)$# include #endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif#endif // _V3_LOCALE&#endif // _RWSTD_MESSAGES_H_INCLUDEDww p7ԦL/*************************************************************************** *@ * _money.cc - Definitions for the Standard Library money facets *1 * $Id: //stdlib/3.0-rel/include/rw/_money.cc#2 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and othe r laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer sof tware is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L *** ***********************************************************************/#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endif#include _RWSTD_CWCHARE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (__rw) { _USING (_RWSTD_C::size_t);9// --------------------- ---------------------------------?// Template __rw_moneypunct_impl_data<_CharT> member templates.9// ------------------------------------------------------template <__rw_moneypunct_impl_data<_CharT>::__rw_moneypunct_impl_data3 (const __rw_moneypunct_init_data<_CharT> *__mp){ if (!__mp) { this->_C_dp = _CharT('.'); this->_C_ts = _CharT(','); _C_fd = 0; } else { this->_C_dp = __mp->_C_dp; this->_C_ts = __mp->_C_ts; this->_C_gr =  __mp->_C_gr; _C_cs = __mp->_C_cs; _C_ps = __mp->_C_ps; _C_ns = __mp->_C_ns; _C_fd = __mp->_C_fd; _C_pf = __mp->_C_pf; _C_nf = __mp->_C_nf; if (__mp->_C_del)* delete[] _RWSTD_CONST_CAST (char*,I _RWSTD_REINTERPRET_CAST (const char*,D __mp)); }}template (const __rw_moneypunct_init_data<_CharT>*H__ rw_fixup_moneypunct_init (const __rw_moneypunct_init_data *__mp,$ _CharT*){ if (!__mp) return 0;E typedef _STD::char_traits _CharTraits;A typedef _STD::char_traits<_CharT> _Traits;@ typedef _STD::ctype<_CharT> _Ctype;B typedef _STD::codecvt<_CharT, char, _STD::mbstate_t> _Codecvt;I typedef _STD::basic_string<_CharT, _Traits, _STD::allocator<_CharT> >  _String;> // FIXME: use the (possibly named) locale whose moneypunct= // facet is being intialized here to convert lconv( // multibyte strings 8 // FIXME: this also causes a deadlock the first timeH // use_facet >(locale::classic ()) // is called...2 _STD::locale __loc = _STD::locale::classic ();= const _Codecvt &__cvt = _STD_USE_FACET (_Codecvt, __loc);? _String __cs = __cvt.in (__mp->_ C_cs); // currency symbol= _String __ps = __cvt.in (__mp->_C_ps); // positive sign= _String __ns = __cvt.in (__mp->_C_ns); // negative sign: // compute the number of chars and charT's to allocateA size_t __xtra_chars = _CharTraits::length (__mp->_C_gr) + 1;N size_t __xtra_charTs = __cs.length () +__ps.length () + __ns.length() + 3;+ // allocate a "variable size" structure- __rw_moneypunct_init_data<_CharT> *__res;H __res = _RWSTD_REINTERPRET_CAST (__rw_m oneypunct_init_data<_CharT>*, < new char [ sizeof (*__res)9 + __xtra_charsN + __xtra_charTs * sizeof(_CharT)]);9 const _Ctype &__ctp = _STD_USE_FACET (_Ctype, __loc); // initialize members __res->_C_del = true;. __res->_C_dp = __ctp.widen (__mp->_C_dp);. __res->_C_ts = __ctp.widen (__mp->_C_ts); __res->_C_fd = __mp->_C_fd; __res->_C_pf = __ mp->_C_pf; __res->_C_nf = __mp->_C_nf;C // append null-terminated charT strings to the end of structureA _CharT *__p = _RWSTD_REINTERPRET_CAST (_CharT*, (__res + 1)); // check alignmentF _RWSTD_ASSERT (!( _RWSTD_REINTERPRET_CAST (_RWSTD_C::size_t, __p)) % sizeof (_CharT))); _RWSTD_C::size_t __n;P __res->_C_cs = _Traits::copy (__p, __cs.c_str (), __n = __cs.length () + 1); __p += __n;P __res->_C_ps = _Traits::copy (__p, __ps.c_st r (), __n = __ps.length () + 1); __p += __n;P __res->_C_ns = _Traits::copy (__p, __ns.c_str (), __n = __ns.length () + 1); __p += __n;; // append a null terminated char string to the very endK __res->_C_gr = _CharTraits::copy (_RWSTD_REINTERPRET_CAST (char*, __p),A __mp->_C_gr, __xtra_chars); if (__mp->_C_del)> // redundant const_cast for compilers such as MSVC 6.0= // that do not conform to 5.3.5, p2, Note 2 of the IS+ delete[] _RWSTD_CONST_CAST (char*, J _RWSTD_REINTERPRET_CAST (const char*, D __mp)); return __res;}template (const __rw_moneypunct_init_data<_CharT>*#__rw_moneypunct_impl_data<_CharT>::6_C_get_init_by_name_ (const char *__name, bool __intl){J return __rw_fixup_moneypunct_init (_C_get_named_init (__name, __intl),3  (_CharT*)0);}D// -----------------------------------------------------------------E// Template class __rw_money_handler_base_1<_CharT> member templates.D// -----------------------------------------------------------------template (const __rw_moneypunct_impl_data<_CharT>&#__rw_money_handler_base_1<_CharT>:::_C_get_punct_data (const _STD::locale &__loc, bool __intl){ if (__intl) {; typedef _STD::moneypunct<_CharT, true> _MoneyPunct;3 re turn _STD_USE_FACET (_MoneyPunct, __loc); } else {< typedef _STD::moneypunct<_CharT, false> _MoneyPunct;3 return _STD_USE_FACET (_MoneyPunct, __loc); }}C// ----------------------------------------------------------------D// Template class __rw_money_reader_base_1<_CharT> member templates.C// ----------------------------------------------------------------template :void __rw_money_reader_base_1<_CharT>::_C_get_money_string+ (string_ty pe &__res, const char *__end){. _RWSTD_ASSERT (__end >= reader._C_digits);6 _RWSTD_C::size_t __len = __end - reader._C_digits;- if (reader._C_state & reader._C_negative) __len++; __res.resize(0); __res.reserve(__len);+ if (reader._C_state & reader._C_negative)H __res+=reader._C_dmap._C_punct_chars[__rw_digit_map_base::_C_minus];# const char *__d=reader._C_digits; const char *__last=__end-1;& while (__d<__last && *__d==0) __d++; for ( ; __d<=_  _last; __d++)/ __res+=reader._C_dmap._C_digit_chars[*__d];}N// ---------------------------------------------------------------------------N// Template class __rw_money_reader_base_2 member templates.N// ---------------------------------------------------------------------------)template .__rw_money_reader_base_2<_CharT, _InputIter>::B__rw_money_reader_base_2 (_InputIter &__begin, _InputIter &__end, 2 _STD:: ios_base &__flags,H const __rw_moneypunct_impl_data<_CharT> &__mp)J : __rw_digit_reader<_CharT, _InputIter>(__begin, __end, __flags, __mp), E __rw_money_reader_base_1<_CharT>(_C_this_as_digit_reader(), __mp){ this->_C_base = 10;& this->_C_state |= this->_C_signed;})template 4char* __rw_money_reader_base_2<_CharT, _InputIter>:: _C_get_money_digits (void){ _CharT __c;5 // Always parse input according  to negative format.D const _STD::money_base::pattern &patt = this->_C_get_neg_format();G // If this ends up non-0, it points to trailing sign char(s) that are( // required at the end of the pattern. const _CharT *__sign = 0;I bool need_curr = 0 != (this->_C_io.flags() & _STD::ios_base::showbase); bool got_curr=false;( int __frac=this->_C_get_frac_digits(); char *__end = this->_C_digits;> const char *__p=patt.field, *__pend=__p+sizeof patt.field-1;2 for ( ; !this->_C_ error && __p<=__pend; __p++) { switch (*__p) {" case _STD::money_base::space:! case _STD::money_base::none: while ( !this->eof()I && this->_C_ctyp.is (_STD::ctype_base::space, *this->_C_in)) this->_C_in++; break;# case _STD::money_base::symbol: if (!this->eof()) {> const _CharT *curr=this->_C_get_curr_symbol().c_str();( if ((__c=*this->_C_in)==*curr) {C // We ate a character, so rest of symbol must be pre sent. need_curr=true; do { this->_C_in++;( if (*++curr==_CharT('\0')) { got_curr=true; break; }> } while (!this->eof() && (__c=*this->_C_in)==*curr); } }! if (need_curr && !got_curr)1 this->_C_error|=this->_C_bad_curr_symbol; break;! case _STD::money_base::sign: if (!this->eof()) {6 __sign = this->_C_get_negative_sign().c_str();.  if ((__c = *this->_C_in) == *__sign) {. this->_C_state |= this->_C_negative; __sign++; this->_C_in++; } else {6 __sign=this->_C_get_positive_sign().c_str(); if (__c == *__sign) { __sign++; this->_C_in++; } else __sign = 0; } } break;" case _STD::money_base::value:) __end=this->_C_get_digits (int ());6 if (!this->_C_error && __frac && !this-> eof() &&5 *this->_C_in==this->_C_get_decimal_point()) { this->_C_in++; char *frac_start=__end;/ __end=this->_C_get_digit_string(__end); if (!this->_C_error) {( __frac-=int(__end-frac_start); if (__frac<0) {F // Too many fractional digits in input. We truncate. The7 // alternative would be to return an error. __end+=__frac; __frac=0; } } }#  if (__end == this->_C_digits)+ this->_C_error|=this->_C_no_digits;/ else if (!this->_C_error && __frac > 0) {K // Add trailing zeros until the correct number of fractional digits // is reached. do {> if (__end == this->_C_digits + this->_C_bufsize). __end = this->_C_realloc (); *__end++ = 0; } while (--__frac); } break; } } if (__sign && !this->_C_error)P  // We ate one _CharT of a sign earlier, rest of sign must be present at end. while (*__sign)4 if (!this->eof() && *this->_C_in == *__sign++) this->_C_in++; else {* this->_C_error|=this->_C_bad_sign; break; }+ this->_C_frac_beg=this->_C_exp_beg=__end; return __end;}E// ------------------------------------------------------------------C// Template __rw_money_reader<_CharT, _InputIter> member templates.E// --------------------------- ---------------------------------------=// ---------------------------------------------------------->// Template __rw_money_writer_base_1<_CharT> member templates.=// ----------------------------------------------------------template Cvoid __rw_money_writer_base_1<_CharT>::_C_put_money (_CharT __fill){* const char *__start = writer._C_start;0 bool __neg = '-' == *__start; // negative?> if ('-' == *__start || '+' == *__start || ' ' == *__start)  ++__start;- // small auto buffer for the average caseI _CharT __wide_buf [__rw_digit_writer_base_1<_CharT>::_C_DEF_BUFSIZE]; // required buffer size2 const size_t __size = writer._C_end - __start;' // allocate more space if necessaryP _CharT *__pbuf = __size > __rw_digit_writer_base_1<_CharT>::_C_DEF_BUFSIZE ?) new _CharT [__size] : __wide_buf;" // widen into temporary buffer: writer._C_ctyp.widen (__start, writer._C_end, __pbuf); // ref ormat as required> _C_put_money_sub (__pbuf, __pbuf + __size, __neg, __fill); // delete only if allocated if (__pbuf != __wide_buf) delete[] __pbuf;}template 3void __rw_money_writer_base_1<_CharT>::_C_put_money0 (const string_type& __digits, _CharT __fill){ const _CharT *punct => __rw_digit_map<_CharT>::_C_get_digit_map(writer._C_ctyp) ._C_get_punct();+ const _CharT *__start = __digits.c_str(); bool __neg;7 if (*_ _start==punct[__rw_digit_map_base::_C_minus]) { __neg=true; __start++; } else __neg=false;D const _CharT *end=writer._C_ctyp.scan_not(_STD::ctype_base::digit,5 __start, P __digits.c_str()+__digits.length());0 _C_put_money_sub(__start, end, __neg, __fill);}L// -------------------------------------------------------------------------K// Template __rw_money_writer_base_2<_CharT, _Ou tputIter> member templates.L// -------------------------------------------------------------------------*template Dvoid __rw_money_writer_base_2<_CharT, _OutputIter>::_C_put_money_subK (const _CharT *__begin, const _CharT *__end, bool __neg, _CharT __fill){) const _STD::money_base::pattern *__pat;* const string_type *__sign; if (__neg) {* __pat = &this->_C_get_neg_format();- __sign = &this->_C_get_negative_sign();  } else {* __pat = &this->_C_get_pos_format();- __sign = &this->_C_get_positive_sign(); }. int __frac_dig = this->_C_get_frac_digits();6 int __int_dig = int (__end - __begin) - __frac_dig; int __ungrp; int __pad; if (__int_dig<0) { __pad = -__int_dig; __int_dig = 0; } else __pad = 0; _CharT __sep = _CharT (); if (__int_dig > 0) {I __ungrp = this->_C_calc_groups (__int_dig, this->_C_get_grouping ()); if (this->_C_num_groups)+ __sep = this->_C_get_thousands_sep(); } else __ungrp = 0; const char *__p;: const char *__pend = __pat->field + sizeof __pat->field;" int __l_fill = 0; // left fill& int __i_fill = 0; // internal fill# int __r_fill = 0; // right fill if (this->_C_width) { int __n=0;/ for (__p=__pat->field; __p<__pend; __p++) { switch (*__p) {$ case _STD::money_base::space: __n++; break;5 case _STD::money_base::symbol:// sa ve pptr pos6 if (this->_C_flags & _STD::ios_base::showbase)8 __n+=int(this->_C_get_curr_symbol().length()); break;# case _STD::money_base::sign:& __n += int (__sign->length()); break;$ case _STD::money_base::value:+ __n+=__int_dig+this->_C_num_groups; if (__frac_dig) __n+=__frac_dig+1; break; } }+ if ((__n = this->_C_width - __n) > 0) { switch (this->_C_adjust) {, c ase __rw_digit_writer_base::_C_left: __r_fill=__n; break;0 case __rw_digit_writer_base::_C_internal: __i_fill=__n; break; default: __l_fill=__n; } } this->_C_width=0; } if (__l_fill) do *this->_C_out++=__fill; while (--__l_fill);* const _CharT *__schar = __sign->c_str();+ for (__p=__pat->field; __p<__pend; __p++) switch (*__p) {# case _STD::money_base::symbol:4 if (this ->_C_flags & _STD::ios_base::showbase)B this->_C_put_keyword (this->_C_get_curr_symbol(), __fill); break;! case _STD::money_base::sign: if (*__schar)# *this->_C_out++=*__schar++; break;" case _STD::money_base::value: while (__ungrp--)# *this->_C_out++=*__begin++;% while (this->_C_num_groups--) { *this->_C_out++=__sep;# while ((*this->_C_group)--)% *this->_C_out++=*__begin++; this->_C_gro up++; } if (__frac_dig) {5 *this->_C_out++=this->_C_get_decimal_point(); while (__pad--) { __frac_dig--;3 *this->_C_out++=this->_C_ctyp.widen('0'); } while (__frac_dig-->0)% *this->_C_out++=*__begin++; } break;" case _STD::money_base::space:N // a literal space is required, followed by any padding (with `fill')4 *this->_C_out++ = this->_C_ctyp.widen(' '); // Fall th rough ...! case _STD::money_base::none: if (__i_fill)" do *this->_C_out++=__fill; while (--__i_fill); break; } while (*__schar) *this->_C_out++=*__schar++; if (__r_fill+=__i_fill) { do *this->_C_out++=__fill; while (--__r_fill); }}} // namespace __rw_RWSTD_NAMESPACE (std) { 9// ------------------------------------------------------8// Facet money_get<_CharT, _InputIter> member templates.9// -------  -----------------------------------------------)template -locale::id money_get<_CharT, _InputIter>::id;K// Warning -- these functions do not input actual monetary value; they just/// input numbers that represent monetary value.)template *_InputIter money_get<_CharT, _InputIter>::Ndo_get (_InputIter __begin, _InputIter __end, bool __intl, ios_base& __flags, < ios_base::iostate& __err, long double& __units) const { H _RW::__rw_money_reader<_CharT, _InputIter> __reader (__begin, __end,I __flags,__intl);J long double __val = __reader._C_parse (__reader._C_get_money_digits(),1 0.0L);  __err = ios_base::goodbit;  if (__reader._C_error)" __err = ios_base::failbit; else __units = __val;  if (__reader.eof ())" __err |= ios_base::eofbit;  re turn __begin;})template *_InputIter money_get<_CharT, _InputIter>::Mdo_get (_InputIter __begin, _InputIter __end, bool __intl, ios_base &__flags,> ios_base::iostate &__err, string_type &__digits) const{E _RW::__rw_money_reader<_CharT, _InputIter> reader(__begin, __end,G __flags, __intl); __err = ios_base::goodbit;  if (reader._C_error)" __err = ios_base::failbit;  elseL reader._C_get_money_string (__digits, reader._C_get_money_digits());  if (reader.eof ())" __err |= ios_base::eofbit;  return __begin;}:// -------------------------------------------------------9// Facet money_put<_CharT, _OutputIter> member templates.:// -------------------------------------------------------*template .locale::id money_put<_CharT, _OutputIter>::id;*template  ,_OutputIter money_put<_CharT, _OutputIter>::Ido_put (_OutputIter __it, bool __intl, ios_base& __flags, _CharT __fill, #ifndef _RWSTD_NO_LONG_DOUBLE" long double __quant) const#else double __quant) const#endif{P _RW::__rw_money_writer<_CharT, _OutputIter> __writer(__it, __flags, __intl);" __writer._C_digitize(__quant);" __writer._C_put_money(__fill); return __it;}*template 2_OutputIter money_put<_CharT, _OutputIte r>::do_putF (_OutputIter __it, bool __intl, ios_base& __flags, _CharT __fill, ) const string_type& __digits) const {P _RW::__rw_money_writer<_CharT, _OutputIter> __writer(__it, __flags, __intl);- __writer._C_put_money (__digits, __fill); return __it;}1// ----------------------------------------------3// Facet moneypunct<_CharT, Intl> member templates.1// ----------------------------------------------#template )locale::id moneypunct<_C harT, _Intl>::id;*#ifndef _RWSTD_NO_STATIC_CONST_MEMBER_INIT#template +const bool moneypunct<_CharT, _Intl>::intl;#endif#template =_CharT moneypunct<_CharT, _Intl>::do_decimal_point () const { return this->_C_dp;}#template =_CharT moneypunct<_CharT, _Intl>::do_thousands_sep () const { return this->_C_ts;}#template 8string moneypunct<_CharT, _Intl>::do_gro uping () const { return this->_C_gr;}#template 0_TYPENAME moneypunct<_CharT, _Intl>::string_type4moneypunct<_CharT, _Intl>::do_curr_symbol () const { return this->_C_cs;}#template 0_TYPENAME moneypunct<_CharT, _Intl>::string_type6moneypunct<_CharT, _Intl>::do_positive_sign () const { return this->_C_ps;}#template 0_TYPENAME moneypunct<_CharT, _Intl>::string_type6moneypunct<_CharT,! _Intl>::do_negative_sign () const { return this->_C_ns;}#template 8int moneypunct<_CharT, _Intl>::do_frac_digits () const { return this->_C_fd;}#template money_base::pattern3moneypunct<_CharT, _Intl>::do_pos_format () const { return this->_C_pf;}#template money_base::pattern3moneypunct<_CharT, _Intl>::do_neg_format () const { return this->_C_nf;}#template <void moneypunct<_CharT, _Intl>::_C_initfacet (const locale&){% this->_C_dp = do_decimal_point();% this->_C_ts = do_thousands_sep(); this->_C_gr = do_grouping();# this->_C_cs = do_curr_symbol();% this->_C_ps = do_positive_sign();% this->_C_ns = do_negative_sign();# this->_C_fd = do_frac_digits();" this->_C_pf = do_pos_format();" this->_C_nf = do_neg_format();}} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !de fined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endifww$ Pp7ԦL/*************************************************************************** *- * _money.h - Definitions of the money facets *E * This is an internal header file used to implement the C++ Standard? * Library. It should never be #included directly by a program. *0 * $Id: //stdlib/3.0-rel/include/rw/_money.h#2 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. * % F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved.&  *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be pr ' ovided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as ( applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/#ifndef _RWSTD_MONEY_H_INCLUDED#define _RWSTD_MONEY_H_INCLUDED#include #ifdef _V3_LOCALE(# include (# include )# include #else#include #include #include #include #include #include #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) { struct* money_base{3 enum part { none, space, symbol, sign, value };& struct pattern { char field[4]; };};} // namespace std_RWSTD_NAMESPACE (__rw) { template class __rw_money_handler_base_1;template class __rw_money_reader_base_1;template class __rw_money_writer_base_1;*template class __rw_money_reader_base_2;*template class __rw_money_wri+ ter_base_2;A// --------------------------------------------------------------F// Implementation class template -- __rw_moneypunct_init_data<_CharT>.A// --------------------------------------------------------------K// Structure used to initialize a rwstd::__rw_moneypunct_impl_data<_CharT>.template class __rw_moneypunct_init_data{public:B bool _C_del; // Delete when initialization is done _CharT _C_dp,E _C_ts; // , Decimal point and thousands separator0 const char *_C_gr; // Grouping pattern6 const _CharT *_C_cs; // Currency symbol string const _CharT *_C_ps,B *_C_ns; // Positive and negative sign strings; int _C_fd; // Number of fractional digits? _STD::money_base::pattern _C_pf; // Positive format pattern? _STD::money_base::pattern _C_nf; // Negative format pattern};0// ---------------------------------------------5// Implementat- ion class -- __rw_moneypunct_impl_base.0// ---------------------------------------------;// Contains parts of __rw_moneypunct_impl_data<_CharT> that+// do not depend on the template parameter.-class _RWSTD_EXPORT __rw_moneypunct_impl_base{public:6 static const _RW::__rw_moneypunct_init_data** _C_get_named_init (const char*, bool);};@// -------------------------------------------------------------F// Implementation class template -- __rw_moneypunct_impl_data<_CharT. >.@// -------------------------------------------------------------3// moneypunct<_CharT, _Intl> derives from this (viaH// __rw_moneypunct_impl<_CharT, _Intl>) to get its private data members.template class __rw_moneypunct_impl_data( : public __rw_moneypunct_impl_base, $ public __rw_punct_data<_CharT>{3 friend class __rw_money_handler_base_1<_CharT>;1 friend class _STD::moneypunct<_CharT, false>;0 friend class _STD::moneypunct<_CharT, true>;2/ typedef _STD::char_traits<_CharT> traits_type;M typedef _STD::basic_string<_CharT, traits_type, _STD::allocator<_CharT> > string_type;3 string_type _C_cs; // Currency symbolF string_type _C_ps, // Positive and negative sign strings _C_ns; ? int _C_fd; // Number of fractional digits, // Positive and negative format patterns+ _STD::money_base::pattern _C_pf, _C_nf; protected:I __rw_moneypunct_impl_dat0 a (const __rw_moneypunct_init_data<_CharT>*);, const __rw_moneypunct_init_data<_CharT>*- _C_get_init_by_name_ (const char*, bool);};K_RWSTD_INSTANTIATE_1 (class _RWSTD_EXPORT __rw_moneypunct_impl_data);#ifndef _RWSTD_NO_WCHAR_TN_RWSTD_INSTANTIATE_1 (class _RWSTD_EXPORT __rw_moneypunct_impl_data);#endif // _RWSTD_NO_WCHAR_TE// ------------------------------------------------------------------F// Implementation class template -- __rw_money_handler_b1 ase_1<_CharT>.E// ------------------------------------------------------------------U// Contains common __rw_money_reader and __rw_money_writer functionality that depends)// only on the _CharT template parameter.template class __rw_money_handler_base_1{7 const __rw_moneypunct_impl_data<_CharT> &_C_mpunct; protected:2 typedef _STD::char_traits<_CharT> traits_type;M typedef _STD::basic_string<_CharT, traits_type, _STD::allocator<_CharT> > string_t2 ype;L __rw_money_handler_base_1 (const __rw_moneypunct_impl_data<_CharT> &__p) : _C_mpunct(__p) { }3 static const __rw_moneypunct_impl_data<_CharT>&? _C_get_punct_data (const _STD::locale &__loc, bool __intl);@ const _STD::money_base::pattern& _C_get_pos_format() const { return _C_mpunct._C_pf; }@ const _STD::money_base::pattern& _C_get_neg_format() const { return _C_mpunct._C_nf; }6 const string_type &_C_get_positive_sign ()3 const { return _C_mpunct._C_ps; }6 const string_type &_C_get_negative_sign () const { return _C_mpunct._C_ns; }4 const string_type &_C_get_curr_symbol () const { return _C_mpunct._C_cs; }% int _C_get_frac_digits () const { return _C_mpunct._C_fd; }};K_RWSTD_INSTANTIATE_1 (class _RWSTD_EXPORT __rw_money_handler_base_1);#ifndef _RWSTD_NO_WCHAR_TN_RWSTD_INSTANTIATE_1 (class _RWSTD_EXPORT __rw_money_han4 dler_base_1);#endif // _RWSTD_NO_WCHAR_TD// -----------------------------------------------------------------E// Implementation class template -- __rw_money_reader_base_1<_CharT>.D// -----------------------------------------------------------------:// Contains parts of __rw_money_reader<_CharT, _InputIter>5// that depend only on the _CharT template parameter.template class __rw_money_reader_base_1. : public __rw_money_handler_base_1<_CharT>{ pr5 otected:2 typedef _STD::char_traits<_CharT> traits_type;M typedef _STD::basic_string<_CharT, traits_type, _STD::allocator<_CharT> > string_type;- __rw_digit_reader_base_1<_CharT> &reader;E __rw_money_reader_base_1 (__rw_digit_reader_base_1<_CharT> &__r, 4 const __rw_moneypunct_impl_data<_CharT> &mp)< : __rw_money_handler_base_1<_CharT>(mp), reader(__r) {}public:9 void _C_get_money_string (string_type&, const char*);};J_RWSTD_INSTANT6 IATE_1 (class _RWSTD_EXPORT __rw_money_reader_base_1);#ifndef _RWSTD_NO_WCHAR_TM_RWSTD_INSTANTIATE_1 (class _RWSTD_EXPORT __rw_money_reader_base_1);#endif // _RWSTD_NO_WCHAR_TN// ---------------------------------------------------------------------------O// Implementation class template - __rw_money_reader_base_2<_CharT, _InputIter>N// ---------------------------------------------------------------------------M// Contains parts of __rw_money_reader<_CharT, _In7 putIter> that do not depend%// on the intl constructor parameter.)template class __rw_money_reader_base_24 : public __rw_digit_reader<_CharT, _InputIter>, - public __rw_money_reader_base_1<_CharT>{ protected:2 typedef _STD::char_traits<_CharT> traits_type;M typedef _STD::basic_string<_CharT, traits_type, _STD::allocator<_CharT> > string_type;I __rw_money_reader_base_2 (_InputIter&, _InputIter&, _STD::ios_base&, H 8 const __rw_moneypunct_impl_data<_CharT>&);B __rw_digit_reader_base_1<_CharT> &_C_this_as_digit_reader () { return *this; }public:F char *_C_get_money_digits (void); // Get monetary-format digits};_RWSTD_INSTANTIATE_3 ( class _RWSTD_EXPORT" __rw_money_reader_base_2 > >);#ifndef _RWSTD_NO_WCHAR_T_RWSTD_INSTANTIATE_3 ( class _RWSTD_EXPORT% __rw_m9 oney_reader_base_2 > >);#endif // _RWSTD_NO_WCHAR_TK// ------------------------------------------------------------------------J// Implementation class template -- __rw_money_reader<_CharT, _InputIter>.K// ------------------------------------------------------------------------)template class __rw_money_reader9 : public __rw_money_reader_base_2<_CharT, _InputIt: er>{public:? __rw_money_reader (_InputIter &__begin, _InputIter &__end, < _STD::ios_base &__flags, bool __intl)P : __rw_money_reader_base_2<_CharT, _InputIter> (__begin, __end, __flags,N __rw_money_handler_base_1<_CharT>::_C_get_punct_data(__flags.getloc(),E __intl)) { }};D// -----------------------------------------------------------------E// Implementation class template; -- __rw_money_writer_base_1<_CharT>.D// -----------------------------------------------------------------B// Contains parts of __rw_money_writer<_CharT, _Intl, _OutputIter>5// that depend only on the _CharT template parameter.template class __rw_money_writer_base_1. : public __rw_money_handler_base_1<_CharT>{public:2 typedef _STD::char_traits<_CharT> traits_type;M typedef _STD::basic_string<_CharT, traits_type, _STD::allocator<_CharT> > string_typ< e;& void _C_put_money (_CharT __fill);: void _C_put_money (const string_type&, _CharT __fill); protected:- __rw_digit_writer_base_1<_CharT> &writer;E __rw_money_writer_base_1 (__rw_digit_writer_base_1<_CharT> &__w, G const __rw_moneypunct_impl_data<_CharT> &__mp): : __rw_money_handler_base_1<_CharT>(__mp), writer(__w) { } virtual voidF _C_put_money_sub (const _CharT*, const _CharT*, bool, _CharT) = 0;};J_RWSTD_INSTA = NTIATE_1 (class _RWSTD_EXPORT __rw_money_writer_base_1);#ifndef _RWSTD_NO_WCHAR_TM_RWSTD_INSTANTIATE_1 (class _RWSTD_EXPORT __rw_money_writer_base_1);#endif // _RWSTD_NO_WCHAR_TN// ---------------------------------------------------------------------------O// Implementation class template __rw_money_writer_base_2<_CharT, _OutputIter>N// ---------------------------------------------------------------------------;// Contains parts of __rw_money_writer<_CharT, _Ou> tputIter>8// that do not depend on the intl constructor parameter.*template class __rw_money_writer_base_25 : public __rw_digit_writer<_CharT, _OutputIter>, - public __rw_money_writer_base_1<_CharT>{ protected:2 typedef _STD::char_traits<_CharT> traits_type;M typedef _STD::basic_string<_CharT, traits_type, _STD::allocator<_CharT> > string_type;J __rw_money_writer_base_2 (_OutputIter &__it, _STD::ios_base &__flags, L ? const __rw_moneypunct_impl_data<_CharT> &__mp)H : __rw_digit_writer<_CharT, _OutputIter> (__it, __flags, __mp), I __rw_money_writer_base_1<_CharT> (this_as_digit_writer(), __mp) { } ? __rw_digit_writer_base_1<_CharT> &this_as_digit_writer () { return *this; }O virtual void _C_put_money_sub (const _CharT*, const _CharT*, bool, _CharT);};_RWSTD_INSTANTIATE_3 ( class _RWSTD_EXPORT" __rw_money_writer_base_2@ > >);#ifndef _RWSTD_NO_WCHAR_T_RWSTD_INSTANTIATE_3 ( class _RWSTD_EXPORT% __rw_money_writer_base_2 > >);#endif // _RWSTD_NO_WCHAR_TL// -------------------------------------------------------------------------K// Implementation class template -- __rw_money_writer<_CharT, _OutputIter>.L// ------------------------- A ------------------------------------------------*template class __rw_money_writer: : public __rw_money_writer_base_2<_CharT, _OutputIter>{public:O __rw_money_writer (_OutputIter &__it, _STD::ios_base &__flags, bool __intl)G : __rw_money_writer_base_2<_CharT, _OutputIter> (__it, __flags,N __rw_money_handler_base_1<_CharT>::_C_get_punct_data(__flags.getloc(),E __intl)) B { }};template (const __rw_moneypunct_init_data<_CharT>*M__rw_fixup_moneypunct_init (const __rw_moneypunct_init_data*, _CharT*);_RWSTD_SPECIALIZED_FUNCTION-inline const __rw_moneypunct_init_data*O__rw_fixup_moneypunct_init (const __rw_moneypunct_init_data *__mp, char*){ return __mp;}E// ------------------------------------------------------------------H// Implementation class template -- __rw_moneypunct_impl<_CharT, _Intl>.EC // ------------------------------------------------------------------O// moneypunct<_CharT, _Intl> derives from this to get the parts of its behaviorN// that are specialized for the character type and the _Intl format selection.#template class __rw_moneypunct_impl. : public __rw_moneypunct_impl_data<_CharT>{ protected: __rw_moneypunct_impl ();};_RWSTD_SPECIALIZED_CLASS5class _RWSTD_EXPORT __rw_moneypunct_impl, : public __rw_D moneypunct_impl_data{+ friend class __rw_moneypunct_impl_base; protected:8 typedef __rw_moneypunct_impl_data parent_type;: static const __rw_moneypunct_init_data _C_ivals;G __rw_moneypunct_impl (const __rw_moneypunct_init_data *__mp =$ &_C_ivals) : parent_type (__mp) { }};_RWSTD_SPECIALIZED_CLASS4class _RWSTD_EXPORT __rw_moneypunct_impl, : public __rw_moneypunct_impl_data{+ frE iend class __rw_moneypunct_impl_base; protected:8 typedef __rw_moneypunct_impl_data parent_type;: static const __rw_moneypunct_init_data _C_ivals;G __rw_moneypunct_impl (const __rw_moneypunct_init_data *__mp =$ &_C_ivals) : parent_type(__mp) { }};#ifndef _RWSTD_NO_WCHAR_T_RWSTD_SPECIALIZED_CLASS8class _RWSTD_EXPORT __rw_moneypunct_impl/ : public __rw_moneypunct_impl_data{ protecteF d:; typedef __rw_moneypunct_impl_data parent_type;= static const __rw_moneypunct_init_data _C_ivals;J __rw_moneypunct_impl (const __rw_moneypunct_init_data *__mp =$ &_C_ivals) : parent_type(__mp) { }};_RWSTD_SPECIALIZED_CLASS7class _RWSTD_EXPORT __rw_moneypunct_impl/ : public __rw_moneypunct_impl_data{ protected:; typedef __rw_moneypunct_impl_data parent_type;= G static const __rw_moneypunct_init_data _C_ivals;J __rw_moneypunct_impl (const __rw_moneypunct_init_data *__mp =$ &_C_ivals) : parent_type(__mp) { }};#endif // _RWSTD_NO_WCHAR_T} // namespace __rw_RWSTD_NAMESPACE (std) { B// ---------------------------------------------------------------A// Standard money parsing facet -- money_get<_CharT, _InputIter>.B// ---------------------------------------------------------H ------template ) >%class money_get: public locale::facet{public:! typedef _CharT char_type;! typedef _InputIter iter_type;I typedef basic_string<_CharT, char_traits<_CharT>, allocator<_CharT> > string_type;( _EXPLICIT money_get (size_t __ref=0)4 : locale::facet(__ref, locale::monetary) { }C iter_type get (iter_type __begin, iter_type __end, bool __intl,? I ios_base& __flags, ios_base::iostate& __err,0 long double& __units) const {G return do_get(__begin, __end, __intl, __flags, __err, __units); }C iter_type get (iter_type __begin, iter_type __end, bool __intl,? ios_base& __flags, ios_base::iostate& __err,1 string_type &__digits) const {I return do_get (__begin, __end, __intl, __flags, __err, __digits); } static locale::id id; J // Implementation:A enum { _C_facet_cat = locale::monetary, _C_ok_implicit = 1 }; protected:F virtual iter_type do_get (iter_type, iter_type, bool, ios_base&, F ios_base::iostate&, long double&) const;F virtual iter_type do_get (iter_type, iter_type, bool, ios_base&, F ios_base::iostate&, string_type&) const;private:!#ifdef _RWSTD_NO_MEMBER_TEMPLATES1 locale::id &_C_get_id () const { return id; }#endif};K _RWSTD_INSTANTIATE_3 ( class _RWSTD_EXPORTC money_get > >);#ifndef _RWSTD_NO_WCHAR_T_RWSTD_INSTANTIATE_3 ( class _RWSTD_EXPORTL money_get > >);#endif // _RWSTD_NO_WCHAR_TF// -------------------------------------------------------------------E// Standard money formatting facet -- money_put<_CharT, _OutputIter>.F// ---------------------------------------L ----------------------------template ) >%class money_put: public locale::facet{public: typedef _CharT char_type;" typedef _OutputIter iter_type;I typedef basic_string<_CharT, char_traits<_CharT>, allocator<_CharT> > string_type;( _EXPLICIT money_put (size_t __ref=0)4 : locale::facet(__ref, locale::monetary) { }#ifndef _RWSTD_NO_LONG_DOUBLEB iter_type put (i M ter_type __it, bool __intl, ios_base& __flags,? char_type __fill, long double __quant) const#elseF iter_type put (iter_type __it, bool __intl, ios_base& __flags,> char_type __fill, double __quant) const#endifC { return do_put (__it, __intl, __flags, __fill, __quant); }B iter_type put (iter_type __it, bool __intl, ios_base& __flags,I char_type __fill, const string_type& __digits) const {? return do_put(__N it, __intl, __flags, __fill, __digits); }  static locale::id id; // Implementation:A enum { _C_facet_cat = locale::monetary, _C_ok_implicit = 1 }; protected:#ifndef _RWSTD_NO_LONG_DOUBLE: virtual iter_type do_put (iter_type, bool, ios_base&, < char_type, long double) const;#else: virtual iter_type do_put (iter_type, bool, ios_base&, 7 char_type, double) const;#endif: virtual iter_type O do_put (iter_type, bool, ios_base&, C char_type, const string_type&) const;private:!#ifdef _RWSTD_NO_MEMBER_TEMPLATES5 locale::id &_C_get_id (void) const { return id; }#endif};_RWSTD_INSTANTIATE_3 ( class _RWSTD_EXPORTC money_put > >);#ifndef _RWSTD_NO_WCHAR_T_RWSTD_INSTANTIATE_3 ( class _RWSTD_EXPORTL money_put >P >);#endif // _RWSTD_NO_WCHAR_T>// -----------------------------------------------------------@// Standard money punctuation facet -- moneypunct<_CharT, bool>.>// -----------------------------------------------------------Atemplate ;class moneypunct: public locale::facet, public money_base, A public _RW::__rw_moneypunct_impl<_CharT, _Intl>{public: typedef _CharT char_type;I typedef basic_stringQ <_CharT, char_traits<_CharT>, allocator<_CharT> > string_type;- _RWSTD_STATIC_CONST (bool, intl = _Intl);N // The second parameter (i) to the constructor is implementation specific.9 // For portable code, always let it default as shown.)#ifndef _RWSTD_NO_TEMPLATE_ON_RETURN_TYPE, _EXPLICIT moneypunct (size_t __ref = 0, I const _RW::__rw_moneypunct_init_data<_CharT>* =6 moneypunct::_C_get_ivals());#else& _EXPLI R CIT moneypunct (size_t = 0);M moneypunct (size_t __ref, const _RW::__rw_moneypunct_init_data<_CharT>*);-#endif // _RWSTD_NO_TEMPLATE_ON_RETURN_TYPEF char_type decimal_point() const { return do_decimal_point(); }F char_type thousands_sep() const { return do_thousands_sep(); }A string grouping() const { return do_grouping(); }E string_type curr_symbol() const { return do_curr_symbol(); };F string_type positive_sign() const { return do_positiS ve_sign(); }F string_type negative_sign() const { return do_negative_sign(); }D int frac_digits() const { return do_frac_digits(); }C pattern pos_format() const { return do_pos_format(); }C pattern neg_format() const { return do_neg_format(); } static locale::id id; // Implementation:A enum { _C_facet_cat = locale::monetary, _C_ok_implicit = 1 }; protected:3 virtual char_type do_decimal_point() const;3 virtual char T _type do_thousands_sep() const;3 virtual string do_grouping() const;3 virtual string_type do_curr_symbol() const;3 virtual string_type do_positive_sign() const;3 virtual string_type do_negative_sign() const;3 virtual int do_frac_digits() const;3 virtual pattern do_pos_format() const;3 virtual pattern do_neg_format() const;private:. virtual void _C_initfacet (const locale&);!#ifdef _RWSTD_NO_MEMBER_TEMPU LATES5 locale::id &_C_get_id (void) const { return id; }#endifpublic:J static const _RW::__rw_moneypunct_init_data<_CharT> *_C_get_ivals () {C return &_RW::__rw_moneypunct_impl<_CharT, _Intl>::_C_ivals; }};)#ifndef _RWSTD_NO_TEMPLATE_ON_RETURN_TYPE#template "inline moneypunct<_CharT, _Intl>::Mmoneypunct (size_t __ref, const _RW::__rw_moneypunct_init_data<_CharT> *__mp)- : locale::facet(__ref, locale::monetary),4 _RW::__rV w_moneypunct_impl<_CharT, _Intl>(__mp){ }9#else // if defined (_RWSTD_NO_TEMPLATE_ON_RETURN_TYPE)#template ;inline moneypunct<_CharT, _Intl>::moneypunct (size_t __ref)/ : locale::facet(__ref, locale::monetary), = _RW::__rw_moneypunct_impl<_CharT, _Intl>(_C_get_ivals ()){ }#template "inline moneypunct<_CharT, _Intl>::Mmoneypunct (size_t __ref, const _RW::__rw_moneypunct_init_data<_CharT> *__mp). : locale::facet(W __ref, locale::monetary), 4 _RW::__rw_moneypunct_impl<_CharT, _Intl>(__mp){ }-#endif // _RWSTD_NO_TEMPLATE_ON_RETURN_TYPEC_RWSTD_INSTANTIATE_2 (class _RWSTD_EXPORT moneypunct);B_RWSTD_INSTANTIATE_2 (class _RWSTD_EXPORT moneypunct);#ifndef _RWSTD_NO_WCHAR_TF_RWSTD_INSTANTIATE_2 (class _RWSTD_EXPORT moneypunct);E_RWSTD_INSTANTIATE_2 (class _RWSTD_EXPORT moneypunct);#endif // _RWSTD_NO_WCHAR_T;// --------- X ----------------------------------------------->// Standard derived facet -- moneypunct_byname<_CharT, _Intl>.;// --------------------------------------------------------Atemplate 9class moneypunct_byname: public moneypunct<_CharT, _Intl>{- typedef moneypunct<_CharT, _Intl> _Punct;public:F _EXPLICIT moneypunct_byname (const char* __name, size_t __ref = 0)* : moneypunct<_CharT, _Intl>(__ref,I Y _Punct::_C_get_init_by_name_ (__name,K moneypunct<_CharT, _Intl>::intl)) { }};} // namespace std_RWSTD_NAMESPACE (__rw) { ##ifndef _RWSTD_NO_FUNC_PARTIAL_SPEC#template .inline _STD::moneypunct_byname<_CharT, _Intl>*C__rw_create_classic_facet (_STD::moneypunct_byname<_CharT, _Intl>*){; return new _STD::moneypunct_byname<_CharT, _Intl>("C");}#template 'inline _STD::moneypunct<_CharT, _Intl>*;__rw_create_named_facet (_STD::moneypunct<_CharT, _Intl>*, F const char *__name, _RWSTD_C::size_t __ref) {E return new _STD::moneypunct_byname<_CharT, _Intl>(__name, __ref);}#template .inline _STD::moneypunct_byname<_CharT, _Intl>*B__rw_create_named_facet (_STD::moneypunct_byname<_CharT, _Intl>*, F const char *__name, _RWSTD_C::size_t __ref) {E [ return new _STD::moneypunct_byname<_CharT, _Intl>(__name, __ref);}3#else // if defined (_RWSTD_NO_FUNC_PARTIAL_SPEC)_RWSTD_SPECIALIZED_FUNCTION,inline _STD::moneypunct_byname*A__rw_create_classic_facet (_STD::moneypunct_byname*){9 return new _STD::moneypunct_byname("C");}_RWSTD_SPECIALIZED_FUNCTION+inline _STD::moneypunct_byname*@__rw_create_classic_facet (_STD::moneypunct_byname*){8 retu\ rn new _STD::moneypunct_byname("C");}_RWSTD_SPECIALIZED_FUNCTION%inline _STD::moneypunct*9__rw_create_named_facet (_STD::moneypunct*, D const char *__name, _RWSTD_C::size_t __ref){C return new _STD::moneypunct_byname(__name, __ref);}_RWSTD_SPECIALIZED_FUNCTION$inline _STD::moneypunct*8__rw_create_named_facet (_STD::moneypunct*, D const char *__n] ame, _RWSTD_C::size_t __ref){B return new _STD::moneypunct_byname(__name, __ref);}_RWSTD_SPECIALIZED_FUNCTION,inline _STD::moneypunct_byname*@__rw_create_named_facet (_STD::moneypunct_byname*, D const char *__name, _RWSTD_C::size_t __ref){C return new _STD::moneypunct_byname(__name, __ref);}_RWSTD_SPECIALIZED_FUNCTION+inline _STD::moneypunct_byname*?__rw_create_named_facet (_^ STD::moneypunct_byname*, D const char *__name, _RWSTD_C::size_t __ref){B return new _STD::moneypunct_byname(__name, __ref);}#ifndef _RWSTD_NO_WCHAR_T_RWSTD_SPECIALIZED_FUNCTION/inline _STD::moneypunct_byname*D__rw_create_classic_facet (_STD::moneypunct_byname*){< return new _STD::moneypunct_byname("C");}_RWSTD_SPECIALIZED_FUNCTION.inline _STD::moneypunct_byname_ *C__rw_create_classic_facet (_STD::moneypunct_byname*){; return new _STD::moneypunct_byname("C");}_RWSTD_SPECIALIZED_FUNCTION(inline _STD::moneypunct*<__rw_create_named_facet (_STD::moneypunct*, D const char *__name, _RWSTD_C::size_t __ref){F return new _STD::moneypunct_byname(__name, __ref);}_RWSTD_SPECIALIZED_FUNCTION'inline _STD::moneypunct*;__rw_create_named_facet (_STD::moneypunct*, D const char *__name, _RWSTD_C::size_t __ref){E return new _STD::moneypunct_byname(__name, __ref);}_RWSTD_SPECIALIZED_FUNCTION/inline _STD::moneypunct_byname*C__rw_create_named_facet (_STD::moneypunct_byname*, D const char *__name, _RWSTD_C::size_t __ref){F return new _STD::moneypunct_byname(__name, __ref);}_RWSTD_SPECIALIZED_FUNCTION.inline _STD::moneypunct_byname*B__rw_create_named_facet (_STD::moneypunct_byname*, D const char *__name, _RWSTD_C::size_t __ref){E return new _STD::moneypunct_byname(__name, __ref);}#endif // _RWSTD_NO_WCHAR_T'#endif // _RWSTD_NO_FUNC_PARTIAL_SPEC} // namespace __rwE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif"#if _RWSTD_DEFINE_TEMPLATE (MONEY)!# include #endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif#endif // _V3_LOCALE##endif // _RWSTD_MONEY_H_INCLUDEDww c Ͻp7ԦL/*************************************************************************** *M * _mutex.h - Definitions of classes and inline functions providing MT safety *E * This is an internal header file used to implement the C++ Standard? * Library. It should never be #included directly by a program. *0 * $Id: //stdlib/3.0-rel/include/rw/_mutex.h#4 $ *P *******************************************************************************P * d *P * Copyright 2003, 2006 Hewlett-Packard Development Company, L.P. *P * *P * Confidential computer software. Valid license from HP required for *P * possession, use or copying. Consistent with FAR 12.211 and 12.212 *P * Commercial Computer Software, Computer Software Documentation, and *P * Technical Data for Commercial Items are licensed e to the U.S. Government *P * under vendor's standard commercial license. *P * *P ******************************************************************************* *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * t f reaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restri g cted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L ************************************* h ************************************** * * There are two mutex classes: *G * __rw::__rw_mutex_base - a POD-type class with no ctor or dtor (POSIXK * and Solaris threads only) suitable for mutex objects with static storageL * duration. On POSIX threads, these objects are fully constructed at static9 * initialization time and initialized via assignment by M * PTHREAD_MUTEX_INITIALIZER, while on Solaris threads they do not need to beO * initialized at all. On platforms such as Win32/64 t i hat do not support staticK * initialization this class does define a ctor that initializes the object* * by the appropriate thread library call. *M * __rw::__rw_mutex - a non-POD-type class derived from __rw::__rw_mutex_baseM * with explicitly defined ctor and dtor suitable for mutex member variables.O * On platforms such as Win32/64 that do not support static initialization thisD * class does not define its own ctor and dtor and simply defers the. * initialization and destruction to its j base. *D * __rw::__rw_static_mutex<> - a POD-type class template, defined onA * platforms such as POSIX or Solaris threads that support staticK * initialization of mutexes, containing a single public static data memberK * of the __rw::__rw_mutex_base class. The static member object is returnedF * from the factory function template __rw::__rw_get_static_mutex<>(). *J * On platforms such as Win32/64 that do not support static initialization1 * of mutex objects the factory template functiok nF * __rw::__rw_get_static_mutex<>() defines and dynamically initializesL * a static local reference to an object of the __rw::__rw_mutex_base class.H * The dynamic initialization is done in an MT-safe way (i.e., such thatM * exactly one initialization of the mutex object is guaranteed). On Win32/64M * this is accomplished by making use of the InterlockedIncrement() API call,J * everywhere else there exists a small potential for a race condition andL * the risk of the object being initialize l d multiple times. The reference isK * initialized to refer to a properly aligned static data buffer to preventN * the destruction of the actual object at program termination, and the objectJ * itself is constructed in this buffer space via a call to placement new. *M ***************************************************************************/#ifndef _RWSTD_MUTEX_H_INCLUDED#define _RWSTD_MUTEX_H_INCLUDED#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environmm ent __save1# pragma __environment __cxx_header_defaults # endif#endif#include #include _RWSTD_CSTRING#ifdef _RWSTD_MULTI_THREAD'#ifndef __COMPILE_RW_INTERNAL_MUTEX_CPP$# include # include B# if defined (__DECCXX) && !defined (_RWSTD_NO_ATOMIC_OPERATIONS)# if defined(__VMS)# include # else## include # endif# endif#endifH#if define n d (_RWSTD_SOLARIS_THREADS) // assuming Solaris 2.1 or greater// SunOS 5.7 Threads Library:E// "A statically allocated mutex does not need to be explicitlyI// initialized; by default, a statically allocated mutex is initializedC// with all zeros and its scope is set to be within the calling// process."0// work around Sunpro bug described in PR #26255M#if defined (__SUNPRO_CC) && (__SUNPRO_CC == 0x530 || __SUNPRO_CC == 0x540) \M && (defined (__So unOS_5_8) || defined (__SunOS_5_9))#undef _TIME_TP#endif // defined(__SUNPRO_CC) && __SUNPRO_CC == 0x530 && defined(__SunOS_5_8)# include # include L# define _RWSTD_MUTEX_INIT(mutex) mutex_init (&mutex, USYNC_THREAD, 0)># define _RWSTD_MUTEX_DESTROY(mutex) mutex_destroy (&mutex);# define _RWSTD_MUTEX_LOCK(mutex) mutex_lock (&mutex)=# define _RWSTD_MUTEX_UNLOCK(mutex) mutex_unlock (&mutex)/# define _RWSTD_MUTEX_T mute p x_t(#elif defined (_RWSTD_POSIX_D10_THREADS)// LinuxThreads man page:?// "Variables of type pthread_mutex_t can also be initialized@// statically, using the constants PTHREAD_MUTEX_INITIALIZER@// (for fast mutexes), PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP@// (for recursive mutexes), and PTHREAD_ERRORCHECK_MUTEX_INI-0// TIALIZER_NP (for error checking mutexes)." // ...D// "Attempting to initialize an already initialized mutex results// in undefined behavior."q 0// work around Sunpro bug described in PR #26255M#if defined (__SUNPRO_CC) && (__SUNPRO_CC == 0x530 || __SUNPRO_CC == 0x540) \M && (defined (__SunOS_5_8) || defined (__SunOS_5_9))#undef _TIME_TP#endif // defined(__SUNPRO_CC) && __SUNPRO_CC == 0x530 && defined(__SunOS_5_8)# include F# define _RWSTD_MUTEX_INIT(mutex) pthread_mutex_init (&mutex, 0)F# define _RWSTD_MUTEX_DESTROY(mutex) pthread_mutex_destroy (&mutex)C# define _RWSTD_Mr UTEX_LOCK(mutex) pthread_mutex_lock (&mutex)E# define _RWSTD_MUTEX_UNLOCK(mutex) pthread_mutex_unlock (&mutex)7# define _RWSTD_MUTEX_T pthread_mutex_t"#elif defined (_RWSTD_DCE_THREADS)'# if defined (_RWSTD_NO_DCE_PTHREAD_H)# include # else# include # endif$# define _RWSTD_MUTEX_INIT(mutex) \@ pthread_mutex_init (&mutex, pthread_mutexattr_default)F# define _RWSTD_MUTEX_DESTROY(mutex) pthread_mutex_destros y (&mutex)C# define _RWSTD_MUTEX_LOCK(mutex) pthread_mutex_lock (&mutex)E# define _RWSTD_MUTEX_UNLOCK(mutex) pthread_mutex_unlock (&mutex)7# define _RWSTD_MUTEX_T pthread_mutex_t*#elif defined (_WIN32) || defined (_WIN64)## ifdef _RWSTD_NO_FWD_DECLARATIONS# include 0# define _RWSTD_MUTEX_T _RTL_CRITICAL_SECTION4# else // if defined (_RWSTD_NO_FWD_DECLARATIONS)8 // avoid #including this header (MFC doesn't like it) // # inclut de extern "C" {(// but rather declare these globals herestruct _RTL_CRITICAL_SECTION;%__declspec (dllimport) void __stdcall3InitializeCriticalSection (_RTL_CRITICAL_SECTION*);%__declspec (dllimport) void __stdcall.EnterCriticalSection (_RTL_CRITICAL_SECTION*);%__declspec (dllimport) void __stdcall.LeaveCriticalSection (_RTL_CRITICAL_SECTION*);%__declspec (dllimport) void __stdcall/DeleteCriticalSection (_RTL_CRITICAL_SECTION*);%__declspec (dllimport) long u __stdcall-InterlockedIncrement (_RWSTD_INTERLOCKED_T*);%__declspec (dllimport) long __stdcall-InterlockedDecrement (_RWSTD_INTERLOCKED_T*);%__declspec (dllimport) long __stdcall2InterlockedExchange (_RWSTD_INTERLOCKED_T*, long);} // extern "C"_RWSTD_NAMESPACE (__rw) { // fake critical section typeunion __rw_critical_section {% long _C_pad; // force alignment= char _C_buf [24 /* == sizeof (_RTL_CRITICAL_SECTION) */];};5# define _RWSTD_MUTEX_T _RW::__v rw_critical_section} // namespace __rw(# endif // _RWSTD_NO_FWD_DECLARATIONS_RWSTD_NAMESPACE (__rw) { H// Win32/64 throws non-C++ exceptions rather than returning error status>// from some system calls like most other operating systems do;inline int __rw_mutex_init (_RTL_CRITICAL_SECTION *__mutex){ __try {, InitializeCriticalSection (__mutex); } __except (1) { return -1; } return 0;}>inline int __rw_mutex_destroy (_w RTL_CRITICAL_SECTION *__mutex){ __try {( DeleteCriticalSection (__mutex); } __except (1) { return -1; } return 0;};inline int __rw_mutex_lock (_RTL_CRITICAL_SECTION *__mutex){ __try {' EnterCriticalSection (__mutex); } __except (1) { return -1; } return 0;}=inline int __rw_mutex_unlock (_RTL_CRITICAL_SECTION *__mutex){ __try {' LeaveCriticalSection (__mutex); } x __except (1) { return -1; } return 0;})# define _RWSTD_MUTEX_INIT(mutex) \M __rw_mutex_init (_RWSTD_REINTERPRET_CAST (_RTL_CRITICAL_SECTION*, &mutex)))# define _RWSTD_MUTEX_DESTROY(mutex) \P __rw_mutex_destroy (_RWSTD_REINTERPRET_CAST (_RTL_CRITICAL_SECTION*, &mutex)))# define _RWSTD_MUTEX_LOCK(mutex) \M __rw_mutex_lock (_RWSTD_REINTERPRET_CAST (_RTL_CRITICAL_SECTION*, &mutex)))# define _RWSTD_MUTEX_UNLOCK(mutex) \O __rw_mutex_unlock (y _RWSTD_REINTERPRET_CAST (_RTL_CRITICAL_SECTION*, &mutex))} // namespace __rw#elif defined (__OS2__)# define INCL_DOSSEMAPHORES# include $# define _RWSTD_MUTEX_INIT(mutex) \< DosCreateMutexSem (0, &mutex, DC_SEM_SHARED,FALSE)@# define _RWSTD_MUTEX_DESTROY(mutex) DosCloseMutexSem (mutex)$# define _RWSTD_MUTEX_LOCK(mutex) \9 DosRequestMutexSem (mutex, SEM_INDEFINITE_WAIT)B# define _RWSTD_MUTEX_UNLOCK(mutex) DosReleaseMutexSem (mutex),# dz efine _RWSTD_MUTEX_T HMTX)#elif defined(__DECCXX) && defined(__VMS)? // The size of pthread_mutex_t structure is 40 bytes on VMS.B // Leave some room for expansion (an extremely unlikely event).* typedef char __cxx_pthread_mutex_t[64];E#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif extern "C" {( int __cxx_tis_mutex_destroy(void*);% int __cxx_tis_mut { ex_init(void*);% int __cxx_tis_mutex_lock(void*);' int __cxx_tis_mutex_unlock(void*); }E#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endifE# define _RWSTD_MUTEX_INIT(mutex) __cxx_tis_mutex_init (&mutex)H# define _RWSTD_MUTEX_DESTROY(mutex) __cxx_tis_mutex_destroy (&mutex)E# define _RWSTD_MUTEX_LOCK(mutex) __cxx_tis_mutex_lock (&mutex)G# define _RWSTD_MUTEX_UNLOCK(mutex) __cxx_tis_mutex_unlo| ck (&mutex)=# define _RWSTD_MUTEX_T __cxx_pthread_mutex_t#else## error unknown thread environment#endif'#ifndef __COMPILE_RW_INTERNAL_MUTEX_CPP(#if defined(_RWSTD_NO_STATIC_MUTEX_INIT)# include %#endif //_RWSTD_NO_STATIC_MUTEX_INIT+#if defined (__GNUG__) && defined (__osf__)5 // prevent g++ warnings about missing initializers@ // see for explanation of _PTHREAD_NOMETER_STATIC!# ifndef _PTHREAD_NOMETER_STATIC.# define _RWSTD_P } THREAD_MUTEX_INITIALIZER \I { _PTHREAD_MSTATE_SLOW, _PTHREAD_MVALID | _PTHREAD_MVF_STA, \ 0, 0, 0, 0, 0, 0 }1# else // if defined (_PTHREAD_NOMETER_STATIC),# define _RWSTD_PTHREAD_MUTEX_INITIALIZERG { 0, _PTHREAD_MVALID | _PTHREAD_MVF_STA, 0, 0, 0, 0, 0, 0 }%# endif // _PTHREAD_NOMETER_STATIC-#elif defined (__GNUG__) && defined (__sgi__)? // prevent g++ warnings about a partly bracketed initializerH# define _RWSTD_PTHREAD_MUTEX_INITIALIZER~ { PTHREAD_MUTEX_INITIALIZER }#elseD# define _RWSTD_PTHREAD_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (__rw) { 0// a using declaration (rather than a directive)/// used to work around yet another MSVC 6.0 bug_USING (std::exception);*class __rw_thread_error : public exception{public:% __rw_thread_ error () _THROWS (()) : exception () { }4 virtual const char* what () const _THROWS (()) {. return "thread synchronization error"; }}; @// POD type with no user-defined ctor or dtor facilitates static?// initialization of mutex objects with static storage duration1// (important during library initialziation time)#class _RWSTD_EXPORT __rw_mutex_base{public: void _C_acquire () {+#if !defined (__HP_aCC) || __HP_aCC > 32700. if (0 != _RWSTD_MUTEX_LOCK (_C_mutex))8 _RW::__rw_throw (_RWSTD_ERROR_RUNTIME_ERROR,6 "synchronization error");#else7 // working around an HP aCC 3.27 bug JAGac88738% _RWSTD_MUTEX_LOCK (_C_mutex);3#endif // !defined (__HP_aCC) || __HP_aCC > 32700 } void _C_release ();"#ifdef _RWSTD_NO_STATIC_MUTEX_INIT@ // static initialization not an option, define ctor and dtor$ // and make member mutex private  __rw_mutex_base (); ~__rw_mutex_base ();private: // not defined- __rw_mutex_base (const __rw_mutex_base&);8 __rw_mutex_base& operator= (const __rw_mutex_base&);'#endif // _RWSTD_NO_STATIC_MUTEX_INIT0 _RWSTD_MUTEX_T _C_mutex; // the real thing};*inline void __rw_mutex_base::_C_release (){K // we should NOT throw from here as _C_release will typically be calledJ // during the destruction of local objects such as __rw_guard (perhaps // d ue to another exception)# _RWSTD_MUTEX_UNLOCK (_C_mutex);}I// non-POD type, always initializes mutex data member via a function call7class _RWSTD_EXPORT __rw_mutex: public __rw_mutex_base{public:##ifndef _RWSTD_NO_STATIC_MUTEX_INIT __rw_mutex (); ~__rw_mutex ();Z#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1894) && defined(__STD_MS)#elseprivate:#endif // not defined# __rw_mutex (const __rw_mutex&);. __rw_mutex& oper ator= (const __rw_mutex&);'#endif // _RWSTD_NO_STATIC_MUTEX_INIT};##ifndef _RWSTD_NO_STATIC_MUTEX_INITF// helper factory class - static member is guranteed to be constructedB// during static initialization; objects of this POD class are not@// destroyed during program termination (important to allow themE// to be used in dtors of other objects with static storage duration)template struct __rw_static_mutex{$ static __rw_mutex_base _C_mutex;};temp late 3__rw_mutex_base __rw_static_mutex<_TypeT>::_C_mutex#ifdef _RWSTD_POSIX_D10_THREADS* = { _RWSTD_PTHREAD_MUTEX_INITIALIZER }$#endif // _RWSTD_POSIX_D10_THREADS ;J// explicitly instantiated to work around a g++ 2.95.2 bug on COFF systemsK// (such as IBM AIX or DEC OSF1) where it "forgets" to do so implicitly for-// explicitly initialized static data membersB_RWSTD_INSTANTIATE_1 (class _RWSTD_EXPORT __rw_static_mutex);E_RWSTD_INSTANTIATE_1 (cl ass _RWSTD_EXPORT __rw_static_mutex); inline __rw_mutex::__rw_mutex ()3#else // if defined (_RWSTD_NO_STATIC_MUTEX_INIT)*inline __rw_mutex_base::__rw_mutex_base ()'#endif // _RWSTD_NO_STATIC_MUTEX_INIT{ * if (0 != _RWSTD_MUTEX_INIT (_C_mutex))N _RW::__rw_throw (_RWSTD_ERROR_RUNTIME_ERROR, "synchronization error");}##ifndef _RWSTD_NO_STATIC_MUTEX_INIT"inline __rw_mutex::~__rw_mutex () 3#else // if defined (_RWSTD_NO_STATIC_MUTEX_INIT),inline __rw_mutex_base::~__rw_mutex_base () '#endif // _RWSTD_NO_STATIC_MUTEX_INIT{$ _RWSTD_MUTEX_DESTROY (_C_mutex);}H// mutex factory function avoids problematic initialization dependenciesD// introduced by definitions of mutexes with static storage durationH// instead of defining a static mutex member that may not be initializedG// before first use, a non-local class may either declare a unique typeE// (enum or class) or use itself as this type, and call this templateI// funct ion with a ptr to that type to obtain an initialized mutex object?// that is the same for each unique type passed to the function##ifndef _RWSTD_NO_STATIC_MUTEX_INITtemplate inline0__rw_mutex_base& __rw_get_static_mutex (_TypeT*){A // POD mutex already initialized during static initialization/ return __rw_static_mutex<_TypeT>::_C_mutex;}3#else // if defined (_RWSTD_NO_STATIC_MUTEX_INIT)#ifdef _INLINE_WITH_STATICStemplate _INL INE_WITH_STATICS0__rw_mutex_base& __rw_get_static_mutex (_TypeT*).#else // if !defined (_INLINE_WITH_STATICS)template 0__rw_mutex_base& __rw_get_static_mutex (_TypeT*) #endif // _INLINE_WITH_STATICS{C // allocate properly aligned memory for static mutex (necessary@ // to prevent static local mutex from being destroyed during // program termination) union __mutex_buf_t {? long double __pad; // force alignment (must be first)5 char __buf [sizeof (__rw_mutex_base)]; };N // using a named union to work around a bug in HP aCC 3.14.10 (JAGad03246)% static __mutex_buf_t __mutex_buf;E // initialize mutex reference to refer to the static buffer space __rw_mutex_base &__mutex =@ _RWSTD_REINTERPRET_CAST (__rw_mutex_base&, __mutex_buf);< // keep track of number of mutex initialization attempts@ // although `init' may reach a value greater than 1, `mutex'2 // will (should) never be multiply initializedL // implicit initialization used to prevent a g++ 2.95.2 warning on Tru64M // sorry: semantics of inline function static data are wrong (you'll wind // up with multiple copies)F static volatile long __cntr /* = 0 */; // initialization counter(#if defined (_WIN32) || defined (_WIN64) // MT safeB if (0 == __cntr && 1 == InterlockedIncrement ((long*)&__cntr))#else) // not so safe (volatile should help)% if (0 == __cntr && 1 == ++__cn tr)#endif // _WIN32 {B // manually initialize `mutex' via a call to placement new* new (&__mutex) __rw_mutex_base ();; // indicate that `mutex' has been fully initialized< // (unlikely that we'll have more than 1000 threads) __cntr += 1000; } elseA // busywait until `mutex' has been completely initialized while (__cntr < 1000); return __mutex;}&#endif //_RWSTD_NO_STATIC_MUTEX_INIT // clean up #undef _RWSTD_MUTEX_LOCK#undef _RWSTD_MUTEX_UNLOCK#undef _RWSTD_MUTEX_T;// allows safe use of a mutex in the presence of exceptionsclass __rw_guard{ __rw_mutex_base *_C_mutex; // undefined. __rw_guard& operator= (const __rw_guard&); public:" __rw_guard (__rw_guard &__rhs)% : _C_mutex (__rhs._C_mutex) { __rhs._C_mutex = 0; }@ __rw_guard (__rw_mutex_base &__mutex): _C_mutex (&__mutex) { _C_mutex->_C_acquire (); } ? __rw_guard (__rw_mutex_base *__mutex): _C_mutex (__mutex) { if (_C_mutex)$ _C_mutex->_C_acquire (); } ~__rw_guard () { if (_C_mutex)$ _C_mutex->_C_release (); }8 __rw_mutex_base* _C_set (__rw_mutex_base *__mutex) {* __rw_mutex_base *__tmp = _C_mutex;) return _C_mutex = __mutex, __tmp; }};G// base class for obects required to guarantee some degree of MT safety&struct _RWSTD_EXPORT __rw_synchron ized{ __rw_mutex _C_mutex; void _C_lock () { _C_mutex._C_acquire (); } void _C_unlock () { _C_mutex._C_release (); } __rw_guard _C_guard () {& __rw_guard __guard (_C_mutex); return __guard; }};@// helper functions for atomic value [in|de]crement and exchangeA// the functions are atomic with respect to each other as long as0// they are passed the same mutex by the callerstemplate inlineG _TypeT __rw_atomic_preincrement (_TypeT &__t, __rw_mutex_base &__mutex){ _RWSTD_MT_GUARD (__mutex); return ++__t;}template inlineG_TypeT __rw_atomic_predecrement (_TypeT &__t, __rw_mutex_base &__mutex){ _RWSTD_MT_GUARD (__mutex); return --__t;}%template inline<_TypeT __rw_atomic_exchange (_TypeT &__t, const _TypeU &__u,6 __rw_mutex_base &__mutex){ _RWSTD_MT_GUARD (_ _mutex); _TypeT __tmp = __t;#ifndef _WIN64 __t = __u;#elseJ // silence MSVC conversion warnings (cast breaks SunPro 5.3 and prior)+ __t = _RWSTD_STATIC_CAST (_TypeT, __u);#endif return __tmp;};// for use on class statics or on namespace-scope variables@// the unused argument is only here so that all functions can be%// called from the same set of macrostemplate inline3_TypeT __rw_atomic_preincrement (_TypeT &__t, bool){)  return __rw_atomic_preincrement (__t,I __rw_get_static_mutex ((_TypeT*)0));}template inline3_TypeT __rw_atomic_predecrement (_TypeT &__t, bool){) return __rw_atomic_predecrement (__t,I __rw_get_static_mutex ((_TypeT*)0));}%template inlineB_TypeT __rw_atomic_exchange (_TypeT &__t, const _TypeU &__u, bool){* return __rw_atomic_exchange (__t, __u, E __rw_get_static_mutex ((_TypeT*)0));}G/********************** DEC CXX **************************************/@#if defined (__DECCXX) && !defined (_RWSTD_NO_ATOMIC_OPERATIONS)E#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endifH// __ATO MIC_[DE|IN]CREMENT_[LONG|QUAD] and __ATOMIC_EXCH_[LONG|QUAD] areG// intrinsic functions declared in that atomicallyI// modify their argument and return its original value (__ATOMIC_XXX_LONG=// is misnamed -- it actually operates on an int, not a long)inline-int __rw_atomic_preincrement (int &__x, bool){E#if defined(__DECCXX) && defined(__VMS) && !defined(__DECFIXCXXL1974)- int __i = __ATOMIC_INCREMENT_LONG (&__x); __MB(); return 1 + __i;#else. return 1 + __ATOMIC_INCREMENT_LONG (&__x);#endif}inline7unsigned __rw_atomic_preincrement (unsigned &__x, bool){I return __rw_atomic_preincrement (_RWSTD_REINTERPRET_CAST (int&, __x),, false);}inline/long __rw_atomic_preincrement (long &__x, bool){E#if defined(__DECCXX) && defined(__VMS) && !defined(__DECFIXCXXL1736)F# if defined(__DECCXX) && defined(__VMS) && !defined(__DECFIXCXXL1974)- int __i = __ATOMIC_INCREMENT_LON G (&__x); __MB(); return 1 + __i;# else. return 1 + __ATOMIC_INCREMENT_LONG (&__x);# endif#else. return 1 + __ATOMIC_INCREMENT_QUAD (&__x);#endif}inlineAunsigned long __rw_atomic_preincrement (unsigned long &__x, bool){J return __rw_atomic_preincrement (_RWSTD_REINTERPRET_CAST (long&, __x),, false);}template <inline _TypeT* __rw_atomic_preincrement (_TypeT* &__x, bool){8 _RWSTD_COMPILE _ASSERT (sizeof __x == sizeof (long));, return _RWSTD_REINTERPRET_CAST (_TypeT*,L __rw_atomic_preincrement (_RWSTD_REINTERPRET_CAST (long&, __x),/ false));}inline-int __rw_atomic_predecrement (int &__x, bool){E#if defined(__DECCXX) && defined(__VMS) && !defined(__DECFIXCXXL1974) __MB();#endif. return __ATOMIC_DECREMENT_LONG (&__x) - 1;}inline7unsigned __rw_atomic_predecrement (unsigned &__x, bool){I  return __rw_atomic_predecrement (_RWSTD_REINTERPRET_CAST (int&, __x),, false);}inline/long __rw_atomic_predecrement (long &__x, bool){E#if defined(__DECCXX) && defined(__VMS) && !defined(__DECFIXCXXL1736)F# if defined(__DECCXX) && defined(__VMS) && !defined(__DECFIXCXXL1974) __MB();# endif. return __ATOMIC_DECREMENT_LONG (&__x) - 1;#else. return __ATOMIC_DECREMENT_QUAD (&__x) - 1;#endif}inlineAunsigned long __rw_ato mic_predecrement (unsigned long &__x, bool){J return __rw_atomic_predecrement (_RWSTD_REINTERPRET_CAST (long&, __x),, false);}template <inline _TypeT* __rw_atomic_predecrement (_TypeT* &__x, bool){8 _RWSTD_COMPILE_ASSERT (sizeof __x == sizeof (long));, return _RWSTD_REINTERPRET_CAST (_TypeT*,L __rw_atomic_predecrement (_RWSTD_REINTERPRET_CAST (long&, __x),/ false)); }inline2int __rw_atomic_exchange (int &__x, int __y, bool){E#if defined(__DECCXX) && defined(__VMS) && !defined(__DECFIXCXXL1974) __MB();- int __i = __ATOMIC_EXCH_LONG (&__x, __y); __MB(); return __i;#else* return __ATOMIC_EXCH_LONG (&__x, __y);#endif}inlineAunsigned __rw_atomic_exchange (unsigned &__x, unsigned __y, bool){J return __rw_atomic_exchange (_RWSTD_REINTERPRET_CAST (unsigned&, __x),G _RWSTD_STAT IC_CAST (int, __y), false);}inline5long __rw_atomic_exchange (long &__x, long __y, bool){E#if defined(__DECCXX) && defined(__VMS) && !defined(__DECFIXCXXL1974) __MB();. long __i = __ATOMIC_EXCH_QUAD (&__x, __y); __MB(); return __i;#else* return __ATOMIC_EXCH_QUAD (&__x, __y);#endif}g#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1968) && (__INITIAL_POINTER_SIZE == 64)inline>__int64 __rw_atomic_exchange (__int64 &__x, __int64 __ y, bool){* return __ATOMIC_EXCH_QUAD (&__x, __y);}#endifinlinePunsigned long __rw_atomic_exchange (unsigned long &__x, unsigned long __y, bool){F return __rw_atomic_exchange (_RWSTD_REINTERPRET_CAST (long&, __x),H _RWSTD_STATIC_CAST (long, __y), false);}template Kinline _TypeT* __rw_atomic_exchange (_TypeT* &__x, const _TypeT* __y, bool){8 _RWSTD_COMPILE_ASSERT (sizeof __x == sizeof (long));g#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1968) && (__INITIAL_POINTER_SIZE == 64), return _RWSTD_REINTERPRET_CAST (_TypeT*,K __rw_atomic_exchange (_RWSTD_REINTERPRET_CAST (__int64&, __x),K _RWSTD_REINTERPRET_CAST (__int64, __y),+ false));#else, return _RWSTD_REINTERPRET_CAST (_TypeT*,H __rw_atomic_exchange (_RWSTD_REINTERPRET_CAST (long&, __x),H _RWSTD_ REINTERPRET_CAST (long, __y),+ false));#endif}E/********************** SPARC **************************************/#elif defined(__sparc) \6 && (defined (__SUNPRO_CC) || defined (__GNUG__)) \- && !defined (_RWSTD_NO_ATOMIC_OPERATIONS) extern "C" {-// located in assembler file "atomic-sparc.s"&// exchange returns the previous value // add returns the current value#if defined (_LP64)%long __rw_asm_exchange (long*, long);  long __rw_asm_add (long*, long);%long __rw_asm_exchange32 (int*, int); long __rw_asm_add32 (int*, int);#else // if !defined (_LP64)%long __rw_asm_exchange32 (int*, int); long __rw_asm_add32 (int*, int);3inline long __rw_asm_exchange (long* __x, long __y){: _RWSTD_COMPILE_ASSERT (sizeof (int) == sizeof (long));C return __rw_asm_exchange32 (_RWSTD_REINTERPRET_CAST(int*, __x),? _RWSTD_STATIC_CAST (int, __y));}.inline long __rw_asm _add (long* __x, long __y){: _RWSTD_COMPILE_ASSERT (sizeof (int) == sizeof (long));4 // INT_MAX is reserved, guard against a deadlock+ _RWSTD_ASSERT (_RWSTD_INT_MAX != *__x);? return __rw_asm_add32 (_RWSTD_REINTERPRET_CAST (int*, __x),: _RWSTD_STATIC_CAST (int, __y));}#endif // _LP64} // extern "C"4inline int __rw_atomic_preincrement (int &__x, bool){$ return __rw_asm_add32 (&__x, 1);}>inline unsigned __rw_atomic_ preincrement (unsigned &__x, bool){4 // INT_MAX is reserved, guard against a deadlock* _RWSTD_ASSERT (_RWSTD_INT_MAX != __x);I return __rw_atomic_preincrement (_RWSTD_REINTERPRET_CAST (int&, __x),, false);}6inline long __rw_atomic_preincrement (long &__x, bool){5 // LONG_MAX is reserved, guard against a deadlock+ _RWSTD_ASSERT (_RWSTD_LONG_MAX != __x);" return __rw_asm_add (&__x, 1);}Hinline unsigned long __rw_at omic_preincrement (unsigned long &__x, bool){J return __rw_atomic_preincrement (_RWSTD_REINTERPRET_CAST (long&, __x),, false);}template <inline _TypeT* __rw_atomic_preincrement (_TypeT* &__x, bool){8 _RWSTD_COMPILE_ASSERT (sizeof __x == sizeof (long));, return _RWSTD_REINTERPRET_CAST (_TypeT*,L __rw_atomic_preincrement (_RWSTD_REINTERPRET_CAST (long&, __x),/ false)); }4inline int __rw_atomic_predecrement (int &__x, bool){4 // INT_MAX is reserved, guard against a deadlock* _RWSTD_ASSERT (_RWSTD_INT_MAX != __x);% return __rw_asm_add32 (&__x, -1);}>inline unsigned __rw_atomic_predecrement (unsigned &__x, bool){I return __rw_atomic_predecrement (_RWSTD_REINTERPRET_CAST (int&, __x),, false);}6inline long __rw_atomic_predecrement (long &__x, bool){5 // LONG_MAX is reserved, guard against a deadlock+ _RWSTD_ASSERT (_RWSTD_LONG_MAX != __x);# return __rw_asm_add (&__x, -1);}Hinline unsigned long __rw_atomic_predecrement (unsigned long &__x, bool){J return __rw_atomic_predecrement (_RWSTD_REINTERPRET_CAST (long&, __x),, false);}template <inline _TypeT* __rw_atomic_predecrement (_TypeT* &__x, bool){8 _RWSTD_COMPILE_ASSERT (sizeof __x == sizeof (long));, return _RWSTD_REINTERPRET_ CAST (_TypeT*,L __rw_atomic_predecrement (_RWSTD_REINTERPRET_CAST (long&, __x),/ false));}9inline int __rw_atomic_exchange (int &__x, int __y, bool){+ return __rw_asm_exchange32 (&__x, __y);}Hinline unsigned __rw_atomic_exchange (unsigned &__x, unsigned __y, bool){E return __rw_atomic_exchange (_RWSTD_REINTERPRET_CAST (int&, __x),G _RWSTD_STATIC_CAST (int, __y), false);}<inli ne long __rw_atomic_exchange (long &__x, long __y, bool){) return __rw_asm_exchange (&__x, __y);}inlinePunsigned long __rw_atomic_exchange (unsigned long &__x, unsigned long __y, bool){F return __rw_atomic_exchange (_RWSTD_REINTERPRET_CAST (long&, __x),H _RWSTD_STATIC_CAST (long, __y), false);}template Kinline _TypeT* __rw_atomic_exchange (_TypeT* &__x, const _TypeT* __y, bool){8 _RWSTD_COMPILE_ASSERT (sizeof __ x == sizeof (long));, return _RWSTD_REINTERPRET_CAST (_TypeT*,H __rw_atomic_exchange (_RWSTD_REINTERPRET_CAST (long&, __x),H _RWSTD_REINTERPRET_CAST (long, __y),+ false));}C/********************** AIX **************************************/1#elif defined(_AIX43) && defined(__IBMCPP__) && \, !defined (_RWSTD_NO_ATOMIC_OPERATIONS)#include inline-int __rw_atomic_preincrement (int &__x, bool){$ return fetch_and_add(&__x, 1) + 1;}inline7unsigned __rw_atomic_preincrement (unsigned &__x, bool){ H return __rw_atomic_preincrement (_RWSTD_REINTERPRET_CAST(int&, __x),, false);}inline/long __rw_atomic_preincrement (long &__x, bool){& return fetch_and_addlp(&__x, 1) + 1;}inlineAunsigned long __rw_atomic_preincrement (unsigned long &__x, bool){H return __rw_atomic_preincrement (_RWSTD_RE INTERPRET_CAST (long&, __x),* false);}template <inline _TypeT* __rw_atomic_preincrement (_TypeT* &__x, bool){8 _RWSTD_COMPILE_ASSERT (sizeof __x == sizeof (long));, return _RWSTD_REINTERPRET_CAST (_TypeT*,L __rw_atomic_preincrement (_RWSTD_REINTERPRET_CAST (long&, __x),/ false));}inline-int __rw_atomic_predecrement (int &__x, bool){& return fetch_and_add(&__x, -1) - 1;}inline7unsigned __rw_atomic_predecrement (unsigned &__x, bool){I return __rw_atomic_predecrement (_RWSTD_REINTERPRET_CAST (int&, __x),, false);}inline/long __rw_atomic_predecrement (long &__x, bool){( return fetch_and_addlp(&__x,-1) - 1;}inlineAunsigned long __rw_atomic_predecrement (unsigned long &__x, bool){J return __rw_atomic_predecrement (_RWSTD_REINTERPRET_CAST (long&, __x),,  false);}template <inline _TypeT* __rw_atomic_predecrement (_TypeT* &__x, bool){8 _RWSTD_COMPILE_ASSERT (sizeof __x == sizeof (long));, return _RWSTD_REINTERPRET_CAST (_TypeT*,L __rw_atomic_predecrement (_RWSTD_REINTERPRET_CAST (long&, __x),/ false));}inline2int __rw_atomic_exchange (int &__x, int __y, bool){+ return compare_and_swap(&__x, &__x, __y);}inlineAunsigned __rw_ atomic_exchange (unsigned &__x, unsigned __y, bool){E return __rw_atomic_exchange (_RWSTD_REINTERPRET_CAST (int&, __x),G _RWSTD_STATIC_CAST (int, __y), false);}inline5long __rw_atomic_exchange (long &__x, long __y, bool){- return compare_and_swaplp(&__x, &__x, __y);}inlinePunsigned long __rw_atomic_exchange (unsigned long &__x, unsigned long __y, bool){F return __rw_atomic_exchange (_RWSTD_REINTERPRET_CAST (long&, __x),H  _RWSTD_STATIC_CAST (long, __y), false);}template Kinline _TypeT* __rw_atomic_exchange (_TypeT* &__x, const _TypeT* __y, bool){8 _RWSTD_COMPILE_ASSERT (sizeof __x == sizeof (long));, return _RWSTD_REINTERPRET_CAST (_TypeT*,H __rw_atomic_exchange (_RWSTD_REINTERPRET_CAST (long&, __x),H _RWSTD_REINTERPRET_CAST (long, __y),+ false));}C/************* ********* SGI **************************************/1#elif defined(__sgi) && defined(__host_mips) && \, !defined (_RWSTD_NO_ATOMIC_OPERATIONS)# include inlineAunsigned long __rw_atomic_preincrement (unsigned long &__x, bool){" return __add_then_test(&__x, 1);}inline7unsigned __rw_atomic_preincrement (unsigned &__x, bool){$ return __add_then_test32(&__x, 1);}inline-int __rw_atomic_preincrement (int &__x, bool){V return __rw_atomic_pre increment(_RWSTD_REINTERPRET_CAST(unsigned int&,__x),false);}inline/long __rw_atomic_preincrement (long &__x, bool){R return __rw_atomic_preincrement (_RWSTD_REINTERPRET_CAST(unsigned long&, __x),, false);}template <inline _TypeT* __rw_atomic_preincrement (_TypeT* &__x, bool){A _RWSTD_COMPILE_ASSERT (sizeof __x == sizeof (unsigned long));, return _RWSTD_REINTERPRET_CAST (_TypeT*,U __rw_atomic_pre increment (_RWSTD_REINTERPRET_CAST (unsigned long&, __x),/ false));}inline7unsigned __rw_atomic_predecrement (unsigned &__x, bool){% return __add_then_test32(&__x, -1);}inlineAunsigned long __rw_atomic_predecrement (unsigned long &__x, bool){# return __add_then_test(&__x, -1);}inline-int __rw_atomic_predecrement (int &__x, bool){O return __rw_atomic_predecrement (_RWSTD_REINTERPRET_CAST (unsigned &, __x),,  false);}inline/long __rw_atomic_predecrement (long &__x, bool){S return __rw_atomic_predecrement (_RWSTD_REINTERPRET_CAST (unsigned long&, __x),, false);}template <inline _TypeT* __rw_atomic_predecrement (_TypeT* &__x, bool){A _RWSTD_COMPILE_ASSERT (sizeof __x == sizeof (unsigned long));, return _RWSTD_REINTERPRET_CAST (_TypeT*,U __rw_atomic_predecrement (_RW STD_REINTERPRET_CAST (unsigned long&, __x),/ false));}inlinePunsigned long __rw_atomic_exchange (unsigned long &__x, unsigned long __y, bool){" return __test_and_set(&__x,__y);}inlineAunsigned __rw_atomic_exchange (unsigned &__x, unsigned __y, bool){$ return __test_and_set32(&__x,__y);}inline2int __rw_atomic_exchange (int &__x, int __y, bool){N return __rw_atomic_exchange (_RWSTD_REINTERPRET_CAST (unsigned int&, _ _x),P _RWSTD_STATIC_CAST (unsigned int, __y), false);}inline5long __rw_atomic_exchange (long &__x, long __y, bool){O return __rw_atomic_exchange (_RWSTD_REINTERPRET_CAST (unsigned long&, __x),Q _RWSTD_STATIC_CAST (unsigned long, __y), false);}template Kinline _TypeT* __rw_atomic_exchange (_TypeT* &__x, const _TypeT* __y, bool){A _RWSTD_COMPILE_ASSERT (sizeof __x == sizeof (unsigned lo ng));, return _RWSTD_REINTERPRET_CAST (_TypeT*,H __rw_atomic_exchange (_RWSTD_REINTERPRET_CAST (long&, __x),H _RWSTD_REINTERPRET_CAST (long, __y),+ false));}I/********************** PA-RISC 2 **************************************/#elif defined(_PA_RISC2_0) +// located in assembler file "atomic-pa2.s"4// Special Contraint: The value of both the argument#// and the result can never be zero&exte rn "C" int __rw_asm_incr32 (int*);&extern "C" int __rw_asm_decr32( int*);/extern "C" int __rw_asm_exchange32 (int*, int);inline4int __rw_string_atomic_preincrement (int &__x, bool){# return __rw_asm_incr32 (&__x);}inline>unsigned __rw_string_atomic_preincrement (unsigned &__x, bool){ H return __rw_atomic_preincrement (_RWSTD_REINTERPRET_CAST(int&, __x),, false);}inline4int __rw_string_atomic_predecrement (int &__x, bool) {# return __rw_asm_decr32 (&__x);}inline>unsigned __rw_string_atomic_predecrement (unsigned &__x, bool){ H return __rw_atomic_predecrement (_RWSTD_REINTERPRET_CAST(int&, __x),, false);}inline9int __rw_string_atomic_exchange (int &__x, int __y, bool){+ return __rw_asm_exchange32 (&__x, __y);}inlineHunsigned __rw_string_atomic_exchange (unsigned &__x, unsigned __y, bool){K return __rw_string_atomic_exchan ge (_RWSTD_REINTERPRET_CAST(int&, __x),D _RWSTD_STATIC_CAST(int,__y),/ false);} H/********************** i386/gcc **************************************/.#elif defined (__i386__) && defined (__GNUG__)inline-int __rw_atomic_preincrement (int &__x, bool){< __asm__ __volatile__ ("lock; addl $1,%0" : : "m" (__x)); return __x;}inline7unsigned __rw_atomic_preincrement (unsigned &__x, bool ){I return __rw_atomic_preincrement (_RWSTD_REINTERPRET_CAST (int&, __x),, false);}inline/long __rw_atomic_preincrement (long &__x, bool){: _RWSTD_COMPILE_ASSERT (sizeof (long) == sizeof (int));I return __rw_atomic_preincrement (_RWSTD_REINTERPRET_CAST (int&, __x),, false);}inlineAunsigned long __rw_atomic_preincrement (unsigned long &__x, bool){: _RWSTD_COMPILE_ASSERT (sizeof (l ong) == sizeof (int));I return __rw_atomic_preincrement (_RWSTD_REINTERPRET_CAST (int&, __x),, false);}template <inline _TypeT* __rw_atomic_preincrement (_TypeT* &__x, bool){7 _RWSTD_COMPILE_ASSERT (sizeof __x == sizeof (int));, return _RWSTD_REINTERPRET_CAST (_TypeT*,L __rw_atomic_preincrement (_RWSTD_REINTERPRET_CAST (long&, __x),/ false));}inline-int __rw_a tomic_predecrement (int &__x, bool){< __asm__ __volatile__ ("lock; subl $1,%0" : : "m" (__x)); return __x;}inline7unsigned __rw_atomic_predecrement (unsigned &__x, bool){I return __rw_atomic_predecrement (_RWSTD_REINTERPRET_CAST (int&, __x),, false);}inline/long __rw_atomic_predecrement (long &__x, bool){: _RWSTD_COMPILE_ASSERT (sizeof (long) == sizeof (int));I return __rw_atomic_predecrement (_RWSTD_REINTERP RET_CAST (int&, __x),, false);}inlineAunsigned long __rw_atomic_predecrement (unsigned long &__x, bool){C _RWSTD_COMPILE_ASSERT (sizeof (unsigned long) == sizeof (int));I return __rw_atomic_predecrement (_RWSTD_REINTERPRET_CAST (int&, __x),, false);}template <inline _TypeT* __rw_atomic_predecrement (_TypeT* &__x, bool){7 _RWSTD_COMPILE_ASSERT (sizeof __x == sizeof (int)) ;, return _RWSTD_REINTERPRET_CAST (_TypeT*,L __rw_atomic_predecrement (_RWSTD_REINTERPRET_CAST (long&, __x),/ false));}inline4int __rw_atomic_exchange (long &__x, long __y, bool){ __asm__ __volatile__ (" \3 __rwExchangeRetry: \n \3 movl %0, %%eax \n \3 lock \n \3 cmpxchgl %1, %0 \n \3  jne __rwExchangeRetry \n \+ movl %%eax, %1 \n". : "=m"(__x), "=r"(__y), : "m"(__x), "1"(__y)" : "%eax");& return __y; }inlineJunsigned long __rw_atomic_exchange (unsigned long &__x, unsigned long __y,) bool){F return __rw_atomic_exchange (_RWSTD_REINTERPRET_CAST (long&, __x),H _ RWSTD_STATIC_CAST (long, __y), false);}inline2int __rw_atomic_exchange (int &__x, int __y, bool){8 _RWSTD_COMPILE_ASSERT (sizeof __x == sizeof (long));F return __rw_atomic_exchange (_RWSTD_REINTERPRET_CAST (long&, __x),H _RWSTD_STATIC_CAST (long, __y), false);}inlineMunsigned int __rw_atomic_exchange (unsigned int &__x, unsigned int __y, bool){8 _RWSTD_COMPILE_ASSERT (sizeof __x == sizeof (long));F return __rw_atomic_excha nge (_RWSTD_REINTERPRET_CAST (long&, __x),H _RWSTD_STATIC_CAST (long, __y), false);}template Kinline _TypeT* __rw_atomic_exchange (_TypeT* &__x, const _TypeT* __y, bool){8 _RWSTD_COMPILE_ASSERT (sizeof __x == sizeof (long));, return _RWSTD_REINTERPRET_CAST (_TypeT*,H __rw_atomic_exchange (_RWSTD_REINTERPRET_CAST (long&, __x),H _RWSTD_REINTERPRET_CAST (long, __y),+  false));}G/********************** WIN 32/64 ************************************/@#elif defined (_WIN32) && !defined (_RWSTD_NO_ATOMIC_OPERATIONS)G// Interlocked[In|De]crement functions atomically modify their argument// and return the new valueH// InterlockedExchange atomically sets the value pointed to by the firstI// argument to that of the second argument and returns the original valueinline/long __rw_atomic_preincrement (long &__x, bool){' re turn InterlockedIncrement (&__x);}inlineAunsigned long __rw_atomic_preincrement (unsigned long &__x, bool){J return __rw_atomic_preincrement (_RWSTD_REINTERPRET_CAST (long&, __x),, false);}inline-int __rw_atomic_preincrement (int &__x, bool){8 _RWSTD_COMPILE_ASSERT (sizeof __x == sizeof (long));J return __rw_atomic_preincrement (_RWSTD_REINTERPRET_CAST (long&, __x),, false);}in line?unsigned int __rw_atomic_preincrement (unsigned int &__x, bool){8 _RWSTD_COMPILE_ASSERT (sizeof __x == sizeof (long));J return __rw_atomic_preincrement (_RWSTD_REINTERPRET_CAST (long&, __x),, false);}#if !defined (_WIN64)template <inline _TypeT* __rw_atomic_preincrement (_TypeT* &__x, bool){8 _RWSTD_COMPILE_ASSERT (sizeof __x == sizeof (long));, return _RWSTD_REINTERPRET_CAST (_TypeT*,L __r w_atomic_preincrement (_RWSTD_REINTERPRET_CAST (long&, __x),/ false));}#endif // _WIN64inline/long __rw_atomic_predecrement (long &__x, bool){' return InterlockedDecrement (&__x);}inlineAunsigned long __rw_atomic_predecrement (unsigned long &__x, bool){J return __rw_atomic_predecrement (_RWSTD_REINTERPRET_CAST (long&, __x),, false);}inline-int __rw_atomic_predecrement (int &_ _x, bool){8 _RWSTD_COMPILE_ASSERT (sizeof __x == sizeof (long));J return __rw_atomic_predecrement (_RWSTD_REINTERPRET_CAST (long&, __x),, false);}inline?unsigned int __rw_atomic_predecrement (unsigned int &__x, bool){8 _RWSTD_COMPILE_ASSERT (sizeof __x == sizeof (long));J return __rw_atomic_predecrement (_RWSTD_REINTERPRET_CAST (long&, __x),, false);}#if !defined (_WIN64)templa te <inline _TypeT* __rw_atomic_predecrement (_TypeT* &__x, bool){8 _RWSTD_COMPILE_ASSERT (sizeof __x == sizeof (long));, return _RWSTD_REINTERPRET_CAST (_TypeT*,L __rw_atomic_predecrement (_RWSTD_REINTERPRET_CAST (long&, __x),/ false));}#endif // _WIN64inline5long __rw_atomic_exchange (long &__x, long __y, bool){+ return InterlockedExchange (&__x, __y);}inlineJunsigned long __rw_atomic_ex change (unsigned long &__x, unsigned long __y,) bool){F return __rw_atomic_exchange (_RWSTD_REINTERPRET_CAST (long&, __x),H _RWSTD_STATIC_CAST (long, __y), false);}inline2int __rw_atomic_exchange (int &__x, int __y, bool){8 _RWSTD_COMPILE_ASSERT (sizeof __x == sizeof (long));F return __rw_atomic_exchange (_RWSTD_REINTERPRET_CAST (long&, __x),H _RWSTD_STATIC_CAST (long, _ _y), false);}inlineMunsigned int __rw_atomic_exchange (unsigned int &__x, unsigned int __y, bool){8 _RWSTD_COMPILE_ASSERT (sizeof __x == sizeof (long));F return __rw_atomic_exchange (_RWSTD_REINTERPRET_CAST (long&, __x),H _RWSTD_STATIC_CAST (long, __y), false);}#if !defined (_WIN64)template Kinline _TypeT* __rw_atomic_exchange (_TypeT* &__x, const _TypeT* __y, bool){8 _RWSTD_COMPILE_ASSERT (sizeof __x == siz eof (long));, return _RWSTD_REINTERPRET_CAST (_TypeT*,H __rw_atomic_exchange (_RWSTD_REINTERPRET_CAST (long&, __x),H _RWSTD_REINTERPRET_CAST (long, __y),+ false));}#endif // _WIN64inlineClong __rw_atomic_preincrement (long &__x, __rw_mutex_base &__mutex){ _RWSTD_UNUSED (__mutex);1 return __rw_atomic_preincrement (__x, false);}inline=unsigned long __rw_atomic_preincrement (unsigned long &__x,A __rw_mutex_base &__mutex){ _RWSTD_UNUSED (__mutex);1 return __rw_atomic_preincrement (__x, false);}inlineAint __rw_atomic_preincrement (int &__x, __rw_mutex_base &__mutex){ _RWSTD_UNUSED (__mutex);1 return __rw_atomic_preincrement (__x, false);}inline<unsigned int __rw_atomic_preincrement (unsigned int &__x,@ __rw_mutex_base &__mutex){  _RWSTD_UNUSED (__mutex);1 return __rw_atomic_preincrement (__x, false);}#if !defined (_WIN64)template inline7_TypeT* __rw_atomic_preincrement (_TypeT* &__x,; __rw_mutex_base &__mutex){8 _RWSTD_COMPILE_ASSERT (sizeof __x == sizeof (long));, return _RWSTD_REINTERPRET_CAST (_TypeT*,L __rw_atomic_preincrement (_RWSTD_REINTERPRET_CAST (long&, __x),1 __mutex)); }#endif // _WIN64inlineClong __rw_atomic_predecrement (long &__x, __rw_mutex_base &__mutex){ _RWSTD_UNUSED (__mutex);1 return __rw_atomic_predecrement (__x, false);}inline=unsigned long __rw_atomic_predecrement (unsigned long &__x,A __rw_mutex_base &__mutex){ _RWSTD_UNUSED (__mutex);1 return __rw_atomic_predecrement (__x, false);}inlineAint __rw_atomic_predecrement (int &__x, __rw_mutex_base &_ _mutex){ _RWSTD_UNUSED (__mutex);1 return __rw_atomic_predecrement (__x, false);}inline<unsigned int __rw_atomic_predecrement (unsigned int &__x,@ __rw_mutex_base &__mutex){ _RWSTD_UNUSED (__mutex);1 return __rw_atomic_predecrement (__x, false);}#if !defined (_WIN64)template inline7_TypeT* __rw_atomic_predecrement (_TypeT* &__x,; __rw_mutex_base  &__mutex){8 _RWSTD_COMPILE_ASSERT (sizeof __x == sizeof (long));, return _RWSTD_REINTERPRET_CAST (_TypeT*,L __rw_atomic_predecrement (_RWSTD_REINTERPRET_CAST (long&, __x),1 __mutex));}#endif // _WIN64inlineIlong __rw_atomic_exchange (long &__x, long __y, __rw_mutex_base &__mutex){ _RWSTD_UNUSED (__mutex);2 return __rw_atomic_exchange (__x, __y, false);}inlineJunsigned long __rw_atomic_exchange (un signed long &__x, unsigned long __y,= __rw_mutex_base &__mutex){ _RWSTD_UNUSED (__mutex);2 return __rw_atomic_exchange (__x, __y, false);}inlineFint __rw_atomic_exchange (int &__x, int __y, __rw_mutex_base &__mutex){ _RWSTD_UNUSED (__mutex);2 return __rw_atomic_exchange (__x, __y, false);}inlineGunsigned int __rw_atomic_exchange (unsigned int &__x, unsigned int __y,< __rw_mutex_base &__mutex){ _RWSTD_UNUSED (__mutex);2 return __rw_atomic_exchange (__x, __y, false);}#if !defined (_WIN64)template inline>_TypeT* __rw_atomic_exchange (_TypeT* &__x, const _TypeT* __y,7 __rw_mutex_base &__mutex){8 _RWSTD_COMPILE_ASSERT (sizeof __x == sizeof (long));, return _RWSTD_REINTERPRET_CAST (_TypeT*,H __rw_atomic_exchange (_RWSTD_REINTERPRET_CAST (long&, __x),H  _RWSTD_REINTERPRET_CAST (long, __y),- __mutex));}#endif // _WIN64#endif // _WIN32} // namespace __rwE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif,#else // if !defined (_RWSTD_MULTI_THREAD)_RWSTD_NAMESPACE (__rw) { *// atomic in a single-threaded environment%template inlineB_TypeT __rw_atomic_exchange (_TypeT &__t, cons t _TypeU &__u, bool){ _TypeT __tmp = __t; __t = __u; return __tmp;}E// dummy classes used as a base class in single-threaded environmentsstruct __rw_mutex_base{ void _C_acquire () { } void _C_release () { }};7struct _RWSTD_EXPORT __rw_mutex: public __rw_mutex_base{};struct __rw_guard{% __rw_guard (__rw_mutex_base&) { }% __rw_guard (__rw_mutex_base*) { }0 __rw_mutex_base* _C_set (__rw_mutex_base*) { return 0; }};struct __rw_synchronized{) // static so that it takes up no room static __rw_mutex _C_mutex; void _C_lock () { } void _C_unlock () { } __rw_guard _C_guard () {% return __rw_guard (_C_mutex); }};} // namespace __rw#endif // _RWSTD_MULTI_THREAD_RWSTD_NAMESPACE (__rw) { =// available in all environments (ST and MT), used along withE// __rw_atomic_exchange<>() from conditional expressions in iostreams%template inline>_TypeT __rw_ordinary_exchange (_TypeT &__t, const _TypeU &__u){ _TypeT __tmp = __t; __t = __u; return __tmp;}} // namespace __rw)#endif // __COMPILE_RW_INTERNAL_MUTEX_CPP#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif##endif // _RWSTD_MUTEX_H_INCLUDEDww p7ԦL/*************************************************************************** *D * _numeric.cc - Definitions for the Standard Library numeric facets *3 * $Id: //stdlib/3.0-rel/include/rw/_numeric.cc#2 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws an d other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This comput er software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. * L **************************************************************************/#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endif#include E#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) { 7// ----------------------------------- -----------------6// Facet num_get<_CharT, _InputIter> member templates.7// ----------------------------------------------------)template +locale::id num_get<_CharT, _InputIter>::id;#ifndef _RWSTD_NO_BOOL*template *__InputIter num_get<_CharT, __InputIter>::0do_get (__InputIter __first, __InputIter __last,G ios_base& __flags, ios_base::iostate& __err, bool& __val) const{/ _RW::__rw_digit_reader<_Char T, __InputIter>+ __reader(__first, __last, __flags);L long __tmp = __reader._C_parse (__reader._C_get_digits(long()), long()); __err = ios_base::failbit;1 if (__flags.flags () & ios_base::boolalpha) {8 // 22.2.2.1.2, p 15 - any numeric input rejected if (__reader._C_error) {- const numpunct<_CharT>& __punct =O _RWSTD_STATIC_CAST(const numpunct<_CharT>&, __reader._C_punct);O __tmp = __reader._C_get_keyword (__reade r._C_get_tf_map (__punct)); if (__tmp >= 0) {# __val = 0 != __tmp;* __err = ios_base::goodbit; } } }" else if (!__reader._C_error) {< // 22.2.2.1.2, p 14 - any non-numeric input rejected if (0 == __tmp) { __val = false;& __err = ios_base::goodbit; }M else if (1 == __tmp && !(__reader._C_state & __reader._C_negative)) { __val = true;&  __err = ios_base::goodbit; } } // 22.2.2.1.2, p 16 if (__reader.eof ())" __err |= ios_base::eofbit; return __first;}#endif // _RWSTD_NO_BOOL8// -----------------------------------------------------:// Facet num_put<_CharT, OutputIterator> member templates.8// -----------------------------------------------------*template ,locale::id num_put<_CharT, _OutputIter>::id;#ifndef _RWSTD_NO_BOOL*template 0_OutputIter num_put<_CharT, _OutputIter>::do_putJ (_OutputIter __it, ios_base& __flags, _CharT __fill, bool __val) const{F _RW::__rw_digit_writer<_CharT, _OutputIter> __writer(__it, __flags);. if (__flags.flags() & ios_base::boolalpha) {% const numpunct<_CharT>& __punct =G _RWSTD_STATIC_CAST(const numpunct<_CharT>&, __writer._C_punct);O __writer._C_put_keyword(__writer._C_get_tf_string(__punct, __val), __fill); } else {9 __writer._C_ digitize((unsigned long) (__val? 1 : 0));# __writer._C_put_digits(__fill); } return __it;}#endif // _RWSTD_NO_BOOL*template *_OutputIter num_put<_CharT, _OutputIter>::;do_put (_OutputIter __it, ios_base& __flags, _CharT __fill, const void* __val) const{F _RW::__rw_digit_writer<_CharT, _OutputIter> __writer(__it, __flags); __writer._C_digitize(__val);! __writer._C_put_digits(__fill); return __it;}*template 0_OutputIter num_put<_CharT, _OutputIter>::do_putJ (_OutputIter __it, ios_base& __flags, _CharT __fill, long __val) const{F _RW::__rw_digit_writer<_CharT, _OutputIter> __writer(__it, __flags); __writer._C_digitize(__val);! __writer._C_put_digits(__fill); return __it;}*template *_OutputIter num_put<_CharT, _OutputIter>::;do_put (_OutputIter __it, ios_base& __flags, _CharT __fill," unsigned long __val) const{ F _RW::__rw_digit_writer<_CharT, _OutputIter> __writer(__it, __flags); __writer._C_digitize(__val);! __writer._C_put_digits(__fill); return __it;}#ifdef _RWSTD_LONG_LONG*template *_OutputIter num_put<_CharT, _OutputIter>::<do_put (_OutputIter __it, ios_base& __flags, _CharT __fill, % _RWSTD_LONG_LONG __val) const{I _RW::__rw_digit_writer<_CharT, _OutputIter> __writer (__it, __flags);! __writer._C_digitize (__val);$ __wr iter._C_put_digits (__fill); return __it;}*template *_OutputIter num_put<_CharT, _OutputIter>::<do_put (_OutputIter __it, ios_base& __flags, _CharT __fill, . unsigned _RWSTD_LONG_LONG __val) const{I _RW::__rw_digit_writer<_CharT, _OutputIter> __writer (__it, __flags);! __writer._C_digitize (__val);$ __writer._C_put_digits (__fill); return __it;}#endif // _RWSTD_LONG_LONG*template 0 _OutputIter num_put<_CharT, _OutputIter>::do_putL (_OutputIter __it, ios_base& __flags, _CharT __fill, double __val) const{F _RW::__rw_digit_writer<_CharT, _OutputIter> __writer(__it, __flags); __writer._C_digitize(__val);! __writer._C_put_digits(__fill); return __it;}#ifndef _RWSTD_NO_LONG_DOUBLE*template *_OutputIter num_put<_CharT, _OutputIter>::;do_put (_OutputIter __it, ios_base& __flags, _CharT __fill, long double __val) con st{F _RW::__rw_digit_writer<_CharT, _OutputIter> __writer(__it, __flags); __writer._C_digitize(__val);! __writer._C_put_digits(__fill); return __it;}#endif // _RWSTD_NO_LONG_DOUBLE// Rogue wave extensions*template 0_OutputIter num_put<_CharT, _OutputIter>::do_putK (_OutputIter __it, ios_base& __flags, _CharT __fill, short __val) const{F _RW::__rw_digit_writer<_CharT, _OutputIter> __writer(__it, __flags); __writer._C_digitize(__val );! __writer._C_put_digits(__fill); return __it;}*template *_OutputIter num_put<_CharT, _OutputIter>::;do_put (_OutputIter __it, ios_base& __flags, _CharT __fill,# unsigned short __val) const{F _RW::__rw_digit_writer<_CharT, _OutputIter> __writer(__it, __flags); __writer._C_digitize(__val);! __writer._C_put_digits(__fill); return __it;}*template 0_OutputIter num_put<_CharT, _OutputIter>::do_p utI (_OutputIter __it, ios_base& __flags, _CharT __fill, int __val) const{F _RW::__rw_digit_writer<_CharT, _OutputIter> __writer(__it, __flags); __writer._C_digitize(__val);! __writer._C_put_digits(__fill); return __it;}*template *_OutputIter num_put<_CharT, _OutputIter>::;do_put (_OutputIter __it, ios_base& __flags, _CharT __fill,! unsigned int __val) const{F _RW::__rw_digit_writer<_CharT, _OutputIter> __writer(__it, __flags);  __writer._C_digitize(__val);! __writer._C_put_digits(__fill); return __it;}*// ---------------------------------------+// Facet numpunct<_CharT> member templates.*// ---------------------------------------template locale::id numpunct<_CharT>::id;template 9void numpunct<_CharT>::_C_initfacet (const locale &__loc){# this->_C_dp = do_decimal_point();# this->_C_ts = do_thousands_sep(); this->_C_gr = do_grouping(); this->_C_fn = do_falsename(); this->_C_tn = do_truename(); this->_C_initfacetbase(__loc);}} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endifww .p7ԦL/*************************************************************************** *1 * _numeric.h - Definitions of the numeric facets *E * This is an internal header file used to implement the C++ Standard? * Library. It should never be #included directly by a program. *2 * $Id: //stdlib/3.0-rel/include/rw/_numeric.h#2 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L. P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Res erved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/!#ifndef _RWSTD_NUMERIC_H_INCLUDED!#define _RWSTD_NUMERIC_H_INCLUDED#include #ifdef _V3_LOCALE&# include &# include '# include #else#include #include #include #include #include #include #include #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMES PACE (__rw) { ;template inline _InputIterator__rw_num_do_get (_CharT, 3 _InputIterator __begin, 1 _InputIterator __end, 3 _STD::ios_base &__flags, 1 _STD::ios_base::iostate &__err, 0 _TypeT &__val){- __rw_digit_reader<_CharT, _InputIterator>+ __reader (__begin, __end, __flags);I _TypeT __tmp = __reader._C_parse (__reader._C_get_digits (_TypeT ()),1 _TypeT ()); if (__reader._C_error)( __err = _STD::ios_base::failbit; else {( __err = _STD::ios_base::goodbit; __val = __tmp; } if (__reader.eof ())( __err |= _STD::ios_base::eofbit; return __begin;}} // namespace __rw_RWSTD_NAMESPACE (std) { // 22.2.2.1template ) >#class num_get: public locale::facet{public:% typedef _CharT char_type;% typedef _InputIterator iter_type; static locale::id id;) _EXPLICIT num_get (size_t __refs = 0)5 : locale::facet (__refs, locale::numeric) { }#ifndef _RWSTD_NO_BOOLJ iter_type get (iter_type __begin, iter_type __end, ios_base &__flags, A ios_base::iostate &__err, bool& __val) const {- _RWSTD_A SSERT_RANGE (__begin, __end);> return do_get (__begin, __end, __flags, __err, __val); }#endif // _RWSTD_NO_BOOLJ iter_type get (iter_type __begin, iter_type __end, ios_base &__flags, L ios_base::iostate &__err, unsigned short& __val) const {- _RWSTD_ASSERT_RANGE (__begin, __end);> return do_get (__begin, __end, __flags, __err, __val); } // extensionJ iter_type get (iter_type __begin, iter_type __end, ios_base &__flags, C ios_base::iostate &__err, short& __val) const {- _RWSTD_ASSERT_RANGE (__begin, __end);H return _RW::__rw_num_do_get (_CharT (), __begin, __end, __flags,: __err, __val); } // extensionJ iter_type get (iter_type __begin, iter_type __end, ios_base &__flags, @ ios_base::iostate &__err, int& __val) const {- _RWSTD_ASSERT_RANGE (__begin, __end);H return _RW::__rw_num_do_get (_CharT (), __begin, __end, __flags,: __err, __val); }J iter_type get (iter_type __begin, iter_type __end, ios_base &__flags, I ios_base::iostate &__err, unsigned int& __val) const {- _RWSTD_ASSERT_RANGE (__begin, __end);> return do_get (__begin, __end, __flags, __err, __val); }J iter_type get (iter_type __begin, iter_type __end, ios_base &__flags, A ios_base::iostate &__err, lon g& __val) const {- _RWSTD_ASSERT_RANGE (__begin, __end);> return do_get (__begin, __end, __flags, __err, __val); }J iter_type get (iter_type __begin, iter_type __end, ios_base &__flags, J ios_base::iostate &__err, unsigned long& __val) const {- _RWSTD_ASSERT_RANGE (__begin, __end);> return do_get (__begin, __end, __flags, __err, __val); }J iter_type get (iter_type __begin, iter_type __end, ios_base &__flags, B ios_base::iostate &__err, float& __val) const {- _RWSTD_ASSERT_RANGE (__begin, __end);> return do_get (__begin, __end, __flags, __err, __val); }J iter_type get (iter_type __begin, iter_type __end, ios_base &__flags, C ios_base::iostate &__err, double& __val) const {- _RWSTD_ASSERT_RANGE (__begin, __end);> return do_get (__begin, __end, __flags, __err, __val); }J iter_type get (iter_type __begin, iter_type __end, ios_bas e &__flags, H ios_base::iostate &__err, long double& __val) const {- _RWSTD_ASSERT_RANGE (__begin, __end);> return do_get (__begin, __end, __flags, __err, __val); }J iter_type get (iter_type __begin, iter_type __end, ios_base &__flags, B ios_base::iostate &__err, void*& __val) const {- _RWSTD_ASSERT_RANGE (__begin, __end);> return do_get (__begin, __end, __flags, __err, __val); }#ifdef _RWSTD_LONG_LONG // extensionI iter_type get (iter_type __begin, iter_type __end, ios_base &__flags,M ios_base::iostate &__err, _RWSTD_LONG_LONG& __val) const {- _RWSTD_ASSERT_RANGE (__begin, __end);> return do_get (__begin, __end, __flags, __err, __val); } // extensionI iter_type get (iter_type __begin, iter_type __end, ios_base &__flags,, ios_base::iostate &__err,< unsigned _RWSTD_LONG_LONG& __val) const {-  _RWSTD_ASSERT_RANGE (__begin, __end);> return do_get (__begin, __end, __flags, __err, __val); }#endif // _RWSTD_LONG_LONG // Implementation:@ enum { _C_facet_cat = locale::numeric, _C_ok_implicit = 1 }; protected:#ifndef _RWSTD_NO_BOOL? virtual iter_type do_get (iter_type, iter_type, ios_base&, ? ios_base::iostate&, bool&) const;#endif // _RWSTD_NO_BOOLA virtual iter_type do_get (iter_type __begin, iter_type __end ,J ios_base &__flags, ios_base::iostate &__err,< unsigned short &__val) const {B return _RW::__rw_num_do_get (char_type (), __begin, __end,< __flags, __err, __val); }A virtual iter_type do_get (iter_type __begin, iter_type __end,J ios_base &__flags, ios_base::iostate &__err,: unsigned int &__val) const {B return _RW:: __rw_num_do_get (char_type (), __begin, __end,< __flags, __err, __val); }A virtual iter_type do_get (iter_type __begin, iter_type __end,J ios_base &__flags, ios_base::iostate &__err,2 long &__val) const {B return _RW::__rw_num_do_get (char_type (), __begin, __end,< __flags, __err, __val); }A virtual iter_type do_get (iter_type __begin, i ter_type __end,J ios_base &__flags, ios_base::iostate &__err,; unsigned long &__val) const {B return _RW::__rw_num_do_get (char_type (), __begin, __end,< __flags, __err, __val); }A virtual iter_type do_get (iter_type __begin, iter_type __end,J ios_base &__flags, ios_base::iostate &__err,3 float &__val) const {B retu rn _RW::__rw_num_do_get (char_type (), __begin, __end,< __flags, __err, __val); }A virtual iter_type do_get (iter_type __begin, iter_type __end,J ios_base &__flags, ios_base::iostate &__err,4 double &__val) const {2 return _RW::__rw_num_do_get (char_type (),4 __begin, __end,< __flags, __err, __val); }A virtual iter_type do_get (iter_type __begin, iter_type __end,J ios_base &__flags, ios_base::iostate &__err,9 long double &__val) const {2 return _RW::__rw_num_do_get (char_type (),4 __begin, __end,< __flags, __err, __val); }A virtual iter_type do_get (iter_type __begin, iter_type __end,J ios_base &__flags, ios_base: :iostate &__err,3 void* &__val) const {2 return _RW::__rw_num_do_get (char_type (),4 __begin, __end,< __flags, __err, __val); }#ifdef _RWSTD_LONG_LONG // extensionA virtual iter_type do_get (iter_type __begin, iter_type __end,J ios_base &__flags, ios_base::iostate &__err,> _RWSTD_LONG_LONG &__val) const {B return _RW::__rw_num_do_get (char_type (), __begin, __end,C __flags, __err, __val); } // extensionA virtual iter_type do_get (iter_type __begin, iter_type __end,K ios_base &__flags, ios_base::iostate &__err, G unsigned _RWSTD_LONG_LONG &__val) const {B return _RW::__rw_num_do_get (char_type (), __begin, __end,C __flags, _ _err, __val); }#endif // _RWSTD_LONG_LONGprivate:!#ifdef _RWSTD_NO_MEMBER_TEMPLATES$ locale::id &_C_get_id () const { return id; }&#endif // _RWSTD_NO_MEMBER_TEMPLATES};)_RWSTD_INSTANTIATE_3 (class _RWSTD_EXPORT# num_get > >);#ifndef _RWSTD_NO_WCHAR_T)_RWSTD_INSTANTIATE_3 (class _RWSTD_EXPORT& num_get > >);#endif // _RWSTD_NO_WCHAR_T // 22.2.2.2template )>#class num_put: public locale::facet{public:& typedef _CharT char_type;& typedef _OutputIterator iter_type;) _EXPLICIT num_put (size_t __refs = 0)5 : locale::facet (__refs, locale::numeric) { }#ifndef _RWSTD_NO_BOOLG iter_type  put (iter_type __it, ios_base& __flags, char_type __fill,& bool __val) const {4 return do_put(__it, __flags, __fill, __val); }#endifG iter_type put (iter_type __it, ios_base& __flags, char_type __fill,& long __val) const {5 return do_put (__it, __flags, __fill, __val); }G iter_type put (iter_type __it, ios_base& __flags, char_type __fill,/ unsigned long __val) const {5 return do_put (__it, _ _flags, __fill, __val); }G iter_type put (iter_type __it, ios_base& __flags, char_type __fill,( double __val) const {5 return do_put (__it, __flags, __fill, __val); }G iter_type put (iter_type __it, ios_base& __flags, char_type __fill,- long double __val) const {4 return do_put(__it, __flags, __fill, __val); }G iter_type put (iter_type __it, ios_base& __flags, char_type __fill,- const voi d* __val) const {4 return do_put(__it, __flags, __fill, __val); } // extensionsG iter_type put (iter_type __it, ios_base& __flags, char_type __fill,' short __val) const {4 return do_put(__it, __flags, __fill, __val); }G iter_type put (iter_type __it, ios_base& __flags, char_type __fill,0 unsigned short __val) const {4 return do_put(__it, __flags, __fill, __val); }G iter_type put (iter_type __i t, ios_base& __flags, char_type __fill,% int __val) const {4 return do_put(__it, __flags, __fill, __val); }G iter_type put (iter_type __it, ios_base& __flags, char_type __fill,. unsigned int __val) const {4 return do_put(__it, __flags, __fill, __val); }#ifdef _RWSTD_LONG_LONGG iter_type put (iter_type __it, ios_base& __flags, char_type __fill,2 _RWSTD_LONG_LONG __val) const {4 return do_pu t(__it, __flags, __fill, __val); }G iter_type put (iter_type __it, ios_base& __flags, char_type __fill,; unsigned _RWSTD_LONG_LONG __val) const {4 return do_put(__it, __flags, __fill, __val); }#endif // _RWSTD_LONG_LONG static locale::id id; // Implementation:@ enum { _C_facet_cat = locale::numeric, _C_ok_implicit = 1 }; protected:#ifndef _RWSTD_NO_BOOLK virtual iter_type do_put (iter_type, ios_base&, char_type, bool) con  st;#endifK virtual iter_type do_put (iter_type, ios_base&, char_type, long) const;> virtual iter_type do_put (iter_type, ios_base&, char_type,3 unsigned long) const;M virtual iter_type do_put (iter_type, ios_base&, char_type, double) const;> virtual iter_type do_put (iter_type, ios_base&, char_type,1 long double) const;> virtual iter_type do_put (iter_type, ios_base&, char_type,1 const  void*) const; // extensionsL virtual iter_type do_put (iter_type, ios_base&, char_type, short) const;> virtual iter_type do_put (iter_type, ios_base&, char_type,4 unsigned short) const;J virtual iter_type do_put (iter_type, ios_base&, char_type, int) const;> virtual iter_type do_put (iter_type, ios_base&, char_type,2 unsigned int) const;#ifdef _RWSTD_LONG_LONG? virtual iter_type do_put (iter_type, ios_base& , char_type, 6 _RWSTD_LONG_LONG) const;? virtual iter_type do_put (iter_type, ios_base&, char_type, ? unsigned _RWSTD_LONG_LONG) const;#endif // _RWSTD_LONG_LONGprivate:!#ifdef _RWSTD_NO_MEMBER_TEMPLATES5 locale::id &_C_get_id (void) const { return id; }#endif};)_RWSTD_INSTANTIATE_3 (class _RWSTD_EXPORT# num_put > >);#ifndef _RWSTD_NO_WCHAR_T)_RWSTD_INSTANTIATE_3 (class _RWSTD_EXPORT& num_put > >);#endif // _RWSTD_NO_WCHAR_T // 22.2.3.1template &class numpunct: public locale::facet, 6 public _RW::__rw_numpunct_impl<_CharT>{public: typedef _CharT char_type;I typedef basic_string<_CharT, char_traits<_CharT>, allocator<_CharT> >  string_type;N // The second parameter (i) to the constructor is implementation specific.9 // For portable code, always let it default as shown.#ifndef _MSC_VER+ _EXPLICIT numpunct (size_t __refs = 0, E const _RW::__rw_numpunct_init_data<_CharT>* =J _RW::__rw_numpunct_impl<_CharT>::_C_get_ivals ());#else+ _EXPLICIT numpunct (size_t __refs = 0, E const _RW::__rw_numpunct_init_data<_CharT>* =)  _C_get_ivals ());#endif // _MSC_VER& char_type decimal_point () const {" return do_decimal_point(); }& char_type thousands_sep () const {" return do_thousands_sep(); } string grouping () const { return do_grouping(); }# string_type truename () const { return do_truename (); }% string_type falsename () const { return do_falsename(); } static locale::id id;  // Implementation:@ enum { _C_facet_cat = locale::numeric, _C_ok_implicit = 1 }; protected:1 virtual char_type do_decimal_point () const { return this->_C_dp; }1 virtual char_type do_thousands_sep () const { return this->_C_ts; }) virtual string do_grouping () const { return this->_C_gr; }. virtual string_type do_truename () const { return this->_C_tn; }/ virtual string_type do_falsename () const {  return this->_C_fn; } // Implementation:private:. virtual void _C_initfacet (const locale&);!#ifdef _RWSTD_NO_MEMBER_TEMPLATES5 locale::id &_C_get_id (void) const { return id; }#endif};template inline numpunct<_CharT>::Inumpunct (size_t __ref, const _RW::__rw_numpunct_init_data<_CharT> *__np)- : locale::facet(__ref, locale::numeric), + _RW::__rw_numpunct_impl<_CharT>(__np){ }:_RWSTD_INSTANTIATE_1 (class _RWSTD_EXP ORT numpunct);#ifndef _RWSTD_NO_WCHAR_T=_RWSTD_INSTANTIATE_1 (class _RWSTD_EXPORT numpunct);#endif // _RWSTD_NO_WCHAR_T // 22.2.3.2template .class numpunct_byname: public numpunct<_CharT>{public:G _EXPLICIT numpunct_byname (const char *__name, size_t __refs = 0) :1#if defined (_MSC_VER) && !defined (__BORLANDC__)> numpunct<_CharT>(__refs, _C_get_init_by_name_(__name))#else numpunct<_CharT>(__refs,\  _RW::__rw_numpunct_impl_data<_CharT>::_C_get_init_by_name_(__name))#endif // _MSC_VER { }};} // namespace std_RWSTD_NAMESPACE (__rw) { ##ifndef _RWSTD_NO_FUNC_PARTIAL_SPECtemplate %inline _STD::numpunct_byname<_CharT>*:__rw_create_classic_facet (_STD::numpunct_byname<_CharT>*){2 return new _STD::numpunct_byname<_CharT>("C");}template %inline _STD::numpunct_byname<_CharT>*L__rw_create_named_facet (_STD: :numpunct_byname<_CharT>*, const char *__name,0 _RWSTD_C::size_t __ref){< return new _STD::numpunct_byname<_CharT>(__name, __ref);}template inline _STD::numpunct<_CharT>*E__rw_create_named_facet (_STD::numpunct<_CharT>*, const char *__name,0 _RWSTD_C::size_t __ref){< return new _STD::numpunct_byname<_CharT>(__name, __ref);}3#else // if defined (_RWSTD_NO_FUNC_PARTIAL_SPEC)_RWSTD_SPECIALIZED_FUNCTIO N#inline _STD::numpunct_byname*8__rw_create_classic_facet (_STD::numpunct_byname*){0 return new _STD::numpunct_byname("C");}_RWSTD_SPECIALIZED_FUNCTION#inline _STD::numpunct_byname*J__rw_create_named_facet (_STD::numpunct_byname*, const char *__name,0 _RWSTD_C::size_t __ref){: return new _STD::numpunct_byname(__name, __ref);}_RWSTD_SPECIALIZED_FUNCTIONinline _STD::numpunct*C__rw_create_named_ facet (_STD::numpunct*, const char *__name,0 _RWSTD_C::size_t __ref){: return new _STD::numpunct_byname(__name, __ref);}#ifndef _RWSTD_NO_WCHAR_T_RWSTD_SPECIALIZED_FUNCTION&inline _STD::numpunct_byname*;__rw_create_classic_facet (_STD::numpunct_byname*){3 return new _STD::numpunct_byname("C");}_RWSTD_SPECIALIZED_FUNCTION&inline _STD::numpunct_byname*M__rw_create_named_facet (_STD::numpu nct_byname*, const char *__name,0 _RWSTD_C::size_t __ref){= return new _STD::numpunct_byname(__name, __ref);}_RWSTD_SPECIALIZED_FUNCTIONinline _STD::numpunct*F__rw_create_named_facet (_STD::numpunct*, const char *__name,0 _RWSTD_C::size_t __ref){= return new _STD::numpunct_byname(__name, __ref);}#endif // _RWSTD_NO_WCHAR_T'#endif // _RWSTD_NO_FUNC_PARTIAL_SPEC} // namespace __rwE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif$#if _RWSTD_DEFINE_TEMPLATE (NUMERIC)## include #endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif#endif // _V3_LOCALE%#endif // _RWSTD_NUMERIC_H_INCLUDEDww r7Ԧ/*** >** Copyright 2003 Compaq Information Technologies Group, L.P.**C** Compaq and the Compaq logo are trademarks of Compaq Information @** Technologies Group, L.P. in the U.S. and/or other countries.**J** Confidential computer software. Valid license from Compaq required forF** possession, use or copying. Consistent with FAR 12.211 and 12.212,F** Commercial Computer Software, Computer Software Documentation, andK** Technical Data for Commercial Items are li p7Ԧ// -*- C++ -*-L/*************************************************************************** *$ * _pair.h - definition of std::pair */ * $Id: //stdlib/3.0-rel/include/rw/_pair.h#2 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and  12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** * * Copyright (c) 1994 * Hewlett-Packard Company *E * Permission to use, copy, modify, distribute and sell this softwareG * and its documentation for any purpose is hereby granted without fee,D * provi  ded that the above copyright notice appear in all copies andD * that both that copyright notice and this permission notice appearA * in supporting documentation. Hewlett-Packard Company makes noA * representations about the suitability of this software for anyH * purpose. It is provided "as is" without express or implied warranty. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. * F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provid  ed or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as appl icable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/#ifndef _RWSTD_PAIR_H_INCLUDED#define _RWSTD_PAIR_H_INCLUDED/#include // for less#include #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#end ifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) { // 20.2.2%template struct pair{ typedef _TypeT first_type; typedef _TypeU second_type; first_type first; second_type second; // 20.2.2, p2 pair ()'#ifndef _RWSTD_NO_EMPTY_MEM_INITIALIZER4 : first (/* lwg issue 265 */), second () { }#elseC // assumes types satisfy the CopyConstructible requirements< : first (first_type ()), second (second_type ()) { }+#endif // _RWSTD_NO_EMPTY_MEM_INITIALIZER // 20.2.2, p38 pair (const first_type &__x, const second_type &__y)' : first (__x), second (__y) { })#ifndef _RWSTD_NO_INLINE_MEMBER_TEMPLATES // 20.2.2, p4) template . pair (const pair <_TypeX, _TypeY> &__rhs) 8 : first (__rhs.first), s econd (__rhs.second) { } // lwg issue 353) template J pair<_TypeT, _TypeU>& operator= (const pair <_TypeX, _TypeY> &__rhs) {A return first = __rhs.first, second = __rhs.second, *this; }-#endif // _RWSTD_NO_INLINE_MEMBER_TEMPLATES}; // 20.2.2, p5%template inline boolMoperator== (const pair<_TypeT, _TypeU>& __x, const pair<_TypeT, _TypeU>& __y){ ? return __x.first == __y.first && __x.secon d == __y.second; }%template inline boolMoperator!= (const pair<_TypeT, _TypeU>& __x, const pair<_TypeT, _TypeU>& __y){  return !(__x == __y);} // 20.2.2, p6%template inline boolLoperator< (const pair<_TypeT, _TypeU>& __x, const pair<_TypeT, _TypeU>& __y){ _STD::less<_TypeT> __lessT;* // follows resolution of lwg issue 348, return __lessT (__x.first, __y.first)1 || ( !__lessT (__y.first, __x.first)A && _STD::less<_TypeU>()(__x.second, __y.second));}%template inline boolLoperator> (const pair<_TypeT, _TypeU>& __x, const pair<_TypeT, _TypeU>& __y){  return __y < __x;}%template inline boolMoperator>= (const pair<_TypeT, _TypeU>& __x, const pair<_TypeT, _TypeU>& __y){  return !(__x < __y);}%template inline boolMoperator<=! (const pair<_TypeT, _TypeU>& __x, const pair<_TypeT, _TypeU>& __y){  return !(__y < __x);}.// 20.2.2, p7, signature follows lwg issue 181%template inline pair<_TypeT, _TypeU>"make_pair (_TypeT __x, _TypeU __y){* return pair<_TypeT, _TypeU>(__x, __y);}} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif"#endif // _RWSTD_PAIR_H_INCLUDEDww # ment Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. $ All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies % thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 C& FR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/"#ifndef _RWSTD_PODARRAY_H_INCLUDED"#define _RWSTD_PODARRAY_H_INCLUDED#include #include #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults' # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (__rw) { ,template class __rw_pod_array{ _RWSTD_SIZE_T _C_len; _TypeT *_C_pbuf;% _TypeT _C_buffer [_Size];public:8 __rw_pod_array (): _C_len (0), _C_pbuf (_C_buffer) { *_C_pbuf = _TypeT (); }0 _EXPLICI ( T __rw_pod_array (const _TypeT *__a); : _C_len (_STD::char_traits<_TypeT>::length (__a)),J _C_pbuf (_C_len < _Size ? _C_buffer : new _TypeT [_C_len + 1]) {C _STD::char_traits<_TypeT>::copy (_C_pbuf, __a, _C_len + 1); }; __rw_pod_array (const _TypeT *__a, _RWSTD_SIZE_T __len) : _C_len (__len),I _C_pbuf (_C_len < _Size ? _C_buffer : new _TypeT [__len + 1]) {> _STD::char_traits<_TypeT>::copy (_C_pbuf, __a, __len);% _C_pbuf [_C_) len] = _TypeT (); }0 __rw_pod_array (const __rw_pod_array &__rhs) : _C_len (__rhs._C_len),J _C_pbuf (_C_len < _Size ? _C_buffer : new _TypeT [_C_len + 1]) {@ _STD::char_traits<_TypeT>::copy (_C_pbuf, __rhs._C_pbuf,C _C_len + !!__rhs._C_pbuf); } ~__rw_pod_array () {! if (_C_pbuf == _C_buffer)P _RWSTD_ASSERT (_STD::char_traits<_TypeT>::length (_C_pbuf) < _Size); else * delete[] _C_pbuf; } _TypeT* (data)() { return _C_pbuf; }" const _TypeT* (data)() const { return _C_pbuf; } _TypeT* (release)() {! _TypeT *__pbuf = _C_pbuf; _C_pbuf = _C_buffer; return __pbuf; }" _RWSTD_SIZE_T (size)() const { return _C_len; }F __rw_pod_array& (append)(const _TypeT *__a, _RWSTD_SIZE_T __len) {& if (_C_len + __len >= _Size) {< _TypeT *__tmp = new _T+ ypeT [_C_len + __len + 1];E _STD::char_traits<_TypeT>::copy (__tmp, _C_pbuf, _C_len);% if (_C_pbuf != _C_buffer)! delete[] _C_pbuf; _C_pbuf = __tmp; }G _STD::char_traits<_TypeT>::copy (_C_pbuf + _C_len, __a, __len); _C_len += __len;% _C_pbuf [_C_len] = _TypeT (); return *this; }0 __rw_pod_array& append (const _TypeT *__a) { _RWSTD_ASSERT (__a);F return (append)(__a, _STD:, :char_traits<_TypeT>::length (__a)); }4 __rw_pod_array& operator+= (const _TypeT *__a) { _RWSTD_ASSERT (__a); return (append)(__a); }F __rw_pod_array& (assign)(const _TypeT *__a, _RWSTD_SIZE_T __len) { if (__len >= _Size) {< _TypeT *__tmp = new _TypeT [_C_len + __len + 1];E _STD::char_traits<_TypeT>::copy (__tmp, _C_pbuf, _C_len);% if (_C_pbuf != _C_buffer)! delete[] _C_pbuf; _C_p- buf = __tmp; }B _STD::char_traits<_TypeT>::copy (_C_pbuf, __a, __len + 1); _C_len = __len; return *this; }0 __rw_pod_array& assign (const _TypeT *__a) { _RWSTD_ASSERT (__a);F return (assign)(__a, _STD::char_traits<_TypeT>::length (__a)); }3 __rw_pod_array& operator= (const _TypeT *__a) { _RWSTD_ASSERT (__a); return (assign)(__a); }= __rw_pod_array& operator= (const __rw_pod_array &__rhs) {5 return (assign)(__rhs._C_pbuf, __rhs._C_len); }};} // namespace __rwE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif&#endif // _RWSTD_PODARRAY_H_INCLUDEDww / xp7ԦM/**************************************************************************** *C * _punct.cc - Internal classes for numeric formatting and parsing. *1 * $Id: //stdlib/3.0-rel/include/rw/_punct.cc#3 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent 0 with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws an 1 d other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This comput 2 er software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *3 M ***************************************************************************/#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endif#include #include #include #include #include _RWSTD_CLOCALEE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_pre4 fix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (__rw) { 2// -----------------------------------------------=// Template __rw_numpunct_impl_data<_CharT> member functions.2// -----------------------------------------------template Lvoid __rw_numpunct_impl_data<_CharT>::_C_initfacetbase (const _STD::locale&){$ tf_defs_[0]._C_name=_C_tn.c_str(); tf_defs_[0]._C_indx=1;$ tf_defs_[1]._C_name=_C_fn.c_str(); tf_defs_[1]._C_indx=0; tf_m5 ap_._C_numdefs=2 ; tf_map_._C_defs=tf_defs_;}template __rw_numpunct_init_data<_CharT>*J__rw_numpunct_impl_data<_CharT>::_C_get_init_by_name_ (const char *__name){M return __rw_fixup_numpunct_init (_C_get_named_init_(__name), (_CharT*)0);}} // namespace __rw_RWSTD_NAMESPACE (__rw) { 8// -----------------------------------------------------=// Template __rw_numpunct_init_data<_CharT> member templates.8// -----------------------------------------6 ------------template 5const _CharT __rw_bool_name<_CharT>::_C_name[][6] = {& { 'f', 'a', 'l', 's', 'e', '\0' }, { 't', 'r', 'u', 'e', '\0' }};template %const __rw_numpunct_init_data<_CharT>(__rw_numpunct_impl<_CharT>::_C_ivals = {! false, // don't delete: '.', // decimal point (as per 22.2.3.1.2, p1)@ ',', // thousands separator (as per 22.2.3.1.2, p2)@ "", // digit grouping rule (as per 22.2.3.7 1.2, p3)L __rw_bool_name<_CharT>::_C_name [true], // Boolean true value as stringM __rw_bool_name<_CharT>::_C_name [false] // Boolean false value as string};template __rw_numpunct_init_data<_CharT>*G__rw_fixup_numpunct_init (__rw_numpunct_init_data *__np, _CharT*){ if (!__np) return 0;E typedef _STD::char_traits _CharTraits;A typedef _STD::char_traits<_CharT> _Traits;@ typedef _S 8 TD::ctype<_CharT> _Ctype;B typedef _STD::codecvt<_CharT, char, _STD::mbstate_t> _Codecvt;I typedef _STD::basic_string<_CharT, _Traits, _STD::allocator<_CharT> > _String;< // FIXME: use the (possibly named) locale whose numpunct= // facet is being intialized here to convert lconv( // multibyte strings 8 // FIXME: this also causes a deadlock the first timeF // use_facet >(locale::cla 9 ssic ()) // is called...2 _STD::locale __loc = _STD::locale::classic ();= const _Codecvt &__cvt = _STD_USE_FACET (_Codecvt, __loc);O _String __tnm = __cvt.in (__np->_C_tn); // boolean true name text string O _String __fnm = __cvt.in (__np->_C_fn); // boolean false name text string: // compute the number of chars and charT's to allocateH _RWSTD_SIZE_T __xtra_chars = _CharTraits::length (__np->_C_gr) + 1;G _RWSTD_SIZE_T __xtra_charTs = __tnm.length : () +__fnm.length () + 2;+ // allocate a "variable size" structure+ __rw_numpunct_init_data<_CharT> *__res;F __res = _RWSTD_REINTERPRET_CAST (__rw_numpunct_init_data<_CharT>*, < new char [ sizeof (*__res)9 + __xtra_charsN + __xtra_charTs * sizeof(_CharT)]);9 const _Ctype &__ctp = _STD_USE_FACET (_Ctype, __loc); // initialize members __res->_C_del ; = true;. __res->_C_dp = __ctp.widen (__np->_C_dp);. __res->_C_ts = __ctp.widen (__np->_C_ts);C // append null-terminated charT strings to the end of structureA _CharT *__p = _RWSTD_REINTERPRET_CAST (_CharT*, (__res + 1)); // check alignmentC _RWSTD_ASSERT (!( _RWSTD_REINTERPRET_CAST (_RWSTD_SIZE_T, __p)) % sizeof (_CharT))); _RWSTD_SIZE_T __n;P __res->_C_tn = _Traits::copy (__p, __tnm.c_str(), __n = __tnm.length() + 1); __p += _ < _n;P __res->_C_fn = _Traits::copy (__p, __fnm.c_str(), __n = __fnm.length() + 1); __p += __n;; // append a null terminated char string to the very endK __res->_C_gr = _CharTraits::copy (_RWSTD_REINTERPRET_CAST (char*, __p),A __np->_C_gr, __xtra_chars); if (__np->_C_del)> // redundant const_cast for compilers such as MSVC 6.0= // that do not conform to 5.3.5, p2, Note 2 of the IS+ delete[] _RWSTD_CONST_CAST (= char*, I _RWSTD_REINTERPRET_CAST (const char*,D __np)); return __res;}8// ----------------------------------------------------->// Template __rw_timepunct_impl_data<_CharT> member templates.8// -----------------------------------------------------template :__rw_timepunct_impl_data<_CharT>::__rw_timepunct_impl_data, (const __rw_timepunct_init<_CharT> &__p){ in> t __i; for (__i=0; __i<7; __i++) {5 _C_day_nms[__i][0]=__p._C_get_day (__i, false);4 _C_day_nms[__i][1]=__p._C_get_day (__i, true); } for (__i=0; __i<12; __i++) {9 _C_month_nms[__i][0]=__p._C_get_month (__i, false);8 _C_month_nms[__i][1]=__p._C_get_month (__i, true); }) _C_ampm_nms[0]=__p._C_get_ampm (false);( _C_ampm_nms[1]=__p._C_get_ampm (true); _C_bad_nm=__p._C_get_bad (); for (__i=0; __i<100; __i++)+ _C_ord_nms[__i]=__p._C_get_ord (__i);?  for (_RWSTD_SIZE_T __j = 0;C __j < sizeof _C_dt_tm_pats / sizeof _C_dt_tm_pats[0]; ++__j)7 _C_dt_tm_pats[__j]=__p._C_get_pattern (int(__j));}3// struct for storing formatting information in mapstruct __rwstd_fmt { __rwstd_fmt () {}G __rwstd_fmt (_RWSTD_SIZE_T __pos, _RWSTD_SIZE_T __len, char __fmtc)> : _C_pos(__pos), _C_len(__len), _C_fmt_char(__fmtc) {} _RWSTD_SIZE_T _C_pos; _RWSTD_SIZE_T _C_len; char _C_fmt_char;0 bool operator < @ (const __rwstd_fmt& __fmt) {% return _C_pos < __fmt._C_pos; }};=// initialize data member pat_ which holds formatting stringstemplate Mvoid __rw_timepunct_impl_data<_CharT>::_C_initpat (const _STD::locale &__loc){D static const char __tm_single_data_patts[] = "YyjSMIHmBbAapdZUWw"; _RWSTD_C::tm __tmb; char __buf[256];$ __rwstd_fmt __fmtstruct_array[20]; // set up tmp __tmb.tm_sec = 56; __tmb.tm_min = 54; __tmb.tm_hour = 22; __tmA b.tm_mday = 30; __tmb.tm_mon = 10; __tmb.tm_year = 90; __tmb.tm_wday = 5; __tmb.tm_yday = -1; __tmb.tm_isdst = -1;# (void) _RWSTD_C::mktime (&__tmb);* typedef _STD::ctype<_CharT> _Ctype;/ typedef __rw_facet_maker<_Ctype> _FacetMaker;? // bypass the mutex in std::use_facet<>() by directly callingD // the implementation locale member function to prevent a deadlock const _Ctype &__ctp =( _RWSTD_STATIC_CAST (const _Ctype&,@ __lo B c._C_unsafe_use_facet (_Ctype::id,J _Ctype::_C_ok_implicit,I _Ctype::_C_facet_cat, P _FacetMaker::_C_maker_func)); // Set up passed in locale: _STD::string __oldloc = _RWSTD_C::setlocale (LC_ALL, 0);7 _RWSTD_C::setlocale (LC_ALL, __loc.name ().c_str ());= // For each composite format character create format string6 static const char C __tm_mult_data_patts[] = "xXcDrT";M for (unsigned int __j = 0; __j != sizeof __tm_mult_data_patts - 1; ++__j) {$ // create format string to parse char __tmfmt_pat[] = "% ";1 __tmfmt_pat[1] = __tm_mult_data_patts[__j];F _RWSTD_C::strftime (__buf, sizeof (__buf), __tmfmt_pat, &__tmb);* _STD::string __tmfmt_result (__buf);L // starting at the beginning of the formatted string find each component' // and save in an ordered structure _RWSTD_SIZE_T __pos; D int __fmtstruct_index = 0;P for (unsigned int __i=0; __i < sizeof (__tm_single_data_patts) - 1; ++__i) {$ char __tmp_fmt_arg[] = "% ";5 __tmp_fmt_arg[1] = __tm_single_data_patts[__i];H _RWSTD_C::strftime (__buf, sizeof (__buf), __tmp_fmt_arg, &__tmb);I // Some locales don't have am/pm, in which case strftime (...%p...)O // returns a space. Exclude this case to ensure valid substring searches./ if (!( __tm_single_data_patts[__i]=='p'3 && _ E RWSTD_C::strcmp (__buf, " ")==0)) {K if ((__pos = __tmfmt_result.find (__buf)) != (_RWSTD_SIZE_T)(-1)) {- if (_RWSTD_C::strlen (__buf) > 0) {4 __fmtstruct_array[__fmtstruct_index++] == __rwstd_fmt (__pos, _RWSTD_C::strlen (__buf),: __tm_single_data_patts[__i]);D __tmfmt_result.replace (__pos, _RWSTD_C::strlen (__buf),C _RWSTD_C::strlen (__buf), ' '); } }F  } } // Sort Format Items= for (int __top = __fmtstruct_index; __top > 0; --__top) { int __large = 0;- for (int __k = 0; __k < __top; ++__k) {@ if (__fmtstruct_array[__k] < __fmtstruct_array[__large]) __large = __k; }6 __rwstd_fmt __temp = __fmtstruct_array[__large];> __fmtstruct_array[__large] = __fmtstruct_array[__top-1];* __fmtstruct_array[__top-1] = __temp; }E // Attempt to deal with implementations of G strftime that use '%e' {N _STD::string __alt_tmfmt (__tmfmt_result); // Alternate timepunct formatN char __compare_buf[256]; // Buffer to compare with strftime5 // put format characters into formatting string5 for (__rwstd_fmt *__tmpfmt = __fmtstruct_array;> __tmpfmt < (__fmtstruct_array + __fmtstruct_index); ++__tmpfmt) {H __tmfmt_result.replace ((*__tmpfmt)._C_pos, (*__tmpfmt)._C_len, P (_STD::strin H g ("%").append (1, (*__tmpfmt)._C_fmt_char)));O // create an alternate formatting string that uses "%e" instead of "%d"- if ((*__tmpfmt)._C_fmt_char != 'd') {G __alt_tmfmt.replace ((*__tmpfmt)._C_pos, (*__tmpfmt)._C_len, P (_STD::string ("%").append (1, (*__tmpfmt)._C_fmt_char))); } else {G __alt_tmfmt.replace ((*__tmpfmt)._C_pos, (*__tmpfmt)._C_len, / (_STD::string ("%e")));G } I  }N // We need a single-digit day to see if spaces or zeroes are used to pad __tmb.tm_mday=3;2 // See if our usual format string is correct0 _RWSTD_C::strftime (__buf, sizeof (__buf),; __tmfmt_result.c_str (), &__tmb);@ _RWSTD_C::strftime (__compare_buf, sizeof (__compare_buf),/ __tmfmt_pat, &__tmb);H // Make a best-effort guess ... we can't verify that a "J %e" formatM // string will do the trick, since the 'e' modifier is not specified byM // the C standard, and hence the result of strftime would be undefined.4 if (_RWSTD_C::strcmp (__buf, __compare_buf)) {H __tmfmt_result = __alt_tmfmt; // use the alternate format string }; // And restore the "safe" day-of-month for next time. __tmb.tm_mday=30; }? // convert to string_type and insert in array _C_dt_tm_pats string_type __str;2 K for (_TYPENAME string_type::size_type __k = 0;/ __k < __tmfmt_result.length (); ++__k)3 __str += __ctp.widen (__tmfmt_result[__k]); _C_dt_tm_pats[__j] = __str; }2 _RWSTD_C::setlocale (LC_ALL, __oldloc.c_str ());}template Ovoid __rw_timepunct_impl_data<_CharT>::_C_initfacet (const _STD::locale &__loc){ int __i; for (__i=0; __i<7; ++__i) {? _C_dn_defs[__i][0]._C_name=_C_day_nms[__i][0].c_str ();' _C_dn_defs[__i][0]L ._C_indx=__i;? _C_dn_defs[__i][1]._C_name=_C_day_nms[__i][1].c_str ();' _C_dn_defs[__i][1]._C_indx=__i; } for (__i=0; __i<12; ++__i) {A _C_mn_defs[__i][0]._C_name=_C_month_nms[__i][0].c_str ();' _C_mn_defs[__i][0]._C_indx=__i;A _C_mn_defs[__i][1]._C_name=_C_month_nms[__i][1].c_str ();' _C_mn_defs[__i][1]._C_indx=__i; } 4 _C_ampm_defs[0]._C_name=_C_ampm_nms[0].c_str (); _C_ampm_defs[0]._C_indx= 0;4 _C_ampm_M defs[1]._C_name=_C_ampm_nms[1].c_str (); _C_ampm_defs[1]._C_indx= 1; ! _C_dn_defsmap._C_numdefs=7*2;. _C_dn_defsmap._C_defs=&(_C_dn_defs[0][0]);" _C_mn_defsmap._C_numdefs=12*2;. _C_mn_defsmap._C_defs=&(_C_mn_defs[0][0]);! _C_ampm_defsmap._C_numdefs=2;/ _C_ampm_defsmap._C_defs=&(_C_ampm_defs[0]); _C_initpat (__loc);}7// ----------------------------------------------------8// Facet rwstd::__rw_timepunct<_CharT> member templates.7// -----------------N -----------------------------------template ,_STD::locale::id __rw_timepunct<_CharT>::id;template Evoid __rw_timepunct<_CharT>::_C_initfacet (const _STD::locale &__loc){4 __rw_timepunct_impl<_CharT>::_C_initfacet (__loc);}template -_TYPENAME __rw_timepunct<_CharT>::string_typeA__rw_timepunct<_CharT>::do_dayname (int __day, bool __abbr) const{) return this->_C_day_nms[__day][__abbr];}template -_TYPENAMO E __rw_timepunct<_CharT>::string_typeC__rw_timepunct<_CharT>::do_monthname (int __mon, bool __abbr) const{+ return this->_C_month_nms[__mon][__abbr];}template -_TYPENAME __rw_timepunct<_CharT>::string_type4__rw_timepunct<_CharT>::do_ordinal (int __num) const{K return (__num<0 || __num>99) ? this->_C_bad_nm : this->_C_ord_nms[__num];}*// ---------------------------------------%// Template __rw_digit_reader members*// -----------------------------------P ----)template -char* __rw_digit_reader<_CharT, _InputIter>::C_C_get_digit_string (char *__first, bool __discard /* = false */) { char *__last = __first;) // get a set of punctuator characters: const _CharT *__punct = this->_C_dmap._C_get_punct (); 8 // convert a sequence starting at iterator 'in' into0 // a binary (not character) string of digits while (!eof ()) {K _CharT __c = *_C_in; // exQ tracted characterI int __digit = this->_C_dmap._C_eval (__c); // binary equivalent1 // validate and break out on unknown char6 if ( __digit >= this->_C_base || __digit < 0& && ( 16 != this->_C_baseO || __c != __punct [this->_C_x] && __c != __punct [this->_C_X])) break;" // buffer full, reallocate9 if (__last == this->_C_digits + this->_C_bufsize)) __last = this->_C_realloc ();, // appR end digit to the end of buffer4 // leading zeros may be optionally discarded if ( 0 < __digitA || 0 == __digit && (!__discard || __first != __last))' *__last++ = char (__digit); ++_C_in; } return __last;})template @char* __rw_digit_reader<_CharT, _InputIter>::_C_get_digits (int){, char *__last = this->_C_digits;: const _CharT* __punct = this->_C_dmap._C_get_punct ();8 S if (!eof () && (this->_C_state & this->_C_signed)) {  _CharT __ch = *_C_in;C // If a sign is present, set negative if it's a minus sign.. if ( __ch == __punct [this->_C_plus]2 || __ch == __punct [this->_C_minus]) { ++_C_in;1 if (__ch == __punct [this->_C_minus])4 this->_C_state |= this->_C_negative;0 this->_C_state |= this->_C_advanced; } } if (!this->_C_base) {) T this->_C_base = _C_io._C_base ();P if (0 == this->_C_base || (_C_io.flags () & _STD::ios_base::showbase)) {H // No radix was forced by the ios_base flags, so poke aroundE // for a radix specifier on the front of the input value.# if (0 == this->_C_base)# this->_C_base = 10;> if (!eof () && *_C_in == __punct[this->_C_zero]) {" this->_C_base = 8; ++_C_in; *__last++ U = 0;4 this->_C_state |= this->_C_advanced; _CharT __ch; if ( !eof ()A && ( (__ch = *_C_in) == __punct[this->_C_x]: || __ch == __punct[this->_C_X])) {' this->_C_base = 16; ++_C_in;E __last--; // Leading 0 was not a digit after all. } } } }3 if (!*(_C_grouping = this->_C_get_grouping ())V ). __last = _C_get_digit_string (__last); else { _C_gpos = _C_groups;6 thousands_sep = this->_C_get_thousands_sep ();5 __last = _C_get_digit_groups (__last);7 if (!this->_C_error && --_C_gpos > _C_groups) {K // Digit grouping is optional, but if present it must be right.- const char *__gdef = _C_grouping; do {F if (*__gdef != *_C_gpos && *__gdef != _RWSTD_CHAR_MAX) brW eak; if (__gdef[1]) ++__gdef;, } while (--_C_gpos > _C_groups);: if (_C_gpos > _C_groups || *_C_gpos > *__gdef)8 this->_C_error |= this->_C_bad_grouping; } }! if (__last > this->_C_digits), this->_C_state |= this->_C_advanced; return __last;})template Cchar* __rw_digit_reader<_CharT, _InputIter>::_C_get_digits (double){9 // get leadiX ng digits if any, discaring leading zeros this->_C_base = 10;& char *__first = _C_get_digits (0);% // get a set of valid punctuators: const _CharT *__punct = this->_C_dmap._C_get_punct (); this->_C_frac_beg = __first;% if (!this->_C_error && !eof ()) {6 if (*_C_in == this->_C_get_decimal_point ()) {D // advance past decimal point and append fractional part, // to the end of internal buffer ++_C_in;4 __first = Y _C_get_digit_string (__first); } }? // 7.19.6.1 of C99: determine whether we're parsing one of:7 // "inf", "infinity", "nan", "nan(n-char-sequence)"0 if (__first == this->_C_digits && !eof ()) {( const _STD::ctype &__ctp =@ _STD_USE_FACET (_STD::ctype, _C_io.getloc ());2 char __c = (__ctp.tolower)(char (*_C_in)); if ('i' == __c) {3 static const char __inf[] = "infinity";= for (const cha Z r *__p = __inf; ; ++__p, ++_C_in) {; // both "inf" and "infinity" are recognized0 if ( !*__p || 3 == __p - __inf? && *__p != (__ctp.tolower)(char(*_C_in))) {8 this->_C_state |= this->_C_infinity;# return __first; }D if (eof () || *__p != (__ctp.tolower)(char(*_C_in)))% break; // error } } else if ('n' == __c) {= [ for (const char *__p = "nan"; ; ++__p, ++_C_in) {G // both "nan" and "nan(n-char-sequence)" are recognized if (!*__p) {! if (eof ()) {7 this->_C_state |= this->_C_nan;' return __first; }( if ('(' == *_C_in) {= // FIXME: "(n-char-sequence)" ignored' while (!eof ())2 if (')\ ' == *_C_in++) {? this->_C_state |= this->_C_nan;/ return __first; } }% break; // error }I else if (eof () || (__ctp.tolower)(char(*_C_in)) != *__p)% break; // error } } }# if (__first == this->_C_digits)- this->_C_error |= this->_C_no_digits; this->_C_e] xp_beg = __first;/ this->_C_state &= ~this->_C_exp_negative; _CharT __ch;% if ( !this->_C_error && !eof ()5 && ( (__ch = *_C_in) == __punct [this->_C_e]/ || __ch == __punct [this->_C_E])) {6 // advance past 'e' or 'E' and append exponent( // to the end of internal buffer ++_C_in; if (eof ())4 this->_C_error |= this->_C_bad_exponent; else {4 // check for '+' or '-' after 'e' or 'E'; ^ if ((__ch = *_C_in) == __punct [this->_C_plus]) ++_C_in;8 else if (__ch == __punct [this->_C_minus]) {8 this->_C_state |= this->_C_exp_negative; ++_C_in; }3 // read _C_in (decimal) exponent digits* int __radix = this->_C_base; this->_C_base = 10;: __first = _C_get_digit_string (__first);$ this->_C_base = __radix;, if (__first == thi_ s->_C_exp_beg)8 this->_C_error |= this->_C_bad_exponent; } } return __first;})template -char* __rw_digit_reader<_CharT, _InputIter>::' _C_get_digit_groups (char *__first){. char *__eod=_C_get_digit_string (__first); , if (_C_gpos==_C_groups+sizeof _C_groups)1 this->_C_error|=this->_C_too_many_groups; else {+ _RWSTD_PTRDIFF_T __i=__eod-__first;# if (__i >= _RWSTD_CHAR_M` AX)4 this->_C_error|=this->_C_group_too_long; else { if (__i!=0) {% *_C_gpos++=char(__i);7 if (!eof () && *_C_in==thousands_sep) { ++_C_in;6 __eod=_C_get_digit_groups (__eod); } } } }  return __eod;})template +int __rw_digit_reader<_CharT, _InputIter>::= _C_get_keyword (const __rw_keyworda _map<_CharT> &__in_map){A const __rw_keyword_def<_CharT> *__map_ptr = __in_map._C_defs;/ const __rw_keyword_def<_CharT> *__end_ptr =- __in_map._C_defs+__in_map._C_numdefs; E __rw_keyword_def<_CharT> __can_ary[40], // Candidate names. *__can_ptr=__can_ary;   const _CharT *__name; int __res; _CharT __input; 1 // The first pass produces a set of candidate2 // names in the local array. Successive passes7 b // deal with local array exclusively -- iteratively6 // stripping matching characters and keeping their8 // related map info while discarding map info if not // matching.  for ( ; ; ) { if (eof ()) {6 for ( ; __map_ptr<__end_ptr; ++__map_ptr) 8 if (!*__map_ptr->_C_name) : return __map_ptr->_C_indx;  break; }  __input=*_C_in; __res=-1; c 3 for ( ; __map_ptr<__end_ptr; ++__map_ptr) {& __name=__map_ptr->_C_name;# if (__input==*__name) {, __can_ptr->_C_name=++__name;6 __can_ptr->_C_indx=__map_ptr->_C_indx;- ++__can_ptr; }D else if (*__name==0 ) // End of abbreviated name.P __res=__can_ptr->_C_indx;// NOTE: If an abbreviation is followedO // by charad cters that could match the N } // full name, continues reading untilL // full name is matched, else failsP // (per 22.2.5.1.2-6 in the Standard) , if (__can_ptr==__can_ary) // P return __res; // EX: If table has "Sunday" and "Sun",N // input "Sund" will fail, but "Suni"; e // evals to "Sun".  ++_C_in; O if (__can_ptr==__can_ary+1) { // Only one matching candidate name left.B for (__name=__can_ary[0]._C_name; *__name; ++__name) {/ if (eof () || *_C_in!=*__name)  return -1; ++_C_in; }( return __can_ary[0]._C_indx; } E __end_ptr =__can_ptr; // After first pass, vars refer8 __can_ptr =__canf _ary; // to local array.& __map_ptr =__can_ary;   }. return -1; }6// ---------------------------------------------------6// Template __rw_digit_writer_base_1 member templates.6// ---------------------------------------------------template "__rw_digit_writer_base_1<_CharT>::A__rw_digit_writer_base_1 (_STD::ios_base &__flags,> const __rw_punct_data<_CharT> g &__mp)' : __rw_digit_writer_base (__flags),@ __rw_digit_handler_base_1<_CharT>(__flags.getloc (), __mp){K _C_flags &= ~(_STD::ios_base::floatfield | _STD::ios_base::showpos);) _C_flags |= _STD::ios_base::fixed; _C_base = 10; _C_precision = 0;}/// --------------------------------------------/// Template __rw_digit_writer member templates./// --------------------------------------------*template Jvoid __rw_digih t_writer<_CharT, _OutputIter>::_C_put_digits (_CharT __fill){ char *__p=this->_C_start;- bool __has_sign=false, __has_point=false,4 __has_prefix_8=false, __has_prefix_16=false; D if (__p_C_end && (*__p==' ' || *__p=='-' || *__p=='+')) { __has_sign=true; __p++; } if (__p+1 < this->_C_end. && (this->_C_base == 16 && *__p == '0'5 && (*(__p+1) == 'x') || *(__p+1) == 'X')) __has_prefix_16 = true;  i if (__p+1 < this->_C_end/ && (this->_C_base == 8 && *__p == '0')) __has_prefix_8 = true; . // Locate the end of the integral digits. char *__dec; if (!this->_C_fractional) __dec=this->_C_end; else { __dec=this->_C_start; if (__has_sign) __dec++;, for ( ; __dec_C_end; ++__dec)+ if (*__dec<'0' || *__dec>'9') {/ if (*__dec!='e' && *__dec!='E')% __has_point=trj ue; break; } } D // Calculate the number and pattern of separators needed if any.# _CharT __separator = _CharT (); : _RWSTD_PTRDIFF_T __ungrouped = __dec - this->_C_start; if (__has_sign) __ungrouped--; if (__has_prefix_16) __ungrouped -= 2; if (__has_prefix_8) __ungrouped--; if (this->_C_separable) {> __ungrouped = this->_C_calc_groups (int (__ungrouped),F k this->_C_get_grouping ()); if (this->_C_num_groups)6 __separator=this->_C_get_thousands_sep (); } N // Compute the number of fill CharT's needed, and where they should be put) _RWSTD_PTRDIFF_T __left_fill = 0;) _RWSTD_PTRDIFF_T __internal_fill = 0;) _RWSTD_PTRDIFF_T __right_fill = 0; if (this->_C_width>0) { _RWSTD_PTRDIFF_T __w = > this->_C_width - (this->_C_end - this->_C_start)" l - this->_C_num_groups; this->_C_width=0; if (__w>0) {& switch (this->_C_adjust) {1 case __rw_digit_writer_base::_C_left:! __right_fill=__w; break;5 case __rw_digit_writer_base::_C_internal:$ __internal_fill=__w; break; default: __left_fill=__w; } } } 0 // widen the sign + digits + exponent string8 // d m efault buffer, will allocate larger if necessary? _CharT __widebuf [__rw_digit_writer_base::_C_DEF_BUFSIZE];& _CharT *__wide_digits = __widebuf;& // increase the size of the bufferP if (this->_C_end - this->_C_start >= __rw_digit_writer_base::_C_DEF_BUFSIZE)G __wide_digits = new _CharT [this->_C_end - this->_C_start + 1]; F this->_C_ctyp.widen (this->_C_start, this->_C_end, __wide_digits); D // Write the widened string with fill and decorations to output.n ( _CharT *__digit_pos = __wide_digits; while (__left_fill--) *_C_out++ = __fill; if (__has_sign): *_C_out++ = *__digit_pos++; // the widened sign if (__has_prefix_16) {. *_C_out++ = *__digit_pos++; // the "0". *_C_out++ = *__digit_pos++; // the "x" } if (__has_prefix_8) . *_C_out++ = *__digit_pos++; // the "0" while (__internal_fill--) *_C_out++ = __fill; while (__ungrouped--)# *_C_out++ o = *__digit_pos++;# while (this->_C_num_groups--) { *_C_out++ = __separator;# while (this->_C_group[0]--)% *_C_out++=*__digit_pos++; ++this->_C_group; }  if (__has_point) {0 *_C_out++=this->_C_get_decimal_point (); ++__digit_pos; } ' __ungrouped = this->_C_end - __dec; if (__has_point) __ungrouped--; while ((__ungrouped--) > 0)# *_C_out++ = *__digit_pos++;  whilp e (__right_fill--) *_C_out++ = __fill;# if (__wide_digits != __widebuf) delete[] __wide_digits;}*template -void __rw_digit_writer<_CharT, _OutputIter>::D _C_put_keyword (const string_type &__instr, _CharT __fillchar) {5 _RWSTD_PTRDIFF_T __left_fill = 0, __right_fill=0;F _RWSTD_PTRDIFF_T __fillnum = this->_C_width - __instr.length (); if (__fillnum>0) {" switch (this->_C_adjust) {- case __rw_digit_q writer_base::_C_left:# __right_fill=__fillnum; break;1 case __rw_digit_writer_base::_C_internal: default:" __left_fill=__fillnum; } if (__left_fill)$ do *_C_out++=__fillchar;" while (--__left_fill); } L const _CharT *__tmp=__instr.c_str (), *__endtmp=__tmp+__instr.length (); while (__tmp<__endtmp) *_C_out++=*__tmp++;  if (__right_fill) do *_C_out++=__fillchar; while (--__right_fill);}} // namespace __rwE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endifww s q7ԦM/**************************************************************************** *F * _punct.h - Definitions of the punct and supporting template classes *E * This is an internal header file used to implement the C++ Standard? * Library. It should never be #included directly by a program. *0 * $Id: //stdlib/3.0-rel/include/rw/_punct.h#2 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Dev t elopment Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, u Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other co v pies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at w 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *M ***************************************************************************/#ifndef _RWSTD_PUNCT_H_INCLUDED#define _RWSTD_PUNCT_H_INCLUDED#include #ifdef _V3_LOCALE// no corresponding header#else#include #include #include #include #include _RWSTD_CTIME#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) { template class numpunct;#template class moneypunct;} // namespay ce std_RWSTD_NAMESPACE (__rw) { <// ---------------------------------------------------------=// Implementation class template -- __rw_keyword_def<_CharT>.<// ---------------------------------------------------------N// Helper class used in parsing keywords from input_C_indx (such as true/false5// in num_get, month and day names in time_get, etc).template struct __rw_keyword_def{ const _CharT *_C_name; int _C_indx;};<// --------------- z ------------------------------------------=// Implementation class template -- __rw_keyword_map<_CharT>.<// ---------------------------------------------------------K// Defines a set of keywords to be recognized on input and to be written toI// output. Private instances are hidden in numpunct (for true/false) and7// rwstd::__rw_timepunct (for month and weekday names).template struct __rw_keyword_map{/ int _C_numdefs;, const __rw{ _keyword_def<_CharT> *_C_defs;};;// --------------------------------------------------------<// Implementation class template -- __rw_punct_data<_CharT>.;// --------------------------------------------------------template class __rw_digit_handler_base_1;:// Common base class for __rw::__rw_numpunct_impl_data and#// __rw::__rw_moneypunct_impl_data.template class __rw_punct_data{3 friend class __rw_digit_handler_base_1<_CharT>;public| :2 typedef _STD::char_traits<_CharT> traits_type;M typedef _STD::basic_string<_CharT, traits_type, _STD::allocator<_CharT> > string_type; protected: _CharT _C_dp, _C_ts; _STD::string _C_gr;};>// -----------------------------------------------------------D// Implementation class template -- __rw_numpunct_init_data<_CharT>.>// -----------------------------------------------------------template struct __rw_numpunct_init_data{G bool _C_del; } // Kill the bearer of this messageM _CharT _C_dp, _C_ts; // Decimal point and thousands separator; const char *_C_gr; // Digit grouping ruleJ const _CharT *_C_tn, *_C_fn; // Strings for boolean true and false};-// ------------------------------------------3// Implementation class -- __rw_numpunct_impl_base.-// ------------------------------------------N// Contains parts of numpunct<_CharT> that don't depend on the _CharT te~ mplate // parameter.+class _RWSTD_EXPORT __rw_numpunct_impl_base{public:I static __rw_numpunct_init_data *_C_get_named_init_ (const char*);};>// -----------------------------------------------------------D// Implementation class template -- __rw_numpunct_impl_data<_CharT>.>// -----------------------------------------------------------O// numpunct<_CharT> derives from this (via __rw::__rw_numpunct_impl) to get its// private data members.template cl ass __rw_numpunct_impl_data& : public __rw_numpunct_impl_base, $ public __rw_punct_data<_CharT>{ protected:L inline __rw_numpunct_impl_data (const __rw_numpunct_init_data<_CharT>*);O static __rw_numpunct_init_data<_CharT> *_C_get_init_by_name_ (const char*);0 void _C_initfacetbase (const _STD::locale&);public:2 typedef _STD::char_traits<_CharT> traits_type;M typedef _STD::basic_string<_CharT, traits_type, _STD::allocator<_CharT> > string_type;private: ( friend class _STD::numpunct<_CharT>;. friend class __rw_keyword_cracker<_CharT>; string_type _C_tn, _C_fn;' __rw_keyword_def<_CharT> tf_defs_[2];# __rw_keyword_map<_CharT> tf_map_;};template inline!__rw_numpunct_impl_data<_CharT>::E__rw_numpunct_impl_data (const __rw_numpunct_init_data<_CharT> *__np){ if (!__np) {# this->_C_dp = _CharT ('.');# this->_C_ts = _CharT (','); } else {" this->_C_dp = __np->_C_dp; " this->_C_ts = __np->_C_ts;" this->_C_gr = __np->_C_gr;" _C_tn = __np->_C_tn;" _C_fn = __np->_C_fn; if (__np->_C_del). delete[] _RWSTD_CONST_CAST (char*,M _RWSTD_REINTERPRET_CAST (const char*,H __np)); }}template __rw_numpunct_init_data<_CharT>*C__rw_fixup_numpunct_init (__rw_numpunct_init_data*, _CharT*);_RWSTD_SPECIALIZED_FUNCTION%inline __rw_numpunct_init_data*E__rw_fixup_numpunct_init (__rw_numpunct_init_data *__np, char*){ return __np;}I_RWSTD_INSTANTIATE_1 (class _RWSTD_EXPORT __rw_numpunct_impl_data);#ifndef _RWSTD_NO_WCHAR_TYPEL_RWSTD_INSTANTIATE_1 (class _RWSTD_EXPORT __rw_numpunct_impl_data); #endif // _RWSTD_NO_WCHAR_TYPE?// ------------------------------------------------------------?// Implementation class template -- __rw_numpunct_impl<_CharT>.?// ------------------------------------------------------------M// numpunct<_CharT> derives from this to obtain the part of its behavior thatM// must be specialized for char and wchar_t. This lets us avoid specializingP// the whole numpunct<_CharT> template. Currently the only specialized behaviorD// is the initialization of private data members in the constructor.template class __rw_numpunct_impl, : public __rw_numpunct_imp l_data<_CharT>{: static const __rw_numpunct_init_data<_CharT> _C_ivals; protected:D __rw_numpunct_impl (const __rw_numpunct_init_data<_CharT>* __np)3 : __rw_numpunct_impl_data<_CharT>(__np) { }public:C static const __rw_numpunct_init_data<_CharT> *_C_get_ivals () { return &_C_ivals; }};template struct __rw_bool_name{% static const _CharT _C_name[][6];};I// __rw_bool_name explicitly instantiated to work around a g++ 2.95.2 bugL// on AIX (and a few other platforms) where it "forgets" to do so implicitlyA_RWSTD_INSTANTIATE_1 (struct _RWSTD_EXPORT __rw_bool_name);E_RWSTD_INSTANTIATE_1 (class _RWSTD_EXPORT __rw_numpunct_impl);#ifndef _RWSTD_NO_WCHAR_TD_RWSTD_INSTANTIATE_1 (struct _RWSTD_EXPORT __rw_bool_name);H_RWSTD_INSTANTIATE_1 (class _RWSTD_EXPORT __rw_numpunct_impl);#endif // _RWSTD_NO_WCHAR_T@// --------------------------------------------------- ----------E// Implementation class template -- __rw_timepunct_init_data<_CharT>.@// -------------------------------------------------------------;// Structure used to initialize the private data members of// __rw_timepunct<_CharT>.template class __rw_timepunct_init_data{public:B const _CharT *_C_day_nms[7][2]; // Day names and abbreviationsD const _CharT *_C_month_nms[12][2];// Month names and abbreviations4 const _CharT *_C_ampm_nms[2]; // AM/PM strings> const _CharT *_C_bad_nm; // Bad value output signal6 const _CharT *_C_ord_nms[100]; // Ordinal numbersJ const _CharT *_C_dt_tm_pats[6]; // Patterns for formats "xXcDrT" resp.};template class __rw_timepunct_init;_RWSTD_SPECIALIZED_CLASS.class _RWSTD_EXPORT __rw_timepunct_init {public:0 typedef _STD::char_traits traits_type;I typedef _STD::basic_string > string_type;1 const __rw_t imepunct_init_data& _C_tinit;B __rw_timepunct_init (const __rw_timepunct_init_data &__np) : _C_tinit (__np)  {}1 const string_type _C_get_day (int, bool) const;3 const string_type _C_get_month (int, bool) const;- const string_type _C_get_ampm (bool) const;) const string_type _C_get_bad() const { return _C_tinit._C_bad_nm; }/ const string_type _C_get_ord(int __i) const {& return _C_tinit._C_ord_nms[__i]; }3 const string_type _C_get_p attern(int __i) const {) return _C_tinit._C_dt_tm_pats[__i]; }};#ifndef _RWSTD_NO_WCHAR_T_RWSTD_SPECIALIZED_CLASS1class _RWSTD_EXPORT __rw_timepunct_init {public:3 typedef _STD::char_traits traits_type;O typedef _STD::basic_string > string_type;4 const __rw_timepunct_init_data& _C_tinit;E __rw_timepunct_init (const __rw_timepunct_init_data &__np) : _C_tinit(__n p)  {}: const string_type _C_get_day(int __i, bool __abr) const;< const string_type _C_get_month(int __i, bool __abr) const;1 const string_type _C_get_ampm(bool __pm) const;#if 0< const string_type _C_get_day (int __i, bool __abr) const {- return _C_tinit._C_day_nms[__i][__abr]; }= const string_type _C_get_month(int __i, bool __abr) const {/ return _C_tinit._C_month_nms[__i][__abr]; }2 const string_type _C_get_ampm(bool __pm) const {( return _ C_tinit._C_ampm_nms[__pm]; }#endif // 0/1) const string_type _C_get_bad() const { return _C_tinit._C_bad_nm; }/ const string_type _C_get_ord(int __i) const {& return _C_tinit._C_ord_nms[__i]; }3 const string_type _C_get_pattern(int __i) const {) return _C_tinit._C_dt_tm_pats[__i]; }};#endif // _RWSTD_NO_WCHAR_Ttemplate class __rw_timepunct_init{public:2 typedef _STD::char_traits<_CharT> traits_type;M typedef _STD::basic_string<_CharT, traits_type, _STD::allocator<_CharT> > string_type;5 const __rw_timepunct_init_data<_CharT>& _C_tinit;E __rw_timepunct_init (const __rw_timepunct_init_data<_CharT> &__p) : _C_tinit(__p) {}; const string_type _C_get_day(int __i, bool __abr) const {- return _C_tinit._C_day_nms[__i][__abr]; }= const string_type _C_get_month(int __i, bool __abr) const {/ return _C_tinit._C_month_nms[__i][__abr]; } 2 const string_type _C_get_ampm(bool __pm) const {( return _C_tinit._C_ampm_nms[__pm]; }) const string_type _C_get_bad() const { return _C_tinit._C_bad_nm; }/ const string_type _C_get_ord(int __i) const {& return _C_tinit._C_ord_nms[__i]; }3 const string_type _C_get_pattern(int __i) const {) return _C_tinit._C_dt_tm_pats[__i]; }};@// -------------------------------------------------------------E// Implementation class template -- __rw _timepunct_impl_data<_CharT>.@// -------------------------------------------------------------L// __rw_timepunct<_CharT> derives from this (via rwstd::__rw_timepunct_impl)#// to get its private data members.template class __rw_timepunct_impl_data{( friend class __rw_timepunct<_CharT>;. friend class __rw_keyword_cracker<_CharT>;public:2 typedef _STD::char_traits<_CharT> traits_type;M typedef _STD::basic_string<_CharT, traits_type, _STD::allocator<_CharT > > string_type;private: string_type _C_day_nms[7][2];" string_type _C_month_nms[12][2]; string_type _C_ampm_nms[2]; string_type _C_bad_nm; string_type _C_ord_nms[100]; string_type _C_dt_tm_pats[6];, __rw_keyword_def<_CharT> _C_dn_defs[7][2];) __rw_keyword_map<_CharT> _C_dn_defsmap;- __rw_keyword_def<_CharT> _C_mn_defs[12][2];) __rw_keyword_map<_CharT> _C_mn_defsmap;+ __rw_keyword_def<_CharT> _C_ampm_defs[2];+ __rw_keyword_map<_CharT> _C_ampm_defsmap; protected:@ __rw_timepunct_impl_data (const __rw_timepunct_init<_CharT>&);( void _C_initpat (const _STD::locale&);* void _C_initfacet (const _STD::locale&);};J_RWSTD_INSTANTIATE_1 (class _RWSTD_EXPORT __rw_timepunct_impl_data);#ifndef _RWSTD_NO_WCHAR_TYPEM_RWSTD_INSTANTIATE_1 (class _RWSTD_EXPORT __rw_timepunct_impl_data); #endif // _RWSTD_NO_WCHAR_TYPE@// -------------------------------------------------------------@// Implementation class template -- __rw_timepunct_impl<_CharT>.@// -------------------------------------------------------------Q// __rw_timepunct<_CharT> derives from this to get the parts of its behavior thatM// must be specialized on the character type. Currently the only specialized;// behavior is the initialization logic in the constructor.template class __rw_timepunct_impl- : public __rw_timepunct_impl_data<_CharT>{ protected: __rw_timepunct_impl(void);};_RWSTD_SPECIALIZED_CLA SS-class _RWSTD_EXPORT __rw_timepunct_impl+ : public __rw_timepunct_impl_data{9 static const __rw_timepunct_init_data _C_ivals; protected: __rw_timepunct_impl (void):K __rw_timepunct_impl_data(__rw_timepunct_init(_C_ivals)) { }};#ifndef _RWSTD_NO_WCHAR_T_RWSTD_SPECIALIZED_CLASS0class _RWSTD_EXPORT __rw_timepunct_impl. : public __rw_timepunct_impl_data{< static const __rw_timepunct_init_data _ C_ivals; protected: __rw_timepunct_impl(void):S __rw_timepunct_impl_data(__rw_timepunct_init(_C_ivals)) { }};#endif // _RWSTD_NO_WCHAR_T=// ----------------------------------------------------------=// Time and date punctuation facet -- __rw_timepunct<_CharT>.=// ----------------------------------------------------------template 3class __rw_timepunct : public _STD::locale::facet, 9 public __rw_timepunct_impl<_C harT>{public: typedef _CharT char_type;5 typedef _STD::char_traits traits_type;6 typedef _STD::basic_string > string_type;5 _EXPLICIT __rw_timepunct (_RWSTD_SIZE_T __refs = 0)< : _STD::locale::facet (__refs, _STD::locale::time) { }; string_type dayname (int __day, bool __abbreviated) const2 { return do_dayname(__day, __abbreviated); }? string_type monthname (int __month, bool __abb reviated) const6 { return do_monthname(__month, __abbreviated); }* string_type ordinal (int __number) const& { return do_ordinal(__number); } static _STD::locale::id id; // Implementation:A enum { _C_facet_cat = _STD::locale::time, _C_ok_implicit = 1 }; protected:C virtual string_type do_dayname (int day, bool abbreviated) const;G virtual string_type do_monthname (int month, bool abbreviated) const;4 virtual string_type do_ordinal (int number) const; pri vate:2 virtual void _C_initfacet (const _STD::locale&);!#ifdef _RWSTD_NO_MEMBER_TEMPLATES9 _STD::locale::id &_C_get_id (void) const { return id; }#endif};@_RWSTD_INSTANTIATE_1 (class _RWSTD_EXPORT __rw_timepunct);#ifndef _RWSTD_NO_WCHAR_TYPEC_RWSTD_INSTANTIATE_1 (class _RWSTD_EXPORT __rw_timepunct); #endif // _RWSTD_NO_WCHAR_TYPEA// --------------------------------------------------------------A// Implementation class template -- __rw_keyword_cracker <_CharT>.A// --------------------------------------------------------------:// Gives derived classes a backdoor way to get the privateP// __rw_keyword_map and other members out of numpunct and __rw_timepunct facets.template class __rw_keyword_cracker{public:* static const __rw_keyword_map<_CharT>&8 _C_get_tf_map (const _STD::numpunct<_CharT> &__np) { return __np.tf_map_; }* static const __rw_keyword_map<_CharT>&8 _C_get_day_map (cons t __rw_timepunct<_CharT>& __p) {! return __p._C_dn_defsmap; }* static const __rw_keyword_map<_CharT>&: _C_get_month_map (const __rw_timepunct<_CharT>& __p) {! return __p._C_mn_defsmap; }* static const __rw_keyword_map<_CharT>&9 _C_get_ampm_map (const __rw_timepunct<_CharT>& __p) {# return __p._C_ampm_defsmap; }H static const _TYPENAME __rw_numpunct_impl_data<_CharT>::string_type&P _C_get_tf_string (const __rw_numpunct_impl_dat a<_CharT>& __np, bool __val) {/ return __val ? __np._C_tn : __np._C_fn; }? static const _TYPENAME __rw_timepunct<_CharT>::string_type&W _C_get_day_string (const __rw_timepunct<_CharT>& __p, unsigned __val, bool __abr) {H return __val < 7 ? __p._C_day_nms[__val][__abr] : __p._C_bad_nm; }? static const _TYPENAME __rw_timepunct<_CharT>::string_type&W _C_get_month_string (const __rw_timepunct<_CharT>& __p, unsigned __val, bool __abr){K return __val < 12 ? __p._C_month_nms[__val][__abr] : __p._C_bad_nm; }? static const _TYPENAME __rw_timepunct<_CharT>::string_type&G _C_get_ampm_string (const __rw_timepunct<_CharT>& __p, bool __pm) {% return __p._C_ampm_nms[__pm]; }? static const _TYPENAME __rw_timepunct<_CharT>::string_type&K _C_get_ord_string (const __rw_timepunct<_CharT>& __p, unsigned __val) {C return __val < 99 ? __p._C_ord_nms[__val] : __p._C_bad_nm; }? static const _ TYPENAME __rw_timepunct<_CharT>::string_type&L _C_get_patt_string (const __rw_timepunct<_CharT>& __p, unsigned __val) {D return __val < 6 ? __p._C_dt_tm_pats[__val] : __p._C_bad_nm; }};F// -------------------------------------------------------------------F// Implementation class template -- __rw_digit_handler_base_1<_CharT>.F// -------------------------------------------------------------------M// Contains _CharT-dependent functionality that is common to the digit_reader H// and __rw_digit_writer classes, particularly related to getting access+// to ctype and punct facets they both use.template class __rw_digit_handler_base_1) : public __rw_keyword_cracker<_CharT>{public:+ const _STD::ctype<_CharT> &_C_ctyp;+ const __rw_digit_map<_CharT> &_C_dmap;, const __rw_punct_data<_CharT> &_C_punct;F // ctor for general numerics, gets punct from loc's numpunct facet; inline __rw_digit_handler_base_1 (const _STD:: locale&);K // ctor for money, passed __rw_punct_data is in fact a moneypunct facetD __rw_digit_handler_base_1 (const _STD::locale &__loc,D const __rw_punct_data<_CharT> &__pun)A : _C_ctyp (_STD_USE_FACET (_STD::ctype<_CharT>, __loc)), H _C_dmap (__rw_digit_map<_CharT>::_C_get_digit_map (_C_ctyp)),  _C_punct (__pun) { }* _CharT _C_get_decimal_point () const { return _C_punct._C_dp; }*  _CharT _C_get_thousands_sep () const { return _C_punct._C_ts; }* const char* _C_get_grouping () const {& return _C_punct._C_gr.c_str(); }};(#ifndef _RWSTD_INLINE_INSTANTIATION_HACKtemplate *inline __rw_digit_handler_base_1<_CharT>::5__rw_digit_handler_base_1 (const _STD::locale& __loc)= : _C_ctyp (_STD_USE_FACET (_STD::ctype<_CharT>, __loc)), D _C_dmap (__rw_digit_map<_CharT>::_C_get_digit_map (_C_ctyp)), ? _C_punct (_S TD_USE_FACET (_STD::numpunct<_CharT>, __loc)){ },#endif // _RWSTD_INLINE_INSTANTIATION_HACK3// ------------------------------------------------2// Implementation class -- __rw_digit_reader_base.3// ------------------------------------------------G// Contains digit_reader members that do not depend on the digit_readerJ// template parameters, particularly for converting strings of char digits,// to long and floating-point binary values.Gclass _RWSTD_EXPORT __rw_digit_reader_ba se : public __rw_digit_map_base{public: enum {' _C_good = 0x0000, ' _C_no_digits = 0x0001, ' _C_too_many_groups = 0x0004, ' _C_group_too_long = 0x0008, ' _C_group_is_empty = 0x0010, ' _C_bad_grouping = 0x0020, ' _C_bad_exponent = 0x0040, ' _C_overflow = 0x0080, ' _C_bad_curr_symbol = 0x0100, & _C_bad_sign = 0x0200, // state bits? _C_signed = 0x01000, // sign allowed in input@ _C_negative = 0x02000, // minus sign was presentL _C_exp_negative = 0x04000, // minus sign was present on exponent? _C_advanced = 0x08000, // iterator was advanced6 _C_infinity = 0x10000, // inf/infinity< _C_nan = 0x20000, // NaN - Not a NumberK _C_DEF_BUFSIZE = 64 // room for at most this many digits };K // Fields defining digits to be converted, usually filled in by derived@ // class before calling one of the conversion methods below.1 int _C_error; // Bit-fieldJ int _C_base; // 2, 8, 10, or 16, 0=not yet determined9 int _C_state; // bitmap of state bitsJ char *_C_frac_beg; // Start of fractional part of digitsC char *_C_exp_beg; // Start of exponent in digits: _RWSTD_SIZE_T _C_bufsize; // actual size of buffer6 // Binary digits (i.e. 0, 1, 2, not '0', '1', '2')C char _C_buffer [_C_DEF_BUFSIZE]; // sufficient in most casesG char *_C_digits; // may be dynamically allocated, __rw_digit_reader_base (int __radix = 0)F : _C_error (_C_good), _C_base (__radix), _C_state (_C_signed),G _C_frac_beg (0), _C_exp_beg (0), _C_bufsize (_C_DEF_BUFSIZE),# _C_digits (_C_buffer) { } ~__rw_digit_reader_base () {# if (_C_digit s != _C_buffer) delete[] _C_digits; }+ // parse a string of digits into a long- long _C_parse (const char *__end, long) {I return _RWSTD_STATIC_CAST (unsigned long, _C_parse (__end, 0UL)); }5 // parse a string of digits into an unsigned longB unsigned long _C_parse (const char *__end, unsigned long = 0);( // overloads provided for genericity/ short _C_parse (const char *__end, short) {@ return _RWSTD_STATIC_CAST (short, _C _parse (__end, 0L)); }A unsigned short _C_parse (const char *__end, unsigned short) {J return _RWSTD_STATIC_CAST (unsigned short, _C_parse (__end, 0UL)); }+ int _C_parse (const char *__end, int) {> return _RWSTD_STATIC_CAST (int, _C_parse (__end, 0L)); }= unsigned int _C_parse (const char *__end, unsigned int) {H return _RWSTD_STATIC_CAST (unsigned int, _C_parse (__end, 0UL)); }#ifdef _RWSTD_LONG_LONG; unsigned _RWSTD_LONG _LONG _C_parse (const char *__end, C unsigned _RWSTD_LONG_LONG);E _RWSTD_LONG_LONG _C_parse (const char *__end, _RWSTD_LONG_LONG) {= return _RWSTD_STATIC_CAST (unsigned _RWSTD_LONG_LONG,P _C_parse (__end, (unsigned _RWSTD_LONG_LONG)0)); }#endif // _RWSTD_LONG_LONG@ // _C_parse a string of digits and interpret it as a pointer4 void *_C_parse (const char *__end, void* __val);O float _C_par se (const char *__end, float __val, const char *__fmt = "%g") {< return _C_parse_float (__end, __fmt, &__val), __val; } 5 double _C_parse (const char *__end, double __val,1 const char *__fmt = "%lg") {< return _C_parse_float (__end, __fmt, &__val), __val; }@ long double _C_parse (const char *__end, long double __val, - const char *__fmt == "%" _RWSTD_LDBL_SCANF_PREFIX "g") {:  // careful with format specifier on platform where2 // sizeof (double) == sizeof (long double)< return _C_parse_float (__end, __fmt, &__val), __val; } protected:: // reallocates a buffer when the existing one fills up< static char* _C_realloc (char*&, char*, _RWSTD_SIZE_T&);> // reallocates digit buffer when the existing one fills up char* _C_realloc ();private:B // parse a string of decimal only digits into an unsigned longJ unsigned l ong _C_parse_decimal (const char *__beg, const char *__end);J // parse a string of digits and interpret it as a floating point valueL void _C_parse_float (const char *__end, const char *__fmt, void *__val);};2inline char* __rw_digit_reader_base::_C_realloc (){" // compute offsets into buffer@ const _RWSTD_PTRDIFF_T __frac_off = _C_frac_beg - _C_digits;@ const _RWSTD_PTRDIFF_T __exp_off = _C_exp_beg - _C_digits;? char *__cur = _C_realloc (this->_C_digits, this->_ C_buffer,0 this->_C_bufsize);" // adjust pointers into buffer if (_C_frac_beg)- _C_frac_beg = _C_digits + __frac_off; if (_C_exp_beg)+ _C_exp_beg = _C_digits + __exp_off; return __cur;}E// ------------------------------------------------------------------E// Implementation class template -- __rw_digit_reader_base_1<_CharT>.E// ------------------------------------------------------------------O// Contains parts of digit_reader that depend on _CharT but not on the iterator// type.template class __rw_digit_reader_base_1% : public __rw_digit_reader_base, . public __rw_digit_handler_base_1<_CharT>{public:3 typedef _CharT char_type;5 typedef _STD::char_traits traits_type;6 typedef _STD::basic_string > string_type; protected:P // Constructor for general numer ics, gets punct from loc's numpunct<_CharT>.I __rw_digit_reader_base_1 (const _STD::locale &__loc, int __radix = 0)+ : __rw_digit_reader_base (__radix),6 __rw_digit_handler_base_1<_CharT>(__loc) { }M // Constructor for use by derived __rw_money_reader, caller passes punct,C // which in fact is loc's moneypunct<_CharT, true|false> facet.C __rw_digit_reader_base_1 (const _STD::locale &__loc,B const __rw_punct_data<_CharT > &__mp)< : __rw_digit_handler_base_1<_CharT>(__loc, __mp) { }};H// ---------------------------------------------------------------------E// Implementation class template -- digit_reader<_CharT, _InputIter>.H// ---------------------------------------------------------------------F// Facets that do numeric input use temporary objects of this class toH// extract keywords and strings of digits and punctuation from the input // stream.)template cl ass __rw_digit_reader- : public __rw_digit_reader_base_1<_CharT>{public:0 // Constructor for reading general numerics./ __rw_digit_reader (_InputIter &__first,. _InputIter &__last,/ _STD::ios_base &__flags)> : __rw_digit_reader_base_1<_CharT> (__flags.getloc (),@ __flags._C_base ()),? _C_io (__flags), _C_in (__first), _C_end (__last) { } protected:> // Const ructor for use by derived __rw_money_reader class.? __rw_digit_reader (_InputIter &__first, _InputIter &__last,/ _STD::ios_base &__flags,; const __rw_punct_data<_CharT> &__mp)E : __rw_digit_reader_base_1<_CharT>(__flags.getloc (), __mp), ? _C_io (__flags), _C_in (__first), _C_end (__last) { }public:B char *_C_get_digits (int); // Get integer-format digits( // overloads provided for genericity! char *_C_g et_digits (short) {! return _C_get_digits (0); }* char *_C_get_digits (unsigned short) {! return _C_get_digits (0); }( char *_C_get_digits (unsigned int) {! return _C_get_digits (0); } char *_C_get_digits (long) {! return _C_get_digits (0); }) char *_C_get_digits (unsigned long) {! return _C_get_digits (0); }#ifdef _RWSTD_LONG_LONG, char *_C_get_digits (_RWSTD_LONG_LONG) {! return _ C_get_digits (0); }5 char *_C_get_digits (unsigned _RWSTD_LONG_LONG) {! return _C_get_digits (0); }#endif // _RWSTD_LONG_LONGI char *_C_get_digits (double); // Get floating point-format digits( // overloads provided for genericity! char *_C_get_digits (float) {# return _C_get_digits (0.0); }' char *_C_get_digits (long double) {# return _C_get_digits (0.0); }C char *_C_get_digits (void*) { // Get  pointer-format digits this->_C_base = 16;! return _C_get_digits (0); }@ // Parse keyword from input, return associated integer value9 int _C_get_keyword (const __rw_keyword_map<_CharT>&); bool eof () const { return _C_in == _C_end; } protected: _STD::ios_base &_C_io; _InputIter &_C_in; _InputIter &_C_end; const char *_C_grouping; _CharT thousands_sep; char _C_groups[40]; char *_C_gpos;A // get a string of digits optionally discarding leading zeros4 char *_C_get_digit_string (char*, bool = false);N char *_C_get_digit_groups (char*); // Get grouped digits (recursive)};_RWSTD_INSTANTIATE_3 ( class _RWSTD_EXPORT __rw_digit_reader > >);#ifndef _RWSTD_NO_WCHAR_T_RWSTD_INSTANTIATE_3 ( class _RWSTD_EXPORT __rw_digit_reader > >);#endif // _RWSTD_NO_WCHAR_T3// ------------------------------------------------2// Implementation class -- __rw_digit_writer_base.3// ------------------------------------------------M// Contains the parts of __rw_digit_writer that do not depend on the template// parameters.*class _RWSTD_EXPORT __rw_digit_writer_base : public __rw_digit_map_base{public:- __rw_digit_writer_base (_STD::ios_base&);( virtual ~_ _rw_digit_writer_base () {" if (_C_start != _C_buffer) delete[] _C_start; }3 void _C_get_pattern (char*, const char*, bool);' bool _C_get_f_pattern(char*, char);K void _C_digitize (unsigned long, bool __is_signed, const char *__fmat);) void _C_digitize (const void *__val);- void _C_digitize (unsigned short __val) {L _C_digitize (_RWSTD_STATIC_CAST (unsigned long, __val), false, "h"); }$ void _C_digitize (short __val) {K _C_digitize (_RWSTD_STATIC_CAST (unsigned long, __val), true, "h"); }+ void _C_digitize (unsigned int __val) {K _C_digitize (_RWSTD_STATIC_CAST (unsigned long, __val), false, ""); }" void _C_digitize (int __val) {J _C_digitize (_RWSTD_STATIC_CAST (unsigned long, __val), true, ""); }# void _C_digitize (long __val) {K _C_digitize (_RWSTD_STATIC_CAST (unsigned long, __val), true, "l"); }, void _C_digitize (unsigned long  __val) {L _C_digitize (_RWSTD_STATIC_CAST (unsigned long, __val), false, "l"); }#ifdef _RWSTD_LONG_LONG? void _C_digitize (unsigned _RWSTD_LONG_LONG, bool = false);/ void _C_digitize (_RWSTD_LONG_LONG __val) {P _C_digitize (_RWSTD_STATIC_CAST (unsigned _RWSTD_LONG_LONG, __val), !0); }! // convert to a binary string2 void _C_to_binary (unsigned _RWSTD_LONG_LONG);#endif void _C_digitize (double);#ifndef _RWSTD_NO_LONG_DOUBLE#  void _C_digitize (long double);#endif! // convert to a binary string& void _C_to_binary (unsigned long);> _STD::ios_base &_C_io; // associated streamF _STD::ios_base::fmtflags _C_flags; // modified flags from _C_ioF int _C_precision, _C_width, _C_base, _C_iprecision, _C_num_groups;6 enum { _C_left, _C_internal, _C_right } _C_adjust;% bool _C_fractional, _C_separable;' char *_C_start, *_C_end, *_C_group;H enum { _C_DEF_BUFSIZE = 65 };  // large enough for a 64 bit int9 char _C_buffer [_C_DEF_BUFSIZE ]; // default buffer char _C_groups[150];* int _C_calc_groups (int, const char*);};inlineD__rw_digit_writer_base::__rw_digit_writer_base (_STD::ios_base &__b)M : _C_io(__b), _C_flags(__b.flags()), _C_precision(int(__b.precision())),F _C_width(int(__b.width())), _C_iprecision(0), _C_num_groups(0), D _C_fractional(false), _C_separable(true), _C_start(_C_buffer), _C_end(_C_buffer) {   _C_base = __b._C_base ();5 switch (_C_flags & _STD::ios_base::adjustfield) { case _STD::ios_base::left: _C_adjust = _C_left; break;" case _STD::ios_base::internal: _C_adjust = _C_internal; break; default: _C_adjust = _C_right; break; }}E// ------------------------------------------------------------------E// Implementation class template -- __rw_digit_writer_base_1<_CharT>.E// ----------- -------------------------------------------------------<// Contains parts of __rw_digit_writer<_CharT, OutputWriter>,// that depend only on the _CharT parameter.template class __rw_digit_writer_base_1% : public __rw_digit_writer_base, . public __rw_digit_handler_base_1<_CharT>{public:2 typedef _STD::char_traits<_CharT> traits_type;M typedef _STD::basic_string<_CharT, traits_type, _STD::allocator<_CharT> > string_type; protected:P // Const ructor for general numerics, gets punct from loc's numpunct<_CharT>.N __rw_digit_writer_base_1 (_STD::ios_base &__b, const _STD::locale &__loc) P : __rw_digit_writer_base (__b), __rw_digit_handler_base_1<_CharT>(__loc) { }P // Constructor for money, passed punct is really a moneypunct<_CharT, Intl>.P __rw_digit_writer_base_1 (_STD::ios_base&, const __rw_punct_data<_CharT>&);};J_RWSTD_INSTANTIATE_1 (class _RWSTD_EXPORT __rw_digit_writer_base_1);#ifndef _RWSTD_NO_WCHAR_TM_RWSTD_INSTANTIATE_1 (class _RWSTD_EXPORT __rw_digit_writer_base_1);#endif // _RWSTD_NO_WCHAR_TM// --------------------------------------------------------------------------K// Implementation class template -- __rw_digit_writer<_CharT, _OutputIter>.M// --------------------------------------------------------------------------K// Facets that do numeric output use temporary objects of this type (on theJ// stack) to convert numeric quantities into seq uences of digits and other// punctuation.*template class __rw_digit_writer- : public __rw_digit_writer_base_1<_CharT>{public:2 typedef _STD::char_traits<_CharT> traits_type;M typedef _STD::basic_string<_CharT, traits_type, _STD::allocator<_CharT> > string_type;& // Constructor for general numerics.@ __rw_digit_writer (_OutputIter& __it, _STD::ios_base& __flags)E : __rw_digit_writer_base_1<_CharT>(__flags, __flags.getloc ()) , _C_out (__it) { } protected:@ // Constructor for use by derived __rw_money_writer classes,I // passed __rw_punct_data is really a moneypunct<_CharT, Intl> facet.C __rw_digit_writer (_OutputIter &__it, _STD::ios_base &__flags, ; const __rw_punct_data<_CharT> &__mp)I : __rw_digit_writer_base_1<_CharT>(__flags, __mp), _C_out (__it) { } public: void _C_put_digits (_CharT);3 void _C_put_keyword (const string_type&, _CharT) ; protected: _OutputIter &_C_out;};_RWSTD_INSTANTIATE_3 ( class _RWSTD_EXPORT __rw_digit_writer > >);#ifndef _RWSTD_NO_WCHAR_T_RWSTD_INSTANTIATE_3 ( class _RWSTD_EXPORT __rw_digit_writer > >);#endif // _RWSTD_NO_WCHAR_T} // namespace __rwE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif"#if _RWSTD_DEFINE_TEMPLATE (PUNCT)!# include #endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif#endif // _V3_LOCALE##endif // _RWSTD_PUNCT_H_INCLUDEDww 5q7ԦL/*************************************************************************** *> * _random.cc - member function definitions for template class% * __rw_random_generator *2 * $Id: //stdlib/3.0-rel/include/rw/_random.cc#2 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * posses sion, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** * * Copyright (c) 1994 * Hewlett-Packard Company *E * Permission to use, copy, modify, distribute and sell this softwareG * and its documentation for a ny purpose is hereby granted without fee,D * provided that the above copyright notice appear in all copies andD * that both that copyright notice and this permission notice appearA * in supporting documentation. Hewlett-Packard Company makes noA * representations about the suitability of this software for anyH * purpose. It is provided "as is" without express or implied warranty. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer so ftware or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software- -Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_pre fix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (__rw) { template >void __rw_random_generator<_SIZE>::seed (unsigned long __seed){ unsigned long __k = 1;$ _C_table [_C_SIZE - 1] = __seed; _RWSTD_SIZE_T __i;. for (__i = 0; __i != _C_SIZE - 1; ++__i) {0 _RWSTD_SIZE_T __ii = 21 * __i % _C_SIZE; _C_table [__ii] = __k; __k = __seed - __k;! __seed = _C_table [__ii]; }$ for (__i = 0; __i != 4; ++__i) {= for (_RWSTD_SIZE_T __ii = 0; __ii != _C_SIZE; ++__ii) _C_table [__i] =A _C_table [__i] - _C_table [(__i + 31) % _C_SIZE]; } _C_index1 = 0U;* _C_index2 = _C_SIZE * 2UL / 3UL - 1UL;}} // namespace __rwE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endifww 6Mq7ԦL/*************************************************************************** *? * _random.h - Header for the Standard Library random generator *E * This is an internal header file used to implement the C++ Standard? * Library. It should never be #included directly by a program. *1 * $Id: //stdlib/3.0-rel/include/rw/_random.h#3 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Developme nt Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** * * Copyright (c) 1994 * Hewlett-Packard Company * E * Permission to use, copy, modify, distribute and sell this softwareG * and its documentation for any purpose is hereby granted without fee,D * provided that the above copyright notice appear in all copies andD * that both that copyright notice and this permission notice appearA * in supporting documentation. Hewlett-Packard Company makes noA * representations about the suitability of this software for anyH * purpose. It is provided "as is" without express or implied warranty. *L *** ************************************************************************ *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with t he terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software cl ause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/ #ifndef _RWSTD_RANDOM_H_INCLUDED #define _RWSTD_RANDOM_H_INCLUDED#include #ifdef _RWSTD_MULTI_THREAD # include #endif // _RWSTD_MULTI_THREAD#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif:// prevent complaints by compilers such as g++ 2.95.2 that=// cannot inline functions containing static local) variables#ifdef _INLINE _WITH_STATICS&# define _INLINE _INLINE_WITH_STATICS#else# define _INLINE#endif_RWSTD_NAMESPACE (__rw) { template class __rw_random_generator{ enum { _C_SIZE = _SIZE };% unsigned long _C_table [_C_SIZE]; _RWSTD_SIZE_T _C_index1; _RWSTD_SIZE_T _C_index2;public:> __rw_random_generator (unsigned long __seed = 161803398) { seed (__seed); }% void seed (unsigned long __seed);5 unsigned long operator() (unsigned long __limit);: static unsigned long generate (unsigned long __limit);};template inline unsigned long@__rw_random_generator<_SIZE>::operator() (unsigned long __limit){! _RWSTD_ASSERT (0 != __limit);K _C_table [++_C_index1 %= _C_SIZE] -= _C_table [++_C_index2 %= _C_SIZE];* return _C_table [_C_index1] % __limit;}template _INLINE unsigned long>__rw_random_generator<_SIZE>::generate (unsigned long __limit){ : _RWSTD_MT_STATIC_GUARD (__rw_random_generator<_SIZE>);' static __rw_random_generator __gen; return __gen (__limit);}template 0inline _Distance __rw_random (_Distance __limit){; return _Distance (__rw_random_generator<55>::generate (/ _RWSTD_STATIC_CAST (unsigned long, __limit)));}E_RWSTD_INSTANTIATE_1 (class _RWSTD_EXPORT __rw_random_generator<55>);} // namespace __rw#undef _INLINE##ifdef _RWSTD_NO_IMPLICIT_INCLUSION"# include #endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif$#endif // _RWSTD_RANDOM_H_INCLUDEDww .q7Ԧ// -*- C++ -*-L/*************************************************************************** *C * _relops.h - definition of the std::rel_ops namespace and members *1 * $Id: //stdlib/3.0-rel/include/rw/_relops.h#2 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copyi ng. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** * * Copyright (c) 1994 * Hewlett-Packard Company *E * Permission to use, copy, modify, distribute and sell this softwareG * and its documentation for any purpose is here by granted without fee,D * provided that the above copyright notice appear in all copies andD * that both that copyright notice and this permission notice appearA * in supporting documentation. Hewlett-Packard Company makes noA * representations about the suitability of this software for anyH * purpose. It is provided "as is" without express or implied warranty. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Softwa re, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any othe r copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/ #ifndef _RWSTD_RELOPS_H_INCLUDED #define _RWSTD_RELOPS_H_INCLUDED#include #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if de fined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) { #ifndef _RWSTD_NO_NAMESPACE<// rel_ops contents not available if namespaces are disabled7// to avoid ambiguities with other overloaded operators_RWSTD_NAMESPACE (rel_ops) { template =inline bool operator!= (const _TypeT& __x, const _TypeT& __y){ return !(__x == __y);}templa te <inline bool operator> (const _TypeT& __x, const _TypeT& __y){ return __y < __x;}template =inline bool operator<= (const _TypeT& __x, const _TypeT& __y){ return !(__y < __x);}template =inline bool operator>= (const _TypeT& __x, const _TypeT& __y){ return !(__x < __y);}} // namespace rel_ops#endif // _RWSTD_NO_NAMESPACE} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !de fined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif$#endif // _RWSTD_RELOPS_H_INCLUDEDww Dž@q7Ԧ// -*- C++ -*-L/*************************************************************************** *9 * _specialized.h - definitions of specialized algorithms *E * This is an internal header file used to implement the C++ Standard? * Library. It should never be #included directly by a program. *6 * $Id: //stdlib/3.0-rel/include/rw/_specialized.h#3 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Pac kard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** * * Copyright (c) 1994 * Hewlett-Packa rd Company *E * Permission to use, copy, modify, distribute and sell this softwareG * and its documentation for any purpose is hereby granted without fee,D * provided that the above copyright notice appear in all copies andD * that both that copyright notice and this permission notice appearA * in supporting documentation. Hewlett-Packard Company makes noA * representations about the suitability of this software for anyH * purpose. It is provided "as is" without express or implied warra nty. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in acc ordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Comput er Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *M **************************************************************************/ %#ifndef _RWSTD_SPECIALIZED_H_INCLUDED%#define _RWSTD_SPECIALIZED_H_INCLUDED#include #include #if de fined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (__rw) { template (inline void __rw_destroy (_TypeT &__ref){ __ref.~_TypeT ();}%template =inline void __rw _construct (_TypeT* __p, const _TypeU& __val){ ::new (__p) _TypeT (__val);}"template Evoid __rw_destroy (_ForwardIterator __first, _ForwardIterator __last){( for (; __first != __last; ++__first) __rw_destroy (*__first);}-#ifndef _RWSTD_NO_PTR_VALUE_TEMPLATE_OVERLOAD2// for compilers that don't optimize "empty" loopstemplate -inline void __rw_destroy (_TypeT**, _TypeT**){ }1#endif // _RWSTD_NO_PTR_VALUE_ TEMPLATE_OVERLOAD} // namespace __rw_RWSTD_NAMESPACE (std) { template class allocator; // 20.4.4.17template inline>_ForwardIterator uninitialized_copy (_InputIterator __first,= _InputIterator __last,< _ForwardIterator __res){% _ForwardIterator __start = __res; _TRY {5 for (; __first != __last; ++__first, ++_ _res)4 _RW::__rw_construct (&*__res, *__first); } _CATCH (...) {+ _RW::__rw_destroy (__start, __res); _RETHROW; } return __res;}#ifdef _RWSTD_ALLOCATOR // extensionItemplate inline>_ForwardIterator uninitialized_copy (_InputIterator __first,= _InputIterator __last,< _ForwardIterator __re s,> _Allocator& __alloc){% _ForwardIterator __start = __res; _TRY {5 for (; __first != __last; ++__first, ++__res)C __alloc.construct (__alloc.address (*__res), *__first); } _CATCH (...) {+ for (; __start != __res; ++__start)9 __alloc.destroy (__alloc.address (*__start)); _RETHROW; } return __res;}#endif // _RWSTD_ALLOCATOR // 20.4.4.2/template inlineKvoid uninitialized_fill (_ForwardIterator __first, _ForwardIterator __last,+ const _TypeT& __x){' _ForwardIterator __start = __first; _TRY {, for (; __first != __last; ++__first)1 _RW::__rw_construct (&*__first, __x); } _CATCH (...) {- _RW::__rw_destroy (__start, __first); _RETHROW; }} // 20.4.4.3<template inline?void uninitialized_fill_n (_ForwardIterator __first, _Size __n,- const _TypeT& __x){' _ForwardIterator __start = __first; _TRY {% for (; __n; --__n, ++__first)1 _RW::__rw_construct (&*__first, __x); } _CATCH (...) {- _RW::__rw_destroy (__start, __first); _RETHROW; }}#ifdef _RWSTD_ALLOCATOR // extensionJtemplate inline;void uninitialized_fill_n (_ForwardIter __first, _Size __n,B const _TypeT& __x, _Allocator& __alloc){# _ForwardIter __start = __first; _TRY {% for (; __n; --__n, ++__first)@ __alloc.construct (__alloc.address (*__first), __x); } _CATCH (...) {- for (; __start != __first; ++__start)9 __alloc.destroy (__alloc.address (*__start)); _RETHROW; }})#else // if !defined (_RWSTD_A LLOCATOR))template class allocator_interface;B// Specializations for non-standard allocators. When vector callsG// uninitialized_{copy,fill_n} with non-standard allocator, a temporaryG// instance of allocator_interface is passed to these functions. SinceC// C++ forbids temporaries to be passed as non-const references, weH// use these specializations to pass a const reference (and we can force@// allocator_interface members construct & destroy to be const).7template inline _ForwardIterator-uninitialized_copy (_InputIterator __first,, _InputIterator __last,+ _ForwardIterator __res,E allocator_interface<_Allocator, _TypeT> &__alloc){% _ForwardIterator __start = __res; _TRY {5 for (; __first != __last; ++__first, ++__res)C __alloc.construct (__alloc.a ddress (*__res), *__first); } _CATCH (...) {+ for (; __start != __res; ++__start)9 __alloc.destroy (__alloc.address (*__start)); _RETHROW; } return __res;}*template inline void6uninitialized_fill_n (_ForwardIter __first, _Size __n,( const _TypeT& __x,G allocator_interface<_Allocator, _TypeU> &__alloc) {# _ForwardIter __start = __first; _TRY {% for (; __n; --__n, ++__first)@ __alloc.construct (__alloc.address (*__first), __x); } _CATCH (...) {- for (; __start != __first; ++__start)9 __alloc.destroy (__alloc.address (*__start)); _RETHROW; }}#endif // _RWSTD_ALLOCATOR} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif)#endif // _RWSTD_SPECIALIZED_H_INCLUDEDww dJq7ԦL/*************************************************************************** *G * _strref.h - Declarations for the Standard Library string_ref classes *E * This is an internal header file used to implement the C++ Standard? * Library. It should never be #included directly by a program. *1 * $Id: //stdlib/3.0-rel/include/rw/_strref.h#5 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard D evelopment Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software , Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights a t 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/ #ifndef _RWSTD_STRREF_H_INCLUDED #define _RWSTD_STRREF_H_INCLUDED#include #include #include #include #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __sa ve1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif&#if !defined(_RWSTD_STRING_REF_OFFSET)$# define _RWSTD_STRING_REF_OFFSET 1#endifL#if !defined(_RWSTD_NO_TEST_AND_SET) && !defined(_RWSTD_STRING_TEST_AND_SET)$# define _RWSTD_STRING_TEST_AND_SET#endif##if !defined(_RWSTD_STRING_REF_INT)$# define _RWSTD_STRIN G_REF_INT long#endif_RWSTD_NAMESPACE (std) { D// chooses either a single global mutex or a mutex per string objectG// or no mutex at all when atomic test-and-set instruction is availableK#if !defined (_RWSTD_MULTI_THREAD) || defined (_RWSTD_STRING_TEST_AND_SET) -# define _RWSTD_STRING_MUTEX(ignore) false'#elif defined (_RWSTD_ONE_STRING_MUTEX)9# define _RWSTD_STRING_MUTEX(ignore) __rw_string_mutex#else6# define _RWSTD_STRING_MUTEX(pstr) pstr->_C_mutex#endif template< class _CharT,F class _Traits _RWSTD_COMPLEX_DEFAULT (char_traits<_CharT>), G class _Allocator _RWSTD_COMPLEX_DEFAULT (allocator<_CharT>) >class basic_string;} // namespace std_RWSTD_NAMESPACE (__rw) { )#if defined (_RWSTD_MULTI_THREAD) \* && defined (_RWSTD_ONE_STRING_MUTEX) \, && !defined (_RWSTD_STRING_TEST_AND_SET)3extern __rw_mutex _RWSTD_EXPORT __rw_string_mutex;B#endif // _MULTI_THREAD && _ONE_STRING_MUTEX && _NO_TEST _AND_SET9template struct __string_ref{H typedef _CharT char_type;M typedef _Allocator allocator_type;H typedef _TYPENAME allocator_type::size_type size_type;J typedef _STD::basic_string<_CharT, _Traits, _Allocator> string_type;0#if defined (_RWSTD_MULTI_THREAD) \0 && !defined (_RWSTD_ONE_STRING_MUTEX) \0 && !defined (_RWSTD_STRING_TEST_AND_SET) \- && !defined (_RWSTD_NO_STATIC_MUTEX_INIT)G void _C_init (size_type __ref, size_type __cap, size_type __size) { _C_cap = __cap;! _C_size._C_size = __size;$# ifndef _RWSTD_NO_STRING_REF_COUNT _C_refs = __ref - 1;= if (0 != _RWSTD_MUTEX_INIT (this->_C_mutex._C_mutex))8 _RW::__rw_throw (_RWSTD_ERROR_RUNTIME_ERROR,6 "synchronization error");4# else  // if defined (_RWSTD_NO_STRING_REF_COUNT) _RWSTD_UNUSED (__ref);(# endif // _RWSTD_NO_STRING_REF_COUNT } void _C_destroy () {$# ifndef _RWSTD_NO_STRING_REF_COUNT7 _RWSTD_MUTEX_DESTROY (this->_C_mutex._C_mutex);# endif }#elseG void _C_init (size_type __ref, size_type __cap, size_type __size) {$# ifndef _RWSTD_NO_STRING_REF_COUNT3 _C_refs = __ref - _RWSTD_STRING_REF_OFFSET;# else _RWSTD_UNUSED (__ref);(# endif / / _RWSTD_NO_STRING_REF_COUNT _C_cap = __cap;! _C_size._C_size = __size; } void _C_destroy () { }J#endif // _MULTI_THREAD && !_ONE_STRING_MUTEX && _NO_TEST_AND_SET && ...% size_type _C_ref_count () const {"#ifndef _RWSTD_NO_STRING_REF_COUNT8 return this->_C_refs + _RWSTD_STRING_REF_OFFSET;2#else // if defined (_RWSTD_NO_STRING_REF_COUNT) return 0;&#endif // _RWSTD_NO_STRING_REF_COUNT }. void _C_set_ref_count (s ize_type __ref) { "#ifndef _RWSTD_NO_STRING_REF_COUNT/ if (this != string_type::_C_nullref ())6 _RWSTD_STRING_ATOMIC_SWAP (this->_C_refs, H __ref - _RWSTD_STRING_REF_OFFSET,C _RWSTD_STRING_MUTEX (this));2#else // if defined (_RWSTD_NO_STRING_REF_COUNT) _RWSTD_UNUSED (__ref);&#endif // _RWSTD_NO_STRING_REF_COUNT } void _C_inc_ref () { "#ifndef _RWSTD_NO_STRING_REF_C OUNT/ if (this != string_type::_C_nullref ())= _RWSTD_STRING_ATOMIC_PREINCREMENT (this->_C_refs,D _RWSTD_STRING_MUTEX (this));&#endif // _RWSTD_NO_STRING_REF_COUNT } size_type _C_dec_ref () {"#ifndef _RWSTD_NO_STRING_REF_COUNT long result = 1;/ if (this != string_type::_C_nullref ())< result = size_type (_RWSTD_STRING_REF_OFFSET) + F _RWSTD_STRING_ATOMIC_PREDECREME NT (this->_C_refs,5 _RWSTD_STRING_MUTEX (this)); return result;#else return 0;&#endif // _RWSTD_NO_STRING_REF_COUNT } size_type size () const { return _C_size._C_size; }! size_type capacity () const { return _C_cap; } char_type* data () {> return _RWSTD_REINTERPRET_CAST (char_type*, this + 1); }$ const char_type* data () const {D return _RWSTD_REINTERPRET_CAST (co nst char_type*, this + 1); }"#ifndef _RWSTD_NO_STRING_REF_COUNT-# if defined (_RWSTD_MULTI_THREAD) \- && !defined (_RWSTD_ONE_STRING_MUTEX) \. && !defined (_RWSTD_STRING_TEST_AND_SET) __rw_mutex_base _C_mutex;E# endif // _MULTI_THREAD && !_ONE_STRING_MUTEX && _NO_TEST_AND_SETF _RWSTD_SIG_ATOMIC_T _C_refs; // (1 less than) number of referencesF // (_RWSTD_STRING_REF_OFFSET less if K  // _RWSTD_STRING_TEST_AND_SET is defined)J // (-1 if reference counting is disabled)&#endif // _RWSTD_NO_STRING_REF_COUNT7 size_type _C_cap; // Size of allocated memory union {D size_type _C_size; // Number of actual data values storedF _CharT _C_dummy; // force the alignment of the first charH } _C_size; // named to work around an HP aCC 3.30 bug};E// representation of the null string; will be a POD wherever possibleE// (will not be POD if the reference contains a mutex with a UD-ctor)9template struct __null_ref0 : __string_ref<_CharT, _Traits , _Allocator>{I // string reference immediately followed by a single terminating null _CharT _C_eos;};*#ifdef _RWSTD_NO_COLLAPSE_TEMPLATE_STATICS0extern _RWSTD_EXPORT unsigned long __nullref [];/#endif // _RWSTD_NO_COLLAPSE_TEMPLATE_STATICS} // namespace __rwE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif$#endif // _RWSTD_STRREF_H_INCLUDEDww  []q7ԦL/*************************************************************************** *> * _time.cc - Definitions for the Standard Library time facets *0 * $Id: //stdlib/3.0-rel/include/rw/_time.cc#3 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR  12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other la  ws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer softwar  e is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L ******* *******************************************************************/#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endif#include _RWSTD_CTIMEE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (__rw) { .// -------------------------------------------.// Templat e __rw_time_reader member templates..// -------------------------------------------)template +bool __rw_time_reader<_CharT, _InputIter>::I _C_get_time_pattern (const string_type &__patt, _RWSTD_C::tm *__tm) { enum { __edit_year = 0x01,  __edit_month = 0x02,  __edit_century = 0x04,  __edit_hour = 0x08 };  int __post_edits = 0;L const _CharT *__p = __patt.c_str (), *__patt_end = __p +__patt.length ();$ for ( ; __p<__patt_end; ++__p) {3 switch (this->_C_ctyp.narrow (*__p, ' ')) { case '%': { int *__iresult;> int __ampm_dummy; // scratch space for ampm value; const __rw_keyword_map<_CharT> *__keywords = 0; 9 switch (this->_C_ctyp.narrow (*++__p, ' ')) { case 'a': case 'A':4 // Day of week (abbreviated or not).= __keywords = & this->_C_get_day_map (_C_timp);, __iresult = &__tm->tm_wday; break; case 'b': case 'B':3 // Month name (abbreviated or not).? __keywords = &this->_C_get_month_map (_C_timp);+ __iresult = &__tm->tm_mon; break; case 'm':L // Numeric month, comes in 1 higher than the number we want.- __post_edits |= __edit_month;. __iresult = &__tm->tm_mon; break; case 'c':> // Full date, time and year in default format.N return _C_get_time_pattern (this->_C_get_patt_string (_C_timp,I 2),2 __tm); case 'd': // Day of month.+ __iresult = &__tm->tm_mday; break;& case 'I': //  12-hour clock& case 'H': // 24-hour clockG // Hours (12/24 distinction is made in the 'p' section)+ __iresult = &__tm->tm_hour; break; case 'p':" // am/pm indicator> __keywords = &this->_C_get_ampm_map (_C_timp);K // Assumes _CharT[0] are equal means entire string will beP if (*this->_C_in == this->_C_get_ampm_string (_C_timp, true)[0])0 __ post_edits |= __edit_hour;* __iresult = &__ampm_dummy; break; case 'M': // Minutes.* __iresult = &__tm->tm_min; break; case 'S': // Seconds.* __iresult = &__tm->tm_sec; break; case 'Y':% // Year with Century., __post_edits |= __edit_year;+ __iresult = &__tm->tm_year;  break; case 'y':0 // 2-digit Year without Century.= __post_edits |= (__edit_year|__edit_century);+ __iresult = &__tm->tm_year; break; default:J // All other format characters are not supported on input. return false; }  if (__keywords) {J if ((*__iresult = this->_C_get_keyword (*__keywords)) < 0)!  return false; } else {# this->_C_base = 10; *__iresult =P this->_C_parse (this->_C_get_digit_string (this->_C_digits),) 0UL); } } break; default:4 if (!this->eof () && *this->_C_in==*__p) ++(this->_C_in); else return false; }  if (this->_C_error)  return false; } ! if (__post_edits&__edit_year)= if (__post_edits&__edit_century && __tm->tm_year<100)9 ; // 2-digit year is already relative to 1900 else" __tm->tm_year -= 1900; " if (__post_edits&__edit_month) __tm->tm_mon--; ! if (__post_edits&__edit_hour) if (__tm->tm_hour < 12) __tm->tm_hour+=12;  return true;}} // namespace __rw_RWSTD_NAMESPACE (std) {  =// ----------------------------------------------------------7// Facet time_get<_CharT, _InputIter> member templates.<// ---------------------------------------------------------)template ,locale::id time_get<_CharT, _InputIter>::id;)template Ktime_base::dateorder time_get<_CharT, _InputIter>::do_date_order () const { _C_check_init (); M // We would prefer to return a value that matches the date format de finedL // in the timepunct facet in the caller's locale, but we can't get there // from here ...C const _TYPENAME _RW::__rw_timepunct<_CharT>::string_type& __s =L _RW::__rw_keyword_cracker<_CharT>::_C_get_patt_string (*_C_timp, 0); bool __haveYear = false;6 for (size_t __i = 0; __i < __s.length (); ++__i) {A if (__s[__i] == _CharT ('y') || __s[__i] == _CharT ('Y')) __haveYear = true;A if ( __s[__i] == _CharT ('d') || __s[__i] == _ CharT ('a')+ || __s[__i] == _CharT ('A')) { if (__haveYear) return ydm; else return dmy; }@ if (__s[__i] == _CharT ('m') || __s[__i] == _CharT ('b')* || __s[__i] == _CharT ('B')) { if (__haveYear) return ymd; else return mdy; } } return no_order;})template 1_TYPENAME  time_get<_CharT, _InputIter>::iter_typeCtime_get<_CharT, _InputIter>::do_get_time (_InputIter __in,D _InputIter __end,C ios_base& __io,D ios_base::iostate& __err,K tm* __tm) const { _C_check_init (); - _RW::__rw_time_reader<_CharT, _InputIter>, __rdr (__in, __end, __io , *_C_timp); __err = ios_base::goodbit;K // Parse according to pattern 1 (strftime '%X' -- default time pattern)P if (!__rdr._C_get_time_pattern (__rdr._C_get_patt_string (__rdr._C_timp, 1),* __tm))" __err = ios_base::failbit; if (__rdr.eof ())" __err |= ios_base::eofbit;  return __in;}*template 1_TYPENAME time_get<_CharT, _InputIter>::iter_typeCtime_get<_CharT, _InputIter>  ::do_get_date (_InputIter __in,D _InputIter __end,C ios_base& __io,D ios_base::iostate& __err,K tm* __tm) const { _C_check_init (); - _RW::__rw_time_reader<_CharT, _InputIter>, __rdr (__in, __end, __io, *_C_timp); __err = ios_base::goodbit;K // Parse accordi ng to pattern 0 (strftime '%x' -- default date pattern)P if (!__rdr._C_get_time_pattern (__rdr._C_get_patt_string (__rdr._C_timp, 0),* __tm))" __err = ios_base::failbit; if (__rdr.eof ())" __err |= ios_base::eofbit; return __in;}*template 1_TYPENAME time_get<_CharT, _InputIter>::iter_typeGtime_get<_CharT, _InputIter>::do_get_weekday (_InputIter __in,G  _InputIter __end,F ios_base& __io,G ios_base::iostate& __err,N tm* __tm) const { _C_check_init (); . _RW::__rw_time_reader<_CharT, _InputIter> , __rdr (__in, __end, __io, *_C_timp);K int __wd = __rdr._C_get_keyword (__rdr._C_get_day_map (__rdr._C_timp)); __err = ios_base::goodbit; if (__wd<0)" __err = ios_base::failbit; else __tm->tm_wday = __wd; if (__rdr.eof ())" __err |= ios_base::eofbit; return __in;}*template 1_TYPENAME time_get<_CharT, _InputIter>::iter_typeHtime_get<_CharT, _InputIter>::do_get_monthname (_InputIter __in,I _InputIter __end,H ios_base& __io,I  ios_base::iostate& __err,N tm* __tm) const { _C_check_init (); - _RW::__rw_time_reader<_CharT, _InputIter>, __rdr (__in, __end, __io, *_C_timp);M int __mo = __rdr._C_get_keyword (__rdr._C_get_month_map (__rdr._C_timp)); __err = ios_base::goodbit; if (__mo<0)" __err = ios_base::failbit; else __tm->tm_mon = __mo; if (__rdr.eof ()  )" __err |= ios_base::eofbit; return __in;}*template 1_TYPENAME time_get<_CharT, _InputIter>::iter_typeCtime_get<_CharT, _InputIter>::do_get_year (_InputIter __in,D _InputIter __end,C ios_base& __io,D ios_base::iostate& __err,K tm* __ tm) const { _C_check_init (); . _RW::__rw_time_reader<_CharT, _InputIter> , __rdr (__in, __end, __io, *_C_timp);E int __yr = __rdr._C_parse (__rdr._C_get_digits (int ()), int ()); __err = ios_base::goodbit;O // 2-digit year numbers are accepted, but are not treated specially, and so% // end up in the 1st century C.E. if (__rdr._C_error)" __err = ios_base::failbit; else" __tm->tm_year = __yr-1900; if (__rdr.eof ())"  __err |= ios_base::eofbit; return __in;}=// ----------------------------------------------------------7// Facet time_put<_CharT, _InputIter> member templates.=// ----------------------------------------------------------*template -locale::id time_put<_CharT, _OutputIter>::id;*template ._OutputIter time_put<_CharT, _OutputIter>::putG (_OutputIter __out, ios_base &__io, _CharT __fill, const tm *__tm, ? const _CharT* __pattern, const _CharT* __patt_end) const { _C_check_init ();- size_t __patt_len = __patt_end-__pattern; char __scratch [40];8 char *__narrow_patt = (__patt_len<=sizeof __scratch)% ? __scratch1 : new char[__patt_len]; 2 _STD_USE_FACET (ctype<_CharT>, __io.getloc ())< .narrow (__pattern, __patt_end, ' ', __narrow_patt); char *__np = __narrow_patt;I for (const _CharT* __wp = __patt! ern; __wp<__patt_end; ++__wp, ++__np) if (*__np!='%') *__out++ = *__wp;% else if (++__wp<__patt_end) { switch (*++__np) { case 'O':' // POSIX-style modifier& if (++__wp<__patt_end)7 __out = do_put(__out, __io, __fill,7 __tm, *++__np, 'O'); break; case '%':' // Literal percent sign! *__o" ut++ = *__wp; break; default:D // Treat everything else as a time format specifier.G __out = do_put (__out, __io, __fill, __tm, *__np, ' '); } }! if (__narrow_patt!=__scratch) delete[] __narrow_patt; return __out;}*template +_OutputIter time_put<_CharT, _OutputIter>::Jdo_put (_OutputIter __out, ios_base &__io, _CharT __fill, const tm *__tm, * # char __fmat, char __modif) const { _C_check_init (); / const _CharT __pcnt[] = { '%', '%', '\0' };# if (*__pcnt == _CharT (__fmat))C return put (__out, __io, __fill, __tm, __pcnt, __pcnt + 2);, static const char __patrns[] = "xXcDrT";) const char *do_as_pattern = __patrns;5 const char *__p = strchr (do_as_pattern, __fmat); if (__p) {B // Catch formats implemented as calls to the pattern-based? // method before going to the expense $ of constructing a // __rw_digit_writer.) unsigned __i = __p-do_as_pattern;G const _TYPENAME _RW::__rw_timepunct<_CharT>::string_type& __s =L _RW::__rw_keyword_cracker<_CharT>::_C_get_patt_string (*_C_timp,H __i);. return put (__out, __io, __fill, __tm,> __s.c_str (), __s.c_str ()+__s.length ()); } G _RW::__rw_digit_writer<_CharT, _OutputIter> __writ% er (__out, __io); __writer._C_width = 0;  if ('O' == __modif) {( // Uppercase letter O (not zero)1 // -- requests ordinal string if defined. int __n, __m; switch (__fmat) { case 'C':J // Exclusive Rogue Wave extension: Lets you announce, "WelcomeG // to the %OC century!" (See note on unmodified 'C' below.)+ __n = (__tm->tm_year+1999)/100; break; case 'd': case 'e': & __n = __tm->tm_mday; break; case 'H':" __n = __tm->tm_hour+1; break; case 'I':" __n = __tm->tm_hour+1; if (__n>12) __n -= 12; break; case 'm':! __n = __tm->tm_mon+1; break; case 'M':! __n = __tm->tm_min+1; break; case 'S':! __n = __tm->tm_sec+1; break; case 'u': ' __n = __tm->tm_wday; if (__n==0) __n = 7; break; case 'w': __n = __tm->tm_wday; break; case 'U':D // Week number of year (assuming weeks start on Sunday).3 // set __m to wday of first day of year6 __m = (__tm->tm_wday)-((__tm->tm_yday)%7);D // Correct __m to account for "days before first Sunday"8 // and "Sunday first day of year" conditions if ( ( __m <= 0 )  __m += 7; if ( __m == 7 ). // Sunday is first day of year, __n = ((__tm->tm_yday)/7)+1; else> // if not, shift Sunday to first day of week 1. __n = ((__tm->tm_yday)+__m)/7; break; case 'W':D // Week number of year (assuming weeks start on Monday).3 // set __m to wday of first day of year6 __m = (__tm->tm_wday)-((__tm->tm_y) day)%7);D // Correct __m to account for "days before first Monday"8 // and "Monday first day of year" conditions if ( __m <= 0 )  __m += 7; if ( __m == 1 ). // Monday is first day of year, __n = ((__tm->tm_yday)/7)+1; else> // if not, shift Monday to first day of week 14 __n = (((__tm->tm_yday)+(__m-1))/7); break; case 'y':/ * __n = ((__tm->tm_year+1900)%100)+1; break; default:- __n = 999; // Cause error output. }  __writer._C_put_keywordA (__writer._C_get_ord_string (*_C_timp, __n), __fill);  } else { bool __abbrev = false; const _TYPENAME> _RW::__rw_timepunct<_CharT>::string_type *__s = 0;A _TYPENAME _RW::__rw_timepunct<_CharT>::string_type __tzs; int __n = 0, __m = 0;+  __writer._C_base = 10;& __writer._C_separable = false; switch (__fmat) { case 'a': __abbrev = true; case 'A':- // Week day name or abbreviation.8 __s = &__writer._C_get_day_string (*_C_timp,H __tm->tm_wday, __abbrev); break;  case 'b': case 'h': __abbrev = true; case 'B':* // Month name , or abbreviation. __s = &__writerH ._C_get_month_string (*_C_timp, __tm->tm_mon, __abbrev); break;  case 'C':N // Century. Note that we begin the 20th century in 1901, not 1900.L // The draft standard does not seem to address this controversy.+ __n = (__tm->tm_year+1999)/100; break;  case 'd':. // Day of month with leading zero.' __writer._C_- iprecision = 2; case 'e':/ // Day of month with leading blank. __n = __tm->tm_mday;" __writer._C_width = 2; break;  case 'H':$ // Hour (24-hour clock). __n = __tm->tm_hour;' __writer._C_iprecision = 2; break;  case 'I':G // Hour (12-hour clock, caller must append am/pm to resolve // ambiguity). __n = __tm->. tm_hour; if (__n==0) __n = 12; else if (__n>12) __n -= 12;' __writer._C_iprecision = 2; break;  case 'j':# // 3-digit day of year." __n = __tm->tm_yday+1;' __writer._C_iprecision = 3; break;  case 'm': // Month number.! __n = __tm->tm_mon+1;' __writer._C_iprecision = 2; / break;  case 'M': // Minutes. __n = __tm->tm_min;' __writer._C_iprecision = 2; break;  case 'n':! // Newline character.5 *__out++ = __writer._C_ctyp.widen ('\n'); break;  case 'p':) // ante/post meridian string.M __s = &__writer._C_get_ampm_string (*_C_timp, __tm->tm_hour>=12); break;  0 case 'S': // Seconds. __n = __tm->tm_sec;' __writer._C_iprecision = 2; break;  case 't': // Tab character.5 *__out++ = __writer._C_ctyp.widen ('\t'); break;  case 'u':' // Weekday (1-7, 1==Monday) __n = __tm->tm_wday; if (__n==0) __n = 7; break;  case 'U':D 1 // Week number of year (assuming weeks start on Sunday).3 // set __m to wday of first day of year6 __m = (__tm->tm_wday)-((__tm->tm_yday)%7);D // Correct __m to account for "days before first Sunday"8 // and "Sunday first day of year" conditions if ( __m <= 0 )  __m += 7; if ( __m == 7 ). // Sunday is first day of year, __n = ((__tm->tm_yday)/7)+1; else> 2 // if not, shift Sunday to first day of week 1. __n = ((__tm->tm_yday)+__m)/7;' __writer._C_iprecision = 2; break;  case 'w':( // Weekday (0-6, 0==Sunday). __n = __tm->tm_wday; break;  case 'W':D // Week number of year (assuming weeks start on Monday).3 // set __m to wday of first day of year6 __m = (__tm->tm_wday)-((__tm->tm_yday) 3 %7);D // Correct __m to account for "days before first Monday"8 // and "Monday first day of year" conditions if ( __m <= 0 )  __m += 7; if ( __m == 1 ). // Monday is first day of year, __n = ((__tm->tm_yday)/7)+1; else> // if not, shift Monday to first day of week 14 __n = (((__tm->tm_yday)+(__m-1))/7);' __writer._C_iprecision = 2; 4 break;  case 'y':$ // Year without century.+ __n = (__tm->tm_year+1900)%100;' __writer._C_iprecision = 2; break;  case 'Y':! // Year with century.% __n = __tm->tm_year+1900; break;  case 'Z': // Time Zone. {G _RW::__rw_use_c_lib_locale __loc (__io.getloc (), LC_TIME);) const size_t __bufsize = 64U 5 ;" char __buf[__bufsize]; size_t __buflen = 0;G if ((__buflen = strftime (__buf, __bufsize, "%Z", __tm))) {= // FIXME: eliminate dynamic memory allocation8 _CharT *__temp = new _CharT[__buflen+1];G __writer._C_ctyp.widen (__buf, __buf+__buflen, __temp);- __temp[__buflen] = _CharT (); __tzs = __temp; delete[] __temp; __s = &__tzs; 6 break; } }  default:+ // Everything else is an error.D __s = &__writer._C_get_day_string (*_C_timp, 99, false); }  if (__s)3 __writer._C_put_keyword (*__s, __fill); else {7 __writer._C_digitize ((unsigned long) __n);, __writer._C_put_digits (__fill); } }  return __out;}} // namespace stdE#if defined(__VMS) && defined( __DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endifww8 Fhq7ԦL/*************************************************************************** *+ * _time.h - Definitions of the time facets *E * This is an internal header file used to implement the C++ Standard? * Library. It should never be #included directly by a program. */ * $Id: //stdlib/3.0-rel/include/rw/_time.h#2 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F 9 * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved.: *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be prov ; ided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as ap< plicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/#ifndef _RWSTD_TIME_H_INCLUDED#define _RWSTD_TIME_H_INCLUDED#include #ifdef _V3_LOCALE'# include '# include #else#include #include #include #inclu= de #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) { // 22.2.5.1struct _RWSTD_EXPORT time_base{3 enum dateorder { no_order, dmy, mdy, ymd, ydm };};} // namespace> std_RWSTD_NAMESPACE (__rw) { _USING (_RWSTD_C::size_t);L// -------------------------------------------------------------------------M// Implementation class template -- __rw_time_reader<_CharT, _InputIterator>.L// --------------------------------------------------------------------------template class __rw_time_reader6 : public __rw_digit_reader<_CharT, _InputIterator>{public:F typedef _TYPENAME __rw_timepunct<_CharT>::string_t? ype string_type;* const __rw_timepunct<_CharT> &_C_timp;C __rw_time_reader (_InputIterator &__in, _InputIterator &__end, , _STD::ios_base &__io, = const __rw_timepunct<_CharT> &__tpunct)I : __rw_digit_reader<_CharT, _InputIterator>(__in, __end, __io),  _C_timp (__tpunct) {6 // Don't recognize signs on any numeric input.+ this->_C_state &= ~this->_C_signed; }B bool _C_get_time_pattern (const st@ ring_type&, _RWSTD_C::tm *);};_RWSTD_INSTANTIATE_3 ( class _RWSTD_EXPORT __rw_time_reader > >);#ifndef _RWSTD_NO_WCHAR_T_RWSTD_INSTANTIATE_3 ( class _RWSTD_EXPORT __rw_time_reader > >);#endif // _RWSTD_NO_WCHAR_T} // namespace __rw_RWSTD_NAMESPACE (std) { // 22.2.5.1template ) >6class time_get: public locale::facet, public time_base{public:5 typedef _CharT char_type;5 typedef _InputIterator iter_type;9 typedef time_get time_get_type;* _EXPLICIT time_get (size_t __refs = 0); : locale::facet (__refs, locale::time), _C_timp (0) { ; }# dateorder date_order() const { reB turn do_date_order();  }N iter_type get_time (iter_type __start, iter_type __end, ios_base& __fmat, F ios_base::iostate &__err, tm* __time) const { D return do_get_time (__start, __end, __fmat, __err, __time);  }N iter_type get_date (iter_type __start, iter_type __end, ios_base& __fmat, F ios_base::iostate &__err, tm* __time) const { C return do_get_date(__start, __end, __fmat, __err, __time);  }> iter C _type get_weekday (iter_type __start, iter_type __end,- ios_base& __fmat, I ios_base::iostate &__err, tm* __time) const { F return do_get_weekday(__start, __end, __fmat, __err, __time);  }@ iter_type get_monthname (iter_type __start, iter_type __end,/ ios_base& __fmat, J ios_base::iostate &__err, tm* __time) const {H return do_get_monthname(__start, __end, __fmD at, __err, __time);  }N iter_type get_year (iter_type __start, iter_type __end, ios_base& __fmat, F ios_base::iostate &__err, tm* __time) const { C return do_get_year(__start, __end, __fmat, __err, __time);  } static locale::id id; // Implementation:= enum { _C_facet_cat = locale::time, _C_ok_implicit = 1 }; protected:- virtual dateorder do_date_order() const;D virtual iter_type do_get_time (iter_type, iter_type, E ios_base&,C ios_base::iostate&, tm*) const;C virtual iter_type do_get_date (iter_type, iter_type, ios_base&,B ios_base::iostate&, tm*) const;F virtual iter_type do_get_weekday (iter_type, iter_type, ios_base&,E ios_base::iostate&, tm*) const;H virtual iter_type do_get_monthname (iter_type, iter_type, ios_base&,G ios_base::iostate&, tm*) conF st;C virtual iter_type do_get_year (iter_type, iter_type, ios_base&,B ios_base::iostate&, tm*) const; // Implementation: protected:2 const _RW::__rw_timepunct* _C_timp;2 string _C_name;private:" void _C_check_init () const {  if (!_C_timp). _RWSTD_CONST_CAST (time_get_type*,? this)->_C_initfacet (locale ()); }4 virtual void _C_inG itfacet (const locale &__loc);!#ifdef _RWSTD_NO_MEMBER_TEMPLATES5 locale::id &_C_get_id (void) const { return id; }#endif};-template Ivoid time_get<_CharT, _InputIterator>::_C_initfacet (const locale &__loc){A _RW::__rw_use_c_lib_locale __cloc (_C_name.c_str(), LC_TIME);A // bypass the mutex in std::use_facet<>() by directly callingF // the implementation locale member function to prevent a deadlock7 typedef _RW::__rw_tiH mepunct _TimePunct;= typedef _RW::__rw_facet_maker<_TimePunct> _FacetMaker; " const locale::facet& __facet =N __loc._C_unsafe_use_facet (_TimePunct::id, _TimePunct::_C_ok_implicit,< _TimePunct::_C_facet_cat,? _FacetMaker::_C_maker_func);? _C_timp = _RWSTD_STATIC_CAST (const _TimePunct*, &__facet);}_RWSTD_INSTANTIATE_3 ( class _RWSTD_EXPORTD time_get > >);#ifndef _RWSTD_NO_WCHAR_T_RWSTD_INSTANTIATE_3 ( class _RWSTD_EXPORT time_get > >);#endif // _RWSTD_NO_WCHAR_T // 22.2.5.2template ) >>class time_get_byname: public time_get<_CharT, _InputIterator>{public:E _EXPLICIT time_get_byname (const char *__name, size_t J __refs = 0)4 : time_get<_CharT, _InputIterator>(__refs) { this->_C_name = __name; }}; // 22.2.5.3template ) >$class time_put: public locale::facet{public:5 typedef _CharT char_type;5 typedef _OutputIterator iter_type;9 typedef time_put time_put_type;* _EXPLICIT time_put (size_t __refs = K 0); : locale::facet (__refs, locale::time), _C_timp (0) { }> iter_type put (iter_type, ios_base&, char_type, const tm*,= const char_type*, const char_type*) const;J iter_type put (iter_type __start, ios_base& __fmat, char_type __fill, N const tm* __time, char __fmt, char __modifier = 0) const { L return do_put (__start, __fmat, __fill, __time, __fmt, __modifier);  } static locale::id id; // ImplementatioL n:= enum { _C_facet_cat = locale::time, _C_ok_implicit = 1 }; protected:I virtual iter_type do_put (iter_type, ios_base&, char_type, const tm*,0 char, char) const; protected:2 const _RW::__rw_timepunct* _C_timp;2 string _C_name;private:" void _C_check_init () const {  if (!_C_timp). _RWSTD_CONST_CAST (time_put_type*,? this)->_C_initfacet (locaM le ()); } 4 virtual void _C_initfacet (const locale &__loc);!#ifdef _RWSTD_NO_MEMBER_TEMPLATES5 locale::id &_C_get_id (void) const { return id; }#endif};-template Ivoid time_put<_CharT, _InputIterator>::_C_initfacet (const locale &__loc){A _RW::__rw_use_c_lib_locale __cloc (_C_name.c_str(), LC_TIME);A // bypass the mutex in std::use_facet<>() by directly callingF // the implementation locale member function to N prevent a deadlock9 typedef _RW::__rw_timepunct _TimePunct;: typedef _RW::__rw_facet_maker<_TimePunct> _FacetMaker;" const locale::facet &__facet =N __loc._C_unsafe_use_facet (_TimePunct::id, _TimePunct::_C_ok_implicit,< _TimePunct::_C_facet_cat,? _FacetMaker::_C_maker_func);? _C_timp = _RWSTD_STATIC_CAST (const _TimePunct*, &__facet);}_RWSTD_INSTANTIATE_3 ( class _RWSTD_EO XPORTD time_put > >);#ifndef _RWSTD_NO_WCHAR_T_RWSTD_INSTANTIATE_3 ( class _RWSTD_EXPORT time_put > >);#endif // _RWSTD_NO_WCHAR_T // 22.2.5.4template ) >?class time_put_byname: public time_put<_CharT, _OutputIterator>{public:E _EXPLICIT tiP me_put_byname (const char *__name, size_t __refs = 0)6 : time_put<_CharT, _OutputIterator>(__refs) {  this->_C_name = __name; }};} // namespace std_RWSTD_NAMESPACE (__rw) { ##ifndef _RWSTD_NO_FUNC_PARTIAL_SPEC)template 1inline _STD::time_get_byname<_CharT, _InputIter>*F__rw_create_classic_facet (_STD::time_get_byname<_CharT, _InputIter>*){> return new _STD::time_get_byname<_CharT, _InputIter>("C");})tempQ late 1inline _STD::time_put_byname<_CharT, _InputIter>*F__rw_create_classic_facet (_STD::time_put_byname<_CharT, _InputIter>*){> return new _STD::time_put_byname<_CharT, _InputIter>("C");})template *inline _STD::time_get<_CharT, _InputIter>*>__rw_create_named_facet (_STD::time_get<_CharT, _InputIter>*, ; const char *__name, size_t __refs){I return new _STD::time_get_byname<_CharT, _InR putIter>(__name, __refs);})template 1inline _STD::time_get_byname<_CharT, _InputIter>*E__rw_create_named_facet (_STD::time_get_byname<_CharT, _InputIter>*, ; const char *__name, size_t __refs){I return new _STD::time_get_byname<_CharT, _InputIter>(__name, __refs);}*template +inline _STD::time_put<_CharT, _OutputIter>*?__rw_create_named_facet (_STD::time_put<_CharT, _OutputIter>*,S ; const char *__name, size_t __refs){J return new _STD::time_put_byname<_CharT, _OutputIter>(__name, __refs);}*template 2inline _STD::time_put_byname<_CharT, _OutputIter>*F__rw_create_named_facet (_STD::time_put_byname<_CharT, _OutputIter>*, ; const char *__name, size_t __refs){J return new _STD::time_put_byname<_CharT, _OutputIter>(__name, __refs);}&#else // _RWSTD_NO_FUNC_PARTIAL_SPT EC)#define _RWSTD_TIME(which, buf, _CharT) \P_STD::which <_CharT, _STD::buf##_iterator <_CharT, _STD::char_traits<_CharT> > >_RWSTD_SPECIALIZED_FUNCTION 7inline _RWSTD_TIME (time_get_byname, istreambuf, char)*L__rw_create_classic_facet (_RWSTD_TIME (time_get_byname, istreambuf, char)*){D return new _RWSTD_TIME (time_get_byname, istreambuf, char)("C");}_RWSTD_SPECIALIZED_FUNCTION 7inline _RWSTD_TIME (time_put_byname, ostreambuf, char)*L__rw_create_classic_facet (_RWSTD_U TIME (time_put_byname, ostreambuf, char)*){D return new _RWSTD_TIME (time_put_byname, ostreambuf, char)("C");}_RWSTD_SPECIALIZED_FUNCTION 0inline _RWSTD_TIME (time_get, istreambuf, char)*D__rw_create_named_facet (_RWSTD_TIME (time_get, istreambuf, char)*, ; const char *__name, size_t __refs){O return new _RWSTD_TIME (time_get_byname, istreambuf, char)(__name, __refs);}_RWSTD_SPECIALIZED_FUNCTION 7inline _RWSTD_TIME (time_get_byname, istreamV buf, char)*K__rw_create_named_facet (_RWSTD_TIME (time_get_byname, istreambuf, char)*, ; const char *__name, size_t __refs){O return new _RWSTD_TIME (time_get_byname, istreambuf, char)(__name, __refs);}_RWSTD_SPECIALIZED_FUNCTION0inline _RWSTD_TIME (time_put, ostreambuf, char)*D__rw_create_named_facet (_RWSTD_TIME (time_put, ostreambuf, char)*, ; const char *__name, size_t __refs){O return new _RWSTD_TIME (time_put_bynamW e, ostreambuf, char)(__name, __refs);}_RWSTD_SPECIALIZED_FUNCTION7inline _RWSTD_TIME (time_put_byname, ostreambuf, char)*K__rw_create_named_facet (_RWSTD_TIME (time_put_byname, ostreambuf, char)*, ; const char *__name, size_t __refs){O return new _RWSTD_TIME (time_put_byname, ostreambuf, char)(__name, __refs);}#ifndef _RWSTD_NO_WCHAR_T_RWSTD_SPECIALIZED_FUNCTION :inline _RWSTD_TIME (time_get_byname, istreambuf, wchar_t)*O__rw_create_clasX sic_facet (_RWSTD_TIME (time_get_byname, istreambuf, wchar_t)*){G return new _RWSTD_TIME (time_get_byname, istreambuf, wchar_t)("C");}_RWSTD_SPECIALIZED_FUNCTION :inline _RWSTD_TIME (time_put_byname, ostreambuf, wchar_t)*O__rw_create_classic_facet (_RWSTD_TIME (time_put_byname, ostreambuf, wchar_t)*){G return new _RWSTD_TIME (time_put_byname, ostreambuf, wchar_t)("C");}_RWSTD_SPECIALIZED_FUNCTION 3inline _RWSTD_TIME (time_get, istreambuf, wchar_t)*G__rw_create_Y named_facet (_RWSTD_TIME (time_get, istreambuf, wchar_t)*, ; const char *__name, size_t __refs){ return newK _RWSTD_TIME (time_get_byname, istreambuf, wchar_t)(__name, __refs);}_RWSTD_SPECIALIZED_FUNCTION :inline _RWSTD_TIME (time_get_byname, istreambuf, wchar_t)*N__rw_create_named_facet (_RWSTD_TIME (time_get_byname, istreambuf, wchar_t)*, ; const char *__name, size_t __refs){ return newK _RWSTD_TIME (timZ e_get_byname, istreambuf, wchar_t)(__name, __refs);}_RWSTD_SPECIALIZED_FUNCTION3inline _RWSTD_TIME (time_put, ostreambuf, wchar_t)*G__rw_create_named_facet (_RWSTD_TIME (time_put, ostreambuf, wchar_t)*, ; const char *__name, size_t __refs){ return newK _RWSTD_TIME (time_put_byname, ostreambuf, wchar_t)(__name, __refs);}_RWSTD_SPECIALIZED_FUNCTION:inline _RWSTD_TIME (time_put_byname, ostreambuf, wchar_t)*N__rw_create_named_facet (_RW[ STD_TIME (time_put_byname, ostreambuf, wchar_t)*, ; const char *__name, size_t __refs){ return newK _RWSTD_TIME (time_put_byname, ostreambuf, wchar_t)(__name, __refs);}#undef _RWSTD_TIME#endif // _RWSTD_NO_WCHAR_T'#endif // _RWSTD_NO_FUNC_PARTIAL_SPEC} // namespace __rwE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif!#if _RWSTD_DEFINE_TEMPLATE (TIME) # include #endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif#endif // _V3_LOCALE"#endif // _RWSTD_TIME_H_INCLUDEDww] swq7ԦL/*************************************************************************** *, * _traits.h - Declarations for char_traits  *E * This is an internal header file used to implement the C++ Standard? * Library. It should never be #included directly by a program. *1 * $Id: //stdlib/3.0-rel/include/rw/_traits.h#6 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. * ^ F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved._  *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be pr ` ovided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as a applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/ #ifndef _RWSTD_TRAITS_H_INCLUDED #define _RWSTD_TRAITS_H_INCLUDED#include #ifdef __USE_STD_IOSTREAM#include #endif8#include _RWSTD_CSTRING // for memcmp(), memcpy(), .../#include _RWSTD_CWCHAR // for wmemcmp(), ...#ifdef _WIN64# include _RWSTDb _SYS_TYPES_H#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif #if defined (_RWSTD_STRICT_ANSI)_RWSTD_USING_SNI (uid_t);#endif_RWSTD_NAMESPACE (std) { // 27.4.1, p2"typedef _RWSTD_SSIZE_T streamsize;#ic fdef __USE_STD_IOSTREAM!typedef _RWSTD_SSIZE_T streamoff;#else!typedef long streamoff;#endifI/* fpos<> maintains all the information necessary to restore an arbitraryI * sequence, controlled by the Standard C++ library, to a previous stream! * position and conversion state. */template class fpos{public: typedef _StateT state_type; A fpos (streamoff __off = 0, state_type __state = state_type()) : _C_pos (__off), d _C_state (__state) { }! operator streamoff () const { return _C_pos; } state_type state () const { return _C_state; }% void state (state_type __state) { _C_state = __state; } // arithmetic operators. fpos operator- (const fpos &__off) const {% return fpos (*this) -= __off; }. fpos operator+ (const fpos &__off) const {% return fpos (*this) += __off; }* fpos& operate or-= (const fpos &__off) {- return _C_pos -= __off._C_pos, *this; }* fpos& operator+= (const fpos &__off) {- return _C_pos += __off._C_pos, *this; }, fpos operator- (streamoff __off) const {% return fpos (*this) -= __off; }, fpos operator+ (streamoff __off) const {% return fpos (*this) += __off; }( fpos& operator-= (streamoff __off) {& return _C_pos -= __off, *this; }( fpos& operator+= (streamoff __f off) {& return _C_pos += __off, *this; } // relational operators/ bool operator== (const fpos& __rhs) const {; // no way to compare arbitrary state_type, memcmp()6 // is not suitable because of possible padding& return _C_pos == __rhs._C_pos; }. bool operator< (const fpos& __rhs) const {% return _C_pos < __rhs._C_pos; }/ bool operator<= (const fpos& __rhs) const { return !(__rhs < *this); }/ boolg operator>= (const fpos& __rhs) const { return !(*this < __rhs); }/ bool operator!= (const fpos& __rhs) const {! return !(*this == __rhs); }. bool operator> (const fpos& __rhs) const { return __rhs < *this; }private:2 streamoff _C_pos; // signed displacement/ state_type _C_state; // conversion state};template struct char_traits {/ typedef _CharT char_type;. typeh def int int_type;. typedef streamoff off_type;0 typedef mbstate_t state_type;. typedef fpos pos_type; static int_type eof () { return -1; }A static void assign (char_type& __c1, const char_type& __c2) { __c1 = __c2; }C static bool eq (const char_type& __c1, const char_type& __c2) { return __c1 == __c2; }C static bool lt (const char_type& __c1, consti char_type& __c2) { return __c1 < __c2; }E static int compare (const char_type* __s1, const char_type* __s2,, _RWSTD_SIZE_T __n) {8 for (_RWSTD_SIZE_T __i = 0; __i != __n; ++__i) {- if (!eq (__s1[__i], __s2[__i])) {: return lt (__s1[__i], __s2[__i]) ? -1 : 1; } } return 0; } 8 static _RWSTD_SIZE_T length (const char_type *__s) { _RWSTD_SIZE_T __len = 0;* j while (!eq (*__s++, char_type ())) ++__len; return __len; }  static const char_type* J find (const char_type* __s, _RWSTD_SIZE_T __n, const char_type& __a) {- while (__n-- > 0 && !eq (*__s, __a) ) ++__s;) return eq (*__s, __a) ? __s : 0; }C static char_type* move (char_type* __s1, const char_type* __s2,0 _RWSTD_SIZE_T __n) { if (__s1 < __s2)# copy (__s1, __s2, __k n); else if (__s1 > __s2) { __s1 += __n; __s2 += __n; while (__n--)* assign (*--__s1, *--__s2); } return __s1; } static char_type*H copy (char_type *__dst, const char_type *__src, _RWSTD_SIZE_T __n) {2 memcpy (_RWSTD_STATIC_CAST (void*, __dst),8 _RWSTD_STATIC_CAST (const void*, __src),* __n * sizeof (char_type)); return __dst; } static cl har_type*? assign (char_type* __s, _RWSTD_SIZE_T __n, char_type __a) { char_type* __tmp = __s; while (__n-- > 0) # assign (*__tmp++, __a); return __s; }J static bool eq_int_type (const int_type& __c1, const int_type& __c2) { return __c1 == __c2; }3 static int_type not_eof (const int_type& __c) {3 return eq_int_type (eof (), __c) ? 0 : __c; }9 static char_type to_char_type (const int_type& __c) {5 m // cast to prevent warnings for unusual types3 return _RWSTD_STATIC_CAST (char_type, __c); } 8 static int_type to_int_type (const char_type& __c) {5 // cast to prevent warnings for unusual types2 return _RWSTD_STATIC_CAST (int_type, __c); }}; // 21.1.3.1_RWSTD_SPECIALIZED_CLASS struct char_traits {0 typedef char char_type;/ typedef _RWSTD_INT_T int_type;0 typedef streamoff n off_type; 1 typedef mbstate_t state_type;/ typedef fpos pos_type; static int_type eof () {% return int_type (_RWSTD_EOF); }@ static void assign (char_type& __c1, const char_type& __c2){ __c1 = __c2; }C static bool eq (const char_type& __c1, const char_type& __c2) { return __c1 == __c2; }C static bool lt (const char_type& __c1, const char_type& __c2) { return __c1 o < __c2; }E static int compare (const char_type* __s1, const char_type* __s2,, _RWSTD_SIZE_T __n) {2 return _RWSTD_C::memcmp (__s1, __s2, __n); } static const char_type*J find (const char_type* __s, _RWSTD_SIZE_T __n, const char_type& __a) {@ // cast to const void* used to get around a gcc 2.95 bug> // that prevents a static_cast from void* --> const T*> // (only occurs if memchr() isn't overloaded on const)4 p return _RWSTD_STATIC_CAST (const char_type*,H (const void*)memchr (__s, __a, __n)); }8 static _RWSTD_SIZE_T length (const char_type *__s) { return strlen (__s); } static char_type*F move (char_type* __s1, const char_type* __s2, _RWSTD_SIZE_T __n) {#ifndef _RWSTD_NO_MEMMOVE" memmove (__s1, __s2, __n);#else if (__s1 < __s2)# copy (__s1, __s2, __n); else if (__s1 > __s2) { q __s1 += __n; __s2 += __n; while (__n--)* assign (*--__s1, *--__s2); }#endif // _RWSTD_NO_MEMMOVE return __s1; } static char_type*G copy (char_type *__dst, const char_type *__src, _RWSTD_SIZE_T __n){$ memcpy (__dst, __src, __n);  return __dst; } static char_type*? assign (char_type* __s, _RWSTD_SIZE_T __n, char_type __a) { memset (__s, __a, __n); return __sr ; }J static bool eq_int_type (const int_type& __c1, const int_type& __c2) { return __c1 == __c2; }3 static int_type not_eof (const int_type& __c) {3 return eq_int_type (eof (), __c) ? 0 : __c; } 9 static char_type to_char_type (const int_type& __c) {3 return _RWSTD_STATIC_CAST (char_type, __c); } 8 static int_type to_int_type (const char_type& __c) {C // make sure (signed char)'\xff' conves rts to 255 and not -17 return _RWSTD_STATIC_CAST (unsigned char, __c); }};#ifndef _RWSTD_NO_WCHAR_T // 21.1.3.2_RWSTD_SPECIALIZED_CLASS struct char_traits {0 typedef wchar_t char_type;/ typedef _RWSTD_WINT_T int_type;/ typedef streamoff off_type;1 typedef mbstate_t state_type;/ typedef fpos pos_type; static int_type eof () {& return intt _type (_RWSTD_WEOF); }A static void assign (char_type& __c1, const char_type& __c2) { __c1 = __c2; }C static bool eq (const char_type& __c1, const char_type& __c2) { return __c1 == __c2; }C static bool lt (const char_type& __c1, const char_type& __c2) { return __c1 < __c2; }E static int compare (const char_type* __s1, const char_type* __s2,, _RWSTD_SIZE_T __n) {#ifndef _RWSTD_NO_WMEMCMP) u return wmemcmp (__s1, __s2, __n);#else8 for (_RWSTD_SIZE_T __i = 0; __i != __n; ++__i) {- if (!eq (__s1[__i], __s2[__i])) {: return lt (__s1[__i], __s2[__i]) ? -1 : 1; } } return 0;#endif // _RWSTD_NO_WMEMCMP }8 static _RWSTD_SIZE_T length (const char_type *__s) {#ifndef _RWSTD_NO_WCSLEN. // [harmless] cast necessary on CygWin< return wcslen (_RWSTD_CONST_CAST (char_type*, __s));#else v _RWSTD_SIZE_T __len = 0;* while (!eq (*__s++, char_type ())) ++__len; return __len;#endif }  static const char_type*T find (const char_type* __s, _RWSTD_SIZE_T __n, const char_type& __a) {#ifndef _RWSTD_NO_WMEMCHR< // const cast in case of a const-incorrect wmemchr()4 return _RWSTD_STATIC_CAST (const char_type*,L wmemchr (_RWSTD_CONST_CAST (char_type*, __s), __a, __n));#else, while (_w _n-- > 0 && !eq (*__s, __a)) ++__s;) return eq (*__s, __a) ? __s : 0;#endif // _RWSTD_NO_WMEMCHR } static char_type*H copy (char_type *__dst, const char_type *__src, _RWSTD_SIZE_T __n) {8 memcpy (__dst, __src, __n * sizeof (char_type)); return __dst; }  static char_type*F move (char_type* __s1, const char_type* __s2, _RWSTD_SIZE_T __n) {#ifndef _RWSTD_NO_WMEMMOVE# wmemmove (__s1, __s2, __n);#else x if (__s1 < __s2)# copy (__s1, __s2, __n); else if (__s1 > __s2) { __s1 += __n; __s2 += __n; while (__n--)* assign (*--__s1, *--__s2); }#endif // _RWSTD_NO_WMEMMOVE return __s1; } static char_type*? assign (char_type* __s, _RWSTD_SIZE_T __n, char_type __a) {#ifndef _RWSTD_NO_WMEMSET wmemset (__s, __a, __n);#else char_type* __tmp = __s; while (__ny -- > 0) # assign (*__tmp++, __a);#endif // _RWSTD_NO_WMEMSET return __s; }J static bool eq_int_type (const int_type& __c1, const int_type& __c2) { return __c1 == __c2; }3 static int_type not_eof (const int_type& __c) {3 return eq_int_type (eof (), __c) ? 0 : __c; }9 static char_type to_char_type (const int_type& __c) { return __c; } 8 static int_type to_int_type (const char_type& __c) {  return __c; }};#endif // _RWSTD_NO_WCHAR_T} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif$#endif // _RWSTD_TRAITS_H_INCLUDEDww { 4q7ԦL/*************************************************************************** *B * _tree.cc - Non-inline tree definitions for the Standard Library *0 * $Id: //stdlib/3.0-rel/include/rw/_tree.cc#2 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with | FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** * * Copyright (c) 1994 * Hewlett-Packard Company *E * Permission to use, copy, modify, distribute and sell this softwareG * and its documentation for any purpose is hereby granted without f } ee,D * provided that the above copyright notice appear in all copies andD * that both that copyright notice and this permission notice appearA * in supporting documentation. Hewlett-Packard Company makes noA * representations about the suitability of this software for anyH * purpose. It is provided "as is" without express or implied warranty. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights ~ Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may  not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19 ,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _E XTERN_PREFIX#endif_RWSTD_NAMESPACE (__rw) { Jtemplate Kvoid __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::_C_deallocate_buffers (){ while ((void*)_C_buf_list) {) _C_buf_ptr_t __tmp = _C_buf_list;I _C_buf_list = (_C_buf_ptr_t)(_C_buf_list->_C_next_buffer);H _C_node_alloc_t(*this).deallocate(__tmp->_C_buffer,__tmp->size);2 _C_buf_alloc_t(*this).deallocate(__tmp,1); }} Jtemplate .__rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>& .__rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>:: operator= (const __rb_tree &__x){ if (this != &__x) {! erase (begin (), end ());D _C_hdr->_C_parent = _C_copy (__x._C_hdr->_C_parent, _C_hdr);0 if (_C_link_t () == _C_hdr->_C_parent) {" _C_hdr->_C_child [0] =* _C_hdr->_C_child [1] = _C_hdr; } else {I  _C_hdr->_C_child [0] = _C_node_t::_C_min (_C_hdr->_C_parent);I _C_hdr->_C_child [1] = _C_node_t::_C_max (_C_hdr->_C_parent); }* _C_node_count = __x._C_node_count; }3#if defined(__DECCXX) && !defined(__DECFIXCXXL1932)" _C_key_comp = __x._C_key_comp;#endif return *this;}Jtemplate @_TYPENAME __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::iterator.__rb_tree<_Key, _Val, _K eyOf, _Comp, _Alloc>::?_C_insert (_C_link_t __x, _C_link_t __y, const value_type &__v){& _C_link_t __z = _C_get_node (__v); ++_C_node_count;/ if ( __y == _C_hdr || _C_link_t () != __x9 || _C_key_comp (_KeyOf()(__v), __y->_C_key ())) { __y->_C_child [0] = __z; if (__y == _C_hdr) {' _C_hdr->_C_parent = __z;' _C_hdr->_C_child [1] = __z; }- else if (__y == _C_hdr->_C_child [0])L _C_hdr->_C_child [0] = __z; // leftmost must point to min node } else { __y->_C_child [1] = __z;( if (__y == _C_hdr->_C_child [1])L _C_hdr->_C_child [1] = __z; // rightmost must point to max node } __z->_C_parent = __y;= __x = __z; // recolor and rebalance the tree& while ( __x != _C_hdr->_C_parent> && __x->_C_parent->_C_color == _C_node_t::_C_red) {!#ifndef _RWSTD_NO_OPTIMIZE_SPEEDH if (__x->_C_parent == __x- >_C_parent->_C_parent->_C_child [0]) {: __y = __x->_C_parent->_C_parent->_C_child [1];L if (_C_link_t () != __y && __y->_C_color == _C_node_t::_C_red) {J __x->_C_parent->_C_color = _C_node_t::_C_black;J __y->_C_color = _C_node_t::_C_black;H __x->_C_parent->_C_parent->_C_color = _C_node_t::_C_red;P __x = __x->_C_parent->_C_parent; } else {: if (__x == __x->_C_parent->_C_child [1]) {* __x = __x->_C_parent; ) _C_rotate_left (__x); }J __x->_C_parent->_C_color = _C_node_t::_C_black;H __x->_C_parent->_C_parent->_C_color = _C_node_t::_C_red;< _C_rotate_right (__x->_C_parent->_C_parent); } } else {: __y = __x->_C_parent->_C_parent->_C_child [0];L if (_C_link_t () != __y && __y->_C_color == _C_node_t::_C_red) {J __x->_C_parent->_C_color = _C_node_t::_C_black;J __y->_C_color = _C_node_t::_C_black;H __x->_C_parent->_C_parent->_C_color = _C_node_t::_C_red;P __x = __x->_C_parent->_C_parent; } else {: if (__x == __x->_C_parent->_C_child [0]) {* __x  = __x->_C_parent; * _C_rotate_right (__x); }J __x->_C_parent->_C_color = _C_node_t::_C_black;H __x->_C_parent->_C_parent->_C_color = _C_node_t::_C_red;; _C_rotate_left (__x->_C_parent->_C_parent); } }1#else // if !defined (_RWSTD_NO_OPTIMIZE_SPEED) const bool __right =F __x->_C_parent != __x->_C_parent->_C_parent->_C_child [0];= __y = __x->_C_ parent->_C_parent->_C_child [!__right];H if (_C_link_t () != __y && __y->_C_color == _C_node_t::_C_red) {1 __y->_C_color =F __x->_C_parent->_C_color = _C_node_t::_C_black;D __x->_C_parent->_C_parent->_C_color = _C_node_t::_C_red;L __x = __x->_C_parent->_C_parent; } else {= if (__x == __x->_C_parent->_C_child [!__right]) {& __x = __ x->_C_parent; ) _C_rotate (__x, __right); }F __x->_C_parent->_C_color = _C_node_t::_C_black;D __x->_C_parent->_C_parent->_C_color = _C_node_t::_C_red;< _C_rotate (__x->_C_parent->_C_parent, !__right); }$#endif // _RWSTD_NO_OPTIMIZE_SPEED }6 _C_hdr->_C_parent->_C_color = _C_node_t::_C_black; return _C_make_iter (__z);}Jtemplate L_STD::pair<_TYPENAME __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::iterator, bool>L__rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::insert (const value_type &__v){ _C_link_t __y = _C_hdr;& _C_link_t __x = _C_hdr->_C_parent; bool __cmp = true;! while (_C_link_t () != __x) { __y = __x;= __cmp = _C_key_comp (_KeyOf ()(__v), __x->_C_key ());> __x = __cmp ? __x->_C_child [0] : __x->_C_child [1]; } if (_C_insert_alwa ys)K return _STD::pair(_C_insert (__x, __y, __v), true);) iterator __j = _C_make_iter (__y);  if (__cmp) { if (__j == begin ())O return _STD::pair(_C_insert (__x, __y, __v), true); --__j; }B if (_C_key_comp (_ITER_NODE (__j)->_C_key (), _KeyOf ()(__v)))K return _STD::pair(_C_insert (__x, __y, __v), true);2 return _STD::pair(__j, false);}Jtemplate A_TYPENAME __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::iterator .__rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::-insert (iterator __it, const value_type &__v){) _RWSTD_ASSERT_RANGE (begin (), __it); if (__it == begin ()) { if ( size() > 0I && _C_key_comp (_KeyOf()(__v), _ITER_NODE (__it)->_C_key ()))I return _C_insert (_ITER_NODE (__it), _ITER_NODE (__it), __v);! return ins ert(__v).first; } if (__it == end()) {H if (_C_key_comp (_C_hdr->_C_child [1]->_C_key(), _KeyOf()(__v))); return _C_insert(0, _C_hdr->_C_child [1], __v);! return insert(__v).first; } iterator __prev = --__it;G if ( _C_key_comp (_ITER_NODE (__prev)->_C_key (), _KeyOf ()(__v))G && _C_key_comp (_KeyOf()(__v), _ITER_NODE (__it)->_C_key ())) {> if (_C_link_t () == _ITER_NODE (__prev)->_C_child [1])< return _C_ insert (0, _ITER_NODE (__prev), __v); E return _C_insert (_ITER_NODE (__it), _ITER_NODE (__it), __v); } return insert (__v).first;}Jtemplate A_TYPENAME __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::iterator C__rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::erase (iterator __it){) _RWSTD_ASSERT_RANGE (begin (), __it); if (__it == end ()) return end ();! // for notational convenie nceE const _TYPENAME _C_node_t::_C_color_t _Red = _C_node_t::_C_red;G const _TYPENAME _C_node_t::_C_color_t _Black = _C_node_t::_C_black;@ const _C_link_t _Null = _C_link_t (); iterator __tmp = __it; ++__tmp;& _C_link_t __z (_ITER_NODE (__it)); _C_link_t __y (__z); _C_link_t __x; bool __deleted = false;% if (_Null == __y->_C_child [0]) {) if (_Null == __y->_C_child [1]) {! __x = __y->_C_parent;  _C_erase_leaf (__y); __deleted = true; } else% __x = __y->_C_child [1];  } else {' if (_Null == __y->_C_child [1])$ __x = __y->_C_child [0]; else {8 __y = _C_node_t::_C_min (__y->_C_child [1]);$ __x = __y->_C_child [1]; } }# if (!__deleted && __y != __z) {% // relink `y' in place of `z', __z->_C_child [0]->_C_parent = __y; 9 __y->_ C_child [0] = __z->_C_child [0];' if (__y != __z->_C_child [1]) { if (_Null != __x): __x->_C_parent = __y->_C_parent;M __y->_C_parent->_C_child [0] = __x; // `y' must be a left child= __y->_C_child [1] = __z->_C_child [1];/ __z->_C_child [1]->_C_parent = __y; } else if (_Null != __x)# __x->_C_parent = __y; % if (_C_hdr->_C_parent == __z)$  _C_hdr->_C_parent = __y; elseL __z->_C_parent->_C_child [__z->_C_parent->_C_child [0] != __z] = __y;( __y->_C_parent = __z->_C_parent; if (_Null == __x) __x = __y;2 _STD::swap (__y->_C_color, __z->_C_color);F __y = __z; // `y' points to node to be actually deleted }* else if (!__deleted) { // `y' == `z'( __x->_C_parent = __y->_C_parent;% if (_C_hdr->_C_parent == __z)$ _C_hdr->_C_parent = __x; elseL __z->_C_parent->_C_child [__z->_C_parent->_C_child [0] != __z] = __x;+ if (_C_hdr->_C_child [0] == __z) {+ if (_Null == __z->_C_child [1])6 _C_hdr->_C_child [0] = __z->_C_parent; else? _C_hdr->_C_child [0] = _C_node_t::_C_min (__x); }, if (_C_hdr->_C_child [1] == __z) {+ if (_Null == __z->_C_child [0])6  _C_hdr->_C_child [1] = __z->_C_parent; else? _C_hdr->_C_child [1] = _C_node_t::_C_max (__x); } }1 if (__x != _C_hdr && __y->_C_color != _Red) {E while (__x != _C_hdr->_C_parent && __x->_C_color == _Black) { #ifndef _RWSTD_NO_OPTIMIZE_SPEED6 if (__x == __x->_C_parent->_C_child [0]) {= _C_link_t __w = __x->_C_parent->_C_child [1];# if (_Null == __w) {) __x->_ C_color = _Red;3 __x = __x->_C_parent; } else {0 if (_Red == __w->_C_color) {: __w->_C_color = _Black;8 __x->_C_parent->_C_color = _Red;8 _C_rotate_left (__x->_C_parent);; __w = __x->_C_parent->_C_child [1]; }' if (_Null == __w) {- __x->_C_colo r = _Red;7 __x = __x->_C_parent; }> else if ( ( _Null == __w->_C_child [0]J || _Black == __w->_C_child [0]->_C_color)= && ( _Null == __w->_C_child [1]M || _Black == __w->_C_child [1]->_C_color)) {- __w->_C_color = _Red;7 __x = __x->_C_parent; }  else {9 if ( _Null == __w->_C_child [1]G || _Black == __w->_C_child [1]->_C_color) {; if (_Null != __w->_C_child [0])E __w->_C_child [0]->_C_color = _Black;1 __w->_C_color = _Red;2 _C_rotate_right (__w);? __w = __x->_C_parent->_C_child [1]; }+ if (_Null != __w) {N __w->_C_color = __x->_C_parent->_C_color;> __x->_C_parent->_C_color = _Black;; if (_Null != __w->_C_child [1])E __w->_C_child [1]->_C_color = _Black;< _C_rotate_left (__x->_C_parent); } break; } } }  else {H // same as then clause with "right" and "left" exchanged= _C_link_t __w = __x->_C_parent->_C_child [0];# if (_Null == __w) {) __x->_C_color = _Red;3 __x = __x->_C_parent; } else {0 if (__w->_C_color == _Red) {: __w->_C_color = _Black;8 __x->_C_parent->_C_color = _Red;9 _C_rotate_right (__x->_C_parent);; __w = __x->_C_parent->_C_child [0]; }' if (_Null == __w) {- __x->_C_color = _Red;- __x = __x->_C_parent; }> else if ( ( _Null == __w->_C_child [1]J || _Black == __w->_C_child [1]->_C_color)> && ( _Null == __w->_C_child [ 0]M || _Black == __w->_C_child [0]->_C_color)) {- __w->_C_color = _Red;7 __x = __x->_C_parent; } else {9 if ( _Null == __w->_C_child [0]G || _Black == __w->_C_child [0]->_C_color) {; if (_Null != __w->_C_child [1])E __w->_C_child [1]->_C_color = _Black ;1 __w->_C_color = _Red;1 _C_rotate_left (__w);? __w = __x->_C_parent->_C_child [0]; }+ if (_Null != __w) {N __w->_C_color = __x->_C_parent->_C_color;> __x->_C_parent->_C_color = _Black;; if (_Null != __w->_C_child [0])E __w->_C_child [0]->_ C_color = _Black;= _C_rotate_right (__x->_C_parent); } break; } } }0#else // if defined (_RWSTD_NO_OPTIMIZE_SPEED)E const bool __left = __x == __x->_C_parent->_C_child [0];) const bool __right = !__left;> _C_link_t __w = __x->_C_parent->_C_child [__left]; if (_Null == __w) {% __x->_C_color  = _Red;/ __x = __x->_C_parent; } else {, if (__w->_C_color == _Red) {6 __w->_C_color = _Black;4 __x->_C_parent->_C_color = _Red;8 _C_rotate (__x->_C_parent, __right);< __w = __x->_C_parent->_C_child [__left]; }# if (_Null == __w) {) __x->_C_color = _Red;3 __x = __x->_C_parent; }@ else if ( ( _Null == __w->_C_child [__right]L || _Black == __w->_C_child [__right]->_C_color)? && ( _Null == __w->_C_child [__left]N || _Black == __w->_C_child [__left]->_C_color)) {) __w->_C_color = _Red;3 __x = __x->_C_parent; } else {: if ( _Nu ll == __w->_C_child [__left]H || _Black == __w->_C_child [__left]->_C_color) {= if (_Null != __w->_C_child [__right])G __w->_C_child [__right]->_C_color = _Black;- __w->_C_color = _Red;/ _C_rotate (__w, false);@ __w = __x->_C_parent->_C_child [__left]; }' if (_Null != __w) {L __w- >_C_color = __x->_C_parent->_C_color;: __x->_C_parent->_C_color = _Black;< if (_Null != __w->_C_child [__left])F __w->_C_child [__left]->_C_color = _Black;< _C_rotate (__x->_C_parent, __right); } break; } }$#endif // _RWSTD_NO_OPTIMIZE_SPEED } __x->_C_color = _Black; } _C_put_n ode (__y); --_C_node_count; return __tmp;}Jtemplate B_TYPENAME __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::size_type I__rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::erase (const key_type &__x){: _STD::pair __p = equal_range(__x);@ size_type __n = _DISTANCE(__p.first, __p.second, size_type);! erase(__p.first, __p.second); return __n;}Jtemplate B_TYPENAME __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::_C_link_t .__rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::&_C_copy (_C_link_t __x, _C_link_t __p){ // structural copy _C_link_t __res = __x;! while (_C_link_t () != __x) {4 _C_link_t __y = _C_get_node (__x->_C_value); if (__res == __x)3 __res = __y; // Save for return value.* __y->_C_color = __x->_C_color; __y->_C_parent =  __p; __p->_C_child [0] = __y;= __y->_C_child [1] = _C_copy (__x->_C_child [1], __y); __p = __y;. __x = __x->_C_child [0]; } __p->_C_child [0] = 0; return __res;}Jtemplate Kvoid __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::_C_erase (_C_link_t __x){ // erase without rebalancing! while (_C_link_t () != __x) {% _C_erase (__x->_C_ child [1]);* _C_link_t __y = __x->_C_child [0]; _C_put_node (__x); __x = __y; }}Jtemplate A_TYPENAME __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::iterator .__rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::)erase (iterator __first, iterator __last){, _RWSTD_ASSERT_RANGE (begin (), __first);* _RWSTD_ASSERT_RANGE (__first, __last); iterator __tmp;C if (__first == begin ()  && __last == end () && _C_node_count) {% _C_erase (_C_hdr->_C_parent);! _C_hdr->_C_parent = 0; _C_hdr->_C_child [0] =& _C_hdr->_C_child [1] = _C_hdr;! _C_node_count = 0;& __tmp = end (); } elseL for (__tmp = end (); __first != __last; __tmp = erase (__first++)); return __tmp;}Jtemplate A_TYPENAME __rb_tree<_Key, _Val, _KeyOf, _Com p, _Alloc>::iterator H__rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::find (const key_type &__k){% iterator __j = lower_bound (__k); return ( __j == end()N || _C_key_comp (__k, _ITER_NODE (__j)->_C_key ())) ? end () : __j;}Jtemplate A_TYPENAME __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::iterator .__rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::!lower_bound (const key_type &__k){ _C_link_t  __y = _C_hdr;D for (_C_link_t __x = _C_hdr->_C_parent; _C_link_t () != __x; ) {1 if (!_C_key_comp (__x->_C_key (), __k)) { __y = __x;$ __x = __x->_C_child [0]; } else$ __x = __x->_C_child [1]; } return _C_make_iter (__y);}Jtemplate A_TYPENAME __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::iterator .__rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>:: !upper_bound (const key_type &__k){ _C_link_t __y = _C_hdr;D for (_C_link_t __x = _C_hdr->_C_parent; _C_link_t () != __x; ) {0 if (_C_key_comp (__k, __x->_C_key ())) { __y = __x;$ __x = __x->_C_child [0]; } else$ __x = __x->_C_child [1]; } return _C_make_iter (__y);}} // namespace __rwE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore #endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endifww q7ԦL/*************************************************************************** *? * _tree.h - Declarations for the Standard Library tree classes *E * This is an internal header file used to implement the C++ Standard? * Library. It should never be #included directly by a program. */ * $Id: //stdlib/3.0-rel/include/rw/_tree.h#2 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** * * Copyright (c) 1994 * Hewlett-Packard Company *E * Permission to use, copy, modify, distribute and sell this softwareG * and its documentation for any purpose is hereby granted without fee,D * provided that the above copyright notice appear in all copies andD * that both that copyright notice and this permission notice appearA * in supporting documentation. Hewlett-Packard Company makes noA * representations about the suitability of this software for anyH * purpose. It is provided "as is" without express or implied warranty. *L ***** ********************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clau se@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************//***=** Red-black tree class, designed for use in implementing STLA** associative containers (set, multiset, map, and multimap). TheB** insertion and d eletion algorithms are based on those in Cormen,G** Leiserson, and Rivest, Introduction to Algorithms (MIT Press, 1990),** except that:** D** (1) the header cell is maintained with links not only to the rootE** but also to the leftmost node of the tree, to enable constant timeH** begin(), and to the rightmost node of the tree, to enable linear timeD** performance when used with the generic set algorithms (set_union, ** etc.);** G** (2) when a node being deleted has two children its  successor node is@** relinked into its place, rather than copied, so that the onlyA** iterators invalidated are those referring to the deleted node.** */#ifndef _RWSTD_TREE_H_INCLUDED#define _RWSTD_TREE_H_INCLUDED!#include !#include #include #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE #if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (__rw) { =template struct __rw_rb_tree_node{) enum _C_color_t { _C_red, _C_black };E typedef _Val& reference;J typedef _Alloc allocator_type;N typedef _RWSTD_REBIND (all ocator_type, __rw_rb_tree_node) _C_node_alloc_t;M typedef _RWSTD_REBIND (allocator_type, _Key) _C_key_alloc_t;E typedef _TYPENAME _C_node_alloc_t::pointer _C_link_t;L typedef _TYPENAME _C_key_alloc_t::const_reference _C_const_key_ref; _C_color_t _C_color;  _C_link_t _C_parent;A _C_link_t _C_child [2]; // left (0) and right (1) children _Val _C_value;A static _C_link_t _C_minmax (_C_link_t __lnk, bool __do_max) {.  _RWSTD_ASSERT (_C_link_t () != __lnk);: while (_C_link_t () != __lnk->_C_child [__do_max])/ __lnk = __lnk->_C_child [__do_max]; return __lnk; }/ static _C_link_t _C_min (_C_link_t __lnk) {( return _C_minmax (__lnk, false); } / static _C_link_t _C_max (_C_link_t __lnk) {' return _C_minmax (__lnk, true); } _C_const_key_ref _C_key () {# return _KeyOf ()(_C_value); }};%template class __rw_tree_iter> : public _STD::iterator <_STD::bidirectional_iterator_tag,A _TypeT, _DiffT, _Pointer, _Reference>{= typedef _STD::iterator <_STD::bidirectional_iterator_tag,N _TypeT, _DiffT, _Pointer, _Reference> _C_iter_base;public:A typedef _TYPENAME _C_iter_base::value_type value_type;F typedef _TYPENAME _C_iter_base::difference _type difference_type;> typedef _TYPENAME _C_iter_base::pointer pointer;@ typedef _TYPENAME _C_iter_base::reference reference;H typedef _TYPENAME _C_iter_base::iterator_category iterator_category;@ typedef _Node _C_node_t;E typedef _TYPENAME _C_node_t::allocator_type allocator_type;@ typedef _TYPENAME _C_node_t::_C_link_t _C_link_t;E typedef const value_type* const_pointer;  G typedef const value_type& const_reference; O typedef __rw_tree_iter<_TypeT, _DiffT, value_type*, value_type&, _C_node_t> _C_iterator; _C_link_t _C_node; __rw_tree_iter () {}7 // no copy ctor other than the one below is definedI // will use a compiler generated one if __rw_tree_iter != _C_iterator- __rw_tree_iter (const _C_iterator &__rhs)% : _C_node (__rhs._C_node) { }2#if !defined (_RWSTD_NO_INLINE_MEMBER_TEMPLATES) \0 && (!defined (_MSC_VER) || _MSC_VER >= 1300)% template L __rw_tree_iter (const __rw_tree_iter<_TypeT, _DiffT, _Ptr, _Ref, _Node>& __rhs)% : _C_node (__rhs._C_node) { }&#endif // _RWSTD_NO_MEMBER_TEMPLATES$ __rw_tree_iter (_C_link_t __lnk)$ : _C_node (__lnk) {} #ifdef SNI= difference_type operator- (const __rw_tree_iter&) const { return 0; }#endif # __rw_tree_iter& oper ator++ () {4 if (_C_link_t () != _C_node->_C_child [1]) {, _C_node = _C_node->_C_child [1];9 while (_C_link_t () != _C_node->_C_child [0])0 _C_node = _C_node->_C_child [0]; } else {1 _C_link_t __tmp = _C_node->_C_parent;4 while (_C_node == __tmp->_C_child [1]) { _C_node = __tmp;- __tmp = __tmp->_C_parent; }/ if (_C_node->_C_child [1] != __tmp ) _C_node = __tmp; } return *this; } # __rw_tree_iter& operator-- () {5 if ( _C_node->_C_color == _C_node_t::_C_red: && _C_node->_C_parent->_C_parent == _C_node)  // // Check for header. //C _C_node = _C_node->_C_child [1]; // Return rightmost.9 else if (_C_link_t () != _C_node->_C_child [0]) {4 _C_link_t __tmp = _C_node->_C_child [0];7 wh ile (_C_link_t () != __tmp->_C_child [1]), __tmp = __tmp->_C_child [1]; _C_node = __tmp; } else {1 _C_link_t __tmp = _C_node->_C_parent;4 while (_C_node == __tmp->_C_child [0]) { _C_node = __tmp;- __tmp = __tmp->_C_parent; } _C_node = __tmp; } return *this; }% __rw_tree_iter operator++ (int) {% __rw_tree_iter __tmp (*this) ; return ++*this, __tmp; } % __rw_tree_iter operator-- (int) {% __rw_tree_iter __tmp (*this); return --*this, __tmp; }" reference operator* () const {! return _C_node->_C_value; }8 _RWSTD_OPERATOR_ARROW (pointer operator-> () const);};#define _RWSTD_TREE_ITER(n) \@ __rw_tree_iter <_TypeT, _DiffT, _Ptr##n, _Ref##n, _Node>%template inline bool.operator== (const _RWSTD_TREE_ITER (1) &__lhs,. const _RWSTD_TREE_ITER (2) &__rhs){* return __lhs._C_node == __rhs._C_node;}%template inline bool.operator!= (const _RWSTD_TREE_ITER (1) &__lhs,. const _RWSTD_TREE_ITER (2) &__rhs){ return !(__lhs == __rhs);}#undef _RWSTD_TREE_ITER// for conveni ence#undef _ITER_NODE2#define _ITER_NODE(it) (_ITER_BASE (it)._C_node)Jtemplate class __rb_tree : private _Alloc{ protected: B typedef __rw_rb_tree_node<_Alloc,_Val,_Key,_KeyOf> _C_node_t; F typedef _RWSTD_ALLOC_TYPE (_Alloc,_Val) _C_val_alloc_t;F typedef _TYPENAME _C_node_t::_C_key_alloc_t _C_key_alloc_t;G typedef _TYPENAME _C_node_t::_C_node_alloc_t _C_node_alloc_t;A ty pedef _TYPENAME _C_node_t::_C_link_t _C_link_t;public: @ typedef _Key key_type;B typedef _Val value_type;F typedef _Alloc allocator_type; ? typedef _TYPENAME _C_val_alloc_t::pointer pointer;E typedef _TYPENAME _C_val_alloc_t::const_pointer const_pointer;A typedef _TYPENAME _Alloc::size_type size_type;G ty pedef _TYPENAME _Alloc::difference_type difference_type;A typedef _TYPENAME _C_val_alloc_t::reference reference;G typedef _TYPENAME _C_val_alloc_t::const_reference const_reference; protected:" struct _C_rb_tree_node_buffer;) friend struct _C_rb_tree_node_buffer;= // for brevity, long name preserved for ABI compatibility/ typedef _C_rb_tree_node_buffer _C_node_buf; F typedef _RWSTD_REBIND (allocator_type,_C_node_buf) _C_buf_alloc_t;;  typedef _TYPENAME _C_buf_alloc_t::pointer _C_buf_ptr_t;@ typedef __rw_tree_iter _C_tree_iter;F typedef __rw_tree_iter _C_tree_citer;public:#ifndef _RWSTD_NO_DEBUG_ITERC typedef __rw_debug_iter <__rb_tree, _C_tree_iter, _C_tree_iter> iterator;D typedef __rw_deb ug_iter <__rb_tree, _C_tree_citer, _C_tree_iter> const_iterator;. iterator _C_make_iter (_C_link_t __node) {7 return iterator (*this, _C_tree_iter (__node)); }@ const_iterator _C_make_iter (const _C_link_t __node) const {> return const_iterator (*this, _C_tree_citer (__node)); },#else // if defined (_RWSTD_NO_DEBUG_ITER)* typedef _C_tree_iter iterator;0 typedef _C_tree_citer const_iterator;. iterator _C_make_iter (_C_li nk_t __node) {! return iterator (__node); }@ const_iterator _C_make_iter (const _C_link_t __node) const {' return const_iterator (__node); } #endif // _RWSTD_NO_DEBUG_ITER protected:# struct _C_rb_tree_node_buffer {$ _C_buf_ptr_t _C_next_buffer; size_type size; _C_link_t _C_buffer; };  _C_buf_ptr_t _C_buf_list; _C_link_t _C_free_list; _C_link_t _C_next_avail; _C_link_t _C_last;   void _C_add_new_buffer ();" void _C_deallocate_buffers ();  // 6 // Return a node from the free list or new storage // _C_link_t _C_get_link () {' _C_link_t __tmp = _C_free_list;1 _C_link_t __tmp2 = (void*)_C_free_list ? ` (_C_free_list = _RWSTD_STATIC_CAST (_C_link_t,(_C_free_list->_C_child [1])), __tmp) R : (_C_next_avail == _C_last ? (_C_add_new_buffer (), _C_next_avail++) " : _C_next_avail++);!  __tmp2->_C_parent = 0;! __tmp2->_C_child [0] = 0;! __tmp2->_C_child [1] = 0;1 __tmp2->_C_color = _C_node_t::_C_red; return __tmp2; } //; // Return a node from the free list or new storage withA // the _Val __v constructed on it. Every call to _C_get_node< // must eventually be followed by a call to _C_put_node. //1 _C_link_t _C_get_node (const_reference __v) {* _C_link_t __tmp2 = _C_get_link (); _T RY {0 _RWSTD_VALUE_ALLOC (_C_val_alloc_t, ? construct (_RWSTD_VALUE_ALLOC (_C_val_alloc_t,L address (__tmp2->_C_value))," __v)); } _CATCH (...) {( _C_put_node (__tmp2, false); _RETHROW; }  return __tmp2; } _C_link_t _C_get_node () { return _C_get_link (); }  // B // Return a node to the  free list and destroy the value in it. //? void _C_put_node (_C_link_t __p, bool do_destroy = true) { * __p->_C_child [1] = _C_free_list;  if (do_destroy) {0 _RWSTD_VALUE_ALLOC (_C_val_alloc_t, L destroy (_RWSTD_VALUE_ALLOC (_C_val_alloc_t,N address (__p->_C_value)))); } _C_free_list = __p;  } protected:F _C_link_t _C_hdr; // tree rooted at _C_hdr->_C_parent5 size_type _C_node_count; // number of nodesA bool _C_insert_always; // insert non-unique elements?7 _Comp _C_key_comp; // comparison objectpublic: $#ifndef _RWSTD_NO_CLASS_PARTIAL_SPECJ typedef _STD::reverse_iterator const_reverse_iterator;D typedef _STD::reverse_iterator reverse_iterator;4#else // if defined (_RWSTD_NO_CLASS_PARTIAL_SPEC)0 typedef std::reverse_iterato r const_reverse_iterator;, typedef std::reverse_iterator reverse_iterator;(#endif // _RWSTD_NO_CLASS_PARTIAL_SPEC private:A iterator _C_insert (_C_link_t, _C_link_t, const value_type&);- _C_link_t _C_copy (_C_link_t, _C_l ink_t); void _C_erase (_C_link_t);+ inline void _C_erase_leaf (_C_link_t); void _C_init () { _C_buf_list = 0; _C_free_list = _C_next_avail = _C_last = 0;, _C_hdr = _C_get_node (); _C_hdr->_C_parent = 0; _C_hdr->_C_child [0] =$ _C_hdr->_C_child [1] = _C_hdr; }public:. __rb_tree (const _Comp& __comp = _Comp (),$ bool __always = true,3  const _Alloc& __alloc = _Alloc ()) 4 : allocator_type (__alloc), _C_buf_list (0),( _C_hdr (0), _C_node_count (0),= _C_insert_always (__always), _C_key_comp (__comp) { _C_init (); }2#if !defined (_RWSTD_NO_INLINE_MEMBER_TEMPLATES) \0 && (!defined (_MSC_VER) || _MSC_VER >= 1300) template6 __rb_tree (_InputIter __first, _InputIter __last, A const _Comp& __cmp = _Comp (), bool __always = true,/  const _Alloc& __alloc = _Alloc ())4 : allocator_type (__alloc), _C_buf_list (0),) _C_hdr (0), _C_node_count (0), = _C_insert_always (__always), _C_key_comp (__cmp) {  _C_init (); _TRY {% insert (__first, __last); } _CATCH (...) {% _C_deallocate_buffers (); _RETHROW; } }2#else // if defined (_RWSTD_NO_MEMBER_TEMPLATES)D __rb_tree (const value_type* __fir st, const value_type* __last, . const _Comp& __comp = _Comp (),$ bool __always = true,1 const _Alloc& __alloc = _Alloc ())4 : allocator_type (__alloc), _C_buf_list (0),) _C_hdr (0), _C_node_count (0), > _C_insert_always (__always), _C_key_comp (__comp) {  _C_init ();  _TRY {% insert (__first, __last); } _CATCH (...) {% _C_deallocate_buffers (); _RET HROW; } }> __rb_tree (const_iterator __first, const_iterator __last, . const _Comp& __comp = _Comp (),$ bool __always = true,1 const _Alloc& __alloc = _Alloc ())4 : allocator_type (__alloc), _C_buf_list (0),) _C_hdr (0), _C_node_count (0), = _C_insert_always (__always), _C_key_comp (__comp) { _C_init (); _TRY {% insert (__first, __last); } _CATCH (.. .) {% _C_deallocate_buffers (); _RETHROW; } } &#endif // _RWSTD_NO_MEMBER_TEMPLATES< __rb_tree (const __rb_tree &__lnk, bool __always = true)O : allocator_type (__lnk.get_allocator ()), _C_buf_list (0), _C_hdr (0),J _C_node_count (__lnk._C_node_count), _C_insert_always (__always), * _C_key_comp (__lnk._C_key_comp) { 7 _C_free_list = _C_next_avail = _C_last = 0;* _C_hdr = _C_get_node ();-  _C_hdr->_C_color = _C_node_t::_C_red; _TRY { J _C_hdr->_C_parent = _C_copy (__lnk._C_hdr->_C_parent, _C_hdr); } _CATCH (...) {% _C_deallocate_buffers (); _RETHROW; }0 if (_C_link_t () == _C_hdr->_C_parent) {" _C_hdr->_C_child [0] =* _C_hdr->_C_child [1] = _C_hdr; } else {I _C_hdr->_C_child [0] = _C_node_t::_C_min (_C_hdr->_C_parent);I _C_hdr-> _C_child [1] = _C_node_t::_C_max (_C_hdr->_C_parent); } } ~__rb_tree () {% if (_C_link_t () != _C_hdr) {% erase (begin (), end ());( _C_put_node (_C_hdr, false);% _C_deallocate_buffers (); } }, __rb_tree& operator= (const __rb_tree&); _Comp key_comp () const { return _C_key_comp; }+ _C_val_alloc_t get_allocator () const {& return _C_val_alloc_t (*this); } iter ator begin () {3 return _C_make_iter (_C_hdr->_C_child [0]); }# const_iterator begin () const {3 return _C_make_iter (_C_hdr->_C_child [0]); } iterator end () {% return _C_make_iter (_C_hdr); }! const_iterator end () const {% return _C_make_iter (_C_hdr); }! reverse_iterator rbegin () { ) return reverse_iterator (end ()); }  reverse_iterator rend () { + return reverse_iterator (b egin ()); } - const_reverse_iterator rbegin () const { / return const_reverse_iterator (end ()); } + const_reverse_iterator rend () const { 1 return const_reverse_iterator (begin ()); }  bool empty () const {" return 0 == _C_node_count; } size_type size () const { return _C_node_count; }" size_type max_size () const { 2 return _C_node_alloc_t (*this).max_size ();  } " void swap (__rb_tree &__rhs) {7 if (get_allocator () == __rhs.get_allocator ()) {6 _STD::swap (_C_buf_list, __rhs._C_buf_list);8 _STD::swap (_C_free_list, __rhs._C_free_list);: _STD::swap (_C_next_avail, __rhs._C_next_avail);. _STD::swap (_C_last, __rhs._C_last);, _STD::swap (_C_hdr, __rhs._C_hdr);: _STD::swap (_C_node_count, __rhs._C_node_count);@ _STD::swap (_C_insert_always, __rhs._C_insert_always);6 _STD::swap (_C_key_com p, __rhs._C_key_comp); } else {" __rb_tree __tmp = *this; *this = __rhs; __rhs = __tmp; }  }: _STD::pair insert (const value_type&);2 iterator insert (iterator, const value_type&);3#if !defined (_RWSTD_NO_INLINE_MEMBER_TEMPLATES) \0 && (!defined (_MSC_VER) || _MSC_VER >= 1300) template7 void insert (_Iterator __first, _Iterator __last) {, for (; __first != __last;  ++__first) insert(*__first); }2#else // if defined (_RWSTD_NO_MEMBER_TEMPLATES)1 void insert (const_iterator, const_iterator);7 void insert (const value_type*, const value_type*);&#endif // _RWSTD_NO_MEMBER_TEMPLATES iterator erase (iterator);& size_type erase (const key_type&);( iterator erase (iterator, iterator);6// MSVC 6.0 thinks S is the same as S...*#if !defined (_MSC_VER) || _MSC_VER > 1300G // map and set's iterator may be defined to be tree::const_iteratorD iterator insert (const_iterator __it, const value_type &__val) {@ return insert (_C_make_iter (_ITER_NODE (__it)), __val); }G // map and set's iterator may be defined to be tree::const_iterator* iterator erase (const_iterator __it) {8 return erase (_C_make_iter (_ITER_NODE (__it))); }G // map and set's iterator may be defined to be tree::const_iteratorD iterator erase (const_iterator __first, co nst_iterator __last) {: return erase (_C_make_iter (_ITER_NODE (__first)),: _C_make_iter (_ITER_NODE (__last))); }#endif // _MSC_VER <= 13002 void erase (const key_type*, const key_type*); void clear () {! erase (begin (), end ()); }$ iterator find (const key_type&);7 const_iterator find (const key_type& __key) const {B return _RWSTD_CONST_CAST (__rb_tree*, this)->find (__key); }, size_type count (c onst key_type&) const;+ iterator lower_bound (const key_type&);> const_iterator lower_bound (const key_type& __key) const {I return _RWSTD_CONST_CAST (__rb_tree*, this)->lower_bound (__key); }+ iterator upper_bound (const key_type&);> const_iterator upper_bound (const key_type& __key) const {I return _RWSTD_CONST_CAST (__rb_tree*, this)->upper_bound (__key); }A _STD::pair equal_range (const key_type&);. _STD::pair / equal_range (const key_type& __key) const {. _STD::pair __tmp =F _RWSTD_CONST_CAST (__rb_tree*, this)->equal_range (__key);9 return _STD::pair( (__tmp.first, __tmp.second); } #ifndef _RWSTD_NO_OPTIMIZE_SPEED$ void _C_rotate_left (_C_link_t);% void _C_rotate_right (_C_link_t);0#else // if defined (_RWSTD_NO_OPTIMIZE_SPEED)& void _C_rotate (_ C_link_t, bool);$#endif // _RWSTD_NO_OPTIMIZE_SPEED};Jtemplate :inline void __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::_C_add_new_buffer (){Q size_type __bufsize = _C_buf_ptr_t () == _C_buf_list ? 0 : _C_buf_list->size;> size_type __newsize = __rw_new_capacity (__bufsize, this); if (__newsize <= __bufsize)" __newsize = __bufsize + 1; _C_buf_ptr_t __buf = L _C_buf_alloc_t (*this) .allocate (size_type (1), (void*)_C_buf_list); _TRY { __buf->_C_buffer = I _C_node_alloc_t (*this).allocate (__newsize, (void*)_C_last); } _CATCH (...) {5 _C_buf_alloc_t (*this).deallocate (__buf, 1); _RETHROW; } ( __buf->_C_next_buffer = _C_buf_list;& __buf->size = __newsize;" _C_buf_list = __buf;3 _C_next_avail = _C_buf_list->_C_buffer;6 _C_last = _C_next_avail + __newsize; }Jtemplate inline boolFoperator== (const __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>& __lhs,F const __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>& __rhs){, return __lhs.size () == __rhs.size ()I && _STD::equal (__lhs.begin (), __lhs.end (), __rhs.begin ());}Jtemplate inline boolEoperator< (const __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>& __lhs,E const __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>& __rhs){G return _STD::lexicographical_compare (__lhs.begin (), __lhs.end (),H __rhs.begin (), __rhs.end ());}Ftemplate inline void M__rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::_C_erase_leaf (_C_link_t __lnk){' // Remove a leaf node from the tree' _C_link_t __tmp = __ln k->_C_parent; if (__tmp == _C_hdr) {! _C_hdr->_C_parent = 0; _C_hdr->_C_child [0] =% _C_hdr->_C_child [1] = __tmp; } #ifndef _RWSTD_NO_OPTIMIZE_SPEED, else if (__tmp->_C_child [0] == __lnk) { __tmp->_C_child [0] = 0;* if (_C_hdr->_C_child [0] == __lnk)) _C_hdr->_C_child [0] = __tmp; } else { __tmp->_C_child [1] = 0;* if (_C_hdr->_C_child [1] == __lnk)) _C_hdr->_C_child [1] = __tmp;  }1#else // if !defined (_RWSTD_NO_OPTIMIZE_SPEED) else {: const bool __right = __tmp->_C_child [0] != __lnk;& __tmp->_C_child [__right] = 0;0 if (_C_hdr->_C_child [__right] == __lnk)/ _C_hdr->_C_child [__right] = __tmp; }$#endif // _RWSTD_NO_OPTIMIZE_SPEED} #ifndef _RWSTD_NO_OPTIMIZE_SPEEDJtemplate inline void N__rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>:: _C_rotate_left (_C_link_t __lnk){* _RWSTD_ASSERT (_C_link_t () != __lnk);* _C_link_t __tmp = __lnk->_C_child [1];. __lnk->_C_child [1] = __tmp->_C_child [0];, if (_C_link_t () != __tmp->_C_child [0])/ __tmp->_C_child [0]->_C_parent = __lnk;( __tmp->_C_parent = __lnk->_C_parent;# if (__lnk == _C_hdr->_C_parent)" _C_hdr->_C_parent = __tmp;5 else if (__lnk == __lnk->_C_parent->_C_child [0])/ __lnk->_C_parent->_C_child [0] = __tmp; el se/ __lnk->_C_parent->_C_child [1] = __tmp; __tmp->_C_child [0] = __lnk; __lnk->_C_parent = __tmp;}Jtemplate inline void O__rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::_C_rotate_right (_C_link_t __lnk){* _RWSTD_ASSERT (_C_link_t () != __lnk); * _C_link_t __tmp = __lnk->_C_child [0];. __lnk->_C_child [0] = __tmp->_C_child [1];, if (_C_link_t () != __tmp->_C_child [1])/  __tmp->_C_child [1]->_C_parent = __lnk;( __tmp->_C_parent = __lnk->_C_parent; # if (__lnk == _C_hdr->_C_parent)" _C_hdr->_C_parent = __tmp;5 else if (__lnk == __lnk->_C_parent->_C_child [1])/ __lnk->_C_parent->_C_child [1] = __tmp; else/ __lnk->_C_parent->_C_child [0] = __tmp; __tmp->_C_child [1] = __lnk; __lnk->_C_parent = __tmp;}0#else // if defined (_RWSTD_NO_OPTIMIZE_SPEED)Jtemplate inline void .__rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::)_C_rotate (_C_link_t __lnk, bool __right){* _RWSTD_ASSERT (_C_link_t () != __lnk);1 _C_link_t __tmp = __lnk->_C_child [!__right];; __lnk->_C_child [!__right] = __tmp->_C_child [__right];2 if (_C_link_t () != __tmp->_C_child [__right])5 __tmp->_C_child [__right]->_C_parent = __lnk;( __tmp->_C_parent = __lnk->_C_parent;# if (__lnk == _C_hdr->_C_parent)" _C _hdr->_C_parent = __tmp;; else if (__lnk == __lnk->_C_parent->_C_child [__right])5 __lnk->_C_parent->_C_child [__right] = __tmp; else6 __lnk->_C_parent->_C_child [!__right] = __tmp;& __tmp->_C_child [__right] = __lnk;& __lnk->_C_parent = __tmp;}$#endif // _RWSTD_NO_OPTIMIZE_SPEED1#if defined (_RWSTD_NO_INLINE_MEMBER_TEMPLATES) \. || (defined (_MSC_VER) && _MSC_VER < 1300)Jtemplate :inline void __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::6insert (const_iterator __first, const_iterator __last){( for (; __first != __last; ++__first) insert (*__first);}Jtemplate :inline void __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::0insert (const _Val* __first, const _Val* __last){( for (; __first != __last; ++__first) insert (*__first);}&#endif // _RWSTD_NO_MEMBER_TEM PLATES Jtemplate :inline void __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::/erase (const _Key* __first, const _Key* __last){( for (; __first != __last; ++__first) erase (*__first);}Jtemplate Iinline _TYPENAME __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::size_type K__rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::count (const _Key& __k) const{G _STD::pair __p = equal_range (__k);A size_type __n = _DISTANCE (__p.first, __p.second, size_type); return __n;}#define _RWSTD_RB_TREE_ITER \H _TYPENAME __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::iterator/ Jtemplate =inline _STD::pair<_RWSTD_RB_TREE_ITER , _RWSTD_RB_TREE_ITER >K__rb_tree<_Key, _Val, _K eyOf, _Comp, _Alloc>::equal_range (const _Key& __k){O return _STD::pair(lower_bound (__k), upper_bound(__k));}#undef _RWSTD_RB_TREE_ITER} // namespace __rwE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif##ifdef _RWSTD_NO_IMPLICIT_INCLUSION # include #endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif"#endif // _RWSTD_TREE_H_INCLUDEDww q7Ԧ// -*- C++ -*-L/*************************************************************************** *8 * set - declarations for the Standard Library set class *( * $Id: //stdlib/3.0-rel/include/set#2 $ *L *************************************************************************** * > * Copyright 2002 Compaq Information Technologies Group, L.P. *C * Compaq and the Compaq logo are trademarks of Compaq Information@ * Technologies Group, L.P. in the U.S. and/or other co untries. *J * Confidential computer software. Valid license from Compaq required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** * * Copyright (c) 1994 * Hewlett-Packard Company *E * Permission to use, copy, modify, distribute and sell this softwareG * and its documentation for any purpose is hereby granted without fee,D * provided that the above copyright notice appear in all copies andD * that both that copyright notice and this permission notice appearA * in supporting documentation. Hewlett-Packard Company makes noA * representations about the suitability of this software for anyH * purpose. It is provided "as is" without express or implied warranty. *L ******* ******************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the t erms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause @ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/#ifndef _RWSTD_SET_INCLUDED#define _RWSTD_SET_INCLUDED)#include // for allocator/#include // for less4 #include // for __rb_tree#include #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (__rw) { //:// This is used in the implementation of set and multiset.// ' template > struct __ident : public _STD::unary_function<_TypeT, _TypeU> {F const _TypeU& operator() (const _TypeT& __x) const { return __x; } };} // namespace __rw_RWSTD_NAMESPACE (std) {  template ), > class _Allocator _RWSTD_COMPLEX_DEFAULT(allocator<_Key>) > class set { public: // // Types //) typedef _Key key_type ;+ typedef _Key value_type;, typedef _Compare key_compare;. typedef _Compare value_compare;/ typedef _Allocator allocator_type; private: 1 typedef _RW::__rb_tree, , key_compare, allocator_type> __rep_type; __rep_type _C_t; public: // // Types //D // Note that iterator and reverse_iterator are typedefed to B // const iterators. This is intentional, the purpose is toA // prevent the modification of a set element after it has // been inserted.D typedef _TYPENAME __rep_type::reference reference;J typedef _TYPENAME __rep_type::const_reference const_reference;C typedef _TYPENAME __rep_type::const_iterator iterator;I typedef _TYPENAME __rep_type::const_iterator const_iterator;D typedef _TYPENAME __rep_type::size_type size_typ e;J typedef _TYPENAME __rep_type::difference_type difference_type;B typedef _TYPENAME __rep_type::pointer pointer;H typedef _TYPENAME __rep_type::const_pointer const_pointer;)#if !defined (_RWSTD_NO_MEMBER_TEMPLATES)6 // && (!defined (_MSC_VER) || _MSC_VER >= 1300)K typedef _TYPENAME __rep_type::const_reverse_iterator reverse_iterator;#elseK typedef _TYPENAME __rep_type::reverse_iterator reverse_iterator;#endif8 typedef  _TYPENAME __rep_type::const_reverse_iterator const_reverse_iterator; // // construct/copy/destroy //B _EXPLICIT set (const key_compare &__cmp = key_compare (),E const allocator_type &__alloc = allocator_type ())* : _C_t (__cmp, false, __alloc) { }2#if !defined (_RWSTD_NO_INLINE_MEMBER_TEMPLATES) \0 && (!defined (_MSC_VER) || _MSC_VER >= 1300) template/ set (_InputIter __first, _InputIter __last,2  const key_compare& __cmp = key_compare(),7 const allocator_type& __al = allocator_type())# : _C_t (__cmp, false, __al) {+ for ( ; __first != __last; ++__first) _C_t.insert(*__first); }#else= set (const value_type* __first, const value_type* __last,3 const key_compare &__cmp = key_compare (),: const allocator_type& __alloc = allocator_type())& : _C_t (__cmp, false, __alloc) {* for ( ;__first != __last;  ++__first) _C_t.insert(*__first); } 7 set (const_iterator __first, const_iterator __last,3 const key_compare &__cmp = key_compare (),: const allocator_type &__alloc = allocator_type())& : _C_t (__cmp, false, __alloc) {* for ( ;__first != __last; ++__first) _C_t.insert(*__first); }#endif set (const set &__x)$ : _C_t (__x._C_t, false) { }% set& operator= (const set &__x) {& _C_t = __x._C_ t; return *this; }( allocator_type get_allocator() const {" return _C_t.get_allocator(); } // // iterators //F iterator begin () { return _C_t.begin(); }F const_iterator begin () const { return _C_t.begin(); }F iterator end () { return _C_t.end(); }F const_iterator end () const { return _C_t.end(); }G reverse_iterator rbegin () { return _C_t.r begin(); } G const_reverse_iterator rbegin () const { return _C_t.rbegin(); } F reverse_iterator rend () { return _C_t.rend(); }F const_reverse_iterator rend () const { return _C_t.rend(); } // // capacity //= bool empty () const { return _C_t.empty(); }= size_type size () const { return _C_t.size(); }= size_type max_size () const { return _C_t.max_size(); } // // modifiers //9 pair insert (const value_type& __x) {K pair<_TYPENAME __rep_type::iterator, bool> __p = _C_t.insert(__x); ; return pair(__p.first, __p.second); }*#if !defined (_MSC_VER) || _MSC_VER > 1300< iterator insert (iterator __it, const value_type& __x) { return _C_t.insert (__it, __x); } void erase (iterator __it) { _C_t.erase (__it); }4 void erase (iterator __first, iterator __last) {% _C_t.erase (__first, __last); }#else // working around MSVC bugs< iterator insert (iterator __it, const value_type& __x) {2 typedef _TYPENAME __rep_type::iterator _Iterator;@ return _RWSTD_REINTERPRET_CAST (iterator&, _C_t.insert (7 _RWSTD_REINTERPRET_CAST (_Iterator&, __it), __x)); } void erase (iterator __it) {2 typedef _TYPENAME __rep_type::iterator _Iterator;@ _C_t.erase (_RWSTD_REINTERPRET_CAST (_Iterator&, __it)); }4 void erase (iterator __first, iterator __last) {2 typedef _TYPENAME __rep_type::iterator _Iterator;B _C_t.erase (_RWSTD_REINTERPRET_CAST (_Iterator&, __first),4 _RWSTD_REINTERPRET_CAST (_Iterator&, __last)); }#endif2#if !defined (_RWSTD_NO_INLINE_MEMBER_TEMPLATES) \0 && (!defined (_MSC_VER) || _MSC_VER >= 1300) template9 void insert (_InputIter __first, _InputIter __last) {, for ( ;__first != __last; ++__first)" _C_t.insert(*__first); }9#else // if defined (_RWSTD_NO_INLINE_MEMBER_TEMPLATES)G void insert (const value_type* __first, const value_type* __last) {, for ( ;__first != __last; ++__first)# _C_t.insert (*__first); }C void insert (const_iterator __first, const_iterator __last) {. for ( ;__first != __last; ++__first)$ _C_t.insert(*__first); }-#endif // _RWSTD_NO_INLINE_MEMBER_TEMPLATES, size_type erase (const key_type& __x) { return _C_t.erase(__x);  } void swap (set& __x) { _C_t.swap(__x._C_t); } void clear () { _C_t.clear (); }% key_compare key_comp () const {! return _C_t.key_comp(); }) value_compare value_comp () const {! return _C_t.key_comp(); }5 // follows proposed resolution of lwg issue 214+ iterator find (const key_type& __x) {! return _C_t.find (__x); }7 const_iterator find (const key_type& __x) const { return _C_t.find(__x); }3 size_type count (const key_type& __x) const {! return _C_t.count(__x); }5 // follows proposed resolution of lwg issue 2142 iterator lower_bound (const key_type& __x) {' return _C_t.lower_bound(__x); }> const_iterator lower_bound (const key_type& __x) const {' return _C_t.lower_bound(__x); }5 // follows proposed resolution of lwg issue 2142 iterator upper_bound (const key_type& __x) {' return _C_t.upper_bound(__x); }> const_iterator upper_bound (const key_type& __x) const {' return _C_t.upper_bound(__x); }5 // follows proposed resolution of lwg issue 214B pair equal_range (const key_type& __x) {I return _RWSTD_CONST_CAST (const set*, this)->equal_range (__x); }* pair/ equal_range (const key_type& __x) const {( return _C_t.equal_range (__x); } }; template ), = class _Allocator _RWSTD_COMPLEX_DEFAULT(allocator<_Key>) >  class multiset { public: // // types // typedef _Key key_type;" typedef _Key value_type;# typedef _Compare key_compare;% typedef _Compare value_compare;& typedef _Allocator allocator_type; private: 1 typedef _RW::__rb_tree, . key_compare, allocator_type> __rep_type; __rep_type _C_t; public: // // types //D typedef _TYPENAME __rep_type::reference reference;J typedef _TYPENAME __rep_type::const_reference const_reference;3#if defined(__DECCXX) && !defined(__DECFIXCXXL1634)C typedef _TYPENAME __rep_type::const_iterator iterator ;#elseC typedef _TYPENAME __rep_type::iterator iterator;#endifI typedef _TYPENAME __rep_type::const_iterator const_iterator;D typedef _TYPENAME __rep_type::size_type size_type;J typedef _TYPENAME __rep_type::difference_type difference_type;B typedef _TYPENAME __rep_type::pointer pointer;H typedef _TYPENAME __rep_type::const_pointer const_pointer;K typedef _TYPENAME __rep_type::reverse_iterator  reverse_iterator;8 typedef _TYPENAME __rep_type::const_reverse_iterator# const_reverse_iterator; // // construct/copy/destroy //G _EXPLICIT multiset (const key_compare &__cmp = key_compare (),J const allocator_type &__alloc = allocator_type ())( : _C_t (__cmp, true, __alloc) {}2#if !defined (_RWSTD_NO_INLINE_MEMBER_TEMPLATES) \0 && (!defined (_MSC_VER) || _MSC_VER >= 1300) template5 multiset (_InputIter __first, _InputIter __last, 8 const key_compare &__cmp = key_compare (),@ const allocator_type &__alloc = allocator_type ())% : _C_t (__cmp, true, __alloc) {* for ( ;__first != __last; ++__first) _C_t.insert(*__first); }#elseC multiset (const value_type* __first, const value_type* __last, 8 const key_compare &__cmp = key_compare (),@ const allocator_type &__alloc = allocator_type  ())% : _C_t (__cmp, true, __alloc) {* for ( ;__first != __last; ++__first) _C_t.insert(*__first); }= multiset (const_iterator __first, const_iterator __last, 8 const key_compare &__cmp = key_compare (),@ const allocator_type &__alloc = allocator_type ())% : _C_t (__cmp, true, __alloc) {* for ( ;__first != __last; ++__first) _C_t.insert(*__first); }#endif" multiset (const multiset &__ x)" : _C_t(__x._C_t, true) { }/ multiset& operator= (const multiset &__x) {$ _C_t = __x._C_t; return *this; }* allocator_type get_allocator() const {" return _C_t.get_allocator(); } // // iterators //F iterator begin () { return _C_t.begin(); }F const_iterator begin () const { return _C_t.begin(); }F iterator end () { return _C_t.end(); }F const_iterator  end () const { return _C_t.end(); }G reverse_iterator rbegin () { return _C_t.rbegin(); } G const_reverse_iterator rbegin () const { return _C_t.rbegin(); } F reverse_iterator rend () { return _C_t.rend(); }F const_reverse_iterator rend () const { return _C_t.rend(); } // // capacity //< bool empty () const { return _C_t.empty(); }< size_type size () const { return _C_t.size(); }< size _type max_size () const { return _C_t.max_size(); } // // modifiers //N iterator insert (const value_type& __x) { return _C_t.insert(__x).first; }< iterator insert (iterator __it, const value_type& __x) {' return _C_t.insert (__it, __x); }2#if !defined (_RWSTD_NO_INLINE_MEMBER_TEMPLATES) \0 && (!defined (_MSC_VER) || _MSC_VER >= 1300) template7 void insert (_InputIter __first, _InputIter __last) {0 for ( ;__first != __last; ++__first) _C_t.insert(*__first); }#elseE void insert (const value_type* __first, const value_type* __last) {0 for ( ;__first != __last; ++__first) _C_t.insert(*__first); }? void insert (const_iterator __first, const_iterator __last) {0 for ( ;__first != __last; ++__first) _C_t.insert(*__first); }#endif void erase (iterator __it) { _C_t.erase (__it); }E size_type erase (const key_type& __x) { return _C_t.erase(__x); }4 void erase (iterator __first, iterator __last) {% _C_t.erase (__first, __last); } void swap (multiset &__x) { _C_t.swap(__x._C_t); } void clear () { _C_t.clear (); } // // observers //A key_compare key_comp () const { return _C_t.key_comp(); }A value_compare value_comp () const { return _C_t.key_comp(); }5 // follows proposed resolution of lwg issue 214) iterator find (const key_type& __x) { return _C_t.find(__x); }5 const_iterator find (const key_type& __x) const { return _C_t.find(__x); }1 size_type count (const key_type& __x) const { return _C_t.count(__x); }5 // follows proposed resolution of lwg issue 2140 iterator lower_bound (const key_type& __x) {% return _C_t.lower_bound(__x); }< const_iterator lower_bound (const key_type& __x) const {% return _C_t.lower_bound(__x); }5 // follows proposed resolution of lwg issue 2140 iterator upper_bound (const key_type& __x) {& return _C_t.upper_bound(__x);  }< const_iterator upper_bound (const key_type& __x) const {& return _C_t.upper_bound(__x);  }5 // follows proposed resolution of lwg issue 214@ pair equal_range (const key_type& __x) {% return _C_t.equal_range(__x); }Q pair equal_range (const key_type& __x) const {% return _C_t.equal_range(__x); } };9 template F inline bool operator== (const set<_Key, _Compare, _Allocator>& __x, E const set<_Key, _Compare, _Allocator>& __y) {D return __x.size() == __y.size() && equal(__x.begin(), __x.end(),: __y.begin()); }9 template E inline bool operator< (const set<_Key, _Compare, _Allocator>& __x, D const set<_Key, _Compare, _Allocator>& __y) {G return lexicographical_compare(__x.begin(), __x.end(), __y.begin(),. __y.end()); }9 template D inline bool operator!= (const set<_Key,_Compare,_Allocator>& __x, C const set<_Key,_Compare,_Allocator>& __y) { return !(__x == __y); }9 template C inline bool operator> (const set<_Key,_Compare,_Allocator>& __x, B const set<_Key,_Compare,_Allocator>& __y) { return __y < __x; }9 template D inline bool operator>= (const set<_Key,_Compare,_Allocator>& __x, C const set<_Key,_Compare,_Allocator>& __y) { return !(__x < __y); }9 template D inline bool operator<= (const set<_Key,_Compare,_Allocator>& __x, C const set<_Key,_Compare,_Allocator>& __y) { return !(__y < __x); }$#ifndef _RWSTD_NO_PART_SPEC_OVERLOAD9 template 0 void swap(set<_Key,_Compare,_Allocator>& __a, / set<_Key,_Compare,_Allocator>& __b) { __a.swap(__b); }#end if9 template K inline bool operator== (const multiset<_Key, _Compare, _Allocator>& __x, J const multiset<_Key, _Compare, _Allocator>& __y) {D return __x.size() == __y.size() && equal(__x.begin(), __x.end(),: __y.begin()); }9 template J inline bool operator< (const multiset<_Key, _Compare, _Allocator>& __x, I  const multiset<_Key, _Compare, _Allocator>& __y) {G return lexicographical_compare(__x.begin(), __x.end(), __y.begin(),. __y.end()); }9 template I inline bool operator!= (const multiset<_Key,_Compare,_Allocator>& __x, H const multiset<_Key,_Compare,_Allocator>& __y) { return !(__x == __y); }9 template H inline bool operator> (const multiset<_Key,_Compare,_Allocator>& __x, G const multiset<_Key,_Compare,_Allocator>& __y) { return __y < __x; }9 template I inline bool operator>= (const multiset<_Key,_Compare,_Allocator>& __x, H const multiset<_Key,_Compare,_Allocator>& __y) { return !(__x < __y); }9 template I inline bool operator<= (const multiset<_Key,_Compare,_Allocator>& __x, H const multiset<_Key,_Compare,_Allocator>& __y) { return !(__y < __x); }*#if !defined(_RWSTD_NO_PART_SPEC_OVERLOAD): template 5 void swap(multiset<_Key,_Compare,_Allocator>& __a, 4 multiset<_Key,_Compare,_Allocator>& __b) { __a.swap(__b);  }#endif} // namespace stdE#if defined(__VMS) && define d(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif#endif // _RWSTD_SET_INCLUDEDwwҔq7Ԧ// -*- C++ -*-L/*************************************************************************** *@ * sstream - Declarations for the Standard Library basic streams *, * $Id: //stdlib/3.0-rel/include/sstream#2 $ *L *************************************************************************** * > * Copyright 2002 Compaq Information Technologies Group, L.P. *C * Compaq and the Compaq logo are trademarks of Compaq Information@ * Technologies Group, L.P. in the U.S. and /or other countries. *J * Confidential computer software. Valid license from Compaq required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software , Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/#ifndef _RWSTD_SSTREAM_INCLUDED#define _RWSTD_SSTREAM_INCLUDED#include #ifndef __USE_STD_IOSTREAMw#error "cannot include ios -- define __USE_STD_IOSTREAM to override default - see section 7.1.2 of the C++ Using Guide"#else'#ifndef _RWSTD_N O_REDUNDANT_DEFINITIONS# include # include #else# include +#endif // _RWSTD_NO_REDUNDANT_DEFINITIONS #include #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_R!WSTD_NAMESPACE (std) { 7template>class basic_stringbuf: public basic_streambuf<_CharT, _Traits>{E typedef basic_string<_CharT, _Traits, _Allocator> _C_string_type;public:6 typedef _CharT char_type;8 typedef _Traits traits_type;N typedef _Allocator allocator_type; // lwg issue 2515 typedef _TYPENAME traits_type::int_type int_type;5 typedef "_TYPENAME traits_type::pos_type pos_type;5 typedef _TYPENAME traits_type::off_type off_type; _EXPLICITN basic_stringbuf (ios_base::openmode __mode = ios_base::in | ios_base::out); : basic_streambuf(__mode) { this->_C_own_buf (true); } _EXPLICIT2 basic_stringbuf (const _C_string_type &__str, H ios_base::openmode = ios_base::in | ios_base::out); virtual ~basic_stringbuf (); ! _C_string_#type str () const {4 return _C_strlen () == 0 ? _C_string_type ()= : _C_string_type (this->_C_buffer, _C_strlen ()); } % void str (const _C_string_type&); protected: % virtual streamsize showmanyc () {/ return this->gptr () < this->egptr () ?< streamsize (this->egptr () - this->gptr ()) : 0; } ? virtual int_type overflow (int_type = traits_type::eof ());@ virtual int_type pbackfail (int_type = traits_type$::eof ());$ virtual int_type underflow () {% return this->_C_read_avail ()8 ? traits_type::to_int_type (*this->gptr ()) " : traits_type::eof (); } O virtual pos_type seekoff (off_type, ios_base::seekdir, ios_base::openmode =< ios_base::in | ios_base::out); < virtual pos_type seekpos (pos_type, ios_base::openmode =< ios_base::in | ios_base::out);4 virtual basic_streambuf*$ setbuf (char_type*, streamsize);= virtual streamsize xsputn (const char_type*, streamsize); //) // non-standard convenience functions //# streamsize _C_strlen () const {B return this->_C_is_in () ? this->egptr () - this->eback ()C : this->epptr () - this->pbase (); }};7templateHinline basic_stringbuf<_CharT, _Traits, _Allocator>::~basic_stri&ngbuf (){F typedef _RWSTD_ALLOC_TYPE (allocator_type, char_type) _ValueAlloc; if (this->_C_own_buf ())F _ValueAlloc ().deallocate (this->_C_buffer, this->_C_bufsize);}7template@class basic_istringstream: public basic_istream<_CharT, _Traits>{E typedef basic_string<_CharT, _Traits, _Allocator> _C_string_type;public:7 typedef _CharT char_type;9 typedef _Traits ' traits_type;< typedef _Allocator allocator_type;6 typedef _TYPENAME traits_type::int_type int_type;6 typedef _TYPENAME traits_type::pos_type pos_type;6 typedef _TYPENAME traits_type::off_type off_type; _EXPLICITB basic_istringstream (ios_base::openmode __mode = ios_base::in): : basic_istream(rdbuf ()),+ _C_sb (__mode | ios_base::in) { } _EXPLICIT6 basic_istringstream (const _C_string (_type& __str, B ios_base::openmode __mode = ios_base::in): : basic_istream(rdbuf ()),2 _C_sb (__str, __mode | ios_base::in) { }M basic_stringbuf *rdbuf () const {* // necessary to help SunPro 5.0/T9L typedef basic_istringstream  _SelfT;9 return &_RWSTD_CONST_CAST (_SelfT*, this)->_C_sb; }! _C_string_)type str () const { return rdbuf ()->str (); }, void str (const _C_string_type& __str) { rdbuf ()->str (__str); }private:B basic_stringbuf _C_sb;};7template@class basic_ostringstream: public basic_ostream<_CharT, _Traits>{E typedef basic_string<_CharT, _Traits, _Allocator> _C_string_type;public:6 typedef _CharT char_t *ype;8 typedef _Traits traits_type;; typedef _Allocator allocator_type;5 typedef _TYPENAME traits_type::int_type int_type;5 typedef _TYPENAME traits_type::pos_type pos_type;5 typedef _TYPENAME traits_type::off_type off_type;E // NOTE: the constructors pass the address of a yet uninitialized= // data member to the constructor of the base class _EXPLICITC basic_ostringstream (ios_base::openmode __mode = ios +_base::out); : basic_ostream (rdbuf ()),, _C_sb (__mode | ios_base::out) { } _EXPLICIT7 basic_ostringstream (const _C_string_type &__str, D ios_base::openmode __mode = ios_base::out): : basic_ostream(rdbuf ()),3 _C_sb (__str, __mode | ios_base::out) { }M basic_stringbuf* rdbuf () const {* // necessary to help SunPr,o 5.0/T9L typedef basic_ostringstream  _SelfT;9 return &_RWSTD_CONST_CAST (_SelfT*, this)->_C_sb; }! _C_string_type str () const { return rdbuf ()->str (); }, void str (const _C_string_type &__str) { rdbuf ()->str (__str); }private:B basic_stringbuf _C_sb;};7template@class basic_-stringstream: public basic_iostream<_CharT, _Traits>{E typedef basic_string<_CharT, _Traits, _Allocator> _C_string_type;public:6 typedef _CharT char_type;8 typedef _Traits traits_type;; typedef _Allocator allocator_type;5 typedef _TYPENAME traits_type::int_type int_type;5 typedef _TYPENAME traits_type::pos_type pos_type;5 typedef _TYPENAME traits_type::int_type off_type; _EXPLICIT .3 basic_stringstream (ios_base::openmode __mode =5 ios_base::out | ios_base::in); : basic_iostream(rdbuf ()), _C_sb (__mode) { } _EXPLICIT5 basic_stringstream (const _C_string_type &__str, 4 ios_base::openmode __mode = 5 ios_base::out | ios_base::in); : basic_iostream(rdbuf ()),# _C_sb (__str, __mode) { }M basic_string/buf *rdbuf () const {* // necessary to help SunPro 5.0/T9K typedef basic_stringstream  _SelfT;9 return &_RWSTD_CONST_CAST (_SelfT*, this)->_C_sb; }! _C_string_type str () const { return rdbuf ()->str (); }, void str (const _C_string_type &__str) { rdbuf ()->str (__str); }private:B basic_stringbuf _C_sb;};)_RWSTD_INSTANTIATE_3 (class _RWSTD_EXPORT> basic_stringbuf,9 allocator >);#ifndef _RWSTD_NO_WCHAR_T)_RWSTD_INSTANTIATE_3 (class _RWSTD_EXPORTD basic_stringbuf,< allocator >);#endif // _RWSTD_NO_WCHAR_T} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif,#if _RWSTD_DEFINE_TEMPLATE (BASIC_STRINGBUF)# include #endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif#endif // __USE_STD_IOSTREAM##endif // _RWSTD_SSTREAM_INCLUDEDww 2q7ԦL/*************************************************************************** *C * sstream.cc - Declarations for the Standard Library basic strings */ * $Id: //stdlib/3.0-rel/include/sstream.cc#3 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent wit 3h FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and ot 4her laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer s 5oftware is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L *6*************************************************************************/#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) { L#define _RWSTD_GROW_SSTREAM(from, to) \ 7L (_STD::max)(streamsize (_RWSTD_NEW_CAPACITY (_C_string_type, \L (_C_string_type*)0, \I from)), streamsize (to))7template.basic_stringbuf<_CharT, _Traits, _Allocator>::Hbasic_stringbuf (const _C_string_type& __str, ios_base::openmode __mode). : basic_streambuf<_CharT, _Traits>(__mode){ this->_C_own_buf (true);. 8const streamsize __slen = __str.length (); if (__slen != 0) {J typedef _RWSTD_ALLOC_TYPE (allocator_type, char_type) _ValueAlloc;" this->_C_bufsize = __slen;F this->_C_buffer = _ValueAlloc ().allocate (this->_C_bufsize);C traits_type::copy (this->_C_buffer, __str.data (), __slen);  if (this->_C_is_in ())O this->setg (this->_C_buffer, this->_C_buffer, this->_C_buf_end ());  if (this->_C_is_out ())> 9 this->setp (this->_C_buffer, this->_C_buf_end ()); 5 if (__mode & (ios_base::app | ios_base::ate))N this->pbump (_RWSTD_STATIC_CAST (int, __slen)); // "seek" to end }}7templatevoidObasic_stringbuf<_CharT, _Traits, _Allocator>::str (const _C_string_type& __str){) _RWSTD_ASSERT (this->_C_is_valid ());F typedef _RWSTD_ALLOC_TYPE (allocator_type, char_type) _ValueAlloc;. const streamsize _:_slen = __str.length (); if (0 == __slen) { if (this->_C_own_buf ())J _ValueAlloc ().deallocate (this->_C_buffer, this->_C_bufsize); this->setg(0, 0, 0); this->setp(0, 0); this->_C_buffer = 0; this->_C_bufsize = 0; } else {) if (__slen > this->_C_bufsize) {4 // buffer too small - need to reallocate$ if (this->_C_own_buf ())N _ValueAlloc ().deallocate (this->_C_buffer, th;is->_C_bufsize);N this->_C_bufsize = _RWSTD_GROW_SSTREAM (this->_C_bufsize, __slen);I this->_C_buffer = _ValueAlloc ().allocate (this->_C_bufsize);$ this->_C_own_buf (true); }C traits_type::copy (this->_C_buffer, __str.data (), __slen);  if (this->_C_is_in ())9 this->setg (this->_C_buffer, this->_C_buffer,2 this->_C_buffer + __slen); ! if (this->_C_is_out ()) {C < this->setp (this->_C_buffer, this->_C_buffer + __slen); 4 if ( (this->_C_iomode & ios_base::app)5 || (this->_C_iomode & ios_base::ate))O this->pbump (_RWSTD_STATIC_CAST (int, __slen)); // seek to end }  }}7template@_TYPENAME basic_stringbuf<_CharT, _Traits, _Allocator>::int_typeEbasic_stringbuf<_CharT, _Traits, _Allocator>::overflow (int_type __c){) _RWSTD=_ASSERT (this->_C_is_valid ()); if (!this->_C_is_out ()) # return traits_type::eof ();  if (this->_C_is_eof (__c))+ return traits_type::not_eof (__c); + const streamsize __slen = _C_strlen (); $ // reallocate space if necessary2 if (!(this->epptr () < this->_C_buf_end ())) {J typedef _RWSTD_ALLOC_TYPE (allocator_type, char_type) _ValueAlloc;/ // calculate size of buffer to allocate% const streamsize __new_size >=I _RWSTD_GROW_SSTREAM (this->_C_bufsize + 1, this->_C_bufsize); D char_type* __new_buf = _ValueAlloc ().allocate (__new_size); L if (this->_C_buffer) { // need to copy the old buffer to new bufferF traits_type::copy (__new_buf, this->_C_buffer, __slen); % if (this->_C_own_buf ()) N _ValueAlloc ().deallocate (this->_C_buffer, this->_C_bufsize); } this->_C_own_buf (true);& this->_C ?_bufsize = __new_size;% this->_C_buffer = __new_buf; }4 // increment the end put pointer by one position? this->setp (this->_C_buffer, this->_C_buffer + __slen + 1);3 this->pbump (_RWSTD_STATIC_CAST (int, __slen));& // set get area if in in|out mode  if (this->_C_is_inout ()) {N // use the relative offset of gptr () from eback() to set the new gptr? // although they are invalid, the offset is still valid1 char_type* __gptr_new = th@is->_C_bufferE + (this->gptr () - this->eback ()); 5 // N.B. pptr() has already been incremented @ this->setg (this->_C_buffer, __gptr_new, this->epptr()); }9 return this->sputc (traits_type::to_char_type (__c));}7template@_TYPENAME basic_stringbuf<_CharT, _Traits, _Allocator>::int_typeFbasic_stringbuf<_CharT, _Traits, _Allocator>::pbackfail (int_type __c){) _RWSTD_ASSERT A(this->_C_is_valid ()); int_type __retval;# if (!this->_C_putback_avail ())# return traits_type::eof (); L if (traits_type::eq (traits_type::to_char_type (__c), this->gptr ()[-1])# || this->_C_is_eof (__c)) {$ // "put back" original value this->gbump (-1);. __retval = traits_type::not_eof (__c); }" else if (this->_C_is_out ()) {2 // overwrite existing value with new value this->gbump (-1);9 *this->gBptr () = traits_type::to_char_type (__c); __retval = __c; } else' __retval = traits_type::eof ();  return __retval;}7template!basic_streambuf<_CharT, _Traits>*Gbasic_stringbuf<_CharT, _Traits, _Allocator>::setbuf (char_type* __buf,E streamsize __n){) _RWSTD_ASSERT (this->_C_is_valid ());* if (!__buf && !__n) // 27.7.1.3, p16 C return this;2 if (__n < _C_strlen() || !this->_C_is_out())  return 0; // failure- bool __own_old_buf = this->_C_own_buf ();+ const streamsize __slen = _C_strlen (); F typedef _RWSTD_ALLOC_TYPE (allocator_type, char_type) _ValueAlloc; if (0 == __buf) {. __buf = _ValueAlloc ().allocate (__n); this->_C_own_buf (true); } else! this->_C_own_buf (false); : traits_type::copy (__buf, this->_C_buffer, __slen); D  if (__own_old_buf)F _ValueAlloc ().deallocate (this->_C_buffer, this->_C_bufsize);  this->_C_buffer = __buf; this->_C_bufsize = __n;M streamsize __pptr_off = this->pptr () - this->pbase (); // save pptr pos; this->setp (this->_C_buffer, this->_C_buffer + __slen);O this->pbump (_RWSTD_STATIC_CAST (int, __pptr_off)); // ... and restore it % // set get area if in in|out mode if (this->_C_is_inout()) {N // use the relative offset oEf gptr () from eback() to set the new gptrI // (although the pointers are invalid, the offset is still valid)1 char_type* __gptr_new = this->_C_bufferE + (this->gptr () - this->eback ()); @ this->setg (this->_C_buffer, __gptr_new, this->epptr()); }  return this;}7template@_TYPENAME basic_stringbuf<_CharT, _Traits, _Allocator>::pos_type.basic_stringbuf<_CharT, _Traits,F _Allocator>::Mseekoff (off_type __off, ios_base::seekdir __way, ios_base::openmode __which){) _RWSTD_ASSERT (this->_C_is_valid ());@ // should implicitly hold as long as ios::seekdir is an enum, _RWSTD_ASSERT ( ios_base::beg == __way, || ios_base::cur == __way. || ios_base::end == __way);  streamsize __newoff = 0;! if (__which & ios_base::in) {1 if (!this->_C_is_in () || !this->gptr ()), return pos_tGype (off_type (-1));- // do the checks for in|out mode here& if (__which & ios_base::out) {? if ((__way & ios_base::cur) || !this->_C_is_out ())0 return pos_type (off_type (-1)); }  switch (__way) { case ios_base::beg: __newoff = 0; break;  case ios_base::cur:6 __newoff = this->gptr () - this->eback (); break;  case ios_base::end:H7 __newoff = this->egptr () - this->eback (); }% if ( (__newoff + __off) < 0F || (this->egptr () - this->eback ()) < (__newoff + __off)), return pos_type (off_type (-1));# this->setg (this->eback (),6 this->eback () + __newoff + __off,$ this->egptr ()); } " if (__which & ios_base::out) {2 if (!this->_C_is_out () || !this->pptr ()), return pos_type (off_typIe (-1)); switch (__way) { case ios_base::beg: __newoff = 0; break;  case ios_base::cur:6 __newoff = this->pptr () - this->pbase (); break;  case ios_base::end:7 __newoff = this->epptr () - this->pbase (); break; } % if ( (__newoff + __off) < 0F || (this->epptr () - this->pbase ()) < (__newoff + __off)), Jreturn pos_type (off_type (-1));4 this->setp (this->pbase (), this->epptr ());A this->pbump (_RWSTD_STATIC_CAST (int, __newoff + __off)); }' return pos_type (__newoff + __off);}7template@_TYPENAME basic_stringbuf<_CharT, _Traits, _Allocator>::pos_type.basic_stringbuf<_CharT, _Traits, _Allocator>::3seekpos (pos_type __sp, ios_base::openmode __which){) _RWSTD_ASSERT (this->_C_is_valid ());% const stKreamsize __newoff = __sp; > // return invalid pos if no positioning operation succeeds1 pos_type __retval = pos_type (off_type (-1));  if (__newoff < 0)( return pos_type (off_type (-1));1 // see 27.7.1.3 p.11 for required conditions H if ((__which & ios_base::in) && this->_C_is_in () && this->gptr()) { 9 if ((this->eback () + __newoff) > this->egptr ()), return pos_type (off_type (-1)); # this->setg (this->ebacLk (),. this->eback () + __newoff,$ this->egptr ()); __retval = __sp; } J if ((__which & ios_base::out) && this->_C_is_out () && this->pptr()) {: if ((this->pbase () + __newoff) > this->epptr ()) , return pos_type (off_type (-1)); 4 this->setp (this->pbase (), this->epptr ());9 this->pbump (_RWSTD_STATIC_CAST (int, __newoff)); __retval = __sp; }  return __retMval;}7template9streamsize basic_stringbuf<_CharT, _Traits, _Allocator>::-xsputn (const char_type *__s, streamsize __n){) _RWSTD_ASSERT (this->_C_is_valid ());, if (!__s || !__n || !this->_C_is_out ()) return 0;7 if ((this->pptr () + __n) >= this->_C_buf_end ()) {3 // need to (re)allocate space in the buffer% const streamsize __new_size =K _RWSTD_GROW_SSTREAM (this->_C_bufsize + __n,N this->_C_bufsize);* // catch memory allocation failure _TRY {# setbuf (0, __new_size); } _CATCH (...) { return 0; } }0 traits_type::copy (this->pptr (), __s, __n);< // if put extended the put area, set the new end pointer2 if ((this->pptr () + __n) >= this->epptr ()) {1 // save the original offset of pptr() ...@ streamsize __pptr_off = (this->pptr() - this->pbase ());9 this->setpO (this->pbase (), this->pptr () + __n);P this->pbump (_RWSTD_STATIC_CAST (int, __pptr_off)); // ...and restore it D if (this->_C_is_in ()) // need to extend the get area, tooG this->setg (this->eback (), this->gptr (), this->epptr ()); }0 this->pbump (_RWSTD_STATIC_CAST (int, __n)); return __n;}} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endifwwQSq7Ԧ// -*- C++ -*-L/*************************************************************************** *; * stack - Declaration for the Standard Library stack class ** * $Id: //stdlib/3.0-rel/include/stack#2 $ *L *************************************************************************** * > * Copyright 2002 Compaq Information Technologies Group, L.P. *C * Compaq and the Compaq logo are trademarks of Compaq Information@ * Technologies Group, L.P. in the U.S. and/or ot Rher countries. *J * Confidential computer software. Valid license from Compaq required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** * * Copyright (c) 1994 * Hewlett-Packard Company S *E * Permission to use, copy, modify, distribute and sell this softwareG * and its documentation for any purpose is hereby granted without fee,D * provided that the above copyright notice appear in all copies andD * that both that copyright notice and this permission notice appearA * in supporting documentation. Hewlett-Packard Company makes noA * representations about the suitability of this software for anyH * purpose. It is provided "as is" without express or implied warranty. *L * T************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with U the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software Vclause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/#ifndef _RWSTD_STACK_INCLUDED#define _RWSTD_STACK_INCLUDED#include #include #if defined(__DECCXX)# ifdef __WPRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) { template ) > class stack;)template 9inline bool operator==(const staXck<_TypeT, _Container>&, 9 const stack<_TypeT, _Container>&);)template 8inline bool operator<(const stack<_TypeT, _Container>&, 8 const stack<_TypeT, _Container>&);)template class stack{6 friend bool _RWSTD_SPECIALIZED_FRIEND (operator==)% (const stack&, const stack&);5 friend bool _RWSTD_SPECIALIZED_FRIEND (operator<)% (const stack&, const stack&);Ypublic: E typedef _Container container_type;A typedef _TYPENAME container_type::value_type value_type;@ typedef _TYPENAME container_type::size_type size_type;@ typedef _TYPENAME container_type::reference reference;F typedef _TYPENAME container_type::const_reference const_reference; protected:  container_type c;public: _EXPLICITL stack (const container_type &__c _RWSTD_DEFAULT_ARG (container_typZe()))  : c (__c) { }*#ifdef _RWSTD_NO_DEFAULT_TEMPLATE_ARGS ( stack () : c (container_type ()) { }#endif bool empty () const { return c.empty(); } size_type size () const { return c.size (); } reference top () { return c.back (); }" const_reference top () const { return c.back(); }' void push (const value_type& __x) { c.push_back (__x); } void pop () { [ c.pop_back (); }};)template >inline bool operator== (const stack<_TypeT, _Container>& __x, = const stack<_TypeT, _Container>& __y){ return __x.c == __y.c;})template =inline bool operator< (const stack<_TypeT, _Container>& __x, < const stack<_TypeT, _Container>& __y){ return __x.c < __y.c;})template >inline boo\l operator!= (const stack<_TypeT, _Container>& __x, = const stack<_TypeT, _Container>& __y){ return !(__x == __y);})template =inline bool operator> (const stack<_TypeT, _Container>& __x, < const stack<_TypeT, _Container>& __y){ return __y < __x;})template >inline bool operator>= (const stack<_TypeT, _Container>& __x, = const stack<_T]ypeT, _Container>& __y){ return !(__x < __y);})template >inline bool operator<= (const stack<_TypeT, _Container>& __x, = const stack<_TypeT, _Container>& __y){ return !(__y < __x);}} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif!#endif // _RWSTD_STACK_INCLUDEDww_B - definitions of the exception classes *. * $Id: //stdlib/3.0-rel/include/stdexcept#3 $ *L *************************************************************************** * > * Copyright 2002 Compaq Information Technologies Group, L.P. *C * Compaq and the Compaq logo are trademarks of Compaq Information@ * Technologies Group, L.P. in the U.S. and/or othe `r countries. *J * Confidential computer software. Valid license from Compaq required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. aAll Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies t bhereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFRc 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/!#ifndef _RWSTD_STDEXCEPT_INCLUDED!#define _RWSTD_STDEXCEPT_INCLUDEDE#include // for __rw_exception and string#include #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma d__environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) {0// classes below are _RWSTD_EXPORT'ed to prevent2// MSVC warnings issued when they are derived from // 19.1.15struct _RWSTD_EXPORT logic_error: _RW::__rw_exception{/ _EXPLICIT logic_error (const string& __str)) : _RW::__rw_exception (__setr) { } // extension/ _EXPLICIT logic_error (const char *__s = 0)' : _RW::__rw_exception (__s) { }}; // 19.1.2.struct _RWSTD_EXPORT domain_error: logic_error{0 _EXPLICIT domain_error (const string &__str)! : logic_error (__str) { } // extension0 _EXPLICIT domain_error (const char *__s = 0) : logic_error (__s) { }}; // 19.1.32struct _RWSTD_EXPORT invalid_argument: logic_error{4 _EXPLICIT invalid_argument (const string &f__str)! : logic_error (__str) { } // extension4 _EXPLICIT invalid_argument (const char *__s = 0) : logic_error (__s) { }}; // 19.1.4.struct _RWSTD_EXPORT length_error: logic_error{0 _EXPLICIT length_error (const string &__str)! : logic_error (__str) { } // extension0 _EXPLICIT length_error (const char *__s = 0) : logic_error (__s) { }}; // 19.1.5.struct _RWSTD_EXPORT out_of_range: logic_error{0 _EXPLICIT out_ofg_range (const string &__str)! : logic_error (__str) { } // extension0 _EXPLICIT out_of_range (const char *__s = 0) : logic_error (__s) { }}; // 19.1.67struct _RWSTD_EXPORT runtime_error: _RW::__rw_exception{1 _EXPLICIT runtime_error (const string &__str)) : _RW::__rw_exception (__str) { } // extension1 _EXPLICIT runtime_error (const char *__s = 0)' : _RW::__rw_exception (__s) { }}; // 19.1.7/struct _RWSTD_EXPORT ranhge_error: runtime_error{/ _EXPLICIT range_error (const string &__str)# : runtime_error (__str) { } // extension/ _EXPLICIT range_error (const char *__s = 0)! : runtime_error (__s) { }}; // 19.1.82struct _RWSTD_EXPORT overflow_error: runtime_error{2 _EXPLICIT overflow_error (const string &__str)# : runtime_error (__str) { } // extension2 _EXPLICIT overflow_error (const char *__s = 0)! : runtime_error (__s) { }}; i// 19.1.93struct _RWSTD_EXPORT underflow_error: runtime_error{3 _EXPLICIT underflow_error (const string &__str)# : runtime_error (__str) { } // extension3 _EXPLICIT underflow_error (const char *__s = 0)! : runtime_error (__s) { }};} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif%#endif // _RWSTD_STDEXCEPT_INCLUDEDww kq7Ԧ/*** >** Copyright 2003 Compaq Information Technologies Group, L.P.**C** Compaq and the Compaq logo are trademarks of Compaq Information@** Technologies Group, L.P. in the U.S. and/or other countries.**J** Confidential computer software. Valid license from Compaq required forF** possession, use or copying. Consistent with FAR 12.211 and 12.212,F** Commercial Computer Software, Computer Software Documentation, andK** Technical Data for Commercial Items are li censed to the U.S. Government/** under vendor's standard commercial license.***/#ifndef __STDIOSTREAM_HXX #ifdef _NT#include #else#include #endif#endifwwm////@//==============================================================#// FACILITY: DEC C++ Class Library//$// SUBSYSTEM: The iostream package.//8// MODULE: Include file for the stdiostream subpackage.//// MODULE DESCRIPTION://G// The stdiostream subpackage of the iostream package performs I/OJ// operations on stdio FILEs. It relies on the iostream (core) subpackageK// for base classes to derive classes that are specialized for stdio FILEs.//// DESIGN ISSUES://nO// The description of this subpackage in AT&T's documentation is virtuallyG// nonexistent. Also, it wasn't always possible to experimentallyP// determine the compatible behavior because of the problems in the versionJ// of cfront (Glockenspiel) we were using. On the other hand, AT&T'sO// documentation does show the stdiostream class as being directly derivedN// from class ios. This is far insufficient for any useful applications,P// and that's why expanod the functionality provided in class stdiostream by2// deriving it from iostream rather than ios.////-- //++// INCLUDE FILES//--/* #include */#ifdef __USE_STD_IOSTREAM #error "cannot include stdiostream.hxx -- do not compile strict_ansi OR define __NO_USE_STD_IOSTREAM - see section 7.1.2 of the C++ Using Guide"#else#include #include extern "C"{#include }#pragma __environment save)#pragma __environmpent cxx_header_defaults//++ // LINKAGE//--'#if defined(__VMS) && defined(__DECCXX)+# pragma __extern_model __relaxed_refdef4# pragma __extern_prefix __CXXL_PLAIN_FUNC_LINKAGE# if defined __VAX## pragma __nomember_alignment# else!# pragma __member_alignment # endif#endif @//==============================================================// Class: stdiobuf//// FUNCTIONAL DESCRIPTION://G// This class specializes the streambuf class for stqdio FILEs. It usesI// unbuffered mode, causing all operations to be reflected immediately in // the FILE.@//--------------------------------------------------------------!class stdiobuf : public streambuf{public: stdiobuf(FILE *f);% virtual int overflow(int = EOF);K virtual streampos seekoff(streamoff, __SCOPE(ios::)seek_dir, int mode); virtual int sync(); virtual int underflow();I#if ! defined(__VMS) // OpenVMS does not allocate space for the following' r virtual int pbackfail(int); ~stdiobuf();private: FILE* m_pfile; int __fill1;' char m_achBuffer[2]; char __fill2[2];#endifpublic: FILE* stdiofile():#if defined(__VMS) // OpenVMS implementation is not inline ;#else {return m_pfile; }#endif}; @//==============================================================// Class: stdiostream//// FUNCTIONAL DESCRIPTION://J// This class specializes the iosstream class for stdio FILEs and to use an(// stdiobuf as its associated streambuf.@//--------------------------------------------------------------class stdiostream#if defined(__osf__) : public ios#else : public iostream#endif{public: stdiostream(FILE *f); ~stdiostream(); stdiobuf* rdbuf();B#if defined (__VMS) // OpenVMS defines this public member function void fp(FILE *f);L#elif defined (__osf__) // DEC OSF/1 requires backward compatibility to AT&Tprivate: stdiobuf m_stdiobuf;#else: // placeholder for other implementations' special needs#endif // defined(__VMS)}; #pragma __environment restore#endif // __USE_STD_IOSTREAM#endif// End of stdiostream.hxxww uș r7Ԧ/*** >** Copyright 2003 Compaq Information Technologies Group, L.P.**C** Compaq and the Compaq logo are trademarks of Compaq Information@** Technologies Group, L.P. in the U.S. and/or other countries.**J** Confidential computer software. Valid license from Compaq required forF** possession, use or copying. Consistent with FAR 12.211 and 12.212,F** Commercial Computer Software, Computer Software Documentation, andK** Technical Data for Commercial Items are li censed to the U.S. Government/** under vendor's standard commercial license.***/#ifndef __STOPWATCH_HXX #ifdef _NT#include #else#include #endif#endifwwu7ԦM/****************************************************************************T *E * This cname header was auto-generated from its C89 counterpartT *N ****************************************************************************/#ifndef __CMATH_LOADED#define __CMATH_LOADED#pragma __nostandard#ifdef __PURE_CNAME # define __NAMESPACE_STD_ONLY#endif#ifndef __MATH_PROCESSED#define __MATH_PROCESSEDM/***************************************************xr7Ԧ#ifndef __STOPWATCH_HXX#define __STOPWATCH_HXX//// B// Copyright 2003, 2004 Hewlett-Packard Development Company, L.P.//F// Confidential computer software. Valid license from HP required forF// possession, use or copying. Consistent with FAR 12.211 and 12.212,F// Commercial Computer Software, Computer Software Documentation, andK// Technical Data for Commercial Items are licensed to the U.S. Government/// under vendor's standard commercial license.//y////++#// FACILITY: DEC C++ Class Library//%// SUBSYSTEM: The Stopwatch package.//3// MODULE: Include file for the Stopwatch package.//// MODULE DESCRIPTION://O// The Stopwatch package is used for timing measurements in user programs.//// DESIGN ISSUES://N// The Stopwatch package included in DEC C++ Class Library fully conformsO// to the description in "UNIX(R) System V AT&T Standard Library Extension@// Release 1.0, Manual and Tutorials, Seleczt Code 309-525".////--//++// INCLUDE FILES//--#include extern "C"{#include +#if defined(__unix) || defined(__VMS_POSIX)# include #endif}#pragma __environment save)#pragma __environment cxx_header_defaults//++ // LINKAGE//--'#if defined(__VMS) && defined(__DECCXX)*# pragma __extern_model __relaxed_refdef4# pragma __extern_prefix __CXXL_PLAIN_FUNC_LINKAGE# if defined __VAX## pragma __nomember_al{ignment# else!# pragma __member_alignment # endif#endif//++// TYPE DEFINITIONS//--+#if defined(__unix) || defined(__VMS_POSIX) typedef struct tms tms_t;#else# if __VMS_VER >= 70000000 typedef struct tms tms_t; # else # define tms tbuffer# define tms_t tbuffer_t%# define tms_utime proc_user_time'# define tms_stime proc_system_time'# define tms_cutime child_user_time)# define tms_cstime child_system_time # en|dif#endif//++// STATIC DATA//--(// The default resolution is 1/60 second(// (This is usually defined in )#ifndef CLK_TCK# define CLK_TCK 60#endif"// The clock resolution in seconds3static const float cxxl_resolution = 1.0 / CLK_TCK; class Stopwatch//++// FUNCTIONAL DESCRIPTION://J// A Stopwatch is a device for the measurement of time intervals useful toH// programmers: user time, system time, and real time. The distinctionK// between u}ser time and system time is only meaningful on ULTRIX. On VMS,G// consistently with the behavior of the VAX C RTL routine times(), theG// total accumulated CPU time for the process is returned as user time,.// and system time is always returned as zero.//--{public:'#if defined(__VMS) && defined(__DECCXX)4# pragma __extern_prefix __CXXL_FLOAT_FUNC_LINKAGE#endif // Constructors Stopwatch(); // Setting operations void start(); void stop(); ~void reset(); // Reading operations inline int status() const; double system(); double user(); double real(); // Miscellaneous operations inline double resolution();private: tms_t cxxl_time_buf; int cxxl_status;" time_t cxxl_init_system_time; time_t cxxl_init_user_time; time_t cxxl_init_real_time; double cxxl_system_time; double cxxl_user_time; double cxxl_real_time; }; inline int Stopwatch::status( ) const//++// FUNCTIONAL DESCRIPTION://,// Returns the status of the Stopwatch.//// RETURN VALUE://2// 1 if the Stopwatch is running, and 0 otherwise.//--{ return cxxl_status;} $inline double Stopwatch::resolution( )//++// FUNCTIONAL DESCRIPTION://I// Returns the (system-dependent) resolution of the Stopwatch in seconds.D// On ULTRIX systems, 1/60 is typical, while 1/100 is the resolutionF// on VMS systems. Note that the value of resolution pertains only toJ// system and user time. Values of real (clock) time are always expressed// in whole seconds.//// RETURN VALUE://K// The fixed, system-dependent resolution of the Stopwatch in seconds.//--{# return (double)cxxl_resolution;} #pragma __environment restore#endif// End of stopwatch.hxxww y#r7Ԧ/*** >** Copyright 2003 Compaq Information Technologies Group, L.P.**C** Compaq and the Compaq logo are trademarks of Compaq Information@** Technologies Group, L.P. in the U.S. and/or other countries.**J** Confidential computer software. Valid license from Compaq required forF** possession, use or copying. Consistent with FAR 12.211 and 12.212,F** Commercial Computer Software, Computer Software Documentation, andK** Technical Data for Commercial Items are li censed to the U.S. Government/** under vendor's standard commercial license.***/#ifndef __STREAM_HXX# include #endifww}2r7Ԧ#ifndef __STREAM_HXX#define __STREAM_HXX//// B// Copyright 2003, 2004 Hewlett-Packard Development Company, L.P.//F// Confidential computer software. Valid license from HP required forF// possession, use or copying. Consistent with FAR 12.211 and 12.212,F// Commercial Computer Software, Computer Software Documentation, andK// Technical Data for Commercial Items are licensed to the U.S. Government/// under vendor's standard commercial license.//////++#// FACILITY: DEC C++ Class Library//$// SUBSYSTEM: The iostream package.//3// MODULE: Include file for the stream subpackage.//// MODULE DESCRIPTION://K// The stream subpackage of the iostream package provides the functionalityE// that is no longer supported (referred to as anachronisms), for the;// purpose of backward compatibility with AT&T release 1.2.//// DESIGN ISSUES://H// For inclusion in this subpackage, we have selected these anachronismsJ// that continue appearing in the current literature, and specifically, inJ// the 2nd edition of "The C++ Programming Language" by Bjarne Stroustrup.//F// This implementation is not thread-safe, since all threads share the// same buffer.////-- //// INCLUDE FILES///* #include */#ifdef __USE_STD_IOSTREAM #error "cannot include stream.hxx -- do not compile strict_ansi OR define __NO_USE_STD_IOSTREAM - see section 7.1.2 of the C++ Using Guide"#else#include  extern "C"{#include #include }#include #include #pragma __environment save)#pragma __environment cxx_header_defaults// // LINKAGE//'#if defined(__VMS) && defined(__DECCXX)+# pragma __extern_model __relaxed_refdef# if defined __VAX## pragma __nomember_alignment# else!# pragma __member_alignment # endif#endif 8static const int __cxxl_stream_format_buffer_size = 257;Ostatic char __cxxl_stream_format_buffer[__cxxl_stream_format_buffer_size]; #ifndef __CXXL_STREAM_CXXinline #endif char *oct( long __value, int __width = 0 )//++// FUNCTIONAL DESCRIPTION://// Format a number in octal.//// RETURN VALUE://@// __cxxl_stream_format_buffer: contains the formatted argument.//0// IMPLICIT OUTPUT PARAMETERS AND SIDE EFFECTS://@// __cxxl_stream_format_buffer: contains the formatted argument.////--{B sprintf(__cxxl_stream_format_buffer, "%*o", __width, __value);' return __cxxl_stream_format_buffer;} #ifndef __CXXL_STREAM_CXXinline #endif char *dec( long __value, int __width = 0 )//++// FUNCTIONAL DESCRIPTION://// Format a number in decimal.//// RETURN VALUE://@// __cxxl_stream_format_buffer: contains the formatted argument.//0// IMPLICIT OUTPUT PARAMETERS AND SIDE EFFECTS://@// __cxxl_stream_format_buffer: contains the formatted argument.////--{B sprintf(__cxxl_stream_format_buffer, "%*d", __width, __value);' return __cxxl_stream_format_buffer;} #ifndef __CXXL_STREAM_CXXinline #endif char *hex( long __value, int __width = 0 )//++// FUNCTIONAL DESCRIPTION://"// Format a number in hexadecimal.//// RETURN VALUE://@// __cxxl_stream_format_buffer: contains the formatted argument.//0// IMPLICIT OUTPUT PARAMETERS AND SIDE EFFECTS://@// __cxxl_stream_format_buffer: contains the formatted argument.////--{B sprintf(__cxxl_stream_format_buffer, "%*x", __width, __value);' return __cxxl_stream_format_buffer;} #ifndef __CXXL_STREAM_CXXinline char *chr( long __value, int __width = 0 )#else char *chr( int __value, int __width = 0 )#endif//++// FUNCTIONAL DESCRIPTION://// Format a single character.//// RETURN VALUE://@// __cxxl_stream_format_buffer: contains the formatted argument.//0// IMPLICIT OUTPUT PARAMETERS AND SIDE EFFECTS://@// __cxxl_stream_format_buffer: contains the formatted argument.////--{B sprintf(__cxxl_stream_format_buffer, "%*c", __width, __value);' return __cxxl_stream_format_buffer;} #ifndef __CXXL_STREAM_CXXinline #endif char *str( const char *__value, int __width = 0 )//++// FUNCTIONAL DESCRIPTION://// Format a string.//// RETURN VALUE://@// __cxxl_stream_format_buffer: contains the formatted argument.//0// IMPLICIT OUTPUT PARAMETERS AND SIDE EFFECTS://@// __cxxl_stream_format_buffer: contains the formatted argument.// // DESIGN://@// The format argument was originally not specified to be const.////--{B sprintf(__cxxl_stream_format_buffer, "%*s", __width, __value);' return __cxxl_stream_format_buffer;} #ifndef __CXXL_STREAM_CXXinline #endif char *form( const char *__format ... )//++// FUNCTIONAL DESCRIPTION://#// Format arguments as printf does.//// RETURN VALUE://A// __cxxl_stream_format_buffer: contains the formatted arguments.//0// IMPLICIT OUTPUT PARAMETERS AND SIDE EFFECTS://A// __cxxl_stream_format_buffer: contains the formatted arguments.// // DESIGN://@// The format argument was originally not specified to be const.//// This is not type-safe.////--{ va_list __ap; va_start(__ap, __format);: vsprintf(__cxxl_stream_format_buffer, __format, __ap); va_end(__ap);' return __cxxl_stream_format_buffer;} 4#if defined(__osf__) && defined(__CXXL_IOSTREAM_CXX)C// Implement as library function for DEC OSF/1 binary compatibilitySMANIP(int) setbase(int);ios &setbase(ios&, int);#else inline SMANIP(int) setbase(int);inline ios &setbase( ios &__s, int __base )//++// FUNCTIONAL DESCRIPTION://C// This is an anachronistic parameterized manipulator. It sets theB// base value for formatted I/O to octal, decimal, or hexadecimal,A// depending on the value of its explicit argument, 8, 10, or 16,?// respectively. It currently ignores invalid argument values.//// RETURN VALUE://,// Reference to the stream being acted upon.//--{ if (__base == 8)$ __s.setf(ios::oct, ios::basefield); else if (__base == 10)$ __s.setf(ios::dec, ios::basefield); else if (__base == 16)$ __s.setf(ios::hex, ios::basefield); return __s;}&inline SMANIP(int) setbase(int __base){( return SMANIP(int)(setbase, __base);}#endif #if defined(__osf__)F// Static constants for compatibility to previous version of DEC OSF/1$static const int input = (ios::in);%static const int output = (ios::out);%static const int append = (ios::app);%static const int atend = (ios::ate);)static const int _good = (ios::goodbit);(static const int _bad = (ios::badbit);)static const int _fail = (ios::failbit);(static const int _eof = (ios::eofbit);#endif #pragma __environment restore#endif // __USE_STD_IOSTREAM#endif// End of stream.hxxww[^Ar7Ԧ// -*- C++ -*-L/*************************************************************************** *C * streambuf - Declarations for the Standard Library stream buffers *. * $Id: //stdlib/3.0-rel/include/streambuf#3 $ *L *************************************************************************** * > * Copyright 2002 Compaq Information Technologies Group, L.P. *C * Compaq and the Compaq logo are trademarks of Compaq Information@ * Technologies Group, L.P. in the U. S. and/or other countries. *J * Confidential computer software. Valid license from Compaq required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave So ftware, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/!#ifndef _RWSTD_STREAMBUF_INCLUDED!#define _RWSTD_STREAMBUF_INCLUDED #include #include #include #ifndef __USE_STD_IOSTREAMw#error "cannot include ios -- define __USE_STD_IOSTREAM to override default - see section 7.1.2 of the C++ Using Guide"#else#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) { Atemplate */>4class basic_streambuf: public _RW::__rw_synchronized{public:6 typedef _CharT char_type;8 typedef _Traits traits_type;5 typedef _TYPENAME traits_type::int_type int_type;5 typedef _TYPENAME traits_type::pos_type pos_type;5 typedef _TYPENAME traits_type::off_type off_type;# virtual ~basic_streambuf () { } // 27.5.2.2.1, p1* locale pubimbue (const locale &__loc); // 27.5.2.2.1, p4 locale getloc () const { return _C_locale; }G // extension: avoids reference counting in MT builds (may result inM // a speedup of up to 50%); this is an alternative to caching a referenceC // (pointer) to a facet in each stream and stream buffer object locale& getloc () { return _C_locale; } // 27.5.2.2.2, p1C basic_streambuf* pubsetbuf (char_type *__buf, streamsize __n) {# return setbuf (__buf, __n); } // 27.5.2.2.2, p2 pos_type8 pubseekoff (off_type __off, ios_base::seekdir __way,L ios_base::openmode __which = ios_base::in | ios_base::out) {/ return seekoff (__off, __way, __which); }  // 27.5.2.2.2, p3 pos_type pubseekpos (pos_type __sp,L ios_base::openmode __which = ios_base::in | ios_base::out) {' return seekpos (__sp, __which); }  // 27.5.2.2.2, p4 int pubsync () { return sync (); } // 27.5.2.2.3, p1 streamsize in_avail () {C return gptr () < egptr () ? streamsize (egptr () - gptr ()) : showmanyc (); } // 27.5.2.2.3, p2 int_type snextc () {F return _C_is_eof (sbumpc ()) ? traits_type::eof () : sgetc (); }  // 27.5.2.2.3, p4 int_type sbumpc ();  // 27.5.2.2.3, p5 int_type sgetc () {1 return gptr () >= egptr () ? underflow ()2 : traits_type::to_int_type (*gptr ()); } // 27.5.2.2.3, p67 streamsize sgetn (char_type *__s, streamsize __n) {- _RWSTD_ASSERT_RANGE (__s, __s + __n);! return xsgetn (__s, __n); }  // 27.5.2.2.4, p1# int_type sputbackc (char_type); // 27.5.2.2.4, p2 int_type sungetc (); // 27.5.2.2.5, p1# int_type sputc (char_type __c);  // 27.5.2.2.5, p2= streamsize sputn (const char_type *__s, streamsize __n) {- _RWSTD_ASSERT_RANGE (__s, __s + __n);! return xsputn (__s, __n); }) ios_base::openmode _C_mode () const { return _C_iomode; } protected:G // 27.5.2.1, p1: default mode argument is extension for convenienceO basic_streambuf (ios_base::openmode __mode = ios_base::in | ios_base::out)  : _C_iomode (__mode), _C_buffer (0), _C_bufsize (0), _C_bufstate (0), _C_eback (0), _C_gptr (0), _C_egptr (0), _C_pbase (0), _C_pptr (0), _C_epptr (0) { } // 27.5.2.3.1, p1 char_type* eback () const { return _C_eback; } // 27.5.2.3.1, p2 char_type* gptr () const { return _C_gptr; } // 27.5.2.3.1, p3 char_type* egptr () const { return _C_egptr; } // 27.5.2.3.1, p4 void gbump (int __n) {% _RWSTD_ASSERT (_C_gptr != 0); _C_gptr += __n; } // 27.5.2.3.1, p5K void setg (char_type *__eback, char_type *__gptr, char_type *__egptr) { _C_eback = __eback; _C_gptr = __gptr; _C_egptr = __egptr; } // 27.5.2.3.2, p1 char_type* pbase () const { return _C_pbase; } // 27.5.2.3.2, p2 char_type* pptr () const { return _C_pptr; } // 27.5.2.3.2, p3 char_type* epptr () const { return _C_epptr; } // 27.5.2.3.2, p4 void pbump (int __n) { _C_pptr += __n;  } // 27.5.2.3.2, p58 void setp (char_type *__pbase, char_type *__epptr) {% _C_pbase = _C_pptr = __pbase; _C_epptr = __epptr; } // 27.5.2.4.1, p1. virtual void imbue (const locale &__loc) { _C_locale = __loc; } // 27.5.2.4.2, p1> virtual basic_streambuf* setbuf (char_type*, streamsize) { return this; } // 27.5.2.4.2, p3 virtual pos_type) seekoff (off_type, ios_base::seekdir,A ios_base::openmode = ios_base::in | ios_base::out) {( return pos_type (off_type (-1)); } // 27.5.2.4.2, p5 virtual pos_typeK seekpos (pos_type, ios_base::openmode = ios_base::in | ios_base::out) {( return pos_type (off_type (-1)); } // 27.5.2.4.3, p1% virtual streamsize showmanyc () { return 0; } // 27.5.2.4.3, p48 virtual streamsize xsgetn (char_type *, streamsize); // 27.5.2.4.3, p7# virtual int_type underflow () {# return traits_type::eof (); } // 27.5.2.4.3, p15 virtual int_type uflow (); // 27.5.2.4.5, p3@ virtual int_type overflow (int_type = traits_type::eof ()) {# return traits_type::eof (); } // 27.5.2.4.4, p1A virtual int_type pbackfail (int_type = traits_type::eof ()) {% return traits_type::eof ();  } // 27.5.2.4.5, p1= virtual streamsize xsputn (const char_type*, streamsize); // 27.5.2.4.2, p7 virtual int sync () { return 0; } //- // non-standard convenience functions  //$ // is a read position available?' streamsize _C_read_avail () const {4 return _C_is_in () ? egptr () - gptr () : 0; }% // is a write position available?( streamsize _C_write_avail () const {5 return _C_is_out () ? epptr () - pptr () : 0; }3 // how much space in putback area is available?* streamsize _C_putback_avail () const {F return (_C_is_in () && gptr () != 0) ? gptr () - eback () : 0; } // is buffer in input mode? bool _C_is_in () const {/ return 0 != (_C_iomode & ios_base::in); } // is buffer in output mode? bool _C_is_out () const {1 return 0 != (_C_iomode & ios_base::out); }/ // is buffer in both input and output mode? bool _C_is_inout () const {; return (_C_iomode & (ios_base::in | ios_base::out))1  == (ios_base::in | ios_base::out); } // is character eof?) bool _C_is_eof (int_type __c) const {C return traits_type::eq_int_type (__c, traits_type::eof ()); }( // pointer to end of internal buffer$ char_type* _C_buf_end () const {& return _C_buffer + _C_bufsize; } + // enumerations used in derived classes enum {? _C_allocated = 0x1, // buffer allocated internallyH _C_out_mode = 0x2, // last virtual operation was an output@ _C_unbuf_mode = 0x4 // stream is in unbuffered mode };  bool _C_own_buf () const {1 return 0 != (_C_bufstate & _C_allocated); }" void _C_own_buf (bool __own) { if (__own)( _C_bufstate |= _C_allocated; else) _C_bufstate &= ~_C_allocated; } bool _C_out_last () const {0 return 0 != (_C_bufstate & _C_out_mode); }$ void _C_out_last (bool __last) {  if (__last)' _C_bufstate |= _C_out_mode; else( _C_bufstate &= ~_C_out_mode; }$ bool _C_is_unbuffered () const {2 return 0 != (_C_bufstate & _C_unbuf_mode); }+ void _C_set_unbuffered (bool __unbuf) { if (__unbuf)) _C_bufstate |= _C_unbuf_mode; else* _C_bufstate &= ~_C_unbuf_mode; }A // debug only - asserts that get and put areas are consistent bool _C_is_valid () const;  A ios_base::openmode _C_iomode; // stream buffer's I/O mode9 char_type* _C_buffer; // character bufferE streamsize _C_bufsize; // size of buffer in charactersM int _C_bufstate; // state of buffer (used in subclasses)private:9 char_type *_C_eback; // beginning of input dequence= char_type *_C_gptr; // next position of input sequence3 char_type *_C_egptr; // end of input sequence: char_type *_C_pbase; // beginning of output dequence> char_type *_C_pptr; // next position of output sequence4 char_type *_C_epptr; // end of output sequence: locale _C_locale; // locale imbued in this object};%template;inline _TYPENAME basic_streambuf<_CharT, _Traits>::int_type*basic_streambuf<_CharT, _Traits>::uflow (){! if (_C_is_eof (underflow ()))# return traits_type::eof ();1 return traits_type::to_int_type (*_C_gptr++);}%template;inline _TYPENAME basic_streambuf<_CharT, _Traits>::int_type+basic_streambuf<_CharT, _Traits>::sbumpc (){  if (!_C_read_avail ()) return uflow (); % const char_type __c = *gptr ();  gbump (1); * return traits_type::to_int_type (__c);}%template;inline _TYPENAME basic_streambuf<_CharT, _Traits>::int_type;basic_streambuf<_CharT, _Traits>::sputbackc (char_type __c){F if (_C_putback_avail () && traits_type::eq (gptr ()[-1], __c) ) {  gbump (-1);3 return traits_type::to_int_type (*gptr ()); } 7 return pbackfail (traits_type::to_int_type (__c)); }%template;inline _TYPENAME basic_streambuf<_CharT, _Traits>::int_type7basic_streambuf<_CharT, _Traits>::sputc (char_type __c){ if (_C_write_avail ()) {. traits_type::assign (*_C_pptr++, __c);. return traits_type::to_int_type (__c); }5 return overflow (traits_type::to_int_type (__c));}%template;inline _TYPENAME basic_streambuf<_CharT, _Traits>::int_type,basic_streambuf<_CharT, _Traits>::sungetc (){ if (gptr () > eback ()) { gbump (-1);3 return traits_type::to_int_type (*gptr ()); } return pbackfail ();}%templateinline streamsizeKbasic_streambuf<_CharT, _Traits>::xsgetn (char_type* __buf, streamsize __n){ // number of characters read streamsize __nget = 0; while (__n) {F // save the value returned from underflow() since the function@ // can fill the buffer and still fail, say due to a code // conversion error9 typedef _TYPENAME traits_type::int_type _IntType;N const _IntType __c = gptr () == egptr () ? underflow () : _IntType ();5 // number of characters available in get area0 streamsize __inbuf = egptr () - gptr (); if (0 == __inbuf) break; if (__inbuf > __n) __inbuf = __n;> // copy contents of get area to the destination buffer= traits_type::copy (__buf + __nget, gptr (), __inbuf);K // increment pointers and counts by the number of characters copied2 gbump (_RWSTD_STATIC_CAST (int, __inbuf)); __n -= __inbuf; __nget += __inbuf;& // break out on overflow error@ if (traits_type::eq_int_type (__c, traits_type::eof ())) break; } return __nget;}%templateinline streamsizeAbasic_streambuf<_CharT, _Traits>::xsputn (const char_type* __buf,9 streamsize __n){ streamsize __nput = 0;+ for (; __nput < __n; ++__nput, ++__buf)' if (_C_is_eof (sputc (*__buf))) break;  return __nput;}%template inline locale@basic_streambuf<_CharT, _Traits>::pubimbue (const locale &__loc){ locale __retloc = getloc (); imbue (__loc); return __retloc; }%templateBinline bool basic_streambuf<_CharT, _Traits>::_C_is_valid () const{3 // verify that get and put areas are consistentH return ( eback () && eback () <= gptr () && gptr () <= egptr ()5 || !eback () && !gptr () && !egptr ())H && ( pbase () && pbase () <= pptr () && pptr () <= epptr ()6 || !pbase () && !pptr () && !epptr ());}} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif#endif // __USE_STD_IOSTREAM%#endif // _RWSTD_STREAMBUF_INCLUDEDwwNr7Ԧ// -*- C++ -*-L/*************************************************************************** *J * - definition of the C++ Standard Library basic_string template *+ * $Id: //stdlib/3.0-rel/include/string#4 $ *L *************************************************************************** * > * Copyright 2002 Compaq Information Technologies Group, L.P. *C * Compaq and the Compaq logo are trademarks of Compaq Information@ * Technologies Group, L.P. in th e U.S. and/or other countries. *J * Confidential computer software. Valid license from Compaq required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wav e Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/#ifndef _RWSTD_STRING_INCLUDED#define _RWSTD_STRING_INCLUDED#include #ifdef __USE_STD_IOSTREAM#include #else#include #endif#include !#include !#include #include #include #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) { 5#if !defined (_RWSTD_NO_INLINE_MEMBER_TEMPLATES) \5 && (!defined (_M SC_VER) || _MSC_VER >= 1300) \+ && defined (_RWSTD_NO_MEMBER_TEMPLATES)Xtemplate,std::basic_string<_CharT, _Traits, _Alloc>& ;__rw_replace (std::basic_string<_CharT, _Traits, _Alloc>&, 9 _StringIter, _StringIter, _InputIter, _InputIter);Xtemplate,std::basic_string<_CharT, _Traits, _Alloc>& ?__rw_replace_aux (std::basic_string<_CharT, _Traits, _Alloc>&, 6 _StringIter, _StringIter, _InputIter, _InputIter);>#endif // !NO_INLINE_MEMBER_TEMPLATES && NO_MEMBER_TEMPLATES8template &class basic_string: private _Allocator{public: > typedef _Traits traits_type;= typedef _TYPENAME traits_type::char_type value_type;A typedef _Allocator allocator_type;F typedef _RW::__string_ ref _C_string_ref_type;D typedef _RWSTD_ALLOC_TYPE(allocator_type, value_type)  _C_value_alloc_type;@ typedef _RWSTD_REBIND(allocator_type, _C_string_ref_type)  _C_ref_alloc_type;@ typedef _TYPENAME allocator_type::size_type size_type;F typedef _TYPENAME allocator_type::difference_type difference_type;@ typedef _TYPENAME allocator_type::reference reference;F typedef _TYPENAME allocator_type::const_reference const_reference;> typedef _TYPENAME allocator_type::pointer pointer;D typedef _TYPENAME allocator_type::const_pointer const_pointer;#ifndef _RWSTD_NO_DEBUG_ITERA typedef _RW::__rw_debug_iter  iterator; G typedef _RW::__rw_debug_iter  const_iterator;2 iterator _C_make_iter (const pointer& __ptr) {' return iterator (*this, __ptr); }D const_iterator _C_make_iter (const const_pointer& __ptr) const {- return const_iterator (*this, __ptr); },#else // if defined (_RWSTD_NO_DEBUG_ITER)4 typedef pointer iterator;: typedef const_pointer const_iterator;+ iterator _C_make_iter (pointer __ptr) { return __ptr; }= const_iterator _C_make_iter (const_pointer __ptr) const { return __ptr; } #endif // _RWSTD_NO_DEBUG_ITER%#ifndef _RWSTD_NO_CLASS_PARTIAL_SPEC J typedef _STD::reverse_iterator const_reverse_iterator;D typedef _STD::reverse_iterator reverse_iterator;4#else // if defined (_RWSTD_NO_CLASS_PARTIAL_SPEC)3 typedef _STD::reverse_iterator const_reverse_iterator;- typedef _STD::reverse_iterator reverse_iterator;)#endif // _RWSTD_NO_CLASS_PARTIAL_SPEC *#if !defined (_MSC_VER) || _MSC_VER > 1300; _RWSTD_STATIC_CONST (size_type, npos = size_type (-1));#else1 // working around an MSVC 7.0 bug (PR #26549)D _RWSTD_STATIC_CONST (_RWSTD_SIZE_T, npos = (_RWSTD_SIZE_T)(-1));#endif // MSVC > 7.0 // 21.3.1, p2N _EXPLICIT basic_string (const allocator_type &__alloc = allocator_type ())H : allocator_type (__alloc), _C_data (_C_nullref ()->data ()) { } // lwg issue #42' basic_string (const basic_string&); // 21.3.1, p3D basic_string (const basic_string&, size_type, size_type = npos, = const allocator_type& = allocator_type ()); // 21.3.1, p6, basic_string (const_pointer, size_type, = const allocator_type& = allocator_type ()); // 21.3.1, p9L basic_string (const_pointer, const allocator_type& = allocator_type ()); // 21.3.1, p121 basic_string (size_type __n, value_type __c, D const allocator_type& __alloc = allocator_type ())" : allocator_type (__alloc) { _C_initn (__n, __c); }6#if !defined (_RWSTD_NO_INLINE_MEMBER_TEMPLATES) \0 && (!defined (_MSC_VER) || _MSC_VER >= 1300) // 21.3.1, p15 template 9 basic_string (_InputIter __first, _InputIter __last, D const al locator_type &__alloc = allocator_type ())F : allocator_type (__alloc), _C_data (_C_nullref ()->data ()) {@ replace (_C_make_iter (_C_data), _C_make_iter (_C_data)," __first, __last); }9#else // if defined (_RWSTD_NO_INLINE_MEMBER_TEMPLATES)? basic_string (const_pointer __first, const_pointer __last, D const allocator_type &__alloc = allocator_type ())F : allocator_type (__alloc), _C_data (_C_nullref ()->data ()) {@ replace (_C_make_iter (_C_data), _C_make_iter (_C_data)," __first, __last); }-#endif // _RWSTD_NO_INLINE_MEMBER_TEMPLATES ~basic_string () { _C_unlink (0); } // 21.3.1, p162 basic_string& operator= (const basic_string&); // 21.3.1, p18, basic_string& operator= (const_pointer); // 21.3.1, p20. basic_string& operator= (value_type __c) {7 return replace (size_type (), size (), 1, __c); } iterator begin () { _C_cow ();C _C_pref ()->_C_set_ref_count (0); // disable ref counting& return _C_make_iter (_C_data); }# const_iterator begin () const {& return _C_make_iter (_C_data); } iterator end () {% // disable reference counting" return begin () + size (); }! const_iterator end () const {0 return _C_make_iter (_C_data + size ()); } reverse_iterator rbegin () {) return reverse_iterator (end ()); }, const_reverse_iterator rbegin () const {/ return const_reverse_iterator (end ()); } reverse_iterator rend () {+ return reverse_iterator (begin ()); }* const_reverse_iterator rend () const {1 return const_reverse_iterator (begin ()); } size_type size () const {# return _C_pref ()->size (); } size_type length () const { return size (); }! size_type max_size () const {C return size_type (npos) - sizeof (_C_string_ref_type) - 2U; }( void resize (size_type, value_type);! void resize (size_type __n) {% resize (__n, value_type ());  }! size_type capacity () const {' return _C_pref ()->capacity (); }! void reserve (size_type = 0); void clear () { erase (); } bool empty () const { return size () == 0; }1 const_reference operator[] (size_type) const;+ reference operator[] (size_type);) const_reference at (size_type) const;# reference at (size_type);8 basic_string& operator+= (const basic_string &__s) { return append (__s); }2 basic_string& operator+= (const_pointer __s) { return append (__s); }/ basic_string& operator+= (value_type __c) {+ return append (size_type (1), __c); }E basic_string& append (const basic_string&, size_type, size_type);5 basic_string& append (const basic_string &__str);= basic_string& append (const_pointer __s, size_type __n) {E replace (size (), size_type (), __s, __n, size_type (), __n); return *this; }. basic_string& append (const_pointer __s) {4 return replace (size (), size_type (), __s); }5#if !defined (_RWSTD_NO_INLINE_MEMBER_TEMPLATES) \0 && (!defined (_MSC_VER) || _MSC_VER >= 1300) templateB basic_string& appe nd (_InputIter __first, _InputIter __last) {C // resolves to append (size_type, value_type) if _InputIterG // is any integral type (even not an exact match, such as char)A // the cast to int is necessary to prevent an exact matchF return append (__first, __last, _RWSTD_DISPATCH (_InputIter)); } template@ basic_string& append (_InputIter __first, _InputIter __last,8 _RWSTD_DISPATCH_INT (false)) {9 return replace (_C_make_iter (_C_data + size ()),9 _C_make_iter (_C_data + size ()),0 __first, __last), *this; }8 basic_string& append (size_type __n, value_type __c,7 _RWSTD_DISPATCH_INT (true)) {6 // unnamed arg is used for overload resolution9 return replace (size (), size_type (), __n, __c); }9#else // if defined (_RWSTD_NO_INLINE_MEMBER_TEMPLATES)H basic_string& append (const_pointer __first, const_pointer __last) {B replace (size (), size_type (), __first, __last - __first,1 size_type (), __last - __first); return *this; }+#endif // _RWSTD_NO_INLINE_MEMBER_TEMPLATES: basic_string& append (size_type __n, value_type __c) {9 return replace (size (), size_type (), __n, __c); } // lwg issue 7% void push_back (value_type __c) {$ append (size_type (1), __c); }6 basic_string& assign (const basic_string &__str) { return *this = __str; }E basic_string& assign (const basic_string&, size_type, size_type);= basic_string& assign (const_pointer __s, size_type __n) {E replace (size_type (), size (), __s, __n, size_type (), __n); return *this; }. basic_string& assign (const_pointer __s) { return *this = __s; }5#if !defined (_RWSTD_NO_INLINE_MEMBER_TEMPLATES) \0 && (!defined (_MSC_VER) || _MSC_VER >=  1300) templateB basic_string& assign (_InputIter __first, _InputIter __last) {C // resolves to assign (size_type, value_type) if _InputIterG // is any integral type (even not an exact match, such as char)A // the cast to int is necessary to prevent an exact matchF return assign (__first, __last, _RWSTD_DISPATCH (_InputIter)); } template@ basic_string& assign (_InputIter __first, _InputIter __last,8  _RWSTD_DISPATCH_INT (false)) {6 // unnamed arg is used for overload resolution5 // _RWSTD_COMPILE_ASSERT (sizeof (*__first));/ return replace (_C_make_iter (_C_data),K _C_make_iter (_C_data + size ()), __first, __last); }8 basic_string& assign (size_type __n, value_type __c,7 _RWSTD_DISPATCH_INT (true)) {6 // unnamed arg is used for overload resolution9 return replace (size_type (), size (), __n, __c); }9#else // if defined (_RWSTD_NO_INLINE_MEMBER_TEMPLATES)H basic_string& assign (const_pointer __first, const_pointer __last) {0 replace (size_type (), size (), __first,C __last - __first, size_type (), __last - __first); return *this; },#endif // _RWSTD_NO_INLINE_MEMBER_TEMPLATES: basic_string& assign (size_type __n, value_type __c) {9 return replace (size_type (), size (), __n, __c); }: basic_string& insert (size_type, const basic_string&);9 basic_string& insert (size_type, const basic_string&,0 size_type, size_type);N basic_string& insert (size_type __pos, const_pointer __s, size_type __n) {C replace (__pos, size_type (), __s, __n, size_type (), __n); return *this; }? basic_string& insert (size_type __pos, const_pointer __s) {> return insert (__pos, __s, traits_type::length (__s)); } // 2 1.3.5.4, p106 iterator insert (iterator __pos, value_type __c) {< _RWSTD_ASSERT_RANGE (_C_make_iter (_C_data), __pos);9 size_type __inx = __pos - _C_make_iter (_C_data);9 return insert (__inx, &__c, 1), begin () + __inx; }4#if !defined (_RWSTD_NO_INLINE_MEMBER_TEMPLATE) \0 && (!defined (_MSC_VER) || _MSC_VER >= 1300) templateG void insert (iterator __p, _InputIter __first, _InputIter __last) {? // resolves to insert (i terator, size_type, value_type)G // if _InputIter is any integral type (even not an exact match, // such as char)? // the cast to int is necessary to avoid an exact matchD insert (__p, __first, __last, _RWSTD_DISPATCH (_InputIter)); }O void insert (iterator __p, const_iterator __first, const_iterator __last) {2 iterator __begin = _C_make_iter (_C_data);< iterator __end = _C_make_iter (_C_data + size ());+ _RWSTD_ASSERT_RANGE (__begin, __p);3 if (__first >= __begin && __first <= __end)C insert (__p - __begin, basic_string (__first, __last)); else0 replace (__p, __p, __first, __last); }C void insert (iterator __p, iterator __first, iterator __last) {H insert (__p, const_iterator (__first), const_iterator (__last)); } template E void insert (iterator __p, _InputIter __first, _InputIter __last,/ _RWSTD_DISPATCH_INT (false)) {6 // unnamed arg is used for overload resolution5 // _RWSTD_COMPILE_ASSERT (sizeof (*__first));, replace (__p, __p, __first, __last); }= void insert (iterator __p, size_type __n, value_type __c,. _RWSTD_DISPATCH_INT (true)) {6 // unnamed arg is used for overload resolutionG replace (__p - _C_make_iter (_C_data), size_type (), __n, __c); }9#else // if defined (_RWSTD_NO_INLINE_MEMBER_TEMPLATES)M void insert (iterator __p, const_pointer __first, const_pointer __last) {E replace (__p - _C_make_iter (_C_data), size_type (), __first,C __last - __first, size_type (), __last - __first); },#endif // _RWSTD_NO_INLINE_MEMBER_TEMPLATES @ void insert (iterator __it, size_type __n, value_type __c) {; _RWSTD_ASSERT_RANGE (_C_make_iter (_C_data), __it);H replace (__it - _C_make_iter (_C_data), size_type (), __n, __c); }K basic_string& insert (size_type __pos, size_type __n, value_type __c) {7 return replace (__pos, size_type (), __n, __c); }: basic_string& erase (size_type = 0, size_type = npos);% iterator erase (iterator __it) { ; _RWSTD_ASSERT_RANGE (_C_make_iter (_C_data), __it);9 return replace (__it - _C_make_iter (_C_data), 1,4 const_pointer (0), 0, 0, 0); }8 iterator erase (iterator __first, iterator __last) {> _RWSTD_ASSERT_RANGE (_C_make_iter (_C_data), __first);. _RWSTD_ASSERT_RANGE (__first, __last); K return replace (__first - _C_make_iter (_C_data), __last - __first,4 const_pointer (0), 0, 0, 0); } private: : iterator replace (size_type, size_type, const_pointer,7 size_type, size_type, size_type);; iterator __replace_aux (size_type pos1, size_type __n1,6 const basic_string &__str,/  size_type pos2 = 0,6 size_type __n2 = npos) {M return replace (pos1, __n1, __str.c_str(), __str.size(), pos2, __n2); }6#if !defined (_RWSTD_NO_INLINE_MEMBER_TEMPLATES) \0 && (!defined (_MSC_VER) || _MSC_VER >= 1300)$# ifndef _RWSTD_NO_MEMBER_TEMPLATES templateM basic_string& __replace_aux (iterator, iterator, _InputIter, _InputIter);4# else // if defined (_RWSTD_NO_MEMBER_TEMPLATES)public: template F basic_string& __replace_aux (iterator __first1, iterator __last1, K _InputIter __first2, _InputIter __last2) {N return __rw_replace_aux (*this, __first1, __last1, __first2, __last2); }(# endif // _RWSTD_NO_MEMBER_TEMPLATES-#endif // _RWSTD_NO_INLINE_MEMBER_TEMPLATESpublic:: basic_string& replace (size_type pos1, size_type __n1,3 const basic_string &__s,<  size_type pos2, size_type __n2) {C replace (pos1, __n1, __s.data (), __s.size (), pos2, __n2); return *this; }: basic_string& replace (size_type __pos, size_type __n,5 const basic_string &__s) {D return replace (__pos, __n, __s, size_type (), __s.size ()); }N basic_string& replace (size_type __pos, size_type __n1, const_pointer __s,, size_type __n2) {K return replace ( __pos, __n1, __s, __n2, size_type (), __n2), *this; }O basic_string& replace (size_type __pos, size_type __n, const_pointer __s) {D return replace (__pos, __n, __s, traits_type::length (__s)); }H basic_string& replace (size_type, size_type, size_type, value_type);= basic_string& replace (iterator __first, iterator __last,7 const basic_string &__str) {9 return replace (__first - _C_make_iter (_C_data),1  __last - __first, __str); }= basic_string& replace (iterator __first, iterator __last,> const_pointer __s, size_type __n) {D replace (__first - _C_make_iter (_C_data), __last - __first,. __s, __n, size_type (), __n); return *this;; } basic_string&D replace (iterator __first, iterator __last, const_pointer __s) {H return replace (__first, __last, __s, traits_type::length(__s)); }5#if !defined (_RWSTD_NO_INLINE_MEMBER_TEMPLATES) \0 && (!defined (_MSC_VER) || _MSC_VER >= 1300)$# ifndef _RWSTD_NO_MEMBER_TEMPLATES template@ basic_string& replace (iterator __first1, iterator __last1, C _InputIter __first2, _InputIter __last2,8 _RWSTD_DISPATCH_INT (false));4# else // if defined (_RWSTD_NO_MEMBER_TEMPLATES) template@ basic_string& replace (iterator __first1, iterat or __last1, C _InputIter __first2, _InputIter __last2,9 _RWSTD_DISPATCH_INT (false)) {J return __rw_replace (*this, __first1, __last1, __first2, __last2); }(# endif // _RWSTD_NO_MEMBER_TEMPLATES= basic_string& replace (iterator __first, iterator __last,9 size_type __n, value_type __c,8 _RWSTD_DISPATCH_INT (true)) {6 // unnamed arg is used for overload resolu tionK return replace (__first - _C_make_iter (_C_data), __last - __first," __n, __c); } template? basic_string& replace (iterator __first1, iterator __last1,E _InputIter __first2, _InputIter __last2) {J // resolves to replace (iterator, iterator, size_type, value_type)G // if _InputIter is any integral type (even not an exact match, // Such as char)A // the cast to int is necessary to prevent an exact match= return replace (__first1, __last1, __first2, __last2,6 _RWSTD_DISPATCH (_InputIter)); }9#else // if defined (_RWSTD_NO_INLINE_MEMBER_TEMPLATES); basic_string& replace (iterator first1, iterator last1,G const_pointer first2, const_pointer last2) {A replace (first1 - _C_make_iter (_C_data), last1 - first1,G first2, last2 - first2, size_type (), last2 - first2); return *this; },#endif // _RWSTD_NO_INLINE_MEMBER_TEMPLATES= basic_string& replace (iterator __first, iterator __last,( size_type __n, value_type __c) {6 // unnamed arg is used for overload resolutionK return replace (__first - _C_make_iter (_C_data), __last - __first," __n, __c); }= size_type copy (pointer, size_type, size_type = 0) const;&#ifndef _RWSTD_NO_EXT_DEEP_STRING_COPY basic_string copy () const {9 return basic_string (data (), data () + size ()); })#endif //_RWSTD_NO_EXT_DEEP_STRING_COPY# void swap (basic_string &__s) {7 if (get_allocator () == __s.get_allocator ()) {% pointer __temp = _C_data;" _C_data = __s._C_data;! __s._C_data = __temp; } else {' basic_string __tmp = *this; *this = __s; __s = __tmp; } } // // string operations //" const_pointer c_str () const { return _C_data; }! const_pointer data () const { return _C_data; }* allocator_type get_allocator() const { return *this; } // 21.3.6.1, p1K size_type find (const basic_string &__str, size_type __pos = 0) const {; return find (__str.c_str (), __pos, __str.size ()); } // 21.3.6.1, p4? size_type find (const_pointer, size_type, size_type) const; // 21.3.6.1, p5C size_type find (const_pointer __s, size_type __pos = 0) const {< return find (__s, __pos, traits_type::length (__s)); } // 21.3.6.1, p75 size_type find (value_type, size_type = 0) const; // 21.3.6.2, p1O size_type rfind (const basic_string &__str, size_type __pos = npos) const {< return rfind (__str.c_str (), __pos, __str.size ()); } // 21.3.6.2, p4@ size_type rfind (const_pointer, size_type, size_type) const; // 21.3.6.2, p5G size_type rfind (const_pointer __s, size_type __pos = npos) const {= return rfind (__s, __pos, traits_type::length (__s)); } // 21.3.6.2, p7D size_type rfind (value_type __c, size_type __pos = npos) const {& return rfind (&__c, __pos, 1); }  // 21.3.6.3, p17 size_type find_first_of (const basic_string &__str,9 size_type __pos = 0) const {D return find_first_of (__str.c_str (), __pos, __str.size ()); } // 21.3.6.3, p4H size_type find_first_of (const_pointer, size_type, size_type) const; // 21.3.6.3, p5L size_type find_first_of (const_pointer __s, size_type __pos = 0) const {E return find_first_of (__s, __pos, traits_type::length (__s)); } // 21.3.6.3, p6I size_type find_first_of (value_type __c, size_type __pos = 0) const {! return find (__c, __pos); } // 21.3.6.4, p16 size_type find_last_of (const basic_string &__str,; size_type __pos = npos) const {C return find_last_of (__str.c_str (), __pos, __str.size ()); } // 21.3.6.4, p4G size_type find_last_of (const_pointer, size_type, size_type) const; // 21.3.6.4, p5N size_type find_last_of (const_pointer __s, size_type __pos = npos) const {D return find_last_of (__s, __pos, traits_type::length (__s)); } // 21.3.6.4, p7K size_type find_last_of (value_type __c, size_type __pos = npos) const {" return rfind (__c, __pos); } // 21.3.6.5, p1< size_type find_first_not_of (const basic_string &__str, = size_type __pos = 0) const {H return find_first_not_of (__str.c_str (), __pos, __str.size ()); } // 21.3.6.5, p4L size_type find_first_not_of (const_pointer, size_type, size_type) const; // 21.3.6.5, p54 size_type find_first_not_of (const_pointer __s, =  size_type __pos = 0) const {H return find_first_not_of (__s, __pos, traits_type::length(__s)); } // 21.3.6.5, p7B size_type find_first_not_of (value_type, size_type = 0) const; // 21.3.6.6, p1; size_type find_last_not_of (const basic_string &__str, ? size_type __pos = npos) const {G return find_last_not_of (__str.c_str (), __pos, __str.size ()); } // 21.3.6.6, p4K size_type find_last_not_of (const_pointer, size_type, size_type) const; // 21.3.6.6, p62 size_type find_last_not_of (const_pointer __s,? size_type __pos = npos) const {H return find_last_not_of (__s, __pos, traits_type::length (__s)); } // 21.3.6.6, p7D size_type find_last_not_of (value_type, size_type = npos) const;  // 21.3.6.7@ basic_string substr (size_type = 0, size_type = npos) const;  // 21.3.6.8, p12 int compare (const basic_string &__str) const; // 21.3.6.8, p30 int compare (size_type __pos, size_type __n,3 const basic_string &__str) const {A return compare (__pos, __n, __str.c_str(), __str.size()); } // 21.3.6.8, p4< int compare (size_type, size_type, const basic_string&, , size_type, size_type) const; // 21.3.6.8, p5+ int compare (const_pointer __s) const {N return compare (size_type (), size (), __s, traits_type::length(__s)); }) // 21.3.6.8, p6, see also lwg Issue 5K int compare (size_type __pos, size_type __n, const_pointer __s) const {C return compare(__pos, __n, __s, traits_type::length (__s)); } // lwg Issue 5G int compare (size_type, size_type, const_pointer, size_type) const;6#if !defined (_RWSTD_NO_INLINE_MEMBER_TEMPLATES) \6 && (!defined (_MSC_VER) || _MSC_VER >= 1300) \+ && defined (_RWSTD_NO_MEMBER_TEMPLATES)public:#elseprivate:#endifA void _C_cow () { // Do copy on write as necessary, if (_C_pref ()->_C_ref_count() > 1)  _C_clone (); }H void _C_cow (size_type __nc) { // Do copy on write w/ new capacityB if (_C_pref ()->_C_ref_count () > 1 || capacity () < __nc) _C_clone (__nc); }* void _C_initn (size_type, value_type);* void _C_clone (size_type __nc = npos);+ _C_string_ref_type* _C_pref () const { K return _RWSTD_REINTERPRET_CAST (_C_string_ref_type*, _C_data) - 1;  } void _C_unlink (pointer); M friend struct _RW::__string_ref;+#ifndef _RWSTD_NO_COLLAPSE_TEMPLATE_STATICSD static _RW::__null_ref<_CharT, _Traits, _Allocator> _C_null_ref;H static _RW::__null_ref<_CharT, _Traits, _Allocator>* _C_nullref () { return &_C_null_ref; };#else // if defined (_RWSTD_NO_COLLAPSE_TEMPLATE_STATICS)H static _RW::__null_ref<_CharT, _Traits, _Allocator>* _C_nullref () {F typedef _RW::__null_ref<_CharT, _Traits, _Allocator> _NullRef;C return _RWSTD_REINTERPRET_CAST (_NullRef*, _RW::__nullref); }/#endif // _RWSTD_NO_COLLAPSE_TEMPLATE_STATICS: _C_string_ref_type * _C_getRep (size_type, size_type); pointer _C_data;};Gtypedef basic_string, allocator > string;#ifndef _RWSTD_NO_WCHAR_THtypedef basic_string, allocator >wstring;#endif // _RWSTD_NO_WCHAR_T9template 7inline void basic_string<_CharT, _Traits, _Allocator>::_C_unlink (pointer __ptr){! _RWSTD_ASSERT (0 != _C_data);& if ( _C_nullref () != _C_pref ()/ && ( 0 == _C_pref ()->_C_ref_count ()1 || 0 == _C_pref ()->_C_dec_ref ())) {O // Required to pass same size to deallocate as allocate (see string.cc)L // Also note that we cannot call capacity() after the destroy() call const size_type __size =O capacity () + sizeof (_C_string_ref_type) / sizeof (value_type) + 2;" _C_pref ()->_C_destroy ();7 _C_ref_alloc_type (*this).destroy (_C_pref ());0 _RWSTD_VALUE_ALLOC (_C_value_alloc_type,I deallocate (_RWSTD_REINTERPRET_CAST (pointer,M _C_pref ()),1  __size)); } _C_data = __ptr;}9template 2inline basic_string<_CharT, _Traits, _Allocator>::Cbasic_string (const basic_string<_CharT, _Traits, _Allocator> &__s)+ : allocator_type (__s.get_allocator ()){- if (__s._C_pref()->_C_ref_count () > 0) { _C_data = __s._C_data;! _C_pref()->_C_inc_ref (); } else {# size_type __n = __s.size();1 _C_data = _C_getRep (__n, __n)->data ();7 traits_type::copy (_C_data, __s.c_str (), __n); }}9template 1inline basic_string<_CharT, _Traits, _Allocator>&Bbasic_string<_CharT, _Traits, _Allocator>::erase (size_type __pos,@ size_type __n){& _RWSTD_REQUIRES (__pos <= size (),0 (_RWSTD_ERROR_OUT_OF_RANGE,P _RWSTD_FUNC ("basic_string::erase(size_type, size_type)"),' __pos, size ()));- const value_type __tmp = value_type () ;& size_type __len = size () - __pos;L return replace (__pos, __n < __len ? __n : __len, &__tmp, size_type ());}9template Linline _TYPENAME basic_string<_CharT, _Traits, _Allocator>::const_reference Mbasic_string<_CharT, _Traits, _Allocator>::operator[] (size_type __pos) const{#ifdef _RWSTD_BOUNDS_CHECKING& _RWSTD_REQUIRES (__pos <= size (),0 (_RWSTD_ERROR_OUT_OF_RANGE,O _RWSTD_FUNC ("basic_string::operator[](size_type) const"),& __pos, size ()));"#endif // _RWSTD_BOUNDS_CHECKING' // reference counting still enabled return _C_data [__pos];}9template Einline _TYPENAME basic_string<_CharT, _Traits, _Allocator>::referenceGbasic_string<_CharT, _Traits, _Allocator>::operator[] (size_type __pos){#ifdef _RWSTD_BOUNDS_CHECKING= // 21.3.4, p1 - behavior is undefined if __pos == size ()% _RWSTD_REQUIRES (__pos < size (),0 (_RWSTD_ERROR_OUT_OF_RANGE,I _RWSTD_FUNC ("basic_string::operator[](size_type)"),& __pos, size ()));"#endif // _RWSTD_BOUNDS_CHECKING! // prevent reference counting return begin ()[__pos];}9template Kinline _TYPENAME basic_string<_CharT, _Traits, _Allocator>::const_referenceEbasic_string<_CharT, _Traits, _Allocator>::at (size_type __pos) const{% _RWSTD_REQUIRES (__pos < size (),0 (_RWSTD_ERROR_OUT_OF_RANGE,H _RWSTD_FUNC ("basic_string::at (size_type) const"),& __pos, size ()));' // reference counting still enabled return _C_data [__pos];}9template Einline _TYPENAME basic_string<_CharT, _Traits, _Allocator>::reference?basic_string<_CharT, _Traits, _Allocator>::at (size_type __pos){% _RWSTD_REQUIRES (__pos < size (),0 (_RWSTD_ERROR_OUT_OF_RANGE,B _RWSTD_FUNC ("basic_string::at (size_type)"),& __pos, size ()));! // prevent reference counting return begin ()[__pos];}9template inline void+basic_string<_CharT, _Traits, _Allocator>::&resize (size_type __n, value_type __c){( _RWSTD_REQUIRES (__n <= max_size (),0 (_RWSTD_ERROR_LENGTH_ERROR,E _RWSTD_FUNC ("basic_string::resize(size_type, "F "value_type)"), __n, max_size ())); if (__n < size())# erase (__n, size () - __n); else< replace (size (), size_type (), __n - size (), __c);}9template 7inline void basic_string<_CharT, _Traits, _Allocator>::reserve (size_type __n){( _RWSTD_REQUIRES (__n <= max_size (),0 (_RWSTD_ERROR_LENGTH_ERROR,G _RWSTD_FUNC ("basic_string::reserve(size_type)"),) __n, max_size ())); if (__n > capacity ()) _C_clone (__n);}9template Einline _TYPENAME basic_string<_CharT, _Traits, _Allocator>::size_type+basic_string<_CharT, _Traits, _Allocator>::,find (value_type __c, size_type __pos) const{ if (__pos > size ()) return npos;! const const_pointer __where =B traits_type::find (_C_data + __pos, size () - __pos, __c);/ return __where ? __where - _C_data : npos;}9template Einline _TYPENAME basic_string<_CharT, _Traits, _Allocator>::size_type+basic_string<_CharT, _Traits, _Allocator>::9find_first_not_of (value_type __c, size_type __pos) const{. return find_first_not_of (&__c, __pos, 1);}9template Einline _TYPENAME basic_string<_CharT, _Traits, _Allocator>::size_type+basic_string<_CharT, _Traits, _Allocator>::8find_last_not_of (value_type __c, size_type __pos) const{#if 09 // disabled to work around a bug in several compilers7 const value_type __tmp [] = { __c, value_type () };#else value_type __tmp [2];) traits_type::assign (__tmp [0], __c);3 traits_type::assign (__tmp [1], value_type ());#endif // 0/1+ return find_last_not_of (__tmp, __pos);}8template inline void+basic_string<_CharT, _Traits, _Allocator>::&_C_clone (size_type __nc /* = npos */){# const size_type __len = size();K _C_string_ref_type * __temp = _C_getRep (npos == __nc ? size () : __nc,J __len > __nc ? __nc : __len);8  traits_type::copy (__temp->data(), _C_data, size()); _C_unlink (__temp->data ());}8template inline int+basic_string<_CharT, _Traits, _Allocator>::)compare (const basic_string &__str) const{& const size_type __size1 = size ();, const size_type __size2 = __str.size (); const int __res =5 traits_type::compare (data (), __str.data (),E __size1 < __size2 ? __size1 : __size2);M  return __res ? __res : __size1 < __size2 ? -1 : int (__size1 != __size2);}8template 1inline basic_string<_CharT, _Traits, _Allocator>&Mbasic_string<_CharT, _Traits, _Allocator>::append (const basic_string &__str){4 const size_type __len = size () + __str.size ();? if (__len > capacity () || _C_pref ()->_C_ref_count () > 1); return append (__str, size_type (), __str.size ());L traits_type::copy (_C_data + size (), __str.data (), __str.size () + 1);( _C_pref ()->_C_size._C_size = __len; return *this;}// 21.3.7.1, p19template 0inline basic_string<_CharT, _Traits, _Allocator>Coperator+ (const basic_string<_CharT, _Traits, _Allocator> &__lhs, B const basic_string<_CharT, _Traits, _Allocator> &__rhs){B typedef basic_string<_CharT, _Traits, _Allocator> string_type;> // prevent reference counting while creating a copy of lhsO return string_type (__lhs.data (), __lhs.data () + __lhs.size ()) += __rhs;}// 21.3.7.1, p29template 0inline basic_string<_CharT, _Traits, _Allocator>Coperator+ (const _CharT* __lhs, B const basic_string<_CharT, _Traits, _Allocator>& __rhs){E return basic_string<_CharT, _Traits, _Allocator>(__lhs) += __rhs;}// 21.3.7.1, p49template 0inline basic_string<_CharT, _Traits, _Allocator>Boperator+ (_CharT __lhs,B const basic_string<_CharT, _Traits, _Allocator>& __rhs){H return basic_string<_CharT, _Traits, _Allocator>(1, __lhs) += __rhs;}// 21.3.7.1, p59template 0inline basic_string<_CharT, _Traits, _Allocator>Coperator+ (const basic_string<_CharT, _Traits, _Allocator>& __lhs, B const _CharT* __rhs){B typedef basic_string<_CharT, _Traits, _Allocator> string_type;> // prevent reference counting while creating a copy of lhsO return string_type (__lhs.data (), __lhs.data () + __lhs.size ()) += __rhs;}// 21.3.7.1, p79template 0inline basic_string<_CharT, _Traits, _Allocator>Coperator+ (const basic_string<_CharT, _Traits, _Allocator>& __lhs, B _CharT  __rhs){B typedef basic_string<_CharT, _Traits, _Allocator> string_type;> // prevent reference counting while creating a copy of lhsO return string_type (__lhs.data (), __lhs.data () + __lhs.size ()) += __rhs;}// 21.3.7.2, p19template inline boolDoperator== (const basic_string<_CharT, _Traits, _Allocator>& __lhs, C const basic_string<_CharT, _Traits, _Allocator>& __rhs){;  // avoid using basic_string<>::compare() for efficiency, return __lhs.size () == __rhs.size ()N && !_Traits::compare (__lhs.data (), __rhs.data (), __lhs.size ());}// 21.3.7.2, p29template inline boolDoperator== (const _CharT* __lhs, C const basic_string<_CharT, _Traits, _Allocator>& __rhs){H const _TYPENAME basic_string<_CharT, _Traits, _Allocator>::size_type&  __n = _Traits::length (__lhs);; // avoid using basic_string<>::compare() for efficiency" return __rhs.size () == __n< && !_Traits::compare (__lhs, __rhs.data (), __n);}// 21.3.7.2, p39template inline boolDoperator== (const basic_string<_CharT, _Traits, _Allocator>& __lhs, C const _CharT* __rhs){ return __rhs == __lhs;}// 21.3.7.4, p19template inline boolCoperator< (const basic_string<_CharT, _Traits, _Allocator>& __lhs, B const basic_string<_CharT, _Traits, _Allocator>& __rhs){% return 0 > __lhs.compare (__rhs);}// 21.3.7.4, p29template inline boolCoperator< (const _CharT* __lhs, B const basic_string<_CharT, _Traits, _Allocator>& __rhs){% return 0 < __rhs.compare (__lhs);}// 21.3.7.4, p39template inline boolBoperator< (const basic_string<_CharT, _Traits, _Allocator>& __lhs,B const _CharT* __rhs){% return 0 > __lhs.compare (__rhs);}// 21.3.7.3, p19template inline boolDoperator!= (const basic_string<_CharT, _Traits, _Allocator>& __lhs, C const basic_string<_CharT, _Traits, _Allocator>& __rhs){ return !(__lhs == __rhs);}// 21.3.7.5, p19template inline boolCoperator> (const basic_string<_CharT, _Traits, _Allocator>& __lhs, B const basic_string<_CharT, _Traits, _Allocator>& __rhs){ return __rhs < __lhs;}// 21.3.7.6, p19template inline boolDoperator<= (const basic_string<_CharT, _Traits, _Allocator>& _ _lhs, C const basic_string<_CharT, _Traits, _Allocator>& __rhs){ return !(__rhs < __lhs);}// 21.3.7.7, p19template inline boolDoperator>= (const basic_string<_CharT, _Traits, _Allocator>& __lhs, C const basic_string<_CharT, _Traits, _Allocator>& __rhs){ return !(__lhs < __rhs);}// 21.3.7.8, p1$#ifndef _RWSTD_NO_PART_SPEC_OVERLOAD8template  Binline void swap (basic_string<_CharT, _Traits, _Allocator>& __a, A basic_string<_CharT, _Traits, _Allocator>& __b){ __a.swap (__b);}(#endif // _RWSTD_NO_PART_SPEC_OVERLOAD// 21.3.7.3, p29template inline boolDoperator!= (const _CharT* __lhs, C const basic_string<_CharT, _Traits, _Allocator>& __rhs){ return !(__lhs == __rhs);}// 21.3.7.3, p 39template inline boolDoperator!= (const basic_string<_CharT, _Traits, _Allocator>& __lhs, C const _CharT* __rhs){ return !(__lhs == __rhs);}// 21.3.7.5, p29template inline boolCoperator> (const _CharT* __lhs, B const basic_string<_CharT, _Traits, _Allocator>& __rhs){ return  __rhs < __lhs;}// 21.3.7.5, p39template inline boolCoperator> (const basic_string<_CharT, _Traits, _Allocator>& __lhs, B const _CharT* __rhs){ return __rhs < __lhs;}// 21.3.7.6, p29template inline boolDoperator<= (const _CharT* __lhs, C const basic_string<_CharT, _Traits,  _Allocator>& __rhs){ return !(__rhs < __lhs);}// 21.3.7.6, p39template inline boolDoperator<= (const basic_string<_CharT, _Traits, _Allocator>& __lhs, C const _CharT* __rhs){ return !(__rhs < __lhs);}// 21.3.7.7, p29template inline boolDoperator>= (const _CharT* __lhs, C  const basic_string<_CharT, _Traits, _Allocator>& __rhs){ return !(__lhs < __rhs);}// 21.3.7.7, p39template inline boolDoperator>= (const basic_string<_CharT, _Traits, _Allocator>& __lhs, C const _CharT* __rhs){ return !(__lhs < __rhs);}#ifdef __USE_STD_IOSTREAM<// 21.3.7.9, p3 - declared here, defined inline in 7template&inline basic_ostream<_CharT, _Traits>&,operator<< (basic_ostream<_CharT, _Traits>&,> const basic_string<_CharT, _Traits, _Allocator>&);]#if defined(__DECCXX) && !defined(__DECFIXCXXL1922) && !defined(_RWSTD_NO_IMPLICIT_INCLUSION)7templatebasic_istream<_CharT, _Traits>&)getline (basic_istream<_CharT, _Traits>&,4 basic_string<_CharT, _Traits, _Allocator>&, _CharT);7template'inline basic_istream<_CharT, _Traits>& 9getline (basic_istream<_CharT, _Traits>& __is,: basic_string<_CharT, _Traits, _Allocator>& __str){4 return getline (__is, __str, __is.widen ('\n'));}#endif /* __DECFIXCXXL1922 */#else//2// Inserters and Extractors for pre-ANSI iostreams//8 template istream & operator >> (C istream & is, basic_string & str);8 template ostream& operator << (I ostream & os, const basic_string & str);F template Stream& getline(Stream& is, K basic_string& str, charT delim);F template Stream& getline(Stream& is, = basic_string& str)" { return getline(is,str,'\n'); }#endif // __USE_STD_IOSTREAM} // namespace std_RWSTD_NAMESPACE (__rw) { ##ifndef _RWSTD_NO_FUNC_PARTIAL_SPEC&# ifndef _RWSTD_NO_NONDEDUCED_CONTEXT%# define _RWSTD_STRING_SIZE_TYPE \P _TYPENAME _STD::basic_string<_CharT, _Traits, _Allocator>::size_type# else1# define _RWSTD_STRING_SIZE_TYPE _RWSTD_SIZE_T*# endif // _RWSTD_NO_NONDEDUCED_CONTEXTJ// more specialized version for basic_string <>; may be further specialized7// in user code for example on a user-defined allocator8template inline _RWSTD_STRING_SIZE_TYPE2__rw_new_capacity (_RWSTD_STRING_SIZE_TYPE __size,J const _STD::basic_string<_CharT, _Traits, _Allocator>*){+ typedef _RWSTD_STRING_SIZE_TYPE _SizeT; _SizeT __cap = K _RWSTD_STATIC_CAST (_SizeT, __size * _RWSTD_STRING_CAPACITY_RATIO);O return (__size += _RWSTD_MINIMUM_STRING_CAPACITY) > __cap ? __size : __cap;} 3#else // if defined (_RWSTD_NO_FUNC_PARTIAL_SPEC)&# ifndef _RWSTD_NO_NONDEDUCED_CONTEXT;# define _RWSTD_STRING_SIZE_TYPE(type) type::size_type# else9# define _RWSTD_STRING_SIZE_TYPE(ignore) _RWSTD_SIZE_T*# endif // _RWSTD_NO_NONDEDUCED_CONTEXTM// the following specializations of the __rw_new_capacity<> function templateK// are provided for char and wchar_t; the general case is given in _RWSTD _SPECIALIZED_FUNCTION-inline _RWSTD_STRING_SIZE_TYPE (_STD::string)A__rw_new_capacity (_RWSTD_STRING_SIZE_TYPE (_STD::string) __size,' const _STD::string*){3 _RWSTD_STRING_SIZE_TYPE (_STD::string) __cap = C _RWSTD_STATIC_CAST (_RWSTD_STRING_SIZE_TYPE (_STD::string),C __size * _RWSTD_STRING_CAPACITY_RATIO);O return (__size += _RWSTD_MINIMUM_STRING_CAPACITY) > __cap ? __size : __cap;} _RWSTD_SPECIALIZED _FUNCTION.inline _RWSTD_STRING_SIZE_TYPE (_STD::wstring)B__rw_new_capacity (_RWSTD_STRING_SIZE_TYPE (_STD::wstring) __size,( const _STD::wstring*){4 _RWSTD_STRING_SIZE_TYPE (_STD::wstring) __cap = D _RWSTD_STATIC_CAST (_RWSTD_STRING_SIZE_TYPE (_STD::wstring),C __size * _RWSTD_STRING_CAPACITY_RATIO);P return (__size += _RWSTD_MINIMUM_STRING_CAPACITY) > __cap ? __size : __cap;} '#endif // _RWSTD_NO_FUNC_PARTIAL_SPEC // clean up#undef _RWSTD_STRING_SIZE_TYPE} // namespace __rwE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif)#if _RWSTD_DEFINE_TEMPLATE (BASIC_STRING)# include #endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) { )_RWSTD_INSTANTIATE_3 (class _RWSTD_EXPORTO basic_string, allocator >);#ifndef _RWSTD_NO_WCHAR_T)_RWSTD_INSTANTIATE_3 (class _RWSTD_EXPORTA basic_string,9 allocator >);#endif // _RWSTD_NO_WCHAR_T} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif"#endif // _RWSTD_STRING_INCLUDEDww #^r7ԦL/*************************************************************************** *B * string.cc - Definitions for the Standard Library string classes *. * $Id: //stdlib/3.0-rel/include/string.cc#3 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FA R 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer softw are is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) { .#define _RWSTD_GROW_STRING(what, from, to) \C (_STD::max)(_RWSTD_NEW_CAPACITY (basic_string, what, from), to)*#ifndef _RWSTD_NO_STATIC_CONST_MEMBER_INIT,# if !defined (_MSC_VER) || _MSC_VER > 1300E // MSVC 7.0 allows initializers static const integral data membersF // but out-of-line definitions cause multiply defined symbol errors // (see PR #26562)8template Dconst _TYPENAME basic_string<_CharT, _Traits, _Allocator>::size_type0basic_string<_CharT, _Traits, _Allocator>::npos;# endif // MSVC > 7.0 .#endif // _RWSTD_NO_STATIC_CONST_MEMBER_INIT+#ifndef _RWSTD_NO_COLLAPSE_TEMPLATE_STATICS8template ,_RW::__null_ref<_CharT, _Traits, _Allocator>7basic_string<_CharT, _Traits, _Allocator>::_C_null_ref;/#endif // _RWSTD_NO_COLLAPSE_TEMPLATE_STATICS8template I_TYPENAME basic_string<_CharT, _Traits, _Allocator>::_C_string_ref_type *+basic_string<_CharT, _Traits, _Allocator>::,_C_get !Rep (size_type __cap, size_type __len){* _RWSTD_REQUIRES (__cap <= max_size (),0 (_RWSTD_ERROR_LENGTH_ERROR,H _RWSTD_FUNC ("basic_string::_C_getRep(size_type, "G "size_type)"), __cap, max_size ()));$ _RWSTD_REQUIRES (__len <= __cap,0 (_RWSTD_ERROR_LENGTH_ERROR,H _RWSTD_FUNC ("basic_string::_C_getRep(size_type, "A "size_type)"), __len," __cap)); if (!__cap) { _RWSTD_ASSERT (!__len); return _C_nullref (); }K // allocate, initialize the __string_ref, and initialize each character _C_string_ref_type * __ret =1 _RWSTD_REINTERPRET_CAST (_C_string_ref_type*,4 _RWSTD_VALUE_ALLOC (_C_value_alloc_type,O allocate (__cap + sizeof (_C_string_ref_type) /E sizeof (value_type) + 2)));? // avoid copy cons#truction (mutex isn't copy-constructible)J // _C_ref_alloc_type (*this).construct (__ret, _C_string_ref_type ());& new (__ret) _C_string_ref_type ();"#ifndef _RWSTD_NO_STRING_REF_COUNT' // set initial reference count to 1% __ret->_C_init (1, __cap, __len);2#else // if defined (_RWSTD_NO_STRING_REF_COUNT); // initial reference count is 0 (ref counting disabled)% __ret->_C_init (0, __cap, __len);&#endif // _RWSTD_NO_STRING_REF_COUNTO _RWSTD_VALUE_ALL$OC (_C_value_alloc_type, construct (__ret->data () + __len, value_type ())); return __ret;}8template +basic_string<_CharT, _Traits, _Allocator>::'basic_string (const basic_string &__s, L size_type __pos, size_type __n, const allocator_type& __alloc) : allocator_type (__alloc){* _RWSTD_REQUIRES (__pos <= __s.size (),0 (_RWSTD_ERROR_OUT_OF_RANGE,F _RWSTD_FUNC %("basic_string::basic_string(const "K "basic_string&, size_type, size_type)"),+ __pos, __s.size ()));* size_type __slen = __s.size() - __pos;4 size_type __rlen = __n < __slen ? __n : __slen; . size_type __nlen = __n == npos ? 0 : __n;< size_type __maxlen = __nlen > __rlen ? __nlen : __rlen;  if (__maxlen) M _C_data = _C_getRep (_RWSTD_GROW_STRING (this, size_type (), __maxlen),, __rlen)&->data (); else3 _C_data = _C_getRep(__maxlen,__rlen)->data();< traits_type::copy(_C_data, &__s._C_data[__pos], __rlen);}8template 0void basic_string<_CharT, _Traits, _Allocator>::(_C_initn (size_type __n, value_type __c){( _RWSTD_REQUIRES (__n <= max_size (),0 (_RWSTD_ERROR_LENGTH_ERROR,G _RWSTD_FUNC ("basic_string::_C_initn(size_type, "F "va'lue_type)"), __n, max_size ())); if (__n) _C_data =I _C_getRep (_RWSTD_GROW_STRING (this, size_type (), __n), __n) ->data (); else) _C_data = _C_nullref ()->data (); while (__n--)1 traits_type::assign (_C_data [__n], __c);}8template +basic_string<_CharT, _Traits, _Allocator>::Nbasic_string (const_pointer __s, size_type __n, const allocator_type& __alloc) : alloca (tor_type (__alloc){I // extension: if `s' is 0 then `n' unitialized elements are allocated( _RWSTD_REQUIRES (__n <= max_size (),0 (_RWSTD_ERROR_LENGTH_ERROR,N _RWSTD_FUNC ("basic_string::basic_string(const_pointer,"H "size_type, const allocator_type&)"),) __n, max_size ())); _C_data = __n ?N _C_getRep (_RWSTD_GROW_STRING (this, size_type (), __n), __n)->data () : _C)_nullref ()->data (); if (__s). traits_type::copy (_C_data, __s, __n);}8template +basic_string<_CharT, _Traits, _Allocator>::?basic_string (const_pointer __s, const allocator_type& __alloc) : allocator_type(__alloc){  _RWSTD_ASSERT (__s != 0);4 const size_type __n = traits_type::length (__s); _C_data = __n ?N _C_getRep (_RWSTD_GROW_STRING (this, size_type (), __n), __n)->data () : *_C_nullref ()->data ();* traits_type::copy (_C_data, __s, __n);}8template *basic_string<_CharT, _Traits, _Allocator>&Pbasic_string<_CharT, _Traits, _Allocator>::operator= (const basic_string &__rhs){0 if (__rhs._C_pref ()->_C_ref_count () > 0) {( __rhs._C_pref ()->_C_inc_ref ();" _C_unlink (__rhs._C_data); } else if (this != &__rhs)0 // `rhs' has reference counting disabledF replace (size_+type (), size (), __rhs.data (), __rhs.size ()); return *this;}8template *basic_string<_CharT, _Traits, _Allocator>&Jbasic_string<_CharT, _Traits, _Allocator>::operator= (const_pointer __rhs){ _RWSTD_ASSERT (__rhs != 0);2 size_type __len = traits_type::length (__rhs); if (0 == __len) {/ if (_C_pref ()->_C_ref_count () == 1) {, _C_pref ()->_C_size._C_size = 0;= traits_type::assign (_C_,data [0], value_type ()); } else {/ _C_unlink (_C_nullref ()->data ()); } return *this; }9 return replace (size_type (), size (), __rhs, __len);}8template *basic_string<_CharT, _Traits, _Allocator>&+basic_string<_CharT, _Traits, _Allocator>::Bappend (const basic_string &__str, size_type __pos, size_type __n){, _RWSTD_REQUIRES (__pos <= __str.size (),0 - (_RWSTD_ERROR_OUT_OF_RANGE,N _RWSTD_FUNC ("basic_string::append(const basic_string&,"= " size_type, size_type)"),- __pos, __str.size ()));, size_type __slen = __str.size() - __pos;4 size_type __rlen = __n < __slen ? __n : __slen; 5 _RWSTD_REQUIRES (size () <= max_size () - __rlen,0 (_RWSTD_ERROR_LENGTH_ERROR,N _RWSTD_FUNC ("basic_string::append(const basic_str.ing&,"= " size_type, size_type)"),6 size (), max_size () - __rlen));O replace (size (), size_type (), __str.c_str (), __str.size (), __pos, __n); return *this;}8template *basic_string<_CharT, _Traits, _Allocator>&+basic_string<_CharT, _Traits, _Allocator>::Bassign (const basic_string &__str, size_type __pos, size_type __n){, _RWSTD_REQUIRES (__pos <= __str.size (), /0 (_RWSTD_ERROR_OUT_OF_RANGE,I _RWSTD_FUNC ("basic_string::assign(basic_string&, "< "size_type, size_type)"),- __pos, __str.size ()));, size_type __slen = __str.size() - __pos;4 size_type __rlen = __n < __slen ? __n : __slen; A return replace (size_type (), size (), __str, __pos, __rlen);}8template *basic_string<_CharT, _Traits, _A 0llocator>&+basic_string<_CharT, _Traits, _Allocator>::5insert (size_type __pos1, const basic_string& __str, 2 size_type __pos2, size_type __n){A _RWSTD_REQUIRES (__pos1 <= size() && __pos2 <= __str.size (),0 (_RWSTD_ERROR_OUT_OF_RANGE,K _RWSTD_FUNC ("basic_string::insert(size_type, const "L "basic_string&, size_type, size_type)"), G __pos1 > size() ? __pos1:__pos2, __str.s 1ize ())); - size_type __slen = __str.size() - __pos2;4 size_type __rlen = __n < __slen ? __n : __slen; 5 _RWSTD_REQUIRES (size () <= max_size () - __rlen,0 (_RWSTD_ERROR_LENGTH_ERROR,K _RWSTD_FUNC ("basic_string::insert(size_type, const "L "basic_string&, size_type, size_type)"), 6 size (), max_size () - __rlen));> return replace (__pos1, size_type (), __str, __pos2, __n); 2}8template *basic_string<_CharT, _Traits, _Allocator>&+basic_string<_CharT, _Traits, _Allocator>::4insert (size_type __pos1, const basic_string &__str){' _RWSTD_REQUIRES (__pos1 <= size (),0 (_RWSTD_ERROR_OUT_OF_RANGE,K _RWSTD_FUNC ("basic_string::insert(size_type, const "H "basic_string&)"), __pos1, size ())); 9 _RWSTD_REQUIRES (size() <= max_size() - 3__str.size(),0 (_RWSTD_ERROR_LENGTH_ERROR,E _RWSTD_FUNC ("basic_string::insert(size_type, "; "const basic_string&)"),= size (), max_size () - __str.size ()));1 return replace (__pos1, size_type (), __str);}8template >_TYPENAME basic_string<_CharT, _Traits, _Allocator>::iterator 9/* private */ basic_string<_CharT, _Traits, _Allocator>:: 4?replace (size_type __pos1, size_type __n1, const_pointer __cs, = size_type __cslen, size_type __pos2, size_type __n2){< _RWSTD_REQUIRES (__pos1 <= size () && __pos2 <= __cslen,1 (_RWSTD_ERROR_OUT_OF_RANGE, P _RWSTD_FUNC ("basic_string::replace(size_type, size_type,"K " const_pointer, size_type, size_type, "2 "size_type)"), 8 __pos1 > size() ? __po 5s1 : __pos2,> size () > __cslen ? size () : __cslen));% // number of characters to delete; const size_type __xlen = (min)(__n1, size () - __pos1);% // number of characters to insert; const size_type __rlen = (min)(__n2, __cslen - __pos2);> _RWSTD_REQUIRES (size () - __xlen <= max_size () - __rlen,0 (_RWSTD_ERROR_LENGTH_ERROR,P _RWSTD_FUNC ("basic_string::replace(size_type, size_type,"K 6 " const_pointer, size_type, size_type, "2 "size_type)"), > size () - __xlen, max_size() - __rlen));N const size_type __len = size () - __xlen + __rlen; // final string length if (!__len) {D // Special case a substitution that leaves the string empty.+ _C_unlink (_C_nullref ()->data ()); } else {) // Length of bit at end of string: const size_type __rem = size () - __xlen - 7 __pos1;C // Check for shared representation, insufficient capacity,  // or overlap copy.- if ( _C_pref()->_C_ref_count () > 1" || capacity () < __lenE || __cs && __cs >= data () && __cs < data () + size ()) {0 // Need to allocate a new reference.N const size_type __cap = _RWSTD_GROW_STRING (this, size (), __len);C _C_string_ref_type * __temp = _C_getRep (__cap, __len); if (__pos1)E 8 traits_type::copy (__temp->data (), _C_data, __pos1); if (__rlen); traits_type::copy (__temp->data() + __pos1,: __cs + __pos2, __rlen); if (__rem)D traits_type::copy (__temp->data() + __pos1 + __rlen,C _C_data + __pos1 + __n1, __rem);( _C_unlink (__temp->data ()); } else {1 // Current reference has enough room. 9 if (__rem)= traits_type::move (_C_data + __pos1 + __rlen,C _C_data + __pos1 + __n1, __rem); if (__rlen)L traits_type::move (_C_data + __pos1, __cs + __pos2, __rlen);N traits_type::assign (_C_data [_C_pref()->_C_size._C_size = __len],0 value_type ()); } }+ return _C_make_iter (_C_data + __pos1);}8template *basic_string<_CharT, _Traits, _Allocator>&+basic_string<_CharT, _Traits, _Allocator>::Hreplace (size_type __pos, size_type __n, size_type __n2, value_type __c){& _RWSTD_REQUIRES (__pos <= size (),1 (_RWSTD_ERROR_OUT_OF_RANGE, F _RWSTD_FUNC ("basic_string::replace(size_type, "H "size_type, size_type, value_type)"),' __pos, size ())); & size_type __slen = size() - __pos; ;4 size_type __xlen = __n < __slen ? __n : __slen; : _RWSTD_REQUIRES (size() - __xlen < max_size () - __n2,0 (_RWSTD_ERROR_LENGTH_ERROR,F _RWSTD_FUNC ("basic_string::replace(size_type, "I "size_type, size_type, value_type)"), = size () - __xlen, max_size () - __n2)); F size_type __len = size() - __xlen + __n2; // Final string length. if (!__len) {D // Special case a <substitution that leaves the string empty.+ _C_unlink (_C_nullref ()->data ()); } else {M size_type __rem = size () - __xlen - __pos; // length of bit at the endA // Check for shared representation, insufficient capacity, E if ( (_C_pref()->_C_ref_count() > 1) || (capacity() < __len)) {. // Need to allocate a new reference.L const size_type __cap = _RWSTD_GROW_STRING (this, size (), __len);A _C_string_ref_type * __temp = _C_getRe =p (__cap, __len);G if (__pos) traits_type::copy(__temp->data(), _C_data, __pos);I if (__n2) traits_type::assign(__temp->data()+__pos, __n2, __c); if (__rem)@ traits_type::copy (__temp->data () + __pos + __n2,? _C_data + __pos + __n, __rem);& _C_unlink (__temp->data ()); } else {- // Current reference has enough room. if (__rem) L traits_type::move(_C_data+__>pos+__n2, _C_data+__pos+__n, __rem); if (__n2): traits_type::assign(_C_data+__pos, __n2, __c);J traits_type::assign (_C_data [_C_pref()->_C_size._C_size = __len],, value_type ()); } } return *this;}2#if !defined (_RWSTD_NO_INLINE_MEMBER_TEMPLATES) \1 && (!defined (_MSC_VER) || _MSC_VER >= 1300) ## ifdef _RWSTD_NO_MEMBER_TEMPLATESXtemplate,std::basic_string<_CharT, _Traits, _Alloc>& ?__rw_replace (std::basic_string<_CharT, _Traits, _Alloc> &__s, 8 _StringIter __first1, _StringIter __last1,8 _InputIter __first2, _InputIter __last2) {> typedef _Traits traits_type;= typedef _TYPENAME traits_type::char_type value_type;A typedef _Alloc allocator_type;< typedef _TYPENAME allocator_type::size_type size_type;F @ typedef _RW::__string_ref _C_string_ref_type;2# else // !defined (_RWSTD_NO_MEMBER_TEMPLATES)7templatetemplate+basic_string<_CharT, _Traits, _Allocator>& +basic_string<_CharT, _Traits, _Allocator>::-replace (iterator __first1, iterator __last1,N _InputIter __first2, _InputIter __last2, _RWSTD_DISPATCH_INT (false)){ basic_string &__s = *this;(# endif A // _RWSTD_NO_MEMBER_TEMPLATESQ _RWSTD_ASSERT_RANGE (__first1, __s._C_make_iter (__s._C_data + __s.size ()));, _RWSTD_ASSERT_RANGE (__first1, __last1);, _RWSTD_ASSERT_RANGE (__first2, __last2);5 // use a (probably) faster algorithm if possibleO if (std::__is_bidirectional_iterator(_RWSTD_ITERATOR_CATEGORY (_InputIter,M __last2)))I return __s.__replace_aux (__first1, __last1, __first2, __last2); B; for ( ; __first2 != __last2; ++__first1, ++__first2) {E size_type __off = __first1 - __s._C_make_iter (__s._C_data);2 _RWSTD_REQUIRES (__off <= __s.max_size(),5 (_RWSTD_ERROR_LENGTH_ERROR,J _RWSTD_FUNC ("basic_string::replace(iterator, "C "iterator, InputIterator, ": "InputIterator)"),E __first1 - __s._C_make_itCer (__s._C_data),- __s.max_size ())); * // extend the string if necessary# if (__first1 == __last1) {. // compute the size of new buffer$ const size_type __cap =F _RWSTD_GROW_STRING (&__s, __s.size (), size_type ());; const size_type __delta = __cap - __s.size ();% // allocate a new bufferF _C_string_ref_type *__tmp = __s._C_getRep (__cap, __cap);G D // copy data from old to new, leaving a hole for additionsD traits_type::copy (__tmp->data (), __s._C_data, __off);A traits_type::copy (__tmp->data () + __off + __delta,4 __s._C_data + __off,M __s._C_make_iter (__s._C_data + __s.size ()) + - __last1);, __s._C_unlink (__tmp->data ());? __first1 = __s._C_make_iter (__s._C_data + __off);+ E __last1 = __first1 + __delta; } // copy data over4 traits_type::assign (*__first1, *__first2); } if (__first1 != __last1)A __s.replace (__first1 - __s._C_make_iter (__s._C_data), ) __last1 - __first1,3 size_type (), value_type ()); return __s;}B// Special function for random access and bi-directional iterators1// Avoids the possibility of multiple allocations7// We still have t Fo copy characters over one at a time.!#ifdef _RWSTD_NO_MEMBER_TEMPLATESXtemplate,std::basic_string<_CharT, _Traits, _Alloc>& C__rw_replace_aux (std::basic_string<_CharT, _Traits, _Alloc> &__s, < _StringIter __first1, _StringIter __last1,: _InputIter __first2, _InputIter __last2){B typedef _Traits traits_type;A typedef _TYPENAME traiGts_type::char_type value_type;E typedef _Alloc allocator_type;@ typedef _TYPENAME allocator_type::size_type size_type;F typedef _TYPENAME allocator_type::difference_type difference_type;F typedef _RW::__string_ref _C_string_ref_type;# else7templatetemplate+basic_string<_CharT, _Traits, _Allocator>& +basic_stHring<_CharT, _Traits, _Allocator>::4__replace_aux (iterator __first1, iterator __last1, 7 _InputIter __first2, _InputIter __last2){ basic_string &__s = *this;'# endif // _RWSTD_NO_MEMBER_TEMPLATESA _RWSTD_ASSERT_RANGE (__first1, __s._C_make_iter (__s._C_data E + __s.size ()));, _RWSTD_ASSERT_RANGE (__first1, __last1);, _RWSTD_ASSERT_RANGE (__first2, __last2);K difference_type __n2 = _DISTANCE (__f Iirst2, __last2, difference_type);/ size_type __n = __last1 - __first1;F size_type __pos = __first1 - __s._C_make_iter (__s._C_data);* _RWSTD_REQUIRES (__pos <= __s.size (),0 (_RWSTD_ERROR_OUT_OF_RANGE,K _RWSTD_FUNC ("basic_string::__replace_aux(iterator, "N "iterator, InputIterator, InputIterator)"),+ __pos, __s.size ()));* size_type __slen = __s.size() - __pos;4 J size_type __xlen = __n < __slen ? __n : __slen; B _RWSTD_REQUIRES (__s.size () - __xlen < __s.max_size() - __n2,1 (_RWSTD_ERROR_LENGTH_ERROR, K _RWSTD_FUNC ("basic_string::__replace_aux(iterator, "N "iterator, InputIterator, InputIterator)"),E __s.size () - __xlen, __s.max_size () - __n2));J size_type __len = __s.size() - __xlen + __n2; // Final string length. if (!__len) {D K // Special case a substitution that leaves the string empty.3 __s._C_unlink (__s._C_nullref ()->data ()); } else { size_type __d = 0;P size_type __rem = __s.size() - __xlen - __pos; // length of bit at the endA // Check for shared representation, insufficient capacity, L if ( (__s._C_pref()->_C_ref_count () > 1) || (__s.capacity() < __len)) {, // Need to allocate a new reference.! const size_type __cap =< _RWS LTD_GROW_STRING (&__s, __s.size (), __len);C _C_string_ref_type * __temp = __s._C_getRep (__cap, __len);I if (__pos) traits_type::copy(__temp->data(), __s._C_data, __pos);3 for (__d = 0; __d < (size_type)__n2; __d++)K traits_type::assign (*(__temp->data()+__pos+__d), *__first2++); if (__rem)> traits_type::copy (__temp->data () + __pos + __n2,A __s._C_data + __pos + __n, __rem);( __s._C_unlink (__temp- M>data ()); } else {- // Current reference has enough room. if (__rem) K traits_type::move(__s._C_data+__pos+__n2, __s._C_data+__pos+__n, # __rem);3 for (__d = 0; __d < (size_type)__n2; __d++)H traits_type::assign (*(__s._C_data+__pos+__d), *__first2++);H traits_type::assign (__s._C_data[__s._C_pref()->_C_size._C_size A = __len], value_type()); N} } return __s;},#endif //_RWSTD_NO_INLINE_MEMBER_TEMPLATES8template >_TYPENAME basic_string<_CharT, _Traits, _Allocator>::size_type+basic_string<_CharT, _Traits, _Allocator>::8copy (pointer __s, size_type __n, size_type __pos) const{% _RWSTD_REQUIRES (__pos <= size(),1 (_RWSTD_ERROR_OUT_OF_RANGE, L _RWSTD_FUNC ("basic_string::copy(pointer, size_type, "C O "size_type)"), __pos, size ()));- const size_type __slen = size () - __pos;9 const size_type __rlen = __n < __slen ? __n : __slen;5 traits_type::copy (__s, _C_data + __pos, __rlen); return __rlen;}8template >_TYPENAME basic_string<_CharT, _Traits, _Allocator>::size_type+basic_string<_CharT, _Traits, _Allocator>::>find (const_pointer __s, size_type __pos, size_type __n) const{ _RWSTD_ASSERT (__sP != 0);( _RWSTD_REQUIRES (__n <= max_size (),1 (_RWSTD_ERROR_LENGTH_ERROR, G _RWSTD_FUNC ("basic_string::find(const_pointer, "B "size_type, size_type) const"),) __n, max_size ()));G for (size_type __xpos = __pos; __xpos + __n <= size (); ++__xpos) {? if (!traits_type::compare (_C_data + __xpos, __s, __n)) return __xpos; } return npos;}8template Q >_TYPENAME basic_string<_CharT, _Traits, _Allocator>::size_type+basic_string<_CharT, _Traits, _Allocator>::@rfind (const_pointer __s, size_type __pos, size_type __n) const{ _RWSTD_ASSERT(__s != 0);( _RWSTD_REQUIRES (__n <= max_size (),1 (_RWSTD_ERROR_LENGTH_ERROR, H _RWSTD_FUNC ("basic_string::rfind(const_pointer, "B "size_type, size_type) const"),) R __n, max_size ())); if (size() < __n) return npos; # size_type __slen = size() -__n;> size_type __xpos_start = __slen < __pos ? __slen : __pos; C for (size_type __xpos = __xpos_start+1; __xpos != 0 ; __xpos--) {< if (!traits_type::compare(_C_data+__xpos-1, __s, __n)) return __xpos-1; } return npos;}8template >_TYPENAME basic_string<_CharT, _Traits, _Allocator>::s Size_type+basic_string<_CharT, _Traits, _Allocator>::Gfind_first_of (const_pointer __s, size_type __pos, size_type __n) const{ _RWSTD_ASSERT(__s != 0);( _RWSTD_REQUIRES (__n <= max_size (),0 (_RWSTD_ERROR_LENGTH_ERROR,P _RWSTD_FUNC ("basic_string::find_first_of(const_pointer, "B "size_type, size_type) const"),) __n, max_size ()));> for (size_type __xpos = __pos; __xpos < size() ;T __xpos++) {0 for (size_type __i = 0; __i < __n ; __i++)7 if (traits_type::eq(_C_data[__xpos], __s[__i])) return __xpos; } return npos;}8template >_TYPENAME basic_string<_CharT, _Traits, _Allocator>::size_type+basic_string<_CharT, _Traits, _Allocator>::Ffind_last_of (const_pointer __s, size_type __pos, size_type __n) const{ _RWSTD_ASSERT(__s != 0);( _RWSTD_REQUIRES (__n <= max_size (), U1 (_RWSTD_ERROR_LENGTH_ERROR, O _RWSTD_FUNC ("basic_string::find_last_of(const_pointer, "B "size_type, size_type) const"),) __n, max_size ())); if (size()) {# size_type __slen = size() -1;@ size_type __xpos_start = __pos < __slen ? __pos : __slen; E for (size_type __xpos = __xpos_start+1; __xpos != 0 ; __xpos--) {1 for(size_type __i = 0; __i < __n ; _V_i++); if (traits_type::eq(_C_data[__xpos-1], __s[__i])) return __xpos-1; }  } return npos;}8template >_TYPENAME basic_string<_CharT, _Traits, _Allocator>::size_type+basic_string<_CharT, _Traits, _Allocator>::Kfind_first_not_of (const_pointer __s, size_type __pos, size_type __n) const{ _RWSTD_ASSERT(__s != 0);( _RWSTD_REQUIRES (__n <= max_size (),1 (_RWSTD_ERROR_LENWGTH_ERROR, E _RWSTD_FUNC ("basic_string::find_first_not_of("P "const_pointer, size_type, size_type) const"),) __n, max_size ()));> for (size_type __xpos = __pos; __xpos < size() ; __xpos++) { bool __found = false;0 for (size_type __i = 0; __i < __n ; __i++) {7 if (traits_type::eq(_C_data[__xpos], __s[__i])) { __found = true; break; } X } if (!__found) return __xpos; } return npos;}8template >_TYPENAME basic_string<_CharT, _Traits, _Allocator>::size_type+basic_string<_CharT, _Traits, _Allocator>::Ifind_last_not_of(const_pointer __s, size_type __pos, size_type __n) const{ _RWSTD_ASSERT(__s != 0);( _RWSTD_REQUIRES (__n <= max_size (),1 (_RWSTD_ERROR_LENGTH_ERROR, D _RWSTD_FUNC ("basic_Ystring::find_last_not_of("P "const_pointer, size_type, size_type) const"),) __n, max_size ()));  if (size()) {# size_type __slen = size() -1;@ size_type __xpos_start = __pos < __slen ? __pos : __slen; E for (size_type __xpos = __xpos_start+1; __xpos != 0 ; __xpos--) { bool __found = false;2 for (size_type __i = 0; __i < __n ; __i++) {; if (traits_type::eq(_C_data[Z__xpos-1], __s[__i])) { __found = true; break; } } if (!__found) return __xpos-1; } } return npos;}8template )basic_string<_CharT, _Traits, _Allocator>+basic_string<_CharT, _Traits, _Allocator>::-substr (size_type __pos, size_type __n) const{& _RWSTD_REQUIRES (__pos <= size (),1 (_RWSTD_ERROR_OUT_OF_RANGE, P [ _RWSTD_FUNC ("basic_string::substr(size_type, size_type) "> "const"), __pos, size ()));% size_type __slen = size() -__pos;3 size_type __rlen = __n < __slen ? __n : __slen;2 return basic_string (_C_data + __pos, __rlen);}8template /int basic_string<_CharT, _Traits, _Allocator>::+compare (size_type __pos1, size_type __n1, $ const basic_string& __str, 0 size_ \type __pos2, size_type __n2) const{- _RWSTD_REQUIRES (__pos2 <= __str.size (),1 (_RWSTD_ERROR_OUT_OF_RANGE, P _RWSTD_FUNC ("basic_string::compare(size_type, size_type,"P "const basic_string&, size_type, size_type) "E "const"), __pos2, __str.size ()));%// "reduce" __n2 if necessary, whereP// "reduce" := Ensure __pos2+__n2 < __str.size() so we can call a function that3// ] doesn't check this same inequality.$ if(__str.size() - __pos2 < __n2)# __n2 = __str.size() - __pos2;=// compare(size_type, size_type, char*, size_type) will both:// (i) check pos1 to make sure it's less than size() and#// (ii) "reduce" __n1 if necessary= return compare(__pos1, __n1, __str.c_str()+__pos2, __n2);}8template /int basic_string<_CharT, _Traits, _Allocator>::)compare (size_type __pos, size_typ ^e __n1,1 const_pointer __s, size_type __n2) const{& _RWSTD_REQUIRES (__pos <= size (),1 (_RWSTD_ERROR_OUT_OF_RANGE, P _RWSTD_FUNC ("basic_string::compare(size_type, size_type,"M " const const_pointer, size_type) const"),' __pos, size ())); if(size() - __pos < __n1) __n1 = size() - __pos;2 size_type __rlen = __n1 < __n2 ? __n1 : __n2; @ int __res = traits_type:_:compare(_C_data+__pos,__s, __rlen); if (__res == 0)2 __res = (__n1 < __n2) ? -1 : (__n1 != __n2); return __res;}#ifndef __USE_STD_IOSTREAM//2// Inserters and Extractors for pre-ANSI iostreams//6 template% istream & operator>> (istream & is,D basic_string & s) { int c; if (!is.ipfx()) return is; s.erase();3#if defined(__DECCXX) && !`defined(__DECFIXCXXL1300) c = is.rdbuf()->sgetc();#else c = is.rdbuf()->sbumpc();#endif+ _TYPENAME Allocator::size_type i = 0;6 _TYPENAME Allocator::size_type end = s.max_size(); if (is.width())7 end = (int)end < is.width() ? end : is.width(); # while (c != EOF && !isspace(c)) {3#if defined(__DECCXX) && !defined(__DECFIXCXXL1300) is.rdbuf()->sbumpc();#endif s.append(1,(charT)c); i++; if (i == end) a break;3#if defined(__DECCXX) && !defined(__DECFIXCXXL1300) c = is.rdbuf()->sgetc();#else c = is.rdbuf()->sbumpc();#endif } if (c == EOF) 1 is.clear(ios::eofbit | is.rdstate()); if (!i)2 is.clear(ios::failbit | is.rdstate());  is.width(0); return is; }6 template% ostream & operator<< (ostream & os,J const basic_string & s) { os << s.data(); return os; }D template Stream&P getline (Stream& is, basic_string& str, charT delim) { int c;  if (!is.ipfx(1)) return is; str.erase(); c = is.rdbuf()->sbumpc();) _TYPENAME Allocator::size_type i = 0;8 _TYPENAME Allocator::size_type end = str.max_size(); while (c != EOF) { i++; if ((charT)cc == delim) break; if (i == end) {4 is.clear(ios::failbit | is.rdstate());  break; }  str.append(1,(charT)c); c = is.rdbuf()->sbumpc(); } if (c == EOF) 1 is.clear(ios::eofbit | is.rdstate()); if (!i)2 is.clear(ios::failbit | is.rdstate());  is.isfx(); return is; } _#elif defined(__DECCXX) && !defined(__DECFIXCXXL1922) && !defined(_RWSTD_NO_IMPLICIT_INCLUSION)7dtemplatebasic_istream<_CharT, _Traits>&:getline (basic_istream<_CharT, _Traits>& __is, ; basic_string<_CharT, _Traits, _Allocator>& __str, < _CharT __delim){' _RWSTD_ASSERT (0 != __is.rdbuf ());: const _TYPENAME basic_istream<_CharT, _Traits>::sentry+ __ipfx (__is, true /* noskipws */); if (__ipfx) { ' int __err = _RWSTD_IOS_FAILBIT; e_TRY { __str.erase ();I // FIXME: code commented out to work around an HP aCC 3.14.10 // bug #JAGac86264 // typedef _TYPENAMEG // basic_string<_CharT, _Traits, _Allocator>::size_typeJ for (_RWSTD_SIZE_T __i = 0; __str.max_size () != __i; ++__i) {7 const _TYPENAME _Traits::int_type __c =- __is.rdbuf ()->sbumpc ();B if (_Traits::eq_int_type (__c, _Traits::eoff ())) {# // 21.3.7.9, p7/ __err = _RWSTD_IOS_EOFBITN | (__i ? _RWSTD_IOS_GOODBIT : _RWSTD_IOS_FAILBIT); break; }I if (_Traits::eq (_Traits::to_char_type (__c), __delim)) {/ __err = _RWSTD_IOS_GOODBIT; break; }> __str.push_back (_Traits::to_char_type (__c)); } } _CgATCH (...) {D if (__is.setstate (_RWSTD_IOS_BADBIT, 0 /* no throw */)) _RETHROW; } if (__err)" __is.setstate (__err); } return __is;} #endif // __USE_STD_IOSTREAM} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endifwwi qr7Ԧ#ifndef __STRING_HXX#define __STRING_HXX//// B// Copyright 2003, 2004 Hewlett-Packard Development Company, L.P.//F// Confidential computer software. Valid license from HP required forF// possession, use or copying. Consistent with FAR 12.211 and 12.212,F// Commercial Computer Software, Computer Software Documentation, andK// Technical Data for Commercial Items are licensed to the U.S. Government/// under vendor's standard commercial license.//////j++#// FACILITY: DEC C++ Class Library//"// SUBSYSTEM: The String package.//0// MODULE: Include file for the String package.//// MODULE DESCRIPTION://@// This module implements the basic character string operations.//// DESIGN ISSUES://N// The interface of this String package is based on the documentation forN// AT&T C++ Standard Library Extension Release 1.0 and the examples foundD// in the following books: "The C++ Programming Language" by BjarneH// Stroustru"kp, "The C++ Answer Book" by Tony L. Hansen, and "C++ Primer"// by Stanley B. Lippman.////--//++// INCLUDE FILES//--#include #include #ifdef _NT#include #else#include #endif extern "C"{#include }#pragma __environment save)#pragma __environment cxx_header_defaults//++ // LINKAGE//--'#if defined(__VMS) && defined(__DECCXX)*# pragma __extern_model __relaxed_refdef4# lpragma __extern_prefix __CXXL_PLAIN_FUNC_LINKAGE# if defined __VAX## pragma __nomember_alignment# else!# pragma __member_alignment # endif#endif//++// EXTERNAL DATA//---// extern Objection_action cxxl_String_error; class String//++// CLASS DESCRIPTION://F// A String is a sequence of characters of type char. The sequence ofB// characters is stored as a null-terminated array (ASCIZ format).G// Therefore, a String may NOT contain a null charmacter. More than oneD// String may share the same data (string representation structure).B// Garbage collection is done with a reference count in the string// representation.//--{private:1 struct cxxl_srep // String's representation {+ char *cxxl_s; // Pointer to the data& int cxxl_n; // Reference count };; cxxl_srep *cxxl_p; // Pointer to String representationpublic: String(); String(const String &); String(const char *); Strinng(const char &); ~String(); // Objections% // static Objection memory_error; // Assignments' String &operator=(const String &);% String &operator=(const char *); // Conversions;#if defined(__DEC_STRING_COMPATIBILITY) && !defined(__ia64)$ inline operator char *() const;#endif* inline operator const char *() const; // OperatorsA friend inline ostream &operator<<(ostream &, const String &);5 friend istream &operator>>(istream &, S otring &);B friend inline int operator==(const String &, const String &);@ friend inline int operator==(const String &, const char *);@ friend inline int operator==(const char *, const String &);> friend inline int operator==(const String & s, char * cp), { return operator==(s, (const char*) cp); }> friend inline int operator==(char * cp, const String & s), { return operator==((const char*) cp, s); }B friend inline int operator!=(const String &, const String &);@ fr piend inline int operator!=(const String &, const char *);@ friend inline int operator!=(const char *, const String &);> friend inline int operator!=(const String & s, char * cp), { return operator!=(s, (const char*) cp); }> friend inline int operator!=(char * cp, const String & s), { return operator!=((const char*) cp, s); }A friend inline int operator<(const String &, const String &);? friend inline int operator<(const String &, const char *);? friend inline int ope qrator<(const char *, const String &);= friend inline int operator<(const String & s, char * cp)+ { return operator<(s, (const char*) cp); }= friend inline int operator<(char * cp, const String & s)+ { return operator<((const char*) cp, s); }A friend inline int operator>(const String &, const String &);? friend inline int operator>(const String &, const char *);? friend inline int operator>(const char *, const String &);= friend inline int operator>(const String r& s, char * cp)+ { return operator>(s, (const char*) cp); }= friend inline int operator>(char * cp, const String & s)+ { return operator>((const char*) cp, s); }B friend inline int operator<=(const String &, const String &);@ friend inline int operator<=(const String &, const char *);@ friend inline int operator<=(const char *, const String &);> friend inline int operator<=(const String & s, char * cp), { return operator<=(s, (const char*) cp); }> friend inline int s operator<=(char * cp, const String & s), { return operator<=((const char*) cp, s); }B friend inline int operator>=(const String &, const String &);@ friend inline int operator>=(const String &, const char *);@ friend inline int operator>=(const char *, const String &);> friend inline int operator>=(const String & s, char * cp), { return operator>=(s, (const char*) cp); }> friend inline int operator>=(char * cp, const String & s), { return operator>=((const char*) cp, s); } t= friend String operator+(const String &, const String &);; friend String operator+(const String &, const char *);; friend String operator+(const char *, const String &);) String &operator+=(const String &);' String &operator+=(const char *);" String operator()(int, int);( String operator()(int, int) const;( inline char operator[](int) const;# inline char &operator[](int);" // Additional member functions' inline unsigned int length() cuonst; String upper() const; String lower() const;& int match(const String &) const;& int index(const String &) const;E// The following functions are obsolete and only provided for binaryH// compatibility with the previous iostream implementation on DEC OSF/1// and OpenVMS for VAXE#if defined(__CXXL_STRING_CXX) && defined(__osf__) || defined (__VAX) String &operator+=(char *); String upper(); String lower(); int match(const String &); vint index(const String &);#endif5 friend String operator+(const String &, char *);5 friend String operator+(char *, const String &);}; ;#if defined(__DEC_STRING_COMPATIBILITY) && !defined(__ia64)inline String::operator char *( ) const//++// FUNCTIONAL DESCRIPTION://7// This is a conversion operator from String to char *.//// RETURN VALUE://L// The char * representation of the String, as internally stored in the1// cxxl_s part of its cxxl_p pwrivate data member.//--{ return cxxl_p->cxxl_s;}#endif %inline String::operator const char *( ) const//++// FUNCTIONAL DESCRIPTION://=// This is a conversion operator from String to const char *.//// RETURN VALUE://L// The char * representation of the String, as internally stored in the1// cxxl_s part of its cxxl_p private data member.//--{* return (const char *)(cxxl_p->cxxl_s);} inline ostream &operator<<(6 ostream &osx, // Reference to the ostream object.9 const String &str // Reference to the String object. )//++// FUNCTIONAL DESCRIPTION://J// This is the output operator, inserting the contents of a String object,J// specified by the str argument, into an ostream object, specified by the// os argument.//// FRIEND OF: String//// RETURN VALUE://8// Reference to the ostream object used for output.//--{$ return os << str.cxxl_p->cxxl_s;} inline int opeyrator==(B const String &str_1, // Reference to the first String object.C const String &str_2 // Reference to the second String object. )//++// FUNCTIONAL DESCRIPTION://B// This is the equality operator used to compare character stringsG// associated with two String objects, specified by the str_1 and str_2D// arguments. The terms of comparison are as defined for the ANSI C// strcmp function.//// FRIEND OF: String//// RETURN VALUE://E// 1 if the rzespective character strings are equal; 0 otherwise.//--{C return strcmp(str_1.cxxl_p->cxxl_s, str_2.cxxl_p->cxxl_s) == 0;} inline int operator==(: const String &str, // Reference to the String object.: const char *ptr // Pointer to the character string. )//++// FUNCTIONAL DESCRIPTION://E// This is the equality operator used to compare the character stringI// associated with a String object, specified by the str argument, with aA// character string,{ specified by the ptr argument. The terms of<// comparison are as defined for the ANSI C strcmp function.//// FRIEND OF: String//// RETURN VALUE://E// 1 if the respective character strings are equal; 0 otherwise.//--{0 return strcmp(str.cxxl_p->cxxl_s, ptr) == 0;} inline int operator==(; const char *ptr, // Pointer to the character string.: const String &str // Reference to the String object. )//++// FUNCTIONAL DESCRIPTION://D//| This is the equality operator used to compare a character string,F// specified by the ptr argument, with the character string associatedE// with a String object, specified by the str argument. The terms of<// comparison are as defined for the ANSI C strcmp function.//// FRIEND OF: String//// RETURN VALUE://E// 1 if the respective character strings are equal; 0 otherwise.//--{0 return strcmp(str.cxxl_p->cxxl_s, ptr) == 0;} inline int operator!=(B const }String &str_1, // Reference to the first String object.C const String &str_2 // Reference to the second String object. )//++// FUNCTIONAL DESCRIPTION://D// This is the inequality operator used to compare character stringsG// associated with two String objects, specified by the arguments str_1G// and str_2, respectively. The terms of comparison are as defined for// the ANSI C strcmp function.//// FRIEND OF: String//// RETURN VALUE://I// 1 if the respe~ctive character strings are not equal; 0 otherwise.//--{C return strcmp(str_1.cxxl_p->cxxl_s, str_2.cxxl_p->cxxl_s) != 0;} inline int operator!=(: const String &str, // Reference to the String object.; const char *ptr // Pointer to the character string. )//++// FUNCTIONAL DESCRIPTION://G// This is the inequality operator used to compare the character stringI// associated with a String object, specified by the str argument, with aA// character string, specified by the ptr argument. The terms of<// comparison are as defined for the ANSI C strcmp function.//// FRIEND OF: String//// RETURN VALUE://I// 1 if the respective character strings are not equal; 0 otherwise.//--{0 return strcmp(str.cxxl_p->cxxl_s, ptr) != 0;} inline int operator!=(; const char *ptr, // Pointer to the character string.: const String &str // Reference to the String object. )//++// FUNCTIONAL DESCRIPTION://F// This is the inequality operator used to compare a character string,F// specified by the ptr argument, with the character string associatedE// with a String object, specified by the str argument. The terms of<// comparison are as defined for the ANSI C strcmp function.//// FRIEND OF: String//// RETURN VALUE://I// 1 if the respective character strings are not equal; 0 otherwise.//--{0 return strcmp(str.cxxl_p->cxxl_s, ptr) != 0;} inline int operator<(B const String &str_1, // Reference to the first String object.C const String &str_2 // Reference to the second String object. )//++// FUNCTIONAL DESCRIPTION://C// This is the less-than operator used to compare character stringsG// associated with two String objects, specified by the arguments str_1G// and str_2, respectively. The terms of comparison are as defined for// the ANSI C strcmp function.//// FRIEND OF: String//// RETURN VALUE://H// 1 if the first character string is less than the second; 0 otherwise.//--{B return strcmp(str_1.cxxl_p->cxxl_s, str_2.cxxl_p->cxxl_s) < 0;} inline int operator<(9 const String &str, // Reference to the String object.9 const char *ptr // Pointer to the character string. )//++// FUNCTIONAL DESCRIPTION://F// This is the less-than operator used to compare the character stringI// associated with a String object, specified by the str argument, with aA// character string, specified by the ptr argument. The terms of<// comparison are as defined for the ANSI C strcmp function.//// FRIEND OF: String//// RETURN VALUE://H// 1 if the first character string is less than the second; 0 otherwise.//--{/ return strcmp(str.cxxl_p->cxxl_s, ptr) < 0;} inline int operator<(; const char *ptr, // Pointer to the character string.: const String &str // Reference to the String object. )//++// FUNCTIONAL DESCRIPTION://E// This is the less-than operator used to compare a character string,F// specified by the ptr argument, with the character string associatedE// with a String object, specified by the str argument. The terms of<// comparison are as defined for the ANSI C strcmp function.//// FRIEND OF: String//// RETURN VALUE://H// 1 if the first character string is less than the second; 0 otherwise.//--{/ return strcmp(ptr, str.cxxl_p->cxxl_s) < 0;} inline int operator>(B const String &str_1, // Reference to the first String object.C const String &str_2 // Reference to the second String object. )//++// FUNCTIONAL DESCRIPTION://F// This is the greater-than operator used to compare character stringsG// associated with two String objects, specified by the str_1 and str_2G// arguments, respectively. The terms of comparison are as defined for// the ANSI C strcmp function.//// FRIEND OF: String//// RETURN VALUE://>// 1 if the first character string is greater than the second;// 0 otherwise.//--{B return strcmp(str_1.cxxl_p->cxxl_s, str_2.cxxl_p->cxxl_s) > 0;} inline int operator>(: const String &str, // Reference to the String object.; const char *ptr // Pointer to the character string. )//++// FUNCTIONAL DESCRIPTION://I// This is the greater-than operator used to compare the character stringI// associated with a String object, specified by the str argument, with aA// character string, specified by the ptr argument. The terms of<// comparison are as defined for the ANSI C strcmp function.//// FRIEND OF: String//// RETURN VALUE://>// 1 if the first character string is greater than the second;// 0 otherwise.//--{/ return strcmp(str.cxxl_p->cxxl_s, ptr) > 0;} inline int operator>(; const char *ptr, // Pointer to the character string.: const String &str // Reference to the String object. )//++// FUNCTIONAL DESCRIPTION://H// This is the greater-than operator used to compare a character string,F// specified by the ptr argument, with the character string associatedE// with a String object, specified by the str argument. The terms of<// comparison are as defined for the ANSI C strcmp function.//// FRIEND OF: String//// RETURN VALUE://>// 1 if the first character string is greater than the second;// 0 otherwise.//--{/ return strcmp(ptr, str.cxxl_p->cxxl_s) > 0;} inline int operator<=(B const String &str_1, // Reference to the first String object.C const String &str_2 // Reference to the second String object. )//++// FUNCTIONAL DESCRIPTION://J// This is the not-greater-than operator used to compare character stringsG// associated with two String objects, specified by the str_1 and str_2G// arguments, respectively. The terms of comparison are as defined for// the ANSI C strcmp function.//// FRIEND OF: String//// RETURN VALUE://B// 1 if the first character string is not greater than the second;// 0 otherwise.//--{C return strcmp(str_1.cxxl_p->cxxl_s, str_2.cxxl_p->cxxl_s) <= 0;} inline int operator<=(: const String &str, // Reference to the String object.; const char *ptr // Pointer to the character string. )//++// FUNCTIONAL DESCRIPTION://F// This is the not-greater-than operator used to compare the characterI// string associated with a String object, specified by the str argument,H// with a character string, specified by the ptr argument. The terms of<// comparison are as defined for the ANSI C strcmp function.//// FRIEND OF: String//// RETURN VALUE://B// 1 if the first character string is not greater than the second;// 0 otherwise.//--{0 return strcmp(str.cxxl_p->cxxl_s, ptr) <= 0;} inline int operator<=(; const char *ptr, // Pointer to the character string.: const String &str  // Reference to the String object. )//++// FUNCTIONAL DESCRIPTION://D// This is the not-greater-than operator used to compare a characterC// string, specified by the ptr argument, with the character stringG// associated with a String object, specified by the str argument. TheE// terms of comparison are as defined for the ANSI C strcmp function.//// FRIEND OF: String//// RETURN VALUE://B// 1 if the first character string is not greater than the second;// 0 otherwise.//--{0 return strcmp(ptr, str.cxxl_p->cxxl_s) <= 0;} inline int operator>=(B const String &str_1, // Reference to the first String object.C const String &str_2 // Reference to the second String object. )//++// FUNCTIONAL DESCRIPTION://G// This is the not-less-than operator used to compare character stringsG// associated with two String objects, specified by the str_1 and str_2G// arguments, respectively. The terms of comparison are as defined for// the ANSI C strcmp function.//// FRIEND OF: String//// RETURN VALUE://?// 1 if the first character string is not less than the second;// 0 otherwise.//--{C return strcmp(str_1.cxxl_p->cxxl_s, str_2.cxxl_p->cxxl_s) >= 0;} inline int operator>=(: const String &str, // Reference to the String object.; const char *ptr // Pointer to the character string. )//++// FUNCTIONAL DESCRIPTION://J// This is the not-less-than operator used to compare the character stringI// associated with a String object, specified by the str argument, with aA// character string, specified by the ptr argument. The terms of<// comparison are as defined for the ANSI C strcmp function.//// FRIEND OF: String//// RETURN VALUE://?// 1 if the first character string is not less than the second;// 0 otherwise.//--{0 return strcmp(str.cxxl_p->cxxl_s, ptr) >= 0;} inline int operator>=(; const char *ptr, // Pointer to the character string.: const String &str // Reference to the String object. )//++// FUNCTIONAL DESCRIPTION://I// This is the not-less-than operator used to compare a character string,F// specified by the ptr argument, with the character string associatedE// with a String object, specified by the str argument. The terms of<// comparison are as defined for the ANSI C strcmp function.//// FRIEND OF: String//// RETURN VALUE://?// 1 if the first character string is not less than the second;// 0 otherwise.//--{0 return strcmp(ptr, str.cxxl_p->cxxl_s) >= 0;} inline char String::operator[](& int position // Index into string ) const//++// FUNCTIONAL DESCRIPTION://E// This is a subscript operator ([]) which returns a character within// the string.//// RETURN VALUE://=// The character at the requested position within the string.<// If the index is pointing past the end of the string, 0 isB// returned. If the index is negative, the results are undefined.//--{@ return (position < length()) ? cxxl_p->cxxl_s[position] : 0;} !inline char & String::operator[](& int position // Index into string )//++// FUNCTIONAL DESCRIPTION://F// This is a subscript operator ([]) which returns the reference to a // character within the string.//// RETURN VALUE://G// The reference to the character at the requested position within the G// string. This reference is potentially invalid after any subsequent 6// call to a non-const member function for the object.// F// If the index is pointing past the end of the string or if the index*// is negative, the results are undefined.//--{$ return cxxl_p->cxxl_s[position];} #inline unsigned int String::length( ) const//++// FUNCTIONAL DESCRIPTION://B// This member function returns the length of the character string%// associated with the String object.//// RETURN VALUE://L// The length of the character string, as defined for the ANSI C strlen // function.//--{" return strlen(cxxl_p->cxxl_s);} #pragma __environment restore#endif// End of string.hxxwwfSr7Ԧ#ifndef __STRSTREAM_HEADER#define __STRSTREAM_HEADERL/*************************************************************************** * . * Copyright 2000 Compaq Computer Corporation *: * COMPAQ Registered in U.S. Patent and Trademark Office. *J * Confidential computer software. Valid license from Compaq required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *N ****************************************************************************//*>This file either includes strstream_stdimpl or strstream_impl 1based upon whether __USE_STD_IOSTREAM is defined.*/#ifdef __USE_STD_IOSTREAM #include #else#include #endif#endifww censed to the U.S. Government/** under vendor's standard commercial license.***/#ifndef __STRSTREAM_HXX #ifdef _NT#include #else#include #endif //_NT#endifww r7Ԧ#ifndef __STRSTREAMHXX#define __STRSTREAMHXXL/*************************************************************************** * > * Copyright 2003 Compaq Information Technologies Group, L.P. *C * Compaq and the Compaq logo are trademarks of Compaq Information@ * Technologies Group, L.P. in the U.S. and/or other countries. *J * Confidential computer software. Valid license from Compaq required forF * possession, use or copying. Consistent with FAR 12.211 and 12. 212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *N ****************************************************************************/h#if (defined(__STD_STRICT_ANSI) || defined(__STD_STRICT_ANSI_ERRORS)) && !defined(__NO_USE_STD_IOSTREAM)#error "cannot include strstream.hxx -- do not compile strict_ansi OR define __NO_USE_STD_IOSTREAM - see section 7.1.2 of the C++ Using Guide"#else& /* duplicate for /head; * includes strstream_stdimpl.hxx or strstream_impl.hxx8 * based upon whether __USE_STD_IOSTREAM is defined. */!/* # include */# ifdef __USE_STD_IOSTREAM(# include # else%# include # endif#endif#endifwwIڧr7Ԧ#ifndef __STRSTREAM_HXX#define __STRSTREAM_HXX//// B// Copyright 2003, 2004 Hewlett-Packard Development Company, L.P.//F// Confidential computer software. Valid license from HP required forF// possession, use or copying. Consistent with FAR 12.211 and 12.212,F// Commercial Computer Software, Computer Software Documentation, andK// Technical Data for Commercial Items are licensed to the U.S. Government/// under vendor's standard commercial license.////@//==============================================================#// FACILITY: DEC C++ Class Library//$// SUBSYSTEM: The iostream package.//6// MODULE: Include file for the strstream subpackage.//// MODULE DESCRIPTION://O// The strstream subpackage provides the "incore" I/O functionality of theM// iostream package. It relies on the iostream (core) subpackage's baseK// classes to derive classes that are specialized for I/O performed on// arrays of bytes (strings).//@//--------------------------------------------------------------//++// INCLUDE FILES//--/* #include */#ifdef __USE_STD_IOSTREAM #error "cannot include strstream.hxx -- do not compile strict_ansi OR define __NO_USE_STD_IOSTREAM - see section 7.1.2 of the C++ Using Guide"#else#include #include #pragma __environment save)#pragma __environment cxx_header_defaults//++ // LINKAGE//--'#if defined(__VMS) && defined(__DECCXX)+# pragma __extern_model __relaxed_refdef4# pragma __extern_prefix __CXXL_PLAIN_FUNC_LINKAGE# if defined __VAX## pragma __nomember_alignment# else!# pragma __member_alignment # endif#endif //++// FUNCTIONAL DESCRIPTION://M// A strstreambuf is streambuf that uses an array of bytes (a string) toL// hold the sequence of characters. Given the convention that a char *O// should be interpreted as pointing just before the char it really pointsO// at, the mapping between the abstract get/put pointers (see comments forF// streambuf) and char * pointers is direct. Moving the pointersO// corresponds exactly to incrementing and decrementing the char * values.//J// To accommodate the need for arbitrary length strings, strstreambufO// supports a dynamic mode. When a strstreambuf is in dynamic mode, spaceM// for the character sequence is allocated as needed. When the sequence>// is extended too far, it will be copied to a new array.//--%class strstreambuf : public streambuf{public: strstreambuf(); strstreambuf(int);% strstreambuf(char *, int, char *);7 strstreambuf(unsigned char *, int, unsigned char *);5 strstreambuf(void *(*a)(long), void (*f)(void *)); ~strstreambuf(); void freeze(int n = 1); virtual int overflow(int);@ virtual streampos seekoff(streamoff, __SCOPE(ios::)seek_dir, int = ios::in | ios::out);+ virtual streambuf *setbuf(char *, int); char *str(); virtual int underflow();#if defined(__osf__) virtual int doallocate();#endifprivate:* void initialize(char *, int, char *); void initialize_empty();5 int __GrowBuffer(int cchRequest);" void *(*m_pfnAllocate)(long);- void (*m_pfnFree)(void*);N// Data member definitions -- each platform has own backward compatible layout$#if defined(__VMS) && defined(__VAX)private:A int m_cchAllocate; // The size to request# int *m_pExpand;% char m_bIsDynamic;$ char m_bIsFrozen;, char m_bIsWriteProtected;! char m_bFill1;#endif;#if defined(__VMS) && (defined(__ALPHA) || defined(__ia64))private:3 int m_cchAllocate; // requested size3 int m_cchDidAllocate; // allocated size long m_bpGetMark; char m_bIsDynamic; char m_bIsFrozen; char m_bIsWriteProtected; char m_bFill1;#endif*#if defined(__osf__) || defined(__linux__)private:% char m_bIsDynamic;$ char m_bIsFrozen;, char m_bIsWriteProtected; char fill1;A int m_cchAllocate; // The size to requestI int m_cchDidAllocate; // The size actually allocated$ int m_bpGetMark;#endif#if defined(_NT)private:A int m_cchAllocate; // The size to requestI int m_cchDidAllocate; // The size actually allocated$ long m_bpGetMark;% int m_bIsDynamic;$ int m_bIsFrozen;, int m_bIsWriteProtected;#endif}; #if defined(__osf__)L// Class strstreambase provides a mechanism to include a single strstreambuf?// in all strstream classes. It saves a memory allocation whenB// creating a strstream object, but it complicates initialization.'// Its primary purpose is compatibilityH// with previous versions of the C++ class library provided on DEC OSF/1*class strstreambase : virtual public ios {public:( strstreambase();; strstreambase(char *, int, char *);) ~strstreambase(); strstreambuf *rdbuf();private:' strstreambuf m_strstreambuf;};#endif #if defined(__osf__)7class istrstream : public strstreambase, public istream#else!class istrstream : public istream#endif//++// FUNCTIONAL DESCRIPTION://C// istrstream is an istream specialized for incore operations.//--{public: istrstream(char *); istrstream(char *, int); //8 // Note that any const char * passed must have valid 8 // input otherwise putback() may be called which may 4 // cause an attempt to write into read-only data  // sections. //# inline istrstream(const char *);( inline istrstream(const char *, int); ~istrstream(); strstreambuf *rdbuf();}; //// Inline istrstream methods://Ainline istrstream::istrstream( const char* pchBuffer) : istream()#if defined(__osf__)I#if defined(__DECCXX) && defined(__STD_CFRONT) && !defined(__CXXCFIX4670)< , strstreambase((char *)pchBuffer, strlen(pchBuffer), 0)#else? , strstreambase((char *)pchBuffer, strlen(pchBuffer), NULL)#endif{}#else{L ios::init(new strstreambuf((char *)pchBuffer, strlen(pchBuffer), NULL));}#endifOinline istrstream::istrstream(const char* pchBuffer, int cchBuffer) : istream()#if defined(__osf__)I#if defined(__DECCXX) && defined(__STD_CFRONT) && !defined(__CXXCFIX4670)5 , strstreambase((char *) pchBuffer, cchBuffer, 0)#else8 , strstreambase((char *) pchBuffer, cchBuffer, NULL)#endif{}#else{D ios::init(new strstreambuf((char *)pchBuffer, cchBuffer, NULL));}#endif #if defined(__osf__)7class ostrstream : public strstreambase, public ostream#else!class ostrstream : public ostream#endif//++// FUNCTIONAL DESCRIPTION://C// ostrstream is an ostream specialized for incore operations.//--{public: ostrstream();+ ostrstream(char *, int, int = ios::out); ~ostrstream();  int pcount(); strstreambuf *rdbuf(); char *str();}; #if defined(__osf__)7class strstream : public strstreambase, public iostream#else!class strstream : public iostream#endif//++// FUNCTIONAL DESCRIPTION://C// strstream is an iostream specialized for incore operations.//--{public: strstream(); strstream(char *, int, int); ~strstream(); strstreambuf *rdbuf(); char *str();}; #pragma __environment restore#endif // __USE_STD_IOSTREAM#endif// End of strstream.hxxww STREAM.HXX STREAMBUF.STRING. STRING.CCh STRING.HXXXSTRING_OVRLD_IMPL. STRSTREAM.  STRSTREAM.H STRSTREAM.HXXSTRSTREAM_IMPL.HXXSTRSTREAM_STDIMPL.HXX TYPEINFO.UTILITY. VALARRAY.h VALARRAY.CCqVECTOR. VECTOR.CCVECTOR.H VECTOR.HXX  VECTOR_SPEC.H[WCHAR_OVRLD_IMPL.4r7Ԧ// -*- C++ -*-L/*************************************************************************** *J * strstream - Declarations for the Standard Library string stream classes *. * $Id: //stdlib/3.0-rel/include/strstream#3 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or cop ying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. c opyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/!#ifndef _RWSTD_STRSTREAM_INCLUDED!#define _RWSTD_STRSTREAM_INCLUDED#include #include #include #include #ifndef __USE_STD_IOSTREAM{#error "cannot include fstream -- define __USE_STD_IOSTREAM to override default - see section 7.1.2 of the C++ Using Guide"#else#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif#ifdef _RWSTD_NO_DEPRECATED## error deprecated header included#endif_RWSTD_NAMESPACE (std) {  2class _RWSTD_EXPORT strstreambuf: public streambuf{public:- typedef char char_type;/ typedef char_traits traits_type;, typedef streambuf::int_type int_type;, typedef streambuf::pos_type pos_type;, typedef streambuf::off_type off_type;private:C void _C_strstrm_init (char_type*, streamsize, char_type*, int);A void _C_strstrm_init (const char_type *__g, streamsize __n) {B _C_strstrm_init (_RWSTD_CONST_CAST (char_type*, __g), __n,) 0, _C_constant); }C void _C_strstrm_init (const signed char *__g, streamsize __n) {O _C_strstrm_init (_RWSTD_REINTERPRET_CAST (const char_type*, __g), __n); }E void _C_strstrm_init (const unsigned char *__g, streamsize __n) {O _C_strstrm_init (_RWSTD_REINTERPRET_CAST (const char_type*, __g), __n); }public: _EXPLICIT) strstreambuf(streamsize __alsize = 0) : streambuf(), _C_alsize(__alsize), _C_palloc(0), _C_pfree(0) {% this->_C_bufstate=_C_dynamic; } K strstreambuf(void *(*__palloc)(_RWSTD_SIZE_T), void (*__pfree)(void *)) : streambuf(), _C_alsize(0), _C_palloc(__palloc), _C_pfree(__pfree) {% this->_C_bufstate=_C_dynamic; }I strstreambuf(char_type *__gnext, streamsize __n, char_type *__pbeg=0) : streambuf(), _C_alsize(0), _C_palloc(0), _C_pfree(0) {2 _C_strstrm_init (__gnext, __n, __pbeg, 0); }8 strstreambuf(unsigned char *__gnext, streamsize __n,+ unsigned char *__pbeg = 0) : streambuf(), _C_alsize(0), _C_palloc(0), _C_pfree(0) {L _C_strstrm_init (_RWSTD_REINTERPRET_CAST (char_type*, __gnext), __n,J _RWSTD_REINTERPRET_CAST (char_type*, __pbeg), 0); }6 strstreambuf(signed char *__gnext, streamsize __n,) signed char *__pbeg = 0) : streambuf(), _C_alsize(0), _C_palloc(0), _C_pfree(0) {L _C_strstrm_init (_RWSTD_REINTERPRET_CAST (char_type*, __gnext), __n,J _RWSTD_REINTERPRET_CAST (char_type*, __pbeg), 0); }: strstreambuf(const char_type *__gnext, streamsize __n) : streambuf(), _C_alsize(0), _C_palloc(0), _C_pfree(0) {' _C_strstrm_init (__gnext, __n); }> strstreambuf(const unsigned char *__gnext, streamsize __n) : streambuf(), _C_alsize(0), _C_palloc(0), _C_pfree(0) {' _C_strstrm_init (__gnext, __n); }< strstreambuf(const signed char *__gnext, streamsize __n) : streambuf(), _C_alsize(0), _C_palloc(0), _C_pfree(0) {' _C_strstrm_init (__gnext, __n); }   virtual ~strstreambuf(){K if((_C_bufstate & _C_allocated) && (!(_C_bufstate & _C_frozen)) ) { if(_C_buffer)$ delete [] _C_buffer; } }" void freeze(bool __f = true) {& if(_C_bufstate & _C_dynamic) { if(__f)> _C_bufstate |= _C_frozen; // set _C_frozen else@ _C_bufstate &= ~_C_frozen; // clear _C_frozen } }  char_type *str(){ freeze(); return eback(); }  int pcount() const { if(pptr())) return int(pptr() - pbase()); return 0; } protected:A virtual int_type overflow(int_type __c = traits_type::eof());B virtual int_type pbackfail(int_type __c = traits_type::eof());! virtual int_type underflow();: virtual pos_type seekoff(off_type, ios::seekdir __way,I ios::openmode __which = ios::in | ios::out);C virtual pos_type seekpos(pos_type __sp, ios::openmode __which =1 ios::in | ios::out);> virtual streambuf* setbuf(char_type *__s, streamsize __n);D virtual streamsize xsputn(const char_type *__s, streamsize __n);private:3 _RWSTD_STATIC_CONST (int, _C_allocated = 0x01);3 _RWSTD_STATIC_CONST (int, _C_constant = 0x02);3 _RWSTD_STATIC_CONST (int, _C_dynamic = 0x04);3 _RWSTD_STATIC_CONST (int, _C_frozen = 0x08); int doallocate() { return 0; }  streamsize _C_alsize;@ streamsize _C_unused; // left for binary compatibility0 void *(*_C_palloc)(_RWSTD_SIZE_T);' void (*_C_pfree)(void *);};.class _RWSTD_EXPORT istrstream: public istream{public:- typedef char char_type;/ typedef char_traits traits_type;, typedef streambuf::int_type int_type;, typedef streambuf::pos_type pos_type;, typedef streambuf::off_type off_type; ! strstreambuf *rdbuf() const {9 return _RWSTD_CONST_CAST (strstreambuf*, &_C_sb); } _EXPLICITM  istrstream (const char_type *__s): istream (rdbuf ()), _C_sb (__s, 0) { }5 istrstream (const char_type *__s, streamsize __n)2 : istream (rdbuf ()), _C_sb (__s, __n) { } _EXPLICIT istrstream (char_type *__s)B : istream (rdbuf ()), _C_sb ((const char_type*)__s, 0) { } / istrstream (char_type *__s, streamsize __n)D : istream (rdbuf ()), _C_sb ((const char_type*)__s, __n) { } char_type *str () { return rdbuf ()->str (); }private: strstreambuf _C_sb;};.class _RWSTD_EXPORT ostrstream: public ostream{public:- typedef char char_type;/ typedef char_traits traits_type;, typedef streambuf::int_type int_type;, typedef streambuf::pos_type pos_type;, typedef streambuf::off_type off_type; ! strstreambuf* rdbuf() const {9 return _RWSTD_CONST_CAST (strstreambuf*, &_C_sb); }) ostrstream (): ostream (rdbuf ()) { }I ostrstream (char_type *__s, int __n, ios::openmode __mode = ios::out) : ostream (rdbuf ()),' _C_sb (__s, streamsize (__n),P __mode & (ios::app | ios::ate) ? __s + traits_type::length (__s)5 : __s) { }* void freeze (bool __freezefl = true) {& rdbuf ()->freeze (__freezefl); }  char_type *str () { return rdbuf ()->str(); }  int pcount() const {"  return rdbuf ()->pcount(); }private: strstreambuf _C_sb;};.class _RWSTD_EXPORT strstream: public iostream{public:- typedef char char_type;/ typedef char_traits traits_type;, typedef streambuf::int_type int_type;, typedef streambuf::pos_type pos_type;, typedef streambuf::off_type off_type; ! strstreambuf* rdbuf() const {9 return _RWSTD_CONST_CAST (strstreambuf*, &_C_sb); }3 strstream (): iostream (rdbuf ()), _C_sb () { }' strstream (char_type *__s, int __n,9 ios::openmode __mode = ios::out | ios::in) : iostream (rdbuf ()),% _C_sb (__s, streamsize (__n),O __mode & (ios::app | ios::ate) ? __s + traits_type::length (__s)4 : __s) { }* void freeze (bool __freezefl = true) {& rdbuf ()->freeze (__freezefl); } int pcount() const {" return rdbuf ()->pcount(); }  char_type *str() { return rdbuf ()->str(); }private: strstreambuf _C_sb;};} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif#endif // __USE_STD_IOSTREAM$#endif //_RWSTD_STRSTREAM_INCLUDEDwwFMPL.HXX"r7Ԧ CBLDR TYPEINFO.!r7Ԧ CBLDR UTILITY." r7Ԧ CBLDR VALARRAY.$;r7Ԧ CBLDR VALARRAY.CC r7Ԧ CBLDR VECTOR."r7Ԧ CBLDR VECTOR.CC!ns7Ԧ CBLDR VECTOR.H#'!s7Ԧ CBLDR VECTOR.HXX&Ф6s7Ԧ CBLDR VECTOR_SPEC.H!1s7Ԧ CBLDR CASSERT. fHs7Ԧ CBLDR CERRNO. s7Ԧ CBLDR CFLOAT.!w:s7Ԧ CBLDR CISO646.!^s 9;r7Ԧ// -*- C++ -*-L/*************************************************************************** *D * typeinfo - declarations for the C++ Standard Library RTTI support *- * $Id: //stdlib/3.0-rel/include/typeinfo#5 $ *P *******************************************************************************P * *P * Copyright 2003, 2004 Hewlett-Packard Development Company, L.P. *P *  *P * Confidential computer software. Valid license from HP required for *P * possession, use or copying. Consistent with FAR 12.211 and 12.212 *P * Commercial Computer Software, Computer Software Documentation, and *P * Technical Data for Commercial Items are licensed to the U.S. Government *P * under vendor's standard commercial license. *P *  *P ******************************************************************************* *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, c opied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) ( ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/ #ifndef _RWSTD_TYPEINFO_INCLUDED #define _RWSTD_TYPEINFO_INCLUDED#include #include #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif.#if !defined (_RWSTD_NO_STD_BAD_TYPEID) \. || !defined (_RWSTD_NO_RUNTIME_IN_STD) \7 || 2 == __GNUG__ && !defined (_RWSTD_NO_HONOR_STD)C// define type_info et al in namespace std iff they are found to beF// defined in namespace std in the compiler's language support libraryD// or if they are not found to be defined in either namespace std or// in the global namespace_RWSTD_NAMESPACE (std) {1#endif // !NO_BAD_TYPEID || !RUNTIME_IN_STD ...?#if defined (__EDG__) || defined (__sgi) && !defined (__GNUG__)7 // let edg (or its derivative) know about type_info# pragma define_type_info#endif // __EDG__ // 18.5.1class type_info{public:? // individual members rather than the entire class exported@ // to prevent compiler errors (see PR #25603); this prevents. // type_info virtuals from being overriden( _RWSTD_EXPORT virtual ~type_info (); 7 _RWSTD_EXPORT bool before (const type_info&) const;( const char* __mangled_name() const { return __type_name; }) const char* __demangled_name() const;- _RWSTD_EXPORT const char* name () const {*#if defined(__RETURN_MANGLED_NAME_OF_TYPE) return __type_name;#else! return __demangled_name();#endif }; _RWSTD_EXPORT bool operator== (const type_info&) const;; _RWSTD_EXPORT bool operator!= (const type_info&) const;#if defined(__DECCXX): virtual bool _eh_match (const type_info& _caught_type, const void* _object,( const void** _adjusted_object,# const bool _const_so_far,- const unsigned _pointer_level) const;#endif protected:= // prevent g++ warnings about private ctor and no friends% explicit type_info (const char*);private:#if defined (__HP_aCC) const char *_C_name;" void *_C_baseClassTable; unsigned _C_hashValue;#elif defined (__DECCXX)# ifdef __IA64_ABI const char *__type_name;)#elif defined(__ia64) || defined(__alpha) const char *__type_name;# endif /* ifdef __IA64_ABI */#elif defined (__GNUG__) const char *_C_name;#elif defined (_MSC_VER) void *_C_data; char _C_name [1];#elif defined (__SUNPRO_CC) const void * _C_data;#elif defined (__IBMCPP__) char *_C_typeName; char *_C_mangledName;E#else // DEC cxx, SGI MIPSpro, SNI CDS++, and other EDG derivatives // no data#endif; type_info& operator= (const type_info&); // undefined; type_info (const type_info&); // undefined};#if defined (__HP_aCC)+inline const char* type_info::name () const{ return _C_name;}:#elif defined (__GNUG__) && !defined (_RWSTD_NO_HONOR_STD)D// define member functions inline in namespace std (they are definedH// as members of ::type_info (as opposed to std::type_info) in libstdc++'// unless lib is built with -fhonor-std#inline type_info::~type_info () { }+inline const char* type_info::name () const{ return _C_name;}@inline bool type_info::operator== (const type_info &__rhs) const{: return !this->before (__rhs) && !__rhs.before (*this);}@inline bool type_info::operator!= (const type_info &__rhs) const{ return !(*this == __rhs);}#elif defined (__IBMCPP__)+inline const char* type_info::name () const{ return _C_typeName;}@inline bool type_info::operator== (const type_info &__rhs) const{: return !this->before (__rhs) && !__rhs.before (*this);}@inline bool type_info::operator!= (const type_info &__rhs) const{ return !(*this == __rhs);}#endif // __IBMCPP__.#if !defined (_RWSTD_NO_STD_BAD_TYPEID) \. || !defined (_RWSTD_NO_RUNTIME_IN_STD) \7 || 2 == __GNUG__ && !defined (_RWSTD_NO_HONOR_STD)} // namespace std#else# ifndef _RWSTD_NO_NAMESPACEnamespace std {using ::type_info;} // namespace std!# endif // _RWSTD_NO_NAMESPACE1#endif // !NO_BAD_TYPEID || !RUNTIME_IN_STD ...L#if !defined (_RWSTD_NO_STD_BAD_CAST) || !defined (_RWSTD_NO_RUNTIME_IN_STD)_RWSTD_NAMESPACE (std) { +#endif // !NO_BAD_CAST || !RUNTIME_IN_STD // 18.5.2 struct bad_cast: _STD::exception{Z#if !defined (_MSC_VER) || (defined (_MSC_VER) && ((_MSC_VER < 1300) || defined (_WIN64)))& // 18.5.2, p2 - compiler generated! // bad_cast () _THROWS () { }'#if defined(__VMS) && defined(__DECCXX) bad_cast() _THROWS (());#endif& // 18.5.2, p4 - compiler generated4 // bad_cast (const bad_cast &__rhs) _THROWS (())" // : exception (__rhs) { }'#if defined(__VMS) && defined(__DECCXX)- bad_cast (const bad_cast &) _THROWS (());#endif // 18.5.2, p4> bad_cast& operator= (const bad_cast &__rhs) _THROWS (()) {3 return exception::operator= (__rhs), *this; } // 18.5.2, p54 virtual const char* what () const _THROWS (()) { return "std::bad_cast"; }'#if defined(__VMS) && defined(__DECCXX)% virtual ~bad_cast() _THROWS (());#endif #else% virtual ~bad_cast() _THROWS (());#endif};L#if !defined (_RWSTD_NO_STD_BAD_CAST) || !defined (_RWSTD_NO_RUNTIME_IN_STD)} // namespace std#else# ifndef _RWSTD_NO_NAMESPACEnamespace std {using ::bad_cast;} // namespace std!# endif // _RWSTD_NO_NAMESPACE+#endif // !NO_BAD_CAST || !RUNTIME_IN_STDN#if !defined (_RWSTD_NO_STD_BAD_TYPEID) || !defined (_RWSTD_NO_RUNTIME_IN_STD)_RWSTD_NAMESPACE (std) {)#endif // !NO_TYPEID || !RUNTIME_IN_STD // 18.5.3"struct bad_typeid: _STD::exception{& // 18.5.3, p2 - compiler generated# // bad_typeid () _THROWS () { }'#if defined(__VMS) && defined(__DECCXX) bad_typeid() _THROWS (());#endif& // 18.5.3, p4 - compiler generated8 // bad_typeid (const bad_typeid &__rhs) _THROWS (())" // : exception (__rhs) { }'#if defined(__VMS) && defined(__DECCXX)/ bad_typeid(const bad_typeid&) _THROWS (());#endif // 18.5.3, p4B bad_typeid& operator= (const bad_typeid &__rhs) _THROWS (()) {3 return exception::operator= (__rhs), *this; } // 18.5.3, p54 virtual const char* what () const _THROWS (()) {! return "std::bad_typeid"; }'#if defined(__VMS) && defined(__DECCXX)' virtual ~bad_typeid() _THROWS (());#endif };N#if !defined (_RWSTD_NO_STD_BAD_TYPEID) || !defined (_RWSTD_NO_RUNTIME_IN_STD)} // namespace std#else# ifndef _RWSTD_NO_NAMESPACEnamespace std {using ::bad_typeid;} // namespace std!# endif // _RWSTD_NO_NAMESPACE)#endif // !NO_TYPEID || !RUNTIME_IN_STDE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif$#endif // _RWSTD_TYPEINFO_INCLUDEDwwIgr7Ԧ// -*- C++ -*-L/*************************************************************************** *B * utility - Declarations for the Standard Library utility classes *, * $Id: //stdlib/3.0-rel/include/utility#2 $ *L *************************************************************************** * > * Copyright 2002 Compaq Information Technologies Group, L.P. *C * Compaq and the Compaq logo are trademarks of Compaq Information@ * Technologies Group, L.P. in the U.S. a nd/or other countries. *J * Confidential computer software. Valid license from Compaq required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** * * Copyright (c) 1994 * Hewlett-Packard C ompany *E * Permission to use, copy, modify, distribute and sell this softwareG * and its documentation for any purpose is hereby granted without fee,D * provided that the above copyright notice appear in all copies andD * that both that copyright notice and this permission notice appearA * in supporting documentation. Hewlett-Packard Company makes noA * representations about the suitability of this software for anyH * purpose. It is provided "as is" without express or implied warranty.  *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accorda nce with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/#ifndef _RWSTD_UTILITY_INCLUDED#define _RWSTD_UTILITY_INCLUDED#include #include #include ##endif // _RWSTD_UTILITY_INCLUDEDwwr7Ԧ// -*- C++ -*-L/*************************************************************************** *; * valaray - Declarations for the Standard Library valarray *- * $Id: //stdlib/3.0-rel/include/valarray#3 $ *L *************************************************************************** * > * Copyright 2002 Compaq Information Technologies Group, L.P. *C * Compaq and the Compaq logo are trademarks of Compaq Information@ * Technologies Group, L.P. in the U.S. and/o r other countries. *J * Confidential computer software. Valid license from Compaq required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other co pies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/ #ifndef _RWSTD_VALARRAY_INCLUDED #define _RWSTD_VALARRAY_INCLUDED#include #include #include #include #include #include _RWSTD_CMATH#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif#ifdef _MSC_VER# pragma warning (push)H // disable conversion from 'double' to 'float', possible loss of dataL // until a conforming header with float and long double overloads% // for the C functions is provided!# pragma warning (disable: 4244)#endif // _MSC_VER_RWSTD_NAMESPACE (std) { // forward declarationsclass _RWSTD_EXPORT slice;*template class slice_array;class _RWSTD_EXPORT gslice;+template class gslice_array;)template class mask_array;-template class indirect_array; // 26.3.2template class valarray{public: typedef _TypeT value_type; // 26.3.2.1, p1 valarray () { } // 26.3.2.1, p2- _EXPLICIT valarray (_RWSTD_SIZE_T __size). : _C_array (value_type (), __size) { } // 26.3.2.1, p3< valarray (const value_type& __val, _RWSTD_SIZE_T __size)& : _C_array (__val, __size) { } // 26.3.2.1, p4: valarray (const value_type* __p, _RWSTD_SIZE_T __size)$ : _C_array (__p, __size) { } // 26.3.2.1, p5$ valarray (const valarray& __rhs)' : _C_array (__rhs._C_array) { } // 26.3.2.1, p6. valarray (const slice_array&);/ valarray (const gslice_array&);- valarray (const mask_array&);1 valarray (const indirect_array&); // 26.3.2.2, p1 - assignment1 valarray& operator= (const valarray &__rhs) { if (this != &__rhs)& _C_array = __rhs._C_array; return *this; } // 26.3.2.2, p2 - assignment3 valarray& operator= (const value_type &__val) {M return _STD::fill (_C_array.begin (), _C_array.end (), __val), *this; } // 26.3.2.2, p3 - assignment9 valarray& operator= (const slice_array&);: valarray& operator= (const gslice_array&);8 valarray& operator= (const mask_array&);< valarray& operator= (const indirect_array&); // 26.3.2.3 - element access5 value_type operator[] (_RWSTD_SIZE_T __i) const {& _RWSTD_ASSERT (__i < size ()); return _C_array[__i]; } 0 value_type& operator[] (_RWSTD_SIZE_T __i) {& _RWSTD_ASSERT (__i < size ()); return _C_array[__i]; }# // 26.3.2.4 - subset operations8 valarray operator[] (slice) const;2 slice_array operator[] (slice);@ valarray operator[] (const gslice&) const;: gslice_array operator[] (const gslice&);H valarray operator[] (const valarray&) const;B mask_array operator[] (const valarray&);Q valarray operator[] (const valarray<_RWSTD_SIZE_T>&) const;K indirect_array operator[] (const valarray<_RWSTD_SIZE_T>&);! // 26.3.2.5 - unary operators valarray operator+ () const; valarray operator- () const; valarray operator~ () const;& valarray operator! () const;) // 26.3.2.6, p1 - computed assignment+ valarray& operator*= (const valarray&);+ valarray& operator/= ( const valarray&);+ valarray& operator+= (const valarray&);+ valarray& operator-= (const valarray&);+ valarray& operator%= (const valarray&);+ valarray& operator^= (const valarray&);+ valarray& operator&= (const valarray&);+ valarray& operator|= (const valarray&);, valarray& operator<<= (const valarray&);, valarray& operator>>= (const valarray&);) // 26.3.2.6, p5 - computed assignment- valarray& operator*= (const value_type&);- valarray& operator/= (const value_type&);- valarray& operator%= (const value_type&);- valarray& operator+= (const value_type&);- valarray& operator-= (const value_type&);- valarray& operator^= (const value_type&);- valarray& operator&= (const value_type&);- valarray& operator|= (const value_type&);. valarray& operator<<= (const value_type&);. valarray& operator>>= (const value_type&); // 26.3.2.7, p1! _RWSTD_SIZE_T size () const { return _C_array.size (); } // 26.3.2.7, p2 value_type sum () const {N return accumulate (_C_array.begin (), _C_array.end (), value_type ()); } // 26.3.2.7, p3 value_type (min)() const {% _RWSTD_ASSERT (0 != size ());A return *min_element (_C_array.begin (), _C_array.end ()); } // 26.3.2.7, p4 value_type (max)() const {% _RWSTD_ASSERT (0 != size ());A return *max_element (_C_array.begin (), _C_array.end ()); }$ // 26.3.2.7, p5 - ordinary shift valarray shift (int) const;$ // 26.3.2.7, p7 - circular shift valarray cshift (int) const; // 26.3.2.7, p8: valarray apply (value_type __func (value_type)) const;A valarray apply (value_type __func (const value_type&)) const; // 26.3.2.7, p9J void resize (_RWSTD_SIZE_T __size, value_type __val = value_type ()) {( _C_array.resize (__size, __val); } // implementation3 valarray (_RW::__rw_array &__rhs) { _C_array.swap (__rhs); }) _RW::__rw_array _C_array;};} // namespace std_RWSTD_NAMESPACE (__rw) { ,templateinline _STD::valarray<_TypeT>O__rw_unary_function (const _STD::valarray<_TypeT> &__val, _UnaryFunction __fun){% // allocate but do not initialize- __rw_array<_TypeT> __tmp (__val.size ());> typedef _STD::raw_storage_iterator<_TypeT*, _TypeT> _Iter;> // apply `fun' to ea ch element of `a' and initialize `tmp'D _STD::transform (__val._C_array.begin (), __val._C_array.end (),4 _Iter (__tmp.begin ()), __fun); ) return _STD::valarray<_TypeT>(__tmp);}<// implements symmetric non-member valarray binary operators-template=inline _STD::valarray<_TYPENAME _BinaryFunction::result_type>;__rw_binary_function (const _STD::valarray<_TypeT> &__lhs, ; const _STD::valarray<_Type T> &__rhs, : _BinaryFunction __fun){N typedef _TYPENAME _BinaryFunction::result_type result_type;H typedef _STD::raw_storage_iterator _Iter;% // allocate but do not initialize# __rw_array __tmp =K __rw_array((_STD::min)(__lhs.size (), __rhs.size ()));> // apply `fun' to each pair of elements of `lhs' and `rhs'- _STD::transform (__lhs._C_array.begin (),>  __lhs._C_array.begin () + __tmp.size (), M __rhs._C_array.begin (), _Iter (__tmp.begin ()), __fun); . return _STD::valarray(__tmp);}=// implements asymmetric non-member valarray binary operators-template=inline _STD::valarray<_TYPENAME _BinaryFunction::result_type>;__rw_binary_function (const _STD::valarray<_TypeT> &__val, : _BinaryFunction __fun){N  typedef _TYPENAME _BinaryFunction::result_type result_type;H typedef _STD::raw_storage_iterator _Iter;% // allocate but do not initializeK __rw_array __tmp = __rw_array(__val.size ());> // apply `fun' to each element of `a' and initialize `tmp'D _STD::transform (__val._C_array.begin (), __val._C_array.end (),4 _Iter (__tmp.begin ()), __fun); . return _STD::valarray(__tmp);}-template inline void6__rw_unary_function (const _STD::slice_array<_TypeT>&,3 const _STD::valarray<_TypeT>&,% _UnaryFunction);.template inline void 7__rw_binary_function (const _STD::slice_array<_TypeT>&,4 const _STD::valarray<_TypeT>&,' _BinaryFunction);-template inline void5__rw_unary_function (const _STD::mask_array<_TypeT>&,3 const _STD::valarray<_TypeT>&,% _UnaryFunction);.template inline void6__rw_binary_function (const _STD::mask_array<_TypeT>&,4 const _STD::valarray<_TypeT>&,' _BinaryFunction);-template inline void9__rw_unary_function (const _STD::indirect_array<_TypeT>&,3 const _STD::valarray<_TypeT>&,% _UnaryFunction);.template inline void:__rw_binary_function (const _STD::indirect_array<_TypeT>&,4 const _STD::valarray<_TypeT>&,' _BinaryFunction);} // namespace __rw_RWSTD_NAMESPACE (std) { templateinline valarray<_TypeT>$valarray<_TypeT>::operator+ () const{G return _RW::__rw_unary_function (*this, _RW::unary_plus<_TypeT>());}template inline valarray<_TypeT>$valarray<_TypeT>::operator- () const{> return _RW::__rw_unary_function (*this, negate<_TypeT>());}template inline valarray<_TypeT>$valarray<_TypeT>::operator~ () const{O return _RW::__rw_unary_function (*this, _RW::bitwise_complement<_TypeT>());}template :inline valarray valarray<_TypeT>::operator! () const{A _RW::__rw_array __tmp = _RW::__rw_array(size ());C transform (_C_array.begin (), _C_array.end (), __tmp.begin (), & logical_not<_TypeT>()); ! return valarray(__tmp);}template inline valarray<_TypeT>&<valarray<_TypeT>::operator*= (const valarray<_TypeT>& __rhs){" transform (_C_array.begin (), H _C_array.begin () + (_STD::min)(size (), __rhs.size ()), ; __rhs._C_array.begin (), _C_array.begin (), %  multiplies<_TypeT>()); return *this;}template inline valarray<_TypeT>&<valarray<_TypeT>::operator/= (const valarray<_TypeT>& __rhs){" transform (_C_array.begin (), H _C_array.begin () + (_STD::min)(size (), __rhs.size ()), ; __rhs._C_array.begin (), _C_array.begin (), " divides<_TypeT>()); return *this;}template inline valarray<_TypeT>&<valarray<_TypeT>::operator+= (const valarray<_TypeT>& __rhs){" transform (_C_array.begin (), H _C_array.begin () + (_STD::min)(size (), __rhs.size ()), ; __rhs._C_array.begin (), _C_array.begin (),  plus<_TypeT>()); return *this;}template inline valarray<_TypeT>&<valarray<_TypeT>::operator-= (const valarray<_TypeT>& __rhs){" transform (_C_array.begin (), H _C_array.begin () + (_STD::min)(size (), __rhs.size ()), ;  __rhs._C_array.begin (), _C_array.begin (), minus<_TypeT>()); return *this;}template inline valarray<_TypeT>&<valarray<_TypeT>::operator%= (const valarray<_TypeT>& __rhs){" transform (_C_array.begin (), H _C_array.begin () + (_STD::min)(size (), __rhs.size ()), ; __rhs._C_array.begin (), _C_array.begin (), " modulus<_TypeT>()); return *this;}template inline valarray<_TypeT>&<valarray<_TypeT>::operator^= (const valarray<_TypeT>& __rhs){" transform (_C_array.begin (), H _C_array.begin () + (_STD::min)(size (), __rhs.size ()), ; __rhs._C_array.begin (), _C_array.begin (), , _RW::exclusive_or<_TypeT>()); return *this;}template inline valarray<_TypeT>&<valarray<_TypeT>::operator&= (const valarray<_TypeT>& __rhs){" transform (_C_array.begin (), H _C_array.begin () + (_STD::min)(size (), __rhs.size ()), ; __rhs._C_array.begin (), _C_array.begin (), + _RW::bitwise_and<_TypeT>()); return *this;}template inline valarray<_TypeT>&<valarray<_TypeT>::operator|= (const valarray<_TypeT>& __rhs){" transform (_C_array.begin (), H _C_array.begin () + (_STD::min)(size (), __rhs.size ()), ; __rhs._C_array.begin (), _C_array.begin (), * _RW::bitwise_or<_TypeT>()); return *this;}template inline valarray<_TypeT>&=valarray<_TypeT>::operator<<= (const valarray<_TypeT>& __rhs){" transform (_C_array.begin (), H _C_array.begin () + (_STD::min)(size (), __rhs.size ()), ; __rhs._C_array.begin (), _C_array.begin (), * _RW::shift_left<_TypeT>()); return *this;}template inline valarray<_TypeT>&=valarray<_TypeT>::operator>>= (const valarray<_TypeT>& __rhs){" transform (_C_array.begin (), H _C_array.begin () + (_STD::min)(size (), __rhs.size ()), ; __rhs._C_array.begin (), _C_array.begin (), + _RW::shift_right<_TypeT>()); return *this;}template inline valarray<_TypeT>&2valarray<_TypeT>::operator*= (const _TypeT& __rhs){F transform (_C_array.begin (), _C_array.end (), _C_array.begin (), 6 bind2nd (multiplies<_TypeT>(), __rhs)); return *this;}template Kinline valarray<_TypeT>& valarray<_TypeT>::operator/= (const _TypeT& __rhs){F transform (_C_array.begin (), _C_array.end (), _C_array.begin (), 3 bind2nd (divides<_TypeT>(), __rhs)); return *this;}template Kinline valarray<_TypeT>& valarray<_TypeT>::operator+= (const _TypeT& __rhs){F transform (_C_array.begin (), _C_array.end (), _C_array.begin (), 0 bind2nd (plus<_TypeT>(), __rhs)); return *this;}template Kinline valarray<_TypeT>& valarray<_TypeT>::operator-= (const _TypeT& __rhs){F transform (_C_array.begin (), _C_array.end (), _C_array.begin (), 1 bind2nd (minus<_TypeT>(), __rhs)); return *this;}template Kinline valarray<_TypeT>& valarray<_TypeT>::operator%= (const _TypeT& __rhs){F transform (_C_array.begin (), _C_array.end (), _C_array.begin (), 3  bind2nd (modulus<_TypeT>(), __rhs)); return *this;}template Kinline valarray<_TypeT>& valarray<_TypeT>::operator^= (const _TypeT& __rhs){F transform (_C_array.begin (), _C_array.end (), _C_array.begin (), = bind2nd (_RW::exclusive_or<_TypeT>(), __rhs)); return *this;}template Kinline valarray<_TypeT>& valarray<_TypeT>::operator&= (const _TypeT& __rhs){F transform (_C_array.begin (), _C_array.end (), _C_array.begin (), < bind2nd (_RW::bitwise_and<_TypeT>(), __rhs)); return *this;}template Kinline valarray<_TypeT>& valarray<_TypeT>::operator|= (const _TypeT& __rhs){F transform (_C_array.begin (), _C_array.end (), _C_array.begin (), ; bind2nd (_RW::bitwise_or<_TypeT>(), __rhs)); return *this;}template Linline valarray<_TypeT>& valarray<_TypeT>::operator<<= (const _TypeT& __rhs){F transform (_C_array.begin (), _C_array.end (), _C_array.begin (), ; bind2nd (_RW::shift_left<_TypeT>(), __rhs)); return *this;}template Linline valarray<_TypeT>& valarray<_TypeT>::operator>>= (const _TypeT& __rhs){F transform (_C_array.begin (), _C_array.end (), _C_array.begin (), < bind2nd (_RW::shift_right<_TypeT>(), __rhs)); return *this;}template inline valarray<_TypeT>=valarray<_TypeT>::apply (value_type __fun (value_type)) const{3 return _RW::__rw_unary_function (*this, __fun);}template inline valarray<_TypeT>Dvalarray<_TypeT>::apply (value_type __fun (const value_type&)) const{3 return _RW::__rw_unary_function (*this, __fun);} // 26.3.3 - valarray non-members'// 26.3.3.1 - valarray binary operatorstemplateinline valarray<_TypeT>Hoperator* (const valarray<_TypeT> &__lhs, const valarray<_TypeT> &__rhs){, return valarray<_TypeT>(__lhs) *= __rhs;} templateinline valarray<_TypeT>Hoperator/ (const valarray<_TypeT> &__lhs, const valarray<_TypeT> &__rhs){, return valarray<_TypeT>(__lhs) /= __rhs;} templateinline valarray<_TypeT>Hoperator% (const valarray<_TypeT> &__lhs, const valarray<_TypeT> &__rhs){, return valarray<_TypeT>(__lhs) %= __rhs;}templateinline valarray<_TypeT>Hoperator+ (const valarray<_TypeT> &__lhs, const valarray<_TypeT> &__rhs){, return valarray<_TypeT>(__lhs) += __rhs;} templateinline valarray<_TypeT>Hoperator- (const valarray<_TypeT> &__lhs, const valarray<_TypeT> &__rhs){, return valarray<_TypeT>(__lhs) -= __rhs;} templateinline valarray<_TypeT>Hoperator^ (const valarray<_TypeT> &__lhs, const valarray<_TypeT> &__rhs){, return valarray<_TypeT>(__lhs) ^= __rhs;}templateinline valarray<_TypeT>Hoperator& (const valarray<_TypeT> &__lhs, const valarray<_TypeT> &__rhs){, return valarray<_TypeT>(__lhs) &= __rhs;}templateinline valarray<_TypeT>Hoperator| (const valarray<_TypeT> &__lhs, const valarray<_TypeT> &__rhs){, return valarray<_TypeT>(__lhs) |= __rhs;}templateinline valarray<_TypeT>Ioperator<< (const valarray<_TypeT> &__lhs, const valarray<_TypeT> &__rhs){- return valarray<_TypeT>(__lhs) <<= __rhs;}templateinline valarray<_TypeT>Hoperator>>(const valarray<_TypeT> &__lhs, const valarray<_TypeT> &__rhs){- return valarray<_TypeT>(__lhs) >>= __rhs;}templateinline valarrayIoperator&& (const valarray<_TypeT> &__lhs, const valarray<_TypeT> &__rhs){K return _RW::__rw_binary_function (__lhs, __rhs, logical_and<_TypeT>());}templateinline valarrayIoperator|| (const valarray<_TypeT> &__lhs, const valarray<_TypeT> &__rhs){J   return _RW::__rw_binary_function (__lhs, __rhs, logical_or<_TypeT>());}templateinline valarray<_TypeT>>operator* (const valarray<_TypeT> &__lhs, const _TypeT &__rhs){, return valarray<_TypeT>(__lhs) *= __rhs;} templateinline valarray<_TypeT>>operator/ (const valarray<_TypeT> &__lhs, const _TypeT &__rhs){, return valarray<_TypeT>(__lhs) /= __rhs;} templateinline valarray<_TypeT>>operator% (const valarray<_TypeT > &__lhs, const _TypeT &__rhs){, return valarray<_TypeT>(__lhs) %= __rhs;}templateinline valarray<_TypeT>>operator+ (const valarray<_TypeT> &__lhs, const _TypeT &__rhs){, return valarray<_TypeT>(__lhs) += __rhs;} templateinline valarray<_TypeT>>operator- (const valarray<_TypeT> &__lhs, const _TypeT &__rhs){, return valarray<_TypeT>(__lhs) -= __rhs;} templateinline valarray<_TypeT>>operator^ (const valarra y<_TypeT> &__lhs, const _TypeT &__rhs){, return valarray<_TypeT>(__lhs) ^= __rhs;}templateinline valarray<_TypeT>>operator& (const valarray<_TypeT> &__lhs, const _TypeT &__rhs){, return valarray<_TypeT>(__lhs) &= __rhs;}templateinline valarray<_TypeT>>operator| (const valarray<_TypeT> &__lhs, const _TypeT &__rhs){, return valarray<_TypeT>(__lhs) |= __rhs;}templateinline valarray<_TypeT>?operator<< (const va larray<_TypeT> &__lhs, const _TypeT &__rhs){- return valarray<_TypeT>(__lhs) <<= __rhs;}templateinline valarray<_TypeT>>operator>>(const valarray<_TypeT> &__lhs, const _TypeT &__rhs){- return valarray<_TypeT>(__lhs) >>= __rhs;}(// 26.3.3.2 - valarray logical operatorstemplateinline valarray?operator&& (const valarray<_TypeT> &__lhs, const _TypeT &__rhs){, return _RW::__rw_binary_function (__lhs,K   bind2nd (equal_to<_TypeT>(), __rhs));}templateinline valarray?operator|| (const valarray<_TypeT> &__lhs, const _TypeT &__rhs){, return _RW::__rw_binary_function (__lhs,M bind2nd (logical_or<_TypeT>(), __rhs));}templateinline valarray<_TypeT>>operator* (const _TypeT& __lhs, const valarray<_TypeT> &__rhs){, return _RW::__rw_binary_function (__rhs,M  bind1st (multiplies<_TypeT>(), __lhs));} templateinline valarray<_TypeT>>operator/ (const _TypeT &__lhs, const valarray<_TypeT> &__rhs){, return _RW::__rw_binary_function (__rhs,J bind1st (divides<_TypeT>(), __lhs));} templateinline valarray<_TypeT>>operator% (const _TypeT &__lhs, const valarray<_TypeT> &__rhs){, return _RW::__rw_binary_function (__rhs,J  bind1st (modulus<_TypeT>(), __lhs));}templateinline valarray<_TypeT>>operator+ (const _TypeT &__lhs, const valarray<_TypeT> &__rhs){N return _RW::__rw_binary_function (__rhs, bind1st (plus<_TypeT>(), __lhs));} templateinline valarray<_TypeT>>operator- (const _TypeT &__lhs, const valarray<_TypeT> &__rhs){O return _RW::__rw_binary_function (__rhs, bind1st (minus<_TypeT>(), __lhs));} templateinline valarray<_TypeT>>operator^ (const _TypeT &__lhs, const valarray<_TypeT> &__rhs){- return _RW::__rw_binary_function (__rhs, O bind1st (_RW::exclusive_or<_TypeT>(), __lhs));}templateinline valarray<_TypeT>>operator& (const _TypeT &__lhs, const valarray<_TypeT> &__rhs){- return _RW::__rw_binary_function (__rhs, N bind1st (_RW::bitwise_and<_TypeT>(), __lhs));}templateinline valarray<_TypeT>>operator| (const _TypeT &__lhs, const valarray<_TypeT> &__rhs){- return _RW::__rw_binary_function (__rhs, M bind1st (_RW::bitwise_or<_TypeT>(), __lhs));}templateinline valarray<_TypeT>?operator<< (const _TypeT &__lhs, const valarray<_TypeT> &__rhs){- return _RW::__rw_binary_function (__rhs, M bind1st (_RW::shift_left<_TypeT>(), __lhs));}templateinline valarray<_TypeT>>operator>>(const _TypeT &__lhs, const valarray<_TypeT> &__rhs){- return _RW::__rw_binary_function (__rhs, N bind1st (_RW::shift_right<_TypeT>(), __lhs));}templateinline valarray?operator&& (const _TypeT &__lhs, const valarray<_TypeT> &__rhs){- return _RW::__rw_binary_function (__rhs, I bind1st (logical_and<_TypeT>(), __lhs));}templateinline valarray?operator|| (const _TypeT &__lhs, const valarray<_TypeT> &__rhs){- return _RW::__rw_binary_function (__rhs, H bind1st (logical_or<_TypeT>(), __lhs));}templateinline valarrayIoperator== (const valarray<_TypeT> &__lhs, const valarray<_TypeT> &__rhs){H return _RW::__rw_binary_function (__lhs, __rhs, equal_to<_TypeT>());} templateinline valarrayIoperator!= (const valarray<_TypeT> &__lhs, const valarray<_TypeT> &__rhs){L return _RW::__rw_binary_function (__lhs, __rhs, not_equal_to<_TypeT>());} templateinline valarrayHoperator< (const valarray<_TypeT> &__lhs, const valarray<_TypeT> &__rhs){D return _RW::__rw_binary_function (__lhs, __rhs, less<_TypeT>());} templateinline valarrayGoperator>(const valarray<_TypeT> &__lhs, const valarray<_TypeT> &__rhs){G return _RW::__rw_binary_function (__lhs, __rhs, greater<_TypeT>());} templateinline valarrayIoperator<= (const valarray<_TypeT> &__lhs, const valarray<_TypeT> &__rhs){J return _RW::__rw_binary_function (__lhs, __rhs, less_equal<_TypeT>());}templatevalarrayIoperator>= (const valarray<_TypeT> &__lhs, const valarray<_TypeT> &__rhs){M return _RW::__rw_binary_function (__lhs, __rhs, greater_equal<_TypeT>());} templateinline valarray?operator== (const valarray<_TypeT> &__lhs, const _TypeT &__rhs){, return _RW::__rw_binary_function (__lhs,K bind2nd (equal_to<_TypeT>(), __rhs));} templateinline valarray?operator!= (const valarray<_TypeT> &__lhs, const _TypeT &__rhs){- return _RW::__rw_binary_function (__lhs, O bind2nd (not_equal_to<_TypeT>(), __rhs));} templateinline valarray>operator< (const valarray<_TypeT> &__lhs, const _TypeT &__rhs){N return _RW::__rw_binary_function (__lhs, bind2nd (less<_TypeT>(), __rhs));}templateinline valarray=operator>(const valarray<_TypeT> &__lhs, const _TypeT &__rhs){, return _RW::__rw_binary_function (__lhs,J bind2nd (greater<_TypeT>(), __rhs));} templateinline valarray?operator<= (const valarray<_TypeT> &__lhs, const _TypeT &__rhs){, return _RW::__rw_binary_function (__lhs,M bind2nd (less_equal<_TypeT>(), __rhs));} templateinline valarray?operator>= (const valarray<_TypeT> &__lhs, const _TypeT &__rhs){- return _RW::__rw_binary_function (__lhs, P bind2nd (greater_equal<_TypeT>(), __rhs));} templateinline valarray?operator== (const _TypeT &__lhs, const valarray<_TypeT> &__rhs){, return _RW::__rw_binary_function (__rhs,K bind1st (equal_to<_TypeT>(), __lhs));} templateinline valarray?operator!= (const _TypeT &__lhs, const valarray<_TypeT> &__rhs){- return _RW::__rw_binary_function (__rhs, O bind1st (not_equal_to<_TypeT>(), __lhs));} templateinline valarray>operator< (const _TypeT &__lhs, const valarray<_TypeT> &__rhs){N return _RW::__rw_binary_function (__rhs, bind1st (less<_TypeT>(), __lhs));} templateinline valarray=operator>(const _TypeT &__lhs, const valarray<_TypeT> &__rhs){, return _RW::__rw_binary_function (__rhs,J bind1st (greater<_TypeT>(), __lhs));} templateinline valarray?operator<= (const _TypeT &__lhs, const valarray<_TypeT> &__rhs){, return _RW::__rw_binary_function (__rhs,M  bind1st (less_equal<_TypeT>(), __lhs));} templateNvalarray operator>= (const _TypeT &__lhs, const valarray<_TypeT> &__rhs){- return _RW::__rw_binary_function (__rhs, P bind1st (greater_equal<_TypeT>(), __lhs));} &// 26.3.3.3 - valarray transcendentalsK// can't use function objects in definitions below due to different linkageI// of the math functions' overloads (e.g., extern "C" double cos (double).// and extern "C++" float cos (float), etc...)template;inline valarray<_TypeT> abs (const valarray<_TypeT> &__val){2 _RW::__rw_array<_TypeT> __tmp (__val.size ());< for (_RWSTD_SIZE_T __i = 0; __i != __val.size (); ++__i)2 __tmp [__i] = _RWSTD_C::abs (__val [__i]);# return valarray<_TypeT>(__tmp);}template<inline valarray<_TypeT> acos (const valarray<_TypeT> &__val){2 _RW::__rw_array<_TypeT> __tmp (__val.size ());< for (_RWSTD_SIZE_T __i = 0; __i != __val.size (); ++__i)3 __tmp [__i] = _RWSTD_C::acos (__val [__i]);# return valarray<_TypeT>(__tmp);}template<inline valarray<_TypeT> asin (const valarray<_TypeT> &__val){2 _RW::__rw_array<_TypeT> __tmp (__val.size ());< for (_RWSTD_SIZE_T __i = 0; __i != __val.size (); ++__i)3 __tmp [__i] = _RWSTD_C::asin (__val [__i]);# return valarray<_TypeT>(__tmp);}template5valarray<_TypeT> atan (const valarray<_TypeT> &__val){2 _RW::__rw_array<_TypeT> __tmp (__val.size ());< for (_RWSTD_SIZE_T __i = 0; __i != __val.size (); ++__i)3 __tmp [__i] = _RWSTD_C::atan (__val [__i]);# return valarray<_TypeT>(__tmp);}template;inline valarray<_TypeT> cos (const valarray<_TypeT> &__val){2 _RW::__rw_array<_TypeT> __tmp (__val.size ());< for (_RWSTD_SIZE_T __i = 0; __i != __val.size (); ++__i)2 __tmp [__i] = _RWSTD_C::cos (__val [__i]);# return valarray<_TypeT>(__tmp);}template<inline valarray<_TypeT> cosh (const valarray<_TypeT> &__val){2 _RW::__rw_array<_TypeT> __tmp (__val.size ());< for (_RWSTD_SIZE_T __i = 0; __i != __val.size (); ++__i)3 __tmp [__i] = _RWSTD_C::cosh (__val [__i]);# return valarray<_TypeT>(__tmp);}template;inline valarray<_TypeT> exp (const valarray<_TypeT> &__val){2 _RW::__rw_array<_TypeT> __tmp (__val .size ());< for (_RWSTD_SIZE_T __i = 0; __i != __val.size (); ++__i)2 __tmp [__i] = _RWSTD_C::exp (__val [__i]);# return valarray<_TypeT>(__tmp);}template;inline valarray<_TypeT> log (const valarray<_TypeT> &__val){2 _RW::__rw_array<_TypeT> __tmp (__val.size ());< for (_RWSTD_SIZE_T __i = 0; __i != __val.size (); ++__i)2 __tmp [__i] = _RWSTD_C::log (__val [__i]);# return valarray<_TypeT>(__tmp);}template=inli!ne valarray<_TypeT> log10 (const valarray<_TypeT> &__val){2 _RW::__rw_array<_TypeT> __tmp (__val.size ());< for (_RWSTD_SIZE_T __i = 0; __i != __val.size (); ++__i)4 __tmp [__i] = _RWSTD_C::log10 (__val [__i]);# return valarray<_TypeT>(__tmp);}template<inline valarray<_TypeT> sinh (const valarray<_TypeT> &__val){2 _RW::__rw_array<_TypeT> __tmp (__val.size ());< for (_RWSTD_SIZE_T __i = 0; __i != __val.size (); ++__i)3 __tmp [__i] "= _RWSTD_C::sinh (__val [__i]);# return valarray<_TypeT>(__tmp);}template;inline valarray<_TypeT> sin (const valarray<_TypeT> &__val){2 _RW::__rw_array<_TypeT> __tmp (__val.size ());< for (_RWSTD_SIZE_T __i = 0; __i != __val.size (); ++__i)2 __tmp [__i] = _RWSTD_C::sin (__val [__i]);# return valarray<_TypeT>(__tmp);}template<inline valarray<_TypeT> sqrt (const valarray<_TypeT> &__val){2 _RW::__rw_array<_TypeT> __tm#p (__val.size ());< for (_RWSTD_SIZE_T __i = 0; __i != __val.size (); ++__i)3 __tmp [__i] = _RWSTD_C::sqrt (__val [__i]);# return valarray<_TypeT>(__tmp);}template;inline valarray<_TypeT> tan (const valarray<_TypeT> &__val){2 _RW::__rw_array<_TypeT> __tmp (__val.size ());< for (_RWSTD_SIZE_T __i = 0; __i != __val.size (); ++__i)2 __tmp [__i] = _RWSTD_C::tan (__val [__i]);# return valarray<_TypeT>(__tmp);}template<inline valarray<_TypeT> tanh (const valarray<_TypeT> &__val){2 _RW::__rw_array<_TypeT> __tmp (__val.size ());< for (_RWSTD_SIZE_T __i = 0; __i != __val.size (); ++__i)3 __tmp [__i] = _RWSTD_C::tanh (__val [__i]);# return valarray<_TypeT>(__tmp);}templateinline valarray<_TypeT>@atan2 (const valarray<_TypeT> &__x, const valarray<_TypeT> &__y){/ _RWSTD_ASSERT (__x.size () == __y.size ());0 _RW::__rw_array<_TypeT> __tmp (__x.size ()%);< for (_RWSTD_SIZE_T __i = 0; __i != __tmp.size (); ++__i)= __tmp [__i] = _RWSTD_C::atan2 (__x [__i], __y [__i]);# return valarray<_TypeT>(__tmp);}templateNinline valarray<_TypeT> atan2 (const valarray<_TypeT> &__x, const _TypeT &__y){0 _RW::__rw_array<_TypeT> __tmp (__x.size ());< for (_RWSTD_SIZE_T __i = 0; __i != __tmp.size (); ++__i)7 __tmp [__i] = _RWSTD_C::atan2 (__x [__i], __y);# return valarray<_TypeT>(__tmp);}te&mplateNinline valarray<_TypeT> atan2 (const _TypeT &__x, const valarray<_TypeT> &__y){0 _RW::__rw_array<_TypeT> __tmp (__y.size ());< for (_RWSTD_SIZE_T __i = 0; __i != __tmp.size (); ++__i)7 __tmp [__i] = _RWSTD_C::atan2 (__x, __y [__i]);# return valarray<_TypeT>(__tmp);}templateinline valarray<_TypeT>>pow (const valarray<_TypeT> &__x, const valarray<_TypeT> &__y){/ _RWSTD_ASSERT (__x.size () == __y.size ());0 _RW::__r'w_array<_TypeT> __tmp (__x.size ());< for (_RWSTD_SIZE_T __i = 0; __i != __tmp.size (); ++__i); __tmp [__i] = _RWSTD_C::pow (__x [__i], __y [__i]);# return valarray<_TypeT>(__tmp);}templateLinline valarray<_TypeT> pow (const valarray<_TypeT> &__x, const _TypeT &__y){0 _RW::__rw_array<_TypeT> __tmp (__x.size ());< for (_RWSTD_SIZE_T __i = 0; __i != __tmp.size (); ++__i)5 __tmp [__i] = _RWSTD_C::pow (__x [__i], __y);# return valarra(y<_TypeT>(__tmp);}templateLinline valarray<_TypeT> pow (const _TypeT &__x, const valarray<_TypeT> &__y){0 _RW::__rw_array<_TypeT> __tmp (__y.size ());< for (_RWSTD_SIZE_T __i = 0; __i != __tmp.size (); ++__i)5 __tmp [__i] = _RWSTD_C::pow (__x, __y [__i]);# return valarray<_TypeT>(__tmp);} // 26.3.4class _RWSTD_EXPORT slice{public:< slice (): _C_start (0), _C_length (0), _C_stride (0) { }Q slice (_RWSTD_SIZE_T __start, _R)WSTD_SIZE_T __length, _RWSTD_SIZE_T __stride) : _C_start (__start) , _C_length (__length) , _C_stride (__stride) { }( // 26.3.4.2 - slice access functions" _RWSTD_SIZE_T start () const { return _C_start; }! _RWSTD_SIZE_T size () const { return _C_length; }# _RWSTD_SIZE_T stride () const { return _C_stride; }private:0 _RWSTD_SIZE_T _C_start; // starting offset5 _RWSTD_SIZE_T _C_length; //* length of this slice8 _RWSTD_SIZE_T _C_stride; // offset between elements};0// 26.3.5 - helper class not to be directly usedtemplate class slice_array{" friend class valarray<_TypeT>;public: typedef _TypeT value_type;* slice_array (const slice_array &__rhs). : _C_array(__rhs.get_ref_mem_array()),% _C_slice(__rhs.get_slice()) { }  // implementationE slice_array (_RW::__rw_array* __a,+ const slice &__s)  : _C_array (__a), _C_slice (__s) { }= _RW::__rw_array* get_ref_mem_array () const { return _C_array; } slice get_slice () const { return _C_slice; } // 26.3.5.4 - fill function- void operator= (const value_type&) const; // 26.3.5.2 - assignment> void operator= (const valarray &__rhs) const {M _RW::__rw_unary_function (*this, __rhs, _RW::identity()); }1 // 26.3.5.3 - slice_array computed assignment? void operator*= (const valarray &__rhs) const {K _RW::__rw_binary_function (*this, __rhs, multiplies()); }? void operator/= (const valarray &__rhs) const {H _RW::__rw_binary_function (*this, __rhs, divides()); }? void operator+= (const valarray &__rhs) const {E _RW::__rw_binary_function (*this, __rhs, plus()); }? void operator-= (const valarray &__rhs) const {F _RW::__rw_binary_function (*this, __rhs, minus()); }? void operator%= (const valarray &__rhs) const {H _RW::__rw_binary_function (*this, __rhs, modulus()); }? void operator^= (const valarray &__rhs) const {0 _RW::__rw_binary_function (*this, __rhs,D _RW::exclusive_or()); . }? void operator&= (const valarray &__rhs) const {0 _RW::__rw_binary_function (*this, __rhs,C _RW::bitwise_and()); }? void operator|= (const valarray &__rhs) const {P _RW::__rw_binary_function (*this, __rhs, _RW::bitwise_or()); }@ void operator<<= (const valarray &__rhs) const {P _RW::__rw_binary_function (*this, __rhs, _RW::shift_left()/); }@ void operator>>= (const valarray &__rhs) const {0 _RW::__rw_binary_function (*this, __rhs,C _RW::shift_right()); }private: slice_array (); 0 slice_array& operator= (const slice_array&);G _RW::__rw_array *_C_array; // the referenced valarrayL slice _C_slice; // slice of referenced valarray};template Jinline void slice_array<_T0ypeT>::operator= (const value_type &__rhs) const{> // assign the value `__rhs' to the given slice of valarray7 for (_RWSTD_SIZE_T __i = _C_slice.start(), __j = 0;< __i < _C_array->size () && __j != _C_slice.size ();* __i += _C_slice.stride (), ++__j)! (*_C_array)[__i] = __rhs;}+// 26.3.6 - generalized slice of a valarrayclass _RWSTD_EXPORT gslice{public: // 26.3.6.1 gslice () : _C_start (0), _C_reset (true) 1 { } 3 gslice (_RWSTD_SIZE_T __start,4 const valarray<_RWSTD_SIZE_T>& __length,4 const valarray<_RWSTD_SIZE_T>& __stride) : _C_start (__start), _C_length (__length), _C_stride (__stride), _C_reset (true),< _C_r_length ((_RWSTD_SIZE_T)0, __length.size ()) {? _RWSTD_ASSERT (_C_length.size () == _C_stride.size ()); }! gslice (const gslice &__rhs) $ : 2_C_start (__rhs._C_start),& _C_length (__rhs._C_length),& _C_stride (__rhs._C_stride), _C_reset (true),C _C_r_length ((_RWSTD_SIZE_T)0, __rhs._C_length.size ()) {? _RWSTD_ASSERT (_C_length.size () == _C_stride.size ()); } // 26.3.6.2" _RWSTD_SIZE_T start () const { return _C_start; }+ valarray<_RWSTD_SIZE_T> size () const { return _C_length; }- valarray<_RWSTD_SIZE_T> stride () const { 3 return _C_stride; } // convenience functions _RWSTD_SIZE_T next_ind (); bool is_reseted () const { return _C_reset; }$ _RWSTD_SIZE_T ind_numb () const;private:; _RWSTD_SIZE_T _C_start; // starting offsetH valarray<_RWSTD_SIZE_T> _C_length; // set of lengths (sizes equal)H valarray<_RWSTD_SIZE_T> _C_stride; // set of strides (sizes equal) bool _C_reset;) valarray<_RWSTD_SIZE_T> _C_r_length4;};template class gslice_array{" friend class valarray<_TypeT>;public: typedef _TypeT value_type;8 gslice_array (const gslice_array& __rhs)0 : _C_array (__rhs.get_ref_mem_array ()),' _C_slice (__rhs.get_slice ()) { }G gslice_array (_RW::__rw_array* __a, const gslice & __s) : _C_array (__a), _C_slice (__s) { }= _RW::__rw_array* get_ref_mem_a5rray () const { return _C_array; } gslice get_slice () const { return _C_slice; }= void operator= (const valarray &__rhs) const;3 void operator= (const value_type &__rhs) const;> void operator*= (const valarray &__rhs) const;> void operator/= (const valarray &__rhs) const;> void operator+= (const valarray &__rhs) const;> void operator-= (const valarray &__rhs) const;> vo 6id operator%= (const valarray &__rhs) const;> void operator^= (const valarray &__rhs) const;G void operator&= (const valarray &__rhs) const; G void operator|= (const valarray &__rhs) const; G void operator<<= (const valarray &__rhs) const; ? void operator>>= (const valarray &__rhs) const;private: gslice_array ();J gslice_array& operator= (const gslice_array&);* _RW::__rw_array* _C_array;* gslice _C_slice;}; template class mask_array{" friend class valarray<_TypeT>;public: typedef _TypeT value_type;4 mask_array (const mask_array &__rhs)0 : _C_array (__rhs.get_ref_mem_array ()),* _C_valarray (__rhs.get_array ()) { }N mask_array (_RW::__rw_array *__a, const valarray& __val) : _C_arr8ay (__a), _C_valarray (__val) { }= _RW::__rw_array* get_ref_mem_array () const { return _C_array; }' valarray get_array () const { return _C_valarray; }1 const valarray* get_array_pt () const { return &_C_valarray; }- void operator= (const value_type&) const;> void operator= (const valarray &__rhs) const {M _RW::__rw_unary_function (*this, __rhs, _RW::identit9y()); }? void operator*= (const valarray &__rhs) const {K _RW::__rw_binary_function (*this, __rhs, multiplies()); }? void operator/= (const valarray &__rhs) const {H _RW::__rw_binary_function (*this, __rhs, divides()); }? void operator+= (const valarray &__rhs) const {E _RW::__rw_binary_function (*this, __rhs, plus()); }? void operator-= (con:st valarray &__rhs) const {F _RW::__rw_binary_function (*this, __rhs, minus()); }? void operator%= (const valarray &__rhs) const {H _RW::__rw_binary_function (*this, __rhs, modulus()); }? void operator^= (const valarray &__rhs) const {0 _RW::__rw_binary_function (*this, __rhs,D _RW::exclusive_or()); }? void operator&= (const valarray<;value_type> &__rhs) const {0 _RW::__rw_binary_function (*this, __rhs,C _RW::bitwise_and()); }? void operator|= (const valarray &__rhs) const {P _RW::__rw_binary_function (*this, __rhs, _RW::bitwise_or()); }@ void operator<<= (const valarray &__rhs) const {P _RW::__rw_binary_function (*this, __rhs, _RW::shift_left()); }@ void operator>>= (const va<larray &__rhs) const {0 _RW::__rw_binary_function (*this, __rhs,C _RW::shift_right()); }private: mask_array ();G mask_array& operator= (const mask_array&); * _RW::__rw_array* _C_array;- valarray _C_valarray;};template Bvoid mask_array<_TypeT>::operator= (const value_type &__rhs) const{. _RWSTD_ASSERT (0 != get_ref_mem_=array ());9 _RW::__rw_array<_TypeT> &__a = *get_ref_mem_array ();D for (_RWSTD_SIZE_T __i = 0; __i != _C_valarray.size (); ++__i) { if (_C_valarray [__i]) __a [__i] = __rhs; }} A/****************************************************************A * INDIRECT_ARRAY *B ****************************************************************/template class indirect_array{" friend class val>array<_TypeT>;public: typedef _TypeT value_type;; indirect_array (const indirect_array& __sl), :_C_array (__sl.get_ref_mem_array ()),& _C_valarray (__sl.get_array ()) { }7 indirect_array (_RW::__rw_array *__a,8 const valarray<_RWSTD_SIZE_T> &__v)  :_C_array (__a), _C_valarray (__v) { }= _RW::__rw_array* get_ref_mem_array () const { return _C_array; ? }0 valarray<_RWSTD_SIZE_T> get_array () const { return _C_valarray; }: const valarray<_RWSTD_SIZE_T>* get_array_pt () const { return &_C_valarray; }- void operator= (const value_type&) const;> void operator= (const valarray &__rhs) const {/ _RW::__rw_unary_function (*this, __rhs,? _RW::identity()); }? void operator*= (const valarray &__rhs) const {0 @ _RW::__rw_binary_function (*this, __rhs,= multiplies()); }? void operator/= (const valarray &__rhs) const {0 _RW::__rw_binary_function (*this, __rhs,: divides()); }? void operator+= (const valarray &__rhs) const {0 _RW::__rw_binary_function (*this, __rhs,7 plus()); }? void opera Ator-= (const valarray &__rhs) const {0 _RW::__rw_binary_function (*this, __rhs,8 minus()); }? void operator%= (const valarray &__rhs) const {0 _RW::__rw_binary_function (*this, __rhs,: modulus()); }? void operator^= (const valarray &__rhs) const {0 _RW::__rw_binary_function (*this, __rhs,D B _RW::exclusive_or()); }? void operator&= (const valarray &__rhs) const {0 _RW::__rw_binary_function (*this, __rhs,C _RW::bitwise_and()); }? void operator|= (const valarray &__rhs) const {0 _RW::__rw_binary_function (*this, __rhs,B _RW::bitwise_or()); }@ void operator<<= (const valarray &__rhs) const {0 C _RW::__rw_binary_function (*this, __rhs,B _RW::shift_left()); }@ void operator>>= (const valarray &__rhs) const {0 _RW::__rw_binary_function (*this, __rhs,C _RW::shift_right()); }private: indirect_array ();7 indirect_array& operator= (const indirect_array&); * _RW::__rw_array* _C_array;- valarray<_RWSTD_SIZE_T> _C_valarray;D};template Iinline void indirect_array<_TypeT>::operator= (const _TypeT &__rhs) const{B for (_RWSTD_SIZE_T __i = 0; __i != _C_valarray.size (); ++__i)/ (*_C_array)[_C_valarray [__i]] = __rhs;}} // namespace std_RWSTD_NAMESPACE (__rw) { -template inline void<__rw_unary_function (const _STD::slice_array<_TypeT> &__lhs,< const _STD::valarray<_TypeT> &__rhs,< E _UnaryFunction __fun){4 _RWSTD_ASSERT (0 != __lhs.get_ref_mem_array ());7 _STD::slice __slice = __lhs.get_slice ();@ _RW::__rw_array<_TypeT> &__ar = *__lhs.get_ref_mem_array ();7 for (_RWSTD_SIZE_T __i = __slice.start (), __j = 0;) __j != __slice.size (); ++__j) {6 if (__j < __rhs.size () && __i < __ar.size ())- __ar [__i] = __fun (__rhs [__j]);! __i += __slice.stride (); }}.template inline void=__rw_binary_function (const _STD::slice_array<_TypeT> &__lhs,= const _STD::valarray<_TypeT> &__rhs,= _BinaryFunction __fun){4 _RWSTD_ASSERT (0 != __lhs.get_ref_mem_array ());7 _STD::slice __slice = __lhs.get_slice ();@ _RW::__rw_array<_TypeT> &__ar = *__lhs.get_ref_mem_array ();7 for (_RWSTD_SIZE_T __i = __slice.start (), __j = 0;) __j != __slice.sizeG (); ++__j) {6 if (__j < __rhs.size () && __i < __ar.size ())9 __ar [__i] = __fun (__ar [__i], __rhs [__j]);! __i += __slice.stride (); }}-template inline void;__rw_unary_function (const _STD::mask_array<_TypeT> &__lhs,; const _STD::valarray<_TypeT> &__rhs,; _UnaryFunction __fun){4 _RWSTD_ASSERT (0 != __lhs.get_ref_mem_array ());F _RW::__rw_Harray<_TypeT> &__ar = *__lhs.get_ref_mem_array ();A const _STD::valarray &__vlray = *__lhs.get_array_pt ();G for (_RWSTD_SIZE_T __i = 0, __j = 0; __i != __vlray.size (); ++__i) if (__vlray [__i])/ __ar [__i] = __fun (__rhs [__j++]);}.template inline void<__rw_binary_function (const _STD::mask_array<_TypeT> &__lhs,< const _STD::valarray<_TypeT> &__rhs,< _BinIaryFunction __fun){4 _RWSTD_ASSERT (0 != __lhs.get_ref_mem_array ());F _RW::__rw_array<_TypeT> &__ar = *__lhs.get_ref_mem_array ();A const _STD::valarray &__vlray = *__lhs.get_array_pt ();G for (_RWSTD_SIZE_T __i = 0, __j = 0; __i != __vlray.size (); ++__i) if (__vlray [__i]); __ar [__i] = __fun (__ar [__i], __rhs [__j++]);}-template inline void?__rw_unary_function (const _STD::indirecJt_array<_TypeT> &__lhs,? const _STD::valarray<_TypeT> &__rhs,? _UnaryFunction __fun){4 _RWSTD_ASSERT (0 != __lhs.get_ref_mem_array ());O _RW::__rw_array<_TypeT> &__ar = *__lhs.get_ref_mem_array ();J const _STD::valarray<_RWSTD_SIZE_T> &__vlray = *__lhs.get_array_pt ();> for (_RWSTD_SIZE_T __i = 0; __i != __vlray.size (); ++__i)3 __ar [__vlray [__i]] = __fun (__rhs [__i]);}.te Kmplate inline void@__rw_binary_function (const _STD::indirect_array<_TypeT> &__lhs,@ const _STD::valarray<_TypeT> &__rhs,@ _BinaryFunction __fun){4 _RWSTD_ASSERT (0 != __lhs.get_ref_mem_array ());O _RW::__rw_array<_TypeT> &__ar = *__lhs.get_ref_mem_array ();J const _STD::valarray<_RWSTD_SIZE_T> &__vlray = *__lhs.get_array_pt ();> for (_RWSTD_SIZE_T __iL = 0; __i != __vlray.size (); ++__i)I __ar [__vlray [__i]] = __fun (__ar [__vlray [__i]], __rhs [__i]);}} // namespace __rw_RWSTD_NAMESPACE (std) { B/*****************************************************************C * *C * GSLICE_ARRAY MEMBER FUNCTIONS *C * *D *********************************************M*********************/'// gslice_array inline member functionstemplate inline voidEgslice_array<_TypeT>::operator= (const valarray<_TypeT>& __rhs) const{9 gslice *gsl = _RWSTD_CONST_CAST (gslice*, &_C_slice);( _RWSTD_SIZE_T __i = gsl->next_ind(); _RWSTD_SIZE_T __cpt = 0;; while( (!gsl->is_reseted()) && (__cpt < __rhs.size()) ) {& (*_C_array)[__i] = __rhs[__cpt]; __i= gsl->next_ind(); __cpt++; }} template I inline void gslice_array<_TypeT>::operator= (const _TypeT& value) const { 9 gslice *gsl = _RWSTD_CONST_CAST (gslice*, &_C_slice);( _RWSTD_SIZE_T __i = gsl->next_ind(); while( !gsl->is_reseted() ) { (*_C_array)[__i] = value; __i= gsl->next_ind(); } }// computed assignment template T inline void gslice_array<_TypeT>::operator*= (const valarray<_TypeT>& __rhs) const {9 gslice *gsl = _RWSTD_CONST_CAST O(gslice*, &_C_slice);( _RWSTD_SIZE_T __i = gsl->next_ind(); _RWSTD_SIZE_T __cpt = 0;; while( (!gsl->is_reseted()) && (__cpt < __rhs.size()) ) {' (*_C_array)[__i] *= __rhs[__cpt]; __i= gsl->next_ind(); __cpt++; } } template T inline void gslice_array<_TypeT>::operator/= (const valarray<_TypeT>& __rhs) const { 9 gslice *gsl = _RWSTD_CONST_CAST (gslice*, &_C_slice);( _RWSTD_SIZE_T __i = gsl->next_ind(); _RWSTD_SPIZE_T __cpt = 0;; while( (!gsl->is_reseted()) && (__cpt < __rhs.size()) ) {' (*_C_array)[__i] /= __rhs[__cpt]; __i= gsl->next_ind(); __cpt++; } } template T inline void gslice_array<_TypeT>::operator+= (const valarray<_TypeT>& __rhs) const { 9 gslice *gsl = _RWSTD_CONST_CAST (gslice*, &_C_slice);( _RWSTD_SIZE_T __i = gsl->next_ind(); _RWSTD_SIZE_T __cpt = 0;; while( (!gsl->is_reseted()) && (__cpt < __rhs.size()) Q) {' (*_C_array)[__i] += __rhs[__cpt]; __i= gsl->next_ind(); __cpt++; } } template T inline void gslice_array<_TypeT>::operator-= (const valarray<_TypeT>& __rhs) const { 9 gslice *gsl = _RWSTD_CONST_CAST (gslice*, &_C_slice);( _RWSTD_SIZE_T __i = gsl->next_ind(); _RWSTD_SIZE_T __cpt = 0;; while( (!gsl->is_reseted()) && (__cpt < __rhs.size()) ) {' (*_C_array)[__i] -= __rhs[__cpt]; __i= gsl->next_indR(); __cpt++; } } template T inline void gslice_array<_TypeT>::operator%= (const valarray<_TypeT>& __rhs) const { 9 gslice *gsl = _RWSTD_CONST_CAST (gslice*, &_C_slice);( _RWSTD_SIZE_T __i = gsl->next_ind(); _RWSTD_SIZE_T __cpt = 0;; while( (!gsl->is_reseted()) && (__cpt < __rhs.size()) ) {' (*_C_array)[__i] %= __rhs[__cpt]; __i= gsl->next_ind(); __cpt++; } } template T inline vSoid gslice_array<_TypeT>::operator^= (const valarray<_TypeT>& __rhs) const { 9 gslice *gsl = _RWSTD_CONST_CAST (gslice*, &_C_slice);( _RWSTD_SIZE_T __i = gsl->next_ind(); _RWSTD_SIZE_T __cpt = 0;; while( (!gsl->is_reseted()) && (__cpt < __rhs.size()) ) {' (*_C_array)[__i] ^= __rhs[__cpt]; __i= gsl->next_ind(); __cpt++; } } template T inline void gslice_array<_TypeT>::operator&= (const valarray<_TypeT>& __rhs) const T{ 9 gslice *gsl = _RWSTD_CONST_CAST (gslice*, &_C_slice);( _RWSTD_SIZE_T __i = gsl->next_ind(); _RWSTD_SIZE_T __cpt = 0;; while( (!gsl->is_reseted()) && (__cpt < __rhs.size()) ) {' (*_C_array)[__i] &= __rhs[__cpt]; __i= gsl->next_ind(); __cpt++; } } template T inline void gslice_array<_TypeT>::operator|= (const valarray<_TypeT>& __rhs) const { 9 gslice *gsl = _RWSTD_CONST_CAST (gslice*, &_C_slice);( _RWSTD_SIZUE_T __i = gsl->next_ind(); _RWSTD_SIZE_T __cpt = 0;; while( (!gsl->is_reseted()) && (__cpt < __rhs.size()) ) {' (*_C_array)[__i] |= __rhs[__cpt]; __i= gsl->next_ind(); __cpt++; } } template U inline void gslice_array<_TypeT>::operator<<= (const valarray<_TypeT>& __rhs) const { 9 gslice *gsl = _RWSTD_CONST_CAST (gslice*, &_C_slice);( _RWSTD_SIZE_T __i = gsl->next_ind(); _RWSTD_SIZE_T __cpt = 0;; while( (!gslV->is_reseted()) && (__cpt < __rhs.size()) ) {( (*_C_array)[__i] <<= __rhs[__cpt]; __i= gsl->next_ind(); __cpt++; } } template U inline void gslice_array<_TypeT>::operator>>= (const valarray<_TypeT>& __rhs) const { 9 gslice *gsl = _RWSTD_CONST_CAST (gslice*, &_C_slice);( _RWSTD_SIZE_T __i = gsl->next_ind(); _RWSTD_SIZE_T __cpt = 0;; while( (!gsl->is_reseted()) && (__cpt < __rhs.size()) ) {( (*_C_array)[__i]W >>= __rhs[__cpt]; __i= gsl->next_ind(); __cpt++; } }-inline _RWSTD_SIZE_T gslice::ind_numb() const{ _RWSTD_SIZE_T value = 1;; for(_RWSTD_SIZE_T __i=0; __i< _C_length.size(); __i++ ) value*= _C_length[__i]; return value;}template Jinline valarray<_TypeT> valarray<_TypeT>::operator[] (slice __slice) const{$ _RW::__rw_array <_TypeT> __tmp =5 _RW::__rw_array <_TypeT>(_TypeT (), size ()); N foXr (_RWSTD_SIZE_T __i = __slice.start (), __j = 0; __j != __slice.size();( __i += __slice.stride (), ++__j)% __tmp [__j] = _C_array [__i];# return valarray<_TypeT>(__tmp);}template Dinline valarray<_TypeT>::valarray (const slice_array<_TypeT>& sl_ar){$ _RW::__rw_array <_TypeT> __tmp =G _RW::__rw_array <_TypeT>(_TypeT (), sl_ar.get_slice ().size()); 2 _RWSTD_SIZE_T __i = sl_ar.get_slice().start(); _RWSTD_SIZE_T __cpt = 0; Y- while( __cpt < sl_ar.get_slice().size() ) {; __tmp[__cpt] = (*(sl_ar.get_ref_mem_array()))[__i];) __i+= sl_ar.get_slice().stride(); __cpt++; } _C_array.swap (__tmp);} template inline valarray<_TypeT>&>valarray<_TypeT>::operator= (const slice_array<_TypeT>& sl_ar){ $ _RW::__rw_array <_TypeT> __tmp =G _RW::__rw_array <_TypeT>(_TypeT (), sl_ar.get_slice ().size());2 _RWSTD_SIZE_T __i = sl_ar.get_slicZe().start(); _RWSTD_SIZE_T __cpt = 0; - while( __cpt < sl_ar.get_slice().size() ) {9 __tmp[__cpt] = (*(sl_ar.get_ref_mem_array()))[__i];' __i+= sl_ar.get_slice().stride(); __cpt++; }1 if ( &_C_array == sl_ar.get_ref_mem_array() ) _C_array.resize(0);  _C_array.swap (__tmp); return *this;}template inline valarray<_TypeT>4valarray<_TypeT>::operator[](const gslice& sl) const{$ _RW::__rw_array <_Ty[peT> __tmp =; _RW::__rw_array <_TypeT>(_TypeT (), sl.ind_numb());3 gslice *gsl = _RWSTD_CONST_CAST (gslice*, &sl);( _RWSTD_SIZE_T __i = gsl->next_ind(); _RWSTD_SIZE_T __cpt = 0; while( !sl.is_reseted() ) {# __tmp[__cpt] = _C_array[__i]; __i= gsl->next_ind(); __cpt++; }# return valarray<_TypeT>(__tmp);}template Dinline valarray<_TypeT>::valarray(const gslice_array<_TypeT>& sl_ar){! gslice sl(sl_a\r.get_slice());$ _RW::__rw_array <_TypeT> __tmp =; _RW::__rw_array <_TypeT>(_TypeT (), sl.ind_numb());& _RWSTD_SIZE_T __i = sl.next_ind(); _RWSTD_SIZE_T __cpt = 0; while( !sl.is_reseted() ) {9 __tmp[__cpt] = (*(sl_ar.get_ref_mem_array()))[__i]; __i= sl.next_ind(); __cpt++; } _C_array.swap (__tmp);}template inline valarray<_TypeT>&?valarray<_TypeT>::operator= (const gslice_array<_TypeT>& sl_ar){ !] gslice sl(sl_ar.get_slice());$ _RW::__rw_array <_TypeT> __tmp =; _RW::__rw_array <_TypeT>(_TypeT (), sl.ind_numb());& _RWSTD_SIZE_T __i = sl.next_ind(); _RWSTD_SIZE_T __cpt = 0; while( !sl.is_reseted() ) {9 __tmp[__cpt] = (*(sl_ar.get_ref_mem_array()))[__i]; __i= sl.next_ind(); __cpt++; }1 if ( &_C_array == sl_ar.get_ref_mem_array() ) _C_array.resize(0);  _C_array.swap (__tmp); return *this;}^template inline valarray<_TypeT>?valarray<_TypeT>::operator[](const valarray& __rhs) const{ _RWSTD_SIZE_T __i, __n = 0;* for(__i=0; __i < __rhs.size(); __i++ ) if ( __rhs[__i]) __n++;N _RW::__rw_array <_TypeT> __tmp = _RW::__rw_array <_TypeT>(_TypeT (), __n);  _RWSTD_SIZE_T __cpt = 0; + for( __i=0; __i < __rhs.size(); __i++ )8 if ( __rhs[__i]) __tmp[__cpt++] = _C_array[__i];# return valarray<_TypeT>(__tmp);}_template Binline valarray<_TypeT>::valarray(const mask_array<_TypeT>& __rhs){O mask_array<_TypeT> *msk = _RWSTD_CONST_CAST (mask_array<_TypeT>*, &__rhs);3 const valarray*sec = msk->get_array_pt(); _RWSTD_SIZE_T __i, __n = 0;* for(__i = 0; __i < sec->size(); __i++) if ( (*sec)[__i]) __n++;N _RW::__rw_array <_TypeT> __tmp = _RW::__rw_array <_TypeT>(_TypeT (), __n);  _RWSTD_SIZE_T __cpt = 0; * for( __i=0; __i < sec-`>size(); __i++ )M if ( (*sec)[__i]) __tmp[__cpt++] = (*(__rhs.get_ref_mem_array()))[__i]; _C_array.swap (__tmp);}template inline valarray<_TypeT>&=valarray<_TypeT>::operator= (const mask_array<_TypeT>& __rhs){ O mask_array<_TypeT> *msk = _RWSTD_CONST_CAST (mask_array<_TypeT>*, &__rhs);3 const valarray*sec = msk->get_array_pt(); _RWSTD_SIZE_T __i, __n = 0;+ for (__i = 0; __i < sec->size(); __i++) if ((*sec)[__i]) a __n++;N _RW::__rw_array <_TypeT> __tmp = _RW::__rw_array <_TypeT>(_TypeT (), __n);  _RWSTD_SIZE_T __cpt = 0; * for( __i=0; __i < sec->size(); __i++ )M if ( (*sec)[__i]) __tmp[__cpt++] = (*(__rhs.get_ref_mem_array()))[__i];1 if ( &_C_array == __rhs.get_ref_mem_array() ) _C_array.resize(0);  _C_array.swap (__tmp); return *this;}template inline valarray<_TypeT>Hvalarray<_TypeT>::operator[](const valarray<_RWSbTD_SIZE_T>& __rhs) const{M _RW::__rw_array <_TypeT> __tmp = _RW::__rw_array <_TypeT>(__rhs.size ());>#if defined (__GNUG__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 97> for (_RWSTD_SIZE_T __i = 0; __i != __rhs.size (); ++__i) {# // prevent a g++ 2.95.2 ICE/ _TypeT *__place = __tmp.begin () + __i;4 new (__place) _TypeT ((*this)[__rhs [__i]]); }#else // if __GNUG__ >= 2.97< for (_RWSTD_SIZE_T __i = 0; __i != __rhs.size (); ++__i)9 new (&__ctmp [__i]) _TypeT ((*this)[__rhs [__i]]);#endif // __GNUG__ >= 2.97 return valarray (__tmp);}template Ginline valarray<_TypeT>::valarray (const indirect_array<_TypeT>& __rhs){" indirect_array<_TypeT> *__ia =< _RWSTD_CONST_CAST (indirect_array<_TypeT>*, &__rhs);@ const valarray<_RWSTD_SIZE_T> *__sec = __ia->get_array_pt();$ _RW::__rw_array <_TypeT> __tmp =; _RW::__rw_array <_TypeT>(_TypeT (), __sec->size());  _RWSTDd_SIZE_T __cpt = 0; 9 for(_RWSTD_SIZE_T __i=0; __i < __sec->size(); __i++ )E __tmp[__cpt++] = (*(__rhs.get_ref_mem_array()))[(*__sec)[__i]]; _C_array.swap (__tmp);}template inline valarray<_TypeT>&Avalarray<_TypeT>::operator= (const indirect_array<_TypeT>& __rhs){ " indirect_array<_TypeT> *__ia =< _RWSTD_CONST_CAST (indirect_array<_TypeT>*, &__rhs);@ const valarray<_RWSTD_SIZE_T> *__sec = __ia->get_array_pt();$ _RW::__rw_array e<_TypeT> __tmp =; _RW::__rw_array <_TypeT>(_TypeT (), __sec->size());  _RWSTD_SIZE_T __cpt = 0; 9 for(_RWSTD_SIZE_T __i=0; __i < __sec->size(); __i++ )E __tmp[__cpt++] = (*(__rhs.get_ref_mem_array()))[(*__sec)[__i]];0 if (&_C_array == __rhs.get_ref_mem_array() ) _C_array.resize(0);  _C_array.swap (__tmp); return *this;}template inline slice_array<_TypeT>(valarray<_TypeT>::operator[] (slice __x){3 return sflice_array(&_C_array, __x);}template inline gslice_array<_TypeT>0valarray<_TypeT>::operator[] (const gslice &__x){4 return gslice_array(&_C_array, __x);}template inline mask_array<_TypeT>8valarray<_TypeT>::operator[] (const valarray &__x){2 return mask_array(&_C_array, __x);}template inline indirect_array<_TypeT>Avalarray<_TypeT>::operator[] (const valarray<_RWSTgD_SIZE_T> &__x){6 return indirect_array(&_C_array, __x);}} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif##ifdef _RWSTD_NO_IMPLICIT_INCLUSION# include #endif#ifdef _MSC_VER# pragma warning (pop)#endif // _MSC_VER#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif$#endif // _RWSTD_VALARRAY_INCLUDEDww ir7ԦL/*************************************************************************** *> * valaray.cc - Declarations for the Standard Library valarray *0 * $Id: //stdlib/3.0-rel/include/valarray.cc#3 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consistent with FAR j12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other la kws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer softwar le is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L *******m*******************************************************************/#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) { template 8valarray<_TypeT> valarray<_TypeT>::shift (int __n) constn{ if (0 == __n) return *this;9 if (size () <= (_RWSTD_SIZE_T)(__n < 0 ? -__n : __n))- return valarray (_TypeT (), size ()); $ _RW::__rw_array <_TypeT> __tmp =6 _RW::__rw_array <_TypeT> (_TypeT (), size ());< // 26.3.2.7, p5 - negative n shifts right, positive left if (__n < 0)N copy (_C_array.begin (), _C_array.end () + __n, __tmp.begin () - __n); elseH copy (_C_array.begin () + __n, _C_array.end (), __tmp.begin ()o); return valarray (__tmp);} template 9valarray<_TypeT> valarray<_TypeT>::cshift (int __n) const{< // compute non-negative modulus - the sign of (a % b) isF // implementation-defined if either argument is negative (5.6, p4)> _RWSTD_PTRDIFF_T __mod = __n % _RWSTD_PTRDIFF_T (size ());8 _RWSTD_SIZE_T __rem = __mod < 0 ? -__mod : __mod; if (0 == __rem) return *this;- _RW::__rw_array <_TypeT> __tmp (size ());= // 26.3.2.7,p p7 - negative n rotates right, positive left# rotate_copy (_C_array.begin (),O __n < 0 ? _C_array.end () - __rem : _C_array.begin () + __rem,2 _C_array.end (), __tmp.begin ()); return valarray (__tmp);} } // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endifwwr"r7Ԧ// -*- C++ -*-L/*************************************************************************** *> * vector - declarations for the Standard Library vector class *+ * $Id: //stdlib/3.0-rel/include/vector#6 $ *L *************************************************************************** * > * Copyright 2002 Compaq Information Technologies Group, L.P. *C * Compaq and the Compaq logo are trademarks of Compaq Information@ * Technologies Group, L.P. in the U.S. and/o sr other countries. *J * Confidential computer software. Valid license from Compaq required forF * possession, use or copying. Consistent with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** * * Copyright (c) 1994 * Hewlett-Packard Compa tny *E * Permission to use, copy, modify, distribute and sell this softwareG * and its documentation for any purpose is hereby granted without fee,D * provided that the above copyright notice appear in all copies andD * that both that copyright notice and this permission notice appearA * in supporting documentation. Hewlett-Packard Company makes noA * representations about the suitability of this software for anyH * purpose. It is provided "as is" without express or implied warranty. * uL *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance vwith the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Softwware clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/#ifndef _RWSTD_VECTOR_INCLUDED#define _RWSTD_VECTOR_INCLUDED#include #include !#include #incluxde !#include #include #if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) { template ) >!class vector : private _Allocator{public:B typedef _TypeT value_type;F typedef _Allocator allocator_type;A typedef _TYPENAME allocator_type::size_type size_type;G typedef _TYPENAME allocator_type::difference_type difference_type;A typedef _TYPENAME allocator_type::reference reference;G typedef _TYPENAME allocator_type::const_reference const_referzence;? typedef _TYPENAME allocator_type::pointer pointer;E typedef _TYPENAME allocator_type::const_pointer const_pointer;#ifndef _RWSTD_NO_DEBUG_ITERF typedef _RW::__rw_debug_iter iterator; A typedef _RW::__rw_debug_iter  const_iterator;+ iterator _C_make_iter (pointer __ptr) {' return iterator (*this, __ptr); }7 const_iterator _C_make_iter (pointer __ptr) cons{t {- return const_iterator (*this, __ptr); },#else // if defined (_RWSTD_NO_DEBUG_ITER)% typedef pointer iterator;+ typedef const_pointer const_iterator;+ iterator _C_make_iter (pointer __ptr) { return __ptr; }= const_iterator _C_make_iter (const_pointer __ptr) const { return __ptr; } #endif // _RWSTD_NO_DEBUG_ITER%#ifndef _RWSTD_NO_CLASS_PARTIAL_SPEC J typedef _STD::reverse_iterator| const_reverse_iterator;D typedef _STD::reverse_iterator reverse_iterator;4#else // if defined (_RWSTD_NO_CLASS_PARTIAL_SPEC)3 typedef _STD::reverse_iterator const_reverse_iterator;- typedef _STD::reverse_iterator reverse_iterat}or;)#endif // _RWSTD_NO_CLASS_PARTIAL_SPEC protected:K typedef _RWSTD_ALLOC_TYPE (_Allocator, value_type) _C_value_alloc_type; pointer _C_start;! pointer _C_finish;) pointer _C_end_of_storage;3 void _C_insert_aux (iterator, const_reference); > void _C_insert_aux (iterator, size_type, const_reference); "#ifndef _RWSTD_NO_MEMBER_TEMPLATES templateA void _C_insert_aux2 (iterator __position, ~_InputIter __first,, _InputIter __last);#elseC void _C_insert_aux2 (iterator, const_iterator, const_iterator);#endif)#ifndef _RWSTD_NO_INLINE_MEMBER_TEMPLATES template@ void _C_insert_aux (iterator __position, _InputIter __first,I _InputIter __last, _RWSTD_DISPATCH_INT (false)) {5 _C_insert_aux2 (__position, __first, __last); } template@ void _C_insert_aux (iter ator __position, _InputIter __first,H _InputIter __last, _RWSTD_DISPATCH_INT (true)) {? _C_insert_aux (__position, (size_type)__first, __last); }  template : void _C_insert_interval_dispatch (iterator __position,: _InputIter __first, 8 _InputIter __last,= forward_iterator_tag) {3 _C_insert_aux (__position, __f irst, __last,5 _RWSTD_DISPATCH (_InputIter)); }  template : void _C_insert_interval_dispatch (iterator __position,: _InputIter __first, 8 _InputIter __last,< input_iterator_tag) { # while(__first != __last) { 7 __position = insert (__position,*__first);  ++__position; ++__first; } }#endif; void _C_destroy (iterator __start, iterator __finish) {/ for ( ; __start != __finish; ++__start)4 _RWSTD_VALUE_ALLOC (_C_value_alloc_type,A destroy (_RWSTD_VALUE_ALLOC (_C_value_alloc_type,4 address (*__start)))); }  // 1 // Allocate buffers and fill with __n values //; void _C_initn(size_type __n, const_reference __value) {' size_type __initial_capacity = E (max)(__n, size_type (_RW::__rw_new_capacity (0, this)));: _C_start = _RWSTD_VALUE_ALLOC(_C_value_alloc_type,F allocate(__initial_capacity,0)); _TRY {7 uninitialized_fill_n(begin(), __n, __value,B _RWSTD_VALUE_ALLOC_CAST (*this)); } _CATCH (...) {N _RWSTD_VALUE_ALLOC(_C_value_alloc_type, deallocate(_C_start,__n)); _RETHROW; }#  _C_finish = _C_start + __n;: _C_end_of_storage = _C_start + __initial_capacity; } public:D _EXPLICIT vector (const _Allocator& __alloc = allocator_type ())@ : allocator_type (__alloc), _C_start (0), _C_finish (0)," _C_end_of_storage (0){ } _EXPLICITC vector (size_type __n, const_reference __value = value_type (),: const _Allocator& __alloc = allocator_type ())= : allocator_type(__alloc), _C_start(0), _C_finish(0),!  _C_end_of_storage (0) {, _C_initn (size_type (__n), __value); }3#if !defined (_RWSTD_NO_INLINE_MEMBER_TEMPLATES) \0 && (!defined (_MSC_VER) || _MSC_VER >= 1300)  template< void _C_init_aux (_InputIter __first, _InputIter __last,4 _RWSTD_DISPATCH_INT (false)) {F if (__is_input_iterator (_RWSTD_ITERATOR_CATEGORY (_InputIter,G __first))) {8 copy(__first, __last, back_inserter(*this)); } else {C size_type __n = _DISTANCE (__first, __last, size_type);+ size_type __initial_capacity = I (max)(__n, size_type (_RW::__rw_new_capacity (0, this)));> _C_start = _RWSTD_VALUE_ALLOC(_C_value_alloc_type,J allocate(__initial_capacity,0));  _TRY {= uninitialized_copy(__first, __last, _C_start,D  _RWSTD_VALUE_ALLOC_CAST (*this)); } _CATCH (...) {7 _RWSTD_VALUE_ALLOC(_C_value_alloc_type,= deallocate(_C_start,__n)); _RETHROW; }' _C_finish = _C_start + __n;> _C_end_of_storage = _C_start + __initial_capacity; } } template< void _C_init_aux (_InputIter __first, _InputIter __last,3  _RWSTD_DISPATCH_INT (true)) {, _C_initn((size_type)__first,__last); } template2 vector (_InputIter __first, _InputIter __last,: const _Allocator& __alloc = allocator_type ()); : allocator_type(__alloc), _C_start(0), _C_finish(0), _C_end_of_storage(0) {C _C_init_aux(__first, __last, _RWSTD_DISPATCH (_InputIter)); } 3#else // defined _RWSTD_NO_INLINE_MEMBER_TEMPLATES: vector (const_iterat or __first, const_iterator __last,: const _Allocator& __alloc = allocator_type ()); : allocator_type(__alloc), _C_start(0), _C_finish(0), _C_end_of_storage(0) {? size_type __n = _DISTANCE (__first, __last, size_type);' size_type __initial_capacity = E (max)(__n, size_type (_RW::__rw_new_capacity (0, this)));: _C_start = _RWSTD_VALUE_ALLOC(_C_value_alloc_type,F allocate(__initial_capacity,0));   _TRY {9 uninitialized_copy(__first, __last, _C_start,B _RWSTD_VALUE_ALLOC_CAST (*this)); } _CATCH (...) {N _RWSTD_VALUE_ALLOC(_C_value_alloc_type, deallocate(_C_start,__n)); _RETHROW; }# _C_finish = _C_start + __n;: _C_end_of_storage = _C_start + __initial_capacity; } +#endif // _RWSTD_NO_INLINE_MEMBER_TEMPLATES vector (const vector &__x)K : al locator_type (__x.get_allocator ()), _C_start(0), _C_finish(0), _C_end_of_storage(0) {' size_type __initial_capacity = M (max)(__x.size (), size_type (_RW::__rw_new_capacity (0, this)));: _C_start = _RWSTD_VALUE_ALLOC(_C_value_alloc_type,F allocate(__initial_capacity,0)); _TRY {? uninitialized_copy(__x.begin(), __x.end(), begin(),B _RWSTD_VALUE_ALLOC_CAST (*this));  } _CATCH (...) {3 _RWSTD_VALUE_ALLOC(_C_value_alloc_type,@ deallocate(_C_start,__x.size())); _RETHROW; }* _C_finish = _C_start + __x.size();: _C_end_of_storage = _C_start + __initial_capacity; }   ~vector () { & _C_destroy(begin (), end ()); D _RWSTD_VALUE_ALLOC(_C_value_alloc_type, deallocate(_C_start,M _C_end_of_storage - _C_start)); } & vector& operator= (const vector&); 2#if !defined (_RWSTD_NO_INLINE_MEMBER_TEMPLATES) \0 && (!defined (_MSC_VER) || _MSC_VER >= 1300) template9 void assign (_InputIter __first, _InputIter __last) { erase(begin(), end());O _C_insert_aux (begin(), __first, __last, _RWSTD_DISPATCH (_InputIter)); } 6 void assign (size_type __n, const_reference __t) {9 erase(begin(), end()); insert(begin(), __n, __t); }9#else // if defined (_RWSTD_NO_INLINE_MEMBER_TEMPLATES)A void assign (const_iterator __first, const_iterator __last) {@ erase(begin(), end()); insert(begin(), __first, __last); } //+ // Assign n copies of t to this vector. //6 void assign (size_type __n, const_reference __t) {9 erase(begin(), end()); insert(begin(), __n, __t); }+#endif // _RWSTD_NO_INLINE_MEMBER_TEMPLATES* allocator_type get_allocator() const { return *this; }  // // Iterators. //# iterator begin () {' return _C_make_iter (_C_start); }# const_iterator begin () const {' return _C_make_iter (_C_start); }# iterator end () {( return _C_make_iter (_C_finish); }# const_iterator end () const {( return _C_make_iter (_C_finish); } ! reverse_iterator rbegin () { & reverse_iterator __tmp(end()); return __tmp; } - const_reverse_iterator rbegin () const { , const_reverse_iterator __tmp(end()); return __tmp; }  reverse_iterator rend () { ( reverse_iterator __tmp(begin()); return __tmp; } + const_reverse_iterator rend () const { . const_reverse_iterator __tmp(begin()); return __tmp; }! size_type size () const {* return size_type(end() - begin()); }! size_type max_size () const {C return _RWSTD_VALUE_ALLOC(_C_value_alloc_type, max_size()); } L void resize (size_type __new_size, value_type __value = value_type ()) { if (__new_size > size())8 insert(end(), __new_size - size(), __value);% else if (__new_size < size())/ erase(begin() + __new_size, end()); }! size_type capacity () const {, return _C_end_of_storage - _C_start; } ! bool empty () const { return begin() == end(); } " void reserve (size_type __n) {, _RWSTD_REQUIRES (__n <= max_size (),4 (_RWSTD_ERROR_LENGTH_ERROR,E _RWSTD_FUNC ("vector::reserve(size_type)"),- __n, max_size ())); if (capacity() < __n) {' size_type __new_capacity = O (max)(__n, size_type (_RW::__rw_new_capacity (size (), this))); pointer __tmp =7 _RWSTD_VALUE_ALLOC(_C_value_alloc_type,F allocate(__new_capacity,_C_start)); _TRY {H uninitialized_copy(begin(), end(), _C_make_iter (__tmp),B _RWSTD_VALUE_ALLOC_CAST (*this)); } _CATCH (...) {O _RWSTD_VALUE_ALLOC(_C_value_alloc_type, deallocate(__tmp,__n)); _RETHROW; }) _C_destroy(begin (), end ());4 _RWSTD_VALUE_ALLOC(_C_value_alloc_type, D deallocate(_C_start, _C_end_of_storage - _C_start));' _C_finish = __tmp + size(); _C_start = __tmp;: _C_end_of_storage = _C_start + __new_capacity; } } // // Element access. //0 reference operator[] (size_type __n) {#ifdef _RWSTD_BOUNDS_CHECKING' _RWSTD_REQUIRES (__n < size (),4 (_RWSTD_ERROR_OUT_OF_RANGE,H _RWSTD_FUNC ("vector::operator[](size_type)"),) __n, size ()));"#endif // _RWSTD_BOUNDS_CHECKING return *(begin() + __n); } 6 const_reference operator[] (size_type __n) const {#ifdef _RWSTD_BOUNDS_CHECKING' _RWSTD_REQUIRES (__n < size (),4 (_RWSTD_ERROR_OUT_OF_RANGE,N _RWSTD_FUNC ("vector::operator[](size_type) const"),)  __n, size ()));"#endif // _RWSTD_BOUNDS_CHECKING return *(begin() + __n); } # reference at (size_type __n) { ' _RWSTD_REQUIRES (__n < size (),4 (_RWSTD_ERROR_OUT_OF_RANGE,A _RWSTD_FUNC ("vector::at (size_type)"),) __n, size ()));! return *(begin() + __n);  } 1 const_reference at (size_type __n) const { ' _RWSTD_REQUIRES (__n < size (),4  (_RWSTD_ERROR_OUT_OF_RANGE,F _RWSTD_FUNC ("vector::at(size_type) const"),) __n, size ()));! return *(begin() + __n);  }  reference front () { return *begin(); } $ const_reference front () const { return *begin(); }  reference back () { return *(end() - 1); } # const_reference back () const { return *(end() - 1); } // // Modifiers. //* void push_back (const_reference __x) {- if (_C_finish != _C_end_of_storage) {4 _RWSTD_VALUE_ALLOC (_C_value_alloc_type,< construct (_C_finish, __x)); ++_C_finish; } else( _C_insert_aux (end (), __x); }  void pop_back () {J _RWSTD_VALUE_ALLOC (_C_value_alloc_type, destroy (_C_finish - 1)); --_C_finish;  } // // Insert x at __position. //@ iterator insert (iterator __position, const_reference __x) {- size_type __n = __position - begin();D if (_C_finish != _C_end_of_storage && __position == end()) { ++_C_finish; _TRY {7 _RWSTD_VALUE_ALLOC(_C_value_alloc_type,B construct(_C_finish - 1, __x)); } _CATCH (...) { --_C_finish; _RETHROW; } } else+ _C_insert_aux(__position, __x); return begin() + __n; }2#if !defined (_RWSTD_NO_INLINE_MEMBER_TEMPLATES) \0 && (!defined (_MSC_VER) || _MSC_VER >= 1300) template I void insert (iterator __pos, _InputIter __first, _InputIter __last) {F insert (__pos, __first, __last, _RWSTD_DISPATCH (_InputIter)); }  template G void insert (iterator __pos, _InputIter __first, _InputIter __ last,/ _RWSTD_DISPATCH_INT (false)) {6 // unnamed arg is used for overload resolution5 // _RWSTD_COMPILE_ASSERT (sizeof (*__first));= _C_insert_interval_dispatch (__pos, __first, __last,K _RWSTD_ITERATOR_CATEGORY (_InputIter,J __first)); }F void insert (iterator __pos, size_type __n, const_reference __val,. _RWSTD_DISPATCH_INT (true)) {6 // unnamed arg is used for overload resolution* _C_insert_aux (__pos, __n, __val); }O void insert (iterator __position, size_type __n, const_reference __value) {. _C_insert_aux(__position,__n,__value); } #elseK void insert (iterator __position, size_type __n, const_reference __x) {* _C_insert_aux(__position,__n,__x); } = void insert (iterator __position, const_iterator __first,) const_iterator __last) {4 _C_insert_aux2(__position, __first, __last); } +#endif // _RWSTD_NO_INLINE_MEMBER_TEMPLATES* iterator erase (iterator __position) { if (!empty ()) { ) if (__position + 1 != end()) 8 copy(__position + 1, end(), __position);L _RWSTD_VALUE_ALLOC(_C_value_alloc_type, destroy(_C_finish - 1)); --_C_finish; } return __position; }8 iterator erase (iterator __first, iterator __last) { if (!empty ()) {9 iterator __i = copy (__last, end(), __first);$ iterator __tmp = end ();# _C_destroy(__i, __tmp);, _C_finish -= (__last - __first); } return __first; } void swap (vector& __x) {B if((_C_value_alloc_type)*this==(_C_value_alloc_type)__x) {0 _STD::swap (_C_start, __x._C_start);2 _STD::swap (_C_finish, __x._C_finish);B _STD::swap (_C_end_of_storage, __x._C_end_of_storage); } else { vector __v = *this; *this = __x; __x=__v; }  }  void clear () {! erase (begin (), end ()); }};)template =inline bool operator== (const vector<_TypeT,_Allocator>& __x,= const vector<_TypeT,_Allocator>& __y){# return __x.size() == __y.size()6 && equal(__x.begin(), __x.end(), __y.begin());})template <inline bool operator< (const vector<_TypeT,_Allocator>& __x,< const vector<_TypeT,_Allocator>& __y){: return lexicographical_compare(__x.begin(), __x.end(),; __y.begin(), __y.end());})template =inline bool operator!= (const vector<_TypeT,_Allocator>& __x,= const vector<_TypeT,_Allocator>& __y){ return !(__x == __y);})template <inline bool operator> (const vector<_TypeT,_Allocator>& __x,< const vector<_TypeT,_Allocator>& __y){ return __y < __x;})template =inline bool operator>= (const vector<_TypeT,_Allocator>& __x,= const vector<_TypeT,_Allocator>& __y){ return !(__x < __y);})template =inline bool operator<= (const vector<_TypeT,_Allocator>& __x,= const vector<_TypeT,_Allocator>& __y){ return !(__y < __x);}$#ifndef _RWSTD_NO_PART_SPEC_OVERLOAD)template Pinline void swap(vector<_TypeT,_Allocator>& __a, vector<_TypeT,_Allocator>& __b){ __a.swap(__b);}(#endif // _RWSTD_NO_PART_SPEC_OVERLOAD#ifndef _RWSTD_NO_VECTOR_BOOL#ifndef _RWSTD_NO_BOOL& // number of bits in a machine wordI# define _RWSTD_WORD_BIT (int (_RWSTD_CHAR_BIT * sizeof (unsigned int)))$#ifndef _RWSTD_NO_CLASS_PARTIAL_SPEC"# define _VB_TYPENAME _TYPENAME template 4#else // if defined (_RWSTD_NO_CLASS_PARTIAL_SPEC)# define _VB_TYPENAME= // use a macro to mutate _Allocator into allocator## define _Allocator allocator_RWSTD_SPECIALIZED_CLASS'#endif // _RWSTD_NO_CLASS_PARTIAL_SPECBclass _RWSTD_EXPORT vector : private _Allocator{N typedef _RWSTD_R EBIND(_Allocator, unsigned int) _C_value_alloc_type;B typedef vector _C_self;public:K typedef _Allocator allocator_type;G typedef bool value_type;F typedef _VB_TYPENAME allocator_type::size_type size_type;L typedef _VB_TYPENAME allocator_type::difference_type difference_type;D typedef _VB_TYPENAME _C_value_alloc_type::pointer pointer;J typedef _VB_TYPENAME _C_value_alloc_type::const_pointer const_pointer; class iterator; class const_iterator; class reference { friend class iterator;$ friend class const_iterator; protected: unsigned int* _C_p; unsigned int _C_mask;7 reference (unsigned int* __x, unsigned int __y)+ : _C_p (__x), _C_mask (__y) { } public:- reference () : _C_p(0), _C_mask(0) {} operator bool () const {' return !!(*_C_p & _C_mask); }) reference& operator= (bool __x) { if (__x) ! *_C_p |= _C_mask; else" *_C_p &= ~_C_mask; return *this; }5 reference& operator= (const reference& __x) {% return *this = bool(__x); })#ifndef _RWSTD_NO_EXT_VECTOR_BOOL_REF_OPS4 bool operator== (const reference& __x) const {* return bool(*this) == bool(__x); }3 bool operator< (const reference& __x) const {#ifndef _MSC_VER) return bool(*this) < bool(__x);#else' return int(*this) < int(__x);#endif }6 bool operator!= (const reference& __x) const {# return !(*this == __x); }5 bool operator> (const reference& __x) const { return __x < *this; }6 bool operator>= (const reference& __x) const {" return !(*this < __x); }6 bool operator<= (const reference& __x) const {" return !(*this > __x); }+#endif // _RWSTD_NO_EXT_VECTOR_BOOL_REF_OPS void flip () { *_C_p ^= _C_mask; } }; ! typedef bool const_reference;C // hacks working around bogus g++ 2.95.2 warnings coming out ofA // iterators below as well as what's probably an MSVC 6.0 bug# typedef reference _C_ref;) typedef const_reference _C_const_ref;& typedef difference_type _C_diff_t; class _C_iter { friend class iterator;$ friend class const_iterator; protected:#if defined (__GNUG__)8 // gcc 3.0.1 and prior take 14.5.3, p9 literally public:G#elif defined (_MSC_VER) && _MSC_VER <= 1300 || defined (__APOGEE__). friend class vector;#else friend class vector;#endifA unsigned int* _C_p; // pointer to the current wordB  unsigned int _C_offset; // number of the pointed-to bit= _C_iter (unsigned int* __x = 0, unsigned int __y = 0)- : _C_p (__x), _C_offset (__y) { }F // On Sun, gcc 3.1 does generate an incorrect copy constructorI // that has as an effect an incompletely/incorrectly initialized  // iterator.,#if defined (__sun__) && defined (__GNUG__) % _C_iter (const _C_iter& __it)= : _C_p (__it._C_p), _C_offset (__it._C_offset) {}#endif // __GNUG__ void operator++ () {5 if (_C_offset++ == _RWSTD_WORD_BIT - 1) { _C_offset = 0;  ++_C_p; } } void operator-- () {# if (_C_offset-- == 0) {1 _C_offset = _RWSTD_WORD_BIT - 1;  --_C_p; } }/ void operator+= (difference_type __i) {2 difference_type __n = __i + _C_offset;* _C_p += __n / _RWSTD_WORD_BIT;( __n = __n % _RWSTD_WORD_BIT; if (__n < 0) {= _C_offset = _RWSTD_STATIC_CAST (unsigned int,G __n + _RWSTD_WORD_BIT); --_C_p; } elseB _C_offset = _RWSTD_STATIC_CAST (unsigned int,__n); } public:4 bool operator== (const _C_iter& __x) const {B return _C_p == __x._C_p && _C_offset == __x._C_offset;  }3 bool operator< (const _C_iter& __x) const {% return _C_p < __x._C_p ||@ (_C_p == __x._C_p && _C_offset < __x._C_offset); }4 bool operator!= (const _C_iter& __x) const {# return !(*this == __x); }3 bool operator> (const _C_iter& __x) const { return __x < *this; }4 bool operator>= (const _C_iter& __x) const {" return !(*this < __x); }4 bool operator<= (const _C_iter& __x) const {" return !(*this > __x); } };  class iterator : public _C_iter,; public _STD::iterator { public:< // bring names used in declarations below into scopeE // (dependent base members not visible without qualification)$ typedef _C_ref reference;* typedef _C_diff_t difference_type;> iterator (unsigned int *__x = 0, unsigned int __y = 0)$ : _C_iter (__x, __y) { }' reference operator* () const { ) typedef reference _Reference;C return _Reference (this->_C_p, 1U << this->_C_offset); }! iterator& operator++ () {0 return _C_iter::operator++(), *this; }# iterator operator++ (int) {# iterator __tmp = *this;  ++*this; return __tmp; }! iterator& operator-- () {0 return _C_iter::operator--(), *this; }# iterator operator-- (int) {# iterator __tmp = *this; --*this; return __tmp; }4 iterator& operator+= (difference_type __i) {4 return _C_iter::operator+= (__i), *this; }4 iterator& operator-= (difference_type __i) { *this += -__i;  return *this; }8 iterator operator+ (difference_type __i) const {# iterator __tmp = *this; return __tmp += __i; }8 iterator operator- (difference_type __i) const {# iterator __tmp = *this; return __tmp -= __i; }8 difference_type operator- (iterator __x) const {> return _RWSTD_WORD_BIT * (this->_C_p - __x._C_p)5 + this->_C_offset - __x._C_offset;  }4 reference operator[] (difference_type __i) {" return *(*this + __i); } }; class const_iterator : public _C_iter,; public _STD::iterator const_pointer, _C_const_ref> { public:< // bring names used in declarations below into scopeE // (dependent base members not visible without qualification)- typedef _C_const_ref const_reference;- typedef _C_diff_t difference_type;D const_iterator (unsigned int *__x = 0, unsigned int __y = 0)$ : _C_iter (__x, __y) { }+ const_iterator (const _C_iter &__x) : _C_iter (__x) { }, const_reference operator* () const {> return _C_ref (this->_C_p, 1U << this->_C_offset); }' const_iterator& operator++ () {0 return _C_iter::operator++(), *this; }) const_iterator operator++ (int) {) const_iterator __tmp = *this; ++*this; return __tmp; }' const_iterator& operator-- () {0 return _C_iter::operator--(), *this; }) const_iterator operator-- (int) {) const_iterator __tmp = *this; --*this; return __tmp; }: const_iterator& operator+= (difference_type __i) {4 return _C_iter::operator+= (__i), *this; }: const_iterator& operator-= (difference_type __i) {! return *this += -__i; } const_iterator/ operator+ (difference_type __i) const {1 return const_iterator (*this) += __i; }> const_iterator operator- (difference_type __i) const {1 return const_iterator (*this) -= __i; }> difference_type operator- (const_iterator __x) const {>  return _RWSTD_WORD_BIT * (this->_C_p - __x._C_p)5 + this->_C_offset - __x._C_offset; }; const_reference operator[] (difference_type __i) { # return *(*this + __i); } };%#ifndef _RWSTD_NO_CLASS_PARTIAL_SPEC J typedef _STD::reverse_iterator const_reverse_iterator;D typedef _STD::reverse_iterator reverse_iterator;#else3 typedef _STD::reverse_iterator const_reverse_iterator;- typedef _STD::reverse_iterator reverse_iterator;)#endif // _RWSTD_NO_CLASS_PARTIAL_SPEC private: //B // These private functions are replicas of generic algorithms.@ // We provide them here to avoid putting instantiations of A  // the generic algorithms into an archive or shared library.A // This gives you full flexibilty in deciding where you want8 // to put particular instantiations of the generic  // algorithms. // K void _C_fill (iterator __first, iterator __last, const bool& __value) {7 while (__first != __last) *__first++ = __value; }K void _C_fill_n (iterator __first, size_type __n, const bool& __value) {/ while (__n-- > 0) *__first++ = __value; }2#if !defined (_RWSTD_NO_INLINE_MEMBER_TEMPLATES) \0 && (!defined (_MSC_VER) || _MSC_VER >= 1300) template L iterator _C_copy (_Iterator __first, _Iterator __last, iterator __res) {! while (__first != __last)" *__res++ = *__first++; return __res; } template iteratorL _C_copy_backward (_Iterator __first, _Iterator __last, iterator __res) {7 while (__first != __last) *--__res = *--__last; return __res; }#else iteratorM _C_copy (const_iterator __first, const_iterator __last, iterator __res) {! while (__first != __last)" *__res++ = *__first++; return __res; }P iterator _C_copy (const bool* __first, const bool* __last, iterator __res) {! while (__first != __last)" *__res++ = *__first++; return __res; }M iterator _C_copy_backward (const_iterator __first, const_iterator __last,0 iterator __res) {! while (__first != __last)! *--__res = *--__last; return __res; } iteratorP _C_copy_backward (const bool* __first, const bool* __last, iterator __res) {! while (__first != __last)! *--__res = *--__last; return __res; }#endif protected: iterator _C_start; iterator _C_finish;% unsigned int * _C_end_of_storage;0 unsigned int* _C_bit_alloc (size_type __n) {* return _C_value_alloc_type(*this).B allocate ((__n + _RWSTD_WORD_BIT - 1)/_RWSTD_WORD_BIT,. pointer(_C_start._C_p)); }" void _C_init (size_type __n) {. unsigned int* __q = _C_bit_alloc(__n);N _C_end_of_storage = __q + (__n + _RWSTD_WORD_BIT - 1)/_RWSTD_WORD_BIT;$ _C_start = iterator(__q, 0);# _C_finish = _C_start + __n; }( void _C_insert_aux (iterator, bool);public: ; vector (const _Allocator& __alloc = allocator_type ())O : allocator_type (__alloc), _C_start(iterator()), _C_finish(iterator()), _C_end_of_storage(0) { }1#if !defined (__SUNPRO_CC) || __SUNPRO_CC > 0x5306 // working around a SunPro 5.3 bug (see PR #25962) _EXPLICIT#endif // SunPro > 5.32 vector (size_type __n, bool __value = bool(), 6 const _Allocator& __alloc = allocator_type ())8 : allocator_type (__alloc), _C_end_of_storage(0) { _C_init(__n); - unsigned int * __first = _C_start._C_p;B size_type __m = (__n + _RWSTD_WORD_BIT - 1)/_RWSTD_WORD_BIT;6 while (__m-- > 0) *__first++ = __value ? ~0 : 0; } vector (const _C_self &__x)H : allocator_type (__x.get_allocator ()), _C_end_of_storage (0) { _C_init (__x.size ()); 5 _C_copy (__x.begin (), __x.end (), _C_start); }2#if !defined (_RWSTD_NO_INLINE_MEMBER_TEMPLATES) \0 && (!defined (_MSC_VER) || _MSC_VER >= 1300) template3 vector (_InputIter __first, _InputIter __last) : _C_end_of_storage(0) {= size_type __n = _DISTANCE (__first, __last, size_type); _C_init(__n); ) _C_copy(__first, __last, _C_start); }#else: vector (const_iterator __first, const_iterator __last) : _C_end_of_storage(0) {= size_type __n = _DISTANCE (__first, __last, size_type); _C_init(__n);) _C_copy(__first, __last, _C_start); }4 vector (const bool* __first, const bool* __last) : _C_end_of_storage(0) {= size_type __n = _DISTANCE (__first, __last, size_type); _C_init(__n);) _C_copy(__first, __last, _C_start); }#endif  ~vector () {< _C_value_alloc_type(*this).deallocate(_C_start._C_p, , _C_end_of_storage - _C_start._C_p);  }+ _C_self& operator= (const _C_self& __x) {% if (&__x == this) return *this;" if (__x.size() > capacity()) {< _C_value_alloc_type(*this).deallocate(_C_start._C_p,. _C_end_of_storage - _C_start._C_p);  _C_init(__x.size()); }/ _C_copy(__x.begin(), __x.end(), begin());' _C_finish = begin() + __x.size(); return *this; }2#if !defined (_RWSTD_NO_INLINE_MEMBER_TEMPLATES) \0 && (!defined (_MSC_VER) || _MSC_VER >= 1300) template7 void assign (_InputIter __first, _InputIter __last)@ { erase(begin(), end()); insert(begin(), __first, __last); }#else? void assign (const_iterator __first, const_iterator __last)@ { erase(begin(), end()); insert(begin(), __first, __last); }#endif9 void assign (size_type __n, const bool& __t = bool()) { ; erase(begin(), end()); insert(begin(), __n, __t);  }( allocator_type get_allocator() const { return *this; } // // iterators //6 iterator begin () { return _C_start; }" const_iterator begin () const @ { return const_iterator(_C_start._C_p,_C_start._C_offset); }7 iterator end () { return _C_finish; }" const_iterator end () const B { return const_iterator(_C_finish._C_p,_C_finish._C_offset); }H reverse_iterator rbegin () { return reverse_iterator(end()); }* const_reverse_iterator rbegin () const { , return const_reverse_iterator(end());  }H reverse_iterator rend () { return reverse_iterator(begin()); }( const_reverse_iterator rend () const { . return const_reverse_iterator(begin());  } // // capacity //G size_type size () const { return size_type(end() - begin()); }! size_type max_size () const {5 return _C_value_alloc_type(*this).max_size(); }9 void resize (size_type __new_size, bool __c = false); size_type capacity () const {G return size_type(const_iterator(_C_end_of_storage, 0) - begin()); }4 bool empty () const { return begin() == end(); } void reserve (size_type __n) {, _RWSTD_REQUIRES (__n <= max_size (),4 (_RWSTD_ERROR_LENGTH_ERROR,L _RWSTD_FUNC ("vector::reserve (size_type)"),- __n, max_size ())); if (capacity() < __n) {. unsigned int* __q = _C_bit_alloc(__n);> _C_finish = _C_copy(begin(), end(), iterator(__q, 0));< _C_value_alloc_type(*this).deallocate(_C_start._C_p,P _C_end_of_storage - _C_start._C_p);$ _C_start = iterator(__q, 0);N _C_end_of_storage = __q + (__n + _RWSTD_WORD_BIT - 1)/_RWSTD_WORD_BIT; } } // // element access //5 reference operator[] (size_type __n)  { #ifdef _RWSTD_BOUNDS_CHECKING' _RWSTD_REQUIRES (__n < size (),4 (_RWSTD_ERROR_LENGTH_ERROR,F  _RWSTD_FUNC ("vector::[](size_type)"),) __n, size ()));"#endif // _RWSTD_BOUNDS_CHECKING return *(begin() + __n);  }5 const_reference operator[] (size_type __n) const  { #ifdef _RWSTD_BOUNDS_CHECKING' _RWSTD_REQUIRES (__n < size (),4 (_RWSTD_ERROR_LENGTH_ERROR,F _RWSTD_FUNC ("vector::[](size_type)"),) __n, size ()));"#endif // _RWSTD_BOUNDS_CHECKING return *(begin() + __n);  }5 reference at (size_type __n)  { ' _RWSTD_REQUIRES (__n < size (),4 (_RWSTD_ERROR_LENGTH_ERROR,F _RWSTD_FUNC ("vector::at(size_type)"),) __n, size ())); return *(begin() + __n);  }/ const_reference at (size_type __n) const  {' _RWSTD_REQUIRES (__n < size (),4  (_RWSTD_ERROR_LENGTH_ERROR,L _RWSTD_FUNC ("vector::at(size_type) const"),) __n, size ())); return *(begin() + __n);  }; reference front () { return *begin(); }; const_reference front () const { return *begin(); }; reference back () { return *(end() - 1); }; const_reference back () const { return *(end() - 1); }  // // modifiers //$ void push_back (const bool& __x) {2 if (_C_finish._C_p != _C_end_of_storage) { ++_C_finish;! *(_C_finish-1) = __x; } else& _C_insert_aux(end(), __x); }% void pop_back () { --_C_finish; }C iterator insert (iterator __position, const bool& __x = bool()) {+ size_type __n = __position - begin();G if (_C_finish._C_p != _C_end_of_storage && __position == end()) { ++_C_finish; *(_C_finish-1) = __x; } else' _C_insert_aux(__position, __x); return begin() + __n; }F void insert (iterator __position, size_type __n, const bool& __x);"#ifndef _RWSTD_NO_MEMBER_TEMPLATES template9 void insert (iterator __position, _InputIter __first,$ _InputIter __last);#else> void insert (iterator __position, const_iterator __first, ( const_iterator __last);#endif( iterator erase (iterator __position) {% if (!(__position + 1 == end()))3 _C_copy(__position + 1, end(), __position); --_C_finish; return __position; }5 iterator erase(iterator __first, iterator __last) {2 _C_finish = _C_copy(__last, end(), __first); return __first; } void swap (_C_self& __x) {@ if((_C_value_alloc_type)*this == (_C_value_alloc_type)__x) {5 _STD::swap (_C_start, __x._C_start);6 _STD::swap (_C_finish, __x._C_finish);> _STD::swap (_C_end_of_storage, __x._C_end_of_storage); } else { _C_self _x = *this; *this = __x; __x=_x; }  }3 static void swap(reference __x, reference __y); void flip (); void clear() { erase(begin(),end()); } }; 3#if defined(__DECCXX) && !defined(__DECFIXCXXL1941)@// remove vector overloads of all the relational operators#else##ifndef _RWSTD_NO_FUNC_PARTIAL_SPEC$#ifndef _RWSTD_NO_CLASS_PARTIAL_SPEC template #endif? inline bool operator== (const vector& __x, > const vector& __y) {! if (__x.size() == __y.size()) {= _VB_TYPENAME vector::const_iterator first1 = __x.begin(),  last1 = __x.end(), first2 = __y.begin(); 3 while (first1 != last1 && *first1 == *first2) { ++first1; ++first2; } return first1 == last1; } return false; }$#ifndef _RWSTD_NO_CLASS_PARTIAL_SPEC template #endif> inline bool operator< (const vector& __x, = const vector& __y) {9 _VB_TYPENAME vector::const_iterator first1 = __x.begin(),  last1 = __x.end(), first2 = __y.begin(),  last2 = __y.end();. while (first1 != last1 && first2 != last2) {7 if ((int)*first1 < (int)*first2) return true;8 if ((int)*first2++ < (int)*first1++) return false; }. return first1 == last1 && first2 != last2; }#else_RWSTD_SPECIALIZED_FUNCTIOND inline bool operator== (const vector >& __x, C const vector >& __y) {! if (__x.size() == __y.size()) {5 vector >::const_iterator first1 = __x.begin(),  last1 = __x.end(), first2 = __y.begin(); 3 while (first1 != last1 && *first1 == *first2) { ++first1; ++first2; } return first1 == last1; } return false; }_RWSTD_SPECIALIZED_FUNCTIONC inline bool operator< (const vector >& __x, B const vector >& __y) {1 vector >::const_iterator first1 = __x.begin(),  last1 = __x.end(), first2 = __y.begin(), last2 = __y.end();. while (first1 != last1 && first2 != last2) {7 if ((int)*first1 < (int)*first2) return true;8 if ((int)*first2++ < (int)*first1++) return false; }. return first1 == last1 && first2 != last2; }#endif#endif /* _DECFIXCXXL1941 */##ifndef _RWSTD_NO_FUNC_PARTIAL_SPEC3#if defined(__DECCXX) && !defined(__DECFIXCXXL1941)@// remove vector overloads of all the relational operators#else$#ifndef _RWSTD_NO_CLASS_PARTIAL_SPEC template #endif? inline bool operator!= (const vector& __x, > const vector& __y) { return !(__x == __y); }$#ifndef _RWSTD_NO_CLASS_PARTIAL_SPEC template #endif> inline bool operator> (const vector& __x, = const vector& __y) { return __y < __x; }$#ifndef _RWSTD_NO_CLASS_PARTIAL_SPEC template #endif? inline bool operator>= (const vector& __x, > const vector& __y) { return !(__x < __y); }$#ifndef _RWSTD_NO_CLASS_PARTIAL_SPEC template #endif? inline bool operator<= (const vector& __x, >  const vector& __y) { return !(__y < __x); }#endif /* _DECFIXCXXL1941 */$#ifndef _RWSTD_NO_PART_SPEC_OVERLOAD$#ifndef _RWSTD_NO_CLASS_PARTIAL_SPEC template #endifP inline void swap(vector& __a, vector& __b) { __a.swap(__b); }#endif #else //_RWSTD_NO_FUNC_PART_SPEC3#if defined(__DECCXX) && !defined(__DECFIXCXXL1941)@// remove vector overloads of all the relational operators#else_RWSTD_SPECIALIZED_FUNCTIOND inline bool operator!= (const vector >& __x, C const vector >& __y) { return !(__x == __y); }_RWSTD_SPECIALIZED_FUNCTIONC inline bool operator> (const vector >& __x, B const vector >& __y) { return __y < __x; }_RWSTD_SPECIALIZED_FUNCTIOND inline bool operator>= (const vector >& __x, C const vector >& __y) { return !(__x < __y); }_RWSTD_SPECIALIZED_FUNCTIOND inline bool operator<= (const vector >& __x, C const vector >& __y) { return !(__y < __x); }#endif /* _DECFIXCXXL1941 */_RWSTD_SPECIALIZED_FUNCTION6inline void swap (vector >& __a,6 vector >& __b) { __a.swap(__b); }#endif#undef _Allocator #endif // _RWSTD_NO_BOOL!#endif // _RWSTD_NO_VECTOR_BOOL} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif*#if defined (_RWSTD_NO_IMPLICIT_INCLUSION)# include #endif$#ifndef _RWSTD_NO_STL_SPECIALIZATION#include "vector_spec.h"(#endif // _RWSTD_NO_STL_SPECIALIZATION#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif"#endif // _RWSTD_VECTOR_INCLUDEDww r7ԦL/*************************************************************************** *K * vector.cc - Non-inline definitions for the Standard Library vector class *. * $Id: //stdlib/3.0-rel/include/vector.cc#4 $ *L *************************************************************************** * B * Copyright 2003, 2005 Hewlett-Packard Development Company, L.P. *F * Confidential computer software. Valid license from HP required forF * possession, use or copying. Consiste nt with FAR 12.211 and 12.212,F * Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** * * Copyright (c) 1994 * Hewlett-Packard Company *E * Permission to use, copy, modify, distribute and sell this softwareG * and its documentation for any purpose is hereby granted w ithout fee,D * provided that the above copyright notice appear in all copies andD * that both that copyright notice and this permission notice appearA * in supporting documentation. Hewlett-Packard Company makes noA * representations about the suitability of this software for anyH * purpose. It is provided "as is" without express or implied warranty. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. Al l Rights Reserved. *F * This computer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies the reof may not be provided or0 * otherwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Manufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) { )template vector<_TypeT,_Allocator>&Kvector<_TypeT,_Allocator>::operator= (const vector<_TypeT,_Allocator>& __x){ if (&__x == this) return *this;# if (__x.size() > capacity()) {' _RWSTD_SIZE_T __new_capacity = R (max)(__x.size(), (_RWSTD_SIZE_T)_RW::__rw_new_capacity(size(),this));A pointer __start = _RWSTD_VALUE_ALLOC(_C_value_alloc_type,I  allocate(__new_capacity,0));  _TRY {? uninitialized_copy(__x.begin(), __x.end(), __start,? _RWSTD_VALUE_ALLOC_CAST(*this)); } _CATCH (...) {4 _RWSTD_VALUE_ALLOC (_C_value_alloc_type,A deallocate (__start,__x.size())); _RETHROW; } % _C_destroy(begin (), end ());/ _RWSTD_VALUE_ALLOC(_C_value_alloc_type,= deallocate(_C_start, capacity())); _C_start = __start;* _C_finish = _C_start + __x.size();6 _C_end_of_storage = _C_start + __new_capacity; }$ else if (size() >= __x.size()) {H const iterator __it = copy (__x.begin (), __x.end (), begin ());" _C_destroy (__it, end ());+ _C_finish = _C_start + __x.size (); }/ else { // size() < x.size() < capacity()# size_type __size = size ();/ // overwrite (assign) existing elements= copy (__x.begin (), __x.begin () + __size, begin ());4 // extend the size of *this prior to copying+ _C_finish = _C_start + __x.size ();4 // copy (initialize) elelements past the end> uninitialized_copy (__x.begin () + __size, __x.end (),. begin () + __size,< _RWSTD_VALUE_ALLOC_CAST (*this)); } return *this;})template >void vector<_TypeT,_Allocator>::_C_insert_aux ( iterator __it,D const_reference __x){ if (capacity () > size ()) {E // avoid dereferencing end () by incrementing _C_finish first& pointer __old_end = _C_finish; ++_C_finish; _TRY {3 _RWSTD_VALUE_ALLOC(_C_value_alloc_type,4 construct (__old_end,O *(__old_end - difference_type (1)))); } _CATCH (...) {H _RWSTD_VALUE_ALLOC(_C_value_alloc_type, destroy(__old_end)); --_C_finish; _RETHROW; }3#if defined(__DECCXX) && !defined(__DECFIXCXXL1883)% const value_type __tmp = __x;#endifM copy_backward (__it, _C_make_iter (__old_end - difference_type (1)) ,1 _C_make_iter (__old_end));3#if defined(__DECCXX) && !defined(__DECFIXCXXL1883) *__it = __tmp;#else *__it = __x;#endif } else { // more memory neededK _RWSTD_SIZE_T __new_capacity = _RW::__rw_new_capacity(size(),this); pointer __start =3 _RWSTD_VALUE_ALLOC(_C_value_alloc_type,J allocate(__new_capacity, (void*)_C_start)); _TRY {6 uninitialized_copy(begin(), __it, __start,@ _RWSTD_VALUE_ALLOC_CAST (*this));4 _RWSTD_VALUE_ALLOC(_C_value_ alloc_type, > construct((__start + (__it - begin())), __x));+ uninitialized_copy(__it, end(),P __start + (__it - begin()) + difference_type (1),A _RWSTD_VALUE_ALLOC_CAST (*this)); } _CATCH (...) {/ _C_destroy (_C_make_iter (__start),A _C_make_iter (__start + __new_capacity));3 _RWSTD_VALUE_ALLOC(_C_value_alloc_type,D  deallocate (__start,__new_capacity)); _RETHROW; } + // compute size before deallocating# size_type __size = size ();$ _C_destroy (begin(), end());1 // invalidates all iterators into `*this'/ _RWSTD_VALUE_ALLOC(_C_value_alloc_type,> deallocate(_C_start, capacity ()));$ _C_start = __start;C _C_finish = __start + __size + difference_type (1);5 _C_end_of_storage = __start + __new_capacity; }})template =void vector<_TypeT,_Allocator>::_C_insert_aux (iterator __it,= size_type __n,C const_reference __x){ if (__n == 0) return;* if ((size () + __n) <= capacity ()) {# iterator __old_end = end();E // avoid dereferencing end () by incrementing _C_finish first _C _finish += __n;I if (__it + __n < __old_end) { //insertion entirely before old end _TRY {J uninitialized_copy (__old_end - __n, __old_end, __old_end,E _RWSTD_VALUE_ALLOC_CAST (*this)); } _CATCH (...) {. _C_destroy (__old_end, end());! _C_finish -= __n; _RETHROW; }< copy_backward(__it, __old_end - __n, __old_end);(  fill(__it, __it + __n, __x); } else {> size_type __first_part = __n - (__old_end - __it); _TRY {C uninitialized_fill_n (__old_end, __first_part, __x,G _RWSTD_VALUE_ALLOC_CAST (*this));? uninitialized_copy(__it, __old_end, __it + __n,D _RWSTD_VALUE_ALLOC_CAST (*this)); } _CATCH (...) {8 _C_destroy (__old_end, __old_end + __n);! _C_finish -= __n; _RETHROW; }' fill(__it, __old_end, __x); } }" else { // not enough capacity' _RWSTD_SIZE_T __new_capacity = 1 (max)((_RWSTD_SIZE_T)(size () + __n),K (_RWSTD_SIZE_T)(_RW::__rw_new_capacity (size (), this))); pointer __start =4 _RWSTD_VALUE_ALLOC (_C_value_alloc_type,L allocate (__new_ capacity, (void*)_C_start));  _TRY {E uninitialized_copy(begin(), __it, _C_make_iter (__start),@ _RWSTD_VALUE_ALLOC_CAST (*this));F uninitialized_fill_n(__start + (__it - begin()), __n, __x,B _RWSTD_VALUE_ALLOC_CAST (*this));+ uninitialized_copy(__it, end(),@ __start + (__it - begin() + __n),@ _RWSTD_VALUE_ALLOC_CAST (*this)); } _CATCH (...) {/ _C_destroy (_C_make_iter (__start),A _C_make_iter (__start + __new_capacity));3 _RWSTD_VALUE_ALLOC(_C_value_alloc_type,C deallocate(__start,__new_capacity)); _RETHROW; }+ // compute size before deallocating# size_type __size = size ();$ _C_destroy (begin(), end());/ // invalidates all iterators into *this0 _RWSTD_VALUE_ALLOC (_C_value_alloc_type,P deallocate(_C_start, _C_end_of_storage - _C_start));$ _C_start = __start;3 _C_finish = __start + __size + __n;5 _C_end_of_storage = __start + __new_capacity; }}"#ifndef _RWSTD_NO_MEMBER_TEMPLATES(templatetemplateAvoid vector<_TypeT,_Allocator>::_C_insert_aux2 (iterator __it, D  _InputIter __first, B _InputIter __last)#else(templateDvoid vector<_TypeT,_Allocator>::_C_insert_aux2 (iterator __it,G const_iterator __first,F const_iterator __last)&#endif // _RWSTD_NO_MEMBER_TEMPLATES{" if (__first == __last) return;: size_type __n = _DISTANCE(__first, __last, size_type); ) if ((size () + __n) <= capacity ()) {" iterator __old_end= end();E // avoid dereferencing end () by incrementing _C_finish first _C_finish += __n;I if (__it + __n < __old_end) { //insertion entirely before old end _TRY {J uninitialized_copy (__old_end - __n, __old_end, __old_end,E _RWSTD_VALUE_ALLOC_CAST (*this)); } _CATCH (...) {/ _C_destroy (__old_end, end ());! _C_finish -= __n; _RETHROW; }< copy_backward(__it, __old_end - __n, __old_end);( copy(__first, __last, __it); } else {6 size_type __first_part = __old_end - __it;"#ifndef _RWSTD_NO_MEMBER_TEMPLATES' _InputIter __iter(__first);#else+ const_iterator __iter(__first);#endif* advance(__iter, __first_part); _TRY {= uninitialized_copy(__iter, __last, __old_end,D _RWSTD_VALUE_ALLOC_CAST (*this));? uninitialized_copy(__it, __old_end, __it + __n,D _RWSTD_VALUE_ALLOC_CAST (*this)); } _CATCH (...) {. _C_destroy (__old_end, end());! _C_finish -= __n; _RETHROW; }( copy(__first, __iter, __it); } } else {' _R WSTD_SIZE_T __new_capacity = 0 (max)((_RWSTD_SIZE_T)(size() + __n),F (_RWSTD_SIZE_T)_RW::__rw_new_capacity(size(),this)); pointer __start =3 _RWSTD_VALUE_ALLOC(_C_value_alloc_type,B allocate(__new_capacity,_C_start));  _TRY {6 uninitialized_copy(begin(), __it, __start,@ _RWSTD_VALUE_ALLOC_CAST (*this));/ uninitialized_copy(__first, __last,:  __start + (__it - begin()),@ _RWSTD_VALUE_ALLOC_CAST (*this));+ uninitialized_copy(__it, end(),@ __start + (__it - begin() + __n),@ _RWSTD_VALUE_ALLOC_CAST (*this)); } _CATCH (...) {/ _C_destroy (_C_make_iter (__start),A _C_make_iter (__start + __new_capacity));3 _RWSTD_VALUE_ALLOC(_C_value_alloc_type,C deallocate(__start,__new_capacity)); _RETHROW; } + // compute size before deallocating# size_type __size = size ();& _C_destroy (begin (), end ());/ // invalidates all iterators into *this/ _RWSTD_VALUE_ALLOC(_C_value_alloc_type,= deallocate(_C_start, capacity()));$ _C_start = __start;3 _C_finish = __start + __size + __n;5  _C_end_of_storage = __start + __new_capacity; }}#ifndef _RWSTD_NO_VECTOR_BOOL"#ifndef _RWSTD_NO_MEMBER_TEMPLATESA// The body of this function is duplicated in src/vecbool.cpp and%// further down in this file as well.,#if !defined (_RWSTD_NO_CLASS_PARTIAL_SPEC)  template  template) void vector::insert #else template. void vector >::insert &#endif // _RWSTD_NO_CLASS_PARTIAL_SPEC8 (iterator __it, _InputIter __first, _InputIter __last) {" if (__first == __last) return;; size_type __n = _DISTANCE (__first, __last, size_type);# if (capacity() - size() >= __n) {2 copy_backward(__it, end(), _C_finish + __n);" copy(__first, __last, __it); _C_finish += __n; } else {4 size_type __len = size() + (max)(size(), __n);. unsigned int* __q = _C_bit_alloc(__len);; iterator __i = copy(begin(), __it, iterator(__q, 0));' __i = copy(__first, __last, __i);) _C_finish = copy(__it, end(), __i);" _C_value_alloc_type (*this).O deallocate((pointer)_C_start._C_p,_C_end_of_storage - _C_start._C_p);N _C_end_of_storage = __q + (__len + _RWSTD_WORD_BIT - 1)/_RWSTD_WORD_BIT;" _C_start = iterator(__q, 0); } }$#endif // _RWSTD_NO_MEMBER_TEMPLATES$#ifndef _RWSTD_NO_CLASS_PARTIAL_SPECF// Duplicates of the followign functions exist in src/stl/vecbool.cpp.K// Which set is used depends on the availability of partial specialization. template ( void vector::flip () {8 for (iterator __i = begin(); !(__i == end()); __i++) *__i = !(*__i); } template D void vector::swap (reference __x, reference __y) {- bool __tmp = __x; __x = __y; __y = __tmp; } template H void vector::_C_insert_aux (iterator __it, bool __x) {, if (_C_finish._C_p != _C_end_of_storage) {3#if defined(__DECCXX) && !defined(__DECFIXCXXL1903)7 _C_copy_backward(__it, _C_finish, _C_finish + 1);#elseI _C_copy_backward(__it, _C_finish - difference_type (1), _C_finish);#endif *__it = __x; ++_C_finish; } else {> size_type __len = size() ? 2 * size() : _RWSTD_WORD_BIT;. unsigned int* __q = _C_bit_alloc(__len);> iterator __i = _C_copy(begin(), __it, iterator(__q, 0)); *__i++ = __x;, _C_finish = _C_copy(__it, end(), __i);" _C_value_alloc_type (*this).O deallocate((pointer)_C_start._C_p,_C_end_of_storage - _C_start._C_p);N _C_end_of_storage = __q + (__len + _RWSTD_WORD_BIT - 1)/_RWSTD_WORD_BIT;" _C_start = iterator(__q, 0); } } template F void vector::insert (iterator __it, size_type __n,9 const bool& __x) { if (__n == 0) return;# if (capacity() - size() >= __n) {5 _C_copy_backward(__it, end(), _C_finish + __n);% _C_fill(__it, __it + __n, __x); _C_finish += __n; } else {4 size_type __len = size() + (max)(size(), __n);. unsigned int* __q = _C_bit_alloc(__len);> iterator __i = _C_copy(begin(), __it, iterator(__q, 0)); _C_fill_n(__i, __n, __x);2 _C_finish = _C_copy(__it, end(), __i + __n);" _C_value_alloc_type (*this).O deallocate((pointer)_C_start._C_p,_C_end_of_storage - _C_start._C_p);N _C_end_of_storage = __q + (__len + _RWSTD_WORD_BIT - 1)/_RWSTD_WORD_BIT;" _C_start = iterator(__q, 0); } }!#ifdef _RWSTD_NO_MEMBER_TEMPLATES template = void vector::insert (iterator __it,@ const_iterator __first,? const_iterator __last) {" if (__first == __last) return;: size_type __n = _DISTANCE(__first, __last, size_type);# if (capacity() - size() >= __n) {5 _C_copy_backward(__it, end(), _C_finish + __n);% _C_copy(__first, __last, __it); _C_finish += __n; } else {4 size_type __len = size() + (max)(size(), __n);. unsigned int* __q = _C_bit_alloc(__len);> iterator __i = _C_copy(begin(), __it, iterator(__q, 0));* __i = _C_copy(__first, __last, __i);, _C_finish = _C_copy(__it, end(), __i);" _C_value_alloc_type (*this).O deallocate((pointer)_C_start._C_p,_C_end_of_storage - _C_start._C_p);N _C_end_of_storage = __q + (__len + _RWSTD_WORD_BIT - 1)/_RWSTD_WORD_BIT;" _C_start = iterator(__q, 0); } }$#endif // _RWSTD_NO_MEMBER_TEMPLATES template H void vector::resize (size_type __new_size, bool __c) { if (__new_size > size()); insert(end(), __new_size - size(), __c);  ! else if (__new_size < size())) erase(begin() + __new_size, end()); }&#endif // _RWSTD_NO_CLASS_PARTIAL_SPEC#endif // _RWSTD_NO_VECTOR_BOOL} // namespace stdE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endifww |s7Ԧ/*** >** Copyright 2003 Compaq Information Technologies Group, L.P.**C** Compaq and the Compaq logo are trademarks of Compaq Information@** Technologies Group, L.P. in the U.S. and/or other countries.**J** Confidential computer software. Valid license from Compaq required forF** possession, use or copying. Consistent with FAR 12.211 and 12.212,F** Commercial Computer Software, Computer Software Documentation, andK** Technical Data for Commercial Items are li censed to the U.S. Government/** under vendor's standard commercial license.***/#ifndef __VECTOR_HXX#include #endifwws7Ԧ#ifndef __VECTOR_HXX#define __VECTOR_HXX//// B// Copyright 2003, 2004 Hewlett-Packard Development Company, L.P.//F// Confidential computer software. Valid license from HP required forF// possession, use or copying. Consistent with FAR 12.211 and 12.212,F// Commercial Computer Software, Computer Software Documentation, andK// Technical Data for Commercial Items are licensed to the U.S. Government/// under vendor's standard commercial license.//////++#// FACILITY: DEC C++ Class Library//// SUBSYSTEM: Vectors & Stacks//// MODULE: vector//// INFORMATION HIDDEN://(// Representation of a vector and stack.//// MODULE DESCRIPTION://D// This module implements the representation of vectors & stacks and/// defines the functions which operate on them.//// DESIGN ISSUES://>// This package uses generic types; see generic.h for details.//D// This file contains everything which DOES depend on the parameters//) of the generic type.////--////// INCLUDE FILES////#include #include #ifdef _NT#include #else#include #endif#include #include extern "C"{#include #include }#pragma __environment save)#pragma __environment cxx_header_defaults//// // LINKAGE////'#if defined(__VMS) && defined(__DECCXX))# pragma __extern_model __strict_refdef4# pragma __extern_prefix __CXXL_PLAIN_FUNC_LINKAGE# if defined __VAX## pragma __nomember_alignment# else!# pragma __member_alignment # endif#endif //++// CLASS: vector(TYPE)//// CLASS DESCRIPTION://E// Generic (parameterized) type for a vector of objects of some type.//H// The following operations must be defined for the type of the objects: // new // delete// =//// PRIVATE DATA://// unsigned cxxl_size:+// The number of elements in the vector// TYPE *cxxl_elements:"// The address of the elements// // DESIGN://=// The elements are allocated in a single, contiguous vector.=// The address of the 0th element is stored in cxxl_elements.>// The address of the Nth element (N >= 0 && N < cxxl_size) is6// cxxl_elements((N*sizeof(TYPE)) == cxxl_elements[N].//<// The associated messages are in cxxl.msf and cxxl$msg.msg.//9// WARNING: The error numbers are duplicated in cxxl.msf.2// Changes to these should be done in both places!//--(#define vector(TYPE) name2(TYPE, vector)#define vectordeclare(TYPE) \ class vector(TYPE) \ { \ private: \ unsigned cxxl_size; \ TYPE *cxxl_elements; \ protected: \ static Messages messages; \ public: \ vector(TYPE)(int); \ vector(TYPE)(vector(TYPE) &); \ inline ~vector(TYPE)(); \+ vector(TYPE) &operator=(vector(TYPE) &); \ inline TYPE &elem(int); \ inline TYPE &operator[](int); \ inline in t size(); \ void set_size(int); \ static Objection size_error; \$ static Objection copy_size_error; \ static Objection index_error; \ }; \" CXXL_VECTOR_DESTRUCTOR(TYPE) \ CXXL_VECTOR_SIZE(TYPE) \ CXXL_VECTOR_ELEM(TYPE) \ CXXL_VECTOR_INDEX(TYPE) // workaround for CXXC_BUGS 5347'#if defined(__VMS) && defined(__DECCXX)#pragma extern_prefix save/#pragma extern_prefix __CXXL_PLAIN_FUNC_LINKAGE# endif*extern Objection_action cxxl_vector_error;'#if defined( __VMS) && defined(__DECCXX)#pragma extern_prefix restore#endif#define vectorimplement(TYPE) \# CXXL_VECTOR_CONSTRUCTOR(TYPE) \* CXXL_VECTOR_CONSTRUCTOR_VECTOR(TYPE) \ CXXL_VECTOR_ASSIGN(TYPE) \ CXXL_VECTOR_SET_SIZE(TYPE) \= Objection vector(TYPE)::size_error(&cxxl_vector_error); \B Objection vector(TYPE)::copy_size_error(&cxxl_vector_error); \> Objection vector(TYPE)::index_error(&cxxl_vector_error); \C Messages vector(TYPE)::messages(__cxxl_packages_t::f ile_name, \B __cxxl_packages_t::set_vector, __cxxl_packages_t::file_location);G// The error codes used in the message file (for both stack and vector)enum cxxl_vector_error_code_t{ E_VECTOR_SIZE = 1, E_VECTOR_SIZEASSIGN = 2, E_VECTOR_INDEX = 3, E_STACK_UNDERFLOW = 4, E_STACK_OVERFLOW = 5, E_STACK_NOTOP = 6}; //++// CLASS: vector(TYPE)//// FUNCTIONAL DESCRIPTION://$// Constructor for a generic vector.//// FORMAL PARAMETERS://// i nt new_size:'// Number of elements in the vector//// EXCEPTIONS:// // size_error//// PRECONDITIONS://// new_size >= 1//// POSTCONDITIONS://// size() == new_size//--'#define CXXL_VECTOR_CONSTRUCTOR(TYPE) \. vector(TYPE)::vector(TYPE)(int new_size) \ { \ if(new_size <= 0) \ { \4 size_error.raise(messages.text(E_VECTOR_SIZE, \& "Vector size is not at least 1")); \ new_size = 1; \ } \ cxxl_size = new_size; \' cxxl_elements = new TYP E[cxxl_size]; \ } //++// CLASS: vector(TYPE)//// FUNCTIONAL DESCRIPTION://$// Constructor for a generic vector.F// The initial values of the elements are taken from another object of// the same type and size.//// FORMAL PARAMETERS://// vector(TYPE) &src:// The vector to copy from//// PRECONDITIONS://// src.size() == this->size()//// POSTCONDITIONS://7// for(int i=0; i vector(TYPE) &vector(TYPE)::operator=(vector(TYPE) &src) \ { \ int dst_size = size(); \ if(dst_size != src.size()) \ { \? copy_size_error.raise(messages.text(E_VECTOR_SIZEASSIGN, \/ "Mismatching sizes in vector assignment")); \ if(dst_size > src.size()) \ dst_size = src.size(); \ } \$ for(int i = 0; i < dst_size; i++) \! cxxl_elements[i] = src[i]; \ return *this; \ } //++// CLASS: vector(TYPE)//// FUNCTIONAL DESCRIPTION://'// Change the size of a generic vector.//// FORMAL PARAMETERS://// int new_size:"// The new size of the vector.//// EXCEPTIONS:// // size_error//// PRECONDITIONS://// new_size >= 1//// POSTCONDITIONS://// size() == new_size// // DESIGN://;// Allocate a new vector of elements, copy the old elementsA// (being careful not to copy more than will fit), and deallocate// the old vector of elements.//--$#define CXXL_VECTOR_SET_SIZE(TYPE) \/ void vector(TYPE)::set_size(int new_size) \ { \ if(new_size <= 0) \ { \4 size_error.raise(messages.text(E_VECTOR_SIZE, \& "Vector size is not at least 1")); \ new_size = 1; \ } \ int copy_size = size(); \1 if(new_size < copy_size) copy_size = new_size; \+ TYPE *new_elements = new TYPE[new_size]; \% for(int i = 0; i < copy_size; i++) \! new_elements[i] = elem(i); \. delete[__NOSCOPE(cxxl_size)] cxxl_elements; \ cxxl_elements = new_elements; \ cxxl_size = new_size; \ } //++// CLASS: vector(TYPE)//// FUNCTIONAL DESCRIPTION://5// Return the number of elements in a generic vector.//// RETURN VALUE://'// The number of elements in the vector//// POSTCONDITIONS://// return value >= 1//-- #define CXXL_VECTOR_SIZE(TYPE) \% inline int vector(TYPE)::size() \ { \ return cxxl_size; \ } //++// CLASS: vector(TYPE)//// FUNCTIONAL DESCRIPTION://8// Return a reference to an element in a generic vector.//// FORMAL PARAMETERS:// // int i:// An index into the vector//// RETURN VALUE://1// The contents of the ith element of the vector.// // DESIGN://0// Use the default, built-in indexing mechanism.//-- #define CXXL_VECTOR_ELEM(TYPE) \, inline TYPE &vector(TYPE)::elem(int i) \ { \ return cxxl_elements[i]; \ } //++// CLASS: vector(TYPE)//// FUNCTIONAL DESCRIPTION://'// Index operator for a generic vector.//// FORMAL PARAMETERS:// // int i:// An index into the vector//// RETURN VALUE://1// The contents of the ith element of the vector.//// EXCEPTIONS://// index_error//// PRECONDITIONS://// i >= 0 && i < size()// // DESIGN://?// Use the elem(int) member function to do the actual indexing.//--!#define CXXL_VECTOR_INDEX(TYPE) \2 inline TYPE &vector(TYPE)::operator[](int i) \ { \ if((i < 0) || (i >= size())) \6 index_error.raise(messages.text(E_VECTOR_INDEX, \# "Vector index out of bounds")); \ return elem(i); \ } //++// CLASS: stack(TYPE)//%// BASE CLASSES: public vector(TYPE)//// CLASS DESCRIPTION://D// Generic (parameterized) type for a stack of objects of some type.//H// The following operations must be defined for the type of the objects: // new // delete// =//// PRIVATE DATA://// unsigned cxxl_n_used:=// The number of elements in the stack which are occupied// // DESIGN://E// A stack is a special case (hence a derived class or subclass) of a // vector.J// The number of elements which are currently in the stack is cxxl_n_used.+// If the stack is empty, cxxl_n_used == 0.I// If the stack has N elements in it, cxxl_n_used == N and the element is// stored in elem(N-1)./// If the stack is full, cxxl_n_used == size().//--&#define stack(TYPE) name2(TYPE, stack)#define stackdeclare(TYPE) \/ class stack(TYPE): protected vector(TYPE) \ { \ private: \ unsigned cxxl_n_used; \ public: \ stack(TYPE)(int); \ stack(TYPE)(stack(TYPE) &); \ inline void push(TYPE); \ inline TYPE pop(); \ inline TYPE &top(); \ inline int full(); \ inline int empty(); \ inline int size(); \ inline int size_used(); \# static Objection overflow_error; \$ static Objection underflow_error; \! static Objection no_top_error; \ }; \ CXXL_STACK_PUSH(TYPE) \ CXXL_STACK_POP(TYPE) \ CXXL_STACK_TOP(TYPE) \ CXXL_STACK_FULL(TYPE) \ CXXL_STACK_EMPTY(TYPE) \ CXXL_STACK_SIZE(TYPE) \ CXXL_STACK_SIZE_USED(TYPE)#define stackimplement(TYPE) \" CXXL_STACK_CONSTRUCTOR(TYPE) \( CXXL_STACK_CONSTRUCTOR_STACK(TYPE) \@ Objection stack(TYPE)::overflow_error(&cxxl_vector_error); \A Objection stack(TYPE)::underflow_error(&cxxl_vector_error); \< Objection stack(TYPE)::no_top_error(&cxxl_vector_error); //++// CLASS: stack(TYPE)//// FUNCTIONAL DESCRIPTION://#// Constructor for a generic stack.//// FORMAL PARAMETERS://// int new_size:.// Maximum number of elements in the stack//// PRECONDITIONS://// new_size >= 1//// POSTCONDITIONS://// size() == new_size// size_used() == 0// // DESIGN://C// Use the base-class (vector) constructor to create the data area.$// Then initialize our private data.//--&#define CXXL_STACK_CONSTRUCTOR(TYPE) \/ inline stack(TYPE)::stack(TYPE)(int size) \ : vector(TYPE)(size) \ { \ cxxl_n_used = 0; \ } //++// CLASS: stack(TYPE)//// FUNCTIONAL DESCRIPTION://#// Constructor for a generic stack.//// FORMAL PARAMETERS://// stack(TYPE) &src:// The stack to copy from//// POSTCONDITIONS://// size() == src.size()!// size_used() == src.size_used()// // DESIGN://J// Use the base-class (vector) constructor to create (copy) the data area.// Then copy our private data.//--,#define CXXL_STACK_CONSTRUCTOR_STACK(TYPE) \7 inline stack(TYPE)::stack(TYPE)(stack(TYPE) &src) \( : vector(TYPE)((vector(TYPE) &)(src)) \ { \! cxxl_n_used = src.cxxl_n_used; \ } //++// CLASS: stack(TYPE)//// FUNCTIONAL DESCRIPTION://(// Push an element onto a generic stack.//// FORMAL PARAMETERS://// TYPE new_elem:'// The value to push onto the stack//// EXCEPTIONS://// overflow_error//// PRECONDITIONS://// size_used() < size()//// POSTCONDITIONS://// size_used() > 0//--#define CXXL_STACK_PUSH(TYPE) \2 inline void stack(TYPE)::push(TYPE new_elem) \ { \ if(cxxl_n_used >= size()) \; overflow_error.raise(messages.text(E_STACK_OVERFLOW, \ "Stack overflow")); \" elem(cxxl_n_used++) = new_elem; \ } //++// CLASS: stack(TYPE)//// FUNCTIONAL DESCRIPTION://4// Pop an element off of the top of a generic stack.//// RETURN VALUE:///// The value popped off of the top of the stack//// EXCEPTIONS://// underflow_error//// PRECONDITIONS://// size_used() > 0//// POSTCONDITIONS://// size_used() < size()//--#define CXXL_STACK_POP(TYPE) \$ inline TYPE stack(TYPE)::pop() \ { \ if(cxxl_n_used == 0) \= underflow_error.raise(messages.text(E_STACK_UNDERFLOW, \ "Stack underflow")); \ return elem(--cxxl_n_used); \ } //++// CLASS: stack(TYPE)//// FUNCTIONAL DESCRIPTION://C// Return a reference to the element on the top of a generic stack.//// RETURN VALUE://3// A reference to the value on the top of the stack//// EXCEPTIONS://// no_top_error//// PRECONDITIONS://// size_used() > 0//// POSTCONDITIONS://// size_used() > 0//--#define CXXL_STACK_TOP(TYPE) \% inline TYPE &stack(TYPE)::top() \ { \ if(cxxl_n_used == 0) \6 no_top_error.raise(messages.text(E_STACK_NOTOP, \# "No element on top of stack")); \ return elem (cxxl_n_used - 1); \ } //++// CLASS: stack(TYPE)//// FUNCTIONAL DESCRIPTION://"// See if a generic stack is full.//// RETURN VALUE://>// non-0: There are 0 elements in the stack which are not used// (The stack is full);// 0: There are >0 elements in the stack which are not used// (The stack is not full)//--#define CXXL_STACK_FULL(TYPE) \$ inline int stack(TYPE)::full() \ { \ return cxxl_n_used == size(); \ } //++// CLASS: s!tack(TYPE)//// FUNCTIONAL DESCRIPTION://#// See if a generic stack is empty.//// RETURN VALUE://:// non-0: There are 0 elements in the stack which are used// (The stack is empty)7// 0: There are >0 elements in the stack which are used// (The stack is not empty)//-- #define CXXL_STACK_EMPTY(TYPE) \% inline int stack(TYPE)::empty() \ { \ return cxxl_n_used == 0; \ } //++// CLASS: stack(TYPE)//// FUNCTIONAL DESCRIPTION://<// Ret"urn the maximum number of elements in a generic stack.//// RETURN VALUE://D// The maximum number of elements which can be occupied in the stack//--#define CXXL_STACK_SIZE(TYPE) \$ inline int stack(TYPE)::size() \ { \ return vector(TYPE)::size(); \ } //++// CLASS: stack(TYPE)//// FUNCTIONAL DESCRIPTION://E// Return the number of elements currently in use in a generic stack.//// RETURN VALUE://C// The number of elements which are currently occupied in the stack//--$#define CXXL_STACK_SIZE_USED(TYPE) \) inline int stack(TYPE)::size_used() \ { \ return cxxl_n_used; \ } #pragma __environment restore#endif// End of vector.hxxww $ Commercial Computer Software, Computer Software Documentation, andK * Technical Data for Commercial Items are licensed to the U.S. Government/ * under vendor's standard commercial license. *L *************************************************************************** * * Copyright (c) 1994 * Hewlett-Packard Company *E * Permission to use, copy, modify, distribute and sell this softwareG * and its documentation for any purpose is hereby granted without fee,D * provided that the % above copyright notice appear in all copies andD * that both that copyright notice and this permission notice appearA * in supporting documentation. Hewlett-Packard Company makes noA * representations about the suitability of this software for anyH * purpose. It is provided "as is" without express or implied warranty. *L *************************************************************************** *J * Copyright (c) 1994-2002 Rogue Wave Software, Inc. All Rights Reserved. *F * This co&mputer software is owned by Rogue Wave Software, Inc. and isG * protected by U.S. copyright laws and other laws and by internationalI * treaties. This computer software is furnished by Rogue Wave Software,H * Inc. pursuant to a written license agreement and may be used, copied,D * transmitted, and stored only in accordance with the terms of suchF * license and with the inclusion of the above copyright notice. ThisG * computer software or any other copies thereof may not be provided or0 * o 'therwise made available to any other person. *I * U.S. Government Restricted Rights. This computer software is providedB * with Restricted Rights. Use, duplication, or disclosure by theI * Government is subject to restrictions as set forth in subparagraph (c)H * (1) (ii) of The Rights in Technical Data and Computer Software clause@ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of theG * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,B * as applicable. Man(ufacturer is Rogue Wave Software, Inc., 55001 * Flatiron Parkway, Boulder, Colorado 80301 USA. *L **************************************************************************/#ifndef __STD_VECTOR_SPEC__#define __STD_VECTOR_SPEC__#include #ifndef __STD_VECTOR__#include #endif // __STD_VECTOR__#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT"# pragma __environment __save1# pragma __environment __cxx_header_defaults # endif)#endifE#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)#pragma __extern_prefix __save&#pragma __extern_prefix _EXTERN_PREFIX#endif_RWSTD_NAMESPACE (std) { 2template class vector >;template ,class vector <_TypeT*, allocator <_TypeT*> >{= typedef allocator <_TypeT*> _Allocator;? typedef _RWSTD_REBIND (_Allocator, void*) __imp_alloc_type;8 typedef vector _ *_imp_type;4 __imp_type __imp;public:K typedef _TypeT* value_type;K typedef _Allocator allocator_type;A typedef _TYPENAME allocator_type::reference reference;G typedef _TYPENAME allocator_type::const_reference const_reference;@ typedef _TYPENAME allocator_type::pointer iterator;F typedef _TYPENAME allocator_type::const_pointer con +st_iterator;A typedef _TYPENAME allocator_type::size_type size_type;G typedef _TYPENAME allocator_type::difference_type difference_type;? typedef _TYPENAME allocator_type::pointer pointer;E typedef _TYPENAME allocator_type::const_pointer const_pointer;%#ifndef _RWSTD_NO_CLASS_PARTIAL_SPEC K typedef _STD::reverse_iterator const_reverse_iterator;E typedef _STD::reverse_iterator reverse_iterator;4#else // if ,defined (_RWSTD_NO_CLASS_PARTIAL_SPEC)4 typedef _STD::reverse_iterator  const_reverse_iterator;. typedef _STD::reverse_iterator  reverse_iterator;(#endif // _RWSTD_NO_CLASS_PARTIAL_SPECpublic:R _EXPLICIT vector (const _Allocator &allo-c _RWSTD_DEFAULT_ARG (_Allocator ()))  : __imp (alloc) { }'#ifndef _RWSTD_NO_DEFAULT_TEMPLATE_ARGS! _EXPLICIT vector (size_type n,J const_reference x _RWSTD_DEFAULT_ARG (value_type ()),Q const _Allocator &alloc _RWSTD_DEFAULT_ARG (_Allocator ())) > : __imp (n, __imp_type::const_reference (x), alloc) { }7#else // if defined (_RWSTD_NO_DEFAULT_TEMPLATE_ARGS) vector (): __imp () { }, vector (size_type n, const_ref.erence x) 8 : __imp (n, __imp_type::const_reference (x)) { }E vector (size_type n, const_reference x, const _Allocator &alloc) ? : __imp (n, __imp_type::const_reference (x), alloc) { }+#endif // _RWSTD_NO_DEFAULT_TEMPLATE_ARGS"#ifndef _RWSTD_NO_MEMBER_TEMPLATES" template 4 vector (InputIterator first, InputIterator last,G const _Allocator &alloc _RWSTD_DEFAULT_ARG (_Allocator ()))( : __imp (first, last, alloc) { }/2#else // if defined (_RWSTD_NO_MEMBER_TEMPLATES)6 vector (const_iterator first, const_iterator last)! : __imp (first, last) { }$#endif // _RWSTD_NO_MEMBER_TEMPLATES vector (const vector& x) : __imp (x.__imp) { }) vector& operator= (const vector& x) { __imp = x.__imp; return *this; }"#ifndef _RWSTD_NO_MEMBER_TEMPLATES" template ; void assign (InputIterator first, InputIterator last) {# __0imp.assign (first, last); }2#else // if defined (_RWSTD_NO_MEMBER_TEMPLATES)= void assign (const_iterator first, const_iterator last) {9 __imp.assign (__imp_type::const_iterator (first),8 __imp_type::const_iterator (last)); }$#endif // _RWSTD_NO_MEMBER_TEMPLATES2 void assign (size_type n, const_reference x) {: __imp.assign (n, __imp_type::const_reference (x)); }+ allocator_type get_allocator () const {& retu1rn __imp.get_allocator (); } iterator begin () {) return iterator (__imp.begin ()); }# const_iterator begin () const {/ return const_iterator (__imp.begin ()); } iterator end () {' return iterator (__imp.end ()); }! const_iterator end () const {- return const_iterator (__imp.end ()); } reverse_iterator rbegin () {) return reverse_iterator (end ()); }, const_reverse_iterator rbegi2n () const {/ return const_reverse_iterator (end ()); } reverse_iterator rend () {+ return reverse_iterator (begin ()); }* const_reverse_iterator rend () const {1 return const_reverse_iterator (begin ()); } size_type size () const { return __imp.size (); }! size_type max_size () const {! return __imp.max_size (); }& void resize (size_type new_size) { __imp.resize (new_size); }39 void resize (size_type new_size, const_reference x) {A __imp.resize (new_size, __imp_type::const_reference (x)); }! size_type capacity () const {! return __imp.capacity (); } bool empty () const { return __imp.empty (); } void reserve (size_type n) { __imp.reserve (n); }( reference operator[] (size_type n) {% return reference (__imp [n]); }4 const_reference operator[] (size_type n) const4 {+ return const_reference (__imp [n]); } reference at (size_type n) {( return reference (__imp.at (n)); }- const_reference at (size_type n) const {. return const_reference (__imp.at (n)); } reference front () {* return reference (__imp.front ()); }$ const_reference front () const {0 return const_reference (__imp.front ()); } reference back () {) return reference (__imp.back ()); }5# const_reference back () const {/ return const_reference (__imp.back ()); }( void push_back (const_reference x) {: __imp.push_back (__imp_type::const_reference (x)); } void pop_back () { __imp.pop_back (); }7 iterator insert (iterator pos, const_reference x) {D return iterator (__imp.insert (__imp_type::iterator (pos),J __imp_type::const_reference (x))); }@ void insert 6(iterator pos, size_type n, const_reference x) {V __imp.insert (__imp_type::iterator (pos), n, __imp_type::const_reference (x)); }"#ifndef _RWSTD_NO_MEMBER_TEMPLATES" template I void insert (iterator pos, InputIterator first, InputIterator last) {? __imp.insert (__imp_type::iterator (pos), first, last); }/#else // defined (_RWSTD_NO_MEMBER_TEMPLATES)K void insert (iterator pos, const_iterator first, const_iterator last) {U7 __imp.insert (__imp_type::iterator (pos), __imp_type::const_iterator (first),8 __imp_type::const_iterator (last)); }$#endif // _RWSTD_NO_MEMBER_TEMPLATES# iterator erase (iterator pos) {C return iterator (__imp.erase (__imp_type::iterator (pos))); }4 iterator erase (iterator first, iterator last) {C return iterator (__imp.erase (__imp_type::iterator (first),C __imp_type::iterator (last)))8; } void swap (vector &x) { __imp.swap (x.__imp); } void clear () { __imp.clear (); } #ifndef _RWSTD_NO_EXT_ALLOC_SIZE" size_type allocation_size () {( return __imp.allocation_size (); }: size_type allocation_size (size_type new_size) const {0 return __imp.allocation_size (new_size); }##endif // _RWSTD_NO_EXT_ALLOC_SIZE};template Ginline bool operator== (const vector<_TypeT*, 9allocator <_TypeT*> > &x,] const vector<_TypeT*, allocator <_TypeT*> > &y){N return x.size () == y.size () && equal (x.begin (), x.end (), y.begin ());}template Einline bool operator< (const vector<_TypeT*, allocator <_TypeT*> >&x,E const vector<_TypeT*, allocator <_TypeT*> >&y){L return lexicographical_compare (x.begin(), x.end(), y.begin(), y.end());}M#if !defined (_RWSTD_NO_NAMESPAC:E) || !defined (_RWSTD_NO_PART_SPEC_OVERLOAD)template Ginline bool operator!= (const vector<_TypeT*, allocator <_TypeT*> > &x,G const vector<_TypeT*, allocator <_TypeT*> > &y){ return !(x == y);}template Ginline bool operator<= (const vector<_TypeT*, allocator <_TypeT*> > &x,G const vector<_TypeT*, allocator <_TypeT*> > &y){ return !(y < x);}template Ginline bool oper;ator>= (const vector<_TypeT*, allocator <_TypeT*> > &x,G const vector<_TypeT*, allocator <_TypeT*> > &y){ return !(x < y);}template Finline bool operator> (const vector<_TypeT*, allocator <_TypeT*> > &x,F const vector<_TypeT*, allocator <_TypeT*> > &y){ return y < x;}S#endif // !defined (_RWSTD_NO_NAMESPACE) || !defined (_RWSTD_NO_PART_SPEC_OVERLOAD)} // namespace stdE#if defined(__VMS) && define d(__DECCXX) && !defined(__DECFIXCXXL1158)$# pragma __extern_prefix __restore#endif#if defined(__DECCXX)# ifdef __PRAGMA_ENVIRONMENT%# pragma __environment __restore # endif#endif#endif //__STD_VECTOR_SPEC__ww =s7ԦK/**************************************************************************.* Copyright 2002 Compaq Computer Corporation*:* COMPAQ Registered in U.S. Patent and Trademark Office.*K* Confidential computer software. Valid license from Compaq or authorizedH* sublicensor required for possession, use or copying. Consistent withJ* FAR 12.211 and 12.212, Commercial Computer Software, Computer SoftwareJ* Documentation, and Technical Data for Commercial Items are l icensed toC* the U.S. Government under vendor's standard commercial license.K**************************************************************************/#ifndef _CASSERT_# define _CASSERT_# if defined __PURE_CNAME # define __NAMESPACE_STD_ONLY# endif# include # undef __NAMESPACE_STD_ONLY#endifww ?Ls7ԦK/**************************************************************************.* Copyright 2002 Compaq Computer Corporation*:* COMPAQ Registered in U.S. Patent and Trademark Office.*K* Confidential computer software. Valid license from Compaq or authorizedH* sublicensor required for possession, use or copying. Consistent withJ* FAR 12.211 and 12.212, Commercial Computer Software, Computer SoftwareJ* Documentation, and Technical Data for Commercial Items are l icensed toC* the U.S. Government under vendor's standard commercial license.K**************************************************************************/#ifndef _CERRNO_# define _CERRNO_# if defined __PURE_CNAME # define __NAMESPACE_STD_ONLY# endif# include # undef __NAMESPACE_STD_ONLY#endifww Aѯs7ԦK/**************************************************************************.* Copyright 2002 Compaq Computer Corporation*:* COMPAQ Registered in U.S. Patent and Trademark Office.*K* Confidential computer software. Valid license from Compaq or authorizedH* sublicensor required for possession, use or copying. Consistent withJ* FAR 12.211 and 12.212, Commercial Computer Software, Computer SoftwareJ* Documentation, and Technical Data for Commercial Items are l icensed toC* the U.S. Government under vendor's standard commercial license.K**************************************************************************/#ifndef _CFLOAT_# define _CFLOAT_# if defined __PURE_CNAME # define __NAMESPACE_STD_ONLY# endif# include # undef __NAMESPACE_STD_ONLY#endifww Cظs7ԦK/**************************************************************************.* Copyright 2002 Compaq Computer Corporation*:* COMPAQ Registered in U.S. Patent and Trademark Office.*K* Confidential computer software. Valid license from Compaq or authorizedH* sublicensor required for possession, use or copying. Consistent withJ* FAR 12.211 and 12.212, Commercial Computer Software, Computer SoftwareJ* Documentation, and Technical Data for Commercial Items are l icensed toC* the U.S. Government under vendor's standard commercial license.K**************************************************************************/#ifndef _CISO646_# define _CISO646_# if defined __PURE_CNAME # define __NAMESPACE_STD_ONLY# endif# include # undef __NAMESPACE_STD_ONLY#endifww E]s7ԦK/**************************************************************************.* Copyright 2002 Compaq Computer Corporation*:* COMPAQ Registered in U.S. Patent and Trademark Office.*K* Confidential computer software. Valid license from Compaq or authorizedH* sublicensor required for possession, use or copying. Consistent withJ* FAR 12.211 and 12.212, Commercial Computer Software, Computer SoftwareJ* Documentation, and Technical Data for Commercial Items are l icensed toC* the U.S. Government under vendor's standard commercial license.K**************************************************************************/#ifndef _CLIMITS_# define _CLIMITS_# if defined __PURE_CNAME # define __NAMESPACE_STD_ONLY# endif# include # undef __NAMESPACE_STD_ONLY#endifwwd7Ԧ CBLDR CLIMITS.)s7Ԧ CBLDR MATH_OVRLD_IMPL.+s7Ԧ CBLDR STDLIB_OVRLD_IMPL.+s7Ԧ CBLDR STRING_OVRLD_IMPL.*s7Ԧ CBLDR WCHAR_OVRLD_IMPL. -gt7Ԧ CBLDR CCTYPE.!Ht7Ԧ CBLDR CLOCALE.4 u7Ԧ CBLDR CMATH.!su7Ԧ CBLDR CSETJMP.!7v7Ԧ CBLDR CSIGNAL.!v7Ԧ CBLDR CSTDARG.!Ƨ;w7Ԧ CBLDR CSTDDEF. P@x7Ԧ CBLDR CSTDIO. Hds7ԦK/**************************************************************************.* Copyright 2000 Compaq Computer Corporation*:* COMPAQ Registered in U.S. Patent and Trademark Office.*K* Confidential computer software. Valid license from Compaq or authorizedH* sublicensor required for possession, use or copying. Consistent withJ* FAR 12.211 and 12.212, Commercial Computer Software, Computer SoftwareJ* Documentation, and Technical Data for Commercial Items are lIicensed toC* the U.S. Government under vendor's standard commercial license.K**************************************************************************//*. Overloaded function signatures for */extern "C++" {#ifdef __NAMESPACE_STDnamespace std {#endif/* = * Overloads and Added Signatures Required by C++ Standard * */Cinline double abs(double _dbl) { return fabs(_dbl); }Ninline double pow(double _dbl, int _i) { return pow(_dbl, (dou Jble)_i); }Dinline float abs(float _flt) { return fabsf(_flt); }Dinline float acos( float _flt ) { return acosf(_flt); }Dinline float asin( float _flt ) { return asinf(_flt); }Dinline float atan( float _flt ) { return atanf(_flt); }Vinline float atan2( float _flt1, float _flt2 ) { return atan2f(_flt1,_flt2); }Dinline float ceil( float _flt ) { return ceilf(_flt); }Cinline float cos( float _flt ) { return Kcosf(_flt); }Dinline float cosh( float _flt ) { return coshf(_flt); }Cinline float exp( float _flt ) { return expf(_flt); }Dinline float fabs( float _flt ) { return fabsf(_flt); }Finline float floor( float _flt ) { return floorf(_flt); }Uinline float fmod( float _flt1, float _flt2 ) { return fmodf(_flt1, _flt2); }Sinline float frexp( float _flt, int *_ip ) { return frexpf(_flt, _ip); }Rinline float ldexp( float _Lflt, int _i ) { return ldexpf(_flt, _i); }Cinline float log( float _flt ) { return logf(_flt); }Einline float log10( float _flt ) { return log10f(_flt); }Oinline float modf( float _flt, float *_fp ) { return modff(_flt,_fp); }Qinline float pow( float _flt1, float _flt2 ) { return powf(_flt1,_flt2); }Linline float pow( float _flt, int _i ) { return powf(_flt,_i); }Binline float sin( float _flt ) { return sinf(_flt); }Cin Mline float sinh( float _flt ) { return sinhf(_flt); }Cinline float sqrt( float _flt ) { return sqrtf(_flt); }Binline float tan( float _flt ) { return tanf(_flt); }Cinline float tanh( float _flt ) { return tanhf(_flt); }=#if __X_FLOAT /* use real long double math functions */Cinline long double abs(long double _ldbl) { return fabsl(_ldbl); }Einline long double acos( long double _ldbl) { return acosl(_ldbl); }Einline long double asNin( long double _ldbl) { return asinl(_ldbl); }Einline long double atan( long double _ldbl) { return atanl(_ldbl); }einline long double atan2( long double _ldbl1, long double _ldbl2) { return atan2l(_ldbl1,_ldbl2); }Einline long double ceil( long double _ldbl) { return ceill(_ldbl); }Dinline long double cos( long double _ldbl) { return cosl(_ldbl); }Einline long double cosh( long double _ldbl) { return coshl(_ldbl); }Dinline long double exp( long double _ldbl) { return expl(_ldbl);O }Einline long double fabs( long double _ldbl) { return fabsl(_ldbl); }Ginline long double floor( long double _ldbl) { return floorl(_ldbl); }binline long double fmod( long double _ldbl1, long double _ldbl2) { return fmodl(_ldbl1,_ldbl2); }Uinline long double frexp( long double _ldbl, int *_ip) { return frexpl(_ldbl,_ip); }Rinline long double ldexp( long double _ldbl, int _i) { return ldexpl(_ldbl,_i); }Cinline long double log( long double _ldbl) { return logl(_ldbl); }Ginline long dPouble log10( long double _ldbl) { return log10l(_ldbl); }]inline long double modf( long double _ldbl, long double *_ldp) { return modfl(_ldbl,_ldp); }`inline long double pow( long double _ldbl1, long double _ldbl2) { return powl(_ldbl1,_ldbl2); }[inline long double pow( long double _ldbl, int _i) { return powl(_ldbl,(long double)_i); }Cinline long double sin( long double _ldbl) { return sinl(_ldbl); }Einline long double sinh( long double _ldbl) { return sinhl(_ldbl); }Einline long douQble sqrt( long double _ldbl) { return sqrtl(_ldbl); }Cinline long double tan( long double _ldbl) { return tanl(_ldbl); }Einline long double tanh( long double _ldbl) { return tanhl(_ldbl); }#elseRinline long double abs(long double _ldbl) { return (double)fabs((double)_ldbl); }Linline long double acos( long double _ldbl) { return acos((double)_ldbl); }Linline long double asin( long double _ldbl) { return asin((double)_ldbl); }Linline long double atan( long double _ldbl) { return atan((Rdouble)_ldbl); }tinline long double atan2( long double _ldbl1, long double _ldbl2) { return atan2((double)_ldbl1,(double)_ldbl2); }Linline long double ceil( long double _ldbl) { return ceil((double)_ldbl); }Kinline long double cos( long double _ldbl) { return cos((double)_ldbl); }Linline long double cosh( long double _ldbl) { return cosh((double)_ldbl); }Kinline long double exp( long double _ldbl) { return exp((double)_ldbl); }Linline long double fabs( long double _ldbl) { return fabsS((double)_ldbl); }Ninline long double floor( long double _ldbl) { return floor((double)_ldbl); }qinline long double fmod( long double _ldbl1, long double _ldbl2) { return fmod((double)_ldbl1,(double)_ldbl2); }\inline long double frexp( long double _ldbl, int *_ip) { return frexp((double)_ldbl,_ip); }Yinline long double ldexp( long double _ldbl, int _i) { return ldexp((double)_ldbl,_i); }Jinline long double log( long double _ldbl) { return log((double)_ldbl); }Ninline long double log10( lTong double _ldbl) { return log10((double)_ldbl); }minline long double modf( long double _ldbl, long double *_ldp) { return modf((double)_ldbl,(double*)_ldp); }oinline long double pow( long double _ldbl1, long double _ldbl2) { return pow((double)_ldbl1,(double)_ldbl2); }]inline long double pow( long double _ldbl, int _i) { return pow((double)_ldbl,(double)_i); }Jinline long double sin( long double _ldbl) { return sin((double)_ldbl); }Linline long double sinh( long double _ldbl) { return si nh((double)_ldbl); }Linline long double sqrt( long double _ldbl) { return sqrt((double)_ldbl); }Jinline long double tan( long double _ldbl) { return tan((double)_ldbl); }Linline long double tanh( long double _ldbl) { return tanh((double)_ldbl); }#endif /* __X_FLOAT */#ifdef __NAMESPACE_STD} /* namespace std */#endif} /* extern "C++" */ww Vs7ԦK/**************************************************************************.* Copyright 2000 Compaq Computer Corporation*:* COMPAQ Registered in U.S. Patent and Trademark Office.*K* Confidential computer software. Valid license from Compaq or authorizedH* sublicensor required for possession, use or copying. Consistent withJ* FAR 12.211 and 12.212, Commercial Computer Software, Computer SoftwareJ* Documentation, and Technical Data for Commercial Items are lWicensed toC* the U.S. Government under vendor's standard commercial license.K**************************************************************************//*1 Overloaded function signatures for */extern "C++" {#ifdef __NAMESPACE_STDnamespace std {#endif5 inline long abs (long _n) { return labs(_n); }B inline ldiv_t div (long _n, long _d) { return ldiv(_n, _d); }D#if !defined(__STD_ARM) && !defined(__STD_MS) && !defined(__STD_GNU)d void *bsearch (cons t void *, const void *, size_t , size_t , int(*)(const void *, const void *));L void qsort (void *, size_t , size_t ,int(*)(const void *, const void *));#endif#ifdef __NAMESPACE_STD} /* namespace std */#endif} /* extern "C++" */ww YV6s7ԦK/**************************************************************************.* Copyright 2000 Compaq Computer Corporation*:* COMPAQ Registered in U.S. Patent and Trademark Office.*K* Confidential computer software. Valid license from Compaq or authorizedH* sublicensor required for possession, use or copying. Consistent withJ* FAR 12.211 and 12.212, Commercial Computer Software, Computer SoftwareJ* Documentation, and Technical Data for Commercial Items are lZicensed toC* the U.S. Government under vendor's standard commercial license.K**************************************************************************//* 0 Overloaded functions signatures for */extern "C++" {#ifdef __NAMESPACE_STDnamespace std {#endif- inline char *strchr (char * _s, int _c) {2 return (char*)strchr((const char*)_s, _c); }9 inline char *strpbrk (char * _s1, const char * _s2) {5 return (char*)strpbrk((const char*)_s1, _s2); }. inline char *strrchr (char * _s, int _c) {3 return (char*)strrchr((const char*)_s, _c); }8 inline char *strstr (char * _s1, const char * _s2) {4 return (char*)strstr((const char*)_s1, _s2); }8 inline void *memchr (void * _s, int _c, size_t _n) {6 return (void*)memchr((const void*)_s, _c, _n); }#ifdef __NAMESPACE_STD} /* namespace std */#endif} /* extern "C++" */ww \s7ԦK/**************************************************************************.* Copyright 2000 Compaq Computer Corporation*:* COMPAQ Registered in U.S. Patent and Trademark Office.*K* Confidential computer software. Valid license from Compaq or authorizedH* sublicensor required for possession, use or copying. Consistent withJ* FAR 12.211 and 12.212, Commercial Computer Software, Computer SoftwareJ* Documentation, and Technical Data for Commercial Items are l]icensed toC* the U.S. Government under vendor's standard commercial license.K**************************************************************************//*/ Overloaded function signatures for */extern "C++" {#ifdef __NAMESPACE_STDnamespace std {#endif6 inline wchar_t *wcschr (wchar_t * _s, wchar_t _c) {; return (wchar_t *) wcschr((const wchar_t*)_s, _c); }A inline wchar_t *wcspbrk (wchar_t * _s1, const wchar_t * _s2) {= return (wchar_t*) ^ wcspbrk((const wchar_t*)_s1, _s2); }7 inline wchar_t *wcsrchr (wchar_t * _s, wchar_t _c) {; return (wchar_t*) wcsrchr((const wchar_t*)_s, _c); }#if __CRTL_VER >= 700000009# if (!defined _XOPEN_SOURCE && !defined _DECC_V4_SOURCE)A inline wchar_t *wcsstr (wchar_t * _s1, const wchar_t * _s2) {< return (wchar_t*) wcsstr((const wchar_t*)_s1, _s2); }B inline wchar_t *wmemchr (wchar_t * _s, wchar_t _c, size_t _n) {? return (wchar_t*) wmemchr((const wchar_t*)_s, _c, _n); }# endif#endif#ifdef __NAMESPACE_STD} /* namespace std */#endif} /* extern "C++" */ww`gt7ԦM/**************************************************************************** *E * This cname header was auto-generated from its C89 counterpart *N ****************************************************************************/#ifndef __CCTYPE_LOADED#define __CCTYPE_LOADED#pragma __nostandard#ifdef __PURE_CNAME# define __NAMESPACE_STD_ONLY#endif#ifndef __CTYPE_PROCESSED#define __CTYPE_PROCESSEDM/******************************************* a***********************************=** - Character Type Classification Macros/Routines**M*****************************************************************************,** Header introduced by the ANSI C StandardM*****************************************************************************I** I** Copyright 2005 Hewlett-Packard Development Company, L.P. I** b I** Confidential computer software. Valid license from HP and/or I** its subsidiaries required for possession, use, or copying. I** I** Consistent with FAR 12.211 and 12.212, Commercial Computer Software, I** Computer Software Documentation, and Technical Data for Commercial I** Items are licensed to the U.S. Government under vendor's standard I** commercial clicense. I** I** Neither HP nor any of its subsidiaries shall be liable for technical I** or editorial errors or omissions contained herein. The information I** in this document is provided "as is" without warranty of any kind and I** is subject to change without notice. The warranties for HP products I** are set forth in the express limited warranty statements accodmpanying I** such products. Nothing herein should be construed as constituting an I** additional warranty. I** M******************************************************************************/#pragma __nostandard#include #ifdef __cplusplus extern "C" {#endif/*K** If the user has used /pointer_size=short or /pointer_size=long, we will+e** begin in a 32-bit pointer size context.*/#if __INITIAL_POINTER_SIZE # pragma __pointer_size __save# pragma __pointer_size 32#endif#ifdef __NAMESPACE_STDnamespace std {#endif/*%** 4.3.1 Character Testing Functions*/#ifdef __NAMESPACE_STD # pragma __extern_prefix __save!# pragma __extern_prefix "CXXL$"#endifint isalnum (int);int isalpha (int);int iscntrl (int);int isdigit (int);int isgraph (int);int islower (int);int isprint (fint);int ispunct (int);int isspace (int);int isupper (int);int isxdigit (int);#ifdef __NAMESPACE_STD## pragma __extern_prefix __restore#endif/**** 4.3.2 Character Case Mapping Functions*/int tolower (int);int toupper (int);#ifdef __NAMESPACE_STD} /* namespace std */#endifO/********************************************************************************** OpenVMS V6.2 and later**O******************************************************************g************/#if __CRTL_VER >= 60200000*# define __ctypet (decc$$ga___ctypet)*# define __ctypea (decc$$gl___ctypea)-# define __isclocale (decc$$gl___isclocale) # pragma __extern_model __save)# pragma __extern_model __strict_refdef /*A ** Classmask array __ctypet is declared as a pointer in order? ** to prevent BADSUBSCRIPT message which otherwise would beE ** issued by the compiler when one of the is* functions is calledB ** with EOF and, accordihngly, __ISFUNCTION macro below expands ** into __ctypet[-1] */+ extern const unsigned int * __ctypet ; extern int __ctypea ; extern int __isclocale ;## pragma __extern_model __restore# define __UPPER 0x1# define __LOWER 0x2# define __DIGIT 0x4# define __SPACE 0x8# define __PUNCT 0x10# define __CNTRL 0x20# define __XDIGIT 0x40# define __PRINT 0x80# define __ALPHABET 0x100# define __ALNUM 0ix104# define __GRAPH 0x200# define __BLANK 0X400"# define __ISALPHABET (isalpha)"# define __ISCNTRL (iscntrl)"# define __ISUPPER (isupper)"# define __ISLOWER (islower)"# define __ISDIGIT (isdigit)"# define __ISSPACE (isspace)"# define __ISPUNCT (ispunct)## define __ISXDIGIT (isxdigit)"# define __ISPRINT (isprint)"# define __ISGRAPH (isgraph)"# define __ISALNUM (isalnum)/*J** Throughout this header file, fo jr a C++ compilation with __NAMESPACE_STDM** enabled, functions from ANSI C standard that are defined as macros in thisB** header file, are defined as inline functions instead of macros.**J** This is to comply with clause 17.4.1.2 Headers [lib.headers] of the C++&** standard which says, in particular:J-6- Names that are defined as functions in C shall be defined as functions" in the C++ Standard Library.*)L*) This disallows the practice, allowed in C, of providing a "masking macro"L k in addition to the function prototype. The only way to achieve equivalentJ "inline" behavior in C++ is to provide a definition as an extern inline function.*/#ifndef __NAMESPACE_STD/*** Macro definitions*/L# define __ISFUNCTION(c,p) (__ctypea?__ctypet[(int)(c)]&__##p:__IS##p(c))-# define iscntrl(c) __ISFUNCTION(c, CNTRL)-# define isalnum(c) __ISFUNCTION(c, ALNUM)0# define isalpha(c) __ISFUNCTION(c, ALPHABET)-# define isdigit(c) __ISFUNCTION(c, DIGIT)l-# define isgraph(c) __ISFUNCTION(c, GRAPH)-# define islower(c) __ISFUNCTION(c, LOWER)-# define isprint(c) __ISFUNCTION(c, PRINT)-# define ispunct(c) __ISFUNCTION(c, PUNCT)-# define isspace(c) __ISFUNCTION(c, SPACE).# define isxdigit(c) __ISFUNCTION(c, XDIGIT)-# define isupper(c) __ISFUNCTION(c, UPPER)#else/*** Inline functions*/namespace std {$#define __INLINE_ISFUNCTION(c,p) { \9 /* no need to check __ctypea on VMS V6.2 and above */ \D retu mrn (c == __EOF ? 0 : __ctypet[(unsigned) c & 0xff] & __##p); \}8inline int iscntrl(int c) __INLINE_ISFUNCTION(c, CNTRL)8inline int isalnum(int c) __INLINE_ISFUNCTION(c, ALNUM);inline int isalpha(int c) __INLINE_ISFUNCTION(c, ALPHABET)8inline int isdigit(int c) __INLINE_ISFUNCTION(c, DIGIT)8inline int isgraph(int c) __INLINE_ISFUNCTION(c, GRAPH)8inline int islower(int c) __INLINE_ISFUNCTION(c, LOWER)8inline int isprint(int c) __INLINE_ISFUNCTION(c, PRINT)8inline int ispunct(int c) n __INLINE_ISFUNCTION(c, PUNCT)8inline int isspace(int c) __INLINE_ISFUNCTION(c, SPACE)9inline int isxdigit(int c) __INLINE_ISFUNCTION(c, XDIGIT)8inline int isupper(int c) __INLINE_ISFUNCTION(c, UPPER)} /* namespace std */#endif /* __NAMESPACE_STD */9# define __IS_LOWER(c) (((c) >= 'a' && (c) <= 'z')?1:0)9# define __IS_UPPER(c) (((c) >= 'A' && (c) <= 'Z')?1:0)/* ** X/Open extensions*/ 9# if defined(_XOPEN_SOURCE) || !defined(_ANSI_C_SOURCE)# if definedo(_FAST_TOUPPER)< /* Note - these evaluate macro parameters multiple times */Z# define _toupper(c) (__isclocale? (__IS_LOWER(c) ? (c) & 0xDF: (c)): (toupper)(c))Z# define _tolower(c) (__isclocale? (__IS_UPPER(c) ? (c) | 0x20: (c)): (tolower)(c)) # else"# define _toupper(c) (toupper)(c)"# define _tolower(c) (tolower)(c) # endif int isascii (int); int toascii (int);1# define isascii(c) ((unsigned)(c) <= 0x7F)&# define toascii(c) ((c) &p 0x7F) # endif#endifO/********************************************************************************** Prior to OpenVMS V6.2**O******************************************************************************/#if __CRTL_VER < 60200000%# define __ctype (*decc$ga___ctype) # pragma __extern_model __save)# pragma __extern_model __strict_refdef! extern const char __ctype [];## pragma __extern_model __restore# define _U 0x1# define _L 0x2# deqfine _D 0x4# define _S 0x8# define _P 0x10# define _C 0x20# define _X 0x40# define _B 0x80# ifdef __DECC# pragma __message __save(# pragma __message __disable (__CHECK) # endif$ static int __iscntrl (int __c) {% /* Check explicitly for EOF */6 return __c < 0 ? 0 : __ctype [__c & 0xFF] & _C; }# define iscntrl __iscntrl# ifdef __DECC# pragma __message __restore # endif># define isalnum(c) (__ctype [(c) & 0xFF] r & (_U | _L | _D))9# define isalpha(c) (__ctype [(c) & 0xFF] & (_U | _L))2# define isdigit(c) (__ctype [(c) & 0xFF] & _D)C# define isgraph(c) (__ctype [(c) & 0xFF] & (_P | _U | _L | _D))2# define islower(c) (__ctype [(c) & 0xFF] & _L)H# define isprint(c) (__ctype [(c) & 0xFF] & (_P | _U | _L | _D | _B))2# define ispunct(c) (__ctype [(c) & 0xFF] & _P)2# define isspace(c) (__ctype [(c) & 0xFF] & _S)2# define isupper(c) (__ctype [(c) & 0xFF] & _U)2# define isxdigit(c)s (__ctype [(c) & 0xFF] & _X)/* ** X/Open extensions*/ 9# if defined(_XOPEN_SOURCE) || !defined(_ANSI_C_SOURCE)# define _ctype_ __ctype int isascii (int);0# define isascii(c) ((unsigned)(c) <= 0x7F)%# define toascii(c) ((c) & 0x7F)I# define _toupper(c) (((c) >= 'a' && (c) <= 'z') ? (c) & 0xDF : (c))I# define _tolower(c) (((c) >= 'A' && (c) <= 'Z') ? (c) | 0x20 : (c)) # endif#endif/*%** Restore the users pointer context*/#itf __INITIAL_POINTER_SIZE## pragma __pointer_size __restore#endif#ifdef __cplusplus }#endif#pragma __standard#endif /* __CTYPE_PROCESSED */>#if defined(__NAMESPACE_STD) && !defined(__NAMESPACE_STD_ONLY)# ifndef __USING_CTYPE_NAMES# define __USING_CTYPE_NAMES using std::isalnum; using std::isalpha; using std::iscntrl; using std::isdigit; using std::isgraph; using std::islower; using std::isprint; using std::ispunct; using std::isspace; using std::isupper; using std::isxdigit; using std::tolower; using std::toupper;# endif#endif#undef __NAMESPACE_STD_ONLY#pragma __standard#endif /* __CCTYPE_LOADED */wwvOt7ԦM/**************************************************************************** *E * This cname header was auto-generated from its C89 counterpart *N ****************************************************************************/#ifndef __CLOCALE_LOADED#define __CLOCALE_LOADED#pragma __nostandard#ifdef __PURE_CNAME# define __NAMESPACE_STD_ONLY#endif#ifndef __LOCALE_PROCESSED#define __LOCALE_PROCESSEDM/******************************************* w************************************* - Localization**M*****************************************************************************,** Header introduced by the ANSI C StandardM*****************************************************************************I** I** Copyright 2004 Hewlett-Packard Development Company, L.P. I** x I** Confidential computer software. Valid license from HP and/or I** its subsidiaries required for possession, use, or copying. I** I** Consistent with FAR 12.211 and 12.212, Commercial Computer Software, I** Computer Software Documentation, and Technical Data for Commercial I** Items are licensed to the U.S. Government under vendor's standard I** commercial license. y I** I** Neither HP nor any of its subsidiaries shall be liable for technical I** or editorial errors or omissions contained herein. The information I** in this document is provided "as is" without warranty of any kind and I** is subject to change without notice. The warranties for HP products I** are set forth in the express limited warranty statements accompanying I** such products. Nzothing herein should be construed as constituting an I** additional warranty. I** M******************************************************************************/#pragma __nostandard#include #ifdef __cplusplus extern "C" {#endif#if __INITIAL_POINTER_SIZE # pragma __pointer_size __save# pragma __pointer_size 32#endif/*** Me{mber align structures*/!#pragma __member_alignment __save#pragma __member_alignment#ifdef __NAMESPACE_STDnamespace std {#endif/*** Define the lconv structure*/struct lconv { char *decimal_point; char *thousands_sep; char *grouping; char *int_curr_symbol; char *currency_symbol; char *mon_decimal_point; char *mon_thousands_sep; char *mon_grouping; char *positive_sign; char *negative_sign; char int_frac_digits; ch|ar frac_digits; char p_cs_precedes; char p_sep_by_space; char n_cs_precedes; char n_sep_by_space; char p_sign_posn; char n_sign_posn;};#ifdef __NAMESPACE_STD} /* namespace std */#endif/*** Define NULL*/ #ifndef NULL# define NULL __NULL#endif /*"** Define lconv enumerated values*/#define LC_ALL (-1)#define LC_COLLATE 0#define LC_CTYPE 1#define LC_MONETARY 2#define LC_NUMERIC 3#define } LC_TIME 4O#if __CRTL_VER >= 60200000 && (_POSIX_C_SOURCE >= 2 || !defined _ANSI_C_SOURCE)# define LC_MESSAGES 5#endif5#if __CRTL_VER >= 60200000 && !defined _ANSI_C_SOURCE# define LC_MAX 5#endif/*9** Change MIA environment to use MIA setlocale semantics*/ #ifdef __MIA# ifdef setlocale# undef setlocale # endif*# define setlocale decc$mia_setlocale_v1#endif#ifdef __NAMESPACE_STDnamespace std {#endif/*;** Function pro~totypes which always return 32 bit pointers*/!struct lconv * localeconv (void);#ifdef __NAMESPACE_STD} /* namespace std */#endif/*G** When compiling with /POINTER_SIZE, change to long pointers so that I** prototypes reflect the implementation for widened pointers. When notG** using /POINTER_SIZE, the prototypes do not allow for long pointers.*/#if __INITIAL_POINTER_SIZE# pragma __pointer_size 64#endif#ifdef __NAMESPACE_STDnamespace std {#endif/*** Function prototypes*/?__char_ptr32 setlocale (int __category, const char *__locale);#ifdef __NAMESPACE_STD} /* namespace std */#endif/*%** Restore the users pointer context*/#if __INITIAL_POINTER_SIZE## pragma __pointer_size __restore#endif#ifdef __cplusplus }#endif$#pragma __member_alignment __restore#pragma __standard#endif /* __LOCALE_PROCESSED */>#if defined(__NAMESPACE_STD) && !defined(__NAMESPACE_STD_ONLY)# ifndef __USING_LOCALE_NAM ES # define __USING_LOCALE_NAMES using std::lconv; using std::localeconv; using std::setlocale;# endif#endif#undef __NAMESPACE_STD_ONLY#pragma __standard#endif /* __CLOCALE_LOADED */ww ***************************** - Mathematics**M*****************************************************************************,** Header introduced by the ANSI C StandardM*****************************************************************************I** I** Copyright 2006 Hewlett-Packard Development Company, L.P. I** I** Confidential computer software. Valid license from HP and/or I** its subsidiaries required for possession, use, or copying. I** I** Consistent with FAR 12.211 and 12.212, Commercial Computer Software, I** Computer Software Documentation, and Technical Data for Commercial I** Items are licensed to the U.S. Government under vendor's standard I** commercial license.  I** I** Neither HP nor any of its subsidiaries shall be liable for technical I** or editorial errors or omissions contained herein. The information I** in this document is provided "as is" without warranty of any kind and I** is subject to change without notice. The warranties for HP products I** are set forth in the express limited warranty statements accompanying I** such products. Nothing herein should be construed as constituting an I** additional warranty. I** M******************************************************************************/#pragma __nostandard#include #ifdef __cplusplus extern "C" {#endif/*"** frexp frexpf frexpl!** modf modff modfl*/#if __INITIAL_POINTER_SIZE# if __CRTL_VER < 80300000 /* 32-bit pointers only */# pragma __pointer_size __save# pragma __pointer_size 32# else0 /* Either 32-bit or 64-bit pointers accepted */# pragma __pointer_size __save# pragma __pointer_size 64 # endif#endif/*** Member align structures*/!#pragma __member_alignment __save#pragma __member_alignment/*** Define HUGE_VAL*/ #if __G_FLOAT9# define HUGE_VAL 8.988465674311578540726371186585e+307$# define __MAXFLOAT 1.7014117e+38f#elif __IEEE_FLOAT5# if defined (_IEEE_FP) && (__CRTL_VER >= 60200000)## pragma __extern_model __save,# pragma __extern_model __strict_refdef* extern double decc$gt_dbl_infinity;&# pragma __extern_model __restore+# define HUGE_VAL decc$gt_dbl_infinity# else.# define HUGE_VAL 1.7976931348623158e+308 # endif%# define __MAXFLOAT 3.40282347e+38f#else# if !defined(__VAX)2# define HUGE_VAL 1.70141183460469213e+38 # else .# define HUGE_VAL 1.70141183460469229e+38 # endif$# define __MAXFLOAT 1.7014117e+38f#endif/* <** MAXFLOAT is defined by X/Open extended to be the maximum8** non-infinite single precision floating point number.*/ #if !defined _DECC_V4_SOURCE7# if defined _XOPEN_SOURCE || !defined _ANSI_C_SOURCE# define MAXFLOAT __MAXFLOAT # endif#endif#ifdef __NAMESPACE_STDnamespace std {#endif/*!** 4.5.2 Trigonometric Functions*/double acos (double __x);double asin (double __x);double atan (double __x);&double atan2 (double __y, double __x);double cos (double __x);double sin (double __x);double tan (double __x);#ifdef __NAMESPACE_STD} /* namespace std */#endif#if !defined(__VAX) float acosf (float __x); float asinf (float __x); float atanf (float __x);( float atan2f (float __y, float __x); float cosf (float __x); float sinf (float __x); float tanf (float __x);) long double acosl (long double __x);) long double asinl (long double __x);) long double atanl (long double __x);: long double atan2l (long double __y, long double __x);) long double cosl (long double __x);) long double sinl (long double __x);) long double tanl (long double __x);#endif#ifdef __NAMESPACE_STDnamespace std {#endif/*** 4.5.3 Hyperbolic Functions*/double cosh (double __x);double sinh (double __x);double tanh (double __x);#ifdef __NAMESPACE_STD} /* namespace std */#endif#if !defined(__VAX) float coshf (float __x); float sinhf (float __x); float tanhf (float __x);( long double coshl (long double __x);( long double sinhl (long double __x);( long double tanhl (long double __x);#endif#ifdef __NAMESPACE_STDnamespace std {#endif/*/** 4.5.4 Exponential and Logarithmic Functions*/double exp (double __x);*double frexp (double __value, int *__exp);%double ldexp (double __x, int __exp);double log (double __x);double log10 (double __x);.double modf (double __value, double *__iptr);#ifdef __NAMESPACE_STD} /* namespace std */#endif#if !defined(__VAX) float expf (float __x);- float frexpf (float __value, int *__exp);( float ldexpf (float __x, int __exp); float logf (float __x); float log10f (float __x);0 float modff (float __value, float *__iptr);) long double expl (long double __x);9 long double frexpl (long double __value, int *__exp);4 long double ldexpl (long double __x, int __exp);) long double logl (long double __x);) long double log10l (long double __x);B long double modfl (long double __value, long double *__iptr);#endif#ifdef __NAMESPACE_STDnamespace std {#endif/*** 4.5.5 Power Functions*/%double pow (double __x, double __y);double sqrt (double __x);#ifdef __NAMESPACE_STD} /* namespace std */#endif#if !defined(__VAX)' float powf (float __x, float __y); float sqrtf (float __x);9 long double powl (long double __x, long double __y);( long double sqrtl (long double __x);#endif#ifdef __NAMESPACE_STDnamespace std {#endif/*B** 4.5.6 Nearest Integer, Absolute Value, and Remainder Functions*/double ceil (double __x);double fabs (double __x);double floor (double __x);&double fmod (double __x, double __y);#ifdef __NAMESPACE_STD} /* namespace std */#endif#if !defined(__VAX) float ceilf (float __x); float fabsf (float __x); float floorf (float __x);( float fmodf (float __x, float __y);) long double ceill (long double __x);) long double fabsl (long double __x);) long double floorl (long double __x);: long double fmodl (long double __x, long double __y);#endif&#if !defined(__VAX) && defined(__DECC) double __FABS (double __x); double __COS (double __x); double __SIN (double __x); # define fabs(__x) __FABS(__x)# define cos(__x) __COS(__x)# define sin(__x) __SIN(__x)#endif/*7** Define X/Open XPG4 extensions on both VAX and Alpha*/5#if defined _XOPEN_SOURCE || !defined _ANSI_C_SOURCE * double hypot (double __x, double __y);#endif/* (** X/Open XPG4 extensions on Alpha-only*/ K#if !defined(__VAX) && (defined(_XOPEN_SOURCE) || !defined(_ANSI_C_SOURCE)) double erf (double __x); double erfc (double __x); double gamma (double __x); double j0 (double __x); double j1 (double __x);( double jn (int __n, double __x); double lgamma (double __x); double y0 (double __x); double y1 (double __x);) double yn (int __n , double __x); float erff (float __x); float erfcf (float __x); float gammaf (float __x);( float hypotf (float __x, float __y); float lgammaf (float __x); float y0f (float __x); float y1f (float __x);( float ynf  (int __n , float __x); float j0f (float __x); float j1f (float __x);' float jnf (int __n, float __x);* long double erfl (long double __x);* long double erfcl (long double __x);* long double gammal (long double __x);: long double hypotl (long double __x, long double __y);* long double j0l (long double __x);* long double j1l (long double __x);3 long double jnl (int __n, long double __x);* long double lgammal (long double __x);* long double y0l (long double __x);* long double y1l (long double __x);4 long double ynl (int __n , long double __x); /* 6 ** isnan() conflicts with isnan() macro in . */ # if !defined __FP_LOADED int isnan (double __x); # endif int isnanf (float __x);! int isnanl (long double __x);/# if defined __DECC && __DECC_VER >= 50300000## pragma __extern_model __save,# pragma __extern_model __strict_refdef extern int signgam;&# pragma __extern_model __restore# else extern int signgam; # endif#endif/* $** Define X/open XPG4 V2 extensions*/ T#if !defined(__VAX) && (defined(_XOPEN_SOURCE_EXTENDED) || !defined(_ANSI_C_SOURCE)) double acosh (double __x); double asinh (double __x); double atanh (double __x); double cbrt (double __x); double expm1 (double __x); double logb (double __x); double log1p (double __x);. double nextafter (double __x, double __y); double rint (double __x);* double scalb (double __x, double __n); float acoshf (float __x); float asinhf (float __x); float atanhf (float __x); float cbrtf (float __x); float expm1f (float __x); float logbf (float __x); float log1pf (float __x);, float nextafterf (float __x, float __y); float rintf (float __x);( float scalbf (float __x, float __n);) long double acoshl (long double __x);) long double asinhl (long double __x);) long double atanhl (long double __x);( long double cbrtl (long double __x);) long double expm1l (long double __x);) long double logbl (long double __x);) long double log1pl (long double __x);> long double nextafterl (long double __x, long double __y);) long double rintl (long double __x);: long double scalbl (long double __x, long double __n);#endif/* $** Define DEC C Extensions VAX only*/ #if defined(__VAX)# if !defined _ANSI_C_SOURCE/ typedef struct { double x, y; } cabs_t; ! double cabs (cabs_t __z); # endif#endif/* ** DEC C Extensions, Alpha only*/ /#if !defined(__VAX) && !defined(_ANSI_C_SOURCE) # if !defined __COMPLEX_LOADED%# define _MATH_H_DEFINED_CABS 10 typedef struct { float x, y; } cabsf_t; ) typedef struct { double x, y; } cabs_t; 6 typedef struct { long double x, y; } cabsl_t; # if __IEEE_FLOAT # define cabsf DECC$SCABSF_2 # define CABSF DECC$SCABSF_2# define cabs DECC$TCABS_2# define CABS DECC$TCABS_2# if __X_FLOAT# define cabsl DECC$TXCABSL_2# define CABSL DECC$TXCABSL_2 # else# define cabsl DECC$TCABSL_2# define CABSL DECC$TCABSL_2 # endif# elif CC$gfloat # define cabsf DECC$FCABSF_2 # define CABSF DECC$FCABSF_2# define cabs DECC$GCABS_2# define CABS DECC$GCABS_2# if __X_FLOAT# define cabsl DECC$GXCABSL_2# define CABSL DECC$GXCABSL_2 # else# define cabsl DECC$GCABSL_2# define CABSL DECC$GCABSL_2 # endif# else # define cabsf DECC$FCABSF_2 # define CABSF DECC$FCABSF_2# define cabs DECC$DCABS_2# define CABS DECC$DCABS_2# if __X_FLOAT# define cabsl DECC$DXCABSL_2# define CABSL DECC$DXCABSL_2 # else# define cabsl DECC$DCABSL_2# define CABSL DECC$DCABSL_2 # endif# endif# float cabsf (cabsf_t __z); double cabs (cabs_t __z);)  long double cabsl (cabsl_t __z); # endif double acosd (double __x); double asind (double __x); double atand (double __x);+ double atand2 (double __y, double __x);. double copysign (double __x, double __y); double cosd (double __x); double cot (double __x); double cotd (double __x); double log2 (double __x); double nint (double __x); double sind (double __x); double tand (double __x); double trunc (double __x); float acosdf (float __x); float asindf (float __x); float atandf (float __x);) float atand2f (float __y, float __x);, float copysignf (float __x, float __y); float cosdf (float __x); float cotf (float __x); float cotdf (float __x); float log2f (float __x); float nintf (float __x); float sindf (float __x); float tandf (float __x); float truncf (float __x);* long double acosdl (long double __x);* long dou ble asindl (long double __x);* long double atandl (long double __x);; long double atand2l (long double __y, long double __x);> long double copysignl (long double __x, long double __y);* long double cosdl (long double __x);( long double cotl (long double __x);( long double cotdl (long double __x);) long double log2l (long double __x);) long double nintl (long double __x);* long double sindl (long double __x);* long double tandl (long double __x);) long double truncl (long double __x);" int finite (double __x);" int fp_class (double __x);. int unordered (double __x, double __y);! int finitef (float __x);! int fp_classf (float __x);, int unorderedf (float __x, float __y);- int finitel (long double __x);- int fp_classl (long double __x);> int unorderedl (long double __x, long double __y);#endifR#if defined _XOPEN_SOURCE || (!defined _DECC_V4_ SOURCE && !defined _ANSI_C_SOURCE)@#define M_E 2.7182818284590452354E0 /* e */@#define M_LOG2E 1.4426950408889634074E0 /* log2(e) */@#define M_LOG10E 4.3429448190325182765E-1 /* log10(e) */@#define M_LN2 6.9314718055994530942E-1 /* ln(2) */@#define M_LN10 2.3025850929940456840E0 /* ln(10) */@#define M_PI 3.1415926535897932385E0 /* pi */@#define M_PI_2 1.5707963267948966192E0 /* pi/2 */@#defin e M_PI_4 7.8539816339744830962E-1 /* pi/4 */@#define M_1_PI 3.1830988618379067154E-1 /* 1/pi */@#define M_2_PI 6.3661977236758134308E-1 /* 2/pi */@#define M_2_SQRTPI 1.1283791670955125739E0 /* 2/sqrt(pi) */@#define M_SQRT2 1.4142135623730950488E0 /* sqrt(2) */@#define M_SQRT1_2 7.0710678118654752440E-1 /* 1/sqrt(2) */#endif/* G** DEC C V4.0 compatibility. These functions were defined in previous9** versions of DEC C and are retained for compatibility.*/ #ifdef _DECC_V4_SOURCE# if __G_FLOAT" double MTH$GCOS_R7 (double __x);" double MTH$GSIN_R7 (double __x);# elif __IEEE_FLOAT" double MTH$TCOS_R7 (double __x);" double MTH$TSIN_R7 (double __x);# else" double MTH$DCOS_R7 (double __x);" double MTH$DSIN_R7 (double __x); # endif# define VAXC$TANH 1#endif #ifdef __KAP)# if !defined(__VAX) && defined(__DECC)-# pragma _KAP no side effects ( __FABS ),# pragma _KAP no side effects ( __COS ),# pragma _KAP no side effects ( __SIN ) # endif(# pragma _KAP no side effects ( acos )(# pragma _KAP no side effects ( asin )(# pragma _KAP no side effects ( atan ))# pragma _KAP no side effects ( atan2 )'# pragma _KAP no side effects ( cos )'# pragma _KAP no side effects ( sin )'# pragma _KAP no side effects ( tan )(# pragma _KAP no side effects ( cosh )(# pragma _KAP no side effects ( sinh )(# pragma _KAP no side effects ( tanh )'# pragma _KAP no side effects ( exp ))# pragma _KAP no side effects ( frexp ))# pragma _KAP no side effects ( ldexp )'# pragma _KAP no side effects ( log ))# pragma _KAP no side effects ( log10 )(# pragma _KAP no side effects ( modf )'# pragma _KAP no side effects ( pow )(# pragma _KAP no side effects ( sqrt )(# pragma _KAP no side effects ( cabs ))# pragma _KAP no side effects ( hypot )(# pragma _KAP no side effects ( ceil )(# pragma _KAP no side effects ( fabs ))# pragma _KAP no side effects ( floor )(# pragma _KAP no side effects ( fmod ))# pragma _KAP no side effects ( acosf ))# pragma _KAP no side effects ( asinf ))# pragma _KAP no side effects ( atanf )*# pragma _KAP no side effects ( atan2f )(# pragma _KAP no side effects ( cosf )(# pragma _KAP no side effects ( sinf )(# pragma _KAP no side effects ( tanf ))# pragma _KAP no side effects ( coshf ))# pragma _KAP no side effects ( sinhf ))# pragma _KA P no side effects ( tanhf )(# pragma _KAP no side effects ( expf )*# pragma _KAP no side effects ( frexpf )*# pragma _KAP no side effects ( ldexpf )(# pragma _KAP no side effects ( logf )*# pragma _KAP no side effects ( log10f ))# pragma _KAP no side effects ( modff )(# pragma _KAP no side effects ( powf ))# pragma _KAP no side effects ( sqrtf ))# pragma _KAP no side effects ( cabsf )*# pragma _KAP no side effects ( hypotf ))# pragma _KAP no side effects ( ceilf ) )# pragma _KAP no side effects ( fabsf )*# pragma _KAP no side effects ( floorf ))# pragma _KAP no side effects ( fmodf ))# pragma _KAP no side effects ( acosl ))# pragma _KAP no side effects ( asinl ))# pragma _KAP no side effects ( atanl )*# pragma _KAP no side effects ( atan2l )(# pragma _KAP no side effects ( cosl )(# pragma _KAP no side effects ( sinl )(# pragma _KAP no side effects ( tanl ))# pragma _KAP no side effects ( coshl ))# pragma _KAP no side effects ( sinhl ))# pragma _KAP no side effects ( tanhl )(# pragma _KAP no side effects ( expl )*# pragma _KAP no side effects ( frexpl )*# pragma _KAP no side effects ( ldexpl )(# pragma _KAP no side effects ( logl )*# pragma _KAP no side effects ( log10l ))# pragma _KAP no side effects ( modfl )(# pragma _KAP no side effects ( powl ))# pragma _KAP no side effects ( sqrtl ))# pragma _KAP no side effects ( cabsl )*# pragma _KAP no side effects ( hypotl ))# pragma _KAP no side effects ( ceill ))# pragma _KAP no side effects ( fabsl )*# pragma _KAP no side effects ( floorl ))# pragma _KAP no side effects ( fmodl )'# pragma _KAP no side effects ( erf )(# pragma _KAP no side effects ( erfc ))# pragma _KAP no side effects ( isnan )&# pragma _KAP no side effects ( j0 )&# pragma _KAP no side effects ( j1 )&# pragma _KAP no side effects ( jn )&# pragma _KAP no side effects ( y0 )&# pragma _KAP no side effects ( y1 )&# pragma _KAP no side effects ( yn )(# pragma _KAP no side effects ( erff ))# pragma _KAP no side effects ( erfcf )*# pragma _KAP no side effects ( isnanf )'# pragma _KAP no side effects ( j0f )'# pragma _KAP no side effects ( j1f )'# pragma _KAP no side effects ( jnf )'# pragma _KAP no side effects ( y0f )'# pragma _KAP no side effects ( y1f )'# pragma _KAP no side effects ( ynf )(# pragma _KAP no side effects ( erfl ))# pragma _KAP no side effects ( erfcl )*#  pragma _KAP no side effects ( isnanl )'# pragma _KAP no side effects ( j0l )'# pragma _KAP no side effects ( j1l )'# pragma _KAP no side effects ( jnl )'# pragma _KAP no side effects ( y0l )'# pragma _KAP no side effects ( y1l )'# pragma _KAP no side effects ( ynl ),# pragma _KAP no side effects ( copysign )*# pragma _KAP no side effects ( finite ),# pragma _KAP no side effects ( fp_class )-# pragma _KAP no side effects ( nextafter )-# pragma _KAP no side effects ( unordered )-# pragma _KAP no side effects ( copysignf )+# pragma _KAP no side effects ( finitef )-# pragma _KAP no side effects ( fp_classf ).# pragma _KAP no side effects ( nextafterf ).# pragma _KAP no side effects ( unorderedf )-# pragma _KAP no side effects ( copysignl )+# pragma _KAP no side effects ( finitel )-# pragma _KAP no side effects ( fp_classl ).# pragma _KAP no side effects ( nextafterl ).# pragma _KAP no side effects ( unorderedl ))#  pragma _KAP no side effects ( acosh ))# pragma _KAP no side effects ( asinh ))# pragma _KAP no side effects ( atanh )*# pragma _KAP no side effects ( acoshf )*# pragma _KAP no side effects ( asinhf )*# pragma _KAP no side effects ( atanhf )*# pragma _KAP no side effects ( acoshl )*# pragma _KAP no side effects ( asinhl )*# pragma _KAP no side effects ( atanhl )'# pragma _KAP no side effects ( cot )(# pragma _KAP no side effects ( cotd )(# pragma _KAP no side effects ( cotf ))# pragma _KAP no side effects ( cotdf )(# pragma _KAP no side effects ( cotl ))# pragma _KAP no side effects ( cotdl ))# pragma _KAP no side effects ( acosd ))# pragma _KAP no side effects ( asind ))# pragma _KAP no side effects ( atand )*# pragma _KAP no side effects ( atand2 )(# pragma _KAP no side effects ( cosd )(# pragma _KAP no side effects ( sind )(# pragma _KAP no side effects ( tand )*# pragma _KAP no side effects ( acosdf )*#  pragma _KAP no side effects ( asindf )*# pragma _KAP no side effects ( atandf )+# pragma _KAP no side effects ( atand2f ))# pragma _KAP no side effects ( cosdf ))# pragma _KAP no side effects ( sindf ))# pragma _KAP no side effects ( tandf )*# pragma _KAP no side effects ( acosdl )*# pragma _KAP no side effects ( asindl )*# pragma _KAP no side effects ( atandl )+# pragma _KAP no side effects ( atand2l ))# pragma _KAP no side effects ( cosdl ))# pragma _KAP no side effects ( sindl ))# pragma _KAP no side effects ( tandl )(# pragma _KAP no side effects ( nint )(# pragma _KAP no side effects ( rint ))# pragma _KAP no side effects ( trunc ))# pragma _KAP no side effects ( nintf ))# pragma _KAP no side effects ( rintf )*# pragma _KAP no side effects ( truncf ))# pragma _KAP no side effects ( nintl ))# pragma _KAP no side effects ( rintl )*# pragma _KAP no side effects ( truncl )#endif /* __KAP *//*** Math r outines added in C99.C** On Alpha, Compaq C V6.4 or later will by default add a facilityA** prefix to the external symbols for these routines in the sameC** situations when it will pre-define __STDC_VERSION__ to 199901L.C** So declare them, even though not all of them may be implemented3** on the version of OpenVMS used at compile-time.*/D#if !defined(__VAX) && (defined(__DECC) && __DECC_VER >= 60400000) \3 && __STDC_VERSION__ >= 199901L /*A ** Some were already extensions, no harm in redeclaring them) ** if they were previously declared. */ double acosh (double __x); double asinh (double __x); double atanh (double __x); double cbrt (double __x);. double copysign (double __x, double __y); double expm1 (double __x); double log1p (double __x); double log2 (double __x); double logb (double __x);. double nextafter (double __x, double __y); double rint (double __x); double trunc (double __x); float acoshf (float __x); float asinhf (float __x); float atanhf (float __x); float cbrtf (float __x);, float copysignf (float __x, float __y); float expm1f (float __x); float log1pf (float __x); float log2f (float __x); float logbf (float __x);, float nextafterf (float __x, float __y); float rintf (float __x); float truncf (float __x);) long double acoshl (long double __x);) long double asinhl (long d ouble __x);) long double atanhl (long double __x);( long double cbrtl (long double __x);> long double copysignl (long double __x, long double __y);) long double expm1l (long double __x);) long double log1pl (long double __x);) long double log2l (long double __x);) long double logbl (long double __x);> long double nextafterl (long double __x, long double __y);) long double rintl (long double __x);) long double truncl (long double __x); double erf (double __x); double erfc (double __x);* double hypot (double __x, double __y); double lgamma (double __x); float erfcf (float __x); float erff (float __x);( float hypotf (float __x, float __y); float lgammaf (float __x);* long double erfcl (long double __x);* long double erfl (long double __x);: long double hypotl (long double __x, long double __y);* long double lgammal (long double __x); /*4 ** The rest are new to < math.h> in Compaq C V6.4 */ double exp2(double __x);( double fdim(double __x, double __y);3 double fma(double __x, double __y, double __z);( double fmax(double __x, double __y);( double fmin(double __x, double __y);" /* neearbyin not in mathlib */3 double nexttoward(double __x, long double __y);- double remainder(double __x, double __y);6 double remquo(double __x, double __y, int *__quo);/ /* round, scalbln, scalbn not in mathlib */ double tgamma(double __x); float exp2f(float __x);& float fdimf(float __x, float __y);0 float fmaf(float __x, float __y, float __z);& float fmaxf(float __x, float __y);& float fminf(float __x, float __y);# /* nearbyintf not in mathlib */2 float nexttowardf(float __x, long double __y);+ float remainderf(float __x, float __y);4 float remquof(float __x, float __y, int *__quo);2 /* roundf, scalblnf, scalbnf not in mathlib */ float tgammaf(float __x);' long doubl e exp2l(long double __x);8 long double fdiml(long double __x, long double __y);H long double fmal(long double __x, long double __y, long double __z);8 long double fmaxl(long double __x, long double __y);8 long double fminl(long double __x, long double __y);# /* nearbyintl not in mathlib */> long double nexttowardl(long double __x, long double __y);= long double remainderl(long double __x, long double __y);F long double remquol(long double __x, long double __y, int *__quo);2 /* roundl, scalblnl, scalbnl not in mathlib */) long double tgammal(long double __x); int ilogb(double __x); int ilogbf(float __x); int ilogbl(long double __x); long int lrint(double __x); long int lrintf(float __x);% long int lrintl(long double __x); long int lround(double __x); long int lroundf(float __x);& long int lroundl(long double __x);/ /* llrint*, llround* not in math library */ #endif/*%** Restore the users pointer context*/#if __INITIAL_POINTER_SIZE## pragma __pointer_size __restore#endif#ifdef __cplusplus }#endif$#pragma __member_alignment __restore#pragma __standard#endif /* __MATH_PROCESSED */>#if defined(__NAMESPACE_STD) && !defined(__NAMESPACE_STD_ONLY)# ifndef __USING_MATH_NAMES# define __USING_MATH_NAMES using std::acos; using std::asin; using std::atan; using std::atan2; using std::ceil; using std::cos; using std::cosh; using std::exp; using std::fabs; using std::floor; using std::fmod; using std::frexp; using std::ldexp; using std::log; using std::log10; using std::modf; using std::pow; using std::sin; using std::sinh; using std::sqrt; using std::tan; using std::tanh;# endif#endif7#if defined(__PURE_CNAME) || defined(__CNAME_OVERLOADS)# include #endif#undef __NAMESPACE_STD_ONLY#pragma __standard#endif /* __CMATH_LOADED */wwsu7ԦM/**************************************************************************** *E * This cname header was auto-generated from its C89 counterpart *N ****************************************************************************/#ifndef __CSETJMP_LOADED#define __CSETJMP_LOADED#pragma __nostandard#ifdef __PURE_CNAME# define __NAMESPACE_STD_ONLY#endif#ifndef __SETJMP_PROCESSED#define __SETJMP_PROCESSEDM/****************************************************************************I** I** Copyright 2005 Hewlett-Packard Development Company, L.P. I** I** Confidential computer software. Valid license from HP and/or I** its subsidiaries required for possession, use, or copying. I** I** Consistent with FAR 12.211 and 12.212, Commercial Computer Software, I** Computer Software Documentation, and Technical Data for Commercial I** Items are licensed to the U.S. Government under vendor's standard I** commercial license. I** I** Neither HP nor any of its subsidiaries shall be liable for technical I** or editorial errors or omissions contained herein. The information I** in this document is provided "as is" without warranty of any kind and I** is subject to change without notice. The warranties for HP products I** are set forth in the express limited warranty statements accompanying I** such products. Nothing herein should be construed as constituting an I** additional warranty. I** M******************************************************************************/#pragma __nostandard#include #ifdef __cplusplus extern "C" {!#define __decc$unknown_params ...#else#define __decc$unknown_params#endif#if __INITIAL_POINTER_SIZE # pragma __pointer_size __save# if __CRTL_VER >= 70301000 # pragma __pointer_size 64# else # pragma __pointer_size 32 # endif#endif#ifdef __NAMESPACE_STDnamespace std {#endif/*** Define data structures*/#if defined(__VAX) typedef int jmp_buf [15];# define __JMP_BUF_TYPE int *#else$# pragma __member_alignment __save# pragma __member_alignmentW# if defined(__FAST_SETJMP) || defined(__UNIX_SETJMP) || defined(__FAST_POSIX_SETJMP)# if defined(__ALPHA)' typedef __int64 jmp_buf [25]; # elseI typedef __int64 jmp_buf [450]; /* same as invo block for now */ # endif# else# if defined(__ALPHA)V typedef __int64 jmp_buf [68]; /* 68 quadwords - standard invo cntxt block */ # elseX typedef __int64 jmp_buf [450]; /* 450 quadwords - standard invo cntxt block */ # endif # endif'# pragma __member_alignment __restore## define __JMP_BUF_TYPE __int64 *#endif#ifdef __NAMESPACE_STD} /* namespace std */#endif/*I** This section is for functions and declarations which are pointer-size** dependent.*/)#if (defined(__ALPHA) || defined(__ia64))W# if defined(__FAST_SETJMP) || defin ed(__UNIX_SETJMP) || defined(__FAST_POSIX_SETJMP)= void decc$fast_longjmp(__int64 *__env, int __retval);'# if defined(__FAST_POSIX_SETJMP)T# define longjmp(env, retval) decc$fast_longjmp(env, retval ? retval : 1 ) # elseF# define longjmp(env, retval) decc$fast_longjmp(env, retval) # endif# if defined(__ALPHA), int decc$setjmp (__int64 *__env);.# define setjmp(env) decc$setjmp(env) # else1 int decc$fast_setjmp (__int64 *__env);3# define setjmp(env) decc$fast_setjmp(env) # endif# else8 void c$$establish(__void_ptr32, unsigned short);# if defined(__ALPHA)(# ifdef __INITIAL_POINTER_SIZE1# pragma __required_pointer_size __save1# pragma __required_pointer_size __long# endifF int LIB$GET_CURRENT_INVO_CONTEXT(__int64 *__invo_context);(# ifdef __INITIAL_POINTER_SIZE4# pragma __required_pointer_size __restore# endifW# define setjmp(env) (c$$establish(0, 32 ),LIB$GET_CURRENT_INVO_CONTEXT(env)) # else. int decc$setjmp1 (__int64 *__env);E# define setjmp(env) (c$$establish(0,32),decc$setjmp1(env)) # endif # endif#else int setjmp (jmp_buf __env);#endif#ifdef __NAMESPACE_STDnamespace std {#endif*void (longjmp) (jmp_buf __env, int __val);#ifdef __NAMESPACE_STD} /* namespace std */#endif#if __CRTL_VER >= 700000006# if _POSIX_C_SOURCE >= 1 || !defined _ANSI_C_SOURCE# if (defined(__ALPHA))- typedef __int64 __sigjmp_buf[70];# elif (defined(__ia64)). typedef __int64 __sigjmp_buf[452]; # else) typedef int __sigjmp_buf[18]; # endif# if !defined _DECC_V4_SOURCE% typedef __sigjmp_buf sigjmp_buf;# endif1 void siglongjmp (__sigjmp_buf __env, int __val);6 int sigsetjmp (__sigjmp_buf __env, int __savemask);*# if (defined(__ALPHA) || defined(__ia64))< void c$$establish(__void_ptr32, unsigned short);K# define sigsetjmp( p1, p2 ) ( c$$establish(0,32), (sigsetjmp)(p1,p2) )# endif # endif#endif/*%** Restore the users pointer context*/#if __INITIAL_POINTER_SIZE## pragma __pointer_size __restore#endif#ifdef __cplusplus }#endif#pragma __standard#endif /* __SETJMP_PROCESSED */>#if defined(__NAMESPACE_STD) && !defined(__NAMESPACE_STD_ONLY)# ifndef __USING_SETJMP_NAMES # define __USING_SETJMP_NAMES using std::jmp_buf;Y# if !defined(__FAST_SETJMP) && !defined(__UNIX_SETJMP) && !defined(__FAST_POSIX_SETJMP) using std::longjmp;# endif# endif#endif#undef __NAMESPACE_STD_ONLY#pragma __standard#endif /* __CSETJMP_LOADED */ww}v7ԦM/**************************************************************************** *E * This cname header was auto-generated from its C89 counterpart *N ****************************************************************************/#ifndef __CSIGNAL_LOADED#define __CSIGNAL_LOADED#pragma __nostandard#ifdef __PURE_CNAME# define __NAMESPACE_STD_ONLY#endif#ifndef __SIGNAL_PROCESSED#define __SIGNAL_PROCESSEDM/******************************************* ***********************************!** - Signal Handling **M*****************************************************************************,** Header introduced by the ANSI C StandardM*****************************************************************************I** I** Copyright 2006 Hewlett-Packard Development Company, L.P. I**  I** Confidential computer software. Valid license from HP and/or I** its subsidiaries required for possession, use, or copying. I** I** Consistent with FAR 12.211 and 12.212, Commercial Computer Software, I** Computer Software Documentation, and Technical Data for Commercial I** Items are licensed to the U.S. Government under vendor's standard I** commercial license.  I** I** Neither HP nor any of its subsidiaries shall be liable for technical I** or editorial errors or omissions contained herein. The information I** in this document is provided "as is" without warranty of any kind and I** is subject to change without notice. The warranties for HP products I** are set forth in the express limited warranty statements accompanying I** such products. Nothing herein should be construed as constituting an I** additional warranty. I** M******************************************************************************/#pragma __nostandard#include =#if defined _XOPEN_SOURCE_EXTENDED || !defined _ANSI_C_SOURCE+# include /* for siginfo_t */#endif#ifdef __cplusplus extern "C" {#endif#if __INITIAL_POINTER_SIZE # pragma __pointer_size __save#endif/*#** Naturally align data structures*/!#pragma __member_alignment __save#pragma __member_alignment/* ** Private definitions*/ /*G** __sighnd_t is a pointer to function, where the function is declared** void f(int code);**C** __bsd_sighnd_t is a pointer to function, where the function is:** void f(int code, ... );** B** __vms_handler is a pointer to function, where the function is:.** unsigned int f(void *sigarr, void *mecharr)**F** These definition are private to this header and subject to change.*/ #if __INITIAL_POINTER_SIZE# pragma __pointer_size 64#endif#typedef void (*__sighnd64_t) (int);,typedef void (*__bsd_sighnd64_t)(int, ... );#if __INITIAL_POINTER_SIZE# pragma __pointer_size 32#endif!typedef void (*__sighnd_t) (int);*typedef void (*__bsd_sighnd_t)(int, ... );Jtypedef unsigned int (*__vms_handler) ( void *__sigarr, void *__mecharr );#if __CRTL_VER >= 70000000# ifndef ____SIGSET_T# define ____SIGSET_T 1: typedef struct {unsigned int _set[2];} __sigset_t; # endif#endif# define _SIG_MIN 1#if __CRTL_VER >= 70000000# define _SIG_MAX 64#elif __CRTL_VER >= 60200000# define _SIG_MAX 17#else# define _SIG_MAX 15# endif/*3** ANSI C Public data definitions and declarations*/%#define SIG_ERR ((__sighnd_t)(-1))"#define SIG_DFL ((__sighnd_t)0)"#define SIG_IGN ((__sighnd_t)1)#ifdef __NAMESPACE_STDnamespace std {#endiftypedef int sig_atomic_t;#ifdef __NAMESPACE_STD} /* namespace std */#endif/* 8** ISO POSIX-1 public data definitions and declarations*/ 6#if defined _POSIX_C_SOURCE || !defined _ANSI_C_SOURCE# if __CRTL_VER >= 70000000# define SIG_UNBLOCK 0# define SIG_BLOCK 1# define SIG_SETMASK 2# define SA_NOCLDSTOP 0x20K# if !defined __SIGSET_T && !defined _SIGSET_T_ && !defined _DECC_V4_SOURCE# define __SIGSET_T 1D# define _SIGSET_T_ 1 /* uses this symbol */! typedef __sigset_t sigset_t;# endif# pragma __extern_model __save,# pragma __extern_model __common_block noshrC static const __sigset_t _SIG_EMPTY_SET = {0x00000000, 0x00000000},- _SIG_FULL_SET = {0xFFFFFFFF, 0xFFFFFFFF};!# pragma __extern_model __restoreK#define __SIGACT64 (__CRTL_VER >= 80200000 && __INITIAL_POINTER_SIZE == 64)/*J** Members for sigaction struct. This  is complex due to "sigaction" beingF** both a struct and a function, can't use typedef to map general type ** onto 32/64 bit specific type.*/#define __SIGACTION32_MEMBERS \E __sighnd_t sa_handler; /* Signal-catching function or macro */ \D __sigset_t sa_mask; /* Set of signals to be blocked */ \) int sa_flags; /* Special flags */#define __SIGACTION64_MEMBERS \G __sighnd64_t sa_handler; /* Signal-catching function or macro */ \D __sigset_t sa_mask;  /* Set of signals to be blocked */ \) int sa_flags; /* Special flags */4#if __CRTL_VER >= 80200000 && __INITIAL_POINTER_SIZE struct __sigaction32 { __SIGACTION32_MEMBERS }; struct __sigaction64 { __SIGACTION64_MEMBERS };#endif#if __SIGACT64 struct sigaction { __SIGACTION64_MEMBERS };#else struct sigaction { __SIGACTION32_MEMBERS };#endif # endif#endif/* 1** XPG4 public data definitions and declarations*/ 4#if defined _XOPEN_SOURCE || !defined _ANSI_C_SOURCE4# if !defined __PID_T && !defined _DECC_V4_SOURCE# define __PID_T 1 typedef __pid_t pid_t; # endif#endif/* 4** XPG4 V2 public data definitions and declarations*/ =#if defined _XOPEN_SOURCE_EXTENDED || !defined _ANSI_C_SOURCE struct sigstack {) char *ss_sp; /* signal stack pointer */% int ss_onstack; /* current status */ };# if __CRTL_VER >= 70000000# define SA_ONSTACK 0x01# define SA_RESETHAND 0x02# define SA_NODEFER 0x08 # endif#endif/* @** DEC C extensions -- public data definitions and declarations*/ #ifndef _ANSI_C_SOURCE struct sigvec {- void (*sv_handler)(); /* handler address */2 int sv_mask; /* mask of signals to be blocked */5 int sv_onstack; /* flag to indicate signal stack */ }; struct sigcontext {4 int sc_onstack; /* signal stack flag to restore */+ int sc_mask; /* signal mask to restore */+ int sc_sp; /* stack pointerto restore */# int sc_pc; /* pc to return to */" int sc_ps; /* psl to restore */ };#endif/* P** The following signals are defined by the ANSI C standard (ISO/IEC 9899:1990)*/ ?#define SIGABRT 6 /* Abnormal termination signal */B#define SIGFPE 8 /* Erroneous arithmetic operation */J#define SIGILL 4 /* Detection of an invalid hardware instr. */@#define SIGINT 2 /* Interactive attention signal */;#define SIGSEG V 11 /* segmentation violation */@#define SIGTERM 15 /* External termination signal *//* J** The following signals are defined by ISO POSIX-1 (ISO/IEC 9945-1:1990)*/ 6#if defined _POSIX_C_SOURCE || !defined _ANSI_C_SOURCE6# define SIGALRM 14 /* Timeout signal */K# define SIGHUP 1 /* Hangup detected on controlling terminal */@# define SIGKILL 9 /* External termination signal */E# define SIGPIPE 13 /* Write on a pipe with no readers */C# define SIGQUIT 3 /* Interactive termination signal */# if __CRTL_VER >= 60200000># define SIGUSR1 16 /* Application-defined signal 1 */># define SIGUSR2 17 /* Application-defined signal 2 */ # endif# if __CRTL_VER >= 70000000D# define SIGCHLD 20 /* Child process terminated or stopped */6# define SIGCONT 21 /* Continue if stopped */9# define SIGSTOP 22 /* Job control stop signal */9# define SIGTSTP 23 /* Interactive stop signal */D# define SIGTTIN 24 /* Terminal read by background process */E# define SIGTTOU 25 /* Terminal write by background process */ # endif# if __CRTL_VER >= 703000009# define SIGWINCH 28 /* Window size changed */ # endif#endif/* ** Defined by XPG4 V2*/ =#if defined _XOPEN_SOURCE_EXTENDED || !defined _ANSI_C_SOURCEE# define SIGTRAP 5 /* TBIT trace trap or BPT instruction */@# define SIGSYS  12 /* Bad arguments to system call */#endif/* ** DEC C Extensions*/ #ifndef _ANSI_C_SOURCEG# define SIGIOT 6 /* Obsolete name - 6 reused as SIGABRT */B# define SIGEMT 7 /* Opcode reserved to customer */G# define SIGBUS 10 /* invalid access to memory objects */# if __CRTL_VER >= 70000000C# define SIGSPARE18 18 /* Reserved for future expansions */C# define SIGSPARE19 19 /* Reserved for future expansions */D# define SIGDEBUG 26 /* Permanently reserved to Digital */C# define SIGSPARE27 27 /* Reserved for future expansions */C# define SIGSPARE28 28 /* Reserved for future expansions */C# define SIGSPARE29 29 /* Reserved for future expansions */C# define SIGSPARE30 30 /* Reserved for future expansions */C# define SIGSPARE31 31 /* Reserved for future expansions */C# define SIGSPARE32 32 /* Reserved for future expansions */D# define SIGRTMIN 33 /* First realtime signal (1003.1b) */C# define SIGRTMAX 64 /* Last realtime signal (1003.1b) */ # endif# define NSIG _SIG_MAX# define BADSIG SIG_ERRC# define ILL_RESAD_FAULT 0x0 /* reserved addressing mode fault */C# define ILL_PRIVIN_FAULT 0x1 /* privilidged instruction fault */;# define ILL_RESOP_FAULT 0x2 /* reserved operand fault */# define FPE_INTOVF_TRAP 0x1# define FPE_INTDIV_TRAP 0x2# define FPE_FLTOVF_TRAP 0x3# define FPE_FLTDIV_TRAP 0x4# define FPE_FLTUND_TRAP 0x5# define FPE_DECOVF_TRAP 0x6# ifdef __VAX# define FPE_SUBRNG_TRAP 0x7# else# define FPE_INXRES_TRAP 0x7 # endif# define FPE_FLTOVF_FAULT 0x8# define FPE_FLTDIV_FAULT 0x9 # define FPE_FLTUND_FAULT 0x0a# ifndef __VAX# define FPE_INVOPR_TRAP 0x0b# define FPE_DECDIV_TRAP 0x0c# define FPE_DECINV_TRAP 0x0d# define FPE_SUBRNG_TRAP 0x0e# define FPE_SUBRNG1_TRAP 0x0f# define FPE_SUBRNG2_TRAP 0x10# define FPE_SUBRNG3_TRAP 0x11# define FPE_SUBRNG4_TRAP 0x12# define FPE_SUBRNG5_TRAP 0x13# define FPE_SUBRNG6_TRAP 0x14# define FPE_SUBRNG7_TRAP 0x15# ifdef __ia64# define FPE_FLTINE_TRAP 0x16# define FPE_FLTINV_TRAP 0x17# define FPE_FLTINV_FAULT 0x18## define FPE_FLTDENORMAL_FAULT 0x19 # endif # endif#endif/*** Enable 64 bit pointers*/#if __INITIAL_POINTER_SIZE# pragma __pointer_size 64#endif#ifdef __NAMESPACE_STDnamespace std {#endif/*** Function prototypes (ANSI).*/#if __SIGACT64 # pragma __extern_prefix __save!# pragma __extern_prefix "__64_"## define __SIGRETTYP __sighnd64_t #else # define __SIGRETTYP __sighnd_t#endif9 __SIGRETTYP signal( int __sig, __sighnd64_t __func );#if __SIGACT64## pragma __extern_prefix __restore# undef __SIGRETTYP#endif /* > ** In strict ANSI mode, raise has a signal parameter. As7 ** a DEC C extension, it accepts a subcode as well. */ #ifndef _ANSI_C_SOURCEC int raise (int __sig, ...); /* 2nd parameter is the subcode */#else int raise (int __sig);#endif#ifdef __NAMESPACE_STD} /* namespace std */#endif/* ** ISO POSIX-1 signal handling*/ 6#if defined _POSIX_C_SOURCE || !defined _ANSI_C_SOURCE# if defined(_POSIX_EXIT)# if __USE_LONG_GID_T## pragma __extern_prefix __save0# pragma __extern_prefix "__posix_long_gid_"## elif __CRTL_VER >= 70000000 # if __CAN_USE_EXTERN_PREFIX'# pragma __extern_prefix __save+# pragma __extern_prefix "__posix_" # else8# define kill(__p1,__p2) __posix_kill(__p1,__p2) # endif# endif # endif% int kill (__pid_t __pid, int __sig);# if defined(_POSIX_EXIT)# if __USE_LONG_GID_T&# pragma __extern_prefix __restore## elif __CRTL_VER >= 70000000 # if __CAN_USE_EXTERN_PREFIX*# pragma __extern_prefix __restore # endif# endif # endif# if __CRTL_VER >= 70000000/ int sigaddset (__sigset_t * __set, int __sig);/ int sigdelset (__sigset_t * __set, int __sig);7 int sigismember (const __sigset_t * __set, int __sig);# if __SIGACT64## pragma __extern_prefix __save$# pragma __extern_prefix "__64_"# endif9 int sigaction(int __sig, const struct sigaction* __act,  struct sigaction* __oact);# if __SIGACT64&# pragma __extern_prefix __restore# endif5#if __CRTL_VER >= 80200000 && __INITIAL_POINTER_SIZE  T int __64_sigaction(int, const struct __sigaction64 *, struct __sigaction64 *);T int __32_sigaction(int, const struct __sigaction32 *, struct __sigaction32 *);0 __sighnd64_t __64_signal(int, __sighnd64_t);/ __sighnd_t __32_signal(int, __sighnd64_t);9 __bsd_sighnd64_t __64_ssignal(int, __bsd_sighnd64_t);7 __bsd_sighnd_t __32_ssignal(int, __bsd_sighnd64_t);#endif7 int sigprocmask (int __how, const __sigset_t * __set,  __sigset_t * __oset);% int sigpending (__sigset_t * __set);+ int sigsuspend (const __sigset_t * __set);X# if __cplusplus && !__NO_MACROS && !(defined(__ia64) && (__INITIAL_POINTER_SIZE == 32))1 inline int sigemptyset (__sigset_t *__set) { *__set =_SIG_EMPTY_SET; return 0; }0 inline int sigfillset (__sigset_t *__set) { *__set =_SIG_FULL_SET; return 0; }# else* int sigemptyset (__sigset_t * __set);* int sigfillset (__sigset_t * __set);# if !__NO_MACROSB# define sigemptyset(set) (*(__sigset_t*)(set)=_SIG_EMPTY_SET, 0)@# define sigfillset(set) (*(__sigset_t*)(set)=_SIG_FULL_SET, 0) # endif# endif # endif#endif/* ** XPG4 V2 function prototypes*/ >#if defined _XOPEN_SOURCE_EXTENDED || !defined _ANSI_C_SOURCE int sigpause (int __mask);A int sigstack (struct sigstack *__ss, struct sigstack *__oss);#endif/*** DEC C extensions*/#ifndef _ANSI_C_SOURCE# if __SIGACT64!# pragma __extern_prefix __save"# pragma __extern_prefix "__64_")# define __SSIGRETTYP __bsd_sighnd64_t # else&# define __SSIGRETTYP __bsd_sighnd_t# endif@ __SSIGRETTYP ssignal (int __sig, __bsd_sighnd64_t __action);# if __SIGACT64$# pragma __extern_prefix __restore# undef __SSIGRETTYP# endifJ int sigvec (int __sigveca, struct sigvec *__sv, struct sigvec *__osv); int sigblock (int __mask); int sigsetmask (int __mask);! int gsignal (int __sig, ...);, void VAXC$ESTABLISH (__vms_handler __f); void VAXC$CRTL_INIT (void);# ifndef __cplusplus void DECC$CRTL_INIT (void); # endif# ifndef __VAX8 void c$$establish(__void_ptr32, unsigned short);C# define VAXC$CRTL_INIT() ( c$$establish(0,32), (VAXC$CRTL_INIT)())# ifndef __cplusplusF# define DECC$CRTL_INIT() (c$$establish(0,32), (DECC$CRTL_INIT)())# endif # endif /* E ** ISO POSIX-1 defines alarm, sleep as being in . ForE ** compatibility with DEC C V4, the old prototypes are supported. */ # ifndef _DECC_V4_SOURCE/ unsigned int alarm (unsigned int __seconds);1 unsigned int sleep (unsigned __seconds); # else , int alarm (unsigned int __seconds);( int sleep (unsigned __seconds); # endif /* / ** ISO POSIX-1 defines pause in  */  int pause (void); /* @ ** XPG4 V2 removed sigmask from signal.h in a corrigenda to ** that specification. */ # if __CRTL_VER >= 70000000 int sigmask (int __sig);## define sigmask(m) (1L << ((m)-1)) # endif#endif>#if defined _XOPEN_SOURCE_EXTENDED || !defined _ANSI_C_SOURCE/*** XPG5 extentions*/# if __CRTL_VER >= 703200009# if (!defined __TIMESPEC && !defined _TIMESPEC_T_)# define __TIMESPEC struct timespec {% unsigned long tv_sec; /* seconds */! long tv_nsec; /* nanoseconds */ };# endif2 int sigwait(const __sigset_t *__set, int *__sig);= int sigwaitinfo(const __sigset_t *__set, siginfo_t *__info);` int sigtimedwait(const __sigset_t *__set, siginfo_t *__info, const struct timespec *__timeout); int sighold(int sig); int sigrelse(int sig); int sigignore(int sig); # endif#endif/* ** Restore pointer size context*/#if __INITIAL_POINTER_SIZE## pragma __pointer_size __restore#endif$#pragma __member_alignment __restore#ifdef __cplusplus }#endif#pragma __standard#endif /* __SIGNAL_PROCESSED */>#if defined(__NAMESPACE_STD) && !defined(__NAMESPACE_STD_ONLY)# ifndef __USING_SIGNAL_NAMES # define __USING_SIGNAL_NAMES using std::raise; using std::sig_atomic_t; using std::signal;# endif#endif#undef __NAMESPACE_STD_ONLY#pragma __standard#endif /* __CSIGNAL_LOADED */ww FSTREAM.H FSTREAM.HXXFSTREAM_IMPL.HXX(FSTREAM_STDIMPL.CCfFSTREAM_STDIMPL.HXX FUNCTIONAL. GENERIC.Hv7ԦM/**************************************************************************** *E * This cname header was auto-generated from its C89 counterpart *N ****************************************************************************/#ifndef __CSTDARG_LOADED#define __CSTDARG_LOADED#pragma __nostandard#ifdef __PURE_CNAME# define __NAMESPACE_STD_ONLY#endif#ifndef __STDARG_PROCESSED#define __STDARG_PROCESSEDM/******************************************* ***********************************$** - Variable Arguments **M*****************************************************************************,** Header introduced by the ANSI C StandardM*****************************************************************************I** I** Copyright 2004 Hewlett-Packard Development Company, L.P. I**  I** Confidential computer software. Valid license from HP and/or I** its subsidiaries required for possession, use, or copying. I** I** Consistent with FAR 12.211 and 12.212, Commercial Computer Software, I** Computer Software Documentation, and Technical Data for Commercial I** Items are licensed to the U.S. Government under vendor's standard I** commercial license.  I** I** Neither HP nor any of its subsidiaries shall be liable for technical I** or editorial errors or omissions contained herein. The information I** in this document is provided "as is" without warranty of any kind and I** is subject to change without notice. The warranties for HP products I** are set forth in the express limited warranty statements accompanying I** such products. Nothing herein should be construed as constituting an I** additional warranty. I** M******************************************************************************/#pragma __nostandard #include #ifdef __cplusplus extern "C" {#endif/*M** The header files VARARGS.H and STDARG.H cannot be used together; undo the** effects of VARARGS!.H.*/#ifdef __VARARGS_LOADED# undef __VARARGS_LOADED# undef va_dcl# undef va_count# undef va_start_1# undef va_start# undef va_arg# undef va_end#endif#ifdef __NAMESPACE_STDnamespace std {#endif/*** Declare a va_list */#ifndef __VA_LIST# define __VA_LIST typedef __va_list va_list;#endif#ifdef __NAMESPACE_STD} /* namespace std */#endif#if !defined(__VAX)# if __X_FLOAT!# define va_start(ap, parmN) \E ap = (__va_list) ((__char_ptr32) __VA_START_BUILTIN(parmN) + \\ (((__IS_X_FLOAT_BUILTIN(parmN) ? sizeof(long double *) : sizeof(parmN)) + 7) & ~7))# define va_arg(ap, type) (\. ap = (__va_list) ((__char_ptr32) ap + \^ (((__IS_X_FLOAT_BUILTIN(type) ? sizeof(long double *) : sizeof(type)) + 7) & ~7)), \( __IS_X_FLOAT_BUILTIN(type) ? \- (** (type **)((__char_ptr32) ap - \X (((__IS_X_FLOAT_BUILTIN(type) ? sizeof(long double *) : sizeof(type)) + 7) & ~7)))  : \- ( * (type *)((__char_ptr32) ap - \V (((__IS_X_FLOAT_BUILTIN(type) ? sizeof(long double *) : sizeof(type)) + 7) & ~7))) )# else!# define va_start(ap, parmN) \Z ap = (__va_list) ((__char_ptr32) __VA_START_BUILTIN(parmN) + ((sizeof (parmN) + 7) & ~7))# define va_arg(ap, type) (\E ap = (__va_list) ((__char_ptr32) ap + ((sizeof (type) + 7) & ~7)), \A (* (type *)((__char_ptr32) ap - ((sizeof (type) + 7) & ~7))))# endif /* 0 ** va_count is an extension to the standard. */ # ifndef __HIDE_FORBIDDEN_NAMES+ unsigned int __VA_COUNT_BUILTIN(void);:# define va_count(count) (count = __VA_COUNT_BUILTIN())# endif#else<# if (__DECC_VER >= 50300000) || (__DECCXX_VER >= 50300000)?# define va_start(ap, parmN) ap = __VA_START1_BUILTIN(parmN)# define va_arg(ap, type) \ (__VA_START_BUILTIN(), (\E ap = (__va_list) ((__char_ptr32) ap + ((sizeof (type) + 3) & ~3)), \> * (type *) ((__char_ptr32) ap - ((sizeof (type) + 3) & ~3))))# else# ifdef __cplusplus## define va_start(ap, parmN) \I ap = (__va_list) ((__char_ptr32) &parmN + ((sizeof (parmN) + 3) & ~3))!# define va_arg(ap, type) (\N ap = (__va_list) ((__char_ptr32) ap + ((sizeof (type) + 3) & ~3)), \J * (type *) ((__char_ptr32) ap - ((sizeof (type) + 3) & ~3))) # else## define va_start(ap, parmN) \( ap = (__VA_START_BUILTIN(), \P (__va_list) ((__char_ptr32) &parmN + ((sizeof (parmN ) + 3) & ~3))) # define va_arg(ap, type) \$ (__VA_START_BUILTIN(), (\H ap = (__va_list) ((__char_ptr32) ap + ((sizeof (type) + 3) & ~3)), \K * (type *) ((__char_ptr32) ap - ((sizeof (type) + 3) & ~3)))) # endifF# endif /* (__DECC_VER >= 50300000) || (__DECCXX_VER >= 50300000) */ # ifndef __HIDE_FORBIDDEN_NAMES( void decc$va_count( int *__count );5# if defined(__DECC) || (__DECCXX_VER >= 50300000)L# define va_count(count) (__VA_START_BUILTIN(), decc$va_count (&count)) # else5# define va_count(count) decc$va_count (&count) # endif# endif#endif&#define va_end(ap) ap = (__va_list) 0#ifdef __cplusplus }#endif#pragma __standard#endif /* __STDARG_PROCESSED */>#if defined(__NAMESPACE_STD) && !defined(__NAMESPACE_STD_ONLY)# ifndef __USING_STDARG_NAMES # define __USING_STDARG_NAMES using std::va_list;# endif#endif#undef __NAMESPACE_STD_ONLY#pragma __standard#endif /* __CSTDARG_LOADED */ww;w7ԦM/**************************************************************************** *E * This cname header was auto-generated from its C89 counterpart *N ****************************************************************************/#ifndef __CSTDDEF_LOADED#define __CSTDDEF_LOADED#pragma __nostandard#ifdef __PURE_CNAME# define __NAMESPACE_STD_ONLY#endif#ifndef __STDDEF_PROCESSED#define __STDDEF_PROCESSEDM/******************************************* ***********************************$** - Common Definitions **M*****************************************************************************,** Header introduced by the ANSI C StandardM*****************************************************************************I** I** Copyright 2004 Hewlett-Packard Development Company, L.P. I**  I** Confidential computer software. Valid license from HP and/or I** its subsidiaries required for possession, use, or copying. I** I** Consistent with FAR 12.211 and 12.212, Commercial Computer Software, I** Computer Software Documentation, and Technical Data for Commercial I** Items are licensed to the U.S. Government under vendor's standard I** commercial license.  I** I** Neither HP nor any of its subsidiaries shall be liable for technical I** or editorial errors or omissions contained herein. The information I** in this document is provided "as is" without warranty of any kind and I** is subject to change without notice. The warranties for HP products I** are set forth in the express limited warranty statements accompanying I** such products. Nothing herein should be construed as constituting an I** additional warranty. I** M******************************************************************************/#pragma __nostandard#include #ifdef __NAMESPACE_STDnamespace std {#endiftypedef int ptrdiff_t;#ifndef __SIZE_T# define __SIZE_T 1 typedef __size_t size_t;#endif#ifdef __NAMESPACE_STD} /* namespace std */#endif#ifndef __WCHAR_T# define __WCHAR_T typedef __wchar_t wchar_t;#endif #ifndef NULL# define NULL __NULL#endif#if __DECCXX_VER > 60500000N# define offsetof(__t, __memb) ((__size_t)__INTADDR__(&(((__t *)0)->__memb)))#else`# define offsetof(type, identifier) ((__size_t)((char *)&((type*)0L)->identifier - (char *)0L))#endif#pragma __standard#endif /* __STDDEF_PROCESSED */>#if defined(__NAMESPACE_STD) && !defined(__NAMESPACE_STD_ONLY)# ifndef __USING_STDDEF_NAMES # define __USING_STDDEF_NAMES using std::ptrdiff_t; using std::size_t;# endif#endif#undef __NAMESPACE_STD_ONLY#pragma __standard#endif /* __CSTDDEF_LOADED */wwC=x7ԦM/**************************************************************************** *E * This cname header was auto-generated from its C89 counterpart *N ****************************************************************************/#ifndef __CSTDIO_LOADED#define __CSTDIO_LOADED#pragma __nostandard#ifdef __PURE_CNAME# define __NAMESPACE_STD_ONLY#endif#ifndef __STDIO_PROCESSED#define __STDIO_PROCESSEDM/******************************************* ***********************************%** - Standard Input/Output**M*****************************************************************************,** Header introduced by the ANSI C StandardM*****************************************************************************I** I** Copyright 2006 Hewlett-Packard Development Company, L.P. I**  I** Confidential computer software. Valid license from HP and/or I** its subsidiaries required for possession, use, or copying. I** I** Consistent with FAR 12.211 and 12.212, Commercial Computer Software, I** Computer Software Documentation, and Technical Data for Commercial I** Items are licensed to the U.S. Government under vendor's standard I** commercial license.  I** I** Neither HP nor any of its subsidiaries shall be liable for technical I** or editorial errors or omissions contained herein. The information I** in this document is provided "as is" without warranty of any kind and I** is subject to change without notice. The warranties for HP products I** are set forth in the express limited warranty statements accompanying I** such products. Nothing herein should be construed as constituting an I** additional warranty. I** M******************************************************************************/#pragma __nostandard#include #ifdef __cplusplus extern "C" {#endif#if __INITIAL_POINTER_SIZE # pragma __pointer_size __save# pragma __pointer_size 32#endif/*3** Cplusplus and unix_putc does not work together.@** Primarily for pragma inline functions. So put out an error. *//# if defined __UNIX_PUTC && defined __cplusplus6# error " Use of __UNIX_PUTC not permitted with C++"# endif/*** Member align structures*/!#pragma __member_alignment __save#pragma __member_alignment/*K** Create 'public' typedefs that are either insensitive to pointer size or>** are sensitive to pointer size and must use short pointers.*/ #ifndef NULL# define NULL __NULL#endifstruct _iobuf { int _cnt; char *_ptr; char *_base; unsigned char _flag;#if __CRTL_VER >= 70000000" unsigned char _padfile;  unsigned char _pad1; unsigned char _pad2; int _file;#else unsigned char _file;  unsigned char _pad1; unsigned char _pad2;#endif};#ifdef __NAMESPACE_STDnamespace std {#endif#ifndef __FILE_T# define __FILE_T typedef __FILE FILE;#endifHtypedef struct __fpos {unsigned __f0 : 32; unsigned __f1 : 32; } fpos_t;#ifndef __SIZE_T# define __SIZE_T 1 typedef __size_t size_t;#endif#ifdef __NAMESPACE_STD} /* namespace std */#endifg#if !defined(_DECC_V4_SOURCE) && (__USE_OFF64_T || defined(_XOPEN_SOURCE) || !defined(_ANSI_C_SOURCE) )# ifndef __OFF_T# define __OFF_T 1 typedef __off_t off_t;# endif#endif/*5** Define macros to access stdin, stdout, and stderr*/ #ifndef __VAX"# define stderr (decc$ga_stderr)!# define stdin (decc$ga_stdin)"# define stdout (decc$ga_stdout)#else## define stderr (*decc$ga_stderr)"# define stdin (*decc$ga_stdin)## define stdout (*decc$ga_stdout)#endif/*$** Define stdin, stdout, and stderr*/#pragma __extern_model __save&#pragma __extern_model __strict_refdef extern __FILE * stderr; extern __FILE * stdin; extern __FILE * s tdout; #pragma __extern_model __restore/*A** Define optind, opterr, optopt, and optarg. X/Open originallyG** specified these in . ISO POSIX-2 moved them to ** X/Open retains them in both.*/G#if __CRTL_VER >= 60200000 /* Supported starting with OpenVMS V6.2 */9# if defined(_XOPEN_SOURCE) || !defined(_ANSI_C_SOURCE)## pragma __extern_model __save,# pragma __extern_model __strict_refdef extern int optind; extern int opterr;   extern int optopt; extern char *optarg;&# pragma __extern_model __restore # endif#endif/*L** The ANSI standard defines the following integral constant expressions asJ** having distinct values, suitable for use as the third argument to the ** setvbuf function.*/#define _IOLBF 0x01#define _IOFBF 0x02#define _IONBF 0x04/*M** Values for _flag field in the _iobuf structure. This flag is used by theG** functions clearerr(), feof() and ferror().  A standards conforming@** program should not use _IOEOF or _IOERR. Use clearerr, feof** and ferror macros instead.*/# define _IOEOF 0x10# define _IOERR 0x20#ifndef _ANSI_C_SOURCE# define _IOREAD 0x01# define _IOWRT 0x02# define _IOMYBUF 0x08# define _IOSTRG 0x40# define _IORW 0x80#endif/*F** Define seek modes. Note that the SEEK_EOF value is not defined byD** the ANSI standard, but is provided for compatibility with VAX C.*/#defin e SEEK_SET 0#define SEEK_CUR 1#define SEEK_END 2#ifndef _ANSI_C_SOURCE# define SEEK_EOF SEEK_END#endif/*I** The literal BUFSIZ is defined by the ANSI standard as the size of the'** buffer used by the setbuf function.*/ #ifndef __VAX# define BUFSIZ 32768#else# define BUFSIZ 8192#endif/*;** DEC C RTL extension. Define the values TRUE and FALSE.*/#ifndef _ANSI_C_SOURCE# ifndef TRUE# define TRUE 1 # endif# ifndef FALSE# d efine FALSE 0 # endif#endif/*L** The ANSI standard defines EOF as a negative integral constant expressionK** that is returned by several functions to indicate end-of-file. Internal;** __EOF macro is defined in header as (-1)*/#define EOF __EOF/*B** The ANSI standard defines FILENAME_MAX as an integral constantK** expression that is the size needed for an array of char large enough toH** hold the longest file name string that the implementation guarantees** can be opened.**J** The ANSI standard defines FOPEN_MAX as an integral constant expressionJ** that is the minumum number of files that the implementation guaranteesJ** can be opened simultaneously. This value is difficult to define as anJ** accurate constant value since many things affect the ability to open a** given number of files.*/#define FILENAME_MAX 256#define FOPEN_MAX 8/*M** DEC C RTL extension. Define OPEN_MAX to be identical to FOPEN_MAX. Also*** define _NFILE for VAX C compatibility.*/#ifndef _ANSI_C_SOURCE# define OPEN_MAX FOPEN_MAX# define _NFILE 20#endif/*C** The literal values L_tmpnam and TMP_MAX are defined by the ANSIE** standard. If the argument to the tmpnam() function is not a nullD** pointer, it is assumed to point to an array of at least L_tmpnamH** characters. The value TMP_MAX represents the number of unique namesJ** which must be returned from the tmpnam() function on successive calls.*/#define L_tmpnam 256#if __CRTL_VER >= 70301000# define TMP_MAX 17576#else# define TMP_MAX 156#endif/*F** ISO POSIX-1 extensions. These literal values are analogous to the/** L_tmpnam value for tmpnam() function calls.*/8#if defined(_POSIX_C_SOURCE) || !defined(_ANSI_C_SOURCE)# define L_cuserid 16# define L_ctermid 64#endif/*D** DEC C RTL extensions. These literal values are analogous to the/** L_tmpnam value for tmpnam() function calls.*/#ifndef _ANSI_C_SOURCE# define L_lcltmpnam 256# define L_nettmpnam 256#endif/*E** The MIA standard requires use of a special rename() and freopen();** function. Define macros when compiling with that mode.*/ #ifdef __MIA"# define rename decc$mia_rename## define freopen decc$mia_freopen#endif/*F** Conditions for X/Open file pointer locking functions to be visible.*/?#if ( (defined(_XOPEN_SOURCE) || !defined(_ANSI_C_SOURCE)) && \ (__CRTL_VER >= 80200000) )# define __FP_LOCKING 1#else# define __FP_LOCKING 0#endif/*P** Conditions to permit optimizations not requiring X/Open file pointer locking.*/#ifdef __STDIO_UNLOCK_CHAR_IO# define __FP_OPTIMIZATIONS 1#else# if __FP_LOCKING# define __FP_OPTIMIZATIONS 0# else# define __FP_OPTIMIZATIONS 1 # endif#endif/*J** Throughout this header file, for a C++ compilation with __NAMESPACE_STDM** enabled, functions from ANSI C standard that are defined as mac ros in thisB** header file, are defined as inline functions instead of macros.**J** This is to comply with clause 17.4.1.2 Headers [lib.headers] of the C++&** standard which says, in particular:J-6- Names that are defined as functions in C shall be defined as functions" in the C++ Standard Library.*)L*) This disallows the practice, allowed in C, of providing a "masking macro"L in addition to the function prototype. The only way to achieve equivalentJ "inline" behavior in C++ is to provide a definition as an extern inline function.*//*** DEC C Performance (Macros)*/P#define __feof_(stream) (((unsigned int)((*(stream))->_flag) & _IOEOF) != 0)P#define __ferror_(stream) (((unsigned int)((*(stream))->_flag) & _IOERR) != 0)N#define __clearerr_(stream) ((void)((*(stream))->_flag &= ~(_IOERR | _IOEOF)))#ifndef __NAMESPACE_STD#if __FP_OPTIMIZATIONS(#define feof(stream) __feof_(stream)*#define ferror(stream) __ferror_(stream),#define clearerr(stream) __clearerr_(stream)#endif#else#if __INITIAL_POINTER_SIZE # pragma __pointer_size __save# pragma __pointer_size 64#endifnamespace std {#pragma __extern_prefix __save#pragma __extern_prefix "CXXL$"#if __FP_OPTIMIZATIONS=inline int feof(FILE* stream) { return __feof_(stream); }?inline int ferror(FILE* stream) { return __ferror_(stream); };inline void clearerr(FILE* stream) { __clearerr_(stream); }#endif!#pragma __extern_prefix __restore} /* namespace std */#if __INITIAL_POINTER_SIZE## pragma __pointer_size __restore#endif#endif /* __NAMESPACE_STD *//*** DEC C Performance (Inlined)**L** Certain DEC C functions are available as inline code instead of making aE** call to the DEC C RTL. Using this inline code offers performanceB** improvements and are enabled here for all programs not on VAX.*/ #ifndef __VAX /*= ** Optimized getc, getchar, putc, putchar, fgetc, fputc.E ** ANSI standard says that getc/putc can evaluate its parameters ** more than once. ** */# ifndef __NAMESPACE_STD /*! ** C compilation, define macros **B ** Any change in the macro below should be made in corresponding; ** inline function for a C++ compilation, and vice versa. ** */'# define __getc_(__fp) ((*(__fp)) ? \J (((((*(__fp))->_cnt > 0) & !((int)(*(__fp))->_flag & 0x40)) ? \R ((*(__fp))->_cnt--, ((int) ((unsigned char) *((*(__fp))->_ptr++)))) : \) (getc)(__fp))) : (getc)(__fp))+# if !defined(getc) && __FP_OPTIMIZATIONS&# define getc(__fp) __getc_(__fp) # endif%# define __getchar_() ((*stdin) ? \H (((((*stdin)->_cnt > 0) & !((int)(*stdin)->_flag & 0x40)) ? \P ((*stdin)->_cnt--, ((int) ((unsigned char) *((*stdin)->_ptr++)))) : \' (getchar)())) : (getchar)()).# if !defined(getchar) && __FP_OPTIMIZATIONS$# define getchar() __getchar_() # endif# else /* __NAMESPACE_STD */#if __FP_OPTIMIZATIONS /*- ** C++ compilation, define inline functions */#if __INITIAL_POINTER_SIZE # pragma __pointer_size __save# pragma __pointer_size 64#endifnamespace std {#pragma __extern_prefix __save#pragma __extern_prefix "CXXL$" inline int getc(FILE* __fp); inline int getchar();!#pragma __extern_prefix __restore inline int getc(FILE* __fp) { int decc$getc(FILE*); return ((*__fp) ?D (((((*__fp)->_cnt > 0) & !((int)(*__fp)->_flag & 0x40)) ?L ((*__fp)->_cnt--, ((int) ((unsigned char) *((*__fp)->_ptr++)))) :4 (decc$getc)(__fp))) : (decc$getc)(__fp)); } inline int getchar() { int decc$getchar(void); return ((*stdin) ?F (((((*stdin)->_cnt > 0) & !((int)(*stdin)->_flag & 0x40)) ?N ((*stdin)->_cnt--, ((int) ((unsigned char) *((*stdin)->_ptr++)))) :2 (decc$getchar)())) : (decc$getchar)()); }} /* namespace std */#if __INITIAL_POINTER_SIZE## pragma __pointer_size __restore#endif#endif /* FP locking */# endif /* __NAMESPACE_STD */ /*? ** This is conditional until a problem with static inline 0 ** procedures is corrected in the compiler.9 ** When this is corrected, we must separate this and' ** conditionalize this out of c++. **  */# ifdef __UNIX_PUTC# ifndef putc# pragma __inline __putc= static int __putc( int __c, struct _i obuf **__p2 ) {$ struct _iobuf *__p = *__p2;/ if (!(*__p2)) return (putc)(__c,__p2);$ if ( !((__p)->_flag & 0x40)B & ((int)((__p)->_ptr) != (int) *(((int *) (__p)) + 6))8 & !(*(((unsigned char *)(__p))+14) & 0x10 )) {- if ((__p)->_cnt) (__p)->_cnt--;% *(__p)->_ptr++ = (__c);8 *(((unsigned char *) (__p)) + 14) |= 0x02; return __c; + } else return (putc)(__c,__p2);  }# if __FP_OPTIMIZATIONS$# define putc(c,fp) __putc(c,fp)# endif # endif# ifndef putchar # pragma __inline __putchar( static int __putchar( int __c ) {& struct _iobuf *__p = *stdout;/ if (!(*stdout)) return (putchar)(__c);# if (!((__p)->_flag & 0x40)= & ((int)((__p)->_ptr)!=(int) *(((int *)(__p))+6))8 & !(*(((unsigned char *)(__p))+14) & 0x10 )) {- if ((__p)->_cnt) (__p)->_cnt--;% *(__p)->_ptr++ = (__c);8 *(((unsigned char *) (__p)) + 14) |= 0x02; return __c; ) } else return (putchar)(__c); }# if __FP_OPTIMIZATIONS # define putchar(c) __putchar(c) # endif # endif # endif /*@ ** ANSI standard says that fgetc/fputc cannot evaluate its 9 ** parameters more than once so make sure it is doneJ ** via a static inline function. and surrounded by unix conditionals. */# ifdef __UNIX_PUTC# ifndef fgetc# pragma inline __fgetcA static int __fgetc (__FILE *__fp) {return (getc (__fp));}# if __FP_OPTIMIZATIONS"# define fgetc(fp) __fgetc(fp)# endif# endif# ifndef fputc# pragma __inline __fputcU static int __fputc(int __c, struct _iobuf **__p2) {return (putc(__c, __p2));}# if __FP_OPTIMIZATIONS&# define fputc(c,fp) __fputc(c,fp)# endif # endif # endif#endif /* ! __VAX */ /*H** This section is for functions and declarations which do not support /** 64 bit pointers being passed (or returned).*/#ifdef __NAMESPACE_STDnamespace std {#endif.void setbuf (__FILE *__stream, char *__buf);Kint setvbuf (__FILE *__stream, char *__buf, int __mode, __size_t __size);#ifdef __NAMESPACE_STD} /* namespace std */#endif/* K** The function cuserid is defined by IEEE Std 1003.1-1988 and was changedO** from mandatory to permitted by ISO POSIX-1. W !ith IEEE Std 1003.1-1988, theN** definition is in . X/Open added it to while retaining ** the definition in **L** The function getopt was originally in ISO POSIX-2 moved it to)** X/Open retains it in both.*/ 6#if defined(_XOPEN_SOURCE) || !defined(_ANSI_C_SOURCE)J# if __CRTL_VER >= 60200000 /* Supported starting with OpenVMS V6.2 */O int getopt (int __argc, char * const __argv[], const char *__optstring); # endif#e"ndif/*O** We are done (for now) defining things which must always be short pointers. K** If the user has used /pointer_size=short or /pointer_size=long, we will5** allow long pointers to be used in function calls.*/#if __INITIAL_POINTER_SIZE# pragma __pointer_size 64#endif#ifdef __NAMESPACE_STDnamespace std {#endif/*** ANSI Function prototypes*/S__size_t fread (void *__ptr, __size_t __size, __size_t __nmemb, __FILE *__stream);Y__size_t fwrite (const voi #d *__ptr, __size_t __size, __size_t __nmemb, __FILE *__stream);#int fclose (__FILE *__stream);#int fflush (__FILE *__stream);2int fgetpos (__FILE *__stream, fpos_t *__pos);>int fprintf (__FILE *__stream, const char *__format, ...);4int fputs (const char *__s, __FILE *__stream);>int fscanf (__FILE *__stream, const char *__format, ...);Dint fseek (__FILE *__stream, long int __offset, int __whence);8int fsetpos (__FILE *__stream, const fpos_t *__pos);$#long ftell (__FILE *__stream);#ifdef __NAMESPACE_STD} /* namespace std */#endifG#if __USE_OFF64_T || defined(_XOPEN_SOURCE) || !defined(_ANSI_C_SOURCE)# if __USE_OFF64_T # pragma extern_prefix __save&# pragma __extern_prefix "__off64_"I __off_t fseeko (__FILE *__stream, __off_t __offset, int __whence);) __off_t ftello (__FILE *__stream);%# pragma __extern_prefix __restore# elif __CRTL_VER >= 70301000I __off_t fseeko (__FILE *__stream, __o%ff_t __offset, int __whence);) __off_t ftello (__FILE *__stream);# endif#endif#ifdef __NAMESPACE_STDnamespace std {#endif"void perror (const char *__s);,int printf (const char *__format, ...);"int puts (const char *__s);)int remove (const char *__filename);7int rename (const char *__old, const char *__new);,int scanf (const char *__format, ...);7int sprintf (char *__s, const char *__format, ...);=int sscanf (const char *__s, &const char *__format, ...);,int ungetc (int __c, __FILE *__stream);Kint vfprintf (__FILE *__stream, const char *__format, __va_list __arg); 8int vprintf (const char *__format, __va_list __arg);Cint vsprintf (char *__s, const char *__format, __va_list __arg);__FILE_ptr32 tmpfile(void);/*>** The following function prototypes may be defined as macros*/#ifndef __NAMESPACE_STD/*J** For a C++ compilation with __NAMESPACE_STD macro defined, the functionsK** below' may have been already defined as inline functions. We declare them<** here only if function definitions have not been provided.*/#void (clearerr) (__FILE *__stream);#int (feof) (__FILE *__stream);#int (ferror) (__FILE *__stream);#int (getc) (__FILE *__stream);int (getchar) (void);#else#if !(__FP_OPTIMIZATIONS)#void (clearerr) (__FILE *__stream);#int (feof) (__FILE *__stream);#int (ferror) (__FILE *__stream);#int (getc) (__FILE *__stream);(int (getchar) (void);#endif#endif#int (fgetc) (__FILE *__stream);,int (fputc) (int __c, __FILE *__stream);,int (putc) (int __c, __FILE *__stream);int (putchar) (int __c);/*H** By defining __UNIX_FOPEN, a macro for fopen is defined which ensuresF** that the created file does not inherit attributes from an existingE** file. To use the fopen function with optional RMS arguments, theC** caller is required to use (fopen)() to prevent macro expansion.*/#i)fdef __UNIX_FOPENI __FILE_ptr32 fopen (const char *__filename, const char *__mode, ...);# define fopen(__p1,__p2) \C (fopen)(__p1,__p2,"ctx=stm","rfm=stmlf","rat=cr","mrs=0")#else# ifdef _ANSI_C_SOURCEG __FILE_ptr32 fopen (const char *__filename, const char *__mode); # else L __FILE_ptr32 fopen (const char *__filename, const char *__mode, ...); # endif#endif/*H** The DEC C RTL extends the ANSI standard definitions of the followingH** func*tions. The function prototypes used in this header file differ 0** when the user is compiling /standard=ansi89.*/#ifdef _ANSI_C_SOURCEX __FILE_ptr32 freopen (const char *__filename, const char *__mode, __FILE *__stream);# void rewind (__FILE *__stream);#else] __FILE_ptr32 freopen (const char *__filename, const char *__mode, __FILE *__stream, ...);# int rewind (__FILE *__stream);#endif#ifdef __NAMESPACE_STD} /* namespace std */#endif/*K** The following fu+nctions have interfaces of XXX, _XXX32, and _XXX64 due J** to the fact that the return argument is a pointer that is relative to ** one of the arguments.*/ #if __INITIAL_POINTER_SIZE == 32#pragma __pointer_size 32#endif8#if defined(_POSIX_C_SOURCE) || !defined(_ANSI_C_SOURCE) char *ctermid (char *__str);#endif6#if defined(_XOPEN_SOURCE) || !defined(_ANSI_C_SOURCE) char *cuserid (char *__str);#endif#ifdef __NAMESPACE_STDnamespace std {#endif char *gets, (char *__s);9 char *fgets (char *__s, int __n, __FILE *__stream); char *tmpnam (char *__s);#ifdef __NAMESPACE_STD} /* namespace std */#endif/*=** End functions with interfaces of XXX, _XXX32, and _XXX64 C** Restore allowing long pointers to be used in function calls if @** the user has used /pointer_size=short or /pointer_size=long.*/#if __INITIAL_POINTER_SIZE#pragma __pointer_size 64#endif#if !(defined(__DECCXX) && \G (defined(__STD_STRICT_ANS-I) || defined(__STD_STRICT_ANSI_ERRORS)))/*K** The functions below are not in the ISO/IEC 9899:1990 standard (so calledM** C89). They should not be visible in a C++ compilation in strict ansi mode.*/#if __CRTL_VER >= 70301000Jint vfscanf (__FILE *__stream, const char *__format, __va_list __arg);8int vscanf (const char *__format, __va_list __arg);Iint vsscanf (const char *__s, const char *__format, __va_list __arg);#endif#if __CRTL_VER >= 70312000Dint snprintf(.char *__s, __size_t __n, const char *__format, ...);Pint vsnprintf(char *__s, __size_t __n, const char *__format, __va_list __ap);#endif0#endif /* C++ compilation in strict ansi mode */P#if __INITIAL_POINTER_SIZE && !defined(_ANSI_C_SOURCE) && __CRTL_VER >= 70000000# pragma __pointer_size 32# char *_ctermid32 (char *__str);# char *_cuserid32 (char *__str); char *_gets32 (char *);- char *_fgets32 (char *, int, __FILE *); char *_tmpnam32 (char *);# /pragma __pointer_size 64# char *_ctermid64 (char *__str);# char *_cuserid64 (char *__str); char *_gets64 (char *);- char *_fgets64 (char *, int, __FILE *); char *_tmpnam64 (char *);#endif/*** ISO POSIX-1 Extensions*/8#if defined(_POSIX_C_SOURCE) || !defined(_ANSI_C_SOURCE)$ int (fileno) (__FILE *__stream);= __FILE_ptr32 fdopen(int __file_desc, const char *__mode);#endif/* ** ISO POSX-2 Extensions*/ N#if _POSIX_C_SOURCE >= 2 || !def0ined(_ANSI_C_SOURCE) && __CRTL_VER >= 70000000B __FILE_ptr32 popen(const char *__command, const char *__mode);3# if __CRTL_VER >= 70301000 && defined(_VMS_WAIT)# ifdef __CAN_USE_EXTERN_PREFIX## pragma __extern_prefix __save%# pragma __extern_prefix "__vms_"# else,# define pclose(__p1) __vms_pclose(__p1)# endif int pclose(__FILE *__stream);# ifdef __CAN_USE_EXTERN_PREFIX&# pragma __extern_prefix __restore# endif # else int pclose(__FILE *__stream1); # endif#endif/*** X/Open extensions*/ 6#if defined(_XOPEN_SOURCE) || !defined(_ANSI_C_SOURCE) int getw (__FILE *__stream);/ int putw (int __integer, __FILE *__stream);M# if __CRTL_VER >= 70000000 /* tempnam() was introduced in OpenVMS V7.0 */ /* H ** P_tmpdir is the directory name used for tempnam(). It is defined ** by X/Open. */%# define P_tmpdir "SYS$SCRATCH:" # if __CRTL_VER >= 70301000F __char_ptr32 tempnam(const c2har *dir, const char *pfx, ...); # elseA __char_ptr32 tempnam(const char *dir, const char *pfx); # endif # endif#endif/* B** DEC C RTL extensions. This include explicit 64-bit interfaces#** to otherwise standard routines.*/ #ifndef _ANSI_C_SOURCE## if __INITIAL_POINTER_SIZE == 32# pragma __pointer_size 32 # endif7 char *fgetname(__FILE *__stream, char *__buf, ...);7# if __INITIAL_POINTER_SIZE && __CRTL_VER >= 70000000 # prag 3ma __pointer_size 32> char *_fgetname32(__FILE *__stream, char *__buf, ...); # pragma __pointer_size 64> char *_fgetname64(__FILE *__stream, char *__buf, ...); # endifN int DECC$RECORD_READ(__FILE *__stream, void *__buffer, int __nbytes, ...);O int DECC$RECORD_WRITE(__FILE *__stream, void *__buffer, int __nbytes, ...);B int decc$read (int __file_desc, void *__buffer, int __nbytes);f# define decc$record_read(stream, buf, max_size) decc$read (((*(stream))->4_file), (buf), (max_size))S# define decc$record_write(stream, buf, size) fwrite ((buf), (size), 1, (stream))! int fwait (__FILE *__stream); int lwait (int __file_desc); /* ; ** fsync is standardized by X/Open to be in  */ int fsync (int __file_desc);# endif/*1** Support code for precompiled printf functions*/5#if ((__DECC_VER > 50600000) && defined(_INTRINSICS))/# pragma intrinsic(printf, fprintf, sprintf)9# if defined(_I5NLINE_INTRINSICS) && __FP_OPTIMIZATIONSB static __inline int decc$__CFE_print_puts(const char *x) {# return(fputs(x,stdout)); }: static __inline int decc$__CFE_print_putc(int x) { putc(x,stdout); return(1); }= static __inline int decc$__CFE_print_putc_nl(int x) {- putc(x,stdout); putc('\n',stdout); return(2); }R static __inline int decc$__CFE_fprint_puts_nl(const char *x, __F6ILE *f) { ( register int i = fputs(x,f);  putc('\n',f);  return(i+1); }F static __inline int decc$__CFE_fprint_putc(int x, __FILE *f) { putc(x,f); return(1); }I static __inline int decc$__CFE_fprint_putc_nl(int x, __FILE *f) {# putc(x,f); putc('\n',f); return(2); } # else3 int decc$__CFE_print_puts( const char *x );+ int decc$__CFE_print_putc( i7nt x );. int decc$__CFE_print_putc_nl( int x );B int decc$__CFE_fprint_puts_nl( const char *x, __FILE *f );7 int decc$__CFE_fprint_putc( int x, __FILE *f );: int decc$__CFE_fprint_putc_nl( int x, __FILE *f ); # endif#endif#if __FP_LOCKING /*O ** These functions shall provide for explicit application-level locking of K ** stdio ( FILE *) objects. These functions can be used by a thread to J ** delineate a sequence of I/O statements that a8re executed as a unit. */% void flockfile(__FILE *__stream);' int ftrylockfile(__FILE *__stream);( void funlockfile(__FILE *__stream);  /*D ** Versions of the file pointer functions which are functionallyI ** equivalent to the original versions, with the exception that they C ** are not required to be implemented in a thread-safe manner. L ** They may only safely be used within a scope protected by flockfile() - ** (or ftrylockfile()) and funlockfi 9le(). */8# define clearerr_unlocked(stream) __clearerr_(stream)0# define getc_unlocked(stream) __getc_(stream)6# define getchar_unlocked(stream) __getchar_(stream)0# define feof_unlocked(stream) __feof_(stream)4# define ferror_unlocked(stream) __ferror_(stream)0 void (clearerr_unlocked) (__FILE *__stream);0 int (getc_unlocked) (__FILE *__stream);$ int (getchar_unlocked) (void);0 int (feof_unlocked) (__FILE *__stream);0 int (ferror_unlocked) (__:FILE *__stream);# ifdef __UNIX_PUTC0# define fgetc_unlocked(stream) __fgetc(stream)5# define fputc_unlocked(c, stream) __fputc(c, stream)*# define putc_unlocked(c,fp) __putc(c,fp)*# define putchar_unlocked(c) __putchar(c)- int (fgetc_unlocked) (__FILE *__stream);6 int (fputc_unlocked) (int __c, __FILE *__stream);6 int (putc_unlocked) (int __c, __FILE *__stream);$ int (putchar_unlocked) (int __c); # endif$#endif /* X/Open file locking *//*%** Restor;e the users pointer context*/#if __INITIAL_POINTER_SIZE## pragma __pointer_size __restore#endif#ifdef __cplusplus }#endif$#pragma __member_alignment __restore#pragma __standard#endif /* __STDIO_PROCESSED */>#if defined(__NAMESPACE_STD) && !defined(__NAMESPACE_STD_ONLY)# ifndef __USING_STDIO_NAMES# define __USING_STDIO_NAMES using std::FILE; using std::clearerr; using std::fclose; using std::feof; using std::ferror; u<sing std::fflush; using std::fgetc; using std::fgetpos; using std::fgets; using std::fopen; using std::fpos_t; using std::fprintf; using std::fputc; using std::fputs; using std::fread; using std::freopen; using std::fscanf; using std::fseek; using std::fsetpos; using std::ftell; using std::fwrite; using std::getc; using std::getchar; using std::gets; using std::perror; using s=td::printf; using std::putc; using std::putchar; using std::puts; using std::remove; using std::rename; using std::rewind; using std::scanf; using std::setbuf; using std::setvbuf; using std::sprintf; using std::sscanf; using std::tmpfile; using std::tmpnam; using std::ungetc; using std::vfprintf; using std::vprintf; using std::vsprintf; using std::size_t;# endif#endif#undef __NAMESPACE_STD_ONLY#pragma __standard#endif /* __CSTDIO_LOADED */ww?&x7ԦM/**************************************************************************** *E * This cname header was auto-generated from its C89 counterpart *N ****************************************************************************/#ifndef __CSTDLIB_LOADED#define __CSTDLIB_LOADED#pragma __nostandard#ifdef __PURE_CNAME# define __NAMESPACE_STD_ONLY#endif#ifndef __STDLIB_PROCESSED#define __STDLIB_PROCESSEDM/******************************************* @***********************************"** - General Utilities**M*****************************************************************************,** Header introduced by the ANSI C StandardM*****************************************************************************I** I** Copyright 2005 Hewlett-Packard Development Company, L.P. I** A I** Confidential computer software. Valid license from HP and/or I** its subsidiaries required for possession, use, or copying. I** I** Consistent with FAR 12.211 and 12.212, Commercial Computer Software, I** Computer Software Documentation, and Technical Data for Commercial I** Items are licensed to the U.S. Government under vendor's standard I** commercial license. B I** I** Neither HP nor any of its subsidiaries shall be liable for technical I** or editorial errors or omissions contained herein. The information I** in this document is provided "as is" without warranty of any kind and I** is subject to change without notice. The warranties for HP products I** are set forth in the express limited warranty statements accompanying I** such productsC. Nothing herein should be construed as constituting an I** additional warranty. I** M******************************************************************************/#pragma __nostandard#include #ifdef __cplusplus extern "C" {#endif/* E** X/Open specifies that WNOHANG, WUNTRACED, WEXITSTATUS, WIFEXITED,N** WIFSIGNALED, WIFSTOPPED, WDSTOPSIG and WTRERMSIG are defined here, and thatJ** inclusion of may make visible all symbols from ** and .*/ R#if defined _XOPEN_SOURCE || (!defined _ANSI_C_SOURCE && !defined _DECC_V4_SOURCE)# include # include #endif#if __INITIAL_POINTER_SIZE # pragma __pointer_size __save# pragma __pointer_size 32#endif/*** Member align structures*/!#pragma __member_alignment __save#pragma __member_alignmentE/*H** Create 'public' typedefs that are sensitive to pointer size and mustK** use 32 bit pointers. Create other declarations which are not sensitive** to pointer size.*/ #ifndef NULL# define NULL __NULL#endif#ifdef __NAMESPACE_STDnamespace std {#endif#ifndef __SIZE_T# define __SIZE_T 1 typedef __size_t size_t;#endiftypedef struct { int quot, rem;} div_t;typedef struct { long int quot, rem; } ldiv_t;#ifdef __NAMESPACE_STD} /* namesFpace std */#endif#ifndef __WCHAR_T# define __WCHAR_T typedef __wchar_t wchar_t;#endif/* .** mode_t is needed for a DEC C RTL Extension*/ #ifndef _ANSI_C_SOURCE5# if !defined __MODE_T && !defined _DECC_V4_SOURCE# define __MODE_T 1 typedef __mode_t mode_t; # endif#endif/*** Define constant values*//*<** Exit function failure definition changes corresponding to+** V7.0 "UNIX"-like exit function behavior.*/2#if __CRTL_VER >= G70000000 && defined(_POSIX_EXIT)# define EXIT_FAILURE (1) #else&# define EXIT_FAILURE 0x10000002 #endif#define EXIT_SUCCESS 0!#define RAND_MAX 2147483647/*F** Beginning in OpenVMS V6.2, MB_CUR_MAX is no longer a literal value*/#if __CRTL_VER < 60200000# define MB_CUR_MAX 1#else # pragma __extern_model __save)# pragma __extern_model __strict_refdef% extern int decc$$gl___mb_cur_max;## pragma __extern_model __restore-# define MB_CUR_HMAX (decc$$gl___mb_cur_max)#endifM/******************************************************************************2** Functions which do not support 64 bit pointers**M****************************************************************************/#ifdef __NAMESPACE_STDnamespace std {#endif/*** ANSI functions */$ int atexit(void(*__func)(void));#ifdef __NAMESPACE_STD} /* namespace std */#endif/*** X/Open functions*/4#if defined _XOPEN_SOURCE || !deIfined _ANSI_C_SOURCE# if __CRTL_VER >= 70000000/ int putenv (const char *__string); # endif#endif/*** X/Open Extended functions*/W#if defined _XOPEN_SOURCE_EXTENDED || !defined _ANSI_C_SOURCE && __CRTL_VER >= 70000000 char *setstate(char *);/ char *initstate(unsigned int, char *, int);#endif/*M** We are done defining things which must always be 32 bit pointers. If theL** user has used /pointer_size=32 or /pointer_size=64, we will allow 64J bit*** pointers to be used in function calls.*/#if __INITIAL_POINTER_SIZE# pragma __pointer_size 64#endifM/******************************************************************************;** Functions which accept either 32 bit or 64 bit pointers**M****************************************************************************/#ifdef __NAMESPACE_STDnamespace std {#endif/*** ANSI functions */ void abort (void); int abs (int __j);+ K double atof (const char *__nptr);+ int atoi (const char *__nptr);+ long int atol (const char *__nptr);1 div_t div (int __numer, int __denom);$ void free (void *__ptr);% long int labs (long int __j);; ldiv_t ldiv (long int __numer, long int __denom);6 int mblen (const char *__s, __size_t __n);I __size_t mbstowcs (__wchar_t *__pwcs, const char *__s, __size_t __n);H int mbtowc (__wchar_t *__pwc, conLst char *__s, __size_t __n); int rand (void);, void srand (unsigned int __seed);I __size_t wcstombs (char *__s, const __wchar_t *__pwcs, __size_t __n);5 int wctomb (char *__s, __wchar_t __wchar);2#if __CRTL_VER >= 70000000 && defined(_POSIX_EXIT)# if __CAN_USE_EXTERN_PREFIX$# pragma __extern_prefix __save(# pragma __extern_prefix "__posix_"# else&# define exit(__p1) __posix_exit(__p1)*# define system(__p1) __posix_system(__p1) # enMdif#endif% void exit (int __status);- int system (const char *__string);2#if __CRTL_VER >= 70000000 && defined(_POSIX_EXIT)# if __CAN_USE_EXTERN_PREFIX'# pragma __extern_prefix __restore # endif#endif#ifdef __NAMESPACE_STD} /* namespace std */#endif/*** X/Open functions */4#if defined _XOPEN_SOURCE || !defined _ANSI_C_SOURCE# if __CRTL_VER >= 70000000 double drand48 (void);8 double erand48 (unsigned short Nint __xsubi[3]);8 long int jrand48 (unsigned short int __xsubi[3]);8 void lcong48 (unsigned short int __param[7]); long int lrand48 (void); long int mrand48 (void);8 long int nrand48 (unsigned short int __xsubi[3]);- void srand48 (long int __seedval); # endif# if __CRTL_VER >= 80300000void setkey(const char *__key);#endif#endif/*** X/Open Extended functions*/=#if defined _XOPEN_SOURCE_EXTENDED || !defined _ANSI_C_SOURCOE# if __CRTL_VER >= 70000000& int mkstemp (char *path);  long int random (void);' void srandom (unsigned int); # endif# if __CRTL_VER >= 70320000* int rand_r (unsigned int *__seed_ptr); ' __char_ptr32 l64a (long __val);3 long int a64l (__const_char_ptr64 __s);## if !defined _POSIX_C_SOURCEK int l64a_r (long int __val, __char_ptr64 __s, int __len);8# endif /* not defined while building for posiPx */ # endif#endif/*** DEC C extensions*/#ifndef _ANSI_C_SOURCE< int nice (int __increment); /* */< __mode_t umask (__mode_t __old_mask); /* */! void cfree (void *__ptr);# if !defined(__VAX)A typedef struct { __int64 quot, rem; } __qdiv_t, __lldiv_t;, __int64 atoll (const char *__nptr);, __int64 atoq (const char *__nptr);% __int64 llabs (__int64 __j);: __lldiv_t lldiv (__int64 Q__numer, __int64 __denom);% __int64 qabs (__int64 __j);: __lldiv_t qdiv (__int64 __numer, __int64 __denom); # endif# if __CRTL_VER >= 70000000P int setenv (const char *__name, const char *__value, int __overwrite);* void unsetenv (const char *__name); # endif2#if __CRTL_VER >= 70000000 && defined(_POSIX_EXIT)# if __CAN_USE_EXTERN_PREFIX$# pragma __extern_prefix __save(# pragma __extern_prefix "__posix_"# else+# define _exit(__pR1) __posix__exit(__p1) # endif#endif< void _exit (int __status); /* */2#if __CRTL_VER >= 70000000 && defined(_POSIX_EXIT)# if __CAN_USE_EXTERN_PREFIX'# pragma __extern_prefix __restore # endif#endif#endifM/******************************************************************************H** Functions which accept either 32 bit or 64 bit pointers, but always ** return 32 bit pointers.**M************************************S****************************************/#ifdef __NAMESPACE_STDnamespace std {#endif/*** ANSI functions*/- __char_ptr32 getenv (const char *__name);#ifdef __NAMESPACE_STD} /* namespace std */#endif/*** X/Open functions*/4#if defined _XOPEN_SOURCE || !defined _ANSI_C_SOURCE# if __CRTL_VER >= 70000000B __unsigned_short_ptr32 seed48(unsigned short __seed16v[3]); # endif#endif/*** X/Open Extended functions*/=#if defined _XOPEN_SOURCTE_EXTENDED || !defined _ANSI_C_SOURCEP __char_ptr32 ecvt (double __value, int __ndigit, int *__decpt, int *__sign);P __char_ptr32 fcvt (double __value, int __ndigit, int *__decpt, int *__sign);#endif/*** DEC C extensions.*/#ifndef _ANSI_C_SOURCEB __void_ptr32 brk (unsigned long int __addr); /* */: __void_ptr32 sbrk (long int __incr); /* */#endifM/******************************************************************************G** FunctiUons which have separate implementations for 32 bit and 64 bitG** pointers. The implementation defaults to that corresponding to theI** default pointer size used in the /POINTER_SIZE qualifier. The 32 bitH** interface is used with no /POINTER_SIZE qualifier is present. LaterE** in this header file we will define additional function prototypesG** which allow you to call the non-default form of the implementation.**M********************************************************************V********/ #if __INITIAL_POINTER_SIZE == 32# pragma __pointer_size 32#endif#ifdef __NAMESPACE_STDnamespace std {#endif/*** ANSI functions*/7 void * calloc (__size_t __nmemb, __size_t __size);% void * malloc (__size_t __size);9 void * realloc (__void_ptr64 __ptr, __size_t __size);q void * bsearch (const void *, const void *, __size_t, __size_t, int (*__compar)(const void *, const void *));] void qsort (void *, __size_t, __size_t, int (*__compar)(Wconst void *, const void *));9 double strtod (const char *__nptr, char **__endptr);F long int strtol (const char *__nptr, char **__endptr, int __base);P unsigned long int strtoul (const char *__nptr, char **__endptr, int __base);#ifdef __NAMESPACE_STD} /* namespace std */#endif/*** X/Open Extended functions*/=#if defined _XOPEN_SOURCE_EXTENDED || !defined _ANSI_C_SOURCEA char * gcvt (double __value, int __ndigit, char *__buffer);% char * mktemp (char *__tXemplate);#endif/*!** DEC C extensions (Alpha only)*//#if !defined(_ANSI_C_SOURCE) && !defined(__VAX)E __int64 strtoll(const char *__nptr, char **__endptr, int __base);E __int64 strtoq (const char *__nptr, char **__endptr, int __base);O unsigned __int64 strtoull(const char *__nptr, char **__endptr, int __base);O unsigned __int64 strtouq (const char *__nptr, char **__endptr, int __base);#endif/* ** realpath()** Not in ANSI standard.=** Optional parametersY not in X/Open or Posix specifications.*/#if __CRTL_VER >=803000007# if defined _POSIX_C_SOURCE || !defined _ANSI_C_SOURCE# if defined _POSIX_C_SOURCEi char * realpath (const char * __XOPEN_RESTRICT __file_name, char * __XOPEN_RESTRICT __resolved_name);# elsen char * realpath (const char * __XOPEN_RESTRICT __file_name, char * __XOPEN_RESTRICT __resolved_name, ...);# endif # if __INITIAL_POINTER_SIZE# pragma __pointer_size 32q char * _realpath32 (const chZar * __XOPEN_RESTRICT __file_name, char * __XOPEN_RESTRICT __resolved_name, ...);# pragma __pointer_size 64q char * _realpath64 (const char * __XOPEN_RESTRICT __file_name, char * __XOPEN_RESTRICT __resolved_name, ...);# endif /* /POINTER_SIZE */# endif /* realpath() */&#endif /* __CRTL_VER >=80300000 */M/******************************************************************************I** In addition to the function prototypes above, two additional functionG** [ prototypes are defined. These prototypes are prefixed with "_" andI** have a suffix of either "32" or "64" depending on whether you want toB** use the 32 bit pointer form or the 64 bit pointer form. TheseG** functions can be used if you have used the /POINTER_SIZE qualifier,I** and you need to explitly call either the 32 or 64 bit pointer form of** the function.**M****************************************************************************/5#if __INITIAL_POINTER_SIZE && !def\ined _ANSI_C_SOURCEM /************************************************************************ ** ** 32 Bit Interfaces **M ************************************************************************/# pragma __pointer_size 32 /* ** ANSI functions */+ void * _calloc32 (__size_t, __size_t);! void * _malloc32 (__size_t);) void * _realloc32 (void *, __size_t);t void * _bsearch32 (const void *, const void *, __size_t, __size_t, int (]*__compar)(const void *, const void *));` void _qsort32 (void *, __size_t, __size_t, int (*__compar)(const void *, const void *));. double _strtod32 (const char *, char **);4 long int _strtol32 (const char *, char **, int);> unsigned long int _strtoul32 (const char *, char **, int); /*! ** X/Open Extended functions */D char * _gcvt32 (double __value, int __ndigit, char *__buffer); char * _mktemp32 (char *); /*% ** DEC C extensions (Alph^a only) */4 __int64 _strtoll32 (const char *, char **, int);4 __int64 _strtoq32 (const char *, char **, int);> unsigned __int64 _strtoull32 (const char *, char **, int);> unsigned __int64 _strtouq32 (const char *, char **, int); #if __INITIAL_POINTER_SIZE == 32#pragma __pointer_size 64#endifM /************************************************************************ ** ** 64 Bit Interfaces **M **********************************************_**************************/# pragma __pointer_size 64 /* ** ANSI functions */+ void * _calloc64 (__size_t, __size_t);! void * _malloc64 (__size_t);) void * _realloc64 (void *, __size_t);t void * _bsearch64 (const void *, const void *, __size_t, __size_t, int (*__compar)(const void *, const void *));` void _qsort64 (void *, __size_t, __size_t, int (*__compar)(const void *, const void *));. double _strtod64 (const char *, char **);4 long i`nt _strtol64 (const char *, char **, int);> unsigned long int _strtoul64 (const char *, char **, int); /*! ** X/Open Extended functions */D char * _gcvt64 (double __value, int __ndigit, char *__buffer); char * _mktemp64 (char *); /*% ** DEC C extensions (Alpha only) */4 __int64 _strtoll64 (const char *, char **, int);4 __int64 _strtoq64 (const char *, char **, int);> unsigned __int64 _strtoull64 (const char *, char **, int);> unsiagned __int64 _strtouq64 (const char *, char **, int);#endif/*** DEC C Performance**F** Certain DEC C functions are available as compiler builtins. UsingD** the builtins offer performance improvements and are enabled here0** for all programs including this header file.*/&#if !defined(__VAX) && defined(__DECC) int __ABS (int __j);# long int __LABS (long int __j);# define abs(__x) __ABS(__x) # define labs(__x) __LABS(__x)#endif/*%** Restore the userbs pointer context*/#if __INITIAL_POINTER_SIZE## pragma __pointer_size __restore#endif#ifdef __cplusplus }#endif$#pragma __member_alignment __restore#pragma __standard#endif /* __STDLIB_PROCESSED */>#if defined(__NAMESPACE_STD) && !defined(__NAMESPACE_STD_ONLY)# ifndef __USING_STDLIB_NAMES # define __USING_STDLIB_NAMES using std::abort; using std::abs; using std::atexit; using std::atof; using std::atoi; using std::atol;c using std::bsearch; using std::calloc; using std::div; using std::div_t; using std::exit; using std::free; using std::getenv; using std::labs; using std::ldiv; using std::ldiv_t; using std::malloc; using std::mblen; using std::mbstowcs; using std::mbtowc; using std::qsort; using std::rand; using std::realloc; using std::size_t; using std::srand; using std::strtod;  using std::strtol; using std::strtoul; using std::system; using std::wcstombs; using std::wctomb;# endif#endif7#if defined(__PURE_CNAME) || defined(__CNAME_OVERLOADS)# include #endif#undef __NAMESPACE_STD_ONLY#pragma __standard#endif /* __CSTDLIB_LOADED */ww!llx7Ԧ CBLDR CSTDLIB.!"h^y7Ԧ CBLDR CSTRING.z7Ԧ CBLDR CTIME. z7Ԧ CBLDR CWCHAR.!OJ{7Ԧ CBLDR CWCTYPE.f-C]y7ԦM/**************************************************************************** *E * This cname header was auto-generated from its C89 counterpart *N ****************************************************************************/#ifndef __CSTRING_LOADED#define __CSTRING_LOADED#pragma __nostandard#ifdef __PURE_CNAME# define __NAMESPACE_STD_ONLY#endif#ifndef __STRING_PROCESSED#define __STRING_PROCESSEDM/******************************************* g*********************************** ** - String Handling**M*****************************************************************************,** Header introduced by the ANSI C StandardM*****************************************************************************I** I** Copyright 2006 Hewlett-Packard Development Company, L.P. I** h I** Confidential computer software. Valid license from HP and/or I** its subsidiaries required for possession, use, or copying. I** I** Consistent with FAR 12.211 and 12.212, Commercial Computer Software, I** Computer Software Documentation, and Technical Data for Commercial I** Items are licensed to the U.S. Government under vendor's standard I** commercial license. i I** I** Neither HP nor any of its subsidiaries shall be liable for technical I** or editorial errors or omissions contained herein. The information I** in this document is provided "as is" without warranty of any kind and I** is subject to change without notice. The warranties for HP products I** are set forth in the express limited warranty statements accompanying I** such products. j Nothing herein should be construed as constituting an I** additional warranty. I** M******************************************************************************/#pragma __nostandard#include #ifdef __cplusplus extern "C" {#endif#if __INITIAL_POINTER_SIZE # pragma __pointer_size __save# pragma __pointer_size 32#endif#ifdef _k_NAMESPACE_STDnamespace std {#endif/*N** Create 'public' typedefs, structure definitions, and definitions which areM** in this header file which are either not sensitive to pointer size or are"** required to be short pointers.*/#ifndef __SIZE_T# define __SIZE_T 1 typedef __size_t size_t;#endif#ifdef __NAMESPACE_STD} /* namespace std */#endif #ifndef NULL# define NULL __NULL#endif/*L** At this point in the processing, we are done defining those lthings whichJ** must always be short pointers. If the user has used the /pointer_sizeG** qualifier, we will allow long pointers to be used in function callsE** regardless of whether they have specified short or long pointers.*/#if __INITIAL_POINTER_SIZE# pragma __pointer_size 64#endif/*O** The following functions have interfaces of XXX, _XXX32, and _XXX64 due onlyM** to the fact that the return argument is a pointer that is relative to one** of the arguments.*/ #imf __INITIAL_POINTER_SIZE == 32#pragma __pointer_size 32#endif#ifdef __NAMESPACE_STDnamespace std {#endif7void *memchr (const void *__s, int __c, __size_t __n);Bvoid *memcpy (void *__s1, __const_void_ptr64 __s2, __size_t __n);Bvoid *memmove (void *__s1, __const_void_ptr64 __s2, __size_t __n);1void *memset (void *__s, int __c, __size_t __n);4char *strcat (char *__s1, __const_char_ptr64 __s2);)char *strchr (const char *__s, int __c);4char *strcpy (char *__s1, __const_char_nptr64 __s2);Bchar *strncat (char *__s1, __const_char_ptr64 __s2, __size_t __n);Bchar *strncpy (char *__s1, __const_char_ptr64 __s2, __size_t __n);:char *strpbrk (const char *__s1, __const_char_ptr64 __s2);)char *strrchr (const char *__s, int __c);:char *strstr (const char *__s1, __const_char_ptr64 __s2);4char *strtok (char *__s1, __const_char_ptr64 __s2);#ifdef __NAMESPACE_STD} /* namespace std */#endif #if __INITIAL_POINTER_SIZE == 32#pragma __pointer_size 64#endifO#if __ oINITIAL_POINTER_SIZE && !defined _ANSI_C_SOURCE && __CRTL_VER >= 70000000# pragma __pointer_size 32> void *_memchr32 (const void *__s, int __c, __size_t __n);I void *_memcpy32 (void *__s1, __const_void_ptr64 __s2, __size_t __n);I void *_memmove32 (void *__s1, __const_void_ptr64 __s2, __size_t __n);8 void *_memset32 (void *__s, int __c, __size_t __n);; char *_strcat32 (char *__s1, __const_char_ptr64 __s2);0 char *_strchr32 (const char *__s, int __c);; char *_str pcpy32 (char *__s1, __const_char_ptr64 __s2);I char *_strncat32 (char *__s1, __const_char_ptr64 __s2, __size_t __n);I char *_strncpy32 (char *__s1, __const_char_ptr64 __s2, __size_t __n);A char *_strpbrk32 (const char *__s1, __const_char_ptr64 __s2);0 char *_strrchr32 (const char *__s, int __c);A char *_strstr32 (const char *__s1, __const_char_ptr64 __s2);; char *_strtok32 (char *__s1, __const_char_ptr64 __s2);# pragma __pointer_size 64> void *_memchr64 (cons qt void *__s, int __c, __size_t __n);B void *_memcpy64 (void *__s1, const void *__s2, __size_t __n);B void *_memmove64 (void *__s1, const void *__s2, __size_t __n);8 void *_memset64 (void *__s, int __c, __size_t __n);4 char *_strcat64 (char *__s1, const char *__s2);0 char *_strchr64 (const char *__s, int __c);4 char *_strcpy64 (char *__s1, const char *__s2);B char *_strncat64 (char *__s1, const char *__s2, __size_t __n);B char *_strncpy64 (char *__s1, const char *__rs2, __size_t __n);: char *_strpbrk64 (const char *__s1, const char *__s2);0 char *_strrchr64 (const char *__s, int __c);: char *_strstr64 (const char *__s1, const char *__s2);4 char *_strtok64 (char *__s1, const char *__s2);#endif#ifdef __NAMESPACE_STDnamespace std {#endif/*J** The following functions have only a single interface regardless of theI** pointer size in effect. The parameters can accept both 32 bit and 64** bit addresses.*/Bint memcmp (cosnst void *__s1, const void *__s2, __size_t __n);4int strcmp (const char *__s1, const char *__s2);4int strcoll (const char *__s1, const char *__s2);Bint strncmp (const char *__s1, const char *__s2, __size_t __n);6__size_t strcspn (const char *__s1, const char *__s2);#__size_t strlen (const char *__s);6__size_t strspn (const char *__s1, const char *__s2);>__size_t strxfrm (char *__s1, const char *__s2, __size_t __n);#ifdef __NAMESPACE_STD} /* namespace std */#endif5#if !dtefined _ANSI_C_SOURCE && __CRTL_VER >= 602000001__size_t strnlen (const char *__s, __size_t __n);#endif/*H** The following function has a different prototype based on whether or=** not we are compiling in strict ANSI C compatibility mode.*/#ifdef __NAMESPACE_STDnamespace std {#endif#if defined _ANSI_C_SOURCE( __char_ptr32 strerror(int __errnum);#else- __char_ptr32 strerror(int __errnum, ...);#endif#ifdef __NAMESPACE_STD} /* namespace std */#endifu/* ** X/Open extensions*/ 4#if defined _XOPEN_SOURCE || !defined _ANSI_C_SOURCE## if __INITIAL_POINTER_SIZE == 32# pragma __pointer_size 32 # endif# if __CRTL_VER >= 70000000= void *memccpy(void *, __const_void_ptr64, int, __size_t); # endif#endif/* ** X/Open extended*/ =#if defined _XOPEN_SOURCE_EXTENDED || !defined _ANSI_C_SOURCE## if __INITIAL_POINTER_SIZE == 32# pragma __pointer_size 32 # endif# if __CRTL_VER >= 70000000v% char *strdup(__const_char_ptr64); # endif# if __CRTL_VER >= 70301000F char *strtok_r(char *__s, __const_char_ptr64 __sep, char **lasts); # endif#endif/* G** BSD 4.4 extensions. strsep is specified by BSD 4.4 but not X/OpenA** There is not currently a feature test macro defined for BSD44*/ 5#if !defined _ANSI_C_SOURCE && __CRTL_VER >= 70000000## if __INITIAL_POINTER_SIZE == 32# pragma __pointer_size 32 # endif. char *strsep(char **, __wconst_char_ptr64);# if __INITIAL_POINTER_SIZE # pragma __pointer_size 32. char *_strsep32(char **, __const_char_ptr64); # pragma __pointer_size 64( char *_strsep64(char **, const char *);# endif#endif/*** DEC C ExtensionsF** X/Open extended specifies that bcmp, bcopy, bzero, ffs, strcasecmp7** strncasecmp, index and rindex appear in .L** X/Open extended specifies that basename and dirname appear in */5#if !defined _ANSI_C_SOURCE x&& __CRTL_VER >= 70000000## if __INITIAL_POINTER_SIZE == 32# pragma __pointer_size 64 # endifD int bcmp (const void * __s1, const void * __s2, __size_t __n);@ void (bcopy) (const void * __s1, void * __s2, __size_t __n);- void (bzero) (void * __s1, __size_t __n); int ffs (int);0 int strcasecmp(const char *, const char *);; int strncasecmp(const char *, const char *, __size_t);## if __INITIAL_POINTER_SIZE == 32# pragma __pointer_size 32 # yendif# char *index(const char *, int);$ char *rindex(const char *, int); char *basename(char *); char *dirname(char *);# if __INITIAL_POINTER_SIZE # pragma __pointer_size 32, char *_strdup32(__const_char_ptr64);= void *_memccpy32(void *, __const_void_ptr64, int, __size_t); char *_basename32(char *); char *_dirname32(char *);# char *_index32(const char *, int);$ char *_rindex32(const char *, int);# if __CRTL_VER >= 70301000G char *_strtok_rz32 (char *__s, __const_char_ptr64 __sep, char **lasts);# endif # pragma __pointer_size 64& char *_strdup64(const char *);7 void *_memccpy64(void *, const void *, int, __size_t); char *_basename64(char *); char *_dirname64(char *);# char *_index64(const char *, int);$ char *_rindex64(const char *, int);# if __CRTL_VER >= 70301000G char *_strtok_r64 (char *__s, __const_char_ptr64 __sep, char **lasts);# endif # endif#endif/* ** DEC C Performance (B{uiltins)**F** Certain DEC C functions are available as compiler builtins. UsingD** the builtins offer performance improvements and are enabled here0** for all programs including this header file.**K** In a 64 bit OpenVMS environment, the builtins accept and return 64 bit ,** pointers. We will explicitly use casts */#if !defined(__VAX) #if __INITIAL_POINTER_SIZE == 32# pragma __pointer_size 32#endif# if __DECCXX_VER >= 60590046J void * __MEMCPY (void *__s1, __const|_void_ptr64 __s2, __size_t __n);I void * __MEMMOVE (void *__s1, __const_void_ptr64 __s2, __size_t __n);#elseC void * __MEMCPY (void *__s1, const void *__s2, __size_t __n);B void * __MEMMOVE (void *__s1, const void *__s2, __size_t __n);#endif8 void * __MEMSET (void *__s, int __c, __size_t __n);# if (__DECC_VER > 50600000)) __size_t __STRLEN (const char *__s);4 char * __STRCPY (char *__s1, const char *__s2); # endif#ifndef __NAMESPACE_STD8# define mem }cpy(__x, __y, __z) __MEMCPY(__x, __y, __z):# define memmove(__x, __y, __z) __MEMMOVE(__x, __y, __z)8# define memset(__x, __y, __z) __MEMSET(__x, __y, __z)#endif# if (__DECC_VER > 50600000)$# define strlen(__x) __STRLEN(__x).# define strcpy(__x, __y) __STRCPY(__x, __y) # endifY# if !defined _ANSI_C_SOURCE && __CRTL_VER >= 70000000 /* BSD byte string extensions */7# define bcopy(__x, __y, __z) __MEMMOVE(__y, __x, __z) /# define bzero(__x, __y) __MEMSET(__x, 0, __y) # en~dif #if __INITIAL_POINTER_SIZE == 32# pragma __pointer_size 64#endif#endif/*$** DEC C RTL Performance (Linkages)**B** Certain DEC C RTL functions are defined with linkages declaredE** which gives the compiler more information as to register usage in** the implementation.*/'#if defined(__ALPHA) && defined(__DECC)%# pragma __linkage __str_link1 = (\L __notused(__r1,__r2,__r3,__r4,__r5,__r6,__r7,__r8,__r9,__r10,__r11,\O __r12,__r13,__r14,__r1 5,__r17,__r18,__r19,__r20,__r21,__r22,\+ __r23,__r24,__r25,__r29,\K __f0,__f1,__f2,__f3,__f4,__f5,__f6,__f7,__f8,__f9,__f10,\O __f11,__f12,__f13,__f14,__f15,__f16,__f17,__f18,__f19,__f20,\P __f21,__f22,__f23,__f24,__f25,__f26,__f27,__f28,__f29,__f30),\ __notneeded(__ai))%# pragma __linkage __str_link2 = (\L __notused(__r1,__r2,__r3,__r4,__r5,__r6,__r7,__r8,__r9,__r10,__r11,\I __r12,__r13,__r14,__r15,__r22,__r23,__r24,__r25,__r29,\K __f0,__f1,__f2,__f3,__f4,__f5,__f6,__f7,__f8,__f9,__f10,\O __f11,__f12,__f13,__f14,__f15,__f16,__f17,__f18,__f19,__f20,\P __f21,__f22,__f23,__f24,__f25,__f26,__f27,__f28,__f29,__f30),\ __notneeded(__ai))%# pragma __linkage __str_link3 = (\M __notused(__r2,__r3,__r4,__r5,__r6,__r7,__r8,__r9,__r10,__r11,__r12,\O __r13,__r14,__r15,__r18,__r19,__r20,__r21,__r22,__r2 3,__r24,\ __r25,__r29,\K __f0,__f1,__f2,__f3,__f4,__f5,__f6,__f7,__f8,__f9,__f10,\O __f11,__f12,__f13,__f14,__f15,__f16,__f17,__f18,__f19,__f20,\P __f21,__f22,__f23,__f24,__f25,__f26,__f27,__f28,__f29,__f30),\ __notneeded(__ai))# if (__DECC_VER > 50600000)0# pragma __use_linkage __str_link2 (strcmp)1# pragma __use_linkage __str_link3 (strnlen)# else0# pragma __use_linkage __str_link1 (strlen)8# pragma __use_linkage __str_link2 (strcpy, strcmp)1# pragma __use_linkage __str_link3 (strnlen) # endif(#elif defined(__ia64) && defined(__DECC)/*I** Should define "similar" linkages for ia64, but they cannot be exactly<** the same because the register conventions are different.** ***TBD for ia64****/#endif/*%** Restore the users pointer context*/#if __INITIAL_POINTER_SIZE## pragma __pointer_size __restore#endif#ifdef __cplusplus }#endif#pragma __standard#endif /* __STRING_PROCESSED */>#if defined(__NAMESPACE_STD) && !defined(__NAMESPACE_STD_ONLY)# ifndef __USING_STRING_NAMES # define __USING_STRING_NAMES using std::memchr; using std::memcmp; using std::memcpy; using std::memmove; using std::memset; using std::size_t; using std::strcat; using std::strchr; using std::strcmp; using std::strcoll; using std::strcpy; using std::strcspn; using std::strerror; using std::strlen; using std::strncat; using std::strncmp; using std::strncpy; using std::strpbrk; using std::strrchr; using std::strspn; using std::strstr; using std::strtok; using std::strxfrm;# endif#endif7#if defined(__PURE_CNAME) || defined(__CNAME_OVERLOADS)# include #endif#undef __NAMESPACE_STD_ONLY#pragma __standard#endif /* __CSTRING_LOADED */wwEFz7ԦM/**************************************************************************** *E * This cname header was auto-generated from its C89 counterpart *N ****************************************************************************/#ifndef __CTIME_LOADED#define __CTIME_LOADED#pragma __nostandard#ifdef __PURE_CNAME# define __NAMESPACE_STD_ONLY#endif#ifndef __TIME_PROCESSED#define __TIME_PROCESSEDM/*************************************************** ***************************** - Date and Time**M*******************************************************************************,** Header introduced by the ANSI C Standard**K** Definitions in this header file may not be available on all versions ofK** OpenVMS. See the DEC C Runtime Library reference manual for specifics.**M*****************************************************************************I**  I** Copyright 2006 Hewlett-Packard Development Company, L.P. I** I** Confidential computer software. Valid license from HP and/or I** its subsidiaries required for possession, use, or copying. I** I** Consistent with FAR 12.211 and 12.212, Commercial Computer Software, I** Computer Software Documentation, and Technical Data for Commercial I** Items are licensed to the U.S. Government under vendor's standard I** commercial license. I** I** Neither HP nor any of its subsidiaries shall be liable for technical I** or editorial errors or omissions contained herein. The information I** in this document is provided "as is" without warranty of any kind and I** is subject to change without notice. The warranties for HP products I** are set forth in the express limited warranty statements accompanying I** such products. Nothing herein should be construed as constituting an I** additional warranty. I** M******************************************************************************/#pragma __nostandard#include #ifdef __cplusplus extern "C" {#endif/*K** If the user has used /pointer_size=short or /pointer_size=long, we will+** begin in a 32-bit pointer size context.*/#if __INITIAL_POINTER_SIZE # pragma __pointer_size __save# pragma __pointer_size 32#endif/* ** Member align structures*/!#pragma __member_alignment __save#pragma __member_alignment/*** Disable messages*/#pragma __message __save-#pragma __message __disable (__MISALGNDSTRCT)+#pragma __message __disable (__MISALGNDMEM)/*I** Create 'private' typedefs that are sensitive to pointer size and must** use 32 bit pointers.*//*(** ANSI Standard Definitions & Typedefs*/#define CLOCKS_PER_SEC 100 #ifndef NULL# define NULL __NULL#endif#ifdef __NAMESPACE_STDnamespace std {#endif#ifndef __SIZE_T# define __SIZE_T 1 typedef __size_t size_t;#endif#ifndef __TIME_T# define __TIME_T typedef __time_t time_t;#endif#ifndef __CLOCK_T # define __CLOCK_T 1 typedef long int clock_t;#endif/*** tm data structure**B** Note conditions for BSD extensions, introduced in VMS V7.0, and:** not wanted for some standards or legacy compilations. F** These extensions make tm "long". Not having them makes tm "short".8** - C++ Standard Library requires longer tm structure.F** After C++ V6.5-042, use filler names. Either requires __utctz_.F** - Future VMS releases will get a longer tm s tructure possibly withF** changed/filler names, to make all objects of tm the same length,<** which may force recompilation of all modules using tm.)** - Macro _TM_SHORT will force short tm'** - Macro _TM_LONG will force long tm**?** This decides the time format for functions, 3 possibilities:.** - localtime (before VMS V7.0, no prefixes)** - utc time, one of:3** o __UTCTZ_ prefixes, using BSD tm extensions4** o __UTC_ prfexes, not using BSD tm extensions*/#undef __TM_USE_UTCTZ_TIME#undef __TM_USE_UTC_TIME#undef __TM_DEF_BSD_EXTENSIONS #undef __TM_DEF_BSD_FILLER_NAMES#undef __TM_CXX_NEED_BSD_NAMES!#undef __TM_CXX_NEED_FILLER_NAMES#if __CRTL_VER >= 70000000 2# if defined __DECCXX && !defined _VMS_V6_SOURCE# if __DECCXX_VER > 60590042'# define __TM_CXX_NEED_FILLER_NAMES# else$# define __TM_CXX_NEED_BSD_NAMES# endif # endif3 /* UTC time functions available in CRTL */ H# if (!defined _ANSI_C_SOURCE || defined __TM_CXX_NEED_BSD_NAMES) && \5 !defined _DECC_V4_SOURCE && !defined _TM_SHORT /* BSD member names visible */ # define __TM_DEF_BSD_EXTENSIONSE# if !defined _VMS_V6_SOURCE || defined __TM_CXX_NEED_BSD_NAMES* /* Use __UTCTZ_ prefixed functions */ # define __TM_USE_UTCTZ_TIME # endif # elif !defined _VMS_V6_SOURCE$ /* Use __UTC_ prefixed functions */# define __TM_USE_UTC_TIME # endif#endif /* CRTL V7.0 */:#if !defined __TM_DEF_BSD_EXTENSIONS && !defined _TM_SHORT6# if __CRTL_VER >= 80300000 || defined _TM_LONG || \) defined __TM_CXX_NEED_FILLER_NAMES4 /* Longer tm, but non-polluting BSD member names */"# define __TM_DEF_BSD_FILLER_NAMES# if defined __DECCXX # define __TM_USE_UTCTZ_TIME# undef __TM_USE_UTC_TIME# endif # endif#endif)#if defined _TM_SHORT && defined _TM_LONGA# error "Both _TM_SHORT and _TM_LONG defined; only one allowed"#endif struct tm {; int tm_sec; /* seconds after the minute [0, 61 ] */; int tm_min; /* minutes after the hour [0, 59] */; int tm_hour; /* hours since midnight [0, 23] */; int tm_mday; /* day of the month [1, 31] */; int tm_mon; /* months since January [0, 11] */; int tm_year; /* years since 1900 */; int tm_wday; /* days since Sunday [0, 6] */; int tm_yday; /* days since January 1 [0, 365] */; int tm_isdst; /* Daylight Saving Time flag */##if defined __TM_DEF_BSD_EXTENSIONS! /* BSD tm member extensions */; long tm_gmtoff; /* offset from UTC in seconds */; char *tm_zone; /* timezone abbreviation */'#elif defined __TM_DEF_BSD_FILLER_NAMES; /* BSD tm member extensions, non-polluting namespace */; long __tm_gmtoff; /* offset from UTC in seconds */; char *__tm_zone; /* timezone abbreviation */#endif }; /* tm */#ifdef __NAMESPACE_STD} /* namespace std */#endif#ifdef __NAMESPACE_STD+typedef struct std::tm * __struct_tm_ptr32;#else&typedef struct tm * __struct_tm_ptr32;#endif/*J** clock_t datatype is used in this header file in declaration of functionI** times() which is not in the ANSI C standard, and, consequently, is notJ** inserted into the namespace std. Make clock_t datatype available in theA** global namespace when compiling with C++ in nopure_cname mode.*/>#if defined(__NAMESPACE_STD) && !defined(__NAMESPACE_STD_ONLY) using std::clock_t;#endif/*/** ISO POSIX-1 Standard Definitions & Typedefs*/6#if defined _POSIX_C_SOURCE || !defined _ANSI_C_SOURCE /*A ** Number of clock ticks per second returned by the times ()# ** function. (To be Withdrawn) */# define CLK_TCK 100 /* 3 ** tzname is the name of the current timezone,3 ** it is not visible if compiling for a local & ** time based compatibility mode. */ # if __CRTL_VER >= 70000000"# if !defined _VMS_V6_SOURCE(# pragma __extern_model __save1# pragma __extern_model __strict_refdef# extern char *tzname[2];+# pragma __extern_model __restore # endif # endif#endif/* .** X/Open extension definitions and typedefs,0** these variables are not visible if compiling-** in a local time based compatibility mode.*/ 4#if defined _XOPEN_SOURCE || !defined _ANSI_C_SOURCE# if __CRTL_VER >= 70000000"# if !defined _VMS_V6_SOURCE(# pragma __extern_model __save1# pragma __extern_model __strict_refdef! extern int daylight; % extern long int timezone;+# pragma __extern_model __restore # endif # endif#endif/* ,** DEC C extension definitions and typedefs*/ #ifndef _ANSI_C_SOURCE /* = ** struct timeb is defined by XPG4 V2 to be in  */ # ifndef __TIMEB_STR_LOADED## define __TIMEB_STR_LOADED 1 struct timeb { __time_t time;$ unsigned short millitm; short timezone; short dstflag; }; # endif# ifndef __TIMEB_T# define __TIMEB_T$ typedef struct timeb timeb_t; # endif9# if __CRTL_VER >= 70000000 && !defined _DECC_V4_SOURCE# ifndef __TMS# define __TMS struct tms {5 clock_t tms_utime; /* user CPU time */7 clock_t tms_stime; /* system CPU time */N clock_t tms_cutime; /* user CPU of terminated child processes */P clock_t tms_cstime; /* system CPU of terminated child processes */ }; # endif # endif# ifndef __TBUFFER_T# define __TBUFFER_T 1 typedef struct tbuffer { int proc_user_time; int proc_system_time; int child_user_time;! int child_system_time; } tbuffer_t; # endif#endif/*M** We are done defining things which must always be 32 bit pointers. If theL** user has used /pointer_size=32 or /pointer_size=64, we will allow 64 bit*** pointers to be used in function calls.*/#if __INITIAL_POINTER_SIZE# pragma __pointer_size 64#endif/*I** Create 'private' typedefs that are sensitive to pointer size and must@** use long pointers. Protect identically in all header files.*/#ifdef __NAMESPACE_STD+typedef struct std::tm * __struct_tm_ptr64;#else&typedef struct tm * __struct_tm_ptr64;#endif#ifdef __NAMESPACE_STDnamespace std {#endif/*3** ANSI Function prototypes -- full 64 bit support*/  clock_t clock (void);; double difftime (__time_t __time1, __time_t __time0);; __char_ptr32 asctime (const struct tm *__timeptr);#ifdef __NAMESPACE_STD} /* namespace std */#endif6#if defined _POSIX_C_SOURCE || !defined _ANSI_C_SOURCE#ifdef __NAMESPACE_STDK __char_ptr32 asctime_r(const struct std::tm *__tm, __char_ptr32 __buf);#elseF __char_ptr32 asctime_r(const struct tm *__tm, __char_ptr32 __buf);#endif#endif/*B** Beginning in OpenVMS Version 7.0 mktime, time, ctime, strftime=** have two implementations. One implementation is providedA** for compatibility and deals with time in terms of local time,6** the other __utc_* deals with time in terms of UTC.*/#if __CRTL_VER >= 70000000# if !defined _VMS_V6_SOURCE$# ifdef __CAN_USE_EXTERN_PREFIX(# pragma __extern_prefix __save*# pragma __extern_prefix "__utc_" # else4# define mktime(__p1) __utc_mktime(__p1)2# define time(__p1) __utc_time(__p1)3# define ctime(__p1) __utc_ctime(__p1)T# define strftime(__p1,__p2,__p3,__p4) __utc_strftime(__p1,__p2,__p3,__p4) # endif # endif##endif /* __CRTL_VER >= 70000000 */#ifdef __NAMESPACE_STDnamespace std {#endif/ __time_t mktime (struct tm *__timeptr);, __time_t time (__time_t *__timer);1 __char_ptr32 ctime (const __time_t *__timer);L __size_t strftime (char *__s, __size_t __maxsize, const char *__format, 1 const struct tm *__timeptr);#ifdef __NAMESPACE_STD} /* namespace std */#endif/*2** Disable extern_prefix if we enabled it earlier*/#if __CRTL_VER >= 70000000# if !defined _VMS_V6_SOURCE$# ifdef __CAN_USE_EXTERN_PREFIX+# pragma __extern_prefix __restore # endif # endif#endif/*F** Beginning in OpenVMS Version 7.2, we have added and implementationD** of the ctime_r function. There are both local time and utc time** implementations.*/#if __CRTL_VER >= 70000000 && \8 (defined _POSIX_C_SOURCE || !defined _ANSI_C_SOURCE)# if !defined _VMS_V6_SOURCE$# ifdef __CAN_USE_EXTERN_PREFIX(# pragma __extern_prefix __save*# pragma __extern_prefix "__utc_" # else=# define ctime_r(__p1,__p2) __utc_ctime_r(__p1,__p2) # endif # endifG __char_ptr32 ctime_r (const __time_t *__timer, __char_ptr32 __buf);# if !defined _VMS_V6_SOURCE$# ifdef __CAN_USE_EXTERN_PREFIX+# pragma __extern_prefix __restore # endif # endif1#endif /* __CRTL_VER >= 70000000 && (not ANSI) *//*D** Beginning in OpenVMS Version 7.0 gmtime and localtime have three** implementations:/** - Older (pre-7.0) localtime implementation$** - Two UTC time implementations:6** o __utctz_* implementations provide support for the@** additional tm_gmtoff and tm_zone fields of the tm structureB** o the __utc_* implementations deal with the ANSI definition of ** the tm structure.*/#if defined __TM_USE_UTCTZ_TIME0 /* UTC time with BSD tm member extensions */!# ifdef __CAN_USE_EXTERN_PREFIX(# pragma __extern_prefix __save,# pragma __extern_prefix "__utctz_"# else6# define gmtime(__p1) __utctz_gmtime(__p1)9# define localtime(__p1) __utctz_localtime(__p1) # endif#elif defined __TM_USE_UTC_TIME3 /* UTC time without BSD tm member extensions */!# ifdef __CAN_USE_EXTERN_PREFIX(# pragma __extern_prefix __save*# pragma __extern_prefix "__utc_"# else4# define gmtime(__p1) __utc_gmtime(__p1)7# define localtime(__p1) __utc_localtime(__p1) # endif#endif#ifdef __NAMESPACE_STDnamespace std {#endif; __struct_tm_ptr32 localtime (const __time_t *__timer); 9 __struct_tm_ptr32 gmtime (const __time_t *__timer); #ifdef __NAMESPACE_STD} /* namespace std */#endif/*2** Disable extern_prefix if we enabled it earlier*/<#if defined __TM_USE_UTCTZ_TIME || defined __TM_USE_UTC_TIME!# ifdef __CAN_USE_EXTERN_PREFIX"# pragma __extern_prefix __restore # endif#endif8#if !(defined(__NAMESPACE_STD) && defined(__PURE_CNAME))/*L** Beginning in OpenVMS Version 7.2, we have added gmtime_t and localtime_tI** implementations. The same three interfaces are supported for each as** described above.*/#if __CRTL_VER >= 70000000 && \8 (defined _POSIX_C_SOURCE || !defined _ANSI_C_SOURCE)# undef __UTC_PREFIX_DEFINED"# if defined __TM_USE_UTCTZ_TIME- /* UTC time with BSD tm member extensions */# ifdef __CAN_USE_EXTERN_PREFIX # define __UTC_PREFIX_DEFINED(# pragma __extern_prefix __save,# pragma __extern_prefix "__utctz_"# elseD# define gmtime_r(__p1,__p2) __utctz_gmtime_r(__p1,__p2)G# define localtime_r(__p1,__p2) __utctz_localtime_r(__p1,__p2)# endif"# elif defined __TM_USE_UTC_TIME0 /* UTC time without BSD tm member extensions */# ifdef __CAN_USE_EXTERN_PREFIX # define __UTC_PREFIX_DEFINED(# pragma __extern_prefix __save*# pragma __extern_prefix "__utc_"# elseB# define gmtime_r(__p1,__p2) __utc_gmtime_r(__p1,__p2)E# define localtime_r(__p1,__p2) __utc_localtime_r(__p1,__p2)# endif # endifV __struct_tm_ptr32 gmtime_r (const __time_t *__timer, __struct_tm_ptr32 __result); Y __struct_tm_ptr32 localtime_r (const __time_t *__timer, __struct_tm_ptr32 __result); # ifdef __UTC_PREFIX_DEFINED'# pragma __extern_prefix __restore!# undef __UTC_PREFIX_DEFINED # endif1#endif /* __CRTL_VER >= 70000000 && (not ANSI) */A#endif /* !(defined(__NAMESPACE_STD) && defined(__PURE_CNAME)) *//* :** ISO POSIX-1 Function prototypes -- full 64 bit support*/ 6#if defined _POSIX_C_SOURCE || !defined _ANSI_C_SOURCE8# if __CRTL_VER >= 70000000 && !defined _VMS_V6_SOURCE void tzset (void); # endif# endif/*O** The following functions have interfaces of XXX, _XXX32, and _XXX64 due onlyM** to the fact that the return argument is a pointer that is relative to one** of the arguments.*/ #if __INITIAL_POINTER_SIZE == 32# pragma __pointer_size 32#endif4#if defined _XOPEN_SOURCE || !defined _ANSI_C_SOURCE# if __CRTL_VER >= 60200000\ char *strptime (const char *__buf, __const_char_ptr64 __fmt, __struct_tm_ptr64 __tm); # endif#endif #if __INITIAL_POINTER_SIZE == 32# pragma __pointer_size 64#endif/* ** DEC C Extensions*/ #ifndef _ANSI_C_SOURCE /*H** Beginning in OpenVMS Version 7.0 ftime has two implementations. OneM** implementation is provided for compatibility and deals with time in termsI** of local time, the other __utc_ftime deals with time in terms of UTC.*/#if __CRTL_VER >= 70000000# if !defined _VMS_V6_SOURCE$# ifdef __CAN_USE_EXTERN_PREFIX(# pragma __extern_prefix __save*# pragma __extern_prefix "__utc_" # else1# define ftime(__p1) __utc_ftime(__p1) # endif # endif##endif /* __CRTL_VER >= 70000000 *// int ftime (struct timeb *__timeptr); /*2** Disable extern_prefix if we enabled it earlier*/#if __CRTL_VER >= 70000000# if !defined _VMS_V6_SOURCE$# ifdef __CAN_USE_EXTERN_PREFIX+# pragma __extern_prefix __restore # endif # endif#endif9# if __CRTL_VER >= 70000000 && !defined _DECC_V4_SOURCE) clock_t times(struct tms *buffer);# else> void times (tbuffer_t *__buffer); /* */ # endif# if __INITIAL_POINTER_SIZE# pragma __pointer_size 32P char * _strptime32 (const char *, __const_char_ptr64, __struct_tm_ptr64);# pragma __pointer_size 64J char * _strptime64 (const char *, const char *, __struct_tm_ptr64); # endif#endifM/******************************************************************************** - time types**G** The following is the equivalent of . It is merged into@** since DEC C on OpenVMS systems does not distinguish** the two header files.*/[#if defined _XOPEN_SOURCE_EXTENDED || (!defined _ANSI_C_SOURCE && !defined _DECC_V4_SOURCE)/*A** Values  for the which argument of getitimer() and setitimer().*/;# define ITIMER_REAL 0 /* Real time */B# define ITIMER_VIRTUAL 1 /* Per-process time */G# define ITIMER_PROF 2 /* Per-process user time */# ifndef __TIMEVAL# define __TIMEVAL 1 struct timeval {C __time_t tv_sec; /* seconds since Jan. 1, 1970 */3 long tv_usec; /* microseconds */e };  # endif struct itimerval {9 struct timeval it_interval; /* timer interval */8 struct timeval it_value; /* current value */ };  /*A ** Select () examines I/O descriptor sets which are stored asB ** bit fields in arrays of integers. The following macros are7 ** provided for manipulating such descriptor sets.  */> /* FD_SETSIZE may be defined by the user. It is nor mally > ** equal to the maximum number of descriptors supported byC ** the system. Here it is set to the minimum maximum supportedA ** by the system. In order to accomodate programs which use D ** a larger number of open files with select, increase this sizeF ** within a program by providing a larger definition of FD_SETSIZE. ** before including or  */# if !defined __FD_SET# define __FD_SET 1# ifndef FD_SETSIZE(# define FD_SETSIZE 1024# endif typedef long fd_mask;H# define NBBY 8 /* bits per byte */H# define NFDBITS (sizeof(fd_mask) * NBBY) /* bits per mask */_# define FD_SET(__n, __p) ((__p)->fds_bits[(__n)/NFDBITS] |= (1 << ((__n) % NFDBITS)))`# define FD_CLR(__n, __p) ((__p)->fds_bits[(__n)/NFDBITS] &= ~(1 << ((__n) % NFDBITS)))^# define FD_ISSET(__n, __p) ((__p)->fds_bits[(__n)/NFDBITS] & (1 << ((__n) % NFDBITS)))?# define __howmany(__x, __y) (((__x)+((__y)-1))/(__y))O typedef struct fd_set { /* descriptor set */= fd_mask fds_bits[__howmany(FD_SETSIZE, NFDBITS)]; } fd_set;# if !defined(__VAX)%# if __INITIAL_POINTER_SIZE == 32# pragma __pointer_size 32 # endif6 void *__MEMSET(void *__s, int __c, __size_t __n);<# define FD_ZERO(__p) __MEMSET((__p), 0, sizeof(*(__p)))%# if __INITIAL_POINTER_SIZE == 32# pragma __pointer_size 64 # endif# else= void _MOVC5(unsigned short __srclen, const char *__src, < char __fill, unsigned short __destlen, char *__dest, ...);H# define FD_ZERO(__p) _MOVC5(0, 0, 0, sizeof(*(__p)), (char *)(__p))# endif # endif/*M** We are done defining things which must always be 32 bit pointers. If theL** user has used /pointer_size=32 or /pointer_size=64, we will allow 64 bit*** pointers to be used in function calls.*/# if __INITIAL_POINTER_SIZE!# pragma __pointer_size 64 # endif/* B** Note that gettimeofday() is UTC based, so it is not visible if 6** compiling in a local time based compatibility mode.*/ #if __CRTL_VER >= 70000000 ; int getitimer (int __which, struct itimerval *__value);] int setitimer (int __which, const struct itimerval *__value, struct itimerval *__ovalue);# if !defined _VMS_V6_SOURCE= int gettimeofday (struct timeval *__tp, void *__tzp); # endif#endifX int select (int __nfds, fd_set *__readfds, fd_set *__writefds, fd_set *__exceptfds, + struct timeval *__timeout);#if __CRTL_VER >= 70300000 # if !defined _VMS_V6_SOURCE$# ifdef __CAN_USE_EXTERN_PREFIX(# pragma __extern_prefix __save*# pragma __extern_prefix "__utc_" # else<# define utimes(__p1,__p2) __utc_utimes(__p1,__p2) # endif # endif@int utimes(const char *__path, const struct timeval __times[2]);# if !defined _VMS_V6_SOURCE$# ifdef __CAN_USE_EXTERN_PREFIX+# pragma __extern_prefix __restore # endif # endif#endif#if __CRTL_VER >= 703200005# if (!defined __TIMESPEC && !defined _TIMESPEC_T_)# define __TIMESPEC struct timespec {2 unsigned long tv_sec; /* seconds */6 long tv_nsec; /* nanoseconds */ }; # endif# define CLOCK_REALTIME 1# ifndef __CLOCKID_T# define __CLOCKID_T% typedef unsigned int clockid_t; # endif? int clock_gettime(clockid_t clock_id, struct timespec *tp);E int clock_settime(clockid_t clock_id, const struct timespec *tp);? int clock_getres(clockid_t clock_id, struct timespec *res);A long nanosleep(struct timespec *rqtp, struct timespec *rmtp);'#endif /* if __CRTL_VER >= 70320000 */O#endif /* _XOPEN_SOURCE_EXTENDED || (! _ANSI_C_SOURCE && ! _DECC_V4_SOURCE) *//* %** Restore the users pointer context*/#if __INITIAL_POINTER_SIZE## pragma __pointer_size __restore#endif#ifdef __cplusplus }#endif#pragma __message __restore$#pragma __member_alignment __restore#pragma __standard#endif /* __TIME_PROCESSED */>#if defined(__NAMESPACE_STD) && !defined(__NAMESPACE_STD_ONLY)# ifndef __USING_TIME_NAMES# define __USING_TIME_NAMES using std::asctime; using std::clock; using std::clock_t; using std::ctime; using std::difftime; using std::gmtime; using std::localtime; using std::mktime; using std::size_t; using std::strftime; using std::time; using std::time_t; using std::tm;# endif#endif#undef __NAMESPACE_STD_ONLY#pragma __standard#endif /* __CTIME_LOADED */ww(z7ԦM/**************************************************************************** *E * This cname header was auto-generated from its C89 counterpart *N ****************************************************************************/#ifndef __CWCHAR_LOADED#define __CWCHAR_LOADED#pragma __nostandard#ifdef __PURE_CNAME# define __NAMESPACE_STD_ONLY#endif#ifndef __WCHAR_PROCESSED#define __WCHAR_PROCESSED#pragma __nostandard#include >#if __CRTL_VER >= 60200000 /* Only OpenVMS V6.2 or later */M/******************************************************************************** - Wide Character**M*****************************************************************************:** Header introduced by Amendment 1 of the ISO C StandardM*****************************************************************************I** I** Copyright 2004 Hewlett-Packard Development Company, L.P. I** I** Confidential computer software. Valid license from HP and/or I** its subsidiaries required for possession, use, or copying. I** I** Consistent with FAR 12.211 and 12.212, Commercial Computer Software, I** Computer Software Documentation, and Technical Data for Commercial  I** Items are licensed to the U.S. Government under vendor's standard I** commercial license. I** I** Neither HP nor any of its subsidiaries shall be liable for technical I** or editorial errors or omissions contained herein. The information I** in this document is provided "as is" without warranty of any kind and I** is subject to change without notice. The  warranties for HP products I** are set forth in the express limited warranty statements accompanying I** such products. Nothing herein should be construed as constituting an I** additional warranty. I** M******************************************************************************/#ifdef __cplusplus extern "C" {#endif8#if !(defined(__NAMESPACE_STD) && de!fined(__PURE_CNAME))#include #endif#if __INITIAL_POINTER_SIZE # pragma __pointer_size __save# pragma __pointer_size 32#endif/*:** Declarations required both by XPG4 and ISO C Amendment*/#ifdef __NAMESPACE_STDnamespace std {#endif#ifndef __SIZE_T# define __SIZE_T 1 typedef __size_t size_t;#endif#ifndef __WINT_T# define __WINT_T typedef __wint_t wint_t;#endif#ifdef __NAMESPACE_STD} /* namespace std */#endif#ifndef __WCHAR_T# define __WCHAR_T typedef __wchar_t wchar_t;#endif #ifndef WEOF# define WEOF ((__wint_t) -1)#endif#ifdef __NAMESPACE_STDnamespace std {#endif struct tm;#ifdef __NAMESPACE_STD} /* namespace std */#endif/*F** Declarations required only by ISO C Amendment. Conflicts arising F** by compiling for both X/OPEN and the ISO C Amendment 1 resolve in 3** favor of ISO C Amendment 1. */##if __STDC_VERSION__ == 199409 || \Q (__CRTL_VER >= 70000000 && !defined _XOPEN_SOURCE && !defined _DECC_V4_SOURCE)# ifndef WCHAR_MAX'# define WCHAR_MAX ((__wchar_t)~0) # endif# ifndef WCHAR_MIN# define WCHAR_MIN 0 # endif#ifdef __NAMESPACE_STDnamespace std {#endif# ifndef __MBSTATE_T# define __MBSTATE_T typedef struct { unsigned __f0 : 32; unsigned __f1 : 32; unsigned __f2 : 32; unsigned __f3 : 32; unsigned __f4 : 32; unsigned __f5 : 32; } mbstate_t; # endif#ifdef __NAMESPACE_STD} /* namespace std */#endif#endif/*J** Create typedefs which are guaranteed to be short pointers. These sameE** declarations may appear in other headers files and are protected.*/ #ifndef NULL# define NULL __NULL#endif /*F** When compiling with /POINTER_SIZE, change to long pointers so that?** prototypes reflect the implementation for widened pointers.*/#if __INITIAL_POINTER_SIZE# pragma __pointer_size 64#endif/*M** Create 'private' typedefs that are sensitive to pointer size and must use** long pointers.*/##if __STDC_VERSION__ == 199409 || \Q (__CRTL_VER >= 70000000 && !defined _XOPEN_SOURCE && !defined _DECC_V4_SOURCE)# ifndef __MBSTATE_PTR64 # define __MBSTATE_PTR64 1# ifdef __NAMESPACE_STD5 typedef std::mbstate_t * __mbstate_ptr64; # else0 typedef mbstate_t * __mbstate_ptr64; #  endif # endif#endif8#if !(defined(__NAMESPACE_STD) && defined(__PURE_CNAME))/*G** According to the ISO C Amendment, the wide character classificationI** functions and wide character mapping functions are defined in the newF** header, so the prototypes below are under "strict XPG4"E** condition. Prevent macro expansion of isw* prototypes in cases 5** where both and are included.*/9#if __CRTL_VER < 70000000 || defined _DECC_V4_SOURCE || \7 defined _XOPEN_SOURCE || __STDC_VERSION__ != 199409# ifndef __WCTYPE_T# define __WCTYPE_T#ifdef __NAMESPACE_STDnamespace std {#endif# typedef __wctype_t wctype_t;#ifdef __NAMESPACE_STD} /* namespace std */#ifndef __NAMESPACE_STD_ONLY using std::wctype_t;#endif#endif # endif( int (iswalnum)(__wint_t __wc);( int (iswalpha)(__wint_t __wc);( int (iswcntrl)(__wint_t __wc);( int (iswdigit)(__wint_t __wc);( int (iswgraph)(__wint_t __wc);( int (iswlower)(__wint_t __wc);( int (iswprint)(__wint_t __wc);( int (iswpunct)(__wint_t __wc);( int (iswspace)(__wint_t __wc);( int (iswupper)(__wint_t __wc);) int (iswxdigit)(__wint_t __wc);/ __wctype_t wctype(const char *__property);9 int iswctype(__wint_t __wc, __wctype_t __prop);( __wint_t towlower(__wint_t __wc);( __wint_t towupper(__wint_t __wc);$# define __ISWALPHABET (iswalpha)$# define __ISWCNTRL (iswcntrl)$# define __ISWUPPER (iswupper)$# define __ISWLOWER (iswlower)$# define __ISWDIGIT (iswdigit)$# define __ISWSPACE (iswspace)$# define __ISWPUNCT (iswpunct)%# define __ISWXDIGIT (iswxdigit)$# define __ISWPRINT (iswprint)$# define __ISWGRAPH (iswgraph)$# define __ISWALNUM (iswalnum)R# define __ISWFUNCTION(c,p) (__ctypea?__ctypet[(__wint_t)(c)]&__##p:__ISW##p(c))/# define iswcntrl(c) __ISWFUNCTION(c, CNTRL)/# define iswalnum(c) __ISWFUNCTION(c, ALNUM)2# define iswalpha(c) __ISWFUNCTION(c, ALPHABET)/# define iswdigit(c) __ISWFUNCTION(c, DIGIT)/# define iswgraph(c) __ISWFUNCTION(c, GRAPH)/# define iswlower(c) __ISWFUNCTION(c, LOWER)/# define iswprint(c) __ISWFUNCTION(c, PRINT)/# define iswpunct(c) __ISWFUNCTION(c, PUNCT)/# define iswspace(c) __ISWFUNCTION(c, SPACE)0# define iswxdigit(c) __ISWFUNCTION(c, XDIGIT)/# define iswupper(c) __ISWFUNCTION(c, UPPER)A#endif /* __CRTL_VER < 70000000 || defined _DECC_V4_SOURCE ... */A#endif /* !(defined(__NAMESPACE_STD) && defined(__PURE_CNAME)) */#ifdef __NAMESPACE_STDnamespace std {#endif/*;** Functions which support both 32 bit and 64 bit pointers*/&__wint_t fgetwc (__FILE * __stream);5__wint_t fputwc (__wchar_t __c, __FILE * __stream);:int fputws (const __wchar_t *__s, __FILE * __stream);#ifdef __NAMESPACE_STD # pragma __extern_prefix __save!# pragma __extern_prefix "CXXL$"#endif'__wint_t getwc (__FILE * __stream); #ifdef stdin__wint_t getwchar (void);#endif6__wint_t putwc (__wchar_t __c, __FILE * __stream); #ifdef stdout"__wint_t putwchar (__wchar_t __c);#endif#ifdef __NAMESPACE_STD## pragma __extern_prefix __restore#endif5__wint_t ungetwc (__wint_t __c, __FILE * __stream); Bint wcscmp (const __wchar_t *__ws1, const __wchar_t *__ws2); Aint wcscoll (const __wchar_t *__ws 1, const __wchar_t *__ws2);D__size_t wcscspn (const __wchar_t *__ws1, const __wchar_t *__ws2); +__size_t wcslen (const __wchar_t *__ws); Pint wcsncmp (const __wchar_t *__ws1, const __wchar_t *__ws2, __size_t __n); E__size_t wcsspn (const __wchar_t *__ws1, const __wchar_t *__ws2); I__size_t wcsxfrm (__wchar_t *__ws1, const __wchar_t *__ws2, __size_t n);% #ifdef __NAMESPACE_STD} /* namespace std */#endif8#if !(defined(__NAMESPACE_STD) & & defined(__PURE_CNAME))/*;** These two functions are defined by X/OPEN and not by theA** ISO C Amendment 1. Compiling for X/OPEN or on pre-OpenVMS 7.0<** systems or for compatibility with pre-DEC C V5.2 provides** these definitions. */ 9#if __CRTL_VER < 70000000 || defined _DECC_V4_SOURCE || \: defined _XOPEN_SOURCE || __STDC_VERSION__ != 199409 8int wcswidth (const __wchar_t *__pwcs, __size_t __n);!int wcwidth (__wchar_t __wc);#endifA#endif /* !(defined(__NAMESPACE_STD) && defined(__PURE_CNAME)) *//*O** The following functions have interfaces of XXX, _XXX32, and _XXX64 due onlyM** to the fact that the return argument is a pointer that is relative to one** of the arguments.*/ #if __INITIAL_POINTER_SIZE == 32#pragma __pointer_size 32#endif#ifdef __NAMESPACE_STDnamespace std {#endif@__wchar_t *fgetws (__wchar_t *__s, int __n, __FILE * __stream);A__wchar_t *wcscat (__wchar_t *__ws1, __const_wchar_ptr64 __ws2);<__wchar_t *wcschr (const __wchar_t *__ws, __wchar_t __wc); B__wchar_t *wcscpy (__wchar_t *__ws1, __const_wchar_ptr64 __ws2); P__wchar_t *wcsncat (__wchar_t *__ws1, __const_wchar_ptr64 __ws2, __size_t __n); P__wchar_t *wcsncpy (__wchar_t *__ws1, __const_wchar_ptr64 __ws2, __size_t __n); H__wchar_t *wcspbrk (const __wchar_t *__ws1, __const_wchar_ptr64 __ws2); <__wchar_t *wcsrchr (const __wchar_t *__ws, __wchar_t __wc); H__wchar_t *wcswcs (const __wchar_t *__ws1, __const_wchar_ptr64 __ws2); Adouble wcstod (const __wchar_t *__nptr, __wchar_t **__endptr);Mlong int wcstol (const __wchar_t *__nptr, __wchar_t **__endptr, int __base);Qunsigned long wcstoul(const __wchar_t *__nptr, __wchar_t **__endptr, int __base);#ifdef __NAMESPACE_STD} /* namespace std */#endif #if __INITIAL_POINTER_SIZE == 32#pragma __pointer_size 64#endif5#if __INITIAL_POINTER_SIZE && !defined _ANSI_C_SOURCE# pragma __pointer_size 327 __wchar_t *_fgetws32 (__wchar_t *, int, __FIL E *);= __wchar_t *_wcscat32 (__wchar_t *, __const_wchar_ptr64);: __wchar_t *_wcschr32 (const __wchar_t *, __wchar_t); > __wchar_t *_wcscpy32 (__wchar_t *, __const_wchar_ptr64); H __wchar_t *_wcsncat32 (__wchar_t *, __const_wchar_ptr64, __size_t); H __wchar_t *_wcsncpy32 (__wchar_t *, __const_wchar_ptr64, __size_t); D __wchar_t *_wcspbrk32 (const __wchar_t *, __const_wchar_ptr64); : __wchar_t *_wcsrchr32 (const __wchar_t *, __wchar_t); D __wchar_t *_wcswcs32 (const  __wchar_t *, __const_wchar_ptr64); : double _wcstod32 (const __wchar_t *, __wchar_t **);? long int _wcstol32 (const __wchar_t *, __wchar_t **, int);D unsigned long _wcstoul32 (const __wchar_t *, __wchar_t **, int);# pragma __pointer_size 647 __wchar_t *_fgetws64 (__wchar_t *, int, __FILE *);; __wchar_t *_wcscat64 (__wchar_t *, const __wchar_t *);: __wchar_t *_wcschr64 (const __wchar_t *, __wchar_t); < __wchar_t *_wcscpy64 (__wchar_t *, const __wchar_t *); F __wchar_t *_wcsncat64 (__wchar_t *, const __wchar_t *, __size_t); F __wchar_t *_wcsncpy64 (__wchar_t *, const __wchar_t *, __size_t); B __wchar_t *_wcspbrk64 (const __wchar_t *, const __wchar_t *); : __wchar_t *_wcsrchr64 (const __wchar_t *, __wchar_t); B __wchar_t *_wcswcs64 (const __wchar_t *, const __wchar_t *); : double _wcstod64 (const __wchar_t *, __wchar_t **);? long int _wcstol64 (const __wchar_t *, __wchar_t **, int);D unsigned long _wcstoul64 (const __ wchar_t *, __wchar_t **, int);#endif/*G** The ISO C Amendment 1 and XPG4 specification define wcsftime() and E** wcstok() slightly differently. The default or compiling for the L** ISO C Amendment 1 provide the ISO C Amendment 1 definitions. Compiling G** for X/OPEN or on pre-OpenVMS 7.0 systems or for compatibility with L** pre-DEC C Version 5.2 provides the XPG4 definitions. Conflicts arising L** by compiling for both X/OPEN and the ISO C Amendment 1 resolve in favor ** of ISO C Amendment 1.*/?#if (__CRTL_VER >= 70000000 && __STDC_VERSION__ == 199409) || \R (__CRTL_VER >= 70000000 && !defined _XOPEN_SOURCE && !defined _DECC_V4_SOURCE) /* # ** ISO C Amendment definitions */!# ifdef __CAN_USE_EXTERN_PREFIX$# pragma __extern_prefix __save'# pragma __extern_prefix "__pdam_"# else&# define wcstok __pdam_wcstok # endif## if __INITIAL_POINTER_SIZE == 32# pragma __pointer_size 32 # endif#ifdef __NAMESPACE_STDnamespace std {#endifX __wchar_t * wcstok (__wchar_t *__ws1, __const_wchar_ptr64 __ws2, __wchar_t **__ws3);#ifdef __NAMESPACE_STD} /* namespace std */#endif## if __INITIAL_POINTER_SIZE == 32# pragma __pointer_size 64 # endif!# ifdef __CAN_USE_EXTERN_PREFIX'# pragma __extern_prefix __restore # endif8# if __INITIAL_POINTER_SIZE && !defined _ANSI_C_SOURCE# pragma __pointer_size 32c __wchar_t *___pdam_wcstok32(__wchar_t *__ws1, __const_wchar_ptr64 __ws2, __wchar_t **__ws3);# pragma __pointer_size 64c __wchar_t *___pdam_wcstok64(__wchar_t *__ws1, __const_wchar_ptr64 __ws2, __wchar_t **__ws3); # endif#else  /*  ** XPG4 definitions */## if __INITIAL_POINTER_SIZE == 32# pragma __pointer_size 32 # endif#ifdef __NAMESPACE_STDnamespace std {#endifE __wchar_t * wcstok (__wchar_t *__ws1, __const_wchar_ptr64 __ws2);#ifdef __NAMESPACE_STD} /* namespace std */#endif## if __INITIAL_POINTER_SIZE == 32# pragma __pointer_size 64 # endif8# if __INITIAL_POINTER_SIZE && !defined _ANSI_C_SOURCE# pragma __pointer_size 32N __wchar_t *_wcstok32(__wchar_t *__ws1, __const_wchar_ptr64 __ws2); # pragma __pointer_size 64N __wchar_t *_wcstok64(__wchar_t *__ws1, __const_wchar_ptr64 __ws2); # endif*#endif /* wcstok() ISO/XPG4 definitions */?#if (__CRTL_VER >= 70000000 && __STDC_VERSION__ == 199409) || \R (__CRTL_VER >= 70000000 && !defined _XOPEN_SOURCE && !defined _DECC_V4_SOURCE) /* # ** ISO C Amendment definitions */# if !defined _VMS_V6_SOURCE$# ifdef __CAN_USE_EXTERN_PREFIX(# pragma __extern_prefix __save/# pragma __extern_prefix "__utc_pdam_" # elseY# define wcsftime(__p1,__p2,__p3,__p4) __utc_pdam_wcsftime(__p1,__p2,__p3,__p4) # endif# else$# ifdef __CAN_USE_EXTERN_PREFIX(# pragma __extern_prefix __save+# pragma __extern_prefix "__pdam_" # elseU# define wcsftime(__p1,__p2,__p3,__p4) __pdam_wcsftime(__p1,__p2,__p3,__p4) # endif # endif#ifdef __NAMESPACE_STDnamespace std {#endifq __size_t wcsftime (__wchar_t *__wcs, __size_t __maxsize, const __wchar_t *__fmt, const struct tm *__timptr);#ifdef __NAMESPACE_STD} /* namespace std */#endif!# ifdef __CAN_USE_EXTERN_PREFIX'# pragma __extern_prefix __restore # endif#else  /*  ** XPG4 definitions */#if __CRTL_VER >= 70000000# if !defined _VMS_V6_SOURCE$# ifdef __CAN_USE_EXTERN_PREFIX(# pragma __extern_prefix __save*# pragma __extern_prefix "__utc_" # elseT# define wcsftime(__p1,__p2,__p3,__p4) __utc_wcsftime(__p1,__p2,__p3,__p4) # endif # endif##endif /* __CRTL_VER >= 70000000 */#ifdef __NAMESPACE_STDnamespace std {#endifl __size_t wcsftime (__wchar_t *__wcs, __size_t __maxsize, const char *__fmt, const struct tm *__timptr);#ifdef __NAMESPACE_STD} /* namespace std */#endif#if __CRTL_VER >= 70000000# if !defined _VMS_V6_SOURCE$# ifdef __CAN_USE_EXTERN_PREFIX+# pragma __extern_prefix __restore # endif # endif#endif,#endif /* wcsftime() ISO/XPG4 definitions *//*J** Throughout this header file, for a C++ compilation with __NAMESPACE_STDM** enabled, functions from ANSI C standard that are defined as macros in thisB** header file, are defined as inline functions instead of macros.**J** This is to comply with clause 17.4.1.2 Headers [lib.headers] of the C++&** standard which says, in particular:J-6- Names that are defined as functions in C shall be defined as functions" in the C++ Standard Library.*)L*) This disallows the practice, allowed in C, of providing a "masking macro"L in addition to the function prototype. The only way to achieve equivalentJ "inline" behavior in C+!+ is to provide a definition as an extern inline function.*/#ifndef __NAMESPACE_STD/*** Macro definitions*/#define getwc(fp) fgetwc(fp)"#define getwchar() fgetwc(stdin)!#define putwc(c,fp) fputwc(c,fp)%#define putwchar(c) fputwc(c,stdout)#else/*** Inline functions*/namespace std {#if __INITIAL_POINTER_SIZE# pragma __pointer_size save# pragma __pointer_size 64#endif!inline wint_t getwc(__FILE* fp) { return fgetwc(fp);} #ifdef stdininline wint_t getwchar() { return fgetwc(stdin);}#else__wint_t getwchar (void);#endif,inline wint_t putwc(wchar_t c, __FILE* fp) { return fputwc(c,fp);} #ifdef stdout#inline wint_t putwchar(wchar_t c) { return fputwc(c,stdout);}#else"__wint_t putwchar (__wchar_t __c);#endif#if __INITIAL_POINTER_SIZE!# pragma __pointer_size restore#endif} /* namespace std */#endif /* __NAMESPACE_STD *//*G** The following function prototypes are new with the ISO C Amendment.M** Conflicts arising by compiling for both X/OPEN and the ISO C Amendment 1 >** resolve in favor of ISO C Amendment 1. */#if __CRTL_VER >= 70000000&# if __STDC_VERSION__ == 199409 || \; (!defined _XOPEN_SOURCE && !defined _DECC_V4_SOURCE)#ifdef __NAMESPACE_STDnamespace std {#endif4 int fwide (__FILE * __stream, int mode);J int fwprintf (__FILE * __stream, const __wchar_t *__format, ...);J  int fwscanf (__FILE * __stream, const __wchar_t *__format, ...);Q int swprintf (__wchar_t *s, __size_t n, const __wchar_t *__format, ...);M int swscanf (const __wchar_t *__s, const __wchar_t *__format, ...);V int vfwprintf (__FILE * __stream, const __wchar_t *__format, __va_list __arg);C int vwprintf (const __wchar_t *__format, __va_list __arg);] int vswprintf (__wchar_t *s, __size_t n, const __wchar_t *__format, __va_list __arg);7 int wprint f (const __wchar_t *__format, ...);7 int wscanf (const __wchar_t *__format, ...);# if __CRTL_VER >= 70301000Y int vfwscanf (__FILE * __stream, const __wchar_t *__format, __va_list __arg);\ int vswscanf (const __wchar_t *__s, const __wchar_t *__format, __va_list __arg);F int vwscanf (const __wchar_t *__format, __va_list __arg);# endif# __wint_t btowc (int __c);& int wctob (__wint_t __c);/ int mbsinit (cons t mbstate_t *__ps);J __size_t mbrlen (const char *__s, __size_t __n, mbstate_t *__ps);\ __size_t mbrtowc (__wchar_t *__pwc, const char *__s, __size_t __n, mbstate_t *__ps);F __size_t wcrtomb (char *__s, __wchar_t __wc, mbstate_t *__ps);T int wmemcmp (const __wchar_t *__s1, const __wchar_t *__s2, __size_t __n); /*R ** The following functions have interfaces of XXX, _XXX32, and _XXX64 dueS ** only to the fact that the return argument is a  pointer that is relative$ ** to one of the arguments. */'# if __INITIAL_POINTER_SIZE == 32 # pragma __pointer_size 32 # endifQ __wchar_t *wcsstr (const __wchar_t *__ws1, __const_wchar_ptr64 __ws2);Q __wchar_t *wmemchr (const __wchar_t *__s, __wchar_t __c, __size_t __n);W __wchar_t *wmemcpy (__wchar_t *__s1, __const_wchar_ptr64 __s2, __size_t __n);W __wchar_t *wmemmove (__wchar_t *__s1, __const_wchar_ptr64 __s2, __size_t __n);L __wchar_t *wmemset (__wchar_t *__s1, __wchar_t __c, __size_t __n);p __size_t mbsrtowcs (__wchar_ptr64 __dst, const char **__src, __size_t __len, __mbstate_ptr64 __ps);r __size_t wcsrtombs ( __char_ptr64 __dst, const __wchar_t **__src, __size_t __len, __mbstate_ptr64 __ps);#ifdef __NAMESPACE_STD} /* namespace std */#endif'# if __INITIAL_POINTER_SIZE == 32 # pragma __pointer_size 64 # endif<# if __INITIAL_POINTER_SIZE && !defined _ANSI_C_SOURCE # pragma __pointer_size 32I __wchar_t *_wcsstr32 (const __wchar_t *, __const_wchar_ptr64);I __wchar_t *_wmemchr32 (const __wchar_t *, __wchar_t, __size_t);M __wchar_t *_wmemcpy32 (__wchar_t *, __const_wchar_ptr64, __size_t);M __wchar_t *_wmemmove32 (__wchar_t *, __const_wchar_ptr64, __size_t);C __wchar_t *_wmemset32 (__wchar_t *, __wchar_t, __size_t);Z __size_t _mbsrtowcs32 (__wchar_ptr64, const char  **, __size_t, __mbstate_ptr64);^ __size_t _wcsrtombs32 (__char_ptr64, const __wchar_t **, __size_t, __mbstate_ptr64); # pragma __pointer_size 64G __wchar_t *_wcsstr64 (const __wchar_t *, const __wchar_t *);I __wchar_t *_wmemchr64 (const __wchar_t *, __wchar_t, __size_t);K __wchar_t *_wmemcpy64 (__wchar_t *, const __wchar_t *, __size_t);K __wchar_t *_wmemmove64 (__wchar_t *, const __wchar_t *, __size_t);C __wchar_t *_wmemset64 (__wchar_t *, __wchar_t, __size_t);X __size_t _mbsrtowcs64 (__wchar_t *, const char **, __size_t, __mbstate_ptr64);Q __size_t _wcsrtombs64 (char *, const __wchar_t **, __size_t, __mbstate_ptr64); # endif # endif#endif/*%** Restore the users pointer context*/#if __INITIAL_POINTER_SIZE## pragma __pointer_size __restore#endif#ifdef __cplusplus }#endif"#endif /* OpenVMS V6.2 or later */#pragma __standard#endif /* __WCHAR_PROCESSED */>#if defined(__NAMESPACE_STD) && !defined(__NAMESPACE_STD_ONLY)# ifndef __USING_WCHAR_NAMES# define __USING_WCHAR_NAMES using std::fgetwc; using std::fgetws; using std::fputwc; using std::fputws; using std::getwc; using std::getwchar; using std::putwc; using std::putwchar; using std::size_t; using std::ungetwc; using std::wcscat; using std::wcschr; using std::wcscmp; using std::wcscoll; using std::wcscpy; using std::wcscspn; using std::wcsftime; using std::wcslen; using std::wcsncat; using std::wcsncmp; using std::wcsncpy; using std::wcspbrk; using std::wcsrchr; using std::wcsspn; using std::wcstod; using std::wcstok; using std::wcstol; using std::wcstoul; using std::wcsxfrm; using std::wint_t;#pragma __message __save&#pragma __message __disable __undpreid#if __CRTL_VER >= 70000000##if __STDC_VERSION__ == 199409 || \8 (!defined _XOPEN_SOURCE && !defined _DECC_V4_SOURCE) using std::btowc; using std::fwide; using std::fwprintf; using std::fwscanf; using std::mbrlen; using std::mbrtowc; using std::mbsinit; using std::mbsrtowcs; using std::mbstate_t; using std::swprintf; using std::swscanf; using std::vfwprintf; using std::vswprintf; using std::vwprintf; using std::wcrtomb; using std::wcsrtombs; using std::wcsstr; using std::wctob; using std::wmemchr; using std::wmemcmp; using std::wmemcpy; using std::wmemmove; using std::wmemset; using std::wprintf; using std::wscanf;*#endif /* if __STDC_VERSION__ == 199409 */'#endif /* #if __CRTL_VER >= 70000000 */#pragma __message __restore #endif /* __USING_WCHAR_NAMES */K#endif /* #if defined(__NAMESPACE_STD) && !defined(__NAMESPACE_STD_ONLY) */7#if defined(__PURE_CNAME) || defined(__CNAME_OVERLOADS)# include #endif#undef __NAMESPACE_STD_ONLY#pragma __standard#endif /* __CWCHAR_LOADED */wwtI{7ԦM/**************************************************************************** *E * This cname header was auto-generated from its C89 counterpart *N ****************************************************************************/#ifndef __CWCTYPE_LOADED#define __CWCTYPE_LOADED#pragma __nostandard#ifdef __PURE_CNAME# define __NAMESPACE_STD_ONLY#endif#ifndef __WCTYPE_PROCESSED#define __WCTYPE_PROCESSEDM/******************************************* ***********************************D** - Wide Character classification and mapping utilities**M*******************************************************************************:** Header introduced by Amendment 1 of the ISO C Standard**K** Definitions in this header file may not be available on all versions ofK** OpenVMS. See the DEC C Runtime Library reference manual for specifics.**M*****************************************************************************I**  I** Copyright 2005 Hewlett-Packard Development Company, L.P. I** I** Confidential computer software. Valid license from HP and/or I** its subsidiaries required for possession, use, or copying. I** I** Consistent with FAR 12.211 and 12.212, Commercial Computer Software, I** Computer Software Documentation, and Technical Data for Commercial I** Items are licensed to the U.S. Government under vendor's standard I** commercial license. I** I** Neither HP nor any of its subsidiaries shall be liable for technical I** or editorial errors or omissions contained herein. The information I** in this document is provided "as is" without warranty of any kind and I** is subject to change without notice. The warranties for HP products I** are set forth in the express limited warranty statements accompanying I** such products. Nothing herein should be construed as constituting an I** additional warranty. I** M******************************************************************************/#pragma __nostandard#include #ifdef __cplusplus extern "C" {#endif/*H** For inline isw*() functions, this header is using some macros definedK** in header. For C++ compilation, instead of inclusion $** header, provide definitions here.*/#ifndef __NAMESPACE_STD/*I** All includes of other header files must be done prior to altering the** pointer size mode.*/#include #elif !defined(__ctypet)*# define __ctypet (decc$$ga___ctypet) # pragma __extern_model __save)# pragma __extern_model __strict_refdef+ extern const unsigned int * __ctypet ;## pragma __extern_model __restore# define __UPPER 0x1# define __LOWER 0x2# define __DIGIT 0x4# define __SPACE 0x8# define __PUNCT 0x10# define __CNTRL 0x20# define __XDIGIT 0x40# define __PRINT 0x80# define __ALPHABET 0x100# define __ALNUM 0x104# define __GRAPH 0x200# define __BLANK 0X400#endif /* __NAMESPACE_STD *//*K** If the user has used /pointer_size=short or /pointer_size=long, we will+** begin in a 32-bit pointer size context.*/#if __INITIAL_POINTER_SIZE # pragma __pointer_size __save# pragma __pointer_size 64#endif#ifdef __NAMESPACE_STDnamespace std {#endif/*-** Define typedefs only once per compilation*/#ifndef __WINT_T# define __WINT_T typedef __wint_t wint_t;#endif#ifndef __WCTRANS_T# define __WCTRANS_T" typedef __wctrans_t wctrans_t;#endif#ifndef __WCTYPE_T# define __WCTYPE_T typedef __wctype_t wctype_t;#endif#ifdef __NAMESPACE_STD} /* namespace std */#endif #ifndef WEOF# define WEOF ((__wint_t) -1)#endif/*K** According to XPG4, the following functions are defined in the N** header. Although the header doesn't exist in XPG4, we put theseM** prototypes under "No strict XPG4" condition for the sake of a user, whichE** includes both and (in header theseN** declarations are placed under "strict XPG4 mode" condition). Also preventH** macro expansion of isw* prototypes in cases where both and** are included.*/>#if (!defined _XOPEN_SOURCE || defined __HIDE_FORBIDDEN_NAMES)#ifdef __NAMESPACE_STDnamespace std {#endif#ifdef __NAMESPACE_STD # pragma __extern_prefix __save!# pragma __extern_prefix "CXXL$"#endif$ int (iswalnum) (__wint_t __wc);$ int (iswalpha) (__wint_t __wc);$ int (iswcntrl) (__wint_t __wc);$ int (iswdigit) (__wint_t __wc);$ int (iswgraph) (__wint_t __wc);$ int (iswlower) (__wint_t __wc);$ int (iswprint) (__wint_t __wc);$ int (iswpunct) (__wint_t __wc);$ int (iswspace) (__wint_t __wc);$ int (iswupper) (__wint_t __wc);$ int (iswxdigit) (__wint_t __wc);#ifdef __NAMESPACE_STD## pragma __extern_prefix __restore#endif/ __wctype_t wctype (const char *__property);7 int iswctype (__wint_t __wc, __wctype_t __desc);& __wint_t towlower (__wint_t __wc);& __wint_t towupper (__wint_t __wc);#ifdef __NAMESPACE_STD} /* namespace std */#endifG#endif /* (!defined _XOPEN_SOURCE || defined __HIDE_FORBIDDEN_NAMES) *//*J** Throughout this header file, for a C++ compilation with __NAMESPACE_STDM** enabled, functions from ANSI C standard that are defined as macros in thisB** header file, are defined as inline functions instead of macros.**J** This is to comply with clause 17.4.1.2 Headers [lib.headers] of the C++&** standard which says, in particular:J-6- Names that are defined as functions in C shall be defined as functions" in the C++ Standard Library.*)L*) This disallows the practice, allowed in C, of providing a "masking macro"L in addition to the function prototype. The only way to achieve equivalentJ "inline" behavior in C++ is to provide a definition as an extern inline function.*/$# define __ISWALPHABET (iswalpha)$# define __ISWCNTRL (iswcntrl)$# define __ISWUPPER (iswupper)$# define __ISWLOWER (iswlower)$# define __ISWDIGIT (iswdigit)$# define __ISWSPACE (iswspace)$# define __ISWPUNCT (iswpunct)%# define __ISWXDIGIT (iswxdigit)$# define __ISWPRINT (iswprint)$# define __ISWGRAPH (iswgraph)$# define __ISWALNUM (iswalnum)#ifndef __NAMESPACE_STD/*** Macro definitions*/R # define __ISWFUNCTION(c,p) (__ctypea?__ctypet[(__wint_t)(c)]&__##p:__ISW##p(c))/# define iswcntrl(c) __ISWFUNCTION(c, CNTRL)/# define iswalnum(c) __ISWFUNCTION(c, ALNUM)2# define iswalpha(c) __ISWFUNCTION(c, ALPHABET)/# define iswdigit(c) __ISWFUNCTION(c, DIGIT)/# define iswgraph(c) __ISWFUNCTION(c, GRAPH)/# define iswlower(c) __ISWFUNCTION(c, LOWER)/# define iswprint(c) __ISWFUNCTION(c, PRINT)/# define iswpunct(c) __ISWFUNCTION(c, PUNCT)/# define iswspace(c) __ISWFUNCTION(c, SPACE)0# define iswxdigit(c) __ISWFUNCTION(c, XDIGIT)/# define iswupper(c) __ISWFUNCTION(c, UPPER)#else/*** Inline functions*//*>** isw*() functions are defined as macros in header.** Undefine them, just in case.*/#undef iswalnum#undef iswalpha#undef iswcntrl#undef iswdigit#undef iswgraph#undef iswlower#undef iswprint#undef iswpunct#undef iswspace#undef iswupper#undef iswxdigit namespace std {%#define __INLINE_ISWFUNCTION(c,p) { \9 /* no need to check __ctypea on VMS V6.2 and above */ \A return (c == WEOF ? 0 : __ctypet[(unsigned int)(c)] & __##p); \}=inline int iswcntrl(wint_t c) __INLINE_ISWFUNCTION(c, CNTRL)=inline int iswalnum(wint_t c) __INLINE_ISWFUNCTION(c, ALNUM)@inline int iswalpha(wint_t c) __INLINE_ISWFUNCTION(c, ALPHABET)=inline int iswdigit(wint_t c) __INLINE_ISWFUNCTION(c, DIGIT)=inline int iswgraph(wint_t c) __INLINE_ISWFUNCTION(c, GRAPH)=inline int iswlower(wint_t c) __INLINE_ISWFUNCTION(c, LOWER)=inline int iswprint(wint_t c) __INLINE_ISWFUNCTION(c, PRINT)=inline int iswpunct(wint_t c) __INLINE_ISWFUNCTION(c, PUNCT)=inline int iswspace(wint_t c) __INLINE_ISWFUNCTION(c, SPACE)>inline int iswxdigit(wint_t c) __INLINE_ISWFUNCTION(c, XDIGIT)=inline int iswupper(wint_t c) __INLINE_ISWFUNCTION(c, UPPER)} /* namespace std */#endif /* __NAMESPACE_STD */#ifdef __NAMESPACE_STDnamespace std {#endif/__wctrans_t wctrans (const char *__property);:__wint_t towctrans (__wint_t __wc, __wctrans_t __desc);#ifdef __NAMESPACE_STD} /* namespace std */#endif/*%** Restore the users pointer context*/#if __INITIAL_POINTER_SIZE## pragma __pointer_size __restore#endif#ifdef __cplusplus }#endif#pragma __standard#endif /* __WCTYPE_PROCESSED */>#if defined(__NAMESPACE_STD) && !defined(__NAMESPACE_STD_ONLY)# ifndef __USING_WCTYPE_NAMES # define __USING_WCTYPE_NAMES>#if (!defined _XOPEN_SOURCE || defined __HIDE_FORBIDDEN_NAMES) using std::iswctype; using std::towlower; using std::towupper; using std::wctype;#endif using std::iswalnum; using std::iswalpha; using std::iswcntrl; using std::iswdigit; using std::iswgraph; using std::iswlower; using std::iswprint; using std::iswpunct; using std::iswspace; using std::iswupper; using std::iswxdigit; using std::towctrans; using std::wctrans; using std::wctrans_t; using std::wctype_t; using std::wint_t;# endif#endif#undef __NAMESPACE_STD_ONLY#pragma __standard#endif /* __CWCTYPE_LOADED */ww