changeset 18288:78c3b4cb0c7f gui-release

maint: Periodic merge of stable to gui-release.
author John W. Eaton <jwe@octave.org>
date Wed, 15 Jan 2014 15:23:46 -0500
parents 12291fb903de (current diff) 9a43d8d6e29e (diff)
children 906e95708ec1 c6e5466d74fe
files libgui/src/main-window.cc
diffstat 5 files changed, 80 insertions(+), 62 deletions(-) [+]
line wrap: on
line diff
--- a/doc/interpreter/install.txi	Tue Jan 14 23:23:50 2014 +0100
+++ b/doc/interpreter/install.txi	Wed Jan 15 15:23:46 2014 -0500
@@ -170,6 +170,17 @@
 Package for building software libraries
 (@url{http://www.gnu.org/software/libtool}).  Libtool is required by
 Automake.
+
+@item gperf
+Perfect hash function generator (@url{http://www.gnu.org/software/gperf}).
+You will need gperf if you modify the @code{octave.gperf} file or if you
+delete the file that is generated from it.
+
+@item Texinfo
+Package for generating online and print documentation
+(@url{http://www.gnu.org/software/texinfo}).  You will need Texinfo to
+build Octave's documentation or if you modify the documentation source
+files or the docstring of any Octave function.
 @end table
 
 @node External Packages
@@ -255,6 +266,12 @@
 (@url{http://www.hdfgroup.org/HDF5}).  @sc{hdf5} is required for Octave's
 @code{load} and @code{save} commands to read and write HDF data files.
 
+@item Java Development Kit
+Java programming language compiler and libraries.  The OpenJDK free
+software implementation is recommended (@url{http://openjdk.java.net/}),
+although other JDK implementations may work.  Java is required to be able
+to call Java functions from within Octave.
+
 @item LLVM
 Compiler framework, (@url{http://www.llvm.org}).  LLVM is required for
 Octave's experimental just-in-time (JIT) compilation for speeding up the
--- a/etc/HACKING	Tue Jan 14 23:23:50 2014 +0100
+++ b/etc/HACKING	Wed Jan 15 15:23:46 2014 -0500
@@ -54,6 +54,10 @@
   - Rsync <http://samba.anu.edu.au/rsync/>
   - Tar <http://www.gnu.org/software/tar/>
 
+In addition to these maintainer tools, Octave makes use of many external
+libraries and packages.  See the file doc/interpreter/install.txi for the
+complete list of required and optional dependencies.
+
 Only building the initial full source tree will be a bit painful.
 Later, after synchronizing from the repository, a plain `make' should
 be sufficient.
--- a/libgui/src/main-window.cc	Tue Jan 14 23:23:50 2014 +0100
+++ b/libgui/src/main-window.cc	Wed Jan 15 15:23:46 2014 -0500
@@ -399,11 +399,14 @@
       std::ostringstream buf;
       url_transfer octave_dot_org (url.toStdString (), buf);
 
-      Array<std::string> param;
-      octave_dot_org.http_get (param);
-
-      if (octave_dot_org.good ())
-        html_text = QString::fromStdString (buf.str ());
+      if (octave_dot_org.is_valid ())
+        {
+          Array<std::string> param;
+          octave_dot_org.http_get (param);
+
+          if (octave_dot_org.good ())
+            html_text = QString::fromStdString (buf.str ());
+        }
 
       if (html_text.contains ("this-is-the-gnu-octave-community-news-page"))
         {
--- a/libinterp/corefcn/urlwrite.cc	Tue Jan 14 23:23:50 2014 +0100
+++ b/libinterp/corefcn/urlwrite.cc	Wed Jan 15 15:23:46 2014 -0500
@@ -189,10 +189,15 @@
 
     url_transfer obj (host, user, passwd, os);
 
-    if (! error_state)
-      handle_map[h] = obj;
+    if (obj.is_valid ())
+      {
+        if (! error_state)
+          handle_map[h] = obj;
+        else
+          h = curl_handle ();
+      }
     else
-      h = curl_handle ();
+      error ("support for url transfers was disabled when Octave was built");
 
     return h;
   }
@@ -413,31 +418,36 @@
 
   url_transfer curl = url_transfer (url, ofile);
 
-  curl.http_action (param, method);
-
-  ofile.close ();
+  if (! curl.is_valid ())
+    {
+      curl.http_action (param, method);
 
-  if (curl.good ())
-    frame.discard ();
+      ofile.close ();
 
-  if (nargout > 0)
-    {
       if (curl.good ())
+        frame.discard ();
+
+      if (nargout > 0)
         {
-          retval(2) = std::string ();
-          retval(1) = true;
-          retval(0) = octave_env::make_absolute (filename);
+          if (curl.good ())
+            {
+              retval(2) = std::string ();
+              retval(1) = true;
+              retval(0) = octave_env::make_absolute (filename);
+            }
+          else
+            {
+              retval(2) = curl.lasterror ();
+              retval(1) = false;
+              retval(0) = std::string ();
+            }
         }
-      else
-        {
-          retval(2) = curl.lasterror ();
-          retval(1) = false;
-          retval(0) = std::string ();
-        }
+
+      if (nargout < 2 && ! curl.good ())
+        error ("urlwrite: %s", curl.lasterror ().c_str ());
     }
-
-  if (nargout < 2 && ! curl.good ())
-    error ("urlwrite: %s", curl.lasterror ().c_str ());
+  else
+    error ("support for url transfers was disabled when Octave was built");
 
   return retval;
 }
@@ -540,21 +550,26 @@
 
   url_transfer curl = url_transfer (url, buf);
 
-  curl.http_action (param, method);
+  if (curl.is_valid ())
+    {
+      curl.http_action (param, method);
 
-  if (curl.good ())
-    {
-      if (nargout > 0)
+      if (curl.good ())
         {
-          // Return empty string if no error occured.
-          retval(2) = curl.good () ? "" : curl.lasterror ();
-          retval(1) = curl.good ();
-          retval(0) = buf.str ();
+          if (nargout > 0)
+            {
+              // Return empty string if no error occured.
+              retval(2) = curl.good () ? "" : curl.lasterror ();
+              retval(1) = curl.good ();
+              retval(0) = buf.str ();
+            }
         }
+
+      if (nargout < 2 && ! curl.good ())
+        error ("urlread: %s", curl.lasterror().c_str());
     }
-
-  if (nargout < 2 && ! curl.good ())
-    error ("urlread: %s", curl.lasterror().c_str());
+  else
+    error ("support for url transfers was disabled when Octave was built");
 
   return retval;
 }
--- a/liboctave/util/url-transfer.cc	Tue Jan 14 23:23:50 2014 +0100
+++ b/liboctave/util/url-transfer.cc	Wed Jan 15 15:23:46 2014 -0500
@@ -767,15 +767,6 @@
 
 #undef SETOPT
 
-#else
-
-static void
-disabled_error (void)
-{
-  (*current_liboctave_error_handler)
-    ("support for url transfers was disabled when Octave was built");
-}
-
 #endif
 
 #if defined (HAVE_CURL)
@@ -785,27 +776,15 @@
 #endif
 
 url_transfer::url_transfer (void) : rep (new REP_CLASS ())
-{
-#if !defined (HAVE_CURL)
-  disabled_error ();
-#endif
-}
+{ }
 
 url_transfer::url_transfer (const std::string& host, const std::string& user,
                             const std::string& passwd, std::ostream& os)
   : rep (new REP_CLASS (host, user, passwd, os))
-{
-#if !defined (HAVE_CURL)
-  disabled_error ();
-#endif
-}
+{ }
 
 url_transfer::url_transfer (const std::string& url, std::ostream& os)
   : rep (new REP_CLASS (url, os))
-{
-#if !defined (HAVE_CURL)
-  disabled_error ();
-#endif
-}
+{ }
 
 #undef REP_CLASS