diff --git a/ChangeLog b/ChangeLog index d93454298..164b9e4d6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +2002-05-26 Matthias Clasen + + * glib/gmain.c: Remove references to nonexisting functions + g_source_set_callback_closure(), g_source_poll(), g_source_add() + from docs. + + * glib/gdir.c (g_dir_open): Typo fix in docs. + + * glib/gasyncqueue.c (g_async_queue_lock): + (g_async_queue_unref_and_unlock): Fix markup to avoid erroneous + s in docs. + + * glib/gwin32.c: Escape #'s leading to erroneous s in docs. + + * glib/gtree.c: Replace some occurances of Gtree by GTree in docs. + + * glib/gstring.c (g_string_insert_unichar): Typo fix in docs. + 2002-05-23 Havoc Pennington * glib/gspawn.c (fork_exec_with_pipes): on success, close the diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index d93454298..164b9e4d6 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,21 @@ +2002-05-26 Matthias Clasen + + * glib/gmain.c: Remove references to nonexisting functions + g_source_set_callback_closure(), g_source_poll(), g_source_add() + from docs. + + * glib/gdir.c (g_dir_open): Typo fix in docs. + + * glib/gasyncqueue.c (g_async_queue_lock): + (g_async_queue_unref_and_unlock): Fix markup to avoid erroneous + s in docs. + + * glib/gwin32.c: Escape #'s leading to erroneous s in docs. + + * glib/gtree.c: Replace some occurances of Gtree by GTree in docs. + + * glib/gstring.c (g_string_insert_unichar): Typo fix in docs. + 2002-05-23 Havoc Pennington * glib/gspawn.c (fork_exec_with_pipes): on success, close the diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index d93454298..164b9e4d6 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,21 @@ +2002-05-26 Matthias Clasen + + * glib/gmain.c: Remove references to nonexisting functions + g_source_set_callback_closure(), g_source_poll(), g_source_add() + from docs. + + * glib/gdir.c (g_dir_open): Typo fix in docs. + + * glib/gasyncqueue.c (g_async_queue_lock): + (g_async_queue_unref_and_unlock): Fix markup to avoid erroneous + s in docs. + + * glib/gwin32.c: Escape #'s leading to erroneous s in docs. + + * glib/gtree.c: Replace some occurances of Gtree by GTree in docs. + + * glib/gstring.c (g_string_insert_unichar): Typo fix in docs. + 2002-05-23 Havoc Pennington * glib/gspawn.c (fork_exec_with_pipes): on success, close the diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index d93454298..164b9e4d6 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,21 @@ +2002-05-26 Matthias Clasen + + * glib/gmain.c: Remove references to nonexisting functions + g_source_set_callback_closure(), g_source_poll(), g_source_add() + from docs. + + * glib/gdir.c (g_dir_open): Typo fix in docs. + + * glib/gasyncqueue.c (g_async_queue_lock): + (g_async_queue_unref_and_unlock): Fix markup to avoid erroneous + s in docs. + + * glib/gwin32.c: Escape #'s leading to erroneous s in docs. + + * glib/gtree.c: Replace some occurances of Gtree by GTree in docs. + + * glib/gstring.c (g_string_insert_unichar): Typo fix in docs. + 2002-05-23 Havoc Pennington * glib/gspawn.c (fork_exec_with_pipes): on success, close the diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index d93454298..164b9e4d6 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,21 @@ +2002-05-26 Matthias Clasen + + * glib/gmain.c: Remove references to nonexisting functions + g_source_set_callback_closure(), g_source_poll(), g_source_add() + from docs. + + * glib/gdir.c (g_dir_open): Typo fix in docs. + + * glib/gasyncqueue.c (g_async_queue_lock): + (g_async_queue_unref_and_unlock): Fix markup to avoid erroneous + s in docs. + + * glib/gwin32.c: Escape #'s leading to erroneous s in docs. + + * glib/gtree.c: Replace some occurances of Gtree by GTree in docs. + + * glib/gstring.c (g_string_insert_unichar): Typo fix in docs. + 2002-05-23 Havoc Pennington * glib/gspawn.c (fork_exec_with_pipes): on success, close the diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index d93454298..164b9e4d6 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,21 @@ +2002-05-26 Matthias Clasen + + * glib/gmain.c: Remove references to nonexisting functions + g_source_set_callback_closure(), g_source_poll(), g_source_add() + from docs. + + * glib/gdir.c (g_dir_open): Typo fix in docs. + + * glib/gasyncqueue.c (g_async_queue_lock): + (g_async_queue_unref_and_unlock): Fix markup to avoid erroneous + s in docs. + + * glib/gwin32.c: Escape #'s leading to erroneous s in docs. + + * glib/gtree.c: Replace some occurances of Gtree by GTree in docs. + + * glib/gstring.c (g_string_insert_unichar): Typo fix in docs. + 2002-05-23 Havoc Pennington * glib/gspawn.c (fork_exec_with_pipes): on success, close the diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index d93454298..164b9e4d6 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,21 @@ +2002-05-26 Matthias Clasen + + * glib/gmain.c: Remove references to nonexisting functions + g_source_set_callback_closure(), g_source_poll(), g_source_add() + from docs. + + * glib/gdir.c (g_dir_open): Typo fix in docs. + + * glib/gasyncqueue.c (g_async_queue_lock): + (g_async_queue_unref_and_unlock): Fix markup to avoid erroneous + s in docs. + + * glib/gwin32.c: Escape #'s leading to erroneous s in docs. + + * glib/gtree.c: Replace some occurances of Gtree by GTree in docs. + + * glib/gstring.c (g_string_insert_unichar): Typo fix in docs. + 2002-05-23 Havoc Pennington * glib/gspawn.c (fork_exec_with_pipes): on success, close the diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog index 2d5f4f761..5559e23e4 100644 --- a/docs/reference/ChangeLog +++ b/docs/reference/ChangeLog @@ -1,3 +1,26 @@ +2002-05-26 Matthias Clasen + + * glib/tmpl/conversions.sgml: Add GIConv. + + * glib/tmpl/main.sgml: Fix references to nonexisting functions + g_main_loop_destroy(), g_source_add(), g_source_connect(). + + + * glib/glib-sections.txt: Add GIConv, g_str_has_prefix, g_str_has_suffix. + + * glib/tmpl/linked_lists_single.sgml: + * glib/tmpl/linked_lists_double.sgml: GListAllocator doesn't exist. + + * glib/glib-docs.sgml: Declare hash entity. + + * glib/tmpl/macros.sgml: Escape # in #ifdef to suppress erroneous links. + +2002-05-25 Matthias Clasen + + * gobject/Makefile.am, gobject/gobject-docs.sgml, gobject/tmpl/*: + * glib/Makefile.am, glib/glib-docs.sgml, glib/tmpl/*: Produce XML, + not SGML. + 2002-05-21 Matthias Clasen * glib/tmpl/markup.sgml: Updates. diff --git a/docs/reference/glib/Makefile.am b/docs/reference/glib/Makefile.am index e44a3c266..35a1f3046 100644 --- a/docs/reference/glib/Makefile.am +++ b/docs/reference/glib/Makefile.am @@ -13,7 +13,7 @@ DOC_SOURCE_DIR=../../.. SCAN_OPTIONS=--deprecated-guards="G_DISABLE_DEPRECATED" # Extra options to supply to gtkdoc-mkdb -MKDB_OPTIONS=--sgml-mode +MKDB_OPTIONS=--sgml-mode --output-format=xml # Extra options to supply to gtkdoc-fixref FIXXREF_OPTIONS= diff --git a/docs/reference/glib/glib-docs.sgml b/docs/reference/glib/glib-docs.sgml index 1e8dd2e0b..444d61e04 100644 --- a/docs/reference/glib/glib-docs.sgml +++ b/docs/reference/glib/glib-docs.sgml @@ -1,62 +1,66 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + ]> diff --git a/docs/reference/glib/glib-sections.txt b/docs/reference/glib/glib-sections.txt index 414981d2e..a1c33a272 100644 --- a/docs/reference/glib/glib-sections.txt +++ b/docs/reference/glib/glib-sections.txt @@ -881,6 +881,8 @@ g_stpcpy g_strstr_len g_strrstr g_strrstr_len +g_str_has_prefix +g_str_has_suffix g_strlcpy @@ -1825,6 +1827,7 @@ g_random_double_range conversions g_convert g_convert_with_fallback +GIConv g_convert_with_iconv G_CONVERT_ERROR g_iconv_open diff --git a/docs/reference/glib/tmpl/arrays.sgml b/docs/reference/glib/tmpl/arrays.sgml index c5c5e2a70..3f360e141 100644 --- a/docs/reference/glib/tmpl/arrays.sgml +++ b/docs/reference/glib/tmpl/arrays.sgml @@ -39,10 +39,10 @@ To free an array, use g_array_free(). /* We create a new array to store gint values. We don't want it zero-terminated or cleared to 0's. */ garray = g_array_new (FALSE, FALSE, sizeof (gint)); - for (i = 0; i < 10000; i++) + for (i = 0; i < 10000; i++) g_array_append_val (garray, i); - for (i = 0; i < 10000; i++) + for (i = 0; i < 10000; i++) if (g_array_index (garray, gint, i) != i) g_print ("ERROR: got %d instead of %d\n", g_array_index (garray, gint, i), i); diff --git a/docs/reference/glib/tmpl/arrays_byte.sgml b/docs/reference/glib/tmpl/arrays_byte.sgml index 5a0c76473..dedb301e8 100644 --- a/docs/reference/glib/tmpl/arrays_byte.sgml +++ b/docs/reference/glib/tmpl/arrays_byte.sgml @@ -30,10 +30,10 @@ To free a #GByteArray, use g_byte_array_free(). gint i; gbarray = g_byte_array_new (); - for (i = 0; i < 10000; i++) + for (i = 0; i < 10000; i++) g_byte_array_append (gbarray, (guint8*) "abcd", 4); - for (i = 0; i < 10000; i++) + for (i = 0; i < 10000; i++) { g_assert (gbarray->data[4*i] == 'a'); g_assert (gbarray->data[4*i+1] == 'b'); diff --git a/docs/reference/glib/tmpl/error_reporting.sgml b/docs/reference/glib/tmpl/error_reporting.sgml index f3e297160..5c1192b55 100644 --- a/docs/reference/glib/tmpl/error_reporting.sgml +++ b/docs/reference/glib/tmpl/error_reporting.sgml @@ -47,7 +47,7 @@ point to a location where an error can be placed. For example: gchar *contents; GError *err = NULL; contents = g_file_get_contents ("foo.txt", &err); -g_assert ((contents == NULL && err != NULL) || (contents != NULL && err == NULL)); +g_assert ((contents == NULL && err != NULL) || (contents != NULL && err == NULL)); if (err != NULL) { /* Report error to user, and free error */ @@ -110,7 +110,7 @@ foo_open_file (GError **error) fd = open ("file.txt", O_RDONLY); - if (fd < 0) + if (fd < 0) { g_set_error (error, FOO_ERROR, /* error domain */ diff --git a/docs/reference/glib/tmpl/glib-unused.sgml b/docs/reference/glib/tmpl/glib-unused.sgml index 381e81cfe..098c4c2a9 100644 --- a/docs/reference/glib/tmpl/glib-unused.sgml +++ b/docs/reference/glib/tmpl/glib-unused.sgml @@ -66,6 +66,14 @@ Specifies the type of function passed to g_set_error_handler(). @hook_list: @hook: + + +The GIConv struct wraps an +iconv() conversion descriptor. It contains private data +and should only be accessed using the following functions. + + + diff --git a/docs/reference/glib/tmpl/hooks.sgml b/docs/reference/glib/tmpl/hooks.sgml index f46e91e69..677bf5ae2 100644 --- a/docs/reference/glib/tmpl/hooks.sgml +++ b/docs/reference/glib/tmpl/hooks.sgml @@ -218,7 +218,7 @@ g_hook_insert_sorted(). @new_hook: the #GHook being inserted. @sibling: the #GHook to compare with @new_hook. -@Returns: a value <= 0 if @new_hook should be before @sibling. +@Returns: a value <= 0 if @new_hook should be before @sibling. @@ -229,7 +229,7 @@ if the second id is greater than the first. @new_hook: a #GHook. @sibling: a #GHook to compare with @new_hook. -@Returns: a value <= 0 if the id of @sibling is >= the id of @new_hook. +@Returns: a value <= 0 if the id of @sibling is >= the id of @new_hook. @@ -357,7 +357,7 @@ Returns the flags of a hook. The position of the first bit which is not reserved for internal use be the #GHook implementation, i.e. -1 << G_HOOK_FLAG_USER_SHIFT is the first bit +1 << G_HOOK_FLAG_USER_SHIFT is the first bit which can be used for application-defined flags. diff --git a/docs/reference/glib/tmpl/linked_lists_double.sgml b/docs/reference/glib/tmpl/linked_lists_double.sgml index e55b62e1e..be76f7b29 100644 --- a/docs/reference/glib/tmpl/linked_lists_double.sgml +++ b/docs/reference/glib/tmpl/linked_lists_double.sgml @@ -25,7 +25,7 @@ of the or simply pointers to any type of data. -List elements are allocated in blocks using a #GListAllocator, which is +List elements are allocated in blocks using a #GAllocator, which is more efficient than allocating elements individually. @@ -216,7 +216,7 @@ the first node matching the given data. Frees all of the memory used by a #GList. -The freed elements are added to the #GListAllocator free list. +The freed elements are added to the #GAllocator free list. @@ -302,7 +302,7 @@ integer if the first value comes after the second. @a: a value. @b: a value to compare with. -@Returns: negative value if @a < @b; zero if @a = @b; positive value +@Returns: negative value if @a < @b; zero if @a = @b; positive value if @a > @b. @@ -328,7 +328,7 @@ integer if the first value comes after the second. @a: a value. @b: a value to compare with. @user_data: user data to pass to comparison function. -@Returns: negative value if @a < @b; zero if @a = @b; positive value +@Returns: negative value if @a < @b; zero if @a = @b; positive value if @a > @b. diff --git a/docs/reference/glib/tmpl/linked_lists_single.sgml b/docs/reference/glib/tmpl/linked_lists_single.sgml index a51ca847f..0c09e4f5e 100644 --- a/docs/reference/glib/tmpl/linked_lists_single.sgml +++ b/docs/reference/glib/tmpl/linked_lists_single.sgml @@ -25,7 +25,7 @@ of the or simply pointers to any type of data. -List elements are allocated in blocks using a #GListAllocator, which is +List elements are allocated in blocks using a #GAllocator, which is more efficient than allocating elements individually. @@ -224,7 +224,7 @@ the first node matching the given data. Frees all of the memory used by a #GSList. -The freed elements are added to the #GListAllocator free list. +The freed elements are added to the #GAllocator free list. @list: a #GSList. diff --git a/docs/reference/glib/tmpl/macros.sgml b/docs/reference/glib/tmpl/macros.sgml index 37a6fe7a5..6e3f12a5a 100644 --- a/docs/reference/glib/tmpl/macros.sgml +++ b/docs/reference/glib/tmpl/macros.sgml @@ -38,7 +38,7 @@ The micro version number of the GLib library. This macro is defined only on Windows. So you can bracket -Windows-specific code in "#ifdef G_OS_WIN32". +Windows-specific code in "&hash;ifdef G_OS_WIN32". @@ -46,7 +46,7 @@ Windows-specific code in "#ifdef G_OS_WIN32". This macro is defined only on BeOS. So you can bracket -BeOS-specific code in "#ifdef G_OS_BEOS". +BeOS-specific code in "&hash;ifdef G_OS_BEOS". @@ -54,7 +54,7 @@ BeOS-specific code in "#ifdef G_OS_BEOS". This macro is defined only on UNIX. So you can bracket -UNIX-specific code in "#ifdef G_OS_UNIX". +UNIX-specific code in "&hash;ifdef G_OS_UNIX". diff --git a/docs/reference/glib/tmpl/main.sgml b/docs/reference/glib/tmpl/main.sgml index aaf003314..44970ee07 100644 --- a/docs/reference/glib/tmpl/main.sgml +++ b/docs/reference/glib/tmpl/main.sgml @@ -10,7 +10,7 @@ manages all available sources of events. GLib and GTK+ applications. These events can come from any number of different types of sources such as file descriptors (plain files, pipes or sockets) and timeouts. New types of event sources can also - be added using g_source_add(). + be added using g_source_attach(). To allow multiple independent sets of sources to be handled in @@ -89,11 +89,11 @@ manages all available sources of events. The operation of these functions can best be seen in terms - of a state diagram, as shown in . + of a state diagram, as shown in .
States of a Main Context - +
@@ -184,7 +184,7 @@ very important since calling g_main_run() will set this to %TRUE anyway. Frees the memory allocated for the #GMainLoop. A compatibility macro, see -g_main_loop_destroy(). +g_main_loop_unref(). @loop: a #GMainLoop. @@ -587,8 +587,8 @@ g_main_context_set_poll_func() for full details. - - + + @@ -631,8 +631,8 @@ an event source. The #GSourceFuncs struct contains a table of functions used to handle event sources in a generic manner. - - + + @@ -664,7 +664,7 @@ called, so the source should be checked again here. Called to dispatch the event source, after it has returned %TRUE in either its @prepare or its @check function. The @dispatch function is passed in a callback function and data. The callback function may be -%NULL if the source was never connected using g_source_connect(). The +%NULL if the source was never connected using g_source_attach(). The @dispatch function should call the callback function with data and whatever additional parameters are needed for this type of event source. diff --git a/docs/reference/glib/tmpl/memory.sgml b/docs/reference/glib/tmpl/memory.sgml index 0510f159d..0c8f7c542 100644 --- a/docs/reference/glib/tmpl/memory.sgml +++ b/docs/reference/glib/tmpl/memory.sgml @@ -127,7 +127,7 @@ Allocates @size bytes on the stack; these bytes will be freed when the current stack frame is cleaned up. This macro essentially just wraps the alloca() function present on most UNIX variants. Thus it provides the same advantages and pitfalls as alloca(): - + + alloca() is very fast, as on most systems it's implemented by just adjusting the stack pointer register. @@ -153,7 +153,7 @@ Thus it provides the same advantages and pitfalls as alloca() - + diff --git a/docs/reference/glib/tmpl/memory_chunks.sgml b/docs/reference/glib/tmpl/memory_chunks.sgml index 1cddb705d..8336f86a5 100644 --- a/docs/reference/glib/tmpl/memory_chunks.sgml +++ b/docs/reference/glib/tmpl/memory_chunks.sgml @@ -68,18 +68,18 @@ To help debug memory chunks, use g_mem_chunk_info() and g_mem_chunk_print(). mem_chunk = g_mem_chunk_new ("test mem chunk", 50, 100, G_ALLOC_AND_FREE); /* Now allocate 10000 atoms. */ - for (i = 0; i < 10000; i++) + for (i = 0; i < 10000; i++) { mem[i] = g_chunk_new (gchar, mem_chunk); /* Fill in the atom memory with some junk. */ - for (j = 0; j < 50; j++) + for (j = 0; j < 50; j++) mem[i][j] = i * j; } /* Now free all of the atoms. Note that since we are going to destroy the GMemChunk, this wouldn't normally be used. */ - for (i = 0; i < 10000; i++) + for (i = 0; i < 10000; i++) { g_mem_chunk_free (mem_chunk, mem[i]); } diff --git a/docs/reference/glib/tmpl/string_utils.sgml b/docs/reference/glib/tmpl/string_utils.sgml index a0ff56e9c..0391d9bee 100644 --- a/docs/reference/glib/tmpl/string_utils.sgml +++ b/docs/reference/glib/tmpl/string_utils.sgml @@ -104,6 +104,26 @@ The returned string should be freed when no longer needed. @Returns: + + + + + +@str: +@prefix: +@Returns: + + + + + + + +@str: +@suffix: +@Returns: + + Portability wrapper that calls strlcpy() on systems which have it, and emulates @@ -562,8 +582,8 @@ how to replace it. @s1: a string. @s2: a string to compare with @s1. -@Returns: 0 if the strings match, a negative value if @s1 < @s2, or a positive -value if @s1 > @s2. +@Returns: 0 if the strings match, a negative value if @s1 < @s2, or a positive +value if @s1 > @s2. @@ -595,8 +615,8 @@ UTF-8. @s1: a string. @s2: a string to compare with @s1. @n: the maximum number of characters to compare. -@Returns: 0 if the strings match, a negative value if @s1 < @s2, or a positive -value if @s1 > @s2. +@Returns: 0 if the strings match, a negative value if @s1 < @s2, or a positive +value if @s1 > @s2. diff --git a/docs/reference/glib/tmpl/strings.sgml b/docs/reference/glib/tmpl/strings.sgml index 7df271b19..45daad7a0 100644 --- a/docs/reference/glib/tmpl/strings.sgml +++ b/docs/reference/glib/tmpl/strings.sgml @@ -73,8 +73,10 @@ you do not have to worry about having enough space to copy the string. @string: the destination #GString. Its current contents are destroyed. -@val: the string to copy into @string. +@rval: @Returns: the destination #GString. + +@val: the string to copy into @string. diff --git a/docs/reference/glib/tmpl/threads.sgml b/docs/reference/glib/tmpl/threads.sgml index 25601e2d2..09fc9d638 100644 --- a/docs/reference/glib/tmpl/threads.sgml +++ b/docs/reference/glib/tmpl/threads.sgml @@ -1022,7 +1022,7 @@ example: g_static_rw_lock_reader_lock (&rwlock); - if (index < array->len) + if (index < array->len) retval = g_ptr_array_index (array, index); g_static_rw_lock_reader_unlock (&rwlock); diff --git a/docs/reference/gobject/Makefile.am b/docs/reference/gobject/Makefile.am index 2462df3a3..c04bae3fb 100644 --- a/docs/reference/gobject/Makefile.am +++ b/docs/reference/gobject/Makefile.am @@ -13,7 +13,7 @@ DOC_SOURCE_DIR=../../../gobject SCAN_OPTIONS= # Extra options to supply to gtkdoc-mkdb -MKDB_OPTIONS= +MKDB_OPTIONS=--output-format=xml # Extra options to supply to gtkdoc-fixref FIXXREF_OPTIONS=--extra-dir=$(srcdir)/../glib/html diff --git a/docs/reference/gobject/gobject-docs.sgml b/docs/reference/gobject/gobject-docs.sgml index 7588b3e58..434be968d 100644 --- a/docs/reference/gobject/gobject-docs.sgml +++ b/docs/reference/gobject/gobject-docs.sgml @@ -1,17 +1,20 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + + + ]> diff --git a/docs/reference/gobject/tmpl/gclosure.sgml b/docs/reference/gobject/tmpl/gclosure.sgml index e375ce6d0..42774bec1 100644 --- a/docs/reference/gobject/tmpl/gclosure.sgml +++ b/docs/reference/gobject/tmpl/gclosure.sgml @@ -175,7 +175,7 @@ When closures are newly created, they get an initial reference count of 1, eventhough no caller has yet invoked g_closure_ref() on the @closure. Code entities that store closures for notification purposes are supposed to call this function, for example like this: - + static GClosure *notify_closure = NULL; void foo_notify_set_closure (GClosure *closure) @@ -189,7 +189,7 @@ foo_notify_set_closure (GClosure *closure) g_closure_sink (notify_closure); } } - + Because g_closure_sink() may decrement the reference count of a closure (if it hasn't been called on @closure yet) just like g_closure_unref(), g_closure_ref() should be called prior to this function. diff --git a/docs/reference/gobject/tmpl/gtype.sgml b/docs/reference/gobject/tmpl/gtype.sgml index d155927b7..092b1f1e0 100644 --- a/docs/reference/gobject/tmpl/gtype.sgml +++ b/docs/reference/gobject/tmpl/gtype.sgml @@ -235,22 +235,22 @@ to serve as a container for values of a type. old contents. E.g. for the implementation of a string value that may never be %NULL, the implementation might look like: - + { value->data[0].v_pointer = g_strdup (""); } - + @value_free: Free any old contents that might be left in the data array of the passed in @value. No resources may remain allocated through the #GValue contents after this function returns. E.g. for our above string type: - + { /* only free strings without a specific flag for static storage */ - if (!(value->data[1].v_uint & G_VALUE_NOCOPY_CONTENTS)) + if (!(value->data[1].v_uint & G_VALUE_NOCOPY_CONTENTS)) g_free (value->data[0].v_pointer); } - + @value_copy: @dest_value is a #GValue with zero-filled data section and @src_value is a properly setup #GValue of same or derived type. @@ -258,24 +258,24 @@ to serve as a container for values of a type. @src_value into @dest_value in a way, that even after @src_value has been freed, the contents of @dest_value remain valid. String type example: - + { dest_value->data[0].v_pointer = g_strdup (src_value->data[0].v_pointer); } - + @value_peek_pointer: If the value contents fit into a pointer, such as objects or strings, return this pointer, so the caller can peek at the current contents. To extend on our above string example: - + { return value->data[0].v_pointer; } - + @collect_format: A string format describing how to collect the contents of this value, bit-by-bit. Each character in the format represents an argument to be collected, the characters themselves indicate the type of the argument. Currently supported arguments are: - + 'i' - Integers. passed as collect_values[].v_int. @@ -288,7 +288,7 @@ to serve as a container for values of a type. 'p' - Pointers. passed as collect_values[].v_pointer. - + It should be noted, that for variable argument list construction, ANSI C promotes every type smaller than an integer to an int, and floats to doubles. So for collection of short int or char, 'i' @@ -313,11 +313,11 @@ to serve as a container for values of a type. Thus an extra copy of the contents stored in @collect_values is not required for assignment to @value. For our above string example, we continue with: - + { if (!collect_values[0].v_pointer) value->data[0].v_pointer = g_strdup (""); - else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) + else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { value->data[0].v_pointer = collect_values[0].v_pointer; /* keep a flag for the value_free() implementation to not free this string */ @@ -328,7 +328,7 @@ to serve as a container for values of a type. return NULL; } - + It should be noted, that it is generally a bad idea to follow the #G_VALUE_NOCOPY_CONTENTS hint for reference counted types. Due to reentrancy requirements and reference count assertions performed @@ -336,7 +336,7 @@ to serve as a container for values of a type. for reference counted contents stored in the value->data array. To deviate from our string example for a moment, and taking a look at an exemplary implementation for collect_value() of #GObject: - + { if (collect_values[0].v_pointer) { @@ -349,7 +349,7 @@ to serve as a container for values of a type. else return g_strdup_printf ("Object passed as invalid NULL pointer"); } - + The reference count for valid objects is always incremented, regardless of @collect_flags. For invalid objects, the example returns a newly allocated string without altering @value. @@ -378,23 +378,23 @@ to serve as a container for values of a type. Similar to collect_value() the function may prematurely abort by returning a newly allocated string describing an error condition. To complete the string example: - + { gchar **string_p = collect_values[0].v_pointer; if (!string_p) return g_strdup_printf ("string location passed as NULL"); - if (collect_flags & G_VALUE_NOCOPY_CONTENTS) + if (collect_flags & G_VALUE_NOCOPY_CONTENTS) *string_p = value->data[0].v_pointer; else *string_p = g_strdup (value->data[0].v_pointer); } - + And an exemplary version of lcopy_value() for reference-counted types: - + { GObject **object_p = collect_values[0].v_pointer; @@ -402,13 +402,13 @@ to serve as a container for values of a type. return g_strdup_printf ("object location passed as NULL"); if (!value->data[0].v_pointer) *object_p = NULL; - else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) /* always honour */ + else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) /* always honour */ *object_p = value->data[0].v_pointer; else *object_p = g_object_ref (value->data[0].v_pointer); return NULL; } - + @@ -676,9 +676,9 @@ a reference count on their parent classes as long as they are instantiated, the returned class will always exist. This function is essentially equivalent to: - + g_type_class_peek (g_type_parent (G_TYPE_FROM_CLASS (g_class))); - + @@ -832,7 +832,7 @@ is performed for class initialization of derived types as well. An example may help to correspond the intend of the different class initializers: - + typedef struct { GObjectClass parent_class; gint static_integer; @@ -874,7 +874,7 @@ type_b_class_init (TypeBClass *class) { class->static_float = 3.14159265358979323846; } - + Initialization of TypeBClass will first cause initialization of TypeAClass (derived classes reference their parent classes, see g_type_class_ref() on this). diff --git a/docs/reference/gobject/tmpl/objects.sgml b/docs/reference/gobject/tmpl/objects.sgml index 73e11c4fa..29ec9ad6f 100644 --- a/docs/reference/gobject/tmpl/objects.sgml +++ b/docs/reference/gobject/tmpl/objects.sgml @@ -440,7 +440,7 @@ without invoking it's destroy() function (if any was set). Usually, calling this function is only required to update user data pointers with a destroy notifier, for example: - + void object_add_to_user_list (GObject *object, const gchar *new_string) @@ -464,7 +464,7 @@ free_string_list (gpointer data) g_free (node->data); g_list_free (list); } - + Using g_object_get_qdata() in the above example, instead of g_object_steal_qdata() would have left the destroy function set, and thus the partial string list would have been freed upon g_object_set_qdata_full(). diff --git a/docs/reference/gobject/tmpl/signals.sgml b/docs/reference/gobject/tmpl/signals.sgml index 46fe5a29c..408a8c28d 100644 --- a/docs/reference/gobject/tmpl/signals.sgml +++ b/docs/reference/gobject/tmpl/signals.sgml @@ -180,11 +180,11 @@ filled in by the g_signal_query() function. @n_params: The number of parameters that user callbacks take. @param_types: The individual parameter types for user callbacks, note that the effective callback signature is: - + @return_type callback (#gpointer data1, [#param_types param_names,] #gpointer data2); - + diff --git a/docs/reference/gobject/tmpl/value_arrays.sgml b/docs/reference/gobject/tmpl/value_arrays.sgml index a1d9f8d0d..b9e6219b6 100644 --- a/docs/reference/gobject/tmpl/value_arrays.sgml +++ b/docs/reference/gobject/tmpl/value_arrays.sgml @@ -88,7 +88,7 @@ Insert a copy of @value at specified position into @value_array. @value_array: #GValueArray to add an element to -@index: insertion position, must be <= value_array->n_values +@index: insertion position, must be <= value_array->n_values @value: #GValue to copy into #GValueArray @Returns: the #GValueArray passed in as @value_array @@ -99,7 +99,7 @@ Remove the value at position @index from @value_array.
@value_array: #GValueArray to remove an element from -@index: position of value to remove, must be < value_array->n_values +@index: position of value to remove, must be < value_array->n_values @Returns: the #GValueArray passed in as @value_array diff --git a/glib/gasyncqueue.c b/glib/gasyncqueue.c index 2da05e7a5..d9e6489cd 100644 --- a/glib/gasyncqueue.c +++ b/glib/gasyncqueue.c @@ -97,7 +97,7 @@ g_async_queue_ref_unlocked (GAsyncQueue *queue) * destroyed and the memory allocated will be freed. So you are not * allowed to use the @queue afterwards, as it might have disappeared. * The obvious asymmetry (it is not named - * g_async_queue_unref_unlocked()) is because the queue can't be + * g_async_queue_unref_unlocked()) is because the queue can't be * unlocked after unreffing it, as it might already have disappeared. **/ void @@ -146,7 +146,7 @@ g_async_queue_unref (GAsyncQueue *queue) * @queue: a #GAsyncQueue. * * Acquires the @queue's lock. After that you can only call the - * g_async_queue_*_unlocked() function variants on that + * g_async_queue_*_unlocked() function variants on that * @queue. Otherwise it will deadlock. **/ void diff --git a/glib/gdir.c b/glib/gdir.c index 63b0f6ec6..1fa3644b8 100644 --- a/glib/gdir.c +++ b/glib/gdir.c @@ -51,7 +51,7 @@ struct _GDir * * Opens a directory for reading. The names of the files * in the directory can then be retrieved using - * g_dir_get_name(). + * g_dir_read_name(). * * Return value: a newly allocated #GDir on success, %NULL on failure. * If non-%NULL, you must free the result with g_dir_close() diff --git a/glib/gmain.c b/glib/gmain.c index 663a90106..3c7c9f22e 100644 --- a/glib/gmain.c +++ b/glib/gmain.c @@ -695,7 +695,7 @@ g_main_context_default (void) * sizeof (GSource). * * The source will not initially be associated with any #GMainContext - * and must be added to one with g_source_add() before it will be + * and must be added to one with g_source_attach() before it will be * executed. * * Return value: the newly-created #GSource. @@ -965,7 +965,7 @@ g_source_add_poll (GSource *source, /** * g_source_remove_poll: * @source:a #GSource - * @fd: a #GPollFD structure previously passed to g_source_poll(). + * @fd: a #GPollFD structure previously passed to g_source_add_poll(). * * Removes a file descriptor from the set of file descriptors polled for * this source. @@ -1002,8 +1002,8 @@ g_source_remove_poll (GSource *source, * and getting the callback and data * * Sets the callback function storing the data as a refcounted callback - * "object". This is used to implement g_source_set_callback_closure() - * and internally. Note that calling g_source_set_callback_indirect() assumes + * "object". This is used internally. Note that calling + * g_source_set_callback_indirect() assumes * an initial reference count on @callback_data, and thus * @callback_funcs->unref will eventually be called once more * than @callback_funcs->ref. diff --git a/glib/gstring.c b/glib/gstring.c index 817140e2d..aab4f1f83 100644 --- a/glib/gstring.c +++ b/glib/gstring.c @@ -555,7 +555,7 @@ g_string_insert_c (GString *string, /** * g_string_insert_unichar: - * @string: a #Gstring + * @string: a #GString * @pos: the position at which to insert character, or -1 to * append at the end of the string. * @wc: a Unicode character diff --git a/glib/gtree.c b/glib/gtree.c index 2e0351fb0..91524d42f 100644 --- a/glib/gtree.c +++ b/glib/gtree.c @@ -271,7 +271,7 @@ g_tree_destroy (GTree *tree) /** * g_tree_insert: - * @tree: a #Gtree. + * @tree: a #GTree. * @key: the key to insert. * @value: the value corresponding to the key. * @@ -302,7 +302,7 @@ g_tree_insert (GTree *tree, /** * g_tree_replace: - * @tree: a #Gtree. + * @tree: a #GTree. * @key: the key to insert. * @value: the value corresponding to the key. * @@ -334,7 +334,7 @@ g_tree_replace (GTree *tree, /** * g_tree_remove: - * @tree: a #Gtree. + * @tree: a #GTree. * @key: the key to remove. * * Removes a key/value pair from a #GTree. @@ -354,7 +354,7 @@ g_tree_remove (GTree *tree, /** * g_tree_steal: - * @tree: a #Gtree. + * @tree: a #GTree. * @key: the key to remove. * * Removes a key and its associated value from a #GTree without calling diff --git a/glib/gwin32.c b/glib/gwin32.c index 2f977857c..16a645efa 100644 --- a/glib/gwin32.c +++ b/glib/gwin32.c @@ -632,8 +632,8 @@ get_package_directory_from_module (gchar *module_name) * is the same identifier as used for * GETTEXT_PACKAGE in software configured according * to GNU standards. The function first looks in the Windows Registry - * for the value #InstallationDirectory in the key - * #HKLM\Software\@package, and if that value + * for the value &hash;InstallationDirectory in the key + * &hash;HKLM\Software\@package, and if that value * exists and is a string, returns that. * * If @package is %NULL, or the above value isn't found in the