summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-07-04 09:01:55 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-07-04 09:01:55 +0000
commit4731011d94a8295f8bf499ee10709029a5ac9f4a (patch)
tree029371328cc51743d850eecdc97ab2d9d1d7256b /main.c
parentb446ffedf453a9238f7514a3d1ca6d8ac7489f03 (diff)
downloadmandoc-4731011d94a8295f8bf499ee10709029a5ac9f4a.tar.gz
Moved escape validation into libmandoc.h/mandoc.c (common between libman/libmdoc1).
libman supports MAN_IGN_ESCAPE (like MDOC_IGN_ESCAPE). All popular escapes now handled consistently.
Diffstat (limited to 'main.c')
-rw-r--r--main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/main.c b/main.c
index 3f6edeb8..4be1965d 100644
--- a/main.c
+++ b/main.c
@@ -232,12 +232,14 @@ man_init(struct curparse *curp)
/* Defaults from mandoc.1. */
- pflags = MAN_IGN_MACRO | MAN_IGN_CHARS;
+ pflags = MAN_IGN_MACRO | MAN_IGN_ESCAPE | MAN_IGN_CHARS;
if (curp->fflags & NO_IGN_MACRO)
pflags &= ~MAN_IGN_MACRO;
if (curp->fflags & NO_IGN_CHARS)
pflags &= ~MAN_IGN_CHARS;
+ if (curp->fflags & NO_IGN_ESCAPE)
+ pflags &= ~MAN_IGN_ESCAPE;
if (NULL == (man = man_alloc(curp, pflags, &mancb)))
warnx("memory exhausted");