Commit a3f2d1ba by Richard Kenner

(dump_defn_1): Skip newlines and strings correctly.

From-SVN: r7893
parent 08b2cb48
...@@ -8991,15 +8991,16 @@ dump_defn_1 (base, start, length, of) ...@@ -8991,15 +8991,16 @@ dump_defn_1 (base, start, length, of)
U_CHAR *limit = base + start + length; U_CHAR *limit = base + start + length;
while (p < limit) { while (p < limit) {
if (*p != '\n') if (*p == '\"' || *p =='\'') {
putc (*p, of);
else if (*p == '\"' || *p =='\'') {
U_CHAR *p1 = skip_quoted_string (p, limit, 0, NULL_PTR, U_CHAR *p1 = skip_quoted_string (p, limit, 0, NULL_PTR,
NULL_PTR, NULL_PTR); NULL_PTR, NULL_PTR);
fwrite (p, p1 - p, 1, of); fwrite (p, p1 - p, 1, of);
p = p1 - 1; p = p1;
} else {
if (*p != '\n')
putc (*p, of);
p++;
} }
p++;
} }
} }
......
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