# HG changeset patch # User John W. Eaton # Date 1389817426 18000 # Node ID 78c3b4cb0c7f2f850b5a3a71155281e4a3549c88 # Parent 12291fb903de5cf2c1bcdfce3b0ad6460389c5d8# Parent 9a43d8d6e29ed1d9c29f3916f7064ebbbcb955f1 maint: Periodic merge of stable to gui-release. diff -r 12291fb903de -r 78c3b4cb0c7f doc/interpreter/install.txi --- 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 diff -r 12291fb903de -r 78c3b4cb0c7f etc/HACKING --- 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 - 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. diff -r 12291fb903de -r 78c3b4cb0c7f libgui/src/main-window.cc --- 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 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 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")) { diff -r 12291fb903de -r 78c3b4cb0c7f libinterp/corefcn/urlwrite.cc --- 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; } diff -r 12291fb903de -r 78c3b4cb0c7f liboctave/util/url-transfer.cc --- 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