From a2c671004a551cfe307513beb161d64c1b63488a Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Mon, 7 Jun 2004 12:18:22 +0000 Subject: always use prompts ending in whitespace. --- mixlib/mix_config.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'mixlib') diff --git a/mixlib/mix_config.c b/mixlib/mix_config.c index 9d1c04b..cba9c80 100644 --- a/mixlib/mix_config.c +++ b/mixlib/mix_config.c @@ -1,7 +1,7 @@ /* -*-c-*- -------------- mix_config.c : * Implementation of the functions declared in mix_config.h * ------------------------------------------------------------------ - * $Id: mix_config.c,v 1.9 2004/06/07 05:29:01 jao Exp $ + * $Id: mix_config.c,v 1.10 2004/06/07 12:18:22 jao Exp $ * ------------------------------------------------------------------ * Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc. * @@ -24,6 +24,7 @@ #include #include +#include #include #include #include @@ -84,15 +85,9 @@ mix_config_new (const gchar *dirname, const gchar *filename) if (line && line[0] != COMMENT_PREFIX_) { gchar **vals = g_strsplit (line, "=", 2); - gchar *key = g_strdup (g_strstrip (vals[0])); - gchar *value = - (vals[1][0] == '"') - ? g_strndup (vals[1] + 1, strlen (vals[1]) - 2) - : g_strdup (g_strstrip (vals[1])); g_hash_table_insert (result->items, - (gpointer)key, - (gpointer)value); - g_strfreev (vals); + (gpointer) g_strstrip (vals[0]), + (gpointer) g_strstrip (vals[1])); } } fclose (f); -- cgit v1.2.3