documentation.html patch
Jonathan Wakely
cow@compsoc.man.ac.uk
Tue Aug 13 09:53:00 GMT 2002
On Tue, Aug 13, 2002 at 05:42:58PM +0100, Jonathan Wakely wrote:
> On Tue, Aug 13, 2002 at 12:28:06PM -0400, Phil Edwards wrote:
>
> > Thanks, good catch. This is in; I spotted some other goofs while making
> > the change. Looks like the HTML text was copied from the /rendered/
> > version of the various howto's. All fixed AFAIK now.
>
> I was just looking at docs/html/22_locale/messages.html as well, and it needs
> the following patch to fix the asme problem.
>
I missed some other symbols in this file, more <'s and >'s and &'s too.
This replaces the last patch.
I can't see any other problems in this file (which probably says more
about my proofreading than about the file ;)
2002-08-13 Jonathan Wakely <jw@kayari.org>
* docs/html/22_locale/messages.html: Use HTML entities for punctuation.
*** orig/html/22_locale/messages.html Tue Aug 13 17:30:07 2002
--- docs/html/22_locale/messages.html Tue Aug 13 17:49:21 2002
***************
*** 39,48 ****
The public member functions are:
<p>
! <code>catalog open(const string&, const locale&) const</code>
<p>
! <code>string_type get(catalog, int, int, const string_type&) const</code>
<p>
<code>void close(catalog) const</code>
--- 39,48 ----
The public member functions are:
<p>
! <code>catalog open(const string&, const locale&) const</code>
<p>
! <code>string_type get(catalog, int, int, const string_type&) const</code>
<p>
<code>void close(catalog) const</code>
***************
*** 51,57 ****
While the virtual functions are:
<p>
! <code>catalog do_open(const string&, const locale&) const</code>
<BLOCKQUOTE>
<I>
-1- Returns: A value that may be passed to get() to retrieve a
--- 51,57 ----
While the virtual functions are:
<p>
! <code>catalog do_open(const string&, const locale&) const</code>
<BLOCKQUOTE>
<I>
-1- Returns: A value that may be passed to get() to retrieve a
***************
*** 63,69 ****
</BLOCKQUOTE>
<p>
! <code>string_type do_get(catalog, int, int, const string_type&) const</code>
<BLOCKQUOTE>
<I>
-3- Requires: A catalog cat obtained from open() and not yet closed.
--- 63,69 ----
</BLOCKQUOTE>
<p>
! <code>string_type do_get(catalog, int, int, const string_type&) const</code>
<BLOCKQUOTE>
<I>
-3- Requires: A catalog cat obtained from open() and not yet closed.
***************
*** 106,113 ****
<p>
The 'open' member function in particular seems to be oddly
designed. The signature seems quite peculiar. Why specify a <code>const
! string& </code> argument, for instance, instead of just <code>const
! char*</code>? Or, why specify a <code>const locale&</code> 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
--- 106,113 ----
<p>
The 'open' member function in particular seems to be oddly
designed. The signature seems quite peculiar. Why specify a <code>const
! string& </code> argument, for instance, instead of just <code>const
! char*</code>? Or, why specify a <code>const locale&</code> 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,244 ****
<code>locale loc_de("de_DE");</code>
<p>
<code>
! use_facet<messages<char> >(loc_de).open("libstdc++", locale(), dir);
</code>
</ul>
--- 238,244 ----
<code>locale loc_de("de_DE");</code>
<p>
<code>
! use_facet<messages<char> >(loc_de).open("libstdc++", locale(), dir);
</code>
</ul>
***************
*** 251,273 ****
<li> message converting, simple example using the GNU model.
<pre>
! #include <iostream>
! #include <locale>
using namespace std;
void test01()
{
! 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<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';
mssg_de.close(cat_de);
}
</pre>
--- 251,273 ----
<li> message converting, simple example using the GNU model.
<pre>
! #include <iostream>
! #include <locale>
using namespace std;
void test01()
{
! 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<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';
mssg_de.close(cat_de);
}
</pre>
***************
*** 329,341 ****
<p>
<code>
catalog
! open(const basic_string<char>& __s, const locale& __loc) const
</code>
<p>
<code>
catalog
! open(const basic_string<char>&, const locale&, const char*) const;
</code>
<p>
--- 329,341 ----
<p>
<code>
catalog
! open(const basic_string<char>& __s, const locale& __loc) const
</code>
<p>
<code>
catalog
! open(const basic_string<char>&, const locale&, const char*) const;
</code>
<p>
More information about the Libstdc++
mailing list