From 888a3d7a8c313481de4004a5a1766f85c0dd7f20 Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Mon, 9 Jul 2001 22:49:55 +0000 Subject: history file --- mixutils/mixvm_loop.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'mixutils') 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 ()) ) ; -- cgit v1.2.3