summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rw-r--r--mdocterm.c17
-rw-r--r--term.c6
-rw-r--r--term.h1
4 files changed, 19 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 8f944d54..1ec235f9 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
.SUFFIXES: .html .sgml
-VERSION = 1.3.17
-VDATE = 03 March 2009
+VERSION = 1.3.18
+VDATE = 04 March 2009
BINDIR = $(PREFIX)/bin
INCLUDEDIR = $(PREFIX)/include
diff --git a/mdocterm.c b/mdocterm.c
index 1fb242a7..37f0bd39 100644
--- a/mdocterm.c
+++ b/mdocterm.c
@@ -351,9 +351,11 @@ flushln(struct termp *p)
*/
if ((TERMP_NOBREAK & p->flags) && vis >= maxvis) {
- putchar('\n');
- for (i = 0; i < p->rmargin; i++)
- putchar(' ');
+ if ( ! (TERMP_NONOBREAK & p->flags)) {
+ putchar('\n');
+ for (i = 0; i < p->rmargin; i++)
+ putchar(' ');
+ }
p->col = 0;
return;
}
@@ -363,10 +365,11 @@ flushln(struct termp *p)
* pad to the right margin and stay off.
*/
- if (p->flags & TERMP_NOBREAK)
- for ( ; vis < maxvis; vis++)
- putchar(' ');
- else
+ if (p->flags & TERMP_NOBREAK) {
+ if ( ! (TERMP_NONOBREAK & p->flags))
+ for ( ; vis < maxvis; vis++)
+ putchar(' ');
+ } else
putchar('\n');
p->col = 0;
diff --git a/term.c b/term.c
index 33a86cdb..6a5c8c19 100644
--- a/term.c
+++ b/term.c
@@ -536,6 +536,10 @@ termp_it_pre(DECL_ARGS)
p->flags |= TERMP_NOBREAK;
else
p->flags |= TERMP_NOLPAD;
+ if (MDOC_HEAD == node->type && MDOC_Tag == type)
+ if (NULL == node->next ||
+ NULL == node->next->child)
+ p->flags |= TERMP_NONOBREAK;
break;
case (MDOC_Diag):
if (MDOC_HEAD == node->type)
@@ -1662,6 +1666,7 @@ static int
termp__t_pre(DECL_ARGS)
{
+ /* FIXME: titles are underlined. */
word(p, "\"");
p->flags |= TERMP_NOSPACE;
return(1);
@@ -1674,6 +1679,7 @@ termp__t_post(DECL_ARGS)
{
p->flags |= TERMP_NOSPACE;
+ /* FIXME: titles are underlined. */
word(p, "\"");
word(p, node->next ? "," : ".");
}
diff --git a/term.h b/term.h
index ce05f63e..64291b76 100644
--- a/term.h
+++ b/term.h
@@ -95,6 +95,7 @@ struct termp {
#define TERMP_LITERAL (1 << 5) /* Literal words. */
#define TERMP_IGNDELIM (1 << 6) /* Delims like regulars. */
#define TERMP_NONOSPACE (1 << 7) /* No space (no autounset). */
+#define TERMP_NONOBREAK (1 << 8)
char *buf;
struct termsym *symtab; /* Special-symbol table. */
struct termsym *styletab; /* Style table. */