Mercurial > hg > octave-lyh
changeset 2889:8aa189b811d0
[project @ 1997-04-28 01:35:18 by jwe]
author | jwe |
---|---|
date | Mon, 28 Apr 1997 01:39:00 +0000 |
parents | e78978eff91d |
children | 42901f9a9266 |
files | src/SLList-expr.cc src/colloc.cc src/fft.cc src/fft2.cc src/ifft.cc src/ifft2.cc src/mappers.cc src/mappers.h src/ov-range.h src/ov-scalar.h src/rand.cc |
diffstat | 11 files changed, 30 insertions(+), 101 deletions(-) [+] |
line wrap: on
line diff
--- a/src/SLList-expr.cc +++ b/src/SLList-expr.cc @@ -31,7 +31,6 @@ #include "ov.h" #include "pt-exp.h" -#include "pt-fvc.h" #include "pt-mvr.h" template class SLNode<tree_expression *>;
--- a/src/colloc.cc +++ b/src/colloc.cc @@ -27,11 +27,11 @@ #include <string> #include "CollocWt.h" +#include "lo-mappers.h" #include "defun-dld.h" #include "error.h" #include "help.h" -#include "mappers.h" #include "oct-obj.h" #include "utils.h"
--- a/src/fft.cc +++ b/src/fft.cc @@ -24,11 +24,12 @@ #include <config.h> #endif +#include "lo-mappers.h" + #include "defun-dld.h" #include "error.h" #include "gripes.h" #include "help.h" -#include "mappers.h" #include "oct-obj.h" #include "utils.h"
--- a/src/fft2.cc +++ b/src/fft2.cc @@ -24,11 +24,12 @@ #include <config.h> #endif +#include "lo-mappers.h" + #include "defun-dld.h" #include "error.h" #include "gripes.h" #include "help.h" -#include "mappers.h" #include "oct-obj.h" #include "utils.h"
--- a/src/ifft.cc +++ b/src/ifft.cc @@ -24,11 +24,12 @@ #include <config.h> #endif +#include "lo-mappers.h" + #include "defun-dld.h" #include "error.h" #include "gripes.h" #include "help.h" -#include "mappers.h" #include "oct-obj.h" #include "utils.h"
--- a/src/ifft2.cc +++ b/src/ifft2.cc @@ -24,11 +24,12 @@ #include <config.h> #endif +#include "lo-mappers.h" + #include "defun-dld.h" #include "error.h" #include "gripes.h" #include "help.h" -#include "mappers.h" #include "oct-obj.h" #include "utils.h"
--- a/src/mappers.cc +++ b/src/mappers.cc @@ -26,98 +26,101 @@ #include <cctype> +#include "lo-mappers.h" + #include "defun.h" #include "error.h" #include "mappers.h" +#include "oct-mapper.h" // XXX FIXME XXX -- perhaps this could be avoided by determining // whether the is* functions are actually functions or just macros. -int +static int xisalnum (int c) { return isalnum (c); } -int +static int xisalpha (int c) { return isalpha (c); } -int +static int xisascii (int c) { return isascii (c); } -int +static int xiscntrl (int c) { return iscntrl (c); } -int +static int xisdigit (int c) { return isdigit (c); } -int +static int xisgraph (int c) { return isgraph (c); } -int +static int xislower (int c) { return islower (c); } -int +static int xisprint (int c) { return isprint (c); } -int +static int xispunct (int c) { return ispunct (c); } -int +static int xisspace (int c) { return isspace (c); } -int +static int xisupper (int c) { return isupper (c); } -int +static int xisxdigit (int c) { return isxdigit (c); } -int +static int xtoascii (int c) { return toascii (c); } -int +static int xtolower (int c) { return tolower (c); } -int +static int xtoupper (int c) { return toupper (c);
--- a/src/mappers.h +++ b/src/mappers.h @@ -23,83 +23,6 @@ #if !defined (octave_mappers_h) #define octave_mappers_h 1 -#include <string> - -#include "lo-mappers.h" -#include "oct-cmplx.h" - -typedef int (*ch_Mapper)(int); -typedef double (*d_d_Mapper)(double); -typedef double (*d_c_Mapper)(const Complex&); -typedef Complex (*c_c_Mapper)(const Complex&); - -// ch_mapper is a kluge. -// -// 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 -// to complex, and call the complex valued function. -// -// If can_return_complex_for_real_arg is 0, lower_limit and -// upper_limit are ignored. - -struct builtin_mapper_function -{ - builtin_mapper_function (ch_Mapper ch = 0, d_d_Mapper dd = 0, - d_c_Mapper dc = 0, c_c_Mapper cc = 0, - double l = 0.0, double u = 0.0, int f = 0, - const string n = string (), - const string& h = string ()) - : ch_mapper (ch), d_d_mapper (dd), d_c_mapper (dc), c_c_mapper (cc), - lower_limit (l), upper_limit (u), flag (f), - name (n), help_string (h) { } - - builtin_mapper_function (const builtin_mapper_function& mf) - : ch_mapper (mf.ch_mapper), d_d_mapper (mf.d_d_mapper), - d_c_mapper (mf.d_c_mapper), c_c_mapper (mf.c_c_mapper), - lower_limit (mf.lower_limit), upper_limit (mf.upper_limit), - flag (mf.flag), name (mf.name), help_string (mf.help_string) { } - - builtin_mapper_function& operator = (const builtin_mapper_function& mf) - { - if (&mf != this) - { - ch_mapper = mf.ch_mapper; - d_d_mapper = mf.d_d_mapper; - d_c_mapper = mf.d_c_mapper; - c_c_mapper = mf.c_c_mapper; - lower_limit = mf.lower_limit; - upper_limit = mf.upper_limit; - flag = mf.flag; - name = mf.name; - help_string = mf.help_string; - } - return *this; - } - - ~builtin_mapper_function (void) { } - - ch_Mapper ch_mapper; - d_d_Mapper d_d_mapper; - d_c_Mapper d_c_mapper; - c_c_Mapper c_c_mapper; - double lower_limit; - double upper_limit; - - // For ch_mapper: - // - // 0 => this function returns a matrix of ones and zeros - // 1 => this function returns a numeric matrix (any values) - // 2 => this function returns a string array - // - // For other mappers, nonzero means that this function can return a - // complex value for some real arguments. - int flag; - - string name; - string help_string; -}; - extern void install_mapper_functions (void); #endif
--- a/src/ov-range.h +++ b/src/ov-range.h @@ -35,13 +35,13 @@ #include "Range.h" +#include "lo-mappers.h" #include "lo-utils.h" #include "mx-base.h" #include "oct-alloc.h" #include "str-vec.h" #include "error.h" -#include "mappers.h" #include "ov-base.h" #include "ov-typeinfo.h"