aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-05-14 16:02:29 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-05-14 16:02:29 +0000
commit0d0017d2dfe6bf076de2177bd2708cc6e3d753dc (patch)
tree51ed387e28fa8eb05fb98755444107d60196b5be
parentd3e623b20e91ba55cfffcf4118ec1a7e54c0ce6d (diff)
downloadmandoc-0d0017d2dfe6bf076de2177bd2708cc6e3d753dc.tar.gz
mandoc-0d0017d2dfe6bf076de2177bd2708cc6e3d753dc.tar.zst
mandoc-0d0017d2dfe6bf076de2177bd2708cc6e3d753dc.zip
"Warn on unknown argument for .At and print it like [new] groff." (patch by Joerg Sonnenberger, ed. Kristaps)
Keep short-log of commits in index.sgml. Document compatibility with new/old groff in mdoc.7.
-rw-r--r--index.sgml9
-rw-r--r--mdoc.78
-rw-r--r--mdoc_action.c24
-rw-r--r--mdoc_validate.c4
4 files changed, 34 insertions, 11 deletions
diff --git a/index.sgml b/index.sgml
index 4dfcc6fa..065a7887 100644
--- a/index.sgml
+++ b/index.sgml
@@ -241,7 +241,12 @@
<TBODY>
<TR>
<TD VALIGN="top"><SPAN CLASS="date">xx-05-2010</SPAN></TD>
-
+ Day 1 of Rostock hackathon: proper handling of quotations in tab-separated
+ column lists, finished patching of SYNOPSIS breaking (1.9.25), fixed pre-comment
+ white-space stripping, added end-of-sentence spacing to black partial-implicit
+ macros, relaxed column warnings, relaxed acceptence of bad standards arguments,
+ significant documentation of lists in <A HREF="mdoc.7.html">mdoc(7)</A>.
+ Version: <SPAN CLASS="rev">1.9.26</SPAN>.
<TD VALIGN="top">
</TR>
<TR>
@@ -354,7 +359,7 @@
<TR>
<TD>
<DIV CLASS="foot">
- Copyright &#169; 2008&#8211;2010 Kristaps Dzonsons, $Date: 2010/05/14 12:31:11 $
+ Copyright &#169; 2008&#8211;2010 Kristaps Dzonsons, $Date: 2010/05/14 16:02:29 $
</DIV>
</TD>
</TR>
diff --git a/mdoc.7 b/mdoc.7
index dc61af38..20ed132d 100644
--- a/mdoc.7
+++ b/mdoc.7
@@ -1,4 +1,4 @@
-.\" $Id: mdoc.7,v 1.104 2010/05/14 15:17:23 kristaps Exp $
+.\" $Id: mdoc.7,v 1.105 2010/05/14 16:02:29 kristaps Exp $
.\"
.\" Copyright (c) 2009 Kristaps Dzonsons <kristaps@bsd.lv>
.\"
@@ -1960,6 +1960,12 @@ and
.Sx \&Ex
macros were stipulated only to occur in certain manual sections.
mandoc does not have these restrictions.
+.It
+Newer groff and mandoc print
+.Qq AT&T UNIX
+prior to unknown arguments of
+.Sx \&At ;
+older groff did nothing.
.El
.Sh SEE ALSO
.Xr mandoc 1 ,
diff --git a/mdoc_action.c b/mdoc_action.c
index 49a87052..af689d65 100644
--- a/mdoc_action.c
+++ b/mdoc_action.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_action.c,v 1.56 2010/05/14 15:26:39 kristaps Exp $ */
+/* $Id: mdoc_action.c,v 1.57 2010/05/14 16:02:29 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -382,15 +382,27 @@ post_st(POST_ARGS)
static int
post_at(POST_ARGS)
{
- struct mdoc_node *nn;
- const char *p;
+ struct mdoc_node *nn;
+ const char *p, *q;
+ char *buf;
+ size_t sz;
if (n->child) {
assert(MDOC_TEXT == n->child->type);
p = mdoc_a2att(n->child->string);
- assert(p);
- free(n->child->string);
- n->child->string = mandoc_strdup(p);
+ if (p) {
+ free(n->child->string);
+ n->child->string = mandoc_strdup(p);
+ } else {
+ p = "AT&T UNIX ";
+ q = n->child->string;
+ sz = strlen(p) + strlen(q) + 1;
+ buf = mandoc_malloc(sz);
+ strlcpy(buf, p, sz);
+ strlcat(buf, q, sz);
+ free(n->child->string);
+ n->child->string = buf;
+ }
return(1);
}
diff --git a/mdoc_validate.c b/mdoc_validate.c
index 46470b79..1e3a4ec3 100644
--- a/mdoc_validate.c
+++ b/mdoc_validate.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_validate.c,v 1.74 2010/05/14 15:26:39 kristaps Exp $ */
+/* $Id: mdoc_validate.c,v 1.75 2010/05/14 16:02:29 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -921,7 +921,7 @@ post_at(POST_ARGS)
return(mdoc_nerr(mdoc, mdoc->last, EATT));
if (mdoc_a2att(mdoc->last->child->string))
return(1);
- return(mdoc_nerr(mdoc, mdoc->last, EATT));
+ return(mdoc_nwarn(mdoc, mdoc->last, EATT));
}