=================================================================== RCS file: /cvs/mandoc/roff.c,v retrieving revision 1.396 retrieving revision 1.397 diff -u -p -r1.396 -r1.397 --- mandoc/roff.c 2023/04/28 19:11:04 1.396 +++ mandoc/roff.c 2023/10/21 17:10:18 1.397 @@ -1,4 +1,4 @@ -/* $Id: roff.c,v 1.396 2023/04/28 19:11:04 schwarze Exp $ */ +/* $Id: roff.c,v 1.397 2023/10/21 17:10:18 schwarze Exp $ */ /* * Copyright (c) 2010-2015, 2017-2022 Ingo Schwarze * Copyright (c) 2008-2012, 2014 Kristaps Dzonsons @@ -1387,7 +1387,7 @@ roff_expand(struct roff *r, struct buf *buf, int ln, i */ 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++; } @@ -1632,12 +1632,7 @@ roff_getarg(struct roff *r, char **cpp, int ln, int *p 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++; @@ -1694,7 +1689,7 @@ roff_getarg(struct roff *r, char **cpp, int ln, int *p 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(""); }