├── stlport ├── kext │ ├── c++ │ │ ├── cstdio │ │ ├── X │ │ │ ├── cstdio │ │ │ ├── cstdlib │ │ │ ├── cstring │ │ │ └── cstddef │ │ ├── cstring │ │ ├── _types.h │ │ ├── climits │ │ ├── cstdlib │ │ ├── cwchar │ │ ├── stddef.h │ │ └── cstddef │ ├── stdio.h │ ├── errno.h │ └── assert.h ├── using │ ├── h │ │ ├── streambuf.h │ │ ├── fstream.h │ │ ├── iomanip.h │ │ ├── strstream.h │ │ ├── ostream.h │ │ └── iostream.h │ ├── export │ ├── strstream │ ├── streambuf │ ├── iomanip │ ├── ostream │ ├── iostream │ ├── istream │ ├── sstream │ ├── fstream │ └── ios ├── stl │ ├── config │ │ ├── _aix.h │ │ ├── _mac.h │ │ ├── _freebsd.h │ │ ├── _openbsd.h │ │ ├── _netware.h │ │ ├── _cygwin.h │ │ ├── _macosx.h │ │ ├── _hpux.h │ │ ├── _fujitsu.h │ │ ├── _mlc.h │ │ ├── _epilog.h │ │ ├── _apcc.h │ │ ├── _icc.h │ │ └── _kai.h │ ├── type_manips.h │ ├── _move_construct_fwk.h │ ├── _relops_hash_cont.h │ ├── _ioserr.h │ ├── _prolog.h │ ├── _stlport_version.h │ ├── _check_config.h │ ├── _cstdarg.h │ ├── _cstring.h │ ├── _string_npos.h │ ├── _null_stream.h │ ├── _relops_cont.h │ ├── _clocale.h │ ├── _csignal.h │ ├── _mbstate_t.h │ ├── _cstddef.h │ └── msl_string.h ├── rlocks.h ├── stdiostream.h ├── ostream.h ├── ios.h ├── unordered_map ├── unordered_set ├── fstream.h ├── ctime ├── cmath ├── new ├── typeinfo ├── cctype ├── cstdarg ├── cstdio ├── exception.h ├── ios ├── limits.h ├── clocale ├── csetjmp ├── csignal ├── cstddef ├── cstdlib ├── cstring ├── cwchar ├── cwctype ├── ostream ├── limits ├── streambuf ├── istream ├── cfloat ├── ciso646 ├── signal.h ├── valarray ├── rope ├── numeric ├── assert.h ├── wctype.h ├── iso646.h ├── pthread.h ├── cassert ├── functional ├── pthread_alloc ├── locale.h ├── string ├── climits ├── map ├── set ├── hash_map ├── hash_set ├── fstream ├── sstream ├── istream.h ├── list ├── strstream.h ├── deque ├── stack └── iosfwd ├── etc ├── std_headers_cpp_runtime.txt ├── std_headers_cpp_runtime_h.txt ├── stlport_powered_red.gif ├── stlport_powered_white.gif ├── std_headers_classic_iostreams.txt ├── std_headers_c_h.txt ├── std_headers_c.txt ├── cvsignore └── std_headers.txt ├── test ├── eh │ ├── locale.cpp │ ├── mwerks_console_OS_X.c │ ├── mwerks_nosgi_prefix.h │ ├── mwerks_prefix.h │ ├── mwerks_nosgi_debug_prefix.h │ ├── mwerks_debug_prefix.h │ ├── export │ ├── TestClass.cpp │ ├── bug.cpp │ ├── random_number.h │ ├── test.cpp │ ├── test_bitset.cpp │ ├── descrip.mms │ ├── cray.mak │ └── random_number.cpp ├── unit │ ├── locale_test.cpp │ ├── epilog_test.cpp │ ├── cwchar.cpp │ ├── fib.h │ ├── cmath_header_test.cpp │ ├── ctime_header_test.cpp │ ├── ctype_header_test.c │ ├── deque_header_test.cpp │ ├── errno_header_test.c │ ├── float_header_test.c │ ├── list_header_test.cpp │ ├── map_header_test.cpp │ ├── math_header_test.c │ ├── new_header_test.cpp │ ├── queue_header_test.cpp │ ├── set_header_test.cpp │ ├── stack_header_test.cpp │ ├── stdio_header_test.c │ ├── time_header_test.c │ ├── wchar_header_test.c │ ├── assert_header_test.c │ ├── bitset_header_test.cpp │ ├── c_limits_header_test.c │ ├── c_locale_header_test.c │ ├── cassert_header_test.cpp │ ├── cctype_header_test.cpp │ ├── cerrno_header_test.cpp │ ├── cfloat_header_test.cpp │ ├── ciso646_header_test.cpp │ ├── climits_header_test.cpp │ ├── clocale_header_test.cpp │ ├── complex_header_test.cpp │ ├── csetjmp_header_test.cpp │ ├── csignal_header_test.cpp │ ├── cstdarg_header_test.cpp │ ├── cstddef_header_test.cpp │ ├── cstdio_header_test.cpp │ ├── cstring_header_test.cpp │ ├── cwchar_header_test.cpp │ ├── cwctype_header_test.cpp │ ├── iso646_header_test.c │ ├── limits_header_test.cpp │ ├── memory_header_test.cpp │ ├── numeric_header_test.cpp │ ├── setjmp_header_test.c │ ├── signal_header_test.c │ ├── stdarg_header_test.c │ ├── stddef_header_test.c │ ├── stdlib_header_test.c │ ├── string_header_test.c │ ├── string_header_test.cpp │ ├── utility_header_test.cpp │ ├── vector_header_test.cpp │ ├── wctype_header_test.c │ ├── algorithm_header_test.cpp │ ├── exception_header_test.cpp │ ├── functional_header_test.cpp │ ├── iterator_header_test.cpp │ ├── stdexcept_header_test.cpp │ ├── streambuf_header_test.cpp │ ├── typeinfo_header_test.cpp │ ├── valarray_header_test.cpp │ ├── iota.h │ ├── iosfwd_header_test.cpp │ ├── cstdlib_header_test.cpp │ ├── _template.cpp │ ├── math_aux.h │ ├── ios_header_test.cpp │ ├── locale_header_test.cpp │ ├── fstream_header_test.cpp │ ├── iomanip_header_test.cpp │ ├── iostream_header_test.cpp │ ├── istream_header_test.cpp │ ├── ostream_header_test.cpp │ ├── sstream_header_test.cpp │ ├── strstream_header_test.cpp │ ├── setjmp_header_test2.cpp │ ├── pair_test.cpp │ ├── divides_test.cpp │ ├── times_test.cpp │ ├── advance_test.cpp │ ├── unary.h │ ├── modulus_test.cpp │ ├── cppunit │ │ └── cppunit_proxy.h │ ├── swap_test.cpp │ ├── lexcmp_test.cpp │ ├── full_streambuf.h │ ├── less_test.cpp │ ├── iota_test.cpp │ ├── accum_test.cpp │ ├── greater_test.cpp │ ├── bnegate_test.cpp │ ├── ostmit_test.cpp │ ├── plusminus_test.cpp │ ├── stack_test.cpp │ ├── neq_test.cpp │ ├── bsearch_test.cpp │ ├── queue_test.cpp │ ├── rawriter_test.cpp │ ├── bcompos_test.cpp │ └── fill_test.cpp └── compiler │ ├── StTerm-order │ ├── Makefile.inc │ └── Makefile │ ├── Makefile.inc │ ├── movable.cpp │ ├── gcc.mak │ ├── ttei2.cpp │ ├── ttei6.cpp │ ├── ttei1.cpp │ ├── ttei7.cpp │ ├── ttei4.cpp │ ├── ttei3.cpp │ ├── ttei5.cpp │ ├── README │ └── eh.cc ├── .gitignore ├── src ├── aligned_buffer.h ├── fstream_impl.h ├── stlport_prefix.h └── ostream.cpp ├── doc ├── README.cygwin ├── README.mingw └── README.intel └── STLPort.vcxproj.filters /stlport/kext/c++/cstdio: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /stlport/kext/stdio.h: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /stlport/kext/c++/X/cstdio: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /stlport/kext/c++/X/cstdlib: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /stlport/kext/c++/cstring: -------------------------------------------------------------------------------- 1 | #include -------------------------------------------------------------------------------- /stlport/kext/errno.h: -------------------------------------------------------------------------------- 1 | #include -------------------------------------------------------------------------------- /stlport/kext/assert.h: -------------------------------------------------------------------------------- 1 | #include -------------------------------------------------------------------------------- /stlport/kext/c++/X/cstring: -------------------------------------------------------------------------------- 1 | #include -------------------------------------------------------------------------------- /stlport/kext/c++/_types.h: -------------------------------------------------------------------------------- 1 | #include -------------------------------------------------------------------------------- /stlport/kext/c++/X/cstddef: -------------------------------------------------------------------------------- 1 | #include "stddef.h" 2 | -------------------------------------------------------------------------------- /stlport/kext/c++/climits: -------------------------------------------------------------------------------- 1 | #include -------------------------------------------------------------------------------- /stlport/kext/c++/cstdlib: -------------------------------------------------------------------------------- 1 | #include -------------------------------------------------------------------------------- /stlport/kext/c++/cwchar: -------------------------------------------------------------------------------- 1 | #include -------------------------------------------------------------------------------- /stlport/using/h/streambuf.h: -------------------------------------------------------------------------------- 1 | using ::streambuf; 2 | -------------------------------------------------------------------------------- /stlport/stl/config/_aix.h: -------------------------------------------------------------------------------- 1 | #define _STLP_PLATFORM "AIX" 2 | -------------------------------------------------------------------------------- /stlport/stl/config/_mac.h: -------------------------------------------------------------------------------- 1 | #define _STLP_PLATFORM "Mac" 2 | -------------------------------------------------------------------------------- /etc/std_headers_cpp_runtime.txt: -------------------------------------------------------------------------------- 1 | exception 2 | new 3 | typeinfo 4 | -------------------------------------------------------------------------------- /stlport/stl/config/_freebsd.h: -------------------------------------------------------------------------------- 1 | #define _STLP_PLATFORM "Free BSD" 2 | -------------------------------------------------------------------------------- /stlport/stl/config/_openbsd.h: -------------------------------------------------------------------------------- 1 | #define _STLP_PLATFORM "Open BSD" 2 | -------------------------------------------------------------------------------- /stlport/stl/config/_netware.h: -------------------------------------------------------------------------------- 1 | #define _STLP_PLATFORM "Novell Netware" 2 | -------------------------------------------------------------------------------- /etc/std_headers_cpp_runtime_h.txt: -------------------------------------------------------------------------------- 1 | exception.h 2 | new.h 3 | typeinfo.h 4 | -------------------------------------------------------------------------------- /stlport/kext/c++/stddef.h: -------------------------------------------------------------------------------- 1 | //#include "/usr/include/stddef.h" 2 | //#include -------------------------------------------------------------------------------- /test/eh/locale.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/stlport-kernel/HEAD/test/eh/locale.cpp -------------------------------------------------------------------------------- /etc/stlport_powered_red.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/stlport-kernel/HEAD/etc/stlport_powered_red.gif -------------------------------------------------------------------------------- /stlport/stl/type_manips.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/stlport-kernel/HEAD/stlport/stl/type_manips.h -------------------------------------------------------------------------------- /stlport/using/h/fstream.h: -------------------------------------------------------------------------------- 1 | using ::streambuf; 2 | using ::ifstream; 3 | using ::ofstream; 4 | using ::fstream; 5 | -------------------------------------------------------------------------------- /test/unit/locale_test.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/stlport-kernel/HEAD/test/unit/locale_test.cpp -------------------------------------------------------------------------------- /etc/stlport_powered_white.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/stlport-kernel/HEAD/etc/stlport_powered_white.gif -------------------------------------------------------------------------------- /test/eh/mwerks_console_OS_X.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/stlport-kernel/HEAD/test/eh/mwerks_console_OS_X.c -------------------------------------------------------------------------------- /stlport/stl/_move_construct_fwk.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/stlport-kernel/HEAD/stlport/stl/_move_construct_fwk.h -------------------------------------------------------------------------------- /etc/std_headers_classic_iostreams.txt: -------------------------------------------------------------------------------- 1 | fstream.h 2 | iomanip.h 3 | ios.h 4 | iostream.h 5 | istream.h 6 | ostream.h 7 | streambuf.h 8 | strstream.h 9 | -------------------------------------------------------------------------------- /test/compiler/StTerm-order/Makefile.inc: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- Time-stamp: <02/07/14 14:03:13 ptr> 2 | 3 | PRGNAME = stterm-test 4 | SRC_CC = stterm-test.cc 5 | -------------------------------------------------------------------------------- /stlport/kext/c++/cstddef: -------------------------------------------------------------------------------- 1 | //#include "stddef.h" 2 | #include 3 | typedef __darwin_ptrdiff_t ptrdiff_t; 4 | typedef __darwin_wint_t wint_t; 5 | 6 | -------------------------------------------------------------------------------- /stlport/using/h/iomanip.h: -------------------------------------------------------------------------------- 1 | using ::setiosflags; 2 | using ::resetiosflags; 3 | // using ::setbase; 4 | using ::setfill; 5 | using ::setprecision; 6 | using ::setw; 7 | -------------------------------------------------------------------------------- /stlport/using/export: -------------------------------------------------------------------------------- 1 | cstring 2 | fstream 3 | iomanip 4 | ios 5 | iosfwd 6 | iostream 7 | istream 8 | locale 9 | ostream 10 | sstream 11 | streambuf 12 | strstream 13 | -------------------------------------------------------------------------------- /stlport/stl/config/_cygwin.h: -------------------------------------------------------------------------------- 1 | #define _STLP_PLATFORM "Cygwin" 2 | 3 | /* Glibc is the platform API */ 4 | #if !defined (_STLP_USE_GLIBC) 5 | # define _STLP_USE_GLIBC 6 | #endif 7 | -------------------------------------------------------------------------------- /etc/std_headers_c_h.txt: -------------------------------------------------------------------------------- 1 | ctype.h 2 | locale.h 3 | math.h 4 | setjmp.h 5 | signal.h 6 | stdarg.h 7 | stddef.h 8 | stdio.h 9 | stdlib.h 10 | string.h 11 | time.h 12 | wchar.h 13 | wctype.h 14 | -------------------------------------------------------------------------------- /stlport/using/strstream: -------------------------------------------------------------------------------- 1 | using _STLP_NEW_IO_NAMESPACE::strstreambuf; 2 | using _STLP_NEW_IO_NAMESPACE::istrstream; 3 | using _STLP_NEW_IO_NAMESPACE::ostrstream; 4 | using _STLP_NEW_IO_NAMESPACE::strstream; 5 | -------------------------------------------------------------------------------- /stlport/using/h/strstream.h: -------------------------------------------------------------------------------- 1 | using _STLP_OLD_IO_NAMESPACE::strstreambuf; 2 | using _STLP_OLD_IO_NAMESPACE::istrstream; 3 | using _STLP_OLD_IO_NAMESPACE::ostrstream; 4 | using _STLP_OLD_IO_NAMESPACE::strstream; 5 | -------------------------------------------------------------------------------- /stlport/using/streambuf: -------------------------------------------------------------------------------- 1 | using _STLP_NEW_IO_NAMESPACE::basic_streambuf; 2 | using _STLP_NEW_IO_NAMESPACE::streambuf; 3 | #ifndef _STLP_NO_WIDE_STREAMS 4 | using _STLP_NEW_IO_NAMESPACE::wstreambuf; 5 | # endif 6 | -------------------------------------------------------------------------------- /test/eh/mwerks_nosgi_prefix.h: -------------------------------------------------------------------------------- 1 | //mwerks_nosgi_prefix.h 2 | #define _STLP_NO_SGI_IOSTREAMS 1 3 | #define _STLP_NO_FORCE_INSTANTIATE 1 // for debugging 4 | #define EH_VECTOR_OPERATOR_NEW 1 5 | #define NDEBUG 1 6 | -------------------------------------------------------------------------------- /stlport/stl/config/_macosx.h: -------------------------------------------------------------------------------- 1 | #define _STLP_PLATFORM "Mac OS X" 2 | 3 | #if defined (__BIG_ENDIAN__) 4 | # define _STLP_BIG_ENDIAN 1 5 | #elif defined (__LITTLE_ENDIAN__) 6 | # define _STLP_LITTLE_ENDIAN 1 7 | #endif 8 | -------------------------------------------------------------------------------- /test/eh/mwerks_prefix.h: -------------------------------------------------------------------------------- 1 | //mwerks_prefix.h 2 | #define _STLP_NO_FORCE_INSTANTIATE 1// for debugging 3 | #define EH_VECTOR_OPERATOR_NEW 1 4 | #define NDEBUG 1 5 | 6 | #if __MWERKS__ >= 0x3000 7 | #include 8 | #endif -------------------------------------------------------------------------------- /etc/std_headers_c.txt: -------------------------------------------------------------------------------- 1 | cassert 2 | cctype 3 | cerrno 4 | cfloat 5 | climits 6 | clocale 7 | cmath 8 | csetjmp 9 | csignal 10 | cstdarg 11 | cstddef 12 | cstdio 13 | cstdlib 14 | cstring 15 | ctime 16 | cwchar 17 | cwctype 18 | -------------------------------------------------------------------------------- /stlport/using/h/ostream.h: -------------------------------------------------------------------------------- 1 | using _STLP_OLD_IO_NAMESPACE::ostream; 2 | using _STLP_OLD_IO_NAMESPACE::endl; 3 | using _STLP_OLD_IO_NAMESPACE::ends; 4 | using _STLP_OLD_IO_NAMESPACE::flush; 5 | 6 | // using _STLP_OLD_IO_NAMESPACE::ws; 7 | -------------------------------------------------------------------------------- /test/unit/epilog_test.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #if !defined (STLPORT) || defined(_STLP_USE_NAMESPACES) 5 | 6 | struct some_struct { 7 | std::string s; // if std not properly redefined, error will be here 8 | }; 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /test/eh/mwerks_nosgi_debug_prefix.h: -------------------------------------------------------------------------------- 1 | //mwerks_nosgi_debug_prefix.h 2 | #define _STLP_NO_SGI_IOSTREAMS 1 3 | #define _STLP_NO_FORCE_INSTANTIATE 1 // for debugging 4 | #define _STLP_DEBUG_UNINITIALIZED 1 // enable the use of allocation debugging 5 | #define EH_VECTOR_OPERATOR_NEW 1 6 | -------------------------------------------------------------------------------- /stlport/stl/config/_hpux.h: -------------------------------------------------------------------------------- 1 | #ifndef __stl_config__hpux_h 2 | #define __stl_config__hpux_h 3 | 4 | #define _STLP_PLATFORM "HP Unix" 5 | 6 | #ifdef __GNUC__ 7 | # define _STLP_NO_WCHAR_T 8 | # define _STLP_NO_LONG_DOUBLE 9 | #endif 10 | 11 | #endif /* __stl_config__hpux_h */ 12 | -------------------------------------------------------------------------------- /stlport/using/iomanip: -------------------------------------------------------------------------------- 1 | using _STLP_NEW_IO_NAMESPACE::setiosflags; 2 | using _STLP_NEW_IO_NAMESPACE::resetiosflags; 3 | using _STLP_NEW_IO_NAMESPACE::setbase; 4 | using _STLP_NEW_IO_NAMESPACE::setfill; 5 | using _STLP_NEW_IO_NAMESPACE::setprecision; 6 | using _STLP_NEW_IO_NAMESPACE::setw; 7 | -------------------------------------------------------------------------------- /test/eh/mwerks_debug_prefix.h: -------------------------------------------------------------------------------- 1 | //mwerks_debug_prefix.h 2 | #define _STLP_NO_FORCE_INSTANTIATE 1// for debugging 3 | #define EH_VECTOR_OPERATOR_NEW 1 4 | #define _STLP_DEBUG 1 // enable the use of allocation debugging 5 | 6 | #if __MWERKS__ >= 0x3000 7 | #include 8 | #endif -------------------------------------------------------------------------------- /test/compiler/Makefile.inc: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- Time-stamp: <04/10/17 21:16:38 ptr> 2 | # $Id: Makefile.inc,v 1.2 2008-02-26 14:59:44 bazis Exp $ 3 | 4 | PRGNAME = compiler_test 5 | SRC_CPP = ttei1.cpp ttei2.cpp ttei3.cpp ttei4.cpp ttei5.cpp ttei6.cpp ttei7.cpp \ 6 | movable.cpp 7 | SRC_CC = eh.cc 8 | -------------------------------------------------------------------------------- /stlport/stl/config/_fujitsu.h: -------------------------------------------------------------------------------- 1 | /* STLport configuration for Fujitsu compiler : looks like a perfect one ! */ 2 | #define _STLP_COMPILER "Fujitsu" 3 | 4 | #define _STLP_NATIVE_INCLUDE_PATH ../std 5 | #define _STLP_UINT32_T unsigned int 6 | #define _STLP_LONG_LONG long long 7 | #define _STLP_WCHAR_SUNPRO_EXCLUDE 1 8 | -------------------------------------------------------------------------------- /test/compiler/movable.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | using namespace std; 6 | 7 | struct S : 8 | public string 9 | { 10 | }; 11 | 12 | void test() 13 | { 14 | list l; 15 | l.push_back( S() ); 16 | 17 | vector v; 18 | v.push_back( S() ); 19 | } 20 | 21 | -------------------------------------------------------------------------------- /stlport/using/ostream: -------------------------------------------------------------------------------- 1 | using _STLP_NEW_IO_NAMESPACE::basic_ostream; 2 | using _STLP_NEW_IO_NAMESPACE::ostream; 3 | 4 | # ifndef _STLP_NO_WIDE_STREAMS 5 | using _STLP_NEW_IO_NAMESPACE::wostream; 6 | # endif 7 | 8 | using _STLP_NEW_IO_NAMESPACE::endl; 9 | using _STLP_NEW_IO_NAMESPACE::ends; 10 | using _STLP_NEW_IO_NAMESPACE::flush; 11 | -------------------------------------------------------------------------------- /test/compiler/gcc.mak: -------------------------------------------------------------------------------- 1 | # -*- Makefile -*- Time-stamp: <04/03/14 23:50:57 ptr> 2 | # $Id: gcc.mak,v 1.2 2008-02-26 14:59:44 bazis Exp $ 3 | 4 | SRCROOT := ../../src/explore 5 | COMPILER_NAME := gcc 6 | 7 | ALL_TAGS := compile-only 8 | STLPORT_DIR := ../.. 9 | include Makefile.inc 10 | include ${SRCROOT}/Makefiles/top.mak 11 | compile-only: $(OBJ) 12 | -------------------------------------------------------------------------------- /stlport/rlocks.h: -------------------------------------------------------------------------------- 1 | #ifndef _STLP_misc_rlocks_h 2 | # define _STLP_misc_rlocks_h 3 | # if (__SUNPRO_CC >= 0x500 ) 4 | # include <../CCios/rlocks.h> 5 | # elif defined (__SUNPRO_CC) 6 | # include <../CC/rlocks.h> 7 | # else 8 | # error "This file is for SUN CC only. Please remove it if it causes any harm for other compilers." 9 | # endif 10 | #endif 11 | 12 | -------------------------------------------------------------------------------- /stlport/stl/config/_mlc.h: -------------------------------------------------------------------------------- 1 | // STLport configuration file 2 | // It is internal STLport header - DO NOT include it directly 3 | 4 | #define _STLP_NO_MEMBER_TEMPLATES // Compiler does not support member templates 5 | #define _STLP_NO_MEMBER_TEMPLATE_CLASSES // Compiler does not support member template classes 6 | 7 | #define _STLP_HAS_NEW_NEW_HEADER 8 | -------------------------------------------------------------------------------- /test/compiler/StTerm-order/Makefile: -------------------------------------------------------------------------------- 1 | # -*- Makefile -*- Time-stamp: <03/07/09 18:08:47 ptr> 2 | 3 | SRCROOT := ../../../build 4 | COMPILER_NAME := gcc 5 | 6 | WITHOUT_STLPORT = 1 7 | # STLPORT_DIR := ../../.. 8 | include Makefile.inc 9 | include ${SRCROOT}/Makefiles/top.mak 10 | 11 | #CXXFLAGS += -fuse-cxa-atexit 12 | LDFLAGS += -Wl,-rpath=${STLPORT_LIB_DIR} 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files 2 | *.slo 3 | *.lo 4 | *.o 5 | *.obj 6 | 7 | # Precompiled Headers 8 | *.gch 9 | *.pch 10 | 11 | # Compiled Dynamic libraries 12 | *.so 13 | *.dylib 14 | *.dll 15 | 16 | # Fortran module files 17 | *.mod 18 | 19 | # Compiled Static libraries 20 | *.lai 21 | *.la 22 | *.a 23 | *.lib 24 | 25 | # Executables 26 | *.exe 27 | *.out 28 | *.app 29 | -------------------------------------------------------------------------------- /stlport/stdiostream.h: -------------------------------------------------------------------------------- 1 | #ifndef _STLP_misc_stdiostream_h 2 | # define _STLP_misc_stdiostream_h 3 | # if (__SUNPRO_CC >= 0x500 ) 4 | # include <../CCios/stdiostream.h> 5 | # else if defined (__SUNPRO_CC) 6 | # include <../CC/stdiostream.h> 7 | # else 8 | # error "This file is for SUN CC only. Please remove it if it causes any harm for other compilers." 9 | # endif 10 | #endif 11 | -------------------------------------------------------------------------------- /test/unit/cwchar.cpp: -------------------------------------------------------------------------------- 1 | // #include 2 | // #include 3 | #include 4 | #include 5 | #include 6 | 7 | #if defined(WCHAR_MIN) && (WCHAR_MIN == 0) 8 | // do nothing, this is test for macro expansion 9 | #endif 10 | 11 | #if defined(WCHAR_MAX) && (WCHAR_MAX <= USHRT_MAX) 12 | // do nothing, this is test for macro expansion 13 | #endif 14 | -------------------------------------------------------------------------------- /test/unit/fib.h: -------------------------------------------------------------------------------- 1 | #ifndef _fib_h 2 | #define _fib_h 3 | class Fibonacci 4 | { 5 | public: 6 | Fibonacci() : v1(0), v2(1) {} 7 | inline int operator()(); 8 | private: 9 | int v1; 10 | int v2; 11 | }; 12 | 13 | inline int 14 | Fibonacci::operator()() 15 | { 16 | int r = v1 + v2; 17 | v1 = v2; 18 | v2 = r; 19 | return v1; 20 | } 21 | #endif // _fib_h 22 | -------------------------------------------------------------------------------- /etc/cvsignore: -------------------------------------------------------------------------------- 1 | ignore 2 | dev 3 | fix 4 | *.o 5 | *.obj 6 | obj 7 | bin 8 | bin-g 9 | bin-stlg 10 | *-bin 11 | *-lib 12 | *~ 13 | .#* 14 | *.exe 15 | *.dll 16 | *.idb 17 | *.pdb 18 | *.so* 19 | *.a 20 | *.exe 21 | *.core 22 | *.bak 23 | *.out 24 | *.pdb 25 | *.pch 26 | .* 27 | core 28 | core.* 29 | CVS 30 | SunWS_cache 31 | Templates.DB 32 | *.gz 33 | test_file.txt 34 | make_snap.sh 35 | TAGS 36 | -------------------------------------------------------------------------------- /stlport/using/iostream: -------------------------------------------------------------------------------- 1 | 2 | # include 3 | 4 | using _STLP_VENDOR_STD::cin; 5 | using _STLP_VENDOR_STD::cout; 6 | using _STLP_VENDOR_STD::cerr; 7 | using _STLP_VENDOR_STD::clog; 8 | 9 | # if ! defined (_STLP_NO_WIDE_STREAMS) 10 | using _STLP_VENDOR_STD::wcin; 11 | using _STLP_VENDOR_STD::wcout; 12 | using _STLP_VENDOR_STD::wcerr; 13 | using _STLP_VENDOR_STD::wclog; 14 | # endif 15 | -------------------------------------------------------------------------------- /test/unit/cmath_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/ctime_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/ctype_header_test.c: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/deque_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/errno_header_test.c: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/float_header_test.c: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/list_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/map_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/math_header_test.c: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/new_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/queue_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/set_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/stack_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/stdio_header_test.c: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/time_header_test.c: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/wchar_header_test.c: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/assert_header_test.c: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/bitset_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/c_limits_header_test.c: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/c_locale_header_test.c: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/cassert_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/cctype_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/cerrno_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/cfloat_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/ciso646_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/climits_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/clocale_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/complex_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/csetjmp_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/csignal_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/cstdarg_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/cstddef_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/cstdio_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/cstring_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/cwchar_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/cwctype_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/iso646_header_test.c: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/limits_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/memory_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/numeric_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/setjmp_header_test.c: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/signal_header_test.c: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/stdarg_header_test.c: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/stddef_header_test.c: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/stdlib_header_test.c: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/string_header_test.c: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/string_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/utility_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/vector_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/wctype_header_test.c: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/algorithm_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/exception_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/functional_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/iterator_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/stdexcept_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/streambuf_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/typeinfo_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/valarray_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | -------------------------------------------------------------------------------- /test/unit/iota.h: -------------------------------------------------------------------------------- 1 | #ifndef IOTA_H 2 | #define IOTA_H 3 | 4 | #include 5 | 6 | //iota definition used in unit test 7 | template 8 | void __iota(_It __first, _It __last, _Tp __val) { 9 | #if defined (STLPORT) && !defined (_STLP_NO_EXTENSIONS) 10 | iota(__first, __last, __val); 11 | #else 12 | while (__first != __last) { 13 | *__first++ = __val++; 14 | } 15 | #endif 16 | } 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /etc/std_headers.txt: -------------------------------------------------------------------------------- 1 | algorithm 2 | bitset 3 | complex 4 | deque 5 | fstream 6 | functional 7 | hash_map 8 | hash_set 9 | iomanip 10 | ios 11 | iosfwd 12 | iostream 13 | istream 14 | iterator 15 | limits 16 | list 17 | locale 18 | map 19 | memory 20 | numeric 21 | ostream 22 | pthread_alloc 23 | queue 24 | set 25 | slist 26 | sstream 27 | stack 28 | stdexcept 29 | streambuf 30 | string 31 | strstream 32 | utility 33 | valarray 34 | vector 35 | -------------------------------------------------------------------------------- /test/unit/iosfwd_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #ifndef _STLP_USE_NO_IOSTREAMS 9 | #include 10 | #endif 11 | -------------------------------------------------------------------------------- /stlport/stl/_relops_hash_cont.h: -------------------------------------------------------------------------------- 1 | /* This is an implementation file which is intended to be included 2 | * multiple times with different _STLP_TEMPLATE_CONTAINER settings. 3 | */ 4 | 5 | #if defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER) 6 | 7 | _STLP_TEMPLATE_HEADER 8 | inline void _STLP_CALL 9 | swap(_STLP_TEMPLATE_CONTAINER& __hm1, _STLP_TEMPLATE_CONTAINER& __hm2) { 10 | __hm1.swap(__hm2); 11 | } 12 | 13 | #endif /* _STLP_FUNCTION_TMPL_PARTIAL_ORDER */ 14 | -------------------------------------------------------------------------------- /src/aligned_buffer.h: -------------------------------------------------------------------------------- 1 | #ifndef ALIGNED_BUFFER_H 2 | #define ALIGNED_BUFFER_H 3 | 4 | _STLP_BEGIN_NAMESPACE 5 | // this is for fake initialization 6 | template 7 | union _Stl_aligned_buffer { 8 | char buf[sizeof(T)]; 9 | struct { double a; double b; } padding; 10 | 11 | T* operator&() { 12 | return __REINTERPRET_CAST(T*, this); 13 | } 14 | 15 | T const* operator&() const { 16 | return __REINTERPRET_CAST(T const*, this); 17 | } 18 | }; 19 | _STLP_END_NAMESPACE 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /stlport/using/istream: -------------------------------------------------------------------------------- 1 | # include 2 | 3 | using _STLP_NEW_IO_NAMESPACE::basic_istream; 4 | using _STLP_NEW_IO_NAMESPACE::basic_iostream; 5 | 6 | using _STLP_NEW_IO_NAMESPACE::istream; 7 | using _STLP_NEW_IO_NAMESPACE::iostream; 8 | 9 | # if !defined (_STLP_NO_NATIVE_WIDE_STREAMS) 10 | using _STLP_NEW_IO_NAMESPACE::wistream; 11 | using _STLP_NEW_IO_NAMESPACE::wiostream; 12 | # endif 13 | 14 | #if !(defined (_STLP_MSVC) && (_STLP_MSVC < 1200)) 15 | using _STLP_NEW_IO_NAMESPACE::ws; 16 | #endif 17 | -------------------------------------------------------------------------------- /doc/README.cygwin: -------------------------------------------------------------------------------- 1 | The cygwin platform is used to build STLport with different compilers. 2 | 3 | - gcc (native compiler): 4 | 5 | Makefile : gcc.mak 6 | 7 | WARNING : If you use the static version of the STLport 8 | libraries you have to define the _STLP_USE_STATIC_LIB 9 | macro in order to have your executable linked correctly. 10 | 11 | To build STLport libraries that do not depend on cygwin1.dll 12 | making them freely redistributable use the --no-cygwin configuration 13 | option. 14 | 15 | - Borland C++ compiler 16 | -------------------------------------------------------------------------------- /test/unit/cstdlib_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | #include 9 | 10 | //Just an additionnal compilation test for Borland that used to fail here. 11 | #if defined (__BORLANDC__) 12 | # include 13 | #endif 14 | -------------------------------------------------------------------------------- /test/compiler/ttei2.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * It is known that this code not compiled by following compilers: 3 | * 4 | * It is known that this code compiled by following compilers: 5 | * gcc 2.95.3 6 | * gcc 3.3.3 7 | * gcc 3.4.1 8 | * MSVC 6 9 | * MSVC 8 10 | */ 11 | 12 | struct A 13 | { 14 | private: 15 | struct B 16 | { 17 | template 18 | static void f( T& ) {} 19 | 20 | template 21 | struct C 22 | { 23 | }; 24 | }; 25 | }; 26 | 27 | template <> 28 | struct A::B::C 29 | { 30 | }; 31 | 32 | -------------------------------------------------------------------------------- /test/unit/_template.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "cppunit_proxy.h" 5 | 6 | #if !defined (STLPORT) || defined(_STLP_USE_NAMESPACES) 7 | using namespace std; 8 | #endif 9 | 10 | // 11 | // TestCase class 12 | // 13 | class Test : public CPPUNIT_NS::TestCase 14 | { 15 | CPPUNIT_TEST_SUITE(Test); 16 | CPPUNIT_TEST(test); 17 | CPPUNIT_TEST_SUITE_END(); 18 | 19 | protected: 20 | void test(); 21 | }; 22 | 23 | CPPUNIT_TEST_SUITE_REGISTRATION(Test); 24 | 25 | // 26 | // tests implementation 27 | // 28 | void Test::test() 29 | { 30 | CPPUNIT_ASSERT(true); 31 | } 32 | -------------------------------------------------------------------------------- /test/unit/math_aux.h: -------------------------------------------------------------------------------- 1 | #ifndef __MATH_AUX_H 2 | #define __MATH_AUX_H 3 | 4 | #include 5 | 6 | /* 7 | * This function is not only used to compare floating point values with a tolerance, 8 | * it also leads to ambiguity problems if the called functions do not have the 9 | * right prototype. 10 | */ 11 | template 12 | bool are_equals(_Tp val, _Tp ref) { 13 | if (val < ref) { 14 | return (ref - val) <= std::numeric_limits<_Tp>::epsilon(); 15 | } 16 | else { 17 | return (val - ref) <= std::numeric_limits<_Tp>::epsilon(); 18 | } 19 | } 20 | 21 | #endif // __MATH_AUX_H 22 | -------------------------------------------------------------------------------- /test/unit/ios_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | 9 | //Including this fle makes the test STLport specific but this is the only way to check 10 | //compiler config: 11 | #include 12 | 13 | #if !defined (_STLP_USE_NO_IOSTREAMS) 14 | # include 15 | #endif 16 | -------------------------------------------------------------------------------- /test/unit/locale_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | 9 | //Including this fle makes the test STLport specific but this is the only way to check 10 | //compiler config: 11 | #include 12 | 13 | #if !defined (_STLP_USE_NO_IOSTREAMS) 14 | # include 15 | #endif 16 | -------------------------------------------------------------------------------- /test/unit/fstream_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | 9 | //Including this fle makes the test STLport specific but this is the only way to check 10 | //compiler config: 11 | #include 12 | 13 | #if !defined (_STLP_USE_NO_IOSTREAMS) 14 | # include 15 | #endif 16 | -------------------------------------------------------------------------------- /test/unit/iomanip_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | 9 | //Including this fle makes the test STLport specific but this is the only way to check 10 | //compiler config: 11 | #include 12 | 13 | #if !defined (_STLP_USE_NO_IOSTREAMS) 14 | # include 15 | #endif 16 | -------------------------------------------------------------------------------- /test/unit/iostream_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | 9 | //Including this fle makes the test STLport specific but this is the only way to check 10 | //compiler config: 11 | #include 12 | 13 | #if !defined (_STLP_USE_NO_IOSTREAMS) 14 | # include 15 | #endif 16 | -------------------------------------------------------------------------------- /test/unit/istream_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | 9 | //Including this fle makes the test STLport specific but this is the only way to check 10 | //compiler config: 11 | #include 12 | 13 | #if !defined (_STLP_USE_NO_IOSTREAMS) 14 | # include 15 | #endif 16 | -------------------------------------------------------------------------------- /test/unit/ostream_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | 9 | //Including this fle makes the test STLport specific but this is the only way to check 10 | //compiler config: 11 | #include 12 | 13 | #if !defined (_STLP_USE_NO_IOSTREAMS) 14 | # include 15 | #endif 16 | -------------------------------------------------------------------------------- /test/unit/sstream_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | 9 | //Including this fle makes the test STLport specific but this is the only way to check 10 | //compiler config: 11 | #include 12 | 13 | #if !defined (_STLP_USE_NO_IOSTREAMS) 14 | # include 15 | #endif 16 | -------------------------------------------------------------------------------- /test/unit/strstream_header_test.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | 9 | //Including this fle makes the test STLport specific but this is the only way to check 10 | //compiler config: 11 | #include 12 | 13 | #if !defined (_STLP_USE_NO_IOSTREAMS) 14 | # include 15 | #endif 16 | -------------------------------------------------------------------------------- /test/unit/setjmp_header_test2.cpp: -------------------------------------------------------------------------------- 1 | /* This test purpose is simply to check Standard header independancy that 2 | * is to say that the header can be included alone without any previous 3 | * include. 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be 5 | * used to check that files included by those headers are compatible with 6 | * pure C compilers. 7 | */ 8 | 9 | /* 10 | * Sometimes, if native setjmp.h was included first, the setjmp functions 11 | * situated in global namespace, not in vendor's std. This may confuse 12 | * following csetjmp 13 | */ 14 | #include 15 | #include 16 | -------------------------------------------------------------------------------- /stlport/using/sstream: -------------------------------------------------------------------------------- 1 | using _STLP_NEW_IO_NAMESPACE::basic_stringbuf; 2 | using _STLP_NEW_IO_NAMESPACE::stringbuf; 3 | 4 | using _STLP_NEW_IO_NAMESPACE::basic_istringstream; 5 | using _STLP_NEW_IO_NAMESPACE::basic_ostringstream; 6 | using _STLP_NEW_IO_NAMESPACE::basic_stringstream; 7 | using _STLP_NEW_IO_NAMESPACE::istringstream; 8 | using _STLP_NEW_IO_NAMESPACE::ostringstream; 9 | using _STLP_NEW_IO_NAMESPACE::stringstream; 10 | 11 | #ifndef _STLP_NO_WIDE_STREAMS 12 | using _STLP_NEW_IO_NAMESPACE::wstringbuf; 13 | using _STLP_NEW_IO_NAMESPACE::wistringstream; 14 | using _STLP_NEW_IO_NAMESPACE::wostringstream; 15 | using _STLP_NEW_IO_NAMESPACE::wstringstream; 16 | #endif 17 | -------------------------------------------------------------------------------- /test/compiler/ttei6.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * It is known that this code not compiled by following compilers: 3 | * 4 | * It is known that this code compiled by following compilers: 5 | * 6 | * MSVC 6 7 | * MSVC 8 Beta 8 | */ 9 | 10 | /* 11 | * This code represent what STLport waits from a compiler which support 12 | * member template classes (!_STLP_NO_MEMBER_TEMPLATE_CLASSES) 13 | */ 14 | 15 | template 16 | struct A 17 | { 18 | template 19 | struct B 20 | { 21 | typedef T2 _Type; 22 | }; 23 | }; 24 | 25 | 26 | template 27 | struct C 28 | { 29 | typedef typename A:: template B::_Type ABType; 30 | }; 31 | -------------------------------------------------------------------------------- /test/compiler/ttei1.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * It is known that this code not compiled by following compilers: 3 | * gcc 2.95.3 4 | * MSVC 6 5 | * 6 | * It is known that this code compiled by following compilers: 7 | * gcc 3.3.3 8 | * gcc 3.4.1 9 | * MSVC 8 Beta 10 | */ 11 | 12 | struct A 13 | { 14 | private: 15 | struct B 16 | { 17 | template 18 | static void f( T& ) {} 19 | 20 | template 21 | struct C 22 | { 23 | template 24 | static void f( T& ) {} 25 | }; 26 | }; 27 | }; 28 | 29 | template <> template 30 | void A::B::C::f( T& ) {} 31 | 32 | -------------------------------------------------------------------------------- /stlport/using/h/iostream.h: -------------------------------------------------------------------------------- 1 | using _STLP_OLD_IO_NAMESPACE::istream; 2 | using _STLP_OLD_IO_NAMESPACE::ostream; 3 | 4 | /* HP aCC include files re-define these when THREAD_SAFE */ 5 | #if !defined(cin) 6 | using _STLP_OLD_IO_NAMESPACE::cin; 7 | #endif 8 | #if !defined(cout) 9 | using _STLP_OLD_IO_NAMESPACE::cout; 10 | #endif 11 | #if !defined(cerr) 12 | using _STLP_OLD_IO_NAMESPACE::cerr; 13 | #endif 14 | #if !defined(clog) 15 | using _STLP_OLD_IO_NAMESPACE::clog; 16 | #endif 17 | 18 | using _STLP_OLD_IO_NAMESPACE::endl; 19 | using _STLP_OLD_IO_NAMESPACE::ends; 20 | 21 | using _STLP_OLD_IO_NAMESPACE::ios; 22 | using _STLP_OLD_IO_NAMESPACE::flush; 23 | 24 | // using _STLP_OLD_IO_NAMESPACE::ws; 25 | -------------------------------------------------------------------------------- /test/eh/export: -------------------------------------------------------------------------------- 1 | LeakCheck.h 2 | Prefix.h 3 | SortClass.h 4 | TestClass.cpp 5 | TestClass.h 6 | Tests.h 7 | ThrowCompare.h 8 | export 9 | gcc.mak 10 | main.cpp 11 | nc_alloc.cpp 12 | nc_alloc.h 13 | random_number.cpp 14 | random_number.h 15 | sunpro.mak 16 | test_algo.cpp 17 | test_algobase.cpp 18 | test_assign_op.h 19 | test_bit_vector.cpp 20 | test_bitset.cpp 21 | test_construct.h 22 | test_deque.cpp 23 | test_hash_map.cpp 24 | test_hash_resize.h 25 | test_hash_set.cpp 26 | test_insert.h 27 | test_list.cpp 28 | test_map.cpp 29 | test_push_back.h 30 | test_push_front.h 31 | test_rope.cpp 32 | test_set.cpp 33 | test_slist.cpp 34 | test_string.cpp 35 | test_valarray.cpp 36 | test_vector.cpp 37 | vc.mak 38 | -------------------------------------------------------------------------------- /stlport/stl/_ioserr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is included in every header that needs the STLport library to be 3 | * built; the header files mostly are the iostreams-headers. The file checks for 4 | * _STLP_USE_NO_IOSTREAMS or _STLP_NO_IOSTREAMS being not defined, so that the 5 | * iostreams part of STLport cannot be used when the symbols were defined 6 | * accidentally. 7 | */ 8 | #if defined (_STLP_NO_IOSTREAMS) 9 | # error STLport iostreams header cannot be used; you chose not to use iostreams in the STLport configuration file (stlport/stl/config/user_config.h). 10 | #elif defined (_STLP_USE_NO_IOSTREAMS ) 11 | # error STLport iostreams header cannot be used; your compiler do not support it. 12 | #endif 13 | -------------------------------------------------------------------------------- /stlport/using/fstream: -------------------------------------------------------------------------------- 1 | #ifdef _STLP_BROKEN_USING_DIRECTIVE 2 | using namespace _STLP_STD; 3 | #else 4 | using _STLP_NEW_IO_NAMESPACE::basic_filebuf; 5 | using _STLP_NEW_IO_NAMESPACE::filebuf; 6 | using _STLP_NEW_IO_NAMESPACE::basic_ifstream; 7 | using _STLP_NEW_IO_NAMESPACE::basic_ofstream; 8 | using _STLP_NEW_IO_NAMESPACE::ifstream; 9 | using _STLP_NEW_IO_NAMESPACE::ofstream; 10 | using _STLP_NEW_IO_NAMESPACE::basic_fstream; 11 | using _STLP_NEW_IO_NAMESPACE::fstream; 12 | 13 | # ifndef _STLP_NO_WIDE_STREAMS 14 | using _STLP_NEW_IO_NAMESPACE::wofstream; 15 | using _STLP_NEW_IO_NAMESPACE::wfilebuf; 16 | using _STLP_NEW_IO_NAMESPACE::wifstream; 17 | using _STLP_NEW_IO_NAMESPACE::wfstream; 18 | # endif 19 | #endif 20 | -------------------------------------------------------------------------------- /test/compiler/ttei7.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * It is known that this code not compiled by following compilers: 3 | * 4 | * MSVC 6 5 | * 6 | * It is known that this code compiled by following compilers: 7 | * 8 | * MSVC 8 Beta 9 | */ 10 | 11 | /* 12 | * This code represent what STLport waits from a compiler which support 13 | * the rebind member template class technique (!_STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE) 14 | */ 15 | 16 | template 17 | struct A 18 | { 19 | template 20 | struct B 21 | { 22 | typedef A _Type; 23 | }; 24 | }; 25 | 26 | 27 | template 28 | struct C 29 | { 30 | typedef typename A:: template B::_Type _ATType; 31 | }; 32 | -------------------------------------------------------------------------------- /test/unit/pair_test.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "cppunit/cppunit_proxy.h" 6 | 7 | #if !defined (STLPORT) || defined(_STLP_USE_NAMESPACES) 8 | using namespace std; 9 | #endif 10 | 11 | // 12 | // TestCase class 13 | // 14 | class PairTest : public CPPUNIT_NS::TestCase 15 | { 16 | CPPUNIT_TEST_SUITE(PairTest); 17 | CPPUNIT_TEST(pair0); 18 | CPPUNIT_TEST_SUITE_END(); 19 | 20 | protected: 21 | void pair0(); 22 | }; 23 | 24 | CPPUNIT_TEST_SUITE_REGISTRATION(PairTest); 25 | 26 | // 27 | // tests implementation 28 | // 29 | void PairTest::pair0() 30 | { 31 | pair p = make_pair(1, 10); 32 | 33 | CPPUNIT_ASSERT(p.first==1); 34 | CPPUNIT_ASSERT(p.second==10); 35 | } 36 | -------------------------------------------------------------------------------- /test/unit/divides_test.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "cppunit/cppunit_proxy.h" 5 | 6 | #if !defined (STLPORT) || defined(_STLP_USE_NAMESPACES) 7 | using namespace std; 8 | #endif 9 | 10 | // 11 | // TestCase class 12 | // 13 | class DivideTest : public CPPUNIT_NS::TestCase 14 | { 15 | CPPUNIT_TEST_SUITE(DivideTest); 16 | CPPUNIT_TEST(div); 17 | CPPUNIT_TEST_SUITE_END(); 18 | 19 | protected: 20 | void div(); 21 | }; 22 | 23 | CPPUNIT_TEST_SUITE_REGISTRATION(DivideTest); 24 | 25 | // 26 | // tests implementation 27 | // 28 | void DivideTest::div() 29 | { 30 | int input [3] = { 2, 3, 4 }; 31 | int result = accumulate(input, input + 3, 48, divides()); 32 | CPPUNIT_ASSERT(result==2); 33 | } 34 | -------------------------------------------------------------------------------- /test/unit/times_test.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "cppunit/cppunit_proxy.h" 6 | 7 | #if !defined (STLPORT) || defined(_STLP_USE_NAMESPACES) 8 | using namespace std; 9 | #endif 10 | 11 | // 12 | // TestCase class 13 | // 14 | class TimesTest : public CPPUNIT_NS::TestCase 15 | { 16 | CPPUNIT_TEST_SUITE(TimesTest); 17 | CPPUNIT_TEST(times); 18 | CPPUNIT_TEST_SUITE_END(); 19 | 20 | protected: 21 | void times(); 22 | }; 23 | 24 | CPPUNIT_TEST_SUITE_REGISTRATION(TimesTest); 25 | 26 | // 27 | // tests implementation 28 | // 29 | void TimesTest::times() 30 | { 31 | int input [4] = { 1, 5, 7, 2 }; 32 | int total = accumulate(input, input + 4, 1, multiplies()); 33 | CPPUNIT_ASSERT(total==70); 34 | } 35 | -------------------------------------------------------------------------------- /STLPort.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {d2916c3b-f4a0-4e43-be07-6f5fff49c529} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {02350bae-0b6d-49ef-ae21-01db81213675} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {70733fd7-1831-42d6-940d-d60865bcab02} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav 15 | 16 | 17 | -------------------------------------------------------------------------------- /test/unit/advance_test.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "cppunit/cppunit_proxy.h" 5 | 6 | #if !defined (STLPORT) || defined(_STLP_USE_NAMESPACES) 7 | using namespace std; 8 | #endif 9 | 10 | // 11 | // TestCase class 12 | // 13 | class AdvanceTest : public CPPUNIT_NS::TestCase 14 | { 15 | CPPUNIT_TEST_SUITE(AdvanceTest); 16 | CPPUNIT_TEST(adv); 17 | CPPUNIT_TEST_SUITE_END(); 18 | 19 | protected: 20 | void adv(); 21 | }; 22 | 23 | CPPUNIT_TEST_SUITE_REGISTRATION(AdvanceTest); 24 | 25 | // 26 | // tests implementation 27 | // 28 | void AdvanceTest::adv() 29 | { 30 | typedef vector IntVector; 31 | IntVector v(10); 32 | for (int i = 0; (size_t)i < v.size(); ++i) 33 | v[i] = i; 34 | IntVector::iterator location = v.begin(); 35 | CPPUNIT_ASSERT(*location==0); 36 | advance(location, 5); 37 | CPPUNIT_ASSERT(*location==5); 38 | } 39 | -------------------------------------------------------------------------------- /test/compiler/ttei4.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * It is known that this code not compiled by following compilers: 3 | * gcc 2.95.3 4 | * gcc 3.3.3 5 | * gcc 3.4.1 6 | * 7 | * It is known that this code compiled by following compilers: 8 | * 9 | * MSVC 6 10 | * MSVC 8 Beta 11 | */ 12 | 13 | /* 14 | * Indeed this code is wrong: 1. explicit template specialization 15 | * have to appear out-of-class; 2. specialized struct C have to 16 | * have function f. 17 | * 18 | */ 19 | 20 | struct A 21 | { 22 | private: 23 | struct B 24 | { 25 | template 26 | static void f( T& ) {} 27 | 28 | template 29 | struct C 30 | { 31 | template 32 | static void f( T& ) {} 33 | }; 34 | 35 | template <> 36 | struct C 37 | { 38 | }; 39 | }; 40 | }; 41 | 42 | -------------------------------------------------------------------------------- /stlport/stl/config/_epilog.h: -------------------------------------------------------------------------------- 1 | #if defined (_STLP_MSVC) || defined (__ICL) || defined (__BORLANDC__) 2 | 3 | #if defined (__BORLANDC__) 4 | # pragma option pop 5 | # pragma option -w-pow // -w-8062 Previous options and warnings not restored 6 | #else 7 | # if !(defined (_STLP_MSVC) && (_STLP_MSVC < 1200)) 8 | # pragma warning (pop) 9 | # endif 10 | # pragma pack (pop) 11 | #endif 12 | 13 | #elif defined (__sgi) && !defined (__GNUC__) && (_MIPS_SIM != _MIPS_SIM_ABI32) 14 | 15 | # pragma reset woff 1174 16 | # pragma reset woff 1375 17 | # pragma reset woff 1209 18 | /* from iterator_base.h */ 19 | # pragma reset woff 1183 20 | 21 | #elif defined (__DECCXX) 22 | 23 | # ifdef __PRAGMA_ENVIRONMENT 24 | # pragma __environment __restore 25 | # endif 26 | 27 | #elif defined (__IBMCPP__) 28 | 29 | # pragma info(restore) 30 | 31 | #endif 32 | 33 | #pragma warning (suppress : 4103) 34 | -------------------------------------------------------------------------------- /test/compiler/ttei3.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * It is known that this code not compiled by following compilers: 3 | * gcc 2.95.3 4 | * gcc 3.3.3 5 | * gcc 3.4.1 6 | * 7 | * It is known that this code compiled by following compilers: 8 | * 9 | * MSVC 6 10 | * MSVC 8 Beta 11 | */ 12 | 13 | /* 14 | * Indeed this code is wrong: explicit template specialization 15 | * have to appear out-of-class. 16 | * 17 | */ 18 | 19 | struct A 20 | { 21 | private: 22 | struct B 23 | { 24 | template 25 | static void f( T& ) {} 26 | 27 | template 28 | struct C 29 | { 30 | template 31 | static void f( T& ) {} 32 | }; 33 | 34 | template <> 35 | struct C 36 | { 37 | template 38 | static void f( T& ) {} 39 | }; 40 | }; 41 | }; 42 | 43 | -------------------------------------------------------------------------------- /test/compiler/ttei5.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * It is known that this code not compiled by following compilers: 3 | * gcc 3.4.1 4 | * 5 | * It is known that this code compiled by following compilers: 6 | * gcc 2.95.3 7 | * gcc 3.3.3 8 | * 9 | * MSVC 6 10 | * MSVC 8 Beta 11 | */ 12 | 13 | /* 14 | * Indeed this code is wrong: explicit template specialization 15 | * have to appear out-of-class. 16 | * 17 | */ 18 | 19 | struct A 20 | { 21 | private: 22 | struct B 23 | { 24 | template 25 | static void f( T& ) {} 26 | 27 | template 28 | struct C 29 | { 30 | template 31 | static void f( T& ) {} 32 | }; 33 | 34 | template <> 35 | struct C 36 | { 37 | template 38 | static void f( T& ) {} 39 | }; 40 | }; 41 | }; 42 | 43 | -------------------------------------------------------------------------------- /stlport/stl/_prolog.h: -------------------------------------------------------------------------------- 1 | /* NOTE : this header has no guards and is MEANT for multiple inclusion! 2 | * If you are using "header protection" option with your compiler, 3 | * please also find #pragma which disables it and put it here, to 4 | * allow reentrancy of this header. 5 | */ 6 | 7 | #ifdef std 8 | # undef std /* We undef "std" on entry , as STLport headers may include native ones. */ 9 | #endif 10 | 11 | #ifdef _STLP_PROLOG_HEADER_INCLUDED 12 | # error STlport prolog header can not be reincluded as long as epilog has not be included. 13 | #endif 14 | 15 | #define _STLP_PROLOG_HEADER_INCLUDED 16 | 17 | #ifndef _STLP_FEATURES_H 18 | # include 19 | #endif 20 | 21 | /* If the platform provides any specific prolog actions, 22 | * like #pragmas, do include platform-specific prolog file */ 23 | #if defined (_STLP_HAS_SPECIFIC_PROLOG_EPILOG) 24 | # include 25 | #endif 26 | #pragma warning (suppress : 4103) 27 | -------------------------------------------------------------------------------- /test/unit/unary.h: -------------------------------------------------------------------------------- 1 | #ifndef _unary_h 2 | #define _unary_h 3 | #include 4 | #include 5 | #include //*TY 12/26/1998 - added to get unary_function 6 | 7 | #if !defined (STLPORT) || defined (_STLP_USE_NAMESPACES) 8 | using std::unary_function; 9 | #endif 10 | 11 | struct odd : public unary_function 12 | { 13 | // odd() {} 14 | bool operator()(int n_) const { return(n_ % 2) == 1; } 15 | }; 16 | 17 | struct positive : public unary_function 18 | { 19 | typedef int argument_type; 20 | typedef bool result_type; 21 | // positive() {} 22 | bool operator()(int n_) const { return n_ >= 0; } 23 | }; 24 | 25 | struct square_root : public unary_function 26 | { 27 | typedef double argument_type; 28 | typedef double result_type; 29 | square_root() {} 30 | square_root(const square_root &) {} 31 | double operator()(double x_) const 32 | { return ::sqrt(x_); } 33 | }; 34 | #endif // _unary_h 35 | -------------------------------------------------------------------------------- /test/eh/TestClass.cpp: -------------------------------------------------------------------------------- 1 | /*********************************************************************************** 2 | TestClass.cpp 3 | 4 | * Copyright (c) 1997 5 | * Mark of the Unicorn, Inc. 6 | * 7 | * Permission to use, copy, modify, distribute and sell this software 8 | * and its documentation for any purpose is hereby granted without fee, 9 | * provided that the above copyright notice appear in all copies and 10 | * that both that copyright notice and this permission notice appear 11 | * in supporting documentation. Mark of the Unicorn makes no 12 | * representations about the suitability of this software for any 13 | * purpose. It is provided "as is" without express or implied warranty. 14 | 15 | ***********************************************************************************/ 16 | #include "TestClass.h" 17 | 18 | #include 19 | 20 | std::ostream& operator << (std::ostream& s, const TestClass& t) { 21 | return s << t.value(); 22 | } 23 | 24 | 25 | -------------------------------------------------------------------------------- /stlport/stl/config/_apcc.h: -------------------------------------------------------------------------------- 1 | // STLport config file for Apogee 4.x 2 | 3 | #define _STLP_COMPILER "Apogee" 4 | 5 | #define _STLP_NO_NEW_NEW_HEADER 1 6 | #define _STLP_HAS_NO_NEW_IOSTREAMS 1 7 | #define _STLP_HAS_NO_NEW_C_HEADERS 1 8 | 9 | #if defined(_XOPEN_SOURCE) && (_XOPEN_VERSION - 0 >= 4) 10 | # define _STLP_RAND48 1 11 | #endif 12 | // # define _STLP_RAND48 1 13 | #define _STLP_LONG_LONG long long 14 | #define _STLP_NO_BAD_ALLOC 1 15 | #define _STLP_NO_MEMBER_TEMPLATE_KEYWORD 1 16 | #define _STLP_NON_TYPE_TMPL_PARAM_BUG 1 17 | // # define _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS 1 18 | #define _STLP_NO_EXCEPTION_HEADER 1 19 | 20 | #undef _STLP_LINK_TIME_INSTANTIATION 21 | #define _STLP_LINK_TIME_INSTANTIATION 1 22 | 23 | #ifdef __STDLIB 24 | # undef _STLP_NO_NEW_C_HEADERS 25 | # undef _STLP_NO_NEW_NEW_HEADER 26 | # undef _STLP_NO_BAD_ALLOC 27 | # undef _STLP_LONG_LONG 28 | #else 29 | # undef _STLP_NO_EXCEPTION_SPEC 30 | # define _STLP_NO_EXCEPTION_SPEC 1 31 | #endif 32 | -------------------------------------------------------------------------------- /test/unit/modulus_test.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "cppunit/cppunit_proxy.h" 5 | 6 | #if !defined (STLPORT) || defined(_STLP_USE_NAMESPACES) 7 | using namespace std; 8 | #endif 9 | 10 | // 11 | // TestCase class 12 | // 13 | class ModulusTest : public CPPUNIT_NS::TestCase 14 | { 15 | CPPUNIT_TEST_SUITE(ModulusTest); 16 | CPPUNIT_TEST(modulus0); 17 | CPPUNIT_TEST_SUITE_END(); 18 | 19 | protected: 20 | void modulus0(); 21 | }; 22 | 23 | CPPUNIT_TEST_SUITE_REGISTRATION(ModulusTest); 24 | 25 | // 26 | // tests implementation 27 | // 28 | void ModulusTest::modulus0() 29 | { 30 | int input1 [4] = { 6, 8, 10, 2 }; 31 | int input2 [4] = { 4, 2, 11, 3 }; 32 | 33 | int output [4]; 34 | 35 | transform((int*)input1, (int*)input1 + 4, (int*)input2, (int*)output, modulus()); 36 | CPPUNIT_ASSERT(output[0]==2); 37 | CPPUNIT_ASSERT(output[1]==0); 38 | CPPUNIT_ASSERT(output[2]==10); 39 | CPPUNIT_ASSERT(output[3]==2); 40 | } 41 | -------------------------------------------------------------------------------- /stlport/stl/_stlport_version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2005 4 | * Francois Dumont 5 | * 6 | * This material is provided "as is", with absolutely no warranty expressed 7 | * or implied. Any use is at your own risk. 8 | * 9 | * Permission to use or copy this software for any purpose is hereby granted 10 | * without fee, provided the above notices are retained on all copies. 11 | * Permission to modify the code and to distribute modified code is granted, 12 | * provided the above notices are retained, and a notice that the code was 13 | * modified is included with the above copyright notice. 14 | * 15 | */ 16 | 17 | #ifndef _STLP_STLPORT_VERSION_H 18 | #define _STLP_STLPORT_VERSION_H 19 | 20 | /* The last SGI STL release we merged with */ 21 | #define __SGI_STL 0x330 22 | 23 | /* STLport version */ 24 | #define _STLPORT_MAJOR 5 25 | #define _STLPORT_MINOR 1 26 | #define _STLPORT_PATCHLEVEL 3 27 | 28 | #define _STLPORT_VERSION 0x513 29 | 30 | #endif /* _STLP_STLPORT_VERSION_H */ 31 | -------------------------------------------------------------------------------- /stlport/stl/_check_config.h: -------------------------------------------------------------------------------- 1 | // This file is reserved to site configuration purpose 2 | // and should NEVER be overridden by user 3 | 4 | /* 5 | * Consistency check : if we use SGI iostreams, we have to use consistent 6 | * thread model (single-threaded or multi-threaded) with the compiled library 7 | * 8 | * Default is multithreaded build. If you want to build and use single-threaded 9 | * STLport, please change _STLP_NOTHREADS configuration setting above and rebuild the library 10 | * 11 | */ 12 | 13 | # if !defined(_STLP_USE_NO_IOSTREAMS) && !defined(_STLP_NO_THREADS) && !defined(_REENTRANT) 14 | 15 | # if defined(_MSC_VER) && !defined(__MWERKS__) && !defined (__COMO__) && !defined(_MT) 16 | # error "Only multi-threaded runtime library may be linked with STLport!" 17 | # endif 18 | 19 | // boris : you may change that to build non-threadsafe STLport library 20 | # if defined (__BUILDING_STLPORT) /* || defined (_STLP_DEBUG) */ 21 | # define _REENTRANT 1 22 | # endif 23 | 24 | # endif 25 | -------------------------------------------------------------------------------- /test/compiler/README: -------------------------------------------------------------------------------- 1 | 1. About this tests 2 | 3 | This is tests to check whether compiler understand or not some language 4 | construction. It is NOT tests for language support libraries, only tests for 5 | compiler! 6 | 7 | The main purposes of this tests is to help for developers to find correct 8 | workarounds, if compiler don't understand some (correct) language constructions. 9 | 10 | -------------------------------------------------------- 11 | 12 | 2. Compilation 13 | 14 | Compilation with GNU Make utility and gcc compiler: 15 | 16 | make -f gcc.mak -k 17 | 18 | 19 | 20 | -------------------------------------------------------- 21 | 22 | Notes about tests. 23 | 24 | ttei1.cpp, ttei2.cpp, ttei3.cpp, ttei4.cpp, ttei5.cpp: 25 | 26 | tests for template-in-the-template explicit specialization. 27 | Indeed ttei3.cpp, ttei4.cpp, ttei5.cpp suggest syntax not approved by standard 28 | (14.7.3, paragraphs 16--18), but ttei3.cpp, ttei4.cpp accepted (recheck!) by VC6, 29 | while ttei5.cpp accepted by gcc before 3.4.0. 30 | -------------------------------------------------------------------------------- /test/eh/bug.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | struct compare 8 | { 9 | bool operator()(int* x, int* y) 10 | { return *x < *y; } 11 | 12 | }; 13 | 14 | int main(int argc, char const* const argv[]) 15 | { 16 | std::size_t niters = argc < 2 ? 1000 : boost::lexical_cast(argv[1]); 17 | 18 | boost::timer t; 19 | 20 | std::vector v; 21 | for (int n = 0; n < niters; ++n) 22 | { 23 | v.insert(v.begin() + v.size()/2, n); 24 | } 25 | 26 | std::cout << "vector fill: " << t.elapsed() << std::endl; 27 | 28 | std::multiset m; 29 | for (int n = 0; n < niters; ++n) 30 | { 31 | m.insert(&v[n]); 32 | } 33 | std::cout << "map fill 1: " << t.elapsed() << std::endl; 34 | for (int n = 0; n < niters; ++n) 35 | { 36 | m.insert(&v[n]); 37 | } 38 | std::cout << "map fill 2: " << t.elapsed() << std::endl; 39 | } 40 | -------------------------------------------------------------------------------- /src/fstream_impl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 3 | * Silicon Graphics Computer Systems, Inc. 4 | * 5 | * Copyright (c) 1999 6 | * Boris Fomitchev 7 | * 8 | * This material is provided "as is", with absolutely no warranty expressed 9 | * or implied. Any use is at your own risk. 10 | * 11 | * Permission to use or copy this software for any purpose is hereby granted 12 | * without fee, provided the above notices are retained on all copies. 13 | * Permission to modify the code and to distribute modified code is granted, 14 | * provided the above notices are retained, and a notice that the code was 15 | * modified is included with the above copyright notice. 16 | * 17 | */ 18 | 19 | #ifndef FSTREAM_IMPL_H 20 | #define FSTREAM_IMPL_H 21 | 22 | #include "_stdio_file.h" 23 | 24 | _STLP_BEGIN_NAMESPACE 25 | _STLP_MOVE_TO_PRIV_NAMESPACE 26 | 27 | bool __is_regular_file(_STLP_fd fd); 28 | streamoff __file_size(_STLP_fd fd); 29 | 30 | _STLP_MOVE_TO_STD_NAMESPACE 31 | _STLP_END_NAMESPACE 32 | 33 | #endif /* FSTREAM_IMPL_H */ 34 | -------------------------------------------------------------------------------- /stlport/stl/_cstdarg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 3 | * Boris Fomitchev 4 | * 5 | * This material is provided "as is", with absolutely no warranty expressed 6 | * or implied. Any use is at your own risk. 7 | * 8 | * Permission to use or copy this software for any purpose is hereby granted 9 | * without fee, provided the above notices are retained on all copies. 10 | * Permission to modify the code and to distribute modified code is granted, 11 | * provided the above notices are retained, and a notice that the code was 12 | * modified is included with the above copyright notice. 13 | */ 14 | 15 | #ifndef _STLP_INTERNAL_CSTDARG 16 | #define _STLP_INTERNAL_CSTDARG 17 | 18 | #if defined (_STLP_USE_NEW_C_HEADERS) 19 | # include _STLP_NATIVE_CPP_C_HEADER(cstdarg) 20 | #else 21 | # include _STLP_NATIVE_C_HEADER(stdarg.h) 22 | #endif 23 | 24 | #ifdef _STLP_IMPORT_VENDOR_CSTD 25 | _STLP_BEGIN_NAMESPACE 26 | using _STLP_VENDOR_CSTD::va_list; 27 | _STLP_END_NAMESPACE 28 | #endif /* _STLP_IMPORT_VENDOR_CSTD */ 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /stlport/stl/_cstring.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 3 | * Boris Fomitchev 4 | * 5 | * This material is provided "as is", with absolutely no warranty expressed 6 | * or implied. Any use is at your own risk. 7 | * 8 | * Permission to use or copy this software for any purpose is hereby granted 9 | * without fee, provided the above notices are retained on all copies. 10 | * Permission to modify the code and to distribute modified code is granted, 11 | * provided the above notices are retained, and a notice that the code was 12 | * modified is included with the above copyright notice. 13 | * 14 | */ 15 | 16 | #ifndef _STLP_INTERNAL_CSTRING 17 | #define _STLP_INTERNAL_CSTRING 18 | 19 | #if defined (_STLP_USE_NEW_C_HEADERS) 20 | # include _STLP_NATIVE_CPP_C_HEADER(cstring) 21 | #else 22 | # include 23 | #endif 24 | 25 | #ifdef _STLP_IMPORT_VENDOR_CSTD 26 | _STLP_BEGIN_NAMESPACE 27 | # include 28 | _STLP_END_NAMESPACE 29 | #endif /* _STLP_IMPORT_VENDOR_CSTD */ 30 | 31 | #endif /* _STLP_INTERNAL_CSTRING */ 32 | -------------------------------------------------------------------------------- /test/unit/cppunit/cppunit_proxy.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2003, 2004 3 | * Zdenek Nemec 4 | * 5 | * This material is provided "as is", with absolutely no warranty expressed 6 | * or implied. Any use is at your own risk. 7 | * 8 | * Permission to use or copy this software for any purpose is hereby granted 9 | * without fee, provided the above notices are retained on all copies. 10 | * Permission to modify the code and to distribute modified code is granted, 11 | * provided the above notices are retained, and a notice that the code was 12 | * modified is included with the above copyright notice. 13 | * 14 | */ 15 | 16 | /* $Id: cppunit_proxy.h,v 1.2 2008-02-26 14:59:44 bazis Exp $ */ 17 | 18 | #ifndef _CPPUNITPROXYINTERFACE_H_ 19 | #define _CPPUNITPROXYINTERFACE_H_ 20 | 21 | /* 22 | * STLport specific 23 | */ 24 | #if !defined (CPPUNIT_MINI_USE_EXCEPTIONS) && \ 25 | (!defined (STLPORT) || defined (_STLP_USE_EXCEPTIONS)) 26 | # define CPPUNIT_MINI_USE_EXCEPTIONS 27 | #endif 28 | 29 | #include "cppunit_mini.h" 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /doc/README.mingw: -------------------------------------------------------------------------------- 1 | The MinGW package is used as to build STLport with different 2 | compilers 3 | 4 | 5 | If you use the MSys console take care about what make utility 6 | you are using. STLport comes with a GNU make build system design 7 | for unix like platforms, make files have not been adapted for the 8 | Windows platform. So you have to use the make command coming with 9 | the MinGW package 'mingw32-make' and not the one coming with MSys 10 | that is a portage of the GNU make for Windows. 11 | 12 | - gcc (native compiler): 13 | 14 | Makefile : gcc.mak 15 | 16 | WARNING : If you use the static version of the STLport 17 | libraries you have to define the _STLP_USE_STATIC_LIB 18 | macro in order to have your executable linked correctly. 19 | 20 | If you want to build STLport using the Mingw package without 21 | help of the GNU tools coming with Msys don't forget to signal 22 | your compiler (gcc) using the configure script: 23 | 24 | configure -c gcc 25 | 26 | - Borland C++ compiler: 27 | 28 | Makefile : bcc.mak 29 | -------------------------------------------------------------------------------- /test/unit/swap_test.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "cppunit/cppunit_proxy.h" 5 | 6 | #if !defined (STLPORT) || defined(_STLP_USE_NAMESPACES) 7 | using namespace std; 8 | #endif 9 | 10 | // 11 | // TestCase class 12 | // 13 | class SwapTest : public CPPUNIT_NS::TestCase 14 | { 15 | CPPUNIT_TEST_SUITE(SwapTest); 16 | CPPUNIT_TEST(swap1); 17 | CPPUNIT_TEST(swprnge1); 18 | CPPUNIT_TEST_SUITE_END(); 19 | 20 | protected: 21 | void swap1(); 22 | void swprnge1(); 23 | }; 24 | 25 | CPPUNIT_TEST_SUITE_REGISTRATION(SwapTest); 26 | 27 | // 28 | // tests implementation 29 | // 30 | void SwapTest::swap1() 31 | { 32 | int a = 42; 33 | int b = 19; 34 | swap(a, b); 35 | 36 | CPPUNIT_ASSERT(a==19); 37 | CPPUNIT_ASSERT(b==42); 38 | } 39 | void SwapTest::swprnge1() 40 | { 41 | char word1[] = "World"; 42 | char word2[] = "Hello"; 43 | swap_ranges((char*)word1, (char*)word1 + ::strlen(word1), (char*)word2); 44 | CPPUNIT_ASSERT(!strcmp(word1, "Hello")); 45 | CPPUNIT_ASSERT(!strcmp(word2, "World")); 46 | } 47 | -------------------------------------------------------------------------------- /doc/README.intel: -------------------------------------------------------------------------------- 1 | Build of STLport with Intel C++ compiler for Windows is identical 2 | to the one for Microsoft Visual Studio compiler (see README.msvc). 3 | 4 | Known issues: 5 | 6 | 1. If you have bind your Intel C++ compiler to the Visual Studio 6 7 | install and build your application without the -Qvc6 option you might 8 | experiement linking issue concerning 'std::unexpected' missing symbol. 9 | The reason of this problem is that without -Qvc6, ICL adds necessary 10 | code to invoke std::unexpected function when a raised exception is 11 | different to the one specified in a function prototype. As VC6 library 12 | do not contain this symbol ICL cannot find it anywhere. 13 | 14 | As a workaround, STLport has its own std::unexpected implementation 15 | that you will find in src/dll_main.cpp. ICL is looking for a static 16 | symbol so if you use STLport static lib ICL will use its std::unexpected 17 | implementation but if you use STLport dynamic lib then ICL won't find 18 | it. You only need then to copy/paste the STLport implementation somewhere 19 | in your implementation and ICL will be happy. 20 | -------------------------------------------------------------------------------- /stlport/ostream.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 3 | * Boris Fomitchev 4 | * 5 | * This material is provided "as is", with absolutely no warranty expressed 6 | * or implied. Any use is at your own risk. 7 | * 8 | * Permission to use or copy this software for any purpose is hereby granted 9 | * without fee, provided the above notices are retained on all copies. 10 | * Permission to modify the code and to distribute modified code is granted, 11 | * provided the above notices are retained, and a notice that the code was 12 | * modified is included with the above copyright notice. 13 | * 14 | */ 15 | 16 | #ifndef _STLP_OSTREAM_H 17 | #define _STLP_OSTREAM_H 18 | 19 | #ifndef _STLP_OUTERMOST_HEADER_ID 20 | # define _STLP_OUTERMOST_HEADER_ID 0x2051 21 | # include 22 | #endif 23 | 24 | #include 25 | 26 | #include 27 | 28 | #ifdef _STLP_USE_NAMESPACES 29 | # include 30 | #endif 31 | 32 | #if (_STLP_OUTERMOST_HEADER_ID == 0x2051) 33 | # include 34 | # undef _STLP_OUTERMOST_HEADER_ID 35 | #endif 36 | 37 | #endif /* _STLP_OSTREAM_H */ 38 | -------------------------------------------------------------------------------- /stlport/ios.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 3 | * Boris Fomitchev 4 | * 5 | * This material is provided "as is", with absolutely no warranty expressed 6 | * or implied. Any use is at your own risk. 7 | * 8 | * Permission to use or copy this software for any purpose is hereby granted 9 | * without fee, provided the above notices are retained on all copies. 10 | * Permission to modify the code and to distribute modified code is granted, 11 | * provided the above notices are retained, and a notice that the code was 12 | * modified is included with the above copyright notice. 13 | * 14 | */ 15 | 16 | #ifndef _STLP_IOS_H 17 | #define _STLP_IOS_H 18 | 19 | #ifndef _STLP_OUTERMOST_HEADER_ID 20 | # define _STLP_OUTERMOST_HEADER_ID 0x1033 21 | # include 22 | #endif 23 | 24 | #include 25 | 26 | #if defined (_STLP_USE_NAMESPACES) 27 | # include 28 | #endif 29 | 30 | #if (_STLP_OUTERMOST_HEADER_ID == 0x1033) 31 | # include 32 | # undef _STLP_OUTERMOST_HEADER_ID 33 | #endif 34 | 35 | #endif /* _STLP_IOS_H */ 36 | 37 | // Local Variables: 38 | // mode:C++ 39 | // End: 40 | -------------------------------------------------------------------------------- /test/eh/random_number.h: -------------------------------------------------------------------------------- 1 | /*********************************************************************************** 2 | random_number.h 3 | 4 | * Copyright (c) 1997-1998 5 | * Mark of the Unicorn, Inc. 6 | * 7 | * Permission to use, copy, modify, distribute and sell this software 8 | * and its documentation for any purpose is hereby granted without fee, 9 | * provided that the above copyright notice appear in all copies and 10 | * that both that copyright notice and this permission notice appear 11 | * in supporting documentation. Mark of the Unicorn makes no 12 | * representations about the suitability of this software for any 13 | * purpose. It is provided "as is" without express or implied warranty. 14 | 15 | ***********************************************************************************/ 16 | #ifndef RANDOM_NUMBER_DWA120298_H_ 17 | #define RANDOM_NUMBER_DWA120298_H_ 18 | 19 | #include 20 | 21 | // Return a random number in the given range. 22 | unsigned random_number( size_t range ); 23 | 24 | // default base for random container sizes 25 | extern unsigned random_base; 26 | 27 | #endif // #include guard 28 | -------------------------------------------------------------------------------- /stlport/stl/_string_npos.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005 3 | * Francois Dumont 4 | * 5 | * This material is provided "as is", with absolutely no warranty expressed 6 | * or implied. Any use is at your own risk. 7 | * 8 | * Permission to use or copy this software for any purpose is hereby granted 9 | * without fee, provided the above notices are retained on all copies. 10 | * Permission to modify the code and to distribute modified code is granted, 11 | * provided the above notices are retained, and a notice that the code was 12 | * modified is included with the above copyright notice. 13 | */ 14 | 15 | /* This header contains npos definition used in basic_string and rope 16 | * implementation. It do not have to be guarded as files including it 17 | * are already guarded and it has sometimes to be included several times. 18 | */ 19 | 20 | #if defined (_STLP_STATIC_CONST_INIT_BUG) 21 | enum { npos = -1 }; 22 | #elif defined (__GNUC__) && (__GNUC__ == 2) && (__GNUC_MINOR__ == 96) 23 | // inline initializer conflicts with 'extern template' 24 | static const size_t npos; 25 | #else 26 | static const size_t npos = ~(size_t)0; 27 | #endif 28 | -------------------------------------------------------------------------------- /stlport/stl/_null_stream.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2000 3 | * Boris Fomitchev 4 | * 5 | * This material is provided "as is", with absolutely no warranty expressed 6 | * or implied. Any use is at your own risk. 7 | * 8 | * Permission to use or copy this software for any purpose is hereby granted 9 | * without fee, provided the above notices are retained on all copies. 10 | * Permission to modify the code and to distribute modified code is granted, 11 | * provided the above notices are retained, and a notice that the code was 12 | * modified is included with the above copyright notice. 13 | * 14 | */ 15 | 16 | #ifndef _STLP_NULL_STREAM_H 17 | # define _STLP_NULL_STREAM_H 18 | 19 | _STLP_BEGIN_NAMESPACE 20 | 21 | struct __null_stream 22 | { 23 | void flush() { } 24 | }; 25 | 26 | template 27 | __null_stream& operator <<(__null_stream& __x, const _Tp& ) 28 | { 29 | return __x; 30 | } 31 | 32 | template 33 | __null_stream& operator >>(const _Tp&, __null_stream& __x ) 34 | { 35 | return __x; 36 | } 37 | 38 | extern __null_stream cin, cout, cerr, endl, ws, hex, dec; 39 | 40 | _STLP_END_NAMESPACE 41 | 42 | # endif 43 | -------------------------------------------------------------------------------- /stlport/unordered_map: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2004,2005 3 | * Francois Dumont 4 | * 5 | * This material is provided "as is", with absolutely no warranty expressed 6 | * or implied. Any use is at your own risk. 7 | * 8 | * Permission to use or copy this software for any purpose is hereby granted 9 | * without fee, provided the above notices are retained on all copies. 10 | * Permission to modify the code and to distribute modified code is granted, 11 | * provided the above notices are retained, and a notice that the code was 12 | * modified is included with the above copyright notice. 13 | * 14 | */ 15 | 16 | #ifndef _STLP_UNORDERED_MAP 17 | #define _STLP_UNORDERED_MAP 18 | 19 | #ifndef _STLP_OUTERMOST_HEADER_ID 20 | # define _STLP_OUTERMOST_HEADER_ID 0x4030 21 | # include 22 | #endif 23 | 24 | #ifdef _STLP_PRAGMA_ONCE 25 | # pragma once 26 | #endif 27 | 28 | #include 29 | 30 | #if (_STLP_OUTERMOST_HEADER_ID == 0x4030) 31 | # include 32 | # undef _STLP_OUTERMOST_HEADER_ID 33 | #endif 34 | 35 | #endif /* _STLP_UNORDERED_MAP */ 36 | 37 | // Local Variables: 38 | // mode:C++ 39 | // End: 40 | -------------------------------------------------------------------------------- /stlport/unordered_set: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2004,2005 3 | * Francois Dumont 4 | * 5 | * This material is provided "as is", with absolutely no warranty expressed 6 | * or implied. Any use is at your own risk. 7 | * 8 | * Permission to use or copy this software for any purpose is hereby granted 9 | * without fee, provided the above notices are retained on all copies. 10 | * Permission to modify the code and to distribute modified code is granted, 11 | * provided the above notices are retained, and a notice that the code was 12 | * modified is included with the above copyright notice. 13 | * 14 | */ 15 | 16 | #ifndef _STLP_UNORDERED_SET 17 | #define _STLP_UNORDERED_SET 18 | 19 | #ifndef _STLP_OUTERMOST_HEADER_ID 20 | # define _STLP_OUTERMOST_HEADER_ID 0x4031 21 | # include 22 | #endif 23 | 24 | #ifdef _STLP_PRAGMA_ONCE 25 | # pragma once 26 | #endif 27 | 28 | #include 29 | 30 | #if (_STLP_OUTERMOST_HEADER_ID == 0x4031) 31 | # include 32 | # undef _STLP_OUTERMOST_HEADER_ID 33 | #endif 34 | 35 | #endif /* _STLP_UNORDERED_SET */ 36 | 37 | // Local Variables: 38 | // mode:C++ 39 | // End: 40 | -------------------------------------------------------------------------------- /test/unit/lexcmp_test.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "cppunit/cppunit_proxy.h" 6 | 7 | #if !defined (STLPORT) || defined(_STLP_USE_NAMESPACES) 8 | using namespace std; 9 | #endif 10 | 11 | // 12 | // TestCase class 13 | // 14 | class LexcmpTest : public CPPUNIT_NS::TestCase 15 | { 16 | CPPUNIT_TEST_SUITE(LexcmpTest); 17 | CPPUNIT_TEST(lexcmp1); 18 | CPPUNIT_TEST(lexcmp2); 19 | CPPUNIT_TEST_SUITE_END(); 20 | 21 | protected: 22 | void lexcmp1(); 23 | void lexcmp2(); 24 | }; 25 | 26 | CPPUNIT_TEST_SUITE_REGISTRATION(LexcmpTest); 27 | 28 | // 29 | // tests implementation 30 | // 31 | void LexcmpTest::lexcmp1() 32 | { 33 | const unsigned size = 6; 34 | char n1[size] = "shoe"; 35 | char n2[size] = "shine"; 36 | 37 | bool before = lexicographical_compare(n1, n1 + size, n2, n2 + size); 38 | CPPUNIT_ASSERT(!before); 39 | } 40 | void LexcmpTest::lexcmp2() 41 | { 42 | const unsigned size = 6; 43 | char n1[size] = "shoe"; 44 | char n2[size] = "shine"; 45 | 46 | bool before = lexicographical_compare(n1, n1 + size, n2, n2 + size, greater()); 47 | CPPUNIT_ASSERT(before); 48 | } 49 | -------------------------------------------------------------------------------- /test/unit/full_streambuf.h: -------------------------------------------------------------------------------- 1 | #ifndef _FULL_STREAM_H 2 | #define _FULL_STREAM_H 3 | 4 | #include 5 | 6 | /* 7 | * This full_streambuf purpose is to act like a full disk to check the right behavior 8 | * of the STLport code in such a case. 9 | */ 10 | 11 | class full_streambuf : public std::streambuf { 12 | public: 13 | typedef std::streambuf _Base; 14 | 15 | typedef _Base::int_type int_type; 16 | typedef _Base::traits_type traits_type; 17 | 18 | full_streambuf(size_t nb_output, bool do_throw = false) 19 | : _nb_output(nb_output), _do_throw(do_throw) 20 | {} 21 | 22 | std::string const& str() const 23 | { return _buf; } 24 | 25 | protected: 26 | int_type overflow(int_type c) { 27 | if (_nb_output == 0) { 28 | #if !defined (STLPORT) || defined (_STLP_USE_EXCEPTIONS) 29 | if (_do_throw) { 30 | throw "streambuf full"; 31 | } 32 | #endif 33 | return traits_type::eof(); 34 | } 35 | --_nb_output; 36 | _buf += traits_type::to_char_type(c); 37 | return c; 38 | } 39 | 40 | private: 41 | size_t _nb_output; 42 | bool _do_throw; 43 | std::string _buf; 44 | }; 45 | 46 | #endif //_FULL_STREAM_H 47 | -------------------------------------------------------------------------------- /test/unit/less_test.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "cppunit/cppunit_proxy.h" 6 | 7 | #if !defined (STLPORT) || defined(_STLP_USE_NAMESPACES) 8 | using namespace std; 9 | #endif 10 | 11 | // 12 | // TestCase class 13 | // 14 | class LessTest : public CPPUNIT_NS::TestCase 15 | { 16 | CPPUNIT_TEST_SUITE(LessTest); 17 | CPPUNIT_TEST(lesst); 18 | CPPUNIT_TEST(lesseqt); 19 | CPPUNIT_TEST_SUITE_END(); 20 | 21 | protected: 22 | void lesst(); 23 | void lesseqt(); 24 | }; 25 | 26 | CPPUNIT_TEST_SUITE_REGISTRATION(LessTest); 27 | 28 | // 29 | // tests implementation 30 | // 31 | void LessTest::lesst() 32 | { 33 | int array [4] = { 3, 1, 4, 2 }; 34 | sort(array, array + 4, less()); 35 | 36 | CPPUNIT_ASSERT(array[0]==1); 37 | CPPUNIT_ASSERT(array[1]==2); 38 | CPPUNIT_ASSERT(array[2]==3); 39 | CPPUNIT_ASSERT(array[3]==4); 40 | } 41 | void LessTest::lesseqt() 42 | { 43 | int array [4] = { 3, 1, 4, 2 }; 44 | sort(array, array + 4, less_equal()); 45 | 46 | CPPUNIT_ASSERT(array[0]==1); 47 | CPPUNIT_ASSERT(array[1]==2); 48 | CPPUNIT_ASSERT(array[2]==3); 49 | CPPUNIT_ASSERT(array[3]==4); 50 | } 51 | -------------------------------------------------------------------------------- /test/unit/iota_test.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "cppunit/cppunit_proxy.h" 5 | 6 | #if defined(_STLP_USE_NAMESPACES) 7 | using namespace std; 8 | #endif 9 | 10 | // 11 | // TestCase class 12 | // 13 | class IotaTest : public CPPUNIT_NS::TestCase 14 | { 15 | CPPUNIT_TEST_SUITE(IotaTest); 16 | #if !defined (STLPORT) || defined (_STLP_NO_EXTENSIONS) 17 | CPPUNIT_IGNORE; 18 | #endif 19 | CPPUNIT_TEST(iota1); 20 | CPPUNIT_TEST_SUITE_END(); 21 | 22 | protected: 23 | void iota1(); 24 | }; 25 | 26 | CPPUNIT_TEST_SUITE_REGISTRATION(IotaTest); 27 | 28 | // 29 | // tests implementation 30 | // 31 | void IotaTest::iota1() 32 | { 33 | #if defined (STLPORT) && !defined (_STLP_NO_EXTENSIONS) 34 | int numbers[10]; 35 | iota(numbers, numbers + 10, 42); 36 | CPPUNIT_ASSERT(numbers[0]==42); 37 | CPPUNIT_ASSERT(numbers[1]==43); 38 | CPPUNIT_ASSERT(numbers[2]==44); 39 | CPPUNIT_ASSERT(numbers[3]==45); 40 | CPPUNIT_ASSERT(numbers[4]==46); 41 | CPPUNIT_ASSERT(numbers[5]==47); 42 | CPPUNIT_ASSERT(numbers[6]==48); 43 | CPPUNIT_ASSERT(numbers[7]==49); 44 | CPPUNIT_ASSERT(numbers[8]==50); 45 | CPPUNIT_ASSERT(numbers[9]==51); 46 | #endif 47 | } 48 | -------------------------------------------------------------------------------- /stlport/fstream.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 3 | * Boris Fomitchev 4 | * 5 | * This material is provided "as is", with absolutely no warranty expressed 6 | * or implied. Any use is at your own risk. 7 | * 8 | * Permission to use or copy this software for any purpose is hereby granted 9 | * without fee, provided the above notices are retained on all copies. 10 | * Permission to modify the code and to distribute modified code is granted, 11 | * provided the above notices are retained, and a notice that the code was 12 | * modified is included with the above copyright notice. 13 | * 14 | */ 15 | 16 | #ifndef _STLP_FSTREAM_H 17 | #define _STLP_FSTREAM_H 18 | 19 | #ifndef _STLP_OUTERMOST_HEADER_ID 20 | # define _STLP_OUTERMOST_HEADER_ID 0x2026 21 | # include 22 | #endif 23 | 24 | #include 25 | 26 | // get desired pollution 27 | #include 28 | 29 | #ifndef _STLP_HAS_NO_NAMESPACES 30 | # include 31 | #endif 32 | 33 | #if (_STLP_OUTERMOST_HEADER_ID == 0x2026) 34 | # include 35 | # undef _STLP_OUTERMOST_HEADER_ID 36 | #endif 37 | 38 | #endif /* _STLP_FSTREAM_H */ 39 | 40 | // Local Variables: 41 | // mode:C++ 42 | // End: 43 | -------------------------------------------------------------------------------- /stlport/ctime: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 3 | * Boris Fomitchev 4 | * 5 | * This material is provided "as is", with absolutely no warranty expressed 6 | * or implied. Any use is at your own risk. 7 | * 8 | * Permission to use or copy this software for any purpose is hereby granted 9 | * without fee, provided the above notices are retained on all copies. 10 | * Permission to modify the code and to distribute modified code is granted, 11 | * provided the above notices are retained, and a notice that the code was 12 | * modified is included with the above copyright notice. 13 | */ 14 | 15 | #ifndef _STLP_CTIME 16 | 17 | #ifndef _STLP_OUTERMOST_HEADER_ID 18 | # define _STLP_OUTERMOST_HEADER_ID 0x118 19 | # define _STLP_CTIME 20 | # include 21 | #endif 22 | 23 | #if (_STLP_OUTERMOST_HEADER_ID != 0x118) 24 | # include _STLP_NATIVE_CPP_C_HEADER(ctime) 25 | #else 26 | # ifndef _STLP_INTERNAL_CTIME 27 | # include 28 | # endif 29 | #endif 30 | 31 | #if (_STLP_OUTERMOST_HEADER_ID == 0x118) 32 | # include 33 | # undef _STLP_OUTERMOST_HEADER_ID 34 | #endif 35 | 36 | #endif /* _STLP_CTIME */ 37 | 38 | // Local Variables: 39 | // mode:C++ 40 | // End: 41 | -------------------------------------------------------------------------------- /test/unit/accum_test.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "cppunit/cppunit_proxy.h" 5 | 6 | #if !defined (STLPORT) || defined (_STLP_USE_NAMESPACES) 7 | using namespace std; 8 | #endif 9 | 10 | // 11 | // TestCase class 12 | // 13 | class AccumTest : public CPPUNIT_NS::TestCase 14 | { 15 | CPPUNIT_TEST_SUITE(AccumTest); 16 | CPPUNIT_TEST(accum1); 17 | CPPUNIT_TEST(accum2); 18 | CPPUNIT_TEST_SUITE_END(); 19 | 20 | protected: 21 | void accum1(); 22 | void accum2(); 23 | static int mult(int initial_, int element_); 24 | }; 25 | 26 | CPPUNIT_TEST_SUITE_REGISTRATION(AccumTest); 27 | 28 | // 29 | // tests implementation 30 | // 31 | void AccumTest::accum1() 32 | { 33 | vector v(5); 34 | for(int i = 0; (size_t)i < v.size(); ++i) 35 | v[i] = i + 1; 36 | int sum = accumulate(v.begin(), v.end(), 0); 37 | CPPUNIT_ASSERT(sum==15); 38 | } 39 | void AccumTest::accum2() 40 | { 41 | vector v(5); 42 | for(int i = 0; (size_t)i < v.size(); ++i) 43 | v[i] = i + 1; 44 | int prod = accumulate(v.begin(), v.end(), 1, mult); 45 | CPPUNIT_ASSERT(prod==120); 46 | } 47 | int AccumTest::mult(int initial_, int element_) 48 | { 49 | return initial_ * element_; 50 | } 51 | -------------------------------------------------------------------------------- /test/unit/greater_test.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "cppunit/cppunit_proxy.h" 6 | 7 | #if !defined (STLPORT) || defined(_STLP_USE_NAMESPACES) 8 | using namespace std; 9 | #endif 10 | 11 | // 12 | // TestCase class 13 | // 14 | class GreaterTest : public CPPUNIT_NS::TestCase 15 | { 16 | CPPUNIT_TEST_SUITE(GreaterTest); 17 | CPPUNIT_TEST(greatert); 18 | CPPUNIT_TEST(greatereq); 19 | CPPUNIT_TEST_SUITE_END(); 20 | 21 | protected: 22 | void greatert(); 23 | void greatereq(); 24 | }; 25 | 26 | CPPUNIT_TEST_SUITE_REGISTRATION(GreaterTest); 27 | 28 | // 29 | // tests implementation 30 | // 31 | void GreaterTest::greatert() 32 | { 33 | int array[4] = { 3, 1, 4, 2 }; 34 | sort(array, array + 4, greater() ); 35 | 36 | CPPUNIT_ASSERT(array[0]==4); 37 | CPPUNIT_ASSERT(array[1]==3); 38 | CPPUNIT_ASSERT(array[2]==2); 39 | CPPUNIT_ASSERT(array[3]==1); 40 | } 41 | void GreaterTest::greatereq() 42 | { 43 | int array [4] = { 3, 1, 4, 2 }; 44 | sort(array, array + 4, greater_equal()); 45 | CPPUNIT_ASSERT(array[0]==4); 46 | CPPUNIT_ASSERT(array[1]==3); 47 | CPPUNIT_ASSERT(array[2]==2); 48 | CPPUNIT_ASSERT(array[3]==1); 49 | } 50 | -------------------------------------------------------------------------------- /stlport/cmath: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 3 | * Boris Fomitchev 4 | * 5 | * This material is provided "as is", with absolutely no warranty expressed 6 | * or implied. Any use is at your own risk. 7 | * 8 | * Permission to use or copy this software for any purpose is hereby granted 9 | * without fee, provided the above notices are retained on all copies. 10 | * Permission to modify the code and to distribute modified code is granted, 11 | * provided the above notices are retained, and a notice that the code was 12 | * modified is included with the above copyright notice. 13 | * 14 | */ 15 | 16 | #ifndef _STLP_CMATH 17 | 18 | #ifndef _STLP_OUTERMOST_HEADER_ID 19 | # define _STLP_OUTERMOST_HEADER_ID 0x110 20 | # define _STLP_CMATH 21 | # include 22 | #endif 23 | 24 | #if (_STLP_OUTERMOST_HEADER_ID != 0x110) 25 | # include _STLP_NATIVE_CPP_C_HEADER(cmath) 26 | #else 27 | # ifndef _STLP_INTERNAL_CMATH 28 | # include 29 | # endif 30 | #endif 31 | 32 | #if (_STLP_OUTERMOST_HEADER_ID == 0x110 ) 33 | # include 34 | # undef _STLP_OUTERMOST_HEADER_ID 35 | #endif 36 | 37 | #endif /* _STLP_CMATH */ 38 | 39 | // Local Variables: 40 | // mode:C++ 41 | // End: 42 | -------------------------------------------------------------------------------- /stlport/new: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 3 | * Boris Fomitchev 4 | * 5 | * This material is provided "as is", with absolutely no warranty expressed 6 | * or implied. Any use is at your own risk. 7 | * 8 | * Permission to use or copy this software for any purpose is hereby granted 9 | * without fee, provided the above notices are retained on all copies. 10 | * Permission to modify the code and to distribute modified code is granted, 11 | * provided the above notices are retained, and a notice that the code was 12 | * modified is included with the above copyright notice. 13 | * 14 | */ 15 | 16 | #ifndef _STLP_NEW_HEADER 17 | #define _STLP_NEW_HEADER 18 | 19 | #ifndef _STLP_OUTERMOST_HEADER_ID 20 | # define _STLP_OUTERMOST_HEADER_ID 0x447 21 | # include 22 | #endif 23 | 24 | #if (_STLP_OUTERMOST_HEADER_ID != 0x447) 25 | # include _STLP_NATIVE_CPP_RUNTIME_HEADER(new) 26 | #else 27 | # ifndef _STLP_NEW_H_HEADER 28 | # include 29 | # endif 30 | #endif 31 | 32 | #if (_STLP_OUTERMOST_HEADER_ID == 0x447) 33 | # include 34 | # undef _STLP_OUTERMOST_HEADER_ID 35 | #endif 36 | 37 | #endif /* _STLP_NEW */ 38 | 39 | // Local Variables: 40 | // mode:C++ 41 | // End: 42 | -------------------------------------------------------------------------------- /stlport/typeinfo: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 3 | * Boris Fomitchev 4 | * 5 | * This material is provided "as is", with absolutely no warranty expressed 6 | * or implied. Any use is at your own risk. 7 | * 8 | * Permission to use or copy this software for any purpose is hereby granted 9 | * without fee, provided the above notices are retained on all copies. 10 | * Permission to modify the code and to distribute modified code is granted, 11 | * provided the above notices are retained, and a notice that the code was 12 | * modified is included with the above copyright notice. 13 | * 14 | */ 15 | 16 | #ifndef _STLP_TYPEINFO 17 | 18 | #ifndef _STLP_OUTERMOST_HEADER_ID 19 | # define _STLP_OUTERMOST_HEADER_ID 0x473 20 | # define _STLP_TYPEINFO 21 | # include 22 | #endif 23 | 24 | #if (_STLP_OUTERMOST_HEADER_ID != 0x473) 25 | # include _STLP_NATIVE_CPP_RUNTIME_HEADER(typeinfo) 26 | #else 27 | # ifndef _STLP_INTERNAL_TYPEINFO 28 | # include 29 | # endif 30 | #endif 31 | 32 | #if (_STLP_OUTERMOST_HEADER_ID == 0x473) 33 | # include 34 | # undef _STLP_OUTERMOST_HEADER_ID 35 | #endif 36 | 37 | #endif 38 | 39 | // Local Variables: 40 | // mode:C++ 41 | // End: 42 | -------------------------------------------------------------------------------- /test/eh/test.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | template 6 | inline void printElements(const T& coll, const char* msg = "") 7 | { 8 | typename T::const_iterator it; 9 | std::cout << msg; 10 | for(it = coll.begin(); it != coll.end(); ++it) { 11 | std::cout << *it << ' '; 12 | } 13 | std::cout << std:: endl; 14 | } 15 | 16 | int main(int /* argc */, char** /* argv */) 17 | { 18 | std::set set1, set2; 19 | std::vector aVector; 20 | 21 | aVector.push_back(1); 22 | aVector.push_back(1); 23 | 24 | set1.insert(aVector.begin(), aVector.end()); 25 | 26 | set2.insert(1); 27 | set2.insert(1); 28 | 29 | printElements(aVector, "vector: "); 30 | printElements(set1, "set1 : "); 31 | printElements(set2, "set2 : "); 32 | 33 | return 0; 34 | } 35 | # if 0 36 | # include 37 | main() 38 | { 39 | // std::stringstream tstr; 40 | std::cout<<"hello world\n"; 41 | } 42 | # endif 43 | -------------------------------------------------------------------------------- /test/unit/bnegate_test.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "cppunit/cppunit_proxy.h" 5 | 6 | #if !defined (STLPORT) || defined(_STLP_USE_NAMESPACES) 7 | using namespace std; 8 | #endif 9 | 10 | // 11 | // TestCase class 12 | // 13 | class BnegateTest : public CPPUNIT_NS::TestCase 14 | { 15 | CPPUNIT_TEST_SUITE(BnegateTest); 16 | CPPUNIT_TEST(bnegate1); 17 | CPPUNIT_TEST(bnegate2); 18 | CPPUNIT_TEST_SUITE_END(); 19 | 20 | protected: 21 | void bnegate1(); 22 | void bnegate2(); 23 | }; 24 | 25 | CPPUNIT_TEST_SUITE_REGISTRATION(BnegateTest); 26 | 27 | // 28 | // tests implementation 29 | // 30 | void BnegateTest::bnegate1() 31 | { 32 | int array [4] = { 4, 9, 7, 1 }; 33 | 34 | sort(array, array + 4, binary_negate >(greater())); 35 | CPPUNIT_ASSERT(array[0]==1); 36 | CPPUNIT_ASSERT(array[1]==4); 37 | CPPUNIT_ASSERT(array[2]==7); 38 | CPPUNIT_ASSERT(array[3]==9); 39 | } 40 | void BnegateTest::bnegate2() 41 | { 42 | int array [4] = { 4, 9, 7, 1 }; 43 | sort(array, array + 4, not2(greater())); 44 | CPPUNIT_ASSERT(array[0]==1); 45 | CPPUNIT_ASSERT(array[1]==4); 46 | CPPUNIT_ASSERT(array[2]==7); 47 | CPPUNIT_ASSERT(array[3]==9); 48 | } 49 | -------------------------------------------------------------------------------- /stlport/cctype: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 3 | * Boris Fomitchev 4 | * 5 | * This material is provided "as is", with absolutely no warranty expressed 6 | * or implied. Any use is at your own risk. 7 | * 8 | * Permission to use or copy this software for any purpose is hereby granted 9 | * without fee, provided the above notices are retained on all copies. 10 | * Permission to modify the code and to distribute modified code is granted, 11 | * provided the above notices are retained, and a notice that the code was 12 | * modified is included with the above copyright notice. 13 | * 14 | */ 15 | 16 | #ifndef _STLP_CCTYPE 17 | 18 | #ifndef _STLP_OUTERMOST_HEADER_ID 19 | # define _STLP_OUTERMOST_HEADER_ID 0x104 20 | # define _STLP_CCTYPE 21 | # include 22 | #endif 23 | 24 | #if (_STLP_OUTERMOST_HEADER_ID != 0x104 ) 25 | # include _STLP_NATIVE_CPP_C_HEADER(cctype) 26 | #else 27 | # ifndef _STLP_INTERNAL_CCTYPE 28 | # include 29 | # endif 30 | #endif 31 | 32 | #if (_STLP_OUTERMOST_HEADER_ID == 0x104 ) 33 | # include 34 | # undef _STLP_OUTERMOST_HEADER_ID 35 | #endif 36 | 37 | #endif /* _STLP_CCTYPE */ 38 | 39 | // Local Variables: 40 | // mode:C++ 41 | // End: 42 | -------------------------------------------------------------------------------- /stlport/cstdarg: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 3 | * Boris Fomitchev 4 | * 5 | * This material is provided "as is", with absolutely no warranty expressed 6 | * or implied. Any use is at your own risk. 7 | * 8 | * Permission to use or copy this software for any purpose is hereby granted 9 | * without fee, provided the above notices are retained on all copies. 10 | * Permission to modify the code and to distribute modified code is granted, 11 | * provided the above notices are retained, and a notice that the code was 12 | * modified is included with the above copyright notice. 13 | */ 14 | 15 | #ifndef _STLP_CSTDARG 16 | 17 | #ifndef _STLP_OUTERMOST_HEADER_ID 18 | # define _STLP_OUTERMOST_HEADER_ID 0x113 19 | # define _STLP_CSTDARG 20 | # include 21 | #endif 22 | 23 | #if (_STLP_OUTERMOST_HEADER_ID != 0x113) 24 | # include _STLP_NATIVE_CPP_C_HEADER(cstdarg) 25 | #else 26 | # ifndef _STLP_INTERNAL_CSTDARG 27 | # include 28 | # endif 29 | #endif 30 | 31 | #if (_STLP_OUTERMOST_HEADER_ID == 0x113 ) 32 | # include 33 | # undef _STLP_OUTERMOST_HEADER_ID 34 | #endif 35 | 36 | #endif /* _STLP_CSTDARG */ 37 | 38 | // Local Variables: 39 | // mode:C++ 40 | // End: 41 | -------------------------------------------------------------------------------- /stlport/cstdio: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 3 | * Boris Fomitchev 4 | * 5 | * This material is provided "as is", with absolutely no warranty expressed 6 | * or implied. Any use is at your own risk. 7 | * 8 | * Permission to use or copy this software for any purpose is hereby granted 9 | * without fee, provided the above notices are retained on all copies. 10 | * Permission to modify the code and to distribute modified code is granted, 11 | * provided the above notices are retained, and a notice that the code was 12 | * modified is included with the above copyright notice. 13 | * 14 | */ 15 | 16 | #ifndef _STLP_CSTDIO 17 | #define _STLP_CSTDIO 18 | 19 | #ifndef _STLP_OUTERMOST_HEADER_ID 20 | # define _STLP_OUTERMOST_HEADER_ID 0x15 21 | # define _STLP_CSTDIO 22 | # include 23 | #endif 24 | 25 | #if (_STLP_OUTERMOST_HEADER_ID != 0x15) 26 | # include _STLP_NATIVE_CPP_C_HEADER(cstdio) 27 | #else 28 | # ifndef _STLP_INTERNAL_CSTDIO 29 | # include 30 | # endif 31 | #endif 32 | 33 | #if (_STLP_OUTERMOST_HEADER_ID == 0x15) 34 | # include 35 | # undef _STLP_OUTERMOST_HEADER_ID 36 | #endif 37 | 38 | #endif 39 | 40 | // Local Variables: 41 | // mode:C++ 42 | // End: 43 | -------------------------------------------------------------------------------- /stlport/exception.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 3 | * Boris Fomitchev 4 | * 5 | * This material is provided "as is", with absolutely no warranty expressed 6 | * or implied. Any use is at your own risk. 7 | * 8 | * Permission to use or copy this software for any purpose is hereby granted 9 | * without fee, provided the above notices are retained on all copies. 10 | * Permission to modify the code and to distribute modified code is granted, 11 | * provided the above notices are retained, and a notice that the code was 12 | * modified is included with the above copyright notice. 13 | * 14 | */ 15 | 16 | #ifndef _STLP_OLDSTD_exception 17 | #define _STLP_OLDSTD_exception 18 | 19 | #if !defined (_STLP_OUTERMOST_HEADER_ID) 20 | # define _STLP_OUTERMOST_HEADER_ID 0x824 21 | # include 22 | #endif 23 | 24 | #if defined (__BORLANDC__) || defined (_MSC_VER) 25 | # include 26 | #else 27 | # include _STLP_NATIVE_CPP_RUNTIME_HEADER(exception.h) 28 | #endif 29 | 30 | #if (_STLP_OUTERMOST_HEADER_ID == 0x824) 31 | # include 32 | # undef _STLP_OUTERMOST_HEADER_ID 33 | #endif 34 | 35 | #endif /* _STLP_OLDSTD_exception */ 36 | 37 | // Local Variables: 38 | // mode:C++ 39 | // End: 40 | -------------------------------------------------------------------------------- /stlport/ios: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 3 | * Silicon Graphics Computer Systems, Inc. 4 | * 5 | * Copyright (c) 1999 6 | * Boris Fomitchev 7 | * 8 | * This material is provided "as is", with absolutely no warranty expressed 9 | * or implied. Any use is at your own risk. 10 | * 11 | * Permission to use or copy this software for any purpose is hereby granted 12 | * without fee, provided the above notices are retained on all copies. 13 | * Permission to modify the code and to distribute modified code is granted, 14 | * provided the above notices are retained, and a notice that the code was 15 | * modified is included with the above copyright notice. 16 | * 17 | */ 18 | 19 | #ifndef _STLP_IOS 20 | #define _STLP_IOS 21 | 22 | # ifndef _STLP_OUTERMOST_HEADER_ID 23 | # define _STLP_OUTERMOST_HEADER_ID 0x1032 24 | # include 25 | # endif 26 | 27 | # ifdef _STLP_PRAGMA_ONCE 28 | # pragma once 29 | # endif 30 | 31 | # include 32 | # include 33 | 34 | # if (_STLP_OUTERMOST_HEADER_ID == 0x1032) 35 | # include 36 | # undef _STLP_OUTERMOST_HEADER_ID 37 | # endif 38 | 39 | #endif /* _STLP_IOS */ 40 | 41 | // Local Variables: 42 | // mode:C++ 43 | // End: 44 | -------------------------------------------------------------------------------- /stlport/limits.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 3 | * Boris Fomitchev 4 | * 5 | * This material is provided "as is", with absolutely no warranty expressed 6 | * or implied. Any use is at your own risk. 7 | * 8 | * Permission to use or copy this software for any purpose is hereby granted 9 | * without fee, provided the above notices are retained on all copies. 10 | * Permission to modify the code and to distribute modified code is granted, 11 | * provided the above notices are retained, and a notice that the code was 12 | * modified is included with the above copyright notice. 13 | * 14 | */ 15 | 16 | #if !defined (_STLP_OUTERMOST_HEADER_ID) 17 | # define _STLP_OUTERMOST_HEADER_ID 0x201 18 | # include 19 | #elif (_STLP_OUTERMOST_HEADER_ID == 0x201) && ! defined (_STLP_DONT_POP_HEADER_ID) 20 | # define _STLP_DONT_POP_HEADER_ID 21 | #endif 22 | 23 | #if defined(_STLP_WCE_EVC3) 24 | struct _exception; 25 | #endif 26 | 27 | #include _STLP_NATIVE_C_HEADER(limits.h) 28 | 29 | #if (_STLP_OUTERMOST_HEADER_ID == 0x201) 30 | # if ! defined (_STLP_DONT_POP_HEADER_ID) 31 | # include 32 | # undef _STLP_OUTERMOST_HEADER_ID 33 | # endif 34 | # undef _STLP_DONT_POP_HEADER_ID 35 | #endif 36 | -------------------------------------------------------------------------------- /stlport/clocale: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 3 | * Boris Fomitchev 4 | * 5 | * This material is provided "as is", with absolutely no warranty expressed 6 | * or implied. Any use is at your own risk. 7 | * 8 | * Permission to use or copy this software for any purpose is hereby granted 9 | * without fee, provided the above notices are retained on all copies. 10 | * Permission to modify the code and to distribute modified code is granted, 11 | * provided the above notices are retained, and a notice that the code was 12 | * modified is included with the above copyright notice. 13 | * 14 | */ 15 | 16 | #ifndef _STLP_CLOCALE 17 | #define _STLP_CLOCALE 18 | 19 | #ifndef _STLP_OUTERMOST_HEADER_ID 20 | # define _STLP_OUTERMOST_HEADER_ID 0x109 21 | # include 22 | #endif 23 | 24 | #if (_STLP_OUTERMOST_HEADER_ID != 0x109 ) 25 | # include _STLP_NATIVE_CPP_C_HEADER(clocale) 26 | #else 27 | # ifndef _STLP_INTERNAL_CLOCALE 28 | # include 29 | # endif 30 | #endif 31 | 32 | #if (_STLP_OUTERMOST_HEADER_ID == 0x109 ) 33 | # include 34 | # undef _STLP_OUTERMOST_HEADER_ID 35 | #endif 36 | 37 | #endif /* _STLP_CLOCALE */ 38 | 39 | // Local Variables: 40 | // mode:C++ 41 | // End: 42 | -------------------------------------------------------------------------------- /stlport/csetjmp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 3 | * Boris Fomitchev 4 | * 5 | * This material is provided "as is", with absolutely no warranty expressed 6 | * or implied. Any use is at your own risk. 7 | * 8 | * Permission to use or copy this software for any purpose is hereby granted 9 | * without fee, provided the above notices are retained on all copies. 10 | * Permission to modify the code and to distribute modified code is granted, 11 | * provided the above notices are retained, and a notice that the code was 12 | * modified is included with the above copyright notice. 13 | * 14 | */ 15 | 16 | #ifndef _STLP_CSETJMP 17 | 18 | #ifndef _STLP_OUTERMOST_HEADER_ID 19 | # define _STLP_OUTERMOST_HEADER_ID 0x111 20 | # define _STLP_CSETJMP 21 | # include 22 | #endif 23 | 24 | #if (_STLP_OUTERMOST_HEADER_ID != 0x111) 25 | # include _STLP_NATIVE_CPP_C_HEADER(csetjmp) 26 | #else 27 | # ifndef _STLP_INTERNAL_CSETJMP 28 | # include 29 | # endif 30 | #endif 31 | 32 | #if (_STLP_OUTERMOST_HEADER_ID == 0x111 ) 33 | # include 34 | # undef _STLP_OUTERMOST_HEADER_ID 35 | #endif 36 | 37 | #endif /* _STLP_CSETJMP */ 38 | 39 | // Local Variables: 40 | // mode:C++ 41 | // End: 42 | -------------------------------------------------------------------------------- /stlport/csignal: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 3 | * Boris Fomitchev 4 | * 5 | * This material is provided "as is", with absolutely no warranty expressed 6 | * or implied. Any use is at your own risk. 7 | * 8 | * Permission to use or copy this software for any purpose is hereby granted 9 | * without fee, provided the above notices are retained on all copies. 10 | * Permission to modify the code and to distribute modified code is granted, 11 | * provided the above notices are retained, and a notice that the code was 12 | * modified is included with the above copyright notice. 13 | * 14 | */ 15 | 16 | #ifndef _STLP_CSIGNAL 17 | 18 | #ifndef _STLP_OUTERMOST_HEADER_ID 19 | # define _STLP_OUTERMOST_HEADER_ID 0x112 20 | # define _STLP_CSIGNAL 21 | # include 22 | #endif 23 | 24 | #if (_STLP_OUTERMOST_HEADER_ID != 0x112) 25 | # include _STLP_NATIVE_CPP_C_HEADER(csignal) 26 | #else 27 | # ifndef _STLP_INTERNAL_CSIGNAL 28 | # include 29 | # endif 30 | #endif 31 | 32 | #if (_STLP_OUTERMOST_HEADER_ID == 0x112 ) 33 | # include 34 | # undef _STLP_OUTERMOST_HEADER_ID 35 | #endif 36 | 37 | #endif /* _STLP_CSIGNAL */ 38 | 39 | // Local Variables: 40 | // mode:C++ 41 | // End: 42 | -------------------------------------------------------------------------------- /stlport/cstddef: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 3 | * Boris Fomitchev 4 | * 5 | * This material is provided "as is", with absolutely no warranty expressed 6 | * or implied. Any use is at your own risk. 7 | * 8 | * Permission to use or copy this software for any purpose is hereby granted 9 | * without fee, provided the above notices are retained on all copies. 10 | * Permission to modify the code and to distribute modified code is granted, 11 | * provided the above notices are retained, and a notice that the code was 12 | * modified is included with the above copyright notice. 13 | * 14 | */ 15 | 16 | #ifndef _STLP_CSTDDEF 17 | 18 | #ifndef _STLP_OUTERMOST_HEADER_ID 19 | # define _STLP_OUTERMOST_HEADER_ID 0x114 20 | # define _STLP_CSTDDEF 21 | # include 22 | #endif 23 | 24 | #if (_STLP_OUTERMOST_HEADER_ID != 0x114) 25 | # include _STLP_NATIVE_CPP_C_HEADER(cstddef) 26 | #else 27 | # ifndef _STLP_INTERNAL_CSTDDEF 28 | # include 29 | # endif 30 | #endif 31 | 32 | #if (_STLP_OUTERMOST_HEADER_ID == 0x114 ) 33 | # include 34 | # undef _STLP_OUTERMOST_HEADER_ID 35 | #endif 36 | 37 | #endif /* _STLP_CSTDDEF */ 38 | 39 | // Local Variables: 40 | // mode:C++ 41 | // End: 42 | -------------------------------------------------------------------------------- /stlport/cstdlib: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 3 | * Boris Fomitchev 4 | * 5 | * This material is provided "as is", with absolutely no warranty expressed 6 | * or implied. Any use is at your own risk. 7 | * 8 | * Permission to use or copy this software for any purpose is hereby granted 9 | * without fee, provided the above notices are retained on all copies. 10 | * Permission to modify the code and to distribute modified code is granted, 11 | * provided the above notices are retained, and a notice that the code was 12 | * modified is included with the above copyright notice. 13 | * 14 | */ 15 | 16 | #ifndef _STLP_CSTDLIB 17 | 18 | #ifndef _STLP_OUTERMOST_HEADER_ID 19 | # define _STLP_OUTERMOST_HEADER_ID 0x116 20 | # define _STLP_CSTDLIB 21 | # include 22 | #endif 23 | 24 | #if (_STLP_OUTERMOST_HEADER_ID != 0x116) 25 | # include _STLP_NATIVE_CPP_C_HEADER(cstdlib) 26 | #else 27 | # ifndef _STLP_INTERNAL_CSTDLIB 28 | # include 29 | # endif 30 | #endif 31 | 32 | #if (_STLP_OUTERMOST_HEADER_ID == 0x116) 33 | # include 34 | # undef _STLP_OUTERMOST_HEADER_ID 35 | #endif 36 | 37 | #endif /* _STLP_CSTDLIB */ 38 | 39 | // Local Variables: 40 | // mode:C++ 41 | // End: 42 | -------------------------------------------------------------------------------- /stlport/cstring: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 3 | * Boris Fomitchev 4 | * 5 | * This material is provided "as is", with absolutely no warranty expressed 6 | * or implied. Any use is at your own risk. 7 | * 8 | * Permission to use or copy this software for any purpose is hereby granted 9 | * without fee, provided the above notices are retained on all copies. 10 | * Permission to modify the code and to distribute modified code is granted, 11 | * provided the above notices are retained, and a notice that the code was 12 | * modified is included with the above copyright notice. 13 | * 14 | */ 15 | 16 | #ifndef _STLP_CSTRING 17 | 18 | #ifndef _STLP_OUTERMOST_HEADER_ID 19 | # define _STLP_OUTERMOST_HEADER_ID 0x117 20 | # define _STLP_CSTRING 21 | # include 22 | #endif 23 | 24 | #if (_STLP_OUTERMOST_HEADER_ID != 0x117) 25 | # include _STLP_NATIVE_CPP_C_HEADER(cstring) 26 | #else 27 | # ifndef _STLP_INTERNAL_CSTRING 28 | # include 29 | # endif 30 | #endif 31 | 32 | #if (_STLP_OUTERMOST_HEADER_ID == 0x117) 33 | # include 34 | # undef _STLP_OUTERMOST_HEADER_ID 35 | #endif 36 | 37 | #endif /* _STLP_CSTRING */ 38 | 39 | // Local Variables: 40 | // mode:C++ 41 | // End: 42 | -------------------------------------------------------------------------------- /stlport/cwchar: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 3 | * Boris Fomitchev 4 | * 5 | * This material is provided "as is", with absolutely no warranty expressed 6 | * or implied. Any use is at your own risk. 7 | * 8 | * Permission to use or copy this software for any purpose is hereby granted 9 | * without fee, provided the above notices are retained on all copies. 10 | * Permission to modify the code and to distribute modified code is granted, 11 | * provided the above notices are retained, and a notice that the code was 12 | * modified is included with the above copyright notice. 13 | * 14 | */ 15 | 16 | #ifndef _STLP_CWCHAR 17 | 18 | #ifndef _STLP_OUTERMOST_HEADER_ID 19 | # define _STLP_OUTERMOST_HEADER_ID 0x120 20 | # define _STLP_CWCHAR 21 | # include 22 | #endif 23 | 24 | #if (_STLP_OUTERMOST_HEADER_ID != 0x120) 25 | # include _STLP_NATIVE_CPP_C_HEADER(cwchar) 26 | #else 27 | # ifndef _STLP_INTERNAL_CWCHAR 28 | # include 29 | # endif 30 | #endif 31 | 32 | #if (_STLP_OUTERMOST_HEADER_ID == 0x120) 33 | # include 34 | # undef _STLP_OUTERMOST_HEADER_ID 35 | #endif 36 | 37 | #endif /* _STLP_CWCHAR */ 38 | 39 | 40 | // Local Variables: 41 | // mode:C++ 42 | // End: 43 | -------------------------------------------------------------------------------- /stlport/cwctype: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 3 | * Boris Fomitchev 4 | * 5 | * This material is provided "as is", with absolutely no warranty expressed 6 | * or implied. Any use is at your own risk. 7 | * 8 | * Permission to use or copy this software for any purpose is hereby granted 9 | * without fee, provided the above notices are retained on all copies. 10 | * Permission to modify the code and to distribute modified code is granted, 11 | * provided the above notices are retained, and a notice that the code was 12 | * modified is included with the above copyright notice. 13 | * 14 | */ 15 | 16 | #ifndef _STLP_CWCTYPE 17 | #define _STLP_CWCTYPE 18 | 19 | #ifndef _STLP_OUTERMOST_HEADER_ID 20 | # define _STLP_OUTERMOST_HEADER_ID 0x121 21 | # include 22 | #endif 23 | 24 | #if (_STLP_OUTERMOST_HEADER_ID != 0x121) 25 | # include _STLP_NATIVE_CPP_C_HEADER(cwctype) 26 | #else 27 | # ifndef _STLP_INTERNAL_CWCTYPE 28 | # include 29 | # endif 30 | #endif 31 | 32 | #if (_STLP_OUTERMOST_HEADER_ID == 0x121) 33 | # include 34 | # undef _STLP_OUTERMOST_HEADER_ID 35 | #endif 36 | 37 | #endif /* _STLP_CWCTYPE */ 38 | 39 | // Local Variables: 40 | // mode:C++ 41 | // End: 42 | -------------------------------------------------------------------------------- /stlport/ostream: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 3 | * Silicon Graphics Computer Systems, Inc. 4 | * 5 | * Copyright (c) 1999 6 | * Boris Fomitchev 7 | * 8 | * This material is provided "as is", with absolutely no warranty expressed 9 | * or implied. Any use is at your own risk. 10 | * 11 | * Permission to use or copy this software for any purpose is hereby granted 12 | * without fee, provided the above notices are retained on all copies. 13 | * Permission to modify the code and to distribute modified code is granted, 14 | * provided the above notices are retained, and a notice that the code was 15 | * modified is included with the above copyright notice. 16 | * 17 | */ 18 | #ifndef _STLP_OSTREAM 19 | #define _STLP_OSTREAM 20 | 21 | # ifndef _STLP_OUTERMOST_HEADER_ID 22 | # define _STLP_OUTERMOST_HEADER_ID 0x1050 23 | # include 24 | # endif 25 | 26 | # ifdef _STLP_PRAGMA_ONCE 27 | # pragma once 28 | # endif 29 | 30 | # include 31 | # include 32 | 33 | # if (_STLP_OUTERMOST_HEADER_ID == 0x1050) 34 | # include 35 | # undef _STLP_OUTERMOST_HEADER_ID 36 | # endif 37 | 38 | #endif /* _STLP_OSTREAM */ 39 | 40 | // Local Variables: 41 | // mode:C++ 42 | // End: 43 | -------------------------------------------------------------------------------- /stlport/limits: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997 3 | * Silicon Graphics Computer Systems, Inc. 4 | * 5 | * Copyright (c) 1999 6 | * Boris Fomitchev 7 | * 8 | * This material is provided "as is", with absolutely no warranty expressed 9 | * or implied. Any use is at your own risk. 10 | * 11 | * Permission to use or copy this software for any purpose is hereby granted 12 | * without fee, provided the above notices are retained on all copies. 13 | * Permission to modify the code and to distribute modified code is granted, 14 | * provided the above notices are retained, and a notice that the code was 15 | * modified is included with the above copyright notice. 16 | * 17 | */ 18 | 19 | #ifndef _STLP_LIMITS 20 | #define _STLP_LIMITS 21 | 22 | #ifndef _STLP_OUTERMOST_HEADER_ID 23 | # define _STLP_OUTERMOST_HEADER_ID 0x39 24 | # include 25 | #endif 26 | 27 | #ifdef _STLP_PRAGMA_ONCE 28 | # pragma once 29 | #endif 30 | 31 | #ifndef _STLP_INTERNAL_LIMITS 32 | # include 33 | #endif 34 | 35 | #if (_STLP_OUTERMOST_HEADER_ID == 0x39) 36 | # include 37 | # undef _STLP_OUTERMOST_HEADER_ID 38 | #endif 39 | 40 | #endif /* _STLP_LIMITS */ 41 | 42 | // Local Variables: 43 | // mode:C++ 44 | // End: 45 | -------------------------------------------------------------------------------- /stlport/stl/_relops_cont.h: -------------------------------------------------------------------------------- 1 | // This is an implementation file which 2 | // is intended to be included multiple times with different _STLP_ASSOCIATIVE_CONTAINER 3 | // setting 4 | 5 | #if !defined (_STLP_EQUAL_OPERATOR_SPECIALIZED) 6 | _STLP_TEMPLATE_HEADER 7 | inline bool _STLP_CALL operator==(const _STLP_TEMPLATE_CONTAINER& __x, 8 | const _STLP_TEMPLATE_CONTAINER& __y) { 9 | return __x.size() == __y.size() && 10 | equal(__x.begin(), __x.end(), __y.begin()); 11 | } 12 | #endif /* _STLP_EQUAL_OPERATOR_SPECIALIZED */ 13 | 14 | _STLP_TEMPLATE_HEADER 15 | inline bool _STLP_CALL operator<(const _STLP_TEMPLATE_CONTAINER& __x, 16 | const _STLP_TEMPLATE_CONTAINER& __y) { 17 | return lexicographical_compare(__x.begin(), __x.end(), 18 | __y.begin(), __y.end()); 19 | } 20 | 21 | _STLP_RELOPS_OPERATORS( _STLP_TEMPLATE_HEADER , _STLP_TEMPLATE_CONTAINER ) 22 | 23 | #if defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER) 24 | _STLP_TEMPLATE_HEADER 25 | inline void _STLP_CALL swap(_STLP_TEMPLATE_CONTAINER& __x, 26 | _STLP_TEMPLATE_CONTAINER& __y) { 27 | __x.swap(__y); 28 | } 29 | #endif /* _STLP_FUNCTION_TMPL_PARTIAL_ORDER */ 30 | -------------------------------------------------------------------------------- /stlport/streambuf: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 3 | * Silicon Graphics Computer Systems, Inc. 4 | * 5 | * Copyright (c) 1999 6 | * Boris Fomitchev 7 | * 8 | * This material is provided "as is", with absolutely no warranty expressed 9 | * or implied. Any use is at your own risk. 10 | * 11 | * Permission to use or copy this software for any purpose is hereby granted 12 | * without fee, provided the above notices are retained on all copies. 13 | * Permission to modify the code and to distribute modified code is granted, 14 | * provided the above notices are retained, and a notice that the code was 15 | * modified is included with the above copyright notice. 16 | * 17 | */ 18 | #ifndef _STLP_STREAMBUF 19 | #define _STLP_STREAMBUF 20 | 21 | # ifndef _STLP_OUTERMOST_HEADER_ID 22 | # define _STLP_OUTERMOST_HEADER_ID 0x1066 23 | # include 24 | # endif 25 | 26 | # ifdef _STLP_PRAGMA_ONCE 27 | # pragma once 28 | # endif 29 | 30 | # include 31 | # include 32 | 33 | # if (_STLP_OUTERMOST_HEADER_ID == 0x1066) 34 | # include 35 | # undef _STLP_OUTERMOST_HEADER_ID 36 | # endif 37 | 38 | #endif /* _STLP_STREAMBUF */ 39 | 40 | // Local Variables: 41 | // mode:C++ 42 | // End: 43 | -------------------------------------------------------------------------------- /test/unit/ostmit_test.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #if !defined (STLPORT) || !defined (_STLP_USE_NO_IOSTREAMS) 3 | #include 4 | #include 5 | #include 6 | 7 | #include "cppunit/cppunit_proxy.h" 8 | 9 | #if !defined (STLPORT) || defined(_STLP_USE_NAMESPACES) 10 | using namespace std; 11 | #endif 12 | 13 | // 14 | // TestCase class 15 | // 16 | class OstreamIteratorTest : public CPPUNIT_NS::TestCase 17 | { 18 | CPPUNIT_TEST_SUITE(OstreamIteratorTest); 19 | CPPUNIT_TEST(ostmit0); 20 | CPPUNIT_TEST_SUITE_END(); 21 | 22 | protected: 23 | void ostmit0(); 24 | }; 25 | 26 | CPPUNIT_TEST_SUITE_REGISTRATION(OstreamIteratorTest); 27 | 28 | // 29 | // tests implementation 30 | // 31 | void OstreamIteratorTest::ostmit0() 32 | { 33 | // not necessary, tested in copy_test 34 | int array [] = { 1, 5, 2, 4 }; 35 | 36 | char* text = "hello"; 37 | 38 | ostringstream os; 39 | 40 | ostream_iterator iter(os); 41 | copy(text, text + 5, iter); 42 | CPPUNIT_ASSERT(os.good()); 43 | os << ' '; 44 | CPPUNIT_ASSERT(os.good()); 45 | 46 | ostream_iterator iter2(os); 47 | copy(array, array + 4, iter2); 48 | CPPUNIT_ASSERT(os.good()); 49 | CPPUNIT_ASSERT(os.str() == "hello 1524"); 50 | } 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /stlport/stl/_clocale.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 3 | * Boris Fomitchev 4 | * 5 | * This material is provided "as is", with absolutely no warranty expressed 6 | * or implied. Any use is at your own risk. 7 | * 8 | * Permission to use or copy this software for any purpose is hereby granted 9 | * without fee, provided the above notices are retained on all copies. 10 | * Permission to modify the code and to distribute modified code is granted, 11 | * provided the above notices are retained, and a notice that the code was 12 | * modified is included with the above copyright notice. 13 | * 14 | */ 15 | 16 | #ifndef _STLP_INTERNAL_CLOCALE 17 | #define _STLP_INTERNAL_CLOCALE 18 | 19 | #if !defined (_STLP_WCE_EVC3) 20 | 21 | # if defined (_STLP_USE_NEW_C_HEADERS) 22 | # include _STLP_NATIVE_CPP_C_HEADER(clocale) 23 | # else 24 | # include _STLP_NATIVE_C_HEADER(locale.h) 25 | # endif 26 | 27 | # if defined (_STLP_IMPORT_VENDOR_CSTD) 28 | _STLP_BEGIN_NAMESPACE 29 | using _STLP_VENDOR_CSTD::lconv; 30 | # if !defined (_STLP_NO_CSTD_FUNCTION_IMPORTS) 31 | using _STLP_VENDOR_CSTD::localeconv; 32 | using _STLP_VENDOR_CSTD::setlocale; 33 | # endif 34 | _STLP_END_NAMESPACE 35 | # endif 36 | 37 | #endif /* !_STLP_WCE_EVC3 */ 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /stlport/istream: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 3 | * Silicon Graphics Computer Systems, Inc. 4 | * 5 | * Copyright (c) 1999 6 | * Boris Fomitchev 7 | * 8 | * This material is provided "as is", with absolutely no warranty expressed 9 | * or implied. Any use is at your own risk. 10 | * 11 | * Permission to use or copy this software for any purpose is hereby granted 12 | * without fee, provided the above notices are retained on all copies. 13 | * Permission to modify the code and to distribute modified code is granted, 14 | * provided the above notices are retained, and a notice that the code was 15 | * modified is included with the above copyright notice. 16 | * 17 | */ 18 | 19 | #ifndef _STLP_ISTREAM 20 | #define _STLP_ISTREAM 21 | 22 | #ifndef _STLP_OUTERMOST_HEADER_ID 23 | # define _STLP_OUTERMOST_HEADER_ID 0x1036 24 | # include 25 | #endif 26 | 27 | #ifdef _STLP_PRAGMA_ONCE 28 | # pragma once 29 | #endif 30 | 31 | #include 32 | 33 | #ifndef _STLP_INTERNAL_ISTREAM 34 | # include 35 | #endif 36 | 37 | #if (_STLP_OUTERMOST_HEADER_ID == 0x1036) 38 | # include 39 | # undef _STLP_OUTERMOST_HEADER_ID 40 | #endif 41 | 42 | #endif /* _STLP_ISTREAM */ 43 | 44 | // Local Variables: 45 | // mode:C++ 46 | // End: 47 | -------------------------------------------------------------------------------- /stlport/cfloat: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 3 | * Boris Fomitchev 4 | * 5 | * This material is provided "as is", with absolutely no warranty expressed 6 | * or implied. Any use is at your own risk. 7 | * 8 | * Permission to use or copy this software for any purpose is hereby granted 9 | * without fee, provided the above notices are retained on all copies. 10 | * Permission to modify the code and to distribute modified code is granted, 11 | * provided the above notices are retained, and a notice that the code was 12 | * modified is included with the above copyright notice. 13 | * 14 | */ 15 | 16 | #ifndef _STLP_CFLOAT 17 | #define _STLP_CFLOAT 18 | 19 | #ifndef _STLP_OUTERMOST_HEADER_ID 20 | # define _STLP_OUTERMOST_HEADER_ID 0x106 21 | # include 22 | #endif 23 | 24 | // Borland defines some implementation constants in std:: namespace, 25 | // we do not want to import them. 26 | #if defined (_STLP_USE_NEW_C_HEADERS) && !defined (__BORLANDC__) 27 | # include _STLP_NATIVE_CPP_C_HEADER(cfloat) 28 | #else 29 | # include 30 | #endif 31 | 32 | #if (_STLP_OUTERMOST_HEADER_ID == 0x106 ) 33 | # include 34 | # undef _STLP_OUTERMOST_HEADER_ID 35 | #endif 36 | 37 | #endif /* _STLP_CFLOAT */ 38 | 39 | // Local Variables: 40 | // mode:C++ 41 | // End: 42 | -------------------------------------------------------------------------------- /stlport/ciso646: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 3 | * Boris Fomitchev 4 | * 5 | * This material is provided "as is", with absolutely no warranty expressed 6 | * or implied. Any use is at your own risk. 7 | * 8 | * Permission to use or copy this software for any purpose is hereby granted 9 | * without fee, provided the above notices are retained on all copies. 10 | * Permission to modify the code and to distribute modified code is granted, 11 | * provided the above notices are retained, and a notice that the code was 12 | * modified is included with the above copyright notice. 13 | * 14 | */ 15 | 16 | #ifndef _STLP_CISO646 17 | #define _STLP_CISO646 18 | 19 | #ifndef _STLP_OUTERMOST_HEADER_ID 20 | # define _STLP_OUTERMOST_HEADER_ID 0x107 21 | # include 22 | #endif 23 | 24 | #if !defined(_STLP_WCE_EVC3) && !defined (N_PLAT_NLM) && !defined (__BORLANDC__) 25 | # if defined (_STLP_USE_NEW_C_HEADERS) 26 | # include _STLP_NATIVE_CPP_C_HEADER(ciso646) 27 | # else 28 | # include 29 | # endif /* _STLP_USE_NEW_C_HEADERS */ 30 | #endif 31 | 32 | #if (_STLP_OUTERMOST_HEADER_ID == 0x107 ) 33 | # include 34 | # undef _STLP_OUTERMOST_HEADER_ID 35 | #endif 36 | 37 | #endif /* _STLP_CISO646 */ 38 | 39 | // Local Variables: 40 | // mode:C++ 41 | // End: 42 | -------------------------------------------------------------------------------- /stlport/signal.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 3 | * Boris Fomitchev 4 | * 5 | * This material is provided "as is", with absolutely no warranty expressed 6 | * or implied. Any use is at your own risk. 7 | * 8 | * Permission to use or copy this software for any purpose is hereby granted 9 | * without fee, provided the above notices are retained on all copies. 10 | * Permission to modify the code and to distribute modified code is granted, 11 | * provided the above notices are retained, and a notice that the code was 12 | * modified is included with the above copyright notice. 13 | * 14 | */ 15 | 16 | #if !defined (_STLP_OUTERMOST_HEADER_ID) 17 | # define _STLP_OUTERMOST_HEADER_ID 0x257 18 | # include 19 | #elif (_STLP_OUTERMOST_HEADER_ID == 0x257) && ! defined (_STLP_DONT_POP_HEADER_ID) 20 | # define _STLP_DONT_POP_HEADER_ID 21 | #endif 22 | 23 | /* evc3 and evc4 don't have signal.h */ 24 | #ifndef _STLP_WCE 25 | # include _STLP_NATIVE_C_HEADER(signal.h) 26 | #endif 27 | 28 | #if (_STLP_OUTERMOST_HEADER_ID == 0x257) 29 | # if ! defined (_STLP_DONT_POP_HEADER_ID) 30 | # include 31 | # undef _STLP_OUTERMOST_HEADER_ID 32 | # endif 33 | # undef _STLP_DONT_POP_HEADER_ID 34 | #endif 35 | 36 | /* Local Variables: 37 | * mode:C++ 38 | * End: 39 | */ 40 | -------------------------------------------------------------------------------- /stlport/stl/_csignal.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 3 | * Boris Fomitchev 4 | * 5 | * This material is provided "as is", with absolutely no warranty expressed 6 | * or implied. Any use is at your own risk. 7 | * 8 | * Permission to use or copy this software for any purpose is hereby granted 9 | * without fee, provided the above notices are retained on all copies. 10 | * Permission to modify the code and to distribute modified code is granted, 11 | * provided the above notices are retained, and a notice that the code was 12 | * modified is included with the above copyright notice. 13 | * 14 | */ 15 | 16 | #ifndef _STLP_INTERNAL_CSIGNAL 17 | #define _STLP_INTERNAL_CSIGNAL 18 | 19 | #if !defined (_STLP_WCE) 20 | # if defined (_STLP_USE_NEW_C_HEADERS) 21 | # include _STLP_NATIVE_CPP_C_HEADER(csignal) 22 | # else 23 | # include _STLP_NATIVE_C_HEADER(signal.h) 24 | # endif 25 | 26 | # if defined (_STLP_IMPORT_VENDOR_CSTD) 27 | _STLP_BEGIN_NAMESPACE 28 | # if !defined (_STLP_NO_CSTD_FUNCTION_IMPORTS) 29 | using _STLP_VENDOR_CSTD::signal; 30 | using _STLP_VENDOR_CSTD::raise; 31 | # endif /* _STLP_NO_CSTD_FUNCTION_IMPORTS */ 32 | using _STLP_VENDOR_CSTD::sig_atomic_t; 33 | _STLP_END_NAMESPACE 34 | # endif /* _STLP_IMPORT_VENDOR_CSTD */ 35 | #endif 36 | 37 | #endif /* _STLP_INTERNAL_CSIGNAL */ 38 | -------------------------------------------------------------------------------- /stlport/valarray: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 3 | * Silicon Graphics Computer Systems, Inc. 4 | * 5 | * Copyright (c) 1999 6 | * Boris Fomitchev 7 | * 8 | * This material is provided "as is", with absolutely no warranty expressed 9 | * or implied. Any use is at your own risk. 10 | * 11 | * Permission to use or copy this software for any purpose is hereby granted 12 | * without fee, provided the above notices are retained on all copies. 13 | * Permission to modify the code and to distribute modified code is granted, 14 | * provided the above notices are retained, and a notice that the code was 15 | * modified is included with the above copyright notice. 16 | * 17 | */ 18 | 19 | #ifndef _STLP_VALARRAY 20 | #define _STLP_VALARRAY 21 | 22 | #ifndef _STLP_OUTERMOST_HEADER_ID 23 | # define _STLP_OUTERMOST_HEADER_ID 0x76 24 | # include 25 | #endif 26 | 27 | #ifdef _STLP_PRAGMA_ONCE 28 | # pragma once 29 | #endif 30 | 31 | #include 32 | 33 | #if defined (_STLP_IMPORT_VENDOR_STD) 34 | # include _STLP_NATIVE_HEADER(valarray) 35 | #endif 36 | 37 | #if (_STLP_OUTERMOST_HEADER_ID == 0x76) 38 | # include 39 | # undef _STLP_OUTERMOST_HEADER_ID 40 | #endif 41 | 42 | #endif /* _STLP_VALARRAY */ 43 | 44 | 45 | // Local Variables: 46 | // mode:C++ 47 | // End: 48 | -------------------------------------------------------------------------------- /test/unit/plusminus_test.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "cppunit/cppunit_proxy.h" 6 | 7 | #if !defined (STLPORT) || defined(_STLP_USE_NAMESPACES) 8 | using namespace std; 9 | #endif 10 | 11 | // 12 | // TestCase class 13 | // 14 | class PlusMinusTest : public CPPUNIT_NS::TestCase 15 | { 16 | CPPUNIT_TEST_SUITE(PlusMinusTest); 17 | CPPUNIT_TEST(plus0); 18 | CPPUNIT_TEST(minus0); 19 | CPPUNIT_TEST_SUITE_END(); 20 | 21 | protected: 22 | void plus0(); 23 | void minus0(); 24 | }; 25 | 26 | CPPUNIT_TEST_SUITE_REGISTRATION(PlusMinusTest); 27 | 28 | // 29 | // tests implementation 30 | // 31 | void PlusMinusTest::plus0() 32 | { 33 | int input1 [4] = { 1, 6, 11, 8 }; 34 | int input2 [4] = { 1, 5, 2, 3 }; 35 | 36 | int total = inner_product(input1, input1 + 4, input2, 0, plus(), multiplies ()); 37 | 38 | CPPUNIT_ASSERT(total==77); 39 | } 40 | void PlusMinusTest::minus0() 41 | { 42 | int input1 [4] = { 1, 5, 7, 8 }; 43 | int input2 [4] = { 1, 4, 8, 3 }; 44 | 45 | int output [4]; 46 | 47 | transform((int*)input1, (int*)input1 + 4, (int*)input2, (int*)output, minus()); 48 | CPPUNIT_ASSERT(output[0]==0); 49 | CPPUNIT_ASSERT(output[1]==1); 50 | CPPUNIT_ASSERT(output[2]==-1); 51 | CPPUNIT_ASSERT(output[3]==5); 52 | } 53 | -------------------------------------------------------------------------------- /test/unit/stack_test.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | #include "cppunit/cppunit_proxy.h" 8 | 9 | #if !defined (STLPORT) || defined(_STLP_USE_NAMESPACES) 10 | using namespace std; 11 | #endif 12 | 13 | // 14 | // TestCase class 15 | // 16 | class StackTest : public CPPUNIT_NS::TestCase 17 | { 18 | CPPUNIT_TEST_SUITE(StackTest); 19 | CPPUNIT_TEST(stack1); 20 | CPPUNIT_TEST(stack2); 21 | CPPUNIT_TEST_SUITE_END(); 22 | 23 | protected: 24 | void stack1(); 25 | void stack2(); 26 | }; 27 | 28 | CPPUNIT_TEST_SUITE_REGISTRATION(StackTest); 29 | 30 | // 31 | // tests implementation 32 | // 33 | void StackTest::stack1() 34 | { 35 | stack > s; 36 | s.push(42); 37 | s.push(101); 38 | s.push(69); 39 | CPPUNIT_ASSERT(s.top()==69); 40 | s.pop(); 41 | CPPUNIT_ASSERT(s.top()==101); 42 | s.pop(); 43 | CPPUNIT_ASSERT(s.top()==42); 44 | s.pop(); 45 | CPPUNIT_ASSERT(s.empty()); 46 | } 47 | void StackTest::stack2() 48 | { 49 | stack > s; 50 | s.push(42); 51 | s.push(101); 52 | s.push(69); 53 | CPPUNIT_ASSERT(s.top()==69); 54 | s.pop(); 55 | CPPUNIT_ASSERT(s.top()==101); 56 | s.pop(); 57 | CPPUNIT_ASSERT(s.top()==42); 58 | s.pop(); 59 | CPPUNIT_ASSERT(s.empty()); 60 | } 61 | -------------------------------------------------------------------------------- /stlport/rope: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997 3 | * Silicon Graphics Computer Systems, Inc. 4 | * 5 | * Permission to use, copy, modify, distribute and sell this software 6 | * and its documentation for any purpose is hereby granted without fee, 7 | * provided that the above copyright notice appear in all copies and 8 | * that both that copyright notice and this permission notice appear 9 | * in supporting documentation. Silicon Graphics makes no 10 | * representations about the suitability of this software for any 11 | * purpose. It is provided "as is" without express or implied warranty. 12 | */ 13 | 14 | #ifndef _STLP_ROPE 15 | #define _STLP_ROPE 16 | 17 | #ifndef _STLP_OUTERMOST_HEADER_ID 18 | # define _STLP_OUTERMOST_HEADER_ID 0x54 19 | # include 20 | #endif 21 | 22 | #ifdef _STLP_PRAGMA_ONCE 23 | # pragma once 24 | #endif 25 | 26 | #if defined (_STLP_NO_EXTENSIONS) 27 | /* Comment following if you want to use rope class even if you ask for 28 | * no extension. 29 | */ 30 | # error The rope class is a STLport extension. 31 | #endif 32 | 33 | #include 34 | 35 | #if (_STLP_OUTERMOST_HEADER_ID == 0x54) 36 | # include 37 | # undef _STLP_OUTERMOST_HEADER_ID 38 | #endif 39 | 40 | #endif /* _STLP_ROPE */ 41 | 42 | // Local Variables: 43 | // mode:C++ 44 | // End: 45 | -------------------------------------------------------------------------------- /stlport/numeric: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1994 4 | * Hewlett-Packard Company 5 | * 6 | * Copyright (c) 1996,1997 7 | * Silicon Graphics Computer Systems, Inc. 8 | * 9 | * Copyright (c) 1999 10 | * Boris Fomitchev 11 | * 12 | * This material is provided "as is", with absolutely no warranty expressed 13 | * or implied. Any use is at your own risk. 14 | * 15 | * Permission to use or copy this software for any purpose is hereby granted 16 | * without fee, provided the above notices are retained on all copies. 17 | * Permission to modify the code and to distribute modified code is granted, 18 | * provided the above notices are retained, and a notice that the code was 19 | * modified is included with the above copyright notice. 20 | * 21 | */ 22 | 23 | #ifndef _STLP_NUMERIC 24 | #define _STLP_NUMERIC 25 | 26 | #ifndef _STLP_OUTERMOST_HEADER_ID 27 | # define _STLP_OUTERMOST_HEADER_ID 0x49 28 | # include 29 | #endif 30 | 31 | #ifdef _STLP_PRAGMA_ONCE 32 | # pragma once 33 | #endif 34 | 35 | #ifndef _STLP_INTERNAL_NUMERIC_H 36 | # include 37 | #endif 38 | 39 | #if (_STLP_OUTERMOST_HEADER_ID == 0x49) 40 | # include 41 | # undef _STLP_OUTERMOST_HEADER_ID 42 | #endif 43 | 44 | #endif /* _STLP_NUMERIC */ 45 | 46 | // Local Variables: 47 | // mode:C++ 48 | // End: 49 | -------------------------------------------------------------------------------- /test/unit/neq_test.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "cppunit/cppunit_proxy.h" 6 | 7 | #if !defined (STLPORT) || defined(_STLP_USE_NAMESPACES) 8 | using namespace std; 9 | #endif 10 | 11 | // 12 | // TestCase class 13 | // 14 | class NeqTest : public CPPUNIT_NS::TestCase 15 | { 16 | CPPUNIT_TEST_SUITE(NeqTest); 17 | CPPUNIT_TEST(negate0); 18 | CPPUNIT_TEST(nequal0); 19 | CPPUNIT_TEST_SUITE_END(); 20 | 21 | protected: 22 | void negate0(); 23 | void nequal0(); 24 | }; 25 | 26 | CPPUNIT_TEST_SUITE_REGISTRATION(NeqTest); 27 | 28 | // 29 | // tests implementation 30 | // 31 | void NeqTest::negate0() 32 | { 33 | int input [3] = { 1, 2, 3 }; 34 | 35 | int output[3]; 36 | transform((int*)input, (int*)input + 3, (int*)output, negate()); 37 | 38 | CPPUNIT_ASSERT(output[0]==-1); 39 | CPPUNIT_ASSERT(output[1]==-2); 40 | CPPUNIT_ASSERT(output[2]==-3); 41 | } 42 | void NeqTest::nequal0() 43 | { 44 | int input1 [4] = { 1, 7, 2, 2 }; 45 | int input2 [4] = { 1, 6, 2, 3 }; 46 | 47 | int output [4]; 48 | transform((int*)input1, (int*)input1 + 4, (int*)input2, (int*)output, not_equal_to()); 49 | 50 | CPPUNIT_ASSERT(output[0]==0); 51 | CPPUNIT_ASSERT(output[1]==1); 52 | CPPUNIT_ASSERT(output[2]==0); 53 | CPPUNIT_ASSERT(output[3]==1); 54 | } 55 | -------------------------------------------------------------------------------- /stlport/assert.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 3 | * Boris Fomitchev 4 | * 5 | * This material is provided "as is", with absolutely no warranty expressed 6 | * or implied. Any use is at your own risk. 7 | * 8 | * Permission to use or copy this software for any purpose is hereby granted 9 | * without fee, provided the above notices are retained on all copies. 10 | * Permission to modify the code and to distribute modified code is granted, 11 | * provided the above notices are retained, and a notice that the code was 12 | * modified is included with the above copyright notice. 13 | * 14 | */ 15 | 16 | #if !defined (_STLP_OUTERMOST_HEADER_ID) 17 | # define _STLP_OUTERMOST_HEADER_ID 0x202 18 | # include 19 | #elif (_STLP_OUTERMOST_HEADER_ID == 0x202) && ! defined (_STLP_DONT_POP_HEADER_ID) 20 | # define _STLP_DONT_POP_HEADER_ID 21 | #endif 22 | 23 | /* evc3 doesn't have assert.h; macro assert() is defined in stl_evc.h */ 24 | #ifndef _STLP_WCE_EVC3 25 | # include _STLP_NATIVE_C_HEADER(assert.h) 26 | #endif 27 | 28 | #if (_STLP_OUTERMOST_HEADER_ID == 0x202) 29 | # if ! defined (_STLP_DONT_POP_HEADER_ID) 30 | # include 31 | # undef _STLP_OUTERMOST_HEADER_ID 32 | # endif 33 | # undef _STLP_DONT_POP_HEADER_ID 34 | #endif 35 | 36 | /* Local Variables: 37 | * mode:C++ 38 | * End: 39 | */ 40 | -------------------------------------------------------------------------------- /stlport/wctype.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 3 | * Boris Fomitchev 4 | * 5 | * This material is provided "as is", with absolutely no warranty expressed 6 | * or implied. Any use is at your own risk. 7 | * 8 | * Permission to use or copy this software for any purpose is hereby granted 9 | * without fee, provided the above notices are retained on all copies. 10 | * Permission to modify the code and to distribute modified code is granted, 11 | * provided the above notices are retained, and a notice that the code was 12 | * modified is included with the above copyright notice. 13 | * 14 | */ 15 | 16 | #if !defined (_STLP_OUTERMOST_HEADER_ID) 17 | # define _STLP_OUTERMOST_HEADER_ID 0x279 18 | # include 19 | #elif (_STLP_OUTERMOST_HEADER_ID == 0x279) && !defined (_STLP_DONT_POP_HEADER_ID) 20 | # define _STLP_DONT_POP_HEADER_ID 21 | #endif 22 | 23 | /* evc3 doesn't have wctype.h */ 24 | #if !defined(_STLP_WCE_EVC3) && !defined(N_PLAT_NLM) 25 | # include _STLP_NATIVE_C_HEADER(wctype.h) 26 | #endif 27 | 28 | #if (_STLP_OUTERMOST_HEADER_ID == 0x279) 29 | # if ! defined (_STLP_DONT_POP_HEADER_ID) 30 | # include 31 | # undef _STLP_OUTERMOST_HEADER_ID 32 | # else 33 | # undef _STLP_DONT_POP_HEADER_ID 34 | # endif 35 | #endif 36 | 37 | /* Local Variables: 38 | * mode:C++ 39 | * End: 40 | */ 41 | -------------------------------------------------------------------------------- /src/stlport_prefix.h: -------------------------------------------------------------------------------- 1 | #ifndef STLPORT_PREFIX_H 2 | #define STLPORT_PREFIX_H 3 | 4 | #define __BUILDING_STLPORT 1 5 | 6 | #if defined (_WIN32) || defined (WIN32) 7 | # ifdef __cplusplus 8 | # define WIN32_LEAN_AND_MEAN 9 | # define NOSERVICE 10 | # endif 11 | # if !(defined (__CYGWIN__) || defined (_WIN32_WCE)) 12 | # define _STLP_REAL_LOCALE_IMPLEMENTED 13 | # endif 14 | #endif 15 | 16 | #undef _STLP_NO_FORCE_INSTANTIATE 17 | 18 | /* Please add extra compilation switches for particular compilers here */ 19 | 20 | #if defined (_MSC_VER) && !defined (__COMO__) && !defined (__MWERKS__) 21 | # include "warning_disable.h" 22 | #endif 23 | 24 | #include 25 | 26 | #if defined (_STLP_USE_TEMPLATE_EXPORT) && defined (_STLP_USE_DECLSPEC) && !defined (_STLP_EXPOSE_GLOBALS_IMPLEMENTATION) 27 | # define _STLP_EXPOSE_GLOBALS_IMPLEMENTATION 28 | #endif 29 | 30 | #ifdef __cplusplus 31 | 32 | # include 33 | # if defined (_STLP_USE_NAMESPACES) && !defined (_STLP_VENDOR_GLOBAL_CSTD) 34 | using _STLP_VENDOR_CSTD::time_t; 35 | # endif 36 | 37 | # if defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER) 38 | # define _STLP_OPERATOR_SPEC _STLP_DECLSPEC 39 | # else 40 | # define _STLP_OPERATOR_SPEC _STLP_TEMPLATE_NULL _STLP_DECLSPEC 41 | # endif 42 | 43 | #endif /* __cplusplus */ 44 | 45 | #endif /* PREFIX */ 46 | 47 | -------------------------------------------------------------------------------- /test/compiler/eh.cc: -------------------------------------------------------------------------------- 1 | //#include 2 | #include 3 | #include 4 | 5 | using namespace std; 6 | 7 | struct BigStruct 8 | { 9 | char _data[4096]; 10 | }; 11 | 12 | void bad_alloc_test() 13 | { 14 | typedef allocator BigStructAllocType; 15 | BigStructAllocType bigStructAlloc; 16 | 17 | try { 18 | //Lets try to allocate almost 4096 Go (on most of the platforms) of memory: 19 | BigStructAllocType::pointer pbigStruct = bigStructAlloc.allocate(1024 * 1024 * 1024); 20 | 21 | // CPPUNIT_ASSERT( pbigStruct != 0 && "Allocation failed but no exception thrown" ); 22 | } 23 | catch (bad_alloc const&) { 24 | printf( "Ok\n" ); 25 | } 26 | catch (...) { 27 | //We shouldn't be there: 28 | // CPPUNIT_ASSERT( false && "Not bad_alloc exception thrown." ); 29 | } 30 | } 31 | 32 | void bad_alloc_test1() 33 | { 34 | try { 35 | allocator all; 36 | BigStruct *bs = all.allocate(1024*1024*1024); 37 | 38 | // throw bad_alloc(); 39 | } 40 | catch ( bad_alloc const & ) { 41 | printf( "I am here\n" ); 42 | } 43 | catch ( ... ) { 44 | } 45 | } 46 | 47 | int main() 48 | { 49 | bad_alloc_test(); 50 | #if 0 51 | try { 52 | throw bad_alloc(); 53 | } 54 | catch ( bad_alloc& ) { 55 | } 56 | catch ( ... ) { 57 | } 58 | #endif 59 | return 0; 60 | } 61 | -------------------------------------------------------------------------------- /stlport/iso646.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 3 | * Boris Fomitchev 4 | * 5 | * This material is provided "as is", with absolutely no warranty expressed 6 | * or implied. Any use is at your own risk. 7 | * 8 | * Permission to use or copy this software for any purpose is hereby granted 9 | * without fee, provided the above notices are retained on all copies. 10 | * Permission to modify the code and to distribute modified code is granted, 11 | * provided the above notices are retained, and a notice that the code was 12 | * modified is included with the above copyright notice. 13 | * 14 | */ 15 | 16 | #if !defined (_STLP_OUTERMOST_HEADER_ID) 17 | # define _STLP_OUTERMOST_HEADER_ID 0x204 18 | # include 19 | #elif (_STLP_OUTERMOST_HEADER_ID == 0x204) && !defined (_STLP_DONT_POP_HEADER_ID) 20 | # define _STLP_DONT_POP_HEADER_ID 21 | #endif 22 | 23 | /* evc3 doesn't have iso646.h */ 24 | #if !defined (_STLP_WCE_EVC3) && !defined (N_PLAT_NLM) && !defined (__BORLANDC__) 25 | # include _STLP_NATIVE_C_HEADER(iso646.h) 26 | #endif 27 | 28 | #if (_STLP_OUTERMOST_HEADER_ID == 0x204) 29 | # if ! defined (_STLP_DONT_POP_HEADER_ID) 30 | # include 31 | # undef _STLP_OUTERMOST_HEADER_ID 32 | # endif 33 | # undef _STLP_DONT_POP_HEADER_ID 34 | #endif 35 | 36 | /* Local Variables: 37 | * mode:C++ 38 | * End: 39 | */ 40 | -------------------------------------------------------------------------------- /stlport/pthread.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 3 | * Boris Fomitchev 4 | * 5 | * This material is provided "as is", with absolutely no warranty expressed 6 | * or implied. Any use is at your own risk. 7 | * 8 | * Permission to use or copy this software for any purpose is hereby granted 9 | * without fee, provided the above notices are retained on all copies. 10 | * Permission to modify the code and to distribute modified code is granted, 11 | * provided the above notices are retained, and a notice that the code was 12 | * modified is included with the above copyright notice. 13 | * 14 | */ 15 | 16 | # if !defined (_STLP_OUTERMOST_HEADER_ID) 17 | # define _STLP_OUTERMOST_HEADER_ID 0x280 18 | # include 19 | # elif (_STLP_OUTERMOST_HEADER_ID == 0x280) && ! defined (_STLP_DONT_POP_HEADER_ID) 20 | # define _STLP_DONT_POP_HEADER_ID 21 | # endif 22 | 23 | # if defined (__SUNPRO_CC) || defined (__HP_aCC) 24 | # include "/usr/include/pthread.h" 25 | # else 26 | # include _STLP_NATIVE_C_HEADER(pthread.h) 27 | # endif 28 | 29 | # if (_STLP_OUTERMOST_HEADER_ID == 0x280) 30 | # if ! defined (_STLP_DONT_POP_HEADER_ID) 31 | # include 32 | # undef _STLP_OUTERMOST_HEADER_ID 33 | # else 34 | # undef _STLP_DONT_POP_HEADER_ID 35 | # endif 36 | # endif 37 | 38 | /* 39 | Local Variables: 40 | mode:C++ 41 | End: 42 | */ 43 | -------------------------------------------------------------------------------- /test/unit/bsearch_test.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "cppunit/cppunit_proxy.h" 4 | 5 | #if !defined (STLPORT) || defined(_STLP_USE_NAMESPACES) 6 | using namespace std; 7 | #endif 8 | 9 | // 10 | // TestCase class 11 | // 12 | class BsearchTest : public CPPUNIT_NS::TestCase 13 | { 14 | CPPUNIT_TEST_SUITE(BsearchTest); 15 | CPPUNIT_TEST(bsearch1); 16 | CPPUNIT_TEST(bsearch2); 17 | CPPUNIT_TEST_SUITE_END(); 18 | 19 | protected: 20 | void bsearch1(); 21 | void bsearch2(); 22 | static bool str_compare(const char* a_, const char* b_); 23 | }; 24 | 25 | CPPUNIT_TEST_SUITE_REGISTRATION(BsearchTest); 26 | 27 | // 28 | // tests implementation 29 | // 30 | void BsearchTest::bsearch1() 31 | { 32 | int vector[100]; 33 | for(int i = 0; i < 100; i++) 34 | vector[i] = i; 35 | CPPUNIT_ASSERT(binary_search(vector, vector + 100, 42)); 36 | } 37 | 38 | void BsearchTest::bsearch2() 39 | { 40 | char const* labels[] = { "aa", "dd", "ff", "jj", "ss", "zz" }; 41 | const unsigned count = sizeof(labels) / sizeof(labels[0]); 42 | // DEC C++ generates incorrect template instatiation code 43 | // for "ff" so must cast 44 | CPPUNIT_ASSERT(binary_search(labels, labels + count, (const char *)"ff", str_compare)); 45 | } 46 | bool BsearchTest::str_compare(const char* a_, const char* b_) 47 | { 48 | return strcmp(a_, b_) < 0 ? 1 : 0; 49 | } 50 | -------------------------------------------------------------------------------- /stlport/cassert: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 3 | * Boris Fomitchev 4 | * 5 | * This material is provided "as is", with absolutely no warranty expressed 6 | * or implied. Any use is at your own risk. 7 | * 8 | * Permission to use or copy this software for any purpose is hereby granted 9 | * without fee, provided the above notices are retained on all copies. 10 | * Permission to modify the code and to distribute modified code is granted, 11 | * provided the above notices are retained, and a notice that the code was 12 | * modified is included with the above copyright notice. 13 | * 14 | */ 15 | 16 | #ifndef _STLP_OUTERMOST_HEADER_ID 17 | # define _STLP_OUTERMOST_HEADER_ID 0x103 18 | # include 19 | #elif (_STLP_OUTERMOST_HEADER_ID == 0x103) && ! defined (_STLP_DONT_POP_HEADER_ID) 20 | # define _STLP_DONT_POP_HEADER_ID 21 | #endif 22 | 23 | #if !defined (_STLP_WCE_EVC3) 24 | # if defined (_STLP_USE_NEW_C_HEADERS) 25 | # include _STLP_NATIVE_CPP_C_HEADER(cassert) 26 | # else 27 | # include 28 | # endif 29 | #endif 30 | 31 | #if (_STLP_OUTERMOST_HEADER_ID == 0x103 ) 32 | # if !defined (_STLP_DONT_POP_HEADER_ID) 33 | # include 34 | # undef _STLP_OUTERMOST_HEADER_ID 35 | # else 36 | # undef _STLP_DONT_POP_HEADER_ID 37 | # endif 38 | #endif 39 | 40 | // Local Variables: 41 | // mode:C++ 42 | // End: 43 | -------------------------------------------------------------------------------- /test/eh/test_bitset.cpp: -------------------------------------------------------------------------------- 1 | /*********************************************************************************** 2 | test_bitset.cpp 3 | 4 | * Copyright (c) 1997 5 | * Mark of the Unicorn, Inc. 6 | * 7 | * Permission to use, copy, modify, distribute and sell this software 8 | * and its documentation for any purpose is hereby granted without fee, 9 | * provided that the above copyright notice appear in all copies and 10 | * that both that copyright notice and this permission notice appear 11 | * in supporting documentation. Mark of the Unicorn makes no 12 | * representations about the suitability of this software for any 13 | * purpose. It is provided "as is" without express or implied warranty. 14 | 15 | ***********************************************************************************/ 16 | #include "Prefix.h" 17 | #if defined( EH_BITSET_IMPLEMENTED ) 18 | #include "Tests.h" 19 | #include 20 | #include "TestClass.h" 21 | #include "LeakCheck.h" 22 | #include "test_construct.h" 23 | #include "test_assign_op.h" 24 | #include "test_push_back.h" 25 | #include "test_insert.h" 26 | #include "test_push_front.h" 27 | 28 | typedef bitset<100> TestBitset; 29 | 30 | inline sequence_container_tag 31 | container_category(const TestBitset&) 32 | { 33 | return sequence_container_tag(); 34 | } 35 | 36 | void test_bitset() 37 | { 38 | } 39 | #endif // EH_BITSET_IMPLEMENTED 40 | -------------------------------------------------------------------------------- /test/unit/queue_test.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | #include "cppunit/cppunit_proxy.h" 8 | 9 | #if !defined (STLPORT) || defined(_STLP_USE_NAMESPACES) 10 | using namespace std; 11 | #endif 12 | 13 | // 14 | // TestCase class 15 | // 16 | class QueueTest : public CPPUNIT_NS::TestCase 17 | { 18 | CPPUNIT_TEST_SUITE(QueueTest); 19 | CPPUNIT_TEST(pqueue1); 20 | CPPUNIT_TEST(queue1); 21 | CPPUNIT_TEST_SUITE_END(); 22 | 23 | protected: 24 | void pqueue1(); 25 | void queue1(); 26 | }; 27 | 28 | CPPUNIT_TEST_SUITE_REGISTRATION(QueueTest); 29 | 30 | // 31 | // tests implementation 32 | // 33 | void QueueTest::pqueue1() 34 | { 35 | priority_queue, less > q; 36 | q.push(42); 37 | q.push(101); 38 | q.push(69); 39 | 40 | CPPUNIT_ASSERT( q.top()==101 ); 41 | q.pop(); 42 | CPPUNIT_ASSERT( q.top()==69 ); 43 | q.pop(); 44 | CPPUNIT_ASSERT( q.top()==42 ); 45 | q.pop(); 46 | 47 | CPPUNIT_ASSERT(q.empty()); 48 | } 49 | void QueueTest::queue1() 50 | { 51 | queue > q; 52 | q.push(42); 53 | q.push(101); 54 | q.push(69); 55 | 56 | CPPUNIT_ASSERT( q.front()==42 ); 57 | q.pop(); 58 | CPPUNIT_ASSERT( q.front()==101 ); 59 | q.pop(); 60 | CPPUNIT_ASSERT( q.front()==69 ); 61 | q.pop(); 62 | 63 | CPPUNIT_ASSERT(q.empty()); 64 | } 65 | -------------------------------------------------------------------------------- /stlport/functional: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1996,1997 3 | * Silicon Graphics Computer Systems, Inc. 4 | * 5 | * Copyright (c) 1999 6 | * Boris Fomitchev 7 | * 8 | * This material is provided "as is", with absolutely no warranty expressed 9 | * or implied. Any use is at your own risk. 10 | * 11 | * Permission to use or copy this software for any purpose is hereby granted 12 | * without fee, provided the above notices are retained on all copies. 13 | * Permission to modify the code and to distribute modified code is granted, 14 | * provided the above notices are retained, and a notice that the code was 15 | * modified is included with the above copyright notice. 16 | * 17 | */ 18 | 19 | #ifndef _STLP_FUNCTIONAL 20 | #define _STLP_FUNCTIONAL 21 | 22 | # ifndef _STLP_OUTERMOST_HEADER_ID 23 | # define _STLP_OUTERMOST_HEADER_ID 0x27 24 | # include 25 | # endif 26 | 27 | # ifdef _STLP_PRAGMA_ONCE 28 | # pragma once 29 | # endif 30 | 31 | # if defined (_STLP_IMPORT_VENDOR_STD) 32 | # include _STLP_NATIVE_HEADER(functional) 33 | # endif 34 | 35 | # ifndef _STLP_INTERNAL_FUNCTION_H 36 | # include 37 | # endif 38 | 39 | # if (_STLP_OUTERMOST_HEADER_ID == 0x27) 40 | # include 41 | # undef _STLP_OUTERMOST_HEADER_ID 42 | # endif 43 | 44 | #endif /* _STLP_FUNCTIONAL */ 45 | 46 | // Local Variables: 47 | // mode:C++ 48 | // End: 49 | -------------------------------------------------------------------------------- /stlport/pthread_alloc: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1994 4 | * Hewlett-Packard Company 5 | * 6 | * Copyright (c) 1996,1997 7 | * Silicon Graphics Computer Systems, Inc. 8 | * 9 | * Copyright (c) 1997 10 | * Moscow Center for SPARC Technology 11 | * 12 | * Copyright (c) 1999 13 | * Boris Fomitchev 14 | * 15 | * This material is provided "as is", with absolutely no warranty expressed 16 | * or implied. Any use is at your own risk. 17 | * 18 | * Permission to use or copy this software for any purpose is hereby granted 19 | * without fee, provided the above notices are retained on all copies. 20 | * Permission to modify the code and to distribute modified code is granted, 21 | * provided the above notices are retained, and a notice that the code was 22 | * modified is included with the above copyright notice. 23 | * 24 | */ 25 | 26 | #ifndef _STLP_PTHREAD_ALLOC 27 | #define _STLP_PTHREAD_ALLOC 28 | 29 | # ifndef _STLP_OUTERMOST_HEADER_ID 30 | # define _STLP_OUTERMOST_HEADER_ID 0x52 31 | # include 32 | # endif 33 | 34 | # ifdef _STLP_PRAGMA_ONCE 35 | # pragma once 36 | # endif 37 | 38 | # include 39 | 40 | # if (_STLP_OUTERMOST_HEADER_ID == 0x52) 41 | # include 42 | # undef _STLP_OUTERMOST_HEADER_ID 43 | # endif 44 | 45 | #endif /* _STLP_PTHREAD_ALLOC */ 46 | 47 | // Local Variables: 48 | // mode:C++ 49 | // End: 50 | -------------------------------------------------------------------------------- /stlport/locale.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 3 | * Boris Fomitchev 4 | * 5 | * This material is provided "as is", with absolutely no warranty expressed 6 | * or implied. Any use is at your own risk. 7 | * 8 | * Permission to use or copy this software for any purpose is hereby granted 9 | * without fee, provided the above notices are retained on all copies. 10 | * Permission to modify the code and to distribute modified code is granted, 11 | * provided the above notices are retained, and a notice that the code was 12 | * modified is included with the above copyright notice. 13 | * 14 | */ 15 | 16 | #if !defined (_STLP_OUTERMOST_HEADER_ID) 17 | # define _STLP_OUTERMOST_HEADER_ID 0x242 18 | # include 19 | #elif (_STLP_OUTERMOST_HEADER_ID == 0x242) 20 | # if !defined (_STLP_DONT_POP_HEADER_ID) 21 | # define _STLP_DONT_POP_HEADER_ID 22 | # else 23 | # error STLport include schema violation 24 | # endif 25 | #endif 26 | 27 | /* evc3 doesn't have locale.h */ 28 | #ifndef _STLP_WCE_EVC3 29 | # include _STLP_NATIVE_C_HEADER(locale.h) 30 | #endif 31 | 32 | #if (_STLP_OUTERMOST_HEADER_ID == 0x242) 33 | # if !defined (_STLP_DONT_POP_HEADER_ID) 34 | # include 35 | # undef _STLP_OUTERMOST_HEADER_ID 36 | # else 37 | # undef _STLP_DONT_POP_HEADER_ID 38 | # endif 39 | #endif 40 | 41 | /* Local Variables: 42 | * mode:C++ 43 | * End: 44 | */ 45 | -------------------------------------------------------------------------------- /stlport/string: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997-1999 3 | * Silicon Graphics Computer Systems, Inc. 4 | * 5 | * Copyright (c) 1999 6 | * Boris Fomitchev 7 | * 8 | * This material is provided "as is", with absolutely no warranty expressed 9 | * or implied. Any use is at your own risk. 10 | * 11 | * Permission to use or copy this software for any purpose is hereby granted 12 | * without fee, provided the above notices are retained on all copies. 13 | * Permission to modify the code and to distribute modified code is granted, 14 | * provided the above notices are retained, and a notice that the code was 15 | * modified is included with the above copyright notice. 16 | * 17 | */ 18 | 19 | #ifndef _STLP_STRING 20 | # define _STLP_STRING 21 | 22 | #ifndef _STLP_OUTERMOST_HEADER_ID 23 | # define _STLP_OUTERMOST_HEADER_ID 0x68 24 | # include 25 | #endif 26 | 27 | #ifdef _STLP_PRAGMA_ONCE 28 | # pragma once 29 | #endif 30 | 31 | #if defined (_STLP_USE_OWN_NAMESPACE) 32 | # include 33 | #endif 34 | 35 | #include 36 | 37 | #if !defined (_STLP_USE_NO_IOSTREAMS) 38 | # include 39 | #endif 40 | 41 | #if (_STLP_OUTERMOST_HEADER_ID == 0x68) 42 | # include 43 | # undef _STLP_OUTERMOST_HEADER_ID 44 | #endif 45 | 46 | #endif /* _STLP_STRING */ 47 | 48 | // Local Variables: 49 | // mode:C++ 50 | // End: 51 | 52 | -------------------------------------------------------------------------------- /stlport/climits: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 3 | * Boris Fomitchev 4 | * 5 | * This material is provided "as is", with absolutely no warranty expressed 6 | * or implied. Any use is at your own risk. 7 | * 8 | * Permission to use or copy this software for any purpose is hereby granted 9 | * without fee, provided the above notices are retained on all copies. 10 | * Permission to modify the code and to distribute modified code is granted, 11 | * provided the above notices are retained, and a notice that the code was 12 | * modified is included with the above copyright notice. 13 | * 14 | */ 15 | 16 | #ifndef _STLP_CLIMITS 17 | # define _STLP_CLIMITS 18 | 19 | #ifndef _STLP_OUTERMOST_HEADER_ID 20 | # define _STLP_OUTERMOST_HEADER_ID 0x108 21 | # include 22 | #endif 23 | 24 | #if defined (__SUNPRO_CC) && ((__SUNPRO_CC == 0x500) && (__SUNPRO_CC_COMPAT > 4)) 25 | # include 26 | #elif defined (_STLP_USE_NEW_C_HEADERS) 27 | # include _STLP_NATIVE_CPP_C_HEADER(climits) 28 | #else 29 | # if defined (__BORLANDC__) 30 | # include _STLP_NATIVE_C_HEADER(limits.h) 31 | # else 32 | # include 33 | # endif 34 | #endif 35 | 36 | #if (_STLP_OUTERMOST_HEADER_ID == 0x108 ) 37 | # include 38 | # undef _STLP_OUTERMOST_HEADER_ID 39 | #endif 40 | 41 | #endif /* _STLP_CLIMITS */ 42 | 43 | // Local Variables: 44 | // mode:C++ 45 | // End: 46 | -------------------------------------------------------------------------------- /test/eh/descrip.mms: -------------------------------------------------------------------------------- 1 | # ;;; -*- Mode:makefile;-*- 2 | # Generated manually for MMS 3 | 4 | # point this to proper location 5 | STL_INCL= /include="../../stlport" 6 | 7 | 8 | # STL_INCL= -DEH_NO_SGI_STL 9 | 10 | .SUFFIXES .obj .cpp 11 | 12 | all : check 13 | 14 | AUX_LIST=TestClass.obj,main.obj,nc_alloc.obj,random_number.obj 15 | 16 | TEST_LIST=test_algo.obj,- 17 | test_algobase.obj,test_list.obj,test_slist.obj,- 18 | test_bit_vector.obj,test_vector.obj,- 19 | test_deque.obj,test_set.obj,test_map.obj,- 20 | test_hash_map.obj,test_hash_set.obj,test_rope.obj,- 21 | test_string.obj,test_bitset.obj,test_valarray.obj 22 | 23 | LIST=$(AUX_LIST),$(TEST_LIST) 24 | 25 | OBJECTS = $(LIST) 26 | EXECS = $(LIST:%.obj=%.exe) 27 | TESTS = $(LIST:%.obj=%.out) 28 | TEST_EXE = eh_test.exe 29 | TEST = eh_test.out 30 | 31 | CC = cxx 32 | CXX = $(CC) 33 | LINK = cxxlink 34 | 35 | # -std strict_ansi_errors 36 | 37 | CXXFLAGS = $(STL_INCL) /define=(__NO_USE_STD_IOSTREAM,EH_VECTOR_OPERATOR_NEW,EH_DELETE_HAS_THROW_SPEC) 38 | 39 | # This is to test with native STL 40 | # CXXFLAGS = +w2 -xildoff -D__STL_USE_NEWALLOC -DEH_NO_SGI_STL -DEH_NEW_HEADERS -DEH_VECTOR_OPERATOR_NEW -DEH_DELETE_HAS_THROW_SPEC 41 | 42 | 43 | LIBS = 44 | LIBSTDCXX = 45 | 46 | check : $(TEST) 47 | 48 | $(TEST) : $(OBJECTS) 49 | $(LINK)/exe=$(TEST_EXE) $(OBJECTS) $(LIBS) 50 | run $(TEST_EXE) 51 | 52 | .cpp.obj : 53 | $(CXX) $(CXXFLAGS) /obj=$@ $< 54 | 55 | -------------------------------------------------------------------------------- /test/unit/rawriter_test.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "cppunit/cppunit_proxy.h" 6 | 7 | #if !defined (STLPORT) || defined(_STLP_USE_NAMESPACES) 8 | using namespace std; 9 | #endif 10 | 11 | class X 12 | { 13 | public: 14 | X(int i_ = 0) : i(i_) {} 15 | ~X() {} 16 | operator int() const { return i; } 17 | 18 | private: 19 | int i; 20 | }; 21 | 22 | 23 | // 24 | // TestCase class 25 | // 26 | class RawriterTest : public CPPUNIT_NS::TestCase 27 | { 28 | CPPUNIT_TEST_SUITE(RawriterTest); 29 | CPPUNIT_TEST(rawiter1); 30 | CPPUNIT_TEST_SUITE_END(); 31 | 32 | protected: 33 | void rawiter1(); 34 | }; 35 | 36 | CPPUNIT_TEST_SUITE_REGISTRATION(RawriterTest); 37 | 38 | // 39 | // tests implementation 40 | // 41 | void RawriterTest::rawiter1() 42 | { 43 | allocator a; 44 | typedef X* x_pointer; 45 | x_pointer save_p, p; 46 | p = a.allocate(5); 47 | save_p=p; 48 | raw_storage_iterator r(p); 49 | int i; 50 | for(i = 0; i < 5; i++) 51 | *r++ = X(i); 52 | 53 | CPPUNIT_ASSERT(*p++ == 0); 54 | CPPUNIT_ASSERT(*p++ == 1); 55 | CPPUNIT_ASSERT(*p++ == 2); 56 | CPPUNIT_ASSERT(*p++ == 3); 57 | CPPUNIT_ASSERT(*p++ == 4); 58 | 59 | //#if defined (STLPORT) || defined (__GNUC__) 60 | a.deallocate(save_p, 5); 61 | /* 62 | #else 63 | a.deallocate(save_p); 64 | #endif 65 | */ 66 | 67 | CPPUNIT_ASSERT(true); 68 | } 69 | -------------------------------------------------------------------------------- /test/eh/cray.mak: -------------------------------------------------------------------------------- 1 | 2 | SHELL=/bin/sh 3 | 4 | # srcdir = . 5 | # VPATH = . 6 | 7 | STL_INCL=-I${PWD}/../../stlport/ 8 | 9 | AUX_LIST=TestClass.o main.o nc_alloc.o random_number.o 10 | 11 | TEST_LIST=test_algo.o \ 12 | test_algobase.o test_list.o test_slist.o \ 13 | test_bit_vector.o test_vector.o \ 14 | test_deque_cray.o test_set.o test_map.o \ 15 | test_hash_map.o test_hash_set.o test_rope.o \ 16 | test_string.o test_bitset.o test_valarray.o 17 | 18 | LIST=${AUX_LIST} ${TEST_LIST} 19 | 20 | OBJECTS = $(LIST) 21 | EXECS = $(LIST:%.o=%) 22 | TESTS = $(LIST:%.o=%.out) 23 | TEST_EXE = eh_test 24 | TEST = eh_test.out 25 | 26 | CC = CC 27 | CXX = $(CC) 28 | 29 | #CXXFLAGS = -hexceptions -DEH_DELETE_HAS_THROW_SPEC -I. ${STL_INCL} ${DEBUG_FLAGS} 30 | CXXFLAGS = -D_STLP_HAS_NO_EXCEPTIONS -I. ${STL_INCL} ${DEBUG_FLAGS} 31 | 32 | #LIBS = -L../../lib -lstlportx -lpthread 33 | LIBS = -L../../lib -lstlport -lpthread 34 | 35 | .SUFFIXES: .cpp .i .o .out 36 | 37 | check: $(TEST) 38 | 39 | $(TEST) : $(OBJECTS) 40 | $(CXX) $(CXXFLAGS) $(LIBS) $(OBJECTS) -o $(TEST_EXE) 41 | ./$(TEST_EXE) -s 100 42 | 43 | .cpp.o: 44 | $(CXX) $(CXXFLAGS) $< -c -o $@ 45 | 46 | .cpp.i: 47 | $(CXX) $(CXXFLAGS) $< -E > $@ 48 | 49 | %.out: %.cpp 50 | $(CXX) $(CXXFLAGS) $*.cpp -c -USINGLE -DMAIN -g -o $*.o 51 | $(CXX) $(CXXFLAGS) $(LIBS) $*.o -o $* 52 | ./$* -q 53 | -rm -f $* 54 | 55 | clean: 56 | -rm -fr ${TEST_EXE} *.o *.ii *.out core 57 | -------------------------------------------------------------------------------- /test/eh/random_number.cpp: -------------------------------------------------------------------------------- 1 | /*********************************************************************************** 2 | random_number.cpp 3 | 4 | * Copyright (c) 1997 5 | * Mark of the Unicorn, Inc. 6 | * 7 | * Permission to use, copy, modify, distribute and sell this software 8 | * and its documentation for any purpose is hereby granted without fee, 9 | * provided that the above copyright notice appear in all copies and 10 | * that both that copyright notice and this permission notice appear 11 | * in supporting documentation. Mark of the Unicorn makes no 12 | * representations about the suitability of this software for any 13 | * purpose. It is provided "as is" without express or implied warranty. 14 | 15 | ***********************************************************************************/ 16 | #include "random_number.h" 17 | #include "Prefix.h" 18 | #if defined (EH_NEW_HEADERS) 19 | # include 20 | # include 21 | #else 22 | # include 23 | # include 24 | #endif 25 | 26 | unsigned random_number( size_t range ) 27 | { 28 | #if !defined( __SGI_STL ) 29 | if (range == 0) return 0; 30 | return (unsigned)(EH_STD::rand() + EH_STD::rand()) % range; 31 | #else 32 | static EH_STD::subtractive_rng rnd; 33 | if (range==0) return 0; 34 | return rnd(range); 35 | #endif 36 | } 37 | 38 | // default base for random container sizes 39 | unsigned random_base = 1000; 40 | -------------------------------------------------------------------------------- /stlport/stl/_mbstate_t.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 3 | * Boris Fomitchev 4 | * 5 | * This material is provided "as is", with absolutely no warranty expressed 6 | * or implied. Any use is at your own risk. 7 | * 8 | * Permission to use or copy this software for any purpose is hereby granted 9 | * without fee, provided the above notices are retained on all copies. 10 | * Permission to modify the code and to distribute modified code is granted, 11 | * provided the above notices are retained, and a notice that the code was 12 | * modified is included with the above copyright notice. 13 | * 14 | */ 15 | 16 | #ifndef _STLP_INTERNAL_MBSTATE_T 17 | #define _STLP_INTERNAL_MBSTATE_T 18 | 19 | #if (defined (__OpenBSD__) || defined (__FreeBSD__)) && defined (__GNUC__) && !defined (_GLIBCPP_HAVE_MBSTATE_T) 20 | # define __mbstate_t_defined /* mbstate_t defined in native , so not defined in C! */ 21 | #endif 22 | 23 | #if defined (_STLP_NO_NATIVE_MBSTATE_T) && !defined (_STLP_NO_MBSTATE_T) && !defined (_MBSTATE_T) && !defined (__mbstate_t_defined) 24 | # define _STLP_USE_OWN_MBSTATE_T 25 | # define _MBSTATE_T 26 | #endif 27 | 28 | #if defined (_STLP_USE_OWN_MBSTATE_T) 29 | typedef int mbstate_t; 30 | 31 | # if defined (__cplusplus) 32 | _STLP_BEGIN_NAMESPACE 33 | using ::mbstate_t; 34 | _STLP_END_NAMESPACE 35 | # endif 36 | 37 | #endif /* _STLP_USE_OWN_MBSTATE_T */ 38 | 39 | #endif /* _STLP_INTERNAL_MBSTATE_T */ 40 | -------------------------------------------------------------------------------- /stlport/map: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1994 4 | * Hewlett-Packard Company 5 | * 6 | * Copyright (c) 1996,1997 7 | * Silicon Graphics Computer Systems, Inc. 8 | * 9 | * Copyright (c) 1997 10 | * Moscow Center for SPARC Technology 11 | * 12 | * Copyright (c) 1999 13 | * Boris Fomitchev 14 | * 15 | * This material is provided "as is", with absolutely no warranty expressed 16 | * or implied. Any use is at your own risk. 17 | * 18 | * Permission to use or copy this software for any purpose is hereby granted 19 | * without fee, provided the above notices are retained on all copies. 20 | * Permission to modify the code and to distribute modified code is granted, 21 | * provided the above notices are retained, and a notice that the code was 22 | * modified is included with the above copyright notice. 23 | * 24 | */ 25 | 26 | #ifndef _STLP_MAP 27 | #define _STLP_MAP 28 | 29 | #ifndef _STLP_OUTERMOST_HEADER_ID 30 | # define _STLP_OUTERMOST_HEADER_ID 0x43 31 | # include 32 | #endif 33 | 34 | #ifdef _STLP_PRAGMA_ONCE 35 | # pragma once 36 | #endif 37 | 38 | #include 39 | 40 | #if defined (_STLP_IMPORT_VENDOR_STD) 41 | # include _STLP_NATIVE_HEADER(map) 42 | #endif 43 | 44 | #if (_STLP_OUTERMOST_HEADER_ID == 0x43) 45 | # include 46 | # undef _STLP_OUTERMOST_HEADER_ID 47 | #endif 48 | 49 | #endif /* _STLP_MAP */ 50 | 51 | // Local Variables: 52 | // mode:C++ 53 | // End: 54 | -------------------------------------------------------------------------------- /stlport/set: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1994 4 | * Hewlett-Packard Company 5 | * 6 | * Copyright (c) 1996,1997 7 | * Silicon Graphics Computer Systems, Inc. 8 | * 9 | * Copyright (c) 1997 10 | * Moscow Center for SPARC Technology 11 | * 12 | * Copyright (c) 1999 13 | * Boris Fomitchev 14 | * 15 | * This material is provided "as is", with absolutely no warranty expressed 16 | * or implied. Any use is at your own risk. 17 | * 18 | * Permission to use or copy this software for any purpose is hereby granted 19 | * without fee, provided the above notices are retained on all copies. 20 | * Permission to modify the code and to distribute modified code is granted, 21 | * provided the above notices are retained, and a notice that the code was 22 | * modified is included with the above copyright notice. 23 | * 24 | */ 25 | 26 | #ifndef _STLP_SET 27 | #define _STLP_SET 28 | 29 | #ifndef _STLP_OUTERMOST_HEADER_ID 30 | # define _STLP_OUTERMOST_HEADER_ID 0x55 31 | # include 32 | #endif 33 | 34 | #ifdef _STLP_PRAGMA_ONCE 35 | # pragma once 36 | #endif 37 | 38 | #include 39 | 40 | #if defined (_STLP_IMPORT_VENDOR_STD) 41 | # include _STLP_NATIVE_HEADER(set) 42 | #endif 43 | 44 | #if (_STLP_OUTERMOST_HEADER_ID == 0x55) 45 | # include 46 | # undef _STLP_OUTERMOST_HEADER_ID 47 | #endif 48 | 49 | #endif /* _STLP_SET */ 50 | 51 | // Local Variables: 52 | // mode:C++ 53 | // End: 54 | -------------------------------------------------------------------------------- /stlport/hash_map: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1996,1997 3 | * Silicon Graphics Computer Systems, Inc. 4 | * 5 | * Copyright (c) 1999 6 | * Boris Fomitchev 7 | * 8 | * This material is provided "as is", with absolutely no warranty expressed 9 | * or implied. Any use is at your own risk. 10 | * 11 | * Permission to use or copy this software for any purpose is hereby granted 12 | * without fee, provided the above notices are retained on all copies. 13 | * Permission to modify the code and to distribute modified code is granted, 14 | * provided the above notices are retained, and a notice that the code was 15 | * modified is included with the above copyright notice. 16 | * 17 | */ 18 | 19 | #ifndef _STLP_HASH_MAP 20 | #define _STLP_HASH_MAP 21 | 22 | #ifndef _STLP_OUTERMOST_HEADER_ID 23 | # define _STLP_OUTERMOST_HEADER_ID 0x4028 24 | # include 25 | #endif 26 | 27 | #ifdef _STLP_PRAGMA_ONCE 28 | # pragma once 29 | #endif 30 | 31 | #if defined (_STLP_NO_EXTENSIONS) 32 | /* Comment following if you want to use hash constainers even if you ask for 33 | * no extension. 34 | */ 35 | # error The hash_map and hash_multimap class are STLport extensions. 36 | #endif 37 | 38 | #include 39 | 40 | #if (_STLP_OUTERMOST_HEADER_ID == 0x4028) 41 | # include 42 | # undef _STLP_OUTERMOST_HEADER_ID 43 | #endif 44 | 45 | #endif /* _STLP_HASH_MAP */ 46 | 47 | // Local Variables: 48 | // mode:C++ 49 | // End: 50 | -------------------------------------------------------------------------------- /stlport/hash_set: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1996,1997 3 | * Silicon Graphics Computer Systems, Inc. 4 | * 5 | * Copyright (c) 1999 6 | * Boris Fomitchev 7 | * 8 | * This material is provided "as is", with absolutely no warranty expressed 9 | * or implied. Any use is at your own risk. 10 | * 11 | * Permission to use or copy this software for any purpose is hereby granted 12 | * without fee, provided the above notices are retained on all copies. 13 | * Permission to modify the code and to distribute modified code is granted, 14 | * provided the above notices are retained, and a notice that the code was 15 | * modified is included with the above copyright notice. 16 | * 17 | */ 18 | 19 | #ifndef _STLP_HASH_SET 20 | #define _STLP_HASH_SET 21 | 22 | #ifndef _STLP_OUTERMOST_HEADER_ID 23 | # define _STLP_OUTERMOST_HEADER_ID 0x4029 24 | # include 25 | #endif 26 | 27 | #ifdef _STLP_PRAGMA_ONCE 28 | # pragma once 29 | #endif 30 | 31 | #if defined (_STLP_NO_EXTENSIONS) 32 | /* Comment following if you want to use hash constainers even if you ask for 33 | * no extension. 34 | */ 35 | # error The hash_set and hash_multiset class are STLport extensions. 36 | #endif 37 | 38 | #include 39 | 40 | #if (_STLP_OUTERMOST_HEADER_ID == 0x4029) 41 | # include 42 | # undef _STLP_OUTERMOST_HEADER_ID 43 | #endif 44 | 45 | #endif /* _STLP_HASH_SET */ 46 | 47 | // Local Variables: 48 | // mode:C++ 49 | // End: 50 | -------------------------------------------------------------------------------- /test/unit/bcompos_test.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "unary.h" 3 | 4 | #include "cppunit/cppunit_proxy.h" 5 | 6 | #if defined(_STLP_USE_NAMESPACES) 7 | using namespace std; 8 | #endif 9 | 10 | // 11 | // TestCase class 12 | // 13 | class BcomposTest : public CPPUNIT_NS::TestCase 14 | { 15 | CPPUNIT_TEST_SUITE(BcomposTest); 16 | #if !defined (STLPORT) || defined (_STLP_NO_EXTENSIONS) 17 | CPPUNIT_IGNORE; 18 | #endif 19 | CPPUNIT_TEST(bcompos1); 20 | CPPUNIT_TEST(bcompos2); 21 | CPPUNIT_TEST_SUITE_END(); 22 | 23 | protected: 24 | void bcompos1(); 25 | void bcompos2(); 26 | }; 27 | 28 | CPPUNIT_TEST_SUITE_REGISTRATION(BcomposTest); 29 | 30 | // 31 | // tests implementation 32 | // 33 | void BcomposTest::bcompos1() 34 | { 35 | #if defined (STLPORT) && !defined (_STLP_NO_EXTENSIONS) 36 | int array [6] = { -2, -1, 0, 1, 2, 3 }; 37 | 38 | binary_compose, odd, positive> 39 | b = binary_compose, odd, positive>(logical_and(), odd(), positive()); 40 | 41 | int* p = find_if((int*)array, (int*)array + 6, b); 42 | CPPUNIT_ASSERT(p != array + 6); 43 | #endif 44 | } 45 | 46 | void BcomposTest::bcompos2() 47 | { 48 | #if defined (STLPORT) && !defined (_STLP_NO_EXTENSIONS) 49 | int array [6] = { -2, -1 , 0, 1, 2, 3 }; 50 | 51 | int* p = find_if((int*)array, (int*)array + 6, 52 | compose2(logical_and(), odd(), positive())); 53 | CPPUNIT_ASSERT(p != array + 6); 54 | #endif 55 | } 56 | -------------------------------------------------------------------------------- /src/ostream.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 3 | * Silicon Graphics Computer Systems, Inc. 4 | * 5 | * Copyright (c) 1999 6 | * Boris Fomitchev 7 | * 8 | * This material is provided "as is", with absolutely no warranty expressed 9 | * or implied. Any use is at your own risk. 10 | * 11 | * Permission to use or copy this software for any purpose is hereby granted 12 | * without fee, provided the above notices are retained on all copies. 13 | * Permission to modify the code and to distribute modified code is granted, 14 | * provided the above notices are retained, and a notice that the code was 15 | * modified is included with the above copyright notice. 16 | * 17 | */ 18 | #include "stlport_prefix.h" 19 | 20 | #include 21 | 22 | _STLP_BEGIN_NAMESPACE 23 | 24 | #if !defined(_STLP_NO_FORCE_INSTANTIATE) 25 | 26 | // instantiations 27 | template class _STLP_CLASS_DECLSPEC basic_ostream >; 28 | 29 | # if defined (_STLP_USE_TEMPLATE_EXPORT) 30 | template class _STLP_CLASS_DECLSPEC _Osentry >; 31 | # endif 32 | 33 | #ifndef _STLP_NO_WCHAR_T 34 | 35 | # if defined (_STLP_USE_TEMPLATE_EXPORT) 36 | template class _STLP_CLASS_DECLSPEC _Osentry >; 37 | # endif 38 | template class _STLP_CLASS_DECLSPEC basic_ostream >; 39 | #endif 40 | 41 | #endif 42 | 43 | _STLP_END_NAMESPACE 44 | 45 | // Local Variables: 46 | // mode:C++ 47 | // End: 48 | -------------------------------------------------------------------------------- /stlport/fstream: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 3 | * Silicon Graphics Computer Systems, Inc. 4 | * 5 | * Copyright (c) 1999 6 | * Boris Fomitchev 7 | * 8 | * This material is provided "as is", with absolutely no warranty expressed 9 | * or implied. Any use is at your own risk. 10 | * 11 | * Permission to use or copy this software for any purpose is hereby granted 12 | * without fee, provided the above notices are retained on all copies. 13 | * Permission to modify the code and to distribute modified code is granted, 14 | * provided the above notices are retained, and a notice that the code was 15 | * modified is included with the above copyright notice. 16 | * 17 | */ 18 | 19 | 20 | // This header defines classes basic_filebuf, basic_ifstream, 21 | // basic_ofstream, and basic_fstream. These classes represent 22 | // streambufs and streams whose sources or destinations are files. 23 | 24 | #ifndef _STLP_FSTREAM 25 | #define _STLP_FSTREAM 26 | 27 | # ifndef _STLP_OUTERMOST_HEADER_ID 28 | # define _STLP_OUTERMOST_HEADER_ID 0x1025 29 | # include 30 | # endif 31 | 32 | #ifdef _STLP_PRAGMA_ONCE 33 | # pragma once 34 | #endif 35 | 36 | # include 37 | # include 38 | 39 | # if (_STLP_OUTERMOST_HEADER_ID == 0x1025) 40 | # include 41 | # undef _STLP_OUTERMOST_HEADER_ID 42 | # endif 43 | 44 | #endif /* _STLP_FSTREAM */ 45 | 46 | 47 | // Local Variables: 48 | // mode:C++ 49 | // End: 50 | -------------------------------------------------------------------------------- /stlport/using/ios: -------------------------------------------------------------------------------- 1 | # ifdef _STLP_BROKEN_USING_DIRECTIVE 2 | using namespace _STLP_NEW_IO_NAMESPACE; 3 | # else 4 | 5 | using _STLP_NEW_IO_NAMESPACE::ios; 6 | using _STLP_NEW_IO_NAMESPACE::streamoff; 7 | using _STLP_NEW_IO_NAMESPACE::streamsize; 8 | 9 | using _STLP_NEW_IO_NAMESPACE::ios_base; 10 | using _STLP_NEW_IO_NAMESPACE::basic_ios; 11 | 12 | // _lib.std.ios.manip_, manipulators: 13 | using _STLP_NEW_IO_NAMESPACE::boolalpha; 14 | using _STLP_NEW_IO_NAMESPACE::noboolalpha; 15 | using _STLP_NEW_IO_NAMESPACE::showbase; 16 | using _STLP_NEW_IO_NAMESPACE::noshowbase; 17 | using _STLP_NEW_IO_NAMESPACE::showpoint; 18 | using _STLP_NEW_IO_NAMESPACE::noshowpoint; 19 | using _STLP_NEW_IO_NAMESPACE::showpos; 20 | using _STLP_NEW_IO_NAMESPACE::noshowpos; 21 | using _STLP_NEW_IO_NAMESPACE::skipws; 22 | using _STLP_NEW_IO_NAMESPACE::noskipws; 23 | using _STLP_NEW_IO_NAMESPACE::uppercase; 24 | using _STLP_NEW_IO_NAMESPACE::nouppercase; 25 | 26 | // _lib.adjustfield.manip_ adjustfield: 27 | using _STLP_NEW_IO_NAMESPACE::internal; 28 | using _STLP_NEW_IO_NAMESPACE::left; 29 | using _STLP_NEW_IO_NAMESPACE::right; 30 | 31 | // _lib.basefield.manip_ basefield: 32 | using _STLP_NEW_IO_NAMESPACE::dec; 33 | using _STLP_NEW_IO_NAMESPACE::hex; 34 | using _STLP_NEW_IO_NAMESPACE::oct; 35 | 36 | // _lib.floatfield.manip_ floatfield: 37 | using _STLP_NEW_IO_NAMESPACE::fixed; 38 | using _STLP_NEW_IO_NAMESPACE::scientific; 39 | 40 | # endif /* _STLP_BROKEN_USING_DIRECTIVE */ 41 | 42 | -------------------------------------------------------------------------------- /stlport/stl/_cstddef.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 3 | * Boris Fomitchev 4 | * 5 | * This material is provided "as is", with absolutely no warranty expressed 6 | * or implied. Any use is at your own risk. 7 | * 8 | * Permission to use or copy this software for any purpose is hereby granted 9 | * without fee, provided the above notices are retained on all copies. 10 | * Permission to modify the code and to distribute modified code is granted, 11 | * provided the above notices are retained, and a notice that the code was 12 | * modified is included with the above copyright notice. 13 | * 14 | */ 15 | 16 | #ifndef _STLP_INTERNAL_CSTDDEF 17 | #define _STLP_INTERNAL_CSTDDEF 18 | 19 | # if (__GNUC__ >= 3) && defined (__CYGWIN__) // this total HACK is the only expedient way I could cygwin to work with GCC 3.0 20 | # define __need_wint_t // mostly because wint_t didn't seem to get defined otherwise :( 21 | # define __need_wchar_t 22 | # define __need_size_t 23 | # define __need_ptrdiff_t 24 | # define __need_NULL 25 | # endif 26 | 27 | # if defined (_STLP_USE_NEW_C_HEADERS) 28 | # include _STLP_NATIVE_CPP_C_HEADER(cstddef) 29 | # else 30 | # include 31 | # endif 32 | 33 | # ifdef _STLP_IMPORT_VENDOR_CSTD 34 | _STLP_BEGIN_NAMESPACE 35 | using _STLP_VENDOR_CSTD::ptrdiff_t; 36 | using _STLP_VENDOR_CSTD::size_t; 37 | _STLP_END_NAMESPACE 38 | # endif /* _STLP_IMPORT_VENDOR_CSTD */ 39 | 40 | #endif /* _STLP_INTERNAL_CSTDDEF */ 41 | -------------------------------------------------------------------------------- /stlport/stl/config/_icc.h: -------------------------------------------------------------------------------- 1 | // STLport configuration file 2 | // It is internal STLport header - DO NOT include it directly 3 | // A list of Intel compiler for Linux portion of STLport settings. 4 | 5 | #define _STLP_COMPILER "Intel ICC" 6 | 7 | #define _STLP_LONG_LONG long long 8 | 9 | // Edit relative path below (or put full path) to get native 10 | // compiler headers included. Default is "../include". 11 | // C headers may reside in different directory, so separate macro is provided. 12 | #if (__INTEL_COMPILER < 800) 13 | # define _STLP_NATIVE_INCLUDE_PATH ../include 14 | # define _STLP_NATIVE_C_INCLUDE_PATH ../include 15 | # define _STLP_NATIVE_CPP_C_INCLUDE_PATH ../include 16 | #endif 17 | 18 | #if (__INTEL_COMPILER >= 800) 19 | # define _STLP_NATIVE_INCLUDE_PATH ../include/c++ 20 | # define _STLP_NATIVE_C_INCLUDE_PATH ../include 21 | # define _STLP_NATIVE_CPP_C_INCLUDE_PATH ../include 22 | 23 | #endif /* __INTEL_COMPILER >= 800 */ 24 | 25 | #define _STLP_HAS_NO_NEW_C_HEADERS 1 26 | #define _STLP_VENDOR_GLOBAL_CSTD 1 27 | 28 | /* Systems having GLIBC installed have different traits */ 29 | #if !defined (_STLP_USE_GLIBC) && defined (__linux__) 30 | # define _STLP_USE_GLIBC 31 | # define _XOPEN_SOURCE 600 32 | #endif 33 | 34 | #undef _STLP_NO_UNCAUGHT_EXCEPT_SUPPORT 35 | 36 | 37 | #ifndef __GNUC__ 38 | # define __GNUC__ 3 39 | #endif 40 | 41 | //#define _STLP_NO_NATIVE_WIDE_FUNCTIONS 1 42 | 43 | #define _STLP_NO_FORCE_INSTANTIATE 44 | //#define _REENTRANT 45 | -------------------------------------------------------------------------------- /stlport/sstream: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 3 | * Silicon Graphics Computer Systems, Inc. 4 | * 5 | * Copyright (c) 1999 6 | * Boris Fomitchev 7 | * 8 | * This material is provided "as is", with absolutely no warranty expressed 9 | * or implied. Any use is at your own risk. 10 | * 11 | * Permission to use or copy this software for any purpose is hereby granted 12 | * without fee, provided the above notices are retained on all copies. 13 | * Permission to modify the code and to distribute modified code is granted, 14 | * provided the above notices are retained, and a notice that the code was 15 | * modified is included with the above copyright notice. 16 | * 17 | */ 18 | // This header defines classes basic_stringbuf, basic_istringstream, 19 | // basic_ostringstream, and basic_stringstream. These classes 20 | // represent streamsbufs and streams whose sources or destinations are 21 | // C++ strings. 22 | 23 | #ifndef _STLP_SSTREAM 24 | #define _STLP_SSTREAM 25 | 26 | #ifndef _STLP_OUTERMOST_HEADER_ID 27 | # define _STLP_OUTERMOST_HEADER_ID 0x1059 28 | # include 29 | #endif 30 | 31 | #ifdef _STLP_PRAGMA_ONCE 32 | # pragma once 33 | #endif 34 | 35 | #include 36 | 37 | #include 38 | 39 | #if (_STLP_OUTERMOST_HEADER_ID == 0x1059) 40 | # include 41 | # undef _STLP_OUTERMOST_HEADER_ID 42 | #endif 43 | 44 | #endif /* _STLP_SSTREAM */ 45 | 46 | // Local Variables: 47 | // mode:C++ 48 | // End: 49 | -------------------------------------------------------------------------------- /test/unit/fill_test.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "cppunit/cppunit_proxy.h" 5 | 6 | #if !defined (STLPORT) || defined(_STLP_USE_NAMESPACES) 7 | using namespace std; 8 | #endif 9 | 10 | // 11 | // TestCase class 12 | // 13 | class FillTest : public CPPUNIT_NS::TestCase 14 | { 15 | CPPUNIT_TEST_SUITE(FillTest); 16 | CPPUNIT_TEST(fill1); 17 | CPPUNIT_TEST(filln1); 18 | CPPUNIT_TEST_SUITE_END(); 19 | 20 | protected: 21 | void fill1(); 22 | void filln1(); 23 | }; 24 | 25 | CPPUNIT_TEST_SUITE_REGISTRATION(FillTest); 26 | 27 | // 28 | // tests implementation 29 | // 30 | void FillTest::fill1() 31 | { 32 | vector v(10); 33 | fill(v.begin(), v.end(), 42); 34 | 35 | CPPUNIT_ASSERT(v[0]==42); 36 | CPPUNIT_ASSERT(v[1]==42); 37 | CPPUNIT_ASSERT(v[2]==42); 38 | CPPUNIT_ASSERT(v[3]==42); 39 | CPPUNIT_ASSERT(v[4]==42); 40 | CPPUNIT_ASSERT(v[5]==42); 41 | CPPUNIT_ASSERT(v[6]==42); 42 | CPPUNIT_ASSERT(v[7]==42); 43 | CPPUNIT_ASSERT(v[8]==42); 44 | CPPUNIT_ASSERT(v[9]==42); 45 | } 46 | void FillTest::filln1() 47 | { 48 | vector v(10); 49 | fill_n(v.begin(), v.size(), 42); 50 | 51 | CPPUNIT_ASSERT(v[0]==42); 52 | CPPUNIT_ASSERT(v[1]==42); 53 | CPPUNIT_ASSERT(v[2]==42); 54 | CPPUNIT_ASSERT(v[3]==42); 55 | CPPUNIT_ASSERT(v[4]==42); 56 | CPPUNIT_ASSERT(v[5]==42); 57 | CPPUNIT_ASSERT(v[6]==42); 58 | CPPUNIT_ASSERT(v[7]==42); 59 | CPPUNIT_ASSERT(v[8]==42); 60 | CPPUNIT_ASSERT(v[9]==42); 61 | } 62 | -------------------------------------------------------------------------------- /stlport/istream.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 3 | * Boris Fomitchev 4 | * 5 | * This material is provided "as is", with absolutely no warranty expressed 6 | * or implied. Any use is at your own risk. 7 | * 8 | * Permission to use or copy this software for any purpose is hereby granted 9 | * without fee, provided the above notices are retained on all copies. 10 | * Permission to modify the code and to distribute modified code is granted, 11 | * provided the above notices are retained, and a notice that the code was 12 | * modified is included with the above copyright notice. 13 | * 14 | */ 15 | 16 | #ifndef _STLP_ISTREAM_H 17 | #define _STLP_ISTREAM_H 18 | 19 | #ifndef _STLP_OUTERMOST_HEADER_ID 20 | # define _STLP_OUTERMOST_HEADER_ID 0x2037 21 | # include 22 | #endif 23 | 24 | #include 25 | 26 | #include 27 | 28 | #ifndef _STLP_HAS_NO_NAMESPACES 29 | # ifdef _STLP_BROKEN_USING_DIRECTIVE 30 | _STLP_USING_NAMESPACE(stlport) 31 | # else 32 | using _STLP_STD::basic_istream; 33 | using _STLP_STD::basic_iostream; 34 | using _STLP_STD::istream; 35 | using _STLP_STD::iostream; 36 | using _STLP_STD::ios; 37 | # ifndef _STLP_NO_WCHAR_T 38 | using _STLP_STD::wistream; 39 | using _STLP_STD::wiostream; 40 | # endif 41 | using _STLP_STD::ws; 42 | # endif 43 | #endif 44 | 45 | #if (_STLP_OUTERMOST_HEADER_ID == 0x2037) 46 | # include 47 | # undef _STLP_OUTERMOST_HEADER_ID 48 | #endif 49 | 50 | #endif /* _STLP_ISTREAM_H */ 51 | -------------------------------------------------------------------------------- /stlport/list: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1994 4 | * Hewlett-Packard Company 5 | * 6 | * Copyright (c) 1996,1997 7 | * Silicon Graphics Computer Systems, Inc. 8 | * 9 | * Copyright (c) 1997 10 | * Moscow Center for SPARC Technology 11 | * 12 | * Copyright (c) 1999 13 | * Boris Fomitchev 14 | * 15 | * This material is provided "as is", with absolutely no warranty expressed 16 | * or implied. Any use is at your own risk. 17 | * 18 | * Permission to use or copy this software for any purpose is hereby granted 19 | * without fee, provided the above notices are retained on all copies. 20 | * Permission to modify the code and to distribute modified code is granted, 21 | * provided the above notices are retained, and a notice that the code was 22 | * modified is included with the above copyright notice. 23 | * 24 | */ 25 | 26 | #ifndef _STLP_LIST 27 | #define _STLP_LIST 28 | 29 | #ifndef _STLP_OUTERMOST_HEADER_ID 30 | # define _STLP_OUTERMOST_HEADER_ID 0x40 31 | # include 32 | #endif 33 | 34 | #ifdef _STLP_PRAGMA_ONCE 35 | # pragma once 36 | #endif 37 | 38 | #ifndef _STLP_INTERNAL_LIST_H 39 | # include 40 | #endif 41 | 42 | #if defined (_STLP_IMPORT_VENDOR_STD) 43 | # include _STLP_NATIVE_HEADER(list) 44 | #endif 45 | 46 | #if (_STLP_OUTERMOST_HEADER_ID == 0x40) 47 | # include 48 | # undef _STLP_OUTERMOST_HEADER_ID 49 | #endif 50 | 51 | #endif /* _STLP_LIST */ 52 | 53 | // Local Variables: 54 | // mode:C++ 55 | // End: 56 | -------------------------------------------------------------------------------- /stlport/stl/msl_string.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998 3 | * Mark of the Unicorn, Inc. 4 | * 5 | * Permission to use, copy, modify, distribute and sell this software 6 | * and its documentation for any purpose is hereby granted without fee, 7 | * provided that the above copyright notice appear in all copies and 8 | * that both that copyright notice and this permission notice appear 9 | * in supporting documentation. Mark of the Unicorn, Inc. makes no 10 | * representations about the suitability of this software for any 11 | * purpose. It is provided "as is" without express or implied warranty. 12 | * 13 | */ 14 | #if defined( _STLP_USE_MSIPL ) && !defined( _STLP_MSL_STRING_H_ ) 15 | #define _STLP_MSL_STRING_H_ 16 | 17 | //# define char_traits __msl_char_traits 18 | # define basic_string __msl_basic_string 19 | # define b_str_ref __msl_b_str_ref 20 | # define basic_istream __msl_basic_istream 21 | # define basic_ostream __msl_basic_ostream 22 | # define string __msl_string 23 | # define wstring __msl_wstring 24 | # define iterator_traits __msl_iterator_traits 25 | 26 | namespace std 27 | { 28 | template class basic_istream; 29 | template class basic_ostream; 30 | } 31 | 32 | # include _STLP_NATIVE_HEADER(string) 33 | // # undef char_traits 34 | # undef basic_string 35 | # undef b_str_ref 36 | # undef basic_istream 37 | # undef basic_ostream 38 | # undef string 39 | # undef wstring 40 | # undef iterator_traits 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /stlport/strstream.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 3 | * Boris Fomitchev 4 | * 5 | * This material is provided "as is", with absolutely no warranty expressed 6 | * or implied. Any use is at your own risk. 7 | * 8 | * Permission to use or copy this software for any purpose is hereby granted 9 | * without fee, provided the above notices are retained on all copies. 10 | * Permission to modify the code and to distribute modified code is granted, 11 | * provided the above notices are retained, and a notice that the code was 12 | * modified is included with the above copyright notice. 13 | * 14 | */ 15 | 16 | #ifndef _STLP_STRSTREAM_H 17 | # define _STLP_STRSTREAM_H 18 | 19 | #ifndef _STLP_OUTERMOST_HEADER_ID 20 | # define _STLP_OUTERMOST_HEADER_ID 0x2071 21 | # include 22 | #endif 23 | 24 | #include 25 | 26 | #include 27 | 28 | 29 | #ifndef _STLP_HAS_NO_NAMESPACES 30 | 31 | # ifdef _STLP_BROKEN_USING_DIRECTIVE 32 | 33 | using namespace _STLP_STD; 34 | 35 | # else 36 | 37 | using _STLP_STD::strstreambuf; 38 | using _STLP_STD::istrstream; 39 | using _STLP_STD::ostrstream; 40 | using _STLP_STD::strstream; 41 | 42 | # endif /* _STLP_BROKEN_USING_DIRECTIVE */ 43 | 44 | #endif /* _STLP_HAS_NO_NAMESPACES */ 45 | 46 | #if (_STLP_OUTERMOST_HEADER_ID == 0x2071) 47 | # include 48 | # undef _STLP_OUTERMOST_HEADER_ID 49 | #endif 50 | 51 | #endif /* _STLP_STRSTREAM_H */ 52 | 53 | // Local Variables: 54 | // mode:C++ 55 | // End: 56 | -------------------------------------------------------------------------------- /stlport/deque: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1994 4 | * Hewlett-Packard Company 5 | * 6 | * Copyright (c) 1996,1997 7 | * Silicon Graphics Computer Systems, Inc. 8 | * 9 | * Copyright (c) 1997 10 | * Moscow Center for SPARC Technology 11 | * 12 | * Copyright (c) 1999 13 | * Boris Fomitchev 14 | * 15 | * This material is provided "as is", with absolutely no warranty expressed 16 | * or implied. Any use is at your own risk. 17 | * 18 | * Permission to use or copy this software for any purpose is hereby granted 19 | * without fee, provided the above notices are retained on all copies. 20 | * Permission to modify the code and to distribute modified code is granted, 21 | * provided the above notices are retained, and a notice that the code was 22 | * modified is included with the above copyright notice. 23 | * 24 | */ 25 | 26 | #ifndef _STLP_DEQUE 27 | #define _STLP_DEQUE 28 | 29 | #ifndef _STLP_OUTERMOST_HEADER_ID 30 | # define _STLP_OUTERMOST_HEADER_ID 0x22 31 | # include 32 | #endif 33 | 34 | #ifdef _STLP_PRAGMA_ONCE 35 | # pragma once 36 | #endif 37 | 38 | #ifndef _STLP_INTERNAL_DEQUE_H 39 | # include 40 | #endif 41 | 42 | #if defined (_STLP_IMPORT_VENDOR_STD) 43 | # include _STLP_NATIVE_HEADER(deque) 44 | #endif 45 | 46 | #if (_STLP_OUTERMOST_HEADER_ID == 0x22) 47 | # include 48 | # undef _STLP_OUTERMOST_HEADER_ID 49 | #endif 50 | 51 | #endif /* _STLP_DEQUE */ 52 | 53 | // Local Variables: 54 | // mode:C++ 55 | // End: 56 | -------------------------------------------------------------------------------- /stlport/stack: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1994 4 | * Hewlett-Packard Company 5 | * 6 | * Copyright (c) 1996,1997 7 | * Silicon Graphics Computer Systems, Inc. 8 | * 9 | * Copyright (c) 1997 10 | * Moscow Center for SPARC Technology 11 | * 12 | * Copyright (c) 1999 13 | * Boris Fomitchev 14 | * 15 | * This material is provided "as is", with absolutely no warranty expressed 16 | * or implied. Any use is at your own risk. 17 | * 18 | * Permission to use or copy this software for any purpose is hereby granted 19 | * without fee, provided the above notices are retained on all copies. 20 | * Permission to modify the code and to distribute modified code is granted, 21 | * provided the above notices are retained, and a notice that the code was 22 | * modified is included with the above copyright notice. 23 | * 24 | */ 25 | 26 | #ifndef _STLP_STACK 27 | #define _STLP_STACK 28 | 29 | #ifndef _STLP_OUTERMOST_HEADER_ID 30 | # define _STLP_OUTERMOST_HEADER_ID 0x60 31 | # include 32 | #endif 33 | 34 | #ifdef _STLP_PRAGMA_ONCE 35 | # pragma once 36 | #endif 37 | 38 | #ifndef _STLP_INTERNAL_STACK_H 39 | # include 40 | #endif 41 | 42 | #if defined (_STLP_IMPORT_VENDOR_STD) 43 | # include _STLP_NATIVE_HEADER(stack) 44 | #endif 45 | 46 | #if (_STLP_OUTERMOST_HEADER_ID == 0x60) 47 | # include 48 | # undef _STLP_OUTERMOST_HEADER_ID 49 | #endif 50 | 51 | #endif /* _STLP_STACK */ 52 | 53 | // Local Variables: 54 | // mode:C++ 55 | // End: 56 | -------------------------------------------------------------------------------- /stlport/iosfwd: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 3 | * Silicon Graphics Computer Systems, Inc. 4 | * 5 | * Copyright (c) 1999 6 | * Boris Fomitchev 7 | * 8 | * This material is provided "as is", with absolutely no warranty expressed 9 | * or implied. Any use is at your own risk. 10 | * 11 | * Permission to use or copy this software for any purpose is hereby granted 12 | * without fee, provided the above notices are retained on all copies. 13 | * Permission to modify the code and to distribute modified code is granted, 14 | * provided the above notices are retained, and a notice that the code was 15 | * modified is included with the above copyright notice. 16 | * 17 | */ 18 | 19 | #ifndef _STLP_IOSFWD 20 | #define _STLP_IOSFWD 21 | 22 | #ifndef _STLP_OUTERMOST_HEADER_ID 23 | # define _STLP_OUTERMOST_HEADER_ID 0x1034 24 | # include 25 | #endif 26 | 27 | #ifdef _STLP_PRAGMA_ONCE 28 | # pragma once 29 | #endif 30 | 31 | #if !defined (_STLP_USE_NO_IOSTREAMS) 32 | 33 | # if defined (_STLP_HAS_WCHAR_T) && !defined (_STLP_INTERNAL_CWCHAR) 34 | # include 35 | # endif /* _STLP_HAS_WCHAR_T && !_STLP_CWCHAR */ 36 | 37 | # include 38 | #else 39 | # include 40 | #endif /* _STLP_USE_NO_IOSTREAMS */ 41 | 42 | #if (_STLP_OUTERMOST_HEADER_ID == 0x1034) 43 | # include 44 | # undef _STLP_OUTERMOST_HEADER_ID 45 | #endif 46 | 47 | #endif /* _STLP_IOSFWD */ 48 | 49 | // Local Variables: 50 | // mode:C++ 51 | // End: 52 | -------------------------------------------------------------------------------- /stlport/stl/config/_kai.h: -------------------------------------------------------------------------------- 1 | // STLport config file for KAI C++ compiler 2 | 3 | #if defined(_XOPEN_SOURCE) && (_XOPEN_VERSION - 0 >= 4) 4 | # define _STLP_RAND48 1 5 | #endif 6 | 7 | # ifndef __KAI_STRICT /* _NO_LONGLONG */ 8 | # define _STLP_LONG_LONG long long 9 | # endif 10 | 11 | # if !defined (__EXCEPTIONS) && ! defined (_EXCEPTIONS) 12 | # define _STLP_HAS_NO_EXCEPTIONS 13 | # endif 14 | 15 | # ifndef __BUILDING_STLPORT 16 | # define _STLP_LINK_TIME_INSTANTIATION 1 17 | # endif 18 | 19 | // two levels of macros do not work good with kcc. 20 | # define _STLP_NATIVE_HEADER(header) <../include/##header> 21 | # define _STLP_NATIVE_C_HEADER(header) <../include/##header> 22 | # define _STLP_NATIVE_CPP_C_HEADER(header) <../include/##header> 23 | # define _STLP_NATIVE_CPP_RUNTIME_HEADER(header) <../include/##header> 24 | 25 | # ifdef _WIN32 26 | # define _STLP_MINIMUM_IMPORT_STD 27 | # endif 28 | 29 | // KAI C++ uses EDG front-end, but apparently different switches 30 | // # define __EDG_SWITCHES 1 31 | 32 | 33 | # define _STLP_VENDOR_GLOBAL_CSTD 1 34 | # define _STLP_VENDOR_MB_NAMESPACE std 35 | 36 | // boris : some of those may also apply to KCC 3.4 37 | # if __KCC_VERSION < 4000 38 | # define _STLP_VENDOR_GLOBAL_EXCEPT_STD 1 39 | 40 | # endif 41 | 42 | # if defined (__sgi) 43 | // this requires some discrimination on whether we are actually on 44 | // a system officially supported by KAI. 45 | # define _STLP_HAS_NO_NEW_C_HEADERS 1 46 | # include 47 | # endif 48 | 49 | --------------------------------------------------------------------------------