Mercurial > hg > octave-lojdl
changeset 3209:fbb332b96e4f
[project @ 1998-11-03 20:48:54 by jwe]
author | jwe |
---|---|
date | Tue, 03 Nov 1998 20:48:58 +0000 |
parents | e8a7163701be |
children | 258d7b26c719 |
files | install-octave.in libcruft/Makefile.in liboctave/Makefile.in src/ChangeLog src/Makefile.in src/data.cc src/ov-base.h src/ov-bool-mat.h src/ov-bool.h src/ov.h src/version.h |
diffstat | 11 files changed, 42 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/install-octave.in +++ b/install-octave.in @@ -234,7 +234,7 @@ for f in `cat LIBRARIES` do file=`basename $f` - cp $f $octlibdir/$file.$SHLEXT_VER + cp $f.$SHLEXT_VER $octlibdir/$file.$SHLEXT_VER chmod 644 $octlibdir/$file.$SHLEXT_VER ( cd $octlibdir ln -s $file.$SHLEXT_VER $file.$SHLEXT )
--- a/libcruft/Makefile.in +++ b/libcruft/Makefile.in @@ -32,8 +32,8 @@ DISTFILES = Makefile.in ChangeLog Makerules.in $(SOURCES) STOP.patch ifeq ($(SHARED_LIBS), true) + BINDISTLIBS = libcruft/libcruft BINDISTFILES = libcruft.$(SHLEXT_VER) - BINDISTLIBS = libcruft/libcruft.$(SHLEXT_VER) endif all: $(SUBDIRS) shared-lib
--- a/liboctave/Makefile.in +++ b/liboctave/Makefile.in @@ -96,7 +96,7 @@ ifeq ($(SHARED_LIBS), true) BINDISTLIBS = liboctave/liboctave - BINDISTFILES = $(addsuffix $(BINDISTLIBS), $(SHLEXT_VER)) + BINDISTFILES = liboctave.$(SHLEXT_VER) endif MAKEDEPS_1 := $(patsubst %.cc, %.d, $(SOURCES))
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,13 @@ +Tue Nov 3 09:40:24 1998 John W. Eaton <jwe@bevo.che.wisc.edu> + + * data.cc (Fis_bool): New function. + Also add alias for islogical. + + * ov.h (octave_value::is_bool_type): New function. + * ov-base.h (octave_base_value::is_bool_type): Likewise. + * ov-bool.h (octave_bool::is_bool_type): Likewise. + * ov-bool-mat.h (octave_bool_matrix::is_bool_type): Likewise. + Mon Nov 2 13:36:04 1998 John W. Eaton <jwe@bevo.che.wisc.edu> * lex.l (handle_close_brace): Also handle case of ']' followed by
--- a/src/Makefile.in +++ b/src/Makefile.in @@ -182,7 +182,7 @@ ifeq ($(SHARED_LIBS), true) BINDISTLIBS = src/liboctinterp - BINDISTFILES = $(addsuffix $(BINDISTLIBS), $(SHLEXT_VER)) + BINDISTFILES = octave $(OCT_FILES) liboctinterp.$(SHLEXT_VER) else BINDISTFILES = octave $(OCT_FILES) endif @@ -394,7 +394,7 @@ $(addprefix $(srcdir)/, $(DLD_SRC)) \ > ../`cat ../.fname`/src/links-to-make; \ fi - if [ -n "$(BINDISTLIBNS)" ]; then \ + if [ -n "$(BINDISTLIBS)" ]; then \ echo $(BINDISTLIBS) >> ../`cat ../.fname`/LIBRARIES; \ fi .PHONY: bin-dist
--- a/src/data.cc +++ b/src/data.cc @@ -753,6 +753,21 @@ return retval; } +DEFUN (is_bool, args, , + "is_bool (x): return nonzero if x is a boolean object") +{ + octave_value retval; + + if (args.length () == 1) + retval = args(0).is_bool_type () ? 1.0 : 0.0; + else + print_usage ("is_bool"); + + return retval; +} + +DEFALIAS (islogical, is_bool); + DEFUN (is_complex, args, , "is_complex (x): return nonzero if x is a complex numeric object") {
--- a/src/ov-base.h +++ b/src/ov-base.h @@ -119,6 +119,8 @@ octave_value any (void) const { return 0.0; } + bool is_bool_type (void) const { return false; } + bool is_real_type (void) const { return false; } bool is_complex_type (void) const { return false; }
--- a/src/ov-bool-mat.h +++ b/src/ov-bool-mat.h @@ -101,6 +101,8 @@ octave_value all (void) const { return matrix.all (); } octave_value any (void) const { return matrix.any (); } + bool is_bool_type (void) const { return true; } + bool is_real_type (void) const { return true; } bool is_matrix_type (void) const { return true; }
--- a/src/ov-bool.h +++ b/src/ov-bool.h @@ -92,8 +92,12 @@ octave_value all (void) const { return scalar; } octave_value any (void) const { return scalar; } + bool is_bool_type (void) const { return true; } + bool is_real_type (void) const { return true; } + bool is_scalar_type (void) const { return true; } + bool is_numeric_type (void) const { return true; } bool valid_as_scalar_index (void) const { return scalar; }