summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rw-r--r--mdoc.383
-rw-r--r--mdoc.c14
-rw-r--r--term.c2
4 files changed, 56 insertions, 47 deletions
diff --git a/Makefile b/Makefile
index b9ef2732..ef4dd5c5 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
.SUFFIXES: .html .sgml
-VERSION = 1.4.10
-VDATE = 12 March 2009
+VERSION = 1.4.11
+VDATE = 13 March 2009
BINDIR = $(PREFIX)/bin
INCLUDEDIR = $(PREFIX)/include
diff --git a/mdoc.3 b/mdoc.3
index ae24eb70..12a4ce6b 100644
--- a/mdoc.3
+++ b/mdoc.3
@@ -360,6 +360,39 @@ parsed(mdoc, node);
mdoc_free(mdoc);
.Ed
.\" SECTION
+.Sh COMPATIBILITY
+In general, only those macros specified by
+.Xr mdoc.samples 7
+and
+.Xr mdoc 7
+for
+.Ox
+and
+.Nx
+are supported; support for other
+.Bx
+systems is in progress.
+.Bl -bullet
+.\" LIST-ITEM
+.It
+NetBSD
+.Sq \&It \-nested
+is assumed for all lists: any list may be nested and
+.Sq \-enum
+lists will restart the sequence only for the sub-list.
+.\" LIST-ITEM
+.It
+Newer NetBSD-style
+.Sq \&It \-column
+syntax, where column widths may be preceeded by other arguments (instead
+of proceeded), is not supported.
+.\" LIST-ITEM
+.It
+The
+.Sq \&At
+macro only accepts a single parameter.
+.El
+.\" SECTION
.Sh SEE ALSO
.Xr mdoc 7 ,
.Xr mdoc.samples 7 ,
@@ -372,17 +405,11 @@ The
utility was written by
.An Kristaps Dzonsons Aq kristaps@kth.se .
.\" SECTION
-.Sh BUGS
-Bugs, un-implemented macros and incompabilities are documented in this
-section. The baseline for determining whether macro parsing is
-.Qq incompatible
-is the default
-.Xr groff 1
-system bundled with
-.Ox .
-.\" PARAGRAPH
-.Pp
-Un-implemented: the
+.Sh CAVEATS
+.Bl -bullet
+.\" LIST-ITEM
+.It
+The
.Sq \&Xc
and
.Sq \&Xo
@@ -390,36 +417,4 @@ macros aren't handled when used to span lines for the
.Sq \&It
macro. Such usage is specifically discouraged in
.Xr mdoc.samples 7 .
-.\" PARAGRAPH
-.Pp
-Bugs: when
-.Sq \&It \-column
-is invoked, whitespace is not stripped around
-.Sq \&Ta
-or tab-character separators.
-.\" PARAGRAPH
-.Pp
-Bugs: elements within columns for
-.Sq \&It \-column
-are not yet supported.
-.\" PARAGRAPH
-.Pp
-Incompatible: the
-.Sq \&At
-macro only accepts a single parameter. Furthermore, several macros
-.Pf ( Sq \&Pp ,
-.Sq \&It ,
-and possibly others) accept multiple arguments with a warning.
-.\" PARAGRAPH
-.Pp
-Incompatible: only those macros specified by
-.Xr mdoc.samples 7
-and
-.Xr mdoc 7
-for
-.Ox
-are supported; support for
-.Nx
-and other
-.Bx
-systems is in progress.
+.El
diff --git a/mdoc.c b/mdoc.c
index caee2dd6..72e63a1c 100644
--- a/mdoc.c
+++ b/mdoc.c
@@ -520,7 +520,19 @@ parsemacro(struct mdoc *m, int ln, char *buf)
int i, c;
char mac[5];
- /* Comments are quickly ignored. */
+ /* Comments and empties are quickly ignored. */
+
+ if (0 == buf[1])
+ return(1);
+
+ if (isspace((unsigned char)buf[1])) {
+ i = 2;
+ while (buf[i] && isspace((unsigned char)buf[i]))
+ i++;
+ if (0 == buf[i])
+ return(1);
+ return(mdoc_perr(m, ln, 1, "invalid syntax"));
+ }
if (buf[1] && '\\' == buf[1])
if (buf[2] && '\"' == buf[2])
diff --git a/term.c b/term.c
index dc27281b..e40dbb8a 100644
--- a/term.c
+++ b/term.c
@@ -508,6 +508,8 @@ termp_it_pre(DECL_ARGS)
(&bl->args->argv[vals[2]], i);
assert(i < (int)bl->args->argv[vals[2]].sz);
width = arg_width(&bl->args->argv[vals[2]], i);
+ if (vals[1] >= 0)
+ offset += arg_offset(&bl->args->argv[vals[1]]);
break;
default:
if (vals[0] >= 0)