Mercurial > hg > octave-lyh
comparison scripts/help/help.m @ 10549:95c3e38098bf
Untabify .m scripts
author | Rik <code@nomad.inbox5.com> |
---|---|
date | Fri, 23 Apr 2010 11:28:50 -0700 |
parents | 62f8ae5ab2cc |
children | 07933067e4ab |
comparison
equal
deleted
inserted
replaced
10548:479536c5bb10 | 10549:95c3e38098bf |
---|---|
64 [text, status] = strip_html_tags (text); | 64 [text, status] = strip_html_tags (text); |
65 case "not documented" | 65 case "not documented" |
66 error ("help: `%s' is not documented\n", name); | 66 error ("help: `%s' is not documented\n", name); |
67 case "not found" | 67 case "not found" |
68 do_contents (name); | 68 do_contents (name); |
69 return; | 69 return; |
70 otherwise | 70 otherwise |
71 error ("help: internal error: unsupported help text format: '%s'\n", format); | 71 error ("help: internal error: unsupported help text format: '%s'\n", format); |
72 endswitch | 72 endswitch |
73 | 73 |
74 ## Print text | 74 ## Print text |
97 [text, format] = get_help_text_from_file (fname); | 97 [text, format] = get_help_text_from_file (fname); |
98 | 98 |
99 ## Take action depending on help text format | 99 ## Take action depending on help text format |
100 switch (lower (format)) | 100 switch (lower (format)) |
101 case "plain text" | 101 case "plain text" |
102 status = 0; | 102 status = 0; |
103 case "texinfo" | 103 case "texinfo" |
104 [text, status] = __makeinfo__ (text, "plain text"); | 104 [text, status] = __makeinfo__ (text, "plain text"); |
105 case "html" | 105 case "html" |
106 [text, status] = strip_html_tags (text); | 106 [text, status] = strip_html_tags (text); |
107 endswitch | 107 endswitch |
108 | 108 |
109 if (! isempty (text)) | 109 if (! isempty (text)) |
110 found = true; | 110 found = true; |
111 ## Print text. | 111 ## Print text. |
112 if (status != 0) | 112 if (status != 0) |
113 warning ("help: Texinfo formatting filter exited abnormally; raw Texinfo source of help text follows...\n"); | 113 warning ("help: Texinfo formatting filter exited abnormally; raw Texinfo source of help text follows...\n"); |
114 endif | 114 endif |
115 printf ("%s:\n\n%s\n", fname, text); | 115 printf ("%s:\n\n%s\n", fname, text); |
116 endif | 116 endif |
117 | 117 |
118 endfor | 118 endfor |