From b3814b0cdc0fbf7f31086f01759bab6e3ca59cb5 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 30 Jul 2003 19:00:36 +0000 Subject: [PATCH] Small doc additions. --- ChangeLog | 1 + ChangeLog.pre-2-10 | 1 + ChangeLog.pre-2-12 | 1 + ChangeLog.pre-2-4 | 1 + ChangeLog.pre-2-6 | 1 + ChangeLog.pre-2-8 | 1 + docs/reference/ChangeLog | 2 ++ docs/reference/glib/tmpl/misc_utils.sgml | 26 ++++++++++++++++++++---- glib/gutils.c | 10 +++++++++ 9 files changed, 40 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 26b88750..95717e56 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 2003-07-30 Matthias Clasen * glib/gutils.c (g_unsetenv): Use same argument name as in header, to pacify gtk-doc. + (g_getenv): Move docs inline, add comment about lifespan of return value. * glib-2.0.pc.in (Libs): Remove forgotten @TRIO_LIBS@. (#118616, Noah Levitt) diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 26b88750..95717e56 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,6 +1,7 @@ 2003-07-30 Matthias Clasen * glib/gutils.c (g_unsetenv): Use same argument name as in header, to pacify gtk-doc. + (g_getenv): Move docs inline, add comment about lifespan of return value. * glib-2.0.pc.in (Libs): Remove forgotten @TRIO_LIBS@. (#118616, Noah Levitt) diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 26b88750..95717e56 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,6 +1,7 @@ 2003-07-30 Matthias Clasen * glib/gutils.c (g_unsetenv): Use same argument name as in header, to pacify gtk-doc. + (g_getenv): Move docs inline, add comment about lifespan of return value. * glib-2.0.pc.in (Libs): Remove forgotten @TRIO_LIBS@. (#118616, Noah Levitt) diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 26b88750..95717e56 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,6 +1,7 @@ 2003-07-30 Matthias Clasen * glib/gutils.c (g_unsetenv): Use same argument name as in header, to pacify gtk-doc. + (g_getenv): Move docs inline, add comment about lifespan of return value. * glib-2.0.pc.in (Libs): Remove forgotten @TRIO_LIBS@. (#118616, Noah Levitt) diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 26b88750..95717e56 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,6 +1,7 @@ 2003-07-30 Matthias Clasen * glib/gutils.c (g_unsetenv): Use same argument name as in header, to pacify gtk-doc. + (g_getenv): Move docs inline, add comment about lifespan of return value. * glib-2.0.pc.in (Libs): Remove forgotten @TRIO_LIBS@. (#118616, Noah Levitt) diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 26b88750..95717e56 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,6 +1,7 @@ 2003-07-30 Matthias Clasen * glib/gutils.c (g_unsetenv): Use same argument name as in header, to pacify gtk-doc. + (g_getenv): Move docs inline, add comment about lifespan of return value. * glib-2.0.pc.in (Libs): Remove forgotten @TRIO_LIBS@. (#118616, Noah Levitt) diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog index a2e9f909..6be1a2b3 100644 --- a/docs/reference/ChangeLog +++ b/docs/reference/ChangeLog @@ -1,5 +1,7 @@ 2003-07-30 Matthias Clasen + * glib/tmpl/misc_utils.sgml: Move g_getenv() docs inline. + * glib/tmpl/string_utils.sgml: Small fixes. * glib/glib-docs.sgml: Add paragraph about multi-threading policy. diff --git a/docs/reference/glib/tmpl/misc_utils.sgml b/docs/reference/glib/tmpl/misc_utils.sgml index 0553a9be..a7b07f22 100644 --- a/docs/reference/glib/tmpl/misc_utils.sgml +++ b/docs/reference/glib/tmpl/misc_utils.sgml @@ -54,12 +54,30 @@ reasons this function can only be called once. -Returns an environment variable. + + + +@variable: +@Returns: + + + + + + + +@variable: +@value: +@overwrite: +@Returns: + + + + + -@variable: the environment variable to get. -@Returns: the value of the environment variable, or %NULL if the environment -variable is not found. +@variable: diff --git a/glib/gutils.c b/glib/gutils.c index 86297934..1efd7542 100644 --- a/glib/gutils.c +++ b/glib/gutils.c @@ -609,6 +609,16 @@ g_get_current_dir (void) return dir; } +/** + * g_getenv: + * @variable: the environment variable to get. + * + * Returns an environment variable. + * + * Return value: the value of the environment variable, or %NULL if the environment + * variable is not found. The returned string may be overwritten by the next call to g_getenv(), + * g_setenv() or g_unsetenv(). + **/ G_CONST_RETURN gchar* g_getenv (const gchar *variable) { -- 2.34.1