diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2004-06-07 05:29:42 +0000 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2004-06-07 05:29:42 +0000 |
commit | d52dde8a65f46c1258440ff73f1a56d65f2bcf46 (patch) | |
tree | a01ee69c0fc6f1968648751729d44e785bb46939 /mixutils | |
parent | ae3c9c49fb9814f99ffe12b597fc246a74c307f1 (diff) | |
download | mdk-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.c | 7 |
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); } } |