annotate scripts/help/__gripe_missing_component__.m @ 19186:0f9c5a15c8fa

doc: Periodic grammarcheck of documentation. * doc/interpreter/contrib.txi, doc/interpreter/expr.txi, doc/interpreter/func.txi, doc/interpreter/linalg.txi, doc/interpreter/plot.txi, libinterp/corefcn/data.cc, libinterp/corefcn/debug.cc, libinterp/corefcn/graphics.cc, libinterp/corefcn/help.cc, libinterp/corefcn/load-save.cc, libinterp/corefcn/profiler.cc, libinterp/corefcn/syscalls.cc, libinterp/corefcn/utils.cc, libinterp/corefcn/variables.cc, libinterp/dldfcn/__init_fltk__.cc, scripts/general/deal.m, scripts/help/__gripe_missing_component__.m, scripts/miscellaneous/desktop.m, scripts/pkg/private/default_prefix.m, scripts/plot/appearance/__getlegenddata__.m, scripts/plot/util/pan.m, scripts/plot/util/rotate.m, scripts/plot/util/rotate3d.m, scripts/plot/util/zoom.m, scripts/signal/periodogram.m, scripts/specfun/factor.m, scripts/specfun/primes.m, scripts/statistics/base/lscov.m, scripts/testfun/private/compare_plot_demos.m, scripts/testfun/private/dump_demos.m, scripts/testfun/private/html_compare_plot_demos.m, scripts/testfun/test.m: Periodic grammarcheck of documentation.
author Rik <rik@octave.org>
date Mon, 22 Sep 2014 20:46:54 -0700
parents 21656a949661
children a6d44158bc6d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
17516
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
1 ## Copyright (C) 2013 Mike Miller
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
2 ##
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
3 ## This file is part of Octave.
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
4 ##
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
5 ## Octave is free software; you can redistribute it and/or modify it
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
6 ## under the terms of the GNU General Public License as published by
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
7 ## the Free Software Foundation; either version 3 of the License, or (at
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
8 ## your option) any later version.
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
9 ##
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
10 ## Octave is distributed in the hope that it will be useful, but
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
13 ## General Public License for more details.
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
14 ##
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
15 ## You should have received a copy of the GNU General Public License
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
16 ## along with Octave; see the file COPYING. If not, see
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
17 ## <http://www.gnu.org/licenses/>.
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
18
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
19 ## -*- texinfo -*-
19186
0f9c5a15c8fa doc: Periodic grammarcheck of documentation.
Rik <rik@octave.org>
parents: 17516
diff changeset
20 ## @deftypefn {Function File} {} __gripe_missing_component__ (@var{caller}, @var{component})
17516
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
21 ## Undocumented internal function.
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
22 ## @end deftypefn
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
23
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
24 function __gripe_missing_component__ (caller, component)
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
25
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
26 if (nargin != 2)
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
27 print_usage ();
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
28 endif
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
29
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
30 msg = "";
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
31 fcn = missing_component_hook ();
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
32
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
33 ftype = exist (fcn);
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
34 if (ftype == 2 || ftype == 3 || ftype == 5 || ftype == 103)
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
35 msg = feval (fcn, component);
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
36 endif
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
37
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
38 if (isempty (msg))
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
39 switch (component)
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
40 case "info-file"
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
41 msg = "unable to find the Octave info manual, Octave installation is incomplete";
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
42 case "mkoctfile"
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
43 msg = "unable to find the mkoctfile command, Octave installation is incomplete";
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
44 case "octave"
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
45 msg = "unable to find the octave executable, Octave installation is incomplete";
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
46 case "octave-config"
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
47 msg = "unable to find the octave-config command, Octave installation is incomplete";
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
48 otherwise
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
49 msg = ["unable to find required Octave component \"" component "\""];
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
50 endswitch
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
51 endif
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
52
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
53 error ("%s: %s\n", caller, msg);
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
54
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
55 endfunction
21656a949661 Add hook function to handle missing Octave components
Mike Miller <mtmiller@ieee.org>
parents:
diff changeset
56