From 35db6815fda57c7ec1126e05051fd6f87bf99e94 Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Mon, 23 Jan 2006 16:32:22 +0000 Subject: [PATCH] wiped out all the wonderfull G_OS_WIN32 code i wrote ;-[) after tml told Mon Jan 23 17:30:33 2006 Tim Janik * glib/gutils.c (_g_getenv_nomalloc): wiped out all the wonderfull G_OS_WIN32 code i wrote ;-[) after tml told me windows has getenv() as well. --- ChangeLog | 6 ++++++ ChangeLog.pre-2-10 | 6 ++++++ ChangeLog.pre-2-12 | 6 ++++++ glib/gutils.c | 34 ---------------------------------- 4 files changed, 18 insertions(+), 34 deletions(-) diff --git a/ChangeLog b/ChangeLog index bfecd6a7..482516a4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Mon Jan 23 17:30:33 2006 Tim Janik + + * glib/gutils.c (_g_getenv_nomalloc): wiped out all the wonderfull + G_OS_WIN32 code i wrote ;-[) after tml told me windows has getenv() + as well. + Mon Jan 23 16:46:20 2006 Tim Janik * glib/gslice.c (slice_config_init): initialize GSlice config from diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index bfecd6a7..482516a4 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +Mon Jan 23 17:30:33 2006 Tim Janik + + * glib/gutils.c (_g_getenv_nomalloc): wiped out all the wonderfull + G_OS_WIN32 code i wrote ;-[) after tml told me windows has getenv() + as well. + Mon Jan 23 16:46:20 2006 Tim Janik * glib/gslice.c (slice_config_init): initialize GSlice config from diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index bfecd6a7..482516a4 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,9 @@ +Mon Jan 23 17:30:33 2006 Tim Janik + + * glib/gutils.c (_g_getenv_nomalloc): wiped out all the wonderfull + G_OS_WIN32 code i wrote ;-[) after tml told me windows has getenv() + as well. + Mon Jan 23 16:46:20 2006 Tim Janik * glib/gslice.c (slice_config_init): initialize GSlice config from diff --git a/glib/gutils.c b/glib/gutils.c index 7bcd0bc4..b0df1f4b 100644 --- a/glib/gutils.c +++ b/glib/gutils.c @@ -1170,7 +1170,6 @@ const gchar* _g_getenv_nomalloc (const gchar *variable, gchar buffer[1024]) { -#ifndef G_OS_WIN32 const gchar *retval = getenv (variable); if (retval && retval[0]) { @@ -1183,39 +1182,6 @@ _g_getenv_nomalloc (const gchar *variable, } } return NULL; -#else /* G_OS_WIN32 */ - if (G_WIN32_HAVE_WIDECHAR_API ()) - { - /* convert variable name to wchar_t without malloc */ - wchar_t wname[256], result[1024]; - gint i, l = strlen (variable); - if (l >= 256) - return NULL; - for (i = 0; variable[i]; i++) - wname[i] = variable[i]; - wname[i] = 0; - l = GetEnvironmentVariableW (wname, result, 1024); - if (l > 0 && l < 1024 && result[0]) - { - /* convert variable contents from wchar_t without malloc */ - for (i = 0; i < l; i++) - buffer[i] = result[i]; - buffer[i] = 0; - return buffer; - } - return NULL; - } - else - { - gint l = GetEnvironmentVariableW (variable, buffer, 1024); - if (l > 0 && l < 1024 && buffer[0]) - { - buffer[l] = 0; - return buffer; - } - return NULL; - } -#endif /* G_OS_WIN32 */ } /** -- 2.34.1