Mercurial > hg > octave-nkf
changeset 1642:50e71230d582
[project @ 1995-12-08 22:07:30 by jwe]
author | jwe |
---|---|
date | Fri, 08 Dec 1995 22:08:48 +0000 |
parents | 1f99a54d7b52 |
children | 5e108d51e370 |
files | src/oct-hist.cc src/oct-hist.h src/user-prefs.cc |
diffstat | 3 files changed, 13 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/oct-hist.cc +++ b/src/oct-hist.cc @@ -64,9 +64,6 @@ // Nonzero means input is coming from temporary history file. int input_from_tmp_history_file = 0; -// Nonzero means we are saving history lines. -int saving_history = 1; - // The number of lines to save in the history file. static int octave_hist_size = 1024; @@ -141,7 +138,7 @@ void maybe_save_history (const char *s) { - if (saving_history) + if (user_pref.saving_history) { add_history (s); history_lines_this_session++;
--- a/src/oct-hist.h +++ b/src/oct-hist.h @@ -35,9 +35,6 @@ // Nonzero means input is coming from temporary history file. extern int input_from_tmp_history_file; -// Nonzero means we are saving history lines. -extern int saving_history; - #endif /*
--- a/src/user-prefs.cc +++ b/src/user-prefs.cc @@ -67,6 +67,7 @@ user_pref.resize_on_range_error = 0; user_pref.return_last_computed_value = 0; user_pref.save_precision = 0; + user_pref.saving_history = 0; user_pref.silent_functions = 0; user_pref.split_long_rows = 0; user_pref.struct_levels_to_print = 0; @@ -409,6 +410,17 @@ } +// Should we save command history? + +int +saving_history (void) +{ + user_pref.saving_history = check_preference ("saving_history"); + + return 0; +} + + // Suppress printing results in called functions. int