# HG changeset patch # User jwe # Date 855890172 0 # Node ID a5a300c6115931e628eb8677bf617509399932be # Parent 5b13fb88db90ef5a0b05ccb1ed0dcc414eb7c18f [project @ 1997-02-14 03:16:06 by jwe] diff -r 5b13fb88db90 -r a5a300c61159 ChangeLog --- a/ChangeLog Thu Feb 13 22:36:26 1997 +0000 +++ b/ChangeLog Fri Feb 14 03:16:12 1997 +0000 @@ -1,5 +1,12 @@ Thu Feb 13 16:25:09 1997 John W. Eaton + * configure.in (SH_LD, SH_LDFLAGS): New variables. + * Makeconf.in: Substitute them. + + * configure.in (SH_LIBS, SH_FLIBS, SH_TERMLIBS): Delete. + + * Makeconf.in (SH_LIBS, SH_FLIBS, SH_TERMLIBS): Delete. + * octave-bug.in: Reinstate RLD_FLAG. * mkoctfile.in: Likewise. * Makeconf.in: Likewise. diff -r 5b13fb88db90 -r a5a300c61159 Makeconf.in --- a/Makeconf.in Thu Feb 13 22:36:26 1997 +0000 +++ b/Makeconf.in Fri Feb 14 03:16:12 1997 +0000 @@ -114,6 +114,9 @@ ALL_LDFLAGS = $(LIBFLAGS) $(FORTRAN_MAIN_FLAG) $(GCC_IEEE_FP_FLAG) \ $(LD_STATIC_FLAG) $(CPICFLAG) $(LDFLAGS) +SH_LD = @SH_LD@ +SH_LDFLAGS = @SH_LDFLAGS@ + RLD_FLAG = @RLD_FLAG@ FLIBS = @FLIBS@ @@ -124,10 +127,6 @@ LIBPLPLOT = @LIBPLPLOT@ LIBDLFCN = @LIBDLFCN@ -SH_FLIBS = @SH_FLIBS@ -SH_TERMLIBS = @SH_TERMLIBS@ -SH_LIBS = @SH_LIBS@ - # The arguments passed to configure. config_opts = @config_opts@ diff -r 5b13fb88db90 -r a5a300c61159 configure.in --- a/configure.in Thu Feb 13 22:36:26 1997 +0000 +++ b/configure.in Fri Feb 14 03:16:12 1997 +0000 @@ -21,7 +21,7 @@ ### Software Foundation, 59 Temple Place - Suite 330, Boston, MA ### 02111-1307, USA. -AC_REVISION($Revision: 1.254 $) +AC_REVISION($Revision: 1.255 $) AC_PREREQ(2.9) AC_INIT(src/octave.cc) AC_CONFIG_HEADER(config.h) @@ -385,12 +385,19 @@ CXXPICFLAG=-fPIC FPICFLAG=-fPIC SHLEXT=so +SH_LD="$CC" +SH_LDFLAGS=-shared RLD_FLAG= case "$canonical_host_type" in + *-*-386bsd* | *-*-openbsd* | *-*-netbsd* | *-*-freebsd*) + SH_LD=ld + SH_LDFLAGS=-Bshareable + ;; alpha-dec-osf*) CPICFLAG= CXXPICFLAG= FPICFLAG= + SH_LDFLAGS="-Xlinker -exepct_unresolved -Xlinker '*'" RLD_FLAG='-Xlinker -rpath -Xlinker $(libdir)' ;; changequote(,)dnl @@ -449,11 +456,17 @@ AC_MSG_RESULT([defining CXXPICFLAG to be $CXXPICFLAG]) AC_MSG_RESULT([defining SHLEXT to be $SHLEXT]) AC_MSG_RESULT([defining DLFCN_DIR to be $DLFCN_DIR]) +AC_MSG_RESULT([defining SH_LD to be $SH_LD]) +AC_MSG_RESULT([defining SH_LDFLAGS to be $SH_LDFLAGS]) +AC_MSG_RESULT([defining RLD_FLAG to be $RLD_FLAG]) AC_SUBST(FPICFLAG) AC_SUBST(CPICFLAG) AC_SUBST(CXXPICFLAG) AC_SUBST(SHLEXT) AC_SUBST(DLFCN_DIR) +AC_SUBST(SH_LD) +AC_SUBST(SH_LDFLAGS) +AC_SUBST(RLD_FLAG) ### Allow compilation of smaller kernel. This only works if some form ### of dynamic linking is also supported and used. @@ -1036,25 +1049,6 @@ AC_PROG_LN_S -### Kluge for SunOS 4.x vs. shared libraries. - -SH_LIBS="$LIBS" -SH_FLIBS="$FLIBS" -SH_TERMLIBS="$TERMLIBS" -case "$canonical_host_type" in - *-*-sunos4*) - SH_LIBS= - SH_FLIBS= - SH_TERMLIBS= - ;; -esac -AC_MSG_RESULT([defining SH_LIBS to be $SH_LIBS]) -AC_MSG_RESULT([defining SH_FLIBS to be $SH_FLIBS]) -AC_MSG_RESULT([defining SH_TERMLIBS to be $SH_TERMLIBS]) -AC_SUBST(SH_LIBS) -AC_SUBST(SH_FLIBS) -AC_SUBST(SH_TERMLIBS) - AC_CHECK_PROG(RUNTEST, runtest, runtest, []) AC_CHECK_PROG(EXPECT, expect, expect, []) if test -z "$EXPECT"; then diff -r 5b13fb88db90 -r a5a300c61159 kpathsea/ChangeLog --- a/kpathsea/ChangeLog Thu Feb 13 22:36:26 1997 +0000 +++ b/kpathsea/ChangeLog Fri Feb 14 03:16:12 1997 +0000 @@ -1,3 +1,11 @@ +Thu Feb 13 17:35:20 1997 John W. Eaton + + * configure.in: Update config for shared libraries. + * Makefile.in (stamp-shared): Use $(SH_LD) $(SH_LDFLAGS) instead + of $(CXX) -shared. + + * Makefile.in (stamp-picdir): Silence noise about making pic. + Sat Jan 25 22:33:56 1997 John W. Eaton * Makefile.in (bin-dist): New target. diff -r 5b13fb88db90 -r a5a300c61159 kpathsea/Makefile.in --- a/kpathsea/Makefile.in Thu Feb 13 22:36:26 1997 +0000 +++ b/kpathsea/Makefile.in Fri Feb 14 03:16:12 1997 +0000 @@ -45,9 +45,18 @@ default all: stamp-picdir kpsewhich MakeTeXPK kpathsea.info stamp-shared stamp-picdir: - if [ -n "$(CPICFLAG)" ]; then \ - if [ -d pic ]; then true; else mkdir pic ; fi ; \ - else true; fi + @if $(SHARED_LIBS); then \ + if [ -n "$(CPICFLAG)" ]; then \ + if [ -d pic ]; then \ + true ; \ + else \ + echo "mkdir pic" ; \ + mkdir pic ; \ + fi ; \ + else \ + true ; \ + fi ; \ + fi touch stamp-picdir libkpathsea.a: $(objects) @@ -65,7 +74,7 @@ stamp-shared: $(PICOBJ) if $(SHARED_LIBS); then \ - $(CC) -shared -o libkpathsea.$(SHLEXT) $(PICOBJ); \ + $(SH_LD) $(SH_LDFLAGS) -o libkpathsea.$(SHLEXT) $(PICOBJ) ; \ fi touch stamp-shared diff -r 5b13fb88db90 -r a5a300c61159 kpathsea/configure.in --- a/kpathsea/configure.in Thu Feb 13 22:36:26 1997 +0000 +++ b/kpathsea/configure.in Fri Feb 14 03:16:12 1997 +0000 @@ -17,28 +17,34 @@ SHARED_LIBS=false) AC_SUBST(SHARED_LIBS) -if $SHARED_LIBS; then - CPICFLAG=-fPIC - SHLEXT=so - case "$canonical_host_type" in - alpha-dec-osf*) - CPICFLAG= - ;; - rs6000-ibm-aix*) - CPICFLAG= - ;; - hppa*-hp-hpux*) - SHLEXT=sl - ;; - esac -else - CPICFLAG= - SHLEXT= -fi +CPICFLAG=-fPIC +SHLEXT=so +SH_LD="$CC" +SH_LDFLAGS=-shared +case "$canonical_host_type" in + *-*-386bsd* | *-*-openbsd* | *-*-netbsd* | *-*-freebsd*) + SH_LD=ld + SH_LDFLAGS=-Bshareable + ;; + alpha-dec-osf*) + CPICFLAG= + SH_LDFLAGS="-Xlinker -exepct_unresolved -Xlinker '*'" + ;; + rs6000-ibm-aix* | powerpc-ibm-aix*) + CPICFLAG= + ;; + hppa*-hp-hpux*) + SHLEXT=sl + ;; +esac AC_MSG_RESULT([defining CPICFLAG to be $CPICFLAG]) AC_MSG_RESULT([defining SHLEXT to be $SHLEXT]) +AC_MSG_RESULT([defining SH_LD to be $SH_LD]) +AC_MSG_RESULT([defining SH_LDFLAGS to be $SH_LDFLAGS]) AC_SUBST(CPICFLAG) AC_SUBST(SHLEXT) +AC_SUBST(SH_LD) +AC_SUBST(SH_LDFLAGS) sinclude(common.ac) diff -r 5b13fb88db90 -r a5a300c61159 libcruft/ChangeLog --- a/libcruft/ChangeLog Thu Feb 13 22:36:26 1997 +0000 +++ b/libcruft/ChangeLog Fri Feb 14 03:16:12 1997 +0000 @@ -1,3 +1,10 @@ +Thu Feb 13 17:33:41 1997 John W. Eaton + + * Makefile.in (stamp-shared): Use $(SH_LD) $(SH_LDFLAGS) instead + of $(CXX) -shared. + + * Makerules.in (stamp-picdir): Silence noise about making pic. + Mon Jan 27 15:52:29 1997 John W. Eaton * Version 2.0.2 released. diff -r 5b13fb88db90 -r a5a300c61159 libcruft/Makefile.in --- a/libcruft/Makefile.in Thu Feb 13 22:36:26 1997 +0000 +++ b/libcruft/Makefile.in Fri Feb 14 03:16:12 1997 +0000 @@ -69,8 +69,7 @@ stamp-shared: $(CRUFT_PICOBJ) if $(SHARED_LIBS); then \ - $(CC) -shared -o libcruft.$(SHLEXT) $(CRUFT_PICOBJ) \ - $(SH_FLIBS) -lm ; \ + $(SH_LD) $(SH_LDFLAGS) -o libcruft.$(SHLEXT) $(CRUFT_PICOBJ) ; \ else \ true ; \ fi diff -r 5b13fb88db90 -r a5a300c61159 libcruft/Makerules.in --- a/libcruft/Makerules.in Thu Feb 13 22:36:26 1997 +0000 +++ b/libcruft/Makerules.in Fri Feb 14 03:16:12 1997 +0000 @@ -54,11 +54,12 @@ .PRECIOUS: $(LIBCRUFT_OBJS) stamp-picdir: - if [ "$(SHARED_LIBS)" = true ]; then \ + @if $(SHARED_LIBS); then \ if [ -n "$(FPICFLAG)" ]; then \ if [ -d pic ]; then \ true ; \ else \ + echo "mkdir pic" ; \ mkdir pic ; \ fi ; \ fi ; \ diff -r 5b13fb88db90 -r a5a300c61159 liboctave/CColVector.cc --- a/liboctave/CColVector.cc Thu Feb 13 22:36:26 1997 +0000 +++ b/liboctave/CColVector.cc Fri Feb 14 03:16:12 1997 +0000 @@ -726,18 +726,38 @@ // other operations ComplexColumnVector -map (c_c_Mapper f, const ComplexColumnVector& a) +ComplexColumnVector::map (c_c_Mapper f) const { - ComplexColumnVector b (a); - b.map (f); - return b; + ComplexColumnVector b (*this); + return b.apply (f); } -void -ComplexColumnVector::map (c_c_Mapper f) +ColumnVector +ComplexColumnVector::map (d_c_Mapper f) const { + const Complex *d = data (); + + int len = length (); + + ColumnVector retval (len); + + double *r = retval.fortran_vec (); + + for (int i = 0; i < len; i++) + r[i] = f (d[i]); + + return retval; +} + +ComplexColumnVector& +ComplexColumnVector::apply (c_c_Mapper f) +{ + Complex *d = fortran_vec (); // Ensures only one reference to my privates! + for (int i = 0; i < length (); i++) - elem (i) = f (elem (i)); + d[i] = f (d[i]); + + return *this; } Complex diff -r 5b13fb88db90 -r a5a300c61159 liboctave/CColVector.h --- a/liboctave/CColVector.h Thu Feb 13 22:36:26 1997 +0000 +++ b/liboctave/CColVector.h Fri Feb 14 03:16:12 1997 +0000 @@ -172,8 +172,10 @@ // other operations - friend ComplexColumnVector map (c_c_Mapper f, const ComplexColumnVector& a); - void map (c_c_Mapper f); + ComplexColumnVector map (c_c_Mapper f) const; + ColumnVector map (d_c_Mapper f) const; + + ComplexColumnVector& apply (c_c_Mapper f); Complex min (void) const; Complex max (void) const; diff -r 5b13fb88db90 -r a5a300c61159 liboctave/CMatrix.cc --- a/liboctave/CMatrix.cc Thu Feb 13 22:36:26 1997 +0000 +++ b/liboctave/CMatrix.cc Fri Feb 14 03:16:12 1997 +0000 @@ -2929,19 +2929,36 @@ // other operations ComplexMatrix -map (c_c_Mapper f, const ComplexMatrix& a) +ComplexMatrix::map (c_c_Mapper f) const { - ComplexMatrix b (a); - b.map (f); - return b; + ComplexMatrix b (*this); + return b.apply (f); } -void -ComplexMatrix::map (c_c_Mapper f) +Matrix +ComplexMatrix::map (d_c_Mapper f) const { - for (int j = 0; j < cols (); j++) - for (int i = 0; i < rows (); i++) - elem (i, j) = f (elem (i, j)); + const Complex *d = data (); + + Matrix retval (rows (), columns ()); + + double *r = retval.fortran_vec (); + + for (int i = 0; i < length (); i++) + r[i] = f (d[i]); + + return retval; +} + +ComplexMatrix& +ComplexMatrix::apply (c_c_Mapper f) +{ + Complex *d = fortran_vec (); // Ensures only one reference to my privates! + + for (int i = 0; i < length (); i++) + d[i] = f (d[i]); + + return *this; } bool diff -r 5b13fb88db90 -r a5a300c61159 liboctave/CMatrix.h --- a/liboctave/CMatrix.h Thu Feb 13 22:36:26 1997 +0000 +++ b/liboctave/CMatrix.h Fri Feb 14 03:16:12 1997 +0000 @@ -317,8 +317,10 @@ // other operations - friend ComplexMatrix map (c_c_Mapper f, const ComplexMatrix& a); - void map (c_c_Mapper f); + ComplexMatrix map (c_c_Mapper f) const; + Matrix map (d_c_Mapper f) const; + + ComplexMatrix& apply (c_c_Mapper f); bool any_element_is_inf_or_nan (void) const; bool all_elements_are_real (void) const; diff -r 5b13fb88db90 -r a5a300c61159 liboctave/CRowVector.cc --- a/liboctave/CRowVector.cc Thu Feb 13 22:36:26 1997 +0000 +++ b/liboctave/CRowVector.cc Fri Feb 14 03:16:12 1997 +0000 @@ -636,18 +636,38 @@ // other operations ComplexRowVector -map (c_c_Mapper f, const ComplexRowVector& a) +ComplexRowVector::map (c_c_Mapper f) const { - ComplexRowVector b (a); - b.map (f); - return b; + ComplexRowVector b (*this); + return b.apply (f); } -void -ComplexRowVector::map (c_c_Mapper f) +RowVector +ComplexRowVector::map (d_c_Mapper f) const { + const Complex *d = data (); + + int len = length (); + + RowVector retval (len); + + double *r = retval.fortran_vec (); + + for (int i = 0; i < len; i++) + r[i] = f (d[i]); + + return retval; +} + +ComplexRowVector& +ComplexRowVector::apply (c_c_Mapper f) +{ + Complex *d = fortran_vec (); // Ensures only one reference to my privates! + for (int i = 0; i < length (); i++) - elem (i) = f (elem (i)); + d[i] = f (d[i]); + + return *this; } Complex diff -r 5b13fb88db90 -r a5a300c61159 liboctave/CRowVector.h --- a/liboctave/CRowVector.h Thu Feb 13 22:36:26 1997 +0000 +++ b/liboctave/CRowVector.h Fri Feb 14 03:16:12 1997 +0000 @@ -139,8 +139,10 @@ // other operations - friend ComplexRowVector map (c_c_Mapper f, const ComplexRowVector& a); - void map (c_c_Mapper f); + ComplexRowVector map (c_c_Mapper f) const; + RowVector map (d_c_Mapper f) const; + + ComplexRowVector& apply (c_c_Mapper f); Complex min (void) const; Complex max (void) const; diff -r 5b13fb88db90 -r a5a300c61159 liboctave/ChangeLog --- a/liboctave/ChangeLog Thu Feb 13 22:36:26 1997 +0000 +++ b/liboctave/ChangeLog Fri Feb 14 03:16:12 1997 +0000 @@ -1,5 +1,11 @@ Thu Feb 13 14:35:19 1997 John W. Eaton + * Makefile.in (stamp-prereq): Depend on stamp-picdir. + (all): Don't depend on stamp-prereq or stamp-picdir. + (liboctave.a, stamp-shared): Do depend on stamp-prereq. + (stamp-picdir): Silence noise about making pic. + (stamp-shared): Use $(SH_LD) $(SH_LDFLAGS) instead of $(CXX) -shared. + * Array2-idx.h (Array2::index (idx_vector&, idx_vector&)): Fix typo in last change. diff -r 5b13fb88db90 -r a5a300c61159 liboctave/Makefile.in --- a/liboctave/Makefile.in Thu Feb 13 22:36:26 1997 +0000 +++ b/liboctave/Makefile.in Fri Feb 14 03:16:12 1997 +0000 @@ -98,18 +98,19 @@ LIBOCTAVE_DEPEND := $(patsubst %, liboctave.a(%), $(OBJECTS)) -all: stamp-prereq stamp-picdir liboctave.a stamp-shared +all: liboctave.a stamp-shared .PHONY: all -stamp-prereq: safe-stat.h safe-lstat.h +stamp-prereq: stamp-picdir safe-stat.h safe-lstat.h touch stamp-prereq stamp-picdir: - if $(SHARED_LIBS); then \ + @if $(SHARED_LIBS); then \ if [ -n "$(CPICFLAG)" ] || [ -n "$(CXXPICFLAG)" ]; then \ if [ -d pic ]; then \ true ; \ else \ + echo "mkdir pic" ; \ mkdir pic ; \ fi ; \ fi ; \ @@ -118,14 +119,13 @@ fi touch stamp-picdir -liboctave.a: $(OBJECTS) +liboctave.a: stamp-prereq $(OBJECTS) $(AR) $(ARFLAGS) liboctave.a $(OBJECTS) $(RANLIB) liboctave.a -stamp-shared: $(PICOBJ) +stamp-shared: stamp-prereq $(PICOBJ) if $(SHARED_LIBS); then \ - $(CXX) -shared -o liboctave.$(SHLEXT) $(PICOBJ) \ - $(LIBOCTAVE_LFLAGS) $(LIBOCTAVE_LIBS) ; \ + $(SH_LD) $(SH_LDFLAGS) -o liboctave.$(SHLEXT) $(PICOBJ) ; \ else \ true ; \ fi diff -r 5b13fb88db90 -r a5a300c61159 liboctave/chMatrix.h --- a/liboctave/chMatrix.h Thu Feb 13 22:36:26 1997 +0000 +++ b/liboctave/chMatrix.h Fri Feb 14 03:16:12 1997 +0000 @@ -201,6 +201,7 @@ friend Matrix map (d_d_Mapper f, const Matrix& a); friend Matrix map (d_c_Mapper f, const ComplexMatrix& a); + void map (d_d_Mapper f); Matrix all (void) const; diff -r 5b13fb88db90 -r a5a300c61159 liboctave/dColVector.cc --- a/liboctave/dColVector.cc Thu Feb 13 22:36:26 1997 +0000 +++ b/liboctave/dColVector.cc Fri Feb 14 03:16:12 1997 +0000 @@ -282,28 +282,21 @@ // other operations ColumnVector -map (d_d_Mapper f, const ColumnVector& a) +ColumnVector::map (d_d_Mapper f) const { - ColumnVector b (a); - b.map (f); - return b; + ColumnVector b (*this); + return b.apply (f); } -ColumnVector -map (d_c_Mapper f, const ComplexColumnVector& a) +ColumnVector& +ColumnVector::apply (d_d_Mapper f) { - int a_len = a.length (); - ColumnVector b (a_len); - for (int i = 0; i < a_len; i++) - b.elem (i) = f (a.elem (i)); - return b; -} + double *d = fortran_vec (); // Ensures only one reference to my privates! -void -ColumnVector::map (d_d_Mapper f) -{ for (int i = 0; i < length (); i++) - elem (i) = f (elem (i)); + d[i] = f (d[i]); + + return *this; } double diff -r 5b13fb88db90 -r a5a300c61159 liboctave/dColVector.h --- a/liboctave/dColVector.h Thu Feb 13 22:36:26 1997 +0000 +++ b/liboctave/dColVector.h Fri Feb 14 03:16:12 1997 +0000 @@ -86,9 +86,9 @@ // other operations - friend ColumnVector map (d_d_Mapper f, const ColumnVector& a); - friend ColumnVector map (d_c_Mapper f, const ComplexColumnVector& a); - void map (d_d_Mapper f); + ColumnVector map (d_d_Mapper f) const; + + ColumnVector& apply (d_d_Mapper f); double min (void) const; double max (void) const; diff -r 5b13fb88db90 -r a5a300c61159 liboctave/dMatrix.cc --- a/liboctave/dMatrix.cc Thu Feb 13 22:36:26 1997 +0000 +++ b/liboctave/dMatrix.cc Fri Feb 14 03:16:12 1997 +0000 @@ -1841,32 +1841,21 @@ // other operations. Matrix -map (d_d_Mapper f, const Matrix& a) -{ - Matrix b (a); - b.map (f); - return b; -} - -Matrix -map (d_c_Mapper f, const ComplexMatrix& a) +Matrix::map (d_d_Mapper f) const { - int a_nc = a.cols (); - int a_nr = a.rows (); - Matrix b (a_nr, a_nc); - for (int j = 0; j < a_nc; j++) - for (int i = 0; i < a_nr; i++) - b.elem (i, j) = f (a.elem (i, j)); - return b; + Matrix b (*this); + return b.apply (f); } -void -Matrix::map (d_d_Mapper f) +Matrix& +Matrix::apply (d_d_Mapper f) { double *d = fortran_vec (); // Ensures only one reference to my privates! for (int i = 0; i < length (); i++) d[i] = f (d[i]); + + return *this; } bool diff -r 5b13fb88db90 -r a5a300c61159 liboctave/dMatrix.h --- a/liboctave/dMatrix.h Thu Feb 13 22:36:26 1997 +0000 +++ b/liboctave/dMatrix.h Fri Feb 14 03:16:12 1997 +0000 @@ -203,9 +203,9 @@ // other operations - friend Matrix map (d_d_Mapper f, const Matrix& a); - friend Matrix map (d_c_Mapper f, const ComplexMatrix& a); - void map (d_d_Mapper f); + Matrix map (d_d_Mapper f) const; + + Matrix& apply (d_d_Mapper f); bool any_element_is_negative (void) const; bool any_element_is_inf_or_nan (void) const; diff -r 5b13fb88db90 -r a5a300c61159 liboctave/dRowVector.cc --- a/liboctave/dRowVector.cc Thu Feb 13 22:36:26 1997 +0000 +++ b/liboctave/dRowVector.cc Fri Feb 14 03:16:12 1997 +0000 @@ -255,28 +255,21 @@ // other operations RowVector -map (d_d_Mapper f, const RowVector& a) +RowVector::map (d_d_Mapper f) const { - RowVector b (a); - b.map (f); - return b; + RowVector b (*this); + return b.apply (f); } -RowVector -map (d_c_Mapper f, const ComplexRowVector& a) +RowVector& +RowVector::apply (d_d_Mapper f) { - int a_len = a.length (); - RowVector b (a_len); - for (int i = 0; i < a_len; i++) - b.elem (i) = f (a.elem (i)); - return b; -} + double *d = fortran_vec (); // Ensures only one reference to my privates! -void -RowVector::map (d_d_Mapper f) -{ for (int i = 0; i < length (); i++) - elem (i) = f (elem (i)); + d[i] = f (d[i]); + + return *this; } double diff -r 5b13fb88db90 -r a5a300c61159 liboctave/dRowVector.h --- a/liboctave/dRowVector.h Thu Feb 13 22:36:26 1997 +0000 +++ b/liboctave/dRowVector.h Fri Feb 14 03:16:12 1997 +0000 @@ -81,9 +81,9 @@ // other operations - friend RowVector map (d_d_Mapper f, const RowVector& a); - friend RowVector map (d_c_Mapper f, const ComplexRowVector& a); - void map (d_d_Mapper f); + RowVector map (d_d_Mapper f) const; + + RowVector& apply (d_d_Mapper f); double min (void) const; double max (void) const; diff -r 5b13fb88db90 -r a5a300c61159 octave-bug.in --- a/octave-bug.in Thu Feb 13 22:36:26 1997 +0000 +++ b/octave-bug.in Fri Feb 14 03:16:12 1997 +0000 @@ -34,6 +34,7 @@ CXXPICFLAG=%CXXPICFLAG% LDFLAGS=%LDFLAGS% LIBFLAGS=%LIBFLAGS% +RLD_FLAG=%RLD_FLAG% CXXLIBS=%CXXLIBS% TERMLIBS=%TERMLIBS% LIBS=%LIBS% @@ -167,6 +168,7 @@ CXXPICFLAG: $CXXPICFLAG LDFLAGS: $LDFLAGS LIBFLAGS: $LIBFLAGS +RLD_FLAG: $RLD_FLAG CXXLIBS: $CXXLIBS TERMLIBS: $TERMLIBS LIBS: $LIBS diff -r 5b13fb88db90 -r a5a300c61159 readline/ChangeLog --- a/readline/ChangeLog Thu Feb 13 22:36:26 1997 +0000 +++ b/readline/ChangeLog Fri Feb 14 03:16:12 1997 +0000 @@ -1,5 +1,15 @@ Thu Feb 13 13:50:21 1997 John W. Eaton + * Makefile.in (stamp-history, stamp-readline): Use $(SH_LD) + $(SH_LDFLAGS) instead of $(CXX) -shared. + + * configure.in (SH_TERMLIBS): Delete. + Update config for shared libraries. + + * Makefile.in (SH_TERMLIBS): Delete. + + * Makefile.in (stamp-picdir): Silence noise about making pic. + * configure.in (TERMLIBS): Search in same order as in Octave's top-level configure script. diff -r 5b13fb88db90 -r a5a300c61159 readline/Makefile.in --- a/readline/Makefile.in Thu Feb 13 22:36:26 1997 +0000 +++ b/readline/Makefile.in Fri Feb 14 03:16:12 1997 +0000 @@ -21,7 +21,6 @@ SHARED_LIBS = @SHARED_LIBS@ TERMLIBS = @TERMLIBS@ -SH_TERMLIBS = @SH_TERMLIBS@ LIBS_TO_INSTALL = libreadline.a libhistory.a @@ -136,9 +135,18 @@ all: stamp-picdir libreadline.a libhistory.a stamp-readline stamp-history stamp-picdir: - if [ -n "$(CPICFLAG)" ]; then \ - if [ -d pic ]; then true; else mkdir pic ; fi ; \ - else true; fi + @if $(SHARED_LIBS); then \ + if [ -n "$(CPICFLAG)" ]; then \ + if [ -d pic ]; then \ + true ; \ + else \ + echo "mkdir pic" ; \ + mkdir pic ; \ + fi ; \ + else \ + true ; \ + fi ; \ + fi touch stamp-picdir libreadline.a: $(OBJECTS) @@ -153,13 +161,13 @@ stamp-readline: $(PICOBJ) if $(SHARED_LIBS); then \ - $(CC) -shared -o libreadline.$(SHLEXT) $(PICOBJ) $(SH_TERMLIBS); \ + $(SH_LD) $(SH_LDFLAGS) -o libreadline.$(SHLEXT) $(PICOBJ) ; \ fi touch stamp-readline stamp-history: $(HIST_PICOBJ) if $(SHARED_LIBS); then \ - $(CC) -shared -o libhistory.$(SHLEXT) $(HIST_PICOBJ); \ + $(SH_LD) $(SH_LDFLAGS) -o libhistory.$(SHLEXT) $(HIST_PICOBJ); \ fi touch stamp-history diff -r 5b13fb88db90 -r a5a300c61159 readline/configure.in --- a/readline/configure.in Thu Feb 13 22:36:26 1997 +0000 +++ b/readline/configure.in Fri Feb 14 03:16:12 1997 +0000 @@ -29,28 +29,34 @@ SHARED_LIBS=false) AC_SUBST(SHARED_LIBS) -if $SHARED_LIBS; then - CPICFLAG=-fPIC - SHLEXT=so - case "$canonical_host_type" in - alpha-dec-osf*) - CPICFLAG= - ;; - rs6000-ibm-aix*) - CPICFLAG= - ;; - hppa*-hp-hpux*) - SHLEXT=sl - ;; - esac -else - CPICFLAG= - SHLEXT= -fi +CPICFLAG=-fPIC +SHLEXT=so +SH_LD="$CC" +SH_LDFLAGS=-shared +case "$canonical_host_type" in + *-*-386bsd* | *-*-openbsd* | *-*-netbsd* | *-*-freebsd*) + SH_LD=ld + SH_LDFLAGS=-Bshareable + ;; + alpha-dec-osf*) + CPICFLAG= + SH_LDFLAGS="-Xlinker -exepct_unresolved -Xlinker '*'" + ;; + rs6000-ibm-aix* | powerpc-ibm-aix*) + CPICFLAG= + ;; + hppa*-hp-hpux*) + SHLEXT=sl + ;; +esac AC_MSG_RESULT([defining CPICFLAG to be $CPICFLAG]) AC_MSG_RESULT([defining SHLEXT to be $SHLEXT]) +AC_MSG_RESULT([defining SH_LD to be $SH_LD]) +AC_MSG_RESULT([defining SH_LDFLAGS to be $SH_LDFLAGS]) AC_SUBST(CPICFLAG) AC_SUBST(SHLEXT) +AC_SUBST(SH_LD) +AC_SUBST(SH_LDFLAGS) AC_CONFIG_HEADER(config.h) @@ -72,15 +78,6 @@ done AC_SUBST(TERMLIBS) -SH_TERMLIBS="$TERMLIBS" -case "$canonical_host_type" in - *-*-sunos4*) - SH_TERMLIBS= - ;; -esac -AC_MSG_RESULT([defining SH_TERMLIBS to be $SH_TERMLIBS]) -AC_SUBST(SH_TERMLIBS) - case "$canonical_host_type" in *-*-sco*) AC_DEFINE(USG, 1) diff -r 5b13fb88db90 -r a5a300c61159 scripts/ChangeLog --- a/scripts/ChangeLog Thu Feb 13 22:36:26 1997 +0000 +++ b/scripts/ChangeLog Fri Feb 14 03:16:12 1997 +0000 @@ -1,3 +1,8 @@ +Thu Feb 13 19:06:42 1997 John W. Eaton + + * image/saveimage.m: Only clip image data that is actually out of + range. + Sun Feb 9 19:52:08 1997 John W. Eaton * general/is_matrix.m: Scalars, vectors, and empty matrices may diff -r 5b13fb88db90 -r a5a300c61159 scripts/image/saveimage.m --- a/scripts/image/saveimage.m Thu Feb 13 22:36:26 1997 +0000 +++ b/scripts/image/saveimage.m Fri Feb 14 03:16:12 1997 +0000 @@ -141,7 +141,7 @@ img_sz = img_nr * img_nc; img = reshape (img, img_sz, 1); - idx = find (img >= map_nr - 1); + idx = find (img > map_nr); img (idx) = ones (size (idx)) * map_nr; idx = find (img <= 0); diff -r 5b13fb88db90 -r a5a300c61159 src/ChangeLog --- a/src/ChangeLog Thu Feb 13 22:36:26 1997 +0000 +++ b/src/ChangeLog Fri Feb 14 03:16:12 1997 +0000 @@ -1,5 +1,13 @@ Thu Feb 13 03:02:08 1997 John W. Eaton + * Makefile.in (stamp-prereq): Depend on stamp-picdir. + (all): Don't depend on stamp-prereq or stamp-picdir. + (stamp-tinst, stamp-interp, libtinst.a, liboctinterp.a): + Do depend on stamp-prereq. + (stamp-picdir): Silence noise about making pic. + (stamp-tinst, stamp-interp): Use $(SH_LD) $(SH_LDFLAGS) instead of + $(CXX) -shared. + * oct-conf.h.in: Reinstate RLD_FLAG. * toplev.cc (octave_config_info): Likewise. diff -r 5b13fb88db90 -r a5a300c61159 src/Makefile.in --- a/src/Makefile.in Thu Feb 13 22:36:26 1997 +0000 +++ b/src/Makefile.in Fri Feb 14 03:16:12 1997 +0000 @@ -32,16 +32,10 @@ ifeq ($(OCTAVE_LITE), true) ifdef CXXPICFLAG %.oct : pic/%.o - $(CXX) -shared -o $@ $< \ - $(OCTAVE_LFLAGS) \ - $(OCTAVE_LIBS) \ - $(FLIBS) $(LEXLIB) $(TERMLIBS) $(LIBS) + $(CXX) -shared -o $@ $< else %.oct : %.o - $(CXX) -shared -o $@ $< \ - $(OCTAVE_LFLAGS) \ - $(OCTAVE_LIBS) \ - $(FLIBS) $(LEXLIB) $(TERMLIBS) $(LIBS) + $(CXX) -shared -o $@ $< endif endif @@ -177,10 +171,10 @@ BINDISTFILES = octave $(OCT_FILES) endif -all: stamp-prereq stamp-picdir libraries $(OCT_FILES) octave +all: libraries $(OCT_FILES) octave .PHONY: all -stamp-prereq: defaults.h oct-conf.h +stamp-prereq: stamp-picdir defaults.h oct-conf.h touch stamp-prereq octave: octave.o builtins.o $(DLD_STATIC_OBJ) libraries @@ -191,11 +185,12 @@ $(FLIBS) $(LEXLIB) $(TERMLIBS) $(LIBS) stamp-picdir: - if [ "$(SHARED_LIBS)" = true ] || [ "$(OCTAVE_LITE)" = true ]; then \ + @if $(SHARED_LIBS) || [ "$(OCTAVE_LITE)" = true ]; then \ if [ -n "$(CPICFLAG)" ] || [ -n "$(CXXPICFLAG)" ]; then \ if [ -d pic ]; then \ true ; \ else \ + echo "mkdir pic" ; \ mkdir pic ; \ fi ; \ fi ; \ @@ -206,31 +201,25 @@ libraries: liboctinterp.a libtinst.a stamp-interp stamp-tinst -liboctinterp.a: $(OBJECTS) +liboctinterp.a: stamp-prereq $(OBJECTS) $(AR) $(ARFLAGS) liboctinterp.a $(OBJECTS) $(RANLIB) liboctinterp.a -libtinst.a: $(TI_OBJ) +libtinst.a: stamp-prereq $(TI_OBJ) $(AR) $(ARFLAGS) libtinst.a $(TI_OBJ) $(RANLIB) libtinst.a -stamp-interp: $(PICOBJ) +stamp-interp: stamp-prereq $(PICOBJ) if $(SHARED_LIBS); then \ - $(CXX) -shared -o liboctinterp.$(SHLEXT) $(PICOBJ) \ - $(OCTAVE_LFLAGS) \ - -loctave -lcruft -ltinst -lreadline -lkpathsea \ - $(SH_TERMLIBS) $(SH_LIBS) ; \ + $(SH_LD) $(SH_LDFLAGS) -o liboctinterp.$(SHLEXT) $(PICOBJ) ; \ else \ true ; \ fi touch stamp-interp -stamp-tinst: $(TI_PICOBJ) +stamp-tinst: stamp-prereq $(TI_PICOBJ) if $(SHARED_LIBS); then \ - $(CXX) -shared -o libtinst.$(SHLEXT) $(TI_PICOBJ) \ - $(OCTAVE_LFLAGS) \ - -loctinterp -loctave -lcruft -lreadline -lkpathsea \ - $(SH_TERMLIBS) $(SH_LIBS) ; \ + $(SH_LD) $(SH_LDFLAGS) -o libtinst.$(SHLEXT) $(TI_PICOBJ) ; \ else \ true ; \ fi diff -r 5b13fb88db90 -r a5a300c61159 src/gripes.cc --- a/src/gripes.cc Thu Feb 13 22:36:26 1997 +0000 +++ b/src/gripes.cc Fri Feb 14 03:16:12 1997 +0000 @@ -125,7 +125,6 @@ void gripe_wrong_type_arg (const char *name, const string& s) { - string type = tc.type_name (); error ("%s: wrong type argument `%s'", name, s.c_str ()); }