[glib] Fix doc typos
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Fix doc typos
- Date: Sat, 4 Jun 2011 18:44:44 +0000 (UTC)
commit 75f7eef9cd1f4bdbae6c75c53ed340ea8b5ba4c5
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Jun 4 11:57:10 2011 -0400
Fix doc typos
Now with fewer broken links...
docs/reference/glib/building.sgml | 2 +-
docs/reference/glib/running.sgml | 2 +-
docs/reference/glib/tmpl/macros_misc.sgml | 7 ++-
docs/reference/glib/tmpl/queue.sgml | 4 +-
glib/garray.c | 3 +-
glib/gdataset.c | 4 +-
glib/gdatetime.c | 4 +-
glib/giochannel.c | 2 +-
glib/glib-unix.c | 2 +-
glib/gmain.c | 8 +-
glib/gmarkup.c | 2 +-
glib/gqueue.c | 2 +-
glib/gsequence.c | 107 ++++++++++++++++-------------
glib/gtree.c | 28 ++++----
14 files changed, 97 insertions(+), 80 deletions(-)
---
diff --git a/docs/reference/glib/building.sgml b/docs/reference/glib/building.sgml
index 8b643e0..1ab30d2 100644
--- a/docs/reference/glib/building.sgml
+++ b/docs/reference/glib/building.sgml
@@ -276,7 +276,7 @@ How to compile GLib itself
Turns on various amounts of debugging support. Setting this to 'no'
disables g_assert(), g_return_if_fail(), g_return_val_if_fail() and
all cast checks between different object types. Setting it to 'minimum' disables only cast checks. Setting it to 'yes' enables
- <link linkend="GLIB-Debug-Options">runtime debugging</link>.
+ <link linkend="G-DEBUG:CAPS">runtime debugging</link>.
The default is 'minimum'.
Note that 'no' is fast, but dangerous as it tends to destabilize
even mostly bug-free software by changing the effect of many bugs
diff --git a/docs/reference/glib/running.sgml b/docs/reference/glib/running.sgml
index a130e66..41215dd 100644
--- a/docs/reference/glib/running.sgml
+++ b/docs/reference/glib/running.sgml
@@ -58,7 +58,7 @@ variables like <envar>LANG</envar>, <envar>PATH</envar> or <envar>HOME</envar>.
</para>
</formalpara>
-<formalpara id="G_DEBUG">
+<formalpara id="G-DEBUG:CAPS">
<title><envar>G_DEBUG</envar></title>
<para>
If GLib has been configured with <option>--enable-debug=yes</option>,
diff --git a/docs/reference/glib/tmpl/macros_misc.sgml b/docs/reference/glib/tmpl/macros_misc.sgml
index d0ef184..539786b 100644
--- a/docs/reference/glib/tmpl/macros_misc.sgml
+++ b/docs/reference/glib/tmpl/macros_misc.sgml
@@ -165,6 +165,7 @@ The macro should only be used once per source code line.
@expr: a constant expression.
@Since: 2.20
+
<!-- ##### MACRO G_STATIC_ASSERT_EXPR ##### -->
<para>
The G_STATIC_ASSERT_EXPR macro lets the programmer check a condition at
@@ -184,6 +185,7 @@ the first argument of a comma expression.
@expr: a constant expression.
@Since: 2.30
+
<!-- ##### MACRO G_GNUC_EXTENSION ##### -->
<para>
Expands to <literal>__extension__</literal> when <command>gcc</command> is
@@ -635,8 +637,9 @@ printing values of type #guint64. See also #G_GINT16_FORMAT.
Some platforms do not support scanning and printing 64 bit integers,
even though the types are supported. On such platforms #G_GUINT64_FORMAT
is not defined. Note that scanf() may not support 64 bit integers, even
-if #G_GINT64_FORMAT is defined. Due to its weak error handling, scanf() is not
-recommended for parsing anyway; consider using g_strtoull() instead.
+if #G_GINT64_FORMAT is defined. Due to its weak error handling, scanf()
+is not recommended for parsing anyway; consider using g_ascii_strtoull()
+instead.
</para>
</note>
diff --git a/docs/reference/glib/tmpl/queue.sgml b/docs/reference/glib/tmpl/queue.sgml
index 96ce2d2..8bcdc99 100644
--- a/docs/reference/glib/tmpl/queue.sgml
+++ b/docs/reference/glib/tmpl/queue.sgml
@@ -47,7 +47,7 @@ To free the entire queue, use g_queue_free().
<!-- ##### STRUCT GQueue ##### -->
<para>
-Contains the public fields of a <link linkend="glib-queues">Queue</link>.
+Contains the public fields of a <link linkend="glib-Double-ended-Queues">Queue</link>.
</para>
@head: a pointer to the first element of the queue.
@@ -280,6 +280,7 @@ GQueue my_queue = G_QUEUE_INIT;
@queue:
@data:
+ Returns:
<!-- ##### FUNCTION g_queue_remove_all ##### -->
@@ -289,6 +290,7 @@ GQueue my_queue = G_QUEUE_INIT;
@queue:
@data:
+ Returns:
<!-- ##### FUNCTION g_queue_insert_before ##### -->
diff --git a/glib/garray.c b/glib/garray.c
index d498d23..fa6160b 100644
--- a/glib/garray.c
+++ b/glib/garray.c
@@ -96,8 +96,7 @@ typedef struct _GRealArray GRealArray;
* @len: the number of elements in the #GArray not including the
* possible terminating zero element.
*
- * Contains the public fields of an <link
- * linkend="glib-arrays">Array</link>.
+ * Contains the public fields of an <link linkend="glib-Arrays">Array</link>.
**/
struct _GRealArray
{
diff --git a/glib/gdataset.c b/glib/gdataset.c
index 3408558..e1b55c1 100644
--- a/glib/gdataset.c
+++ b/glib/gdataset.c
@@ -1061,8 +1061,8 @@ g_data_initialize (void)
* retrieve the other.
*
* Quarks are used for both <link
- * linkend="glib-datasets">Datasets</link> and <link
- * linkend="glib-keyed-data-lists">Keyed Data Lists</link>.
+ * linkend="glib-Datasets">Datasets</link> and <link
+ * linkend="glib-Keyed-Data-Lists">Keyed Data Lists</link>.
*
* To create a new quark from a string, use g_quark_from_string() or
* g_quark_from_static_string().
diff --git a/glib/gdatetime.c b/glib/gdatetime.c
index 40ab360..32e280f 100644
--- a/glib/gdatetime.c
+++ b/glib/gdatetime.c
@@ -1316,8 +1316,8 @@ g_date_time_add_full (GDateTime *datetime,
* @dt1: first #GDateTime to compare
* @dt2: second #GDateTime to compare
*
- * #GCompareFunc-compatible comparison for #GDateTimes.
- * Both #GDateTimes must be non-%NULL.
+ * A comparison function for #GDateTimes that is suitable
+ * as a #GCompareFunc. Both #GDateTimes must be non-%NULL.
*
* Return value: -1, 0 or 1 if @dt1 is less than, equal to or greater
* than @dt2.
diff --git a/glib/giochannel.c b/glib/giochannel.c
index 8fba7e0..fc26d44 100644
--- a/glib/giochannel.c
+++ b/glib/giochannel.c
@@ -89,7 +89,7 @@
* increment or decrement the reference count respectively. When the
* reference count falls to 0, the #GIOChannel is freed. (Though it
* isn't closed automatically, unless it was created using
- * g_io_channel_new_from_file().) Using g_io_add_watch() or
+ * g_io_channel_new_file().) Using g_io_add_watch() or
* g_io_add_watch_full() increments a channel's reference count.
*
* The new functions g_io_channel_read_chars(),
diff --git a/glib/glib-unix.c b/glib/glib-unix.c
index 9bc3bb1..a70e737 100644
--- a/glib/glib-unix.c
+++ b/glib/glib-unix.c
@@ -198,7 +198,7 @@ g_unix_set_fd_nonblocking (gint fd,
* signal @signum. Currently only %SIGHUP, %SIGINT, and %SIGTERM can
* be monitored. Note that unlike the UNIX default, all sources which
* have created a watch will be dispatched, regardless of which
- * underlying thread invoked g_unix_signal_create_watch().
+ * underlying thread invoked g_unix_signal_source_new().
*
* For example, an effective use of this function is to handle SIGTERM
* cleanly; flushing any outstanding files, and then calling
diff --git a/glib/gmain.c b/glib/gmain.c
index e5c8ca3..0513bce 100644
--- a/glib/gmain.c
+++ b/glib/gmain.c
@@ -4187,10 +4187,10 @@ g_timeout_add_seconds_full (gint priority,
* it returns %FALSE, at which point the timeout is automatically destroyed
* and the function will not be called again.
*
- * This internally creates a main loop source using
- * g_timeout_source_new_seconds() and attaches it to the main loop context
- * using g_source_attach(). You can do these steps manually if you need
- * greater control. Also see g_timout_add_seconds_full().
+ * This internally creates a main loop source using
+ * g_timeout_source_new_seconds() and attaches it to the main loop context
+ * using g_source_attach(). You can do these steps manually if you need
+ * greater control. Also see g_timeout_add_seconds_full().
*
* Note that the first call of the timer may not be precise for timeouts
* of one second. If you need finer precision and have such a timeout,
diff --git a/glib/gmarkup.c b/glib/gmarkup.c
index 2a41005..dc28bad 100644
--- a/glib/gmarkup.c
+++ b/glib/gmarkup.c
@@ -1929,7 +1929,7 @@ g_markup_parse_context_get_user_data (GMarkupParseContext *context)
* which is why g_markup_parse_context_pop() is provided to allow "one
* last access" to the @user_data provided to this function. In the
* case of error, the @user_data provided here is passed directly to
- * the error callback of the subparser and g_markup_parse_context()
+ * the error callback of the subparser and g_markup_parse_context_pop()
* should not be called. In either case, if @user_data was allocated
* then it ought to be freed from both of these locations.
*
diff --git a/glib/gqueue.c b/glib/gqueue.c
index 358b669..2f90d6b 100644
--- a/glib/gqueue.c
+++ b/glib/gqueue.c
@@ -724,7 +724,7 @@ g_queue_peek_nth_link (GQueue *queue,
/**
* g_queue_link_index:
- * @queue: a #Gqueue
+ * @queue: a #GQueue
* @link_: A #GList link
*
* Returns the position of @link_ in @queue.
diff --git a/glib/gsequence.c b/glib/gsequence.c
index cc57f58..5631be3 100644
--- a/glib/gsequence.c
+++ b/glib/gsequence.c
@@ -431,7 +431,7 @@ g_sequence_iter_compare (GSequenceIter *a,
/**
* g_sequence_append:
- * @seq: a #GSequencePointer
+ * @seq: a #GSequence
* @data: the data for the new item
*
* Adds a new item to the end of @seq.
@@ -649,14 +649,16 @@ g_sequence_move_range (GSequenceIter *dest,
/**
* g_sequence_sort:
* @seq: a #GSequence
- * @cmp_func: the #GCompareDataFunc used to sort @seq. This function is
- * passed two items of @seq and should return 0 if they are equal,
- * a negative value if the first comes before the second, and a
- * positive value if the second comes before the first.
+ * @cmp_func: the function used to sort the sequence
* @cmp_data: user data passed to @cmp_func
*
* Sorts @seq using @cmp_func.
*
+ * @cmp_func is passed two items of @seq and should
+ * return 0 if they are equal, a negative value if the
+ * first comes before the second, and a positive value
+ * if the second comes before the first.
+ *
* Since: 2.14
**/
void
@@ -679,16 +681,17 @@ g_sequence_sort (GSequence *seq,
* g_sequence_insert_sorted:
* @seq: a #GSequence
* @data: the data to insert
- * @cmp_func: the #GCompareDataFunc used to compare items in the sequence. It
- * is called with two items of the @seq and @user_data. It should
- * return 0 if the items are equal, a negative value if the first
- * item comes before the second, and a positive value if the second
- * item comes before the first.
+ * @cmp_func: the function used to compare items in the sequence
* @cmp_data: user data passed to @cmp_func.
*
- * Inserts @data into @sequence using @func to determine the new position.
- * The sequence must already be sorted according to @cmp_func; otherwise the
- * new position of @data is undefined.
+ * Inserts @data into @sequence using @func to determine the new
+ * position. The sequence must already be sorted according to @cmp_func;
+ * otherwise the new position of @data is undefined.
+ *
+ * @cmp_func is called with two items of the @seq and @user_data.
+ * It should return 0 if the items are equal, a negative value
+ * if the first item comes before the second, and a positive value
+ * if the second item comes before the first.
*
* Return value: a #GSequenceIter pointing to the new item.
*
@@ -716,11 +719,7 @@ g_sequence_insert_sorted (GSequence *seq,
/**
* g_sequence_sort_changed:
* @iter: A #GSequenceIter
- * @cmp_func: the #GCompareDataFunc used to compare items in the sequence. It
- * is called with two items of the @seq and @user_data. It should
- * return 0 if the items are equal, a negative value if the first
- * item comes before the second, and a positive value if the second
- * item comes before the first.
+ * @cmp_func: the function used to compare items in the sequence
* @cmp_data: user data passed to @cmp_func.
*
* Moves the data pointed to a new position as indicated by @cmp_func. This
@@ -728,6 +727,11 @@ g_sequence_insert_sorted (GSequence *seq,
* to @cmp_func whenever some aspect of an item changes so that @cmp_func
* may return different values for that item.
*
+ * @cmp_func is called with two items of the @seq and @user_data.
+ * It should return 0 if the items are equal, a negative value if
+ * the first item comes before the second, and a positive value if
+ * the second item comes before the first.
+ *
* Since: 2.14
**/
void
@@ -886,17 +890,18 @@ g_sequence_sort_iter (GSequence *seq,
/**
* g_sequence_sort_changed_iter:
* @iter: a #GSequenceIter
- * @iter_cmp: the #GSequenceItercompare used to compare iterators in the
- * sequence. It is called with two iterators pointing into @seq. It should
- * return 0 if the iterators are equal, a negative value if the first
- * iterator comes before the second, and a positive value if the second
- * iterator comes before the first.
+ * @iter_cmp: the function used to compare iterators in the sequence
* @cmp_data: user data passed to @cmp_func
*
* Like g_sequence_sort_changed(), but uses
* a #GSequenceIterCompareFunc instead of a #GCompareDataFunc as
* the compare function.
*
+ * @iter_cmp is called with two iterators pointing into @seq. It should
+ * return 0 if the iterators are equal, a negative value if the first
+ * iterator comes before the second, and a positive value if the second
+ * iterator comes before the first.
+ *
* Since: 2.14
**/
void
@@ -948,17 +953,23 @@ g_sequence_sort_changed_iter (GSequenceIter *iter,
* g_sequence_insert_sorted_iter:
* @seq: a #GSequence
* @data: data for the new item
- * @iter_cmp: the #GSequenceItercompare used to compare iterators in the
- * sequence. It is called with two iterators pointing into @seq. It should
- * return 0 if the iterators are equal, a negative value if the first
- * iterator comes before the second, and a positive value if the second
- * iterator comes before the first.
+ * @iter_cmp: the function used to compare iterators in the sequence
* @cmp_data: user data passed to @cmp_func
*
* Like g_sequence_insert_sorted(), but uses
* a #GSequenceIterCompareFunc instead of a #GCompareDataFunc as
* the compare function.
*
+ * @iter_cmp is called with two iterators pointing into @seq.
+ * It should return 0 if the iterators are equal, a negative
+ * value if the first iterator comes before the second, and a
+ * positive value if the second iterator comes before the first.
+ *
+ * It is called with two iterators pointing into @seq. It should
+ * return 0 if the iterators are equal, a negative value if the
+ * first iterator comes before the second, and a positive value
+ * if the second iterator comes before the first.
+ *
* Return value: a #GSequenceIter pointing to the new item
*
* Since: 2.14
@@ -1010,22 +1021,23 @@ g_sequence_insert_sorted_iter (GSequence *seq,
* g_sequence_search_iter:
* @seq: a #GSequence
* @data: data for the new item
- * @iter_cmp: the #GSequenceIterCompare function used to compare iterators
- * in the sequence. It is called with two iterators pointing into @seq.
- * It should return 0 if the iterators are equal, a negative value if the
- * first iterator comes before the second, and a positive value if the
- * second iterator comes before the first.
+ * @iter_cmp: the function used to compare iterators in the sequence
* @cmp_data: user data passed to @iter_cmp
*
- * Like g_sequence_search(), but uses
- * a #GSequenceIterCompareFunc instead of a #GCompareDataFunc as
- * the compare function.
+ * Like g_sequence_search(), but uses a #GSequenceIterCompareFunc
+ * instead of a #GCompareDataFunc as the compare function.
+ *
+ * @iter_cmp is called with two iterators pointing into @seq.
+ * It should return 0 if the iterators are equal, a negative value
+ * if the first iterator comes before the second, and a positive
+ * value if the second iterator comes before the first.
*
* If you are simply searching for an existing element of the sequence,
* consider using g_sequence_lookup_iter().
*
* Return value: a #GSequenceIter pointing to the position in @seq
- * where @data would have been inserted according to @iter_cmp and @cmp_data.
+ * where @data would have been inserted according to @iter_cmp
+ * and @cmp_data.
*
* Since: 2.14
**/
@@ -1064,19 +1076,20 @@ g_sequence_search_iter (GSequence *seq,
* g_sequence_lookup_iter:
* @seq: a #GSequence
* @data: data to lookup
- * @iter_cmp: the #GSequenceIterCompare function used to compare iterators
- * in the sequence. It is called with two iterators pointing into @seq.
- * It should return 0 if the iterators are equal, a negative value if the
- * first iterator comes before the second, and a positive value if the
- * second iterator comes before the first.
+ * @iter_cmp: the function used to compare iterators in the sequence
* @cmp_data: user data passed to @iter_cmp
*
- * Like g_sequence_lookup(), but uses
- * a #GSequenceIterCompareFunc instead of a #GCompareDataFunc as
- * the compare function.
+ * Like g_sequence_lookup(), but uses a #GSequenceIterCompareFunc
+ * instead of a #GCompareDataFunc as the compare function.
+ *
+ * @iter_cmp is called with two iterators pointing into @seq.
+ * It should return 0 if the iterators are equal, a negative value
+ * if the first iterator comes before the second, and a positive
+ * value if the second iterator comes before the first.
*
- * Return value: an #GSequenceIter pointing to the position of the first item
- * found equal to @data according to @cmp_func and @cmp_data.
+ * Return value: an #GSequenceIter pointing to the position of
+ * the first item found equal to @data according to @cmp_func
+ * and @cmp_data.
*
* Since: 2.28
**/
diff --git a/glib/gtree.c b/glib/gtree.c
index 7f016d7..60ba2cf 100644
--- a/glib/gtree.c
+++ b/glib/gtree.c
@@ -1003,23 +1003,23 @@ g_tree_traverse (GTree *tree,
/**
* g_tree_search:
- * @tree: a #GTree.
- * @search_func: a function used to search the #GTree.
- * @user_data: the data passed as the second argument to the @search_func
- * function.
- *
+ * @tree: a #GTree
+ * @search_func: a function used to search the #GTree
+ * @user_data: the data passed as the second argument to @search_func
+ *
* Searches a #GTree using @search_func.
*
- * The @search_func is called with a pointer to the key of a key/value pair in
- * the tree, and the passed in @user_data. If @search_func returns 0 for a
- * key/value pair, then g_tree_search_func() will return the value of that
- * pair. If @search_func returns -1, searching will proceed among the
- * key/value pairs that have a smaller key; if @search_func returns 1,
- * searching will proceed among the key/value pairs that have a larger key.
+ * The @search_func is called with a pointer to the key of a key/value
+ * pair in the tree, and the passed in @user_data. If @search_func returns
+ * 0 for a key/value pair, then the corresponding value is returned as
+ * the result of g_tree_search(). If @search_func returns -1, searching
+ * will proceed among the key/value pairs that have a smaller key; if
+ * @search_func returns 1, searching will proceed among the key/value
+ * pairs that have a larger key.
*
- * Return value: the value corresponding to the found key, or %NULL if the key
- * was not found.
- **/
+ * Return value: the value corresponding to the found key, or %NULL if
+ * the key was not found.
+ */
gpointer
g_tree_search (GTree *tree,
GCompareFunc search_func,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]