summaryrefslogtreecommitdiffhomepage
path: root/mixlib
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2004-06-07 12:18:22 +0000
committerJose Antonio Ortega Ruiz <jao@gnu.org>2004-06-07 12:18:22 +0000
commita2c671004a551cfe307513beb161d64c1b63488a (patch)
treef8dfb11c36dcaa8b30b1a40e967516c90be53fc5 /mixlib
parent7161125e1df06b71c2f1910d2c4930c413e5c622 (diff)
downloadmdk-a2c671004a551cfe307513beb161d64c1b63488a.tar.gz
mdk-a2c671004a551cfe307513beb161d64c1b63488a.tar.bz2
always use prompts ending in whitespace.
Diffstat (limited to 'mixlib')
-rw-r--r--mixlib/mix_config.c13
1 files changed, 4 insertions, 9 deletions
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 <stdlib.h>
#include <stdio.h>
+#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
@@ -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);