Mercurial > hg > octave-nkf
diff scripts/help/print_usage.m @ 11587:c792872f8942
all script files: untabify and strip trailing whitespace
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 20 Jan 2011 17:35:29 -0500 |
parents | fd0a3ac60b0e |
children | 208f0a181be6 |
line wrap: on
line diff
--- a/scripts/help/print_usage.m +++ b/scripts/help/print_usage.m @@ -44,7 +44,7 @@ else fullname = name; endif - + ## Determine if we're called from top level. at_toplev = length (x) < 2 || (length (x) == 2 && strcmp (x(2).name, name)); @@ -65,7 +65,7 @@ otherwise error ("print_usage: internal error: unsupported help text format: '%s'\n", format); endswitch - + ## Raise the final error if (status != 0) warning ("print_usage: Texinfo formatting filter exited abnormally"); @@ -100,7 +100,7 @@ ## Lines ending with "@\n" are continuation lines, so they should be ## concatenated with the following line. help_text = strrep (help_text, "@\n", " "); - + ## Find, and keep, lines that start with @def or @end def. This should include things ## such as @deftypefn, @deftypefnx, @defvar, etc. and their corresponding @end's def_idx = strfind (help_text, "@def"); @@ -115,7 +115,7 @@ buffer = strcat (buffer, help_text (def_idx (k):endl)); endif endfor - + end_def_idx = strfind (help_text, "@end def"); if (!isempty (end_def_idx)) buffer = strcat (buffer, help_text (end_def_idx:end)); @@ -131,7 +131,7 @@ function [retval, status] = get_usage_html (help_text, max_len) ## Strip tags [help_text, status] = strip_html_tags (help_text); - + ## Extract first line with plain text method. retval = get_usage_plain_text (help_text, max_len); endfunction