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
commitb7e10d75a4055a945d7fd3beaee0e6e3c5861988 (patch)
treedf2fb6a16ce03eddad8ecf9db974955337fee931 /mixutils
parentb86afb94db26dba9d67d274736f07866b41b185d (diff)
downloadmdk-b7e10d75a4055a945d7fd3beaee0e6e3c5861988.tar.gz
mdk-b7e10d75a4055a945d7fd3beaee0e6e3c5861988.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 ()) )
;