diff options
author | Benjamin Kosnik <bkoz@redhat.com> | 2001-08-08 02:49:01 +0000 |
---|---|---|
committer | Benjamin Kosnik <bkoz@gcc.gnu.org> | 2001-08-08 02:49:01 +0000 |
commit | 33590f13b26b9d79f41ba5c7dc9dea282daaa8bb (patch) | |
tree | 206d2f141f8a0aeeee16600fe3735d0bec5f1ffc /libstdc++-v3/docs | |
parent | 7364fdd8e0b52133f3cd8e49d72f465ae6128118 (diff) | |
download | gcc-33590f13b26b9d79f41ba5c7dc9dea282daaa8bb.zip gcc-33590f13b26b9d79f41ba5c7dc9dea282daaa8bb.tar.gz gcc-33590f13b26b9d79f41ba5c7dc9dea282daaa8bb.tar.bz2 |
Implement std::messages.
2001-08-07 Benjamin Kosnik <bkoz@redhat.com>
Implement std::messages.
Make config a fully-nested directory.
* config/locale: New directory.
* config/c_locale_generic.cc: Move into locale subdirectory.
* config/c_locale_generic.h: Same.
* config/c_locale_gnu.cc: Same.
* config/c_locale_gnu.h: Same.
* config/c_locale_ieee_1003.1-200x.cc: Same.
* config/c_locale_ieee_1003.1-200x_.h: Same.
* config/codecvt_specializations_generic.h: Same.
* config/codecvt_specializations_ieee_1003.1-200x.h: Same.
* config/messages_members_gnu.h: Same.
* config/messaages_members_gnu.cc: Same.
* config/messages_members_generic.h: Same.
* config/messaages_members_generic.cc: Same.
* config/messages_members_ieee_1003.1-200x.h: Same.
* config/messaages_members_ieee_1003.1-200x.cc: Same.
* config/io: New directory.
* config/basic_file_libio.h: Move into io subdirectory.
* config/basic_file_libio.cc: Same.
* config/c_io_libio.h: Same.
* config/c_io_libio_codecvt.c: Same.
* config/basic_file_stdio.h: Same.
* config/basic_file_stdio.cc: Same.
* config/c_io_stdio.h: Same.
* po: New directory.
* po/POTFILES.in: New file.
* po/Makefile.am: New file.
* po/Makefile.in: New file.
* po/libstdc++.pot: Generic translation file.
* po/fr.po: Preliminary French translation.
* po/de.po: Preliminary German translation.
* intl: New directory.
* intl/Makefile.am: New file.
* intl/Makefile.in: New file.
* intl/string_literals.cc: New file.
* acinclude.m4 (GLIBCPP_CONFIGURE): Bump VERSION to 3.1.0. Add
requisite setup for gettext. Re-arrange.
* aclocal.m4: Regenerate.
* configure.in: Don't call GLIBCPP_CHECK_COMPILER_VERSION.
Output Makefile bits for po and intl.
* configure: Regenerate.
* Makefile.am (SUBDIRS): Add intl, po. Add rule for dist.
* Makefile.in: Regenerate.
* acconfig.h: Add ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_STPCPY.
* config.h.in: Regenerate.
* acinclude.m4 (AC_REPLACE_STRINGFUNCS): Remove.
* include/Makefile.am (install-data-local): Don't install Makefile.
* include/Makefile.in: Regenerate.
* include/bits/locale_facet.h (locale::facet::_S_clone_c_locale):
Add member.
* config/locale/c_locale_gnu.cc (_S_clone_c_locale): Add definition.
* config/locale/c_locale_generic.cc: Same.
* config/locale/c_locale_ieee_1003.1-200x.cc: Same.
* include/bits/codecvt.h: Excise non-standard, non-required
bits. This includes __enc_traits, and partial specializations of
codecvt for __enc_traits.
* src/codecvt.cc (__enc_traits::_S_max_size): Guard
* config/codecvt_partials_ieee_1003.1-200x.h: New file.
* config/codecvt_partials_generic.h: New file.
* include/Makefile.am (allstamps): Add stamp-codecvt_model.
(stamp-codecvt_model): Add.
* include/Makefile.in: Regenerate.
* acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): Add in codecvt configury.
* aclocal.m4: Regenerate.
* configure: Regenerate.
* testsuite/22_locale/codecvt_unicode_wchar_t.cc: Use macro guard.
* testsuite/22_locale/codecvt_unicode_char.cc: Same.
* testsuite/22_locale/ctor_copy_dtor.cc: And here.
* include/bits/localefwd.h (class locale::facet): Add __enc_traits
as a friend for _S_*_c_locale functions.
* include/bits/codecvt.h (__enc_traits::__enc_traits): Add locale
argument to default constructor so that CODESET information can be
deduced.
* include/bits/locale_facets.h (messages_byname):
Re-implement. Remove specializations.
* src/locale.cc (messages_byname<char>): Remove specialization.
(messages_byname<wchar_t>): Same.
* config/locale/c_locale_ieee_1003.1-200x.cc: New file.
* config/locale/c_locale_ieee_1003.1-200x.h: New file.
* config/locale/messages_members_ieee_1003.1-200x.cc: New file.
* config/locale/messages_members_ieee_1003.1-200x.h: New file.
* config/locale/messages_members_gnu.cc: New file.
* config/locale/messages_members_gnu.h: New file.
* config/locale/messages_members_generic.cc: New file.
* config/locale/messages_members_generic.h: New file.
* docs/html/configopts.html: Add documentation for new locale
model, ieee_1003.1. Adjust other flags for current defaults.
* docs/html/22_locale/locale.html: Update.
* docs/html/22_locale/howto.html: Add link to messages.html. Organize.
* docs/html/22_locale/messages.html: New.
* src/Makefile.am (sources): Add messages_virtuals.cc.
* src/Makefile.in: Regenerate.
* include/Makefile.am (allstamps): Add stamp-messages_model.
(stamp-messages_model): Add.
* include/Makefile.in: Regenerate.
* acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): Add in messages configury.
* aclocal.m4: Regenerate.
* configure: Regenerate.
* testsuite_flags.in (--cxxflags): Add LOCALEDIR.
* testsuite/lib/libstdc++-v3-dg.exp: Remove broken LD_LIBRARY_PATH
bits for Irix.
* acinclude (GLIBCPP_ENABLE_CLOCALE): Set glibcpp_localedir to the
build directories message catalog base directory, and export.
Eventually this should probably be made to deal with build and
install directories. For now, punt on this as the library itself
doesn't use message catalogs (yet).
* testsuite/22_locale/messages.cc: New file.
* testsuite/22_locale/messages_char_members.cc: New file.
* testsuite/22_locale/messages_byname.cc: New file.
From-SVN: r44702
Diffstat (limited to 'libstdc++-v3/docs')
-rw-r--r-- | libstdc++-v3/docs/html/22_locale/howto.html | 122 | ||||
-rw-r--r-- | libstdc++-v3/docs/html/22_locale/locale.html | 12 | ||||
-rw-r--r-- | libstdc++-v3/docs/html/22_locale/messages.html | 404 | ||||
-rw-r--r-- | libstdc++-v3/docs/html/configopts.html | 53 |
4 files changed, 497 insertions, 94 deletions
diff --git a/libstdc++-v3/docs/html/22_locale/howto.html b/libstdc++-v3/docs/html/22_locale/howto.html index 868b3d9..55d2842 100644 --- a/libstdc++-v3/docs/html/22_locale/howto.html +++ b/libstdc++-v3/docs/html/22_locale/howto.html @@ -8,7 +8,7 @@ <META NAME="GENERATOR" CONTENT="vi and eight fingers"> <TITLE>libstdc++-v3 HOWTO: Chapter 22</TITLE> <LINK REL=StyleSheet HREF="../lib3styles.css"> -<!-- $Id: howto.html,v 1.2 2001/02/07 00:03:20 pme Exp $ --> +<!-- $Id: howto.html,v 1.3 2001/04/03 00:26:55 pme Exp $ --> </HEAD> <BODY> @@ -22,19 +22,60 @@ <HR> <H1>Contents</H1> <UL> - <LI><A HREF="#1">Bjarne Stroustrup on Locales</A> - <LI><A HREF="#2">Nathan Myers on Locales</A> - <LI><A HREF="#3">class locale</A> - <LI><A HREF="#4">class codecvt</A> - <LI><A HREF="#5">class ctype</A> - <LI><A HREF="#6">Correct Transformations</A> + <LI><A HREF="#1">class locale</A> + <LI><A HREF="#2">class codecvt</A> + <LI><A HREF="#3">class ctype</A> + <LI><A HREF="#4">class messages</A> + <LI><A HREF="#5">Bjarne Stroustrup on Locales</A> + <LI><A HREF="#6">Nathan Myers on Locales</A> + <LI><A HREF="#7">Correct Transformations</A> </UL> +<!-- ####################################################### --> + <HR> +<H2><A NAME="1">class locale</A></H2> + <P> Notes made during the implementation of locales can be found + <A HREF="locale.html">here</A>. + </P> -<!-- ####################################################### --> +<HR> +<H2><A NAME="2">class codecvt</A></H2> + <P> Notes made during the implementation of codecvt can be found + <A HREF="codecvt.html">here</A>. + </P> + + <P> The following is the abstract from the implementation notes: + <BLOCKQUOTE> + The standard class codecvt attempts to address conversions between + different character encoding schemes. In particular, the standard + attempts to detail conversions between the implementation-defined + wide characters (hereafter referred to as wchar_t) and the standard + type char that is so beloved in classic "C" (which can + now be referred to as narrow characters.) This document attempts + to describe how the GNU libstdc++-v3 implementation deals with the + conversion between wide and narrow characters, and also presents a + framework for dealing with the huge number of other encodings that + iconv can convert, including Unicode and UTF8. Design issues and + requirements are addressed, and examples of correct usage for both + the required specializations for wide and narrow characters and the + implementation-provided extended functionality are given. + </BLOCKQUOTE> -<H2><A NAME="1">Stroustrup on Locales</A></H2> +<HR> +<H2><A NAME="3">class ctype</A></H2> + <P> Notes made during the implementation of ctype can be found + <A HREF="ctype.html">here</A>. + </P> + +<HR> +<H2><A NAME="4">class messages</A></H2> + <P> Notes made during the implementation of messages can be found + <A HREF="messages.html">here</A>. + </P> + +<HR> +<H2><A NAME="5">Stroustrup on Locales</A></H2> <P>Dr. Bjarne Stroustrup has released a <A HREF="http://www.research.att.com/~bs/3rd_loc0.html">pointer</A> to Appendix D of his book, @@ -50,68 +91,16 @@ avoid it. </EM></BLOCKQUOTE> </P> - <P>Return <A HREF="#top">to top of page</A> or - <A HREF="../faq/index.html">to the FAQ</A>. - </P> <HR> -<H2><A NAME="2">Nathan Myers on Locales</A></H2> +<H2><A NAME="6">Nathan Myers on Locales</A></H2> <P> An article entitled "The Standard C++ Locale" was published in Dr. Dobb's Journal and can be found <A HREF="http://www.cantrip.org/locale.html">here</A>. </P> - <P>Return <A HREF="#top">to top of page</A> or - <A HREF="../faq/index.html">to the FAQ</A>. - </P> <HR> -<H2><A NAME="5">class locale</A></H2> - <P> Notes made during the implementation of locales can be found - <A HREF="locale.html">here</A>. - </P> - <P>Return <A HREF="#top">to top of page</A> or - <A HREF="../faq/index.html">to the FAQ</A>. - </P> - -<HR> -<H2><A NAME="4">class codecvt</A></H2> - <P> Notes made during the implementation of codecvt can be found - <A HREF="codecvt.html">here</A>. - </P> - - <P> The following is the abstract from the implementation notes: -<BLOCKQUOTE> - The standard class codecvt attempts to address conversions -between different character encoding schemes. In particular, the -standard attempts to detail conversions between the -implementation-defined wide characters (hereafter referred to as -wchar_t) and the standard type char that is so beloved in classic -"C" (which can now be referred to as narrow characters.) -This document attempts to describe how the GNU libstdc++-v3 -implementation deals with the conversion between wide and narrow -characters, and also presents a framework for dealing with the huge -number of other encodings that iconv can convert, including Unicode -and UTF8. Design issues and requirements are addressed, and examples -of correct usage for both the required specializations for wide and -narrow characters and the implementation-provided extended -functionality are given. -</BLOCKQUOTE> - - <P>Return <A HREF="#top">to top of page</A> or - <A HREF="../faq/index.html">to the FAQ</A>. - </P> - -<HR> -<H2><A NAME="5">class ctype</A></H2> - <P> Notes made during the implementation of ctype can be found - <A HREF="ctype.html">here</A>. - </P> - <P>Return <A HREF="#top">to top of page</A> or - <A HREF="../faq/index.html">to the FAQ</A>. - </P> - -<HR> -<H2><A NAME="6">Correct Transformations</A></H2> +<H2><A NAME="7">Correct Transformations</A></H2> <!-- Jumping directly here from chapter 21. --> <P>A very common question on newsgroups and mailing lists is, "How do I do <foo> to a character string?" where <foo> is @@ -213,11 +202,6 @@ functionality are given. shown it here because no compilers currently available to me will handle it. </P> - <P>Return <A HREF="#top">to top of page</A> or - <A HREF="../faq/index.html">to the FAQ</A>. - </P> - - <!-- ####################################################### --> @@ -226,7 +210,7 @@ functionality are given. <P CLASS="fineprint"><EM> Comments and suggestions are welcome, and may be sent to <A HREF="mailto:libstdc++@gcc.gnu.org">the mailing list</A>. -<BR> $Id: howto.html,v 1.2 2001/02/07 00:03:20 pme Exp $ +<BR> $Id: howto.html,v 1.3 2001/04/03 00:26:55 pme Exp $ </EM></P> diff --git a/libstdc++-v3/docs/html/22_locale/locale.html b/libstdc++-v3/docs/html/22_locale/locale.html index 2bbb4bd..2c7b288 100644 --- a/libstdc++-v3/docs/html/22_locale/locale.html +++ b/libstdc++-v3/docs/html/22_locale/locale.html @@ -5,7 +5,7 @@ </H1> </HEAD> <I> -prepared by Benjamin Kosnik (bkoz@redhat.com) on January 24, 2001 +prepared by Benjamin Kosnik (bkoz@redhat.com) on August 8, 2001 </I> <P> @@ -95,6 +95,16 @@ More information can be found in the following testcases: <LI> locale initialization: at what point does _S_classic, _S_global get initialized? Can named locales assume this initialization has already taken place? + + <LI> document how named locales error check when filling data + members. Ie, a fr_FR locale that doesn't have + numpunct::truename(): does it use "true"? Or is it a blank + string? What's the convention? + + <li> explain how locale aliasing happens. When does "de_DE" + use "de" information? What is the rule for locales composed of + just an ISO language code (say, "de") and locales with both an + ISO language code and ISO country code (say, "de_DE"). </UL> diff --git a/libstdc++-v3/docs/html/22_locale/messages.html b/libstdc++-v3/docs/html/22_locale/messages.html new file mode 100644 index 0000000..1650358 --- /dev/null +++ b/libstdc++-v3/docs/html/22_locale/messages.html @@ -0,0 +1,404 @@ +<HTML> +<HEAD> + <H1> + Notes on the messages implementation. + </H1> +</HEAD> +<I> +prepared by Benjamin Kosnik (bkoz@redhat.com) on August 8, 2001 +</I> + +<P> +<H2> +1. Abstract +</H2> +<P> +The std::messages facet implements message retrieval functionality +equivalent to Java's java.text.MessageFormat .using either GNU gettext +or IEEE 1003.1-200 functions. +</P> + +<P> +<H2> +2. What the standard says +</H2> +The std::messages facet is probably the most vaguely defined facet in +the standard library. It's assumed that this facility was built into +the standard library in order to convert string literals from one +locale to the other. For instance, converting the "C" locale's +<TT>const char* c = "please"</TT> to a German-localized <TT>"bitte"</TT> +during program execution. + +<BLOCKQUOTE> +22.2.7.1 - Template class messages [lib.locale.messages] +</BLOCKQUOTE> + +This class has three public member functions, which directly +correspond to three protected virtual member functions. + +The public member functions are: + +<P> +<TT>catalog open(const basic_string<char>&, const locale&) const</TT> + +<P> +<TT>string_type get(catalog, int, int, const string_type&) const</TT> + +<P> +<TT>void close(catalog) const</TT> + +<P> +While the virtual functions are: + +<P> +<TT>catalog do_open(const basic_string<char>&, const locale&) const</TT> +<BLOCKQUOTE> +<I> +-1- Returns: A value that may be passed to get() to retrieve a +message, from the message catalog identified by the string name +according to an implementation-defined mapping. The result can be used +until it is passed to close(). Returns a value less than 0 if no such +catalog can be opened. +</I> +</BLOCKQUOTE> + +<P> +<TT>string_type do_get(catalog, int, int, const string_type&) const</TT> +<BLOCKQUOTE> +<I> +-3- Requires: A catalog cat obtained from open() and not yet closed. +-4- Returns: A message identified by arguments set, msgid, and dfault, +according to an implementation-defined mapping. If no such message can +be found, returns dfault. +</I> +</BLOCKQUOTE> + +<P> +<TT>void do_close(catalog) const</TT> +<BLOCKQUOTE> +<I> +-5- Requires: A catalog cat obtained from open() and not yet closed. +-6- Effects: Releases unspecified resources associated with cat. +-7- Notes: The limit on such resources, if any, is implementation-defined. +</I> +</BLOCKQUOTE> + + +<P> +<H2> +3. Problems with "C" messages: thread safety, +over-specification, and assumptions. +</H2> +A couple of notes on the standard. + +<p> +First, why is <TT>messages_base::catalog</TT> specified as a typedef +to int? This makes sense for implementations that use +<TT>catopen</TT>, but not for others. Fortunately, it's not heavily +used and so only a minor irritant. + +<p> +Second, by making the member functions <TT>const</TT>, it is +impossible to save state in them. Thus, storing away information used +in the 'open' member function for use in 'get' is impossible. This is +unfortunate. + +<p> +The 'open' member function in particular seems to be oddly +designed. The signature seems quite peculiar. Why specify a <TT>const +string& </TT> argument, for instance, instead of just <TT>const +char*</TT>? Or, why specify a <TT>const locale&</TT> argument that is +to be used in the 'get' member function? How, exactly, is this locale +argument useful? What was the intent? It might make sense if a locale +argument was associated with a given default message string in the +'open' member function, for instance. Quite murky and unclear, on +reflection. + +<p> +Lastly, it seems odd that messages, which explicitly require code +conversion, don't use the codecvt facet. Because the messages facet +has only one template parameter, it is assumed that ctype, and not +codecvt, is to be used to convert between character sets. + +<p> +It is implicitly assumed that the locale for the default message +string in 'get' is in the "C" locale. Thus, all source code is assumed +to be written in English, so translations are always from "en_US" to +other, explicitly named locales. + +<P> +<H2> +4. Design and Implementation Details +</H2> +This is a relatively simple class, on the face of it. The standard +specifies very little in concrete terms, so generic implementations +that are conforming yet do very little are the norm. Adding +functionality that would be useful to programmers and comparable to +Java's java.text.MessageFormat takes a bit of work, and is highly +dependent on the capabilities of the underlying operating system. + +<P> +Three different mechanisms have been provided, selectable via +configure flags: + +<UL> + <LI> generic + <P> + This model does very little, and is what is used by default. + </P> + + <LI> gnu + <P> + The gnu model is complete and fully tested. It's based on the + GNU gettext package, which is part of glibc. It uses the functions + <TT>textdomain, bindtextdomain, gettext</TT> + to implement full functionality. Creating message + catalogs is a relatively straight-forward process and is + lightly documented below, and fully documented in gettext's + distributed documentation. + </P> + + <LI> ieee_1003.1-200x + <P> + This is a complete, though untested, implementation based on + the IEEE standard. The functions + <TT>catopen, catgets, catclose</TT> + are used to retrieve locale-specific messages given the + appropriate message catalogs that have been constructed for + their use. Note, the script <TT> po2msg.sed</TT> that is part + of the gettext distribution can convert gettext catalogs into + catalogs that <TT>catopen</TT> can use. + </P> +</UL> + +<P> +A new, standards-conformant non-virtual member function signature was +added for 'open' so that a directory could be specified with a given +message catalog. This simplifies calling conventions for the gnu +model. + +<P> +The rest of this document discusses details of the GNU model. + +<P> +The messages facet, because it is retrieving and converting between +characters sets, depends on the ctype and perhaps the codecvt facet in +a given locale. In addition, underlying "C" library locale support is +necessary for more than just the <TT>LC_MESSAGES</TT> mask: +<TT>LC_CTYPE</TT> is also necessary. To avoid any unpleasantness, all +bits of the "C" mask (ie <TT>LC_ALL</TT>) are set before retrieving +messages. + +<p> +Making the message catalogs can be initially tricky, but become quite +simple with practice. For complete info, see the gettext +documentation. Here's an idea of what is required: + +<UL> + <LI > Make a source file with the required string literals + that need to be translated. See + <TT>intl/string_literals.cc</TT> for an example. + + <p> + <LI> Make initial catalog (see "4 Making the PO Template File" + from the gettext docs). + <p> + <TT> xgettext --c++ --debug string_literals.cc -o libstdc++.pot </TT> + + <p> + <LI> Make language and country-specific locale catalogs. + <p> + <TT>cp libstdc++.pot fr_FR.po</TT> + <p> + <TT>cp libstdc++.pot de_DE.po</TT> + + <p> + <LI> Edit localized catalogs in emacs so that strings are + translated. + <p> + <TT>emacs fr_FR.po</TT> + + <P> + <LI> Make the binary mo files. + <p> + <TT>msgfmt fr_FR.po -o fr_FR.mo</TT> + <p> + <TT>msgfmt de_DE.po -o de_DE.mo</TT> + + <P> + <LI> Copy the binary files into the correct directory structure. + <p> + <TT>cp fr_FR.mo (dir)/fr_FR/LC_MESSAGES/libstdc++-v3.mo</TT> + <p> + <TT>cp de_DE.mo (dir)/de_DE/LC_MESSAGES/libstdc++-v3.mo</TT> + + <P> + <LI> Use the new message catalogs. + <p> + <TT>locale loc_de("de_DE");</TT> + <p> + <TT> + use_facet<messages<char> >(loc_de).open("libstdc++", locale(), dir); + </TT> +</UL> + +<P> +<H2> +5. Examples +</H2> + +<UL> + <LI> message converting, simple example using the GNU model. + +<pre> +#include <locale> + +void test01() +{ + using namespace std; + typedef std::messages<char>::catalog catalog; + + // Set to the root directory of the libstdc++.mo catalogs. + const char* dir = LOCALEDIR; + locale loc_de("de_DE"); + + // Cache the messages facet. + const messages<char>& mssg_de = use_facet<messages<char> >(loc_de); + + // Check German (de_DE) locale. + catalog cat_de = mssg_de.open("libstdc++", loc_c, dir); + string s01 = mssg_de.get(cat_de, 0, 0, "please"); + string s02 = mssg_de.get(cat_de, 0, 0, "thank you"); + // s01 == "bitte" + // s02 == "danke" + mssg_de.close(cat_de); +} +</pre> +</UL> + +More information can be found in the following testcases: +<UL> +<LI> testsuite/22_locale/messages.cc +<LI> testsuite/22_locale/messages_byname.cc +<LI> testsuite/22_locale/messages_char_members.cc +</UL> + +<P> +<H2> +6. Unresolved Issues +</H2> +<UL> +<LI> Things that are sketchy, or remain unimplemented: + <UL> + <LI>_M_convert_from_char, _M_convert_to_char are in + flux, depending on how the library ends up doing + character set conversions. It might not be possible to + do a real character set based conversion, due to the + fact that the template parameter for messages is not + enough to instantiate the codecvt facet (1 supplied, + need at least 2 but would prefer 3). + + <LI> There are issues with gettext needing the global + locale set to extract a message. This dependence on + the global locale makes the current "gnu" model non + MT-safe. Future versions of glibc, ie glibc 2.3.x will + fix this, and the C++ library bits are already in + place. + </UL> + +<p> +<LI> Development versions of the GNU "C" library, glibc 2.3 will allow + a more efficient, MT implementation of std::messages, and will + allow the removal of the _M_name_messages data member. If this + is done, it will change the library ABI. The C++ parts to + support glibc 2.3 have already been coded, but are not in use: + once this version of the "C" library is released, the marked + parts of the messages implementation can be switched over to + the new "C" library functionality. +<p> +<LI> At some point in the near future, std::numpunct will probably use + std::messages facilities to implement truename/falename + correctly. This is currently not done, but entries in + libstdc++.pot have already been made for "true" and "false" + string literals, so all that remains is the std::numpunct + coding and the configure/make hassles to make the installed + library search its own catalog. Currently the libstdc++.mo + catalog is only searched for the testsuite cases involving + messages members. + +<p> +<LI> The following member functions: + + <p> + <TT> + catalog + open(const basic_string<char>& __s, const locale& __loc) const + </TT> + + <p> + <TT> + catalog + open(const basic_string<char>&, const locale&, const char*) const; + </TT> + + <p> + Don't actually return a "value less than 0 if no such catalog + can be opened" as required by the standard in the "gnu" + model. As of this writing, it is unknown how to query to see + if a specified message catalog exists using the gettext + package. +</UL> + +<P> +<H2> +7. Acknowledgments +</H2> +Ulrich Drepper for the character set explanations, gettext details, +and patient answering of late-night questions, Tom Tromey for the java details. + + +<P> +<H2> +8. Bibliography / Referenced Documents +</H2> + +Drepper, Ulrich, GNU libc (glibc) 2.2 manual. In particular, Chapters +"7 Locales and Internationalization" + +<P> +Drepper, Ulrich, Thread-Aware Locale Model, A proposal. This is a +draft document describing the design of glibc 2.3 MT locale +functionality. + +<P> +Drepper, Ulrich, Numerous, late-night email correspondence + +<P> +ISO/IEC 9899:1999 Programming languages - C + +<P> +ISO/IEC 14882:1998 Programming languages - C++ + +<P> +Java 2 Platform, Standard Edition, v 1.3.1 API Specification. In +particular, java.util.Properties, java.text.MessageFormat, +java.util.Locale, java.util.ResourceBundle. +http://java.sun.com/j2se/1.3/docs/api + +<P> +System Interface Definitions, Issue 7 (IEEE Std. 1003.1-200x) +The Open Group/The Institute of Electrical and Electronics Engineers, Inc. +In particular see lines 5268-5427. +http://www.opennc.org/austin/docreg.html + +<P> GNU gettext tools, version 0.10.38, Native Language Support +Library and Tools. +http://sources.redhat.com/gettext + +<P> +Langer, Angelika and Klaus Kreft, Standard C++ IOStreams and Locales, +Advanced Programmer's Guide and Reference, Addison Wesley Longman, +Inc. 2000. See page 725, Internationalized Messages. + +<P> +Stroustrup, Bjarne, Appendix D, The C++ Programming Language, Special Edition, Addison Wesley, Inc. 2000 diff --git a/libstdc++-v3/docs/html/configopts.html b/libstdc++-v3/docs/html/configopts.html index b2ea3ed..dd0bcd3 100644 --- a/libstdc++-v3/docs/html/configopts.html +++ b/libstdc++-v3/docs/html/configopts.html @@ -7,7 +7,7 @@ <META NAME="GENERATOR" CONTENT="vi and eight fingers"> <TITLE>libstdc++-v3 configure options</TITLE> <LINK REL=StyleSheet HREF="lib3styles.css"> -<!-- $Id: configopts.html,v 1.11 2001/07/09 19:37:01 pme Exp $ --> +<!-- $Id: configopts.html,v 1.12 2001/07/09 21:47:35 pme Exp $ --> </HEAD> <BODY> @@ -46,13 +46,15 @@ options</A></H1> </P> <DT><TT>--enable-debug </TT> - <DD><P>The configure script will automatically detect the highest level - of optimization that the compiler in use can use (certain - versions of g++ will ICE if given the <TT>-O2</TT> option, but - this is fixed in later versions of the compiler). This --enable - flag will disable all optimizations and instruct the compiler to - emit as much extra debugging information as it can, for use - inside GDB. + <DD><P>The configure script will automatically detect the highest + level of optimization that the compiler in use can use + (certain versions of g++ will ICE if given the <TT>-O2</TT> + option, but this is fixed in later versions of the compiler). + This --enable flag will disable all optimizations and instruct + the compiler to emit as much extra debugging information as it + can, for use inside GDB. Note this make command, executed in + the build directory, will do much the same thing, without the + configuration difference:<TT>make CXXFLAGS='-g -O0' all</TT> </P> <DT><TT>--enable-cstdio </TT> @@ -83,25 +85,29 @@ options</A></H1> </P> <DT><TT>--enable-clocale=MODEL </TT> - <DD><P>Select a target-specific underlying locale package. The choices - are 'gnu' to specify an X/Open (IEEE Std. 1003.1-200x) model based - on langinfo/iconv (from - <A HREF="http://sources.redhat.com/glibc/">glibc</A>, the GNU C - library), or 'generic' to use a generic "C" abstraction - which consists of "C" locale info. The default is 'generic'. + <DD><P>Select a target-specific underlying locale package. The + choices are 'ieee_1003.1' to specify an X/Open, Standard Unix + (IEEE Std. 1003.1-200x) model based on langinfo/iconv/catgets, + 'gnu' to specify a model based on functionality from the GNU C + library (langinfo/iconv/gettext) (from <A + HREF="http://sources.redhat.com/glibc/">glibc</A>, the GNU C + library), or 'generic' to use a generic "C" + abstraction which consists of "C" locale info. The + default is 'generic'. </P> <DT><TT>--enable-c99 </TT> <DD><P>The "long long" type was introduced in C99, along - with bunches of other functions for wide characters, and math + with many other functions for wide characters, and math classification macros, etc. If enabled, all C99 functions not specified by the C++ standard will be put into <TT>namespace - c99</TT>, and then all names in the c99 namespace will be injected - into namespace std, so that C99 functions can be used "as - if" they were in the C++ standard (as they will eventually - be in some future revision of the standard, without a doubt). - By default, C99 support is on, assuming the configure probes find - all the necessary functions and bits necessary. + __gnu_cxx</TT>, and then all these names will + be injected into namespace std, so that C99 functions can be + used "as if" they were in the C++ standard (as they + will eventually be in some future revision of the standard, + without a doubt). By default, C99 support is on, assuming the + configure probes find all the necessary functions and bits + necessary. </P> <DT><TT>--enable-long-long </TT> @@ -197,8 +203,7 @@ options</A></H1> changing rapidly, and can cause problems on new platforms. Disabling wide character specializations is useful for initial porting steps, but builds only a subset of what is required by - ISO. Default is on, but the <TT>--enable-cstdio=stdio </TT> - option currently turns it off. + ISO. By default, this option is on. </P> </DL> </P> @@ -211,7 +216,7 @@ options</A></H1> <HR> <P CLASS="fineprint"><EM> -$Id: configopts.html,v 1.11 2001/07/09 19:37:01 pme Exp $ +$Id: configopts.html,v 1.12 2001/07/09 21:47:35 pme Exp $ </EM></P> |