From 6b8ab1206e35ea86aad55426f334fafc148e400e Mon Sep 17 00:00:00 2001 From: Soeren Sandmann Date: Sat, 12 Oct 2002 10:36:45 +0000 Subject: [PATCH] Documentation fixes: #71778, Owen Taylor; #85095, Bill Janssen, Owen Sat Oct 12 12:34:22 2002 Soeren Sandmann * glib/gtree.c (g_tree_search), glib/gspawn.c (g_spawn_async_with_pipes): Documentation fixes: #71778, Owen Taylor; #85095, Bill Janssen, Owen Taylor. --- ChangeLog | 8 ++++++++ ChangeLog.pre-2-10 | 8 ++++++++ ChangeLog.pre-2-12 | 8 ++++++++ ChangeLog.pre-2-2 | 8 ++++++++ ChangeLog.pre-2-4 | 8 ++++++++ ChangeLog.pre-2-6 | 8 ++++++++ ChangeLog.pre-2-8 | 8 ++++++++ glib/gspawn.c | 25 ++++++++++++++++++------- glib/gtree.c | 19 ++++++++----------- 9 files changed, 82 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index ed1f150..9161c67 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Sat Oct 12 12:34:22 2002 Soeren Sandmann + + * glib/gtree.c (g_tree_search), glib/gspawn.c + (g_spawn_async_with_pipes): + + Documentation fixes: #71778, Owen Taylor; #85095, Bill Janssen, + Owen Taylor. + Thu Oct 10 23:27:02 2002 Tim Janik * glib/gscanner.c (g_scanner_msg_handler): if input_name is NULL, diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index ed1f150..9161c67 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,11 @@ +Sat Oct 12 12:34:22 2002 Soeren Sandmann + + * glib/gtree.c (g_tree_search), glib/gspawn.c + (g_spawn_async_with_pipes): + + Documentation fixes: #71778, Owen Taylor; #85095, Bill Janssen, + Owen Taylor. + Thu Oct 10 23:27:02 2002 Tim Janik * glib/gscanner.c (g_scanner_msg_handler): if input_name is NULL, diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index ed1f150..9161c67 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,11 @@ +Sat Oct 12 12:34:22 2002 Soeren Sandmann + + * glib/gtree.c (g_tree_search), glib/gspawn.c + (g_spawn_async_with_pipes): + + Documentation fixes: #71778, Owen Taylor; #85095, Bill Janssen, + Owen Taylor. + Thu Oct 10 23:27:02 2002 Tim Janik * glib/gscanner.c (g_scanner_msg_handler): if input_name is NULL, diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index ed1f150..9161c67 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,11 @@ +Sat Oct 12 12:34:22 2002 Soeren Sandmann + + * glib/gtree.c (g_tree_search), glib/gspawn.c + (g_spawn_async_with_pipes): + + Documentation fixes: #71778, Owen Taylor; #85095, Bill Janssen, + Owen Taylor. + Thu Oct 10 23:27:02 2002 Tim Janik * glib/gscanner.c (g_scanner_msg_handler): if input_name is NULL, diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index ed1f150..9161c67 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,11 @@ +Sat Oct 12 12:34:22 2002 Soeren Sandmann + + * glib/gtree.c (g_tree_search), glib/gspawn.c + (g_spawn_async_with_pipes): + + Documentation fixes: #71778, Owen Taylor; #85095, Bill Janssen, + Owen Taylor. + Thu Oct 10 23:27:02 2002 Tim Janik * glib/gscanner.c (g_scanner_msg_handler): if input_name is NULL, diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index ed1f150..9161c67 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,11 @@ +Sat Oct 12 12:34:22 2002 Soeren Sandmann + + * glib/gtree.c (g_tree_search), glib/gspawn.c + (g_spawn_async_with_pipes): + + Documentation fixes: #71778, Owen Taylor; #85095, Bill Janssen, + Owen Taylor. + Thu Oct 10 23:27:02 2002 Tim Janik * glib/gscanner.c (g_scanner_msg_handler): if input_name is NULL, diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index ed1f150..9161c67 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,11 @@ +Sat Oct 12 12:34:22 2002 Soeren Sandmann + + * glib/gtree.c (g_tree_search), glib/gspawn.c + (g_spawn_async_with_pipes): + + Documentation fixes: #71778, Owen Taylor; #85095, Bill Janssen, + Owen Taylor. + Thu Oct 10 23:27:02 2002 Tim Janik * glib/gscanner.c (g_scanner_msg_handler): if input_name is NULL, diff --git a/glib/gspawn.c b/glib/gspawn.c index 3df45f4..e1eb2ab 100644 --- a/glib/gspawn.c +++ b/glib/gspawn.c @@ -447,13 +447,15 @@ g_spawn_sync (const gchar *working_directory, * calling exec() in the child. %G_SPAWN_SEARCH_PATH * means that argv[0] need not be an absolute path, it * will be looked for in the user's PATH. - * %G_SPAWN_STDOUT_TO_DEV_NULL means that the child's standad output will + * %G_SPAWN_STDOUT_TO_DEV_NULL means that the child's standard output will * be discarded, instead of going to the same location as the parent's - * standard output. + * standard output. If you use this flag, @standard_output must be %NULL. * %G_SPAWN_STDERR_TO_DEV_NULL means that the child's standard error - * will be discarded. %G_SPAWN_CHILD_INHERITS_STDIN means that - * the child will inherit the parent's standard input (by default, - * the child's standard input is attached to /dev/null). + * will be discarded, instead of going to the same location as the parent's + * standard error. If you use this flag, @standard_error must be %NULL. + * %G_SPAWN_CHILD_INHERITS_STDIN means that the child will inherit the parent's + * standard input (by default, the child's standard input is attached to + * /dev/null). If you use this flag, @standard_input must be %NULL. * %G_SPAWN_FILE_AND_ARGV_ZERO means that the first element of @argv is * the file to execute, while the remaining elements are the * actual argument vector to pass to the file. Normally @@ -477,8 +479,17 @@ g_spawn_sync (const gchar *working_directory, * locations will be filled with file descriptors for writing to the child's * standard input or reading from its standard output or standard error. * The caller of g_spawn_async_with_pipes() must close these file descriptors - * when they are no longer in use. If these parameters are %NULL, the - * corresponding pipe won't be created. + * when they are no longer in use. If these parameters are %NULL, the corresponding + * pipe won't be created. + * + * If @standard_input is NULL, the child's standard input is attached to /dev/null + * unless %G_SPAWN_CHILD_INHERITS_STDIN is set. + * + * If @standard_error is NULL, the child's standard error goes to the same location + * as the parent's standard error unless %G_SPAWN_STDERR_TO_DEV_NULL is set. + * + * If @standard_output is NULL, the child's standard output goes to the same location + * as the parent's standard output unless %G_SPAWN_STDOUT_TO_DEV_NULL is set. * * @error can be %NULL to ignore errors, or non-%NULL to report errors. * If an error is set, the function returns %FALSE. Errors diff --git a/glib/gtree.c b/glib/gtree.c index 91524d4..31e941a 100644 --- a/glib/gtree.c +++ b/glib/gtree.c @@ -511,23 +511,20 @@ g_tree_traverse (GTree *tree, /** * g_tree_search: * @tree: a #GTree. - * @search_func: the comparison 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 * function. * - * Searches a #GTree using an alternative form of the comparison function. + * Searches a #GTree using @search_func. * - * This function is not as useful as it sounds. - * It allows you to use a different function for performing the lookup of - * a key. However, since the tree is ordered according to the @key_compare_func - * function passed to g_tree_new(), the function you pass to g_tree_search() - * must return exactly the same value as would be returned by the comparison - * function, for each pair of tree nodes, or the search will not work. - * - * To search for a specific value, you can use g_tree_foreach(). + * 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. * * Return value: the value corresponding to the found key, or %NULL if the key - * is not found. + * was not found. **/ gpointer g_tree_search (GTree *tree, -- 2.7.4