changeset 18097:72221b9ce477

maint: Periodic merge of gui-release to default.
author John W. Eaton <jwe@octave.org>
date Thu, 05 Dec 2013 12:14:06 -0500
parents 69ac19bb878e (current diff) 5559a8bbca82 (diff)
children 6c706a83070f
files
diffstat 15 files changed, 109 insertions(+), 130 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Thu Dec 05 12:04:40 2013 -0500
+++ b/.hgtags	Thu Dec 05 12:14:06 2013 -0500
@@ -80,3 +80,4 @@
 608e307b49149b32a6d09c2f06493d04d3af9be4 ss-3-7-5
 3a9efb68272df556dccb84c87933dd8238e88902 ss-3-7-6
 cc13924a4266fb0359f59fabdce11071e6051d48 ss-3-7-7
+d734216aa2b1022c190e6b07d7ccdd59fe15678f rc-3-8-0-1
--- a/Makefile.am	Thu Dec 05 12:04:40 2013 -0500
+++ b/Makefile.am	Thu Dec 05 12:14:06 2013 -0500
@@ -38,8 +38,6 @@
   NEWS \
   README \
   CITATION \
-  bootstrap \
-  bootstrap.conf \
   build-aux/find-files-with-tests.sh \
   build-aux/mk-opts.pl \
   build-aux/move-if-change \
--- a/configure.ac	Thu Dec 05 12:04:40 2013 -0500
+++ b/configure.ac	Thu Dec 05 12:14:06 2013 -0500
@@ -19,13 +19,13 @@
 ### <http://www.gnu.org/licenses/>.
 
 AC_PREREQ([2.62])
-AC_INIT([GNU Octave], [4.1.0+], [http://octave.org/bugs.html], [octave])
+AC_INIT([GNU Octave], [3.9.0+], [http://octave.org/bugs.html], [octave])
 
 dnl PACKAGE_VERSION is set by the AC_INIT VERSION arg
 OCTAVE_VERSION="$PACKAGE_VERSION"
-OCTAVE_API_VERSION_NUMBER="48"
+OCTAVE_API_VERSION_NUMBER="49"
 OCTAVE_API_VERSION="api-v$OCTAVE_API_VERSION_NUMBER+"
-OCTAVE_RELEASE_DATE="2013-09-23"
+OCTAVE_RELEASE_DATE="2013-12-04"
 OCTAVE_COPYRIGHT="Copyright (C) 2013 John W. Eaton and others."
 AC_SUBST(OCTAVE_VERSION)
 AC_SUBST(OCTAVE_API_VERSION_NUMBER)
--- a/doc/interpreter/contrib.txi	Thu Dec 05 12:04:40 2013 -0500
+++ b/doc/interpreter/contrib.txi	Thu Dec 05 12:14:06 2013 -0500
@@ -134,7 +134,7 @@
 # attach ../nasty2.diff to your bug report
 @end example
 
-Mercurial has a more useful extensions that really should be enabled.
+Mercurial has a few more useful extensions that really should be enabled.
 They are not enabled by default due to a number of factors
 (mostly because they don't work in all terminal types).
 
--- a/doc/interpreter/doccheck/aspell-octave.en.pws	Thu Dec 05 12:04:40 2013 -0500
+++ b/doc/interpreter/doccheck/aspell-octave.en.pws	Thu Dec 05 12:14:06 2013 -0500
@@ -1141,7 +1141,6 @@
 wblinv
 wblpdf
 wblrnd
-WebKit
 Weibull
 Welch
 welch
--- a/doc/interpreter/external.txi	Thu Dec 05 12:04:40 2013 -0500
+++ b/doc/interpreter/external.txi	Thu Dec 05 12:14:06 2013 -0500
@@ -1773,17 +1773,18 @@
 @end group
 @end example
 
-It is worth noting that, if only builtin funcions are to be calle from 
+It is worth noting that, if only builtin functions are to be called from 
 a C++ standalone program, then it does not need to initialize the 
-interpreter to do so. The general rule is that, for a builtin 
+interpreter to do so.  The general rule is that, for a builtin 
 function named @code{function_name} in the interpreter, there will be
 a C++ function named @code{Ffunction_name} (note the prepended capital 
-@code{F}) accessible in the C++ API. The declarations for all builtin 
+@code{F}) accessible in the C++ API@.  The declarations for all builtin 
 functions are collected in the header file @code{builtin-defun-decls.h}.
-This feature should be used with care as the list of built-in functions can change.  
-No guarantees can be made that a function that is currently built in won't be implemented 
-as a .m file or as a dynamically linked function in the future.
-An example of how to call builtin functions from C++ can be seen in the code
+This feature should be used with care as the list of built-in functions can
+change.  No guarantees can be made that a function that is currently built in
+won't be implemented as a .m file or as a dynamically linked function in the
+future.  An example of how to call builtin functions from C++ can be seen in the
+code
 
 @example
 @EXAMPLEFILE(standalonebuiltin.cc)
--- a/doc/interpreter/install.txi	Thu Dec 05 12:04:40 2013 -0500
+++ b/doc/interpreter/install.txi	Thu Dec 05 12:14:06 2013 -0500
@@ -237,6 +237,10 @@
 GNU Linear Programming Kit (@url{http://www.gnu.org/software/glpk}).
 GPLK is required for the function @code{glpk}.
 
+@item @nospell{gl2ps}
+OpenGL to PostScript printing library (@url{http://www.geuz.org/gl2ps/}).
+@nospell{gl2ps} is required for printing when using the FLTK toolkit.
+
 @item gnuplot
 Interactive graphics program (@url{http://www.gnuplot.info}).  gnuplot
 is currently the default graphics renderer for Octave.
@@ -285,7 +289,7 @@
 @item Qt
 GUI and utility libraries (@url{}).  Qt is required for building the GUI.
 It is a large framework, but the only components required are the GUI,
-core, WebKit, and network modules.
+core, and network modules.
 
 @item SuiteSparse
 Sparse matrix factorization library
@@ -677,83 +681,19 @@
 @item
 SuiteSparse (@url{http://www.cise.ufl.edu/research/sparse/SuiteSparse})
 
-@itemize @minus
-@item
-In @file{UFconfig/UFconfig.mk} use the following options for
-@env{CFLAGS} and @env{F77FLAGS}:
+Pass the following options to @command{make} to enable 64-bit integers
+for @sc{blas} library calls.  On 64-bit Windows systems, use
+@code{-DLONGBLAS="long long"} instead.
 
 @example
 @group
-CC = gcc
-CFLAGS = -fPIC -O -DLP64 -DLONGBLAS='long int' -DLONG='long int'
-F77 = gfortran
-F77FLAGS = -fPIC -O -fdefault-integer-8
-BLAS = -L$BLAS/lib -lblas -lgfortran"
-LAPACK = -L$LAPACK/lib -llapack"
-@end group
-@end example
-
-@item
-Disable the GPL-incompatible @code{METIS} library:
-
-@example
-@group
-CHOLMOD_CONFIG = -DNPARTITION
-SPQR_CONFIG = -DNPARTITION
-METIS_PATH =
-METIS =
+CFLAGS='-DLONGBLAS=long'
+CXXFLAGS='-DLONGBLAS=long'
 @end group
 @end example
 
-@item
-Disable the @code{DI} versions of the @code{CHOLMOD} library files by
-setting
-
-@example
-OBJ = $(DL)
-@end example
-
-@noindent
-in @file{CHOLMOD/Lib/Makefile}.
-
-@item
-Disable the @code{DI} versions of the @code{CHOLMOD} tests by commenting
-out or deleting the following lines in @file{CHOLMOD/Demo/Makefile}:
-
-@example
-@group
-./cholmod_demo < Matrix/bcsstk01.tri
-./cholmod_demo < Matrix/lp_afiro.tri
-./cholmod_demo < Matrix/can___24.mtx
-./cholmod_demo < Matrix/c.tri
-./cholmod_simple < Matrix/c.tri
-./cholmod_simple < Matrix/can___24.mtx
-./cholmod_simple < Matrix/bcsstk01.tri
-@end group
-@end example
-
-@item
-Run @command{make} to build the libraries.
-
-@item
-The SuiteSparse @file{Makefile} does not have an install target so
-you must install the files by hand:
-
-@example
-@group
-mkdir $prefix64/include/suitesparse
-cp UFconfig/UFconfig.h $prefix64/include/suitesparse
-for d in AMD BTF CAMD CCOLAMD \
-         CHOLMOD COLAMD CXSparse UMFPACK; do
-  cp $d/Lib/lib*a $prefix64/lib
-  cp $d/Include/*h $prefix64/include/suitesparse
-done
-@end group
-@end example
-
-@item
-You can generate shared versions of these libraries by doing the
-following in the @file{$prefix64/lib} directory: 
+The SuiteSparse makefiles don't generate shared libraries.  On some
+systems, you can generate them by doing something as simple as
 
 @example
 @group
@@ -769,19 +709,18 @@
 @end group
 @end example
 
-@end itemize
+@noindent
+Other systems may require a different solution.
 
 @item ATLAS instead of reference @sc{blas} and @sc{lapack}
 
 Suggestions on how to compile ATLAS would be most welcome.
 
 @item @sc{glpk}
-
-Suggestions on how to compile @sc{glpk} would be most welcome.
-
 @item Qhull (@url{http://www.qhull.org})
 
-Suggestions on how to compile Qhull would be most welcome.
+Both @sc{glpk} and Qhull use @code{int} internally so maximum problem
+sizes may be limited.
 
 @item Octave
 
--- a/libgui/src/m-editor/file-editor-tab.cc	Thu Dec 05 12:04:40 2013 -0500
+++ b/libgui/src/m-editor/file-editor-tab.cc	Thu Dec 05 12:14:06 2013 -0500
@@ -1158,31 +1158,12 @@
 }
 
 void
-file_editor_tab::message_duplicate_file_name (const QString& saveFileName)
-{
-  // Could overwrite the file here (and tell user the file was
-  // overwritten), but the user could have unintentionally
-  // selected the same name not intending to overwrite.
-
-  // Create a NonModal message about error.
-  QMessageBox* msgBox
-    = new QMessageBox (QMessageBox::Critical, tr ("Octave Editor"),
-                       tr ("File not saved! The selected file name\n%1\n"
-                           "is the same as the current file name").
-                       arg (saveFileName),
-                       QMessageBox::Ok, 0);
-
-  show_dialog (msgBox);
-}
-
-void
 file_editor_tab::handle_save_file_as_answer (const QString& saveFileName)
 {
   if (saveFileName == _file_name)
     {
-      message_duplicate_file_name (saveFileName);
-      // Nothing done, allow editing again.
-      _edit_area->setReadOnly (false);
+      // same name as actual file, save it as "save" would do
+      save_file (saveFileName);
     }
   else
     {
@@ -1194,17 +1175,11 @@
 void
 file_editor_tab::handle_save_file_as_answer_close (const QString& saveFileName)
 {
-  if (saveFileName == _file_name)
-    {
-      message_duplicate_file_name (saveFileName);
-      // Nothing done, allow editing again.
-      _edit_area->setReadOnly (false);
-    }
-  else
-    {
-      // Have editor check for conflict, delete tab after save.
-      emit editor_check_conflict_save (saveFileName, true);
-    }
+  // saveFileName == _file_name can not happen, because we only can get here
+  // when we close a tab and _file_name is not a valid file name yet
+
+  // Have editor check for conflict, delete tab after save.
+  emit editor_check_conflict_save (saveFileName, true);
 }
 
 void
--- a/libgui/src/m-editor/file-editor-tab.h	Thu Dec 05 12:04:40 2013 -0500
+++ b/libgui/src/m-editor/file-editor-tab.h	Thu Dec 05 12:14:06 2013 -0500
@@ -179,7 +179,6 @@
   bool valid_file_name (const QString& file=QString ());
   void save_file (const QString& saveFileName, bool remove_on_success = false);
   void save_file_as (bool remove_on_success = false);
-  void message_duplicate_file_name (const QString& fileName);
 
   void update_lexer ();
   void request_add_breakpoint (int line);
--- a/libinterp/dldfcn/__delaunayn__.cc	Thu Dec 05 12:04:40 2013 -0500
+++ b/libinterp/dldfcn/__delaunayn__.cc	Thu Dec 05 12:14:06 2013 -0500
@@ -64,6 +64,23 @@
   gnulib::fclose (f);
 }
 
+static bool
+octave_qhull_dims_ok (octave_idx_type dim, octave_idx_type n, const char *who)
+{
+  if (sizeof (octave_idx_type) > sizeof (int))
+    {
+      int maxval = std::numeric_limits<int>::max ();
+
+      if (dim > maxval || n > maxval)
+        {
+          error ("%s: dimension too large for Qhull", who);
+          return false;
+        }
+    }
+
+  return true;
+}
+
 DEFUN_DLD (__delaunayn__, args, ,
            "-*- texinfo -*-\n\
 @deftypefn  {Loadable Function} {@var{T} =} __delaunayn__ (@var{pts})\n\
@@ -89,6 +106,9 @@
   const octave_idx_type dim = p.columns ();
   const octave_idx_type n = p.rows ();
 
+  if (! octave_qhull_dims_ok (dim, n, "__delaynayn__"))
+    return retval;
+
   // Default options
   std::string options;
   if (dim <= 3)
--- a/libinterp/dldfcn/__voronoi__.cc	Thu Dec 05 12:04:40 2013 -0500
+++ b/libinterp/dldfcn/__voronoi__.cc	Thu Dec 05 12:14:06 2013 -0500
@@ -59,6 +59,23 @@
   gnulib::fclose (f);
 }
 
+static bool
+octave_qhull_dims_ok (octave_idx_type dim, octave_idx_type n, const char *who)
+{
+  if (sizeof (octave_idx_type) > sizeof (int))
+    {
+      int maxval = std::numeric_limits<int>::max ();
+
+      if (dim > maxval || n > maxval)
+        {
+          error ("%s: dimension too large for Qhull", who);
+          return false;
+        }
+    }
+
+  return true;
+}
+
 DEFUN_DLD (__voronoi__, args, ,
            "-*- texinfo -*-\n\
 @deftypefn  {Loadable Function} {@var{C}, @var{F} =} __voronoi__ (@var{caller}, @var{pts})\n\
@@ -86,6 +103,9 @@
   const octave_idx_type dim = points.columns ();
   const octave_idx_type num_points = points.rows ();
 
+  if (! octave_qhull_dims_ok (dim, num_points, "__voronoi__"))
+    return retval;
+
   points = points.transpose ();
 
   std::string options;
--- a/libinterp/dldfcn/convhulln.cc	Thu Dec 05 12:04:40 2013 -0500
+++ b/libinterp/dldfcn/convhulln.cc	Thu Dec 05 12:14:06 2013 -0500
@@ -55,6 +55,23 @@
   gnulib::fclose (f);
 }
 
+static bool
+octave_qhull_dims_ok (octave_idx_type dim, octave_idx_type n, const char *who)
+{
+  if (sizeof (octave_idx_type) > sizeof (int))
+    {
+      int maxval = std::numeric_limits<int>::max ();
+
+      if (dim > maxval || n > maxval)
+        {
+          error ("%s: dimension too large for Qhull", who);
+          return false;
+        }
+    }
+
+  return true;
+}
+
 DEFUN_DLD (convhulln, args, nargout,
            "-*- texinfo -*-\n\
 @deftypefn  {Loadable Function} {@var{h} =} convhulln (@var{pts})\n\
@@ -102,6 +119,9 @@
   const octave_idx_type dim = points.columns ();
   const octave_idx_type num_points = points.rows ();
 
+  if (! octave_qhull_dims_ok (dim, num_points, "convhulln"))
+    return retval;
+
   points = points.transpose ();
 
   std::string options;
--- a/scripts/image/rgb2ind.m	Thu Dec 05 12:04:40 2013 -0500
+++ b/scripts/image/rgb2ind.m	Thu Dec 05 12:14:06 2013 -0500
@@ -30,7 +30,7 @@
 ## an image exactly the same as the input.  No dithering or other form of color
 ## quantization is performed.  The output class of the indexed image @var{x}
 ## can be uint8, uint16 or double, whichever is required to specify the
-## number of unique colours in the image (which will be equal to the number
+## number of unique colors in the image (which will be equal to the number
 ## of rows in @var{map}) in order
 ##
 ## Multi-dimensional indexed images (of size @nospell{MxNx3xK}) are also
--- a/scripts/set/setxor.m	Thu Dec 05 12:04:40 2013 -0500
+++ b/scripts/set/setxor.m	Thu Dec 05 12:14:06 2013 -0500
@@ -61,7 +61,7 @@
       na = rows (a); nb = rows (b);
       [c, i] = sortrows ([a; b]);
       n = rows (c);
-      idx = find (all (c(1:n-1) == c(2:n), 2));
+      idx = find (all (c(1:n-1, :) == c(2:n, :), 2));
       if (! isempty (idx))
         c([idx, idx+1],:) = [];
         i([idx, idx+1],:) = [];
@@ -94,9 +94,16 @@
 
 %!assert (setxor ([1,2,3],[2,3,4]),[1,4])
 %!assert (setxor ({'a'}, {'a', 'b'}), {'b'})
+
 %!test
 %! a = [3, 1, 4, 1, 5];  b = [1, 2, 3, 4];
-%! [y, ia, ib] = setxor (a, b.');
-%! assert (y, [2, 5]);
-%! assert (y, sort ([a(ia), b(ib)]));
+%! [c, ia, ib] = setxor (a, b.');
+%! assert (c, [2, 5]);
+%! assert (c, sort ([a(ia), b(ib)]));
 
+%!test
+%! a = [1 2; 4 5; 1 3];  b = [1 1; 1 2; 4 5; 2 10];
+%! [c, ia, ib] = setxor (a, b, "rows");
+%! assert (c, [1 1; 1 3; 2 10]);
+%! assert (c, sortrows ([a(ia,:); b(ib,:)]));
+
--- a/test/bug-38236/bug-38236.tst	Thu Dec 05 12:04:40 2013 -0500
+++ b/test/bug-38236/bug-38236.tst	Thu Dec 05 12:14:06 2013 -0500
@@ -1,3 +1,3 @@
-%!test
+%!xtest
 %! u_vr