From 46d22e511a29987f416e57d57950d609859288e7 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 19 Mar 2007 03:47:05 +0000 Subject: [PATCH] Cleanups svn path=/trunk/; revision=5428 --- docs/reference/ChangeLog | 12 ++++++ docs/reference/glib/tmpl/glib-unused.sgml | 2 +- docs/reference/glib/tmpl/gregex.sgml | 4 +- docs/reference/glib/tmpl/memory.sgml | 29 +++++++------- docs/reference/glib/tmpl/memory_slices.sgml | 13 ++++--- docs/reference/glib/tmpl/modules.sgml | 4 +- docs/reference/glib/tmpl/patterns.sgml | 2 +- docs/reference/glib/tmpl/spawn.sgml | 43 ++++++++++----------- docs/reference/glib/tmpl/string_chunks.sgml | 7 ++-- docs/reference/glib/tmpl/string_utils.sgml | 4 +- docs/reference/glib/tmpl/strings.sgml | 19 +++------ docs/reference/glib/tmpl/thread_pools.sgml | 4 +- docs/reference/glib/tmpl/threads.sgml | 4 +- docs/reference/glib/tmpl/trees-nary.sgml | 24 +++++------- docs/reference/glib/tmpl/warnings.sgml | 6 +-- docs/reference/glib/tmpl/windows.sgml | 7 ++-- 16 files changed, 91 insertions(+), 93 deletions(-) diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog index 9ea4cbbaf..9e286d467 100644 --- a/docs/reference/ChangeLog +++ b/docs/reference/ChangeLog @@ -1,3 +1,15 @@ +2007-03-18 Matthias Clasen + + * glib/tmpl/thread_pools.sgml: + * glib/tmpl/strings.sgml: + * glib/tmpl/string_chunks.sgml: + * glib/tmpl/spawn.sgml: + * glib/tmpl/patterns.sgml: + * glib/tmpl/modules.sgml: + * glib/tmpl/memory_slices.sgml: + * glib/tmpl/memory.sgml: + * glib/tmpl/gregex.sgml: Trivial cleanups + 2007-03-16 Matthias Clasen * === Released 2.13.0 === diff --git a/docs/reference/glib/tmpl/glib-unused.sgml b/docs/reference/glib/tmpl/glib-unused.sgml index ab408f5e9..89e6e65db 100644 --- a/docs/reference/glib/tmpl/glib-unused.sgml +++ b/docs/reference/glib/tmpl/glib-unused.sgml @@ -280,7 +280,7 @@ in any UNIX manual. -Provided for UNIX emulation on Windows; see documentation for ftruncate() +Provided for UNIX emulation on Windows; see documentation for ftruncate() in any UNIX manual. diff --git a/docs/reference/glib/tmpl/gregex.sgml b/docs/reference/glib/tmpl/gregex.sgml index 222a30b8c..e1577c2a6 100644 --- a/docs/reference/glib/tmpl/gregex.sgml +++ b/docs/reference/glib/tmpl/gregex.sgml @@ -80,8 +80,8 @@ written by Philip Hazel. Error codes returned by regular expressions functions. -@G_REGEX_ERROR_COMPILE: Compilation of the regular expression in g_regex_new() failed. -@G_REGEX_ERROR_OPTIMIZE: Optimization of the regular expression in g_regex_optimize() failed. +@G_REGEX_ERROR_COMPILE: Compilation of the regular expression in g_regex_new() failed. +@G_REGEX_ERROR_OPTIMIZE: Optimization of the regular expression in g_regex_optimize() failed. @G_REGEX_ERROR_REPLACE: Replacement failed due to an ill-formed replacement string. @G_REGEX_ERROR_MATCH: The match process failed. @Since: 2.14 diff --git a/docs/reference/glib/tmpl/memory.sgml b/docs/reference/glib/tmpl/memory.sgml index b8020e0b6..622e05598 100644 --- a/docs/reference/glib/tmpl/memory.sgml +++ b/docs/reference/glib/tmpl/memory.sgml @@ -199,32 +199,32 @@ includes the key gc-friendly. 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(): +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 + + alloca() is very fast, as on most systems it's implemented by just adjusting the stack pointer register. - + It doesn't cause any memory fragmentation, within its scope, separate alloca() + + It doesn't cause any memory fragmentation, within its scope, separate alloca() blocks just build up and are released together at function end. - Allocation sizes have to fit into the current stack frame. For instance in a threaded environment on Linux, the per-thread stack size is limited to 2 Megabytes, - so be sparse with alloca() uses. + so be sparse with alloca() uses. - Allocation failure due to insufficient stack space is not indicated with a %NULL - return like e.g. with malloc(). Instead, most systems probably handle it the same + return like e.g. with malloc(). Instead, most systems probably handle it the same way as out of stack space situations from infinite function recursion, i.e. with a segmentation fault. - - Special care has to be taken when mixing alloca() with GNU C variable sized arrays. - Stack space allocated with alloca() in the same scope as a variable sized array + - Special care has to be taken when mixing alloca() with GNU C variable sized arrays. + Stack space allocated with alloca() in the same scope as a variable sized array will be freed together with the variable sized array upon exit of that scope, and not upon exit of the enclosing function scope. @@ -285,11 +285,12 @@ if it exists, should be prior to any use of GLib. Sets the #GMemVTable to use for memory allocation. You can use this to provide -custom memory allocation routines. This function must be called before using any other GLib functions. The @vtable only needs to provide malloc(), realloc(), and free() -functions; GLib can provide default implementations of the others. The malloc() -and realloc() implementations should return %NULL on failure, GLib will handle -error-checking for you. @vtable is copied, so need not persist after this -function has been called. +custom memory allocation routines. This function must be called +before using any other GLib functions. The @vtable only needs to +provide malloc(), realloc(), and free() functions; GLib can provide default +implementations of the others. The malloc() and realloc() implementations +should return %NULL on failure, GLib will handle error-checking for you. +@vtable is copied, so need not persist after this function has been called. @vtable: table of memory allocation routines. diff --git a/docs/reference/glib/tmpl/memory_slices.sgml b/docs/reference/glib/tmpl/memory_slices.sgml index b5e883d22..372192c51 100644 --- a/docs/reference/glib/tmpl/memory_slices.sgml +++ b/docs/reference/glib/tmpl/memory_slices.sgml @@ -96,7 +96,7 @@ object size used at allocation time is still available when freeing. Allocates a block of memory from the slice allocator. The block adress handed out is guaranteed to be aligned -to at least 2 * sizeof (void*). +to at least 2 * sizeof (void*). Note that the underlying slice allocation mechanism can be changed with the G_SLICE=always-malloc environment variable. @@ -157,8 +157,9 @@ also see G_SLICE for related debugging options. A convenience macro to allocate a block of memory from the slice allocator. -It calls g_slice_alloc() with sizeof (@type) and casts the returned pointer -to a pointer of the given type, avoiding a type cast in the source code. +It calls g_slice_alloc() with sizeof (@type) and casts +the returned pointer to a pointer of the given type, avoiding a type cast +in the source code. Note that the underlying slice allocation mechanism can be changed with the G_SLICE=always-malloc environment variable. @@ -172,9 +173,9 @@ environment variable. A convenience macro to allocate a block of memory from the slice allocator -and set the memory to 0. It calls g_slice_alloc0() with sizeof (@type) and -casts the returned pointer to a pointer of the given type, avoiding a type -cast in the source code. +and set the memory to 0. It calls g_slice_alloc0() with +sizeof (@type) and casts the returned pointer to a pointer +of the given type, avoiding a type cast in the source code. Note that the underlying slice allocation mechanism can be changed with the G_SLICE=always-malloc environment variable. diff --git a/docs/reference/glib/tmpl/modules.sgml b/docs/reference/glib/tmpl/modules.sgml index 19deefe0f..50d602a9e 100644 --- a/docs/reference/glib/tmpl/modules.sgml +++ b/docs/reference/glib/tmpl/modules.sgml @@ -9,8 +9,8 @@ portable method for dynamically loading 'plug-ins'. These functions provide a portable way to dynamically load object files (commonly known as 'plug-ins'). The current implementation supports all systems that provide -an implementation of dlopen() (e.g. Linux/Sun), as well as HP-UX via its -shl_load() mechanism, and Windows platforms via DLLs. +an implementation of dlopen() (e.g. Linux/Sun), as well as HP-UX via its +shl_load() mechanism, and Windows platforms via DLLs. diff --git a/docs/reference/glib/tmpl/patterns.sgml b/docs/reference/glib/tmpl/patterns.sgml index 48d6661fd..0ebd7940e 100644 --- a/docs/reference/glib/tmpl/patterns.sgml +++ b/docs/reference/glib/tmpl/patterns.sgml @@ -87,7 +87,7 @@ g_pattern_match(). Note also that the reverse of a UTF-8 encoded string can in general not be obtained by g_strreverse(). This works only if the string doesn't contain any multibyte characters. -Glib offers the g_utf_strreverse() function to reverse UTF-8 encoded strings. +Glib offers the g_utf8_strreverse() function to reverse UTF-8 encoded strings. @pspec: a #GPatternSpec. diff --git a/docs/reference/glib/tmpl/spawn.sgml b/docs/reference/glib/tmpl/spawn.sgml index ce57cdd5b..4dd647e5e 100644 --- a/docs/reference/glib/tmpl/spawn.sgml +++ b/docs/reference/glib/tmpl/spawn.sgml @@ -2,7 +2,7 @@ Spawning Processes -process launching with fork()/exec(). +process launching with fork()/exec(). @@ -25,22 +25,22 @@ Error codes returned by spawning processes. @G_SPAWN_ERROR_FORK: Fork failed due to lack of memory. @G_SPAWN_ERROR_READ: Read or select on pipes failed. @G_SPAWN_ERROR_CHDIR: Changing to working directory failed. -@G_SPAWN_ERROR_ACCES: execv() returned %EACCES. -@G_SPAWN_ERROR_PERM: execv() returned %EPERM. -@G_SPAWN_ERROR_2BIG: execv() returned %E2BIG. -@G_SPAWN_ERROR_NOEXEC: execv() returned %ENOEXEC. -@G_SPAWN_ERROR_NAMETOOLONG: execv() returned %ENAMETOOLONG. -@G_SPAWN_ERROR_NOENT: execv() returned %ENOENT. -@G_SPAWN_ERROR_NOMEM: execv() returned %ENOMEM. -@G_SPAWN_ERROR_NOTDIR: execv() returned %ENOTDIR. -@G_SPAWN_ERROR_LOOP: execv() returned %ELOOP. -@G_SPAWN_ERROR_TXTBUSY: execv() returned %ETXTBUSY. -@G_SPAWN_ERROR_IO: execv() returned %EIO. -@G_SPAWN_ERROR_NFILE: execv() returned %ENFILE. -@G_SPAWN_ERROR_MFILE: execv() returned %EMFILE. -@G_SPAWN_ERROR_INVAL: execv() returned %EINVAL. -@G_SPAWN_ERROR_ISDIR: execv() returned %EISDIR. -@G_SPAWN_ERROR_LIBBAD: execv() returned %ELIBBAD. +@G_SPAWN_ERROR_ACCES: execv() returned %EACCES. +@G_SPAWN_ERROR_PERM: execv() returned %EPERM. +@G_SPAWN_ERROR_2BIG: execv() returned %E2BIG. +@G_SPAWN_ERROR_NOEXEC: execv() returned %ENOEXEC. +@G_SPAWN_ERROR_NAMETOOLONG: execv() returned %ENAMETOOLONG. +@G_SPAWN_ERROR_NOENT: execv() returned %ENOENT. +@G_SPAWN_ERROR_NOMEM: execv() returned %ENOMEM. +@G_SPAWN_ERROR_NOTDIR: execv() returned %ENOTDIR. +@G_SPAWN_ERROR_LOOP: execv() returned %ELOOP. +@G_SPAWN_ERROR_TXTBUSY: execv() returned %ETXTBUSY. +@G_SPAWN_ERROR_IO: execv() returned %EIO. +@G_SPAWN_ERROR_NFILE: execv() returned %ENFILE. +@G_SPAWN_ERROR_MFILE: execv() returned %EMFILE. +@G_SPAWN_ERROR_INVAL: execv() returned %EINVAL. +@G_SPAWN_ERROR_ISDIR: execv() returned %EISDIR. +@G_SPAWN_ERROR_LIBBAD: execv() returned %ELIBBAD. @G_SPAWN_ERROR_FAILED: Some other fatal failure, error->message should explain. @@ -59,9 +59,9 @@ Flags passed to g_spawn_sync(), g_spawn_async() and g_spawn_async_with_pipes(). @G_SPAWN_LEAVE_DESCRIPTORS_OPEN: the parent's open file descriptors will be inherited by the child; otherwise all descriptors except stdin/stdout/stderr - will be closed before calling exec() in the child. + will be closed before calling exec() in the child. @G_SPAWN_DO_NOT_REAP_CHILD: the child will not be automatically reaped; you - must use g_child_watch_add() yourself (or call waitpid() + must use g_child_watch_add() yourself (or call waitpid() or handle SIGCHLD yourself), or the child will become a zombie. @G_SPAWN_SEARCH_PATH: argv[0] need not be an absolute path, it will be looked for in the user's PATH. @@ -82,9 +82,8 @@ Flags passed to g_spawn_sync(), g_spawn_async() and g_spawn_async_with_pipes(). Specifies the type of the setup function passed to g_spawn_async(), g_spawn_sync() and g_spawn_async_with_pipes(). On POSIX platforms it is called in the child after GLib has performed all the setup it plans -to perform but before calling exec(). On POSIX -actions taken in this function will thus only affect the child, not -the parent. +to perform but before calling exec(). On POSIX actions taken in this +function will thus only affect the child, not the parent. diff --git a/docs/reference/glib/tmpl/string_chunks.sgml b/docs/reference/glib/tmpl/string_chunks.sgml index 4b5e5a8f4..21307a63b 100644 --- a/docs/reference/glib/tmpl/string_chunks.sgml +++ b/docs/reference/glib/tmpl/string_chunks.sgml @@ -13,8 +13,8 @@ full a new block is allocated. When storing a large number of strings, string chunks are more efficient -than using g_strdup() since fewer calls to malloc() -are needed, and less memory is wasted in memory allocation overheads. +than using g_strdup() since fewer calls to malloc() are needed, and less +memory is wasted in memory allocation overheads. By adding strings with g_string_chunk_insert_const() it is also possible @@ -127,6 +127,5 @@ After calling g_string_chunk_free() it is not safe to access any of the strings which were contained within it. -@chunk: a #GStringChunk. - +@chunk: a #GStringChunk diff --git a/docs/reference/glib/tmpl/string_utils.sgml b/docs/reference/glib/tmpl/string_utils.sgml index d1d5717a3..326853c2b 100644 --- a/docs/reference/glib/tmpl/string_utils.sgml +++ b/docs/reference/glib/tmpl/string_utils.sgml @@ -303,7 +303,8 @@ returns the length of the allocated string. -Calculates the maximum space needed to store the output of the sprintf() function. +Calculates the maximum space needed to store the output of the sprintf() +function. @format: the format string. See the printf() documentation. @@ -936,4 +937,3 @@ documentation. If the signal is unknown, it returns "unknown signal (<signum>)". The string can only be used until the next call to g_strsignal(). - diff --git a/docs/reference/glib/tmpl/strings.sgml b/docs/reference/glib/tmpl/strings.sgml index eb4ebf4a4..8bfd7eeeb 100644 --- a/docs/reference/glib/tmpl/strings.sgml +++ b/docs/reference/glib/tmpl/strings.sgml @@ -22,19 +22,12 @@ can be used for binary data with embedded nul bytes. The #GString struct contains the public fields of a #GString. -The str field points to the character data. -It may move as text is added. -The len field contains the length of the string, -not including the terminating nul byte. - - -The str field is nul-terminated and so can be used as an ordinary C -string. But it may be moved when text is appended or inserted into the -string. -@str: -@len: +@str: points to the character data. It may move as text is added. +The str field is nul-terminated and so +can be used as an ordinary C string. +@len: contains the length of the string, not including the terminating nul byte. @allocated_len: @@ -309,8 +302,8 @@ Compares two strings for equality, returning %TRUE if they are equal. For use with #GHashTable. -@v: a #GString. -@v2: another #GString. +@v: a #GString +@v2: another #GString @Returns: %TRUE if they strings are the same length and contain the same bytes. diff --git a/docs/reference/glib/tmpl/thread_pools.sgml b/docs/reference/glib/tmpl/thread_pools.sgml index a2b429998..8336b2d66 100644 --- a/docs/reference/glib/tmpl/thread_pools.sgml +++ b/docs/reference/glib/tmpl/thread_pools.sgml @@ -6,9 +6,9 @@ pools of threads to execute work concurrently. -Sometimes you wish to asyncronously fork out the execution of work and +Sometimes you wish to asynchronously fork out the execution of work and continue working in your own thread. If that will happen often, the -overhead of starting and destroying a thread each time might be to +overhead of starting and destroying a thread each time might be too high. In such cases reusing already started threads seems like a good idea. And it indeed is, but implementing this can be tedious and error-prone. diff --git a/docs/reference/glib/tmpl/threads.sgml b/docs/reference/glib/tmpl/threads.sgml index 19a015de6..0eed7a740 100644 --- a/docs/reference/glib/tmpl/threads.sgml +++ b/docs/reference/glib/tmpl/threads.sgml @@ -960,7 +960,7 @@ functions increases the depth of @mutex and returns immediately. Tries to lock @mutex. If @mutex is already locked by another thread, it immediately returns %FALSE. Otherwise it locks @mutex and returns %TRUE. If @mutex is already locked by the calling thread, this -functions increases the depth of @mutex and immediately returns %TRUE. +functions increases the depth of @mutex and immediately returns %TRUE. @mutex: a #GStaticRecMutex to lock. @@ -1425,7 +1425,7 @@ done as follows: if (!current_number) { - current_number = g_new (int,1); + current_number = g_new (int, 1); *current_number = 0; g_private_set (current_number_key, current_number); } diff --git a/docs/reference/glib/tmpl/trees-nary.sgml b/docs/reference/glib/tmpl/trees-nary.sgml index f8b1e7881..17265cb62 100644 --- a/docs/reference/glib/tmpl/trees-nary.sgml +++ b/docs/reference/glib/tmpl/trees-nary.sgml @@ -56,22 +56,18 @@ g_node_destroy(). The GNode struct represents one node in a N-ary Tree. -The data field contains the actual data of the node. -The next and prev -fields point to the node's siblings (a sibling is another GNode with the -same parent). -The parent field points to the parent of the GNode, -or is %NULL if the GNode is the root of the tree. -The children field points to the first child of the -GNode. The other children are accessed by using the -next pointer of each child. +fields -@data: -@next: -@prev: -@parent: -@children: +@data: contains the actual data of the node. +@next: points to the node's next sibling (a sibling is another + GNode with the same parent). +@prev: points to the node's previous sibling. +@parent: points to the parent of the GNode, + or is %NULL if the GNode is the root of the tree. +@children: The children field points to the first + child of the GNode. The other children are accessed + by using the next pointer of each child. diff --git a/docs/reference/glib/tmpl/warnings.sgml b/docs/reference/glib/tmpl/warnings.sgml index 9db10dacf..110bc7186 100644 --- a/docs/reference/glib/tmpl/warnings.sgml +++ b/docs/reference/glib/tmpl/warnings.sgml @@ -30,8 +30,7 @@ Instead, libraries should use g_log(), or the convenience functions g_message(), g_warning() and g_error(). -@format: the message format. See the printf() -documentation. +@format: the message format. See the printf() documentation. @Varargs: the parameters to insert into the format string. @@ -67,8 +66,7 @@ g_printerr() should not be used from within libraries. Instead g_log() should be used, or the convenience functions g_message(), g_warning() and g_error(). -@format: the message format. See the printf() -documentation. +@format: the message format. See the printf() documentation. @Varargs: the parameters to insert into the format string. diff --git a/docs/reference/glib/tmpl/windows.sgml b/docs/reference/glib/tmpl/windows.sgml index 318f5f534..58119b3db 100644 --- a/docs/reference/glib/tmpl/windows.sgml +++ b/docs/reference/glib/tmpl/windows.sgml @@ -30,7 +30,7 @@ macro %MAXPATHLEN, which is the maximum length of a filename -Provided for UNIX emulation on Windows; see documentation for pipe() +Provided for UNIX emulation on Windows; see documentation for pipe() in any UNIX manual. @@ -94,9 +94,8 @@ in any UNIX manual. -On Windows, this macro defines a DllMain() function -that stores the actual DLL name that the code being compiled will be -included in. +On Windows, this macro defines a DllMain() function that stores the actual +DLL name that the code being compiled will be included in. On non-Windows platforms, expands to nothing.