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
commit93f2cd2481dd38671cde09edd9e77a59d5ce1dcf (patch)
tree0bc7fa188307c764fe19f2d4cf4cbd3779a2c48c /mixlib
parentd52dde8a65f46c1258440ff73f1a56d65f2bcf46 (diff)
downloadmdk-93f2cd2481dd38671cde09edd9e77a59d5ce1dcf.tar.gz
mdk-93f2cd2481dd38671cde09edd9e77a59d5ce1dcf.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);