Fix formatting of examples.

2003-04-01  Matthias Clasen  <maclas@gmx.de>

	* glib/tmpl/error_reporting.sgml:
	* glib/tmpl/random_numbers.sgml:
	* glib/tmpl/arrays_pointer.sgml:
	* glib/tmpl/arrays.sgml: Fix formatting of examples.
This commit is contained in:
Matthias Clasen 2003-03-31 22:51:28 +00:00 committed by Matthias Clasen
parent e4112b8b1b
commit aad05b82e0
5 changed files with 12 additions and 5 deletions

View File

@ -1,3 +1,10 @@
2003-04-01 Matthias Clasen <maclas@gmx.de>
* glib/tmpl/error_reporting.sgml:
* glib/tmpl/random_numbers.sgml:
* glib/tmpl/arrays_pointer.sgml:
* glib/tmpl/arrays.sgml: Fix formatting of examples.
2003-04-01 Matthias Clasen <maclas@gmx.de>
* glib/glib-sections.txt: Add g_string_chunk_insert_len.

View File

@ -44,7 +44,7 @@ To free an array, use g_array_free().
for (i = 0; i &lt; 10000; i++)
if (g_array_index (garray, gint, i) != i)
g_print ("ERROR: got %d instead of %d\n",
g_print ("ERROR: got &percnt;d instead of &percnt;d\n",
g_array_index (garray, gint, i), i);
g_array_free (garray, TRUE);

View File

@ -49,7 +49,7 @@ To free a pointer array, use g_ptr_array_free().
g_ptr_array_add (gparray, (gpointer) string3);
if (g_ptr_array_index (gparray, 0) != (gpointer) string1)
g_print ("ERROR: got %p instead of %p\n",
g_print ("ERROR: got &percnt;p instead of &percnt;p\n",
g_ptr_array_index (gparray, 0), string1);
g_ptr_array_free (gparray, TRUE);

View File

@ -52,7 +52,7 @@ if (err != NULL)
{
/* Report error to user, and free error */
g_assert (contents == NULL);
fprintf (stderr, "Unable to read file: %s\n", err->message);
fprintf (stderr, "Unable to read file: &percnt;s\n", err->message);
g_error_free (err);
}
else
@ -115,7 +115,7 @@ foo_open_file (GError **error)
g_set_error (error,
FOO_ERROR, /* error domain */
FOO_ERROR_BLAH, /* error code */
"Failed to open file: %s", /* error message format string */
"Failed to open file: &percnt;s", /* error message format string */
g_strerror (errno));
return -1;
}

View File

@ -28,7 +28,7 @@ on all platforms. This can thus be used as a seed for e.g. games.
<para>
The <function>g_rand*_range</function> functions will return high quality
equally distributed random numbers, whereas for example the
<literal>(g_random_int()%%max)</literal> approach often doesn't
<literal>(g_random_int()&percnt;max)</literal> approach often doesn't
yield equally distributed numbers.
</para>