Mercurial > hg > octave-nkf
changeset 499:966db71124dc
[project @ 1994-07-08 02:09:25 by jwe]
author | jwe |
---|---|
date | Fri, 08 Jul 1994 02:11:50 +0000 |
parents | 2e1353465468 |
children | 5f91088cb98e |
files | src/builtins.h src/dynamic-ld.cc src/pt-plot.h src/t-builtins.cc src/t-builtins.h |
diffstat | 5 files changed, 52 insertions(+), 63 deletions(-) [+] |
line wrap: on
line diff
--- a/src/builtins.h +++ b/src/builtins.h @@ -28,15 +28,10 @@ class Complex; struct help_list; -#ifndef MAPPER_FCN_TYPEDEFS -#define MAPPER_FCN_TYPEDEFS 1 - typedef double (*d_d_Mapper)(double); typedef double (*d_c_Mapper)(const Complex&); typedef Complex (*c_c_Mapper)(const Complex&); -#endif - // If can_return_complex_for_real_arg is 1, lower_limit and // upper_limit specify the range of values for which a real arg // returns a real value. Outside that range, we have to convert args @@ -67,13 +62,8 @@ char *help_string; }; -#ifndef SV_FUNCTION_TYPEDEFS -#define SV_FUNCTION_TYPEDEFS 1 - typedef int (*sv_Function)(void); -#endif - struct builtin_string_variables { char *name;
--- a/src/dynamic-ld.cc +++ b/src/dynamic-ld.cc @@ -1,7 +1,7 @@ // dynamic-ld.cc -*- C++ -*- /* -Copyright (C) 1993 John W. Eaton +Copyright (C) 1993, 1994 John W. Eaton This file is part of Octave. @@ -140,11 +140,11 @@ } -tree_constant * -octave_dld_tc2_and_go (tree_constant *args, int nargin, int nargout, +Octave_object +octave_dld_tc2_and_go (const Octave_object& args, int nargin, int nargout, const char *name, const char *fcn, const char *object) { - tree_constant *retval = NULL_TREE_CONST; + Octave_object retval; builtin_fcn_ptr fcn_to_call = octave_dld_tc2 (name, fcn, object);
--- a/src/pt-plot.h +++ b/src/pt-plot.h @@ -79,7 +79,6 @@ tree_subplot_list *next_elem (void); tree_constant eval (int print); -// tree_constant *eval (int print, int nargout); int print (int ndim, ostrstream& plot_buf);
--- a/src/t-builtins.cc +++ b/src/t-builtins.cc @@ -174,10 +174,10 @@ return os; } -tree_constant * +Octave_object builtin_casesen (int argc, char **argv, int nargout) { - tree_constant *retval = NULL_TREE_CONST; + Octave_object retval; if (argc == 1 || (argc > 1 && strcmp (argv[1], "off") == 0)) warning ("casesen: sorry, Octave is always case sensitive"); @@ -192,10 +192,10 @@ /* * Change current working directory. */ -tree_constant * +Octave_object builtin_cd (int argc, char **argv, int nargout) { - tree_constant *retval = NULL_TREE_CONST; + Octave_object retval; if (argc > 1) { @@ -251,10 +251,10 @@ * Wipe out user-defined variables and functions given a list of * globbing patterns. */ -tree_constant * +Octave_object builtin_clear (int argc, char **argv, int nargout) { - tree_constant *retval = NULL_TREE_CONST; + Octave_object retval; // Always clear the local table, but don't clear currently compiled // functions unless we are at the top level. (Allowing that to happen @@ -328,10 +328,10 @@ /* * Associate a cryptic message with a variable name. */ -tree_constant * +Octave_object builtin_document (int argc, char **argv, int nargout) { - tree_constant *retval = NULL_TREE_CONST; + Octave_object retval; if (argc == 3) document_symbol (argv[1], argv[2]); else @@ -342,10 +342,10 @@ /* * Edit commands with your favorite editor. */ -tree_constant * +Octave_object builtin_edit_history (int argc, char **argv, int nargout) { - tree_constant *retval = NULL_TREE_CONST; + Octave_object retval; do_edit_history (argc, argv); return retval; } @@ -353,10 +353,10 @@ /* * Set output format state. */ -tree_constant * +Octave_object builtin_format (int argc, char **argv, int nargout) { - tree_constant *retval = NULL_TREE_CONST; + Octave_object retval; set_format_style (argc, argv); return retval; } @@ -488,10 +488,10 @@ /* * Print cryptic yet witty messages. */ -tree_constant * +Octave_object builtin_help (int argc, char **argv, int nargout) { - tree_constant *retval = NULL_TREE_CONST; + Octave_object retval; if (argc == 1) { @@ -623,10 +623,10 @@ /* * Display, save, or load history. */ -tree_constant * +Octave_object builtin_history (int argc, char **argv, int nargout) { - tree_constant *retval = NULL_TREE_CONST; + Octave_object retval; do_history (argc, argv); @@ -637,10 +637,10 @@ * Change state flag that determines whether lines are added to plots * or drawn on new plots. */ -tree_constant * +Octave_object builtin_hold (int argc, char **argv, int nargout) { - tree_constant *retval = NULL_TREE_CONST; + Octave_object retval; switch (argc) { @@ -809,10 +809,10 @@ * * -- This function is not terribly robust. */ -tree_constant * +Octave_object builtin_load (int argc, char **argv, int nargout) { - tree_constant *retval = NULL_TREE_CONST; + Octave_object retval; argc--; argv++; @@ -895,10 +895,10 @@ /* * Get a directory listing. */ -tree_constant * +Octave_object builtin_ls (int argc, char **argv, int nargout) { - tree_constant *retval = NULL_TREE_CONST; + Octave_object retval; ostrstream ls_buf; @@ -929,10 +929,10 @@ /* * Run previous commands from the history list. */ -tree_constant * +Octave_object builtin_run_history (int argc, char **argv, int nargout) { - tree_constant *retval = NULL_TREE_CONST; + Octave_object retval; do_run_history (argc, argv); return retval; } @@ -979,10 +979,10 @@ /* * Write variables to an output stream. */ -tree_constant * +Octave_object builtin_save (int argc, char **argv, int nargout) { - tree_constant *retval = NULL_TREE_CONST; + Octave_object retval; if (argc < 2) { @@ -1082,10 +1082,10 @@ /* * Set plotting options. */ -tree_constant * +Octave_object builtin_set (int argc, char **argv, int nargout) { - tree_constant *retval = NULL_TREE_CONST; + Octave_object retval; ostrstream plot_buf; @@ -1113,10 +1113,10 @@ /* * Set plotting options. */ -tree_constant * +Octave_object builtin_show (int argc, char **argv, int nargout) { - tree_constant *retval = NULL_TREE_CONST; + Octave_object retval; ostrstream plot_buf; @@ -1205,10 +1205,10 @@ return status; } -tree_constant * +Octave_object builtin_who (int argc, char **argv, int nargout) { - tree_constant *retval = NULL_TREE_CONST; + Octave_object retval; int show_builtins = 0; int show_functions = (curr_sym_tab == top_level_sym_tab);
--- a/src/t-builtins.h +++ b/src/t-builtins.h @@ -34,23 +34,23 @@ char *help_string; }; -extern tree_constant *builtin_casesen (int argc, char **argv, int nargout); -extern tree_constant *builtin_cd (int argc, char **argv, int nargout); -extern tree_constant *builtin_clear (int argc, char **argv, int nargout); -extern tree_constant *builtin_document (int argc, char **argv, int nargout); -extern tree_constant *builtin_edit_history (int argc, char **argv, +extern Octave_object builtin_casesen (int argc, char **argv, int nargout); +extern Octave_object builtin_cd (int argc, char **argv, int nargout); +extern Octave_object builtin_clear (int argc, char **argv, int nargout); +extern Octave_object builtin_document (int argc, char **argv, int nargout); +extern Octave_object builtin_edit_history (int argc, char **argv, int nargout); -extern tree_constant *builtin_format (int argc, char **argv, int nargout); -extern tree_constant *builtin_help (int argc, char **argv, int nargout); -extern tree_constant *builtin_history (int argc, char **argv, int nargout); -extern tree_constant *builtin_hold (int argc, char **argv, int nargout); -extern tree_constant *builtin_load (int argc, char **argv, int nargout); -extern tree_constant *builtin_ls (int argc, char **argv, int nargout); -extern tree_constant *builtin_run_history (int argc, char **argv, int nargout); -extern tree_constant *builtin_save (int argc, char **argv, int nargout); -extern tree_constant *builtin_set (int argc, char **argv, int nargout); -extern tree_constant *builtin_show (int argc, char **argv, int nargout); -extern tree_constant *builtin_who (int argc, char **argv, int nargout); +extern Octave_object builtin_format (int argc, char **argv, int nargout); +extern Octave_object builtin_help (int argc, char **argv, int nargout); +extern Octave_object builtin_history (int argc, char **argv, int nargout); +extern Octave_object builtin_hold (int argc, char **argv, int nargout); +extern Octave_object builtin_load (int argc, char **argv, int nargout); +extern Octave_object builtin_ls (int argc, char **argv, int nargout); +extern Octave_object builtin_run_history (int argc, char **argv, int nargout); +extern Octave_object builtin_save (int argc, char **argv, int nargout); +extern Octave_object builtin_set (int argc, char **argv, int nargout); +extern Octave_object builtin_show (int argc, char **argv, int nargout); +extern Octave_object builtin_who (int argc, char **argv, int nargout); #endif