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.12.0:



details:   https://anonhg.NetBSD.org/src/rev/5cbf9ce97ddc
branches:  trunk
changeset: 770298:5cbf9ce97ddc
user:      joerg <joerg%NetBSD.org@localhost>
date:      Tue Oct 11 19:09:36 2011 +0000

description:
Import mdocml 1.12.0:
- Support to output HTML fragments
- Initial support for mdoc->man translation
- Initial eqn support
- preconv / apropos / demandoc (not hooked up)
- Various bugfixes

diffstat:

 external/bsd/mdocml/dist/Makefile           |   261 +++-
 external/bsd/mdocml/dist/apropos.1          |   170 ++
 external/bsd/mdocml/dist/apropos.c          |   668 ++++++++++
 external/bsd/mdocml/dist/att.in             |    31 +-
 external/bsd/mdocml/dist/chars.c            |   184 +--
 external/bsd/mdocml/dist/chars.in           |    68 +-
 external/bsd/mdocml/dist/compat_getsubopt.c |   100 +
 external/bsd/mdocml/dist/compat_strlcat.c   |    63 +
 external/bsd/mdocml/dist/compat_strlcpy.c   |    59 +
 external/bsd/mdocml/dist/config.h.post      |     4 +
 external/bsd/mdocml/dist/demandoc.1         |   113 +
 external/bsd/mdocml/dist/demandoc.c         |   257 ++++
 external/bsd/mdocml/dist/eqn.7              |   250 +++-
 external/bsd/mdocml/dist/eqn.c              |   908 ++++++++++++++-
 external/bsd/mdocml/dist/eqn_html.c         |    81 +
 external/bsd/mdocml/dist/eqn_term.c         |    76 +
 external/bsd/mdocml/dist/example.style.css  |    40 +-
 external/bsd/mdocml/dist/html.c             |   354 ++---
 external/bsd/mdocml/dist/html.h             |    29 +-
 external/bsd/mdocml/dist/libman.h           |     6 +-
 external/bsd/mdocml/dist/libmandoc.h        |    51 +-
 external/bsd/mdocml/dist/libmdoc.h          |    34 +-
 external/bsd/mdocml/dist/libroff.h          |    28 +-
 external/bsd/mdocml/dist/main.c             |    36 +-
 external/bsd/mdocml/dist/main.h             |     9 +-
 external/bsd/mdocml/dist/man.7              |   616 ++++-----
 external/bsd/mdocml/dist/man.c              |    27 +-
 external/bsd/mdocml/dist/man.h              |     3 +-
 external/bsd/mdocml/dist/man_hash.c         |    12 +-
 external/bsd/mdocml/dist/man_html.c         |   211 +--
 external/bsd/mdocml/dist/man_macro.c        |    21 +-
 external/bsd/mdocml/dist/man_validate.c     |   109 +-
 external/bsd/mdocml/dist/mandoc.1           |   110 +-
 external/bsd/mdocml/dist/mandoc.3           |   279 ++++-
 external/bsd/mdocml/dist/mandoc.c           |   560 +++++---
 external/bsd/mdocml/dist/mandoc.h           |   138 ++-
 external/bsd/mdocml/dist/mandoc_char.7      |    75 +-
 external/bsd/mdocml/dist/mandocdb.8         |   201 +++
 external/bsd/mdocml/dist/mandocdb.c         |  1303 +++++++++++++++++++++
 external/bsd/mdocml/dist/mdoc.7             |  1669 +++++++++++++++-----------
 external/bsd/mdocml/dist/mdoc.c             |    85 +-
 external/bsd/mdocml/dist/mdoc_hash.c        |    16 +-
 external/bsd/mdocml/dist/mdoc_html.c        |   159 +-
 external/bsd/mdocml/dist/mdoc_macro.c       |    36 +-
 external/bsd/mdocml/dist/mdoc_man.c         |   602 +++++++++
 external/bsd/mdocml/dist/out.c              |   334 +-----
 external/bsd/mdocml/dist/out.h              |    33 +-
 external/bsd/mdocml/dist/preconv.1          |   162 ++
 external/bsd/mdocml/dist/preconv.c          |   528 ++++++++
 external/bsd/mdocml/dist/predefs.in         |    65 +
 external/bsd/mdocml/dist/roff.7             |   376 +++++-
 external/bsd/mdocml/dist/st.in              |    51 +-
 external/bsd/mdocml/dist/tbl.7              |    26 +-
 external/bsd/mdocml/dist/tbl_html.c         |     4 +-
 external/bsd/mdocml/dist/tbl_term.c         |   199 +-
 external/bsd/mdocml/dist/term.c             |   387 +++--
 external/bsd/mdocml/dist/term.h             |    56 +-
 external/bsd/mdocml/dist/term_ascii.c       |   136 +-
 external/bsd/mdocml/dist/term_ps.c          |   387 +++--
 external/bsd/mdocml/dist/test-getsubopt.c   |    12 +
 external/bsd/mdocml/dist/test-mmap.c        |    10 +
 external/bsd/mdocml/dist/test-strptime.c    |    13 +
 external/bsd/mdocml/dist/tree.c             |    91 +-
 63 files changed, 9761 insertions(+), 3221 deletions(-)

diffs (truncated from 17600 to 300 lines):

diff -r 563f42a5ee01 -r 5cbf9ce97ddc external/bsd/mdocml/dist/Makefile
--- a/external/bsd/mdocml/dist/Makefile Tue Oct 11 17:53:27 2011 +0000
+++ b/external/bsd/mdocml/dist/Makefile Tue Oct 11 19:09:36 2011 +0000
@@ -1,18 +1,28 @@
 .PHONY:         clean install installwww
 .SUFFIXES:      .sgml .html .md5 .h .h.html
-.SUFFIXES:      .1       .3       .7
-.SUFFIXES:      .1.txt   .3.txt   .7.txt
-.SUFFIXES:      .1.pdf   .3.pdf   .7.pdf
-.SUFFIXES:      .1.ps    .3.ps    .7.ps
-.SUFFIXES:      .1.html  .3.html  .7.html 
-.SUFFIXES:      .1.xhtml .3.xhtml .7.xhtml 
+.SUFFIXES:      .1       .3       .7       .8
+.SUFFIXES:      .1.txt   .3.txt   .7.txt   .8.txt
+.SUFFIXES:      .1.pdf   .3.pdf   .7.pdf   .8.pdf
+.SUFFIXES:      .1.ps    .3.ps    .7.ps    .8.ps
+.SUFFIXES:      .1.html  .3.html  .7.html  .8.html
+.SUFFIXES:      .1.xhtml .3.xhtml .7.xhtml .8.xhtml
 
 # 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\""
 
-VERSION                 = 1.11.1
-VDATE           = 04 April 2011
+VERSION                 = 1.12.0
+VDATE           = 8 October 2011
+
+# IFF your system supports multi-byte functions (setlocale(), wcwidth(),
+# putwchar()) AND has __STDC_ISO_10646__ (that is, wchar_t is simply a
+# UCS-4 value) should you define USE_WCHAR.  If you define it and your
+# system DOESN'T support this, -Tlocale will produce garbage.
+# If you don't define it, -Tlocale is a synonym for -Tacsii.
+#
+CFLAGS         += -DUSE_WCHAR
+
 CFLAGS         += -g -DHAVE_CONFIG_H -DVERSION="\"$(VERSION)\""
 CFLAGS         += -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings
 PREFIX          = /usr/local
@@ -25,22 +35,39 @@
 INSTALL_PROGRAM         = $(INSTALL) -m 0755
 INSTALL_DATA    = $(INSTALL) -m 0444
 INSTALL_LIB     = $(INSTALL) -m 0644
+INSTALL_SOURCE  = $(INSTALL) -m 0644
 INSTALL_MAN     = $(INSTALL_DATA)
 
-all: mandoc
+# Non-BSD systems (Linux, etc.) need -ldb to compile mandocdb and
+# apropos.
+# However, if you don't have -ldb at all (or it's not native), then
+# comment out apropos and mandocdb. 
+#
+#DBLIB          = -ldb
+DBBIN           = apropos mandocdb
+
+all: mandoc preconv demandoc $(DBBIN)
 
 SRCS            = Makefile \
+                  apropos.1 \
+                  apropos.c \
                   arch.c \
                   arch.in \
                   att.c \
                   att.in \
                   chars.c \
                   chars.in \
-                  compat.c \
+                  compat_getsubopt.c \
+                  compat_strlcat.c \
+                  compat_strlcpy.c \
                   config.h.post \
                   config.h.pre \
+                  demandoc.c \
+                  demandoc.1 \
                   eqn.7 \
                   eqn.c \
+                  eqn_html.c \
+                  eqn_term.c \
                   example.style.css \
                   external.png \
                   html.c \
@@ -67,8 +94,8 @@
                   mandoc.3 \
                   mandoc.c \
                   mandoc.h \
-                  mandoc-db.1 \
-                  mandoc-db.c \
+                  mandocdb.8 \
+                  mandocdb.c \
                   mandoc_char.7 \
                   mdoc.h \
                   mdoc.7 \
@@ -77,12 +104,16 @@
                   mdoc_hash.c \
                   mdoc_html.c \
                   mdoc_macro.c \
+                  mdoc_man.c \
                   mdoc_term.c \
                   mdoc_validate.c \
                   msec.c \
                   msec.in \
                   out.c \
                   out.h \
+                  preconv.1 \
+                  preconv.c \
+                  predefs.in \
                   read.c \
                   roff.7 \
                   roff.c \
@@ -100,8 +131,11 @@
                   term.h \
                   term_ascii.c \
                   term_ps.c \
+                  test-getsubopt.c \
+                  test-mmap.c \
                   test-strlcat.c \
                   test-strlcpy.c \
+                  test-strptime.c \
                   tree.c \
                   vol.c \
                   vol.in
@@ -154,18 +188,29 @@
 LIBMANDOC_OBJS  = $(LIBMAN_OBJS) \
                   $(LIBMDOC_OBJS) \
                   $(LIBROFF_OBJS) \
+                  chars.o \
                   mandoc.o \
                   read.o
 LIBMANDOC_LNS   = $(LIBMAN_LNS) \
                   $(LIBMDOC_LNS) \
                   $(LIBROFF_LNS) \
+                  chars.ln \
                   mandoc.ln \
                   read.ln
 
+COMPAT_OBJS     = compat_getsubopt.o \
+                  compat_strlcat.o \
+                  compat_strlcpy.o
+COMPAT_LNS      = compat_getsubopt.ln \
+                  compat_strlcat.ln \
+                  compat_strlcpy.ln
+
 arch.o arch.ln: arch.in
 att.o att.ln: att.in
+chars.o chars.ln: chars.in
 lib.o lib.ln: lib.in
 msec.o msec.ln: msec.in
+roff.o roff.ln: predefs.in
 st.o st.ln: st.in
 vol.o vol.ln: vol.in
 
@@ -174,22 +219,31 @@
 $(LIBROFF_OBJS) $(LIBROFF_LNS): libroff.h
 $(LIBMANDOC_OBJS) $(LIBMANDOC_LNS): mandoc.h mdoc.h man.h libmandoc.h config.h
 
-MANDOC_HTML_OBJS = html.o \
+$(COMPAT_OBJS) $(COMPAT_LNS): config.h
+
+MANDOC_HTML_OBJS = eqn_html.o \
+                  html.o \
                   man_html.o \
                   mdoc_html.o \
                   tbl_html.o
-MANDOC_HTML_LNS         = html.ln \
+MANDOC_HTML_LNS         = eqn_html.ln \
+                  html.ln \
                   man_html.ln \
                   mdoc_html.ln \
                   tbl_html.ln
 
-MANDOC_TERM_OBJS = man_term.o \
+MANDOC_MAN_OBJS  = mdoc_man.o
+MANDOC_MAN_LNS   = mdoc_man.ln
+
+MANDOC_TERM_OBJS = eqn_term.o \
+                  man_term.o \
                   mdoc_term.o \
                   term.o \
                   term_ascii.o \
                   term_ps.o \
                   tbl_term.o
-MANDOC_TERM_LNS         = man_term.ln \
+MANDOC_TERM_LNS         = eqn_term.ln \
+                  man_term.ln \
                   mdoc_term.ln \
                   term.ln \
                   term_ascii.ln \
@@ -197,32 +251,53 @@
                   tbl_term.ln
 
 MANDOC_OBJS     = $(MANDOC_HTML_OBJS) \
+                  $(MANDOC_MAN_OBJS) \
                   $(MANDOC_TERM_OBJS) \
-                  chars.o \
                   main.o \
                   out.o \
                   tree.o
 MANDOC_LNS      = $(MANDOC_HTML_LNS) \
+                  $(MANDOC_MAN_LNS) \
                   $(MANDOC_TERM_LNS) \
-                  chars.ln \
                   main.ln \
                   out.ln \
                   tree.ln
 
-chars.o chars.ln: chars.in
-
 $(MANDOC_HTML_OBJS) $(MANDOC_HTML_LNS): html.h
 $(MANDOC_TERM_OBJS) $(MANDOC_TERM_LNS): term.h
 $(MANDOC_OBJS) $(MANDOC_LNS): main.h mandoc.h mdoc.h man.h config.h out.h
 
-compat.o compat.ln: config.h
-
-MANDOCDB_OBJS   = mandoc-db.o
-MANDOCDB_LNS    = mandoc-db.ln
+MANDOCDB_OBJS   = mandocdb.o
+MANDOCDB_LNS    = mandocdb.ln
 
 $(MANDOCDB_OBJS) $(MANDOCDB_LNS): mandoc.h mdoc.h man.h config.h
 
-INDEX_MANS      = mandoc.1.html \
+PRECONV_OBJS    = preconv.o
+PRECONV_LNS     = preconv.ln
+
+$(PRECONV_OBJS) $(PRECONV_LNS): config.h
+
+APROPOS_OBJS    = apropos.o
+APROPOS_LNS     = apropos.ln
+
+$(APROPOS_OBJS) $(APROPOS_LNS): config.h mandoc.h
+
+DEMANDOC_OBJS   = demandoc.o
+DEMANDOC_LNS    = demandoc.ln
+
+$(DEMANDOC_OBJS) $(DEMANDOC_LNS): config.h
+
+INDEX_MANS      = apropos.1.html \
+                  apropos.1.xhtml \
+                  apropos.1.ps \
+                  apropos.1.pdf \
+                  apropos.1.txt \
+                  demandoc.1.html \
+                  demandoc.1.xhtml \
+                  demandoc.1.ps \
+                  demandoc.1.pdf \
+                  demandoc.1.txt \
+                  mandoc.1.html \
                   mandoc.1.xhtml \
                   mandoc.1.ps \
                   mandoc.1.pdf \
@@ -252,6 +327,11 @@
                   mdoc.7.ps \
                   mdoc.7.pdf \
                   mdoc.7.txt \
+                  preconv.1.html \
+                  preconv.1.xhtml \
+                  preconv.1.ps \
+                  preconv.1.pdf \
+                  preconv.1.txt \
                   roff.7.html \
                   roff.7.xhtml \
                   roff.7.ps \
@@ -261,7 +341,12 @@
                   tbl.7.xhtml \
                   tbl.7.ps \
                   tbl.7.pdf \
-                  tbl.7.txt
+                  tbl.7.txt \
+                  mandocdb.8.html \
+                  mandocdb.8.xhtml \
+                  mandocdb.8.ps \
+                  mandocdb.8.pdf \
+                  mandocdb.8.txt
 
 $(INDEX_MANS): mandoc
 
@@ -274,34 +359,50 @@
 
 www: index.html
 
-lint: llib-llibmandoc.ln llib-lmandoc.ln
+lint: llib-llibmandoc.ln llib-lmandoc.ln llib-lpreconv.ln llib-ldemandoc.ln
 
 clean:
        rm -f libmandoc.a $(LIBMANDOC_OBJS)
        rm -f llib-llibmandoc.ln $(LIBMANDOC_LNS)
-       rm -f mandoc-db $(MANDOCDB_OBJS)
-       rm -f llib-lmandoc-db.ln $(MANDOCDB_LNS)
+       rm -f mandocdb $(MANDOCDB_OBJS)
+       rm -f llib-lmandocdb.ln $(MANDOCDB_LNS)
+       rm -f preconv $(PRECONV_OBJS)
+       rm -f llib-lpreconv.ln $(PRECONV_LNS)
+       rm -f apropos $(APROPOS_OBJS)
+       rm -f llib-lapropos.ln $(APROPOS_LNS)
+       rm -f demandoc $(DEMANDOC_OBJS)
+       rm -f llib-ldemandoc.ln $(DEMANDOC_LNS)
        rm -f mandoc $(MANDOC_OBJS)
        rm -f llib-lmandoc.ln $(MANDOC_LNS)
-       rm -f config.h config.log compat.o compat.ln



Home | Main Index | Thread Index | Old Index