CVS commit: src/external/bsd/mdocml/dist

2020-03-17 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Mar 17 22:03:41 UTC 2020

Modified Files:
src/external/bsd/mdocml/dist: main.c

Log Message:
mdocml: Comment out non-applicable warning.

We don't use makewhatis on NetBSD, we use makemandb.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/mdocml/dist/main.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/main.c
diff -u src/external/bsd/mdocml/dist/main.c:1.7 src/external/bsd/mdocml/dist/main.c:1.8
--- src/external/bsd/mdocml/dist/main.c:1.7	Mon Mar 11 17:59:28 2019
+++ src/external/bsd/mdocml/dist/main.c	Tue Mar 17 22:03:41 2020
@@ -750,8 +750,10 @@ fs_lookup(const struct manpaths *paths, 
 	return globres != -1;
 
 found:
+#if !defined(__NetBSD__)
 	warnx("outdated mandoc.db lacks %s(%s) entry, run %s %s",
 	name, sec, BINM_MAKEWHATIS, paths->paths[ipath]);
+#endif
 	if (res == NULL) {
 		free(file);
 		return 1;



CVS commit: src/external/bsd/mdocml/dist

2019-12-07 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Dec  7 12:45:28 UTC 2019

Modified Files:
src/external/bsd/mdocml/dist: st.c

Log Message:
Really add -isoC-2018 (not just the docs).


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.11 -r1.2 src/external/bsd/mdocml/dist/st.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/st.c
diff -u src/external/bsd/mdocml/dist/st.c:1.1.1.11 src/external/bsd/mdocml/dist/st.c:1.2
--- src/external/bsd/mdocml/dist/st.c:1.1.1.11	Sun Mar 10 22:29:00 2019
+++ src/external/bsd/mdocml/dist/st.c	Sat Dec  7 12:45:28 2019
@@ -53,6 +53,7 @@ LINE("-isoC-tcor1",	"ISO/IEC 9899/TCOR1:
 LINE("-isoC-tcor2",	"ISO/IEC 9899/TCOR2:1995 (\\(lqISO\\~C90, Technical Corrigendum 2\\(rq)")
 LINE("-isoC-99",	"ISO/IEC 9899:1999 (\\(lqISO\\~C99\\(rq)")
 LINE("-isoC-2011",	"ISO/IEC 9899:2011 (\\(lqISO\\~C11\\(rq)")
+LINE("-isoC-2018",	"ISO/IEC 9899:2018 (\\(lqISO\\~C18\\(rq)")
 LINE("-iso9945-1-90",	"ISO/IEC 9945-1:1990 (\\(lqPOSIX.1\\(rq)")
 LINE("-iso9945-1-96",	"ISO/IEC 9945-1:1996 (\\(lqPOSIX.1\\(rq)")
 LINE("-iso9945-2-93",	"ISO/IEC 9945-2:1993 (\\(lqPOSIX.2\\(rq)")



CVS commit: src/external/bsd/mdocml/dist

2019-12-07 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Dec  7 12:45:11 UTC 2019

Modified Files:
src/external/bsd/mdocml/dist: mdoc_argv.c

Log Message:
Reduce diff to upstream.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/external/bsd/mdocml/dist/mdoc_argv.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/mdoc_argv.c
diff -u src/external/bsd/mdocml/dist/mdoc_argv.c:1.11 src/external/bsd/mdocml/dist/mdoc_argv.c:1.12
--- src/external/bsd/mdocml/dist/mdoc_argv.c:1.11	Mon Mar 11 00:15:38 2019
+++ src/external/bsd/mdocml/dist/mdoc_argv.c	Sat Dec  7 12:45:11 2019
@@ -27,9 +27,9 @@
 #include "mandoc_aux.h"
 #include "mandoc.h"
 #include "roff.h"
-#include "roff_int.h"
 #include "mdoc.h"
 #include "libmandoc.h"
+#include "roff_int.h"
 #include "libmdoc.h"
 
 #define	MULTI_STEP	 5 /* pre-allocate argument values */



CVS commit: src/external/bsd/mdocml/dist

2019-12-07 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Dec  7 12:43:19 UTC 2019

Modified Files:
src/external/bsd/mdocml/dist: mdoc.c

Log Message:
Reduce diff to upstream.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/mdocml/dist/mdoc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/mdoc.c
diff -u src/external/bsd/mdocml/dist/mdoc.c:1.2 src/external/bsd/mdocml/dist/mdoc.c:1.3
--- src/external/bsd/mdocml/dist/mdoc.c:1.2	Mon Mar 11 17:59:28 2019
+++ src/external/bsd/mdocml/dist/mdoc.c	Sat Dec  7 12:43:19 2019
@@ -30,9 +30,9 @@
 #include "mandoc_aux.h"
 #include "mandoc.h"
 #include "roff.h"
-#include "roff_int.h"
 #include "mdoc.h"
 #include "libmandoc.h"
+#include "roff_int.h"
 #include "libmdoc.h"
 
 const	char *const __mdoc_argnames[MDOC_ARG_MAX] = {



CVS commit: src/external/bsd/mdocml/dist

2019-03-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Mar 29 22:00:31 UTC 2019

Modified Files:
src/external/bsd/mdocml/dist: out.c

Log Message:
Set the maximum column index in a tbl(7) to the maximum *right* edge
of any cell span, not to the maximum *left* edge, which may be smaller
if the last column of the table is only reached by horizontal spans,
but not by any regular cell in any row of the table.
Otherwise, the algorithm calculating column widths accessed memomy
after the end of the colwidth[] array, while it was trying to handle
the rightmost column(s).

Crash reported by Jason Thorpe 
via https://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=54069
and via Thomas Klausner (wiz@).
Christos@ Zoulas sent a (correct, but slightly confusing) patch.
The patch i'm committing here is easier to understand.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/mdocml/dist/out.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/out.c
diff -u src/external/bsd/mdocml/dist/out.c:1.4 src/external/bsd/mdocml/dist/out.c:1.5
--- src/external/bsd/mdocml/dist/out.c:1.4	Thu Mar 28 16:26:49 2019
+++ src/external/bsd/mdocml/dist/out.c	Fri Mar 29 18:00:31 2019
@@ -149,7 +149,7 @@ tblcalc(struct rofftbl *tbl, const struc
 		gp = &first_group;
 		for (dp = sp->first; dp != NULL; dp = dp->next) {
 			icol = dp->layout->col;
-			while (icol > maxcol)
+			while (maxcol < icol + dp->hspans)
 tbl->cols[++maxcol].spacing = SIZE_MAX;
 			col = tbl->cols + icol;
 			col->flags |= dp->layout->flags;
@@ -235,9 +235,6 @@ tblcalc(struct rofftbl *tbl, const struc
 			} else
 (*gp)->wanted -= width;
 		}
-		if (g->endcol > maxcol) {
-			maxcol = g->endcol;
-		}
 		if (done) {
 			*gp = g->next;
 			free(g);



CVS commit: src/external/bsd/mdocml/dist

2019-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Mar 28 20:26:49 UTC 2019

Modified Files:
src/external/bsd/mdocml/dist: out.c

Log Message:
PR/54069: Jason Thorpe: Prevent memory overrun. Can be easily reproduced
with groff_ms.7 and -fsanitize=address.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/mdocml/dist/out.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/out.c
diff -u src/external/bsd/mdocml/dist/out.c:1.3 src/external/bsd/mdocml/dist/out.c:1.4
--- src/external/bsd/mdocml/dist/out.c:1.3	Sun Mar 10 20:15:38 2019
+++ src/external/bsd/mdocml/dist/out.c	Thu Mar 28 16:26:49 2019
@@ -235,6 +235,9 @@ tblcalc(struct rofftbl *tbl, const struc
 			} else
 (*gp)->wanted -= width;
 		}
+		if (g->endcol > maxcol) {
+			maxcol = g->endcol;
+		}
 		if (done) {
 			*gp = g->next;
 			free(g);



CVS commit: src/external/bsd/mdocml

2019-03-11 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar 11 17:59:28 UTC 2019

Modified Files:
src/external/bsd/mdocml/bin/mandoc: Makefile
src/external/bsd/mdocml/dist: dba.c dbm.c main.c mandocdb.c mdoc.c
read.c

Log Message:
Reduce diffs with upstream and enable the built-in database code.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/external/bsd/mdocml/bin/mandoc/Makefile
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/mdocml/dist/dba.c
cvs rdiff -u -r1.1.1.2 -r1.2 src/external/bsd/mdocml/dist/dbm.c
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/mdocml/dist/main.c
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/mdocml/dist/mandocdb.c
cvs rdiff -u -r1.1.1.20 -r1.2 src/external/bsd/mdocml/dist/mdoc.c
cvs rdiff -u -r1.20 -r1.21 src/external/bsd/mdocml/dist/read.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/bin/mandoc/Makefile
diff -u src/external/bsd/mdocml/bin/mandoc/Makefile:1.17 src/external/bsd/mdocml/bin/mandoc/Makefile:1.18
--- src/external/bsd/mdocml/bin/mandoc/Makefile:1.17	Thu Aug 16 02:24:40 2018
+++ src/external/bsd/mdocml/bin/mandoc/Makefile	Mon Mar 11 13:59:28 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.17 2018/08/16 06:24:40 kre Exp $
+# $NetBSD: Makefile,v 1.18 2019/03/11 17:59:28 christos Exp $
 
 .include 
 
@@ -8,10 +8,18 @@ SRCS=	\
 eqn_html.c \
 eqn_term.c \
 html.c \
+dba.c \
+dba_array.c \
+dba_read.c \
+dba_write.c \
+dbm.c \
+dbm_map.c \
 main.c \
 man_html.c \
 man_term.c \
+mandocdb.c \
 manpath.c \
+mansearch.c \
 mdoc_html.c \
 mdoc_markdown.c \
 mdoc_term.c \

Index: src/external/bsd/mdocml/dist/dba.c
diff -u src/external/bsd/mdocml/dist/dba.c:1.1.1.1 src/external/bsd/mdocml/dist/dba.c:1.2
--- src/external/bsd/mdocml/dist/dba.c:1.1.1.1	Sat Mar 18 11:06:52 2017
+++ src/external/bsd/mdocml/dist/dba.c	Mon Mar 11 13:59:28 2019
@@ -167,7 +167,7 @@ dba_page_new(struct dba_array *pages, co
 	dba_array_add(page, entry);
 	if (arch != NULL && *arch != '\0') {
 		entry = dba_array_new(1, DBA_STR | DBA_GROW);
-		dba_array_add(entry, (void *)arch);
+		dba_array_add(entry, __UNCONST(arch));
 	} else
 		entry = NULL;
 	dba_array_add(page, entry);
@@ -208,7 +208,7 @@ dba_page_add(struct dba_array *page, int
 		if (strcmp(entry, str) == 0)
 			return;
 	}
-	dba_array_add(entries, (void *)str);
+	dba_array_add(entries, __UNCONST(str));
 }
 
 /*

Index: src/external/bsd/mdocml/dist/dbm.c
diff -u src/external/bsd/mdocml/dist/dbm.c:1.1.1.2 src/external/bsd/mdocml/dist/dbm.c:1.2
--- src/external/bsd/mdocml/dist/dbm.c:1.1.1.2	Sun Mar 10 18:28:59 2019
+++ src/external/bsd/mdocml/dist/dbm.c	Mon Mar 11 13:59:28 2019
@@ -114,7 +114,7 @@ dbm_open(const char *fname)
 			goto fail;
 		}
 		nvals[im] = be32toh(*ep);
-		macros[im] = (struct macro *)++ep;
+		macros[im] = (struct macro *)__UNCONST(++ep);
 	}
 	return 0;
 

Index: src/external/bsd/mdocml/dist/main.c
diff -u src/external/bsd/mdocml/dist/main.c:1.6 src/external/bsd/mdocml/dist/main.c:1.7
--- src/external/bsd/mdocml/dist/main.c:1.6	Sun Mar 10 20:15:38 2019
+++ src/external/bsd/mdocml/dist/main.c	Mon Mar 11 13:59:28 2019
@@ -87,9 +87,7 @@ struct	curparse {
 };
 
 
-#ifdef HAVE_SQLITE3
 int			  mandocdb(int, char *[]);
-#endif
 
 static	void		  check_xr(void);
 static	int		  fs_lookup(const struct manpaths *,
@@ -151,11 +149,9 @@ main(int argc, char *argv[])
 #endif
 
 	mandoc_msg_setoutfile(stderr);
-#ifdef HAVE_SQLITE3
 	if (strncmp(progname, "mandocdb", 8) == 0 ||
 	strcmp(progname, BINM_MAKEWHATIS) == 0)
 		return mandocdb(argc, argv);
-#endif
 
 #if HAVE_PLEDGE
 	if (pledge("stdio rpath tmppath tty proc exec", NULL) == -1)
@@ -394,18 +390,9 @@ main(int argc, char *argv[])
 		/* Access the mandoc database. */
 
 		manconf_parse(&conf, conf_file, defpaths, auxpaths);
-#if HAVE_SQLITE3
 		if ( ! mansearch(&search, &conf.manpath,
 		argc, argv, &res, &sz))
 			usage(search.argmode);
-#else
-		if (search.argmode != ARG_NAME) {
-			fputs("mandoc: database support not compiled in\n",
-			stderr);
-			return (int)MANDOCLEVEL_BADARG;
-		}
-		sz = 0;
-#endif
 
 		if (sz == 0 && search.argmode == ARG_NAME)
 			fs_search(&search, &conf.manpath,
@@ -616,9 +603,7 @@ main(int argc, char *argv[])
 out:
 	if (search.argmode != ARG_FILE) {
 		manconf_free(&conf);
-#ifdef HAVE_SQLITE3
 		mansearch_free(res, sz);
-#endif
 	}
 
 	free(curp.os_s);
@@ -932,10 +917,8 @@ check_xr(void)
 		search.outkey = NULL;
 		search.argmode = ARG_NAME;
 		search.firstmatch = 1;
-#ifdef HAVE_SQLITE3
 		if (mansearch(&search, &paths, 1, &xr->name, NULL, &sz))
 			continue;
-#endif
 		if (fs_search(&search, &paths, 1, &xr->name, NULL, &sz))
 			continue;
 		if (xr->count == 1)

Index: src/external/bsd/mdocml/dist/mandocdb.c
diff -u src/external/bsd/mdocml/dist/mandocdb.c:1.5 src/external/bsd/mdocml/dist/mandocdb.c:1.6
--- src/external/bsd/mdocml/dist/mandocdb.c:1.5	Sun Mar 10 20:15:38 2019
+++ src/external

CVS commit: src/external/bsd/mdocml/dist

2019-03-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar 11 03:56:30 UTC 2019

Modified Files:
src/external/bsd/mdocml/dist: man_validate.c mdoc_validate.c

Log Message:
add __dead for clang.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.19 -r1.2 src/external/bsd/mdocml/dist/man_validate.c
cvs rdiff -u -r1.15 -r1.16 src/external/bsd/mdocml/dist/mdoc_validate.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/man_validate.c
diff -u src/external/bsd/mdocml/dist/man_validate.c:1.1.1.19 src/external/bsd/mdocml/dist/man_validate.c:1.2
--- src/external/bsd/mdocml/dist/man_validate.c:1.1.1.19	Sun Mar 10 18:28:59 2019
+++ src/external/bsd/mdocml/dist/man_validate.c	Sun Mar 10 23:56:30 2019
@@ -41,7 +41,7 @@
 
 typedef	void	(*v_check)(CHKARGS);
 
-static	void	  check_abort(CHKARGS);
+static	void	  check_abort(CHKARGS) __dead;
 static	void	  check_par(CHKARGS);
 static	void	  check_part(CHKARGS);
 static	void	  check_root(CHKARGS);

Index: src/external/bsd/mdocml/dist/mdoc_validate.c
diff -u src/external/bsd/mdocml/dist/mdoc_validate.c:1.15 src/external/bsd/mdocml/dist/mdoc_validate.c:1.16
--- src/external/bsd/mdocml/dist/mdoc_validate.c:1.15	Sun Mar 10 20:15:38 2019
+++ src/external/bsd/mdocml/dist/mdoc_validate.c	Sun Mar 10 23:56:30 2019
@@ -64,7 +64,7 @@ static	size_t		macro2len(enum roff_tok);
 static	void	 rewrite_macro2len(struct roff_man *, char **);
 static	int	 similar(const char *, const char *);
 
-static	void	 post_abort(POST_ARGS);
+static	void	 post_abort(POST_ARGS) __dead;
 static	void	 post_an(POST_ARGS);
 static	void	 post_an_norm(POST_ARGS);
 static	void	 post_at(POST_ARGS);



CVS commit: src/external/bsd/mdocml/dist

2018-09-28 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Fri Sep 28 13:21:37 UTC 2018

Modified Files:
src/external/bsd/mdocml/dist: configure

Log Message:
Don't include nbtool_config.h too early.  It pulls in system headers
and so #define _GNU_SOURCE afterwards doesn't have any effect on them.

PR bin/53634


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/external/bsd/mdocml/dist/configure

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/configure
diff -u src/external/bsd/mdocml/dist/configure:1.12 src/external/bsd/mdocml/dist/configure:1.13
--- src/external/bsd/mdocml/dist/configure:1.12	Tue Aug 14 13:21:52 2018
+++ src/external/bsd/mdocml/dist/configure	Fri Sep 28 13:21:37 2018
@@ -387,14 +387,14 @@ cat << __HEREDOC__
 #define __attribute__(x)
 #endif
 
-#ifdef HAVE_NBTOOL_CONFIG_H
-#include "nbtool_config.h"
-#endif
-
 #if defined(__linux__) || defined(__MINT__)
 #define _GNU_SOURCE	/* See test-*.c what needs this. */
 #endif
 
+#ifdef HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
 __HEREDOC__
 
 [ ${HAVE_GETLINE} -eq 0 -o \



CVS commit: src/external/bsd/mdocml/bin/mandoc

2018-08-15 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu Aug 16 06:24:40 UTC 2018

Modified Files:
src/external/bsd/mdocml/bin/mandoc: Makefile

Log Message:
mandoc_xr.c is now in libmandoc (where it should be) it no longer
needs to be here (why having it broke building I did not look to see,
it should be possible to replace a file from a library).


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/external/bsd/mdocml/bin/mandoc/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/bin/mandoc/Makefile
diff -u src/external/bsd/mdocml/bin/mandoc/Makefile:1.16 src/external/bsd/mdocml/bin/mandoc/Makefile:1.17
--- src/external/bsd/mdocml/bin/mandoc/Makefile:1.16	Thu Aug 16 05:03:17 2018
+++ src/external/bsd/mdocml/bin/mandoc/Makefile	Thu Aug 16 06:24:40 2018
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.16 2018/08/16 05:03:17 kre Exp $
+# $NetBSD: Makefile,v 1.17 2018/08/16 06:24:40 kre Exp $
 
 .include 
 
@@ -11,7 +11,6 @@ html.c \
 main.c \
 man_html.c \
 man_term.c \
-mandoc_xr.c \
 manpath.c \
 mdoc_html.c \
 mdoc_markdown.c \



CVS commit: src/external/bsd/mdocml

2018-08-15 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu Aug 16 05:03:17 UTC 2018

Modified Files:
src/external/bsd/mdocml/bin/mandoc: Makefile
src/external/bsd/mdocml/lib/libmandoc: Makefile

Log Message:
mandoc needs mandoc_xr.c and (because we do not have it in libc, which
should remain the state forever IMO) compat_recallocarray.c

And now that compat_recallocarray() is in libmandoc we no longer
need to manually add its source to mandoc (either the full, or the
tools builds).


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/external/bsd/mdocml/bin/mandoc/Makefile
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/mdocml/lib/libmandoc/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/bin/mandoc/Makefile
diff -u src/external/bsd/mdocml/bin/mandoc/Makefile:1.15 src/external/bsd/mdocml/bin/mandoc/Makefile:1.16
--- src/external/bsd/mdocml/bin/mandoc/Makefile:1.15	Thu Aug 16 03:59:52 2018
+++ src/external/bsd/mdocml/bin/mandoc/Makefile	Thu Aug 16 05:03:17 2018
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.15 2018/08/16 03:59:52 kre Exp $
+# $NetBSD: Makefile,v 1.16 2018/08/16 05:03:17 kre Exp $
 
 .include 
 
@@ -31,12 +31,10 @@ tree.c
 DPADD+= 	${MDOCMLLIB.mandoc} ${LIBZ}
 LDADD+= 	-L${MDOCMLOBJDIR.mandoc} -lmandoc -lz
 CPPFLAGS+=	-DUSE_WCHAR
-SRCS+=		compat_recallocarray.c
 .else
 SRCS.libmandoc!=cd ${.PARSEDIR}/../../lib/libmandoc && ${MAKE} -v SRCS
 
-SRCS+=		${SRCS.libmandoc} compat_strtonum.c compat_reallocarray.c \
-		compat_recallocarray.c
+SRCS+=		${SRCS.libmandoc} compat_strtonum.c compat_reallocarray.c
 .endif
 
 COPTS.man_term.c+= -Wno-error=array-bounds

Index: src/external/bsd/mdocml/lib/libmandoc/Makefile
diff -u src/external/bsd/mdocml/lib/libmandoc/Makefile:1.10 src/external/bsd/mdocml/lib/libmandoc/Makefile:1.11
--- src/external/bsd/mdocml/lib/libmandoc/Makefile:1.10	Thu Aug 16 01:08:18 2018
+++ src/external/bsd/mdocml/lib/libmandoc/Makefile	Thu Aug 16 05:03:17 2018
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.10 2018/08/16 01:08:18 kre Exp $
+# $NetBSD: Makefile,v 1.11 2018/08/16 05:03:17 kre Exp $
 
 LIBISPRIVATE=	yes
 
@@ -7,6 +7,7 @@ SRCS=	\
 att.c \
 chars.c \
 compat_ohash.c \
+compat_recallocarray.c \
 eqn.c \
 lib.c \
 man.c \
@@ -15,6 +16,7 @@ man_validate.c \
 mandoc.c \
 mandoc_aux.c \
 mandoc_ohash.c \
+mandoc_xr.c \
 mdoc.c \
 mdoc_argv.c \
 mdoc_macro.c \



CVS commit: src/external/bsd/mdocml/bin/mandoc

2018-08-15 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu Aug 16 03:59:52 UTC 2018

Modified Files:
src/external/bsd/mdocml/bin/mandoc: Makefile

Log Message:
man_term.c needs -Wno-error=array-bounds for the exact same reason
as libmandoc/mandoc-validate.c

And as we do not have recallocarray() in libc, we need the compat
source file for the full build, as well as for tools builds.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/external/bsd/mdocml/bin/mandoc/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/bin/mandoc/Makefile
diff -u src/external/bsd/mdocml/bin/mandoc/Makefile:1.14 src/external/bsd/mdocml/bin/mandoc/Makefile:1.15
--- src/external/bsd/mdocml/bin/mandoc/Makefile:1.14	Wed Aug 15 08:19:18 2018
+++ src/external/bsd/mdocml/bin/mandoc/Makefile	Thu Aug 16 03:59:52 2018
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.14 2018/08/15 08:19:18 mrg Exp $
+# $NetBSD: Makefile,v 1.15 2018/08/16 03:59:52 kre Exp $
 
 .include 
 
@@ -31,10 +31,14 @@ tree.c
 DPADD+= 	${MDOCMLLIB.mandoc} ${LIBZ}
 LDADD+= 	-L${MDOCMLOBJDIR.mandoc} -lmandoc -lz
 CPPFLAGS+=	-DUSE_WCHAR
+SRCS+=		compat_recallocarray.c
 .else
 SRCS.libmandoc!=cd ${.PARSEDIR}/../../lib/libmandoc && ${MAKE} -v SRCS
 
-SRCS+=		${SRCS.libmandoc} compat_strtonum.c compat_reallocarray.c compat_recallocarray.c
+SRCS+=		${SRCS.libmandoc} compat_strtonum.c compat_reallocarray.c \
+		compat_recallocarray.c
 .endif
 
+COPTS.man_term.c+= -Wno-error=array-bounds
+
 .include 



CVS commit: src/external/bsd/mdocml/lib/libmandoc

2018-08-15 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu Aug 16 01:08:18 UTC 2018

Modified Files:
src/external/bsd/mdocml/lib/libmandoc: Makefile

Log Message:
mandoc-validate.c cannot deal with -Werror=array-bounds so disable it.
The code could probably be redone to not need this, but this is the
simple fix (and requires no upstream co-ordination)


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/mdocml/lib/libmandoc/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/lib/libmandoc/Makefile
diff -u src/external/bsd/mdocml/lib/libmandoc/Makefile:1.9 src/external/bsd/mdocml/lib/libmandoc/Makefile:1.10
--- src/external/bsd/mdocml/lib/libmandoc/Makefile:1.9	Tue Aug 14 08:53:06 2018
+++ src/external/bsd/mdocml/lib/libmandoc/Makefile	Thu Aug 16 01:08:18 2018
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.9 2018/08/14 08:53:06 christos Exp $
+# $NetBSD: Makefile,v 1.10 2018/08/16 01:08:18 kre Exp $
 
 LIBISPRIVATE=	yes
 
@@ -40,4 +40,6 @@ MAN=	mandoc.3
 COPTS.mdoc_macro.c+=-O0
 .endif
 
+COPTS.man_validate.c+=-Wno-error=array-bounds
+
 .include 



CVS commit: src/external/bsd/mdocml/include

2018-08-15 Thread Takeshi Nakayama
Module Name:src
Committed By:   nakayama
Date:   Wed Aug 15 22:07:32 UTC 2018

Modified Files:
src/external/bsd/mdocml/include: config.h

Log Message:
Add recallocarray prototype.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/mdocml/include/config.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/include/config.h
diff -u src/external/bsd/mdocml/include/config.h:1.6 src/external/bsd/mdocml/include/config.h:1.7
--- src/external/bsd/mdocml/include/config.h:1.6	Tue Aug 14 08:53:06 2018
+++ src/external/bsd/mdocml/include/config.h	Wed Aug 15 22:07:32 2018
@@ -29,6 +29,7 @@
 #define HAVE_PLEDGE 0
 #define HAVE_PROGNAME 1
 #define HAVE_REALLOCARRAY 0
+#define HAVE_RECALLOCARRAY 0
 #define HAVE_REWB_BSD 1
 #define HAVE_REWB_SYSV 0
 #define HAVE_SANDBOX_INIT 0
@@ -54,4 +55,5 @@
 
 extern	int	  getsubopt(char **, char * const *, char **);
 extern	void	 *reallocarray(void *, size_t, size_t);
+extern	void	 *recallocarray(void *, size_t, size_t, size_t);
 extern	long long strtonum(const char *, long long, long long, const char **);



CVS commit: src/external/bsd/mdocml/bin/mandoc

2018-08-15 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Aug 15 08:19:18 UTC 2018

Modified Files:
src/external/bsd/mdocml/bin/mandoc: Makefile

Log Message:
add missing compat_recallocarray.c to the HOSTPROG part.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/external/bsd/mdocml/bin/mandoc/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/bin/mandoc/Makefile
diff -u src/external/bsd/mdocml/bin/mandoc/Makefile:1.13 src/external/bsd/mdocml/bin/mandoc/Makefile:1.14
--- src/external/bsd/mdocml/bin/mandoc/Makefile:1.13	Tue Aug 14 08:53:06 2018
+++ src/external/bsd/mdocml/bin/mandoc/Makefile	Wed Aug 15 08:19:18 2018
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.13 2018/08/14 08:53:06 christos Exp $
+# $NetBSD: Makefile,v 1.14 2018/08/15 08:19:18 mrg Exp $
 
 .include 
 
@@ -34,7 +34,7 @@ CPPFLAGS+=	-DUSE_WCHAR
 .else
 SRCS.libmandoc!=cd ${.PARSEDIR}/../../lib/libmandoc && ${MAKE} -v SRCS
 
-SRCS+=		${SRCS.libmandoc} compat_strtonum.c compat_reallocarray.c
+SRCS+=		${SRCS.libmandoc} compat_strtonum.c compat_reallocarray.c compat_recallocarray.c
 .endif
 
 .include 



CVS commit: src/external/bsd/mdocml/dist

2018-08-14 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Tue Aug 14 13:21:52 UTC 2018

Modified Files:
src/external/bsd/mdocml/dist: configure

Log Message:
remove stray "fi" to unbreak build


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/external/bsd/mdocml/dist/configure

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/configure
diff -u src/external/bsd/mdocml/dist/configure:1.11 src/external/bsd/mdocml/dist/configure:1.12
--- src/external/bsd/mdocml/dist/configure:1.11	Tue Aug 14 08:53:06 2018
+++ src/external/bsd/mdocml/dist/configure	Tue Aug 14 13:21:52 2018
@@ -510,7 +510,6 @@ fi
 
 [ ${HAVE_STRSEP} -eq 0 ] && \
 	echo "extern	char	 *strsep(char **, const char *);"
-fi
 
 [ ${HAVE_STRTONUM} -eq 0 ] && \
 	echo "extern	long long strtonum(const char *, long long, long long, const char **);"



CVS commit: src/external/bsd/mdocml/dist

2018-07-27 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Fri Jul 27 15:14:43 UTC 2018

Modified Files:
src/external/bsd/mdocml/dist: mdoc.7 st.in

Log Message:
s/17/18, I was reading a draft.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/mdocml/dist/mdoc.7
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/mdocml/dist/st.in

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/mdoc.7
diff -u src/external/bsd/mdocml/dist/mdoc.7:1.2 src/external/bsd/mdocml/dist/mdoc.7:1.3
--- src/external/bsd/mdocml/dist/mdoc.7:1.2	Fri Jul 27 14:29:46 2018
+++ src/external/bsd/mdocml/dist/mdoc.7	Fri Jul 27 15:14:43 2018
@@ -2430,8 +2430,8 @@ The second major version of the C langua
 .br
 The third major version of the C language standard.
 .Pp
-.It \-isoC-2017
-.St -isoC-2017
+.It \-isoC-2018
+.St -isoC-2018
 .br
 The fourth major version of the C language standard.
 .El

Index: src/external/bsd/mdocml/dist/st.in
diff -u src/external/bsd/mdocml/dist/st.in:1.6 src/external/bsd/mdocml/dist/st.in:1.7
--- src/external/bsd/mdocml/dist/st.in:1.6	Fri Jul 27 14:29:46 2018
+++ src/external/bsd/mdocml/dist/st.in	Fri Jul 27 15:14:43 2018
@@ -51,7 +51,7 @@ LINE("-isoC-tcor1",	"ISO/IEC 9899/TCOR1:
 LINE("-isoC-tcor2",	"ISO/IEC 9899/TCOR2:1995 (\\(LqISO\\~C90, Technical Corrigendum 2\\(Rq)")
 LINE("-isoC-99",	"ISO/IEC 9899:1999 (\\(LqISO\\~C99\\(Rq)")
 LINE("-isoC-2011",	"ISO/IEC 9899:2011 (\\(LqISO\\~C11\\(Rq)")
-LINE("-isoC-2017",	"ISO/IEC 9899:2017 (\\(LqISO\\~C17\\(Rq)")
+LINE("-isoC-2018",	"ISO/IEC 9899:2018 (\\(LqISO\\~C18\\(Rq)")
 LINE("-iso9945-1-90",	"ISO/IEC 9945-1:1990 (\\(LqPOSIX.1\\(Rq)")
 LINE("-iso9945-1-96",	"ISO/IEC 9945-1:1996 (\\(LqPOSIX.1\\(Rq)")
 LINE("-iso9945-2-93",	"ISO/IEC 9945-2:1993 (\\(LqPOSIX.2\\(Rq)")



CVS commit: src/external/bsd/mdocml/dist

2018-07-27 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Fri Jul 27 14:29:46 UTC 2018

Modified Files:
src/external/bsd/mdocml/dist: mdoc.7 st.in

Log Message:
Support -isoC-2017


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.20 -r1.2 src/external/bsd/mdocml/dist/mdoc.7
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/mdocml/dist/st.in

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/mdoc.7
diff -u src/external/bsd/mdocml/dist/mdoc.7:1.1.1.20 src/external/bsd/mdocml/dist/mdoc.7:1.2
--- src/external/bsd/mdocml/dist/mdoc.7:1.1.1.20	Sat Mar 18 15:06:52 2017
+++ src/external/bsd/mdocml/dist/mdoc.7	Fri Jul 27 14:29:46 2018
@@ -15,7 +15,7 @@
 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 .\"
-.Dd February 16, 2017
+.Dd July 27, 2018
 .Dt MDOC 7
 .Os
 .Sh NAME
@@ -2429,6 +2429,11 @@ The second major version of the C langua
 .St -isoC-2011
 .br
 The third major version of the C language standard.
+.Pp
+.It \-isoC-2017
+.St -isoC-2017
+.br
+The fourth major version of the C language standard.
 .El
 .It POSIX.1 before the Single UNIX Specification
 .Pp

Index: src/external/bsd/mdocml/dist/st.in
diff -u src/external/bsd/mdocml/dist/st.in:1.5 src/external/bsd/mdocml/dist/st.in:1.6
--- src/external/bsd/mdocml/dist/st.in:1.5	Fri Jul 15 19:40:42 2016
+++ src/external/bsd/mdocml/dist/st.in	Fri Jul 27 14:29:46 2018
@@ -51,6 +51,7 @@ LINE("-isoC-tcor1",	"ISO/IEC 9899/TCOR1:
 LINE("-isoC-tcor2",	"ISO/IEC 9899/TCOR2:1995 (\\(LqISO\\~C90, Technical Corrigendum 2\\(Rq)")
 LINE("-isoC-99",	"ISO/IEC 9899:1999 (\\(LqISO\\~C99\\(Rq)")
 LINE("-isoC-2011",	"ISO/IEC 9899:2011 (\\(LqISO\\~C11\\(Rq)")
+LINE("-isoC-2017",	"ISO/IEC 9899:2017 (\\(LqISO\\~C17\\(Rq)")
 LINE("-iso9945-1-90",	"ISO/IEC 9945-1:1990 (\\(LqPOSIX.1\\(Rq)")
 LINE("-iso9945-1-96",	"ISO/IEC 9945-1:1996 (\\(LqPOSIX.1\\(Rq)")
 LINE("-iso9945-2-93",	"ISO/IEC 9945-2:1993 (\\(LqPOSIX.2\\(Rq)")



CVS commit: src/external/bsd/mdocml

2018-04-13 Thread Takeshi Nakayama
Module Name:src
Committed By:   nakayama
Date:   Fri Apr 13 21:52:49 UTC 2018

Modified Files:
src/external/bsd/mdocml/dist: term_ascii.c
src/external/bsd/mdocml/include: config.h

Log Message:
Re-enable wchar_t support.  mandoc(1) can now fall back to ascii
output if the locale is non-UTF-8 locale with the following change.

https://marc.info/?l=openbsd-cvs&m=152364416720474

| Modified files:
|   usr.bin/mandoc : term_ascii.c
|
| Log message:
| Make sure that mandoc only goes into UTF-8 mode if the user really
| selected UTF-8, not some other multibyte locale.  This obviously
| makes no difference on OpenBSD but improves portability.
| Issue reported by  via wiz@.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.11 -r1.2 src/external/bsd/mdocml/dist/term_ascii.c
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/mdocml/include/config.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/term_ascii.c
diff -u src/external/bsd/mdocml/dist/term_ascii.c:1.1.1.11 src/external/bsd/mdocml/dist/term_ascii.c:1.2
--- src/external/bsd/mdocml/dist/term_ascii.c:1.1.1.11	Sat Mar 18 15:06:54 2017
+++ src/external/bsd/mdocml/dist/term_ascii.c	Fri Apr 13 21:52:49 2018
@@ -21,11 +21,13 @@
 
 #include 
 #if HAVE_WCHAR
+#include 
 #include 
 #endif
 #include 
 #include 
 #include 
+#include 
 #include 
 #if HAVE_WCHAR
 #include 
@@ -99,7 +101,17 @@ ascii_init(enum termenc enc, const struc
 		v = TERMENC_LOCALE == enc ?
 		setlocale(LC_CTYPE, "") :
 		setlocale(LC_CTYPE, UTF8_LOCALE);
-		if (NULL != v && MB_CUR_MAX > 1) {
+
+		/*
+		 * We only support UTF-8,
+		 * so revert to ASCII for anything else.
+		 */
+
+		if (v != NULL &&
+		strcmp(nl_langinfo(CODESET), "UTF-8") != 0)
+			v = setlocale(LC_CTYPE, "C");
+
+		if (v != NULL && MB_CUR_MAX > 1) {
 			p->enc = enc;
 			p->advance = locale_advance;
 			p->endline = locale_endline;

Index: src/external/bsd/mdocml/include/config.h
diff -u src/external/bsd/mdocml/include/config.h:1.4 src/external/bsd/mdocml/include/config.h:1.5
--- src/external/bsd/mdocml/include/config.h:1.4	Sat Mar 17 11:06:48 2018
+++ src/external/bsd/mdocml/include/config.h	Fri Apr 13 21:52:48 2018
@@ -41,7 +41,7 @@
 #define HAVE_STRTONUM 0
 #define HAVE_SYS_ENDIAN 1
 #define HAVE_VASPRINTF 1
-#define HAVE_WCHAR 0
+#define HAVE_WCHAR 1
 #define HAVE_OHASH 0
 
 #define BINM_APROPOS "apropos"



CVS commit: src/external/bsd/mdocml/include

2018-03-17 Thread Takeshi Nakayama
Module Name:src
Committed By:   nakayama
Date:   Sat Mar 17 11:06:48 UTC 2018

Modified Files:
src/external/bsd/mdocml/include: config.h

Log Message:
Disable wchar_t support since our C library does not treat wchar_t
as UCS-4 in the case of non-UTF-8 locales.

This feature was controlled by USE_WCHAR and disabled on NetBSD 7.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/mdocml/include/config.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/include/config.h
diff -u src/external/bsd/mdocml/include/config.h:1.3 src/external/bsd/mdocml/include/config.h:1.4
--- src/external/bsd/mdocml/include/config.h:1.3	Sat Mar 18 15:24:17 2017
+++ src/external/bsd/mdocml/include/config.h	Sat Mar 17 11:06:48 2018
@@ -41,7 +41,7 @@
 #define HAVE_STRTONUM 0
 #define HAVE_SYS_ENDIAN 1
 #define HAVE_VASPRINTF 1
-#define HAVE_WCHAR 1
+#define HAVE_WCHAR 0
 #define HAVE_OHASH 0
 
 #define BINM_APROPOS "apropos"



CVS commit: src/external/bsd/mdocml/dist

2017-07-03 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Jul  3 13:18:31 UTC 2017

Modified Files:
src/external/bsd/mdocml/dist: msec.in

Log Message:
Add 3lua and 9lua.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/mdocml/dist/msec.in

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/msec.in
diff -u src/external/bsd/mdocml/dist/msec.in:1.6 src/external/bsd/mdocml/dist/msec.in:1.7
--- src/external/bsd/mdocml/dist/msec.in:1.6	Fri Jul 15 19:40:42 2016
+++ src/external/bsd/mdocml/dist/msec.in	Mon Jul  3 13:18:31 2017
@@ -26,12 +26,14 @@ LINE("1",		"General Commands Manual")
 LINE("2",		"System Calls Manual")
 LINE("3",		"Library Functions Manual")
 LINE("3p",		"Perl Library Manual")
+LINE("3lua",		"LUA Library Manual")
 LINE("4",		"Device Drivers Manual")
 LINE("5",		"File Formats Manual")
 LINE("6",		"Games Manual")
 LINE("7",		"Miscellaneous Information Manual")
 LINE("8",		"System Manager\'s Manual")
 LINE("9",		"Kernel Developer\'s Manual")
+LINE("9lua",		"LUA Kernel Developer\'s Manual")
 LINE("X11",		"X11 Developer\'s Manual")
 LINE("X11R6",		"X11 Developer\'s Manual")
 LINE("unass",		"Unassociated")



CVS commit: src/external/bsd/mdocml/dist

2017-03-19 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sun Mar 19 16:51:45 UTC 2017

Modified Files:
src/external/bsd/mdocml/dist: configure

Log Message:
Fix configure script to not always provide an extern for strsep().


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/mdocml/dist/configure

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/configure
diff -u src/external/bsd/mdocml/dist/configure:1.8 src/external/bsd/mdocml/dist/configure:1.9
--- src/external/bsd/mdocml/dist/configure:1.8	Sun Mar 19 15:34:26 2017
+++ src/external/bsd/mdocml/dist/configure	Sun Mar 19 16:51:45 2017
@@ -452,9 +452,10 @@ fi
 [ ${HAVE_STRLCPY} -eq 0 ] && \
 	echo "extern	size_t	  strlcpy(char *, const char *, size_t);"
 
-[ ${HAVE_STRSEP} -eq 0 ] && \
+if [ ${HAVE_STRSEP} -eq 0 ]; then
 	echo "#undef strsep"
 	echo "extern	char	 *strsep(char **, const char *);"
+fi
 
 [ ${HAVE_STRTONUM} -eq 0 ] && \
 	echo "extern	long long strtonum(const char *, long long, long long, const char **);"



CVS commit: src/external/bsd/mdocml/dist

2017-03-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 19 15:34:26 UTC 2017

Modified Files:
src/external/bsd/mdocml/dist: configure

Log Message:
don't redefine EFTYPE (tools build, defined by compat_defs.h)


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/mdocml/dist/configure

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/configure
diff -u src/external/bsd/mdocml/dist/configure:1.7 src/external/bsd/mdocml/dist/configure:1.8
--- src/external/bsd/mdocml/dist/configure:1.7	Sat Mar 18 11:24:17 2017
+++ src/external/bsd/mdocml/dist/configure	Sun Mar 19 11:34:26 2017
@@ -364,7 +364,8 @@ echo "#define MANPATH_DEFAULT \"${MANPAT
 [ -n "${OSNAME}" ] && echo "#define OSNAME \"${OSNAME}\""
 [ -n "${UTF8_LOCALE}" ] && echo "#define UTF8_LOCALE \"${UTF8_LOCALE}\""
 [ -n "${HOMEBREWDIR}" ] && echo "#define HOMEBREWDIR \"${HOMEBREWDIR}\""
-[ ${HAVE_EFTYPE} -eq 0 ] && echo "#define EFTYPE EINVAL"
+[ ${HAVE_EFTYPE} -eq 0 ] && echo "#ifndef EFTYPE" && \
+echo "#define EFTYPE EINVAL" && echo "#endif"
 [ ${HAVE_O_DIRECTORY} -eq 0 ] && echo "#define O_DIRECTORY 0"
 [ ${HAVE_PATH_MAX} -eq 0 ] && echo "#define PATH_MAX 4096"
 if [ ${HAVE_ENDIAN} -eq 0 -a ${HAVE_SYS_ENDIAN} -eq 0 ]; then



CVS commit: src/external/bsd/mdocml/dist

2017-01-08 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sun Jan  8 21:34:23 UTC 2017

Modified Files:
src/external/bsd/mdocml/dist: configure

Log Message:
Make sure isblank is not a macro, it will have failed the configure
check earlier.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/mdocml/dist/configure

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/configure
diff -u src/external/bsd/mdocml/dist/configure:1.5 src/external/bsd/mdocml/dist/configure:1.6
--- src/external/bsd/mdocml/dist/configure:1.5	Fri Jul 15 19:40:42 2016
+++ src/external/bsd/mdocml/dist/configure	Sun Jan  8 21:34:23 2017
@@ -363,8 +363,10 @@ fi
 [ ${HAVE_GETSUBOPT} -eq 0 ] && \
 	echo "extern	int	  getsubopt(char **, char * const *, char **);"
 
-[ ${HAVE_ISBLANK} -eq 0 ] && \
+if [ ${HAVE_ISBLANK} -eq 0 ]; then
+	echo "#undef isblank"
 	echo "extern	int	  isblank(int);"
+fi
 
 [ ${HAVE_MKDTEMP} -eq 0 ] && \
 	echo "extern	char	 *mkdtemp(char *);"



CVS commit: src/external/bsd/mdocml/dist

2016-07-20 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jul 20 12:04:18 UTC 2016

Modified Files:
src/external/bsd/mdocml/dist: tag.c

Log Message:
mark tag_signal as noreturn.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/mdocml/dist/tag.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/tag.c
diff -u src/external/bsd/mdocml/dist/tag.c:1.3 src/external/bsd/mdocml/dist/tag.c:1.4
--- src/external/bsd/mdocml/dist/tag.c:1.3	Mon Jul 18 14:45:56 2016
+++ src/external/bsd/mdocml/dist/tag.c	Wed Jul 20 08:04:18 2016
@@ -37,7 +37,7 @@ struct tag_entry {
 	char	 s[];
 };
 
-static	void	 tag_signal(int);
+static	void	 tag_signal(int) __attribute__((__noreturn__));
 
 static struct ohash	 tag_data;
 static struct tag_files	 tag_files;



CVS commit: src/external/bsd/mdocml/dist

2016-07-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jul 18 22:51:38 UTC 2016

Modified Files:
src/external/bsd/mdocml/dist: mandoc_aux.h

Log Message:
add missing attribute.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/mdocml/dist/mandoc_aux.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/mandoc_aux.h
diff -u src/external/bsd/mdocml/dist/mandoc_aux.h:1.3 src/external/bsd/mdocml/dist/mandoc_aux.h:1.4
--- src/external/bsd/mdocml/dist/mandoc_aux.h:1.3	Fri Jul 15 15:40:42 2016
+++ src/external/bsd/mdocml/dist/mandoc_aux.h	Mon Jul 18 18:51:38 2016
@@ -16,6 +16,9 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#if __GNUC__ - 0 >= 4
+__attribute__((__format__ (__printf__, 2, 3)))
+#endif
 int		  mandoc_asprintf(char **, const char *, ...);
 void		 *mandoc_calloc(size_t, size_t);
 void		 *mandoc_malloc(size_t);



CVS commit: src/external/bsd/mdocml/dist

2016-07-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jul 18 18:46:07 UTC 2016

Modified Files:
src/external/bsd/mdocml/dist: mdoc_validate.c

Log Message:
adapt to changed api


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/external/bsd/mdocml/dist/mdoc_validate.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/mdoc_validate.c
diff -u src/external/bsd/mdocml/dist/mdoc_validate.c:1.11 src/external/bsd/mdocml/dist/mdoc_validate.c:1.12
--- src/external/bsd/mdocml/dist/mdoc_validate.c:1.11	Mon Jul 18 12:56:04 2016
+++ src/external/bsd/mdocml/dist/mdoc_validate.c	Mon Jul 18 14:46:07 2016
@@ -813,8 +813,8 @@ post_fo(POST_ARGS)
 		while (n->child != n->last)
 			roff_node_delete(mdoc, n->last);
 		while (n->child != n->last) {
-			struct mdoc_node *p = n->last;
-			mdoc_node_delete(mdoc, p);
+			struct roff_node *p = n->last;
+			roff_node_delete(mdoc, p);
 		}
 
 	}



CVS commit: src/external/bsd/mdocml/dist

2016-07-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jul 18 18:45:56 UTC 2016

Modified Files:
src/external/bsd/mdocml/dist: tag.c

Log Message:
need sys/stat.h for umask.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/mdocml/dist/tag.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/tag.c
diff -u src/external/bsd/mdocml/dist/tag.c:1.2 src/external/bsd/mdocml/dist/tag.c:1.3
--- src/external/bsd/mdocml/dist/tag.c:1.2	Mon Jul 18 12:58:04 2016
+++ src/external/bsd/mdocml/dist/tag.c	Mon Jul 18 14:45:56 2016
@@ -17,6 +17,7 @@
 #include "config.h"
 
 #include 
+#include 
 
 #include 
 #include 



CVS commit: src/external/bsd/mdocml/dist

2016-07-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jul 18 17:04:29 UTC 2016

Modified Files:
src/external/bsd/mdocml/dist: read.c

Log Message:
CID 1349675:  Null pointer dereference


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/external/bsd/mdocml/dist/read.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/read.c
diff -u src/external/bsd/mdocml/dist/read.c:1.16 src/external/bsd/mdocml/dist/read.c:1.17
--- src/external/bsd/mdocml/dist/read.c:1.16	Fri Jul 15 15:40:42 2016
+++ src/external/bsd/mdocml/dist/read.c	Mon Jul 18 13:04:29 2016
@@ -688,12 +688,14 @@ mparse_end(struct mparse *curp)
 	if (curp->man == NULL && curp->sodest == NULL)
 		curp->man = roff_man_alloc(curp->roff, curp, curp->defos,
 		curp->options & MPARSE_QUICK ? 1 : 0);
-	if (curp->man->macroset == MACROSET_NONE)
-		curp->man->macroset = MACROSET_MAN;
-	if (curp->man->macroset == MACROSET_MDOC)
-		mdoc_endparse(curp->man);
-	else
-		man_endparse(curp->man);
+	if (curp->man != NULL) {
+		if (curp->man->macroset == MACROSET_NONE)
+			curp->man->macroset = MACROSET_MAN;
+		if (curp->man->macroset == MACROSET_MDOC)
+			mdoc_endparse(curp->man);
+		else
+			man_endparse(curp->man);
+	}
 	roff_endparse(curp->roff);
 }
 



CVS commit: src/external/bsd/mdocml/dist

2016-07-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jul 18 17:02:44 UTC 2016

Modified Files:
src/external/bsd/mdocml/dist: mdoc_macro.c

Log Message:
CID 1349674  Null pointer dereference


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.18 -r1.2 src/external/bsd/mdocml/dist/mdoc_macro.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/mdoc_macro.c
diff -u src/external/bsd/mdocml/dist/mdoc_macro.c:1.1.1.18 src/external/bsd/mdocml/dist/mdoc_macro.c:1.2
--- src/external/bsd/mdocml/dist/mdoc_macro.c:1.1.1.18	Fri Jul 15 10:25:56 2016
+++ src/external/bsd/mdocml/dist/mdoc_macro.c	Mon Jul 18 13:02:44 2016
@@ -264,7 +264,7 @@ static void
 rew_last(struct roff_man *mdoc, const struct roff_node *to)
 {
 
-	if (to->flags & MDOC_VALID)
+	if (to == NULL || to->flags & MDOC_VALID)
 		return;
 
 	while (mdoc->last != to) {



CVS commit: src/external/bsd/mdocml/dist

2016-07-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jul 18 16:58:04 UTC 2016

Modified Files:
src/external/bsd/mdocml/dist: tag.c

Log Message:
CID 1349652: Set umask before mkstemp


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/mdocml/dist/tag.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/tag.c
diff -u src/external/bsd/mdocml/dist/tag.c:1.1.1.1 src/external/bsd/mdocml/dist/tag.c:1.2
--- src/external/bsd/mdocml/dist/tag.c:1.1.1.1	Fri Jul 15 10:25:56 2016
+++ src/external/bsd/mdocml/dist/tag.c	Mon Jul 18 12:58:04 2016
@@ -52,6 +52,7 @@ tag_init(void)
 {
 	struct sigaction	 sa;
 	int			 ofd;
+	mode_t			 omask;
 
 	ofd = -1;
 	tag_files.tfd = -1;
@@ -86,10 +87,12 @@ tag_init(void)
 	sizeof(tag_files.ofn));
 	(void)strlcpy(tag_files.tfn, "/tmp/man.XX",
 	sizeof(tag_files.tfn));
+	omask = umask(077);
 	if ((ofd = mkstemp(tag_files.ofn)) == -1)
-		goto fail;
+		goto fail1;
 	if ((tag_files.tfd = mkstemp(tag_files.tfn)) == -1)
-		goto fail;
+		goto fail1;
+	(void)umask(omask);
 	if (dup2(ofd, STDOUT_FILENO) == -1)
 		goto fail;
 	close(ofd);
@@ -101,7 +104,8 @@ tag_init(void)
 
 	mandoc_ohash_init(&tag_data, 4, offsetof(struct tag_entry, s));
 	return &tag_files;
-
+fail1:
+	(void)umask(omask);
 fail:
 	tag_unlink();
 	if (ofd != -1)



CVS commit: src/external/bsd/mdocml/dist

2016-07-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jul 18 16:56:04 UTC 2016

Modified Files:
src/external/bsd/mdocml/dist: mdoc_validate.c

Log Message:
CID 1288934: Use after free.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/mdocml/dist/mdoc_validate.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/mdoc_validate.c
diff -u src/external/bsd/mdocml/dist/mdoc_validate.c:1.10 src/external/bsd/mdocml/dist/mdoc_validate.c:1.11
--- src/external/bsd/mdocml/dist/mdoc_validate.c:1.10	Fri Jul 15 15:40:42 2016
+++ src/external/bsd/mdocml/dist/mdoc_validate.c	Mon Jul 18 12:56:04 2016
@@ -812,6 +812,11 @@ post_fo(POST_ARGS)
 		"Fo ... %s", n->child->next->string);
 		while (n->child != n->last)
 			roff_node_delete(mdoc, n->last);
+		while (n->child != n->last) {
+			struct mdoc_node *p = n->last;
+			mdoc_node_delete(mdoc, p);
+		}
+
 	}
 
 	post_fname(mdoc);



CVS commit: src/external/bsd/mdocml/dist

2016-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jan  7 22:47:49 UTC 2016

Modified Files:
src/external/bsd/mdocml/dist: eqn.c

Log Message:
fix typo


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/mdocml/dist/eqn.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/eqn.c
diff -u src/external/bsd/mdocml/dist/eqn.c:1.3 src/external/bsd/mdocml/dist/eqn.c:1.4
--- src/external/bsd/mdocml/dist/eqn.c:1.3	Thu Jan  7 15:06:44 2016
+++ src/external/bsd/mdocml/dist/eqn.c	Thu Jan  7 17:47:49 2016
@@ -1,4 +1,4 @@
-/*	$Id: eqn.c,v 1.3 2016/01/07 20:06:44 christos Exp $ */
+/*	$Id: eqn.c,v 1.4 2016/01/07 22:47:49 christos Exp $ */
 /*
  * Copyright (c) 2011, 2014 Kristaps Dzonsons 
  * Copyright (c) 2014, 2015 Ingo Schwarze 
@@ -992,7 +992,7 @@ this_tok:
 		 parent->type == EQN_MATRIX))
 			parent = parent->parent;
 		/* Close out any "singleton" lists. */
-		while (parrent && parent->type == EQN_LISTONE &&
+		while (parent && parent->type == EQN_LISTONE &&
 		parent->args == parent->expectargs)
 			parent = parent->parent;
 		break;



CVS commit: src/external/bsd/mdocml/dist

2016-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jan  7 21:11:54 UTC 2016

Modified Files:
src/external/bsd/mdocml/dist: read.c

Log Message:
Revert part of previous; fd is closed by readfd...


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/external/bsd/mdocml/dist/read.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/read.c
diff -u src/external/bsd/mdocml/dist/read.c:1.14 src/external/bsd/mdocml/dist/read.c:1.15
--- src/external/bsd/mdocml/dist/read.c:1.14	Thu Jan  7 15:11:57 2016
+++ src/external/bsd/mdocml/dist/read.c	Thu Jan  7 16:11:54 2016
@@ -1,4 +1,4 @@
-/*	$Id: read.c,v 1.14 2016/01/07 20:11:57 christos Exp $ */
+/*	$Id: read.c,v 1.15 2016/01/07 21:11:54 christos Exp $ */
 /*
  * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons 
  * Copyright (c) 2010-2015 Ingo Schwarze 
@@ -613,8 +613,6 @@ rerun:
 
 out:
 	free(ln.buf);
-	if (fd != -1)
-		close(fd);
 }
 
 static int



CVS commit: src/external/bsd/mdocml/dist

2016-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jan  7 20:11:57 UTC 2016

Modified Files:
src/external/bsd/mdocml/dist: read.c

Log Message:
CID 1257467: Annotate incorrect inull.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/external/bsd/mdocml/dist/read.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/read.c
diff -u src/external/bsd/mdocml/dist/read.c:1.13 src/external/bsd/mdocml/dist/read.c:1.14
--- src/external/bsd/mdocml/dist/read.c:1.13	Thu Jan  7 14:49:25 2016
+++ src/external/bsd/mdocml/dist/read.c	Thu Jan  7 15:11:57 2016
@@ -1,4 +1,4 @@
-/*	$Id: read.c,v 1.13 2016/01/07 19:49:25 christos Exp $ */
+/*	$Id: read.c,v 1.14 2016/01/07 20:11:57 christos Exp $ */
 /*
  * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons 
  * Copyright (c) 2010-2015 Ingo Schwarze 
@@ -823,6 +823,7 @@ mparse_open(struct mparse *curp, int *fd
 
 	save_errno = errno;
 	if (access(file, R_OK) == -1) {
+		/*coverity[REVERSE_INULL]*/
 		if (cp != NULL)
 			errno = save_errno;
 		free(cp);



CVS commit: src/external/bsd/mdocml/dist

2016-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jan  7 20:06:44 UTC 2016

Modified Files:
src/external/bsd/mdocml/dist: eqn.c

Log Message:
CID 1257471: NULL deref.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/mdocml/dist/eqn.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/eqn.c
diff -u src/external/bsd/mdocml/dist/eqn.c:1.2 src/external/bsd/mdocml/dist/eqn.c:1.3
--- src/external/bsd/mdocml/dist/eqn.c:1.2	Thu Jan  7 14:32:43 2016
+++ src/external/bsd/mdocml/dist/eqn.c	Thu Jan  7 15:06:44 2016
@@ -1,4 +1,4 @@
-/*	$Id: eqn.c,v 1.2 2016/01/07 19:32:43 christos Exp $ */
+/*	$Id: eqn.c,v 1.3 2016/01/07 20:06:44 christos Exp $ */
 /*
  * Copyright (c) 2011, 2014 Kristaps Dzonsons 
  * Copyright (c) 2014, 2015 Ingo Schwarze 
@@ -992,7 +992,7 @@ this_tok:
 		 parent->type == EQN_MATRIX))
 			parent = parent->parent;
 		/* Close out any "singleton" lists. */
-		while (parent->type == EQN_LISTONE &&
+		while (parrent && parent->type == EQN_LISTONE &&
 		parent->args == parent->expectargs)
 			parent = parent->parent;
 		break;



CVS commit: src/external/bsd/mdocml/dist

2016-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jan  7 19:49:25 UTC 2016

Modified Files:
src/external/bsd/mdocml/dist: read.c

Log Message:
CID 1288947: Prevent fd leak.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/external/bsd/mdocml/dist/read.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/read.c
diff -u src/external/bsd/mdocml/dist/read.c:1.12 src/external/bsd/mdocml/dist/read.c:1.13
--- src/external/bsd/mdocml/dist/read.c:1.12	Fri Dec 18 09:30:41 2015
+++ src/external/bsd/mdocml/dist/read.c	Thu Jan  7 14:49:25 2016
@@ -1,4 +1,4 @@
-/*	$Id: read.c,v 1.12 2015/12/18 14:30:41 christos Exp $ */
+/*	$Id: read.c,v 1.13 2016/01/07 19:49:25 christos Exp $ */
 /*
  * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons 
  * Copyright (c) 2010-2015 Ingo Schwarze 
@@ -336,6 +336,7 @@ mparse_buf_r(struct mparse *curp, const 
 
 	lnn = curp->line;
 	pos = 0;
+	fd = -1;
 
 	while (i < blk.sz) {
 		if (0 == pos && '\0' == blk.buf[i])
@@ -530,8 +531,7 @@ rerun:
 			if ( ! (curp->options & MPARSE_SO) &&
 			(i >= blk.sz || blk.buf[i] == '\0')) {
 curp->sodest = mandoc_strdup(ln.buf + of);
-free(ln.buf);
-return;
+goto out;
 			}
 			/*
 			 * We remove `so' clauses from our lookaside
@@ -611,7 +611,10 @@ rerun:
 		pos = 0;
 	}
 
+out:
 	free(ln.buf);
+	if (fd != -1)
+		close(fd);
 }
 
 static int



CVS commit: src/external/bsd/mdocml/dist

2016-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jan  7 19:46:01 UTC 2016

Modified Files:
src/external/bsd/mdocml/dist: mdoc_validate.c

Log Message:
CID 1288958: Prevent NULL deref


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/mdocml/dist/mdoc_validate.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/mdoc_validate.c
diff -u src/external/bsd/mdocml/dist/mdoc_validate.c:1.7 src/external/bsd/mdocml/dist/mdoc_validate.c:1.8
--- src/external/bsd/mdocml/dist/mdoc_validate.c:1.7	Thu Dec 17 17:31:12 2015
+++ src/external/bsd/mdocml/dist/mdoc_validate.c	Thu Jan  7 14:46:00 2016
@@ -1,4 +1,4 @@
-/*	$Id: mdoc_validate.c,v 1.7 2015/12/17 22:31:12 christos Exp $ */
+/*	$Id: mdoc_validate.c,v 1.8 2016/01/07 19:46:00 christos Exp $ */
 /*
  * Copyright (c) 2008-2012 Kristaps Dzonsons 
  * Copyright (c) 2010-2015 Ingo Schwarze 
@@ -1464,7 +1464,8 @@ post_bl(POST_ARGS)
 			assert(NULL == nnext);
 		} else {
 			nbody->child = nnext;
-			nnext->prev = NULL;
+			if (nnext)
+nnext->prev = NULL;
 		}
 
 		/*



CVS commit: src/external/bsd/mdocml/dist

2016-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jan  7 19:32:44 UTC 2016

Modified Files:
src/external/bsd/mdocml/dist: eqn.c

Log Message:
CID 1288962: lim was never incremented thus self-definition loop detection
was not functional.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 src/external/bsd/mdocml/dist/eqn.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/eqn.c
diff -u src/external/bsd/mdocml/dist/eqn.c:1.1.1.4 src/external/bsd/mdocml/dist/eqn.c:1.2
--- src/external/bsd/mdocml/dist/eqn.c:1.1.1.4	Thu Dec 17 16:58:48 2015
+++ src/external/bsd/mdocml/dist/eqn.c	Thu Jan  7 14:32:43 2016
@@ -1,4 +1,4 @@
-/*	$Id: eqn.c,v 1.1.1.4 2015/12/17 21:58:48 christos Exp $ */
+/*	$Id: eqn.c,v 1.2 2016/01/07 19:32:43 christos Exp $ */
 /*
  * Copyright (c) 2011, 2014 Kristaps Dzonsons 
  * Copyright (c) 2014, 2015 Ingo Schwarze 
@@ -448,6 +448,7 @@ again:
 		memmove(start + *sz + diff, start + *sz,
 		(strlen(start) - *sz) + 1);
 		memcpy(start, def->val, def->valsz);
+		lim++;
 		goto again;
 	}
 



CVS commit: src/external/bsd/mdocml/dist

2015-12-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec 27 22:26:19 UTC 2015

Modified Files:
src/external/bsd/mdocml/dist: configure

Log Message:
- Don't look for tests in the local directory, we might be running this from
  somewhere else.
- Clear MAKEFLAGS so that make(1) behaves as it is supposed to.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/mdocml/dist/configure

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/configure
diff -u src/external/bsd/mdocml/dist/configure:1.3 src/external/bsd/mdocml/dist/configure:1.4
--- src/external/bsd/mdocml/dist/configure:1.3	Sat Dec 19 14:28:06 2015
+++ src/external/bsd/mdocml/dist/configure	Sun Dec 27 17:26:19 2015
@@ -15,6 +15,7 @@
 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
 set -e
+DIR="`dirname "$0"`"
 
 [ -e config.log ] && mv config.log config.log.old
 [ -e config.h   ] && mv config.h config.h.old
@@ -32,6 +33,7 @@ echo "config.log: writing..."
 # such that nothing can leak in from the environment.
 
 OSNAME=
+MAKEFLAGS=
 
 CC=`printf "all:\\n\\t@echo \\\$(CC)\\n" | make -f -`
 CFLAGS="-g -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings"
@@ -127,7 +129,7 @@ ${1}: testing...
 ${COMP} ${3} -o test-${1} test-${1}.c
 __HEREDOC__
 
-	if ${COMP} ${3} -o "test-${1}" "test-${1}.c" 1>&3 2>&3; then
+	if ${COMP} ${3} -o "test-${1}" "${DIR}/test-${1}.c" 1>&3 2>&3; then
 		echo "${1}: ${CC} succeeded" 1>&3
 	else
 		echo "${1}: ${CC} failed with $?" 1>&3



CVS commit: src/external/bsd/mdocml/dist

2015-12-27 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sun Dec 27 12:42:18 UTC 2015

Modified Files:
src/external/bsd/mdocml/dist: mandoc_aux.h

Log Message:
Mark mandoc_asprintf as printf-like


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/mdocml/dist/mandoc_aux.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/mandoc_aux.h
diff -u src/external/bsd/mdocml/dist/mandoc_aux.h:1.1.1.1 src/external/bsd/mdocml/dist/mandoc_aux.h:1.2
--- src/external/bsd/mdocml/dist/mandoc_aux.h:1.1.1.1	Thu Dec 17 21:58:48 2015
+++ src/external/bsd/mdocml/dist/mandoc_aux.h	Sun Dec 27 12:42:17 2015
@@ -1,4 +1,4 @@
-/*	$Id: mandoc_aux.h,v 1.1.1.1 2015/12/17 21:58:48 christos Exp $ */
+/*	$Id: mandoc_aux.h,v 1.2 2015/12/27 12:42:17 joerg Exp $ */
 /*
  * Copyright (c) 2009, 2011 Kristaps Dzonsons 
  * Copyright (c) 2014 Ingo Schwarze 
@@ -18,6 +18,9 @@
 
 __BEGIN_DECLS
 
+#if __GNUC__ - 0 >= 4
+__attribute__((__format__ (__printf__, 2, 3)))
+#endif
 int		  mandoc_asprintf(char **, const char *, ...);
 void		 *mandoc_calloc(size_t, size_t);
 void		 *mandoc_malloc(size_t);



CVS commit: src/external/bsd/mdocml/dist

2015-12-19 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Dec 19 19:28:06 UTC 2015

Modified Files:
src/external/bsd/mdocml/dist: configure

Log Message:
strsep must be undefined first, certain glibc magic breaks a prototype
otherwise.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/mdocml/dist/configure

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/configure
diff -u src/external/bsd/mdocml/dist/configure:1.2 src/external/bsd/mdocml/dist/configure:1.3
--- src/external/bsd/mdocml/dist/configure:1.2	Thu Dec 17 22:31:12 2015
+++ src/external/bsd/mdocml/dist/configure	Sat Dec 19 19:28:06 2015
@@ -343,6 +343,7 @@ __HEREDOC__
 	echo "extern	size_t	  strlcpy(char *, const char *, size_t);"
 
 [ ${HAVE_STRSEP} -eq 0 ] && \
+	echo "#undef strsep"
 	echo "extern	char	 *strsep(char **, const char *);"
 
 [ ${HAVE_STRTONUM} -eq 0 ] && \



CVS commit: src/external/bsd/mdocml/lib/libmandoc

2015-12-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Dec 19 01:19:45 UTC 2015

Modified Files:
src/external/bsd/mdocml/lib/libmandoc: Makefile

Log Message:
Forgot to commit this


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/mdocml/lib/libmandoc/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/lib/libmandoc/Makefile
diff -u src/external/bsd/mdocml/lib/libmandoc/Makefile:1.5 src/external/bsd/mdocml/lib/libmandoc/Makefile:1.6
--- src/external/bsd/mdocml/lib/libmandoc/Makefile:1.5	Thu Dec 17 17:31:01 2015
+++ src/external/bsd/mdocml/lib/libmandoc/Makefile	Fri Dec 18 20:19:45 2015
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.5 2015/12/17 22:31:01 christos Exp $
+# $NetBSD: Makefile,v 1.6 2015/12/19 01:19:45 christos Exp $
 
 LIBISPRIVATE=	yes
 
 LIB=	mandoc
 SRCS=	man.c mandoc_aux.c man_hash.c man_macro.c man_validate.c \
-	att.c lib.c mdoc.c mdoc_argv.c mdoc_hash.c mdoc_macro.c \
+	att.c chars.c lib.c mdoc.c mdoc_argv.c mdoc_hash.c mdoc_macro.c \
 	mdoc_man.c mdoc_validate.c msec.c preconv.c st.c \
 	eqn.c roff.c tbl.c tbl_data.c tbl_layout.c tbl_opts.c \
 	mandoc.c read.c



CVS commit: src/external/bsd/mdocml/bin/mandoc

2015-12-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Dec 18 14:33:54 UTC 2015

Modified Files:
src/external/bsd/mdocml/bin/mandoc: Makefile

Log Message:
chars is part of the library now.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/mdocml/bin/mandoc/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/bin/mandoc/Makefile
diff -u src/external/bsd/mdocml/bin/mandoc/Makefile:1.9 src/external/bsd/mdocml/bin/mandoc/Makefile:1.10
--- src/external/bsd/mdocml/bin/mandoc/Makefile:1.9	Fri Dec 18 06:12:33 2015
+++ src/external/bsd/mdocml/bin/mandoc/Makefile	Fri Dec 18 09:33:54 2015
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.9 2015/12/18 11:12:33 christos Exp $
+# $NetBSD: Makefile,v 1.10 2015/12/18 14:33:54 christos Exp $
 
 .include 
 
 PROG=		mandoc
 
-SRCS=		chars.c main.c out.c tree.c \
+SRCS=		main.c out.c tree.c \
 		eqn_html.c eqn_term.c \
 		html.c man_html.c mdoc_html.c tbl_html.c \
 		manpath.c man_term.c mdoc_term.c term.c term_ascii.c \



CVS commit: src/external/bsd/mdocml/dist

2015-12-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Dec 18 14:30:41 UTC 2015

Modified Files:
src/external/bsd/mdocml/dist: libmandoc.h mandoc.h preconv.c read.c

Log Message:
make buffers for parsing functions const.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/mdocml/dist/libmandoc.h
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/mdocml/dist/mandoc.h
cvs rdiff -u -r1.1.1.3 -r1.2 src/external/bsd/mdocml/dist/preconv.c
cvs rdiff -u -r1.11 -r1.12 src/external/bsd/mdocml/dist/read.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/libmandoc.h
diff -u src/external/bsd/mdocml/dist/libmandoc.h:1.5 src/external/bsd/mdocml/dist/libmandoc.h:1.6
--- src/external/bsd/mdocml/dist/libmandoc.h:1.5	Thu Dec 17 17:31:12 2015
+++ src/external/bsd/mdocml/dist/libmandoc.h	Fri Dec 18 09:30:41 2015
@@ -1,4 +1,4 @@
-/*	$Id: libmandoc.h,v 1.5 2015/12/17 22:31:12 christos Exp $ */
+/*	$Id: libmandoc.h,v 1.6 2015/12/18 14:30:41 christos Exp $ */
 /*
  * Copyright (c) 2009, 2010, 2011, 2012 Kristaps Dzonsons 
  * Copyright (c) 2013, 2014 Ingo Schwarze 
@@ -74,7 +74,7 @@ void		 man_addspan(struct man *, const s
 void		 man_addeqn(struct man *, const struct eqn *);
 
 int		 preconv_cue(const struct buf *, size_t);
-int		 preconv_encode(struct buf *, size_t *,
+int		 preconv_encode(const struct buf *, size_t *,
 			struct buf *, size_t *, int *);
 
 void		 roff_free(struct roff *);

Index: src/external/bsd/mdocml/dist/mandoc.h
diff -u src/external/bsd/mdocml/dist/mandoc.h:1.4 src/external/bsd/mdocml/dist/mandoc.h:1.5
--- src/external/bsd/mdocml/dist/mandoc.h:1.4	Thu Dec 17 17:31:12 2015
+++ src/external/bsd/mdocml/dist/mandoc.h	Fri Dec 18 09:30:41 2015
@@ -1,4 +1,4 @@
-/*	$Id: mandoc.h,v 1.4 2015/12/17 22:31:12 christos Exp $ */
+/*	$Id: mandoc.h,v 1.5 2015/12/18 14:30:41 christos Exp $ */
 /*
  * Copyright (c) 2010, 2011, 2014 Kristaps Dzonsons 
  * Copyright (c) 2010-2015 Ingo Schwarze 
@@ -431,7 +431,7 @@ void		  mparse_free(struct mparse *);
 void		  mparse_keep(struct mparse *);
 enum mandoclevel  mparse_open(struct mparse *, int *, const char *);
 enum mandoclevel  mparse_readfd(struct mparse *, int, const char *);
-enum mandoclevel  mparse_readmem(struct mparse *, void *, size_t,
+enum mandoclevel  mparse_readmem(struct mparse *, const void *, size_t,
 			const char *);
 void		  mparse_reset(struct mparse *);
 void		  mparse_result(struct mparse *,

Index: src/external/bsd/mdocml/dist/preconv.c
diff -u src/external/bsd/mdocml/dist/preconv.c:1.1.1.3 src/external/bsd/mdocml/dist/preconv.c:1.2
--- src/external/bsd/mdocml/dist/preconv.c:1.1.1.3	Thu Dec 17 16:58:48 2015
+++ src/external/bsd/mdocml/dist/preconv.c	Fri Dec 18 09:30:41 2015
@@ -1,4 +1,4 @@
-/*	$Id: preconv.c,v 1.1.1.3 2015/12/17 21:58:48 christos Exp $ */
+/*	$Id: preconv.c,v 1.2 2015/12/18 14:30:41 christos Exp $ */
 /*
  * Copyright (c) 2011 Kristaps Dzonsons 
  * Copyright (c) 2014 Ingo Schwarze 
@@ -26,14 +26,14 @@
 #include "libmandoc.h"
 
 int
-preconv_encode(struct buf *ib, size_t *ii, struct buf *ob, size_t *oi,
+preconv_encode(const struct buf *ib, size_t *ii, struct buf *ob, size_t *oi,
 int *filenc)
 {
-	unsigned char	*cu;
+	const unsigned char	*cu;
 	int		 nby;
 	unsigned int	 accum;
 
-	cu = (unsigned char *)ib->buf + *ii;
+	cu = (const unsigned char *)ib->buf + *ii;
 	assert(*cu & 0x80);
 
 	if ( ! (*filenc & MPARSE_UTF8))
@@ -90,7 +90,7 @@ preconv_encode(struct buf *ib, size_t *i
 	assert(accum < 0xd800 || accum > 0xdfff);
 
 	*oi += snprintf(ob->buf + *oi, 11, "\\[u%.4X]", accum);
-	*ii = (char *)cu - ib->buf;
+	*ii = (const char *)cu - ib->buf;
 	*filenc &= ~MPARSE_LATIN1;
 	return(1);
 

Index: src/external/bsd/mdocml/dist/read.c
diff -u src/external/bsd/mdocml/dist/read.c:1.11 src/external/bsd/mdocml/dist/read.c:1.12
--- src/external/bsd/mdocml/dist/read.c:1.11	Thu Dec 17 17:31:12 2015
+++ src/external/bsd/mdocml/dist/read.c	Fri Dec 18 09:30:41 2015
@@ -1,4 +1,4 @@
-/*	$Id: read.c,v 1.11 2015/12/17 22:31:12 christos Exp $ */
+/*	$Id: read.c,v 1.12 2015/12/18 14:30:41 christos Exp $ */
 /*
  * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons 
  * Copyright (c) 2010-2015 Ingo Schwarze 
@@ -68,7 +68,7 @@ struct	mparse {
 
 static	void	  choose_parser(struct mparse *);
 static	void	  resize_buf(struct buf *, size_t);
-static	void	  mparse_buf_r(struct mparse *, struct buf, size_t, int);
+static	void	  mparse_buf_r(struct mparse *, const struct buf, size_t, int);
 static	int	  read_whole_file(struct mparse *, const char *, int,
 struct buf *, int *);
 static	void	  mparse_end(struct mparse *);
@@ -318,7 +318,7 @@ choose_parser(struct mparse *curp)
  * and indirectly (for .so file inclusion).
  */
 static void
-mparse_buf_r(struct mparse *curp, struct buf blk, size_t i, int start)
+mparse_buf_r(struct mparse *curp, const struct buf blk, size_t i, int start)
 {
 	const struct tbl_

CVS commit: src/external/bsd/mdocml/bin/mandoc

2015-12-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Dec 18 11:12:33 UTC 2015

Modified Files:
src/external/bsd/mdocml/bin/mandoc: Makefile

Log Message:
more sources for compat.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/mdocml/bin/mandoc/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/bin/mandoc/Makefile
diff -u src/external/bsd/mdocml/bin/mandoc/Makefile:1.8 src/external/bsd/mdocml/bin/mandoc/Makefile:1.9
--- src/external/bsd/mdocml/bin/mandoc/Makefile:1.8	Thu Dec 17 17:31:01 2015
+++ src/external/bsd/mdocml/bin/mandoc/Makefile	Fri Dec 18 06:12:33 2015
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.8 2015/12/17 22:31:01 christos Exp $
+# $NetBSD: Makefile,v 1.9 2015/12/18 11:12:33 christos Exp $
 
 .include 
 
@@ -17,7 +17,7 @@ CPPFLAGS+=	-DUSE_WCHAR
 .else
 SRCS.libmandoc!=cd ${.PARSEDIR}/../../lib/libmandoc && ${MAKE} -V '$${SRCS}'
 
-SRCS+=		${SRCS.libmandoc}
+SRCS+=		${SRCS.libmandoc} compat_strtonum.c compat_reallocarray.c
 .endif
 
 .include 



CVS commit: src/external/bsd/mdocml

2015-12-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Dec 17 22:31:01 UTC 2015

Modified Files:
src/external/bsd/mdocml: Makefile.inc prepare-import.sh
src/external/bsd/mdocml/bin/mandoc: Makefile
src/external/bsd/mdocml/lib/libmandoc: Makefile
Added Files:
src/external/bsd/mdocml/include: config.h

Log Message:
merge conflicts.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/external/bsd/mdocml/Makefile.inc
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/mdocml/prepare-import.sh
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/mdocml/bin/mandoc/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/mdocml/include/config.h
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/mdocml/lib/libmandoc/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/Makefile.inc
diff -u src/external/bsd/mdocml/Makefile.inc:1.16 src/external/bsd/mdocml/Makefile.inc:1.17
--- src/external/bsd/mdocml/Makefile.inc:1.16	Sun Jan  5 14:49:57 2014
+++ src/external/bsd/mdocml/Makefile.inc	Thu Dec 17 17:31:01 2015
@@ -1,14 +1,11 @@
-# $NetBSD: Makefile.inc,v 1.16 2014/01/05 19:49:57 joerg Exp $
+# $NetBSD: Makefile.inc,v 1.17 2015/12/17 22:31:01 christos Exp $
 
 .include 
 
 
 .if (${HOSTPROG:U} == "")
-CPPFLAGS+=	-DHAVE_FGETLN -DHAVE_MMAP -DHAVE_GETSUBOPT \
-		-DHAVE_STRCASESTR -DHAVE_STRLCAT -DHAVE_STRLCPY \
-		-DHAVE_STRNLEN -DHAVE_STRPTIME -DHAVE_STRSEP
 VERSION!=	cd ${.PARSEDIR}/dist && ${MAKE} -V VERSION
-CPPFLAGS+=	-DVERSION=\"${VERSION}\"
+CPPFLAGS+=	-DVERSION=\"${VERSION}\" -I${DISTDIR}/../include
 .endif
 
 DISTDIR:=	${.PARSEDIR}/dist

Index: src/external/bsd/mdocml/prepare-import.sh
diff -u src/external/bsd/mdocml/prepare-import.sh:1.7 src/external/bsd/mdocml/prepare-import.sh:1.8
--- src/external/bsd/mdocml/prepare-import.sh:1.7	Sun Jan  5 14:49:57 2014
+++ src/external/bsd/mdocml/prepare-import.sh	Thu Dec 17 17:31:01 2015
@@ -4,9 +4,6 @@ set -e
 
 rm -rf CVS ChangeLog.xsl style.css index.css *.sgml regress
 
-uuencode external.png < external.png > external.png.uu
-rm external.png
-
 cleantags .
 for f in [a-z]*; do
 	sed -e 's/[$]Mdocdate: \([^$]*\) \([0-9][0-9][0-9][0-9]\) [$]/\1, \2/' < $f > $f.new && mv $f.new $f

Index: src/external/bsd/mdocml/bin/mandoc/Makefile
diff -u src/external/bsd/mdocml/bin/mandoc/Makefile:1.7 src/external/bsd/mdocml/bin/mandoc/Makefile:1.8
--- src/external/bsd/mdocml/bin/mandoc/Makefile:1.7	Thu Mar 13 05:13:32 2014
+++ src/external/bsd/mdocml/bin/mandoc/Makefile	Thu Dec 17 17:31:01 2015
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.7 2014/03/13 09:13:32 wiz Exp $
+# $NetBSD: Makefile,v 1.8 2015/12/17 22:31:01 christos Exp $
 
 .include 
 
@@ -7,7 +7,7 @@ PROG=		mandoc
 SRCS=		chars.c main.c out.c tree.c \
 		eqn_html.c eqn_term.c \
 		html.c man_html.c mdoc_html.c tbl_html.c \
-		man_term.c mdoc_term.c term.c term_ascii.c \
+		manpath.c man_term.c mdoc_term.c term.c term_ascii.c \
 		term_ps.c tbl_term.c
 
 .ifndef HOSTPROG

Index: src/external/bsd/mdocml/lib/libmandoc/Makefile
diff -u src/external/bsd/mdocml/lib/libmandoc/Makefile:1.4 src/external/bsd/mdocml/lib/libmandoc/Makefile:1.5
--- src/external/bsd/mdocml/lib/libmandoc/Makefile:1.4	Tue Oct 11 15:20:14 2011
+++ src/external/bsd/mdocml/lib/libmandoc/Makefile	Thu Dec 17 17:31:01 2015
@@ -1,11 +1,11 @@
-# $NetBSD: Makefile,v 1.4 2011/10/11 19:20:14 joerg Exp $
+# $NetBSD: Makefile,v 1.5 2015/12/17 22:31:01 christos Exp $
 
 LIBISPRIVATE=	yes
 
 LIB=	mandoc
-SRCS=	man.c man_hash.c man_macro.c man_validate.c \
-	arch.c att.c lib.c mdoc.c mdoc_argv.c mdoc_hash.c mdoc_macro.c \
-	mdoc_man.c mdoc_validate.c msec.c st.c vol.c \
+SRCS=	man.c mandoc_aux.c man_hash.c man_macro.c man_validate.c \
+	att.c lib.c mdoc.c mdoc_argv.c mdoc_hash.c mdoc_macro.c \
+	mdoc_man.c mdoc_validate.c msec.c preconv.c st.c \
 	eqn.c roff.c tbl.c tbl_data.c tbl_layout.c tbl_opts.c \
 	mandoc.c read.c
 MAN=	mandoc.3

Added files:

Index: src/external/bsd/mdocml/include/config.h
diff -u /dev/null src/external/bsd/mdocml/include/config.h:1.1
--- /dev/null	Thu Dec 17 17:31:01 2015
+++ src/external/bsd/mdocml/include/config.h	Thu Dec 17 17:31:01 2015
@@ -0,0 +1,54 @@
+#ifndef MANDOC_CONFIG_H
+#define MANDOC_CONFIG_H
+
+#if defined(__linux__) || defined(__MINT__)
+#define _GNU_SOURCE	/* See test-*.c what needs this. */
+#endif
+
+#include 
+
+#define HAVE_DIRENT_NAMLEN 1
+#define HAVE_FGETLN 1
+#define HAVE_FTS 1
+#define HAVE_GETSUBOPT 0
+#define HAVE_MMAP 1
+#define HAVE_REALLOCARRAY 0
+#define HAVE_STRCASESTR 1
+#define HAVE_STRLCAT 1
+#define HAVE_STRLCPY 1
+#define HAVE_STRPTIME 1
+#define HAVE_STRSEP 1
+#define HAVE_STRTONUM 0
+#define HAVE_WCHAR 1
+#if 0
+#define HAVE_SQLITE3 1
+#define HAVE_SQLITE3_ERRSTR 1
+#endif
+#define HAVE_OHASH 0
+#define HAVE_MANPATH 0
+
+#define BINM_APROPOS "apropos"
+#define BINM_MAN "man"
+#define BINM_WHATIS "whatis"
+#define BINM_MAKEWHATIS "makewhatis"
+
+#if !defined(__BEGIN_DECLS)
+#  ifde

CVS commit: src/external/bsd/mdocml/dist

2015-11-21 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Sun Nov 22 05:01:44 UTC 2015

Modified Files:
src/external/bsd/mdocml/dist: lib.in

Log Message:
+libpanel


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/external/bsd/mdocml/dist/lib.in

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/lib.in
diff -u src/external/bsd/mdocml/dist/lib.in:1.17 src/external/bsd/mdocml/dist/lib.in:1.18
--- src/external/bsd/mdocml/dist/lib.in:1.17	Mon Sep 28 22:11:40 2015
+++ src/external/bsd/mdocml/dist/lib.in	Sun Nov 22 05:01:44 2015
@@ -82,6 +82,7 @@ LINE("libnetpgpverify",	"Netpgp Verifica
 LINE("libnpf",		"NPF Packet Filter Library (libnpf, \\-lnpf)")
 LINE("libossaudio",	"OSS Audio Emulation Library (libossaudio, \\-lossaudio)")
 LINE("libpam",		"Pluggable Authentication Module Library (libpam, \\-lpam)")
+LINE("libpanel",	"Z-order for curses windows (libpanel, \\-lpanel)")
 LINE("libpcap",		"Capture Library (libpcap, \\-lpcap)")
 LINE("libpci",		"PCI Bus Access Library (libpci, \\-lpci)")
 LINE("libpmc",		"Performance Counters Library (libpmc, \\-lpmc)")



CVS commit: src/external/bsd/mdocml/dist

2015-09-28 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Sep 28 22:11:40 UTC 2015

Modified Files:
src/external/bsd/mdocml/dist: lib.in

Log Message:
Fix typo.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/external/bsd/mdocml/dist/lib.in

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/lib.in
diff -u src/external/bsd/mdocml/dist/lib.in:1.16 src/external/bsd/mdocml/dist/lib.in:1.17
--- src/external/bsd/mdocml/dist/lib.in:1.16	Mon Sep 28 21:05:57 2015
+++ src/external/bsd/mdocml/dist/lib.in	Mon Sep 28 22:11:40 2015
@@ -89,7 +89,7 @@ LINE("libppath",	"Property-List Paths Li
 LINE("libposix",	"POSIX Compatibility Library (libposix, \\-lposix)")
 LINE("libposix1e",	"POSIX.1e Security API Library (libposix1e, \\-lposix1e)")
 LINE("libppath",	"Property-List Paths Library (libppath, \\-lppath)")
-LINE("libprop",		"Process Manipulation Library (libproc, \\-lproc)")
+LINE("libproc",		"Process Manipulation Library (libproc, \\-lproc)")
 LINE("libprop",		"Property Container Object Library (libprop, \\-lprop)")
 LINE("libpthread",	"POSIX Threads Library (libpthread, \\-lpthread)")
 LINE("libpuffs",	"puffs Convenience Library (libpuffs, \\-lpuffs)")



CVS commit: src/external/bsd/mdocml/dist

2015-09-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Sep 28 21:05:57 UTC 2015

Modified Files:
src/external/bsd/mdocml/dist: lib.in

Log Message:
Add libproc/librtld_db


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/external/bsd/mdocml/dist/lib.in

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/lib.in
diff -u src/external/bsd/mdocml/dist/lib.in:1.15 src/external/bsd/mdocml/dist/lib.in:1.16
--- src/external/bsd/mdocml/dist/lib.in:1.15	Sun Jan  5 14:27:20 2014
+++ src/external/bsd/mdocml/dist/lib.in	Mon Sep 28 17:05:57 2015
@@ -89,6 +89,7 @@ LINE("libppath",	"Property-List Paths Li
 LINE("libposix",	"POSIX Compatibility Library (libposix, \\-lposix)")
 LINE("libposix1e",	"POSIX.1e Security API Library (libposix1e, \\-lposix1e)")
 LINE("libppath",	"Property-List Paths Library (libppath, \\-lppath)")
+LINE("libprop",		"Process Manipulation Library (libproc, \\-lproc)")
 LINE("libprop",		"Property Container Object Library (libprop, \\-lprop)")
 LINE("libpthread",	"POSIX Threads Library (libpthread, \\-lpthread)")
 LINE("libpuffs",	"puffs Convenience Library (libpuffs, \\-lpuffs)")
@@ -99,6 +100,7 @@ LINE("libresolv",	"DNS Resolver Library 
 LINE("librpcsec_gss",	"RPC GSS-API Authentication Library (librpcsec_gss, \\-lrpcsec_gss)")
 LINE("librpcsvc",	"RPC Service Library (librpcsvc, \\-lrpcsvc)")
 LINE("librt",		"POSIX Real\\-time Library (librt, \\-lrt)")
+LINE("librtld_db",	"Debugging interface to the runtime linker Library (librtld_db, \\-lrtld_db)")
 LINE("librumpclient",	"Clientside Stubs for rump Kernel Remote Protocols (librumpclient, \\-lrumpclient)")
 LINE("libsaslc",	"Simple Authentication and Security Layer client library (libsaslc, \\-lsaslc)")
 LINE("libsdp",		"Bluetooth Service Discovery Protocol User Library (libsdp, \\-lsdp)")



CVS commit: src/external/bsd/mdocml/bin/mandoc

2014-03-13 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Thu Mar 13 09:13:32 UTC 2014

Modified Files:
src/external/bsd/mdocml/bin/mandoc: Makefile

Log Message:
When not built as host tool, define USE_WCHAR to get locale support.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/mdocml/bin/mandoc/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/bin/mandoc/Makefile
diff -u src/external/bsd/mdocml/bin/mandoc/Makefile:1.6 src/external/bsd/mdocml/bin/mandoc/Makefile:1.7
--- src/external/bsd/mdocml/bin/mandoc/Makefile:1.6	Tue Oct 11 19:20:13 2011
+++ src/external/bsd/mdocml/bin/mandoc/Makefile	Thu Mar 13 09:13:32 2014
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.6 2011/10/11 19:20:13 joerg Exp $
+# $NetBSD: Makefile,v 1.7 2014/03/13 09:13:32 wiz Exp $
 
 .include 
 
@@ -13,6 +13,7 @@ SRCS=		chars.c main.c out.c tree.c \
 .ifndef HOSTPROG
 DPADD+= 	${MDOCMLLIB.mandoc}
 LDADD+= 	-L${MDOCMLOBJDIR.mandoc} -lmandoc
+CPPFLAGS+=	-DUSE_WCHAR
 .else
 SRCS.libmandoc!=cd ${.PARSEDIR}/../../lib/libmandoc && ${MAKE} -V '$${SRCS}'
 



CVS commit: src/external/bsd/mdocml/dist

2014-01-05 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sun Jan  5 20:38:55 UTC 2014

Modified Files:
src/external/bsd/mdocml/dist: roff.c

Log Message:
Restore cast hack for GCC's "new qualifiers in middle of multi-level
non-const cast" warning.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/external/bsd/mdocml/dist/roff.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/roff.c
diff -u src/external/bsd/mdocml/dist/roff.c:1.15 src/external/bsd/mdocml/dist/roff.c:1.16
--- src/external/bsd/mdocml/dist/roff.c:1.15	Sun Jan  5 19:27:20 2014
+++ src/external/bsd/mdocml/dist/roff.c	Sun Jan  5 20:38:55 2014
@@ -646,7 +646,7 @@ roff_parsetext(char **bufp, size_t *szp,
 		if ('\\' == *p) {
 			/* Skip over escapes. */
 			p++;
-			esc = mandoc_escape((const char **)&p, NULL, NULL);
+			esc = mandoc_escape((const char **)(void *)&p, NULL, NULL);
 			if (ESCAPE_ERROR == esc)
 break;
 			continue;



CVS commit: src/external/bsd/mdocml

2013-12-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec 29 00:23:34 UTC 2013

Modified Files:
src/external/bsd/mdocml: prepare-import.sh

Log Message:
Use cleantags to remove RCS tags, missed the NEWS file before.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/mdocml/prepare-import.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/prepare-import.sh
diff -u src/external/bsd/mdocml/prepare-import.sh:1.5 src/external/bsd/mdocml/prepare-import.sh:1.6
--- src/external/bsd/mdocml/prepare-import.sh:1.5	Wed Apr  3 10:51:31 2013
+++ src/external/bsd/mdocml/prepare-import.sh	Sat Dec 28 19:23:34 2013
@@ -1,4 +1,4 @@
-#/bin/sh
+#!/bin/sh
 
 set -e
 
@@ -7,7 +7,7 @@ rm -rf ChangeLog.xsl style.css index.css
 uuencode external.png < external.png > external.png.uu
 rm external.png
 
+cleantags .
 for f in [a-z]*; do
-	sed -e 's/[$]Id:/\$Vendor-Id:/' \
-	-e 's/[$]Mdocdate: \([^$]*\) \([0-9][0-9][0-9][0-9]\) [$]/\1, \2/' < $f > $f.new && mv $f.new $f
+	sed -e 's/[$]Mdocdate: \([^$]*\) \([0-9][0-9][0-9][0-9]\) [$]/\1, \2/' < $f > $f.new && mv $f.new $f
 done



CVS commit: src/external/bsd/mdocml/dist

2013-12-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Dec 25 15:09:27 UTC 2013

Modified Files:
src/external/bsd/mdocml/dist: st.in

Log Message:
add p1003.1j


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.8 -r1.2 src/external/bsd/mdocml/dist/st.in

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/st.in
diff -u src/external/bsd/mdocml/dist/st.in:1.1.1.8 src/external/bsd/mdocml/dist/st.in:1.2
--- src/external/bsd/mdocml/dist/st.in:1.1.1.8	Wed Apr  3 10:46:53 2013
+++ src/external/bsd/mdocml/dist/st.in	Wed Dec 25 10:09:27 2013
@@ -40,6 +40,7 @@ LINE("-p1003.1b-93",	"IEEE Std 1003.1b-1
 LINE("-p1003.1c-95",	"IEEE Std 1003.1c-1995 (\\(lqPOSIX.1\\(rq)")
 LINE("-p1003.1g-2000",	"IEEE Std 1003.1g-2000 (\\(lqPOSIX.1\\(rq)")
 LINE("-p1003.1i-95",	"IEEE Std 1003.1i-1995 (\\(lqPOSIX.1\\(rq)")
+LINE("-p1003.1j-2000",	"IEEE Std 1003.1j-2000 (\\(lqPOSIX.1\\(rq)")
 LINE("-p1003.2-92",	"IEEE Std 1003.2-1992 (\\(lqPOSIX.2\\(rq)")
 LINE("-p1003.2a-92",	"IEEE Std 1003.2a-1992 (\\(lqPOSIX.2\\(rq)")
 LINE("-p1387.2-95",	"IEEE Std 1387.2-1995 (\\(lqPOSIX.7.2\\(rq)")



CVS commit: src/external/bsd/mdocml/dist

2013-12-17 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Dec 17 09:28:10 UTC 2013

Modified Files:
src/external/bsd/mdocml/dist: mdoc_argv.c

Log Message:
Fix handling of nested double quotes.

>From Ingo Schwarze  based on patch by enami@
in PR 48438.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/mdocml/dist/mdoc_argv.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/mdoc_argv.c
diff -u src/external/bsd/mdocml/dist/mdoc_argv.c:1.4 src/external/bsd/mdocml/dist/mdoc_argv.c:1.5
--- src/external/bsd/mdocml/dist/mdoc_argv.c:1.4	Wed Apr  3 14:50:26 2013
+++ src/external/bsd/mdocml/dist/mdoc_argv.c	Tue Dec 17 09:28:10 2013
@@ -453,6 +453,7 @@ args(struct mdoc *m, int line, int *pos,
 		char *buf, enum argsflag fl, char **v)
 {
 	char		*p, *pp;
+	int		 pairs;
 	enum margserr	 rc;
 
 	if ('\0' == buf[*pos]) {
@@ -546,6 +547,8 @@ args(struct mdoc *m, int line, int *pos,
 	/* 
 	 * Process a quoted literal.  A quote begins with a double-quote
 	 * and ends with a double-quote NOT preceded by a double-quote.
+	 * Null-terminate the literal in place.
+	 * Collapse pairs of quotes inside quoted literals.
 	 * Whitespace is NOT involved in literal termination.
 	 */
 
@@ -556,13 +559,22 @@ args(struct mdoc *m, int line, int *pos,
 		if (MDOC_PPHRASE & m->flags)
 			m->flags |= MDOC_PHRASELIT;
 
+		pairs = 0;
 		for ( ; buf[*pos]; (*pos)++) {
+			/* Move following text left after quoted quotes. */
+			if (pairs)
+buf[*pos - pairs] = buf[*pos];
 			if ('\"' != buf[*pos])
 continue;
+			/* Unquoted quotes end quoted args. */
 			if ('\"' != buf[*pos + 1])
 break;
+			/* Quoted quotes collapse. */
+			pairs++;
 			(*pos)++;
 		}
+		if (pairs)
+			buf[*pos - pairs] = '\0';
 
 		if ('\0' == buf[*pos]) {
 			if (MDOC_PPHRASE & m->flags)



CVS commit: src/external/bsd/mdocml

2013-04-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Apr  3 14:51:31 UTC 2013

Modified Files:
src/external/bsd/mdocml: prepare-import.sh

Log Message:
don't assume that what we are going to import lives in dist


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/mdocml/prepare-import.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/prepare-import.sh
diff -u src/external/bsd/mdocml/prepare-import.sh:1.4 src/external/bsd/mdocml/prepare-import.sh:1.5
--- src/external/bsd/mdocml/prepare-import.sh:1.4	Wed Jan 12 18:00:51 2011
+++ src/external/bsd/mdocml/prepare-import.sh	Wed Apr  3 10:51:31 2013
@@ -2,7 +2,6 @@
 
 set -e
 
-cd dist
 rm -rf ChangeLog.xsl style.css index.css *.sgml
 
 uuencode external.png < external.png > external.png.uu



CVS commit: src/external/bsd/mdocml/dist

2013-04-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Apr  3 14:50:26 UTC 2013

Modified Files:
src/external/bsd/mdocml/dist: mdoc_argv.c mdoc_validate.c

Log Message:
merge diffs


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/mdocml/dist/mdoc_argv.c
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/mdocml/dist/mdoc_validate.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/mdoc_argv.c
diff -u src/external/bsd/mdocml/dist/mdoc_argv.c:1.3 src/external/bsd/mdocml/dist/mdoc_argv.c:1.4
--- src/external/bsd/mdocml/dist/mdoc_argv.c:1.3	Tue Oct 11 15:12:13 2011
+++ src/external/bsd/mdocml/dist/mdoc_argv.c	Wed Apr  3 10:50:26 2013
@@ -1,4 +1,4 @@
-/*	$Vendor-Id: mdoc_argv.c,v 1.81 2011/09/18 14:14:15 schwarze Exp $ */
+/*	$Vendor-Id: mdoc_argv.c,v 1.82 2012/03/23 05:50:24 kristaps Exp $ */
 /*
  * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons 
  *
@@ -81,7 +81,7 @@ static	const enum argvflag argvflags[MDO
 	ARGV_NONE,	/* MDOC_Ohang */
 	ARGV_NONE,	/* MDOC_Inset */
 	ARGV_MULTI,	/* MDOC_Column */
-	ARGV_SINGLE,	/* MDOC_Width */
+	ARGV_OPT_SINGLE, /* MDOC_Width */
 	ARGV_NONE,	/* MDOC_Compact */
 	ARGV_NONE,	/* MDOC_Std */
 	ARGV_NONE,	/* MDOC_Filled */

Index: src/external/bsd/mdocml/dist/mdoc_validate.c
diff -u src/external/bsd/mdocml/dist/mdoc_validate.c:1.4 src/external/bsd/mdocml/dist/mdoc_validate.c:1.5
--- src/external/bsd/mdocml/dist/mdoc_validate.c:1.4	Mon Jan 30 12:03:01 2012
+++ src/external/bsd/mdocml/dist/mdoc_validate.c	Wed Apr  3 10:50:26 2013
@@ -1,4 +1,4 @@
-/*	$Vendor-Id: mdoc_validate.c,v 1.181 2011/12/03 16:58:54 schwarze Exp $ */
+/*	$Vendor-Id: mdoc_validate.c,v 1.182 2012/03/23 05:50:25 kristaps Exp $ */
 /*
  * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons 
  * Copyright (c) 2010, 2011 Ingo Schwarze 
@@ -661,8 +661,13 @@ pre_bl(PRE_ARGS)
 			comp = 1;
 			break;
 		case (MDOC_Width):
-			dup = (NULL != n->norm->Bl.width);
-			width = n->args->argv[i].value[0];
+			/* NB: this can be empty! */
+			if (n->args->argv[i].sz) {
+width = n->args->argv[i].value[0];
+dup = (NULL != n->norm->Bl.width);
+break;
+			}
+			mdoc_nmsg(mdoc, n, MANDOCERR_IGNARGV);
 			break;
 		case (MDOC_Offset):
 			/* NB: this can be empty! */



CVS commit: src/external/bsd/mdocml/dist

2013-04-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Apr  3 14:46:57 UTC 2013

Update of /cvsroot/src/external/bsd/mdocml/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv4396

Log Message:
import latest

Status:

Vendor Tag: KRISTAPS
Release Tags:   mdocml-1-12-1

U src/external/bsd/mdocml/dist/apropos.1
U src/external/bsd/mdocml/dist/Makefile
N src/external/bsd/mdocml/dist/TODO
U src/external/bsd/mdocml/dist/compat_fgetln.c
U src/external/bsd/mdocml/dist/apropos.c
U src/external/bsd/mdocml/dist/apropos_db.c
U src/external/bsd/mdocml/dist/apropos_db.h
U src/external/bsd/mdocml/dist/arch.c
U src/external/bsd/mdocml/dist/arch.in
U src/external/bsd/mdocml/dist/att.c
U src/external/bsd/mdocml/dist/att.in
U src/external/bsd/mdocml/dist/catman.8
U src/external/bsd/mdocml/dist/catman.c
U src/external/bsd/mdocml/dist/cgi.c
U src/external/bsd/mdocml/dist/chars.c
U src/external/bsd/mdocml/dist/chars.in
U src/external/bsd/mdocml/dist/example.style.css
U src/external/bsd/mdocml/dist/compat_getsubopt.c
U src/external/bsd/mdocml/dist/compat_strlcat.c
U src/external/bsd/mdocml/dist/compat_strlcpy.c
U src/external/bsd/mdocml/dist/config.h.post
U src/external/bsd/mdocml/dist/config.h.pre
U src/external/bsd/mdocml/dist/demandoc.1
U src/external/bsd/mdocml/dist/demandoc.c
U src/external/bsd/mdocml/dist/eqn.7
U src/external/bsd/mdocml/dist/eqn.c
U src/external/bsd/mdocml/dist/eqn_html.c
U src/external/bsd/mdocml/dist/eqn_term.c
U src/external/bsd/mdocml/dist/man_validate.c
U src/external/bsd/mdocml/dist/html.c
U src/external/bsd/mdocml/dist/html.h
U src/external/bsd/mdocml/dist/external.png.uu
U src/external/bsd/mdocml/dist/lib.c
U src/external/bsd/mdocml/dist/lib.in
U src/external/bsd/mdocml/dist/libman.h
U src/external/bsd/mdocml/dist/libmandoc.h
U src/external/bsd/mdocml/dist/libmdoc.h
U src/external/bsd/mdocml/dist/libroff.h
U src/external/bsd/mdocml/dist/main.c
U src/external/bsd/mdocml/dist/main.h
U src/external/bsd/mdocml/dist/man.7
U src/external/bsd/mdocml/dist/man.c
U src/external/bsd/mdocml/dist/man.cgi.7
U src/external/bsd/mdocml/dist/man-cgi.css
U src/external/bsd/mdocml/dist/man.h
U src/external/bsd/mdocml/dist/man_hash.c
U src/external/bsd/mdocml/dist/man_html.c
U src/external/bsd/mdocml/dist/man_macro.c
U src/external/bsd/mdocml/dist/man_term.c
U src/external/bsd/mdocml/dist/mandoc_char.7
U src/external/bsd/mdocml/dist/mandoc.1
U src/external/bsd/mdocml/dist/mandoc.3
U src/external/bsd/mdocml/dist/mandoc.c
C src/external/bsd/mdocml/dist/mandoc.h
C src/external/bsd/mdocml/dist/mdoc_validate.c
U src/external/bsd/mdocml/dist/mandocdb.8
U src/external/bsd/mdocml/dist/mandocdb.c
U src/external/bsd/mdocml/dist/mandocdb.h
U src/external/bsd/mdocml/dist/manpath.c
U src/external/bsd/mdocml/dist/manpath.h
U src/external/bsd/mdocml/dist/mdoc.7
U src/external/bsd/mdocml/dist/mdoc.c
U src/external/bsd/mdocml/dist/mdoc.h
C src/external/bsd/mdocml/dist/mdoc_argv.c
U src/external/bsd/mdocml/dist/mdoc_hash.c
U src/external/bsd/mdocml/dist/mdoc_html.c
U src/external/bsd/mdocml/dist/mdoc_macro.c
U src/external/bsd/mdocml/dist/mdoc_man.c
U src/external/bsd/mdocml/dist/mdoc_term.c
U src/external/bsd/mdocml/dist/test-fgetln.c
U src/external/bsd/mdocml/dist/msec.c
U src/external/bsd/mdocml/dist/msec.in
U src/external/bsd/mdocml/dist/out.c
U src/external/bsd/mdocml/dist/out.h
U src/external/bsd/mdocml/dist/preconv.1
U src/external/bsd/mdocml/dist/preconv.c
U src/external/bsd/mdocml/dist/predefs.in
C src/external/bsd/mdocml/dist/read.c
U src/external/bsd/mdocml/dist/roff.7
U src/external/bsd/mdocml/dist/roff.c
U src/external/bsd/mdocml/dist/st.c
U src/external/bsd/mdocml/dist/st.in
U src/external/bsd/mdocml/dist/tbl.7
U src/external/bsd/mdocml/dist/tbl.c
U src/external/bsd/mdocml/dist/tbl_data.c
U src/external/bsd/mdocml/dist/tbl_html.c
U src/external/bsd/mdocml/dist/tbl_layout.c
U src/external/bsd/mdocml/dist/tbl_opts.c
U src/external/bsd/mdocml/dist/tbl_term.c
U src/external/bsd/mdocml/dist/term.c
U src/external/bsd/mdocml/dist/term.h
U src/external/bsd/mdocml/dist/term_ascii.c
U src/external/bsd/mdocml/dist/term_ps.c
U src/external/bsd/mdocml/dist/test-getsubopt.c
U src/external/bsd/mdocml/dist/test-mmap.c
U src/external/bsd/mdocml/dist/test-strlcat.c
U src/external/bsd/mdocml/dist/test-strlcpy.c
U src/external/bsd/mdocml/dist/test-strptime.c
U src/external/bsd/mdocml/dist/tree.c
U src/external/bsd/mdocml/dist/vol.c
U src/external/bsd/mdocml/dist/vol.in
U src/external/bsd/mdocml/dist/whatis.1

4 conflicts created by this import.
Use the following command to help the merge:

cvs checkout -jKRISTAPS:yesterday -jKRISTAPS 
src/external/bsd/mdocml/dist



CVS commit: src/external/bsd/mdocml/dist

2013-04-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Apr  3 01:05:16 UTC 2013

Modified Files:
src/external/bsd/mdocml/dist: roff.c

Log Message:
Allow both x==y and x=y in conditionals. With this change the ksh93 manpage
works.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/external/bsd/mdocml/dist/roff.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/roff.c
diff -u src/external/bsd/mdocml/dist/roff.c:1.12 src/external/bsd/mdocml/dist/roff.c:1.13
--- src/external/bsd/mdocml/dist/roff.c:1.12	Tue Apr  2 21:00:03 2013
+++ src/external/bsd/mdocml/dist/roff.c	Tue Apr  2 21:05:16 2013
@@ -1095,6 +1095,8 @@ roff_getop(const char *v, int *pos)
 			return c;
 		}
 		switch (c) {
+		case '=':
+			return '=';
 		case '>':
 			return 'g';
 		case '<':



CVS commit: src/external/bsd/mdocml/dist

2013-04-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Apr  3 01:00:03 UTC 2013

Modified Files:
src/external/bsd/mdocml/dist: roff.c

Log Message:
remove debugging printf.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/external/bsd/mdocml/dist/roff.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/roff.c
diff -u src/external/bsd/mdocml/dist/roff.c:1.11 src/external/bsd/mdocml/dist/roff.c:1.12
--- src/external/bsd/mdocml/dist/roff.c:1.11	Tue Apr  2 20:58:48 2013
+++ src/external/bsd/mdocml/dist/roff.c	Tue Apr  2 21:00:03 2013
@@ -1161,7 +1161,6 @@ roff_evalcond(const char *v, int *pos)
 out:
 	if (not)
 		lh = !lh;
-	fprintf(stderr, "res=[%d]\n", lh);
 	return lh ? ROFFRULE_ALLOW : ROFFRULE_DENY;
 }
 



CVS commit: src/external/bsd/mdocml/dist

2013-04-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Apr  3 00:58:49 UTC 2013

Modified Files:
src/external/bsd/mdocml/dist: roff.c

Log Message:
- remove the expand inline function, we don't need it.
- make allow = 1, deny = 0 to avoid confusion
- use memset properly
- merge ctl duplicated code
- add numeric conditional evaluator for unary and binary
- fix parsing of numeric registers to stop on non alnum

With those fixes, the man page for top(1) works.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/mdocml/dist/roff.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/roff.c
diff -u src/external/bsd/mdocml/dist/roff.c:1.10 src/external/bsd/mdocml/dist/roff.c:1.11
--- src/external/bsd/mdocml/dist/roff.c:1.10	Fri Mar 22 08:31:25 2013
+++ src/external/bsd/mdocml/dist/roff.c	Tue Apr  2 20:58:48 2013
@@ -72,8 +72,8 @@ enum	rofft {
 };
 
 enum	roffrule {
-	ROFFRULE_ALLOW,
-	ROFFRULE_DENY
+	ROFFRULE_DENY,
+	ROFFRULE_ALLOW
 };
 
 /*
@@ -177,8 +177,6 @@ static	enum rofferr	 roff_cond(ROFF_ARGS
 static	enum rofferr	 roff_cond_text(ROFF_ARGS);
 static	enum rofferr	 roff_cond_sub(ROFF_ARGS);
 static	enum rofferr	 roff_ds(ROFF_ARGS);
-static  void		 roff_expand_nr_inplace(struct roff *, char **, int *,
-size_t *);
 static	enum roffrule	 roff_evalcond(const char *, int *);
 static	void		 roff_free1(struct roff *);
 static	void		 roff_freestr(struct roffkv *);
@@ -397,7 +395,8 @@ roff_reset(struct roff *r)
 
 	roff_free1(r);
 
-	memset(&r->regs, 0, sizeof(struct reg) * REG__MAX);
+	memset(&r->regs, 0, sizeof(r->regs));
+	memset(&r->nr, 0, sizeof(r->nr));
 
 	for (i = 0; i < PREDEFS_MAX; i++) 
 		roff_setstr(r, predefs[i].name, predefs[i].str, 0);
@@ -626,20 +625,16 @@ roff_parseln(struct roff *r, int ln, cha
 	 * no matter our state.
 	 */
 
-	if (r->last && ! ctl) {
-		t = r->last->tok;
-		assert(roffs[t].text);
-		e = (*roffs[t].text)
-			(r, t, bufp, szp, ln, pos, pos, offs);
-		assert(ROFF_IGN == e || ROFF_CONT == e);
-		if (ROFF_CONT != e)
-			return(e);
-		if (r->eqn)
-			return(eqn_read(&r->eqn, ln, *bufp, pos, offs));
-		if (r->tbl)
-			return(tbl_read(r->tbl, ln, *bufp, pos));
-		return(roff_parsetext(*bufp + pos));
-	} else if ( ! ctl) {
+	if (!ctl) {
+		if (r->last) {
+			t = r->last->tok;
+			assert(roffs[t].text);
+			e = (*roffs[t].text)
+			(r, t, bufp, szp, ln, pos, pos, offs);
+			assert(ROFF_IGN == e || ROFF_CONT == e);
+			if (ROFF_CONT != e)
+return(e);
+		}
 		if (r->eqn)
 			return(eqn_read(&r->eqn, ln, *bufp, pos, offs));
 		if (r->tbl)
@@ -1055,12 +1050,6 @@ roff_cond_text(ROFF_ARGS)
 	ep = &(*bufp)[pos];
 	for ( ; NULL != (ep = strchr(ep, '\\')); ep++) {
 		ep++;
-		if (*ep == 'n') {
-			int i = ep - *bufp - 1;
-			roff_expand_nr_inplace(r, bufp, &i, szp);
-			ep = *bufp + i;
-			continue;
-		}
 		if ('}' != *ep)
 			continue;
 		*ep = '&';
@@ -1070,10 +1059,59 @@ roff_cond_text(ROFF_ARGS)
 	return(ROFFRULE_DENY == rr ? ROFF_IGN : ROFF_CONT);
 }
 
+static int
+roff_getnum(const char *v, int *pos, int *res)
+{
+	int p, n;
+
+	if ((n = (v[*pos] == '-')) != 0)
+		(*pos)++;
+
+	p = *pos;
+	for (*res = 0; isdigit((unsigned char)v[p]); p++)
+		*res += 10 * *res + v[p] - '0';
+	if (p == *pos)
+		return 0;
+
+	if (n)
+		*res = -*res;
+
+	*pos = p;
+	return 1;
+}
+
+static int
+roff_getop(const char *v, int *pos)
+{
+	int c;
+	switch (c = v[*pos]) {
+	case '=':
+	case '!':
+	case '>':
+	case '<':
+		(*pos)++;
+		if (v[*pos] == '=')  {
+			(*pos)++;
+			return c;
+		}
+		switch (c) {
+		case '>':
+			return 'g';
+		case '<':
+			return 'l';
+		default:
+			return -1;
+		}
+	default:
+		return -1;
+	}
+}
+			
 static enum roffrule
 roff_evalcond(const char *v, int *pos)
 {
-
+	int not = 0;
+	int lh, rh, op;
 	switch (v[*pos]) {
 	case ('n'):
 		(*pos)++;
@@ -1085,13 +1123,46 @@ roff_evalcond(const char *v, int *pos)
 	case ('t'):
 		(*pos)++;
 		return(ROFFRULE_DENY);
+	case ('!'):
+		not++;
+		(*pos)++;
+		break;
 	default:
 		break;
 	}
-
-	while (v[*pos] && ' ' != v[*pos])
-		(*pos)++;
-	return(ROFFRULE_DENY);
+	if (!roff_getnum(v, pos, &lh))
+		return ROFFRULE_DENY;
+	if ((op = roff_getop(v, pos)) == -1)
+		goto out;
+	if (!roff_getnum(v, pos, &rh))
+		return ROFFRULE_DENY;
+	switch (op) {
+	case '>':
+		lh = lh >= rh;
+		break;
+	case '<':
+		lh = lh <= rh;
+		break;
+	case '=':
+		lh = lh == rh;
+		break;
+	case '!':
+		lh = lh != rh;
+		break;
+	case 'g':
+		lh = lh > rh;
+		break;
+	case 'l':
+		lh = lh < rh;
+		break;
+	default:
+		return ROFFRULE_DENY;
+	}
+out:
+	if (not)
+		lh = !lh;
+	fprintf(stderr, "res=[%d]\n", lh);
+	return lh ? ROFFRULE_ALLOW : ROFFRULE_DENY;
 }
 
 /* ARGSUSED */
@@ -1334,12 +1405,12 @@ roff_expand_nr(struct roff *r, const cha
 	} else
 		e = '\0';
 
-	for (l = s; l < (int)slen; l++) {
+	for (l = s; src[l] && l < (int)slen; l++) {
 		if (e) {
 			if (src[l] == e)
 break;
 		} else {
-			if

CVS commit: src/external/bsd/mdocml/dist

2013-04-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Apr  3 00:55:33 UTC 2013

Modified Files:
src/external/bsd/mdocml/dist: read.c

Log Message:
do roff nr expansion before trailing backslash


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/mdocml/dist/read.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/read.c
diff -u src/external/bsd/mdocml/dist/read.c:1.8 src/external/bsd/mdocml/dist/read.c:1.9
--- src/external/bsd/mdocml/dist/read.c:1.8	Thu Mar 21 21:24:46 2013
+++ src/external/bsd/mdocml/dist/read.c	Tue Apr  2 20:55:32 2013
@@ -344,20 +344,20 @@ mparse_buf_r(struct mparse *curp, struct
 continue;
 			}
 
-			/* Trailing backslash = a plain char. */
+			/* Expand registers inline */
+			if ('\\' == blk.buf[i] && 'n' == blk.buf[i + 1]) {
+roff_expand_nr(curp->roff,
+blk.buf, &i, blk.sz, &ln.buf, &pos, &ln.sz);
+continue;
+			}
 
+			/* Trailing backslash = a plain char. */
 			if ('\\' != blk.buf[i] || i + 1 == (int)blk.sz) {
 if (pos >= (int)ln.sz)
 	resize_buf(&ln, 256);
 ln.buf[pos++] = blk.buf[i++];
 continue;
 			}
-
-			if ('\\' == blk.buf[i] && 'n' == blk.buf[i + 1]) {
-roff_expand_nr(curp->roff,
-blk.buf, &i, blk.sz, &ln.buf, &pos, &ln.sz);
-			}
-
 			/*
 			 * Found escape and at least one other character.
 			 * When it's a newline character, skip it.



CVS commit: src/external/bsd/mdocml/dist

2013-03-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Mar 22 12:31:25 UTC 2013

Modified Files:
src/external/bsd/mdocml/dist: roff.c

Log Message:
avoid arraycount for toolz


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/mdocml/dist/roff.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/roff.c
diff -u src/external/bsd/mdocml/dist/roff.c:1.9 src/external/bsd/mdocml/dist/roff.c:1.10
--- src/external/bsd/mdocml/dist/roff.c:1.9	Thu Mar 21 21:24:46 2013
+++ src/external/bsd/mdocml/dist/roff.c	Fri Mar 22 08:31:25 2013
@@ -1267,7 +1267,7 @@ static struct roff_nr *
 hash_find(struct roff *r, const char *str, uint32_t *h)
 {
 	struct roff_nr *e;
-	*h = hash_str(str) % __arraycount(r->nr);
+	*h = hash_str(str) % (sizeof(r->nr) / sizeof(r->nr[0]));
 
 	for (e = r->nr[*h]; e; e = e->next)
 		if (e->hash == *h && strcmp(e->str, str) == 0)



CVS commit: src/external/bsd/mdocml/dist

2013-03-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Mar 22 01:24:47 UTC 2013

Modified Files:
src/external/bsd/mdocml/dist: libmandoc.h read.c roff.c

Log Message:
move the code to expand variables in one place and use it to expand
variables inside conditionals. still conditionals with variables don't
work.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/mdocml/dist/libmandoc.h
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/mdocml/dist/read.c
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/mdocml/dist/roff.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/libmandoc.h
diff -u src/external/bsd/mdocml/dist/libmandoc.h:1.2 src/external/bsd/mdocml/dist/libmandoc.h:1.3
--- src/external/bsd/mdocml/dist/libmandoc.h:1.2	Thu Mar 21 17:42:16 2013
+++ src/external/bsd/mdocml/dist/libmandoc.h	Thu Mar 21 21:24:46 2013
@@ -73,7 +73,8 @@ void		 roff_reset(struct roff *);
 enum rofferr	 roff_parseln(struct roff *, int, 
 			char **, size_t *, int, int *);
 void		 roff_endparse(struct roff *);
-size_t		 roff_expand_nr(struct roff *, const char *, char *, size_t);
+void		 roff_expand_nr(struct roff *, const char *, int *, size_t,
+		char **, int *, size_t *);
 int		 roff_regisset(const struct roff *, enum regs);
 unsigned int	 roff_regget(const struct roff *, enum regs);
 void		 roff_regunset(struct roff *, enum regs);

Index: src/external/bsd/mdocml/dist/read.c
diff -u src/external/bsd/mdocml/dist/read.c:1.7 src/external/bsd/mdocml/dist/read.c:1.8
--- src/external/bsd/mdocml/dist/read.c:1.7	Thu Mar 21 17:42:16 2013
+++ src/external/bsd/mdocml/dist/read.c	Thu Mar 21 21:24:46 2013
@@ -354,19 +354,8 @@ mparse_buf_r(struct mparse *curp, struct
 			}
 
 			if ('\\' == blk.buf[i] && 'n' == blk.buf[i + 1]) {
-int j, k;
-i += 2;
-if ('(' == blk.buf[i]) /* ) */
-	i++;
-resize_buf(&ln, 256);
-for (j = i, k = pos; i < j + 256 
-&& i < (int)blk.sz
-&& !isspace((unsigned char)blk.buf[i]);)
-ln.buf[k++] = blk.buf[i++];
-
-ln.buf[k] = '\0';
-pos += roff_expand_nr(curp->roff,
-ln.buf + pos, ln.buf + pos, 256);
+roff_expand_nr(curp->roff,
+blk.buf, &i, blk.sz, &ln.buf, &pos, &ln.sz);
 			}
 
 			/*

Index: src/external/bsd/mdocml/dist/roff.c
diff -u src/external/bsd/mdocml/dist/roff.c:1.8 src/external/bsd/mdocml/dist/roff.c:1.9
--- src/external/bsd/mdocml/dist/roff.c:1.8	Thu Mar 21 17:42:16 2013
+++ src/external/bsd/mdocml/dist/roff.c	Thu Mar 21 21:24:46 2013
@@ -177,6 +177,8 @@ static	enum rofferr	 roff_cond(ROFF_ARGS
 static	enum rofferr	 roff_cond_text(ROFF_ARGS);
 static	enum rofferr	 roff_cond_sub(ROFF_ARGS);
 static	enum rofferr	 roff_ds(ROFF_ARGS);
+static  void		 roff_expand_nr_inplace(struct roff *, char **, int *,
+size_t *);
 static	enum roffrule	 roff_evalcond(const char *, int *);
 static	void		 roff_free1(struct roff *);
 static	void		 roff_freestr(struct roffkv *);
@@ -1053,6 +1055,12 @@ roff_cond_text(ROFF_ARGS)
 	ep = &(*bufp)[pos];
 	for ( ; NULL != (ep = strchr(ep, '\\')); ep++) {
 		ep++;
+		if (*ep == 'n') {
+			int i = ep - *bufp - 1;
+			roff_expand_nr_inplace(r, bufp, &i, szp);
+			ep = *bufp + i;
+			continue;
+		}
 		if ('}' != *ep)
 			continue;
 		*ep = '&';
@@ -1308,17 +1316,76 @@ roff_nr(ROFF_ARGS)
 	return(ROFF_IGN);
 }
 
-size_t
-roff_expand_nr(struct roff *r, const char *key, char *lp, size_t lpl)
+void
+roff_expand_nr(struct roff *r, const char *src, int *sp, size_t slen,
+char **dst, int *dp, size_t *dlenp)
 {
 	uint32_t	 hv;
 	struct roff_nr	*h;
+	int		 l, s, d;
+	char		 e, *key;
 
-	if ((h = hash_find(r, key, &hv)) == NULL)
-		return 0;
+	s = *sp + 2;	/* skip \\\n */
+	d = *dp;
+
+	if ('[' == src[s]) {		/* XXX: Support builtins */
+		s++;
+		e = ']';
+	} else
+		e = '\0';
+
+	for (l = s; l < (int)slen; l++) {
+		if (e) {
+			if (src[l] == e)
+break;
+		} else {
+			if (isspace((unsigned char)src[l]))
+break;
+		}
+	}
+	*sp = l;
+	l -= s;
+	key = mandoc_malloc(l + 1);
+	memcpy(key, src + s, l);
+	key[l] = '\0';
+
+	if ((h = hash_find(r, key, &hv)) == NULL) {
+		free(key);
+		return;
+	}
+	if (*dst == NULL || *dlenp - *dp < 256)
+		*dst = mandoc_realloc(*dst, *dlenp += 256);
 
 	/* XXX: support .af */
-	return snprintf(lp, lpl, "%jd", h->val);
+	*dp += snprintf(*dst + *dp, *dlenp - *dp, "%jd", h->val);
+}
+
+static void
+roff_expand_nr_inplace(struct roff *r, char **src, int *sp, size_t *slenp)
+{
+	int j, i, k;
+	size_t dlen;
+	char *dst;
+
+	k = i = *sp;
+
+	dst = NULL;
+	j = 0;
+	dlen = 0;
+
+	roff_expand_nr(r, *src, &i, *slenp, &dst, &j, &dlen);
+
+	if (j) {
+		int l = j - (i - k);
+		if (l > 0) {
+			*slenp += l;
+			*src = mandoc_realloc(*src, *slenp);
+		}
+		memmove(*src + j + k, *src + i, *slenp - i);
+		memcpy(*src + k, dst, j);
+		free(dst);
+	}
+	*sp = k + j;
 }
 
 /* ARGSUSED */



CVS commit: src/external/bsd/mdocml/dist

2013-03-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Mar 21 21:42:16 UTC 2013

Modified Files:
src/external/bsd/mdocml/dist: libmandoc.h read.c roff.c

Log Message:
support expanding numbered registers


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.9 -r1.2 src/external/bsd/mdocml/dist/libmandoc.h
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/mdocml/dist/read.c
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/mdocml/dist/roff.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/libmandoc.h
diff -u src/external/bsd/mdocml/dist/libmandoc.h:1.1.1.9 src/external/bsd/mdocml/dist/libmandoc.h:1.2
--- src/external/bsd/mdocml/dist/libmandoc.h:1.1.1.9	Mon Jan 30 11:44:17 2012
+++ src/external/bsd/mdocml/dist/libmandoc.h	Thu Mar 21 17:42:16 2013
@@ -73,6 +73,7 @@ void		 roff_reset(struct roff *);
 enum rofferr	 roff_parseln(struct roff *, int, 
 			char **, size_t *, int, int *);
 void		 roff_endparse(struct roff *);
+size_t		 roff_expand_nr(struct roff *, const char *, char *, size_t);
 int		 roff_regisset(const struct roff *, enum regs);
 unsigned int	 roff_regget(const struct roff *, enum regs);
 void		 roff_regunset(struct roff *, enum regs);

Index: src/external/bsd/mdocml/dist/read.c
diff -u src/external/bsd/mdocml/dist/read.c:1.6 src/external/bsd/mdocml/dist/read.c:1.7
--- src/external/bsd/mdocml/dist/read.c:1.6	Thu Feb 16 15:58:23 2012
+++ src/external/bsd/mdocml/dist/read.c	Thu Mar 21 17:42:16 2013
@@ -353,6 +353,22 @@ mparse_buf_r(struct mparse *curp, struct
 continue;
 			}
 
+			if ('\\' == blk.buf[i] && 'n' == blk.buf[i + 1]) {
+int j, k;
+i += 2;
+if ('(' == blk.buf[i]) /* ) */
+	i++;
+resize_buf(&ln, 256);
+for (j = i, k = pos; i < j + 256 
+&& i < (int)blk.sz
+&& !isspace((unsigned char)blk.buf[i]);)
+ln.buf[k++] = blk.buf[i++];
+
+ln.buf[k] = '\0';
+pos += roff_expand_nr(curp->roff,
+ln.buf + pos, ln.buf + pos, 256);
+			}
+
 			/*
 			 * Found escape and at least one other character.
 			 * When it's a newline character, skip it.

Index: src/external/bsd/mdocml/dist/roff.c
diff -u src/external/bsd/mdocml/dist/roff.c:1.7 src/external/bsd/mdocml/dist/roff.c:1.8
--- src/external/bsd/mdocml/dist/roff.c:1.7	Mon Jan 30 13:50:45 2012
+++ src/external/bsd/mdocml/dist/roff.c	Thu Mar 21 17:42:16 2013
@@ -21,8 +21,10 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
+#include 
 
 #include "mandoc.h"
 #include "libroff.h"
@@ -117,6 +119,7 @@ struct	roff {
 	struct eqn_node	*last_eqn; /* last equation parsed */
 	struct eqn_node	*first_eqn; /* first equation parsed */
 	struct eqn_node	*eqn; /* current equation being parsed */
+	struct roff_nr  *nr[64];	/* numbered register set */
 };
 
 struct	roffnode {
@@ -1234,21 +1237,70 @@ roff_regunset(struct roff *r, enum regs 
 	r->regs[(int)reg].set = 0;
 }
 
+struct roff_nr {
+	char *str;
+	uint32_t hash;
+	intmax_t val;
+	struct roff_nr *next;
+};
+
+static uint32_t
+hash_str(const char *str)
+{
+	const uint8_t *s = (const uint8_t *)str;
+	uint8_t c;
+	uint32_t hv = 0;
+	while ((c = *s++) != '\0') 
+		hv = hv * 33 + c;   /* "perl": k=33, r=r+r/32 */
+	return hv + (hv >> 5);
+}
+
+static struct roff_nr *
+hash_find(struct roff *r, const char *str, uint32_t *h)
+{
+	struct roff_nr *e;
+	*h = hash_str(str) % __arraycount(r->nr);
+
+	for (e = r->nr[*h]; e; e = e->next)
+		if (e->hash == *h && strcmp(e->str, str) == 0)
+			return e;
+	return NULL;
+}
+
+static struct roff_nr *
+hash_insert(struct roff *r, const char *str, uint32_t h)
+{
+	struct roff_nr *e;
+
+	e = mandoc_malloc(sizeof(*e));
+	e->str = mandoc_strdup(str);
+	e->hash = h;
+	e->next = r->nr[h];
+	r->nr[h] = e;
+	return e;
+}
+
 /* ARGSUSED */
 static enum rofferr
 roff_nr(ROFF_ARGS)
 {
 	const char	*key;
 	char		*val;
-	int		 iv;
+	uint32_t	 hv;
+	struct roff_nr	*h;
 
 	val = *bufp + pos;
 	key = roff_getname(r, &val, ln, pos);
 
+	if ((h = hash_find(r, key, &hv)) == NULL)
+		h = hash_insert(r, key, hv);
+
+	h->val = mandoc_strntoi(val, strlen(val), 10);
+
 	if (0 == strcmp(key, "nS")) {
 		r->regs[(int)REG_nS].set = 1;
-		if ((iv = mandoc_strntoi(val, strlen(val), 10)) >= 0)
-			r->regs[(int)REG_nS].u = (unsigned)iv;
+		if (h->val >= 0)
+			r->regs[(int)REG_nS].u = (unsigned)h->val;
 		else
 			r->regs[(int)REG_nS].u = 0u;
 	}
@@ -1256,6 +1308,19 @@ roff_nr(ROFF_ARGS)
 	return(ROFF_IGN);
 }
 
+size_t
+roff_expand_nr(struct roff *r, const char *key, char *lp, size_t lpl)
+{
+	uint32_t	 hv;
+	struct roff_nr	*h;
+
+	if ((h = hash_find(r, key, &hv)) == NULL)
+		return 0;
+
+	/* XXX: support .af */
+	return snprintf(lp, lpl, "%jd", h->val);
+}
+
 /* ARGSUSED */
 static enum rofferr
 roff_rm(ROFF_ARGS)



CVS commit: src/external/bsd/mdocml/dist

2012-11-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Nov 24 22:29:09 UTC 2012

Modified Files:
src/external/bsd/mdocml/dist: tbl_data.c

Log Message:
XXX: rename data() to getdata(). This is to avoid an assembler botch on the
ppc64 toolchain where function names are prefixed with a period, so "data"
becomes ".data" and ".data" is confused by the assembler with the segment
directive with the same name. Clearly this is a toolchain issue; we should
be able to call functions "text" and "data" but it is simpler to fix the
code rather than the toolchain.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/mdocml/dist/tbl_data.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/tbl_data.c
diff -u src/external/bsd/mdocml/dist/tbl_data.c:1.3 src/external/bsd/mdocml/dist/tbl_data.c:1.4
--- src/external/bsd/mdocml/dist/tbl_data.c:1.3	Mon Jan 30 12:03:01 2012
+++ src/external/bsd/mdocml/dist/tbl_data.c	Sat Nov 24 17:29:09 2012
@@ -29,13 +29,13 @@
 #include "libmandoc.h"
 #include "libroff.h"
 
-static	int		 data(struct tbl_node *, struct tbl_span *, 
+static	int		 getdata(struct tbl_node *, struct tbl_span *, 
 int, const char *, int *);
 static	struct tbl_span	*newspan(struct tbl_node *, int, 
 struct tbl_row *);
 
 static int
-data(struct tbl_node *tbl, struct tbl_span *dp, 
+getdata(struct tbl_node *tbl, struct tbl_span *dp, 
 		int ln, const char *p, int *pos)
 {
 	struct tbl_dat	*dat;
@@ -154,7 +154,7 @@ tbl_cdata(struct tbl_node *tbl, int ln, 
 		if (p[pos] == tbl->opts.tab) {
 			tbl->part = TBL_PART_DATA;
 			pos++;
-			return(data(tbl, tbl->last_span, ln, p, &pos));
+			return(getdata(tbl, tbl->last_span, ln, p, &pos));
 		} else if ('\0' == p[pos]) {
 			tbl->part = TBL_PART_DATA;
 			return(1);
@@ -269,7 +269,7 @@ tbl_data(struct tbl_node *tbl, int ln, c
 	/* This returns 0 when TBL_PART_CDATA is entered. */
 
 	while ('\0' != p[pos])
-		if ( ! data(tbl, dp, ln, p, &pos))
+		if ( ! getdata(tbl, dp, ln, p, &pos))
 			return(0);
 
 	return(1);



CVS commit: src/external/bsd/mdocml/dist

2012-11-20 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Tue Nov 20 16:24:30 UTC 2012

Modified Files:
src/external/bsd/mdocml/dist: lib.in

Log Message:
add definition for libnetpgpverify


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/mdocml/dist/lib.in

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/lib.in
diff -u src/external/bsd/mdocml/dist/lib.in:1.8 src/external/bsd/mdocml/dist/lib.in:1.9
--- src/external/bsd/mdocml/dist/lib.in:1.8	Sun Jun 10 00:25:51 2012
+++ src/external/bsd/mdocml/dist/lib.in	Tue Nov 20 16:24:30 2012
@@ -67,6 +67,7 @@ LINE("libmemstat",	"Kernel Memory Alloca
 LINE("libmenu",		"Curses Menu Library (libmenu, \\-lmenu)")
 LINE("libnetgraph",	"Netgraph User Library (libnetgraph, \\-lnetgraph)")
 LINE("libnetpgp",	"Netpgp signing, verification, encryption and decryption (libnetpgp, \\-lnetpgp)")
+LINE("libnetpgpverify",	"Netpgp verification (libnetpgpverify, \\-lnetpgpverify)")
 LINE("libossaudio",	"OSS Audio Emulation Library (libossaudio, \\-lossaudio)")
 LINE("libpam",		"Pluggable Authentication Module Library (libpam, \\-lpam)")
 LINE("libpcap",		"Capture Library (libpcap, \\-lpcap)")



CVS commit: src/external/bsd/mdocml/dist

2012-06-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jun 10 00:25:51 UTC 2012

Modified Files:
src/external/bsd/mdocml/dist: lib.in

Log Message:
add libexecinfo


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/mdocml/dist/lib.in

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/lib.in
diff -u src/external/bsd/mdocml/dist/lib.in:1.7 src/external/bsd/mdocml/dist/lib.in:1.8
--- src/external/bsd/mdocml/dist/lib.in:1.7	Mon Jan 30 12:03:01 2012
+++ src/external/bsd/mdocml/dist/lib.in	Sat Jun  9 20:25:51 2012
@@ -44,6 +44,7 @@ LINE("libdwarf",	"DWARF Access Library (
 LINE("libedit",		"Command Line Editor Library (libedit, \\-ledit)")
 LINE("libelf",		"ELF Access Library (libelf, \\-lelf)")
 LINE("libevent",	"Event Notification Library (libevent, \\-levent)")
+LINE("libexecinfo",	"Backtrace Information Library (libexecinfo, \\-lexecinfo)")
 LINE("libfetch",	"File Transfer Library for URLs (libfetch, \\-lfetch)")
 LINE("libform",		"Curses Form Library (libform, \\-lform)")
 LINE("libgeom",		"Userland API Library for kernel GEOM subsystem (libgeom, \\-lgeom)")



CVS commit: src/external/bsd/mdocml

2012-02-16 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu Feb 16 22:56:13 UTC 2012

Modified Files:
src/external/bsd/mdocml: Makefile.inc

Log Message:
Use mmap when dealing with plain files.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/external/bsd/mdocml/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/Makefile.inc
diff -u src/external/bsd/mdocml/Makefile.inc:1.14 src/external/bsd/mdocml/Makefile.inc:1.15
--- src/external/bsd/mdocml/Makefile.inc:1.14	Wed Oct 12 15:33:38 2011
+++ src/external/bsd/mdocml/Makefile.inc	Thu Feb 16 22:56:12 2012
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.14 2011/10/12 15:33:38 njoly Exp $
+# $NetBSD: Makefile.inc,v 1.15 2012/02/16 22:56:12 joerg Exp $
 
 .include 
 
@@ -7,7 +7,7 @@ VERSION!=	cd ${.PARSEDIR}/dist && ${MAKE
 CPPFLAGS+=	-DVERSION=\"${VERSION}\" -DUGLY
 
 .if (${HOSTPROG:U} == "")
-CPPFLAGS+=	-DHAVE_STRLCAT -DHAVE_STRLCPY -DHAVE_STRPTIME
+CPPFLAGS+=	-DHAVE_STRLCAT -DHAVE_STRLCPY -DHAVE_STRPTIME -DHAVE_MMAP
 .endif
 
 DISTDIR:=	${.PARSEDIR}/dist



CVS commit: src/external/bsd/mdocml/dist

2012-02-16 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu Feb 16 20:58:23 UTC 2012

Modified Files:
src/external/bsd/mdocml/dist: mandoc.h read.c

Log Message:
Merge mandoc.h r1.99 and read.c 1.28 from upstream:
Add mparse_readmem, which allows application to run the parser directly
from memory, e.g. after de-compressing a document.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.9 -r1.2 src/external/bsd/mdocml/dist/mandoc.h
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/mdocml/dist/read.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/mandoc.h
diff -u src/external/bsd/mdocml/dist/mandoc.h:1.1.1.9 src/external/bsd/mdocml/dist/mandoc.h:1.2
--- src/external/bsd/mdocml/dist/mandoc.h:1.1.1.9	Mon Jan 30 16:44:19 2012
+++ src/external/bsd/mdocml/dist/mandoc.h	Thu Feb 16 20:58:23 2012
@@ -1,4 +1,4 @@
-/*	$Vendor-Id: mandoc.h,v 1.98 2011/11/08 00:15:23 kristaps Exp $ */
+/*	$Vendor-Id: mandoc.h,v 1.99 2012/02/16 20:51:31 joerg Exp $ */
 /*
  * Copyright (c) 2010, 2011 Kristaps Dzonsons 
  *
@@ -418,6 +418,8 @@ struct mparse	 *mparse_alloc(enum mparse
 void		  mparse_free(struct mparse *);
 void		  mparse_keep(struct mparse *);
 enum mandoclevel  mparse_readfd(struct mparse *, int, const char *);
+enum mandoclevel  mparse_readmem(struct mparse *, const void *, size_t,
+			const char *);
 void		  mparse_reset(struct mparse *);
 void		  mparse_result(struct mparse *, 
 			struct mdoc **, struct man **);

Index: src/external/bsd/mdocml/dist/read.c
diff -u src/external/bsd/mdocml/dist/read.c:1.5 src/external/bsd/mdocml/dist/read.c:1.6
--- src/external/bsd/mdocml/dist/read.c:1.5	Mon Feb  6 10:42:44 2012
+++ src/external/bsd/mdocml/dist/read.c	Thu Feb 16 20:58:23 2012
@@ -1,4 +1,4 @@
-/*	$Vendor-Id: read.c,v 1.27 2012/02/05 16:46:15 joerg Exp $ */
+/*	$Vendor-Id: read.c,v 1.28 2012/02/16 20:51:31 joerg Exp $ */
 /*
  * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons 
  * Copyright (c) 2010, 2011 Ingo Schwarze 
@@ -28,6 +28,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -37,6 +38,7 @@
 #include "libmandoc.h"
 #include "mdoc.h"
 #include "man.h"
+#include "main.h"
 
 #ifndef MAP_FILE
 #define	MAP_FILE	0
@@ -70,7 +72,6 @@ static	void	  resize_buf(struct buf *, s
 static	void	  mparse_buf_r(struct mparse *, struct buf, int);
 static	void	  mparse_readfd_r(struct mparse *, int, const char *, int);
 static	void	  pset(const char *, int, struct mparse *);
-static	void	  pdesc(struct mparse *, const char *, int);
 static	int	  read_whole_file(const char *, int, struct buf *, int *);
 static	void	  mparse_end(struct mparse *);
 
@@ -547,38 +548,6 @@ rerun:
 	free(ln.buf);
 }
 
-static void
-pdesc(struct mparse *curp, const char *file, int fd)
-{
-	struct buf	 blk;
-	int		 with_mmap;
-
-	/*
-	 * Run for each opened file; may be called more than once for
-	 * each full parse sequence if the opened file is nested (i.e.,
-	 * from `so').  Simply sucks in the whole file and moves into
-	 * the parse phase for the file.
-	 */
-
-	if ( ! read_whole_file(file, fd, &blk, &with_mmap)) {
-		curp->file_status = MANDOCLEVEL_SYSERR;
-		return;
-	}
-
-	/* Line number is per-file. */
-
-	curp->line = 1;
-
-	mparse_buf_r(curp, blk, 1);
-
-#ifdef	HAVE_MMAP
-	if (with_mmap)
-		munmap(blk.buf, blk.sz);
-	else
-#endif
-		free(blk.buf);
-}
-
 static int
 read_whole_file(const char *file, int fd, struct buf *fb, int *with_mmap)
 {
@@ -674,29 +643,72 @@ mparse_end(struct mparse *curp)
 }
 
 static void
-mparse_readfd_r(struct mparse *curp, int fd, const char *file, int re)
+mparse_parse_buffer(struct mparse *curp, struct buf blk, const char *file,
+		int re)
 {
 	const char	*svfile;
 
+	/* Line number is per-file. */
+	svfile = curp->file;
+	curp->file = file;
+	curp->line = 1;
+
+	mparse_buf_r(curp, blk, 1);
+
+	if (0 == re && MANDOCLEVEL_FATAL > curp->file_status)
+		mparse_end(curp);
+
+	curp->file = svfile;
+}
+
+enum mandoclevel
+mparse_readmem(struct mparse *curp, const void *buf, size_t len,
+		const char *file)
+{
+	struct buf blk;
+
+	blk.buf = UNCONST(buf);
+	blk.sz = len;
+
+	mparse_parse_buffer(curp, blk, file, 0);
+	return(curp->file_status);
+}
+
+static void
+mparse_readfd_r(struct mparse *curp, int fd, const char *file, int re)
+{
+	struct buf	 blk;
+	int		 with_mmap;
+
 	if (-1 == fd)
 		if (-1 == (fd = open(file, O_RDONLY, 0))) {
 			perror(file);
 			curp->file_status = MANDOCLEVEL_SYSERR;
 			return;
 		}
+	/*
+	 * Run for each opened file; may be called more than once for
+	 * each full parse sequence if the opened file is nested (i.e.,
+	 * from `so').  Simply sucks in the whole file and moves into
+	 * the parse phase for the file.
+	 */
 
-	svfile = curp->file;
-	curp->file = file;
+	if ( ! read_whole_file(file, fd, &blk, &with_mmap)) {
+		curp->file_status = MANDOCLEVEL_SYSERR;
+		return;
+	}
 
-	pdesc(curp, file, fd);
+	mparse_parse_buffer(curp, blk,

CVS commit: src/external/bsd/mdocml/dist

2012-02-06 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Feb  6 10:42:44 UTC 2012

Modified Files:
src/external/bsd/mdocml/dist: read.c

Log Message:
Pull read.c r1.27 from upstream repository:
Don't silently skip non-ASCII characters, but replace them with ``?''.
This is less likely to break the syntax of macros.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/mdocml/dist/read.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/read.c
diff -u src/external/bsd/mdocml/dist/read.c:1.4 src/external/bsd/mdocml/dist/read.c:1.5
--- src/external/bsd/mdocml/dist/read.c:1.4	Mon Jan 30 17:03:01 2012
+++ src/external/bsd/mdocml/dist/read.c	Mon Feb  6 10:42:44 2012
@@ -1,4 +1,4 @@
-/*	$Vendor-Id: read.c,v 1.26 2011/11/07 01:24:40 schwarze Exp $ */
+/*	$Vendor-Id: read.c,v 1.27 2012/02/05 16:46:15 joerg Exp $ */
 /*
  * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons 
  * Copyright (c) 2010, 2011 Ingo Schwarze 
@@ -325,9 +325,9 @@ mparse_buf_r(struct mparse *curp, struct
 			 * Warn about bogus characters.  If you're using
 			 * non-ASCII encoding, you're screwing your
 			 * readers.  Since I'd rather this not happen,
-			 * I'll be helpful and drop these characters so
-			 * we don't display gibberish.  Note to manual
-			 * writers: use special characters.
+			 * I'll be helpful and replace these characters
+			 * with "?", so we don't display gibberish.
+			 * Note to manual writers: use special characters.
 			 */
 
 			c = (unsigned char) blk.buf[i];
@@ -335,8 +335,11 @@ mparse_buf_r(struct mparse *curp, struct
 			if ( ! (isascii(c) && 
 	(isgraph(c) || isblank(c {
 mandoc_msg(MANDOCERR_BADCHAR, curp,
-		curp->line, pos, "ignoring byte");
+		curp->line, pos, NULL);
 i++;
+if (pos >= (int)ln.sz)
+	resize_buf(&ln, 256);
+ln.buf[pos++] = '?';
 continue;
 			}
 



CVS commit: src/external/bsd/mdocml/dist

2012-01-30 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Mon Jan 30 18:50:45 UTC 2012

Modified Files:
src/external/bsd/mdocml/dist: roff.c

Log Message:
Fix broken build by laundering const. hi joerg


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/mdocml/dist/roff.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/roff.c
diff -u src/external/bsd/mdocml/dist/roff.c:1.6 src/external/bsd/mdocml/dist/roff.c:1.7
--- src/external/bsd/mdocml/dist/roff.c:1.6	Mon Jan 30 17:03:01 2012
+++ src/external/bsd/mdocml/dist/roff.c	Mon Jan 30 18:50:45 2012
@@ -574,7 +574,7 @@ roff_parsetext(char *p)
 			/* Skip over escapes. */
 			p++;
 			esc = mandoc_escape
-((const char **)&p, NULL, NULL);
+((const char **)/*XXX*/(void *)&p, NULL, NULL);
 			if (ESCAPE_ERROR == esc)
 break;
 			continue;



CVS commit: src/external/bsd/mdocml/dist

2012-01-30 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Jan 30 17:03:01 UTC 2012

Modified Files:
src/external/bsd/mdocml/dist: arch.in compat_fgetln.c lib.in man_term.c
mdoc_term.c mdoc_validate.c msec.in read.c roff.c tbl_data.c

Log Message:
Merge for mdocml 1.20.1pre import


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/mdocml/dist/arch.in \
src/external/bsd/mdocml/dist/msec.in \
src/external/bsd/mdocml/dist/tbl_data.c
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/mdocml/dist/compat_fgetln.c
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/mdocml/dist/lib.in
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/mdocml/dist/man_term.c \
src/external/bsd/mdocml/dist/mdoc_term.c
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/mdocml/dist/mdoc_validate.c \
src/external/bsd/mdocml/dist/read.c
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/mdocml/dist/roff.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/arch.in
diff -u src/external/bsd/mdocml/dist/arch.in:1.2 src/external/bsd/mdocml/dist/arch.in:1.3
--- src/external/bsd/mdocml/dist/arch.in:1.2	Sun Dec 18 13:40:08 2011
+++ src/external/bsd/mdocml/dist/arch.in	Mon Jan 30 17:03:01 2012
@@ -1,4 +1,4 @@
-/*	$Vendor-Id: arch.in,v 1.10 2010/09/27 06:56:44 kristaps Exp $ */
+/*	$Vendor-Id: arch.in,v 1.12 2012/01/28 14:02:17 joerg Exp $ */
 /*
  * Copyright (c) 2009 Kristaps Dzonsons 
  *
@@ -26,54 +26,86 @@
  * REMEMBER TO ADD NEW ARCHITECTURES TO MDOC.7!
  */
 
-LINE("acorn26",		"acorn26")
-LINE("acorn32",		"acorn32")
-LINE("alpha",		"alpha")
-LINE("amd64",		"amd64")
-LINE("amiga",		"amiga")
-LINE("arc",		"arc")
-LINE("arm",		"arm")
-LINE("armish",		"armish")
-LINE("atari",		"atari")
-LINE("aviion",		"aviion")
-LINE("cobalt",		"cobalt")
-LINE("dreamcast",	"dreamcast")
-LINE("emips",		"emips")
-LINE("evbarm",		"evbarm")
-LINE("evbmips",		"evbmips")
-LINE("evbppc",		"evbppc")
-LINE("hp300",		"hp300")
-LINE("hp700",		"hp700")
-LINE("hpcarm",		"hpcarm")
-LINE("hpcmips",		"hpcmips")
-LINE("hpcsh",		"hpcsh")
-LINE("hppa",		"hppa")
-LINE("hppa64",		"hppa64")
+LINE("acorn26",		"Acorn26")
+LINE("acorn32",		"Acorn32")
+LINE("algor",		"Algor")
+LINE("alpha",		"Alpha")
+LINE("amd64",		"AMD64")
+LINE("amiga",		"Amiga")
+LINE("amigappc",	"AmigaPPC")
+LINE("arc",		"ARC")
+LINE("arm",		"ARM")
+LINE("arm26",		"ARM26")
+LINE("arm32",		"ARM32")
+LINE("armish",		"ARMISH")
+LINE("aviion",		"AViiON")
+LINE("atari",		"ATARI")
+LINE("beagle",		"Beagle")
+LINE("bebox",		"BeBox")
+LINE("cats",		"cats")
+LINE("cesfic",		"CESFIC")
+LINE("cobalt",		"Cobalt")
+LINE("dreamcast",	"Dreamcast")
+LINE("emips",		"EMIPS")
+LINE("evbarm",		"evbARM")
+LINE("evbmips",		"evbMIPS")
+LINE("evbppc",		"evbPPC")
+LINE("evbsh3",		"evbSH3")
+LINE("ews4800mips",	"EWS4800MIPS")
+LINE("hp300",		"HP300")
+LINE("hp700",		"HP700")
+LINE("hpcarm",		"HPCARM")
+LINE("hpcmips",		"HPCMIPS")
+LINE("hpcsh",		"HPCSH")
+LINE("hppa",		"HPPA")
+LINE("hppa64",		"HPPA64")
+LINE("ia64",		"ia64")
 LINE("i386",		"i386")
-LINE("landisk",		"landisk")
-LINE("loongson",	"loongson")
-LINE("luna88k",		"luna88k")
-LINE("mac68k",		"mac68k")
+LINE("ibmnws",		"IBMNWS")
+LINE("iyonix",		"Iyonix")
+LINE("landisk",		"LANDISK")
+LINE("loongson",	"Loongson")
+LINE("luna68k",		"Luna68k")
+LINE("luna88k",		"Luna88k")
 LINE("m68k",		"m68k")
-LINE("macppc",		"macppc")
-LINE("mips64",		"mips64")
-LINE("mvme68k",		"mvme68k")
-LINE("mvme88k",		"mvme88k")
-LINE("mvmeppc",		"mvmeppc")
-LINE("next68k",		"next68k")
-LINE("pmax",		"pmax")
-LINE("prep",		"prep")
-LINE("sandpoint",	"sandpoint")
-LINE("sgi",		"sgi")
-LINE("sgimips",		"sgimips")
-LINE("socppc",		"socppc")
-LINE("sparc",		"sparc")
-LINE("sparc64",		"sparc64")
-LINE("sun2",		"sun2")
-LINE("sun3",		"sun3")
-LINE("vax",		"vax")
-LINE("x68k",		"x68k")
+LINE("mac68k",		"Mac68k")
+LINE("macppc",		"MacPPC")
+LINE("mips",		"MIPS")
+LINE("mips64",		"MIPS64")
+LINE("mipsco",		"MIPSCo")
+LINE("mmeye",		"mmEye")
+LINE("mvme68k",		"MVME68k")
+LINE("mvme88k",		"MVME88k")
+LINE("mvmeppc",		"MVMEPPC")
+LINE("netwinder",	"NetWinder")
+LINE("news68k",		"NeWS68k")
+LINE("newsmips",	"NeWSMIPS")
+LINE("next68k",		"NeXT68k")
+LINE("ofppc",		"OFPPC")
+LINE("palm",		"Palm")
+LINE("pc532",		"PC532")
+LINE("playstation2",	"PlayStation2")
+LINE("pmax",		"PMAX")
+LINE("pmppc",		"pmPPC")
+LINE("powerpc",		"PowerPC")
+LINE("prep",		"PReP")
+LINE("rs6000",		"RS6000")
+LINE("sandpoint",	"Sandpoint")
+LINE("sbmips",		"SBMIPS")
+LINE("sgi",		"SGI")
+LINE("sgimips",		"SGIMIPS")
+LINE("sh3",		"SH3")
+LINE("shark",		"Shark")
+LINE("socppc",		"SOCPPC")
+LINE("solbourne",	"Solbourne")
+LINE("sparc",		"SPARC")
+LINE("sparc64",		"SPARC64")
+LINE("sun2",		"Sun2")
+LINE("sun3",		"Sun3")
+LINE("tahoe",		"Tahoe")
+LINE("vax",		"VAX")
+LINE("x68k",		"X68k")
 LINE("x86",		"x86")
 LINE("x86_64",		"x86_64")
-LINE("xen",		"xen")
-LINE("zaurus",		"zaurus")
+LINE("xen",		"Xen")
+LINE("zau

CVS commit: src/external/bsd/mdocml/dist

2012-01-30 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Jan 30 16:44:32 UTC 2012

Update of /cvsroot/src/external/bsd/mdocml/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv21577

Log Message:
Merge mdocml state from 2012-01-30 for various relaxed checks in the
parser to allow it to pass almost all man pages in pkgsrc.

Status:

Vendor Tag: KRISTAPS
Release Tags:   mdocml-1-12-1-pre

U src/external/bsd/mdocml/dist/out.c
U src/external/bsd/mdocml/dist/config.h.post
U src/external/bsd/mdocml/dist/tbl_opts.c
C src/external/bsd/mdocml/dist/read.c
U src/external/bsd/mdocml/dist/tbl_data.c
U src/external/bsd/mdocml/dist/preconv.1
N src/external/bsd/mdocml/dist/apropos_db.h
U src/external/bsd/mdocml/dist/tree.c
U src/external/bsd/mdocml/dist/tbl.c
U src/external/bsd/mdocml/dist/test-strlcat.c
N src/external/bsd/mdocml/dist/compat_fgetln.c
U src/external/bsd/mdocml/dist/mandoc_char.7
U src/external/bsd/mdocml/dist/compat_strlcpy.c
U src/external/bsd/mdocml/dist/preconv.c
U src/external/bsd/mdocml/dist/tbl_html.c
U src/external/bsd/mdocml/dist/libroff.h
U src/external/bsd/mdocml/dist/att.c
U src/external/bsd/mdocml/dist/eqn.7
U src/external/bsd/mdocml/dist/mdoc_macro.c
U src/external/bsd/mdocml/dist/html.h
U src/external/bsd/mdocml/dist/mdoc_hash.c
N src/external/bsd/mdocml/dist/man-cgi.css
U src/external/bsd/mdocml/dist/term.c
U src/external/bsd/mdocml/dist/msec.in
C src/external/bsd/mdocml/dist/arch.in
C src/external/bsd/mdocml/dist/lib.in
U src/external/bsd/mdocml/dist/man.7
U src/external/bsd/mdocml/dist/mdoc_man.c
N src/external/bsd/mdocml/dist/man.cgi.7
U src/external/bsd/mdocml/dist/msec.c
U src/external/bsd/mdocml/dist/mdoc_argv.c
U src/external/bsd/mdocml/dist/att.in
U src/external/bsd/mdocml/dist/libman.h
U src/external/bsd/mdocml/dist/main.h
U src/external/bsd/mdocml/dist/mdoc_html.c
N src/external/bsd/mdocml/dist/test-fgetln.c
U src/external/bsd/mdocml/dist/mandocdb.c
N src/external/bsd/mdocml/dist/manpath.c
U src/external/bsd/mdocml/dist/vol.in
C src/external/bsd/mdocml/dist/man_term.c
U src/external/bsd/mdocml/dist/roff.7
N src/external/bsd/mdocml/dist/apropos_db.c
U src/external/bsd/mdocml/dist/compat_getsubopt.c
C src/external/bsd/mdocml/dist/roff.c
U src/external/bsd/mdocml/dist/mandocdb.8
U src/external/bsd/mdocml/dist/mdoc.h
U src/external/bsd/mdocml/dist/arch.c
U src/external/bsd/mdocml/dist/term_ascii.c
U src/external/bsd/mdocml/dist/tbl_term.c
U src/external/bsd/mdocml/dist/demandoc.1
U src/external/bsd/mdocml/dist/eqn.c
U src/external/bsd/mdocml/dist/man_validate.c
U src/external/bsd/mdocml/dist/Makefile
U src/external/bsd/mdocml/dist/st.c
U src/external/bsd/mdocml/dist/eqn_term.c
U src/external/bsd/mdocml/dist/config.h.pre
U src/external/bsd/mdocml/dist/test-strlcpy.c
U src/external/bsd/mdocml/dist/vol.c
U src/external/bsd/mdocml/dist/predefs.in
U src/external/bsd/mdocml/dist/lib.c
U src/external/bsd/mdocml/dist/mdoc.7
U src/external/bsd/mdocml/dist/term.h
N src/external/bsd/mdocml/dist/whatis.1
U src/external/bsd/mdocml/dist/libmdoc.h
U src/external/bsd/mdocml/dist/tbl_layout.c
N src/external/bsd/mdocml/dist/manpath.h
U src/external/bsd/mdocml/dist/man.h
U src/external/bsd/mdocml/dist/chars.in
U src/external/bsd/mdocml/dist/compat_strlcat.c
U src/external/bsd/mdocml/dist/test-getsubopt.c
U src/external/bsd/mdocml/dist/external.png.uu
N src/external/bsd/mdocml/dist/mandocdb.h
C src/external/bsd/mdocml/dist/mdoc_term.c
N src/external/bsd/mdocml/dist/catman.8
N src/external/bsd/mdocml/dist/cgi.c
U src/external/bsd/mdocml/dist/out.h
U src/external/bsd/mdocml/dist/mdoc.c
U src/external/bsd/mdocml/dist/tbl.7
U src/external/bsd/mdocml/dist/main.c
N src/external/bsd/mdocml/dist/catman.c
U src/external/bsd/mdocml/dist/man_html.c
U src/external/bsd/mdocml/dist/term_ps.c
U src/external/bsd/mdocml/dist/st.in
U src/external/bsd/mdocml/dist/libmandoc.h
C src/external/bsd/mdocml/dist/mdoc_validate.c
U src/external/bsd/mdocml/dist/apropos.c
U src/external/bsd/mdocml/dist/mandoc.3
U src/external/bsd/mdocml/dist/apropos.1
U src/external/bsd/mdocml/dist/mandoc.1
U src/external/bsd/mdocml/dist/mandoc.h
U src/external/bsd/mdocml/dist/chars.c
U src/external/bsd/mdocml/dist/mandoc.c
U src/external/bsd/mdocml/dist/test-strptime.c
U src/external/bsd/mdocml/dist/example.style.css
U src/external/bsd/mdocml/dist/eqn_html.c
U src/external/bsd/mdocml/dist/man.c
U src/external/bsd/mdocml/dist/demandoc.c
U src/external/bsd/mdocml/dist/man_hash.c
U src/external/bsd/mdocml/dist/html.c
U src/external/bsd/mdocml/dist/man_macro.c
U src/external/bsd/mdocml/dist/test-mmap.c

7 conflicts created by this import.
Use the following command to help the merge:

cvs checkout -jKRISTAPS:yesterday -jKRISTAPS 
src/external/bsd/mdocml/dist



CVS commit: src/external/bsd/mdocml/dist

2012-01-25 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Wed Jan 25 22:23:46 UTC 2012

Modified Files:
src/external/bsd/mdocml/dist: lib.in

Log Message:
Add libquota, as requested by wiz


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/mdocml/dist/lib.in

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/lib.in
diff -u src/external/bsd/mdocml/dist/lib.in:1.5 src/external/bsd/mdocml/dist/lib.in:1.6
--- src/external/bsd/mdocml/dist/lib.in:1.5	Tue Oct 11 19:12:13 2011
+++ src/external/bsd/mdocml/dist/lib.in	Wed Jan 25 22:23:46 2012
@@ -76,6 +76,7 @@ LINE("libppath",	"Property-List Paths Li
 LINE("libprop",		"Property Container Object Library (libprop, \\-lprop)")
 LINE("libpthread",	"POSIX Threads Library (libpthread, \\-lpthread)")
 LINE("libpuffs",	"puffs Convenience Library (libpuffs, \\-lpuffs)")
+LINE("libquota",	"Disk Quota Access and Control Library (libquota, \\-lquota)")
 LINE("librefuse",	"File System in Userspace Convenience Library (librefuse, \\-lrefuse)")
 LINE("libresolv",	"DNS Resolver Library (libresolv, \\-lresolv)")
 LINE("librpcsec_gss",	"RPC GSS-API Authentication Library (librpcsec_gss, \\-lrpcsec_gss)")



CVS commit: src/external/bsd/mdocml/dist

2011-12-18 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sun Dec 18 13:40:08 UTC 2011

Modified Files:
src/external/bsd/mdocml/dist: arch.in

Log Message:
Lowercase arch strings, and add missing ones.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.5 -r1.2 src/external/bsd/mdocml/dist/arch.in

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/arch.in
diff -u src/external/bsd/mdocml/dist/arch.in:1.1.1.5 src/external/bsd/mdocml/dist/arch.in:1.2
--- src/external/bsd/mdocml/dist/arch.in:1.1.1.5	Wed Jan 12 22:57:09 2011
+++ src/external/bsd/mdocml/dist/arch.in	Sun Dec 18 13:40:08 2011
@@ -26,31 +26,54 @@
  * REMEMBER TO ADD NEW ARCHITECTURES TO MDOC.7!
  */
 
-LINE("alpha",		"Alpha")
-LINE("amd64",		"AMD64")
-LINE("amiga",		"Amiga")
-LINE("arc",		"ARC")
-LINE("arm",		"ARM")
-LINE("armish",		"ARMISH")
-LINE("aviion",		"AViiON")
-LINE("hp300",		"HP300")
-LINE("hppa",		"HPPA")
-LINE("hppa64",		"HPPA64")
+LINE("acorn26",		"acorn26")
+LINE("acorn32",		"acorn32")
+LINE("alpha",		"alpha")
+LINE("amd64",		"amd64")
+LINE("amiga",		"amiga")
+LINE("arc",		"arc")
+LINE("arm",		"arm")
+LINE("armish",		"armish")
+LINE("atari",		"atari")
+LINE("aviion",		"aviion")
+LINE("cobalt",		"cobalt")
+LINE("dreamcast",	"dreamcast")
+LINE("emips",		"emips")
+LINE("evbarm",		"evbarm")
+LINE("evbmips",		"evbmips")
+LINE("evbppc",		"evbppc")
+LINE("hp300",		"hp300")
+LINE("hp700",		"hp700")
+LINE("hpcarm",		"hpcarm")
+LINE("hpcmips",		"hpcmips")
+LINE("hpcsh",		"hpcsh")
+LINE("hppa",		"hppa")
+LINE("hppa64",		"hppa64")
 LINE("i386",		"i386")
-LINE("landisk",		"LANDISK")
-LINE("loongson",	"Loongson")
-LINE("luna88k",		"Luna88k")
-LINE("mac68k",		"Mac68k")
-LINE("macppc",		"MacPPC")
-LINE("mips64",		"MIPS64")
-LINE("mvme68k",		"MVME68k")
-LINE("mvme88k",		"MVME88k")
-LINE("mvmeppc",		"MVMEPPC")
-LINE("pmax",		"PMAX")
-LINE("sgi",		"SGI")
-LINE("socppc",		"SOCPPC")
-LINE("sparc",		"SPARC")
-LINE("sparc64",		"SPARC64")
-LINE("sun3",		"Sun3")
-LINE("vax",		"VAX")
-LINE("zaurus",		"Zaurus")
+LINE("landisk",		"landisk")
+LINE("loongson",	"loongson")
+LINE("luna88k",		"luna88k")
+LINE("mac68k",		"mac68k")
+LINE("m68k",		"m68k")
+LINE("macppc",		"macppc")
+LINE("mips64",		"mips64")
+LINE("mvme68k",		"mvme68k")
+LINE("mvme88k",		"mvme88k")
+LINE("mvmeppc",		"mvmeppc")
+LINE("next68k",		"next68k")
+LINE("pmax",		"pmax")
+LINE("prep",		"prep")
+LINE("sandpoint",	"sandpoint")
+LINE("sgi",		"sgi")
+LINE("sgimips",		"sgimips")
+LINE("socppc",		"socppc")
+LINE("sparc",		"sparc")
+LINE("sparc64",		"sparc64")
+LINE("sun2",		"sun2")
+LINE("sun3",		"sun3")
+LINE("vax",		"vax")
+LINE("x68k",		"x68k")
+LINE("x86",		"x86")
+LINE("x86_64",		"x86_64")
+LINE("xen",		"xen")
+LINE("zaurus",		"zaurus")



CVS commit: src/external/bsd/mdocml/dist

2011-10-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Oct 28 14:00:20 UTC 2011

Modified Files:
src/external/bsd/mdocml/dist: tbl_data.c

Log Message:
rename data() -> parse_data() to appease the powerpc64 toolchain:
{standard input}: Assembler messages:
{standard input}:105: Error: symbol `.data' is already defined


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 src/external/bsd/mdocml/dist/tbl_data.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/tbl_data.c
diff -u src/external/bsd/mdocml/dist/tbl_data.c:1.1.1.2 src/external/bsd/mdocml/dist/tbl_data.c:1.2
--- src/external/bsd/mdocml/dist/tbl_data.c:1.1.1.2	Fri Apr 15 09:45:36 2011
+++ src/external/bsd/mdocml/dist/tbl_data.c	Fri Oct 28 10:00:20 2011
@@ -29,13 +29,13 @@
 #include "libmandoc.h"
 #include "libroff.h"
 
-static	int		 data(struct tbl_node *, struct tbl_span *, 
+static	int		 parse_data(struct tbl_node *, struct tbl_span *, 
 int, const char *, int *);
 static	struct tbl_span	*newspan(struct tbl_node *, int, 
 struct tbl_row *);
 
 static int
-data(struct tbl_node *tbl, struct tbl_span *dp, 
+parse_data(struct tbl_node *tbl, struct tbl_span *dp, 
 		int ln, const char *p, int *pos)
 {
 	struct tbl_dat	*dat;
@@ -154,7 +154,7 @@ tbl_cdata(struct tbl_node *tbl, int ln, 
 		if (p[pos] == tbl->opts.tab) {
 			tbl->part = TBL_PART_DATA;
 			pos++;
-			return(data(tbl, tbl->last_span, ln, p, &pos));
+			return(parse_data(tbl, tbl->last_span, ln, p, &pos));
 		} else if ('\0' == p[pos]) {
 			tbl->part = TBL_PART_DATA;
 			return(1);
@@ -269,7 +269,7 @@ tbl_data(struct tbl_node *tbl, int ln, c
 	/* This returns 0 when TBL_PART_CDATA is entered. */
 
 	while ('\0' != p[pos])
-		if ( ! data(tbl, dp, ln, p, &pos))
+		if ( ! parse_data(tbl, dp, ln, p, &pos))
 			return(0);
 
 	return(1);



CVS commit: src/external/bsd/mdocml

2011-10-12 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Wed Oct 12 15:33:38 UTC 2011

Modified Files:
src/external/bsd/mdocml: Makefile.inc

Log Message:
define HAVE_STRPTIME needed for date parsing.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/external/bsd/mdocml/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/Makefile.inc
diff -u src/external/bsd/mdocml/Makefile.inc:1.13 src/external/bsd/mdocml/Makefile.inc:1.14
--- src/external/bsd/mdocml/Makefile.inc:1.13	Fri Apr 15 14:36:30 2011
+++ src/external/bsd/mdocml/Makefile.inc	Wed Oct 12 15:33:38 2011
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.13 2011/04/15 14:36:30 joerg Exp $
+# $NetBSD: Makefile.inc,v 1.14 2011/10/12 15:33:38 njoly Exp $
 
 .include 
 
@@ -7,7 +7,7 @@ VERSION!=	cd ${.PARSEDIR}/dist && ${MAKE
 CPPFLAGS+=	-DVERSION=\"${VERSION}\" -DUGLY
 
 .if (${HOSTPROG:U} == "")
-CPPFLAGS+=	-DHAVE_STRLCAT -DHAVE_STRLCPY
+CPPFLAGS+=	-DHAVE_STRLCAT -DHAVE_STRLCPY -DHAVE_STRPTIME
 .endif
 
 DISTDIR:=	${.PARSEDIR}/dist



CVS commit: src/external/bsd/mdocml/dist

2011-10-12 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Wed Oct 12 14:11:25 UTC 2011

Modified Files:
src/external/bsd/mdocml/dist: roff.c

Log Message:
Revert incorrect last change and redo it in a way that doesn't violate
strict aliasing rules.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/mdocml/dist/roff.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/roff.c
diff -u src/external/bsd/mdocml/dist/roff.c:1.4 src/external/bsd/mdocml/dist/roff.c:1.5
--- src/external/bsd/mdocml/dist/roff.c:1.4	Wed Oct 12 13:44:33 2011
+++ src/external/bsd/mdocml/dist/roff.c	Wed Oct 12 14:11:25 2011
@@ -21,9 +21,11 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 
+#include "main.h"
 #include "mandoc.h"
 #include "libroff.h"
 #include "libmandoc.h"
@@ -559,6 +561,7 @@ roff_parsetext(char *p)
 	size_t		 sz;
 	const char	*start;
 	enum mandoc_esc	 esc;
+	const char	*const_p;
 
 	start = p;
 
@@ -571,7 +574,10 @@ roff_parsetext(char *p)
 
 		if ('\\' == *p) {
 			/* Skip over escapes. */
-			esc = mandoc_escape((void *)&p, NULL, NULL);
+			p++;
+			const_p = p;
+			esc = mandoc_escape(&const_p, NULL, NULL);
+			p = UNCONST(const_p);
 			if (ESCAPE_ERROR == esc)
 break;
 			continue;



CVS commit: src/external/bsd/mdocml/dist

2011-10-12 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 12 13:44:33 UTC 2011

Modified Files:
src/external/bsd/mdocml/dist: roff.c

Log Message:
fix wrong cast.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/mdocml/dist/roff.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/roff.c
diff -u src/external/bsd/mdocml/dist/roff.c:1.3 src/external/bsd/mdocml/dist/roff.c:1.4
--- src/external/bsd/mdocml/dist/roff.c:1.3	Tue Oct 11 15:12:13 2011
+++ src/external/bsd/mdocml/dist/roff.c	Wed Oct 12 09:44:33 2011
@@ -571,9 +571,7 @@ roff_parsetext(char *p)
 
 		if ('\\' == *p) {
 			/* Skip over escapes. */
-			p++;
-			esc = mandoc_escape
-((const char **)&p, NULL, NULL);
+			esc = mandoc_escape((void *)&p, NULL, NULL);
 			if (ESCAPE_ERROR == esc)
 break;
 			continue;



CVS commit: src/external/bsd/mdocml/dist

2011-10-11 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Oct 11 19:09:46 UTC 2011

Update of /cvsroot/src/external/bsd/mdocml/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv9293

Log Message:
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

Status:

Vendor Tag: KRISTAPS
Release Tags:   mdocml-1-12-0

U src/external/bsd/mdocml/dist/Makefile
N src/external/bsd/mdocml/dist/apropos.1
N src/external/bsd/mdocml/dist/apropos.c
U src/external/bsd/mdocml/dist/arch.c
U src/external/bsd/mdocml/dist/arch.in
U src/external/bsd/mdocml/dist/att.c
U src/external/bsd/mdocml/dist/att.in
U src/external/bsd/mdocml/dist/chars.c
U src/external/bsd/mdocml/dist/chars.in
N src/external/bsd/mdocml/dist/compat_getsubopt.c
N src/external/bsd/mdocml/dist/compat_strlcat.c
N src/external/bsd/mdocml/dist/compat_strlcpy.c
U src/external/bsd/mdocml/dist/config.h.post
U src/external/bsd/mdocml/dist/config.h.pre
N src/external/bsd/mdocml/dist/demandoc.1
N src/external/bsd/mdocml/dist/demandoc.c
U src/external/bsd/mdocml/dist/eqn.7
U src/external/bsd/mdocml/dist/eqn.c
N src/external/bsd/mdocml/dist/eqn_html.c
N src/external/bsd/mdocml/dist/eqn_term.c
U src/external/bsd/mdocml/dist/example.style.css
U src/external/bsd/mdocml/dist/external.png.uu
U src/external/bsd/mdocml/dist/html.c
U src/external/bsd/mdocml/dist/html.h
U src/external/bsd/mdocml/dist/lib.c
C src/external/bsd/mdocml/dist/lib.in
U src/external/bsd/mdocml/dist/libman.h
U src/external/bsd/mdocml/dist/libmandoc.h
U src/external/bsd/mdocml/dist/libmdoc.h
U src/external/bsd/mdocml/dist/libroff.h
U src/external/bsd/mdocml/dist/main.c
U src/external/bsd/mdocml/dist/main.h
U src/external/bsd/mdocml/dist/man.7
U src/external/bsd/mdocml/dist/man.c
U src/external/bsd/mdocml/dist/man.h
U src/external/bsd/mdocml/dist/man_hash.c
U src/external/bsd/mdocml/dist/man_html.c
U src/external/bsd/mdocml/dist/man_macro.c
C src/external/bsd/mdocml/dist/man_term.c
U src/external/bsd/mdocml/dist/man_validate.c
U src/external/bsd/mdocml/dist/mandoc.1
U src/external/bsd/mdocml/dist/mandoc.3
U src/external/bsd/mdocml/dist/mandoc.c
U src/external/bsd/mdocml/dist/mandoc.h
U src/external/bsd/mdocml/dist/mandoc_char.7
N src/external/bsd/mdocml/dist/mandocdb.8
N src/external/bsd/mdocml/dist/mandocdb.c
U src/external/bsd/mdocml/dist/mdoc.7
U src/external/bsd/mdocml/dist/mdoc.c
U src/external/bsd/mdocml/dist/mdoc.h
C src/external/bsd/mdocml/dist/mdoc_argv.c
U src/external/bsd/mdocml/dist/mdoc_hash.c
U src/external/bsd/mdocml/dist/mdoc_html.c
U src/external/bsd/mdocml/dist/mdoc_macro.c
N src/external/bsd/mdocml/dist/mdoc_man.c
C src/external/bsd/mdocml/dist/mdoc_term.c
C src/external/bsd/mdocml/dist/mdoc_validate.c
U src/external/bsd/mdocml/dist/msec.c
U src/external/bsd/mdocml/dist/msec.in
U src/external/bsd/mdocml/dist/out.c
U src/external/bsd/mdocml/dist/out.h
N src/external/bsd/mdocml/dist/preconv.1
N src/external/bsd/mdocml/dist/preconv.c
N src/external/bsd/mdocml/dist/predefs.in
C src/external/bsd/mdocml/dist/read.c
U src/external/bsd/mdocml/dist/roff.7
C src/external/bsd/mdocml/dist/roff.c
U src/external/bsd/mdocml/dist/st.c
U src/external/bsd/mdocml/dist/st.in
U src/external/bsd/mdocml/dist/tbl.7
C src/external/bsd/mdocml/dist/tbl.c
U src/external/bsd/mdocml/dist/tbl_data.c
U src/external/bsd/mdocml/dist/tbl_html.c
C src/external/bsd/mdocml/dist/tbl_layout.c
C src/external/bsd/mdocml/dist/tbl_opts.c
U src/external/bsd/mdocml/dist/tbl_term.c
U src/external/bsd/mdocml/dist/term.c
U src/external/bsd/mdocml/dist/term.h
U src/external/bsd/mdocml/dist/term_ascii.c
U src/external/bsd/mdocml/dist/term_ps.c
N src/external/bsd/mdocml/dist/test-getsubopt.c
N src/external/bsd/mdocml/dist/test-mmap.c
U src/external/bsd/mdocml/dist/test-strlcat.c
U src/external/bsd/mdocml/dist/test-strlcpy.c
N src/external/bsd/mdocml/dist/test-strptime.c
U src/external/bsd/mdocml/dist/tree.c
U src/external/bsd/mdocml/dist/vol.c
U src/external/bsd/mdocml/dist/vol.in

10 conflicts created by this import.
Use the following command to help the merge:

cvs checkout -jKRISTAPS:yesterday -jKRISTAPS 
src/external/bsd/mdocml/dist



CVS commit: src/external/bsd/mdocml

2011-08-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Aug 17 09:30:14 UTC 2011

Modified Files:
src/external/bsd/mdocml/dist: mdoc_validate.c
src/external/bsd/mdocml/lib/libmandoc: Makefile

Log Message:
fix cast warnings


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.13 -r1.2 src/external/bsd/mdocml/dist/mdoc_validate.c
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/mdocml/lib/libmandoc/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/mdoc_validate.c
diff -u src/external/bsd/mdocml/dist/mdoc_validate.c:1.1.1.13 src/external/bsd/mdocml/dist/mdoc_validate.c:1.2
--- src/external/bsd/mdocml/dist/mdoc_validate.c:1.1.1.13	Fri Apr 15 09:45:35 2011
+++ src/external/bsd/mdocml/dist/mdoc_validate.c	Wed Aug 17 05:30:13 2011
@@ -723,7 +723,7 @@
 			if (LIST_column == lt) {
 n->norm->Bl.ncols = 
 	n->args->argv[i].sz;
-n->norm->Bl.cols = (const char **)
+n->norm->Bl.cols = (void *)
 	n->args->argv[i].value;
 			}
 		}
@@ -1537,7 +1537,7 @@
 		((size_t)mdoc->last->nchild * sizeof(char *));
 
 	mdoc->last->norm->Bl.ncols = np->args->argv[j].sz;
-	mdoc->last->norm->Bl.cols = (const char **)np->args->argv[j].value;
+	mdoc->last->norm->Bl.cols = (void *)np->args->argv[j].value;
 
 	for (i = 0, nn = mdoc->last->child; nn; i++) {
 		np->args->argv[j].value[i] = nn->string;

Index: src/external/bsd/mdocml/lib/libmandoc/Makefile
diff -u src/external/bsd/mdocml/lib/libmandoc/Makefile:1.2 src/external/bsd/mdocml/lib/libmandoc/Makefile:1.3
--- src/external/bsd/mdocml/lib/libmandoc/Makefile:1.2	Tue Jun 21 22:49:42 2011
+++ src/external/bsd/mdocml/lib/libmandoc/Makefile	Wed Aug 17 05:30:13 2011
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2011/06/22 02:49:42 mrg Exp $
+# $NetBSD: Makefile,v 1.3 2011/08/17 09:30:13 christos Exp $
 
 LIBISPRIVATE=	yes
 
@@ -11,8 +11,3 @@
 MAN=	mandoc.3
 
 .include 
-
-# XXX
-.if ${HAVE_GCC} == 45
-COPTS.mdoc_validate.c+=	-Wno-error
-.endif



CVS commit: src/external/bsd/mdocml/dist

2011-06-01 Thread Hans Rosenfeld
Module Name:src
Committed By:   hans
Date:   Wed Jun  1 15:52:49 UTC 2011

Modified Files:
src/external/bsd/mdocml/dist: read.c

Log Message:
include config.h


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/mdocml/dist/read.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/read.c
diff -u src/external/bsd/mdocml/dist/read.c:1.1.1.1 src/external/bsd/mdocml/dist/read.c:1.2
--- src/external/bsd/mdocml/dist/read.c:1.1.1.1	Fri Apr 15 13:45:30 2011
+++ src/external/bsd/mdocml/dist/read.c	Wed Jun  1 15:52:48 2011
@@ -15,6 +15,10 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include 
 #include 
 



CVS commit: src/external/bsd/mdocml/dist

2011-04-15 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Apr 15 22:05:52 UTC 2011

Modified Files:
src/external/bsd/mdocml/dist: roff.c

Log Message:
Really apply roff.c 1.134 for the conditional stack fix


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.7 -r1.2 src/external/bsd/mdocml/dist/roff.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/roff.c
diff -u src/external/bsd/mdocml/dist/roff.c:1.1.1.7 src/external/bsd/mdocml/dist/roff.c:1.2
--- src/external/bsd/mdocml/dist/roff.c:1.1.1.7	Fri Apr 15 13:45:26 2011
+++ src/external/bsd/mdocml/dist/roff.c	Fri Apr 15 22:05:51 2011
@@ -277,10 +277,6 @@
 	assert(r->last);
 	p = r->last; 
 
-	if (ROFF_el == p->tok)
-		if (r->rstackpos > -1)
-			r->rstackpos--;
-
 	r->last = r->last->parent;
 	free(p->name);
 	free(p->end);
@@ -976,29 +972,20 @@
 	int		 sv;
 	enum roffrule	 rule;
 
-	/* Stack overflow! */
-
-	if (ROFF_ie == tok && r->rstackpos == RSTACK_MAX - 1) {
-		mandoc_msg(MANDOCERR_MEM, r->parse, ln, ppos, NULL);
-		return(ROFF_ERR);
-	}
-
-	/* First, evaluate the conditional. */
+	/* 
+	 * An `.el' has no conditional body: it will consume the value
+	 * of the current rstack entry set in prior `ie' calls or
+	 * defaults to DENY.  
+	 *
+	 * If we're not an `el', however, then evaluate the conditional.
+	 */
 
-	if (ROFF_el == tok) {
-		/* 
-		 * An `.el' will get the value of the current rstack
-		 * entry set in prior `ie' calls or defaults to DENY.
-	 	 */
-		if (r->rstackpos < 0)
-			rule = ROFFRULE_DENY;
-		else
-			rule = r->rstack[r->rstackpos];
-	} else
-		rule = roff_evalcond(*bufp, &pos);
+	rule = ROFF_el == tok ?
+		(r->rstackpos < 0 ? 
+		 ROFFRULE_DENY : r->rstack[r->rstackpos--]) :
+		roff_evalcond(*bufp, &pos);
 
 	sv = pos;
-
 	while (' ' == (*bufp)[pos])
 		pos++;
 
@@ -1018,16 +1005,20 @@
 
 	r->last->rule = rule;
 
+	/*
+	 * An if-else will put the NEGATION of the current evaluated
+	 * conditional into the stack of rules.
+	 */
+
 	if (ROFF_ie == tok) {
-		/*
-		 * An if-else will put the NEGATION of the current
-		 * evaluated conditional into the stack.
-		 */
-		r->rstackpos++;
-		if (ROFFRULE_DENY == r->last->rule)
-			r->rstack[r->rstackpos] = ROFFRULE_ALLOW;
-		else
-			r->rstack[r->rstackpos] = ROFFRULE_DENY;
+		if (r->rstackpos == RSTACK_MAX - 1) {
+			mandoc_msg(MANDOCERR_MEM, 
+r->parse, ln, ppos, NULL);
+			return(ROFF_ERR);
+		}
+		r->rstack[++r->rstackpos] = 
+			ROFFRULE_DENY == r->last->rule ?
+			ROFFRULE_ALLOW : ROFFRULE_DENY;
 	}
 
 	/* If the parent has false as its rule, then so do we. */



CVS commit: src/external/bsd/mdocml/dist

2011-04-15 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Apr 15 15:50:28 UTC 2011

Modified Files:
src/external/bsd/mdocml/dist: mdoc_argv.c tbl_layout.c

Log Message:
Deal with two cases of name shadowing


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.13 -r1.2 src/external/bsd/mdocml/dist/mdoc_argv.c
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/mdocml/dist/tbl_layout.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/mdoc_argv.c
diff -u src/external/bsd/mdocml/dist/mdoc_argv.c:1.1.1.13 src/external/bsd/mdocml/dist/mdoc_argv.c:1.2
--- src/external/bsd/mdocml/dist/mdoc_argv.c:1.1.1.13	Fri Apr 15 13:45:32 2011
+++ src/external/bsd/mdocml/dist/mdoc_argv.c	Fri Apr 15 15:50:28 2011
@@ -652,40 +652,40 @@
 static enum mdocargt
 argv_a2arg(enum mdoct tok, const char *p)
 {
-	const enum mdocargt *args;
+	const enum mdocargt *argsp;
 
-	args = NULL;
+	argsp = NULL;
 
 	switch (tok) {
 	case (MDOC_An):
-		args = args_An;
+		argsp = args_An;
 		break;
 	case (MDOC_Bd):
-		args = args_Bd;
+		argsp = args_Bd;
 		break;
 	case (MDOC_Bf):
-		args = args_Bf;
+		argsp = args_Bf;
 		break;
 	case (MDOC_Bk):
-		args = args_Bk;
+		argsp = args_Bk;
 		break;
 	case (MDOC_Bl):
-		args = args_Bl;
+		argsp = args_Bl;
 		break;
 	case (MDOC_Rv):
 		/* FALLTHROUGH */
 	case (MDOC_Ex):
-		args = args_Ex;
+		argsp = args_Ex;
 		break;
 	default:
 		return(MDOC_ARG_MAX);
 	}
 
-	assert(args);
+	assert(argsp);
 
-	for ( ; MDOC_ARG_MAX != *args ; args++)
-		if (0 == strcmp(p, mdoc_argnames[*args]))
-			return(*args);
+	for ( ; MDOC_ARG_MAX != *argsp ; argsp++)
+		if (0 == strcmp(p, mdoc_argnames[*argsp]))
+			return(*argsp);
 
 	return(MDOC_ARG_MAX);
 }

Index: src/external/bsd/mdocml/dist/tbl_layout.c
diff -u src/external/bsd/mdocml/dist/tbl_layout.c:1.3 src/external/bsd/mdocml/dist/tbl_layout.c:1.4
--- src/external/bsd/mdocml/dist/tbl_layout.c:1.3	Fri Apr 15 13:47:18 2011
+++ src/external/bsd/mdocml/dist/tbl_layout.c	Fri Apr 15 15:50:28 2011
@@ -427,19 +427,19 @@
 }
 
 static void
-head_adjust(const struct tbl_cell *cell, struct tbl_head *head)
+head_adjust(const struct tbl_cell *cellp, struct tbl_head *head)
 {
-	if (TBL_CELL_VERT != cell->pos &&
-			TBL_CELL_DVERT != cell->pos) {
+	if (TBL_CELL_VERT != cellp->pos &&
+			TBL_CELL_DVERT != cellp->pos) {
 		head->pos = TBL_HEAD_DATA;
 		return;
 	}
 
-	if (TBL_CELL_VERT == cell->pos)
+	if (TBL_CELL_VERT == cellp->pos)
 		if (TBL_HEAD_DVERT != head->pos)
 			head->pos = TBL_HEAD_VERT;
 
-	if (TBL_CELL_DVERT == cell->pos)
+	if (TBL_CELL_DVERT == cellp->pos)
 		head->pos = TBL_HEAD_DVERT;
 }
 



CVS commit: src/external/bsd/mdocml/dist

2011-04-15 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Apr 15 13:47:18 UTC 2011

Modified Files:
src/external/bsd/mdocml/dist: man_term.c mdoc_term.c tbl.c tbl_layout.c
tbl_opts.c
Removed Files:
src/external/bsd/mdocml/dist: chars.h man.3 man_argv.c mdoc.3
mdoc_strings.c roff.3 roff.h

Log Message:
Merge for mdocml-1.11.1


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.5 -r0 src/external/bsd/mdocml/dist/chars.h \
src/external/bsd/mdocml/dist/man_argv.c
cvs rdiff -u -r1.1.1.6 -r0 src/external/bsd/mdocml/dist/man.3 \
src/external/bsd/mdocml/dist/mdoc.3
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/mdocml/dist/man_term.c \
src/external/bsd/mdocml/dist/mdoc_term.c
cvs rdiff -u -r1.1.1.9 -r0 src/external/bsd/mdocml/dist/mdoc_strings.c
cvs rdiff -u -r1.1.1.4 -r0 src/external/bsd/mdocml/dist/roff.3
cvs rdiff -u -r1.1.1.3 -r0 src/external/bsd/mdocml/dist/roff.h
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/mdocml/dist/tbl.c \
src/external/bsd/mdocml/dist/tbl_layout.c \
src/external/bsd/mdocml/dist/tbl_opts.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/man_term.c
diff -u src/external/bsd/mdocml/dist/man_term.c:1.6 src/external/bsd/mdocml/dist/man_term.c:1.7
--- src/external/bsd/mdocml/dist/man_term.c:1.6	Wed Jan 12 22:58:42 2011
+++ src/external/bsd/mdocml/dist/man_term.c	Fri Apr 15 13:47:17 2011
@@ -1,6 +1,6 @@
-/*	$Vendor-Id: man_term.c,v 1.94 2011/01/04 01:23:18 schwarze Exp $ */
+/*	$Vendor-Id: man_term.c,v 1.105 2011/03/22 10:13:01 kristaps Exp $ */
 /*
- * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons 
+ * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons 
  * Copyright (c) 2010, 2011 Ingo Schwarze 
  *
  * Permission to use, copy, modify, and distribute this software for any
@@ -31,7 +31,6 @@
 #include "out.h"
 #include "man.h"
 #include "term.h"
-#include "chars.h"
 #include "main.h"
 
 #define	INDENT		  7
@@ -126,7 +125,7 @@
 	{ pre_I, NULL, 0 }, /* I */
 	{ pre_alternate, NULL, 0 }, /* IR */
 	{ pre_alternate, NULL, 0 }, /* RI */
-	{ NULL, NULL, MAN_NOTEXT }, /* na */
+	{ pre_ign, NULL, MAN_NOTEXT }, /* na */
 	{ pre_sp, NULL, MAN_NOTEXT }, /* sp */
 	{ pre_literal, NULL, 0 }, /* nf */
 	{ pre_literal, NULL, 0 }, /* fi */
@@ -212,6 +211,9 @@
 {
 	term_newln(p);
 
+	if (n->body && n->body->child && MAN_TBL == n->body->child->type)
+		return;
+
 	if (NULL == n->prev)
 		return;
 
@@ -255,7 +257,7 @@
 	else
 		mt->fl &= ~MANT_LITERAL;
 
-	return(1);
+	return(0);
 }
 
 /* ARGSUSED */
@@ -397,6 +399,11 @@
 	else 
 		p->offset = v;
 
+	/* Don't let this creep beyond the right margin. */
+
+	if (p->offset > p->rmargin)
+		p->offset = p->rmargin;
+
 	return(0);
 }
 
@@ -850,20 +857,31 @@
 	size_t		 rm, rmax;
 	int		 c;
 
-	c = 1;
-
 	switch (n->type) {
 	case(MAN_TEXT):
-		if (0 == *n->string) {
+		/*
+		 * If we have a blank line, output a vertical space.
+		 * If we have a space as the first character, break
+		 * before printing the line's data.
+		 */
+		if ('\0' == *n->string) {
 			term_vspace(p);
-			break;
-		}
+			return;
+		} else if (' ' == *n->string && MAN_LINE & n->flags)
+			term_newln(p);
 
 		term_word(p, n->string);
 
-		/* FIXME: this means that macro lines are munged!  */
-
-		if (MANT_LITERAL & mt->fl) {
+		/*
+		 * If we're in a literal context, make sure that words
+		 * togehter on the same line stay together.  This is a
+		 * POST-printing call, so we check the NEXT word.  Since
+		 * -man doesn't have nested macros, we don't need to be
+		 * more specific than this.
+		 */
+		if (MANT_LITERAL & mt->fl && 
+(NULL == n->next || 
+ n->next->line > n->line)) {
 			rm = p->rmargin;
 			rmax = p->maxrmargin;
 			p->rmargin = p->maxrmargin = TERM_MAXMARGIN;
@@ -873,35 +891,40 @@
 			p->rmargin = rm;
 			p->maxrmargin = rmax;
 		}
-		break;
+
+		if (MAN_EOS & n->flags)
+			p->flags |= TERMP_SENTENCE;
+		return;
+	case (MAN_EQN):
+		term_word(p, n->eqn->data);
+		return;
 	case (MAN_TBL):
+		/*
+		 * Tables are preceded by a newline.  Then process a
+		 * table line, which will cause line termination,
+		 */
 		if (TBL_SPAN_FIRST & n->span->flags) 
 			term_newln(p);
 		term_tbl(p, n->span);
-		break;
+		return;
 	default:
-		if ( ! (MAN_NOTEXT & termacts[n->tok].flags))
-			term_fontrepl(p, TERMFONT_NONE);
-		if (termacts[n->tok].pre)
-			c = (*termacts[n->tok].pre)(p, mt, n, m);
 		break;
 	}
 
+	if ( ! (MAN_NOTEXT & termacts[n->tok].flags))
+		term_fontrepl(p, TERMFONT_NONE);
+
+	c = 1;
+	if (termacts[n->tok].pre)
+		c = (*termacts[n->tok].pre)(p, mt, n, m);
+
 	if (c && n->child)
 		print_man_nodelist(p, mt, n->child, m);
 
-	switch (n->type) {
-	case (MAN_TEXT):
-		/* FALLTHROUGH */
-	case (MAN_TBL):
-		break;
-	default:
-		if (termacts[n->tok].post)
-			(*termacts[n->tok].post)(p, mt, n, m);
-		if ( ! (MAN_NOTEXT & termacts[n->tok].flags))
-			term_fontrepl(p, TERMFONT_NONE);
-		break;
-

CVS commit: src/external/bsd/mdocml/dist

2011-04-15 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Apr 15 13:45:43 UTC 2011

Update of /cvsroot/src/external/bsd/mdocml/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv28680

Log Message:
Import mdocml-1.11.1 with a few additional fixes from CVS:

Merge the libraries into a single frontend, libmandoc.
Iinitial support for eqn(1) functionality.

Additional changes:
Portability fixes (tbl_opts.c 1.11, tbl_layout.c 1.18, tbl.c 1.25)
HTML space fixe (mdocml_html.c 1.163)
ROFF conditional nesting bug (roff.c 1.131)

Status:

Vendor Tag: KRISTAPS
Release Tags:   mdocml-1-11-1

U src/external/bsd/mdocml/dist/Makefile
U src/external/bsd/mdocml/dist/roff.c
U src/external/bsd/mdocml/dist/arch.c
U src/external/bsd/mdocml/dist/arch.in
U src/external/bsd/mdocml/dist/att.c
U src/external/bsd/mdocml/dist/att.in
U src/external/bsd/mdocml/dist/chars.c
U src/external/bsd/mdocml/dist/chars.in
U src/external/bsd/mdocml/dist/compat.c
U src/external/bsd/mdocml/dist/config.h.post
U src/external/bsd/mdocml/dist/tbl_term.c
U src/external/bsd/mdocml/dist/config.h.pre
U src/external/bsd/mdocml/dist/term.c
U src/external/bsd/mdocml/dist/example.style.css
U src/external/bsd/mdocml/dist/html.c
U src/external/bsd/mdocml/dist/html.h
N src/external/bsd/mdocml/dist/eqn.7
U src/external/bsd/mdocml/dist/lib.c
N src/external/bsd/mdocml/dist/eqn.c
U src/external/bsd/mdocml/dist/lib.in
U src/external/bsd/mdocml/dist/libman.h
U src/external/bsd/mdocml/dist/libmandoc.h
U src/external/bsd/mdocml/dist/libmdoc.h
U src/external/bsd/mdocml/dist/libroff.h
U src/external/bsd/mdocml/dist/main.c
U src/external/bsd/mdocml/dist/main.h
N src/external/bsd/mdocml/dist/mandoc.3
U src/external/bsd/mdocml/dist/man.7
U src/external/bsd/mdocml/dist/man.c
U src/external/bsd/mdocml/dist/man.h
N src/external/bsd/mdocml/dist/mandoc-db.1
U src/external/bsd/mdocml/dist/man_hash.c
U src/external/bsd/mdocml/dist/man_html.c
U src/external/bsd/mdocml/dist/man_macro.c
C src/external/bsd/mdocml/dist/man_term.c
U src/external/bsd/mdocml/dist/man_validate.c
U src/external/bsd/mdocml/dist/mandoc.1
U src/external/bsd/mdocml/dist/mandoc.c
U src/external/bsd/mdocml/dist/mandoc.h
U src/external/bsd/mdocml/dist/mandoc_char.7
N src/external/bsd/mdocml/dist/read.c
U src/external/bsd/mdocml/dist/mdoc.7
U src/external/bsd/mdocml/dist/mdoc.c
U src/external/bsd/mdocml/dist/mdoc.h
U src/external/bsd/mdocml/dist/mdoc_argv.c
U src/external/bsd/mdocml/dist/mdoc_hash.c
U src/external/bsd/mdocml/dist/mdoc_html.c
U src/external/bsd/mdocml/dist/mdoc_macro.c
N src/external/bsd/mdocml/dist/mandoc-db.c
C src/external/bsd/mdocml/dist/mdoc_term.c
U src/external/bsd/mdocml/dist/mdoc_validate.c
U src/external/bsd/mdocml/dist/msec.c
U src/external/bsd/mdocml/dist/msec.in
U src/external/bsd/mdocml/dist/out.c
U src/external/bsd/mdocml/dist/out.h
C src/external/bsd/mdocml/dist/tbl_opts.c
U src/external/bsd/mdocml/dist/roff.7
U src/external/bsd/mdocml/dist/st.c
U src/external/bsd/mdocml/dist/st.in
U src/external/bsd/mdocml/dist/tbl.7
C src/external/bsd/mdocml/dist/tbl.c
U src/external/bsd/mdocml/dist/tbl_data.c
U src/external/bsd/mdocml/dist/tbl_html.c
U src/external/bsd/mdocml/dist/term.h
U src/external/bsd/mdocml/dist/term_ascii.c
U src/external/bsd/mdocml/dist/term_ps.c
U src/external/bsd/mdocml/dist/test-strlcat.c
U src/external/bsd/mdocml/dist/test-strlcpy.c
U src/external/bsd/mdocml/dist/tree.c
U src/external/bsd/mdocml/dist/vol.c
U src/external/bsd/mdocml/dist/vol.in
C src/external/bsd/mdocml/dist/tbl_layout.c
U src/external/bsd/mdocml/dist/external.png.uu

5 conflicts created by this import.
Use the following command to help the merge:

cvs checkout -jKRISTAPS:yesterday -jKRISTAPS 
src/external/bsd/mdocml/dist



CVS commit: src/external/bsd/mdocml

2011-01-12 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Wed Jan 12 23:00:52 UTC 2011

Modified Files:
src/external/bsd/mdocml: prepare-import.sh

Log Message:
Use example.style.css in place of style.css.
Replace $Mdocdate$ with the content in correct order, so that groff
gives proper output.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/mdocml/prepare-import.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/prepare-import.sh
diff -u src/external/bsd/mdocml/prepare-import.sh:1.3 src/external/bsd/mdocml/prepare-import.sh:1.4
--- src/external/bsd/mdocml/prepare-import.sh:1.3	Fri Feb 19 23:02:41 2010
+++ src/external/bsd/mdocml/prepare-import.sh	Wed Jan 12 23:00:51 2011
@@ -3,11 +3,12 @@
 set -e
 
 cd dist
-rm -rf ChangeLog.xsl example.style.css index.css *.sgml
+rm -rf ChangeLog.xsl style.css index.css *.sgml
 
 uuencode external.png < external.png > external.png.uu
 rm external.png
 
 for f in [a-z]*; do
-	sed 's/[$]Id:/\$Vendor-Id:/' < $f > $f.new && mv $f.new $f
+	sed -e 's/[$]Id:/\$Vendor-Id:/' \
+	-e 's/[$]Mdocdate: \([^$]*\) \([0-9][0-9][0-9][0-9]\) [$]/\1, \2/' < $f > $f.new && mv $f.new $f
 done



CVS commit: src/external/bsd/mdocml/dist

2011-01-12 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Wed Jan 12 22:58:42 UTC 2011

Modified Files:
src/external/bsd/mdocml/dist: man_term.c mdoc_term.c
Removed Files:
src/external/bsd/mdocml/dist: man_action.c mdoc_action.c style.css

Log Message:
Merge for mdocml-1.10.9


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.7 -r0 src/external/bsd/mdocml/dist/man_action.c
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/mdocml/dist/man_term.c \
src/external/bsd/mdocml/dist/mdoc_term.c
cvs rdiff -u -r1.12 -r0 src/external/bsd/mdocml/dist/mdoc_action.c
cvs rdiff -u -r1.1.1.3 -r0 src/external/bsd/mdocml/dist/style.css

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/man_term.c
diff -u src/external/bsd/mdocml/dist/man_term.c:1.5 src/external/bsd/mdocml/dist/man_term.c:1.6
--- src/external/bsd/mdocml/dist/man_term.c:1.5	Tue Jul 27 22:40:24 2010
+++ src/external/bsd/mdocml/dist/man_term.c	Wed Jan 12 22:58:42 2011
@@ -1,6 +1,7 @@
-/*	$Vendor-Id: man_term.c,v 1.84 2010/07/23 13:22:35 kristaps Exp $ */
+/*	$Vendor-Id: man_term.c,v 1.94 2011/01/04 01:23:18 schwarze Exp $ */
 /*
  * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons 
+ * Copyright (c) 2010, 2011 Ingo Schwarze 
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -80,14 +81,12 @@
 static	void		  print_bvspace(struct termp *, 
 const struct man_node *);
 
+static	int		  pre_alternate(DECL_ARGS);
 static	int		  pre_B(DECL_ARGS);
-static	int		  pre_BI(DECL_ARGS);
 static	int		  pre_HP(DECL_ARGS);
 static	int		  pre_I(DECL_ARGS);
 static	int		  pre_IP(DECL_ARGS);
 static	int		  pre_PP(DECL_ARGS);
-static	int		  pre_RB(DECL_ARGS);
-static	int		  pre_RI(DECL_ARGS);
 static	int		  pre_RS(DECL_ARGS);
 static	int		  pre_SH(DECL_ARGS);
 static	int		  pre_SS(DECL_ARGS);
@@ -96,6 +95,7 @@
 static	int		  pre_in(DECL_ARGS);
 static	int		  pre_literal(DECL_ARGS);
 static	int		  pre_sp(DECL_ARGS);
+static	int		  pre_ft(DECL_ARGS);
 
 static	void		  post_IP(DECL_ARGS);
 static	void		  post_HP(DECL_ARGS);
@@ -117,31 +117,27 @@
 	{ pre_HP, post_HP, 0 }, /* HP */ 
 	{ NULL, NULL, 0 }, /* SM */
 	{ pre_B, NULL, 0 }, /* SB */
-	{ pre_BI, NULL, 0 }, /* BI */
-	{ pre_BI, NULL, 0 }, /* IB */
-	{ pre_RB, NULL, 0 }, /* BR */
-	{ pre_RB, NULL, 0 }, /* RB */
+	{ pre_alternate, NULL, 0 }, /* BI */
+	{ pre_alternate, NULL, 0 }, /* IB */
+	{ pre_alternate, NULL, 0 }, /* BR */
+	{ pre_alternate, NULL, 0 }, /* RB */
 	{ NULL, NULL, 0 }, /* R */
 	{ pre_B, NULL, 0 }, /* B */
 	{ pre_I, NULL, 0 }, /* I */
-	{ pre_RI, NULL, 0 }, /* IR */
-	{ pre_RI, NULL, 0 }, /* RI */
+	{ pre_alternate, NULL, 0 }, /* IR */
+	{ pre_alternate, NULL, 0 }, /* RI */
 	{ NULL, NULL, MAN_NOTEXT }, /* na */
-	{ pre_I, NULL, 0 }, /* i */
 	{ pre_sp, NULL, MAN_NOTEXT }, /* sp */
 	{ pre_literal, NULL, 0 }, /* nf */
 	{ pre_literal, NULL, 0 }, /* fi */
-	{ NULL, NULL, 0 }, /* r */
 	{ NULL, NULL, 0 }, /* RE */
 	{ pre_RS, post_RS, 0 }, /* RS */
 	{ pre_ign, NULL, 0 }, /* DT */
 	{ pre_ign, NULL, 0 }, /* UC */
 	{ pre_ign, NULL, 0 }, /* PD */
- 	{ pre_sp, NULL, MAN_NOTEXT }, /* Sp */
- 	{ pre_literal, NULL, 0 }, /* Vb */
- 	{ pre_literal, NULL, 0 }, /* Ve */
 	{ pre_ign, NULL, 0 }, /* AT */
 	{ pre_in, NULL, MAN_NOTEXT }, /* in */
+	{ pre_ft, NULL, MAN_NOTEXT }, /* ft */
 };
 
 
@@ -253,106 +249,117 @@
 {
 
 	term_newln(p);
-	switch (n->tok) {
-	case (MAN_Vb):
-		/* FALLTHROUGH */
-	case (MAN_nf):
+
+	if (MAN_nf == n->tok)
 		mt->fl |= MANT_LITERAL;
-		return(MAN_Vb != n->tok);
-	default:
+	else
 		mt->fl &= ~MANT_LITERAL;
-		break;
-	}
 
 	return(1);
 }
 
-
-
 /* ARGSUSED */
 static int
-pre_RB(DECL_ARGS)
+pre_alternate(DECL_ARGS)
 {
-	const struct man_node *nn;
-	int		 i;
+	enum termfont		 font[2];
+	const struct man_node	*nn;
+	int			 savelit, i;
 
-	for (i = 0, nn = n->child; nn; nn = nn->next, i++) {
-		if (i % 2 && MAN_RB == n->tok)
-			term_fontrepl(p, TERMFONT_BOLD);
-		else if ( ! (i % 2) && MAN_RB != n->tok)
-			term_fontrepl(p, TERMFONT_BOLD);
-		else
-			term_fontrepl(p, TERMFONT_NONE);
+	switch (n->tok) {
+	case (MAN_RB):
+		font[0] = TERMFONT_NONE;
+		font[1] = TERMFONT_BOLD;
+		break;
+	case (MAN_RI):
+		font[0] = TERMFONT_NONE;
+		font[1] = TERMFONT_UNDER;
+		break;
+	case (MAN_BR):
+		font[0] = TERMFONT_BOLD;
+		font[1] = TERMFONT_NONE;
+		break;
+	case (MAN_BI):
+		font[0] = TERMFONT_BOLD;
+		font[1] = TERMFONT_UNDER;
+		break;
+	case (MAN_IR):
+		font[0] = TERMFONT_UNDER;
+		font[1] = TERMFONT_NONE;
+		break;
+	case (MAN_IB):
+		font[0] = TERMFONT_UNDER;
+		font[1] = TERMFONT_BOLD;
+		break;
+	default:
+		abort();
+	}
 
-		if (i > 0)
-			p->flags |= TERMP_NOSPACE;
+	savelit = MANT_LITERAL & mt->fl;
+	mt->fl &= ~MANT_LITERAL;
 
+	for (i = 0, nn = n->child; nn; nn = nn->next, i = 1 - i) {
+		term_fontrepl(p, font[i]);
+		if (savelit && NULL == nn->next)
+			mt

CVS commit: src/external/bsd/mdocml/dist

2011-01-12 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Wed Jan 12 22:57:22 UTC 2011

Update of /cvsroot/src/external/bsd/mdocml/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv3862

Log Message:
Import mdocml-1.10.9 and additional post-release bugfixes
(tbl_data.c 1.15, tbl_layout.c 1.13, tbl_opts.c 1.8).

This features many small improvements and the initial integration of
tbl(1) support on all output devices.

Status:

Vendor Tag: KRISTAPS
Release Tags:   mdocml-1-10-9

U src/external/bsd/mdocml/dist/mdoc_macro.c
U src/external/bsd/mdocml/dist/config.h.pre
U src/external/bsd/mdocml/dist/test-strlcpy.c
U src/external/bsd/mdocml/dist/test-strlcat.c
U src/external/bsd/mdocml/dist/chars.in
U src/external/bsd/mdocml/dist/vol.in
U src/external/bsd/mdocml/dist/st.in
U src/external/bsd/mdocml/dist/msec.in
U src/external/bsd/mdocml/dist/lib.in
U src/external/bsd/mdocml/dist/att.in
U src/external/bsd/mdocml/dist/arch.in
N src/external/bsd/mdocml/dist/tbl.7
U src/external/bsd/mdocml/dist/roff.3
U src/external/bsd/mdocml/dist/roff.7
U src/external/bsd/mdocml/dist/man.3
U src/external/bsd/mdocml/dist/man.7
U src/external/bsd/mdocml/dist/mandoc_char.7
U src/external/bsd/mdocml/dist/mdoc.7
U src/external/bsd/mdocml/dist/mdoc.3
U src/external/bsd/mdocml/dist/mandoc.1
U src/external/bsd/mdocml/dist/Makefile
N src/external/bsd/mdocml/dist/libroff.h
U src/external/bsd/mdocml/dist/mandoc.h
U src/external/bsd/mdocml/dist/roff.h
U src/external/bsd/mdocml/dist/main.h
U src/external/bsd/mdocml/dist/out.h
U src/external/bsd/mdocml/dist/chars.h
U src/external/bsd/mdocml/dist/html.h
U src/external/bsd/mdocml/dist/libmandoc.h
U src/external/bsd/mdocml/dist/term.h
U src/external/bsd/mdocml/dist/libman.h
U src/external/bsd/mdocml/dist/man.h
U src/external/bsd/mdocml/dist/libmdoc.h
U src/external/bsd/mdocml/dist/mdoc.h
N src/external/bsd/mdocml/dist/tbl_data.c
N src/external/bsd/mdocml/dist/tbl_layout.c
N src/external/bsd/mdocml/dist/tbl_opts.c
N src/external/bsd/mdocml/dist/tbl.c
U src/external/bsd/mdocml/dist/roff.c
U src/external/bsd/mdocml/dist/mandoc.c
U src/external/bsd/mdocml/dist/man_argv.c
U src/external/bsd/mdocml/dist/man_validate.c
U src/external/bsd/mdocml/dist/man_hash.c
U src/external/bsd/mdocml/dist/man.c
U src/external/bsd/mdocml/dist/man_macro.c
N src/external/bsd/mdocml/dist/tbl_html.c
N src/external/bsd/mdocml/dist/tbl_term.c
U src/external/bsd/mdocml/dist/term_ascii.c
U src/external/bsd/mdocml/dist/term_ps.c
U src/external/bsd/mdocml/dist/out.c
U src/external/bsd/mdocml/dist/man_html.c
U src/external/bsd/mdocml/dist/mdoc_html.c
U src/external/bsd/mdocml/dist/html.c
C src/external/bsd/mdocml/dist/man_term.c
U src/external/bsd/mdocml/dist/compat.c
U src/external/bsd/mdocml/dist/tree.c
U src/external/bsd/mdocml/dist/term.c
U src/external/bsd/mdocml/dist/chars.c
C src/external/bsd/mdocml/dist/mdoc_term.c
U src/external/bsd/mdocml/dist/main.c
U src/external/bsd/mdocml/dist/st.c
U src/external/bsd/mdocml/dist/msec.c
U src/external/bsd/mdocml/dist/vol.c
U src/external/bsd/mdocml/dist/arch.c
U src/external/bsd/mdocml/dist/att.c
U src/external/bsd/mdocml/dist/lib.c
U src/external/bsd/mdocml/dist/mdoc_validate.c
U src/external/bsd/mdocml/dist/mdoc_argv.c
U src/external/bsd/mdocml/dist/mdoc_strings.c
U src/external/bsd/mdocml/dist/mdoc_hash.c
U src/external/bsd/mdocml/dist/mdoc.c
U src/external/bsd/mdocml/dist/config.h.post
U src/external/bsd/mdocml/dist/external.png.uu
N src/external/bsd/mdocml/dist/example.style.css

2 conflicts created by this import.
Use the following command to help the merge:

cvs checkout -jKRISTAPS:yesterday -jKRISTAPS 
src/external/bsd/mdocml/dist



CVS commit: src/external/bsd/mdocml/dist

2011-01-02 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Jan  2 22:03:25 UTC 2011

Modified Files:
src/external/bsd/mdocml/dist: msec.in

Log Message:
Prefix section headers for 1 to 9 with "NetBSD " to match output
for non-HTML pages (i.e. groff ones). Noted by njoly.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 src/external/bsd/mdocml/dist/msec.in

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/msec.in
diff -u src/external/bsd/mdocml/dist/msec.in:1.1.1.2 src/external/bsd/mdocml/dist/msec.in:1.2
--- src/external/bsd/mdocml/dist/msec.in:1.1.1.2	Thu Jun 24 17:16:37 2010
+++ src/external/bsd/mdocml/dist/msec.in	Sun Jan  2 22:03:24 2011
@@ -22,16 +22,16 @@
  * Be sure to escape strings.
  */
 
-LINE("1",		"General Commands Manual")
-LINE("2",		"System Calls Manual")
-LINE("3",		"Library Functions Manual")
+LINE("1",		"NetBSD General Commands Manual")
+LINE("2",		"NetBSD System Calls Manual")
+LINE("3",		"NetBSD Library Functions Manual")
 LINE("3p",		"Perl Library Functions Manual")
-LINE("4",		"Kernel Interfaces Manual")
-LINE("5",		"File Formats Manual")
-LINE("6",		"Games Manual")
-LINE("7",		"Miscellaneous Information Manual")
-LINE("8",		"System Manager\'s Manual")
-LINE("9",		"Kernel Developer\'s Manual")
+LINE("4",		"NetBSD Kernel Interfaces Manual")
+LINE("5",		"NetBSD File Formats Manual")
+LINE("6",		"NetBSD Games Manual")
+LINE("7",		"NetBSD Miscellaneous Information Manual")
+LINE("8",		"NetBSD System Manager\'s Manual")
+LINE("9",		"NetBSD Kernel Developer\'s Manual")
 LINE("X11",		"X11 Developer\'s Manual")
 LINE("X11R6",		"X11 Developer\'s Manual")
 LINE("unass",		"Unassociated")



CVS commit: src/external/bsd/mdocml/dist

2010-07-27 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Jul 27 22:40:24 UTC 2010

Modified Files:
src/external/bsd/mdocml/dist: man_term.c mdoc_action.c mdoc_term.c

Log Message:
Merge mdocml 1.10.5


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/mdocml/dist/man_term.c \
src/external/bsd/mdocml/dist/mdoc_term.c
cvs rdiff -u -r1.11 -r1.12 src/external/bsd/mdocml/dist/mdoc_action.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/man_term.c
diff -u src/external/bsd/mdocml/dist/man_term.c:1.4 src/external/bsd/mdocml/dist/man_term.c:1.5
--- src/external/bsd/mdocml/dist/man_term.c:1.4	Sun Jul 25 19:12:40 2010
+++ src/external/bsd/mdocml/dist/man_term.c	Tue Jul 27 22:40:24 2010
@@ -1,6 +1,6 @@
-/*	$Vendor-Id: man_term.c,v 1.79 2010/07/07 15:04:54 kristaps Exp $ */
+/*	$Vendor-Id: man_term.c,v 1.84 2010/07/23 13:22:35 kristaps Exp $ */
 /*
- * Copyright (c) 2008, 2009 Kristaps Dzonsons 
+ * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons 
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -92,10 +92,9 @@
 static	int		  pre_SH(DECL_ARGS);
 static	int		  pre_SS(DECL_ARGS);
 static	int		  pre_TP(DECL_ARGS);
-static	int		  pre_br(DECL_ARGS);
-static	int		  pre_fi(DECL_ARGS);
 static	int		  pre_ign(DECL_ARGS);
-static	int		  pre_nf(DECL_ARGS);
+static	int		  pre_in(DECL_ARGS);
+static	int		  pre_literal(DECL_ARGS);
 static	int		  pre_sp(DECL_ARGS);
 
 static	void		  post_IP(DECL_ARGS);
@@ -106,7 +105,7 @@
 static	void		  post_TP(DECL_ARGS);
 
 static	const struct termact termacts[MAN_MAX] = {
-	{ pre_br, NULL, MAN_NOTEXT }, /* br */
+	{ pre_sp, NULL, MAN_NOTEXT }, /* br */
 	{ NULL, NULL, 0 }, /* TH */
 	{ pre_SH, post_SH, 0 }, /* SH */
 	{ pre_SS, post_SS, 0 }, /* SS */
@@ -130,8 +129,8 @@
 	{ NULL, NULL, MAN_NOTEXT }, /* na */
 	{ pre_I, NULL, 0 }, /* i */
 	{ pre_sp, NULL, MAN_NOTEXT }, /* sp */
-	{ pre_nf, NULL, 0 }, /* nf */
-	{ pre_fi, NULL, 0 }, /* fi */
+	{ pre_literal, NULL, 0 }, /* nf */
+	{ pre_literal, NULL, 0 }, /* fi */
 	{ NULL, NULL, 0 }, /* r */
 	{ NULL, NULL, 0 }, /* RE */
 	{ pre_RS, post_RS, 0 }, /* RS */
@@ -139,9 +138,10 @@
 	{ pre_ign, NULL, 0 }, /* UC */
 	{ pre_ign, NULL, 0 }, /* PD */
  	{ pre_sp, NULL, MAN_NOTEXT }, /* Sp */
- 	{ pre_nf, NULL, 0 }, /* Vb */
- 	{ pre_fi, NULL, 0 }, /* Ve */
+ 	{ pre_literal, NULL, 0 }, /* Vb */
+ 	{ pre_literal, NULL, 0 }, /* Ve */
 	{ pre_ign, NULL, 0 }, /* AT */
+	{ pre_in, NULL, MAN_NOTEXT }, /* in */
 };
 
 
@@ -249,23 +249,25 @@
 
 /* ARGSUSED */
 static int
-pre_fi(DECL_ARGS)
+pre_literal(DECL_ARGS)
 {
 
-	mt->fl &= ~MANT_LITERAL;
+	term_newln(p);
+	switch (n->tok) {
+	case (MAN_Vb):
+		/* FALLTHROUGH */
+	case (MAN_nf):
+		mt->fl |= MANT_LITERAL;
+		return(MAN_Vb != n->tok);
+	default:
+		mt->fl &= ~MANT_LITERAL;
+		break;
+	}
+
 	return(1);
 }
 
 
-/* ARGSUSED */
-static int
-pre_nf(DECL_ARGS)
-{
-
-	mt->fl |= MANT_LITERAL;
-	return(MAN_Vb != n->tok);
-}
-
 
 /* ARGSUSED */
 static int
@@ -353,17 +355,40 @@
 
 /* ARGSUSED */
 static int
-pre_sp(DECL_ARGS)
+pre_in(DECL_ARGS)
 {
-	size_t		 i, len;
+	int		 len, less;
+	size_t		 v;
+	const char	*cp;
 
-	len = n->child ? 
-		a2height(p, n->child->string) : term_len(p, 1);
+	term_newln(p);
 
-	if (0 == len)
-		term_newln(p);
-	for (i = 0; i <= len; i++)
-		term_vspace(p);
+	if (NULL == n->child) {
+		p->offset = mt->offset;
+		return(0);
+	}
+
+	cp = n->child->string;
+	less = 0;
+
+	if ('-' == *cp)
+		less = -1;
+	else if ('+' == *cp)
+		less = 1;
+	else
+		cp--;
+
+	if ((len = a2width(p, ++cp)) < 0)
+		return(0);
+
+	v = (size_t)len;
+
+	if (less < 0)
+		p->offset -= p->offset > v ? v : p->offset;
+	else if (less > 0)
+		p->offset += v;
+	else 
+		p->offset = v;
 
 	return(0);
 }
@@ -371,10 +396,24 @@
 
 /* ARGSUSED */
 static int
-pre_br(DECL_ARGS)
+pre_sp(DECL_ARGS)
 {
+	size_t		 i, len;
+
+	switch (n->tok) {
+	case (MAN_br):
+		len = 0;
+		break;
+	default:
+		len = n->child ? a2height(p, n->child->string) : 1;
+		break;
+	}
+
+	if (0 == len)
+		term_newln(p);
+	for (i = 0; i < len; i++)
+		term_vspace(p);
 
-	term_newln(p);
 	return(0);
 }
 
Index: src/external/bsd/mdocml/dist/mdoc_term.c
diff -u src/external/bsd/mdocml/dist/mdoc_term.c:1.4 src/external/bsd/mdocml/dist/mdoc_term.c:1.5
--- src/external/bsd/mdocml/dist/mdoc_term.c:1.4	Sun Jul 25 19:12:40 2010
+++ src/external/bsd/mdocml/dist/mdoc_term.c	Tue Jul 27 22:40:24 2010
@@ -1,4 +1,4 @@
-/*	$Vendor-Id: mdoc_term.c,v 1.173 2010/07/07 15:04:54 kristaps Exp $ */
+/*	$Vendor-Id: mdoc_term.c,v 1.179 2010/07/27 08:38:04 kristaps Exp $ */
 /*
  * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons 
  * Copyright (c) 2010 Ingo Schwarze 
@@ -151,7 +151,7 @@
 	{ termp_bl_pre, termp_bl_post }, /* Bl */
 	{ NULL, NULL }, /* El */
 	{ termp_it_pre, termp_it_post }, /* It */
-	{ NULL, NULL }, /*

CVS commit: src/external/bsd/mdocml/dist

2010-07-27 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Jul 27 22:35:17 UTC 2010

Update of /cvsroot/src/external/bsd/mdocml/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv29930

Log Message:
Import mdocml 1.10.5:
- Initial support for PDF output
- Improved support for various roff commands

Status:

Vendor Tag: KRISTAPS
Release Tags:   mdocml-1-10-5

U src/external/bsd/mdocml/dist/mdoc_macro.c
U src/external/bsd/mdocml/dist/config.h.pre
U src/external/bsd/mdocml/dist/test-strlcpy.c
U src/external/bsd/mdocml/dist/test-strlcat.c
U src/external/bsd/mdocml/dist/external.png.uu
U src/external/bsd/mdocml/dist/chars.in
U src/external/bsd/mdocml/dist/vol.in
U src/external/bsd/mdocml/dist/st.in
U src/external/bsd/mdocml/dist/msec.in
U src/external/bsd/mdocml/dist/lib.in
U src/external/bsd/mdocml/dist/att.in
U src/external/bsd/mdocml/dist/arch.in
U src/external/bsd/mdocml/dist/style.css
U src/external/bsd/mdocml/dist/roff.3
U src/external/bsd/mdocml/dist/roff.7
U src/external/bsd/mdocml/dist/man.3
U src/external/bsd/mdocml/dist/man.7
U src/external/bsd/mdocml/dist/mandoc_char.7
U src/external/bsd/mdocml/dist/mdoc.7
U src/external/bsd/mdocml/dist/mdoc.3
U src/external/bsd/mdocml/dist/mandoc.1
U src/external/bsd/mdocml/dist/Makefile
U src/external/bsd/mdocml/dist/mandoc.h
U src/external/bsd/mdocml/dist/roff.h
U src/external/bsd/mdocml/dist/main.h
U src/external/bsd/mdocml/dist/out.h
U src/external/bsd/mdocml/dist/chars.h
U src/external/bsd/mdocml/dist/html.h
U src/external/bsd/mdocml/dist/libmandoc.h
U src/external/bsd/mdocml/dist/term.h
U src/external/bsd/mdocml/dist/libman.h
U src/external/bsd/mdocml/dist/man.h
U src/external/bsd/mdocml/dist/libmdoc.h
U src/external/bsd/mdocml/dist/mdoc.h
U src/external/bsd/mdocml/dist/roff.c
U src/external/bsd/mdocml/dist/mandoc.c
U src/external/bsd/mdocml/dist/man_argv.c
U src/external/bsd/mdocml/dist/man_action.c
U src/external/bsd/mdocml/dist/man_validate.c
U src/external/bsd/mdocml/dist/man_hash.c
U src/external/bsd/mdocml/dist/man.c
U src/external/bsd/mdocml/dist/man_macro.c
U src/external/bsd/mdocml/dist/term_ascii.c
U src/external/bsd/mdocml/dist/term_ps.c
U src/external/bsd/mdocml/dist/out.c
U src/external/bsd/mdocml/dist/man_html.c
U src/external/bsd/mdocml/dist/mdoc_html.c
U src/external/bsd/mdocml/dist/html.c
C src/external/bsd/mdocml/dist/man_term.c
U src/external/bsd/mdocml/dist/compat.c
U src/external/bsd/mdocml/dist/tree.c
U src/external/bsd/mdocml/dist/term.c
U src/external/bsd/mdocml/dist/chars.c
C src/external/bsd/mdocml/dist/mdoc_term.c
U src/external/bsd/mdocml/dist/main.c
U src/external/bsd/mdocml/dist/st.c
U src/external/bsd/mdocml/dist/msec.c
U src/external/bsd/mdocml/dist/vol.c
U src/external/bsd/mdocml/dist/arch.c
U src/external/bsd/mdocml/dist/att.c
U src/external/bsd/mdocml/dist/lib.c
C src/external/bsd/mdocml/dist/mdoc_action.c
U src/external/bsd/mdocml/dist/mdoc_validate.c
U src/external/bsd/mdocml/dist/mdoc_argv.c
U src/external/bsd/mdocml/dist/mdoc_strings.c
U src/external/bsd/mdocml/dist/mdoc_hash.c
U src/external/bsd/mdocml/dist/mdoc.c
U src/external/bsd/mdocml/dist/config.h.post

3 conflicts created by this import.
Use the following command to help the merge:

cvs checkout -jKRISTAPS:yesterday -jKRISTAPS 
src/external/bsd/mdocml/dist



CVS commit: src/external/bsd/mdocml/man

2010-07-26 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Jul 26 17:25:31 UTC 2010

Modified Files:
src/external/bsd/mdocml/man: Makefile

Log Message:
Explicitly depend on dist file


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/mdocml/man/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/man/Makefile
diff -u src/external/bsd/mdocml/man/Makefile:1.4 src/external/bsd/mdocml/man/Makefile:1.5
--- src/external/bsd/mdocml/man/Makefile:1.4	Wed Jun 16 18:10:57 2010
+++ src/external/bsd/mdocml/man/Makefile	Mon Jul 26 17:25:31 2010
@@ -1,20 +1,20 @@
-# $NetBSD: Makefile,v 1.4 2010/06/16 18:10:57 joerg Exp $
+# $NetBSD: Makefile,v 1.5 2010/07/26 17:25:31 joerg Exp $
 
 MAN=		mandoc_man.7 mandoc_char.7 mandoc_mdoc.7 mandoc_roff.7
 
 .include 
 
-mandoc_man.7:
+mandoc_man.7: ${DISTDIR}/man.7
 	${_MKTARGET_CREATE}
 	rm -f ${.TARGET}
 	${TOOL_CAT} ${DISTDIR}/man.7 > ${.TARGET}
 
-mandoc_mdoc.7:
+mandoc_mdoc.7: ${DISTDIR}/mdoc.7
 	${_MKTARGET_CREATE}
 	rm -f ${.TARGET}
 	${TOOL_CAT} ${DISTDIR}/mdoc.7 > ${.TARGET}
 
-mandoc_roff.7:
+mandoc_roff.7: ${DISTDIR}/roff.7
 	${_MKTARGET_CREATE}
 	rm -f ${.TARGET}
 	${TOOL_CAT} ${DISTDIR}/roff.7 > ${.TARGET}



CVS commit: src/external/bsd/mdocml

2010-07-25 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sun Jul 25 19:16:18 UTC 2010

Modified Files:
src/external/bsd/mdocml: Makefile.inc

Log Message:
Simplify maintainance and query dist's Makefile for VERSION


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/external/bsd/mdocml/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/Makefile.inc
diff -u src/external/bsd/mdocml/Makefile.inc:1.11 src/external/bsd/mdocml/Makefile.inc:1.12
--- src/external/bsd/mdocml/Makefile.inc:1.11	Sun Jul 25 19:12:57 2010
+++ src/external/bsd/mdocml/Makefile.inc	Sun Jul 25 19:16:18 2010
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile.inc,v 1.11 2010/07/25 19:12:57 joerg Exp $
+# $NetBSD: Makefile.inc,v 1.12 2010/07/25 19:16:18 joerg Exp $
 
 .include 
 
-VERSION=	1.10.4
+VERSION!=	cd ${.PARSEDIR}/dist && ${MAKE} -V VERSION
 
 CPPFLAGS+=	-DVERSION=\"${VERSION}\" -DUGLY
 



CVS commit: src/external/bsd/mdocml

2010-07-25 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sun Jul 25 19:12:57 UTC 2010

Modified Files:
src/external/bsd/mdocml: Makefile.inc

Log Message:
mdocml 1.10.4


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/mdocml/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/Makefile.inc
diff -u src/external/bsd/mdocml/Makefile.inc:1.10 src/external/bsd/mdocml/Makefile.inc:1.11
--- src/external/bsd/mdocml/Makefile.inc:1.10	Thu Jun 24 17:20:19 2010
+++ src/external/bsd/mdocml/Makefile.inc	Sun Jul 25 19:12:57 2010
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile.inc,v 1.10 2010/06/24 17:20:19 joerg Exp $
+# $NetBSD: Makefile.inc,v 1.11 2010/07/25 19:12:57 joerg Exp $
 
 .include 
 
-VERSION=	1.10.2
+VERSION=	1.10.4
 
 CPPFLAGS+=	-DVERSION=\"${VERSION}\" -DUGLY
 



CVS commit: src/external/bsd/mdocml/dist

2010-07-25 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sun Jul 25 19:12:40 UTC 2010

Modified Files:
src/external/bsd/mdocml/dist: man_term.c mdoc_action.c mdoc_term.c

Log Message:
Merge mdocml 1.10.4


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/mdocml/dist/man_term.c \
src/external/bsd/mdocml/dist/mdoc_term.c
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/mdocml/dist/mdoc_action.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/man_term.c
diff -u src/external/bsd/mdocml/dist/man_term.c:1.3 src/external/bsd/mdocml/dist/man_term.c:1.4
--- src/external/bsd/mdocml/dist/man_term.c:1.3	Thu Jun 24 17:19:58 2010
+++ src/external/bsd/mdocml/dist/man_term.c	Sun Jul 25 19:12:40 2010
@@ -1,4 +1,4 @@
-/*	$Vendor-Id: man_term.c,v 1.76 2010/06/19 20:46:28 kristaps Exp $ */
+/*	$Vendor-Id: man_term.c,v 1.79 2010/07/07 15:04:54 kristaps Exp $ */
 /*
  * Copyright (c) 2008, 2009 Kristaps Dzonsons 
  *
@@ -70,8 +70,8 @@
 #define	MAN_NOTEXT	 (1 << 0) /* Never has text children. */
 };
 
-static	int		  a2width(const struct man_node *);
-static	int		  a2height(const struct man_node *);
+static	int		  a2width(const struct termp *, const char *);
+static	size_t		  a2height(const struct termp *, const char *);
 
 static	void		  print_man_nodelist(DECL_ARGS);
 static	void		  print_man_node(DECL_ARGS);
@@ -158,7 +158,7 @@
 
 	p->overstep = 0;
 	p->maxrmargin = p->defrmargin;
-	p->tabwidth = 5;
+	p->tabwidth = term_len(p, 5);
 
 	if (NULL == p->symtab)
 		switch (p->enc) {
@@ -177,8 +177,8 @@
 	p->flags |= TERMP_NOSPACE;
 
 	mt.fl = 0;
-	mt.lmargin = INDENT;
-	mt.offset = INDENT;
+	mt.lmargin = term_len(p, INDENT);
+	mt.offset = term_len(p, INDENT);
 
 	if (n->child)
 		print_man_nodelist(p, &mt, n->child, m);
@@ -187,31 +187,27 @@
 }
 
 
-static int
-a2height(const struct man_node *n)
+static size_t
+a2height(const struct termp *p, const char *cp)
 {
 	struct roffsu	 su;
 
-	assert(MAN_TEXT == n->type);
-	assert(n->string);
-	if ( ! a2roffsu(n->string, &su, SCALE_VS))
-		SCALE_VS_INIT(&su, strlen(n->string));
+	if ( ! a2roffsu(cp, &su, SCALE_VS))
+		SCALE_VS_INIT(&su, term_strlen(p, cp));
 
-	return((int)term_vspan(&su));
+	return(term_vspan(p, &su));
 }
 
 
 static int
-a2width(const struct man_node *n)
+a2width(const struct termp *p, const char *cp)
 {
 	struct roffsu	 su;
 
-	assert(MAN_TEXT == n->type);
-	assert(n->string);
-	if ( ! a2roffsu(n->string, &su, SCALE_BU))
+	if ( ! a2roffsu(cp, &su, SCALE_BU))
 		return(-1);
 
-	return((int)term_hspan(&su));
+	return((int)term_hspan(p, &su));
 }
 
 
@@ -359,9 +355,10 @@
 static int
 pre_sp(DECL_ARGS)
 {
-	int		 i, len;
+	size_t		 i, len;
 
-	len = n->child ? a2height(n->child) : 1;
+	len = n->child ? 
+		a2height(p, n->child->string) : term_len(p, 1);
 
 	if (0 == len)
 		term_newln(p);
@@ -408,11 +405,11 @@
 	/* Calculate offset. */
 
 	if (NULL != (nn = n->parent->head->child))
-		if ((ival = a2width(nn)) >= 0)
+		if ((ival = a2width(p, nn->string)) >= 0)
 			len = (size_t)ival;
 
 	if (0 == len)
-		len = 1;
+		len = term_len(p, 1);
 
 	p->offset = mt->offset;
 	p->rmargin = mt->offset + len;
@@ -453,7 +450,7 @@
 
 	switch (n->type) {
 	case (MAN_BLOCK):
-		mt->lmargin = INDENT;
+		mt->lmargin = term_len(p, INDENT);
 		print_bvspace(p, n);
 		break;
 	default:
@@ -497,7 +494,7 @@
 		if (NULL != (nn = nn->next)) {
 			for ( ; nn->next; nn = nn->next)
 /* Do nothing. */ ;
-			if ((ival = a2width(nn)) >= 0)
+			if ((ival = a2width(p, nn->string)) >= 0)
 len = (size_t)ival;
 		}
 
@@ -505,7 +502,7 @@
 	case (MAN_HEAD):
 		/* Handle zero-width lengths. */
 		if (0 == len)
-			len = 1;
+			len = term_len(p, 1);
 
 		p->offset = mt->offset;
 		p->rmargin = mt->offset + len;
@@ -585,7 +582,7 @@
 		while (nn && MAN_TEXT != nn->type)
 			nn = nn->next;
 		if (nn && nn->next)
-			if ((ival = a2width(nn)) >= 0)
+			if ((ival = a2width(p, nn->string)) >= 0)
 len = (size_t)ival;
 	}
 
@@ -593,7 +590,7 @@
 	case (MAN_HEAD):
 		/* Handle zero-length properly. */
 		if (0 == len)
-			len = 1;
+			len = term_len(p, 1);
 
 		p->offset = mt->offset;
 		p->rmargin = mt->offset + len;
@@ -648,8 +645,8 @@
 
 	switch (n->type) {
 	case (MAN_BLOCK):
-		mt->lmargin = INDENT;
-		mt->offset = INDENT;
+		mt->lmargin = term_len(p, INDENT);
+		mt->offset = term_len(p, INDENT);
 		/* If following a prior empty `SS', no vspace. */
 		if (n->prev && MAN_SS == n->prev->tok)
 			if (NULL == n->prev->body->child)
@@ -660,7 +657,7 @@
 		break;
 	case (MAN_HEAD):
 		term_fontrepl(p, TERMFONT_BOLD);
-		p->offset = HALFINDENT;
+		p->offset = term_len(p, HALFINDENT);
 		break;
 	case (MAN_BODY):
 		p->offset = mt->offset;
@@ -698,8 +695,8 @@
 
 	switch (n->type) {
 	case (MAN_BLOCK):
-		mt->lmargin = INDENT;
-		mt->offset = INDENT;
+		mt->lmargin = term_len(p, INDENT);
+		mt->offset = term_len(p, INDENT);
 		/* If following a prior empty `SH', no v

CVS commit: src/external/bsd/mdocml/dist

2010-07-25 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sun Jul 25 19:10:53 UTC 2010

Update of /cvsroot/src/external/bsd/mdocml/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv2438

Log Message:
Import mdocml 1.10.4:
- Smaller bugfixes
- Improved .ds support
- Support .Bk -words
- Improve multi-page postscript output
- Improve indentation in SYNOPSIS
- Improved support for badly nested blocks

Status:

Vendor Tag: KRISTAPS
Release Tags:   mdocml-1-10-4

U src/external/bsd/mdocml/dist/mdoc_macro.c
U src/external/bsd/mdocml/dist/config.h.pre
U src/external/bsd/mdocml/dist/test-strlcpy.c
U src/external/bsd/mdocml/dist/test-strlcat.c
U src/external/bsd/mdocml/dist/external.png.uu
U src/external/bsd/mdocml/dist/chars.in
U src/external/bsd/mdocml/dist/vol.in
U src/external/bsd/mdocml/dist/st.in
U src/external/bsd/mdocml/dist/msec.in
U src/external/bsd/mdocml/dist/lib.in
U src/external/bsd/mdocml/dist/att.in
U src/external/bsd/mdocml/dist/arch.in
U src/external/bsd/mdocml/dist/style.css
U src/external/bsd/mdocml/dist/roff.3
U src/external/bsd/mdocml/dist/roff.7
U src/external/bsd/mdocml/dist/man.3
U src/external/bsd/mdocml/dist/man.7
U src/external/bsd/mdocml/dist/mandoc_char.7
U src/external/bsd/mdocml/dist/mdoc.7
U src/external/bsd/mdocml/dist/mdoc.3
U src/external/bsd/mdocml/dist/mandoc.1
U src/external/bsd/mdocml/dist/Makefile
U src/external/bsd/mdocml/dist/mandoc.h
U src/external/bsd/mdocml/dist/roff.h
U src/external/bsd/mdocml/dist/main.h
U src/external/bsd/mdocml/dist/out.h
U src/external/bsd/mdocml/dist/chars.h
U src/external/bsd/mdocml/dist/html.h
U src/external/bsd/mdocml/dist/libmandoc.h
U src/external/bsd/mdocml/dist/term.h
U src/external/bsd/mdocml/dist/libman.h
U src/external/bsd/mdocml/dist/man.h
U src/external/bsd/mdocml/dist/libmdoc.h
U src/external/bsd/mdocml/dist/mdoc.h
U src/external/bsd/mdocml/dist/roff.c
U src/external/bsd/mdocml/dist/mandoc.c
U src/external/bsd/mdocml/dist/man_argv.c
U src/external/bsd/mdocml/dist/man_action.c
U src/external/bsd/mdocml/dist/man_validate.c
U src/external/bsd/mdocml/dist/man_hash.c
U src/external/bsd/mdocml/dist/man.c
U src/external/bsd/mdocml/dist/man_macro.c
U src/external/bsd/mdocml/dist/term_ascii.c
U src/external/bsd/mdocml/dist/term_ps.c
U src/external/bsd/mdocml/dist/out.c
U src/external/bsd/mdocml/dist/man_html.c
U src/external/bsd/mdocml/dist/mdoc_html.c
U src/external/bsd/mdocml/dist/html.c
C src/external/bsd/mdocml/dist/man_term.c
U src/external/bsd/mdocml/dist/compat.c
U src/external/bsd/mdocml/dist/tree.c
U src/external/bsd/mdocml/dist/term.c
U src/external/bsd/mdocml/dist/chars.c
C src/external/bsd/mdocml/dist/mdoc_term.c
U src/external/bsd/mdocml/dist/main.c
U src/external/bsd/mdocml/dist/st.c
U src/external/bsd/mdocml/dist/msec.c
U src/external/bsd/mdocml/dist/vol.c
U src/external/bsd/mdocml/dist/arch.c
U src/external/bsd/mdocml/dist/att.c
U src/external/bsd/mdocml/dist/lib.c
C src/external/bsd/mdocml/dist/mdoc_action.c
U src/external/bsd/mdocml/dist/mdoc_validate.c
U src/external/bsd/mdocml/dist/mdoc_argv.c
U src/external/bsd/mdocml/dist/mdoc_strings.c
U src/external/bsd/mdocml/dist/mdoc_hash.c
U src/external/bsd/mdocml/dist/mdoc.c
U src/external/bsd/mdocml/dist/config.h.post

3 conflicts created by this import.
Use the following command to help the merge:

cvs checkout -jKRISTAPS:yesterday -jKRISTAPS 
src/external/bsd/mdocml/dist



CVS commit: src/external/bsd/mdocml

2010-06-24 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu Jun 24 17:20:19 UTC 2010

Modified Files:
src/external/bsd/mdocml: Makefile.inc
src/external/bsd/mdocml/bin/mandoc: Makefile

Log Message:
Update build glue for mdocml-1.10.2


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/mdocml/Makefile.inc
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/mdocml/bin/mandoc/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/Makefile.inc
diff -u src/external/bsd/mdocml/Makefile.inc:1.9 src/external/bsd/mdocml/Makefile.inc:1.10
--- src/external/bsd/mdocml/Makefile.inc:1.9	Wed Jun 16 18:10:57 2010
+++ src/external/bsd/mdocml/Makefile.inc	Thu Jun 24 17:20:19 2010
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile.inc,v 1.9 2010/06/16 18:10:57 joerg Exp $
+# $NetBSD: Makefile.inc,v 1.10 2010/06/24 17:20:19 joerg Exp $
 
 .include 
 
-VERSION=	1.10.1
+VERSION=	1.10.2
 
 CPPFLAGS+=	-DVERSION=\"${VERSION}\" -DUGLY
 

Index: src/external/bsd/mdocml/bin/mandoc/Makefile
diff -u src/external/bsd/mdocml/bin/mandoc/Makefile:1.2 src/external/bsd/mdocml/bin/mandoc/Makefile:1.3
--- src/external/bsd/mdocml/bin/mandoc/Makefile:1.2	Tue Jun  1 21:32:39 2010
+++ src/external/bsd/mdocml/bin/mandoc/Makefile	Thu Jun 24 17:20:19 2010
@@ -1,10 +1,11 @@
-# $NetBSD: Makefile,v 1.2 2010/06/01 21:32:39 joerg Exp $
+# $NetBSD: Makefile,v 1.3 2010/06/24 17:20:19 joerg Exp $
 
 .include 
 
 PROG=		mandoc
 
-SRCS=		main.c mdoc_term.c chars.c term.c tree.c compat.c \
+SRCS=		main.c mdoc_term.c chars.c term.c term_ascii.c term_ps.c \
+		tree.c compat.c \
 	man_term.c html.c mdoc_html.c man_html.c out.c
 
 .ifndef HOSTPROG



CVS commit: src/external/bsd/mdocml/dist

2010-06-24 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu Jun 24 17:19:58 UTC 2010

Modified Files:
src/external/bsd/mdocml/dist: man_term.c mdoc_action.c mdoc_term.c

Log Message:
Merge mdocml-1.10.1


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/mdocml/dist/man_term.c \
src/external/bsd/mdocml/dist/mdoc_term.c
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/mdocml/dist/mdoc_action.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/man_term.c
diff -u src/external/bsd/mdocml/dist/man_term.c:1.2 src/external/bsd/mdocml/dist/man_term.c:1.3
--- src/external/bsd/mdocml/dist/man_term.c:1.2	Thu Jun 17 00:56:03 2010
+++ src/external/bsd/mdocml/dist/man_term.c	Thu Jun 24 17:19:58 2010
@@ -1,6 +1,6 @@
-/*	$Vendor-Id: man_term.c,v 1.73 2010/06/07 20:57:09 kristaps Exp $ */
+/*	$Vendor-Id: man_term.c,v 1.76 2010/06/19 20:46:28 kristaps Exp $ */
 /*
- * Copyright (c) 2008, 2009 Kristaps Dzonsons 
+ * Copyright (c) 2008, 2009 Kristaps Dzonsons 
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -73,9 +73,9 @@
 static	int		  a2width(const struct man_node *);
 static	int		  a2height(const struct man_node *);
 
-static	void		  print_man_head(struct termp *, const void *);
 static	void		  print_man_nodelist(DECL_ARGS);
 static	void		  print_man_node(DECL_ARGS);
+static	void		  print_man_head(struct termp *, const void *);
 static	void		  print_man_foot(struct termp *, const void *);
 static	void		  print_bvspace(struct termp *, 
 const struct man_node *);
@@ -158,6 +158,7 @@
 
 	p->overstep = 0;
 	p->maxrmargin = p->defrmargin;
+	p->tabwidth = 5;
 
 	if (NULL == p->symtab)
 		switch (p->enc) {
@@ -172,7 +173,7 @@
 	n = man_node(man);
 	m = man_meta(man);
 
-	term_begin(p, print_man_head, print_man_foot, man_meta(man));
+	term_begin(p, print_man_head, print_man_foot, m);
 	p->flags |= TERMP_NOSPACE;
 
 	mt.fl = 0;
Index: src/external/bsd/mdocml/dist/mdoc_term.c
diff -u src/external/bsd/mdocml/dist/mdoc_term.c:1.2 src/external/bsd/mdocml/dist/mdoc_term.c:1.3
--- src/external/bsd/mdocml/dist/mdoc_term.c:1.2	Thu Jun 17 00:56:03 2010
+++ src/external/bsd/mdocml/dist/mdoc_term.c	Thu Jun 24 17:19:58 2010
@@ -1,6 +1,6 @@
-/*	$Vendor-Id: mdoc_term.c,v 1.144 2010/06/07 20:57:09 kristaps Exp $ */
+/*	$Vendor-Id: mdoc_term.c,v 1.156 2010/06/19 20:46:28 kristaps Exp $ */
 /*
- * Copyright (c) 2008, 2009 Kristaps Dzonsons 
+ * Copyright (c) 2008, 2009 Kristaps Dzonsons 
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -52,22 +52,19 @@
 	void	(*post)(DECL_ARGS);
 };
 
-static	size_t	  a2width(const struct mdoc_argv *, int);
+static	size_t	  a2width(const char *);
 static	size_t	  a2height(const struct mdoc_node *);
-static	size_t	  a2offs(const struct mdoc_argv *);
+static	size_t	  a2offs(const char *);
 
 static	int	  arg_hasattr(int, const struct mdoc_node *);
-static	int	  arg_getattrs(const int *, int *, size_t,
-			const struct mdoc_node *);
 static	int	  arg_getattr(int, const struct mdoc_node *);
-static	int	  arg_disptype(const struct mdoc_node *);
 static	void	  print_bvspace(struct termp *,
 			const struct mdoc_node *,
 			const struct mdoc_node *);
 static	void  	  print_mdoc_node(DECL_ARGS);
-static	void	  print_mdoc_head(struct termp *, const void *);
 static	void	  print_mdoc_nodelist(DECL_ARGS);
-static	void	  print_foot(struct termp *, const void *);
+static	void	  print_mdoc_head(struct termp *, const void *);
+static	void	  print_mdoc_foot(struct termp *, const void *);
 static	void	  synopsis_pre(struct termp *, 
 			const struct mdoc_node *);
 
@@ -289,7 +286,7 @@
 	n = mdoc_node(mdoc);
 	m = mdoc_meta(mdoc);
 
-	term_begin(p, print_mdoc_head, print_foot, mdoc_meta(mdoc));
+	term_begin(p, print_mdoc_head, print_mdoc_foot, m);
 
 	if (n->child)
 		print_mdoc_nodelist(p, NULL, m, n->child);
@@ -348,9 +345,8 @@
 }
 
 
-/* ARGSUSED */
 static void
-print_foot(struct termp *p, const void *arg)
+print_mdoc_foot(struct termp *p, const void *arg)
 {
 	char		buf[DATESIZ], os[BUFSIZ];
 	const struct mdoc_meta *m;
@@ -400,7 +396,6 @@
 }
 
 
-/* ARGSUSED */
 static void
 print_mdoc_head(struct termp *p, const void *arg)
 {
@@ -479,62 +474,33 @@
 
 
 static size_t
-a2width(const struct mdoc_argv *arg, int pos)
+a2width(const char *v)
 {
 	struct roffsu	 su;
 
-	assert(arg->value[pos]);
-	if ( ! a2roffsu(arg->value[pos], &su, SCALE_MAX))
-		SCALE_HS_INIT(&su, strlen(arg->value[pos]));
+	assert(v);
+	if ( ! a2roffsu(v, &su, SCALE_MAX))
+		SCALE_HS_INIT(&su, strlen(v));
 
 	return(term_hspan(&su));
 }
 
 
-static int
-arg_disptype(const struct mdoc_node *n)
-{
-	int		 i, len;
-
-	assert(MDOC_BLOCK == n->type);
-
-	len = (int)(n->args ? n->args->argc : 0);
-
-	for 

  1   2   >