Commit 18e2b1c0 by Jim Wilson

(discard_comments): Replace comments with a single space.

From-SVN: r6993
parent 1e018103
...@@ -8170,14 +8170,16 @@ discard_comments (start, length, newlines) ...@@ -8170,14 +8170,16 @@ discard_comments (start, length, newlines)
newline_fix (ibp); newline_fix (ibp);
/* Delete any comment. */ /* Delete any comment. */
if (cplusplus_comments && ibp[0] == '/') { if (cplusplus_comments && ibp[0] == '/') {
obp--; /* Comments are equivalent to spaces. */
obp[-1] = ' ';
ibp++; ibp++;
while (ibp < limit && *ibp++ != '\n') ; while (ibp < limit && *ibp++ != '\n') ;
break; break;
} }
if (ibp[0] != '*' || ibp + 1 >= limit) if (ibp[0] != '*' || ibp + 1 >= limit)
break; break;
obp--; /* Comments are equivalent to spaces. */
obp[-1] = ' ';
ibp++; ibp++;
while (ibp + 1 < limit) { while (ibp + 1 < limit) {
if (ibp[0] == '*' if (ibp[0] == '*'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment