Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/mdocml/dist Import mdocml-1.10.1:



details:   https://anonhg.NetBSD.org/src/rev/1c21d7a9cad1
branches:  trunk
changeset: 755689:1c21d7a9cad1
user:      joerg <joerg%NetBSD.org@localhost>
date:      Wed Jun 16 18:09:40 2010 +0000

description:
Import mdocml-1.10.1:
- Support multiline .Bl -column content
- cleanup SYNOPSIS macro handling
- Allow specifying the terminal width for -Tascii
- Initial PostScript output

diffstat:

 external/bsd/mdocml/dist/Makefile        |   34 +-
 external/bsd/mdocml/dist/chars.c         |    4 +-
 external/bsd/mdocml/dist/chars.in        |    3 +-
 external/bsd/mdocml/dist/html.c          |    4 +-
 external/bsd/mdocml/dist/libmdoc.h       |    6 +-
 external/bsd/mdocml/dist/main.c          |   44 ++-
 external/bsd/mdocml/dist/main.h          |    8 +-
 external/bsd/mdocml/dist/man_term.c      |   24 +-
 external/bsd/mdocml/dist/mandoc.1        |   27 +-
 external/bsd/mdocml/dist/mandoc.c        |    4 +-
 external/bsd/mdocml/dist/mandoc.h        |   11 +-
 external/bsd/mdocml/dist/mdoc.3          |   14 +-
 external/bsd/mdocml/dist/mdoc.7          |  422 ++++++++++++++++++++++++++----
 external/bsd/mdocml/dist/mdoc.c          |   97 ++++++-
 external/bsd/mdocml/dist/mdoc.h          |    3 +-
 external/bsd/mdocml/dist/mdoc_argv.c     |   49 +-
 external/bsd/mdocml/dist/mdoc_html.c     |  199 +++++++-------
 external/bsd/mdocml/dist/mdoc_macro.c    |  159 +++++++++--
 external/bsd/mdocml/dist/mdoc_term.c     |  269 +++++++++++--------
 external/bsd/mdocml/dist/mdoc_validate.c |  337 +++++++++++++-----------
 external/bsd/mdocml/dist/roff.7          |    8 +-
 external/bsd/mdocml/dist/roff.c          |    6 +-
 external/bsd/mdocml/dist/term.c          |  280 ++++++++++++++++++-
 external/bsd/mdocml/dist/term.h          |   24 +-
 24 files changed, 1436 insertions(+), 600 deletions(-)

diffs (truncated from 3788 to 300 lines):

diff -r a495ce6c9130 -r 1c21d7a9cad1 external/bsd/mdocml/dist/Makefile
--- a/external/bsd/mdocml/dist/Makefile Wed Jun 16 17:29:07 2010 +0000
+++ b/external/bsd/mdocml/dist/Makefile Wed Jun 16 18:09:40 2010 +0000
@@ -1,4 +1,4 @@
-.SUFFIXES:     .html .xml .sgml .1 .3 .7 .md5 .tar.gz .1.txt .3.txt .7.txt .1.sgml .3.sgml .7.sgml .h .h.html
+.SUFFIXES:     .html .xml .sgml .1 .3 .7 .md5 .tar.gz .1.txt .3.txt .7.txt .1.sgml .3.sgml .7.sgml .h .h.html .1.ps .3.ps .7.ps
 
 PREFIX         = /usr/local
 BINDIR         = $(PREFIX)/bin
@@ -12,8 +12,8 @@
 INSTALL_LIB    = $(INSTALL) -m 0644
 INSTALL_MAN    = $(INSTALL_DATA)
 
-VERSION           = 1.10.0
-VDATE     = 29 May 2010
+VERSION           = 1.10.1
+VDATE     = 07 June 2010
 
 VFLAGS    = -DVERSION="\"$(VERSION)\""
 WFLAGS     = -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings
@@ -33,6 +33,8 @@
 
 MANDOCHTML = -Thtml -Ostyle=style.css,man=%N.%S.html,includes=%I.html
 
+MANDOCPS   = -Tps
+
 ROFFLNS    = roff.ln
 
 ROFFSRCS   = roff.c
@@ -96,7 +98,7 @@
             libmandoc.h html.h chars.h out.h main.h roff.h \
             mandoc.h
 
-GSGMLS    = mandoc.1.sgml mdoc.3.sgml mdoc.7.sgml manuals.7.sgml \
+GSGMLS    = mandoc.1.sgml mdoc.3.sgml mdoc.7.sgml \
             mandoc_char.7.sgml man.7.sgml man.3.sgml roff.7.sgml \
             roff.3.sgml
 
@@ -105,12 +107,15 @@
 HTMLS     = ChangeLog.html index.html man.h.html mdoc.h.html \
             mandoc.h.html roff.h.html mandoc.1.html mdoc.3.html \
             man.3.html mdoc.7.html man.7.html mandoc_char.7.html \
-            manuals.7.html roff.7.html roff.3.html
+            roff.7.html roff.3.html
+
+PSS       = mandoc.1.ps mdoc.3.ps man.3.ps mdoc.7.ps man.7.ps \
+            mandoc_char.7.ps roff.7.ps roff.3.ps
 
 XSLS      = ChangeLog.xsl
 
 TEXTS     = mandoc.1.txt mdoc.3.txt man.3.txt mdoc.7.txt man.7.txt \
-            mandoc_char.7.txt manuals.7.txt ChangeLog.txt \
+            mandoc_char.7.txt ChangeLog.txt \
             roff.7.txt roff.3.txt
 
 EXAMPLES   = example.style.css
@@ -123,7 +128,7 @@
 
 TARGZS    = mdocml-$(VERSION).tar.gz
 
-MANS      = mandoc.1 mdoc.3 mdoc.7 manuals.7 mandoc_char.7 man.7 \
+MANS      = mandoc.1 mdoc.3 mdoc.7 mandoc_char.7 man.7 \
             man.3 roff.7 roff.3
 
 BINS      = mandoc
@@ -134,7 +139,7 @@
 
 DOCLEAN           = $(BINS) $(LNS) $(LLNS) $(LIBS) $(OBJS) $(HTMLS) \
             $(TARGZS) tags $(MD5S) $(XMLS) $(TEXTS) $(GSGMLS) \
-            config.h config.log
+            config.h config.log $(PSS)
 
 DOINSTALL  = $(SRCS) $(HEADS) Makefile $(MANS) $(SGMLS) $(STATICS) \
             $(DATAS) $(XSLS) $(EXAMPLES) $(TESTS) $(CONFIGS)
@@ -146,15 +151,11 @@
 clean:
        rm -f $(DOCLEAN)
 
-cleanlint:
-       rm -f $(LNS) $(LLNS)
-
-cleanhtml:
-       rm -f $(HTMLS) $(GSGMLS)
-
 dist:  mdocml-$(VERSION).tar.gz
 
-www:   all $(GSGMLS) $(HTMLS) $(TEXTS) $(MD5S) $(TARGZS)
+www:   all $(GSGMLS) $(HTMLS) $(TEXTS) $(MD5S) $(TARGZS) $(PSS)
+
+ps:    $(PSS)
 
 installwww: www
        $(INSTALL_DATA) $(HTMLS) $(TEXTS) $(STATICS) $(DESTDIR)$(PREFIX)/
@@ -301,6 +302,9 @@
 .1.1.sgml .3.3.sgml .7.7.sgml:
        ./mandoc $(MANDOCFLAGS) $(MANDOCHTML) $< > $@
 
+.1.1.ps .3.3.ps .7.7.ps:
+       ./mandoc $(MANDOCFLAGS) $(MANDOCPS) $< > $@
+
 .tar.gz.md5:
        md5 $< > $@
 
diff -r a495ce6c9130 -r 1c21d7a9cad1 external/bsd/mdocml/dist/chars.c
--- a/external/bsd/mdocml/dist/chars.c  Wed Jun 16 17:29:07 2010 +0000
+++ b/external/bsd/mdocml/dist/chars.c  Wed Jun 16 18:09:40 2010 +0000
@@ -1,4 +1,4 @@
-/*     $Vendor-Id: chars.c,v 1.18 2010/05/25 12:37:20 kristaps Exp $ */
+/*     $Vendor-Id: chars.c,v 1.19 2010/06/01 11:47:28 kristaps Exp $ */
 /*
  * Copyright (c) 2009 Kristaps Dzonsons <kristaps%kth.se@localhost>
  *
@@ -43,7 +43,7 @@
 #define CHARS_BOTH      (CHARS_CHAR | CHARS_STRING)
 };
 
-#define        LINES_MAX         369
+#define        LINES_MAX         370
 
 #define CHAR(w, x, y, z, a, b) \
        { NULL, (w), (y), (a), (x), (z), (b), CHARS_CHAR },
diff -r a495ce6c9130 -r 1c21d7a9cad1 external/bsd/mdocml/dist/chars.in
--- a/external/bsd/mdocml/dist/chars.in Wed Jun 16 17:29:07 2010 +0000
+++ b/external/bsd/mdocml/dist/chars.in Wed Jun 16 18:09:40 2010 +0000
@@ -1,4 +1,4 @@
-/*     $Vendor-Id: chars.in,v 1.23 2010/05/16 01:35:37 schwarze Exp $ */
+/*     $Vendor-Id: chars.in,v 1.24 2010/06/01 11:47:28 kristaps Exp $ */
 /*
  * Copyright (c) 2009 Kristaps Dzonsons <kristaps%kth.se@localhost>
  *
@@ -44,6 +44,7 @@
 CHAR("&",                      1,      "",             0,      "",             0)
 CHAR("^",                      1,      "",             0,      "",             0)
 CHAR("|",                      1,      "",             0,      "",             0)
+CHAR("}",                      1,      "",             0,      "",             0)
 
 /* Accents. */
 CHAR("a\"",                    2,      "\"",           1,      "&#779;",       6)
diff -r a495ce6c9130 -r 1c21d7a9cad1 external/bsd/mdocml/dist/html.c
--- a/external/bsd/mdocml/dist/html.c   Wed Jun 16 17:29:07 2010 +0000
+++ b/external/bsd/mdocml/dist/html.c   Wed Jun 16 18:09:40 2010 +0000
@@ -1,4 +1,4 @@
-/*     $Vendor-Id: html.c,v 1.100 2010/05/25 12:37:20 kristaps Exp $ */
+/*     $Vendor-Id: html.c,v 1.101 2010/06/07 10:52:44 kristaps Exp $ */
 /*
  * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps%kth.se@localhost>
  *
@@ -35,8 +35,6 @@
 #include "html.h"
 #include "main.h"
 
-#define        UNCONST(a)      ((void *)(uintptr_t)(const void *)(a))
-
 struct htmldata {
        const char       *name;
        int               flags;
diff -r a495ce6c9130 -r 1c21d7a9cad1 external/bsd/mdocml/dist/libmdoc.h
--- a/external/bsd/mdocml/dist/libmdoc.h        Wed Jun 16 17:29:07 2010 +0000
+++ b/external/bsd/mdocml/dist/libmdoc.h        Wed Jun 16 18:09:40 2010 +0000
@@ -1,4 +1,4 @@
-/*     $Vendor-Id: libmdoc.h,v 1.50 2010/05/24 12:05:04 schwarze Exp $ */
+/*     $Vendor-Id: libmdoc.h,v 1.52 2010/06/03 13:44:36 kristaps Exp $ */
 /*
  * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps%kth.se@localhost>
  *
@@ -34,6 +34,7 @@
 #define        MDOC_NEWLINE     (1 << 3) /* first macro/text in a line */
 #define        MDOC_PHRASELIT   (1 << 4) /* literal within a partila phrase */
 #define        MDOC_PPHRASE     (1 << 5) /* within a partial phrase */
+#define        MDOC_FREECOL     (1 << 6) /* `It' invocation should close */
        int               pflags;
        enum mdoc_next    next;
        struct mdoc_node *last;
@@ -117,8 +118,7 @@
 const char      *mdoc_a2arch(const char *);
 const char      *mdoc_a2vol(const char *);
 const char      *mdoc_a2msec(const char *);
-int              mdoc_valid_pre(struct mdoc *, 
-                       const struct mdoc_node *);
+int              mdoc_valid_pre(struct mdoc *, struct mdoc_node *);
 int              mdoc_valid_post(struct mdoc *);
 int              mdoc_action_pre(struct mdoc *, 
                        struct mdoc_node *);
diff -r a495ce6c9130 -r 1c21d7a9cad1 external/bsd/mdocml/dist/main.c
--- a/external/bsd/mdocml/dist/main.c   Wed Jun 16 17:29:07 2010 +0000
+++ b/external/bsd/mdocml/dist/main.c   Wed Jun 16 18:09:40 2010 +0000
@@ -1,4 +1,4 @@
-/*     $Vendor-Id: main.c,v 1.79 2010/05/17 22:11:42 kristaps Exp $ */
+/*     $Vendor-Id: main.c,v 1.85 2010/06/07 20:57:09 kristaps Exp $ */
 /*
  * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps%kth.se@localhost>
  *
@@ -65,7 +65,8 @@
        OUTT_TREE,
        OUTT_HTML,
        OUTT_XHTML,
-       OUTT_LINT
+       OUTT_LINT,
+       OUTT_PS
 };
 
 struct curparse {
@@ -97,12 +98,11 @@
 static const char * const      mandocerrs[MANDOCERR_MAX] = {
        "ok",
        "text should be uppercase",
-       "sections out of conentional order",
+       "sections out of conventional order",
        "section name repeats",
        "out of order prologue",
        "repeated prologue entry",
        "list type must come first",
-       "column syntax is inconsistent",
        "bad standard",
        "bad library",
        "bad escape sequence",
@@ -111,7 +111,7 @@
        "superfluous width argument",
        "bad date argument",
        "bad width argument",
-       "unknown manual sction",
+       "unknown manual section",
        "section not in conventional manual section",
        "end of line whitespace",
        "scope open on exit",
@@ -142,11 +142,12 @@
        "macro requires body argument(s)",
        "macro requires argument(s)",
        "no title in document",
+       "missing list type",
        "line argument(s) will be lost",
        "body argument(s) will be lost",
+       "column syntax is inconsistent",
        "missing font type",
        "missing display type",
-       "missing list type",
        "displays may not be nested",
        "no scope to rewind: syntax violated",
        "scope broken, syntax violated",
@@ -395,7 +396,7 @@
                *with_mmap = 1;
                fb->sz = (size_t)st.st_size;
                fb->buf = mmap(NULL, fb->sz, PROT_READ, 
-                               MAP_FILE, curp->fd, 0);
+                               MAP_FILE|MAP_SHARED, curp->fd, 0);
                if (fb->buf != MAP_FAILED)
                        return(1);
        }
@@ -584,12 +585,24 @@
                switch (curp->outtype) {
                case (OUTT_XHTML):
                        curp->outdata = xhtml_alloc(curp->outopts);
-                       curp->outman = html_man;
-                       curp->outmdoc = html_mdoc;
-                       curp->outfree = html_free;
                        break;
                case (OUTT_HTML):
                        curp->outdata = html_alloc(curp->outopts);
+                       break;
+               case (OUTT_ASCII):
+                       curp->outdata = ascii_alloc(curp->outopts);
+                       break;
+               case (OUTT_PS):
+                       curp->outdata = ps_alloc();
+                       break;
+               default:
+                       break;
+               }
+
+               switch (curp->outtype) {
+               case (OUTT_HTML):
+                       /* FALLTHROUGH */
+               case (OUTT_XHTML):
                        curp->outman = html_man;
                        curp->outmdoc = html_mdoc;
                        curp->outfree = html_free;
@@ -598,14 +611,15 @@
                        curp->outman = tree_man;
                        curp->outmdoc = tree_mdoc;
                        break;
-               case (OUTT_LINT):
-                       break;
-               default:
-                       curp->outdata = ascii_alloc(80);
+               case (OUTT_ASCII):
+                       /* FALLTHROUGH */
+               case (OUTT_PS):
                        curp->outman = terminal_man;
                        curp->outmdoc = terminal_mdoc;
                        curp->outfree = terminal_free;
                        break;
+               default:
+                       break;
                }
        }
 
@@ -729,6 +743,8 @@
                curp->outtype = OUTT_HTML;
        else if (0 == strcmp(arg, "xhtml"))
                curp->outtype = OUTT_XHTML;



Home | Main Index | Thread Index | Old Index