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 of mdocml-1.9.22:



details:   https://anonhg.NetBSD.org/src/rev/f507b5f0484b
branches:  trunk
changeset: 753640:f507b5f0484b
user:      joerg <joerg%NetBSD.org@localhost>
date:      Mon Apr 05 14:19:28 2010 +0000

description:
Import of mdocml-1.9.22:
- Better support for obsolete .Xo/.Xc macros if compiled with -DUGLY
- Support for more roff instructions in the man(7) code
- Correct handling of opening punctuation in macros for mdoc(7)
- Discard more of the pod2man junk

diffstat:

 external/bsd/mdocml/dist/Makefile        |  104 ++----
 external/bsd/mdocml/dist/arch.in         |    3 +-
 external/bsd/mdocml/dist/chars.c         |    4 +-
 external/bsd/mdocml/dist/chars.in        |   31 +-
 external/bsd/mdocml/dist/libman.h        |   42 +-
 external/bsd/mdocml/dist/libmdoc.h       |   22 +-
 external/bsd/mdocml/dist/main.c          |   70 ++--
 external/bsd/mdocml/dist/man.3           |  144 +++++++--
 external/bsd/mdocml/dist/man.7           |  224 ++++++++------
 external/bsd/mdocml/dist/man.c           |  198 ++++++++++---
 external/bsd/mdocml/dist/man.h           |   81 +++--
 external/bsd/mdocml/dist/man_action.c    |   50 ++-
 external/bsd/mdocml/dist/man_hash.c      |   58 ++-
 external/bsd/mdocml/dist/man_html.c      |   55 +++-
 external/bsd/mdocml/dist/man_macro.c     |  288 ++++++++++++++++---
 external/bsd/mdocml/dist/man_term.c      |  124 +++++---
 external/bsd/mdocml/dist/man_validate.c  |   62 +++-
 external/bsd/mdocml/dist/mandoc.1        |   45 ++-
 external/bsd/mdocml/dist/mandoc_char.7   |   17 +-
 external/bsd/mdocml/dist/mdoc.7          |   12 +-
 external/bsd/mdocml/dist/mdoc.c          |   25 +-
 external/bsd/mdocml/dist/mdoc.h          |  253 +++++++++--------
 external/bsd/mdocml/dist/mdoc_argv.c     |   18 +-
 external/bsd/mdocml/dist/mdoc_hash.c     |    6 +-
 external/bsd/mdocml/dist/mdoc_html.c     |    4 +-
 external/bsd/mdocml/dist/mdoc_macro.c    |  444 +++++++++++++++++++-----------
 external/bsd/mdocml/dist/mdoc_strings.c  |   16 +-
 external/bsd/mdocml/dist/mdoc_term.c     |    7 +-
 external/bsd/mdocml/dist/mdoc_validate.c |   10 +-
 external/bsd/mdocml/dist/term.c          |   30 +-
 external/bsd/mdocml/dist/term.h          |    3 +-
 31 files changed, 1590 insertions(+), 860 deletions(-)

diffs (truncated from 4389 to 300 lines):

diff -r 4f5f92ed034a -r f507b5f0484b external/bsd/mdocml/dist/Makefile
--- a/external/bsd/mdocml/dist/Makefile Mon Apr 05 14:01:26 2010 +0000
+++ b/external/bsd/mdocml/dist/Makefile Mon Apr 05 14:19:28 2010 +0000
@@ -10,13 +10,21 @@
 INSTALL_LIB    = install -m 0644
 INSTALL_MAN    = $(INSTALL_DATA)
 
-VERSION           = 1.9.15
-VDATE     = 18 February 2010
+VERSION           = 1.9.22
+VDATE     = 31 March 2010
+
+VFLAGS    = -DVERSION="\"$(VERSION)\""
+WFLAGS     = -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings
+CFLAGS    += -g $(WFLAGS) $(VFLAGS) -DHAVE_CONFIG_H
 
-VFLAGS     = -DVERSION="\"$(VERSION)\"" -DHAVE_CONFIG_H
-WFLAGS     = -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings
-CFLAGS    += -g $(VFLAGS) $(WFLAGS)
-#CFLAGS          += -DOSNAME="\"OpenBSD 4.5\""
+# Specify this if you want to hard-code the operating system to appear
+# in the lower-left hand corner of -mdoc manuals.
+# CFLAGS += -DOSNAME="\"OpenBSD 4.5\""
+
+# Specify this if you want to accept Xo/Xc macros extending the head of
+# block full-implicit macros.
+# CFLAGS += -DUGLY
+
 LINTFLAGS += $(VFLAGS)
 
 MANDOCFLAGS = -Wall -fstrict
@@ -129,89 +137,61 @@
 
 $(LNS): config.h
 
-man_macro.ln: man_macro.c libman.h
-man_macro.o: man_macro.c libman.h
+man_macro.ln man_macro.o: man_macro.c libman.h
 
-lib.ln: lib.c lib.in libmdoc.h
-lib.o: lib.c lib.in libmdoc.h
+lib.ln lib.o: lib.c lib.in libmdoc.h
 
-att.ln: att.c att.in libmdoc.h
-att.o: att.c att.in libmdoc.h
+att.ln att.o: att.c att.in libmdoc.h
 
-arch.ln: arch.c arch.in libmdoc.h
-arch.o: arch.c arch.in libmdoc.h
+arch.ln arch.o: arch.c arch.in libmdoc.h
 
-vol.ln: vol.c vol.in libmdoc.h
-vol.o: vol.c vol.in libmdoc.h
+vol.ln vol.o: vol.c vol.in libmdoc.h
 
-chars.ln: chars.c chars.in chars.h
-chars.o: chars.c chars.in chars.h
+chars.ln chars.o: chars.c chars.in chars.h
 
-msec.ln: msec.c msec.in libmdoc.h
-msec.o: msec.c msec.in libmdoc.h
+msec.ln msec.o: msec.c msec.in libmdoc.h
 
-st.ln: st.c st.in libmdoc.h
-st.o: st.c st.in libmdoc.h
+st.ln st.o: st.c st.in libmdoc.h
 
-mdoc_macro.ln: mdoc_macro.c libmdoc.h
-mdoc_macro.o: mdoc_macro.c libmdoc.h
+mdoc_macro.ln mdoc_macro.o: mdoc_macro.c libmdoc.h
 
-mdoc_term.ln: mdoc_term.c term.h mdoc.h
-mdoc_term.o: mdoc_term.c term.h mdoc.h
+mdoc_term.ln mdoc_term.o: mdoc_term.c term.h mdoc.h
 
-mdoc_strings.ln: mdoc_strings.c libmdoc.h
-mdoc_strings.o: mdoc_strings.c libmdoc.h
+mdoc_strings.ln mdoc_strings.o: mdoc_strings.c libmdoc.h
 
-man_hash.ln: man_hash.c libman.h
-man_hash.o: man_hash.c libman.h
+man_hash.ln man_hash.o: man_hash.c libman.h
 
-mdoc_hash.ln: mdoc_hash.c libmdoc.h
-mdoc_hash.o: mdoc_hash.c libmdoc.h
+mdoc_hash.ln mdoc_hash.o: mdoc_hash.c libmdoc.h
 
-mdoc.ln: mdoc.c libmdoc.h
-mdoc.o: mdoc.c libmdoc.h
+mdoc.ln mdoc.o: mdoc.c libmdoc.h
 
-man.ln: man.c libman.h
-man.o: man.c libman.h
+man.ln man.o: man.c libman.h
 
-main.ln: main.c mdoc.h
-main.o: main.c mdoc.h
+main.ln main.o: main.c mdoc.h
 
-compat.ln: compat.c 
-compat.o: compat.c
+compat.ln compat.o: compat.c 
 
-term.ln: term.c term.h man.h mdoc.h chars.h
-term.o: term.c term.h man.h mdoc.h chars.h
+term.ln term.o: term.c term.h man.h mdoc.h chars.h
 
-html.ln: html.c html.h chars.h
-html.o: html.c html.h chars.h
+html.ln html.o: html.c html.h chars.h
 
-mdoc_html.ln: mdoc_html.c html.h mdoc.h
-mdoc_html.o: mdoc_html.c html.h mdoc.h
+mdoc_html.ln mdoc_html.o: mdoc_html.c html.h mdoc.h
 
-man_html.ln: man_html.c html.h man.h out.h
-man_html.o: man_html.c html.h man.h out.h
+man_html.ln man_html.o: man_html.c html.h man.h out.h
 
-out.ln: out.c out.h
-out.o: out.c out.h
+out.ln out.o: out.c out.h
 
-tree.ln: tree.c man.h mdoc.h
-tree.o: tree.c man.h mdoc.h
+tree.ln tree.o: tree.c man.h mdoc.h
 
-mdoc_argv.ln: mdoc_argv.c libmdoc.h
-mdoc_argv.o: mdoc_argv.c libmdoc.h
+mdoc_argv.ln mdoc_argv.o: mdoc_argv.c libmdoc.h
 
-man_argv.ln: man_argv.c libman.h
-man_argv.o: man_argv.c libman.h
+man_argv.ln man_argv.o: man_argv.c libman.h
 
-man_validate.ln: man_validate.c libman.h
-man_validate.o: man_validate.c libman.h
+man_validate.ln man_validate.o: man_validate.c libman.h
 
-mdoc_validate.ln: mdoc_validate.c libmdoc.h
-mdoc_validate.o: mdoc_validate.c libmdoc.h
+mdoc_validate.ln mdoc_validate.o: mdoc_validate.c libmdoc.h
 
-mdoc_action.ln: mdoc_action.c libmdoc.h
-mdoc_action.o: mdoc_action.c libmdoc.h
+mdoc_action.ln mdoc_action.o: mdoc_action.c libmdoc.h
 
 libmdoc.h: mdoc.h
 
diff -r 4f5f92ed034a -r f507b5f0484b external/bsd/mdocml/dist/arch.in
--- a/external/bsd/mdocml/dist/arch.in  Mon Apr 05 14:01:26 2010 +0000
+++ b/external/bsd/mdocml/dist/arch.in  Mon Apr 05 14:19:28 2010 +0000
@@ -1,4 +1,4 @@
-/*     $Vendor-Id: arch.in,v 1.5 2009/06/10 20:18:43 kristaps Exp $ */
+/*     $Vendor-Id: arch.in,v 1.7 2010/03/26 07:07:58 kristaps Exp $ */
 /*
  * Copyright (c) 2009 Kristaps Dzonsons <kristaps%kth.se@localhost>
  *
@@ -36,6 +36,7 @@
 LINE("hppa64",         "HPPA64")
 LINE("i386",           "i386")
 LINE("landisk",                "LANDISK")
+LINE("loongson",       "Loongson")
 LINE("luna88k",                "Luna88k")
 LINE("mac68k",         "Mac68k")
 LINE("macppc",         "MacPPC")
diff -r 4f5f92ed034a -r f507b5f0484b external/bsd/mdocml/dist/chars.c
--- a/external/bsd/mdocml/dist/chars.c  Mon Apr 05 14:01:26 2010 +0000
+++ b/external/bsd/mdocml/dist/chars.c  Mon Apr 05 14:19:28 2010 +0000
@@ -1,4 +1,4 @@
-/*     $Vendor-Id: chars.c,v 1.16 2010/01/28 06:04:59 kristaps Exp $ */
+/*     $Vendor-Id: chars.c,v 1.17 2010/03/23 13:25:01 kristaps Exp $ */
 /*
  * Copyright (c) 2009 Kristaps Dzonsons <kristaps%kth.se@localhost>
  *
@@ -42,7 +42,7 @@
 #define CHARS_BOTH      (CHARS_CHAR | CHARS_STRING)
 };
 
-#define        LINES_MAX         350
+#define        LINES_MAX         369
 
 #define CHAR(w, x, y, z, a, b) \
        { NULL, (w), (y), (a), (x), (z), (b), CHARS_CHAR },
diff -r 4f5f92ed034a -r f507b5f0484b external/bsd/mdocml/dist/chars.in
--- a/external/bsd/mdocml/dist/chars.in Mon Apr 05 14:01:26 2010 +0000
+++ b/external/bsd/mdocml/dist/chars.in Mon Apr 05 14:19:28 2010 +0000
@@ -1,4 +1,4 @@
-/*     $Vendor-Id: chars.in,v 1.20 2010/01/05 19:51:10 kristaps Exp $ */
+/*     $Vendor-Id: chars.in,v 1.22 2010/03/30 19:20:33 kristaps Exp $ */
 /*
  * Copyright (c) 2009 Kristaps Dzonsons <kristaps%kth.se@localhost>
  *
@@ -50,10 +50,10 @@
 CHAR("a-",                     2,      "-",            1,      "&#175;",       6)
 CHAR("a.",                     2,      ".",            1,      "&#729;",       6)
 CHAR("a^",                     2,      "^",            1,      "&#770;",       6)
-CHAR("\'",                     1,      "\'",           1,      "&#769;",       6)
+BOTH("\'",                     1,      "\'",           1,      "&#769;",       6)
 BOTH("aa",                     2,      "\'",           1,      "&#769;",       6)
 BOTH("ga",                     2,      "`",            1,      "&#768;",       6)
-CHAR("`",                      1,      "`",            1,      "&#768;",       6)
+BOTH("`",                      1,      "`",            1,      "&#768;",       6)
 CHAR("ab",                     2,      "`",            1,      "&#774;",       6)
 CHAR("ac",                     2,      ",",            1,      "&#807;",       6)
 CHAR("ad",                     2,      "\"",           1,      "&#776;",       6)
@@ -321,8 +321,8 @@
 CHAR("fl",                     2,      "fl",           2,      "&#64258;",     8)
 CHAR("Fi",                     2,      "ffi",          3,      "&#64259;",     8)
 CHAR("Fl",                     2,      "ffl",          3,      "&#64260;",     8)
-CHAR("AE",                     2,      "AE",           2,      "&#198;",       6)
-CHAR("ae",                     2,      "ae",           2,      "&#230;",       6)
+BOTH("AE",                     2,      "AE",           2,      "&#198;",       6)
+BOTH("ae",                     2,      "ae",           2,      "&#230;",       6)
 CHAR("OE",                     2,      "OE",           2,      "&#338;",       6)
 CHAR("oe",                     2,      "oe",           2,      "&#339;",       6)
 CHAR("ss",                     2,      "ss",           2,      "&#223;",       6)
@@ -347,6 +347,27 @@
 CHAR("Cs",                     2,      "x",            1,      "&#164;",       6)
 CHAR("Fn",                     2,      "f",            1,      "&#402;",       6)
 
+/* pod2man holdovers. */
+STRING("--",                   2,      "--",           2,      "&#8212;",      7)
+STRING("PI",                   2,      "pi",           2,      "&#960;",       6)
+STRING("L\"",                  2,      "``",           2,      "&#8220;",      7)
+STRING("R\"",                  2,      "\'\'",         2,      "&#8221;",      7)
+STRING("C+",                   2,      "C++",          3,      "C++",          3)
+STRING("C`",                   2,      "`",            1,      "&#8216;",      7)
+STRING("C\'",                  2,      "\'",           1,      "&#8217;",      7)
+STRING("Aq",                   2,      "\'",           1,      "\'",           1)
+STRING("^",                    1,      "^",            1,      "^",            1)
+STRING(",",                    1,      ",",            1,      ",",            1)
+STRING("~",                    1,      "~",            1,      "~",            1)
+STRING("/",                    1,      "/",            1,      "/",            1)
+STRING(":",                    1,      "\"",           1,      "&#776;",       6)
+STRING("8",                    1,      "B",            1,      "&#946;",       6)
+STRING("o",                    1,      "o",            1,      "&#176;",       6)
+STRING("D-",                   2,      "D",            1,      "&#208;",       6)
+STRING("d-",                   2,      "o",            1,      "&#240;",       6)
+STRING("Th",                   2,      "b",            1,      "&#222;",       6)
+STRING("th",                   2,      "b",            1,      "&#254;",       6)
+
 /* Old style. */
 STRING("Am",                   2,      "&",            1,      "&amp;",        5)
 STRING("Ba",                   2,      "|",            1,      "|",            1)
diff -r 4f5f92ed034a -r f507b5f0484b external/bsd/mdocml/dist/libman.h
--- a/external/bsd/mdocml/dist/libman.h Mon Apr 05 14:01:26 2010 +0000
+++ b/external/bsd/mdocml/dist/libman.h Mon Apr 05 14:19:28 2010 +0000
@@ -1,4 +1,4 @@
-/*     $Vendor-Id: libman.h,v 1.23 2009/10/30 05:58:36 kristaps Exp $ */
+/*     $Vendor-Id: libman.h,v 1.30 2010/03/29 10:10:35 kristaps Exp $ */
 /*
  * Copyright (c) 2009 Kristaps Dzonsons <kristaps%kth.se@localhost>
  *
@@ -27,13 +27,17 @@
 struct man {
        void            *data;
        struct man_cb    cb;
-       int              pflags;
-       int              flags;
-#define        MAN_HALT        (1 << 0)
-#define        MAN_ELINE       (1 << 1)        /* Next-line element scope. */
-#define        MAN_BLINE       (1 << 2)        /* Next-line block scope. */
-#define        MAN_LITERAL     (1 << 3)        /* Literal input. */
+       int              pflags; /* parse flags (see man.h) */
+       int              svflags; /* flags saved during roff blocks */
+       int              flags; /* parse flags */
+#define        MAN_HALT        (1 << 0) /* badness happened: die */
+#define        MAN_ELINE       (1 << 1) /* Next-line element scope. */
+#define        MAN_BLINE       (1 << 2) /* Next-line block scope. */
+#define        MAN_ILINE       (1 << 3) /* Ignored in next-line scope. */
+#define        MAN_LITERAL     (1 << 4) /* Literal input. */
+#define        MAN_BPLINE      (1 << 5)
        enum man_next    next;
+       enum man_next    svnext;
        struct man_node *last;
        struct man_node *first;
        struct man_meta  meta;
@@ -44,6 +48,7 @@
        WMSEC,
        WDATE,
        WLNSCOPE,
+       WLNSCOPE2,
        WTSPACE,
        WTQUOTE,
        WNODATA,
@@ -58,10 +63,13 @@
        WNOSCOPE,
        WOLITERAL,
        WNLITERAL,
+       WROFFNEST,
+       WROFFSCOPE,
+       WTITLECASE,
        WERRMAX
 };
 
-#define        MACRO_PROT_ARGS   struct man *m, int tok, int line, \
+#define        MACRO_PROT_ARGS   struct man *m, enum mant tok, int line, \
                          int ppos, int *pos, char *buf
 



Home | Main Index | Thread Index | Old Index