# HG changeset patch # User jwe # Date 1132166732 0 # Node ID b800ae36fc6acb3065e3e858425cd6dc4da80e6b # Parent 8d2903f71c9661ca7ca4e5d59a52e76049e5ccd7 [project @ 2005-11-16 18:45:32 by jwe] diff -r 8d2903f71c96 -r b800ae36fc6a scripts/ChangeLog --- a/scripts/ChangeLog Sat Nov 12 02:31:23 2005 +0000 +++ b/scripts/ChangeLog Wed Nov 16 18:45:32 2005 +0000 @@ -1,3 +1,7 @@ +2005-11-15 John W. Eaton + + * general/shiftdim.m: Doc fix. + 2005-11-07 Keith Goodman * set/unique.m: Doc string fix. diff -r 8d2903f71c96 -r b800ae36fc6a scripts/general/shiftdim.m --- a/scripts/general/shiftdim.m Sat Nov 12 02:31:23 2005 +0000 +++ b/scripts/general/shiftdim.m Wed Nov 16 18:45:32 2005 +0000 @@ -21,10 +21,10 @@ ## @deftypefn {Function File} {@var{y}} = shiftdim (@var{x}, @var{n}) ## @deftypefnx {Function File} {[@var{y}, @var{ns}]} = shiftdim (@var{x}) ## Shifts the dimension of @var{x} by @var{n}, where @var{n} must be -## an integer scalar. When @var{n} is negative, the dimensions of +## an integer scalar. When @var{n} is positive, the dimensions of ## @var{x} are shifted to the left, with the leading dimensions -## circulated to the end. If @var{n} is positive, then the dimensions -## of @var{x} are shifted to the right, with the @var{n} singleton +## circulated to the end. If @var{n} is negative, then the dimensions +## of @var{x} are shifted to the right, with @var{n} leading singleton ## dimensions added. ## ## Called with a single argument, @code{shiftdim}, removes the leading diff -r 8d2903f71c96 -r b800ae36fc6a src/Cell.cc --- a/src/Cell.cc Sat Nov 12 02:31:23 2005 +0000 +++ b/src/Cell.cc Wed Nov 16 18:45:32 2005 +0000 @@ -53,6 +53,10 @@ switch (n) { + case 0: + retval = *this; + break; + case 1: { idx_vector i = idx_arg(0).index_vector (); diff -r 8d2903f71c96 -r b800ae36fc6a src/ChangeLog --- a/src/ChangeLog Sat Nov 12 02:31:23 2005 +0000 +++ b/src/ChangeLog Wed Nov 16 18:45:32 2005 +0000 @@ -1,3 +1,19 @@ +2005-11-16 John W. Eaton + + * Makefile.in (PKG_ADD.inst): New target. + (install): Dependo on it. + (clean): Remove it. + + * mk-pkg-add: New option --install. Don't use --prefix option. + Delete obsolete comments. + + * Cell.cc (Cell::index): Indexing with () is a no-op, not an error. + * oct-map.cc (Octave_map::index): Likewise. + * ov-base-mat.cc (octave_base_matrix::do_index_op): Likewise. + * ov-base-sparse.cc (octave_base_sparse::do_index_op): Likewise. + * ov-str-mat.cc (octave_char_matrix_str::do_index_op_internal): + Likewise. + 2005-11-11 John W. Eaton * Makefile.in (install-oct): Fix thinko in previous change. diff -r 8d2903f71c96 -r b800ae36fc6a src/Makefile.in --- a/src/Makefile.in Sat Nov 12 02:31:23 2005 +0000 +++ b/src/Makefile.in Wed Nov 16 18:45:32 2005 +0000 @@ -343,8 +343,12 @@ @$(top_srcdir)/move-if-change $@-t $@ PKG_ADD: $(DLD_DEF_FILES) - $(srcdir)/mk-pkg-add --prefix $(shell pwd) $(DLD_DEF_FILES) > PKG_ADD-t - mv PKG_ADD-t PKG_ADD + $(srcdir)/mk-pkg-add --prefix $(shell pwd) $(DLD_DEF_FILES) > $@-t + mv $@-t $@ + +PKG_ADD.inst: $(srcdir)/mk-pkg-add $(DLD_DEF_FILES) + $(srcdir)/mk-pkg-add --install $(DLD_DEF_FILES) > $@-t + mv $@-t $@ DOCSTRINGS: gendoc$(BUILD_EXEEXT) ./gendoc > $@-t @@ -396,9 +400,9 @@ cd $(DESTDIR)$(bindir) ; $(LN_S) octave-$(version)$(EXEEXT) octave$(EXEEXT) .PHONY: install-bin -install-oct: +install-oct: PKG_ADD.inst $(top_srcdir)/mkinstalldirs $(DESTDIR)$(octfiledir) - $(srcdir)/mk-pkg-add --prefix $(octfiledir) $(DLD_DEF_FILES) > $(DESTDIR)$(octfiledir)/PKG_ADD + $(INSTALL_DATA) PKG_ADD.inst $(DESTDIR)$(octfiledir)/PKG_ADD if [ -n "$(OCT_FILES)" ]; then \ xfiles="$(OCT_FILES)"; \ for f in $$xfiles; do \ @@ -472,6 +476,7 @@ rm -f $(PICOBJ) $(DLD_PICOBJ) stmp-pic gendoc$(EXEEXT) rm -f builtins.cc ops.cc defaults.h oct-conf.h def-files var-files rm -f PKG_ADD + rm -f PKG_ADD.inst -rmdir pic .PHONY: clean diff -r 8d2903f71c96 -r b800ae36fc6a src/mk-pkg-add --- a/src/mk-pkg-add Sat Nov 12 02:31:23 2005 +0000 +++ b/src/mk-pkg-add Wed Nov 16 18:45:32 2005 +0000 @@ -1,21 +1,25 @@ #! /bin/sh -e -# Create additional links to .oct files that define more than one -# function. - -# If the first arg is --print, only print the links we need to make. - -# The first non-option arg is taken as the directory where the .oct -# files are installed. The remaining arguments should be the list of -# .df files corresponding to the source files that were used to -# create the .oct files. - SED=${SED:-'sed'} +install=false if [ $1 = "--prefix" ]; then shift prefix="$1" shift +elif [ $1 = "--install" ]; then + install=true + shift +fi + +if [ $# -gt 0 ]; then + if $install; then + cat <count: " << rep->count << "\n"; + if (rep) + std::cerr << "~octave_value: rep: " << rep + << " rep->count: " << rep->count << std::endl; + else + std::cerr << "~octave_value: rep is 0!" << std::endl; #endif if (rep && --rep->count == 0) - delete rep; + { + delete rep; + rep = 0; + } } octave_value *