# HG changeset patch # User Rik # Date 1401038778 25200 # Node ID bd1fd4ed3d67fb3bfd60184071a96ac5eb5f848d # Parent a5286fb173cd8c5ef266b25204e0badbd9b33000# Parent 6e2b1de8348e3e67e97ebda7ed77500c52577347 maint: Periodic merge of stable -> gui-release. diff -r a5286fb173cd -r bd1fd4ed3d67 CITATION --- a/CITATION Sun May 25 10:23:03 2014 -0700 +++ b/CITATION Sun May 25 10:26:18 2014 -0700 @@ -1,17 +1,18 @@ To cite GNU Octave in publications use: - John W. Eaton, David Bateman, and Søren Hauberg (2009). GNU Octave version - 3.0.1 manual: a high-level interactive language for numerical computations. + John W. Eaton, David Bateman, Søren Hauberg, Rik Wehbring (2014). + GNU Octave version 3.8.1 manual: a high-level interactive language for + numerical computations. CreateSpace Independent Publishing Platform. ISBN 1441413006, URL http://www.gnu.org/software/octave/doc/interpreter/ A BibTeX entry for LaTeX users is: @book{, - author = {John W. Eaton and David Bateman and S\oren Hauberg}, - title = {{GNU Octave} version 3.0.1 manual: a high-level interactive language for numerical computations}, + author = {John W. Eaton, David Bateman, S\oren Hauberg, and Rik Wehbring}, + title = {{GNU Octave} version 3.8.1 manual: a high-level interactive language for numerical computations}, publisher = {CreateSpace Independent Publishing Platform}, - year = {2009}, + year = {2014}, note = {{ISBN} 1441413006}, url = {http://www.gnu.org/software/octave/doc/interpreter}, } diff -r a5286fb173cd -r bd1fd4ed3d67 etc/CHECKLIST --- a/etc/CHECKLIST Sun May 25 10:23:03 2014 -0700 +++ b/etc/CHECKLIST Sun May 25 10:26:18 2014 -0700 @@ -2,6 +2,8 @@ * Update the version number and release date in configure.ac. + * Update version number and release year in CITATION. + * Update the NEWS file. * Update the NEWS-.html, index.in, news.in, and download.in diff -r a5286fb173cd -r bd1fd4ed3d67 libgui/src/main-window.cc --- a/libgui/src/main-window.cc Sun May 25 10:23:03 2014 -0700 +++ b/libgui/src/main-window.cc Sun May 25 10:26:18 2014 -0700 @@ -740,6 +740,7 @@ { QString dir = QFileDialog::getExistingDirectory (this, tr ("Browse directories"), 0, + QFileDialog::ShowDirsOnly | QFileDialog::DontUseNativeDialog); set_current_working_directory (dir); diff -r a5286fb173cd -r bd1fd4ed3d67 libinterp/corefcn/data.cc --- a/libinterp/corefcn/data.cc Sun May 25 10:23:03 2014 -0700 +++ b/libinterp/corefcn/data.cc Sun May 25 10:26:18 2014 -0700 @@ -3121,17 +3121,16 @@ result = Complex (0, 1) * SparseComplexMatrix (im_val); else { - result = SparseComplexMatrix (im_val.dims (), re_val (0)); octave_idx_type nr = im_val.rows (); octave_idx_type nc = im_val.cols (); + result = SparseComplexMatrix (nr, nc, re_val(0)); for (octave_idx_type j = 0; j < nc; j++) { octave_idx_type off = j * nr; for (octave_idx_type i = im_val.cidx (j); i < im_val.cidx (j + 1); i++) - result.data (im_val.ridx (i) + off) = - result.data (im_val.ridx (i) + off) + + result.data (im_val.ridx (i) + off) += Complex (0, im_val.data (i)); } } @@ -3144,19 +3143,17 @@ result = SparseComplexMatrix (re_val); else { - result = SparseComplexMatrix (re_val.rows (), - re_val.cols (), - Complex (0, im_val (0))); octave_idx_type nr = re_val.rows (); octave_idx_type nc = re_val.cols (); + result = SparseComplexMatrix (nr, nc, + Complex (0, im_val(0))); for (octave_idx_type j = 0; j < nc; j++) { octave_idx_type off = j * nr; for (octave_idx_type i = re_val.cidx (j); i < re_val.cidx (j + 1); i++) - result.data (re_val.ridx (i) + off) = - result.data (re_val.ridx (i) + off) + + result.data (re_val.ridx (i) + off) += re_val.data (i); } } diff -r a5286fb173cd -r bd1fd4ed3d67 libinterp/corefcn/graphics.cc --- a/libinterp/corefcn/graphics.cc Sun May 25 10:23:03 2014 -0700 +++ b/libinterp/corefcn/graphics.cc Sun May 25 10:26:18 2014 -0700 @@ -9226,16 +9226,17 @@ int nargin = args.length (); - if (nargin != 1) + if (nargin == 1) + { + double h = args(0).double_value (); + if (! error_state) + retval = calc_dimensions (gh_manager::get_object (h)); + else + error ("__calc_dimensions__: expecting graphics handle as only argument"); + } + else print_usage (); - double h = args(0).double_value (); - - if (! error_state) - retval = calc_dimensions (gh_manager::get_object (h)); - else - error ("__calc_dimensions__: expecting graphics handle as only argument"); - return retval; } diff -r a5286fb173cd -r bd1fd4ed3d67 libinterp/parse-tree/lex.ll --- a/libinterp/parse-tree/lex.ll Sun May 25 10:23:03 2014 -0700 +++ b/libinterp/parse-tree/lex.ll Sun May 25 10:26:18 2014 -0700 @@ -301,6 +301,18 @@ return curr_lexer->show_token (INPUT_FILE); } +<> { + curr_lexer->lexer_debug ("<>"); + + // May be reset later if we see "function" or "classdef" appears + // as the first token. + curr_lexer->reading_script_file = true; + + curr_lexer->pop_start_state (); + + return curr_lexer->show_token (INPUT_FILE); + } + %{ // Help and other command-style functions. %} diff -r a5286fb173cd -r bd1fd4ed3d67 scripts/plot/draw/hist.m --- a/scripts/plot/draw/hist.m Sun May 25 10:23:03 2014 -0700 +++ b/scripts/plot/draw/hist.m Sun May 25 10:26:18 2014 -0700 @@ -157,7 +157,7 @@ if (nargin > 2 && ! ischar (varargin{iarg})) ## Normalize the histogram. norm = varargin{iarg++}; - freq *= norm / sum (! isnan (y)); + freq = bsxfun (@times, freq, norm ./ sum (! isnan (y))); endif if (nargout > 0) @@ -209,4 +209,6 @@ %! endfor %!assert (hist (1,1), 1) %!assert (size (hist (randn (750,240), 200)), [200,240]) - +## Test bug #42394 +%!assert (isempty (hist (rand (10,2), 0:5, 1)), false) +%!assert (isempty (hist (rand (10,2), 0:5, [1 1])), false) diff -r a5286fb173cd -r bd1fd4ed3d67 scripts/plot/draw/private/__bar__.m --- a/scripts/plot/draw/private/__bar__.m Sun May 25 10:23:03 2014 -0700 +++ b/scripts/plot/draw/private/__bar__.m Sun May 25 10:26:18 2014 -0700 @@ -120,13 +120,17 @@ nbars = columns (y); - ## Column width is 1 for 'hist*' styles. Otherwise, same as group width. - if (nbars == 1) + ## Column width is 1 for 'hist*' styles (bars touch). + if (islogical (histc)) + cwidth = 1; + if (nbars == 1) + gwidth = 1; + else + gwidth = width^2; + endif + elseif (nbars == 1) cwidth = 1; gwidth = width; - elseif (islogical (histc)) - cwidth = 1; - gwidth = width^2; else cwidth = gwidth = width; endif