# HG changeset patch # User Rik # Date 1306363920 25200 # Node ID 53c0ed961de83fb617e6af5ab077d8d7b876b8c7 # Parent 6d4c18565de1dabd876624fd550c27c0e27d7926# Parent 5dedac50fef955bfe0082796947b418973932a5c maint: Periodic merge of stable to default. diff -r 6d4c18565de1 -r 53c0ed961de8 doc/interpreter/basics.txi --- a/doc/interpreter/basics.txi Wed May 25 14:09:00 2011 -0700 +++ b/doc/interpreter/basics.txi Wed May 25 15:52:00 2011 -0700 @@ -1058,6 +1058,9 @@ will produce a very quick countdown from '3' to 'Blast Off' as the lines "@code{disp(2);}" and "@code{disp(1);}" won't be executed. +The block comment markers must appear alone as the only characters on a line +(excepting whitepsace) in order to to be parsed correctly. + @node Comments and the Help System @subsection Comments and the Help System @cindex documenting functions diff -r 6d4c18565de1 -r 53c0ed961de8 scripts/general/cumtrapz.m --- a/scripts/general/cumtrapz.m Wed May 25 14:09:00 2011 -0700 +++ b/scripts/general/cumtrapz.m Wed May 25 15:52:00 2011 -0700 @@ -83,7 +83,7 @@ endif n = sz(dim); - idx1 = idx2 = repmat ({:}, [nd, 1]); + idx1 = idx2 = repmat ({':'}, [nd, 1]); idx1{dim} = 2 : n; idx2{dim} = 1 : (n - 1); diff -r 6d4c18565de1 -r 53c0ed961de8 scripts/general/trapz.m --- a/scripts/general/trapz.m Wed May 25 14:09:00 2011 -0700 +++ b/scripts/general/trapz.m Wed May 25 15:52:00 2011 -0700 @@ -97,7 +97,7 @@ endif n = sz(dim); - idx1 = idx2 = repmat ({:}, [nd, 1]); + idx1 = idx2 = repmat ({':'}, [nd, 1]); idx1{dim} = 2 : n; idx2{dim} = 1 : (n - 1); diff -r 6d4c18565de1 -r 53c0ed961de8 scripts/io/textread.m --- a/scripts/io/textread.m Wed May 25 14:09:00 2011 -0700 +++ b/scripts/io/textread.m Wed May 25 15:52:00 2011 -0700 @@ -54,7 +54,11 @@ ## Maybe skip header lines headerlines = find (strcmpi (varargin, "headerlines"), 1); if (! isempty (headerlines)) - fskipl (fid, headerlines); + hdr_lines = floor (varargin{headerlines + 1}); + ## Beware of zero valued headerline, fskipl will count lines to EOF then + if (hdr_lines > 0) + fskipl (fid, hdr_lines); + endif varargin(headerlines:headerlines+1) = []; endif diff -r 6d4c18565de1 -r 53c0ed961de8 scripts/io/textscan.m --- a/scripts/io/textscan.m Wed May 25 14:09:00 2011 -0700 +++ b/scripts/io/textscan.m Wed May 25 15:52:00 2011 -0700 @@ -81,8 +81,11 @@ ## Maybe skip header lines headerlines = find (strcmpi (args, "headerlines"), 1); if (! isempty (headerlines)) - fskipl (fid, headerlines); - args(headerlines:headerlines+1) = []; + hdr_lines = floor (varargin{headerlines + 1}); + ## Beware of zero valued headerline, fskipl will count lines to EOF + if (hdr_lines > 0) + fskipl (fid, hdr_lines); + endif endif if (isfinite (nlines)) str = ""; diff -r 6d4c18565de1 -r 53c0ed961de8 scripts/miscellaneous/ls_command.m --- a/scripts/miscellaneous/ls_command.m Wed May 25 14:09:00 2011 -0700 +++ b/scripts/miscellaneous/ls_command.m Wed May 25 15:52:00 2011 -0700 @@ -17,10 +17,9 @@ ## . ## -*- texinfo -*- -## @deftypefn {Function File} {[@var{old_cmd} =} ls_command (@var{cmd}) -## Set or return the shell command used by Octave's @code{ls} command. -## The value of @var{cmd} must be a character string. -## With no arguments, simply return the previous value. +## @deftypefn {Function File} {@var{val} =} ls_command () +## @deftypefnx {Function File} {@var{old_val} =} ls_command (@var{new_val}) +## Query or set the shell command used by Octave's @code{ls} command. ## @seealso{ls} ## @end deftypefn diff -r 6d4c18565de1 -r 53c0ed961de8 scripts/miscellaneous/ver.m --- a/scripts/miscellaneous/ver.m Wed May 25 14:09:00 2011 -0700 +++ b/scripts/miscellaneous/ver.m Wed May 25 15:52:00 2011 -0700 @@ -40,7 +40,7 @@ ## Date respecting the version/revision. ## @end table ## -## @deftypefnx {Function File} {v =} ver (@code{"Octave"}) +## @deftypefnx {Function File} {v =} ver ("Octave") ## Return version information for Octave only. ## ## @deftypefnx {Function File} {v =} ver (@var{package}) diff -r 6d4c18565de1 -r 53c0ed961de8 scripts/plot/__go_draw_axes__.m --- a/scripts/plot/__go_draw_axes__.m Wed May 25 14:09:00 2011 -0700 +++ b/scripts/plot/__go_draw_axes__.m Wed May 25 15:52:00 2011 -0700 @@ -1271,13 +1271,13 @@ if (nd == 3) ## This produces the desired vertical alignment in 3D. fprintf (plot_stream, - "set label \"%s\" at %s %.15g,%.15g,%.15g %s rotate by %f offset character %f,%f %s %s front %s;\n", + "set label \"%s\" at %s %.15e,%.15e,%.15e %s rotate by %f offset character %f,%f %s %s front %s;\n", undo_string_escapes (label), units, lpos(1), lpos(2), lpos(3), halign, angle, dx_and_dy, fontspec, __do_enhanced_option__ (enhanced, obj), colorspec); else fprintf (plot_stream, - "set label \"%s\" at %s %.15g,%.15g %s rotate by %f offset character %f,%f %s %s front %s;\n", + "set label \"%s\" at %s %.15e,%.15e %s rotate by %f offset character %f,%f %s %s front %s;\n", undo_string_escapes (label), units, lpos(1), lpos(2), halign, angle, dx_and_dy, fontspec, __do_enhanced_option__ (enhanced, obj), colorspec); diff -r 6d4c18565de1 -r 53c0ed961de8 scripts/statistics/distributions/frnd.m --- a/scripts/statistics/distributions/frnd.m Wed May 25 14:09:00 2011 -0700 +++ b/scripts/statistics/distributions/frnd.m Wed May 25 15:52:00 2011 -0700 @@ -71,7 +71,7 @@ error ("frnd: M and N must be scalar or of size SZ"); endif elseif (nargin == 2) - sz = size(a); + sz = size(m); else print_usage (); endif diff -r 6d4c18565de1 -r 53c0ed961de8 scripts/time/datenum.m --- a/scripts/time/datenum.m Wed May 25 14:09:00 2011 -0700 +++ b/scripts/time/datenum.m Wed May 25 15:52:00 2011 -0700 @@ -21,8 +21,8 @@ ## @deftypefnx {Function File} {} datenum (@var{year}, @var{month}, @var{day}, @var{hour}) ## @deftypefnx {Function File} {} datenum (@var{year}, @var{month}, @var{day}, @var{hour}, @var{minute}) ## @deftypefnx {Function File} {} datenum (@var{year}, @var{month}, @var{day}, @var{hour}, @var{minute}, @var{second}) -## @deftypefnx {Function File} {} datenum (@code{"date"}) -## @deftypefnx {Function File} {} datenum (@code{"date"}, @var{p}) +## @deftypefnx {Function File} {} datenum ("date") +## @deftypefnx {Function File} {} datenum ("date", @var{p}) ## Return the specified local time as a day number, with Jan 1, 0000 ## being day 1. By this reckoning, Jan 1, 1970 is day number 719529. ## The fractional portion, @var{p}, corresponds to the portion of the diff -r 6d4c18565de1 -r 53c0ed961de8 src/data.cc --- a/src/data.cc Wed May 25 14:09:00 2011 -0700 +++ b/src/data.cc Wed May 25 15:52:00 2011 -0700 @@ -5873,7 +5873,7 @@ "-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} issorted (@var{a})\n\ @deftypefnx {Built-in Function} {} issorted (@var{a}, @var{mode})\n\ -@deftypefnx {Built-in Function} {} issorted (@var{a}, @code{\"rows\"}, @var{mode})\n\ +@deftypefnx {Built-in Function} {} issorted (@var{a}, \"rows\", @var{mode})\n\ Return true if the array is sorted according to @var{mode}, which\n\ may be either \"ascending\", \"descending\", or \"either\". By default,\n\ @var{mode} is \"ascending\". NaNs are treated in the same manner as\n\ diff -r 6d4c18565de1 -r 53c0ed961de8 src/dirfns.cc --- a/src/dirfns.cc Wed May 25 14:09:00 2011 -0700 +++ b/src/dirfns.cc Wed May 25 15:52:00 2011 -0700 @@ -283,7 +283,7 @@ DEFUNX ("rmdir", Frmdir, args, , "-*- texinfo -*-\n\ @deftypefn {Built-in Function} {[@var{status}, @var{msg}, @var{msgid}] =} rmdir (@var{dir})\n\ -@deftypefnx {Built-in Function} {[@var{status}, @var{msg}, @var{msgid}] =} rmdir (@var{dir}, @code{\"s\"})\n\ +@deftypefnx {Built-in Function} {[@var{status}, @var{msg}, @var{msgid}] =} rmdir (@var{dir}, \"s\")\n\ Remove the directory named @var{dir}.\n\ \n\ If successful, @var{status} is 1, with @var{msg} and @var{msgid} empty\n\ diff -r 6d4c18565de1 -r 53c0ed961de8 src/mappers.cc --- a/src/mappers.cc Wed May 25 14:09:00 2011 -0700 +++ b/src/mappers.cc Wed May 25 15:52:00 2011 -0700 @@ -1833,8 +1833,8 @@ DEFUNX ("toupper", Ftoupper, args, , "-*- texinfo -*-\n\ -@deftypefn {Built-in Function} {} toupper (@var{s})\n\ -@deftypefnx {Built-in Function} {} upper (@var{s})\n\ +@deftypefn {Mapping Function} {} toupper (@var{s})\n\ +@deftypefnx {Mapping Function} {} upper (@var{s})\n\ Return a copy of the string or cell string @var{s}, with each lowercase\n\ character replaced by the corresponding uppercase one; non-alphabetic\n\ characters are left unchanged. For example:\n\ diff -r 6d4c18565de1 -r 53c0ed961de8 test/test_parser.m