summaryrefslogtreecommitdiffstats
path: root/roff.h
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-10-17 00:21:07 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-10-17 00:21:07 +0000
commit7458ebbfeabd0fc88f99200855485fe117765efe (patch)
treeba2a974eaf37b6fd348a214d94d5d8cbd718f3be /roff.h
parent8b031eb4b738371ee017dd07426252443d1760db (diff)
downloadmandoc-7458ebbfeabd0fc88f99200855485fe117765efe.tar.gz
Very tricky diff to fix macro interpretation and spacing around tabs
in .Bl -column; it took me more than a day to get this right. Triggered by a loosely related bug report from tim@. The lesson for you is: Use .Ta macros in .Bl -column, avoid tabs, or you are in for surprises: The last word before a tab is not interpreted as a macro (unless there is a blank in between), the first word after a tab isn't either (unless there is a blank in between), and a blank after a tab causes a leading blank in the respective output cell. Yes, "blank", "tab", "blank tab" and "tab blank" all have different semantics; if you write code relying on that, good luck maintaining it afterwards...
Diffstat (limited to 'roff.h')
-rw-r--r--roff.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/roff.h b/roff.h
index 750ccbe2..f32ffd25 100644
--- a/roff.h
+++ b/roff.h
@@ -141,8 +141,8 @@ struct roff_man {
#define MDOC_LITERAL (1 << 1) /* In a literal scope. */
#define MDOC_PBODY (1 << 2) /* In the document body. */
#define MDOC_NEWLINE (1 << 3) /* First macro/text in a line. */
-#define MDOC_PHRASELIT (1 << 4) /* Literal within a partial phrase. */
-#define MDOC_PPHRASE (1 << 5) /* Within a partial phrase. */
+#define MDOC_PHRASE (1 << 4) /* In a Bl -column phrase. */
+#define MDOC_PHRASELIT (1 << 5) /* Literal within a phrase. */
#define MDOC_FREECOL (1 << 6) /* `It' invocation should close. */
#define MDOC_SYNOPSIS (1 << 7) /* SYNOPSIS-style formatting. */
#define MDOC_KEEP (1 << 8) /* In a word keep. */
@@ -150,6 +150,9 @@ struct roff_man {
#define MDOC_NODELIMC (1 << 10) /* Disable closing delimiter handling. */
#define MAN_ELINE (1 << 11) /* Next-line element scope. */
#define MAN_BLINE (1 << 12) /* Next-line block scope. */
+#define MDOC_PHRASEQF (1 << 13) /* Quote first word encountered. */
+#define MDOC_PHRASEQL (1 << 14) /* Quote last word of this phrase. */
+#define MDOC_PHRASEQN (1 << 15) /* Quote first word of the next phrase. */
#define MAN_LITERAL MDOC_LITERAL
#define MAN_NEWLINE MDOC_NEWLINE
enum roff_macroset macroset; /* Kind of high-level macros used. */