-/* $OpenBSD: mandoc.h,v 1.223 2022/08/16 17:29:18 schwarze Exp $ */
+/* $OpenBSD: mandoc.h,v 1.224 2023/10/21 17:10:12 schwarze Exp $ */
/*
* Copyright (c) 2012-2022 Ingo Schwarze <schwarze@openbsd.org>
* Copyright (c) 2010, 2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
#define ASCII_NBRZW 30 /* non-breaking zero-width space */
#define ASCII_BREAK 29 /* breakable zero-width space */
#define ASCII_HYPH 28 /* breakable hyphen */
-#define ASCII_ESC 27 /* escape sequence from copy-in processing */
#define ASCII_TABREF 26 /* reset tab reference position */
/*
-/* $OpenBSD: roff.c,v 1.268 2022/12/26 19:16:02 jmc Exp $ */
+/* $OpenBSD: roff.c,v 1.269 2023/10/21 17:10:12 schwarze Exp $ */
/*
* Copyright (c) 2010-2015, 2017-2022 Ingo Schwarze <schwarze@openbsd.org>
* Copyright (c) 2008-2012, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
*/
if (buf->buf[pos] != ec) {
- if (ec != ASCII_ESC && buf->buf[pos] == '\\') {
+ if (buf->buf[pos] == '\\') {
roff_expand_patch(buf, pos, "\\e", pos + 1);
pos++;
}
cp++;
break;
case '\\':
- /*
- * Signal to roff_expand() that an escape
- * sequence resulted from copy-in processing
- * and needs to be checked or interpolated.
- */
- cp[-pairs] = ASCII_ESC;
+ cp[-pairs] = '\\';
newesc = 1;
pairs++;
cp++;
buf.buf = start;
buf.sz = strlen(start) + 1;
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);
buf.buf = mandoc_strdup("");
}