summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-08-24 13:07:01 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-08-24 13:07:01 +0000
commitac2ee6a683c48e758ae871419ea18b57aa82e14b (patch)
treec5e97877580b19cfc4de33c45d8d75580fcb92ad
parent81374b2c54962e63129d5934a3bc854804cb73c1 (diff)
downloadmandoc-ac2ee6a683c48e758ae871419ea18b57aa82e14b.tar.gz
mandoc-ac2ee6a683c48e758ae871419ea18b57aa82e14b.tar.zst
mandoc-ac2ee6a683c48e758ae871419ea18b57aa82e14b.zip
Stripping out of `\w' groff escape. Yet another for pod2man...
-rw-r--r--man.77
-rw-r--r--mandoc.c10
-rw-r--r--mdoc.77
-rw-r--r--out.c8
4 files changed, 22 insertions, 10 deletions
diff --git a/man.7 b/man.7
index 2a78c146..a08e32b2 100644
--- a/man.7
+++ b/man.7
@@ -1,4 +1,4 @@
-.\" $Id: man.7,v 1.83 2010/08/24 12:18:48 kristaps Exp $
+.\" $Id: man.7,v 1.84 2010/08/24 13:07:01 kristaps Exp $
.\"
.\" Copyright (c) 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
.\"
@@ -938,11 +938,12 @@ The
.Pq text filling colour ,
.Sq \ez
.Pq zero-length character ,
+.Sq \ew
+.Pq string length ,
and
.Sq \es
.Pq text size
-.Sx Text Decoration
-escapes are all discarded in mandoc.
+escape sequences are all discarded in mandoc.
.It
The
.Sq \ef
diff --git a/mandoc.c b/mandoc.c
index 5505c5f3..41d4196a 100644
--- a/mandoc.c
+++ b/mandoc.c
@@ -1,4 +1,4 @@
-/* $Id: mandoc.c,v 1.30 2010/08/24 12:18:48 kristaps Exp $ */
+/* $Id: mandoc.c,v 1.31 2010/08/24 13:07:01 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -55,8 +55,6 @@ mandoc_special(char *p)
/* FALLTHROUGH */
case ('x'):
/* FALLTHROUGH */
- case ('w'):
- /* FALLTHROUGH */
case ('S'):
/* FALLTHROUGH */
case ('R'):
@@ -178,6 +176,12 @@ mandoc_special(char *p)
return(*p ? (int)(p - sv) : 0);
}
break;
+ case ('w'):
+ if ('\'' == *p++) {
+ term = '\'';
+ break;
+ }
+ /* FALLTHROUGH */
default:
len = 1;
p--;
diff --git a/mdoc.7 b/mdoc.7
index 12ff50fd..39c771b7 100644
--- a/mdoc.7
+++ b/mdoc.7
@@ -1,4 +1,4 @@
-.\" $Id: mdoc.7,v 1.152 2010/08/24 12:18:49 kristaps Exp $
+.\" $Id: mdoc.7,v 1.153 2010/08/24 13:07:01 kristaps Exp $
.\"
.\" Copyright (c) 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
.\" Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org>
@@ -2846,11 +2846,12 @@ The
.Pq text filling colour ,
.Sq \ez
.Pq zero-length character ,
+.Sq \ew
+.Pq string length ,
and
.Sq \es
.Pq text size
-.Sx Text Decoration
-escapes are all discarded in mandoc.
+escape sequences are all discarded in mandoc.
.It
The
.Sq \ef
diff --git a/out.c b/out.c
index 5bc69ca2..6e1dadae 100644
--- a/out.c
+++ b/out.c
@@ -1,4 +1,4 @@
-/* $Id: out.c,v 1.25 2010/08/24 12:18:49 kristaps Exp $ */
+/* $Id: out.c,v 1.26 2010/08/24 13:07:01 kristaps Exp $ */
/*
* Copyright (c) 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -293,6 +293,12 @@ a2roffdeco(enum roffdeco *d, const char **word, size_t *sz)
} else
lim = 1;
break;
+ case ('w'):
+ if ('\'' == wp[i++]) {
+ term = '\'';
+ break;
+ }
+ /* FALLTHROUGH */
default:
*d = DECO_SSPECIAL;
i--;