Fix doc typos

Now with fewer broken links...
This commit is contained in:
Matthias Clasen 2011-06-04 11:57:10 -04:00
parent 3b9c8962dc
commit 75f7eef9cd
14 changed files with 97 additions and 80 deletions

View File

@ -276,7 +276,7 @@ How to compile GLib itself
Turns on various amounts of debugging support. Setting this to 'no' Turns on various amounts of debugging support. Setting this to 'no'
disables g_assert(), g_return_if_fail(), g_return_val_if_fail() and 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 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'. The default is 'minimum'.
Note that 'no' is fast, but dangerous as it tends to destabilize Note that 'no' is fast, but dangerous as it tends to destabilize
even mostly bug-free software by changing the effect of many bugs even mostly bug-free software by changing the effect of many bugs

View File

@ -58,7 +58,7 @@ variables like <envar>LANG</envar>, <envar>PATH</envar> or <envar>HOME</envar>.
</para> </para>
</formalpara> </formalpara>
<formalpara id="G_DEBUG"> <formalpara id="G-DEBUG:CAPS">
<title><envar>G_DEBUG</envar></title> <title><envar>G_DEBUG</envar></title>
<para> <para>
If GLib has been configured with <option>--enable-debug=yes</option>, If GLib has been configured with <option>--enable-debug=yes</option>,

View File

@ -165,6 +165,7 @@ The macro should only be used once per source code line.
@expr: a constant expression. @expr: a constant expression.
@Since: 2.20 @Since: 2.20
<!-- ##### MACRO G_STATIC_ASSERT_EXPR ##### --> <!-- ##### MACRO G_STATIC_ASSERT_EXPR ##### -->
<para> <para>
The G_STATIC_ASSERT_EXPR macro lets the programmer check a condition at 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. @expr: a constant expression.
@Since: 2.30 @Since: 2.30
<!-- ##### MACRO G_GNUC_EXTENSION ##### --> <!-- ##### MACRO G_GNUC_EXTENSION ##### -->
<para> <para>
Expands to <literal>__extension__</literal> when <command>gcc</command> is 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, Some platforms do not support scanning and printing 64 bit integers,
even though the types are supported. On such platforms #G_GUINT64_FORMAT 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 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 if #G_GINT64_FORMAT is defined. Due to its weak error handling, scanf()
recommended for parsing anyway; consider using g_strtoull() instead. is not recommended for parsing anyway; consider using g_ascii_strtoull()
instead.
</para> </para>
</note> </note>

View File

@ -47,7 +47,7 @@ To free the entire queue, use g_queue_free().
<!-- ##### STRUCT GQueue ##### --> <!-- ##### STRUCT GQueue ##### -->
<para> <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> </para>
@head: a pointer to the first element of the queue. @head: a pointer to the first element of the queue.
@ -280,6 +280,7 @@ GQueue my_queue = G_QUEUE_INIT;
@queue: @queue:
@data: @data:
@Returns:
<!-- ##### FUNCTION g_queue_remove_all ##### --> <!-- ##### FUNCTION g_queue_remove_all ##### -->
@ -289,6 +290,7 @@ GQueue my_queue = G_QUEUE_INIT;
@queue: @queue:
@data: @data:
@Returns:
<!-- ##### FUNCTION g_queue_insert_before ##### --> <!-- ##### FUNCTION g_queue_insert_before ##### -->

View File

@ -96,8 +96,7 @@ typedef struct _GRealArray GRealArray;
* @len: the number of elements in the #GArray not including the * @len: the number of elements in the #GArray not including the
* possible terminating zero element. * possible terminating zero element.
* *
* Contains the public fields of an <link * Contains the public fields of an <link linkend="glib-Arrays">Array</link>.
* linkend="glib-arrays">Array</link>.
**/ **/
struct _GRealArray struct _GRealArray
{ {

View File

@ -1061,8 +1061,8 @@ g_data_initialize (void)
* retrieve the other. * retrieve the other.
* *
* Quarks are used for both <link * Quarks are used for both <link
* linkend="glib-datasets">Datasets</link> and <link * linkend="glib-Datasets">Datasets</link> and <link
* linkend="glib-keyed-data-lists">Keyed Data Lists</link>. * linkend="glib-Keyed-Data-Lists">Keyed Data Lists</link>.
* *
* To create a new quark from a string, use g_quark_from_string() or * To create a new quark from a string, use g_quark_from_string() or
* g_quark_from_static_string(). * g_quark_from_static_string().

View File

@ -1316,8 +1316,8 @@ g_date_time_add_full (GDateTime *datetime,
* @dt1: first #GDateTime to compare * @dt1: first #GDateTime to compare
* @dt2: second #GDateTime to compare * @dt2: second #GDateTime to compare
* *
* #GCompareFunc-compatible comparison for #GDateTimes. * A comparison function for #GDateTimes that is suitable
* Both #GDateTimes must be non-%NULL. * as a #GCompareFunc. Both #GDateTimes must be non-%NULL.
* *
* Return value: -1, 0 or 1 if @dt1 is less than, equal to or greater * Return value: -1, 0 or 1 if @dt1 is less than, equal to or greater
* than @dt2. * than @dt2.

View File

@ -89,7 +89,7 @@
* increment or decrement the reference count respectively. When the * increment or decrement the reference count respectively. When the
* reference count falls to 0, the #GIOChannel is freed. (Though it * reference count falls to 0, the #GIOChannel is freed. (Though it
* isn't closed automatically, unless it was created using * 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. * g_io_add_watch_full() increments a channel's reference count.
* *
* The new functions g_io_channel_read_chars(), * The new functions g_io_channel_read_chars(),

View File

@ -198,7 +198,7 @@ g_unix_set_fd_nonblocking (gint fd,
* signal @signum. Currently only %SIGHUP, %SIGINT, and %SIGTERM can * signal @signum. Currently only %SIGHUP, %SIGINT, and %SIGTERM can
* be monitored. Note that unlike the UNIX default, all sources which * be monitored. Note that unlike the UNIX default, all sources which
* have created a watch will be dispatched, regardless of 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 * For example, an effective use of this function is to handle SIGTERM
* cleanly; flushing any outstanding files, and then calling * cleanly; flushing any outstanding files, and then calling

View File

@ -4190,7 +4190,7 @@ g_timeout_add_seconds_full (gint priority,
* This internally creates a main loop source using * This internally creates a main loop source using
* g_timeout_source_new_seconds() and attaches it to the main loop context * 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 * using g_source_attach(). You can do these steps manually if you need
* greater control. Also see g_timout_add_seconds_full(). * greater control. Also see g_timeout_add_seconds_full().
* *
* Note that the first call of the timer may not be precise for timeouts * 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, * of one second. If you need finer precision and have such a timeout,

View File

@ -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 * 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 * last access" to the @user_data provided to this function. In the
* case of error, the @user_data provided here is passed directly to * 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 * should not be called. In either case, if @user_data was allocated
* then it ought to be freed from both of these locations. * then it ought to be freed from both of these locations.
* *

View File

@ -724,7 +724,7 @@ g_queue_peek_nth_link (GQueue *queue,
/** /**
* g_queue_link_index: * g_queue_link_index:
* @queue: a #Gqueue * @queue: a #GQueue
* @link_: A #GList link * @link_: A #GList link
* *
* Returns the position of @link_ in @queue. * Returns the position of @link_ in @queue.

View File

@ -431,7 +431,7 @@ g_sequence_iter_compare (GSequenceIter *a,
/** /**
* g_sequence_append: * g_sequence_append:
* @seq: a #GSequencePointer * @seq: a #GSequence
* @data: the data for the new item * @data: the data for the new item
* *
* Adds a new item to the end of @seq. * Adds a new item to the end of @seq.
@ -649,14 +649,16 @@ g_sequence_move_range (GSequenceIter *dest,
/** /**
* g_sequence_sort: * g_sequence_sort:
* @seq: a #GSequence * @seq: a #GSequence
* @cmp_func: the #GCompareDataFunc used to sort @seq. This function is * @cmp_func: the function used to sort the sequence
* 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_data: user data passed to @cmp_func * @cmp_data: user data passed to @cmp_func
* *
* Sorts @seq using @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 * Since: 2.14
**/ **/
void void
@ -679,16 +681,17 @@ g_sequence_sort (GSequence *seq,
* g_sequence_insert_sorted: * g_sequence_insert_sorted:
* @seq: a #GSequence * @seq: a #GSequence
* @data: the data to insert * @data: the data to insert
* @cmp_func: the #GCompareDataFunc used to compare items in the sequence. It * @cmp_func: the function used to compare items in the sequence
* 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_data: user data passed to @cmp_func. * @cmp_data: user data passed to @cmp_func.
* *
* Inserts @data into @sequence using @func to determine the new position. * Inserts @data into @sequence using @func to determine the new
* The sequence must already be sorted according to @cmp_func; otherwise the * position. The sequence must already be sorted according to @cmp_func;
* new position of @data is undefined. * 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. * Return value: a #GSequenceIter pointing to the new item.
* *
@ -716,11 +719,7 @@ g_sequence_insert_sorted (GSequence *seq,
/** /**
* g_sequence_sort_changed: * g_sequence_sort_changed:
* @iter: A #GSequenceIter * @iter: A #GSequenceIter
* @cmp_func: the #GCompareDataFunc used to compare items in the sequence. It * @cmp_func: the function used to compare items in the sequence
* 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_data: user data passed to @cmp_func. * @cmp_data: user data passed to @cmp_func.
* *
* Moves the data pointed to a new position as indicated by @cmp_func. This * 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 * to @cmp_func whenever some aspect of an item changes so that @cmp_func
* may return different values for that item. * 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 * Since: 2.14
**/ **/
void void
@ -886,17 +890,18 @@ g_sequence_sort_iter (GSequence *seq,
/** /**
* g_sequence_sort_changed_iter: * g_sequence_sort_changed_iter:
* @iter: a #GSequenceIter * @iter: a #GSequenceIter
* @iter_cmp: the #GSequenceItercompare used to compare iterators in the * @iter_cmp: the function used to compare iterators in the sequence
* 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.
* @cmp_data: user data passed to @cmp_func * @cmp_data: user data passed to @cmp_func
* *
* Like g_sequence_sort_changed(), but uses * Like g_sequence_sort_changed(), but uses
* a #GSequenceIterCompareFunc instead of a #GCompareDataFunc as * a #GSequenceIterCompareFunc instead of a #GCompareDataFunc as
* the compare function. * 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 * Since: 2.14
**/ **/
void void
@ -948,17 +953,23 @@ g_sequence_sort_changed_iter (GSequenceIter *iter,
* g_sequence_insert_sorted_iter: * g_sequence_insert_sorted_iter:
* @seq: a #GSequence * @seq: a #GSequence
* @data: data for the new item * @data: data for the new item
* @iter_cmp: the #GSequenceItercompare used to compare iterators in the * @iter_cmp: the function used to compare iterators in the sequence
* 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.
* @cmp_data: user data passed to @cmp_func * @cmp_data: user data passed to @cmp_func
* *
* Like g_sequence_insert_sorted(), but uses * Like g_sequence_insert_sorted(), but uses
* a #GSequenceIterCompareFunc instead of a #GCompareDataFunc as * a #GSequenceIterCompareFunc instead of a #GCompareDataFunc as
* the compare function. * 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 * Return value: a #GSequenceIter pointing to the new item
* *
* Since: 2.14 * Since: 2.14
@ -1010,22 +1021,23 @@ g_sequence_insert_sorted_iter (GSequence *seq,
* g_sequence_search_iter: * g_sequence_search_iter:
* @seq: a #GSequence * @seq: a #GSequence
* @data: data for the new item * @data: data for the new item
* @iter_cmp: the #GSequenceIterCompare function used to compare iterators * @iter_cmp: the function used to compare iterators in the sequence
* 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.
* @cmp_data: user data passed to @iter_cmp * @cmp_data: user data passed to @iter_cmp
* *
* Like g_sequence_search(), but uses * Like g_sequence_search(), but uses a #GSequenceIterCompareFunc
* a #GSequenceIterCompareFunc instead of a #GCompareDataFunc as * instead of a #GCompareDataFunc as the compare function.
* 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, * If you are simply searching for an existing element of the sequence,
* consider using g_sequence_lookup_iter(). * consider using g_sequence_lookup_iter().
* *
* Return value: a #GSequenceIter pointing to the position in @seq * 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 * Since: 2.14
**/ **/
@ -1064,19 +1076,20 @@ g_sequence_search_iter (GSequence *seq,
* g_sequence_lookup_iter: * g_sequence_lookup_iter:
* @seq: a #GSequence * @seq: a #GSequence
* @data: data to lookup * @data: data to lookup
* @iter_cmp: the #GSequenceIterCompare function used to compare iterators * @iter_cmp: the function used to compare iterators in the sequence
* 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.
* @cmp_data: user data passed to @iter_cmp * @cmp_data: user data passed to @iter_cmp
* *
* Like g_sequence_lookup(), but uses * Like g_sequence_lookup(), but uses a #GSequenceIterCompareFunc
* a #GSequenceIterCompareFunc instead of a #GCompareDataFunc as * instead of a #GCompareDataFunc as the compare function.
* the compare function.
* *
* Return value: an #GSequenceIter pointing to the position of the first item * @iter_cmp is called with two iterators pointing into @seq.
* found equal to @data according to @cmp_func and @cmp_data. * 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.
* *
* Since: 2.28 * Since: 2.28
**/ **/

View File

@ -1003,23 +1003,23 @@ g_tree_traverse (GTree *tree,
/** /**
* g_tree_search: * g_tree_search:
* @tree: a #GTree. * @tree: a #GTree
* @search_func: a function used to search the #GTree. * @search_func: a function used to search the #GTree
* @user_data: the data passed as the second argument to the @search_func * @user_data: the data passed as the second argument to @search_func
* function.
* *
* Searches a #GTree using @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 @search_func is called with a pointer to the key of a key/value
* the tree, and the passed in @user_data. If @search_func returns 0 for a * pair in the tree, and the passed in @user_data. If @search_func returns
* key/value pair, then g_tree_search_func() will return the value of that * 0 for a key/value pair, then the corresponding value is returned as
* pair. If @search_func returns -1, searching will proceed among the * the result of g_tree_search(). If @search_func returns -1, searching
* key/value pairs that have a smaller key; if @search_func returns 1, * will proceed among the key/value pairs that have a smaller key; if
* searching will proceed among the key/value pairs that have a larger key. * @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 * Return value: the value corresponding to the found key, or %NULL if
* was not found. * the key was not found.
**/ */
gpointer gpointer
g_tree_search (GTree *tree, g_tree_search (GTree *tree,
GCompareFunc search_func, GCompareFunc search_func,