Mercurial > hg > octave-nkf
changeset 10163:a822560a3ce3
scripts/gethelp.cc: untabify
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 20 Jan 2010 20:57:20 -0500 |
parents | 9f9eb9d2eefd |
children | 085d4e025155 |
files | scripts/ChangeLog scripts/gethelp.cc |
diffstat | 2 files changed, 58 insertions(+), 54 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,7 @@ +2010-01-20 John W. Eaton <jwe@octave.org> + + * gethelp.cc: Untabfy. + 2010-01-20 Ben Abbott <bpabbot@mac.com> * /plot/__go_draw_figure__.m: Reverse order axes are drawn.
--- a/scripts/gethelp.cc +++ b/scripts/gethelp.cc @@ -56,65 +56,65 @@ while ((c = std::cin.get ()) != EOF) { if (begin_comment) - { - if (c == '%' || c == '#') - continue; - else if (discard_space && c == ' ') - { - discard_space = false; - continue; - } - else - begin_comment = false; - } + { + if (c == '%' || c == '#') + continue; + else if (discard_space && c == ' ') + { + discard_space = false; + continue; + } + else + begin_comment = false; + } if (in_comment) - { - if (! have_help_text) - { - first_comments_seen = true; - help_txt += (char) c; - } + { + if (! have_help_text) + { + first_comments_seen = true; + help_txt += (char) c; + } - if (c == '\n') - { - in_comment = false; - discard_space = true; + if (c == '\n') + { + in_comment = false; + discard_space = true; - if ((c = std::cin.get ()) != EOF) - { - if (c == '\n') - break; - } - else - break; - } - } + if ((c = std::cin.get ()) != EOF) + { + if (c == '\n') + break; + } + else + break; + } + } else - { - switch (c) - { - case ' ': - case '\t': - if (first_comments_seen) - have_help_text = true; - break; + { + switch (c) + { + case ' ': + case '\t': + if (first_comments_seen) + have_help_text = true; + break; - case '\n': - if (first_comments_seen) - have_help_text = true; - continue; + case '\n': + if (first_comments_seen) + have_help_text = true; + continue; - case '%': - case '#': - begin_comment = true; - in_comment = true; - break; + case '%': + case '#': + begin_comment = true; + in_comment = true; + break; - default: - goto done; - } - } + default: + goto done; + } + } } done: @@ -122,10 +122,10 @@ if (! help_txt.empty ()) { if (looks_like_octave_copyright (help_txt)) - help_txt.resize (0); + help_txt.resize (0); if (help_txt.empty ()) - help_txt = extract_help_text (); + help_txt = extract_help_text (); } return help_txt; @@ -153,7 +153,7 @@ if (! help_text.empty ()) { std::cout << "" << name << "\n" - << "@c " << file_name << "\n" + << "@c " << file_name << "\n" << help_text; if (help_text[help_text.length () - 1] != '\n')