version 1.268, 2022/12/26 19:16:02 |
version 1.269, 2023/10/21 17:10:12 |
|
|
*/ |
*/ |
|
|
if (buf->buf[pos] != ec) { |
if (buf->buf[pos] != ec) { |
if (ec != ASCII_ESC && buf->buf[pos] == '\\') { |
if (buf->buf[pos] == '\\') { |
roff_expand_patch(buf, pos, "\\e", pos + 1); |
roff_expand_patch(buf, pos, "\\e", pos + 1); |
pos++; |
pos++; |
} |
} |
|
|
cp++; |
cp++; |
break; |
break; |
case '\\': |
case '\\': |
/* |
cp[-pairs] = '\\'; |
* Signal to roff_expand() that an escape |
|
* sequence resulted from copy-in processing |
|
* and needs to be checked or interpolated. |
|
*/ |
|
cp[-pairs] = ASCII_ESC; |
|
newesc = 1; |
newesc = 1; |
pairs++; |
pairs++; |
cp++; |
cp++; |
|
|
buf.buf = start; |
buf.buf = start; |
buf.sz = strlen(start) + 1; |
buf.sz = strlen(start) + 1; |
buf.next = NULL; |
buf.next = NULL; |
if (roff_expand(r, &buf, ln, 0, ASCII_ESC) & ROFF_IGN) { |
if (roff_expand(r, &buf, ln, 0, '\\') & ROFF_IGN) { |
free(buf.buf); |
free(buf.buf); |
buf.buf = mandoc_strdup(""); |
buf.buf = mandoc_strdup(""); |
} |
} |