# HG changeset patch # User jwe # Date 845079742 0 # Node ID d423dcc0ac321655214aa840d6aa661ad184a9ed # Parent b21b42c253504e4f89fd1c3d6eb01a9080c995a1 [project @ 1996-10-12 00:19:58 by jwe] diff --git a/src/mkbuiltins b/src/mkbuiltins --- a/src/mkbuiltins +++ b/src/mkbuiltins @@ -12,12 +12,27 @@ #include "oct-obj.h" #include "variables.h" +EOF + +for file in "$@"; do + fcn=`echo $file | sed -e 's/\.df//' -e 's/-/_/g'` + echo "static void" + echo "install_${fcn}_fcns (void)" + echo "{" + cat $file + echo "}" +done + +cat << \EOF static void install_builtin_functions (void) { EOF -cat "$@" +for file in "$@"; do + fcn=`echo $file | sed -e 's/\.df//' -e 's/-/_/g'` + echo " install_${fcn}_fcns ();" +done cat << \EOF } diff --git a/src/pt-cmd.cc b/src/pt-cmd.cc --- a/src/pt-cmd.cc +++ b/src/pt-cmd.cc @@ -45,7 +45,7 @@ #include "oct-map.h" #include "symtab.h" #include "pt-cmd.h" -#include "pt-const.h" +#include "ov.h" #include "pt-exp.h" #include "pt-fvc.h" #include "pt-misc.h" @@ -252,7 +252,7 @@ { quit = false; - ident->assign (rhs); + octave_variable_reference tmp (ident); if (error_state) { @@ -260,6 +260,8 @@ return; } + tmp.assign (rhs); + if (list) { list->eval (1); diff --git a/src/pt-fcn.cc b/src/pt-fcn.cc --- a/src/pt-fcn.cc +++ b/src/pt-fcn.cc @@ -38,7 +38,6 @@ #include "pager.h" #include "symtab.h" #include "toplev.h" -#include "pt-const.h" #include "pt-exp.h" #include "pt-fcn.h" #include "pt-misc.h" @@ -46,6 +45,7 @@ #include "pt-walk.h" #include "unwind-prot.h" #include "utils.h" +#include "ov.h" #include "variables.h" // If TRUE, variables returned from functions have default values even @@ -78,13 +78,8 @@ void tree_function::bind_nargin_and_nargout (int nargin, int nargout) { - octave_value *tmp; - - tmp = new octave_value (nargin); - nargin_sr->define (tmp); - - tmp = new octave_value (nargout); - nargout_sr->define (tmp); + nargin_sr->define ((double) nargin); + nargout_sr->define ((double) nargout); } tree_function::~tree_function (void)