Mercurial > hg > octave-lyh
annotate scripts/help/print_usage.m @ 17535:c12c688a35ed default tip lyh
Fix warnings
author | LYH <lyh.kernel@gmail.com> |
---|---|
date | Fri, 27 Sep 2013 17:43:27 +0800 |
parents | 1c89599167a6 |
children |
rev | line source |
---|---|
17251
f4c8c66faf34
maint: Update source file encodings to UTF-8 and fix character errors
Mike Miller <mtmiller@ieee.org>
parents:
17104
diff
changeset
|
1 ## Copyright (C) 2009-2012 Søren Hauberg |
8575
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
2 ## |
11104 | 3 ## This file is part of Octave. |
4 ## | |
5 ## Octave is free software; you can redistribute it and/or modify it | |
8575
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
6 ## under the terms of the GNU General Public License as published by |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
7 ## the Free Software Foundation; either version 3 of the License, or (at |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
8 ## your option) any later version. |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
9 ## |
11104 | 10 ## Octave is distributed in the hope that it will be useful, but |
8575
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
13 ## General Public License for more details. |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
14 ## |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
15 ## You should have received a copy of the GNU General Public License |
11104 | 16 ## along with Octave; see the file COPYING. If not, see |
8575
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
17 ## <http://www.gnu.org/licenses/>. |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
18 |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
19 ## -*- texinfo -*- |
10793
be55736a0783
Grammarcheck the documentation from m-files.
Rik <octave@nomad.inbox5.com>
parents:
10131
diff
changeset
|
20 ## @deftypefn {Function File} {} print_usage () |
be55736a0783
Grammarcheck the documentation from m-files.
Rik <octave@nomad.inbox5.com>
parents:
10131
diff
changeset
|
21 ## @deftypefnx {Function File} {} print_usage (@var{name}) |
8575
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
22 ## Print the usage message for a function. When called with no input arguments |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
23 ## the @code{print_usage} function displays the usage message of the currently |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
24 ## executing function. |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
25 ## @seealso{help} |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
26 ## @end deftypefn |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
27 |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
28 function print_usage (name) |
10131
30817aa3889a
allow print_usage to print backtrace if called from functions
Jaroslav Hajek <highegg@gmail.com>
parents:
9535
diff
changeset
|
29 x = dbstack (); |
8575
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
30 ## Handle input |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
31 if (nargin == 0) |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
32 ## Determine the name of the calling function |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
33 if (numel (x) > 1) |
17104
ae7872816611
print_usage.m: Fix handling of functions with multiple @deftypefn/@end deftypefn pairs.
Rik <rik@octave.org>
parents:
15559
diff
changeset
|
34 name = x(2).name; |
8575
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
35 else |
15559
6f3363ff368c
print_usage.m: Adding error identifiers.
Juan Pablo Carbajal (desktop) <ajuanpi+dev@gmail.com>
parents:
15466
diff
changeset
|
36 error ("Octave:invalid-context", "print_usage: invalid function\n"); |
8575
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
37 endif |
17104
ae7872816611
print_usage.m: Fix handling of functions with multiple @deftypefn/@end deftypefn pairs.
Rik <rik@octave.org>
parents:
15559
diff
changeset
|
38 fullpath = evalin ("caller", 'mfilename ("fullpath")'); |
9535
936734e15a4d
print_usage: make it work again if an argument is given
John W. Eaton <jwe@octave.org>
parents:
9530
diff
changeset
|
39 if (strcmp (fullpath(end-length(name)+1:end), name)) |
17104
ae7872816611
print_usage.m: Fix handling of functions with multiple @deftypefn/@end deftypefn pairs.
Rik <rik@octave.org>
parents:
15559
diff
changeset
|
40 fullname = [fullpath ".m"]; |
9530
f3df413338c5
print_usage: support calling from methods
Jaroslav Hajek <highegg@gmail.com>
parents:
8768
diff
changeset
|
41 endif |
17104
ae7872816611
print_usage.m: Fix handling of functions with multiple @deftypefn/@end deftypefn pairs.
Rik <rik@octave.org>
parents:
15559
diff
changeset
|
42 elseif (! ischar (name)) |
15559
6f3363ff368c
print_usage.m: Adding error identifiers.
Juan Pablo Carbajal (desktop) <ajuanpi+dev@gmail.com>
parents:
15466
diff
changeset
|
43 error ("Octave:invalid-input-arg", |
17104
ae7872816611
print_usage.m: Fix handling of functions with multiple @deftypefn/@end deftypefn pairs.
Rik <rik@octave.org>
parents:
15559
diff
changeset
|
44 "print_usage: input argument must be a string"); |
9535
936734e15a4d
print_usage: make it work again if an argument is given
John W. Eaton <jwe@octave.org>
parents:
9530
diff
changeset
|
45 else |
936734e15a4d
print_usage: make it work again if an argument is given
John W. Eaton <jwe@octave.org>
parents:
9530
diff
changeset
|
46 fullname = name; |
8575
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
47 endif |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
48 |
17104
ae7872816611
print_usage.m: Fix handling of functions with multiple @deftypefn/@end deftypefn pairs.
Rik <rik@octave.org>
parents:
15559
diff
changeset
|
49 ## Determine if we were called from top level. |
10131
30817aa3889a
allow print_usage to print backtrace if called from functions
Jaroslav Hajek <highegg@gmail.com>
parents:
9535
diff
changeset
|
50 at_toplev = length (x) < 2 || (length (x) == 2 && strcmp (x(2).name, name)); |
30817aa3889a
allow print_usage to print backtrace if called from functions
Jaroslav Hajek <highegg@gmail.com>
parents:
9535
diff
changeset
|
51 |
8575
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
52 ## Do the actual work |
9535
936734e15a4d
print_usage: make it work again if an argument is given
John W. Eaton <jwe@octave.org>
parents:
9530
diff
changeset
|
53 [text, format] = get_help_text (fullname); |
8575
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
54 max_len = 80; |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
55 switch (lower (format)) |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
56 case "plain text" |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
57 [usage_string, status] = get_usage_plain_text (text, max_len); |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
58 case "texinfo" |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
59 [usage_string, status] = get_usage_texinfo (text, max_len); |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
60 case "html" |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
61 [usage_string, status] = get_usage_html (text, max_len); |
8631
52956d669506
Display sensible error message when the help text of an undocumented function is requested
Soren Hauberg <hauberg@gmail.com>
parents:
8575
diff
changeset
|
62 case "not documented" |
15466
d174210ce1ec
use ' instead of ` in error messages, warnings and most comments
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
63 error ("print_usage: '%s' is not documented\n", name); |
8575
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
64 case "not found" |
15466
d174210ce1ec
use ' instead of ` in error messages, warnings and most comments
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
65 error ("print_usage: '%s' not found\n", name); |
8575
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
66 otherwise |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
67 error ("print_usage: internal error: unsupported help text format: '%s'\n", format); |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
68 endswitch |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
69 |
8575
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
70 ## Raise the final error |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
71 if (status != 0) |
8768
e0fbf17a17bb
__makeinfo__.m: rename from makeinfo.m
John W. Eaton <jwe@octave.org>
parents:
8631
diff
changeset
|
72 warning ("print_usage: Texinfo formatting filter exited abnormally"); |
e0fbf17a17bb
__makeinfo__.m: rename from makeinfo.m
John W. Eaton <jwe@octave.org>
parents:
8631
diff
changeset
|
73 warning ("print_usage: raw Texinfo source of help text follows...\n"); |
8575
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
74 endif |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
75 |
10131
30817aa3889a
allow print_usage to print backtrace if called from functions
Jaroslav Hajek <highegg@gmail.com>
parents:
9535
diff
changeset
|
76 if (at_toplev) |
17104
ae7872816611
print_usage.m: Fix handling of functions with multiple @deftypefn/@end deftypefn pairs.
Rik <rik@octave.org>
parents:
15559
diff
changeset
|
77 error ("Octave:invalid-fun-call", |
ae7872816611
print_usage.m: Fix handling of functions with multiple @deftypefn/@end deftypefn pairs.
Rik <rik@octave.org>
parents:
15559
diff
changeset
|
78 "Invalid call to %s. Correct usage is:\n\n%s\n%s", |
10131
30817aa3889a
allow print_usage to print backtrace if called from functions
Jaroslav Hajek <highegg@gmail.com>
parents:
9535
diff
changeset
|
79 name, usage_string, __additional_help_message__ ()); |
30817aa3889a
allow print_usage to print backtrace if called from functions
Jaroslav Hajek <highegg@gmail.com>
parents:
9535
diff
changeset
|
80 else |
30817aa3889a
allow print_usage to print backtrace if called from functions
Jaroslav Hajek <highegg@gmail.com>
parents:
9535
diff
changeset
|
81 msg = sprintf ("Invalid call to %s. Correct usage is:\n\n%s", |
30817aa3889a
allow print_usage to print backtrace if called from functions
Jaroslav Hajek <highegg@gmail.com>
parents:
9535
diff
changeset
|
82 name, usage_string); |
30817aa3889a
allow print_usage to print backtrace if called from functions
Jaroslav Hajek <highegg@gmail.com>
parents:
9535
diff
changeset
|
83 ## Ensure that the error doesn't end up with a newline, as that disables |
30817aa3889a
allow print_usage to print backtrace if called from functions
Jaroslav Hajek <highegg@gmail.com>
parents:
9535
diff
changeset
|
84 ## backtraces. |
30817aa3889a
allow print_usage to print backtrace if called from functions
Jaroslav Hajek <highegg@gmail.com>
parents:
9535
diff
changeset
|
85 if (msg(end) == "\n") |
30817aa3889a
allow print_usage to print backtrace if called from functions
Jaroslav Hajek <highegg@gmail.com>
parents:
9535
diff
changeset
|
86 msg(end) = " "; |
30817aa3889a
allow print_usage to print backtrace if called from functions
Jaroslav Hajek <highegg@gmail.com>
parents:
9535
diff
changeset
|
87 endif |
30817aa3889a
allow print_usage to print backtrace if called from functions
Jaroslav Hajek <highegg@gmail.com>
parents:
9535
diff
changeset
|
88 |
15559
6f3363ff368c
print_usage.m: Adding error identifiers.
Juan Pablo Carbajal (desktop) <ajuanpi+dev@gmail.com>
parents:
15466
diff
changeset
|
89 error ("Octave:invalid-fun-call", msg); |
10131
30817aa3889a
allow print_usage to print backtrace if called from functions
Jaroslav Hajek <highegg@gmail.com>
parents:
9535
diff
changeset
|
90 endif |
30817aa3889a
allow print_usage to print backtrace if called from functions
Jaroslav Hajek <highegg@gmail.com>
parents:
9535
diff
changeset
|
91 |
8575
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
92 endfunction |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
93 |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
94 function [retval, status] = get_usage_plain_text (help_text, max_len) |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
95 ## Extract first line by searching for a double line-end. |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
96 line_end_idx = strfind (help_text, "\n\n"); |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
97 retval = help_text (1:min ([line_end_idx , max_len, length(help_text)])); |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
98 status = 0; |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
99 endfunction |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
100 |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
101 function [retval, status] = get_usage_texinfo (help_text, max_len) |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
102 ## Lines ending with "@\n" are continuation lines, so they should be |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
103 ## concatenated with the following line. |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
104 help_text = strrep (help_text, "@\n", " "); |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
105 |
17104
ae7872816611
print_usage.m: Fix handling of functions with multiple @deftypefn/@end deftypefn pairs.
Rik <rik@octave.org>
parents:
15559
diff
changeset
|
106 ## Find, and keep, lines that start with @def or @end def. This should |
ae7872816611
print_usage.m: Fix handling of functions with multiple @deftypefn/@end deftypefn pairs.
Rik <rik@octave.org>
parents:
15559
diff
changeset
|
107 ## include things such as @deftypefn, @deftypefnx, @defvar, etc. and their |
ae7872816611
print_usage.m: Fix handling of functions with multiple @deftypefn/@end deftypefn pairs.
Rik <rik@octave.org>
parents:
15559
diff
changeset
|
108 ## corresponding @end's. |
8575
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
109 def_idx = strfind (help_text, "@def"); |
17104
ae7872816611
print_usage.m: Fix handling of functions with multiple @deftypefn/@end deftypefn pairs.
Rik <rik@octave.org>
parents:
15559
diff
changeset
|
110 if (! isempty (def_idx)) |
ae7872816611
print_usage.m: Fix handling of functions with multiple @deftypefn/@end deftypefn pairs.
Rik <rik@octave.org>
parents:
15559
diff
changeset
|
111 endf_idx = strfind (help_text, "@end def"); |
ae7872816611
print_usage.m: Fix handling of functions with multiple @deftypefn/@end deftypefn pairs.
Rik <rik@octave.org>
parents:
15559
diff
changeset
|
112 def_idx = sort ([def_idx, endf_idx]); |
8575
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
113 endl_idx = find (help_text == "\n"); |
17104
ae7872816611
print_usage.m: Fix handling of functions with multiple @deftypefn/@end deftypefn pairs.
Rik <rik@octave.org>
parents:
15559
diff
changeset
|
114 buffer = ""; |
8575
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
115 for k = 1:length (def_idx) |
17104
ae7872816611
print_usage.m: Fix handling of functions with multiple @deftypefn/@end deftypefn pairs.
Rik <rik@octave.org>
parents:
15559
diff
changeset
|
116 endl = endl_idx (find (endl_idx > def_idx(k), 1)); |
8575
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
117 if (isempty (endl)) |
17104
ae7872816611
print_usage.m: Fix handling of functions with multiple @deftypefn/@end deftypefn pairs.
Rik <rik@octave.org>
parents:
15559
diff
changeset
|
118 buffer = strcat (buffer, help_text (def_idx(k):end), "\n"); |
8575
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
119 else |
17104
ae7872816611
print_usage.m: Fix handling of functions with multiple @deftypefn/@end deftypefn pairs.
Rik <rik@octave.org>
parents:
15559
diff
changeset
|
120 buffer = strcat (buffer, help_text (def_idx(k):endl)); |
8575
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
121 endif |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
122 endfor |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
123 else |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
124 [retval, status] = get_usage_plain_text (help_text, max_len); |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
125 endif |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
126 |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
127 ## Run makeinfo to generate plain text |
8768
e0fbf17a17bb
__makeinfo__.m: rename from makeinfo.m
John W. Eaton <jwe@octave.org>
parents:
8631
diff
changeset
|
128 [retval, status] = __makeinfo__ (buffer, "plain text"); |
8575
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
129 endfunction |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
130 |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
131 function [retval, status] = get_usage_html (help_text, max_len) |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
132 ## Strip tags |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
133 [help_text, status] = strip_html_tags (help_text); |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
134 |
8575
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
135 ## Extract first line with plain text method. |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
136 retval = get_usage_plain_text (help_text, max_len); |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
137 endfunction |
f134925a1cfa
m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents:
diff
changeset
|
138 |
12830
208f0a181be6
codesprint: Stop reporting print_usage() as missing tests.
Rik <octave@nomad.inbox5.com>
parents:
11587
diff
changeset
|
139 |
208f0a181be6
codesprint: Stop reporting print_usage() as missing tests.
Rik <octave@nomad.inbox5.com>
parents:
11587
diff
changeset
|
140 ## Stop reporting function as missing tests. No good tests possible. |
208f0a181be6
codesprint: Stop reporting print_usage() as missing tests.
Rik <octave@nomad.inbox5.com>
parents:
11587
diff
changeset
|
141 %!assert (1) |
17346
1c89599167a6
maint: End m-files with 1 blank line.
Rik <rik@octave.org>
parents:
17251
diff
changeset
|
142 |