# HG changeset patch # User jwe # Date 879978903 0 # Node ID a8dcfbf87ea342631d2b2dfcc40bb821b75fcea6 # Parent 21208b7973327e7caf8809b257bb62019b739344 [project @ 1997-11-19 22:34:59 by jwe] diff -r 21208b797332 -r a8dcfbf87ea3 ChangeLog --- a/ChangeLog Wed Nov 19 06:26:04 1997 +0000 +++ b/ChangeLog Wed Nov 19 22:35:03 1997 +0000 @@ -1,3 +1,25 @@ +Wed Nov 19 01:54:11 1997 John W. Eaton + + * aclocal.m4 (OCTAVE_CXX_NEW_FRIEND_TEMPLATE_DECL): Don't forget + to call AC_LANG_RESTORE. + + * acconfig.h: Add undefs for NO_EXTERN_TEMPLATE_DECLS and + NEED_TEMPLATE_FCN_SPECS. + + * configure.in (CXX_VERSION): Require 2.7.2 or later. + Define NO_EXTERN_TEMPLATE_DECLS and NEED_TEMPLATE_FCN_SPECS if + using egcs or 2.8.x or later. + +Wed Nov 19 01:38:58 1997 Mumit Khan + + * aclocal.m4 (OCTAVE_CXX_NEW_FRIEND_TEMPLATE_DECL): New macro + check for new friend template declaration syntax (guiding + declarations in DWP). + * configure.in: Use it. + * config.h.in: Add undef for CXX_NEW_FRIEND_TEMPLATE_DECL. + + * configure.in (CC_VERSION, CXX_VERISON): Check for egcs snapshots. + Mon Oct 20 01:31:45 1997 John W. Eaton * configure.in: Reprint important warning messages at the end of diff -r 21208b797332 -r a8dcfbf87ea3 NEWS --- a/NEWS Wed Nov 19 06:26:04 1997 +0000 +++ b/NEWS Wed Nov 19 22:35:03 1997 +0000 @@ -148,6 +148,19 @@ right-hand-side functions that define the set of differential equations with respect to the state vector X. + * Global variables are now initialized to the empty matrix, for + compatibility with Matlab. + + * Explicit initialization of global variables only happens once. + For example, after the following statements are evaluated, g still + has the value 1. + + global g = 1 + global g = 2 + + This is useful for initializing global variables that are used to + maintain state information that is shared among several functions. + * Structure elements completion on the command line actually works now. diff -r 21208b797332 -r a8dcfbf87ea3 acconfig.h --- a/acconfig.h Wed Nov 19 06:26:04 1997 +0000 +++ b/acconfig.h Wed Nov 19 22:35:03 1997 +0000 @@ -10,6 +10,9 @@ internal array and matrix classes. */ #undef BOUNDS_CHECKING +/* Define if your compiler supports `<>' stuff for template friends. */ +#undef CXX_NEW_FRIEND_TEMPLATE_DECL + /* Define if your math.h declares struct exception for matherr() */ #undef EXCEPTION_IN_MATH diff -r 21208b797332 -r a8dcfbf87ea3 aclocal.m4 --- a/aclocal.m4 Wed Nov 19 06:26:04 1997 +0000 +++ b/aclocal.m4 Wed Nov 19 22:35:03 1997 +0000 @@ -565,3 +565,42 @@ AC_DEFINE($1, $3) fi ]) +dnl +dnl Check to see if C++ compiler needs the new friend template declaration +dnl syntax. +dnl +dnl OCTAVE_CXX_NEW_FRIEND_TEMPLATE_DECL +AC_DEFUN(OCTAVE_CXX_NEW_FRIEND_TEMPLATE_DECL, [ + AC_REQUIRE([AC_PROG_CXX]) + AC_MSG_CHECKING([for C++ support for new friend template declaration]) + AC_CACHE_VAL(octave_cv_cxx_new_friend_template_decl, [ + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + rm -f conftest.h + cat > conftest.h < int + operator== (const T&, const T&) + { + return 0; + } +EOB + AC_TRY_LINK([#include "conftest.h"], [ + A a (1); + return a == A(1); + ], + octave_cv_cxx_new_friend_template_decl=no, + octave_cv_cxx_new_friend_template_decl=yes, + octave_cv_cxx_new_friend_template_decl=yes + ) + AC_LANG_RESTORE + ]) + AC_MSG_RESULT($octave_cv_cxx_new_friend_template_decl) + if test $octave_cv_cxx_new_friend_template_decl = yes; then + AC_DEFINE(CXX_NEW_FRIEND_TEMPLATE_DECL) + fi +]) diff -r 21208b797332 -r a8dcfbf87ea3 configure.in --- a/configure.in Wed Nov 19 06:26:04 1997 +0000 +++ b/configure.in Wed Nov 19 22:35:03 1997 +0000 @@ -21,7 +21,7 @@ ### Software Foundation, 59 Temple Place - Suite 330, Boston, MA ### 02111-1307, USA. -AC_REVISION($Revision: 1.286 $) +AC_REVISION($Revision: 1.287 $) AC_PREREQ(2.9) AC_INIT(src/octave.cc) AC_CONFIG_HEADER(config.h) @@ -183,12 +183,17 @@ ADD_CXX_WALL=false NO_IMPLICIT_TEMPLATES= + gxx_version=`$CXX -v 2>&1 | grep "^.*g.. version" | \ - sed -e 's/^.*g.. version *//' -e 's/cygnus-//'` + sed -e 's/^.*g.. version *//' -e 's/cygnus-//' -e 's/egcs-//'` + case "$gxx_version" in changequote(,)dnl - 2.[6789].* | 2.[123456789][0123456789].*) + 1.* | 2.[0123456].* | 2.7.[01]*) changequote([,])dnl + AC_MSG_ERROR([g++ version $gxx_version will not work to compile Octave]) + ;; + 2.7.[23456789]* | 2.7.[123456789][0123456789]*) if test -z "$EXTERN_CXXFLAGS"; then ADD_CXX_WALL=true fi @@ -196,9 +201,13 @@ AC_MSG_RESULT([defining NO_IMPLICIT_TEMPLATES to be $NO_IMPLICIT_TEMPLATES]) ;; changequote(,)dnl - 1.* | 2.[012345].*) + 2.[89].* | 2.[123456789][0123456789].*) changequote([,])dnl - AC_MSG_ERROR([g++ version $gxx_version will not work to compile Octave]) + if test -z "$EXTERN_CXXFLAGS"; then + ADD_CXX_WALL=true + fi + NO_IMPLICIT_TEMPLATES="-fno-implicit-templates" + AC_MSG_RESULT([defining NO_IMPLICIT_TEMPLATES to be $NO_IMPLICIT_TEMPLATES]) ;; *) warn_gxx_only="Octave has only been tested with g++, and I can't find it" @@ -206,18 +215,6 @@ ;; esac -HOST_CXXFLAGS= -case "$gxx_version" in - 2.6.*) - case "$canonical_host_type" in - rs6000-ibm-aix* | powerpc-ibm-aix*) - HOST_CXXFLAGS="-Wa,-u" - AC_MSG_RESULT([defining HOST_CXXFLAGS to be $HOST_CXXFLAGS]) - ;; - esac - ;; -esac - CXX_VERSION= if test -n "$gxx_version"; then CXX_VERSION="$gxx_version" @@ -227,6 +224,8 @@ AC_SUBST(HOST_CXXFLAGS) AC_SUBST(NO_IMPLICIT_TEMPLATES) +OCTAVE_CXX_NEW_FRIEND_TEMPLATE_DECL + ### See which C compiler to use (we expect to find gcc). EXTERN_CFLAGS="$CFLAGS" @@ -239,7 +238,7 @@ ADD_CC_WALL=false gcc_version=`$CC -v 2>&1 | grep "^.*gcc version" | \ - sed -e 's/^.*g.. version *//' -e 's/cygnus-//'` + sed -e 's/^.*g.. version *//' -e 's/cygnus-//' -e 's/egcs-//'` case "$gcc_version" in 2.*) if test -z "$EXTERN_CFLAGS"; then diff -r 21208b797332 -r a8dcfbf87ea3 dlfcn/Makefile.orig --- a/dlfcn/Makefile.orig Wed Nov 19 06:26:04 1997 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -# %W% revision of %E% %U% -# This is an unpublished work copyright (c) 1992 HELIOS Software GmbH -# 30159 Hannover, Germany - -# Do not edit at HELIOS, edit GNUmakefile instead! - -SHELL=/bin/sh -IPATH= -DEFS= -DEBUGFLAGS=-g -DDEBUG -NODEBUGFLAGS=-O -CFLAGS=$(IPATH) $(DEFS) $(NODEBUGFLAGS) -TARGET=libdl.a -DEST=/usr/local/lib -HDRS=dlfcn.h -SRCS=dlfcn.c -NOSTART=-e _nostart # for AIX 3 -#NOSTART=-bnoentry # for AIX 4 -OBJS=$(SRCS:%.c=%.o) - -all: $(TARGET) dlfcn.c - -dlfcn.o: dlfcn.h - -$(TARGET): $(OBJS) dl.exp - $(CC) $(CFLAGS) -o $@ $(OBJS) -bE:dl.exp -bM:SRE $(NOSTART) -lld - -lint: - lint $(IPATH) $(DEFS) $(SRCS) >lintout - -info: - sccs info - -clean: - rm -f lintout a.out core *.o *-lg *% *~ tags deps% - -clobber: clean - rm -f $(TARGET) deps - -install: all - cp $(TARGETS) $(DEST) - -shar: - shar README Makefile dlfcn.h dlfcn.c dl.exp >dlfcn.shar diff -r 21208b797332 -r a8dcfbf87ea3 libcruft/Makefile.in --- a/libcruft/Makefile.in Wed Nov 19 06:26:04 1997 +0000 +++ b/libcruft/Makefile.in Wed Nov 19 22:35:03 1997 +0000 @@ -30,8 +30,7 @@ SUBDIRS = $(CRUFT_DIRS) -DISTFILES = Makefile.in ChangeLog Makerules.in configure.in \ - $(SOURCES) STOP.patch +DISTFILES = Makefile.in ChangeLog Makerules.in $(SOURCES) STOP.patch ifeq ($(SHARED_LIBS), true) BINDISTFILES = libcruft.$(SHLEXT_VER) diff -r 21208b797332 -r a8dcfbf87ea3 liboctave/ChangeLog --- a/liboctave/ChangeLog Wed Nov 19 06:26:04 1997 +0000 +++ b/liboctave/ChangeLog Wed Nov 19 22:35:03 1997 +0000 @@ -1,3 +1,13 @@ +Wed Nov 19 02:30:04 1997 Mumit Khan + + Changes to make support egcs snapshots that implement explicit + specification of template functions according to CD2. + + * MArray.h: If NEED_TEMPLATE_FCN_SPECS is defined, add explicit + template function specs for template friends. + * MArray2.h: Likewise. + * MDiagArray2.h: Likewise. + Thu Nov 13 21:57:16 1997 John W. Eaton * CMatrix.cc (sumsq): Compute equivalent of sum (x .* conj (x)) diff -r 21208b797332 -r a8dcfbf87ea3 liboctave/MArray.h --- a/liboctave/MArray.h Wed Nov 19 06:26:04 1997 +0000 +++ b/liboctave/MArray.h Wed Nov 19 22:35:03 1997 +0000 @@ -30,6 +30,71 @@ #include "Array.h" +#if defined (LTGT) +#undef LTGT +#endif + +#if !defined (CXX_NEW_FRIEND_TEMPLATE_DECL) +#define LTGT +#else + +#define LTGT <> + +template +class MArray; + +template MArray& +operator += (MArray& a, const T& s); + +template MArray& +operator -= (MArray& a, const T& s); + +template MArray& +operator += (MArray& a, const MArray& b); + +template MArray& +operator -= (MArray& a, const MArray& b); + +template MArray +operator + (const MArray& a, const T& s); + +template MArray +operator - (const MArray& a, const T& s); + +template MArray +operator * (const MArray& a, const T& s); + +template MArray +operator / (const MArray& a, const T& s); + +template MArray +operator + (const T& s, const MArray& a); + +template MArray +operator - (const T& s, const MArray& a); + +template MArray +operator * (const T& s, const MArray& a); + +template MArray +operator / (const T& s, const MArray& a); + +template MArray +operator + (const MArray& a, const MArray& b); + +template MArray +operator - (const MArray& a, const MArray& b); + +template MArray +product (const MArray& a, const MArray& b); + +template MArray +quotient (const MArray& a, const MArray& b); + +template MArray +operator - (const MArray& a); +#endif + // One dimensional array with math ops. template @@ -57,44 +122,45 @@ // element by element MArray by scalar ops - friend MArray& operator += (MArray& a, const T& s); - friend MArray& operator -= (MArray& a, const T& s); + friend MArray& operator += LTGT (MArray& a, const T& s); + friend MArray& operator -= LTGT (MArray& a, const T& s); // element by element MArray by MArray ops - friend MArray& operator += (MArray& a, const MArray& b); - friend MArray& operator -= (MArray& a, const MArray& b); + friend MArray& operator += LTGT (MArray& a, const MArray& b); + friend MArray& operator -= LTGT (MArray& a, const MArray& b); // element by element MArray by scalar ops - friend MArray operator + (const MArray& a, const T& s); - friend MArray operator - (const MArray& a, const T& s); - friend MArray operator * (const MArray& a, const T& s); - friend MArray operator / (const MArray& a, const T& s); + friend MArray operator + LTGT (const MArray& a, const T& s); + friend MArray operator - LTGT (const MArray& a, const T& s); + friend MArray operator * LTGT (const MArray& a, const T& s); + friend MArray operator / LTGT (const MArray& a, const T& s); // element by element scalar by MArray ops - friend MArray operator + (const T& s, const MArray& a); - friend MArray operator - (const T& s, const MArray& a); - friend MArray operator * (const T& s, const MArray& a); - friend MArray operator / (const T& s, const MArray& a); + friend MArray operator + LTGT (const T& s, const MArray& a); + friend MArray operator - LTGT (const T& s, const MArray& a); + friend MArray operator * LTGT (const T& s, const MArray& a); + friend MArray operator / LTGT (const T& s, const MArray& a); // element by element MArray by MArray ops - friend MArray operator + (const MArray& a, const MArray& b); + friend MArray operator + LTGT (const MArray& a, const MArray& b); - friend MArray operator - (const MArray& a, const MArray& b); + friend MArray operator - LTGT (const MArray& a, const MArray& b); - friend MArray product (const MArray& a, const MArray& b); - friend MArray quotient (const MArray& a, const MArray& b); + friend MArray product LTGT (const MArray& a, const MArray& b); + friend MArray quotient LTGT (const MArray& a, const MArray& b); - friend MArray operator - (const MArray& a); + friend MArray operator - LTGT (const MArray& a); }; +#undef LTGT + extern void gripe_nonconformant (const char *op, int op1_len, int op2_len); - #define INSTANTIATE_MARRAY_FRIENDS(T) \ template MArray& operator += (MArray& a, const T& s); \ template MArray& operator -= (MArray& a, const T& s); \ diff -r 21208b797332 -r a8dcfbf87ea3 liboctave/MArray2.h --- a/liboctave/MArray2.h Wed Nov 19 06:26:04 1997 +0000 +++ b/liboctave/MArray2.h Wed Nov 19 22:35:03 1997 +0000 @@ -30,6 +30,71 @@ #include "Array2.h" +#if defined (LTGT) +#undef LTGT +#endif + +#if !defined (CXX_NEW_FRIEND_TEMPLATE_DECL) +#define LTGT +#else + +#define LTGT <> + +template +class MArray2; + +template MArray2& +operator += (MArray2& a, const T& s); + +template MArray2& +operator -= (MArray2& a, const T& s); + +template MArray2& +operator += (MArray2& a, const MArray2& b); + +template MArray2& +operator -= (MArray2& a, const MArray2& b); + +template MArray2 +operator + (const MArray2& a, const T& s); + +template MArray2 +operator - (const MArray2& a, const T& s); + +template MArray2 +operator * (const MArray2& a, const T& s); + +template MArray2 +operator / (const MArray2& a, const T& s); + +template MArray2 +operator + (const T& s, const MArray2& a); + +template MArray2 +operator - (const T& s, const MArray2& a); + +template MArray2 +operator * (const T& s, const MArray2& a); + +template MArray2 +operator / (const T& s, const MArray2& a); + +template MArray2 +operator + (const MArray2& a, const MArray2& b); + +template MArray2 +operator - (const MArray2& a, const MArray2& b); + +template MArray2 +product (const MArray2& a, const MArray2& b); + +template MArray2 +quotient (const MArray2& a, const MArray2& b); + +template MArray2 +operator - (const MArray2& a); +#endif + // Two dimensional array with math ops. template @@ -57,39 +122,41 @@ // element by element MArray2 by scalar ops - friend MArray2& operator += (MArray2& a, const T& s); - friend MArray2& operator -= (MArray2& a, const T& s); + friend MArray2& operator += LTGT (MArray2& a, const T& s); + friend MArray2& operator -= LTGT (MArray2& a, const T& s); // element by element MArray2 by MArray2 ops - friend MArray2& operator += (MArray2& a, const MArray2& b); - friend MArray2& operator -= (MArray2& a, const MArray2& b); + friend MArray2& operator += LTGT (MArray2& a, const MArray2& b); + friend MArray2& operator -= LTGT (MArray2& a, const MArray2& b); // element by element MArray2 by scalar ops - friend MArray2 operator + (const MArray2& a, const T& s); - friend MArray2 operator - (const MArray2& a, const T& s); - friend MArray2 operator * (const MArray2& a, const T& s); - friend MArray2 operator / (const MArray2& a, const T& s); + friend MArray2 operator + LTGT (const MArray2& a, const T& s); + friend MArray2 operator - LTGT (const MArray2& a, const T& s); + friend MArray2 operator * LTGT (const MArray2& a, const T& s); + friend MArray2 operator / LTGT (const MArray2& a, const T& s); // element by element scalar by MArray2 ops - friend MArray2 operator + (const T& s, const MArray2& a); - friend MArray2 operator - (const T& s, const MArray2& a); - friend MArray2 operator * (const T& s, const MArray2& a); - friend MArray2 operator / (const T& s, const MArray2& a); + friend MArray2 operator + LTGT (const T& s, const MArray2& a); + friend MArray2 operator - LTGT (const T& s, const MArray2& a); + friend MArray2 operator * LTGT (const T& s, const MArray2& a); + friend MArray2 operator / LTGT (const T& s, const MArray2& a); // element by element MArray2 by MArray2 ops - friend MArray2 operator + (const MArray2& a, const MArray2& b); - friend MArray2 operator - (const MArray2& a, const MArray2& b); + friend MArray2 operator + LTGT (const MArray2& a, const MArray2& b); + friend MArray2 operator - LTGT (const MArray2& a, const MArray2& b); - friend MArray2 product (const MArray2& a, const MArray2& b); - friend MArray2 quotient (const MArray2& a, const MArray2& b); + friend MArray2 product LTGT (const MArray2& a, const MArray2& b); + friend MArray2 quotient LTGT (const MArray2& a, const MArray2& b); - friend MArray2 operator - (const MArray2& a); + friend MArray2 operator - LTGT (const MArray2& a); }; +#undef LTGT + extern void gripe_nonconformant (const char *op, int op1_nr, int op1_nc, int op2_nr, int op2_nc); diff -r 21208b797332 -r a8dcfbf87ea3 liboctave/MDiagArray2.h --- a/liboctave/MDiagArray2.h Wed Nov 19 06:26:04 1997 +0000 +++ b/liboctave/MDiagArray2.h Wed Nov 19 22:35:03 1997 +0000 @@ -31,6 +31,47 @@ #include "DiagArray2.h" #include "MArray2.h" +#if defined (LTGT) +#undef LTGT +#endif + +#if !defined (CXX_NEW_FRIEND_TEMPLATE_DECL) +#define LTGT +#else + +#define LTGT <> + +template +class MDiagArray2; + +template MDiagArray2& +operator += (MDiagArray2& a, const MDiagArray2& b); + +template MDiagArray2& +operator -= (MDiagArray2& a, const MDiagArray2& b); + +template MDiagArray2 +operator * (const MDiagArray2& a, const T& s); + +template MDiagArray2 +operator / (const MDiagArray2& a, const T& s); + +template MDiagArray2 +operator * (const T& s, const MDiagArray2& a); + +template MDiagArray2 +operator + (const MDiagArray2& a, const MDiagArray2& b); + +template MDiagArray2 +operator - (const MDiagArray2& a, const MDiagArray2& b); + +template MDiagArray2 +product (const MDiagArray2& a, const MDiagArray2& b); + +template MDiagArray2 +operator - (const MDiagArray2& a); +#endif + // Two dimensional diagonal array with math ops. template @@ -72,33 +113,35 @@ // element by element MDiagArray2 by MDiagArray2 ops friend MDiagArray2& - operator += (MDiagArray2& a, const MDiagArray2& b); + operator += LTGT (MDiagArray2& a, const MDiagArray2& b); friend MDiagArray2& - operator -= (MDiagArray2& a, const MDiagArray2& b); + operator -= LTGT (MDiagArray2& a, const MDiagArray2& b); // element by element MDiagArray2 by scalar ops - friend MDiagArray2 operator * (const MDiagArray2& a, const T& s); - friend MDiagArray2 operator / (const MDiagArray2& a, const T& s); + friend MDiagArray2 operator * LTGT (const MDiagArray2& a, const T& s); + friend MDiagArray2 operator / LTGT (const MDiagArray2& a, const T& s); // element by element scalar by MDiagArray2 ops - friend MDiagArray2 operator * (const T& s, const MDiagArray2& a); + friend MDiagArray2 operator * LTGT (const T& s, const MDiagArray2& a); // element by element MDiagArray2 by MDiagArray2 ops friend MDiagArray2 - operator + (const MDiagArray2& a, const MDiagArray2& b); + operator + LTGT (const MDiagArray2& a, const MDiagArray2& b); + + friend MDiagArray2 + operator - LTGT (const MDiagArray2& a, const MDiagArray2& b); friend MDiagArray2 - operator - (const MDiagArray2& a, const MDiagArray2& b); + product LTGT (const MDiagArray2& a, const MDiagArray2& b); - friend MDiagArray2 - product (const MDiagArray2& a, const MDiagArray2& b); + friend MDiagArray2 operator - LTGT (const MDiagArray2& a); +}; - friend MDiagArray2 operator - (const MDiagArray2& a); -}; +#undef LTGT #define INSTANTIATE_MDIAGARRAY_FRIENDS(T) \ template MDiagArray2& operator += (MDiagArray2& a, const MDiagArray2& b); \ diff -r 21208b797332 -r a8dcfbf87ea3 liboctave/mx-inlines.cc --- a/liboctave/mx-inlines.cc Wed Nov 19 06:26:04 1997 +0000 +++ b/liboctave/mx-inlines.cc Wed Nov 19 22:35:03 1997 +0000 @@ -223,8 +223,8 @@ OP_DUP_FCN (, make_complex, Complex, double) -OP_DUP_FCN (-, negate, double, double) -OP_DUP_FCN (-, negate, Complex, Complex) +OP_DUP_FCN (-, change_sign, double, double) +OP_DUP_FCN (-, change_sign, Complex, Complex) OP_DUP_FCN (real, real_dup, double, Complex) OP_DUP_FCN (imag, imag_dup, double, Complex) diff -r 21208b797332 -r a8dcfbf87ea3 octMakefile.in --- a/octMakefile.in Wed Nov 19 06:26:04 1997 +0000 +++ b/octMakefile.in Wed Nov 19 22:35:03 1997 +0000 @@ -26,7 +26,7 @@ DISTFILES = $(CONF_DISTFILES) \ BUGS COPYING INSTALL INSTALL.OCTAVE NEWS NEWS.[0-9] PROJECTS \ README README.Linux README.Windows ROADMAP SENDING-PATCHES \ - THANKS INFO.PATCH move-if-change octave-sh octave-bug.in \ + THANKS move-if-change octave-sh octave-bug.in \ install-octave mkinstalldirs mkoctfile.in texi2dvi \ ChangeLog ChangeLog.[0-9] diff -r 21208b797332 -r a8dcfbf87ea3 src/ChangeLog --- a/src/ChangeLog Wed Nov 19 06:26:04 1997 +0000 +++ b/src/ChangeLog Wed Nov 19 22:35:03 1997 +0000 @@ -1,3 +1,19 @@ +Wed Nov 19 02:05:40 1997 Mumit Khan + + * DLD-FUNCTIONS/filter.cc: Don't include extern template decls if + NO_EXTERN_TEMPLATE_DECLS is defined. + * ov-cx-mat.cc: Likewise. + * ov-re-mat.cc: Likewise. + * ov-str-mat.cc: Likewise. + + * ov-cx-mat.h (octave_complex_matrix::decrement, + octave_complex_matrix): Use explicit Complex constructor. + +Wed Nov 19 00:08:13 1997 John W. Eaton + + * pt-decl.cc (tree_global_command::do_init): Initialize global + values to `[]'. Only perform explicit initialization once. + Tue Nov 18 04:27:55 1997 John W. Eaton * pr-output.cc (Vfixed_point_format): New variable. diff -r 21208b797332 -r a8dcfbf87ea3 src/DLD-FUNCTIONS/filter.cc --- a/src/DLD-FUNCTIONS/filter.cc Wed Nov 19 06:26:04 1997 +0000 +++ b/src/DLD-FUNCTIONS/filter.cc Wed Nov 19 22:35:03 1997 +0000 @@ -36,11 +36,13 @@ #include "error.h" #include "oct-obj.h" +#if !defined (NO_EXTERN_TEMPLATE_DECLS) extern MArray filter (MArray&, MArray&, MArray&); extern MArray filter (MArray&, MArray&, MArray&); +#endif template MArray @@ -125,6 +127,7 @@ return y; } +#if !defined (NO_EXTERN_TEMPLATE_DECLS) extern MArray filter (MArray&, MArray&, MArray&, MArray&); @@ -132,6 +135,7 @@ extern MArray filter (MArray&, MArray&, MArray&, MArray&); +#endif template MArray diff -r 21208b797332 -r a8dcfbf87ea3 src/ov-cx-mat.cc --- a/src/ov-cx-mat.cc Wed Nov 19 06:26:04 1997 +0000 +++ b/src/ov-cx-mat.cc Wed Nov 19 22:35:03 1997 +0000 @@ -122,7 +122,9 @@ return retval; } +#if !defined (NO_EXTERN_TEMPLATE_DECLS) extern void assign (Array2&, const Array2&); +#endif void octave_complex_matrix::assign (const octave_value_list& idx, @@ -161,7 +163,9 @@ } } +#if !defined (NO_EXTERN_TEMPLATE_DECLS) extern void assign (Array2&, const Array2&); +#endif void octave_complex_matrix::assign (const octave_value_list& idx, diff -r 21208b797332 -r a8dcfbf87ea3 src/ov-cx-mat.h --- a/src/ov-cx-mat.h Wed Nov 19 06:26:04 1997 +0000 +++ b/src/ov-cx-mat.h Wed Nov 19 22:35:03 1997 +0000 @@ -132,9 +132,9 @@ octave_value hermitian (void) const { return octave_value (matrix.hermitian ()); } - void increment (void) { matrix += 1.0; } + void increment (void) { matrix += Complex (1.0); } - void decrement (void) { matrix -= 1.0; } + void decrement (void) { matrix -= Complex (1.0); } void print (ostream& os, bool pr_as_read_syntax = false) const; diff -r 21208b797332 -r a8dcfbf87ea3 src/ov-re-mat.cc --- a/src/ov-re-mat.cc Wed Nov 19 06:26:04 1997 +0000 +++ b/src/ov-re-mat.cc Wed Nov 19 22:35:03 1997 +0000 @@ -110,7 +110,9 @@ return retval; } +#if !defined (NO_EXTERN_TEMPLATE_DECLS) extern void assign (Array2&, const Array2&); +#endif void octave_matrix::assign (const octave_value_list& idx, const Matrix& rhs) diff -r 21208b797332 -r a8dcfbf87ea3 src/ov-str-mat.cc --- a/src/ov-str-mat.cc Wed Nov 19 06:26:04 1997 +0000 +++ b/src/ov-str-mat.cc Wed Nov 19 22:35:03 1997 +0000 @@ -94,7 +94,9 @@ return retval; } +#if !defined (NO_EXTERN_TEMPLATE_DECLS) extern void assign (Array2&, const Array2&); +#endif void octave_char_matrix_str::assign (const octave_value_list& idx, diff -r 21208b797332 -r a8dcfbf87ea3 src/pt-decl.cc --- a/src/pt-decl.cc Wed Nov 19 06:26:04 1997 +0000 +++ b/src/pt-decl.cc Wed Nov 19 22:35:03 1997 +0000 @@ -95,13 +95,14 @@ { id->link_to_global (); - tree_expression *expr = elt.expression (); + octave_lvalue ult = id->lvalue (); - if (expr) + if (ult.is_undefined ()) { - octave_value init_val = expr->rvalue (); + tree_expression *expr = elt.expression (); - octave_lvalue ult = id->lvalue (); + octave_value init_val = expr + ? expr->rvalue () : octave_value (Matrix ()); ult.assign (octave_value::asn_eq, init_val); } diff -r 21208b797332 -r a8dcfbf87ea3 src/version.h --- a/src/version.h Wed Nov 19 06:26:04 1997 +0000 +++ b/src/version.h Wed Nov 19 22:35:03 1997 +0000 @@ -23,7 +23,7 @@ #if !defined (octave_version_h) #define octave_version_h 1 -#define OCTAVE_VERSION "2.1.0" +#define OCTAVE_VERSION "2.1.3" #define OCTAVE_COPYRIGHT \ "Copyright (C) 1996, 1997 John W. Eaton."