Permalink
Browse files

6356 Update mdocml to 1.13.3

Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Approved by: Gordon Ross <gwr@nexenta.com>
  • Loading branch information...
yuripv authored and gwr committed Oct 18, 2015
1 parent 1058dba commit 260e9a87725c090ba5835b1f9f0b62fa2f96036f
Showing with 15,727 additions and 11,369 deletions.
  1. +4 −2 exception_lists/cstyle
  2. +3 −0 exception_lists/hdrchk
  3. +7 −16 usr/src/cmd/man/man.c
  4. +1 −2 usr/src/cmd/man/man.h
  5. +5 −21 usr/src/cmd/mandoc/Makefile
  6. +48 −13 usr/src/cmd/mandoc/Makefile.common
  7. +37 −4 usr/src/cmd/mandoc/THIRDPARTYLICENSE
  8. +1 −1 usr/src/cmd/mandoc/THIRDPARTYLICENSE.descrip
  9. +0 −112 usr/src/cmd/mandoc/arch.in
  10. +18 −8 usr/src/cmd/mandoc/att.c
  11. +0 −40 usr/src/cmd/mandoc/att.in
  12. +33 −25 usr/src/cmd/mandoc/chars.c
  13. +150 −144 usr/src/cmd/mandoc/chars.in
  14. +94 −0 usr/src/cmd/mandoc/compat_fgetln.c
  15. +49 −0 usr/src/cmd/mandoc/compat_reallocarray.c
  16. +76 −0 usr/src/cmd/mandoc/compat_strtonum.c
  17. +32 −34 usr/src/cmd/mandoc/config.h
  18. +819 −643 usr/src/cmd/mandoc/eqn.c
  19. +150 −39 usr/src/cmd/mandoc/eqn_html.c
  20. +71 −20 usr/src/cmd/mandoc/eqn_term.c
  21. +187 −186 usr/src/cmd/mandoc/html.c
  22. +41 −27 usr/src/cmd/mandoc/html.h
  23. +3 −6 usr/src/cmd/mandoc/lib.c
  24. +15 −24 usr/src/cmd/mandoc/libman.h
  25. +41 −34 usr/src/cmd/mandoc/libmandoc.h
  26. +20 −37 usr/src/cmd/mandoc/libmdoc.h
  27. +25 −27 usr/src/cmd/mandoc/libroff.h
  28. +728 −125 usr/src/cmd/mandoc/main.c
  29. +13 −16 usr/src/cmd/mandoc/main.h
  30. +249 −261 usr/src/cmd/mandoc/man.c
  31. +6 −7 usr/src/cmd/mandoc/man.h
  32. +3 −8 usr/src/cmd/mandoc/man_hash.c
  33. +76 −117 usr/src/cmd/mandoc/man_html.c
  34. +183 −187 usr/src/cmd/mandoc/man_macro.c
  35. +258 −316 usr/src/cmd/mandoc/man_term.c
  36. +198 −276 usr/src/cmd/mandoc/man_validate.c
  37. +112 −165 usr/src/cmd/mandoc/mandoc.c
  38. +186 −174 usr/src/cmd/mandoc/mandoc.h
  39. +119 −0 usr/src/cmd/mandoc/mandoc_aux.c
  40. +12 −22 usr/src/cmd/mandoc/{vol.c → mandoc_aux.h}
  41. +237 −0 usr/src/cmd/mandoc/manpath.c
  42. +16 −21 usr/src/cmd/mandoc/{arch.c → manpath.h}
  43. +111 −0 usr/src/cmd/mandoc/mansearch.h
  44. +211 −328 usr/src/cmd/mandoc/mdoc.c
  45. +20 −20 usr/src/cmd/mandoc/mdoc.h
  46. +141 −145 usr/src/cmd/mandoc/mdoc_argv.c
  47. +3 −5 usr/src/cmd/mandoc/mdoc_hash.c
  48. +433 −462 usr/src/cmd/mandoc/mdoc_html.c
  49. +738 −1,120 usr/src/cmd/mandoc/mdoc_macro.c
  50. +381 −155 usr/src/cmd/mandoc/mdoc_man.c
  51. +564 −584 usr/src/cmd/mandoc/mdoc_term.c
  52. +1,275 −1,421 usr/src/cmd/mandoc/mdoc_validate.c
  53. +3 −4 usr/src/cmd/mandoc/msec.c
  54. +145 −92 usr/src/cmd/mandoc/out.c
  55. +10 −10 usr/src/cmd/mandoc/out.h
  56. +88 −435 usr/src/cmd/mandoc/preconv.c
  57. +473 −311 usr/src/cmd/mandoc/read.c
  58. +1,662 −660 usr/src/cmd/mandoc/roff.c
  59. +3 −6 usr/src/cmd/mandoc/st.c
  60. +46 −51 usr/src/cmd/mandoc/st.in
  61. +69 −61 usr/src/cmd/mandoc/tbl.c
  62. +69 −103 usr/src/cmd/mandoc/tbl_data.c
  63. +20 −21 usr/src/cmd/mandoc/tbl_html.c
  64. +220 −252 usr/src/cmd/mandoc/tbl_layout.c
  65. +106 −202 usr/src/cmd/mandoc/tbl_opts.c
  66. +178 −176 usr/src/cmd/mandoc/tbl_term.c
  67. +267 −217 usr/src/cmd/mandoc/term.c
  68. +28 −25 usr/src/cmd/mandoc/term.h
  69. +190 −70 usr/src/cmd/mandoc/term_ascii.c
  70. +338 −168 usr/src/cmd/mandoc/term_ps.c
  71. +115 −91 usr/src/cmd/mandoc/tree.c
  72. +0 −35 usr/src/cmd/mandoc/vol.in
  73. +1,245 −189 usr/src/man/man1/mandoc.1
  74. +271 −68 usr/src/man/man5/eqn.5
  75. +58 −55 usr/src/man/man5/mandoc_char.5
  76. +1,312 −157 usr/src/man/man5/mandoc_roff.5
  77. +483 −387 usr/src/man/man5/mdoc.5
  78. +112 −94 usr/src/man/man5/tbl.5
  79. +2 −4 usr/src/pkg/manifests/system-man.mf
  80. +11 −25 usr/src/tools/mandoc/Makefile
View
@@ -61,9 +61,10 @@ usr/src/cmd/krb5/ldap_util/kdb5_ldap_util.h
usr/src/cmd/krb5/slave/kprop.c
usr/src/cmd/krb5/slave/kprop.h
usr/src/cmd/krb5/slave/kpropd.c
-usr/src/cmd/mandoc/arch.c
usr/src/cmd/mandoc/att.c
usr/src/cmd/mandoc/chars.c
+usr/src/cmd/mandoc/compat_fgetln.c
+usr/src/cmd/mandoc/compat_reallocarray.c
usr/src/cmd/mandoc/config.h
usr/src/cmd/mandoc/eqn.c
usr/src/cmd/mandoc/eqn_html.c
@@ -86,6 +87,8 @@ usr/src/cmd/mandoc/man_term.c
usr/src/cmd/mandoc/man_validate.c
usr/src/cmd/mandoc/mandoc.c
usr/src/cmd/mandoc/mandoc.h
+usr/src/cmd/mandoc/mandoc_aux.c
+usr/src/cmd/mandoc/manpath.c
usr/src/cmd/mandoc/mdoc.c
usr/src/cmd/mandoc/mdoc.h
usr/src/cmd/mandoc/mdoc_argv.c
@@ -113,7 +116,6 @@ usr/src/cmd/mandoc/term.h
usr/src/cmd/mandoc/term_ascii.c
usr/src/cmd/mandoc/term_ps.c
usr/src/cmd/mandoc/tree.c
-usr/src/cmd/mandoc/vol.c
usr/src/common/bzip2/bzlib.h
usr/src/common/bzip2/crctable.c
usr/src/common/bzip2/randtable.c
View
@@ -26,6 +26,9 @@ usr/src/cmd/mandoc/libroff.h
usr/src/cmd/mandoc/main.h
usr/src/cmd/mandoc/man.h
usr/src/cmd/mandoc/mandoc.h
+usr/src/cmd/mandoc/mandoc_aux.h
+usr/src/cmd/mandoc/manpath.h
+usr/src/cmd/mandoc/mansearch.h
usr/src/cmd/mandoc/mdoc.h
usr/src/cmd/mandoc/out.h
usr/src/cmd/mandoc/term.h
View
@@ -22,8 +22,8 @@
/*
* Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright 2012, Josef 'Jeff' Sipek <jeffpc@31bits.net>. All rights reserved.
- * Copyright 2013 Nexenta Systems, Inc. All rights reserved.
* Copyright 2014 Garrett D'Amore <garrett@damore.org>
+ * Copyright 2015 Nexenta Systems, Inc. All rights reserved.
*/
/* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T. */
@@ -1193,7 +1193,6 @@ format(char *path, char *dir, char *name, char *pg)
char manpname[MAXPATHLEN], catpname[MAXPATHLEN];
char cmdbuf[BUFSIZ], tmpbuf[BUFSIZ];
char *cattool;
- int utf8 = 0;
struct stat sbman, sbcat;
found++;
@@ -1227,22 +1226,16 @@ format(char *path, char *dir, char *name, char *pg)
else
cattool = "cat";
- /* Preprocess UTF-8 input with preconv (could be smarter) */
- if (strstr(path, "UTF-8") != NULL)
- utf8 = 1;
-
if (psoutput) {
(void) snprintf(cmdbuf, BUFSIZ,
- "cd %s; %s %s%s | mandoc -Tps | lp -Tpostscript",
- path, cattool, manpname,
- utf8 ? " | " PRECONV " -e UTF-8" : "");
+ "cd %s; %s %s | mandoc -Tps | lp -Tpostscript",
+ path, cattool, manpname);
DPRINTF("-- Using manpage: %s\n", manpname);
goto cmd;
} else if (lintout) {
(void) snprintf(cmdbuf, BUFSIZ,
- "cd %s; %s %s%s | mandoc -Tlint",
- path, cattool, manpname,
- utf8 ? " | " PRECONV " -e UTF-8" : "");
+ "cd %s; %s %s | mandoc -Tlint",
+ path, cattool, manpname);
DPRINTF("-- Linting manpage: %s\n", manpname);
goto cmd;
}
@@ -1262,10 +1255,8 @@ format(char *path, char *dir, char *name, char *pg)
DPRINTF("-- Using manpage: %s\n", manpname);
if (manwidth > 0)
(void) snprintf(tmpbuf, BUFSIZ, "-Owidth=%d ", manwidth);
- (void) snprintf(cmdbuf, BUFSIZ, "cd %s; %s %s%s | mandoc -T%s %s| %s",
- path, cattool, manpname,
- utf8 ? " | " PRECONV " -e UTF-8 " : "",
- utf8 ? "utf8" : "ascii", (manwidth > 0) ? tmpbuf : "", pager);
+ (void) snprintf(cmdbuf, BUFSIZ, "cd %s; %s %s | mandoc %s| %s",
+ path, cattool, manpname, (manwidth > 0) ? tmpbuf : "", pager);
cmd:
DPRINTF("-- Command: %s\n", cmdbuf);
View
@@ -10,8 +10,8 @@
*/
/*
- * Copyright 2012 Nexenta Systems, Inc. All rights reserved.
* Copyright 2014 Garrett D'Amore <garrett@damore.org>
+ * Copyright 2015 Nexenta Systems, Inc. All rights reserved.
*/
/*
@@ -26,7 +26,6 @@
#define INDENT 24
#define PAGER "less -ins"
#define WHATIS "whatis"
-#define PRECONV "/usr/lib/mandoc_preconv"
#define LINE_ALLOC 4096
#define MAXDIRS 128
@@ -10,40 +10,24 @@
#
#
-# Copyright 2014 Nexenta Systems, Inc. All rights reserved.
# Copyright 2014 Garrett D'Amore <garrett@damore.org>
+# Copyright 2015 Nexenta Systems, Inc. All rights reserved.
#
-PROGS= mandoc mandoc_preconv
-
-# We place preconv in /usr/lib. This is done to avoid conflicting with
-# GNU groff, which puts it into /usr/bin. We also rename it so that it
-# will only be seen by mandoc -- it isn't intended for general end-user use.
-
-ROOTPROGS = $(ROOTBIN)/mandoc $(ROOTLIB)/mandoc_preconv
-
-OBJS= $(preconv_OBJS) $(mandoc_OBJS)
-
-CLOBBERFILES += $(PROGS)
-
include $(SRC)/cmd/Makefile.cmd
include $(SRC)/cmd/mandoc/Makefile.common
.KEEP_STATE:
-all: $(PROGS)
-
-mandoc_preconv: $(preconv_OBJS)
- $(LINK.c) $(preconv_OBJS) -o $@ $(LDLIBS)
- $(POST_PROCESS)
+all: $(PROG)
-mandoc: $(mandoc_OBJS)
- $(LINK.c) $(mandoc_OBJS) -o $@ $(LDLIBS)
+$(PROG): $(OBJS)
+ $(LINK.c) $(OBJS) -o $@ $(LDLIBS)
$(POST_PROCESS)
clean:
$(RM) $(OBJS)
-install: all $(ROOTPROGS)
+install: all $(ROOTPROG)
include $(SRC)/cmd/Makefile.targ
@@ -10,23 +10,58 @@
#
#
-# Copyright 2012 Nexenta Systems, Inc. All rights reserved.
# Copyright 2014 Garrett D'Amore <garrett@damore.org>
+# Copyright 2015 Nexenta Systems, Inc. All rights reserved.
#
-PROGS= mandoc mandoc_preconv
-mandoc_OBJS = arch.o att.o chars.o eqn.o eqn_html.o eqn_term.o \
- html.o lib.o main.o man.o man_hash.o man_html.o \
- man_macro.o man_term.o man_validate.o mandoc.o mdoc.o \
- mdoc_argv.o mdoc_hash.o mdoc_html.o mdoc_macro.o \
- mdoc_man.o mdoc_term.o mdoc_validate.o msec.o out.o \
- read.o roff.o st.o tbl.o tbl_data.o tbl_html.o \
- tbl_layout.o tbl_opts.o tbl_term.o term.o term_ascii.o \
- term_ps.o tree.o vol.o
+PROG= mandoc
-preconv_OBJS = preconv.o
+OBJS= att.o \
+ chars.o \
+ eqn.o \
+ eqn_html.o \
+ eqn_term.o \
+ html.o \
+ lib.o \
+ main.o \
+ man.o \
+ manpath.o \
+ man_hash.o \
+ man_html.o \
+ man_macro.o \
+ man_term.o \
+ man_validate.o \
+ mandoc.o \
+ mandoc_aux.o \
+ mdoc.o \
+ mdoc_argv.o \
+ mdoc_hash.o \
+ mdoc_html.o \
+ mdoc_macro.o \
+ mdoc_man.o \
+ mdoc_term.o \
+ mdoc_validate.o \
+ msec.o \
+ out.o \
+ read.o \
+ roff.o \
+ preconv.o \
+ st.o \
+ tbl.o \
+ tbl_data.o \
+ tbl_html.o \
+ tbl_layout.o \
+ tbl_opts.o \
+ tbl_term.o \
+ term.o \
+ term_ascii.o \
+ term_ps.o \
+ tree.o
+
+OBJS += compat_fgetln.o \
+ compat_reallocarray.o \
+ compat_strtonum.o
CFLAGS += $(CC_VERBOSE)
-CPPFLAGS += -DHAVE_CONFIG_H -DUSE_WCHAR \
- -DOSNAME="\"illumos\""
+CPPFLAGS += -DOSNAME="\"illumos\""
@@ -1,14 +1,47 @@
-Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
-Copyright (c) 2011 Ingo Schwarze <schwarze@openbsd.org>
+$Id: LICENSE,v 1.7 2015/02/16 14:56:22 schwarze Exp $
+
+With the exceptions noted below, all code and documentation
+contained in the mdocml toolkit is protected by the Copyright
+of the following developers:
+
+Copyright (c) 2008-2012, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
+Copyright (c) 2010-2015 Ingo Schwarze <schwarze@openbsd.org>
+Copyright (c) 2009, 2010, 2011, 2012 Joerg Sonnenberger <joerg@netbsd.org>
+Copyright (c) 2013 Franco Fichtner <franco@lastsummer.de>
+Copyright (c) 1999, 2004 Marc Espie <espie@openbsd.org>
+Copyright (c) 1998, 2004, 2010 Todd C. Miller <Todd.Miller@courtesan.com>
+Copyright (c) 2008 Otto Moerbeek <otto@drijf.net>
+Copyright (c) 2004 Ted Unangst <tedu@openbsd.org>
+Copyright (c) 2003, 2007, 2008, 2014 Jason McIntyre <jmc@openbsd.org>
+
+See the individual source files for information about who contributed
+to which file during which years.
+
+
+The mdocml distribution as a whole is distributed by its developers
+under the following license:
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+
+The following files included from outside sources are protected by
+other people's Copyright and are distributed under a 3-clause BSD
+license; see these individual files for details.
+
+compat_fts.c, compat_fts.h,
+compat_getsubopt.c, compat_strcasestr.c, compat_strsep.c,
+man.1:
+Copyright (c) 1989,1990,1993,1994 The Regents of the University of California
+
+compat_fgetln.c:
+Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -1 +1 @@
-MANDOC - FORMAT AND DISPLAY UNIX MANUALS
+MDOCML - The mandoc UNIX manpage compiler toolset
Oops, something went wrong.

0 comments on commit 260e9a8

Please sign in to comment.