summaryrefslogtreecommitdiffhomepage
path: root/mixutils
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2001-07-09 22:49:55 +0000
committerJose Antonio Ortega Ruiz <jao@gnu.org>2001-07-09 22:49:55 +0000
commit888a3d7a8c313481de4004a5a1766f85c0dd7f20 (patch)
tree8bb257e31d058c98bda72805281185af98a47ffc /mixutils
parent1265e5419737a2fbd12eff899d19df706855b55e (diff)
downloadmdk-888a3d7a8c313481de4004a5a1766f85c0dd7f20.tar.gz
mdk-888a3d7a8c313481de4004a5a1766f85c0dd7f20.tar.bz2
history file
Diffstat (limited to 'mixutils')
-rw-r--r--mixutils/mixvm_loop.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/mixutils/mixvm_loop.c b/mixutils/mixvm_loop.c
index ad49829..f9672e8 100644
--- a/mixutils/mixvm_loop.c
+++ b/mixutils/mixvm_loop.c
@@ -81,8 +81,16 @@ rl_gets ()
void
mix_vmloop (const gchar *file, gboolean use_emacs)
{
+ static const gchar *HISTORY_FILE = "mixvm.history";
+ static gint HISTORY_SIZE = 100;
mix_config_t *config = mix_config_new (NULL, CONFIG_FILE_);
+
mix_config_set_autosave (config, TRUE);
+ if (!mix_config_get_history_file (config))
+ mix_config_set_history_file (config, HISTORY_FILE);
+ if (mix_config_get_history_size (config) == 0)
+ mix_config_set_history_size (config, HISTORY_SIZE);
+
mixvm_cmd_init (config, (char *)file, use_emacs);
while ( mixvm_cmd_exec (rl_gets ()) )
;