summaryrefslogtreecommitdiffhomepage
path: root/mixutils
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2004-06-07 05:29:42 +0000
committerJose Antonio Ortega Ruiz <jao@gnu.org>2004-06-07 05:29:42 +0000
commitd52dde8a65f46c1258440ff73f1a56d65f2bcf46 (patch)
treea01ee69c0fc6f1968648751729d44e785bb46939 /mixutils
parentae3c9c49fb9814f99ffe12b597fc246a74c307f1 (diff)
downloadmdk-d52dde8a65f46c1258440ff73f1a56d65f2bcf46.tar.gz
mdk-d52dde8a65f46c1258440ff73f1a56d65f2bcf46.tar.bz2
save correctly prompts ending in whitespace.
do not save command line options when -r is passed to mixvm.
Diffstat (limited to 'mixutils')
-rw-r--r--mixutils/mixvm_loop.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/mixutils/mixvm_loop.c b/mixutils/mixvm_loop.c
index dd37bc6..492ebc6 100644
--- a/mixutils/mixvm_loop.c
+++ b/mixutils/mixvm_loop.c
@@ -1,7 +1,7 @@
/* -*-c-*- -------------- mixvm_loop.c :
* Implementation of mix vm command loop.
* ------------------------------------------------------------------
- * $Id: mixvm_loop.c,v 1.11 2004/06/07 05:05:27 jao Exp $
+ * $Id: mixvm_loop.c,v 1.12 2004/06/07 05:29:42 jao Exp $
* ------------------------------------------------------------------
* Copyright (C) 2000, 2001, 2002, 2004 Free Software Foundation, Inc.
*
@@ -117,10 +117,9 @@ mix_vmloop_set_prompt (const gchar *prompt)
if (prompt)
{
if (PROMPT) g_free (PROMPT);
- if (prompt[0] == '"') prompt++;
- PROMPT = g_strdup (prompt);
+ PROMPT = g_strdup ((prompt[0] == '"') ? prompt + 1 : prompt);
if (PROMPT[strlen (PROMPT) - 1] == '"') PROMPT[strlen (PROMPT) - 1] = 0;
- mix_config_update (config_, PROMPT_KEY_, PROMPT);
+ mix_config_update (config_, PROMPT_KEY_, prompt);
}
}