changeset 3249:60866c521b92

[project @ 1999-07-13 03:44:16 by jwe]
author jwe
date Tue, 13 Jul 1999 03:46:16 +0000
parents 68259f410026
children ae3bdfd82f91
files ChangeLog NEWS PROJECTS configure.in emacs/octave-inf.el src/ChangeLog src/defun-int.h src/defun.h src/mappers.cc src/ov-mapper.cc src/ov-mapper.h
diffstat 11 files changed, 167 insertions(+), 78 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+Fri Jul  9 09:15:24 1999  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* configure.in: Try to handle IEEE FP flags for g77 on Alphas.
+
+Thu Jul  8 19:56:37 1999  Stephen Eglen  <stephen@gnu.org>
+
+	* emacs/octave-inf.el (inferior-octave-directory-tracker):
+	Change regexp so that it doesn't match commands beginning with `cd'.
+
+Wed Jun 23 13:20:11 1999  Mumit Khan  <khan@xraylith.wisc.edu>
+
+	* configure.in (HAVE_TERMIOS_H): Avoid autoheader lossage.
+
+Sun Jun 20 23:05:18 1999  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* configure.in: Check for sys/ioctl.h.
+
 Mon May 10 09:06:47 1999  John W. Eaton  <jwe@bevo.che.wisc.edu>
 
 	* aclocal.m4 (OCTAVE_PROG_G77): Also match "FSF-g77", for egcs.
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,15 @@
 Summary of changes for version 2.1.x:
 ------------------------------------
 
+  * When `format +' is in effect, Octave uses the following symbols to
+    provide more information about the values in a matrix:
+
+      +      postive real
+      -      negative real
+      i      pure imaginary
+      c      complex
+      blank  zero
+
   * The ++ and -- operators now work for indexed matrices, and the
     following operators now work:
 
--- a/PROJECTS
+++ b/PROJECTS
@@ -472,6 +472,8 @@
       ====  ====               ====   ====  ====
       wd   matrix                m      n  struct.x
 
+  * Allow who to return information as a list of strings.
+
   * On systems that support matherr(), make it possible for users to
     enable the printing of warning messages.
 
--- a/configure.in
+++ b/configure.in
@@ -21,7 +21,7 @@
 ### Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 ### 02111-1307, USA. 
 
-AC_REVISION($Revision: 1.316 $)
+AC_REVISION($Revision: 1.317 $)
 AC_PREREQ(2.9)
 AC_INIT(src/octave.cc)
 AC_CONFIG_HEADER(config.h)
@@ -386,9 +386,8 @@
       fi
       case "$canonical_host_type" in
         alpha*-*-*)
-          if test "$octave_cv_f77_is_g77" = yes \
-	      || test -z "$ieee_fp_flag" ; then
-            true
+          if test "$octave_cv_f77_is_g77" = yes; then
+            FFLAGS="$ieee_fp_flag $FFLAGS"
 	  else
 	    FFLAGS="-fpe1 $FFLAGS"
 	  fi
@@ -707,21 +706,23 @@
 AC_HEADER_TIME
 AC_HEADER_SYS_WAIT
 
+AC_CHECK_HEADERS(assert.h curses.h dlfcn.h fcntl.h float.h floatingpoint.h \
+  fnmatch.h glob.h grp.h ieeefp.h limits.h memory.h nan.h ncurses.h \
+  pwd.h sgtty.h stdlib.h string.h sys/ioctl.h sys/param.h sys/resource.h \
+  sys/select.h sys/stat.h sys/time.h sys/times.h sys/types.h \
+  sys/utsname.h termcap.h termio.h $TERMIOS_H unistd.h varargs.h)
+
 ### I'm told that termios.h is broken on NeXT systems.
 
-TERMIOS_H=termios.h
 case "$canonical_host_type" in
   *-*-nextstep*)
-    TERMIOS_H=
+    if test "$ac_cv_header_termios_h" = yes; then
+      AC_MSG_WARN([Ignoring termios.h on NeXT systems.])
+      ac_cv_header_termios_h=no
+    fi
   ;;
 esac
 
-AC_CHECK_HEADERS(assert.h curses.h dlfcn.h fcntl.h float.h floatingpoint.h \
-  fnmatch.h glob.h grp.h ieeefp.h limits.h memory.h nan.h ncurses.h \
-  pwd.h sgtty.h stdlib.h string.h sys/param.h sys/resource.h \
-  sys/select.h sys/stat.h sys/time.h sys/times.h sys/types.h \
-  sys/utsname.h termcap.h termio.h $TERMIOS_H unistd.h varargs.h)
-
 if test "$ac_cv_header_termios_h" = yes \
     || test "$ac_cv_header_termio_h" = yes \
     || test "$ac_cv_header_sgtty_h" = yes; then
--- a/emacs/octave-inf.el
+++ b/emacs/octave-inf.el
@@ -336,9 +336,11 @@
 (defun inferior-octave-directory-tracker (string)
   "Tracks `cd' commands issued to the inferior Octave process.
 Use \\[inferior-octave-resync-dirs] to resync if Emacs gets confused."
-  (if (string-match "^[ \t]*cd[ \t]*\\([^ \t\n;]*\\)[ \t\n;]"
-		    string)
-      (cd (substring string (match-beginning 1) (match-end 1)))))
+  (cond
+   ((string-match "^[ \t]*cd[ \t;]*$" string)
+    (cd "~"))
+   ((string-match "^[ \t]*cd[ \t]+\\([^ \t\n;]*\\)[ \t\n;]*" string)
+    (cd (substring string (match-beginning 1) (match-end 1))))))
 
 (defun inferior-octave-resync-dirs ()
   "Resync the buffer's idea of the current directory.
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,38 @@
+Mon Jul 12 22:38:50 1999  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* defun.h (DEFUN_MAPPER): Handle new args, d_b_map and c_b_map.
+	* defun-int.h (DEFUN_MAPPER_INTERNAL): Likewise.
+	* mappers.cc (install_mapper_functions): Supply new args to
+	all uses of DEFUN_MAPPER.
+	* ov-mapper.cc (octave_mapper::apply): Handle mapper functions
+	that return bool objects.
+	* ov-mapper.h (octave_mapper::d_b_mapper, octave_mapper::c_b_mapper):
+	New typedefs.
+	(octave_mapper::octave_mapper): Handle new mapper function types.
+
+	* DLD-FUNCTIONS/minmax.cc: Do a better job of handling NaNs.
+
+Sun Jul 11 13:15:17 1999  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* pr-output.cc (do_plus_format (ostream&, double)): New function.
+	(octave_print_internal (ostream&, double, bool)): Use it.
+	(octave_print_internal (ostream&, const Matrix&, bool, int)): Ditto.
+
+	* pr-output.cc (do_plus_format (ostream&, const Complex&)):
+	New function.
+	(octave_print_internal (ostream&, const Complex&, bool)): Use it.
+	(octave_print_internal (ostream&, const ComplexMatrix&, bool, int)):
+	Ditto. 
+
+Sun Jun 20 23:04:00 1999  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* sysdep.cc: Include sys/ioctl.h if available.
+
+Sat Jun 19 12:07:16 1999  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* variables.cc (do_who): Make pattern and multiple non-option
+	arguments work.
+
 Mon Jun  7 09:54:51 1999  John W. Eaton  <jwe@bevo.che.wisc.edu>
 
 	* lex.l (next_token_is_bin_op, next_token_is_postfix_unary_op,
--- a/src/defun-int.h
+++ b/src/defun-int.h
@@ -119,10 +119,12 @@
 
 // How mapper functions are actually installed.
 
-#define DEFUN_MAPPER_INTERNAL(name, ch_map, d_d_map, d_c_map, c_c_map, \
-			      lo, hi, can_ret_cmplx_for_real, doc) \
+#define DEFUN_MAPPER_INTERNAL(name, ch_map, d_b_map, c_b_map, d_d_map, \
+			      d_c_map, c_c_map, lo, hi, \
+			      can_ret_cmplx_for_real, doc) \
   install_builtin_mapper \
-    (new octave_mapper (ch_map, d_d_map, d_c_map, c_c_map, lo, hi, \
+    (new octave_mapper (ch_map, d_b_map, c_b_map, d_d_map, d_c_map, \
+			c_c_map, lo, hi, \
 			can_ret_cmplx_for_real, #name))
 
 #endif
--- a/src/defun.h
+++ b/src/defun.h
@@ -103,9 +103,15 @@
 //   name is the name of the function, unquoqted.
 //
 //   ch_map is a pointer to a function that should be called for
-//     integer arguments that are expected to creat integer results.
+//     integer arguments that are expected to create integer results.
 //     (It's a kluge to handle character mappers like isalpha.)
 //
+//   d_b_map is a pointer to a function that should be called for real
+//     arguments that are expected to create bool results.
+//
+//   c_b_map is a pointer to a function that should be called for
+//     complex arguments that are expected to create bool results.
+//
 //   d_d_map is a pointer to a function that should be called for real
 //     arguments that are expected to create real results.
 //
@@ -127,10 +133,10 @@
 //
 //   doc is the simple help text for the function.
 
-#define DEFUN_MAPPER(name, ch_map, d_d_map, d_c_map, c_c_map, \
-		     lo, hi, can_ret_cmplx_for_real, doc) \
-  DEFUN_MAPPER_INTERNAL(name, ch_map, d_d_map, d_c_map, c_c_map, \
-			lo, hi, can_ret_cmplx_for_real, doc)
+#define DEFUN_MAPPER(name, ch_map, d_b_map, c_b_map, d_d_map, d_c_map, \
+		     c_c_map, lo, hi, can_ret_cmplx_for_real, doc) \
+  DEFUN_MAPPER_INTERNAL(name, ch_map, d_b_map, c_b_map, d_d_map, d_c_map, \
+			c_c_map, lo, hi, can_ret_cmplx_for_real, doc)
 
 // 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/mappers.cc
+++ b/src/mappers.cc
@@ -131,151 +131,151 @@
 void
 install_mapper_functions (void)
 {
-  DEFUN_MAPPER (abs, 0, fabs, abs, 0, 0.0, 0.0, 0,
+  DEFUN_MAPPER (abs, 0, 0, 0, fabs, abs, 0, 0.0, 0.0, 0,
     "abs (X): compute abs (X) for each element of X");
 
-  DEFUN_MAPPER (acos, 0, acos, 0, acos, -1.0, 1.0, 1,
+  DEFUN_MAPPER (acos, 0, 0, 0, acos, 0, acos, -1.0, 1.0, 1,
     "acos (X): compute acos (X) for each element of X");
 
-  DEFUN_MAPPER (acosh, 0, acosh, 0, acosh, 1.0, DBL_MAX, 1,
+  DEFUN_MAPPER (acosh, 0, 0, 0, acosh, 0, acosh, 1.0, DBL_MAX, 1,
     "acosh (X): compute acosh (X) for each element of X");
 
-  DEFUN_MAPPER (angle, 0, arg, arg, 0, 0.0, 0.0, 0,
+  DEFUN_MAPPER (angle, 0, 0, 0, arg, arg, 0, 0.0, 0.0, 0,
     "angle (X): compute arg (X) for each element of X");
 
-  DEFUN_MAPPER (arg, 0, arg, arg, 0, 0.0, 0.0, 0,
+  DEFUN_MAPPER (arg, 0, 0, 0, arg, arg, 0, 0.0, 0.0, 0,
     "arg (X): compute arg (X) for each element of X");
 
-  DEFUN_MAPPER (asin, 0, asin, 0, asin, -1.0, 1.0, 1,
+  DEFUN_MAPPER (asin, 0, 0, 0, asin, 0, asin, -1.0, 1.0, 1,
     "asin (X): compute asin (X) for each element of X");
 
-  DEFUN_MAPPER (asinh, 0, asinh, 0, asinh, 0.0, 0.0, 0,
+  DEFUN_MAPPER (asinh, 0, 0, 0, asinh, 0, asinh, 0.0, 0.0, 0,
     "asinh (X): compute asinh (X) for each element of X");
 
-  DEFUN_MAPPER (atan, 0, atan, 0, atan, 0.0, 0.0, 0,
+  DEFUN_MAPPER (atan, 0, 0, 0, atan, 0, atan, 0.0, 0.0, 0,
     "atan (X): compute atan (X) for each element of X");
 
-  DEFUN_MAPPER (atanh, 0, atanh, 0, atanh, -1.0, 1.0, 1,
+  DEFUN_MAPPER (atanh, 0, 0, 0, atanh, 0, atanh, -1.0, 1.0, 1,
     "atanh (X): compute atanh (X) for each element of X");
 
-  DEFUN_MAPPER (ceil, 0, ceil, 0, ceil, 0.0, 0.0, 0,
+  DEFUN_MAPPER (ceil, 0, 0, 0, ceil, 0, ceil, 0.0, 0.0, 0,
     "ceil (X): round elements of X toward +Inf");
 
-  DEFUN_MAPPER (conj, 0, conj, 0, conj, 0.0, 0.0, 0,
+  DEFUN_MAPPER (conj, 0, 0, 0, conj, 0, conj, 0.0, 0.0, 0,
     "conj (X): compute complex conjugate for each element of X");
 
-  DEFUN_MAPPER (cos, 0, cos, 0, cos, 0.0, 0.0, 0,
+  DEFUN_MAPPER (cos, 0, 0, 0, cos, 0, cos, 0.0, 0.0, 0,
     "cos (X): compute cos (X) for each element of X");
 
-  DEFUN_MAPPER (cosh, 0, cosh, 0, cosh, 0.0, 0.0, 0,
+  DEFUN_MAPPER (cosh, 0, 0, 0, cosh, 0, cosh, 0.0, 0.0, 0,
     "cosh (X): compute cosh (X) for each element of X");
 
-  DEFUN_MAPPER (erf, 0, xerf, 0, 0, 0.0, 0.0, 0,
+  DEFUN_MAPPER (erf, 0, 0, 0, xerf, 0, 0, 0.0, 0.0, 0,
     "erf (X): compute erf (X) for each element of X");
 
-  DEFUN_MAPPER (erfc, 0, xerfc, 0, 0, 0.0, 0.0, 0,
+  DEFUN_MAPPER (erfc, 0, 0, 0, xerfc, 0, 0, 0.0, 0.0, 0,
     "erfc (X): compute erfc (X) for each element of X");
 
-  DEFUN_MAPPER (exp, 0, exp, 0, exp, 0.0, 0.0, 0,
+  DEFUN_MAPPER (exp, 0, 0, 0, exp, 0, exp, 0.0, 0.0, 0,
     "exp (X): compute exp (X) for each element of X");
 
-  DEFUN_MAPPER (finite, 0, xfinite, xfinite, 0, 0.0, 0.0, 0,
+  DEFUN_MAPPER (finite, 0, xfinite, xfinite, 0, 0, 0, 0.0, 0.0, 0,
     "finite (X): return 1 for finite elements of X");
 
-  DEFUN_MAPPER (fix, 0, fix, 0, fix, 0.0, 0.0, 0,
+  DEFUN_MAPPER (fix, 0, 0, 0, fix, 0, fix, 0.0, 0.0, 0,
     "fix (X): round elements of X toward zero");
 
-  DEFUN_MAPPER (floor, 0, floor, 0, floor, 0.0, 0.0, 0,
+  DEFUN_MAPPER (floor, 0, 0, 0, floor, 0, floor, 0.0, 0.0, 0,
     "floor (X): round elements of X toward -Inf");
 
-  DEFUN_MAPPER (gamma, 0, xgamma, 0, 0, 0.0, 0.0, 0,
+  DEFUN_MAPPER (gamma, 0, 0, 0, xgamma, 0, 0, 0.0, 0.0, 0,
     "gamma (X): compute gamma (X) for each element of X");
 
-  DEFUN_MAPPER (imag, 0, imag, imag, 0, 0.0, 0.0, 0,
+  DEFUN_MAPPER (imag, 0, 0, 0, imag, imag, 0, 0.0, 0.0, 0,
     "imag (X): return imaginary part for each elements of X");
 
-  DEFUN_MAPPER (isalnum, xisalnum, 0, 0, 0, 0.0, 0.0, 0,
+  DEFUN_MAPPER (isalnum, xisalnum, 0, 0, 0, 0, 0, 0.0, 0.0, 0,
     "isalnum (X): ");
 
-  DEFUN_MAPPER (isalpha, xisalpha, 0, 0, 0, 0.0, 0.0, 0,
+  DEFUN_MAPPER (isalpha, xisalpha, 0, 0, 0, 0, 0, 0.0, 0.0, 0,
     "isalpha (X): ");
 
-  DEFUN_MAPPER (isascii, xisascii, 0, 0, 0, 0.0, 0.0, 0,
+  DEFUN_MAPPER (isascii, xisascii, 0, 0, 0, 0, 0, 0.0, 0.0, 0,
     "isascii (X): ");
 
-  DEFUN_MAPPER (iscntrl, xiscntrl, 0, 0, 0, 0.0, 0.0, 0,
+  DEFUN_MAPPER (iscntrl, xiscntrl, 0, 0, 0, 0, 0, 0.0, 0.0, 0,
     "iscntrl (X): ");
 
-  DEFUN_MAPPER (isdigit, xisdigit, 0, 0, 0, 0.0, 0.0, 0,
+  DEFUN_MAPPER (isdigit, xisdigit, 0, 0, 0, 0, 0, 0.0, 0.0, 0,
     "isdigit (X): ");
 
-  DEFUN_MAPPER (isinf, 0, xisinf, xisinf, 0, 0.0, 0.0, 0,
+  DEFUN_MAPPER (isinf, 0, xisinf, xisinf, 0, 0, 0, 0.0, 0.0, 0,
     "isinf (X): return 1 for elements of X infinite");
 
-  DEFUN_MAPPER (isgraph, xisgraph, 0, 0, 0, 0.0, 0.0, 0,
+  DEFUN_MAPPER (isgraph, xisgraph, 0, 0, 0, 0, 0, 0.0, 0.0, 0,
     "isgraph (X): ");
 
-  DEFUN_MAPPER (islower, xislower, 0, 0, 0, 0.0, 0.0, 0,
+  DEFUN_MAPPER (islower, xislower, 0, 0, 0, 0, 0, 0.0, 0.0, 0,
     "islower (X): ");
 
-  DEFUN_MAPPER (isnan, 0, xisnan, xisnan, 0, 0.0, 0.0, 0,
+  DEFUN_MAPPER (isnan, 0, xisnan, xisnan, 0, 0, 0, 0.0, 0.0, 0,
     "isnan (X): return 1 where elements of X are NaNs");
 
-  DEFUN_MAPPER (isprint, xisprint, 0, 0, 0, 0.0, 0.0, 0,
+  DEFUN_MAPPER (isprint, xisprint, 0, 0, 0, 0, 0, 0.0, 0.0, 0,
     "isprint (X): ");
 
-  DEFUN_MAPPER (ispunct, xispunct, 0, 0, 0, 0.0, 0.0, 0,
+  DEFUN_MAPPER (ispunct, xispunct, 0, 0, 0, 0, 0, 0.0, 0.0, 0,
     "ispunct (X): ");
 
-  DEFUN_MAPPER (isspace, xisspace, 0, 0, 0, 0.0, 0.0, 0,
+  DEFUN_MAPPER (isspace, xisspace, 0, 0, 0, 0, 0, 0.0, 0.0, 0,
     "isspace (X): ");
 
-  DEFUN_MAPPER (isupper, xisupper, 0, 0, 0, 0.0, 0.0, 0,
+  DEFUN_MAPPER (isupper, xisupper, 0, 0, 0, 0, 0, 0.0, 0.0, 0,
     "isupper (X): ");
 
-  DEFUN_MAPPER (isxdigit, xisxdigit, 0, 0, 0, 0.0, 0.0, 0,
+  DEFUN_MAPPER (isxdigit, xisxdigit, 0, 0, 0, 0, 0, 0.0, 0.0, 0,
     "isxdigit (X): ");
 
-  DEFUN_MAPPER (lgamma, 0, xlgamma, 0, 0, 0.0, 0.0, 0,
+  DEFUN_MAPPER (lgamma, 0, 0, 0, xlgamma, 0, 0, 0.0, 0.0, 0,
     "lgamma (X): compute log gamma (X) for each element of X");
 
-  DEFUN_MAPPER (log, 0, log, 0, log, 0.0, DBL_MAX, 1,
+  DEFUN_MAPPER (log, 0, 0, 0, log, 0, log, 0.0, DBL_MAX, 1,
     "log (X): compute log (X) for each element of X");
 
-  DEFUN_MAPPER (log10, 0, log10, 0, log10, 0.0, DBL_MAX, 1,
+  DEFUN_MAPPER (log10, 0, 0, 0, log10, 0, log10, 0.0, DBL_MAX, 1,
     "log10 (X): compute log10 (X) for each element of X");
 
-  DEFUN_MAPPER (real, 0, real, real, 0, 0.0, 0.0, 0,
+  DEFUN_MAPPER (real, 0, 0, 0, real, real, 0, 0.0, 0.0, 0,
     "real (X): return real part for each element of X");
 
-  DEFUN_MAPPER (round, 0, round, 0, round, 0.0, 0.0, 0,
+  DEFUN_MAPPER (round, 0, 0, 0, round, 0, round, 0.0, 0.0, 0,
     "round (X): round elements of X to nearest integer");
 
-  DEFUN_MAPPER (sign, 0, signum, 0, signum, 0.0, 0.0, 0,
+  DEFUN_MAPPER (sign, 0, 0, 0, signum, 0, signum, 0.0, 0.0, 0,
     "sign (X): apply signum function to elements of X");
 
-  DEFUN_MAPPER (sin, 0, sin, 0, sin, 0.0, 0.0, 0,
+  DEFUN_MAPPER (sin, 0, 0, 0, sin, 0, sin, 0.0, 0.0, 0,
     "sin (X): compute sin (X) for each element of X");
 
-  DEFUN_MAPPER (sinh, 0, sinh, 0, sinh, 0.0, 0.0, 0,
+  DEFUN_MAPPER (sinh, 0, 0, 0, sinh, 0, sinh, 0.0, 0.0, 0,
     "sinh (X): compute sinh (X) for each element of X");
 
-  DEFUN_MAPPER (sqrt, 0, sqrt, 0, sqrt, 0.0, DBL_MAX, 1,
+  DEFUN_MAPPER (sqrt, 0, 0, 0, sqrt, 0, sqrt, 0.0, DBL_MAX, 1,
     "sqrt (X): compute sqrt (X) for each element of X");
 
-  DEFUN_MAPPER (tan, 0, tan, 0, tan, 0.0, 0.0, 0,
+  DEFUN_MAPPER (tan, 0, 0, 0, tan, 0, tan, 0.0, 0.0, 0,
     "tan (X): compute tan (X) for each element of X");
 
-  DEFUN_MAPPER (tanh, 0, tanh, 0, tanh, 0.0, 0.0, 0,
+  DEFUN_MAPPER (tanh, 0, 0, 0, tanh, 0, tanh, 0.0, 0.0, 0,
     "tanh (X): compute tanh (X) for each element of X");
 
-  DEFUN_MAPPER (toascii, xtoascii, 0, 0, 0, 0.0, 0.0, 1,
+  DEFUN_MAPPER (toascii, xtoascii, 0, 0, 0, 0, 0, 0.0, 0.0, 1,
     "toascii (STRING): return ASCII representation of STRING in a matrix");
 
-  DEFUN_MAPPER (tolower, xtolower, 0, 0, 0, 0.0, 0.0, 2,
+  DEFUN_MAPPER (tolower, xtolower, 0, 0, 0, 0, 0, 0.0, 0.0, 2,
     "tolower (STRING): convert upper case characters to lower case in STRING");
 
-  DEFUN_MAPPER (toupper, xtoupper, 0, 0, 0, 0.0, 0.0, 2,
+  DEFUN_MAPPER (toupper, xtoupper, 0, 0, 0, 0, 0, 0.0, 0.0, 2,
     "toupper (STRING): convert lower case characters to upper case in STRING");
 
   DEFALIAS (gammaln, lgamma);
--- a/src/ov-mapper.cc
+++ b/src/ov-mapper.cc
@@ -91,14 +91,15 @@
 		{
 		case 0:
 		  {
-		    Matrix result (nr, nc);
+		    boolMatrix result (nr, nc);
 
 		    // islapha and friends can return any nonzero value
-		    // to mean true, but we want to return 1 or 0 only.
+		    // to mean true, but we want to return true or
+		    // false only.
 
 		    for (int j = 0; j < nc; j++)
 		      for (int i = 0; i < nr; i++)
-			result (i, j) = ch_map_fcn (chm (i, j)) ? 1 : 0;
+			result (i, j) = ch_map_fcn (chm (i, j)) ? true : false;
 
 		    retval = result;
 		  }
@@ -153,6 +154,8 @@
 		}
 	      else if (d_d_map_fcn)
 		retval = d_d_map_fcn (d);
+	      else if (d_b_map_fcn)
+		retval = d_b_map_fcn (d);
 	      else
 		error ("%s: unable to handle real arguments",
 		       name().c_str ());
@@ -179,6 +182,8 @@
 		}
 	      else if (d_d_map_fcn)
 		retval = m.map (d_d_map_fcn);
+	      else if (d_b_map_fcn)
+		retval = m.map (d_b_map_fcn);
 	      else
 		error ("%s: unable to handle real arguments",
 		       name().c_str ());
@@ -194,6 +199,8 @@
 		retval = d_c_map_fcn (c);
 	      else if (c_c_map_fcn)
 		retval = c_c_map_fcn (c);
+	      else if (c_b_map_fcn)
+		retval = c_b_map_fcn (c);
 	      else
 		error ("%s: unable to handle complex arguments",
 		       name().c_str ());
@@ -209,6 +216,8 @@
 		retval = cm.map (d_c_map_fcn);
 	      else if (c_c_map_fcn)
 		retval = cm.map (c_c_map_fcn);
+	      else if (c_b_map_fcn)
+		retval = cm.map (c_b_map_fcn);
 	      else
 		error ("%s: unable to handle complex arguments",
 		       name().c_str ());
--- a/src/ov-mapper.h
+++ b/src/ov-mapper.h
@@ -43,16 +43,20 @@
 public:
 
   typedef int (*ch_mapper) (int);
+  typedef bool (*d_b_mapper) (double);
+  typedef bool (*c_b_mapper) (const Complex&);
   typedef double (*d_d_mapper) (double);
   typedef double (*d_c_mapper) (const Complex&);
   typedef Complex (*c_c_mapper) (const Complex&);
 
-  octave_mapper (ch_mapper ch, d_d_mapper dd, d_c_mapper dc,
+  octave_mapper (ch_mapper ch, d_b_mapper db, c_b_mapper cb,
+		 d_d_mapper dd, d_c_mapper dc,
 		 c_c_mapper cc, double ll, double ul, int f,
 		 const string& nm = string (),
 		 const string& ds = string ())
-    : octave_function (nm, ds), ch_map_fcn (ch), d_d_map_fcn (dd),
-      d_c_map_fcn (dc), c_c_map_fcn (cc),
+    : octave_function (nm, ds), ch_map_fcn (ch),
+      d_b_map_fcn (db), c_b_map_fcn (cb),
+      d_d_map_fcn (dd), d_c_map_fcn (dc), c_c_map_fcn (cc),
       lower_limit (ll), upper_limit (ul), flag (f) { }
 
   ~octave_mapper (void) { }
@@ -72,6 +76,8 @@
   // ch_map_fcn is a kluge.
 
   ch_mapper ch_map_fcn;
+  d_b_mapper d_b_map_fcn;
+  c_b_mapper c_b_map_fcn;
   d_d_mapper d_d_map_fcn;
   d_c_mapper d_c_map_fcn;
   c_c_mapper c_c_map_fcn;