Mercurial > hg > octave-max
changeset 2806:187d5321cfa3
[project @ 1997-03-11 05:13:15 by jwe]
author | jwe |
---|---|
date | Tue, 11 Mar 1997 05:13:25 +0000 |
parents | 68e6d0c93fc8 |
children | 3d59001b98a3 |
files | src/ChangeLog src/Makefile.in src/toplev.cc src/toplev.h src/variables.cc |
diffstat | 5 files changed, 93 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,16 +1,64 @@ +Mon Mar 10 22:38:16 1997 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Makefile.in (clean): Delete .oct files too. + + * toplev.cc (Vdefault_eval_print_flag): New static variable. + (eval_string): New arg, print. + (Feval): Pass Vdefault_eval_print_flag to eval_string. + (default_eval_print_flag): New function. + (symbols_of_toplev): New function. + + * variables.cc (install_builtin_variables): Call it. + + * pt-exp.h, pt-exp.cc (class tree_boolean_expression): Rename enum + fields `and' and `or' to `bool_and' and `bool_or'. + (tree_unary_expression): Rename enum field `not' to `unot'. + (class tree_binary_expression): Rename enum fields `and' and `or' + to `el_and' and `el_or'. + * parse.y: Change all uses. + + * time.cc (extract_tm): Truncate field values instead of rounding. + (gmtime, localtime): Likewise, for timeval. + + * ov.h (class octave_value): Delete unused variable freeptr. + + * mappers.cc: Delete functions that are already in + liboctave/lo-mappers.cc. + + * oct-strstrm.cc (octave_base_strstream::tell): Use const_cast, + not static_cast. + + * help.cc (help_from_list): Add missing const qualifiers. + * help.h (struct help_list): Likewise. + * lex.l (match_any, plot_style_token): Likewise. + * load-save.cc (extract_keyword, ascii_save_type): Likewise. + * oct-hist.cc (mk_tmp_hist_file): Likewise. + * octave.cc (execute_startup_files): Likewise. + * octave.gperf (struct octave_kw): Likewise. + * pr-output.cc (pr_any_float): Likewise. + * pt-mvr.cc (tree_index_expression::eval_error): Likewise. + * pt-exp-base.h, pt-exp.h, pt-exp.cc: Likewise. + * parse.y: Likewise. + Sun Mar 9 03:46:45 1997 John W. Eaton <jwe@bevo.che.wisc.edu> - * Map.cc, data.cc, dirfns.cc, dynamic-ld.cc, file-io.cc, - fsolve.cc, getgrent.cc, getpwent.cc, getrusage.cc, help.cc, - input.cc, load-save.cc, mappers.cc, minmax.cc, npsol.cc, - oct-fstrm.cc, oct-procbuf.h, oct-stdstrm.cc, oct-stdstrm.h, - oct-stream.cc, oct-stream.h, oct-strstrm.cc, octave.cc, - ov-base.h, ov-range.cc, ov-typeinfo.cc, ov.cc, pr-output.cc, - pt-cmd.cc, pt-exp.cc, pt-fcn.cc, pt-fvc.cc, pt-mat.cc, - pt-misc.cc, pt-plot.cc, qpsol.cc, quad.cc, sort.cc, strfns.cc, - symtab.cc, syscalls.cc, sysdep.cc, time.cc, toplev.cc, - unwind-prot.cc, unwind-prot.h, variables.cc, xpow.cc: - Use `static_cast<T> (val)' instead of old C-style `(T) val' casts. + * pt-exp-base.h (tree_expression): Delete extra comma at end of list. + + * dirfns.cc error.cc file-io.cc fsolve.cc input.cc load-save.cc + npsol.cc pt-fcn.cc qpsol.cc quad.cc syscalls.cc toplev.cc + variables.cc: Eliminate embedded newlines in string constants. + + * Map.cc, data.cc, dirfns.cc, dynamic-ld.cc, file-io.cc, + fsolve.cc, getgrent.cc, getpwent.cc, getrusage.cc, help.cc, + input.cc, load-save.cc, mappers.cc, minmax.cc, npsol.cc, + oct-fstrm.cc, oct-procbuf.h, oct-stdstrm.cc, oct-stdstrm.h, + oct-stream.cc, oct-stream.h, oct-strstrm.cc, octave.cc, + ov-base.h, ov-range.cc, ov-typeinfo.cc, ov.cc, pr-output.cc, + pt-cmd.cc, pt-exp.cc, pt-fcn.cc, pt-fvc.cc, pt-mat.cc, + pt-misc.cc, pt-plot.cc, qpsol.cc, quad.cc, sort.cc, strfns.cc, + symtab.cc, syscalls.cc, sysdep.cc, time.cc, toplev.cc, + unwind-prot.cc, unwind-prot.h, variables.cc, xpow.cc: + Use `static_cast<T> (val)' instead of old C-style `(T) val' casts. Sat Mar 8 02:35:13 1997 John W. Eaton <jwe@bevo.che.wisc.edu>
--- a/src/Makefile.in +++ b/src/Makefile.in @@ -318,7 +318,7 @@ etags $(SOURCES) $(DLD_SRC) $(TI_SRC) clean: - rm -f *.a *.o *.d *.df pic/*.o builtins.cc defaults.h oct-conf.h + rm -f *.a *.o *.d *.df *.oct pic/*.o builtins.cc defaults.h oct-conf.h if $(SHARED_LIBS); then rm -f *.$(SHLEXT); fi .PHONY: clean
--- a/src/toplev.cc +++ b/src/toplev.cc @@ -92,6 +92,9 @@ // User's home directory. string Vhome_directory; +// Nonzero means we print +static bool Vdefault_eval_print_flag = true; + // Nonzero means we're breaking out of a loop or function body. extern int breaking; @@ -584,7 +587,8 @@ } static octave_value_list -eval_string (const octave_value& arg, int& parse_status, int nargout) +eval_string (const octave_value& arg, int print, int& parse_status, + int nargout) { string s = arg.string_value (); @@ -594,9 +598,7 @@ return -1.0; } - // Yes Virginia, we always print here... - - return eval_string (s, 1, parse_status, nargout); + return eval_string (s, print, parse_status, nargout); } DEFUN (eval, args, nargout, @@ -621,7 +623,7 @@ int parse_status = 0; - retval = eval_string (args(0), parse_status, nargout); + retval = eval_string (args(0), 0, parse_status, nargout); if (nargin > 1 && (parse_status != 0 || error_state)) { @@ -634,7 +636,8 @@ bind_global_error_variable (); add_unwind_protect (clear_global_error_variable, 0); - eval_string (args(1), parse_status, nargout); + eval_string (args(1), Vdefault_eval_print_flag, + parse_status, nargout); retval = octave_value_list (); } @@ -929,6 +932,7 @@ } #if defined (__GNUG__) && defined (DEBUG_NEW_DELETE) + int debug_new_delete = 0; typedef void (*vfp)(void); @@ -964,8 +968,26 @@ if (ptr) free (ptr); } + #endif +static int +default_eval_print_flag (void) +{ + Vdefault_eval_print_flag = check_preference ("default_eval_print_flag"); + + return 0; +} + +void +symbols_of_toplev (void) +{ + DEFVAR (default_eval_print_flag, 1.0, 0, default_eval_print_flag, + "If the value of this variable is nonzero, Octave will print the\n\ +results of commands executed by eval() that do not end with semicolons."); + +} + /* ;;; Local Variables: *** ;;; mode: C++ ***
--- a/src/toplev.h +++ b/src/toplev.h @@ -52,6 +52,9 @@ extern void do_octave_atexit (void); +extern void +symbols_of_toplev (void); + // argv[0] for this program. extern string Vprogram_invocation_name;
--- a/src/variables.cc +++ b/src/variables.cc @@ -101,7 +101,7 @@ // Should Octave always check to see if function files have changed // since they were last compiled? -static bool Vignore_function_time_stamp; +static int Vignore_function_time_stamp; // TRUE if we are saving history. static int Vsaving_history; @@ -1667,6 +1667,7 @@ symbols_of_pt_mat (); symbols_of_pt_plot (); symbols_of_syscalls (); + symbols_of_toplev (); symbols_of_value (); symbols_of_variables (); }