Mercurial > hg > octave-nkf
diff src/lex.l @ 3427:e098ebb77023
[project @ 2000-01-13 09:25:53 by jwe]
author | jwe |
---|---|
date | Thu, 13 Jan 2000 09:25:59 +0000 |
parents | 18366d37e7dd |
children | 5b77cf82393c |
line wrap: on
line diff
--- a/src/lex.l +++ b/src/lex.l @@ -1173,7 +1173,7 @@ // Grab the help text from an function file. Always overwrites the // current contents of help_buf. -// XXX FIXME XXX -- gobble_leading_white_space() in variables.cc +// XXX FIXME XXX -- gobble_leading_white_space() in parse.y // duplicates some of this code! static void @@ -1183,6 +1183,7 @@ bool begin_comment = true; bool in_comment = true; + bool discard_space = true; int c = 0; while ((c = yyinput ()) != EOF) @@ -1191,6 +1192,11 @@ { if (c == '%' || c == '#') continue; + else if (discard_space && c == ' ') + { + discard_space = false; + continue; + } else begin_comment = false; } @@ -1200,7 +1206,10 @@ help_buf += (char) c; if (c == '\n') - in_comment = false; + { + in_comment = false; + discard_space = true; + } } else {