changeset 12668:e3dc23f7dd54 stable

doc: Improve a few docstrings related to test functions and directories. * what.m, rundemos.m, runtests.m, dirfns.cc (filesep), utils.cc (find_dir_in_path): Improve docstrings.
author Rik <octave@nomad.inbox5.com>
date Sat, 14 May 2011 21:17:20 -0700
parents d8aff843a9e9
children 2c96207d0e06
files scripts/miscellaneous/what.m scripts/testfun/rundemos.m scripts/testfun/runtests.m src/dirfns.cc src/utils.cc
diffstat 5 files changed, 19 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/miscellaneous/what.m	Sat May 14 09:57:50 2011 -0700
+++ b/scripts/miscellaneous/what.m	Sat May 14 21:17: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
 
--- a/scripts/testfun/rundemos.m	Sat May 14 09:57:50 2011 -0700
+++ b/scripts/testfun/rundemos.m	Sat May 14 21:17:20 2011 -0700
@@ -17,7 +17,12 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- 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
--- a/scripts/testfun/runtests.m	Sat May 14 09:57:50 2011 -0700
+++ b/scripts/testfun/runtests.m	Sat May 14 21:17:20 2011 -0700
@@ -17,8 +17,12 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- 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
--- a/src/dirfns.cc	Sat May 14 09:57:50 2011 -0700
+++ b/src/dirfns.cc	Sat May 14 21:17: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")
 {
--- a/src/utils.cc	Sat May 14 09:57:50 2011 -0700
+++ b/src/utils.cc	Sat May 14 21:17: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 ();