summaryrefslogtreecommitdiffstats
path: root/mandoc.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2018-08-16 13:54:06 +0000
committerIngo Schwarze <schwarze@openbsd.org>2018-08-16 13:54:06 +0000
commit27f1545e0f756e82e793a38e1bc5a55d673a6261 (patch)
treeaec0540f62f2ddaaf8ca6abc5d05a59cd47da072 /mandoc.c
parent53895dc947dd04e38242df7ec586e07b9b14ba99 (diff)
downloadmandoc-27f1545e0f756e82e793a38e1bc5a55d673a6261.tar.gz
Implement the \*(.T predefined string (interpolate device name)
by allowing the preprocessor to pass it through to the formatters. Used for example by the groff_char(7) manual page.
Diffstat (limited to 'mandoc.c')
-rw-r--r--mandoc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/mandoc.c b/mandoc.c
index 7e785312..d1b6fe93 100644
--- a/mandoc.c
+++ b/mandoc.c
@@ -139,6 +139,13 @@ mandoc_escape(const char **end, const char **start, int *sz)
break;
}
break;
+ case '*':
+ if (strncmp(*start, "(.T", 3) != 0)
+ abort();
+ gly = ESCAPE_DEVICE;
+ *start = ++*end;
+ *sz = 2;
+ break;
/*
* These escapes are of the form \X'Y', where 'X' is the trigger