Mercurial > hg > octave-lyh
changeset 2890:42901f9a9266
[project @ 1997-04-28 01:44:22 by jwe]
author | jwe |
---|---|
date | Mon, 28 Apr 1997 01:45:58 +0000 |
parents | 8aa189b811d0 |
children | 1a30f46e1870 |
files | src/defun.h src/load-save.cc src/mkbuiltins |
diffstat | 3 files changed, 16 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/src/defun.h +++ b/src/defun.h @@ -61,16 +61,17 @@ // redefined. #define DEFCONST(name, defn, inst_as_fcn, sv_fcn, doc) \ - DEFVAR_INT (#name, SBV_ ## name, defn, inst_as_fcn, 0, sv_fcn, doc); \ - DEFVAR_INT ("__" ## #name ## "__", XSBV_ ## name, defn, 0, 1, sv_fcn, doc) + DEFVAR_INT (#name, SBV_ ## name, defn, inst_as_fcn, false, sv_fcn, doc); \ + DEFVAR_INT ("__" ## #name ## "__", XSBV_ ## name, defn, false, true, \ + sv_fcn, doc) // This one can be used when `name' cannot be used directly (if it is // already defined as a macro). In that case, name is already a // quoted string, and the name of the structure has to be passed too. #define DEFCONSTX(name, sname, defn, inst_as_fcn, sv_fcn, doc) \ - DEFVAR_INT (name, sname, defn, inst_as_fcn, 0, sv_fcn, doc); \ - DEFVAR_INT ("__" ## name ## "__", X ## sname, defn, 0, 1, sv_fcn, doc) + DEFVAR_INT (name, sname, defn, inst_as_fcn, false, sv_fcn, doc); \ + DEFVAR_INT ("__" ## name ## "__", X ## sname, defn, false, true, sv_fcn, doc) // How builtin variables are actually installed. @@ -96,7 +97,7 @@ // doc is the simple help text for the function. #define DEFUN(name, args_name, nargout_name, doc) \ - DEFUN_INTERNAL (name, args_name, nargout_name, 0, doc) + DEFUN_INTERNAL (name, args_name, nargout_name, false, doc) // Define a builtin text-style function. // @@ -105,7 +106,7 @@ // surround the arguments). #define DEFUN_TEXT(name, args_name, nargout_name, doc) \ - DEFUN_INTERNAL (name, args_name, nargout_name, 1, doc) + DEFUN_INTERNAL (name, args_name, nargout_name, true, doc) // Define a mapper function. // @@ -138,15 +139,9 @@ #define DEFUN_MAPPER(name, ch_map, d_d_map, d_c_map, c_c_map, \ lo, hi, can_ret_cmplx_for_real, doc) \ - do \ - { \ - builtin_mapper_function S ## name (ch_map, d_d_map, \ - d_c_map, c_c_map, lo, hi, \ - can_ret_cmplx_for_real, \ - #name, doc); \ - install_builtin_mapper (S ## name); \ - } \ - while (0) + install_builtin_mapper \ + (new octave_mapper (ch_map, d_d_map, d_c_map, c_c_map, lo, hi, \ + can_ret_cmplx_for_real, #name)) // Make alias another name for the existing function name. This macro // must be used in the same file where name is defined, after the
--- a/src/load-save.cc +++ b/src/load-save.cc @@ -36,6 +36,7 @@ #include "byte-swap.h" #include "data-conv.h" +#include "lo-mappers.h" #include "mach-info.h" #include "oct-glob.h" #include "str-vec.h" @@ -45,11 +46,10 @@ #include "gripes.h" #include "help.h" #include "load-save.h" -#include "mappers.h" #include "oct-obj.h" +#include "oct-sym.h" #include "pager.h" #include "pt-exp.h" -#include "pt-fvc.h" #include "symtab.h" #include "sysdep.h" #include "unwind-prot.h" @@ -2225,7 +2225,9 @@ string name = sr->name (); string help = sr->help (); int global = sr->is_linked_to_global (); - tree_fvc *tmp = sr->def (); + octave_symbol *tmp = sr->def (); + + // XXX FIXME XXX -- do we really want to do this? octave_value tc = tmp->eval (); if (tc.is_undefined ())