Mercurial > nand-ecoscentric
changeset 2915:0477af657b66
* doc/sgml/doclist: Add uSTL documentation.
* doc/sgml/makemakefile: Update copyright dates.
* packages/language/cxx/ustl/current/doc/ustl.sgml: Moved documentation
from README file into ustl.sgml documentation file.
* packages/language/cxx/ustl/current/README: Remove.
* packages/language/cxx/ustl/current/cdl/ustl.cdl: Reference per-package
documentation.
* packages/language/cxx/ustl/current/tests/stdtest.h: Removed unused code.
| author | jld |
|---|---|
| date | Thu, 27 Aug 2009 09:00:11 +0000 |
| parents | 8a0adc7bf4be |
| children | 64b424f9dc4a |
| files | doc/ChangeLog doc/sgml/doclist doc/sgml/makemakefile doc/sgml/user-guide/user-guide.sgml packages/language/cxx/ustl/current/ChangeLog packages/language/cxx/ustl/current/README packages/language/cxx/ustl/current/cdl/ustl.cdl packages/language/cxx/ustl/current/doc/ustl.sgml packages/language/cxx/ustl/current/tests/stdtest.h |
| diffstat | 9 files changed, 174 insertions(+), 70 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,8 @@ +2009-08-24 Uwe Kindler <uwe_kindler@web.de> + + * sgml/doclist: Add uSTL documentation. + * sgml/makemakefile: Update copyright dates. + 2008-12-10 John Dallaway <jld@ecoscentric.com> * sgml/doclist: reference all documentation files.
--- a/doc/sgml/doclist +++ b/doc/sgml/doclist @@ -2,6 +2,7 @@ kernel/current/doc/kernel.sgml hal/common/current/doc/hal.sgml hal/common/current/doc/porting.sgml language/c/libc/common/current/doc/libc.sgml +language/cxx/ustl/current/doc/ustl.sgml io/common/current/doc/io.sgml io/fileio/current/doc/fileio.sgml io/pci/current/doc/pci.sgml
--- a/doc/sgml/makemakefile +++ b/doc/sgml/makemakefile @@ -20,7 +20,7 @@ cat > makefile <<EOF # ####ECOSGPLCOPYRIGHTBEGIN#### # ------------------------------------------- # This file is part of eCos, the Embedded Configurable Operating System. -# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2009 Free Software Foundation, Inc. # # eCos is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free @@ -121,6 +121,7 @@ cat >> ecos-ref.sgml <<EOF <year>2006</year> <year>2007</year> <year>2008</year> + <year>2009</year> <holder>Free Software Foundation, Inc.</holder> </copyright> @@ -149,6 +150,7 @@ permission is obtained from the copyrigh <para>Cirrus Logic® and Maverick™ are registered trademarks of Cirrus Logic, Inc.</para> <para>Cogent™ is a trademark of Cogent Computer Systems, Inc.</para> <para>Compaq® is a registered trademark of the Compaq Computer Corporation.</para> +<para>eCos® is a registered trademark of eCosCentric Limited.</para> <para>Fujitsu® is a registered trademark of Fujitsu Limited.</para> <para>IBM®, and PowerPC™ are trademarks of International Business Machines Corporation.</para> <para>IDT® is a registered trademark of Integrated Device Technology Inc.</para> @@ -161,7 +163,7 @@ permission is obtained from the copyrigh <para>Motorola®, ColdFire® is a trademark of Motorola, Inc.</para> <para>NEC® V800™, V850™, V850/SA1™, V850/SB1™, VR4300™, and VRC4375™ are trademarks of NEC Corporation.</para> <para>PMC-Sierra® RM7000™ and Ocelot™ are trademarks of PMC-Sierra Incorporated. </para> -<para>Red Hat, eCos™, RedBoot™, GNUPro®, and Insight™ are trademarks of Red Hat, Inc. </para> +<para>Red Hat, RedBoot™, GNUPro®, and Insight™ are trademarks of Red Hat, Inc. </para> <para>Samsung® and CalmRISC™ are trademarks or registered trademarks of Samsung, Inc. </para> <para>Sharp® is a registered trademark of Sharp Electronics Corp.</para> <para>SPARC® is a registered trademark of SPARC International, Inc., and is used under license by Sun Microsystems, Inc. </para>
--- a/doc/sgml/user-guide/user-guide.sgml +++ b/doc/sgml/user-guide/user-guide.sgml @@ -96,6 +96,7 @@ permission is obtained from the copyrigh <para>Cirrus Logic® and Maverick™ are registered trademarks of Cirrus Logic, Inc.</para> <para>Cogent™ is a trademark of Cogent Computer Systems, Inc.</para> <para>Compaq® is a registered trademark of the Compaq Computer Corporation.</para> +<para>eCos® is a registered trademark of eCosCentric Limited.</para> <para>Fujitsu® is a registered trademark of Fujitsu Limited.</para> <para>IBM®, and PowerPC™ are trademarks of International Business Machines Corporation.</para> <para>IDT® is a registered trademark of Integrated Device Technology Inc.</para> @@ -108,7 +109,7 @@ permission is obtained from the copyrigh <para>Motorola®, ColdFire® is a trademark of Motorola, Inc.</para> <para>NEC® V800™, V850™, V850/SA1™, V850/SB1™, VR4300™, and VRC4375™ are trademarks of NEC Corporation.</para> <para>PMC-Sierra® RM7000™ and Ocelot™ are trademarks of PMC-Sierra Incorporated. </para> -<para>Red Hat, eCos™, RedBoot™, GNUPro®, and Insight™ are trademarks of Red Hat, Inc. </para> +<para>Red Hat, RedBoot™, GNUPro®, and Insight™ are trademarks of Red Hat, Inc. </para> <para>Samsung® and CalmRISC™ are trademarks or registered trademarks of Samsung, Inc. </para> <para>Sharp® is a registered trademark of Sharp Electronics Corp.</para> <para>SPARC® is a registered trademark of SPARC International, Inc., and is used under license by Sun Microsystems, Inc. </para>
--- a/packages/language/cxx/ustl/current/ChangeLog +++ b/packages/language/cxx/ustl/current/ChangeLog @@ -1,3 +1,11 @@ +2009-08-24 Uwe Kindler <uwe_kindler@web.de> + + * doc/ustl.sgml: Moved documentation from README file into + ustl.sgml documentation file. + * README: Remove. + * cdl/ustl.cdl: Reference per-package documentation. + * tests/stdtest.h: Removed unused code. + 2009-08-21 Sergei Gavrikov <sergei.gavrikov@gmail.com> * src/bktrace.cpp: prevent inclusion of host header <execinfo.h>
deleted file mode 100644 --- a/packages/language/cxx/ustl/current/README +++ /dev/null @@ -1,51 +0,0 @@ -Welcome to uSTL Library 1.3 -=========================== - -The eCos uSTL library is a port of Mike Sharov's uSTL implementation. -It has the particular feature of generating small object code sizes -- an important requirement for embedded eCos based applications. -The latest version can be found at: - - http://ustl.sourceforge.net/ - http://sourceforge.net/projects/ustl/ - -The library provides a subset of the full C++ STL standard library. -uSTL is a partial implementation of the STL specification intended to -reduce code size of the derivative programs. This allows the -eCos application to use well known standard C++ STL library -containers, streams, iterators, algorithms and functors. - -For changes, see the HISTORY file. - - -eCos port specific changes/enhancements ---------------------------------------- - -By default eCos is build without exceptions and without RTTI support -(compiler switches -fno-exceptions -fno-rtti). Normally the uSTL -library relies on C++ exceptions to propagate errors and exceptions. -To build the library for eCos all occurrences of try, cath and throw -are replaced by macros USLT_TRY, USLT_CATCH_ALL, and USLT_THROW. Thus -the eCos uSTL port compiles without exceptions and without RTTI support. - -The macro USLT_THROW calls an eCos specific exception handling function -that prints exception information to the diagnostic channel. - -All features of the uSTL library are available except for memory mapped -files or memory mapped streams. - -If you use cout for printing to the console you should know that the -data is only sent if you finish all output with endl and then call -cout.flush(). - -example: - -cout << "Console output" << endl; -cout.flush(); - - -Legal Stuff ------------ - -The uSTL library is subject of copyright under MIT license. For -the license text see LICENSE file.
--- a/packages/language/cxx/ustl/current/cdl/ustl.cdl +++ b/packages/language/cxx/ustl/current/cdl/ustl.cdl @@ -50,6 +50,7 @@ cdl_package CYGPKG_USTL { display "uSTL library" + doc ref/ustl.html description " This package provides the uSTL library. uSTL is a partial implementation of the STL specification intended to
new file mode 100644 --- /dev/null +++ b/packages/language/cxx/ustl/current/doc/ustl.sgml @@ -0,0 +1,153 @@ +<!-- {{{ Banner --> + +<!-- =============================================================== --> +<!-- --> +<!-- ustl.sgml --> +<!-- --> +<!-- eCos uSTL library port --> +<!-- --> +<!-- =============================================================== --> +<!-- ####ECOSDOCCOPYRIGHTBEGIN#### --> +<!-- =============================================================== --> +<!-- Copyright (C) 2009 Free Software Foundation, Inc. --> +<!-- This material may be distributed only subject to the terms --> +<!-- and conditions set forth in the Open Publication License, v1.0 --> +<!-- or later (the latest version is presently available at --> +<!-- http://www.opencontent.org/openpub/) --> +<!-- Distribution of the work or derivative of the work in any --> +<!-- standard (paper) book form is prohibited unless prior --> +<!-- permission obtained from the copyright holder --> +<!-- =============================================================== --> +<!-- ####ECOSDOCCOPYRIGHTEND#### --> +<!-- =============================================================== --> +<!-- #####DESCRIPTIONBEGIN#### --> +<!-- --> +<!-- ####DESCRIPTIONEND#### --> +<!-- =============================================================== --> + +<!-- }}} --> + +<PART id="ustl"> +<TITLE>The uSTL Library</TITLE> +<CHAPTER id="ustl-overview"> +<TITLE>uSTL library overview</TITLE> +<PARA> +The eCos uSTL library is a port of Mike Sharov's uSTL - a size-optimized +STL implementation. It has the particular feature of generating small +object code sizes - an important requirement for embedded eCos-based +applications. The latest version can be found at +<ulink url="http://sourceforge.net/projects/ustl">http://sourceforge.net/projects/ustl</ulink>. +</PARA> + +<PARA> +The library provides a subset of the full C++ +<ulink url="http://en.wikipedia.org/wiki/Standard_Template_Library"> +Standard Template Library</ulink>. +uSTL is a partial implementation of the STL specification intended to +reduce code size of the derivative programs. This allows eCos applications +to use well known standard C++ STL library containers, streams, +iterators, algorithms and functors. +</PARA> + +<PARA> +For changes, see the <filename>HISTORY</filename> file. A detailed introduction +to the uSTL library is available on Mike Sharov's +<ulink url="http://ustl.sourceforge.net/">uSTL web page</ulink>. +Additional information on all the classes is available in the header +files and in the <ulink url="http://ustl.sourceforge.net/html/index.html"> +Doxygen reference</ulink>. +</PARA> +<SECT1 id="ustl-ecos-changes"> +<TITLE>eCos specific changes/enhancements</TITLE> + +<PARA> +All features of the uSTL library are available except for memory mapped +files and memory mapped streams. +</PARA> + +<PARA> +By default, an eCos image is build without exceptions and without RTTI support +(compiler switches -fno-exceptions -fno-rtti). Normally the uSTL +library relies on C++ exceptions to propagate errors and exceptions. +To build uSTL for eCos, all occurrences of <FUNCTION>try</FUNCTION>, +<FUNCTION>catch</FUNCTION> and <FUNCTION>throw</FUNCTION> +are replaced by macros <varname>USTL_TRY</varname>, +<varname>USTL_CATCH_ALL</varname>, and +<varname>USTL_THROW</varname>. Thus the eCos uSTL port compiles without +exceptions and without RTTI support but also works if RTTI and exceptions +are enabled. +</PARA> + +<PARA> +To handle and propagate uSTL exceptions when RTTI und C++ exceptions are +not available, the eCos uSTL port was extended by some simple exception +handling functions. An application can use the function +<FUNCTION>ustl::set_app_exception_handler()</FUNCTION> to register an +exception handler that is called by the <varname>USTL_THROW</varname> +macro as soon as an exception is thrown by any uSTL function. +</PARA> + +<PROGRAMLISTING> +void ustl::set_app_exception_handler(app_exception_handler_t func); +</PROGRAMLISTING> + +<PARA> +If an exception handler is registered by an application then it replaces the +default eCos uSTL exception handler. The default exception handler simply +prints the error message of an exception to the diagnostic channel by calling +<FUNCTION>void ustl::diag_print_exception()</FUNCTION>. This function +can also be called from an application exception handler as illustrated +in the test cases. +</PARA> + +<PROGRAMLISTING> +void ustl::set_app_exception_handler(app_exception_handler_t func); +</PROGRAMLISTING> +</SECT1> + +<SECT1 id="using-ustl-library"> +<TITLE>Using uSTL in eCos applications</TITLE> +<PARA> +To build an eCos library with uSTL support, you can start from the +<EMPHASIS>default</EMPHASIS> template and then add the uSTL package +CYGPKG_USTL. If you need file streams support or would like +to build all uSTL tests, then you must also add the File I/O package +CYGPKG_IO_FILEIO. +</PARA> + +<PARA> +To use uSTL in your eCos application, simply include the file +<filename><ustl.h></filename>. All uSTL classes are in the +<varname>ustl</varname> namespace. +</PARA> + +<PROGRAMLISTING> +#include <ustl.h> +using namespace ustl; + +int main (int argc, char* argv[]) +{ + cout << "Hello world!\n"; + cout.flush(); + return EXIT_SUCCESS; +} +</PROGRAMLISTING> + +<NOTE> +<PARA> +If you use <varname>cout</varname> for printing to the console, +then data will be flushed only if you finish the output with +<varname>endl</varname> or '\n' and then call +<function>cout.flush()</function> as in the example above. +</PARA> +</NOTE> + +<PARA> +The uSTL library is subject of copyright under MIT license. For +the license text see <filename>LICENSE</filename> file. +</PARA> + +</SECT1> +</CHAPTER> +</PART> +
--- a/packages/language/cxx/ustl/current/tests/stdtest.h +++ b/packages/language/cxx/ustl/current/tests/stdtest.h @@ -31,22 +31,6 @@ static void OnSignal (int sig) exit (sig); } -/* -/// Called by the framework on unrecoverable exception handling errors. -static void Terminate (void) -{ - CYG_TEST_FAIL_FINISH("Unrecoverable exception handling error detected."); - raise (SIGABRT); - exit (EXIT_FAILURE); -} - -/// Called when an exception violates a throw specification. -static void OnUnexpected (void) -{ - CYG_TEST_FAIL("Fatal internal error: unexpected exception caught.\n"); - Terminate(); -} -*/ /// Installs OnSignal as handler for signals. static void InstallCleanupHandlers (void) {
