diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog index fd5999c95..bede9cd4e 100644 --- a/docs/reference/ChangeLog +++ b/docs/reference/ChangeLog @@ -1,3 +1,10 @@ +2003-04-01 Matthias Clasen + + * 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 * glib/glib-sections.txt: Add g_string_chunk_insert_len. diff --git a/docs/reference/glib/tmpl/arrays.sgml b/docs/reference/glib/tmpl/arrays.sgml index 61babb305..4fefede5c 100644 --- a/docs/reference/glib/tmpl/arrays.sgml +++ b/docs/reference/glib/tmpl/arrays.sgml @@ -44,7 +44,7 @@ To free an array, use g_array_free(). for (i = 0; i < 10000; i++) if (g_array_index (garray, gint, i) != i) - g_print ("ERROR: got %d instead of %d\n", + g_print ("ERROR: got %d instead of %d\n", g_array_index (garray, gint, i), i); g_array_free (garray, TRUE); diff --git a/docs/reference/glib/tmpl/arrays_pointer.sgml b/docs/reference/glib/tmpl/arrays_pointer.sgml index d7c77ee74..23fda0353 100644 --- a/docs/reference/glib/tmpl/arrays_pointer.sgml +++ b/docs/reference/glib/tmpl/arrays_pointer.sgml @@ -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 %p instead of %p\n", g_ptr_array_index (gparray, 0), string1); g_ptr_array_free (gparray, TRUE); diff --git a/docs/reference/glib/tmpl/error_reporting.sgml b/docs/reference/glib/tmpl/error_reporting.sgml index 5c1192b55..c78bc8791 100644 --- a/docs/reference/glib/tmpl/error_reporting.sgml +++ b/docs/reference/glib/tmpl/error_reporting.sgml @@ -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: %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: %s", /* error message format string */ g_strerror (errno)); return -1; } diff --git a/docs/reference/glib/tmpl/random_numbers.sgml b/docs/reference/glib/tmpl/random_numbers.sgml index 197501845..aa45fb53e 100644 --- a/docs/reference/glib/tmpl/random_numbers.sgml +++ b/docs/reference/glib/tmpl/random_numbers.sgml @@ -28,7 +28,7 @@ on all platforms. This can thus be used as a seed for e.g. games. The g_rand*_range functions will return high quality equally distributed random numbers, whereas for example the -(g_random_int()%%max) approach often doesn't +(g_random_int()%max) approach often doesn't yield equally distributed numbers.