From: bkoz Date: Thu, 31 Jan 2002 00:24:56 +0000 (+0000) Subject: 2002-01-30 Peter Schmid X-Git-Tag: upstream/4.9.2~89026 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ad4bcbdad621f2d65122d08f899af0ad63b2c673;p=platform%2Fupstream%2Flinaro-gcc.git 2002-01-30 Peter Schmid * docs/html/22_locale/messages.html: Fix example code. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49349 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 117b122..cb3f92b 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,7 @@ +2002-01-30 Peter Schmid + + * docs/html/22_locale/messages.html: Fix example code. + 2002-01-30 Richard Henderson * testsuite/27_io/ostream_inserter_arith.cc (test03_check): Break diff --git a/libstdc++-v3/docs/html/22_locale/messages.html b/libstdc++-v3/docs/html/22_locale/messages.html index 6888c72..371371f 100644 --- a/libstdc++-v3/docs/html/22_locale/messages.html +++ b/libstdc++-v3/docs/html/22_locale/messages.html @@ -251,26 +251,23 @@ documentation. Here's an idea of what is required:
  • message converting, simple example using the GNU model.
    +#include 
     #include 
    +using namespace std;
     
     void test01()
     {
    -  using namespace std;
    -  typedef std::messages::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.
    +  typedef messages::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); 
     
    -  // Check German (de_DE) locale.
    -  catalog cat_de = mssg_de.open("libstdc++", loc_c, dir);
    +  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");
    -  // s01 == "bitte" 
    -  // s02 == "danke" 
    +  cout << "please in german:" << s01 << '\n';
    +  cout << "thank you in german:" << s02 << '\n';
       mssg_de.close(cat_de);
     }