Mercurial > octave
diff src/user-prefs.cc @ 195:13c6086c325c
[project @ 1993-11-06 10:12:29 by jwe]
author | jwe |
---|---|
date | Sat, 06 Nov 1993 10:14:11 +0000 |
parents | 7a647cf4850c |
children | a99f28f5e351 |
line wrap: on
line diff
--- a/src/user-prefs.cc Wed Nov 03 21:38:05 1993 +0000 +++ b/src/user-prefs.cc Sat Nov 06 10:14:11 1993 +0000 @@ -48,7 +48,7 @@ static int check_str_pref (char *var) { - char *val = octave_string_variable (var); + char *val = builtin_string_variable (var); int pref = -1; if (val != (char *) NULL) { @@ -237,6 +237,30 @@ } /* + * Should Octave always check to see if M-files have changed since + * they were last compiled? + */ +int +ignore_function_time_stamp (void) +{ + int pref = 0; + + char *val = builtin_string_variable ("ignore_function_time_stamp"); + + if (val != (char *) NULL) + { + if (strncmp (val, "all", 3) == 0) + pref = 2; + if (strncmp (val, "system", 6) == 0) + pref = 1; + } + + user_pref.ignore_function_time_stamp = pref; + + return 0; +} + +/* * Should should big matrices be split into smaller slices for output? */ int @@ -301,7 +325,7 @@ warn_assign_as_truth_value (void) { user_pref.warn_assign_as_truth_value = - check_str_pref ("user_pref.warn_assign_as_truth_value"); + check_str_pref ("warn_assign_as_truth_value"); return 0; } @@ -326,7 +350,7 @@ static int kludge = 0; double val; - if (octave_real_scalar_variable ("output_max_field_width", val) == 0) + if (builtin_real_scalar_variable ("output_max_field_width", val) == 0) { int ival = NINT (val); if (ival > 0 && (double) ival == val) @@ -355,7 +379,7 @@ static int kludge = 0; double val; - if (octave_real_scalar_variable ("output_precision", val) == 0) + if (builtin_real_scalar_variable ("output_precision", val) == 0) { int ival = NINT (val); if (ival >= 0 && (double) ival == val) @@ -381,7 +405,7 @@ { int status = 0; - char *s = octave_string_variable ("LOADPATH"); + char *s = builtin_string_variable ("LOADPATH"); if (s != (char *) NULL) { delete [] user_pref.loadpath; @@ -401,7 +425,7 @@ { int status = 0; - char *s = octave_string_variable ("INFO_FILE"); + char *s = builtin_string_variable ("INFO_FILE"); if (s != (char *) NULL) { delete [] user_pref.info_file; @@ -417,11 +441,31 @@ } int +sv_editor (void) +{ + int status = 0; + + char *s = builtin_string_variable ("EDITOR"); + if (s != (char *) NULL) + { + delete [] user_pref.editor; + user_pref.editor = s; + } + else + { + warning ("invalid value specified for EDITOR"); + status = -1; + } + + return status; +} + +int sv_ps1 (void) { int status = 0; - char *s = octave_string_variable ("PS1"); + char *s = builtin_string_variable ("PS1"); if (s != (char *) NULL) { delete [] user_pref.ps1; @@ -441,7 +485,7 @@ { int status = 0; - char *s = octave_string_variable ("PS2"); + char *s = builtin_string_variable ("PS2"); if (s != (char *) NULL) { delete [] user_pref.ps2; @@ -461,7 +505,7 @@ { int status = 0; - char *s = octave_string_variable ("PWD"); + char *s = builtin_string_variable ("PWD"); if (s != (char *) NULL) { delete [] user_pref.pwd; @@ -481,7 +525,7 @@ { int status = 0; - char *s = octave_string_variable ("gnuplot_binary"); + char *s = builtin_string_variable ("gnuplot_binary"); if (s != (char *) NULL) { delete [] user_pref.gnuplot_binary; @@ -501,7 +545,7 @@ { int status = 0; - char *s = octave_string_variable ("PAGER"); + char *s = builtin_string_variable ("PAGER"); if (s != (char *) NULL) { delete [] user_pref.pager_binary;