summaryrefslogtreecommitdiffstats
path: root/roff.c
diff options
context:
space:
mode:
Diffstat (limited to 'roff.c')
-rw-r--r--roff.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/roff.c b/roff.c
index f3565f85..47ea41b5 100644
--- a/roff.c
+++ b/roff.c
@@ -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 *pos)
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;