From 615d009f6d673f288348c4394d36da2fb0dbbcc8 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Wed, 14 Aug 2002 17:29:19 +0000 Subject: [PATCH] messages.html: Use HTML entities for punctuation. 2002-08-14 Jonathan Wakely * docs/html/22_locale/messages.html: Use HTML entities for punctuation. From-SVN: r56300 --- libstdc++-v3/ChangeLog | 5 ++++ .../docs/html/22_locale/messages.html | 30 +++++++++---------- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 0a948ea0a17..9fa76a9fa61 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2002-08-14 Jonathan Wakely + + * docs/html/22_locale/messages.html: Use HTML entities for + punctuation. + 2002-08-13 Jonathan Wakely Phil Edwards diff --git a/libstdc++-v3/docs/html/22_locale/messages.html b/libstdc++-v3/docs/html/22_locale/messages.html index 371371fa63f..86c278c27b7 100644 --- a/libstdc++-v3/docs/html/22_locale/messages.html +++ b/libstdc++-v3/docs/html/22_locale/messages.html @@ -39,10 +39,10 @@ correspond to three protected virtual member functions. The public member functions are:

-catalog open(const string&, const locale&) const +catalog open(const string&, const locale&) const

-string_type get(catalog, int, int, const string_type&) const +string_type get(catalog, int, int, const string_type&) const

void close(catalog) const @@ -51,7 +51,7 @@ The public member functions are: While the virtual functions are:

-catalog do_open(const string&, const locale&) const +catalog do_open(const string&, const locale&) const

-1- Returns: A value that may be passed to get() to retrieve a @@ -63,7 +63,7 @@ catalog can be opened.

-string_type do_get(catalog, int, int, const string_type&) const +string_type do_get(catalog, int, int, const string_type&) const

-3- Requires: A catalog cat obtained from open() and not yet closed. @@ -106,8 +106,8 @@ unfortunate.

The 'open' member function in particular seems to be oddly designed. The signature seems quite peculiar. Why specify a const -string& argument, for instance, instead of just const -char*? Or, why specify a const locale& argument that is +string& argument, for instance, instead of just const +char*? Or, why specify a const locale& 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 @@ -238,7 +238,7 @@ documentation. Here's an idea of what is required: locale loc_de("de_DE");

- use_facet >(loc_de).open("libstdc++", locale(), dir); + use_facet<messages<char> >(loc_de).open("libstdc++", locale(), dir); @@ -251,23 +251,23 @@ documentation. Here's an idea of what is required:

  • message converting, simple example using the GNU model.
    -#include 
    -#include 
    +#include <iostream>
    +#include <locale>
     using namespace std;
     
     void test01()
     {
    -  typedef messages::catalog catalog;
    +  typedef messages<char>::catalog catalog;
       const char* dir =
       "/mnt/egcs/build/i686-pc-linux-gnu/libstdc++-v3/po/share/locale";  
       const locale loc_de("de_DE");
    -  const messages& mssg_de = use_facet >(loc_de); 
    +  const messages<char>& mssg_de = use_facet<messages<char> >(loc_de); 
     
       catalog cat_de = mssg_de.open("libstdc++", loc_de, dir);
       string s01 = mssg_de.get(cat_de, 0, 0, "please");
       string s02 = mssg_de.get(cat_de, 0, 0, "thank you");
    -  cout << "please in german:" << s01 << '\n';
    -  cout << "thank you in german:" << s02 << '\n';
    +  cout << "please in german:" << s01 << '\n';
    +  cout << "thank you in german:" << s02 << '\n';
       mssg_de.close(cat_de);
     }
     
    @@ -329,13 +329,13 @@ More information can be found in the following testcases:

    catalog - open(const basic_string& __s, const locale& __loc) const + open(const basic_string<char>& __s, const locale& __loc) const

    catalog - open(const basic_string&, const locale&, const char*) const; + open(const basic_string<char>&, const locale&, const char*) const;