Commit 23f15b0c by Doug Evans

(do_xifdef): Handle c++ comments.

(do_endif): Likewise.

From-SVN: r9214
parent f0959e58
......@@ -6953,7 +6953,11 @@ do_xifdef (buf, limit, op, keyword)
U_CHAR c = *p++;
if (is_space[c])
;
else if (c == '/' && p != ip->bufp && *p == '*') {
/* ??? Why is the test with ip->bufp here? */
/* ??? We don't handle \-n inside /-*. */
/* ??? Comment handling in general could use a major cleanup. */
else if (c == '/' && p != ip->bufp
&& (*p == '*' || (cplusplus_comments && *p == '/'))) {
/* Skip this comment. */
int junk = 0;
U_CHAR *save_bufp = ip->bufp;
......@@ -7410,7 +7414,8 @@ do_endif (buf, limit, op, keyword)
while (p != ep) {
U_CHAR c = *p++;
if (!is_space[c]) {
if (c == '/' && p != ep && *p == '*') {
if (c == '/' && p != ep
&& (*p == '*' || (cplusplus_comments && *p == '/'))) {
/* Skip this comment. */
int junk = 0;
U_CHAR *save_bufp = ip->bufp;
......
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