changeset 2087:088b063500d1

[project @ 1996-04-26 06:21:21 by jwe]
author jwe
date Fri, 26 Apr 1996 06:21:21 +0000
parents bfb775fb6fe8
children c5b4b6d51740
files src/mappers.h
diffstat 1 files changed, 19 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/src/mappers.h	Thu Apr 25 05:55:19 1996 +0000
+++ b/src/mappers.h	Fri Apr 26 06:21:21 1996 +0000
@@ -28,10 +28,13 @@
 #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
@@ -42,31 +45,33 @@
 
 struct Mapper_fcn
 {
-  string name;
-  int can_return_complex_for_real_arg;
-  double lower_limit;
-  double upper_limit;
+  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;
+  int can_return_complex_for_real_arg;
+  string name;
 };
 
 struct builtin_mapper_function
 {
-  builtin_mapper_function (const string n, int cfr, double l, double u,
-			   d_d_Mapper dd, d_c_Mapper dc, c_c_Mapper cc,
-			   const string& h)
-    : name (n), can_return_complex_for_real_arg (cfr),
-      lower_limit (l), upper_limit (u), d_d_mapper (dd),
-      d_c_mapper (dc), c_c_mapper (cc), help_string (h) { }
+  builtin_mapper_function (ch_Mapper ch, d_d_Mapper dd, d_c_Mapper dc,
+			   c_c_Mapper cc, double l, double u,
+			   int cfr, const string n, const string& h)
+    : ch_mapper (ch), d_d_mapper (dd), d_c_mapper (dc), c_c_mapper (cc),
+      lower_limit (l), upper_limit (u), can_return_complex_for_real_arg (cfr),
+      name (n), help_string (h) { }
 
-  string name;
-  int can_return_complex_for_real_arg;
-  double lower_limit;
-  double upper_limit;
+  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;
+  int can_return_complex_for_real_arg;
+  string name;
   string help_string;
 };