[Pkg-octave-commit] rev 790 - in trunk/packages/octave/debian: .
patches
Rafael Laboissiere
rafael at costa.debian.org
Thu Oct 26 14:15:41 UTC 2006
Author: rafael
Date: 2006-10-26 14:15:41 +0000 (Thu, 26 Oct 2006)
New Revision: 790
Modified:
trunk/packages/octave/debian/changelog
trunk/packages/octave/debian/patches/50_empty-lhs-sparse.dpatch
Log:
Debian release octave2.9_2.9.9-5
Modified: trunk/packages/octave/debian/changelog
===================================================================
--- trunk/packages/octave/debian/changelog 2006-10-25 04:20:10 UTC (rev 789)
+++ trunk/packages/octave/debian/changelog 2006-10-26 14:15:41 UTC (rev 790)
@@ -1,3 +1,12 @@
+octave2.9 (2.9.9-5) unstable; urgency=low
+
+ * debian/patches/50_empty-lhs-sparse.dpatch: NModified this patch
+ to treat cases when the size of the LHS sparse matrix is reajusted
+ while assigning to it (really closes: #394982). Thanks to David
+ Bateman and John W. Eaton.
+
+ -- Rafael Laboissiere <rafael at debian.org> Thu, 26 Oct 2006 13:43:17 +0200
+
octave2.9 (2.9.9-4) unstable; urgency=low
* debian/patches/50_empty-lhs-sparse.dpatch: Added patch to avoid
Modified: trunk/packages/octave/debian/patches/50_empty-lhs-sparse.dpatch
===================================================================
--- trunk/packages/octave/debian/patches/50_empty-lhs-sparse.dpatch 2006-10-25 04:20:10 UTC (rev 789)
+++ trunk/packages/octave/debian/patches/50_empty-lhs-sparse.dpatch 2006-10-26 14:15:41 UTC (rev 790)
@@ -1,35 +1,69 @@
#! /bin/sh /usr/share/dpatch/dpatch-run
-## 50_empty-lhs-sparse.dpatch by Rafael Laboissiere <rafael at debian.org>
+## 50_empty-lhs-sparse.dpatch by <rafael at debian.org>
##
-## DP: Resize the lhs at the point we know the assignment can succeed if the
-## DP: lhs is empty. Patch posted in octave-maintainers at octave.org by
-## DP: David Bateman.
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: New patch generated from octave2.9 2.9.9-4 diff.gz
@DPATCH@
+--- octave2.9-2.9.9.orig/doc/conf.texi
++++ octave2.9-2.9.9/doc/conf.texi
+@@ -3,7 +3,7 @@
+ @c For copying conditions, see the file gpl.texi.
+
+ @set OCTAVE_MANUAL
+- at set OCTAVEHOME /usr/local
++ at set OCTAVEHOME /usr
+ @set VERSION 2.9.9
+ @set HAVE_COLAMD
+ @set HAVE_CHOLMOD
--- octave2.9-2.9.9.orig/liboctave/Sparse.cc
+++ octave2.9-2.9.9/liboctave/Sparse.cc
-@@ -2471,6 +2471,11 @@
+@@ -2387,6 +2387,8 @@
+ {
+ (*current_liboctave_error_handler)
+ ("A(I, J) = X: can only have 1 or 2 indexes for sparse matrices");
++
++ lhs.clear_index ();
+ return 0;
+ }
- Sparse<LT> stmp (new_nr, new_nc, new_nzmx);
+@@ -2482,8 +2484,9 @@
+ octave_idx_type iii = 0;
+ octave_idx_type ii = idx_i.elem (iii);
+ octave_idx_type ppp = 0;
+- octave_idx_type ppi = lhs.cidx(j+1) -
+- lhs.cidx(j);
++ octave_idx_type ppi = (j >= lhs_nc ? 0 :
++ lhs.cidx(j+1) -
++ lhs.cidx(j));
+ octave_idx_type pp = (ppp < ppi ?
+ lhs.ridx(lhs.cidx(j)+ppp) :
+ new_nr);
+@@ -2634,8 +2637,9 @@
+ octave_idx_type iii = 0;
+ octave_idx_type ii = idx_i.elem (iii);
+ octave_idx_type ppp = 0;
+- octave_idx_type ppi = lhs.cidx(j+1) -
+- lhs.cidx(j);
++ octave_idx_type ppi = (j >= lhs_nc ? 0 :
++ lhs.cidx(j+1) -
++ lhs.cidx(j));
+ octave_idx_type pp = (ppp < ppi ?
+ lhs.ridx(lhs.cidx(j)+ppp) :
+ new_nr);
+--- octave2.9-2.9.9.orig/src/__gnuplot_raw__.cc
++++ octave2.9-2.9.9/src/__gnuplot_raw__.cc
+@@ -3380,9 +3380,11 @@
+ octave_value_list args;
-+ // Started with an empty matrix. Now that we know
-+ // the assignment will succeed, resize lhs
-+ if (lhs_nr <= 0 || lhs_nc <= 0)
-+ lhs = Sparse<RT>(n, m);
+ args(0) = "off";
+-
+ feval ("hold", args);
+
++ args.resize (0);
++ feval ("__clear_plot__", args);
+
- octave_idx_type jji = 0;
- octave_idx_type jj = idx_j.elem (jji);
- octave_idx_type kk = 0;
-@@ -2623,6 +2628,11 @@
+ return octave_value_list ();
+ }
- Sparse<LT> stmp (new_nr, new_nc, new_nzmx);
-
-+ // Started with an empty matrix. Now that we know
-+ // the assignment will succeed, resize lhs
-+ if (lhs_nr <= 0 || lhs_nc <= 0)
-+ lhs = Sparse<RT>(n, m);
-+
- octave_idx_type jji = 0;
- octave_idx_type jj = idx_j.elem (jji);
- octave_idx_type kk = 0;
More information about the Pkg-octave-commit
mailing list