Mercurial > hg > octave-nkf
changeset 4324:dcdca99fe2f0
[project @ 2003-02-15 03:18:43 by jwe]
author | jwe |
---|---|
date | Sat, 15 Feb 2003 03:18:44 +0000 |
parents | 0990c9b77109 |
children | f30803e587ac |
files | src/ChangeLog src/error.cc src/octave.cc src/pager.cc |
diffstat | 4 files changed, 33 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,12 @@ 2003-02-14 John W. Eaton <jwe@bevo.che.wisc.edu> + * octave.cc (maximum_braindamage): Set boolean built-in variables + to true and false instead of 1.0 and 0.0. + (octave_main): Likewise. + * error.cc (Fwarning): Likewise. + + * pager.cc (Fmore): Make the no-arg case work too. + * ov-str-mat.h (octave_char_matrix_str::is_real_type, octave_char_matrix_str::is_matrix_type, octave_char_matrix_str::is_numeric_type): Always return false.
--- a/src/error.cc +++ b/src/error.cc @@ -616,7 +616,7 @@ } else if (arg == "debug") { - bind_builtin_variable ("debug_on_warning", 1.0); + bind_builtin_variable ("debug_on_warning", true); retval = set_warning_option ("", "", nargout); done = true; }
--- a/src/octave.cc +++ b/src/octave.cc @@ -339,23 +339,23 @@ { bind_builtin_variable ("PS1", ">> "); bind_builtin_variable ("PS2", ""); - bind_builtin_variable ("beep_on_error", 1.0); - bind_builtin_variable ("crash_dumps_octave_core", 0.0); - bind_builtin_variable ("default_eval_print_flag", 0.0); + bind_builtin_variable ("beep_on_error", true); + bind_builtin_variable ("crash_dumps_octave_core", false); + bind_builtin_variable ("default_eval_print_flag", false); bind_builtin_variable ("default_global_variable_value", Matrix ()); bind_builtin_variable ("default_save_format", "mat-binary"); - bind_builtin_variable ("define_all_return_values", 1.0); - bind_builtin_variable ("do_fortran_indexing", 1.0); - bind_builtin_variable ("fixed_point_format", 1.0); - bind_builtin_variable ("implicit_num_to_str_ok", 1.0); - bind_builtin_variable ("implicit_str_to_num_ok", 1.0); - bind_builtin_variable ("initialize_global_variables", 1.0); - bind_builtin_variable ("ok_to_lose_imaginary_part", 1.0); - bind_builtin_variable ("page_screen_output", 0.0); - bind_builtin_variable ("prefer_column_vectors", 0.0); - bind_builtin_variable ("print_empty_dimensions", 0.0); - bind_builtin_variable ("treat_neg_dim_as_zero", 1.0); - bind_builtin_variable ("warn_function_name_clash", 0.0); + bind_builtin_variable ("define_all_return_values", true); + bind_builtin_variable ("do_fortran_indexing", true); + bind_builtin_variable ("fixed_point_format", true); + bind_builtin_variable ("implicit_num_to_str_ok", true); + bind_builtin_variable ("implicit_str_to_num_ok", true); + bind_builtin_variable ("initialize_global_variables", true); + bind_builtin_variable ("ok_to_lose_imaginary_part", true); + bind_builtin_variable ("page_screen_output", false); + bind_builtin_variable ("prefer_column_vectors", false); + bind_builtin_variable ("print_empty_dimensions", false); + bind_builtin_variable ("treat_neg_dim_as_zero", true); + bind_builtin_variable ("warn_function_name_clash", false); bind_builtin_variable ("whitespace_in_literal_matrix", "traditional"); } @@ -411,7 +411,7 @@ switch (optc) { case 'H': - bind_builtin_variable ("saving_history", 0.0); + bind_builtin_variable ("saving_history", false); break; case 'V':
--- a/src/pager.cc +++ b/src/pager.cc @@ -501,12 +501,19 @@ std::string arg = argv[1]; if (arg == "on") - bind_builtin_variable ("page_screen_output", 1.0); + bind_builtin_variable ("page_screen_output", true); else if (arg == "off") - bind_builtin_variable ("page_screen_output", 0.0); + bind_builtin_variable ("page_screen_output", false); else error ("more: unrecognized argument `%s'", arg.c_str ()); } + else if (argc == 1) + { + octave_value tmp = builtin_any_variable ("page_screen_output"); + + if (! error_state) + bind_builtin_variable ("page_screen_output", ! tmp.is_true ()); + } else print_usage ("more");