view src/ChangeLog @ 2994:b7c0d83d105c

[project @ 1997-05-22 18:45:32 by jwe]
author jwe
date Thu, 22 May 1997 18:45:33 +0000
parents 91589ab98e37
children f512c16826d1
line wrap: on
line source

Thu May 22 13:32:55 1997  John W. Eaton  <>

	* (octave_shl_load_dynamic_loader::resolve_reference): 
	Call shl_findsym with type set to TYPE_PROCEDURE.  Pass the
	address of the pointer we want to define.

Wed May 21 16:30:25 1997  John W. Eaton  <>

	* DLD-FUNCTIONS/ (extract_tm): Avoid memory leak in dealing
	with time zone.

	* (install-in): Use new mk-includedir-link macro.
	(install-lib): Install in $octlibdir.  Use new mk-libdir-link macro.

Tue May 20 01:24:11 1997  John W. Eaton  <>

	* (Flist): Rename from Fmake_list.

Mon May 19 14:45:58 1997  John W. Eaton  <>

	* (maximum_braindamage): Set default_eval_print_flag to 0.

Sat May 17 16:32:23 1997  John W. Eaton  <>

	* (set_default_editor): Default is now Emacs, not vi.

Fri May 16 00:07:11 1997  John W. Eaton  <>

	* (tree_index_expression::name): New function.

	*	(tree::str_print_code): New file, new convenience function.
	* (tree_argument_list::get_arg_names): Use it.
	* (tree_simple_assignment::rvalue): Likewise.
	(tree_multi_assignment::rvalue): Likewise.

	* pt-colon.h (tree_colon_expression::save_base): New data memmber.
	(tree_colon_expression::preserve_base): New function.
	* parse.y (finish_colon_expression): When converting to a simple
	expression, be sure to delete the original colon expression but
	not the base value.

	* (tree_matrix::~tree_matrix): Actually do something.

	* pt-all.h: New file.
	* parse.y, lex.l, Use it.

	* pt.h: Rename from pt-base.h.

	* All parse tree classes: Add private copy constructors and
	assignment operators to prevent copying.

	* Delete.

	* unwind-prot.h, Make a bit more object-oriented.
	Change all uses of unwind_protect stuff to match.

	* pt-jump.h, (breaking, continuing, returning):
	Make these flags static members of the corresponding class.
	Change all uses.

	* (tree_simple_assignment_expression::eval,
	tree_multi_assignment_expression::eval): Clear lvalue index here.

	* (octave_lvalue::assign): Don't clear index here.
	* oct-lvalue.h (octave_lvalue::clear_index): New function.
	(octave_lvalue::set_index): Rename from octave_lvalue::index.
	Change all callers.

Thu May 15 11:48:10 1997  John W. Eaton  <>

	* pt-select.h, (class tree_if_command_list,
	class tree_if_clause, class tree_switch_case_list,
	class tree_switch_case): Move here from pt-misc.h,
	* pt-decl.h, (class tree_decl_init_list,
	class tree_decl_elt): Move here from pt-mist.h,

	* pt-arg-list.h, pt-stmt.h: New files, extracted from pt-misc.h.
	*, New files, extracted from

	* pt-decl.h, pt-except.h, pt-jump.h, pt-loop.h, pt-select.h:
	New files, extraced from pt-cmd.h.
	New files, extraced from

	* pt-unop.h, pt-binop.h, pt-colon.h, pt-idx.h, pt-assign.h:
	New files, extracted from pt-exp.h
	New files, extracted from
	* pt-exp.h, Rename from pt-exp-base.h,

	* oct-lvalue.h: Rename from oct-var-ref.h.  Rename class from
	octave_variable_reference to octave_lvalue.  Change all uses.
	* Rename from

	* (bind_ans): Only bind ans and print result if value
	is defined.

	* New file.  Move functions for installing objects in
	the symbol table here from

	* oct-obj.h, Add custom allocator, fwiw.

	* (main_loop): Correctly increment command number.

	* TEMPLATE-INST/ Don't instantiate lists of pointers
	to tree_matrix_row objects.
	* TEMPLATE-INST/ Do instantiate lists of pointers
	to tree_argument_list objects.

	* DLD-FUNCTIONS/ Update to use new octave_function
	interface to user-supplied functions.
	* DLD-FUNCTIONS/ Likewise.
	* DLD-FUNCTIONS/ Likewise.
	* DLD-FUNCTIONS/ Likewise.
	* DLD-FUNCTIONS/ Likewise.

	* dynamic-ld.h, (builtin_fcn_installer typedef):
	Rename from builtin_fcn.
	Simplify by using new installer function defined by DEFUN_DLD.

	* defun-dld.h (DEFUN_DLD): Use DEFINE_FUN_INSTALLER_FUN instead of
	* defun-int.h (DEFVAR_INTERNAL): Rename from DEFVAR_INT and move
	here from defun.h.  Change all uses.
	(DEFINE_FUN_INSTALLER_FUN): New macro to define function that the
	dynamic loader calls to do all the work of installing a new function.

	* parse.y: Rewrite to handle more general expressions.
	* lex.l: Corresponding changes.

	* pt-walk.h, pt-pr-code.h, Cope with new parse tree
	object structure.

	* (class tree_for_command): Split into
	tree_simple_for_command and tree_complex_for_command classes.

	* pt-misc.h, (tree_statement::eval): Handle identifier
	lookup and printing and binding ans here.
	(tree_statement_list::eval): Simplify.
	(tree_argument_list::all_elements_are_constant): New function.
	(class tree_decl_elt): Now contains id and expr, not an assignment

	* pt-exp-base.h pt-exp.h pt-id.h pt-indir.h pt-mat.h pt-const.h,
	Replace eval functions with rvalue and lvalue functions.
	Change all uses.
	(lvalue_ok, rvalue_ok): New functions, for future compile-time
	semantic checks.

	* oct-var-ref.h (is_defined, is_map): New functions.

	* pt-exp.h (class tree_oct_obj): Delete.

	* (extract_function, is_valid_function): Return
	pointer to octave_function, not octave_symbol.
	(link_to_global_variable): Rewrite.  Handle errors in

	* symtab.h, (class symbol_def, class symbol_record):
	Symbols are now stored as octave_value objects only.

	* (install_types): Register function types here.
	* ov-fcn.h,, ov-builtin.h,, ov-mapper.h,, ov-usr-fcn.h, New classes for
	functions as values.
	* ov.h (class octave_value): Don't derive from octave_symbol.
	* oct-fcn.h,, oct-builtin.h,,
	oct-mapper.h,, oct-usr-fcn.h,,
	oct-sym.h, Delete.

Sun May 11 17:51:22 1997  John W. Eaton  <>

	* (Ftype): Make it work again for functions.

	* (tree_print_code::print_parens): New function.
	Use it in other tree_print_code functions to handle printing all
	the parens that we found when parsing the expression, not just one
	* pt-exp-base.h (tree_expression::paren_count): Rename from
	* parse.y (maybe_warn_assign_as_truth_value): Use new name.

	* parse.y (constant): New non-terminal.
	(simple_expr1): Use it.

	* parse.y (make_unary_op): Delete.
	(simple_expr1): Where appropriate, use make_prefix_op and
	make_postfix_op instead of make_unary_op.  Allow increment and
	decrement ops to work on expressions, not just identifiers.
	(make_prefix_op, make_postfix_op): Arg is expression, not identifier.
	Handle old unary_op cases too.
	(fold (tree_unary_expression *)): Delete.
	* pt-exp.h, (tree_prefix_expression::eval): Handle unary
	minus and not here.
	(tree_postfix_expression::eval): Likewise, for transpose and hermitian.
	(class tree_prefix_expression, class tree_postfix_expression):
	Derive from tree_unary_expression.  Delete identifier member.
	Delete ident member function.
	(tree_unary_expression): Don't handle evaluation here.
	* pt-exp-base.h (mark_in_parens): No longer virtual. Return this.
	(reference): New virtual function.
	(class tree_expression): Don't handle expression type here.
	* pt-mvr-base.h (tree_multi_val_ret::tree_multi_val_ret): Likewise.
	* pt-mvr.h, (tree_multi_assignment_expression): Likewise.
	* pt-walk.h (visit_unary_expression): Delete declaration.
	* pt-pr-code.h, (visit_unary_expression): Delete.
	(visit_prefix_expression): Use operand(), not ident().
	new, visit_postfix_expression):
	* pt-id.h, (increment, decrement): Delete.

	* (tree_parameter_list::define_from_arg_vector): Get a
	reference to each element and use the assignment operator instead
	of tree_identifier::define.
	* pt-id.h, (tree_identifier::define): Delete versions
	that take octave_value and octave_symbol args.

Sat May 10 23:32:13 1997  John W. Eaton  <>

	* pt-indir.h, (tree_indirect_reference::value): Delete.

	* (octave_variable_ref::assign): Clear idx after

	* octave_value classes: Add is_constant, is_function, and
	function_value functions.

	* ov.h, (assign): Return void, not reference to octave_value.
	(do_index_op): Rename, from index.
	(do_struct_elt_index_op): Rename, from struct_elt_val.
	Add version that accepts index arg.
	Change all uses and derived classes to match.
	* pt-const.h (index): Delete.
	* oct-var-ref.h, (value): Handle indexed structure
	ops here too.

Fri May  9 07:40:59 1997  John W. Eaton  <>

	* (print_rhs_assign_val, symbols_of_pt_exp): New functions.
	(Vprint_rhs_assign_val): New static variable.
	(tree_simple_assignment_expression::eval): Use it to optionally
	allow the rhs (which is the result) of an assignment to be printed
	instead of the left.

	* (tree_simple_assignment_expression::eval): Use new
	octave_variabl_reference::index function to handle indexing.

	* oct-var-ref.h, (idx): New data member.
	(octave_variable_reference::index): Set it.
	(octave_variable_reference::assign): Handle indexing here.
	Delete version of this function htat takes index arg.	

	* variables.h (struct builtin_varaible): Delete.
	* (install_builtin_variable): Take all elts of
	builtin_variable struct directly.
	* defun.h (DEFVAR_INT): Call install_builtin_variable directly.

	* symtab.h, defun-int.h: Don't include variables.h.

	* symtab.h (symbol_record::sv_function): Move typedef here.
	* variables.h: From here.

	* oct-var-ref.h, New files for
	octave_variable_reference class, extracted from variables.h and
	* Add them to the appropriate lists.

	* oct-obj.h (octave_value_list::empty): New function.

	* variables.h (class octave_variable_reference):  Rewrite to work
	as a proxy class to store a pointer to octave_value and,
	optionally, the change function to call and the name of the
	structure element we are referencing.  Handle assignment,
	increment, decrement, and value operations.

Thu May  8 23:40:59 1997  John W. Eaton  <>

	* ov-re-mat.h, (struct_elt_ref, struct_elt_val,
	assign_struct_elt): Provide functions for looking up and setting
	matrix dimensions.

	* (symbol_record::define): Don't call sv_fcn here.
	Don't save and restore value here.
	(symbol_record::define_builtin_var): Do call sv_fcn here.
	(symbol_record::variable_reference): Don't make value unique here.
	Return pointer to sv_fcn in octave_variable_reference.

	* (tree_parameter_list::initialize_undefined_elements): 

	* pt-id.h, (tree_identifier::reference): Return
	octave_variable_reference, not octave_value&.
	* symtab.h, (symbol_record::variable_reference): Ditto.
	* pt-indir.h, (tree_indirect_ref::reference): Ditto.
	Simplify too.

	* pt-const.h (tree_constant::reference, tree_constant::value,
	tree_constant::assign):  Delete unnecessary functions.
	* pt-id.h, (tree_identifier::assign): Ditto.

	* (tree_for_command::do_for_loop_once): Simplify.

	* ov.h,, ov-base.h,, ov-struct.h,
	(struct_elt_ref): New arg, octave_value* parent.
	Allow deferred lookup.  Return octave_variable_reference, not

	* ov.h,, ov-re-mat.h, (assign_struct_elt):
	New virtual functions.

	* ov.h, (Vresize_on_range_error): Now static.

	* (tree_index_expression::eval): Delete redundant check
	of error_state.

Wed May  7 21:17:00 1997  John W. Eaton  <>

	* (generate_completion): Rename from command_generator.
	Use string objects instead of char*.
	(generate_possible_completions): Let qsort also make matches unique.
	(initialize_command_input): Register generate_completion with the
	command_editor class.
	(completion_matches): Simplify using generate_completion.

	* (tree_print_code::visit_constant): For val, call
	print_raw, not print.

	* oct-usr-fcn.h (octave_user_function::argn_sr): New data member.
	(octave_user_function::install_automatic_vars): Rename from
	(octave_user_function::bind_automatic_vars): Rename from
	* (octave_user_function::eval): Extract arg names
	from args vector and bind them to argn.
	* oct-obj.h (octave_value_list::names): New data member.
	* (octave_value_list::stash_name_tags): New function.
	(octave_value_list::name_tags): Ditto.
	* pt-const.h, (tree_constant::print_raw): New function.
	* pt-misc.h, (tree_argument_list::get_arg_names):
	New function.
	* pt-mvr.h, (class index_expression): Cache arg names.
	* (feval): Now static.  Handle arg names.

	* mkops: Cope with moving files defining operators to OPERATORS

Tue May  6 00:48:59 1997  John W. Eaton  <>

	* DLD-FUNCTIONS/ Use new octave_group class.
	* DLD-FUNCTIONS/ Use new octave_passwd class.

	* Simplify by using new functions defined in

	* (Ftmpnam): Accept DIR and PREFIX args.

Mon May  5 00:54:03 1997  John W. Eaton  <>

	* (octave_char_matrix_str::print_name_tag): Print
	empty strings on one line.

	Move appropriate files to new directories.
	directories to VPATH.  Fix rules to work with new directory

Sun May  4 22:40:45 1997  John W. Eaton  <>

	* (initialize_command_input): Rename from
	(gnu_readline, octave_gets, get_user_input): Simplify, return
	string, not char *.

	* Many of other files: Miscellaneous changes to go along with the
	changes described in the liboctave/ChangeLog for May 4.  More code
	moved from here to liboctave.
Fri May  2 19:50:33 1997  John W. Eaton  <>

	* pathlen.h: Move to ../liboctave.

Thu May  1 21:50:44 1997  John W. Eaton  <>

	* (get_struct_elts): New fucntion.
	(looks_like_struct, generate_struct_completions): Move here from, rewrite, and make work again.

Wed Apr 30 00:24:05 1997  John W. Eaton  <>

	* ov-base.h,, ov-bool-mat.h,, ov-bool.h,, ov-ch-mat.h,, ov-complex.h,, ov-cx-mat.h,, ov-file.h,,, ov-range.h,, ov-re-mat.h,,
	ov-scalar.h,,, ov.h (scalar_value):
	New function.  Same as double_value, but name is consistent with
	octave_scalar class.

	*,,,,,,,, New files.

	*,,,,,,,,,,,,,,,,,, Use them.

	* (octave): Also depend on ops.o.

	* builtins.h: Delete.
	* Add extern declaration here.

	* mappers.h: Delete.
	* (INCLUDES): Delete from list.
	* mkbuiltins: Add extern declaration in

	* mkops: New file.
	* Delete.
	* (SOURCES): Delete from the list.
	( New target.
	(OP_SOURCES): New list.  Move all op-*.cc files here from SOURCES.
	Add $(OP_SOURCES) to SOURCES list.

	* (symbols_of_variables): No longer static.
	* (symbols_of_ov): Rename from symbols_of_value.

	* ov-base.h: Delete declaration for install_base_type_conversions.
	* op-b-b.h, op-bm-bm.h, op-cm-cm.h, op-cm-cs.h, op-cm-m.h,
	op-cm-s.h, op-cs-cm.h, op-cs-cs.h, op-cs-m.h, op-cs-s.h,
	op-m-cm.h, op-m-cs.h, op-m-m.h, op-m-s.h, op-s-cm.h, op-s-cs.h,
	op-s-m.h, op-s-s.h, op-str-str.h: Delete.
	* (INCLUDES): Delete them from the list.

Tue Apr 29 22:27:49 1997  John W. Eaton  <>

	* variables.h, (install_builtin_variables): Delete.
	* mkbuiltins: Also generate install_builtin_variables function.
	* Fix rule to call mkbuiltins with correct args.
	(clean): Also delete def-files and var-files.
	*, dirfns.h, error.h, file-io.h, help.h, input.h,
	lex.h, load-save.h, oct-usr-fcn.h, pager.h, parse.h,,
	pr-output.h, pt-mat.h, pt-misc.h, pt-plot.h, toplev.h:
	Delete declarations of symbols_of_* functions.
	* data.h, syscalls.h: Delete.

	* (octave_print_internal): Leave printing of final
	new line up to the caller.

	* ov.h, (reset_indent_level, increment_indent_level,
	decrement_indent_level, newline, indent, reset,
	curr_print_indent_level, beginning_of_line):
	New functions and static data to manage indent level for printing.
	(print_as_scalar): Delete.
	(print, print_with_name): Always require stream arg.
	Change all callers.

	* oct-stream.h (octave_stream::input_stream): Make publicly available.
	(octave_stream::output_stream): Likewise.

	* ov-base.h,, ov.h,, ov-file.h ov-base.h
	(is_file, stream_value, stream_number): New functions.
	* ov-file.h, New files for value class to manage files.
	* (symbols_of_file_io): Define stdin, stdout, and
	stderr as octve_file objects, not just integers.
	(Ffopen, Fpopen): Return octave_file objects, not integer file ids. 
	* (Fpipe): Likewise.
	* oct-stream.h, (octave_stream_list::insert):
	Return octave_file object, not integer file id.

	(print_name_tag, print_raw): New functions.

	* (Ftype): Don't cast symbol definition to tree_constant *.

	* (link_to_global_variable): Don't try to define
	symbol with tree_constant objects.
	(bind_ans): Call symbol_record::define directly and then
	octave_value::print_with_name instead of creating a temporary
	assignment expression.

	* (tree_print_code::indent): Don't use ostream::form.

	* pt-exp-base.h, pt-exp.h, (oper): Return string, not
	char *.  Change all where necessary.

Mon Apr 28 16:33:49 1997  John W. Eaton  <>

	* ov.h (octave_value binary_op enum): Add lshift and rshift.
	(octave_value assign_op enum): Add lshift_eq and rshift_eq.
	* (assign_op_as_string, binary_op_as_string): Include them.
	* parse.y (LSHIFT_EQ RSHIFT_EQ LSHIFT RSHIFT): New tokens.
	Add them to the precedence list.
	(simple_expr): Add new operators.
	(make_assign_op, make_binary_op): Handle new operators.
	* lex.l: Recognize new operators.

	* lex.l: Recognize them.

Sun Apr 27 20:17:49 1997  John W. Eaton  <>

	* (Vsilent_functions, silent_functions):
	Move here from
	(symbols_of_pt_misc): New function.  DEFVAR silent_functions.
	(tree_statement_list::eval): Handle Vsilent_functions here instead
	of in octave_user_function::eval.
	(tree_statement::eval): New functions.
	(tree_statement_list::eval): Use them.
	Change print flag arg to silent flag.  Change all callers.
	* (install_builtin_variables): Call symbols_of_pt_misc.
	* (parse_and_execute): Delete print arg.  Change all callers.
	(eval_string): Change print flag arg to silent flag.  Change callers.

	* dynamic-ld.h, Rewrite to use singleton class.
	* (load_fcn_from_file): Use new dynamic linking class.

	* dynamic-ld.h (Octave_builtin_fcn): Delete typedef.
	* Simplify via the magic of function pointers.

	* pt-fcn.h pt-fvc.h pt-fvc-base.h
	Delete obsolete files.
	* Remove them from various lists.

	* pt-walk.h (visit_octave_user_function): Rename from visit_function.
	(visit_builtin): Delete.
	* pt-pr-code.h, (visit_octave_user_function):
	Rename from visit_function.
	(visit_octave_user_function_header): Rename from visit_function_header.
	(visit_octave_user_function_trailer): Rename from

	* ov.h, (eval): New functions.

	Declare user-defined functions as a pointer to an octave_symbol
	object, not as a pointer to a tree_fvc object.

	* symtab.h, Use new octave_symbol class.
	* (install_builtin_function, install_builtin_mapper,
	install_builtin_variable, install_builtin_variable_as_function):
	Make work with new octave_symbol class and symbol table structure.

	* variables.h: Delete declaration of builtin_function struct.
	* defun-dld.h (DEFUN_DLD): Simplify.
	* defun-int.h (DEFINE_FUN_STRUCT): Delete.
	(DEFINE_FUN_STRUCT_FUN): Rewrite to not use static builtin_function

	* mappers.h: Delete declaration of builtin_mapper_function struct.
	* Declare wrapper functions static.
	* defun.h (DEFUN_MAPPER): Simplify.

	* oct-sym.h: New file.  Declare base class for Octave symbols.
	* ov.h: Derive octave_value class from octave_symbol.
	* oct-fcn.h, New files to declare and define
	base class for functions.
	* oct-builtin.h, New files to declare and define
	class for built-in functions.
	* oct-mapper.h, New files to declare and define
	class for mapper functions.
	* oct-usr-fcn.h, New files to declare and define
	base class for user-defined functions.
	* Add new files to appropriate lists.

	* pt-id.h, Move tree_identifier class here.
	* pt-fvc.h, From here.

	* pt-indir.h, Move tree_indirect_ref class here.
	* pt-fvc.h, From here.

Thu Apr 24 03:58:16 1997  John W. Eaton  <>

	* parse.y (magic_colon): New nonterminal.
	(arg_list): Simplify using magic_colon.

	* lex.h (class lexical_feedback): Delete maybe_screwed field.
	New field, parsed_function name.
	* lex.l (lexical_feedback::init): Initialize it.
	(handle_identifier): Don't return SCREW.  Handle switching
	symbol table context properly for `function f ()' vs `function x ='.
	(is_keyword): If looking at function keyword, don't set current
	symbol table to point to the local table.
	* parse.y (recover_from_parsing_function): New function.
	(finish_function_def): Use identifier, not token.
	Simplify parsing of functions.

	* ov-list.h, New files to implement generic list type.
	* (list_indent): New global variable.
	(increment_list_indent, decrement_list_indent): New functions.
	(install_types): Register octave_list type.
	* (octave_base_value::is_list): New function.

	* oct-sym.h: New file.
	* ov.h (class octave_value): Derive from octave_symbol class.

	* pt-const.h, Delete lots of old useless cruft.

	* pt-exp.h, (tree_binary_expression): Use type codes for
	operators from octave_value instead of repeating them here.

	* (tree_fvc::increment, tree_fvc::decrement): Delete.
	* (tree_identifier::increment): Get reference to value
	and increment that instead of using virutal tree_fvc::increment

	* lex.l: Handle +=, -=, *=, /=, .+=, .-=, .*=, ./=, &=, and |= ops.
	* parse.y (make_assign_op): Rename from make_simple_assignment and
	handle different op types.
	(simple_expr1): Do new ops.
	* (initialize_undefined_elements): Pass op to assign.
	* (tree_for_command::do_for_command_once): Likewise.
	* (tree_identifier::assign): Pass op.
	* (tree_simple_assignment_expression): Handle new ops.
	* (octave_variable_reference::assign): Likewise.
	* ov.h (class octave_value): Likewise.
	* (octave_value::assign_op_as_string): New function.
	(octave_value::assign, octave_value::convert_and_assign,
	octave_value::try_assignment): Pass op.
	* (tree_print_code::visit_simple_assignment_expression):
	Use expr.oper() instead of printing "=".
	*,,,,,, Pass op to INSTALL_ASSIGNOP.
	* ops.h (INSTALL_ASSIGNOP): Pass op.
	* (do_register_assign_op): Include op type in table.
	(do_lookup_assign_op): Use op in lookup.

	* ops.h (INSTALL_UNOP): Delete.

	* (generate_struct_completions, looks_like_struct):
	Disable, since they don't work now anyway.

	* (Ftype): Work with octave_value instead of a pointer to
	* (symbol_record_info::symbol_record_info): Likewise.

Tue Apr 22 22:59:55 1997  John W. Eaton  <>

	* (Ffprintf): If first arg is a string, assume FID = 1.

Fri Apr 18 20:16:34 1997  John W. Eaton  <>

	* oct-obj.h, Implement octave_value_list with
	Array<octave_value> as a data member, not as a class derived from
	(octave_value_list::length, octave_value_list::resize,
	octave_value_list::prepend, octave_value_list::append,
	octave_value_list::reverse): New functions.

	*,,,,,,,,,,, Use new bool ops from liboctave instead of
	the macros defined in ops.h.

Thu Apr 17 13:12:22 1997  John W. Eaton  <>

	* parse.y (ABORT_PARSE): Handle forced_interactive the same as

Mon Apr 14 01:46:50 1997  John W. Eaton  <>

	* (octave_read): Don't forget to free input buffer if it
	exists and has zero length.
	(gnu_readline): Free buf if fgets returns 0.

Wed Apr  9 00:03:57 1997  John W. Eaton  <>

	* (mk_tm_map): Only set zone field if HAVE_TM_ZONE or
	HAVE_TZNAME are defined.

Tue Apr  8 12:39:21 1997  John W. Eaton  <>

	* (extract_tm): Set tm.tm_zone if HAVE_TM_ZONE is defined,
	not if HAVE_TMZONE is defined.

	* (%.oct : %.o): Use $(SH_LD), not $(CXX).

Wed Apr  2 21:32:16 1997  John W. Eaton  <>

	*, dynamic-ld.h (init_dynamic_linker): Delete
	function and declaration.
	* (main): Don't call it.

Mon Mar 31 00:37:48 1997  John W. Eaton  <>

	* pt-base-exp.h (tree_expression::eval): Give arg a default value.
	* pt-const.h (tree_constant::eval): Likewise.
	* pt-exp.h (tree_prefix_expression::eval, tree_colon_expression::eval,
	tree_postfix_expression::eval, tree_unary_expression::eval,
	tree_binary_expression::eval, tree_boolean_expression::eval,
	tree_simple_assignment_expression::eval): Likewise.
	* pt-fcn.h (tree_function::eval): Likewise.
	* pt-fvc.h (tree_identifier::eval, tree_indirect_ref::eval,
	tree_builtin::eval): Likewise.
	* pt-mat.h (tree_matrix::eval): Likewise.
	* pt-misc.h (tree_statement_list::eval): Likewise.
	* pt-mvr-base.h (tree_multi_val_ret::eval): Likewise.
	* pt-mvr.h (tree_oct_obj::eval, tree_index_expression::eval,
	tree_multi_assignment_expression::eval): Likewise.
	*,,,,, parse.y,,,,,,,,,,,
	Change callers of eval() to use bool instead of int and to make
	use of default argument value.

	* toplev.h, (parse_and_execute, eval_string): Flag args
	are now bool instead of int.

	* symtab.h, Use bool instead of int in more places.
	* variables.h, Likewise.
	* lex.h, lex.l: Likewise.
	* parse.y: Likewise.
	*,, lex.l,, parse.y,
	Change callers of symbol_table::lookup to use bool instead of int,
	and to make use of default arguments.

Fri Mar 28 15:33:11 1997  John W. Eaton  <>

	* parse.y (Vwarn_comma_in_declaration): Delete.
	(symbols_of_parse): Delete DEFVAR for warn_comma_in_declaration.
	(decl1): Don't allow commas in declarations.

	* (struct LSODE_OPTIONS): Handle integer options.
	(print_lsode_option_list, set_lsode_option, show_lsode_option): Ditto.
	(lsode_option_table): Add element for step limit.
	(lsode_user_jacobian): New function.
	(Flsode): Allow function name arg to be a 2-element string array
	specifying the function and jacobian function.

	* (get_global_value, set_global_value): New functions.

Wed Mar 26 17:08:27 1997  John W. Eaton  <>

	Implement static variable declaration:

	* lex.l (is_keyword): Handle static.
	* octave.gperf: Likewise.
	* parse.y (Vwarn_comma_in_declaration): Rename from
	Handle new static command.
	* pt-cmd.h, (class tree_decl_command): New base class
	for static and global declaration commands.
	(class tree_global_command): Derive from tree_decl_command.
	(class tree_static_command): New class, derived from tree_decl_command.
	*, pt-fvc.h (tree_identifier::mark_as_static): New function.
	* pt-misc.h, pt-misc.h (class tree_decl_elt): Rename from tree_global.
	(class tree_decl_init_list): Rename from tree_global_init_list.
	*, pt-pr-code.h (tree_print_code::visit_decl_command):
	Rename from visit_global_command.
	(tree_print_code::visit_decl_elt): Rename from visit_global.
	(tree_print_code::visit_decl_init_list): Rename from
	* pt-walk.h (tree_walker::visit_decl_command): Rename from
	(tree_walker::visit_decl_elt): Rename from visit_tree_global.
	(tree_walker::visit_decl_init_list): Rename from
	* (link_to_global_variable): Trying to make a static
	variable global is an error.
	* Instantiate lists of pointers to tree_decl_elt
	objects, not tree_global objects.
	* symtab.h, (symbol_record::tagged_static): New field.
	(symbol_record::mark_as_static, symbol_record::is_static):
	New functions.
	* (symbol_record::init_state): Initialize tagged_static.
	(symbol_record::clear): Don't clear static variables.
	* (push_context): Don't do anything for static variables.

Tue Mar 25 17:17:17 1997  John W. Eaton  <>

	*, ov-bool-mat.h,, ov-bool.h: New files.

	* (symbols_of_defaults): DEFCONST OCTAVE_HOME.

	* (octave_config_info): Delete use of CXXLIBS.
	* Ditto.

	* (maximum_braindamage): Don't bind prefer_zero_one_indexing.
	* ov.h: Don't declare Vprefer_zero_one_indexing.
	* Don't define Vprefer_zero_one_indexing.
	(prefer_zero_one_indexing): Delete.
	(symbols_of_value): Delete DEFVAR for prefer_zero_one_indexing.

	* ov.h,, ov-base.h, Add constructors and
	extractors for bool and boolMatrix types. 
	* (install_types): Register octave_bool and
	octave_bool_matrix types.

	Return boolMatrix instead of Matrix object.
	* ops.h (BOOL_OP3, MX_MX_BOOL_OP): Likewise.

	* op-b-b.h,, op-bm-bm.h, New files.
	* Add them to the lists.
	* Include header files here.
	(install_ops): Call install_b_b_ops() and install_bm_bm_ops() here.

	* (symbols_of_variables): Don't rely on default
	conversion from int to double for value returned from

	* Include cstdio.

	* parse.y (param_list_end): Fix typo in last change.

	* (quad): Cast integer return values to double.
	* (show_npsol_option): Likewise.
	* (show_qpsol_option): Likewise.
	* (Fsprintf, Ffwrite): Likewise.

Mon Mar 24 13:11:47 1997  John W. Eaton  <>

	* (typeinfo): If invoked with an argument, return
	the type of the argument as a string.  Fix doc string.

Thu Mar 20 14:47:49 1997  John W. Eaton  <>

	* mk-oct-links (links_dir): Don't use -h option for grep.  It's
	not needed since we are working on one file at a time anyway.

Mon Mar 17 10:53:29 1997  John W. Eaton  <>

	* lex.l (handle_identifier): When handling indirect_ref, set
	lexer_flags.quote_is_transpose to 1 so that a.b' to work as

	* parse.y (param_list_beg, param_list_end): New nonterminals.
	(param_list, param_list1): Use them.

Wed Mar 12 16:57:28 1997  John W. Eaton  <>

	* (install-strip): New target.

Mon Mar 10 22:38:16 1997  John W. Eaton  <>

	* (clean): Delete .oct files too.

	* (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.

	* (install_builtin_variables): Call it.

	* pt-exp.h, (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.

	* (extract_tm): Truncate field values instead of rounding.
	(gmtime, localtime): Likewise, for timeval.

	* ov.h (class octave_value): Delete unused variable freeptr.

	* Delete functions that are already in

	* (octave_base_strstream::tell): Use const_cast,
	not static_cast.

	* (help_from_list): Add missing const qualifiers.
	* help.h (struct help_list): Likewise.
	* lex.l (match_any, plot_style_token): Likewise.
	* (extract_keyword, ascii_save_type): Likewise.
	* (mk_tmp_hist_file): Likewise.
	* (execute_startup_files): Likewise.
	* octave.gperf (struct octave_kw): Likewise.
	* (pr_any_float): Likewise.
	* (tree_index_expression::eval_error): Likewise.
	* pt-exp-base.h, pt-exp.h, Likewise.
	* parse.y: Likewise.

Sun Mar  9 03:46:45 1997  John W. Eaton  <>

	* pt-exp-base.h (tree_expression): Delete extra comma at end of list.

	* Eliminate embedded newlines in string constants.

	*,,,,,,,,,,,,,,,, oct-procbuf.h,, oct-stdstrm.h,, oct-stream.h,,,
	ov-base.h,,,,,,,,,,,,,,,,,,,,,, unwind-prot.h,,
	Use `static_cast<T> (val)' instead of old C-style `(T) val' casts.

Sat Mar  8 02:35:13 1997  John W. Eaton  <>

	* (save_ascii_data, save_three_d): Where appropriate,
	use bool instead of int.
	(save_binary_data, save_mat_binary_data, save_ascii_data):
	Print warning instead of error for wrong type arg.

	* (gripe_wrong_type_arg): New arg, is_error.

	* (save_in_tmp_file): Call save_ascii_data with bool
	arg, not int.

Fri Mar  7 00:56:16 1997  John W. Eaton  <>

	* (show_dassl_option): For values that are determined
	automatically, return a string instead of a magic value (-1.0).
	* (show_fsolve_option): Likewise.
	* (show_lsode_option): Likewise.
	* (show_npsol_option): Likewise.
	* (show_qpsol_option): Likewise.

	* (extract_function): New function.
	* (Fdassl): Use it instead of is_valid_function.
	* (Ffsolve): Likewise.
	* (Fnpsol): Likewise.
	* (Fqpsol): Likewise.
	* (Fquad): Likewise.

Thu Mar  6 20:07:24 1997  John W. Eaton  <>

	* (my_friendly_exit, octave_new_handler,
	sigfpe_handler, sigpipe_handler): Don't all error() or warning().

	* (pager_death_handler): Don't try to clear pager, just
	print message to cerr.
	(do_sync): If the status of the pager is bad or it looks like it
	is dead, restore the interrupt handler.

	* (extract_keyword (istream&, char*, int&)):
	Move declaration of buf inside loop, to avoid deleting its guts
	and then trying to reuse it.
	(extract_keyword (istream&, char*)): Likewise.

Tue Mar  4 20:36:53 1997  John W. Eaton  <>

	* (tree_function::eval): Protect function from being
	redefined while it is being evaluated.
	(unprotect_function): New function, for use with unwind_protect stuff.
	* pt-fcn.h (tree_function::symtab_entry): New data member.
	(tree_function::init): Initialize it to 0.
	(tree_function::stash_symtab_ptr): New function.
	* parse.y (frob_function_def): Stash pointer to function's
	symbol_record in the function definition.

	* (symbol_record::read_only_error): New argument,
	action.  Change all callers.
	(symbol_record::rename): Don't allow read-only symbols to be renamed.

	* (Fexist): Don't let files with `.' in their names
	confuse us.

	* (valid_identifier (const string&)): New function.

Sat Mar  1 15:23:14 1997  John W. Eaton  <>

	* Version 2.0.5 released.

Sat Mar  1 01:34:08 1997  John W. Eaton  <>

	* (stamp-oct-links): New target.  Make links in build
	directory too, so that the tests will work.

	* If quad is defined, undefine it.

	* If WITH_KPATHSEARCH is defined, don't define
	program_invocation_name or program_invocation_short_name.

	* strftime.c: Update to current version from FSF.
	* (Fstrftime): Call strftime with buf = 0 to get buffer
	size, then call again to actually format the time struct.

Fri Feb 28 01:49:48 1997  John W. Eaton  <>

	Implement switch statement:

	* parse.y (Vwarn_variable_switch_label): New static variable.
	(warn_variable_switch_label): New function.
	(symbols_of_parse): Provide warn_variable_switch_label as Octave
	variable here.
	(make_switch_case, finish_switch_command): New functions.
	(maybe_warn_variable_switch_label): New function.
	(end_error): Handle endswitch.
	(switch_command, case_list, case_list1, switch_case, default_case):
	New nonterminals.
	(command): Add switch_command here.
	* lex.l	(is_keyword): Handle switch, case, otherwise, and endswitch.
	* octave_gperf: Recognize switch, case, otherwise, and endswitch.
	* token.h (end_tok_type): New item, switch_end.
	* (tree_switch_command): New class.
	* (tree_switch_case, tree_switch_case_list): New classes.
	* (tree_print_code::visit_switch_case,
	tree_print_code::visit_switch_command): New functions.
 	* pt-walk.h (tree_walker::visit_switch_case,
	tree_walker::visit_switch_command): New pure virtual declarations.
	Implement new switch statement.
	* Instantiate lists of pointers to
	tree_switch_case objects too.

	* lex.h, lex.l, parse.y: Delete all references to lexer_flags::iffing.

	* syswait.h: Include sys/wait.h on NeXT systems, but don't use the
	WIFEXTED, WEXITSTATUS, and WIFSIGNALLED macros defined there.
	Also define waitpid in terms of wait4.  From Rex A. Dieter

Wed Feb 26 16:43:31 1997  John W. Eaton  <>

	* (octave_base_stream::do_scanf): Don't report an
	error if a conversion fails or we reach EOF.

Tue Feb 25 22:21:05 1997  John W. Eaton  <>

	* (strftime): increase initial buffer size.

Mon Feb 24 17:49:21 1997  John W. Eaton  <>

	* (tree_builtin::eval): Enable checking for max number
	of arguments.

	* (handle_message): Don't fail if args is empty.

Sun Feb 23 22:42:52 1997  John W. Eaton  <>

	* lex.h (lexical_feedback::looking_at_return_list): New field.
	(lexical_feedback::looking_at_parameter_list): Ditto.
	* lex.l (lexical_feedback::init): Initialize them.
	(handle_identifier): Use them.
	* parse.y: Likewise.

Fri Feb 21 15:35:18 1997  John W. Eaton  <>

	* lex.l: Require flex 2.5 or later (we really want 2.5.4 or later,
	but there seems to be no good way to check the patchlevel).

	* (octave_base_stream::oscanf): Instead of returning
	an error, just quit processing after a conversion fails.

Thu Feb 20 02:58:05 1997  John W. Eaton  <>

	* Version 2.0.4 released.

Wed Feb 19 10:30:14 1997  John W. Eaton  <>

	* (octave_ignore_interrupts,
	octave_catch_interrupts, octave_set_interrupt_handler):
	Return old value, not pointer to static data.  Fix all uses.
	* sighandlers.h (octave_interrupt_handler): Move declaration here.
	* From here.

	* Undo previous change.

	* lex.l (handle_identifier): Allow commands like ls, save, etc. to
	also be used as simple variable names.  Also make it possible to
	use the normal function call syntax to invoke them.

Tue Feb 18 09:22:04 1997  John W. Eaton  <>

	* (%.oct:%.o, %.oct:pic/%.o): Use $(SH_LDFLAGS) here.

	* Version 2.0.3 released.

Tue Feb 18 00:27:49 1997  John W. Eaton  <>

	* (run_command_and_return_output):
	Block SIGCHLD while running subprocess.
	(cleanup_iprocstream): Unblock it here.

	* sighandlers.h (BLOCK_SIGNAL, BLOCK_CHILD, UNBLOCK_CHILD): Move here.
	* From here.

	* (system): Shift then mask exit status.

	* (try_info): Shift first, then mask exit status.

	* (octave_config_info): Handle option argument.

Fri Feb 14 16:23:30 1997  John W. Eaton  <>

	* (octave_base_stream::do_scanf): Don't forget to
	check to see if the result matrix needs resizing!

	* (bin-dist): Don't write empty strings to LIBRARIES.

Thu Feb 13 03:02:08 1997  John W. Eaton  <>

	* (stamp-prereq): Depend on stamp-picdir.
	(all): Don't depend on stamp-prereq or stamp-picdir.
	(stamp-tinst, stamp-interp, libtinst.a, liboctinterp.a):
	Do depend on stamp-prereq.
	(stamp-picdir): Silence noise about making pic.
	(stamp-tinst, stamp-interp): Use $(SH_LD) $(SH_LDFLAGS) instead of
	$(CXX) -shared.

	* Reinstate RLD_FLAG.
	* (octave_config_info): Likewise.

	* (map_d_m, map_m_d, map_m_m): Rename from map.
	(Fatan2): Use new function names.

	* (apply_mapper_fcn): Use member function map() instead
	of friend function.

	* (gripe_wrong_type_arg (const char*, const string&)):
	New function.

Wed Feb 12 17:27:53 1997  John W. Eaton  <>

	* (symbols_of_syscalls): Add O_ASYNC and O_SYNC.

Mon Feb 10 01:22:27 1997  John W. Eaton  <>

	* (Freaddir, Fmkdir, Frmdir, Frename):
	Also return status and error message.

	* (Fdup2, Fexec, Ffork, Ffcntl, Funlink, Fmkfifo,
	Fpipe, Fwaitpid): Also return error message.

Sat Feb  8 17:16:09 1997  John W. Eaton  <>

	* (tree_simple_assignment_expression::eval): Return
	value of RHS, but (if printing) print complete value of LHS.

	* (octave_print_internal): Print a new line for empty
	string matrices.

Wed Feb  5 14:30:44 1997  John W. Eaton  <>

	* (scanf_format_list::process_conversion): Accept
	but don't actually use h, l, and L modifiers.  Always insert l
	modifier for floating point conversions.	

Fri Jan 31 13:55:10 1997  John W. Eaton  <>

	* (do_sync): Always flush the cout stream after writing.

Wed Jan 29 08:25:29 1997  John W. Eaton  <>

	* (exec_path): Don't include bin_dir in std_path.

	* (do_sync): Flush the cout stream after writing if
	running in interactive or forced_interactive mode.

	* mk-oct-links: Rename from
	Don't use symbolic links.
	* Distribute mk-oct-links, not
	(mk-oct-links): Delete target.
	(install-oct, bin-dist): Don't depend on mk-oct-links.
	Run $(srcdir)/mk-oct-links, not ./mk-oct-links.

	* (qr): Doc fix.

Tue Jan 28 10:48:28 1997  John W. Eaton  <>

	* (install-inc): Create a relative symbolic link.
	(install-bin): Create a relative symbolic link.

Mon Jan 27 12:12:03 1997  John W. Eaton  <>

	* Version 2.0.2 released.

	Substitute bsd_gcc_kluge_targets_frag.

	* (Fsleep): New function.
	(Fusleep): New function.

	* (octave_config_info): Don't include RLD_FLAG.
	* Don't define RLD_FLAG

Sun Jan 26 19:41:48 1997  John W. Eaton  <>

	* (sigchld_handler): Block SIGCHLD while
	sigchld_hander is running.

Sat Jan 25 22:36:39 1997  John W. Eaton  <>

	* (bin-dist): Update for 2.x.

Fri Jan 24 10:05:00 1997  John W. Eaton  <>

	* New arg, -p, to just print list of files to link.

	* lex.l (handle_number): Convert `D' or `d' exponents to `e'
	before scanning.

Thu Jan 23 10:00:00 1997  John W. Eaton  <>

	* pt-pr-code.h, (tree_print_code::visit_no_op_command):
	New function. 
	* pt-cmd.h, (tree_no_op_command): New class.
	* parse.y (make_break_command, make_continue_command,
	make_return_command): Where they don't really make sense, turn
	these commands into no-ops.  Accept return and break if reading a
	script file.
	* (parse_and_execute): Handle return and break in script
	files.  Quit executing commands if an error occurs when reading a
	script file.  Set global_command to 0 after deleting it.
	(main_loop): If not interactive or forced_interactive, handle
	break and return, and quit executing commands if an error occurs.
	Set global_command to 0 after deleting it.
	* (Ferror): Doc fix.
	* pt-walk.h (tree_walker): Add declaration for visit_no_op_command.

Wed Jan 22 20:54:12 1997  John W. Eaton  <>

	* (gnu_readline): If not using readline, flush
	rl_outstream after printing prompt.
	(octave_gets): Also call flush_octave_stdout() if
	forced_interactive, not just if interactive.
	(do_input_echo): If forced_interactive, only echo prompt and
	command line if also reading a script file.

Tue Jan 21 23:02:34 1997  John W. Eaton  <>

	* SLList.h: Include "BaseSLList.h", not <BaseSLList.h>.

Mon Jan 20 11:11:12 1997  John W. Eaton  <>

	* lex.l (token_stack): Don't declare static.
	* (tmp_files): Likewise.
	* (octave_atexit_functions): Likewise.
	* (unwind_protect_list): Likewise.

	* ops.h (MX_MX_BOOL_OP): Correctly handle case of one or both
	arguments being empty.  Change all callers.

	* (printf_value_cache::looking_at_string):
	Handle empty strings correctly now that they are 0x0.

	* Don't include "syswait.h" here.

Sun Jan 19 22:38:45 1997  John W. Eaton  <>

	* oct-stream.h (octave_base_stream::seek): Declare offset arg as
	streamoff, not streampos.
	(octave_stream::seek): Likewise.
	* oct-strstrm.h (octave_base_strstream::seek): Likewise.
	* oct-stdstrm.h (octave_base_stdiostream::seek): Likewise.
	* oct-iostrm.h (octave_base_iostream::seek): Likewise.
	* oct-fstrm.h (octave_fstream::seek): Likewise.

Fri Jan 17 18:13:10 1997  John W. Eaton  <>

	* (Ffflush): Handle stdout as a special case.

	* (octave_stream_list::do_get_file_number):
	Do the work for octave_stream::get_file_number.
	(octave_stream_list::get_file_number): Convert to static function.

Wed Jan  8 11:42:44 1997  John W. Eaton  <>

	* (sqrtm): For complex arg case, compute sqrt, not log.

Tue Jan  7 00:16:41 1997  John W. Eaton  <>

	* Version 2.0.1 released.

Mon Jan  6 00:00:07 1997  John W. Eaton  <>

	* (tm_row_const_rep::all_mt): New variable.
	(tm_row_const::all_empty): New function.
	(tm_row_const::tm_row_const_rep::init): Set all_mt here.
	(tm_const::all_mt): New variable.
	(tm_const::all_emtpy): New function.
	(tm_const::init): Set all_mt here.
	(tree_matrix::eval): Return an empty matrix if the list contains
	only empty elements.  If it contains only empty strings, return an
	empty string.

Sun Jan  5 12:50:25 1997  John W. Eaton  <>

	* ops.h (SC_MX_BOOL_OP, MX_SC_BOOL_OP): New arg, empty_result.
	*,,,,,,,,,,,, Change all uses of
	SC_MX_BOOL_OP and MX_SC_BOOL_OP macros.  Return correct results
	for empty matrix cases.

	* (tree_function::eval): If Vdefine_all_return_values is
	true, initialize return values before evaluating function, for
	compatibility with Matlab.

	* (get_size): Correctly set size when arg is scalar.

Thu Jan  2 12:40:10 1997  John W. Eaton  <>

	* (install-oct): Quote $(OCT_FILES) in for loop to
	avoid syntax error from ksh.

	* (octave_print_internal): Avoid unused parameter
	warning from gcc.

Thu Dec 19 12:13:42 1996  John W. Eaton  <>

	* (octave_base_stream::do_scanf):
	Don't treat %l{e,f,g} differently from %{e,f,g}.
	(octave_base_stream::do_oscanf): Likewise.

	* (sigchld_handler): Fix typos.

Wed Dec 18 20:17:23 1996  John W. Eaton  <>

	* (Ffgetl, Ffgets): Also return number of characters	read.

	* (octave_range::not): New function.
	* ov-range.h (octave_range::uminus): New function.

	* Include error.h.
	(BaseSLList::error): Call ::error() to process error message.

Fri Dec 13 02:38:19 1996  John W. Eaton  <>

	* (octave_value::convert_and_assign): Preserve lhs value if
	assignment fails.

Wed Dec 11 12:33:16 1996  John W. Eaton  <>

	* (GPLOT_CMD_END): Don't put semicolons at the end of
	each plot command; it causes trouble with gnuplot 3.5.

Tue Dec 10 00:31:13 1996  John W. Eaton  <>

	* Version 2.0 released.

	* (set_format_style): Don't try to access argv unless
	argc > 1.

	* SLList.h, Include Stack.h,,,
	and as necessary.

	*,, New files.
	* (SOURCES): Add them to the list.

Mon Dec  9 12:03:45 1996  John W. Eaton  <>

	* (install-bin): Use $(EXE) suffix so install will
	find the right file on cygwin32 systems.

	* ov.h: Declare proper form of do_binary_op as friend to
	octave_value class.

Sat Dec  7 22:00:10 1996  John W. Eaton  <>

	* (do_printf_conv, do_scanf_conv,
	do_oscanf_num_conv, do_oscanf_str_conv): Convert to real
	functions instead of CPP macros, using templates where necessary.
	(do_oscanf_num_conv, do_oscanf_str_conv): Correctly handle
	discarded values.

Fri Dec  6 00:20:25 1996  John W. Eaton  <>

	* Version 1.94.

	* Map-*.cc, SLList-*.cc, SLStack-*.cc: Include config.h.

	* ov.h: Don't include SLList.h.

	* Delete.  Move everything to SLStack.h.

	* BaseSLList.h, New files.  Split out the
	non-template base class parts of SLList.

	* (TEMPLATE_SRC): Delete.  Move files to SOURCES.
	* Map.h, Add #pragma interface/implementation.
	* SLStack.h, Add #pragma interface/implementation.

	* SLList.h, New files, from libg++, but with #pragma
	* (SOURCES): Add
	(INCLUDES): Add SLList.h.

Thu Dec  5 18:36:44 1996  John W. Eaton  <>

	* Don't include sun-utils.h.

Tue Dec  3 23:47:09 1996  John W. Eaton  <>

	* (eq, ne): Handle operations with scalars.

Thu Nov 21 12:30:36 1996  John W. Eaton  <>

	* ov-str-mat.h (octave_char_matrix_str): Provide transpose and
	hermitian operators.
	* ov-ch-mat.h (octave_char_matrix): Likewise.

Wed Nov 20 00:35:57 1996  John W. Eaton  <>

	* sighandlers.h (struct octave_interrupt_handler): Provide
	forward declaration here.
	* (octave_interrupt_handler): New struct.
	(octave_catch_interrupts): Rename from catch_interrupts.
	(octave_ignore_interrupts, octave_set_interrupt_handler):
	New functions.
	*,,, Use new functions for
	handling interrupts so that we can hide the details of whether or
	not we have to deal with SIGBREAK.

	* [! HAVE_POSIX_SIGNALS] (open_plot_stream):
	Simply ignore and restore the interrupt handler here.

	instead of always checking MUST_REINSTALL_SIGHANDLERS everywhere.
	(sigchld_handler): If octave_child_list is empty, wait for any
	child, but don't hang, and don't collect status info.
	[__EMX__] (sigchld_handler): Save and restore handlers for SIGINT,
	SIGBREAK, and SIGCHLD.  Ignore them while waiting on children.
	(install_signal_handlers): If SIGBREAK exists, handle it like SIGINT.

	* [USE_READLINE] (clean_up_and_exit):
	Call rl_deprep_terminal() to restore terminal settings.

	* [__EMX__ && OS2] (Fextproc): New command.
	[__EMX__ && OS2] (FEXTPROC): Alias for Fextproc.

	* Version 1.93.

	* (octave_chdir): [__EMX__]: Make copy of string before
	converting to upper case.

	* (mk_gr_map): Only set the passwd field if
	HAVE_GR_PASSWD is defined.

Tue Nov 19 12:01:13 1996  John W. Eaton  <>

	* (OS2_init): New function.
	[__EMX__] (sysdep_init): Call it.

	* lex.l (plot_style_token): Add new plot styles for gnuplot 3.6.
	* (subplot_style::columns_ok): Rename from
	subplot_style::errorbars. Recognize more styles and do a better
	job of diagnosing column number/style mismatches.

	* (my_friendly_exit): If we are called twice, try
	to remove the signal handler for SIGABRT and the call abort ().

	* (Ftype): If a function is defined from a file and
	transformed text has not been requested, just print the contents
	of the file.

	* parse.y (fold): New functions for constant folding for binary
	and unary expressions.  Keep track of original text even when
	transformations occur.
	(make_binary_op, make_boolean_op, make_unary_op): Use them.
	(finish_colon_expression, finish_matrix): Keep track of original
	text even when transformations occur.

	* (Ftype): Don't mess with Vps4.
	Handle new option `-transformed'.

	* pt-const.h, (tree_constant::print):
	New arg, pr_orig_text.

	* pt-exp.h, (tree_colon_expression::is_range_constant):

	* pt-exp-base.h (tree_expression::original_text): New virtual function. (tree_expression::original_text): Default version.

	* pt-pr-code.h (tree_print_code::print_original_text,
	tree_print_code::prefix): New fields.
	* (tree_print_code::visit_constant): Pass
	print_original_text to tree_constant::print().
	(tree_print_code::indent): Use prefix instead of Vps4.
	* (tree_function::print_function_header,
	tree_function::print_function_trailer): Pass Vps4 to
	tree_print_code_constructor for prefix.
	* (tree_statement::maybe_echo_code): Pass Vps4 to
	tree_print_code_constructor for prefix.

	* pt-mat.h, (tree_matrix::all_elements_are_constant):
	Rename from is_matrix_constant.
	(tree_matrix_row::all_elements_are_constant): Likewise.
	Change all callers.

Mon Nov 18 14:13:32 1996  John W. Eaton  <>

	* (install-inc): Try harder to create the link from
	include/octave to include/octave-VERSION.

Sun Nov 17 14:14:48 1996  John W. Eaton  <>

	* ( Expect 13 shift/reduce conflicts.

	* parse.y (set_stmt_print_flag): New function.
	(sep_type): New member for bison %union declaration.
	Simplify rules for statement lists keeping track of the type of
	the first separator in the values associated with the
	nonterminals for the separators.

	* lex.l (handle_identifier): Set lexer_flags.doing_set if the
	token is "gset", not "set".

Sat Nov 16 21:41:26 1996  John W. Eaton  <>

	* (, Add special rules for these files.
	Delete pattern rules for .y and .l files.

Fri Nov 15 13:48:02 1996  John W. Eaton  <>

	* Put semicolons at the ends of all plot commands.

	* (subst_octave_home): Start subsequent searchs from
	the end of the replaced text.

	* (pr_any_float): Kluge for SCO systems.

	* (pr_any_float, pr_complex): Don't declare inline.

	* Include lo-ieee.h, for isinf and isnan on SCO

Thu Nov 14 00:06:19 1996  John W. Eaton  <>

	* (Fgset, Fgshow): New commands.
	(Fshow): Print warning and call gshow.
	(Fset): Print warning and call gset.

	* (parse_fcn_file): Add unwind-protect for file
	pointer, so the file is always closed.
	(get_help_from_file): Likewise.
	* (parse_and_execute): Likewise.

	* (install-oct): Depend on mk-oct-links.
	(mk-oct-links): New target.

	* Version 1.92.

Wed Nov 13 11:13:22 1996  John W. Eaton  <>

	* (sys_siglist): [__EMX__]: Add definitions.

	* (execute_startup_files): Allow init file name ot be
	specified by an environment variable.

	* (make_absolute): [__EMX__]: Path is already absolute
	if it begins with any character followed by a colon.

	* (read_mat_ascii_matrix, get_lines_and_columns,
	get_complete_line): New functions, for reading headless text files.
	(load_save_format): Add LS_MAT_ASCII, for headless text files.
	(do_load): Handle LS_MAT_ASCII files.
	Thanks to Mel Melchner <> for initial version
	of this code.

	* Conditionally include ieeefp.h.
	(BSD_init, SCO_init): New functions.
	(sysdep_init): Conditionally call them here.

Tue Nov 12 00:14:56 1996  John W. Eaton  <>

	* (open_plot_stream): Don't block SIGCHLD.

	* (read_binary_data): When reading string arrays, be
	sure to create an octave_char_matrix_str object, not just an
	octave_char_matrix object.
	(read_ascii_data): Likewise.

Mon Nov 11 22:52:58 1996  John W. Eaton  <>

	* (read_binary_data): Don't forget teminating NUL for
	string that we plan to insert.
	(read_ascii_data): Likewise.

Sun Nov 10 16:58:07 1996  John W. Eaton  <>

	* (Ffnmatch): New function.

	* (intern_argv): Use new string_vector constructor.

	* (octave_char_matrix_str::all_strings): Have
	charMatrix::row_as_string() strip trailing whitespace.

	* (Fglob): new function.

	* (oct_tilde_expand): Provide version that works on
	string vectors too.
	(Ftilde_expand): Work on string vector args.

	* (save_binary_data): Call char_matrix_value() to
	extract charMatrix from octave_value object, not all_strings().
	(save_ascii_data): Likewise.
	* (tree_matrix::eval): Likewise.

	* ov.h (octave_value::all_strings): Return string_vector, not
	* (octave_base_value::all_strings): Likewise.
	* ov-str-mat.h, (octave_char_matrix_str::all_strings): 

Fri Nov  8 09:54:59 1996  John W. Eaton  <>

	lex.l: Change #include "" to #include <> for defaults.h,
	oct-conf.h, oct-gperf.h,, and version.h, to avoid getting
	them from $srcdir when we really want the version from the build
	directory.  (Maybe this should be done for all the include files,
	not just those that are auto-generated?  Hmm.)


	* (install-oct): Use $(INSTALL_PROGRAM) for .oct files.

Thu Nov  7 07:59:07 1996  John W. Eaton  <>

	* (gobble_leading_white_space): New arg, update_pos.
	* (is_function_file): Don't update file position information here.

	* Version 1.91.

	* (tree_indirect_ref::reference): If the lhs object is
	not a map, convert it to one.

	* ov-typeinfo.h (init_tab_sz): New static member.

	*, ov-struct.h: Add hooks for custom memory management.
	*, ov-scalar.h: Likewise.
	*, ov-re-mat.h: Likewise.
	*, ov-range.h: Likewise.
	*, ov-cx-mat.h: Likewise.
	*, ov-complex.h: Likewise.
	*, ov-ch-mat.h: Likewise.

Wed Nov  6 12:32:48 1996  John W. Eaton  <>

	* (do_sync): Don't call clear_external_pager() here.

	* pt-const.h (tree_constant::allocator) New static member.
	(tree_constant::operator new, tree_constant::operator delete):
	Implement with custom allocator.

	* (Fgetgid, Fgetegid): New functions.

	* (sigchld_handler): If necessary, reinstall
	handler after call to waitpid().

	* (pager_death_handler): Don't use warning() to print

	* New file.
	* (DLD_SRC): Add it.

	* (octave_value::print_with_name): Call is_map() instead of
	* (octave_struct::print): Likewise.

	* ov.h,, pt-const.h: Delete force_numeric(), make_numeric(),
	convert_to_matrix_type(), print_as_structure() member functions.

	* (is_function_file): Call gobble_leading_whitespace
	here to strip all leading whitespace and comments.
	(parse_fcn_file): If reading a function file, call
	gobble_leading_whitespace again after resetting parser state to
	grab help text.

Tue Nov  5 13:00:35 1996  John W. Eaton  <>

	* (Fgeteuid, Fgetuid): New functions.

	* Use gripe_not_supported from, instead of
	local gripe_not_implemented function.

	*,, Only include readline.h and
	history.h if USE_READLINE is defined.

	* Make it compile without warnings even if USE_GNU_INFO
	is not defined.

	* sighandlers.h (octave_child_list): Don't define

	* (SIGHANDLER_RETURN): New macro.
	(generic_sig_handler, sigchld_handler, sigfpe_handler,
	sigint_handler, sigpipe_handler):  Use it.
	(sigchld_handler, sigfpe_handler, sigint_handler, sigpipe_handler):
	Only reinstall signal handler if MUST_REINSTALL_SIGHANDLER is defined.

Sun Nov  3 00:45:30 1996  John W. Eaton  <>

	* (tree_constant::print): Just call val.print().
	*,,,,,,,,,, (print):
	Handle pr_as_read_syntax arg.

	* (subst_octave_home): Search for prefix repeatedly in
	retval, not s.

	* gripes.h: Make declaration of gripes_not_supported match

	* In sed command, match "DEFUN_DLD *( *", not

	*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, Change all uses of DEFUN_DLD_BUILTIN to
	be just DEFUN_DLD.

	* defun-dld.h: Eliminate DEFUN_DLD_BUILTIN.

	* syswait.h: Use #ifdef HAVE_SYS_WAIT_H, not #if HAVE_SYS_WAIT_H
	to decide whether to include sys/wait.h.

	* pt-exp-base.h (tree_expression): Declare oper() here as a
	virtual member function.

	* (tree_print_code::visit_constant): Check for
	string before checking for char_matrix.

	* (octave_char_matrix::print): Supply correct number
	of args to octave_print_internal().

Sat Nov  2 20:44:55 1996  John W. Eaton  <>

	* (Ftmpnam): Rename from Foctave_temp_file_name.

	* (DLD_SRC): Move and here from

	* Rename from  Make getrusage a
	loadable function.

	* Rename from  Make time functions loadable.

	* New file.

Wed Oct 30 01:06:19 1996  John W. Eaton  <>

	* Version 1.90.

	* (DISTFILES): Add ChangeLog.

	* (octave_range::convert_to_str): New function.

	* ov-str-mat.h (octave_char_matrix_str::char_matrix_value):
	Delete function.  Already handled by octave_char_matrix class.	

	* ov-ch-mat.h (octave_char_matrix::convert_to_str): New function.

	* (Fmore): Set page_screen_output to 1.0 or 0.0, not
	"true" or "false".

	*,, ov-struct.h,,,, pt-const.h,,,
	pt-fvc-base.h,, pt-fvc.h,,,, variables.h: Delete unused code.

	* Only include pwd.h if HAVE_PWD_H.

	* oct-strstrm.h: Include <string>, not <string.h>.

	*,,,,,,, oct-procbuf.h,, pager.h,
 	procstream.h,,,, strftime.c,,, syswait.h,,, Only include sys/types.h if HAVE_SYS_TYPES_H.

	* error.h (panic): Use GCC_ATTR_NORETURN macro, not NORETURN.
	* toplev.h (clean_up_and_exit): Likewise.
	* utils.h (jump_to_top_level): Likewise.

	*, (local_arch_lib_dir): New variable.
	* (set_default_local_arch_lib_dir): New function.
	(install_defaults): Call it.
	(exec_path): Use Vlocal_arch_lib_dir here.
	* (octave_config_info): Add localarchlibdir to structure.

Tue Oct 29 15:54:27 1996  John W. Eaton  <>

	* (install-oct): Don't do anything if $(OCT_FILES) is

	* (octave_range::index): New Function.
	(octave_range::all, octave_range::any, octave_range::is_true):
	Make these functions work.

	* (octave_value::try_assignment_with_conversion): Remove
	left over debugging print statements.

Mon Oct 28 10:49:03 1996  John W. Eaton  <>

	* strftime.c: Add missing #endif for previous change.

Sun Oct 27 14:06:44 1996  John W. Eaton  <>

	* (do_history): Rewite option parsing to avoid
	(probably bogus) errors from g++ on cygwin32 system.

	* strftime.c: Use autoconf macros TIME_WITH_SYS_TIME and
	HAVE_SYS_TIME_H to decide which time.h files to include.

	* oct-stream.h, (octave_stream::error,
	octave_base_stream::error): Rename errno => err_num.

Sat Oct 26 10:40:05 1996  John W. Eaton  <>

	* (do_history): Move declaration of file inside

	* defun.h (DEFVAR_INT): Set eternal flag with (svc_fcn != 0)
	instead of (sv_fcn ? 1 : 0)

Fri Oct 25 01:10:51 1996  John W. Eaton  <>

	* ov-ch-mat.h (octave_char_matrix::any): Return 0.0 instead of false.
	(octave_char_matrix::all): Likewise.

	* (Fecho): When binding value of echo_executing_commands,
	cast ECHO_* to double.

	* (octave_child_list::do_remove): Delete unused
	variable `enlarge'.

	* pt-const.h (tree_constant::tree_constant (const tree_constant&)):
	Don't pass arg to tree_fvc constructor.

	Only fill in time values.

Thu Oct 24 20:37:28 1996  John W. Eaton  <>

	* parse.y: Comment out the %expect declaration so byacc can
	compile this file.
	(if_cmd_list): Add missing semicolon.
	Include <cstdlib> for getenv if using byacc.

	* ov.h: Move typedefs outside of octave_value class scope to avoid
	problem with cygwin32 beta16 compiler.

Fri Oct 18 13:44:33 1996  John W. Eaton  <>

	* ov.h (octave_value::index): Undo previous change.
	* (octave_value constructors): Call maybe_mutate() in most

	* (octave_complex::index): Avoid implicit type
	conversion back to scalar type.
	* (octave_scalar::index): Likewise.

	* ov.h (octave_value::index): Call maybe_mutate() on retval before
	returning it.

Wed Oct 16 12:00:11 1996  John W. Eaton  <>

	* ov.h (octave_value::struct_elt_val): New optional arg, silent.
	* ov-base.h,, ov-struct.h, Likewise, but
	for the derived classes the arg is required.

	* (Fstruct_contains): Require arguments to be struct and
	string, respectively.  Call octave_value::struct_elt_val with
	silent flag set.

	* (tm_row_const::tm_row_const_rep::eval_error,
	tm_row_const::tm_row_const_rep::eval_warning): New functions.
	(tm_row_const::tm_row_const (const tree_matrix_row&): Use them to
	give better error messages.

	* (tree_identifier::eval): Avoid dereferencing null

Tue Oct 15 11:35:51 1996  John W. Eaton  <>

	(complex_matrix_conv): New functions.
	Install preferred assignment conversion and widening ops.

	*, (complex_matrix_conv): New functions.
	Install preferred assignment conversion and widening ops.

	*, (matrix_conv): New functions.
	Install preferred assignment conversion and widening ops.

	* (octave_value::try_assignment_with_conversion,
	octave_value::convert_and_assign, octave_value::try_assignment): 
	New functions.
	(octave_value::assign): Use them to implement twisted logic for
	type conversions in assigments.

	* pt-const.h (tree_constant::maybe_mutate): New function.
	* ov.h (octave_value::maybe_mutate): New function.
	(octave_value::try_narrowing_conversion): New function.
	Use just one typedef for widening_op_fcn and numeric_conv_fcn.
	Change all uses.
	* ov-base.h, ov-complex.h,, ov-cx-mat.h,, ov-range.h,, ov-re-mat.h,,
	Provide derived class versions of try try_narrowing_conversion().

	* (octave_print_internal): Don't bother handing off
	to scalar/real versions, even when it would seem appropriate.

	* (symbol_def::define (tree_constant *)): Call
	maybe_mutate on constants here.

Mon Oct 14 11:05:24 1996  John W. Eaton  <>

	* (tree_identifier::eval): If retval is undefined and
	the object to eval is a constant, print	error message.

	* Makefile (distclean): Remove *.oct too.

	* defun-int.h: Include variables.h here.

Sun Oct 13 10:52:28 1996  John W. Eaton  <>

	* (print_symbol_info_line): Never print negative

	* symtab.h (octave_symbol_record_info): Store const_type as string.
	(octave_symbol_record_info::init): Delete.  Fix constructors.
	(octave_symbol_record_info::type_name): Handle const_type as string.

	* (maximum_braindamage): Replace "true" with 1.0 and
	"false" with 0.0 in calls to bind_builtin_variable().
	Include sun-utils.h here.
	(intern_argv): Also bind __argv__.

Sat Oct 12 13:40:21 1996  John W. Eaton  <>

	* (distclean): Also delete mk-oct-links.

Fri Oct 11 13:13:13 1996  John W. Eaton  <>

	Changes for Octave's new type system:

	* Delete.
	* pt-const.h, Massive changes.  Most functionality
	moved to ov.h,, and derived classes.

	* variables.h, (octave_variable_reference): New class
	for getting references to variables and structure elements used in
	assignments or value contexts.

	* symtab.h, (symbol_record::define (const octave_value&),
	symbol_record::variable_value, symbol_record::variable_reference):
	New functions.
	(symbol_record_info::type_name): Rename from type_as_string.

	* pt-fvc-base.h, (tree_fvc::increment,
	tree_fvc::decrement): New functions to replace
	#if 0 assign and lookup_map_element functions.

	* (tree_multi_assignment_expression::eval):
	Generated RHS value is now a tree_constant.

	* pt-exp.h, (tree_boolean_expression): New class.
	(tree_unary_expression, tree_binary_expression,
	tree_boolean_expression): Move codes here from tree_expression.
	(tree_simple_assignment_expression): Cope with changes to way of
	doing assignments.

	* pt-exp-base.h, (enum type): Delete codes for
	unary and binary ops.
	(tree_expression::expression_type): Delete.
	(tree_expression::is_logically_true): Hand off to
	octave_value::is_true to do real work.

	* pr-output.h, (any_element_is_inf_or_nan,
	all_elements_are_ints): Delete.  Call member new functions for
	these operations.
	(free_format, plus_format, bank_format, hex_format,
	compact_format, print_e, print_big_e): Use bool, not int.
	(octave_print_internal): Hand off to scalar/real versions when

	* (main): Call initialize_types() and install_ops().
	(verbose_usage): Add WWW address to output.

	* parse.y (indirect_ref): Handle by making a tree instead of a
	list using new version of tree_indirect_ref class.

	* parse.y (make_boolean_op): New function.  Use it instead of
	make_binary_op to create trees for && and || ops.
	(make_binary_op): Codes come from tree_binary_expression now,
	instead of tree_expression.
	(make_unary_op): Codes come from tree_unary_expression now,
	instead of tree_expression.
	(make_boolean_op): Codes come from tree_boolean_expression.
	 *parse.y (tree_constant_type): Change type to tree_constant* from
	octave_value*, and rename from octave_value_type.  Change uses.

	* defun.h (DEFVAR_INT): Pass octave_value not pointer to
	octave_value for defn when creating builtin_variable.

	* gripes.h, (gripe_invalid_conversion): Args are
	strings, not char*.
	(gripe_implicit_conversion, gripe_divide_by_zero): New extern
	gripe functions.

	* mkbuiltins: For each file, create a separate static function to
	install builtins, then create another single extern function to
	call all of them.

	* (tree_function::bind_nargin_and_nargout):
	Just pass doubles and let symbol_record::define handle creating
	new value.

	*, pt-pr-code.h (visit_constant): Renamed from
	(visit_unary_expression): Use tree_expression::is_prefix_op()
	instead of switch on op types.

	* pt-walk.h (visit_constant): Renamed from visit_octave_value.

	* (initialize_undefined_elements): Get reference to
	tmp, then assign.
	* (do_for_loop_once): Likewise, for loop identifier.

	* (generate_struct_completions, looks_like_struct): Cast
	tmp_fvc to tree_constant*, not octave_value*.
	(get_user_input): Call print() on retval, not eval(1).

	* (Ftype): Cast defn to tree_constant*, not octave_value*.

	* Fix docstring.

	Include pt-fvc.h.

	* (Fstruct_contains): call octave_value::struct_elt_val,
	not octave_value::lookup_map_element.

	* (Fcd): Pass directory name as string directly to
	bind_builtin_variable instead of creating new octave_value.

	* Include pt-fvc.h and lo-mappers.h

	Include variables.h.

	*,,,,,,,, lex.l,,
	oct-map.h,, oct-obj.h,,,,,,,, pt-mvr.h,,,,,
	Include ov.h instead of pt-const.h.

	* (any_element_is_negative): Delete.
	(xpow and elem_xpow functions): Check conformance here.

	* (mx_leftdiv_conform, mx_div_conform):
	Now template-based, taking Matrices instead of dimensions as args.
	Change all callers.

	*, op-cm-cm.h,, op-cm-cs.h,,
 	op-cm-m.h,, op-cm-s.h,, op-cs-cm.h,, op-cs-cs.h,, op-cs-m.h,,
 	op-cs-s.h,, op-m-cm.h,, op-m-cs.h,,
	op-m-m.h,, op-m-s.h,, op-s-cm.h,,
 	op-s-cs.h,, op-s-m.h,, op-s-s.h,, op-str-str.h,, ops.h,, ov-base.h,, ov-ch-mat.h,, ov-colon.h,,
 	ov-complex.h,, ov-cx-mat.h,, ov-range.h,, ov-re-mat.h,, ov-scalar.h,,
	ov-str-mat.h,, ov-struct.h,,
 	ov-typeinfo.h,, ov-va-args.h,, ov.h:
 	New files for Octave's new type system.
	* Add them to the appropriate lists.

Sat Sep 14 21:58:33 1996  John W. Eaton  <>

	* mkbuiltins: Use .df instead of .def.
	Write one function for each .df file, then call them
	all in install_builtin_functions().
	* Handle .df instead of .def.

	* (balance): Fix typo in doc string.

Wed Aug 28 21:01:49 1996  John W. Eaton  <>

	* (verbose_usage): Include WWW address and bug-octave
	mailing list address.

Tue Aug 20 17:41:19 1996  John W. Eaton  <>

	* Only define pattern rules for making .oct files if
	OCTAVE_LITE is true.
	Only add pic/ to $(TI_OBJ) if $(SHARED_LIBS) is true.
	(stamp-picdir): Only create a pic subdirectory if SHARED_LIBS or

	* (Fmin, Fmax): Deal with changes to Matrix class
	min/max methods.

Thu Jul 25 01:42:38 1996  John W. Eaton  <>

	* (generate_possible_completions): Force the names to be

	* (read_mat_binary_data): Expect to read terminating
	NUL character in the variable name.
	(save_mat_binary_data): Likewise, save it here.

Wed Jul 24 05:08:07 1996  John W. Eaton  <>

	* (Flsode): Don't set the return value if an error
	occurred during integration.
	* (Fdassl): Likewise.

	* (symbols_of_file_io): Redefine values of SEEK_SET,
	SEEK_CUR, and SEEK_END for Matlab compatibility.
	* (seek): Check for compatible values of ORIGIN arg.
	Also handle "bof", "cof", and "eof".

Fri Jul 19 15:24:36 1996  John W. Eaton  <>

	* When creating octave_value_reps from ComplexMatrix
	values, check to see if all the elements are actually real.

Tue Jul 16 10:53:42 1996  John W. Eaton  <>

	* (decode_prompt_string): Swap meanings of \h and \H.

Mon Jul 15 16:01:51 1996  John W. Eaton  <>

	* (run_command_and_return_output): Renamed from do_system.
	(Fsystem): Make `system ("emacs")' work as one would expect.

Sun Jul 14 17:34:33 1996  John W. Eaton  <>

	* (Ffopen, Ffread, Ffwrite): Update doc strings,
	correctly handle default architecture and precision args.

	* (mopt_digit_to_float_format): Rename from
	(float_format_to_mopt_digit): New function.

	* (octave_base_stream::read, octave_base_stream::write):
	Simplify by calling Matrix::read and Matrix::write to do real work
	of reading, writing, and format conversion.

	* oct-stream.h (octave_base_stream): Move data_type enum to
	liboctave/data-conv.h.  Use float_format from
	liboctave/mach-info.h instead of arch_type enum.

	* sysdep.h, (octave_words_big_endian, ten_little_endians):
 	Delete.  Now part of oct_mach_info class in liboctave.

Tue Jul  9 11:18:59 1996  John W. Eaton  <>

	When indexing arrays, use operator() instead of elem() so that
	bounds checking can be done consistently.

Mon Jun 24 02:13:27 1996  John W. Eaton  <>

	* (install-oct): Use INSTALL_PROGRAM, instead of
	INSTALL_DATA for installing shared libraries.

	* lex.l (grab_help_text): Ignore all initial comment characters,
	not just the first.
	* (gobble_leading_white_space): Likewise.

Sat Jun 22 22:43:45 1996  John W. Eaton  <>

	* input.h, (octave_completion_matches_called): New varaible.
	(Fcompletion_matches): Set it to true on a successful call.
	* (main_loop): If octave_completion_matches_called is
	true, don't increment current_command_number.

Thu Jun 13 03:52:19 1996  John W. Eaton  <>

	* (is_mapper_function_name,
	is_builtin_function_name): New functions.
	(Fdocument): Use them.
	Define as regular function, not a text style function.

Thu Jun  6 00:09:25 1996  John W. Eaton  <>

	* Handle new built-in variable `gnuplot_has_frames'.

Wed Jun  5 14:45:04 1996  John W. Eaton  <>

	* (decode_prompt_string): \h now means the whole host
	name and \H is the host name up to the first `.'.

Thu May 30 23:41:51 1996  John W. Eaton  <>

	* (octave_fcn_file_name_cache::do_list): Always
	recompute the lists of function files instead of trying to cache

Tue May 28 12:05:24 1996  John W. Eaton  <>

	* (warn_old_style_preference): New function.
	(check_preference): Use it.

	* fn-cache.h: Include <ctime> here.

Fri May 24 00:57:14 1996  John W. Eaton  <>

	* (completion_matches): Don't return empty string_vectors.

	* (long_opts): Add braindead.

Thu May 23 01:49:33 1996  John W. Eaton  <>

	* (gnu_readline): New optional arg, force_readline.
	(get_user_input): Use it.

	* (OCT_VAL_REP::assign): If converting the rhs to a
	numeric value, convert a copy, not the actual object.
	(OCT_VAL_REP::do_index): Prevent s([]) from resulting in a string
	with zero rows.

	* Handle toascii here.
	* Not here.

	* Handle tolower and toupper here.
	* mappers.h: Rename can_return_complex_for_real to flag and
	overload meaning for ch_mapper.
	* (apply_mapper_fcn): Handle overloaded meaning.

	* (stat): Return 3 values instead of just 1.
	(lstat): Likewise.

Wed May 22 02:34:20 1996  John W. Eaton  <>

	* (OCT_VAL_REP::make_numeric): For string to number
	conversions, correctly set type tag before calling force_numeric.
	(do_binary_op): Force string to number conversion if both args are
	strings and we are doing some sort of comparison operation.

	* (stamp-tinst, stamp-interp): Use SH_TERMLIBS and
	SH_LIBS instead of TERMLIBS and LIBS.

	* (do_unary_op): Add special case to handle
	transposing strings.

	* (Vstring_fill_char): New variable.
	(symbols_of_pt_mat): DEFVAR it.

	* (generate_struct_completions,
	generate_possible_completions):	Return string_vector, not char **.
	Change all callers.

	* (lookup_map_element): Use substr() correctly.

Tue May 21 21:37:17 1996  John W. Eaton  <>

	* oct.h: New file.
	* (INCLUDES): Add it to the list.

	* New args --no-site-file and --no-init-file.  Delete
	--ignore-init-file.  The flag --norc (-f) implies both
	--no-site-file and --no-init-file.

Fri May 17 01:54:51 1996  John W. Eaton  <>

	* (Fcompletion_matches): New function.

	* (get_fcn_file_names): Delete.
	* (simple_help): Use new file name cache instead of
	calling get_fcn_file_names.
	* (make_name_list): Likewise.

	* fn-cache.h,, New files.
	* Add them to the lists.

	* (uninstall): Install in octincludedir, not includedir.

	* pt-plot.h: Include <csignal> here.

Thu May 16 10:52:51 1996  John W. Eaton  <>

	* (octave_stream::oscanf, octave_base_stream::oscanf,
 	octave_base_stream::do_oscanf): New functions for backward
	compatibility with older versions of Octave.
	(scanf_format_elt, scanf_format_list): Keep track of width specifier.
	* (Fscanf): New function.
	(Fscanf, Ffscanf, Fsscanf): Handle compatibility arg.

Wed May 15 01:00:12 1996  John W. Eaton  <>

	* (do_scanf): If doing '%c' conversion, unset
	ios::skipws on input stream.

	* sighandlers.h, (octave_child, octave_child_list):
	New classes for keeping track of the child processes we create.
	(sigchld_handler): Check in octave_child_list to see if there is
	anything we can do for the child that died.
	* Register child pager process.
	* Likewise, for the plotter.
	* New file
	* (TI_SRC): Add it to the list.

	* (do_sync): Don't check error_state.
	(flushing_output_to_pager): New static variable.
	(flush_octave_stdout): Use it to avoid doing anything if already
	flushing output.

	* (sigchld_handler): Call warning instead of
	writing directly to cerr.
	(sigpipe_handler): Call warning instead of message.

	* (main): Call install_signal_handlers,
	initialize_file_io, initialize_symbol_tables, and install_builtins
	before parsing command line options.

	* user-prefs.h, Delete.

	* (check_preference): Move here.
	* From here.

	* New file.  Move initialization stuff from  Move DEFVARS for EDITOR, EXEC_PATH, LOADPATH,

	* user-prefs.h, Delete all stuff related to
	* Move all of that here.
	(symbols_of_help): Add DEFVARS for INFO_FILE and INFO_PROGRAM.

Tue May 14 00:23:06 1996  John W. Eaton  <>

	* (do_sync): Be more defensive about sending stuff to the
	external pager.
	* (sigchld_handler): For now, only wait for
	octave_pager_pid.  Don't call error().  Do set octave_pager_pid to
	-1 if the pager process no longer exists.

	* user-prefs.h, Delete all stuff related to
	* Move all of that here.
	(symbols_of_dirfns): New function.
	* (install_builtin_variables): Call it.

	* user-prefs.h, Delete all stuff related to
	default_save_format and save_precision.
	* Move all of that here.
	(symbols_of_load_save): New function.
	* (install_builtin_variables): Call it.

	* user-prefs.h, Delete all stuff related to
	* Move all of that here.
	(symbols_of_arith_ops): New function.
	* (install_builtin_variables): Call it.

	* Add wrappers for ctype is* functions so that they
	will work on systems that only define them as macros.

Mon May 13 00:27:08 1996  John W. Eaton  <>

	* user-prefs.h, Delete all stuff related to
	* Move all of that here.
	(symbols_of_help): New function.
	* (install_builtin_variables): Call it.

	* user-prefs.h, Delete all stuff related to
	* Move all of that here.

	* (octave_pager_stream::do_sync): Don't return early if
	not interactive.

	* data.h: New file.
	* (INCLUDES): Add it to the list.
	* (symbols_of_data): New function.  Move definition of I,
	Inf, J, NaN, e, eps, i, inf, j, nan, pi, realmin, and realmax here.
	* From here.
	(install_builtin_variables): Call symbols_of_data.

	* (symbols_of_file_io): New function.  Move definition
	of SEEK_CUR, SEEK_END, SEEK_SET, stdin, stdout, stderr here.
	* From here.
	(install_builtin_variables): Call symbols_of_file_io.

	* user-prefs.h, Delete all stuff related to
	do_fortran_indexing, implicit_str_to_num_ok,
	ok_to_lose_imaginary_part, prefer_column_vectors,
	prefer_zero_one_indexing, print_answer_id_name,
	propagate_empty_matrices, resize_on_range_error, and
	* Move all of that here.
	(symbols_of_pt_const): New function.
	* (install_builtin_variables): Call it.
	* (tree_identifier::assign): Use Vresize_on_range_error
	instead of user_pref.resize_on_range_error here.
	* (save_mat_binary_data): Use Vimplicit_str_to_num_ok
	instead of user_pref.implicit_str_to_num_ok here.
	* (empty_arg): Use Vpropagate_empty_matrices instead of
	user_pref.propagate_empty_matrices here.
	* (tree_expression::is_logically_true): Likewise..

	* (symbols_of_pt_fcn): Also move DEFVAR for
	default_return_value here.

	* user-prefs.h, Delete all stuff related to
	ps1, ps2, ps4, and completion_append_char.
	* Move all of that here.
	(symbols_of_input): New function.
	* (install_builtin_variables): Call it.
	* (indent): Use Vps4 instead of user_pref.ps4 here.
	* (Ftype): Also here.

	* user-prefs.h, Delete all stuff related to
	automatic_replot, gnuplot_binary, and gnuplot_has_multiplot.
	* Move all of that here.
	(symbols_of_pt_plot): New function.
	* (install_builtin_variables): Call it.

	* user-prefs.h, Delete all stuff related to
	* Move all of that here.
	(symbols_of_error): New function.
	* (install_builtin_variables): Call it.

	* user-prefs.h, Delete all stuff related to
	* Move all of that here.
	(symbols_of_pt_mat): New function.
	* (install_builtin_variables): Call it.

	* user-prefs.h, Delete all stuff related to
	define_all_return_values, return_last_computed_value, and
	* Move all of that here.
	(symbols_of_pt_fcn): New function.
	* (install_builtin_variables): Call it.

	* user-prefs.h, Delete all stuff related to
	* lex.l: Move all of that here.
	(symbols_of_lex): New function.
	* (install_builtin_variables): Call it.

	* user-prefs.h, Delete all stuff related to
	warn_assign_as_truth_value, warn_comma_in_global_decl,
	warn_function_name_clash, and warn_missing_semicolon.
	* parse.y: Move all of that here.
	(symbols_of_parse): New function.
	* (install_builtin_variables): Call it.

	* user-prefs.h, Delete all stuff related to
	output_precision, output_max_field_width, print_empty_dimensions,
	and split_long_rows.
	* Move all of that here.
	(symbols_of_pr_output): New function.
	* (install_builtin_variables): Call it.

	* user-prefs.h, Delete all stuff related to
	page_screen_output, page_output_immediately, and pager_binary.
	* Move all of that here.

	* user-prefs.h (check_preference): Provide declaration.
	* (check_preference): Make external.

	* (Foctave_config_info): New function.

	* New file
	* (oct-conf.h): New target.
	Add it to the appropriate lists.

	* (sigchld_handler): Don't complain about wait
	returning a negative value.

	* (Fsscanf, Fsprintf): Pass true for second arg of
	octave_stream constructor.

	* oct-stream.h (octave_stream): New field, preserve.
	(octave_stream::~octave_stream): If preserve, don't delete rep.

	* (symbols_of_pager): Set default for
	page_output_immediately to 0.

	* (do_system): Correctly handle return_output.
	Append ends to output_buf before calling str().

	* If M_PI and M_E are available, use them.

	* (links_dir): If old link exists, delete it first.

Sun May 12 01:46:07 1996  John W. Eaton  <>

	* (DISTFILES): List and oct-gperf.h here.
	(INCLUDES): Not here.
	(install-inc): New target.
	(uninstall): Also delete libraries and include files.
	(install-inc): If linkdir is a directory, leave it alone.
	(TERMLIBS, LIBPLPLOT, LIBDLFCN): Don't substitute here (now in

	* (octave_base_stream::do_read): Provide initial
	value for tmp var.

	* pt-walk.h, pt-pr-code.h, New tree-walking classes.
	* Add them to the appropriate lists.
	* pt-fvc-base.h,,,,,, pt-mat.h,,,,, pt-const.h,,,, pt-plot.h, pt-mvr.h, pt-mvr-base.h, pt-misc.h,
	pt-fcn.h, pt-exp.h,, pt-exp-base.h, pt-fvc.h, pt-cmd.h,
	Replace print_code stuff with accept() functions.
	Add member access functions where necessary.
	* (Ftype): Update to use new method of walking trees to
	print text representation of user-defined functions.

	* (Ffscanf): Update doc string.
	(Fsscanf): Likewise.

	* (octave_base_stream::do_read): Correctly set max_size.
	Pad mval with zeros on final resize.
	(octave_base_stream::do_scanf): Likewise.
	(do_scanf_conv): Correctly resize mval.
Sat May 11 05:14:09 1996  John W. Eaton  <>

	* (octave_pager_buf::sync): Correctly set bypass_pager.

	* lex.l (<MATRIX>{SNLCMT}*\]{S}*): Match SNLCMT, not just SNL.

Fri May  3 11:05:30 1996  John W. Eaton  <>

	* (OCT_VAL_REP::set_index): Complain if type can't be

	* (get_user_input): Don't increment input line number if
	input is coming from eval string.

	* Allow empty strings for prompts.

Thu May  2 10:50:29 1996  John W. Eaton  <>

	* pt-mvr.h (class tree_oct_obj): Declare values data member const.

Sun Apr 28 03:16:52 1996  John W. Eaton  <>

	* user-prefs.h (user_preferences): New field,
	* (init_user_prefs): Initialize it.
	(page_output_immediately): New function.
	* (syms_of_pager): Add DEFVAR.
	(really_flush_to_pager): New file-scope variable.
	(flush_octave_stdout): Set and restore it.
	(octave_pager_buf::sync): Check it, user_pref.page_screen_output,
	and user_pref.page_output_immediately to decide when to really
	flush output.
	(more_than_a_screenful): New function.  If paging but not
	immediately, then check this too.

	* (default_pager): Move here from  If pager
	is less and LESS is not in the environment, append useful flags.
	(symbols_of_pager): New function.
	* (install_builtin_variables): Call it.
	Delete pager-related DEFVARs.	

	* syswait.h (WIFSIGNALLED): Define if sys/wait.h doesn't.

	* Handle SIGCHLD.

	*, pager.h: Rewrite.
	Write to octave_stdout and octave_diary instead of calling
	maybe_page_output() or maybe_write_to_diary_file().

	* oct-procbuf.h, New files.
	* procstream.h (class procstreambase): Use octave_procbuf instead
	of procbuf from libg++, so we can get pids of subprocesses.

Fri Apr 26 01:21:29 1996  John W. Eaton  <>

	* (OCT_VAL_REP::do_index): Call maybe_mutate() before

	* mappers.h (struct Mapper_fcn): Delete.
	(struct builtin_mapper_function): New field ch_mapper.
	* pt-fvc.h (tree_builtin): Convert type of mapper_fcn from
	Mapper_fcn to builtin_mapper_function.
	* (install_builtin_mapper): Likewise, for arg.
	Simplify, since we don't have to do the copying ourselves now.
	* (apply_mapper_function): Handle ch_mapper case.
	* defun.h (DEFUN_MAPPER): Likewise.
	* (install_builtin_mappers): Likewise.
	Add ctype is* functions here.

Thu Apr 25 00:57:06 1996  John W. Eaton  <>

	* arith-ops.h, defun-int.h, defun.h, dynamic-ld.h, gripes.h,
	load-save.h, oct-map.h, oct-obj.h, oct-stream.h, pt-cmd.h,
	pt-const.h, pt-exp-base.h, pt-exp.h, pt-fcn.h, pt-fvc-base.h,
	pt-fvc.h, pt-mat.h, pt-misc.h, pt-mvr-base.h, pt-mvr.h, pt-plot.h,
	symtab.h, toplev.h, utils.h, variables.h, xpow.h,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, parse.y:
	Rename tree_constant -> octave_value.
	Rename Octave_object -> octave_value_list.

Wed Apr 24 22:15:34 1996  John W. Eaton  <>

	* (Fsystem): Merge functionality of async_system and

	* oct-fstrm.h, oct-iostrm.h, oct-prcstrm.h, oct-stdstrm.h,
	oct-stream.h, oct-strstrm.h,,,,,,, New files.
	* Add them to the appropriate lists.
	* Rewrite to use new stream classes.

Tue Apr 23 18:59:25 1996  John W. Eaton  <>

	* (gripe_not_supported): New function.

	* (do_octave_atexit, Fatexit): New functions.
	(octave_atexit_functions): New file-scope variable.
	* (main): Register do_octave_atexit with atexit.

	* (install_builtin_variables): Call
	symbols_of_syscalls here.

	* syscalls.h, New files.

Mon Apr 22 21:14:01 1996  John W. Eaton  <>

	* New file.
	(Flstat, Fmkfifo, Fstat, Funlink, Fwait, Fwaitpid): Move here.
	* From here.
	* (SOURCES): Add to the list.

Wed Apr 17 18:34:10 1996  John W. Eaton  <>

	* file-info.h, Delete files.
	* Remove from lists.

	* (Fquit): Accept exit status argument.
	(Fflops): Delete (now a function file).

Thu Apr 11 16:20:20 1996  John W. Eaton  <>

	* lex.l: Recognize `.'.
	Update current_input_column even for unrecognized characters.
	Return LEXICAL_ERROR for unrecognized characters.

Mon Apr  8 19:59:01 1996  John W. Eaton  <>

	* (install_builtin_variables): Split into several
	functions to make compiling with g++ go faster and consume less
Sun Apr  7 16:25:35 1996  John W. Eaton  <>

	* (Fsave): Print usage if i == argc.
	(Fload): Likewise.	

Sat Apr  6 21:26:49 1996  John W. Eaton  <>

	* (clean): Also delete pic/*.o
	(maintainer-clean, distclean): Also remove stamp-picdir,
	stamp-tinst, stamp-interp, and pic directory.
	(stamp-prereq): New target.

Wed Apr  3 11:19:30 1996  Rick Niles  <>

	* Don't make including sys/resource.h and sys/times.h
	mutually exclusive.

Fri Mar 29 13:43:37 1996  John W. Eaton  <>

	* (distclean): Delete so_locations, which is created
	on DEC Alpha systems.

Thu Mar 28 02:53:48 1996  John W. Eaton  <>

	* utils.h (undo_string_escape): Provide extern declaration here.

	* lex.l (NL): Allow \r\n as new line character.
	(.): Complain if invalid character is found on input

Fri Mar 22 03:47:52 1996  John W. Eaton  <>

	* (getrusage): If getrusage is missing, try using
	times to at least fill in the cpu time values.  If neither one is
	available, return 0 for cpu times instead of NaN.
	* (octave_signal_mask): New file-scope variable.
	(octave_save_signal_mask, octave_restore_signal_mask): New functions.
	* (main_loop): Use them.

Wed Mar 20 01:21:28 1996  John W. Eaton  <>

	* (get_fcn_file_names (const string&, int)): Resize
	retval to value of k, not i.
	(get_fcn_file_names (int)): In loop for copying names to retval,
	don't increment j twice.

Mon Mar 18 22:27:19 1996  John W. Eaton  <>

	* ($(MAKEDEPS)): Depend on oct-gperf.h.

Fri Mar  1 18:15:52 1996  John W. Eaton  <>

	* (fsolve_options): Delete unused argument nargout.

	* Use MArray instead of Array so that automatic
	conversions will work again.

Tue Feb 27 04:49:51 1996  John W. Eaton  <>

	* (looks_like_octave_copyright): Make the strings
	that we are trying to match both have length 29.

	* (install-bin): Use $(INSTALL_PROGRAM), not $(INSTALL).

	* (read_mat_binary_data): Make sure name is
	NUL terminated.

Mon Feb 26 18:18:45 1996  John W. Eaton  <>

	* (whos): Make argv from tmp_args, not args.

	* defun.h (DEFCONSTX): Don't stringify name.

Sat Feb 24 01:12:59 1996  John W. Eaton  <>

	* (install-oct): Make mk-oct-links executable.
	* (links_dir): Update to match new format of
	DEFUN_DLD_BUILTIN macro.  Use LN_S, not just LN.

	* (octave_print_internal): New arg, extra_indent, for
	versions of this function that take matrices and ranges.
	* (TC_REP::print (ostream&)): Fix printing of structures.
	Pass struct_indent to octave_print_internal as appropriate.
	(print_with_name (ostream&, const string&, bool)): Handle spacing
	around `=' differently for structures.

Fri Feb 23 04:51:04 1996  John W. Eaton  <>

	* (token (double, const string&, int, int)): Store orig_text.

Tue Feb 20 20:36:01 1996  John W. Eaton  <>

	* (Fclear): Fix off-by-one error.

Sat Feb 17 16:54:02 1996  John W. Eaton  <>

	* (default_history_file): Append "/.octave_hist" to
	return value, not to home_directory.

Fri Feb 16 18:10:46 1996  John W. Eaton  <>

	* (NINT, D_NINT): Move to liboctave.

	* (octave_ieee_init): Move to liboctave.

	* procstream.h, Rewrite.

	* (cleanup_oprocstream): New static function.
	* (cleanup_iprocstream): Likewise.
	* (cleanup_iprocstream): Likewise.

	* (matrix_cleanup, complex_matrix_cleanup): Delete.

Thu Feb 15 22:03:28 1996  John W. Eaton  <>

	*, oct-obj.h: Move most code to the header.

	* (make_argv, all_strings): New member functions.
	* Moved from here.

	* Move byte swapping stuff to liboctave.
	Move float format conversion stuff to liboctave.
	(all_parts_int, too_large_for_float): Move to liboctave.

	* (valid_identifier): Move here.
	* From here.

	* Move floating-point format stuff to liboctave.
	* Include float-fmt.h here.

Wed Feb 14 01:49:20 1996  John W. Eaton  <>

	* defun.h, defun-dld.h, defun-int.h: Simplify interface for DEFUN,
	DEFUN_DLD, DEFVAR, and DEFCONST macros.  Change all uses.

	* Move guts to liboctave.

Tue Feb 13 10:28:27 1996  John W. Eaton  <>

	* (parse_fcn_file): Also avoid saving history if
	input is from a script file.

	* (Ftype): Call unwind_protect_str for user_pref.ps4.

	* (nonlinear_constraints_ok): Now static.

	* (linear_constraints_ok): Now static.
	* (linear_constraints_ok): Duplicate here.

	* (Flinspace): Don't print usage message if nargin == 2.

Sun Feb 11 14:20:32 1996  John W. Eaton  <>

	* Rename from mk-oct-links.
	(LN_S): Use this variable instead of ln.
	Set -e option for shell.
	Exit with status of last command.
	Print message when making link.
	* (DISTFILES): Add to the list.
	(install-oct): Run ./mk-oct-links, not $(srcdir)/mk-oct-links.

	* (install_builtin_variables): Restore accidentally
	deleted DEFVAR for save_precision.

Fri Feb  9 11:24:32 1996  John W. Eaton  <>

	* (INCLUDES): Delete statdefs.h from the list (it's
	now in the liboctave directory).

	* (toplevel): Define here.
	* (toplevel): Not here.

	* (main_loop): New function.
	* (main): Call it here instead of doing main loop
	actions here.

	* (do_fortran_indexing): Also set liboctave_dfi_flag.
	(prefer_column_vectors): Also set liboctave_pcv_flag.
	(prefer_zero_one_indexing): Also set liboctave_pzo_flag.
	(resize_on_range_error): Also set liboctave_rre_flag.

	* (restore_command_history): New function.
	(parse_fcn_file): Use it here in unwind_protect.

	* (load_octave_oct_file): Reverse sense of test.
	(load_octave_builtin): Delete.
	(mangle_octave_oct_file_name): Delete.

	* (tree_builtin::eval): Don't try to dynamically load
	functions here.

	* (set_format_style): Decrement argc for first arg too.
	* (gnu_readline): If readline returns an empty string,
	convert it to a string containing a single newline character.

	* (octave_argv): Now a static string_vector.
	(intern_argv): Use string_vector ops, not charMatrix ops.
	* (octave_argv): Delete definition.
	* toplev.h (octave_argv): Delete declaration.

Thu Feb  8 10:58:24 1996  John W. Eaton  <>

	* (conf-dist): New target.

Tue Feb  6 10:59:45 1996  John W. Eaton  <>

	* (Ftype): Correctly handle structure names.

Sun Feb  4 02:02:20 1996  John W. Eaton  <>

	* (Fqpsol): Call set_options(), not copy() to set
	options for QPSOL objects.

	* (Fnpsol): Call set_options(), not copy() to set
	options for NPSOL objects.

	* (Fquad): Call set_options(), not copy() to set
	options for Quad objects.

	* (load_octave_builtin): Don't call destructor on string.
	(load_octave_oct_file): Likewise.
	Check oct_file.empty(), not just oct_file.

	* (Ffsolve): Call set_options(), not copy() to set
	options for NLEqn object.

	* (do_who): Properly set match patterns from argument
	vector for call to maybe_list.

Sat Feb  3 03:29:33 1996  John W. Eaton  <>

	* (long_opts): Properly set second field using new enum.

	* Change ODE to LSODE where appropriate.
	Use LSODE_options, not ODE_options.

	* Change DAE to DASSL where appropriate.
	Use DASSL_options, not ODE_options.

Fri Feb  2 01:41:37 1996  John W. Eaton  <>

	* Include unistd.h.

	* parse.y, lex.l: Handle matrix lists without ml or mlnm stacks.
	* pt-mat.h, (tree_matrix):
	Rewrite to use SLList instead of home brew list.
	* New file
	* Add it to the lists.
	* Delete.
	* Delete it from the lists.

	* All pt-* files: Use bool instead of int where appropriate.

	* (DEP_SOURCES_3): Add

	* pt-const.h (class tree_constant::tree_constant_rep): Make
	everything in this class public, then it doesn't need to declare
	the tree_constant class as a friend.

Thu Feb  1 01:42:45 1996  John W. Eaton  <>

	* lex.h, lex.l, parse.h, parse.y (class lexical_feedback): New
	class for lexer flags.  Replace lots of global vars with members
	of this class.

	* lex.l (class brace_paren_nesting_level): New class to replace
	nesting_level stack.  nesting_level is now an instance of this

	* lex.l (yum_yum): New typedef.
	(ATE_NOTHING): New global var.
	(ATE_SPACE_OR_TAB, ATE_NEWLINE): Don't #define these, declare them
	as const yum_yum.
	(eat_whitespace, eat_continuation): Return yum_yum, not int.

	* lex.l (SHORT_CIRCUIT_LOGICALS): Delete.  Always do this for ||
	and && tokens.
	(yy_flex_alloc, yy_flex_realloc, yy_flex_free, next_char_is_space):

	* (verbose_flag): Delete definition.
	* toplev.h (verbose_flag): And declaration.
	* (verbose_flag): Now static.

	* lex.l (lookup_identifier): Arg is now string, not char*.
	(handle_identifier, is_plot_keyword, is_keyword): Likewise.
	(strip_trailing_whitespace): Return value is now string, not char*.
	(plot_style_token): Likewise, for both arg and return value.

	* (octave_gets_line): Delete.
	(gnu_readline, octave_gets, octave_read):
	Properly handle input when using_readline is either true or false.
	Don't limit length of input lines to flex buffer size.
	(get_user_input): New function.

	* (main): Handle --no-line-editing.
	* toplev.h (using_readline): Provide external declaration here.
	* input.h: Not here.
	* (using_readline): Define here.
	* Not here.

	* toplev.h (no_line_editing): Delete declaration.
	* (no_line_editing): Delete definition.

Wed Jan 31 05:28:45 1996  John W. Eaton  <>

	* (DEFAULT_ARRAY_SIZE, PROMPT_GROWTH): Delete definitions
	of unused macros.
	(read_octal): Now static.

	* (Fgivens): Use new functions from matrix classes
	instead of calling Fortran functions directly.
	* (Fsyl): Likewise.
	* (Fexpm): Likewise.

Mon Jan 29 00:00:48 1996  John W. Eaton  <>

	* Use new prog_args class instead of calling getopt

	* getopt.h, getopt.c, getopt1.c: Move to liboctave directory.
	* Makefile: Remove from lists.

	* (strconcat, read_until, discard_until): Delete.

	* (terminal_columns, terminal_rows): Move to
	*, Include oct-term.h.

	* (list_in_columns): Moved to liboctave/
	Change all callers to use new member function syntax.

	* (absolute_program): Now static.
	(absolute_pathname): Delete.

	* (save_in_tmp_file): Call oct_tempnam, not
	octave_tmp_file_name.  Include file-ops.h.	
	* (do_scanf, Foctave_tmp_file_name): Likewise.
	* (mk_tmp_hist_file): Likewise.

	* (Foctave_tmp_file_name): Move here.
	* From here.

	* (octave_tmp_file_name): Move to liboctave/

	* tempname.c, tempnam.c: Move to liboctave directory.
	* Remove from lists.

Sun Jan 28 19:00:52 1996  John W. Eaton  <>

	* (all xdiv functions): Return Matrix or ComplexMatrix,
	not tree_constant.

	* oct-hist.h,,,,,, Rewrite to use new command_history
	class instead of calling readline history functions directly.

	* (get_fcn_file_names): Delete num arg.

Thu Jan 25 20:33:54 1996  John W. Eaton  <>

	* (matches_patterns): Use new glob_match class
	instead of calling fnmatch directly.
	* (matches_patterns, symbol_table::glob): Likewise.
	* (Fclear): Likewise.

Wed Jan 24 02:05:22 1996  John W. Eaton  <>

	* fnmatch.h fnmatch.c: Delete.
	* Add glob stuff in the appropriate places, remove
	fnmatch.h and fnmatch.c from lists.

	* (program_invocation_name, program_invocation_short_name):
	Maybe declare.
	(initialize_globals): Maybe initialize them.

	* (initialize_pathsearch): Define here, not in
	* pathsearch.h, Remove files.
	* Remove them from the lists.
	* (simple_help): Ignore directories that don't have any .m
	or .oct files.

	* (search_path_for_file): Use new dir_path class instead
	of calling kpathsea routines directly.
	(get_fcn_file_names): Likewise.
	* (simple_help): Likewise.

	* (make_absolute): Don't convert empty arg to "./".

	* sysdir.h: Move to liboctave directory.
	* Remove from lists.

	* (Freaddir): Use new dir_entry class instead of calling
	readdir directly.  Include dir-ops.h, not sysdir.h.
	* (get_fcn_file_names): Likewise.  Delete unnecessary
	first arg, change all callers.

Tue Jan 23 00:43:12 1996  John W. Eaton  <>

	* safe-xstat.hin, safe-xstat.cin, statdefs.h, file-ops.h,, filemode.c, mkdir.c, rmdir.c, rename.c:
	Files moved to liboctave directory.
	* Remove them from lists.  Move appropriate rules.

	* acosh.c, asinh.c, atanh.c, erf.c, erfc.c, gamma.c, lgamma.c:
	Files moved to liboctave directory.
	* Remove them from lists.
	* missing-math.h: Deleted.
	*,,,,, Include oct-math.h, not cmath or missing-math.h.

Mon Jan 22 19:33:05 1996  John W. Eaton  <>

	* (Fexist): Use file_stat instead of calling stat
	directly.  Include file-ops.h, not statdefs.h.
	* (execute_startup_files): Likewise.
	* (file_io_get_file, fopen_internal, popen_internal, Fstat):
	(mk_stat_map): Likewise, use file_stat object, not struct stat.
	* (do_history): Likewise.

	* file-ops.h, New files.
	* Include them.
	* Delete is_newer.  Don't include statdefs.h.
	* Don't include statdefs.h.

Sun Jan 21 22:48:03 1996  John W. Eaton  <>

	* pt-mvr.h, pt-fvc.h,, Map.h, dynamic-ld.h,,, pt-fcn.h, pt-fvc-base.h,,,, token.h,,
	user-prefs.h,,, dirfns.h, sysdep.h,, input.h, parse.h, lex.l, parse.y, defun.h, mappers.h,, pt-plot.h, load-save.h,, defun-int.h, help.h,
	variables.h, oct-map.h, oct-obj.h,,,,, symtab.h, pt-const.h,,
	pr-output.h,, toplev.h,,,,,,,,, file-info.h,,, utils.h,,,,,,,,,, oct-hist.h,,,,, unwind-prot.h,,
	Most functions in these files that deal with character strings
	have been converted to use the string class insatead of char*.  If
	you want more detailed information, you'll have to figure it out
	for yourself.

Sat Jan 20 18:19:12 1996  John W. Eaton  <>

	* [WITH_DL]: Define RTLD_LAZY to be 1 if it is not
	already defined.

Sun Jan 14 07:48:05 1996  John W. Eaton  <>

	* (print_as_scalar, print_as_structure):
	Make these member functions.
	(tree_constant::print_with_name): New function, moved here from
	old file (where it was called print_constant) and
	converted to member function.  Change all callers.

Fri Jan 12 01:54:49 1996  John W. Eaton  <>

	* (initialize_globals): Don't do kpathsearch stuff here.
	(main): Call initialize_pathsearch() here.
	* New file.
	* (SOURCES): Add it to the list

	* oct-hist.h: Rename from octave-hist.h.
	* Rename from
	*, parse.y, other .cc files: Cope with it.

	* Avoid warnings if !WITH_DYNAMIC_LINKING.

	* (save_ascii_data): string::data() returns const char*.

	* utils.h: Don't provide forward declaration for tree_constant.

	* oct-obj.h: Don't include mx-base.h or provide forward
	declarations for Matrix and Range types.

	* file-info.h: Don't include oct-obj.h.  Do include cstdio.

	* symtab.h: Don't provide forward declaration for ostream.

	* variables.h: Don't provide forward declarations for istream,
	ostrstream, tree, builtin_function, or builtin_variable objects.

	Clean up #include statements.

	* pt-const.h: Don't include oct-obj.h or tree-base.h.
	Provide forward declaration of Octave_object here.
	* Include oct-obj.h here.

	* pt-mat.h, pt-fcn.h, pt-const.h, pt-misc.h, pt-plot.h,
	pt-exp-base.h, pt-cmd.h, pt-fvc-base.h, pt-mvr-base.h, pt-exp.h,
	pt-mvr.h, pt-fvc.h: New files, split from tree-expr.h and/or
	renamed from other tree-*.h files (pt == parse tree).
	*,,,,,,,,,,,, Likewse, split from
	and/or other tree-*.cc files.
	* Include them in the appropriate lists.
	* All: Fix #include statements to match.

	* Don't instantiate ArrayRep objects.

Thu Jan 11 02:35:19 1996  John W. Eaton  <>

	* (tree_constant::eval (int, int, const Octave_object&)):
	Define here instead of in tree-const.h.

Wed Jan 10 04:34:20 1996  John W. Eaton  <>

	* tree-const.h (tree_constant::tree_constant (const string&):
	* (TC_REP::tree_constant_rep (const string&)):
	New constructor.

Tue Jan  9 04:10:29 1996  John W. Eaton  <>

	* (do_rand): Use string_value() result directly instead of
	c_str() conversion.
	* (Fbalance): Likewise.

	* (TC_REP::string_value()):
	Handle new definition of charMatrix::row_as_string()
	* (save_ascii_data): Ditto.
	(save_binary_data): Ditto.
	* (octave_print_internal): Ditto.

	* (Fbalance):
	Handle new definition of TC_REP::string_value()
	* (Fcolloc): Ditto.
	* (Fdassl_options): Ditto.
	* (Fstruct_contains): Ditto.
	* (Fmkdir): Ditto.
	(Freaddir): Ditto.
	(Frmdir): Ditto.
	(Frename): Ditto.
	* (handle_message): Ditto.
	* (process_printf_format): Ditto.
	(fopen_internal): Ditto.
	(file_io_get_file): Ditto.
	(return_valid_file): Ditto.
	(Flstat): Ditto.
	(Fstat): Ditto.
	(unlink_internal): Ditto.
	(mkfifo_internal): Ditto.
	(async_system_internal): Ditto.
	(sync_system_internal): Ditto.
	(execute_internal): Ditto.
	(popen_internal): Ditto.
	(fwrite_internal): Ditto.
	(fread_internal): Ditto.
	(do_printf): Ditto.
	(do_scanf): Ditto.
	* (get_user_input): Ditto.
	* (Flsode_options): Ditto.
	* (Fnpsol_options):Ditto.
	* (Fqpsol_options):Ditto.
	* (Fquad_options): Ditto.
	* (do_rand): Ditto.
	* (Fschur): Ditto.
	* (Fputenv): Ditto.
	(Fgetenv): Ditto.
	* (extract_tm): Ditto.
	(Fstrftime): Ditto.
	* (Fsource): Ditto.
	(eval_string): Ditto.
	(Fsystem): Ditto.
	* (subplot::handle_plot_data): Ditto.
	* (is_valid_function): Ditto.
	(Fis_global): Ditto.
	(Fexist): Ditto.
	(builtin_string_variable): Ditto.
	* (make_argv): Ditto.
	(Fundo_string_escapes): Ditto.

Mon Jan  8 01:54:50 1996  John W. Eaton  <>

	* (install-bin): Use $(LN_S), not just ln.

	* (octave_fcn_file_dir): New function.
	* (mark_as_system_fcn_file): Use it instead of

	* (clean): If $(SHARED_LIBS), also remove shared libs.

	* (set_format (const ComplexMatrix&, int&, int&)):
	Unconditionally call all_elements_are_int_or_inf_or_nan().
	(set_format (const Matrix&, int&, int&)): Likewise.

Sun Jan  7 19:12:39 1996  John W. Eaton  <>

	* (oct_putenv): New function.
	* (Fputenv): Use oct_putenv.
	* (initialize_globals): Likewise.

Sat Jan  6 23:22:37 1996  John W. Eaton  <>

	* (Fputenv): New function.

	* (initialize_readline): Call rl_initialize() here.

	* Conditionally define atexit to be on_exit here.
	* Not here.

Fri Jan  5 14:01:02 1996  John W. Eaton  <>

	* Don't include <pwd.h> here.

	*,, Do include "sysdep.h".

	Don't include <readline/tilde.h>.
	* sysdep.h: Do include it here.

	* (TC_REP::assign (tree_constant&, Octave_object&)):
 	If we have a matrix or range, call maybe_mutate before returning.

Sun Dec 31 15:56:18 1995  John W. Eaton  <>

	* (Fnpsol): Improve doc string.
	* (Fqpsol): Likewise.

Fri Dec 29 21:46:58 1995  John W. Eaton  <>

	* defun-dld.h: Make work again for OCTAVE_LITE and

	* Handle shared libraries.

Wed Dec 27 17:47:51 1995  John W. Eaton  <>

	* mk-oct-links: New file.
	* (install-oct): Use it.
	* f-*.cc: Rename to *.cc.

	* (install-bin, install-lib, install-oct): New targets.
	(install): Use them.

Tue Dec 26 21:38:22 1995  John W. Eaton  <>

	* (reading_startup_message_printed): Move initialization
	here and make extern.

	*,,,,,,,,,,,, parse.y, lex.l: Include toplev.h instead
	of octave.h.
	* toplev.h: rename from octave.h.

	* (main): Delete unused variable saved_sigint_handler.

Sun Dec 24 00:26:54 1995  John W. Eaton  <>

	* Massive re-write to handle dlopen/dlsym and
	shl_load/shl_findsym methods of dynamic linking.

	* (get_fcn_file_names): Check for .oct files if

	* (LIB, TERMLIBS): Substitute values.
	(octave): Add $(LIBS) to link command and use $(TERMLIBS) instead
	of -ltermcap.

Sat Dec 23 21:56:12 1995  John W. Eaton  <>

	* dynamic-ld.h, Remove old unused code.

	* (load_fcn_from_file):
	Always call load_octave_oct_file.

Wed Dec 20 00:56:57 1995  John W. Eaton  <>

	* (set_real_format, set_real_matrix_format,
	set_complex_format, set_complex_matrix_format, set_range_format):
	New functions.  Ensure the count of the digits to the right of the
	decimal point is positive.

	* (xpow (const Matrix&, double)): Print warning if
	inverting singular matrix (but return value anyway, in the name of
	xpow (const ComplexMatrix&, double)): Likewise.

	* (Finv): If matrix is singular, return result anyway, in
	the name of compatibility.

	* (symbol_record::pop_context):
	Don't assert (! context.empty ()).

	* (TC_REP::char_matrix_value): Don't complain about
	type conversion if object is an empty matrix.f
	(TC_REP::assign): If rhs is a string, don't convert to numeric
	type if rhs is empty or "".
	Only widen if rhs is not empty.
	Don't return 0x0 char_matrix if it is supposed to be a string.
	* arith-ops.h, mappers.h, pr-output.h, xdiv.h, xpow.h: Include
	oct-cmplx.h in place of forward declaration for class Complex.

	*,,,,, Include "oct-cmplx.h" instead of <Complex.h>.

	* (initialize_error_handlers): Don't call
	(octave_Complex_error_handler): Delete unused function.
	Delete declaration for set_Complex_error_handler().

	* (catch_interrupts): New function.
	* (main): Call catch_interrupts() instead of calling
	octave_set_signal_handler() directly.

Tue Dec 19 03:22:37 1995  John W. Eaton  <>

	* (looks_like_octave_copyright): Also recognize the
	string " This program is free software".

Thu Dec 14 01:54:06 1995  John W. Eaton  <>

	* (clean_up_history): Only write history file if

	* (initialize_history, clean_up_history,
	do_history): Perform tilde expansion on history file name.

	* (main): Check `defined (HAVE_ON_EXIT)' not just

	* user-prefs.h (user_preferences): New fields, `history_file' and
	* (init_user_prefs): Initialize them.
	(sv_history_file, history_size): New functions.
	* (install_builtin_variables): Initialize user-level
	variables history_file and history_size.
	* (default_history_size): Now extern.
	(default_history_file): Likewise.
	(octave_hist_size, octave_hist_file): Use user preference
	variables instead.
	* (main): Call initialize_history after

Fri Dec  8 15:53:59 1995  John W. Eaton  <>

	* user-prefs.h (user_preferences): New field, `saving_history'.
	* (init_user_prefs): Initialize it.
	(saving_history): New function.
	* (install_builtin_variables): Initialize user-level
	variable saving_history.
	* (parse_and_execute): Don't reset value of
	saving_history here.
	(main) Use user_pref.saving_history instead of saving_history.
	* (parse_fcn_file): Likewise.
	* (maybe_save_history): Likewise.
	Don't save history if input_from_startup_file.

Mon Nov 27 23:05:52 1995  John W. Eaton  <>

	* Include systime.h before <sys/resource.h>.

Tue Nov 14 14:09:40 1995  John Eaton  <>

	* Include cstring.

	* (print_code): Decrement indent level after printing
	function body.

	* Remove references to, oct-str.h, and

	* tree-const.h: Don't include oct-str.h.

Mon Nov  6 11:16:49 1995  John Eaton  <>

	* parse.y (make_plot_command, finish_colon_expression,
	make_unwind_protect, make_try_command, make_for_command,
	make_break_command, make_continue_command, make_return_command,
	start_if_command, finish_if_command, make_elseif_clause,
	make_simple_assignment, make_multi_val_ret, start_function_def,
	frob_function_def, finish_function_def, start_matrix,
	finish_matrix):  New functions.  Use them in the grammar to clean
	things up a bit.  Possibly convert matrix lists, colon
	expressions, binary expressions, and unary expressions to constant
	(tree_matrix_type): Delete.
	(simple_expr1): Handle all expression stuff here, including
	(simple_expr): Just check to see that simple_expr1 produced
	something useful.

	*, tree-plot.h: Move most simple constructors to the
	header file.

	* tree-expr.h (tree_expression::is_constant): Move virtual
	function definition here.
	(tree_fvc::is_constant): From here.
	(tree_expression::is_matrix_constant): New virtual function.
	(tree_expression::is_range_constant): New virtual function.
	* (tree_matrix::is_matrix_constant): New function.
	* (tree_colon_expression::is_range_constant): New

Fri Nov  3 03:42:04 1995  John Eaton  <>

	*, utils.h (jump_to_top_level): Declare as extern "C".

	* tree-const.h (tree_constant::eval ()): Only mutate if printing.

	* (TC_REP::tree_constant_rep (const Complex&),
	TC_REP::tree_constant_rep (const ComplexMatrix&),
	TC_REP::tree_constant_rep (const ComplexDiagMatrix&),
	TC_REP::tree_constant_rep (const ComplexRowVector&),
	TC_REP::tree_constant_rep (const ComplexColumnVector&)):
	Also check to see if we can convert to scalar_constant, not just

	* user-prefs.h (user_preferences): New field, `exec_path'.
	* (init_user_prefs): Initialize it.
	(sv_exec_path): New function.
	* (install_builtin_variables): Add DEFUN for EXEC_PATH.
	(default_exec_path): New function.
	* (exec_path): New global variable.
	Don't set and putenv() exec path here.
	(long_opts): Add --exec-path option.
	(main): Handle it.
	(initialize_globals): Set default value here.

	* user-prefs.h (user_preferences): New field, `info_prog'.
	* (init_user_prefs): Initialize it.
	(sv_info_prog): New function.
	* (install_builtin_variables): Add DEFUN for INFO_PROGRAM.
	(default_info_prog): New function.
	* (info_prog): New global variable.
	(initialize_globals): Set default value here.
	(long_opts): Add --info-prog option.
	(main): Handle it.
	* (try_info): Use user_pref.info_prog here.

	* (initialize_globals): Put arch_dir and bin_dir ahead
	of shell_path when resetting PATH.

Thu Nov  2 04:30:13 1995  John Eaton  <>

	* (Frandn): New function.
	(do_initialization): New function.
	(do_rand): New function for doing the real work.
	(Frand): Use it.

	* (parse_and_execute): New arg, warn_for.  If given,
	print message if file cannot be opened.
	Set curr_fcn_file_full_name here. 
	(Fsource): Pass extra arg to parse_and_execute to get warning message.

	* tree-const.h: Handle line and column info for double, Complex,
	and char* constants.

	* parse.y (maybe_convert_to_ans_assign): Pass along line and
	column info from expression.

	* parse.y (make_constant): New function.
	(simple_expr1, word_list): Use it.
	*, input.h (curr_fcn_file_full_name): New global.
	* (load_fcn_from_file): Set it here.
	* parse.y (func_def2, yyerror, maybe_warn_missing_semi): Use it.
	(func_def2): If !reading_fcn_file, don't call strcmp if
	curr_fcn_file_name is 0.

	* (Fsource): New function.
	(parse_and_execute): Declare file name const char *.
	* (get_input_from_file): Likewise.

Wed Nov  1 13:54:34 1995  John Eaton  <>

	* New file.
	* (DLD_SRC): Add it to the list.

	* sysdep.h (gethostname): Change declaration to match definition

	* Include sysdep.h here, for octave_NaN.

Tue Oct 31 02:12:18 1995  John Eaton  <>

	* (TC_REP::assign): After converting rhs to a
	numeric type, use the converted value, not the original.

	* (Fpwd): If nargout == 0, print the directory name
	instead of returning it.

	* (maybe_page_output): Call maybe_write_to_diary_file here.
	(flush_output_to_pager): Not here.

Mon Oct 30 23:39:43 1995  John Eaton  <>

	* (install_builtin_commands): Add DEFVAR for

	* (do_edit_history): Handle new echo stuff.
	* (parse_fcn_file): Likewise.
	* (parse_and_execute): Likewise.
	(main): Likewise.
	* (do_input_echo):
	(Fecho): New function.
	* (tree_function::print_code_function_header,
	tree_function::print_code_function_trailer): New functions.
	(tree_function::print_code): Use them.
	(tree_function::eval): Likewise, if echoing commands.
	* (tree_statement::maybe_echo_code): New function.

	* user-prefs.h (user_preferences): New field, echo_executing_commands.
	(echo_state): New enum, for various types of echoing we do.
	* (echo_executing_commands): New function.

	* (print_code_indent): Print PS4 as line prefix.
	* (Ftype): Add unwind_protect for ps4 and set it to ""
	before printing code.

	* tree-misc.h (tree_statement_list): New field, function_body.
	(tree_statement_list::mark_as_function_body): New function.
	* parse.y (func_def3): Mark function bodies.

	* (octave_print_internal): Undo string escapes when
	printing charMatrix as strings.

Sat Oct 28 17:38:29 1995  John Eaton  <>

	* utils.h (undo_string_escapes): Add missing const in declaration.

Fri Oct 27 03:49:44 1995  John Eaton  <>

	* (next_available_file_number): New stack for keeping
	track of next available file number.
	(get_next_avail_file_num): New function.
	(fopen_file_for_user, fopen_internal, popen_internal,
	execute_internal): Use it.

Mon Oct 23 07:00:09 1995  John Eaton  <>

	* (TC_REP::convert_to_matrix_type,
	tree_constant::convert_to_matrix_type): New arg, make_complex.
	(TC_REP::set_index): New arg, rhs_is_complex.  Pass it to
	(TC_REP::assign): Pass rhs.is_complex_type() to set_index.

Thu Oct 19 00:38:38 1995  John Eaton  <>

	* Include <climits>.

	* (Fpause): Do pause even if not interactive.

	* (TC_REP::assign): Don't make RHS numeric if both
	RHS and LHS are strings.

Wed Oct 18 22:19:16 1995  John Eaton  <>

	* (Fexpm): Avoid taking log of negative number.  Also,
	don't unnecessarily divide the input matrix by 1.0.

	* (decode_prompt_string): Recognize \[ and \] too.
	(initialize_readline): Bind M-p to history-search-backward and M-n
	to history-search-forward.

Tue Oct 17 04:31:06 1995  John Eaton  <>

	* (xpow): Handle integer powers better for complex^double.
	(elem_xpow): Likewise.

	* lex.l ({CCHAR}): If is BRACE, return ';',
	not '\n'.

Mon Oct 16 19:03:45 1995  John Eaton  <>

	* (Fwhich): Fix doc string.

	* (Fexist): Update doc string.

Sun Oct 15 22:19:16 1995  John Eaton  <>

	* Another massive set of changes to support character matrices
	with indexing.  The Octave_str_object class is no longer used.
	Anything having to do with Octave_str_object in the following
	files has been changed to use charMatrix instead: octave.h,,,,, pr-output.h,, tree-const.h,,,

Sat Oct 14 22:28:18 1995  John Eaton  <>

	* (mx_sort): Don't attempt to sort vectors that have
	only one element, or matrices that have only one row.

Thu Oct 12 02:16:58 1995  John Eaton  <>

	* (install_mapper_functions): Add gammaln as an alias
	for lgamma.

	* tree-const.h, Massive overhaul of indexing and
	indexed assignment functions.
	* tc-inlines.h, tc-rep.h: Remove files.
	* Remove mention of them here too.

	* Include $(TI_SRC) in DEP_SOURCES_3, not
	Include $(DLD_SRC) in DEP_SOURCES_3.
	Include $(TI_SRC) in DEF_FILES_5.

Wed Oct 11 01:26:18 1995  John Eaton  <>

	* (INCLUDES): Remove tc-inlines.h and tc-rep.h from
	the list.

Mon Oct  9 08:31:04 1995  John Eaton  <>

	* lex.l (next_token_is_bin_op): Do match `.+', `.*', etc.

Sun Oct  8 18:19:56 1995  John Eaton  <>

	* idx-vector.h, Delete files.
	* (SOURCES, INCLUDES): Remove them from lists.

Fri Oct  6 00:52:06 1995  John Eaton  <>

	* (Fsvd): If nargout == 0 or nargout == 1, don't ask for
	U and V.

Wed Oct  4 00:04:57 1995  John Eaton  <>

	* (Fnpsol, Fnpsol_options): Avoid unused variable
	warnings if NPSOL_MISSING.
	* (Fqpsol, Fqpsol_options): Likewise for QPSOL_MISSING.

	* (DISTFILES): Add octave.gperf.

	* lex.l (next_token_is_bin_op): Don't ever return true for `.'
	since that causes problems with things like [ .1 .1 ].

Tue Oct  3 05:30:24 1995  John Eaton  <>

	* (is_valid_function): Avoid setting error_state if
	argument is not a string.

	* parse.y (maybe_warn_missing_semi): New function.
	(list1, list): Call it if statement not terminated by semicolon.
	* tree-misc.h (tree_statement::line, tree_statement::column):
	New functions.
	* (input_from_command_line_file): New global variable.
	(main): Set it.
	(parse_and_execute): Unwind-protect it and set it to zero.
	(eval_string): Likewise.
	* (parse_fcn_file): Likewise.

	* (warn_missing_semicolon): New function.
	* user-prefs.h (user_preferences): New field, warn_missing_semicolon.
	* (install_builtin_variables): DEFVAR it.
	* (tree_expression::is_logically_true): Actually use

Mon Oct  2 19:55:48 1995  John Eaton  <>

	* (install_builtin_variables): Reduce the default
	value of save_precision to 15.

	* (builtin_real_scalar_variable): Return 1 for
	success, 0 for failure.

	* (struct_levels_to_print, set_save_precision,
	set_output_max_field_width, set_output_precision):
	Change sense of test for builtin_real_scalar_variable return value.
	(check_preference): Rename from check_str_pref.  Change all callers.
	Accept value of 0 to be the same as "false" and nonzero to be the
	same as "true".
	Delete val to avoid memory leak.
	* (install_builtin_variables): Change initial values
	from "true" to 1, "false" to 0.

	* (install_builtin_variables): Add DEFVAR for

	* user-prefs.h (user_preferences): New field,
	* (init_user_prefs): Initialize it.
	(gnuplot_has_multiplot): New function.

Sat Sep 30 16:52:57 1995  John Eaton  <>

	* oct-gperf.h, octave.gperf: Newfiles.
	* (DISTFILES): Add octave.gperf.
	(INCLUDES): Add oct-gperf.h.
	(oct-gperf.h): New rule.
	(local-dist, dist): Depend on oct-gperf.h.
	* lex.l (is_keyword): Use perfect hash function to lookup

Fri Sep 29 04:36:04 1995  John Eaton  <>


Thu Sep 28 00:03:51 1995  John Eaton  <>

	* (tree_expression::is_logically_true): New function.
	* (tree_while_command::eval): Use it instead of
	handling the test directly here.
	* (tree_if_clause::eval): Likewise

	* (TC_REP::force_numeric): Don't try to print value
	of str_obj with %s.

	* (buffer_error_messages): Rename from
	(error_message_buffer): New global variable.
	(verror): Handle buffering of messages.
	(handle_message): New function.
	(Ferror, Fwarning, Fusage): Use it instead of duplicating code.

	* (Feval): Buffer error messages instead of supressing them.

	* lex.l (is_keyword): Recognize `try', `catch', and `end_try_catch'.
	* parse.y (TRY, CATCH): New tokens.
	(command): Recognize try-catch block.
	(end_error): Add cases for unwind_protect_end and try_catch_end.
	* token.h (end_tok_type): New field, try_catch_end.
	* tree-cmd.h, (tree_try_catch): New class.
	* (bind_global_error_variable): New Function.
	(clear_global_error_variable): Likewise.
	(install_builtin_variables): Add DEFCONST for __error_text__.
	* (keywords): Add `try', `catch', and `end_try_catch'.

	* (tree_unwind_protect::eval): Undo previous change.

	* (Freaddir, Fmkdir, Frmdir):
	Do tilde expansion on the argument.

Tue Sep 26 00:10:29 1995  John Eaton  <>

	Don't try to figure out if the user-supplied functions take the
	correct number of arguments.  Simply let the call fail.
	* (takes_correct_nargs): Delete unused function.
	* (tree_builtin::eval): Don't complain for too many
	arguments to mapper functions.
	* tree-expr.h, (tree_builtin, tree_function, tree_fvc):
	Delete unused function max_expected_args.

	* defun.h (DEFUN): Delete unnecessary args nargin_min and nargout_max.
	New arg unused_arg_flags.
	(DEFUN_TEXT): Likewise.
	* defun-dld.h (DEFUN_DLD_BUILTIN): Likewise.
	Do the real work.

	*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, lex.l,,,,, octave.h,,,,,,,,,,, tree-expr.h,,, unwind-prot.h,,,
 	variables.h, version.h,
	Avoid unused variable warnings.

	* tree-expr.h (tree_oct_obj::print_value (ostream&)):
	Delete name of unused arg.
	(tree_fvc::save (ostream&, int, int): Likewise.

	* tree-const.h (tree_constant::tree_constant (magic_colon)):
	Delete name of unused arg.
	(tree_constant::tree_constant (all_va_args)): Likewise
	(ColumnVector vector_value (int, int)): Likewise.
	(ComplexColumnVector vector_value (int, int)): Likewise.
	(Octave_object::eval (int, int, const Octave_object&): Likewise.

	* (execute_startup_files): Look for octaverc first in
	site/m, then in $(version)/m.
	* (get_local_site_defaults): New function.
	New macros.
	* (defaults.h): Also substitute ${localfcndir}.

Mon Sep 25 17:01:03 1995  John Eaton  <>

	* (install_builtin_variables): Add DEFCONST for "e".

Fri Sep 22 02:18:45 1995  John Eaton  <>

	* (Fls): Delete ls_command after using it, not before.

	* input.h, (gnu_readline): Don't declare gnu_readline
	`extern "C"'.

	* sysdep.h: Only declare gethostname if it is missing, then don't
	declare it `extern "C"'.

	* Don't declare strerror().

	* (command_generator): Use malloc, not xmalloc.  Don't
	declare xmalloc.
	(gnu_readline): Don't declare this `extern "C"'.

	* Don't declare history_get().  It is now in

	* Don't declare history_get().  It is now in

	* Don't surround include of sys/resource.h in
	`extern	"C" { }'.

	* fnmatch.h [__cplusplus]: Surround contents in `extern "C" { }'.
	*,, Don't surround
	fnmatch.h include in `extern "C" { }'.

	* Don't #undef __FUNCTION_DEF before including

	Don't surround readline includes in `extern "C" { }'.

	* Move all include statements to top of file.

Tue Sep 19 01:58:21 1995  John Eaton  <>

	* (Fsystem): Use iprocstream *, and unwind_protect it.
	* (flush_output_to_pager): Likewise.
	* (Fls): Likewise.
	* (plot_stream): Now a pointer.
	(open_plot_stream): Deal with it.
	(send_to_plot_stream, cleanup_tmp_files, do_external_plotter_cd):

	* (cleanup_iprocstream, cleanup_oprocstream):
	New functions. 

	* procstream.h, (class iprocstream, class oprocstream):
	Keep track of pbuf.  Initialize it to 0 in default constructors,
	delete it in destructor.  Don't call close in destructor.

	* (octave_set_signal_handler): New function.
	Use this name instead of signal everywhere.
	* (try_info): Likewise.
	* (flush_output_to_pager): Likewise.
	* (main): Likewise.
	* (do_edit_history): Likewise.

	* (initialize_readline): Set rl_paren_string_delimiters
	to avoid treating single quotes as string delimiters when doing
	paren matching.

	* (SOURCES): Don't list or here.

	* Do include utils.h.

	* Don't surround terminal includes in extern "C".
	Include them before readline.h.

	* Map.h: Don't include utils.h.
	(CHNode::CHNode (const char*, const C&, CHNode *t):
	Do strsave() inline.

	* (generate_possible_completions): Generate name list
	even when text == 0.
	(operate_and_get_next): Don't declare history_stifled, call
	history_is_stifled () instead.
	Don't declare history_length, or max_input_history either.
	Check (where >= history_length - 1) too, as in recent versions of
	* user-prefs.h (user_prefs): New field, `completion_append_char'.
	* (init_user_prefs): Initialize it.
	(sv_completion_append_char): New function.
	* (install_builtin_variables): Install
	* (command_generator): Use it.

	*,,,, Include config.h.
	* Include file-info.h, not file-io.h.

Mon Sep 18 11:01:24 1995  John Eaton  <>

	* octave.h (clean_up_and_exit): Tag with NORETURN instead of using
	typedef trick.
	* error.h (panic): Likewise.
	* utils.h (jump_to_top_level): Likewise.

	* file-io.h: Protect from multiple includes with octave_file_io,
	not octave_files.

	* file-info.h (class file_info): Convert to using std C++ string
	class from char *.
	* Likewise.  Don't include utils.h.
	* (return_valid_file, fopen_file_for_user,
	fflush_internal, do_scanf): Use operator ==, not strcmp.
	(close_files): Call error with ().data (),
	not ().
	(freport_internal): Call form with file.mode ().data () and ().data ().

	*, file-io.h: Extract file_info class.
	*, file-info.h: New files for file_info class.

	* user-prefs.h (user_prefs): New field, `beep_on_error'.
	* (init_user_prefs): Initialize it.
	(beep_on_error): New function.
	* (install_builtin_variables): Install beep_on_error.
	* (maximum_braindamage): Set beep_on_error to "true".
	* (verror): Conditionally beep.
	(error): Don't reset error_state until after verror is called.

Sun Sep 17 16:41:25 1995  John Eaton  <>

	* (read_mat_binary_data, read_ascii_data,
	save_ascii_data, read_binary_data, save_binary_data):
	Handle string arrays.

Fri Sep 15 00:24:19 1995  John Eaton  <>

	* (struct_levels_to_print,
	set_output_max_field_width, set_output_precision,
	set_save_precision): Eliminate unecessary kludge variable.
	* (gobble_leading_white_space): New arg,
	in_parts.  Change all callers.

	* lex.l (HELP_FCN): Delete start state.  The `help' command is now
	handled the same as any other text-style function.

	* (gripe_invalid_value_specified): New function
	* Use it.

	* (octave_words_big_endian): New global variable.
	(ten_little_endians): New function.
	(sysdep_init): Call it.
	* (words_big_endian): Use this at run-time instead of
	depending on WORDS_BIGENDIAN at compile-time.

	* symtab.h (SYMTAB_VARIABLES): New macro.
	* (Fclear): Use it instead of just
	symbol_def::USER_VARIABLE when looking for variables.

	* (main): If there is a file to execute, set
	program_invocation_name and program_name to the name of the file
	and argv to the remaining args.
	(intern_argv): Only define argv if there are some remaining

	* defun.h (DEFVAR_INT): New macro.
	(DEFVAR): Define in terms of DEFVAR_INT.  Delete args protect and
	(DEFCONST): New macro.
	* (install_builtin_variables): Use DEFCONST where
	appropriate, change uses of DEFVAR to match new definition.

	* (bind_builtin_variable): New variant that accepts
	const tree_constant& value.
	(install_builtin_variables): Properly alphabetize DEFVAR for this.

	* (short_opts): Prefix with `+' to prevent argv
	(main): Don't use readline if forced_interactive.
	(traditional): New file-scope variable.
	(long_opts, usage_string, verbose_usage): Add `--traditional'.
	(maximum_braindamage): New function.
	(main): Call it if --traditional.

	* (do_input_echo): Print prompt correctly when
	forced_interactive is either true or false.

Thu Sep 14 00:54:06 1995  John Eaton  <>

	* (Fstruct_elements): New function.

	* (Fumask): New function.

	* (Fmkdir, Frmdir, Frename): New functions.

	* Add rules and dependencies for building safe-stat.o
	and safe-lstat.o.

	* mkdir.c, rename.c, rmdir.c: New files.
	* (SOURCES): Include them in the list.

	* safe-xstat.hin, safe-xstat.cin: New files
	* (DISTFILES): Include them in the list.

	* (octave_new_handler): Try to continue on memory
	exhausted errors.
	(sigfpe_handler): Improve error message.

	* Use `ifndef omit_deps', not `ifndef $(omit_deps)'.

	* (Freaddir): New function.

	* Complete rewrite.  Now uses stable sort algorithm and
	correctly handles complex matrices containing columns of all real

Wed Sep 13 03:16:40 1995  John Eaton  <>

	* Unconditionally #define DIVIDE_BY_ZERO_ERROR.

	* (install_builtin_variables): Unconditionally
	install NaN and nan.

	* (xisinf): Don't do bogus things if isinf, isnan, or
	finite are missing.
	(xfinite): Likewise.

	* (octave_ieee_init): Don't set octave_NaN and
	octave_Inf if values are not available.

	* (mk_ru_map): Don't use ru_ or tv_ as prefixes to
	Octave names for the structure members.

Tue Sep 12 02:04:16 1995  John Eaton  <>

	* procstream.h, Rewrite.

Mon Sep 11 18:42:05 1995  John Eaton  <>

	* filemode.c: New file, from Emacs.
	* (SOURCES): Add it to the list.

	* (Fstat, Flstat, mk_stat_map): New functions.

	* (mk_tm_map): Don't use tm_ as prefix to Octave names
	for these structure members.
	(extract_tm): Likewise.
	(Flocaltime): Fix doc string to match.

Thu Sep  7 02:04:27 1995  John Eaton  <>

	* (save_user_variables): New function.
	* (my_friendly_exit): Call it before exiting.
	(sigfpe_handler): New function.
	(install_signal_handlers) [__alpha__]: Install it.

Wed Sep  6 14:35:10 1995  John Eaton  <>

	* (tree_unwind_protect::eval): Ignore errors and
	suppress error messages while executing first block of
	unwind_protect commands.

	* parse.y (end_error): Add missing case for unwind_protect_end.

	* (tree_builtin::eval): Complain if no arguments
	given for mapper functions.
	(tree_fvc::lookup_map_element): Print error message for invalid
	structure reference.

Tue Sep  5 02:04:12 1995  John Eaton  <>

	Add const qualifiers where appropriate.

	* dirfns.h: Include <ctime>, for time_t.

	* tempname.c,,,,,,,,,,,,, sysdir.h:
	Move #include <sys/type.h> inside #ifdef HAVE_UNISTD_H.

	* syswait.h: New file.
	* (INCLUDES): Add it to the list.
	*, Use it instead of including
	sys/wait.h directly.

	* Include statdefs.h, not sys/stat.h.

	* sysdir.h: New file.
	* (INCLUDES): Add it to the list.
	*, Use it instead of including the headers

	* pathlen.h: New file.
	* (INCLUDES): Add it to the list.
	*, Use it instead of including sys/param.h
	* Don't include sys/param.h

Sun Sep  3 18:52:59 1995  John Eaton  <>

	* (TC_REP::string_value): Return const char*, not
	char *.

	* All .cc, .y, .l, .y files: Include <cctype>, not <ctype.h>, and
	so on for all new C++ versions of these standard C headers.

Thu Aug 31 17:09:38 1995  John Eaton  <>

	* pathsearch.h: Also hide `string'.

	*, oct-str.h: New files.
	* Add to the appropriate lists.
	* tc-rep.h: Change char* to Octave_string* in anonymous union.
	* (tree_matrix::eval): Handle multiple element strings.
	* (toascii): Likewise.
	* (print_as_string): Likewise.
	(TC_REP::force_numeric, TC_REP::rows, TC_REP::columns,
	TC_REP::double_value, TC_REP::complex_value, TC_REP::matrix_value,
	TC_REP::complex_matrix_value, TC_REP::convert_to_str): Likewise.
	(TC_REP::print): Call octave_print_internal for string case.
	(all_strings): New function.
	Fix constructors to use new data structure.
	* (octave_print_internal): Add version for strings.
	* New file.

	* (octave_argv): New global variable.
	(intern_argv): New function.
	(main): Fix argument parsing to do the right thing for arguments
	to executable scripts.
	* Add DEFUNs for argv, program_invocation_name, and

	* defun.h (DEFVAR): Fix comment.

Thu Aug 24 00:02:00 1995  John Eaton  <>

	* (fgets_internal): Make second arg optional.  Add
	optional arg `strip_final_newline'.
	(Ffgets): Change to match new definition of fgets_internal.
	(Ffgetl): Implement using the new fgets_internal.

	* (Frand): Update code for sizing return value to match
	that used by ones, zeros, and eye.

Wed Aug 23 19:52:45 1995  John Eaton  <>

	* (do_vector_assign): Don't crash for
	A(range) = scalar, or A(matrix) = scalar.

	* (set_dassl_option): Rename from do_dassl_option.
	(show_dassl_option): New function.
	(Fdassl_options): Handle single arg.
	* (set_fsolve_option): Rename from do_fsolve_option.
	(show_fsolve_option): New function.
	(Ffsolve_options): Handle single arg.
	* (set_fsqp_option): Rename from do_fsqp_option.
	(show_fsqp_option): New function.
	(Ffsqp_options): Handle single arg.
	* (set_lpsolve_option): Rename from do_lpsolve_option.
	(show_lpsolve_option): New function.
	(Flpsolve_options): Handle single arg.
	* (set_lsode_option): Rename from do_lsode_option.
	(show_lsode_option): New function.
	(Flsode_options): Handle single arg.
	* (set_npsol_option): Rename from do_npsol_option.
	(show_npsol_option): New function.
	(Fnpsol_options): Handle single arg.
	* (set_qpsol_option): Rename from do_qpsol_option.
	(show_qpsol_option): New function.
	(Fqpsol_options): Handle single arg.
	* (set_quad_option): Rename from do_quad_option.
	(show_quad_option): New function.
	(Fquad_options): Handle single arg.
	(Fquad): Doc fix.

Tue Aug 22 00:38:05 1995  John Eaton  <>

	* (do_external_plotter_cd): New function.
	* (octave_change_to_directory): New function.  If cd is
	successful, also call do_external_plotter_cd().
	(Fcd): Call octave_change_to_directory(), not change_to_directory().

	* (pr_any_float): Change declaration of counter to
	size_t to avoid gcc warnings.

	Update for change in for loop variable scope for gcc 2.7.0.

Mon Aug 21 19:34:53 1995  John Eaton  <>

	* (fortran_style_matrix_assignment): Properly handle
	case of complex LHS, real RHS.

	* Only include dependency files if $(omit_deps) is
	not set.

Wed Jul  5 00:03:58 1995  John Eaton  <>

	* Explicitly include string.h.

Sun Jun 25 00:18:10 1995  John Eaton  <>

	* (too_large_for_float (const Matrix&)):
	Extract elements as doubles, not Complex.

Sat Jun 24 22:59:15 1995  John Eaton  <>

	* (any_element_is_inf_or_nan): Declare extern, not static.
	* (Fsvd): Call here to avoid trying to take SVD of matrix
	containing Inf or NaN values.

	* (bit_format): New file-scope variable.
	(set_format, pr_any_float): Handle bit_format.
	(octave_print_internal): Handle bit_format like bank_format.
	(init_format_state): Initialize bit_format.
	(set_format_style): Allow `format bit' and `format native-bit'.

Thu Jun  8 15:20:26 1995  John Eaton  <>

	* (arg, imag, signum): If arg is NaN, return NaN.

Mon May 15 14:47:04 1995  John Eaton  <>

	* (Fdiary): Initialize diary_file here, not in the
	file-scope declaration.

	* (tree_index_expression::eval):
	Handle nargin == 0 the same as other cases. 

Tue May  2 10:02:23 1995  John Eaton  <>

	* (do_double_format_conversion): Add missing breaks.
	(do_float_format_conversion): Likewise.

Mon May  1 13:50:24 1995  John Eaton  <>

	* (OCTAVE_LIBS): Add @LIBPLPLOT@ to the list.

	* (Ftime): Handle GETTIMEOFDAY_NO_TZ.

	* (SOURCES): Delete,, and from the list.

	* tree-const.h: Add #pragma interface.
	* Add contents of,, and to this file.  Add #pragma implementation.  This makes large, but makes the final binary smaller.
	*  unwind-prot.h token.h
	procstream.h idx-vector.h symtab.h oct-map.h oct-obj.h tree-plot.h tree-misc.h tree-expr.h
	tree-cmd.h tree-base.h:
	Add #pragma interface/implementation.

	* (OCTAVE_LIBS): Delete @LIBINFO@ from list.
	* Don't include info headers or extern declarations for
	functions from info.
	(try_info): Call info as a subprocess.	Delete second arg.
	Handle SIGINT here, not in help_from_info().
	(help_from_info): Complain if info doesn't work.

	If ! WITH_DLD, simply emit a character string constant.

Fri Apr 28 15:23:06 1995  John Eaton  <>

	* lex.l ({IDENT}{S}*): Don't delete tok.  That's handled by
	strip_trailing_whitespace() now.
	(<HELP_FCN>[^ \t\n]*{S}*|<TEXT_FCN>[^ \t\n\;\,]*{S}*): Ditto.

	* pathsearch.h: Include kpathsea/progname.h.
	* (initialize_globals): Call kpse_set_progname().

	* token.h: Declare copy constructor and operator = private.
	* Abort if copy constructor or operator = is used.

Thu Apr 27 13:54:39 1995  John Eaton  <>

	* (lookup_map_element): Don't list default argument
	values here too.

	* (hex_format): New file-scope variable.
	(set_format, pr_any_float): Handle hex_format.
	(octave_print_internal): Handle hex_format like bank_format.
	(init_format_state): Initialize hex_format.
	(set_format_style): Allow `format hex' and `format native-hex'.

	* (bind_ans): Create ans_id each time with new and
	ask tree_simple_assignment_expression to handle cleaning it up.
	This apparently plugs a memory leak.

	* (Ftype): Don't try to print map constants.  Handle
	references to structure members.

Wed Apr 26 12:40:59 1995  John Eaton  <>

	* (generate_struct_completions): New function.
	(generate_possible_completions): Likewise.
	(looks_like_struct): Likewise.
	(command_generator): Handle completion of struct variables.

	* tree-expr.h, (tree_fvc::lookup_map_element):
	Add insert and silent args.

	* New file.
	* (SOURCES): Add it to the list.

Mon Apr 24 09:41:02 1995  John Eaton  <>

	* (Fexist): Handle structure references too.

	* (lookup_map_element (const char*, int, int):
	New function.
	(lookup_map_element (SLList<char*>&, int, int): New arg, silent.
	* (lookup_map_element): New arg, silent. If nonzero,
	don't call error().

	* tc-rep.h (is_empty): Define here.
	* tree-const.h (is_empty): Hand off to TC_REP::is_empty().

	* (Fstruct_contains): Call lookup_map_element on args(0)
	instead of extracting the map and calling contains() on it.

	* parse.y (EPLUS, EMINUS): New tokens.
	(simple_expr): Handle EPLUS, EMINUS the same as `+' and `-'.
	* lex.l (".+", ".-"): New patterns.  Match these separately to
	disallow using them as unary operators.

	* lex.l (next_token_is_bin_op): Simplify by noting that spacing
	only matters for those tokens that can also be unary ops.

Fri Apr 21 14:34:45 1995  John Eaton  <>

	* (read_ascii_data): Allow reading of empty

	* (vector_assignment): Only assert that we are not
	doing fortran-style indexing and that nr <= 1 || nc <= 1.
	(do_vector_assign): Handle assignment of [] when one dimension is
	zero and the other is anything.

Thu Apr 20 13:56:21 1995  John Eaton  <>

	* (delete_rows, delete_columns): Simply return if
	num_to_delete is 0.

	* lex.l (handle_identifier): Don't match plot option keywords
	inside parentheses or braces.

	* (parse_fcn_file): Also delete tmp_help_txt if
	running a script.

	* tree-cmd.h (tree_command): Add destructor.

	* tree-expr.h tree_simple_assignment_expression (lhs_idx_expr):
	Hang on to idx_expr, not just its parts so it can be deleted.
	(init): Initialize it.
	* (~tree_simple_assignment_expression): Delete it.

	* tree-expr.h (tree_multi_val_ret, tree_oct_obj, tree_fvc,
	tree_identifier, tree_builtin, tree_function): Add destructors.
	* (tree_function::~tree_function): Delete some stuff.

	* tree-misc.h (tree_va_return_list): Add destructor.

	* (__builtin_new, __builtin_delete): Provide our own,
	for debugging.

	* (strconcat): Don't depend on the return value from
	(file_in_path): Simplify logic.

	* parse.y (maybe_convert_to_ans_assign): Create ans_id each time
	with new and ask tree_simple_assignment_expression to handle
	cleaning it up.  This apparently plugs a memory leak.

	* lex.l (strip_trailing_whitespace): Declare retval static.
	Delete it before saving next string.

	* (Ferror): Do call error() for empty string args.
	(error_1): Don't print anything if fmt is "" or "\n", but do set
	the error state appropriately.

	* (tree_unwind_protect::eval): Handle return and break
	in the `try' part of the statement.

Mon Apr 10 19:29:44 1995  John Eaton  <>

	Where appropriate, declare Fortran functions to take reference
	instead of pointer args.  Change callers.

	* Declare Fortran functions to take reference instead
	of pointer args.  Change callers.	

	* gamma.c, lgamma.c, erfc.c, erf.c, atanh.c, asinh.c, acosh.c:
	Declare Fortran functions to take reference instead of pointer

Sun Apr  9 19:38:53 1995  John Eaton  <>

	* (Fpopen, Fpclose, Fexecute, Fsync_system,
	Fasync_system, Fwaitpid, Fmkfifo, Funlink): New functions.

	* (sigchld_handler): New function.
	(install_signal_handlers): Add call to install
	sigchld_handler. (This is #if 0'd out, waiting for code to help
	determine which child exited and what to do about it).

	* tree-expr.h (tree_oct_obj): New class.

	* tree-expr.h (tree_multi_assignment_expression::preserve): New
	data member.  Add arg with default value to constructors.  Change
	callers as necessary.
	* (~tree_multi_assignment_expression): Conditionally
	delete lhs.

	* parse.y (make_multi_val_ret): Pass matrix instead of getting it
	from the global matrix list.
	(expression): Extract matrix from matrix list before calling

	* parse.y (command): Handle new for loop syntax for structures.

	* tree-plot.h (subplot_list): Include tree_print_code() in
	initializer lists for constructors.
	* tree-expr.h (tree_statement_list, tree_argument_list,
	tree_parameter_list, tree_return_list, tree_global_init_list,
	tree_if_command_list, ): Likewise.

	* tree-cmd.h (tree_for_command::id_list): New data member.
	(tree_for_command (tree_return_list*, tree_expression*,
	tree_statement_list*, int, int)): Likewise.
	* (tree_for_command::eval): Handle for loops with
	(do_for_loop_once (tree_return_list*, Octave_object&, int&)):
	New form for handling for loops with structures.

	* (octave_ieee_init): Determine floating point format
	(native_float_format): New global variable.
	(Fisieee): Compute return value from native_float_format, not by
	using preprocessor macros.
	* sysdep.h (enum floating_point_format): Move declaration here.
	* From here.
	Always define all floating point format conversion routines.
	(do_double_format_conversion, do_float_format_conversion):
	Use native_float_format instead of preprocessor macros.

Sat Apr  8 15:41:35 1995  John Eaton  <>

	* Makefile (TEMPLATE_SRC): New variable.
	(SOURCES): Delete and from here.

	* (install_builtin_variables): Use OCTAVE_VERSION
	instead of version_string to initialize OCTAVE_VERSION.
	* version.h (version_string): Delete.

	* getopt.c (_getopt_internal): Initialize indfound to avoid warning.

Fri Apr  7 15:29:41 1995  John Eaton  <>

	* tc-inlines.h (REP_RHS_MATRIX): Just check to see if tc is real
	or complex.  If conversion fails, return.

Thu Apr  6 00:10:47 1995  John Eaton  <>

	* (Fstruct_contains): New function.

	* (print_code): Add extra parens around while condition
	to avoid warning.
	* (undo_string_escapes): Likewise.
	* (decode_prompt_string): Likewise.  Also rewrite if
	statement to avoid warning. 

Tue Apr  4 22:54:17 1995  John Eaton  <>

	* (tree_multi_assignment_expression::eval,
	tree_simple_assignment_expression::eval):  Call print_constant
	even if user_pref.print_answer_id_name is false.
Mon Apr  3 17:57:14 1995  John Eaton  <>

	* tc-inlines.h (TC_REP): Avoid redefinition.

	* tree-const.h (do_binary_op, do_unary_op): Declare as friends of
	tree_constant class too.

	* tree-plot.h (subplot_using::have_values): Delete data member.
	* (subplot_using::eval): Always recompute values.

Fri Mar 31 10:18:32 1995  John Eaton  <>

	* (print): Print open brace for structures here.
	* (print_constant): Not here.

	* (define): Don't delete arg if sv_fcn fails.

	* (print): New function.  Create ostrstream buffer
	and pass it to rep->print().
	* tree-const.h (eval (int)): Call print(), not rep->print().
	* (structure_indent_level): New file-scope variable.
	(print): New arg, output_buf, is stream to print to.
	Print values of structure elements too.

	* user-prefs.h (user_preferences): New field, struct_levels_to_print.
	* (struct_levels_to_print): New function.
	* (install_builtin_variables): Add DEFVAR for new
	variable struct_levels_to_print.

	* (print_as_scalar, print_as_structure): Move here
	from and make extern.

	* (print_as_structure): New function.
	(print_constant): Use it.

	* (print_constant): New arg, print_padding.
	(tree_simple_assignment_expression::eval): Use print_constant
	instead of duplicating code here.
	(tree_multi_assignment_expression::eval): Likewise.

Thu Mar 30 13:24:11 1995  John Eaton  <>

	* (SOURCES): Add
	* New file, extracted from
	(Fgetrusage): New function.
	* (cputime): Delete (now implemented in a function file
	using new getrusage function).

Wed Mar 29 22:52:42 1995  John Eaton  <>

	* (SOURCES): Add strftime.c.
	* strftime.c: New file, from sh-utils distribution.

	* (mk_tm_map, extract_tm, Ftime, Fgmtime, Flocaltime,
	Fmktime, Fstrftime): New basic time functions.
	(Fclock, Fdate): Delete (now implemented in function files using new
	time functions).

Tue Mar 28 17:51:51 1995  John Eaton  <>

	* (return_valid_file, do_printf, do_scanf,
	fclose_internal, feof_internal, ferror_internal, fflush_internal,
	fgets_internal, fopen_internal, fread_internal, freport_internal,
	frewind_internal, fseek_internal, ftell_internal,
	fwrite_internal): Declare static.
	* file-io.h: Delete extern declarations for them.

Fri Mar 24 09:52:50 1995  John Eaton  <>

	* (pr_col_num_header): New function.
	(compact_format): New file-scope variable.
	(set_format_style): Handle loose and compact formats.
	(octave_print_internal (ostream&, const ComplexMatrix&, int)):
	Replace duplicate code with call to pr_col_num_header().
	(octave_print_internal (ostream&, const Matrix&, int): Likewise.
	(octave_print_internal (ostream&, const Range&, int): Likewise.

Tue Mar 21 08:44:48 1995  John Eaton  <>

	* (xgamma): Always use Slatec library function.
	* (xlgamma): Likewise.
	* (SOURCES): Don't include lgamma.c.

Fri Mar 17 22:38:39 1995  John Eaton  <>

	* (TC_REP::new): Don't try to keep track of newlist_tail.
	Explicitly initialize newlist to zero.
	* (tree_constant::operator new): Likewise.

Fri Mar 10 12:40:24 1995  John Eaton  <>

	* (quit_loop_now): Declare inline.
	(tree_for_command::do_for_loop_once): Split into two versions, one
	for the general case and one for when the loop variable is a
	simple identifier.
	(DO_LOOP): New macro.  Move tests outside of loop.
	(tree_for_command::eval): Speed up by checking to see if loop
	variable is a simple identifier and by using DO_LOOP.

	* tree-const.h: New union of rep and freeptr.  The freeptr element
	is used for our custom memory management functions.

	* tc-rep.h: Add freeptr element to anonymous union (for our custom
	memory management functions).

	* (newlist, newlist_grow_size, newlist_tail): New
	static variables.
	(tree_constant::operator new): Always define to allow more
	efficient allocation of single tree_constants.
	(tree_constant::operator delete): Likewise, handle deletion of the
	memory we allocate.

	* (newlist, newlist_grow_size, newlist_tail): New static
	(tree_constant::operator new): Always define to allow more
	efficient allocation of single tree_constants.
	(tree_constant::operator delete): Likewise, handle deletion of the
	memory we allocate.

Fri Mar  3 14:00:08 1995  John Eaton  <>

	* (verror): Terminate output_buf with ends.

	* statdefs.h: Use C-style comment in first line instead of
	C++-style comment.

Mon Feb 27 10:11:18 1995  John Eaton  <>

	* parse.y (maybe_convert_to_ans_assign): Only lookup ans once.
	* (bind_ans): New function.
	* (tree_identifier::eval (int)): Use it here.
	(tree_identifier::eval (int, int, const Octave_object&): And here.

	* (install_nargin_and_nargout): New function.
	* tree-expr.h (tree_function::tree_function (tree_statement_list *,
	symbol_table *, int, int)): Call it.

	* (tree_function::bind_nargin_and_nargout): New function.
	(tree_function::eval): Call it insead of the one from

	* (bind_nargin_and_nargout): #if 0 out.

Sun Feb 26 00:17:06 1995  John Eaton  <>

	* (Fload, Fsave): Free fname returned by tilde_expand().
	* (Fls): Likewise.

	* (tree_multi_assignment_expression::eval (int, int,
	const Octave_object&)): Call tree_return_list::operator () (Pix)

	* (initialize_globals): Put TEXMF in the environment for

	substituted by configure.  Use kpathsea.a, not libkpathsea, so we
	don't have to modify the kpathsea Makefile.

Sat Feb 25 18:59:26 1995  John Eaton  <>

	* New file.
	* pathsearch.h: New file.
	* (INCLUDES): Include it in the list.
	*,, Use it instead of repeating
	identical code multiple times.

	* (install_builtin_variables): Only DEFVAR
	suppress_verbose_help_message if USE_GNU_INFO.

	* (Fhelp): Only handle -i if USE_GNU_INFO.
	(additional_help_message): Only print message if USE_GNU_INFO.
	(builtin_help): New function.
	(help_from_info): New function.  Print warning if not USE_GNU_INFO.

See ChangeLog.1 in the top level directory for earlier changes.