summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-10-26 15:44:51 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-10-26 15:44:51 +0000
commitdb291a2602e211bc92b0aeff06015e59baea0962 (patch)
treee3635db2b0576da836dc2c40e98978559ea9ff2b
parent9d6a888edb5abd01db8123afa74bc2405f0a9167 (diff)
downloadmandoc-db291a2602e211bc92b0aeff06015e59baea0962.tar.gz
mandoc-db291a2602e211bc92b0aeff06015e59baea0962.tar.zst
mandoc-db291a2602e211bc92b0aeff06015e59baea0962.zip
Merged patch to allow -fign-escape (thanks Joerg Sonnenberger).
-rw-r--r--main.c10
-rw-r--r--mandoc.17
2 files changed, 13 insertions, 4 deletions
diff --git a/main.c b/main.c
index dabfd625..128f3111 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.49 2009/10/26 08:42:37 kristaps Exp $ */
+/* $Id: main.c,v 1.50 2009/10/26 15:44:51 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -571,7 +571,7 @@ static int
foptions(int *fflags, char *arg)
{
char *v, *o;
- const char *toks[7];
+ const char *toks[8];
toks[0] = "ign-scope";
toks[1] = "no-ign-escape";
@@ -579,7 +579,8 @@ foptions(int *fflags, char *arg)
toks[3] = "no-ign-chars";
toks[4] = "ign-errors";
toks[5] = "strict";
- toks[6] = NULL;
+ toks[6] = "ign-escape";
+ toks[7] = NULL;
while (*arg) {
o = arg;
@@ -603,6 +604,9 @@ foptions(int *fflags, char *arg)
*fflags |= NO_IGN_ESCAPE |
NO_IGN_MACRO | NO_IGN_CHARS;
break;
+ case (6):
+ *fflags &= ~NO_IGN_ESCAPE;
+ break;
default:
warnx("bad argument: -f%s", o);
return(0);
diff --git a/mandoc.1 b/mandoc.1
index 0d5a08ca..f02219b3 100644
--- a/mandoc.1
+++ b/mandoc.1
@@ -1,4 +1,4 @@
-.\" $Id: mandoc.1,v 1.44 2009/10/26 04:15:42 kristaps Exp $
+.\" $Id: mandoc.1,v 1.45 2009/10/26 15:44:51 kristaps Exp $
.\"
.\" Copyright (c) 2009 Kristaps Dzonsons <kristaps@kth.se>
.\"
@@ -228,6 +228,11 @@ When rewinding the scope of a block macro, forces the compiler to ignore
scope violations. This can seriously mangle the resulting tree.
.Pq mdoc only
.
+.It Fl f Ns Ar ign-escape
+Ignore invalid escape sequences.
+This is the default, but the option can be used to override an earlier
+.Fl f Ns Ar strict .
+.
.It Fl f Ns Ar no-ign-escape
Don't ignore invalid escape sequences.
.