# HG changeset patch # User Rik # Date 1305469580 25200 # Node ID 542a95cc1bd1ac6dc1a889660cafd67c16817286 # Parent 72e60cf50dce3be3fa021ed58f831b70e3738177# Parent f83ec5ab90adf7a8dc285b0df5624bbe8abe7d57 maint: Periodic merge of stable to default. diff -r 72e60cf50dce -r 542a95cc1bd1 liboctave/caseless-str.h --- a/liboctave/caseless-str.h Sun May 15 07:24:14 2011 -0700 +++ b/liboctave/caseless-str.h Sun May 15 07:26:20 2011 -0700 @@ -46,6 +46,30 @@ operator std::string (void) const { return *this; } + bool operator < (const std::string& s) const + { + const_iterator p1 = begin (); + const_iterator p2 = s.begin (); + + while (p1 != end () && p2 != s.end ()) + { + char lp1 = std::tolower (*p1), lp2 = std::tolower (*p2); + + if ( lp1 > lp2 ) + return false; + if ( lp1 < lp2) + return true; + + p1++; + p2++; + } + + if ( length () >= s.length ()) + return false; + else + return true; + } + // Case-insensitive comparison. bool compare (const std::string& s, size_t limit = std::string::npos) const { @@ -59,8 +83,8 @@ if (std::tolower (*p1) != std::tolower (*p2)) return false; - *p1++; - *p2++; + p1++; + p2++; } return (limit == std::string::npos) ? size () == s.size () : k == limit; diff -r 72e60cf50dce -r 542a95cc1bd1 scripts/general/cumtrapz.m --- a/scripts/general/cumtrapz.m Sun May 15 07:24:14 2011 -0700 +++ b/scripts/general/cumtrapz.m Sun May 15 07:26:20 2011 -0700 @@ -50,53 +50,61 @@ print_usage (); endif - nd = ndims (x); - sz = size (x); + have_xy = have_dim = false; - have_x = false; - have_dim = false; if (nargin == 3) - have_x = true; + have_xy = true; have_dim = true; elseif (nargin == 2) if (! size_equal (x, y) && isscalar (y)) dim = y; have_dim = true; else - have_x = true; + have_xy = true; endif endif + if (have_xy) + nd = ndims (y); + sz = size (y); + else + nd = ndims (x); + sz = size (x); + endif + if (! have_dim) ## Find the first non-singleton dimension. - dim = find (sz > 1, 1); - if (isempty (dim)) - dim = 1; - endif + (dim = find (sz > 1, 1)) || (dim = 1); else - dim = floor (dim); - if (! (isscalar (dim) && 1 <= dim && dim <= nd)) - error ("cumtrapz: invalid dimension DIM"); + if (!(isscalar (dim) && dim == fix (dim)) + || !(1 <= dim && dim <= nd)) + error ("trapz: DIM must be an integer and a valid dimension"); endif endif n = sz(dim); - idx1 = cell (); - for i = 1:nd - idx1{i} = 1:sz(i); - endfor - idx2 = idx1; + idx1 = idx2 = repmat ({:}, [nd, 1]); idx1{dim} = 2 : n; idx2{dim} = 1 : (n - 1); - if (! have_x) + if (! have_xy) z = 0.5 * cumsum (x(idx1{:}) + x(idx2{:}), dim); else - if (! size_equal (x, y)) - error ("cumtrapz: X and Y must have the same shape"); + if (isvector (x) && !isvector (y)) + if (length (x) != sz(dim)) + error ("cumtrapz: length of X and length of Y along DIM must match"); + endif + ## Reshape vector to point along dimension DIM + shape = ones (nd, 1); + shape(dim) = sz(dim); + x = reshape (x, shape); + z = 0.5 * cumsum (bsxfun (@times, diff (x), y(idx1{:}) + y(idx2{:})), dim); + else + if (! size_equal (x, y)) + error ("cumtrapz: X and Y must have same shape"); + endif + z = 0.5 * cumsum (diff (x, 1, dim) .* (y(idx1{:}) + y(idx2{:})), dim); endif - z = 0.5 * cumsum ((x(idx1{:}) - x(idx2{:})) .* - (y(idx1{:}) + y(idx2{:})), dim); endif sz(dim) = 1; @@ -104,13 +112,23 @@ endfunction + %!shared x1,x2,y %! x1 = [0,0,0;2,2,2]; %! x2 = [0,2,4;0,2,4]; %! y = [1,2,3;4,5,6]; -%!assert (cumtrapz(y),[0,0,0;2.5,3.5,4.5]) -%!assert (cumtrapz(x1,y),[0,0,0;5,7,9]) -%!assert (cumtrapz(y,1),[0,0,0;2.5,3.5,4.5]) -%!assert (cumtrapz(x1,y,1),[0,0,0;5,7,9]) -%!assert (cumtrapz(y,2),[0,1.5,4;0,4.5,10]) -%!assert (cumtrapz(x2,y,2),[0,3,8;0,9,20]) +%!assert (cumtrapz(y), [0,0,0;2.5,3.5,4.5]) +%!assert (cumtrapz(x1,y), [0,0,0;5,7,9]) +%!assert (cumtrapz(y,1), [0,0,0;2.5,3.5,4.5]) +%!assert (cumtrapz(x1,y,1), [0,0,0;5,7,9]) +%!assert (cumtrapz(y,2), [0,1.5,4;0,4.5,10]) +%!assert (cumtrapz(x2,y,2), [0,3,8;0,9,20]) +%% Test ND-array implementation +%!shared x1,x2,y +%! x1 = 1:3; +%! x2 = reshape ([0,2,4;0,2,4], [1 2 3]); +%! y = reshape ([1,2,3;4,5,6], [1 2 3]); +%!assert (cumtrapz(y,3), reshape([0,1.5,4;0,4.5,10],[1 2 3])) +%!assert (cumtrapz(x1,y,3), reshape([0,1.5,4;0,4.5,10],[1 2 3])) +%!assert (cumtrapz(x2,y,3), reshape([0,3,8;0,9,20],[1 2 3])) + diff -r 72e60cf50dce -r 542a95cc1bd1 scripts/general/trapz.m --- a/scripts/general/trapz.m Sun May 15 07:24:14 2011 -0700 +++ b/scripts/general/trapz.m Sun May 15 07:26:20 2011 -0700 @@ -64,60 +64,75 @@ print_usage (); endif - nd = ndims (x); - sz = size (x); + have_xy = have_dim = false; - have_x = false; - have_dim = false; if (nargin == 3) - have_x = true; + have_xy = true; have_dim = true; - endif - if (nargin == 2) + elseif (nargin == 2) if (! size_equal (x, y) && isscalar (y)) dim = y; have_dim = true; else - have_x = true; + have_xy = true; endif endif + if (have_xy) + nd = ndims (y); + sz = size (y); + else + nd = ndims (x); + sz = size (x); + endif + if (! have_dim) ## Find the first non-singleton dimension. - dim = find (sz > 1, 1); - if (isempty (dim)) - dim = 1; - endif + (dim = find (sz > 1, 1)) || (dim = 1); else - dim = floor (dim); - if (dim < 1 || dim > nd) - error ("trapz: invalid dimension DIM along which to sort"); + if (!(isscalar (dim) && dim == fix (dim)) + || !(1 <= dim && dim <= nd)) + error ("trapz: DIM must be an integer and a valid dimension"); endif endif n = sz(dim); - idx1 = cell (); - for i = 1:nd - idx1{i} = 1:sz(i); - endfor - idx2 = idx1; + idx1 = idx2 = repmat ({:}, [nd, 1]); idx1{dim} = 2 : n; idx2{dim} = 1 : (n - 1); - if (! have_x) + if (! have_xy) z = 0.5 * sum (x(idx1{:}) + x(idx2{:}), dim); else - if (! size_equal (x, y)) - error ("trapz: X and Y must have same shape"); + if (isvector (x) && !isvector (y)) + if (length (x) != sz(dim)) + error ("trapz: length of X and length of Y along DIM must match"); + endif + ## Reshape vector to point along dimension DIM + shape = ones (nd, 1); + shape(dim) = sz(dim); + x = reshape (x, shape); + z = 0.5 * sum (bsxfun (@times, diff (x), y(idx1{:}) + y(idx2{:})), dim); + else + if (! size_equal (x, y)) + error ("trapz: X and Y must have same shape"); + endif + z = 0.5 * sum (diff (x, 1, dim) .* (y(idx1{:}) + y(idx2{:})), dim); endif - z = 0.5 * sum ((x(idx1{:}) - x(idx2{:})) .* - (y(idx1{:}) + y(idx2{:})), dim); endif endfunction + %!assert (trapz(1:5), 12) %!assert (trapz(0:0.5:2,1:5), 6) -%!assert (trapz([1:5;1:5],2),[12;12]) -%!assert (trapz([1:5;1:5].',1),[12,12]) -%!assert (trapz([0:0.5:2;0:0.5:2],[1:5;1:5],2),[6;6]) -%!assert (trapz([0:0.5:2;0:0.5:2].',[1:5;1:5].',1),[6,6]) +%!assert (trapz([1:5;1:5].',1), [12,12]) +%!assert (trapz([1:5;1:5],2), [12;12]) +%!assert (trapz(repmat(reshape(1:5,1,1,5),2,2), 3), [12 12; 12 12]) +%!assert (trapz([0:0.5:2;0:0.5:2].',[1:5;1:5].',1), [6, 6]) +%!assert (trapz([0:0.5:2;0:0.5:2],[1:5;1:5],2), [6; 6]) +%!assert (trapz(repmat(reshape([0:0.5:2],1,1,5),2,2), ... +%! repmat(reshape(1:5,1,1,5),2,2), 3), [6 6; 6 6]) +%!assert (trapz(0:0.5:2,[(1:5)',(1:5)']), [6, 6]) +%!assert (trapz(0:0.5:2,[(1:5);(1:5)],2), [6; 6]) +%!assert (trapz(0:0.5:2,repmat(reshape(1:5,1,1,5),2,2),3), [6 6; 6 6]) + diff -r 72e60cf50dce -r 542a95cc1bd1 scripts/miscellaneous/what.m --- a/scripts/miscellaneous/what.m Sun May 15 07:24:14 2011 -0700 +++ b/scripts/miscellaneous/what.m Sun May 15 07:26:20 2011 -0700 @@ -20,10 +20,9 @@ ## @deftypefn {Command} {} what ## @deftypefnx {Command} {} what @var{dir} ## @deftypefnx {Function File} {w =} what (@var{dir}) -## List the Octave specific files in a directory. If the variable @var{dir} -## is given then check that directory rather than the current directory. If -## a return argument is requested, the files found are returned in the -## structure @var{w}. +## List the Octave specific files in directory @var{dir}. If @var{dir} is +## not specified then the current directory is used. If a return argument is +## requested, the files found are returned in the structure @var{w}. ## @seealso{which} ## @end deftypefn diff -r 72e60cf50dce -r 542a95cc1bd1 scripts/statistics/distributions/exppdf.m --- a/scripts/statistics/distributions/exppdf.m Sun May 15 07:24:14 2011 -0700 +++ b/scripts/statistics/distributions/exppdf.m Sun May 15 07:26:20 2011 -0700 @@ -50,7 +50,7 @@ pdf(k) = NaN; endif - k = find ((x > 0) & (x < Inf) & (lambda > 0)); + k = find ((x >= 0) & (x < Inf) & (lambda > 0)); if (any (k)) if isscalar (lambda) pdf(k) = exp (- x(k) ./ lambda) ./ lambda; diff -r 72e60cf50dce -r 542a95cc1bd1 scripts/testfun/rundemos.m --- a/scripts/testfun/rundemos.m Sun May 15 07:24:14 2011 -0700 +++ b/scripts/testfun/rundemos.m Sun May 15 07:26:20 2011 -0700 @@ -17,7 +17,12 @@ ## . ## -*- texinfo -*- -## @deftypefn {Function File} {} rundemos (@var{directory}) +## @deftypefn {Function File} {} rundemos () +## @deftypefnx {Function File} {} rundemos (@var{directory}) +## Execute built-in demos for all function files in the specified directory. +## If no directory is specified, operate on all directories in Octave's +## search path for functions. +## @seealso{runtests, path} ## @end deftypefn ## Author: jwe diff -r 72e60cf50dce -r 542a95cc1bd1 scripts/testfun/runtests.m --- a/scripts/testfun/runtests.m Sun May 15 07:24:14 2011 -0700 +++ b/scripts/testfun/runtests.m Sun May 15 07:26:20 2011 -0700 @@ -17,8 +17,12 @@ ## . ## -*- texinfo -*- -## @deftypefn {Function File} {} runtests (@var{directory}) +## @deftypefn {Function File} {} runtests () +## @deftypefnx {Function File} {} runtests (@var{directory}) ## Execute built-in tests for all function files in the specified directory. +## If no directory is specified, operate on all directories in Octave's +## search path for functions. +## @seealso{rundemos, path} ## @end deftypefn ## Author: jwe diff -r 72e60cf50dce -r 542a95cc1bd1 src/dirfns.cc --- a/src/dirfns.cc Sun May 15 07:24:14 2011 -0700 +++ b/src/dirfns.cc Sun May 15 07:26:20 2011 -0700 @@ -686,8 +686,8 @@ \n\ If 'all' is given, the function returns all valid file separators in\n\ the form of a string. The list of file separators is system-dependent.\n\ -It is @samp{/} (forward slash) under UNIX or Mac OS X, @samp{/} and @samp{\\}\n\ -(forward and backward slashes) under Windows.\n\ +It is @samp{/} (forward slash) under UNIX or @w{Mac OS X}, @samp{/} and\n\ +@samp{\\} (forward and backward slashes) under Windows.\n\ @seealso{pathsep}\n\ @end deftypefn") { diff -r 72e60cf50dce -r 542a95cc1bd1 src/help.cc --- a/src/help.cc Sun May 15 07:24:14 2011 -0700 +++ b/src/help.cc Sun May 15 07:26:20 2011 -0700 @@ -99,133 +99,331 @@ return z; } -// FIXME -- The descriptions could easily be in texinfo -- should they? const static pair_type operators[] = { pair_type ("!", - "Logical not operator. See also `~'.\n"), + "-*- texinfo -*-\n\ +@deftypefn {Operator} {} !\n\ +Logical 'not' operator.\n\ +@seealso{~, not}\n\ +@end deftypefn"), + + pair_type ("~", + "-*- texinfo -*-\n\ +@deftypefn {Operator} {} ~\n\ +Logical 'not' operator.\n\ +@seealso{!, not}\n\ +@end deftypefn"), pair_type ("!=", - "Logical not equals operator. See also `~='.\n"), + "-*- texinfo -*-\n\ +@deftypefn {Operator} {} !=\n\ +Logical 'not equals' operator.\n\ +@seealso{~=, ne}\n\ +@end deftypefn"), + + pair_type ("~=", + "-*- texinfo -*-\n\ +@deftypefn {Operator} {} ~=\n\ +Logical 'not equals' operator.\n\ +@seealso{!=, ne}\n\ +@end deftypefn"), pair_type ("\"", - "String delimiter.\n"), + "-*- texinfo -*-\n\ +@deftypefn {Operator} {} \"\n\ +String delimiter.\n\ +@end deftypefn"), pair_type ("#", - "Begin comment character. See also `%'."), + "-*- texinfo -*-\n\ +@deftypefn {Operator} {} #\n\ +Begin comment character.\n\ +@seealso{%, #@{}\n\ +@end deftypefn"), pair_type ("%", - "Begin comment charcter. See also `#'."), + "-*- texinfo -*-\n\ +@deftypefn {Operator} {} %\n\ +Begin comment character.\n\ +@seealso{#, %@{}\n\ +@end deftypefn"), + + pair_type ("#{", + "-*- texinfo -*-\n\ +@deftypefn {Operator} {} #@{\n\ +Begin block comment. There must be nothing else other than\n\ +whitespace in the line, both before and after @code{#@{}. Also,\n\ +it is possible to nest block comments.\n\ +@seealso{#, #@}, %@{}\n\ +@end deftypefn"), + + pair_type ("%{", + "-*- texinfo -*-\n\ +@deftypefn {Operator} {} %@{\n\ +Begin block comment. There must be nothing else other than\n\ +whitespace in the line, both before and after @code{%@{}. Also,\n\ +it is possible to nest block comments.\n\ +@seealso{%, %@}, #@{}\n\ +@end deftypefn"), + + pair_type ("#}", + "-*- texinfo -*-\n\ +@deftypefn {Operator} {} #@}\n\ +Close block comment. There must be nothing else other than\n\ +whitespace in the line, both before and after @code{#@}}. Also,\n\ +it is possible to nest block comments.\n\ +@seealso{#, #@{, %@}}\n\ +@end deftypefn"), + + pair_type ("%}", + "-*- texinfo -*-\n\ +@deftypefn {Operator} {} %@}\n\ +Close block comment. There must be nothing else other than\n\ +whitespace in the line, both before and after @code{%@}}. Also,\n\ +it is possible to nest block comments.\n\ +@seealso{%, %@{, #@}}\n\ +@end deftypefn"), + + pair_type ("...", + "-*- texinfo -*-\n\ +@deftypefn {Operator} {} ...\n\ +Continuation marker. Joins current line with following line.\n\ +@end deftypefn"), pair_type ("&", - "Element by element logical and operator. See also `&&'."), + "-*- texinfo -*-\n\ +@deftypefn {Operator} {} &\n\ +Element by element logical 'and' operator.\n\ +@seealso{&&, and}\n\ +@end deftypefn"), pair_type ("&&", - "Logical and operator (with short-circuit evaluation). See also `&'."), + "-*- texinfo -*-\n\ +@deftypefn {Operator} {} &&\n\ +Logical 'and' operator (with short-circuit evaluation).\n\ +@seealso{&, and}\n\ +@end deftypefn"), pair_type ("'", - "Matrix transpose operator. For complex matrices, computes the\n\ -complex conjugate (Hermitian) transpose. See also `.''\n\ + "-*- texinfo -*-\n\ +@deftypefn {Operator} {} '\n\ +Matrix transpose operator. For complex matrices, computes the\n\ +complex conjugate (Hermitian) transpose.\n\ \n\ The single quote character may also be used to delimit strings, but\n\ it is better to use the double quote character, since that is never\n\ -ambiguous"), +ambiguous\n\ +@seealso{.', transpose}\n\ +@end deftypefn"), pair_type ("(", - "Array index or function argument delimiter."), + "-*- texinfo -*-\n\ +@deftypefn {Operator} {} (\n\ +Array index or function argument delimiter.\n\ +@end deftypefn"), pair_type (")", - "Array index or function argument delimiter."), + "-*- texinfo -*-\n\ +@deftypefn {Operator} {} )\n\ +Array index or function argument delimiter.\n\ +@end deftypefn"), pair_type ("*", - "Multiplication operator. See also `.*'"), + "-*- texinfo -*-\n\ +@deftypefn {Operator} {} *\n\ +Multiplication operator.\n\ +@seealso{.*, times}\n\ +@end deftypefn"), pair_type ("**", - "Power operator. See also `^', `.**', and `.^'"), + "-*- texinfo -*-\n\ +@deftypefn {Operator} {} **\n\ +Power operator.\n\ +@seealso{power, ^, .**, .^}\n\ +@end deftypefn"), + + pair_type ("^", + "-*- texinfo -*-\n\ +@deftypefn {Operator} {} ^\n\ +Power operator.\n\ +@seealso{power, **, .^, .**}\n\ +@end deftypefn"), pair_type ("+", - "Addition operator."), + "-*- texinfo -*-\n\ +@deftypefn {Operator} {} +\n\ +Addition operator.\n\ +@seealso{plus}\n\ +@end deftypefn"), pair_type ("++", - "Increment operator. As in C, may be applied as a prefix or postfix\n\ -operator."), + "-*- texinfo -*-\n\ +@deftypefn {Operator} {} ++\n\ +Increment operator. As in C, may be applied as a prefix or postfix\n\ +operator.\n\ +@seealso{--}\n\ +@end deftypefn"), pair_type (",", - "Array index, function argument, or command separator."), + "-*- texinfo -*-\n\ +@deftypefn {Operator} {} ,\n\ +Array index, function argument, or command separator.\n\ +@end deftypefn"), pair_type ("-", - "Subtraction or unary negation operator."), + "-*- texinfo -*-\n\ +@deftypefn {Operator} {} -\n\ +Subtraction or unary negation operator.\n\ +@seealso{minus}\n\ +@end deftypefn"), pair_type ("--", - "Decrement operator. As in C, may be applied as a prefix or postfix\n\ -operator."), + "-*- texinfo -*-\n\ +@deftypefn {Operator} {} --\n\ +Decrement operator. As in C, may be applied as a prefix or postfix\n\ +operator.\n\ +@seealso{++}\n\ +@end deftypefn"), pair_type (".'", - "Matrix transpose operator. For complex matrices, computes the\n\ -transpose, *not* the complex conjugate transpose. See also `''."), + "-*- texinfo -*-\n\ +@deftypefn {Operator} {} .'\n\ +Matrix transpose operator. For complex matrices, computes the\n\ +transpose, @emph{not} the complex conjugate transpose.\n\ +@seealso{', transpose}\n\ +@end deftypefn"), pair_type (".*", - "Element by element multiplication operator. See also `*'."), + "-*- texinfo -*-\n\ +@deftypefn {Operator} {} .*\n\ +Element by element multiplication operator.\n\ +@seealso{*, times}\n\ +@end deftypefn"), pair_type (".**", - "Element by element power operator. See also `**', `^', and `.^'."), + "-*- texinfo -*-\n\ +@deftypefn {Operator} {} .*\n\ +Element by element power operator.\n\ +@seealso{**, ^, .^, power}\n\ +@end deftypefn"), + + pair_type (".^", + "-*- texinfo -*-\n\ +@deftypefn {Operator} {} .^\n\ +Element by element power operator.\n\ +@seealso{.**, ^, **, power}\n\ +@end deftypefn"), pair_type ("./", - "Element by element division operator. See also `/' and `\\'."), - - pair_type (".^", - "Element by element power operator. See also `**', `^', and `.^'."), + "-*- texinfo -*-\n\ +@deftypefn {Operator} {} ./\n\ +Element by element right division operator.\n\ +@seealso{/, .\\, rdivide, mrdivide}\n\ +@end deftypefn"), pair_type ("/", - "Right division. See also `\\' and `./'."), + "-*- texinfo -*-\n\ +@deftypefn {Operator} {} /\n\ +Right division operator.\n\ +@seealso{./, \\, rdivide, mrdivide}\n\ +@end deftypefn"), + + pair_type (".\\", + "-*- texinfo -*-\n\ +@deftypefn {Operator} {} .\\\n\ +Element by element left division operator.\n\ +@seealso{\\, ./, rdivide, mrdivide}\n\ +@end deftypefn"), + + pair_type ("\\", + "-*- texinfo -*-\n\ +@deftypefn {Operator} {} \\\n\ +Left division operator.\n\ +@seealso{.\\, /, ldivide, mldivide}\n\ +@end deftypefn"), pair_type (":", - "Select entire rows or columns of matrices."), + "-*- texinfo -*-\n\ +@deftypefn {Operator} {} :\n\ +Select entire rows or columns of matrices.\n\ +@end deftypefn"), pair_type (";", - "Array row or command separator. See also `,'."), + "-*- texinfo -*-\n\ +@deftypefn {Operator} {} ;\n\ +Array row or command separator.\n\ +@seealso{,}\n\ +@end deftypefn"), pair_type ("<", - "Less than operator."), + "-*- texinfo -*-\n\ +@deftypefn {Operator} {} <\n\ +'Less than' operator.\n\ +@seealso{lt}\n\ +@end deftypefn"), pair_type ("<=", - "Less than or equals operator."), + "-*- texinfo -*-\n\ +@deftypefn {Operator} {} <=\n\ +'Less than' or 'equals' operator.\n\ +@seealso{le}\n\ +@end deftypefn"), pair_type ("=", - "Assignment operator."), + "-*- texinfo -*-\n\ +@deftypefn {Operator} {} =\n\ +Assignment operator.\n\ +@end deftypefn"), pair_type ("==", - "Equality test operator."), + "-*- texinfo -*-\n\ +@deftypefn {Operator} {} ==\n\ +Equality test operator.\n\ +@seealso{eq}\n\ +@end deftypefn"), pair_type (">", - "Greater than operator."), + "-*- texinfo -*-\n\ +@deftypefn {Operator} {} >\n\ +'Greater than' operator.\n\ +@seealso{gt}\n\ +@end deftypefn"), pair_type (">=", - "Greater than or equals operator."), + "-*- texinfo -*-\n\ +@deftypefn {Operator} {} >=\n\ +'Greater than' or 'equals' operator.\n\ +@seealso{ge}\n\ +@end deftypefn"), pair_type ("[", - "Return list delimiter. See also `]'."), - - pair_type ("\\", - "Left division operator. See also `/' and `./'."), + "-*- texinfo -*-\n\ +@deftypefn {Operator} {} [\n\ +Return list delimiter.\n\ +@seealso{]}\n\ +@end deftypefn"), pair_type ("]", - "Return list delimiter. See also `['."), - - pair_type ("^", - "Power operator. See also `**', `.^', and `.**.'"), + "-*- texinfo -*-\n\ +@deftypefn {Operator} {} ]\n\ +Return list delimiter.\n\ +@seealso{[}\n\ +@end deftypefn"), pair_type ("|", - "Element by element logical or operator. See also `||'."), + "-*- texinfo -*-\n\ +@deftypefn {Operator} {} |\n\ +Element by element logical 'or' operator.\n\ +@seealso{||, or}\n\ +@end deftypefn"), pair_type ("||", - "Logical or operator (with short-circuit evaluation). See also `|'."), - - pair_type ("~", - "Logical not operator. See also `!' and `~'."), - - pair_type ("~=", - "Logical not equals operator. See also `!='."), + "-*- texinfo -*-\n\ +@deftypefn {Operator} {} ||\n\ +Logical 'or' (with short-circuit evaluation) operator.\n\ +@seealso{|, or}\n\ +@end deftypefn"), }; const static pair_type keywords[] = diff -r 72e60cf50dce -r 542a95cc1bd1 src/utils.cc --- a/src/utils.cc Sun May 15 07:24:14 2011 -0700 +++ b/src/utils.cc Sun May 15 07:26:20 2011 -0700 @@ -791,7 +791,8 @@ DEFUN (find_dir_in_path, args, , "-*- texinfo -*-\n\ -@deftypefn {Built-in Function} {} find_dir_in_path (@var{dir}, \"all\")\n\ +@deftypefn {Built-in Function} {} find_dir_in_path (@var{dir})\n\ +@deftypefnx {Built-in Function} {} find_dir_in_path (@var{dir}, \"all\")\n\ Return the full name of the path element matching @var{dir}. The\n\ match is performed at the end of each path element. For example, if\n\ @var{dir} is @code{\"foo/bar\"}, it matches the path element\n\ @@ -799,7 +800,7 @@ or @code{\"/some/dir/allfoo/bar\"}.\n\ \n\ The second argument is optional. If it is supplied, return a cell array\n\ -containing all the directory names that match.\n\ +containing all name matches rather than just the first.\n\ @end deftypefn") { octave_value retval = std::string ();