=================================================================== RCS file: /cvs/mandoc/roff.c,v retrieving revision 1.394 retrieving revision 1.395 diff -u -p -r1.394 -r1.395 --- mandoc/roff.c 2022/06/07 09:41:59 1.394 +++ mandoc/roff.c 2022/08/16 17:30:11 1.395 @@ -1,4 +1,4 @@ -/* $Id: roff.c,v 1.394 2022/06/07 09:41:59 schwarze Exp $ */ +/* $Id: roff.c,v 1.395 2022/08/16 17:30:11 schwarze Exp $ */ /* * Copyright (c) 2010-2015, 2017-2022 Ingo Schwarze * Copyright (c) 2008-2012, 2014 Kristaps Dzonsons @@ -40,14 +40,6 @@ #include "tbl_parse.h" #include "eqn_parse.h" -/* - * ASCII_ESC is used to signal from roff_getarg() to roff_expand() - * that an escape sequence resulted from copy-in processing and - * needs to be checked or interpolated. As it is used nowhere - * else, it is defined here rather than in a header file. - */ -#define ASCII_ESC 27 - /* Maximum number of string expansions per line, to break infinite loops. */ #define EXPAND_LIMIT 1000 @@ -1640,8 +1632,13 @@ roff_getarg(struct roff *r, char **cpp, int ln, int *p cp++; break; case '\\': - newesc = 1; + /* + * 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; pairs++; cp++; break;