Mercurial > hg > octave-nkf
changeset 17756:9aff1c9fd70f
doc: Add missing functions to manual.
* doc/interpreter/doccheck/mk_undocumented_list: Mark 'end' as an exception
not required to be in manual.
* doc/interpreter/gui.txi: Add isguirunning() and desktop() to list of
GUI utility functions.
* doc/interpreter/octave.texi: Add new subsection "Missing Components" to menu.
* doc/interpreter/package.txi: Add "Missing Components" section with DOCSTRING
reference for missing_component_hook().
* libinterp/corefcn/variables.cc: Add seealso links between
missing_component_hook() and missing_function_hook().
* libinterp/parse-tree/pt-arg-list.cc(Fend): Write docstring for 'end' index
keyword.
author | Rik <rik@octave.org> |
---|---|
date | Thu, 24 Oct 2013 14:44:23 -0700 |
parents | 9c03b071fd7b |
children | dae2230227a7 |
files | doc/interpreter/doccheck/mk_undocumented_list doc/interpreter/gui.txi doc/interpreter/octave.texi doc/interpreter/package.txi libinterp/corefcn/variables.cc libinterp/parse-tree/pt-arg-list.cc |
diffstat | 6 files changed, 39 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/interpreter/doccheck/mk_undocumented_list +++ b/doc/interpreter/doccheck/mk_undocumented_list @@ -82,6 +82,7 @@ comma debug dbnext +end exit F_DUPFD F_GETFD
--- a/doc/interpreter/gui.txi +++ b/doc/interpreter/gui.txi @@ -68,10 +68,14 @@ programs that do. @strong{Warning:} The functions @code{uiwait}, @code{uiresume}, and @code{waitfor} are only available for the FLTK tooolkit. +@DOCSTRING(desktop) + @DOCSTRING(guidata) @DOCSTRING(guihandles) +@DOCSTRING(isguirunning) + @DOCSTRING(uiwait) @DOCSTRING(uiresume)
--- a/doc/interpreter/octave.texi +++ b/doc/interpreter/octave.texi @@ -795,6 +795,7 @@ * The DESCRIPTION File:: * The INDEX File:: * PKG_ADD and PKG_DEL Directives:: +* Missing Components:: External Code Interface
--- a/doc/interpreter/package.txi +++ b/doc/interpreter/package.txi @@ -309,6 +309,7 @@ * The DESCRIPTION File:: * The INDEX File:: * PKG_ADD and PKG_DEL Directives:: +* Missing Components:: @end menu @node The DESCRIPTION File @@ -575,3 +576,13 @@ @w{@code{PKG_ADD}} keyword is replaced with @w{@code{PKG_DEL}} and the commands get added to the @w{@code{PKG_DEL}} file. +@node Missing Components +@subsection Missing Components + +If a package relies on a component, such as another Octave package, that may +not be present it may be useful to install a function which informs users what +to do when a particular component is missing. The function must be written by +the package maintainer and registered with Octave using +@code{missing_component_hook}. + +@DOCSTRING(missing_component_hook)
--- a/libinterp/corefcn/variables.cc +++ b/libinterp/corefcn/variables.cc @@ -2556,6 +2556,7 @@ When called from inside a function with the @qcode{\"local\"} option, the\n\ variable is changed locally for the function and any subroutines it calls. \n\ The original variable value is restored when exiting the function.\n\ +@seealso{missing_component_hook}\n\ @end deftypefn") { return SET_INTERNAL_VARIABLE (missing_function_hook); @@ -2632,6 +2633,7 @@ Octave will call @var{fcn} with the name of the function that requires the\n\ component and a string describing the missing component. The hook function\n\ should return an error message to be displayed.\n\ +@seealso{missing_function_hook}\n\ @end deftypefn") { return SET_INTERNAL_VARIABLE (missing_component_hook);
--- a/libinterp/parse-tree/pt-arg-list.cc +++ b/libinterp/parse-tree/pt-arg-list.cc @@ -127,7 +127,26 @@ static int num_indices = 0; DEFCONSTFUN (end, , , - "internal function") + "-*- texinfo -*-\n\ +@deftypefn {Built-in Function} {} end\n\ +The magic index @qcode{\"end\"} refers to the last valid entry in an indexing\n\ +operation.\n\ +\n\ +Example:\n\ +\n\ +@example\n\ +@group\n\ +@var{x} = [ 1 2 3 \n\ + 4 5 6 ];\n\ +@var{x}(1,end)\n\ + @result{} 3\n\ +@var{x}(end,1)\n\ + @result{} 4\n\ +@var{x}(end,end)\n\ + @result{} 6\n\ +@end group\n\ +@end example\n\ +@end deftypefn") { octave_value retval;