From owner-svn-src-vendor@FreeBSD.ORG Mon Mar 2 16:45:46 2015 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1E24ADAE; Mon, 2 Mar 2015 16:45:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0716B96; Mon, 2 Mar 2015 16:45:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t22GjjCM054498; Mon, 2 Mar 2015 16:45:45 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t22GjfGO054473; Mon, 2 Mar 2015 16:45:41 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201503021645.t22GjfGO054473@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 2 Mar 2015 16:45:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r279524 - vendor/mdocml/dist X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2015 16:45:46 -0000 Author: bapt Date: Mon Mar 2 16:45:41 2015 New Revision: 279524 URL: https://svnweb.freebsd.org/changeset/base/279524 Log: Import CVS snapshot of mandoc as of 20150302 Added: vendor/mdocml/dist/Makefile.local (contents, props changed) vendor/mdocml/dist/compat_strtonum.c (contents, props changed) vendor/mdocml/dist/test-strtonum.c (contents, props changed) Modified: vendor/mdocml/dist/LICENSE vendor/mdocml/dist/Makefile vendor/mdocml/dist/Makefile.depend vendor/mdocml/dist/TODO vendor/mdocml/dist/apropos.1 vendor/mdocml/dist/cgi.c vendor/mdocml/dist/chars.c vendor/mdocml/dist/chars.in vendor/mdocml/dist/compat_fts.c vendor/mdocml/dist/configure vendor/mdocml/dist/configure.local.example vendor/mdocml/dist/demandoc.c vendor/mdocml/dist/eqn.7 vendor/mdocml/dist/eqn.c vendor/mdocml/dist/eqn_term.c vendor/mdocml/dist/example.style.css vendor/mdocml/dist/gmdiff vendor/mdocml/dist/html.c vendor/mdocml/dist/libman.h vendor/mdocml/dist/libmandoc.h vendor/mdocml/dist/libmdoc.h vendor/mdocml/dist/libroff.h vendor/mdocml/dist/main.c vendor/mdocml/dist/main.h vendor/mdocml/dist/man-cgi.css vendor/mdocml/dist/man.1 vendor/mdocml/dist/man.7 vendor/mdocml/dist/man.c vendor/mdocml/dist/man.h vendor/mdocml/dist/man_html.c vendor/mdocml/dist/man_macro.c vendor/mdocml/dist/man_term.c vendor/mdocml/dist/man_validate.c vendor/mdocml/dist/mandoc.1 vendor/mdocml/dist/mandoc.3 vendor/mdocml/dist/mandoc.c vendor/mdocml/dist/mandoc.db.5 vendor/mdocml/dist/mandoc.h vendor/mdocml/dist/mandoc_char.7 vendor/mdocml/dist/mandoc_escape.3 vendor/mdocml/dist/mandoc_headers.3 vendor/mdocml/dist/mandocdb.c vendor/mdocml/dist/manpage.c vendor/mdocml/dist/mansearch.c vendor/mdocml/dist/mdoc.7 vendor/mdocml/dist/mdoc.c vendor/mdocml/dist/mdoc.h vendor/mdocml/dist/mdoc_argv.c vendor/mdocml/dist/mdoc_html.c vendor/mdocml/dist/mdoc_macro.c vendor/mdocml/dist/mdoc_man.c vendor/mdocml/dist/mdoc_term.c vendor/mdocml/dist/mdoc_validate.c vendor/mdocml/dist/msec.c vendor/mdocml/dist/out.c vendor/mdocml/dist/preconv.c vendor/mdocml/dist/read.c vendor/mdocml/dist/roff.7 vendor/mdocml/dist/roff.c vendor/mdocml/dist/st.in vendor/mdocml/dist/style.css vendor/mdocml/dist/tbl.3 vendor/mdocml/dist/tbl.7 vendor/mdocml/dist/tbl.c vendor/mdocml/dist/tbl_data.c vendor/mdocml/dist/tbl_html.c vendor/mdocml/dist/tbl_layout.c vendor/mdocml/dist/tbl_opts.c vendor/mdocml/dist/tbl_term.c vendor/mdocml/dist/term.c vendor/mdocml/dist/term.h vendor/mdocml/dist/term_ascii.c vendor/mdocml/dist/term_ps.c vendor/mdocml/dist/tree.c Modified: vendor/mdocml/dist/LICENSE ============================================================================== --- vendor/mdocml/dist/LICENSE Mon Mar 2 15:03:08 2015 (r279523) +++ vendor/mdocml/dist/LICENSE Mon Mar 2 16:45:41 2015 (r279524) @@ -1,16 +1,17 @@ -$Id: LICENSE,v 1.5 2014/12/11 07:56:24 schwarze Exp $ +$Id: LICENSE,v 1.7 2015/02/16 14:56:22 schwarze Exp $ With the exceptions noted below, all code and documentation contained in the mdocml toolkit is protected by the Copyright of the following developers: Copyright (c) 2008-2012, 2014 Kristaps Dzonsons -Copyright (c) 2010, 2011, 2012, 2013, 2014 Ingo Schwarze +Copyright (c) 2010-2015 Ingo Schwarze Copyright (c) 2009, 2010, 2011, 2012 Joerg Sonnenberger Copyright (c) 2013 Franco Fichtner Copyright (c) 1999, 2004 Marc Espie -Copyright (c) 1998, 2010 Todd C. Miller +Copyright (c) 1998, 2004, 2010 Todd C. Miller Copyright (c) 2008 Otto Moerbeek +Copyright (c) 2004 Ted Unangst Copyright (c) 2003, 2007, 2008, 2014 Jason McIntyre See the individual source files for information about who contributed Modified: vendor/mdocml/dist/Makefile ============================================================================== --- vendor/mdocml/dist/Makefile Mon Mar 2 15:03:08 2015 (r279523) +++ vendor/mdocml/dist/Makefile Mon Mar 2 16:45:41 2015 (r279524) @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.453 2014/12/09 09:14:33 schwarze Exp $ +# $Id: Makefile,v 1.456 2015/02/16 16:23:54 schwarze Exp $ # # Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons # Copyright (c) 2011, 2013, 2014 Ingo Schwarze @@ -15,6 +15,8 @@ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +VERSION = 1.13.2 + # === LIST OF FILES ==================================================== TESTSRCS = test-dirent-namlen.c \ @@ -31,6 +33,7 @@ TESTSRCS = test-dirent-namlen.c \ test-strlcpy.c \ test-strptime.c \ test-strsep.c \ + test-strtonum.c \ test-wchar.c SRCS = att.c \ @@ -46,6 +49,7 @@ SRCS = att.c \ compat_strlcat.c \ compat_strlcpy.c \ compat_strsep.c \ + compat_strtonum.c \ demandoc.c \ eqn.c \ eqn_html.c \ @@ -189,7 +193,8 @@ COMPAT_OBJS = compat_fgetln.o \ compat_strcasestr.o \ compat_strlcat.o \ compat_strlcpy.o \ - compat_strsep.o + compat_strsep.o \ + compat_strtonum.o MANDOC_HTML_OBJS = eqn_html.o \ html.o \ @@ -211,6 +216,7 @@ BASE_OBJS = $(MANDOC_HTML_OBJS) \ $(MANDOC_MAN_OBJS) \ $(MANDOC_TERM_OBJS) \ main.o \ + manpath.o \ out.o \ tree.o @@ -218,8 +224,7 @@ MAIN_OBJS = $(BASE_OBJS) DB_OBJS = mandocdb.o \ mansearch.o \ - mansearch_const.o \ - manpath.o + mansearch_const.o CGI_OBJS = $(MANDOC_HTML_OBJS) \ cgi.o \ @@ -308,10 +313,12 @@ base-install: base-build mkdir -p $(DESTDIR)$(MANDIR)/man3 mkdir -p $(DESTDIR)$(MANDIR)/man7 $(INSTALL_PROGRAM) mandoc demandoc $(DESTDIR)$(BINDIR) + ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_MAN) $(INSTALL_LIB) libmandoc.a $(DESTDIR)$(LIBDIR) $(INSTALL_LIB) man.h mandoc.h mandoc_aux.h mdoc.h \ $(DESTDIR)$(INCLUDEDIR) $(INSTALL_MAN) mandoc.1 demandoc.1 $(DESTDIR)$(MANDIR)/man1 + $(INSTALL_MAN) man.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_MAN).1 $(INSTALL_MAN) mandoc.3 mandoc_escape.3 mandoc_malloc.3 \ mchars_alloc.3 tbl.3 $(DESTDIR)$(MANDIR)/man3 $(INSTALL_MAN) man.7 $(DESTDIR)$(MANDIR)/man7/${MANM_MAN}.7 @@ -330,12 +337,10 @@ db-install: base-build mkdir -p $(DESTDIR)$(MANDIR)/man5 mkdir -p $(DESTDIR)$(MANDIR)/man8 ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_APROPOS) - ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_MAN) ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_WHATIS) ln -f $(DESTDIR)$(BINDIR)/mandoc \ $(DESTDIR)$(SBINDIR)/$(BINM_MAKEWHATIS) $(INSTALL_MAN) apropos.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 - $(INSTALL_MAN) man.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_MAN).1 ln -f $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 \ $(DESTDIR)$(MANDIR)/man1/$(BINM_WHATIS).1 $(INSTALL_MAN) mansearch.3 $(DESTDIR)$(MANDIR)/man3 @@ -377,7 +382,7 @@ demandoc: $(DEMANDOC_OBJS) libmandoc.a www-install: www mkdir -p $(HTDOCDIR)/snapshots - $(INSTALL_DATA) $(WWW_MANS) style.css $(HTDOCDIR)/man + $(INSTALL_DATA) $(WWW_MANS) style.css $(HTDOCDIR) $(INSTALL_DATA) $(WWW_OBJS) $(HTDOCDIR)/snapshots $(INSTALL_DATA) mdocml.tar.gz \ $(HTDOCDIR)/snapshots/mdocml-$(VERSION).tar.gz Modified: vendor/mdocml/dist/Makefile.depend ============================================================================== --- vendor/mdocml/dist/Makefile.depend Mon Mar 2 15:03:08 2015 (r279523) +++ vendor/mdocml/dist/Makefile.depend Mon Mar 2 16:45:41 2015 (r279524) @@ -11,6 +11,7 @@ compat_strcasestr.o: compat_strcasestr.c compat_strlcat.o: compat_strlcat.c config.h compat_strlcpy.o: compat_strlcpy.c config.h compat_strsep.o: compat_strsep.c config.h +compat_strtonum.o: compat_strtonum.c config.h demandoc.o: demandoc.c config.h man.h mdoc.h mandoc.h eqn.o: eqn.c config.h mandoc.h mandoc_aux.h libmandoc.h libroff.h eqn_html.o: eqn_html.c config.h mandoc.h out.h html.h @@ -39,7 +40,7 @@ mdoc_macro.o: mdoc_macro.c config.h mdoc mdoc_man.o: mdoc_man.c config.h mandoc.h mandoc_aux.h out.h man.h mdoc.h main.h mdoc_term.o: mdoc_term.c config.h mandoc.h mandoc_aux.h out.h term.h mdoc.h main.h mdoc_validate.o: mdoc_validate.c config.h mdoc.h mandoc.h mandoc_aux.h libmdoc.h libmandoc.h -msec.o: msec.c config.h libmandoc.h msec.in +msec.o: msec.c config.h mandoc.h libmandoc.h msec.in out.o: out.c config.h mandoc_aux.h mandoc.h out.h preconv.o: preconv.c config.h mandoc.h libmandoc.h read.o: read.c config.h mandoc.h mandoc_aux.h libmandoc.h mdoc.h man.h @@ -69,4 +70,5 @@ test-strlcat.o: test-strlcat.c test-strlcpy.o: test-strlcpy.c test-strptime.o: test-strptime.c test-strsep.o: test-strsep.c +test-strtonum.o: test-strtonum.c test-wchar.o: test-wchar.c Added: vendor/mdocml/dist/Makefile.local ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/mdocml/dist/Makefile.local Mon Mar 2 16:45:41 2015 (r279524) @@ -0,0 +1,30 @@ +BUILD_TARGETS = base-build +INSTALL_TARGETS = base-install db-install +CFLAGS = -g -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings -I/usr/local/include +DBLIB = -L/usr/local/lib -lsqlite3 +STATIC = -static +PREFIX = /usr/local +BINDIR = /usr/local/bin +SBINDIR = /usr/local/sbin +INCLUDEDIR = /usr/local/include/mandoc +LIBDIR = /usr/local/lib/mandoc +MANDIR = /usr/local/man +EXAMPLEDIR = /usr/local/share/examples/mandoc +WWWPREFIX = /var/www +HTDOCDIR = /var/www/htdocs +CGIBINDIR = /var/www/cgi-bin +BINM_APROPOS = apropos +BINM_MAN = man +BINM_WHATIS = whatis +BINM_MAKEWHATIS = makewhatis +MANM_MAN = man +MANM_MDOC = mdoc +MANM_ROFF = roff +MANM_EQN = eqn +MANM_TBL = tbl +INSTALL = install +INSTALL_PROGRAM = install -m 0555 +INSTALL_LIB = install -m 0444 +INSTALL_MAN = install -m 0444 +INSTALL_DATA = install -m 0444 +MAIN_OBJS = $(BASE_OBJS) $(DB_OBJS) Modified: vendor/mdocml/dist/TODO ============================================================================== --- vendor/mdocml/dist/TODO Mon Mar 2 15:03:08 2015 (r279523) +++ vendor/mdocml/dist/TODO Mon Mar 2 16:45:41 2015 (r279524) @@ -1,6 +1,6 @@ ************************************************************************ * Official mandoc TODO. -* $Id: TODO,v 1.195 2014/12/13 13:14:39 schwarze Exp $ +* $Id: TODO,v 1.201 2015/02/20 13:47:28 schwarze Exp $ ************************************************************************ Many issues are annotated for difficulty as follows: @@ -60,7 +60,7 @@ are mere guesses, and some may be wrong. - .fc (field control) found by naddy@ in xloadimage(1) loc ** exist *** algo * size * imp * - + - .nr third argument (auto-increment step size, requires \n+) found by bentley@ in sbcl(1) Mon, 9 Dec 2013 18:36:57 -0700 loc * exist * algo * size * imp ** @@ -69,31 +69,37 @@ are mere guesses, and some may be wrong. reported by brad@ Sat, 15 Jan 2011 15:45:23 -0500 loc *** exist *** algo *** size ** imp * -- .ta (tab settings) occurs in ircbug(1) and probably gnats(1) - reported by brad@ Sat, 15 Jan 2011 15:50:51 -0500 +- .ta (tab settings) + #1 most important issue naddy@ Mon, 16 Feb 2015 20:59:17 +0100 + ircbug(1) gnats(1) reported by brad@ Sat, 15 Jan 2011 15:50:51 -0500 also Tcl_NewStringObj(3) via wiz@ Wed, 5 Mar 2014 22:27:43 +0100 also posix2time(3) Carsten Kunze Mon, 1 Dec 2014 13:03:10 +0100 loc ** exist *** algo ** size ** imp *** - .ti (temporary indent) - found by naddy@ in xloadimage(1) + found by naddy@ in xloadimage(1) [devel/libvstr] vstr(3) found by bentley@ in nmh(1) Mon, 23 Apr 2012 13:38:28 -0600 loc ** exist ** algo ** size * imp ** (parser reorg helps a lot) -- .while and .shift +- .while and .shift found by jca@ in ratpoison(1) Sun, 30 Jun 2013 12:01:09 +0200 loc * exist ** algo ** size ** imp ** - \h horizontal move - found in cclive(1) and nasm(1) asciidoc/DocBook output + #2 most important issue naddy@ Mon, 16 Feb 2015 20:59:17 +0100 + found in cclive(1) nasm(1) bogofilter(1) asciidoc/DocBook output bentley@ on discuss@ Sat, 21 Sep 2013 22:29:34 -0600 naddy@ Thu, 4 Dec 2014 16:26:41 +0100 - loc ** exist ** algo ** size * imp ** (parser reorg helps a lot) + loc ** exist ** algo ** size * imp *** (parser reorg helps a lot) - \n+ and \n- numerical register increment and decrement found by bentley@ in sbcl(1) Mon, 9 Dec 2013 18:36:57 -0700 loc * exist * algo * size * imp ** +- \n(.$ macro argument count number register; ocserv(8) by autogen + found by sthen@ Thu, 19 Feb 2015 22:03:01 +0000 + loc * exist ** algo * size * imp ** + - \w'' improve width measurements would not be very useful without an expression parser, see below needed for Tcl_NewStringObj(3) via wiz@ Wed, 5 Mar 2014 22:27:43 +0100 @@ -105,10 +111,6 @@ are mere guesses, and some may be wrong. --- missing mdoc features ---------------------------------------------- -- fix bad block nesting involving multiple identical explicit blocks - see the OpenBSD mdoc_macro.c 1.47 commit message - loc * exist *** algo *** size * imp ** - - .Bl -column .Xo support is missing ultimate goal: restore .Xr and .Dv to @@ -255,6 +257,10 @@ are mere guesses, and some may be wrong. --- compatibility checks ----------------------------------------------- +- write a configure check for [[:<:]] support and provide some + fallback for whatis(1) when it doesn't work; + Svyatoslav Mishyn Wed, 17 Dec 2014 11:07:10 +0200 + - is .Bk implemented correctly in modern groff? sobrado@ Tue, 19 Apr 2011 22:12:55 +0200 @@ -347,6 +353,10 @@ are mere guesses, and some may be wrong. reminded by jmc@ Thu, 23 Sep 2010 18:13:39 +0059 loc * exist ** algo *** size * imp *** +- a line starting with "\fB something" counts as starting with whitespace + and triggers a line break; found in audio/normalize-mp3(1) + loc ** exist * algo ** size * imp ** + - formatting /usr/local/man/man1/latex2man.1 with groff and mandoc reveals lots of bugs both in groff and mandoc... reported by bentley@ Wed, 22 May 2013 23:49:30 -0600 @@ -457,7 +467,7 @@ are mere guesses, and some may be wrong. loc * exist * algo * size * imp * - trailing whitespace must be ignored even when followed by a font escape, - see for example + see for example makes \fBdig \fR operate in batch mode @@ -531,7 +541,7 @@ are mere guesses, and some may be wrong. How does SQLITE_CONFIG_PAGECACHE actually work? Document it! from kristaps@ Sat, 09 Aug 2014 13:51:36 +0200 -Several areas can be cleaned up to make mandoc even faster. These are +Several areas can be cleaned up to make mandoc even faster. These are - improve hashing mechanism for macros (quite important: performance) @@ -540,7 +550,7 @@ Several areas can be cleaned up to make - the PDF file is HUGE: this can be reduced by using relative offsets - instead of re-initialising the roff predefined-strings set before each - parse, create a read-only version the first time and copy it + parse, create a read-only version the first time and copy it loc * exist ** algo ** size * imp ** ************************************************************************ @@ -556,7 +566,7 @@ Several areas can be cleaned up to make - Find better ways to prevent endless loops in roff(7) macro and string expansion. - + - Finish cleanup of date handling. Decide which formats should be recognized where. Update both mdoc(7) and man(7) documentation. Modified: vendor/mdocml/dist/apropos.1 ============================================================================== --- vendor/mdocml/dist/apropos.1 Mon Mar 2 15:03:08 2015 (r279523) +++ vendor/mdocml/dist/apropos.1 Mon Mar 2 16:45:41 2015 (r279524) @@ -1,4 +1,4 @@ -.\" $Id: apropos.1,v 1.36 2014/10/25 01:03:52 schwarze Exp $ +.\" $Id: apropos.1,v 1.37 2015/02/16 16:23:54 schwarze Exp $ .\" .\" Copyright (c) 2011, 2012 Kristaps Dzonsons .\" Copyright (c) 2011, 2012, 2014 Ingo Schwarze @@ -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 $Mdocdate: October 25 2014 $ +.Dd $Mdocdate: February 16 2015 $ .Dt APROPOS 1 .Os .Sh NAME @@ -24,7 +24,7 @@ .Nd search manual page databases .Sh SYNOPSIS .Nm -.Op Fl acfhklVw +.Op Fl acfhklw .Op Fl C Ar file .Op Fl M Ar path .Op Fl m Ar path @@ -162,8 +162,6 @@ By default, pages from all sections are See .Xr man 1 for a listing of sections. -.It Fl V -Print version and exit. .It Fl w Instead of showing title lines, show the pathnames of the matching manual pages, just like Modified: vendor/mdocml/dist/cgi.c ============================================================================== --- vendor/mdocml/dist/cgi.c Mon Mar 2 15:03:08 2015 (r279523) +++ vendor/mdocml/dist/cgi.c Mon Mar 2 16:45:41 2015 (r279524) @@ -1,4 +1,4 @@ -/* $Id: cgi.c,v 1.102 2014/11/26 17:55:27 schwarze Exp $ */ +/* $Id: cgi.c,v 1.104 2015/02/10 08:05:30 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2014 Ingo Schwarze @@ -58,10 +58,10 @@ static void catman(const struct req *, static void format(const struct req *, const char *); static void html_print(const char *); static void html_putchar(char); -static int http_decode(char *); +static int http_decode(char *); static void http_parse(struct req *, const char *); static void http_print(const char *); -static void http_putchar(char); +static void http_putchar(char); static void http_printquery(const struct req *, const char *); static void pathgen(struct req *); static void pg_error_badrequest(const char *); @@ -186,7 +186,7 @@ http_print(const char *p) static void html_print(const char *p) { - + if (NULL == p) return; while ('\0' != *p) @@ -621,7 +621,7 @@ pg_searchres(const struct req *req, stru for (i = 0; i < sz; i++) { printf("\n" "\n" - "q.manpath, r[i].file); http_printquery(req, "&"); printf("\">"); @@ -701,7 +701,7 @@ catman(const struct req *req, const char while (NULL != (p = fgetln(f, &len))) { bold = italic = 0; for (i = 0; i < (int)len - 1; i++) { - /* + /* * This means that the catpage is out of state. * Ignore it and keep going (although the * catpage is bogus). @@ -742,7 +742,7 @@ catman(const struct req *req, const char continue; } - /* + /* * Handle funny behaviour troff-isms. * These grok'd from the original man2html.c. */ @@ -780,7 +780,7 @@ catman(const struct req *req, const char } /* Bold mode. */ - + if (italic) printf(""); if ( ! bold) @@ -791,9 +791,9 @@ catman(const struct req *req, const char html_putchar(p[i]); } - /* + /* * Clean up the last character. - * We can get to a newline; don't print that. + * We can get to a newline; don't print that. */ if (italic) @@ -822,7 +822,6 @@ format(const struct req *req, const char struct man *man; void *vp; char *opts; - enum mandoclevel rc; int fd; int usepath; @@ -832,18 +831,11 @@ format(const struct req *req, const char } mchars = mchars_alloc(); - mp = mparse_alloc(MPARSE_SO, MANDOCLEVEL_FATAL, NULL, + mp = mparse_alloc(MPARSE_SO, MANDOCLEVEL_BADARG, NULL, mchars, req->q.manpath); - rc = mparse_readfd(mp, fd, file); + mparse_readfd(mp, fd, file); close(fd); - if (rc >= MANDOCLEVEL_FATAL) { - fprintf(stderr, "fatal mandoc error: %s/%s\n", - req->q.manpath, file); - pg_error_internal(); - return; - } - usepath = strcmp(req->q.manpath, req->p[0]); mandoc_asprintf(&opts, "fragment,man=%s?query=%%N&sec=%%S%s%s%s%s", @@ -899,7 +891,7 @@ pg_show(struct req *req, const char *ful pg_error_badrequest( "You did not specify a page to show."); return; - } + } manpath = mandoc_strndup(fullpath, file - fullpath); file++; @@ -1064,7 +1056,7 @@ main(void) MAN_DIR, strerror(errno)); pg_error_internal(); return(EXIT_FAILURE); - } + } memset(&req, 0, sizeof(struct req)); pathgen(&req); Modified: vendor/mdocml/dist/chars.c ============================================================================== --- vendor/mdocml/dist/chars.c Mon Mar 2 15:03:08 2015 (r279523) +++ vendor/mdocml/dist/chars.c Mon Mar 2 16:45:41 2015 (r279524) @@ -1,4 +1,4 @@ -/* $Id: chars.c,v 1.65 2014/10/29 00:17:43 schwarze Exp $ */ +/* $Id: chars.c,v 1.66 2015/02/17 20:37:16 schwarze Exp $ */ /* * Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2011, 2014 Ingo Schwarze @@ -38,7 +38,7 @@ struct ln { int unicode; }; -#define LINES_MAX 330 +#define LINES_MAX 332 #define CHAR(in, ch, code) \ { NULL, (in), (ch), (code) }, Modified: vendor/mdocml/dist/chars.in ============================================================================== --- vendor/mdocml/dist/chars.in Mon Mar 2 15:03:08 2015 (r279523) +++ vendor/mdocml/dist/chars.in Mon Mar 2 16:45:41 2015 (r279524) @@ -1,4 +1,4 @@ -/* $Id: chars.in,v 1.49 2014/11/06 22:28:36 schwarze Exp $ */ +/* $Id: chars.in,v 1.52 2015/02/17 20:37:16 schwarze Exp $ */ /* * Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2014 Ingo Schwarze @@ -70,8 +70,10 @@ CHAR("ti", "~", 126) /* Quotes. */ CHAR("Bq", ",,", 8222) CHAR("bq", ",", 8218) -CHAR("lq", "``", 8220) -CHAR("rq", "\'\'", 8221) +CHAR("lq", "\"", 8220) +CHAR("rq", "\"", 8221) +CHAR("Lq", "``", 8220) +CHAR("Rq", "''", 8221) CHAR("oq", "`", 8216) CHAR("cq", "\'", 8217) CHAR("aq", "\'", 39) @@ -91,30 +93,30 @@ CHAR("ra", ">", 10217) CHAR("bv", "|", 9130) CHAR("braceex", "|", 9130) CHAR("bracketlefttp", "|", 9121) -CHAR("bracketleftbp", "|", 9123) +CHAR("bracketleftbt", "|", 9123) CHAR("bracketleftex", "|", 9122) CHAR("bracketrighttp", "|", 9124) -CHAR("bracketrightbp", "|", 9126) +CHAR("bracketrightbt", "|", 9126) CHAR("bracketrightex", "|", 9125) CHAR("lt", ",-", 9127) CHAR("bracelefttp", ",-", 9127) CHAR("lk", "{", 9128) CHAR("braceleftmid", "{", 9128) CHAR("lb", "`-", 9129) -CHAR("braceleftbp", "`-", 9129) +CHAR("braceleftbt", "`-", 9129) CHAR("braceleftex", "|", 9130) CHAR("rt", "-.", 9131) CHAR("bracerighttp", "-.", 9131) CHAR("rk", "}", 9132) CHAR("bracerightmid", "}", 9132) CHAR("rb", "-\'", 9133) -CHAR("bracerightbp", "-\'", 9133) +CHAR("bracerightbt", "-\'", 9133) CHAR("bracerightex", "|", 9130) CHAR("parenlefttp", "/", 9115) -CHAR("parenleftbp", "\\", 9117) +CHAR("parenleftbt", "\\", 9117) CHAR("parenleftex", "|", 9116) CHAR("parenrighttp", "\\", 9118) -CHAR("parenrightbp", "/", 9120) +CHAR("parenrightbt", "/", 9120) CHAR("parenrightex", "|", 9119) /* Greek characters. */ @@ -281,10 +283,10 @@ CHAR("!=", "!=", 8800) CHAR("==", "==", 8801) CHAR("ne", "!==", 8802) CHAR("=~", "=~", 8773) -CHAR("-~", "-~", 8771) +CHAR("|=", "-~", 8771) CHAR("ap", "~", 8764) CHAR("~~", "~~", 8776) -CHAR("~=", "~=", 8780) +CHAR("~=", "~=", 8776) CHAR("pt", "oc", 8733) CHAR("es", "{}", 8709) CHAR("mo", "E", 8712) @@ -357,7 +359,7 @@ CHAR("Fn", ",\bf", 402) CHAR("ba", "|", 124) CHAR("br", "|", 9474) CHAR("ul", "_", 95) -CHAR("rl", "-", 8254) +CHAR("rn", "-", 8254) CHAR("bb", "|", 166) CHAR("sl", "/", 47) CHAR("rs", "\\", 92) Modified: vendor/mdocml/dist/compat_fts.c ============================================================================== --- vendor/mdocml/dist/compat_fts.c Mon Mar 2 15:03:08 2015 (r279523) +++ vendor/mdocml/dist/compat_fts.c Mon Mar 2 16:45:41 2015 (r279524) @@ -6,8 +6,8 @@ int dummy; #else -/* $Id: compat_fts.c,v 1.6 2014/12/11 18:20:07 schwarze Exp $ */ -/* $OpenBSD: fts.c,v 1.49 2014/11/23 00:14:22 guenther Exp $ */ +/* $Id: compat_fts.c,v 1.8 2015/02/07 07:53:01 schwarze Exp $ */ +/* $OpenBSD: fts.c,v 1.50 2015/01/16 16:48:51 deraadt Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -38,7 +38,6 @@ int dummy; * SUCH DAMAGE. */ -#include #include #include @@ -51,6 +50,8 @@ int dummy; #include #include "compat_fts.h" +#define MAXIMUM(a, b) (((a) > (b)) ? (a) : (b)) + static FTSENT *fts_alloc(FTS *, const char *, size_t); static FTSENT *fts_build(FTS *); static void fts_lfree(FTSENT *); @@ -62,10 +63,12 @@ static unsigned short fts_stat(FTS *, F static int fts_safe_changedir(FTS *, FTSENT *, int, const char *); #define ISDOT(a) (a[0] == '.' && (!a[1] || (a[1] == '.' && !a[2]))) -#define MAX(a,b) (((a)>(b))?(a):(b)) #ifndef O_DIRECTORY #define O_DIRECTORY 0 #endif +#ifndef O_CLOEXEC +#define O_CLOEXEC 0 +#endif #define CLR(opt) (sp->fts_options &= ~(opt)) #define ISSET(opt) (sp->fts_options & (opt)) @@ -97,7 +100,7 @@ fts_open(char * const *argv, int options * Start out with 1K of path space, and enough, in any case, * to hold the user's paths. */ - if (fts_palloc(sp, MAX(fts_maxarglen(argv), PATH_MAX))) + if (fts_palloc(sp, MAXIMUM(fts_maxarglen(argv), PATH_MAX))) goto mem1; /* Allocate/initialize root's parent. */ Added: vendor/mdocml/dist/compat_strtonum.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/mdocml/dist/compat_strtonum.c Mon Mar 2 16:45:41 2015 (r279524) @@ -0,0 +1,76 @@ +#include "config.h" + +#if HAVE_STRTONUM + +int dummy; + +#else + +/* $Id: compat_strtonum.c,v 1.1 2015/02/16 14:56:22 schwarze Exp $ */ +/* $OpenBSD: strtonum.c,v 1.7 2013/04/17 18:40:58 tedu Exp $ */ + +/* + * Copyright (c) 2004 Ted Unangst and Todd Miller + * All rights reserved. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +#include +#include + +#define INVALID 1 +#define TOOSMALL 2 +#define TOOLARGE 3 + +long long +strtonum(const char *numstr, long long minval, long long maxval, + const char **errstrp) +{ + long long ll = 0; + int error = 0; + char *ep; + struct errval { + const char *errstr; + int err; + } ev[4] = { + { NULL, 0 }, + { "invalid", EINVAL }, + { "too small", ERANGE }, + { "too large", ERANGE }, + }; + + ev[0].err = errno; + errno = 0; + if (minval > maxval) { + error = INVALID; + } else { + ll = strtoll(numstr, &ep, 10); + if (numstr == ep || *ep != '\0') + error = INVALID; + else if ((ll == LLONG_MIN && errno == ERANGE) || ll < minval) + error = TOOSMALL; + else if ((ll == LLONG_MAX && errno == ERANGE) || ll > maxval) + error = TOOLARGE; + } + if (errstrp != NULL) + *errstrp = ev[error].errstr; + errno = ev[error].err; + if (error) + ll = 0; + + return (ll); +} + +#endif /* !HAVE_STRTONUM */ Modified: vendor/mdocml/dist/configure ============================================================================== --- vendor/mdocml/dist/configure Mon Mar 2 15:03:08 2015 (r279523) +++ vendor/mdocml/dist/configure Mon Mar 2 16:45:41 2015 (r279524) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2014 Ingo Schwarze +# Copyright (c) 2014, 2015 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 @@ -31,10 +31,6 @@ echo "config.log: writing..." # Initialize all variables here, # such that nothing can leak in from the environment. -VERSION="1.13.2" -echo "VERSION=\"${VERSION}\"" 1>&2 -echo "VERSION=\"${VERSION}\"" 1>&3 - OSNAME= CC=`printf "all:\\n\\t@echo \\\$(CC)\\n" | make -f -` @@ -56,6 +52,7 @@ HAVE_STRLCAT= HAVE_STRLCPY= HAVE_STRPTIME= HAVE_STRSEP= +HAVE_STRTONUM= HAVE_WCHAR= HAVE_SQLITE3= @@ -70,6 +67,7 @@ INCLUDEDIR= LIBDIR= MANDIR= EXAMPLEDIR= +HOMEBREWDIR= WWWPREFIX="/var/www" HTDOCDIR= @@ -176,6 +174,7 @@ runtest strlcat STRLCAT || true runtest strlcpy STRLCPY || true runtest strptime STRPTIME || true runtest strsep STRSEP || true +runtest strtonum STRTONUM || true runtest wchar WCHAR || true # --- sqlite3 --- @@ -274,8 +273,8 @@ __HEREDOC__ [ ${HAVE_FGETLN} -eq 0 ] && echo "#include " echo -echo "#define VERSION \"${VERSION}\"" [ -n "${OSNAME}" ] && echo "#define OSNAME \"${OSNAME}\"" +[ -n "${HOMEBREWDIR}" ] && echo "#define HOMEBREWDIR \"${HOMEBREWDIR}\"" cat << __HEREDOC__ #define HAVE_DIRENT_NAMLEN ${HAVE_DIRENT_NAMLEN} @@ -289,6 +288,7 @@ cat << __HEREDOC__ #define HAVE_STRLCPY ${HAVE_STRLCPY} #define HAVE_STRPTIME ${HAVE_STRPTIME} #define HAVE_STRSEP ${HAVE_STRSEP} +#define HAVE_STRTONUM ${HAVE_STRTONUM} #define HAVE_WCHAR ${HAVE_WCHAR} #define HAVE_SQLITE3 ${HAVE_SQLITE3} #define HAVE_SQLITE3_ERRSTR ${HAVE_SQLITE3_ERRSTR} @@ -341,6 +341,9 @@ __HEREDOC__ [ ${HAVE_STRSEP} -eq 0 ] && \ echo "extern char *strsep(char **, const char *);" +[ ${HAVE_STRTONUM} -eq 0 ] && \ + echo "extern long long strtonum(const char *, long long, long long, const char **);" + echo echo "#endif /* MANDOC_CONFIG_H */" @@ -379,7 +382,6 @@ INSTALL_TARGETS="base-install" [ ${BUILD_CGI} -gt 0 ] && INSTALL_TARGETS="${INSTALL_TARGETS} cgi-install" cat << __HEREDOC__ -VERSION = ${VERSION} BUILD_TARGETS = ${BUILD_TARGETS} INSTALL_TARGETS = ${INSTALL_TARGETS} CFLAGS = ${CFLAGS} Modified: vendor/mdocml/dist/configure.local.example ============================================================================== --- vendor/mdocml/dist/configure.local.example Mon Mar 2 15:03:08 2015 (r279523) +++ vendor/mdocml/dist/configure.local.example Mon Mar 2 16:45:41 2015 (r279524) @@ -1,6 +1,6 @@ -# $Id: configure.local.example,v 1.2 2014/12/09 09:14:33 schwarze Exp $ +# $Id: configure.local.example,v 1.6 2015/02/16 14:56:22 schwarze Exp $ # -# Copyright (c) 2014 Ingo Schwarze +# Copyright (c) 2014, 2015 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 @@ -74,6 +74,21 @@ LIBDIR="${PREFIX}/lib/mandoc" MANDIR="${PREFIX}/man" EXAMPLEDIR="${PREFIX}/share/examples/mandoc" +# The man(1) utility needs to know where the manuals reside. +# We know of two ways to tell it: via manpath(1) or man.conf(5). +# The latter is used by OpenBSD and NetBSD, the former by most +# other systems. + +# Force usage of manpath(1). +# If it is not installed or not operational, +# man(1), makewhatis(8), and apropos(1) will not work properly. +HAVE_MANPATH=1 + +# Force usage of man.conf(5). +# If it does not exist or contains no valid configuration, +# man(1), makewhatis(8), and apropos(1) will not work properly. +HAVE_MANPATH=0 + # Some distributions may want to avoid naming conflicts among manuals. # If you want to change the names of installed section 7 manual pages, # the following alternative names are suggested. @@ -87,6 +102,15 @@ MANM_ROFF="mandoc_roff" # default is "r MANM_EQN="mandoc_eqn" # default is "eqn" MANM_TBL="mandoc_tbl" # default is "tbl" +# Some distributions may want to avoid naming conflicts +# with another man(1) utility. +# If you want to change the name of the binary program, +# the following alternative name is suggested. +# Using a different name is possible as well. +# This changes the name of the installed section 1 manual page as well. + +BINM_MAN=mman # default is "man" + # It is possible to change the utility program used for installation # and the modes files are installed with. The defaults are: @@ -121,38 +145,29 @@ DBLIB="-L/usr/local/lib -lsqlite3" CFLAGS="${CFLAGS} -I/usr/local/include" -# The man(1) utility needs to know where the manuals reside. -# We know of two ways to tell it: via manpath(1) or man.conf(5). -# The latter is used by OpenBSD and NetBSD, the former by most -# other systems. - -# Force usage of manpath(1). -# If it is not installed or not operational, -# makewhatis(8) and apropos(1) will not work properly. - -HAVE_MANPATH=1 - -# Force usage of man.conf(5). -# If it does not exist or contains no valid configuration, -# makewhatis(8) and apropos(1) will not work properly. - -HAVE_MANPATH=0 - # Some distributions may want to avoid naming conflicts -# with groff, man-db, or other tools. -# If you want to change the names of binary programs, +# with another implementation of apropos(1) and makewhatis(8). +# If you want to change the names of the binary programs, # the following alternative names are suggested. # Using other names is possible as well. # This changes the names of the installed section 1 and section 8 # manual pages as well. -# It is possible to set only one or a few of these variables, +# It is possible to set only one or two of these variables, # there is no need to copy the whole block. BINM_APROPOS=mapropos # default is "apropos" -BINM_MAN=mman # default is "man" BINM_WHATIS=mwhatis # default is "whatis" BINM_MAKEWHATIS=mandocdb # default is "makewhatis" +# When using the "homebrew" package manager on Mac OS X, the actual +# manuals are located in a so-called "cellar" and only symlinked +# into the manual trees. To allow mandoc to follow such symlinks, +# you have to specify the physical location of the cellar as returned +# by realpath(3), for example: + +PREFIX="/usr/local" +HOMEBREWDIR="${PREFIX}/Cellar" + # --- user settings related man.cgi ------------------------------------ # By default, building man.cgi(8) is disabled. To enable it, copy @@ -211,6 +226,7 @@ HAVE_STRLCAT=0 HAVE_STRLCPY=0 HAVE_STRPTIME=0 HAVE_STRSEP=0 +HAVE_STRTONUM=0 HAVE_SQLITE3=0 HAVE_SQLITE3_ERRSTR=0 Modified: vendor/mdocml/dist/demandoc.c ============================================================================== --- vendor/mdocml/dist/demandoc.c Mon Mar 2 15:03:08 2015 (r279523) +++ vendor/mdocml/dist/demandoc.c Mon Mar 2 16:45:41 2015 (r279524) @@ -1,4 +1,4 @@ -/* $Id: demandoc.c,v 1.12 2014/10/28 17:36:19 schwarze Exp $ */ +/* $Id: demandoc.c,v 1.15 2015/02/10 08:05:30 schwarze Exp $ */ /* * Copyright (c) 2011 Kristaps Dzonsons * @@ -44,11 +44,12 @@ main(int argc, char *argv[]) { struct mparse *mp; struct mchars *mchars; - int ch, i, list; + int ch, fd, i, list; extern int optind; - progname = strrchr(argv[0], '/'); - if (progname == NULL) + if (argc < 1) + progname = "demandoc"; + else if ((progname = strrchr(argv[0], '/')) == NULL) progname = argv[0]; else ++progname; @@ -78,15 +79,19 @@ main(int argc, char *argv[]) argv += optind; mchars = mchars_alloc(); - mp = mparse_alloc(MPARSE_SO, MANDOCLEVEL_FATAL, NULL, mchars, NULL); + mp = mparse_alloc(MPARSE_SO, MANDOCLEVEL_BADARG, NULL, mchars, NULL); assert(mp); - if (0 == argc) + if (argc < 1) pmandoc(mp, STDIN_FILENO, "", list); for (i = 0; i < argc; i++) { mparse_reset(mp); - pmandoc(mp, -1, argv[i], list); + if (mparse_open(mp, &fd, argv[i]) != MANDOCLEVEL_OK) { + perror(argv[i]); + continue; + } + pmandoc(mp, fd, argv[i], list); } mparse_free(mp); @@ -108,16 +113,12 @@ pmandoc(struct mparse *mp, int fd, const struct man *man; int line, col; - if (mparse_readfd(mp, fd, fn) >= MANDOCLEVEL_FATAL) { - fprintf(stderr, "%s: Parse failure\n", fn); - return; - } - + mparse_readfd(mp, fd, fn); mparse_result(mp, &mdoc, &man, NULL); line = 1; col = 0; - if (mdoc) + if (mdoc) pmdoc(mdoc_node(mdoc), &line, &col, list); else if (man) pman(man_node(man), &line, &col, list); @@ -167,7 +168,7 @@ again: end = p - 1; while (end > start) - if ('.' == *end || ',' == *end || + if ('.' == *end || ',' == *end || '\'' == *end || '"' == *end || ')' == *end || '!' == *end || '?' == *end || ':' == *end || @@ -199,7 +200,7 @@ again: /* * Print the input word, skipping any special characters. */ - while ('\0' != *p) + while ('\0' != *p) if ('\\' == *p) { p++; esc = mandoc_escape(&p, NULL, NULL); @@ -220,7 +221,7 @@ pline(int line, int *linep, int *col, in /* * Print out as many lines as needed to reach parity with the - * original input. + * original input. */ while (*linep < line) { @@ -240,7 +241,7 @@ pmdoc(const struct mdoc_node *p, int *li pline(p->line, line, col, list); if (MDOC_TEXT == p->type) pstring(p->string, p->pos, col, list); - if (p->child) + if (p->child) pmdoc(p->child, line, col, list); } } @@ -254,7 +255,7 @@ pman(const struct man_node *p, int *line pline(p->line, line, col, list); if (MAN_TEXT == p->type) pstring(p->string, p->pos, col, list); - if (p->child) + if (p->child) pman(p->child, line, col, list); } } Modified: vendor/mdocml/dist/eqn.7 ============================================================================== --- vendor/mdocml/dist/eqn.7 Mon Mar 2 15:03:08 2015 (r279523) +++ vendor/mdocml/dist/eqn.7 Mon Mar 2 16:45:41 2015 (r279524) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@FreeBSD.ORG Mon Mar 2 16:48:01 2015 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 86A9BE7; Mon, 2 Mar 2015 16:48:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 56403C6; Mon, 2 Mar 2015 16:48:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t22Gm1qL054804; Mon, 2 Mar 2015 16:48:01 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t22Gm1NY054803; Mon, 2 Mar 2015 16:48:01 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201503021648.t22Gm1NY054803@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 2 Mar 2015 16:48:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r279525 - vendor/mdocml/dist X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2015 16:48:01 -0000 Author: bapt Date: Mon Mar 2 16:48:00 2015 New Revision: 279525 URL: https://svnweb.freebsd.org/changeset/base/279525 Log: Remove WIP code Modified: vendor/mdocml/dist/roff.c Modified: vendor/mdocml/dist/roff.c ============================================================================== --- vendor/mdocml/dist/roff.c Mon Mar 2 16:45:41 2015 (r279524) +++ vendor/mdocml/dist/roff.c Mon Mar 2 16:48:00 2015 (r279525) @@ -418,7 +418,6 @@ static enum rofft roff_parse(struct rof static enum rofferr roff_parsetext(struct buf *, int, int *); static enum rofferr roff_res(struct roff *, struct buf *, int, int); static enum rofferr roff_rm(ROFF_ARGS); -static enum rofferr roff_rn(ROFF_ARGS); static enum rofferr roff_rr(ROFF_ARGS); static void roff_setstr(struct roff *, const char *, const char *, int); @@ -625,7 +624,7 @@ static struct roffmac roffs[ROFF_MAX] = { "rhang", roff_line_ignore, NULL, NULL, 0, NULL }, { "rj", roff_line_ignore, NULL, NULL, 0, NULL }, { "rm", roff_rm, NULL, NULL, 0, NULL }, - { "rn", roff_rn, NULL, NULL, 0, NULL }, + { "rn", roff_unsupp, NULL, NULL, 0, NULL }, { "rnn", roff_unsupp, NULL, NULL, 0, NULL }, { "rr", roff_rr, NULL, NULL, 0, NULL }, { "rs", roff_line_ignore, NULL, NULL, 0, NULL }, @@ -2326,35 +2325,6 @@ roff_rm(ROFF_ARGS) } static enum rofferr -roff_rn(ROFF_ARGS) -{ - struct roffkv *n; - char *newname; - const char *name; - size_t namesz; - - name = newname = buf->buf + pos; - if (*name == '\0') - return(ROFF_IGN); - - namesz = roff_getname(r, &newname, ln, pos); - if (name[namesz] == '\\') - return(ROFF_IGN); - - - for (n = r->strtab; n; n = n->next) - if (0 == strncmp(name, n->key.p, namesz) && - '\0' == n->key.p[(int)namesz]) { - free(n->key.p); - fprintf(stderr, "From %s to %s\n", n->key.p, newname); - n->key.p = mandoc_strdup(newname); - n->key.sz = strlen(n->key.p); - } - - return(ROFF_IGN); -} - -static enum rofferr roff_it(ROFF_ARGS) { int iv; From owner-svn-src-vendor@FreeBSD.ORG Mon Mar 2 16:49:47 2015 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6387621B; Mon, 2 Mar 2015 16:49:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B24BD2; Mon, 2 Mar 2015 16:49:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t22GnlhE055044; Mon, 2 Mar 2015 16:49:47 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t22GnkMM055037; Mon, 2 Mar 2015 16:49:46 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201503021649.t22GnkMM055037@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 2 Mar 2015 16:49:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r279526 - vendor/mdocml/20150302 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2015 16:49:47 -0000 Author: bapt Date: Mon Mar 2 16:49:45 2015 New Revision: 279526 URL: https://svnweb.freebsd.org/changeset/base/279526 Log: Tag import of mandoc 20150302 Added: vendor/mdocml/20150302/ - copied from r279523, vendor/mdocml/dist/ vendor/mdocml/20150302/Makefile.local - copied unchanged from r279524, vendor/mdocml/dist/Makefile.local vendor/mdocml/20150302/compat_strtonum.c - copied unchanged from r279524, vendor/mdocml/dist/compat_strtonum.c vendor/mdocml/20150302/test-strtonum.c - copied unchanged from r279524, vendor/mdocml/dist/test-strtonum.c Replaced: vendor/mdocml/20150302/LICENSE - copied unchanged from r279524, vendor/mdocml/dist/LICENSE vendor/mdocml/20150302/Makefile - copied unchanged from r279524, vendor/mdocml/dist/Makefile vendor/mdocml/20150302/Makefile.depend - copied unchanged from r279524, vendor/mdocml/dist/Makefile.depend vendor/mdocml/20150302/TODO - copied unchanged from r279524, vendor/mdocml/dist/TODO vendor/mdocml/20150302/apropos.1 - copied unchanged from r279524, vendor/mdocml/dist/apropos.1 vendor/mdocml/20150302/cgi.c - copied unchanged from r279524, vendor/mdocml/dist/cgi.c vendor/mdocml/20150302/chars.c - copied unchanged from r279524, vendor/mdocml/dist/chars.c vendor/mdocml/20150302/chars.in - copied unchanged from r279524, vendor/mdocml/dist/chars.in vendor/mdocml/20150302/compat_fts.c - copied unchanged from r279524, vendor/mdocml/dist/compat_fts.c vendor/mdocml/20150302/configure - copied unchanged from r279524, vendor/mdocml/dist/configure vendor/mdocml/20150302/configure.local.example - copied unchanged from r279524, vendor/mdocml/dist/configure.local.example vendor/mdocml/20150302/demandoc.c - copied unchanged from r279524, vendor/mdocml/dist/demandoc.c vendor/mdocml/20150302/eqn.7 - copied unchanged from r279524, vendor/mdocml/dist/eqn.7 vendor/mdocml/20150302/eqn.c - copied unchanged from r279524, vendor/mdocml/dist/eqn.c vendor/mdocml/20150302/eqn_term.c - copied unchanged from r279524, vendor/mdocml/dist/eqn_term.c vendor/mdocml/20150302/example.style.css - copied unchanged from r279524, vendor/mdocml/dist/example.style.css vendor/mdocml/20150302/gmdiff - copied unchanged from r279524, vendor/mdocml/dist/gmdiff vendor/mdocml/20150302/html.c - copied unchanged from r279524, vendor/mdocml/dist/html.c vendor/mdocml/20150302/libman.h - copied unchanged from r279524, vendor/mdocml/dist/libman.h vendor/mdocml/20150302/libmandoc.h - copied unchanged from r279524, vendor/mdocml/dist/libmandoc.h vendor/mdocml/20150302/libmdoc.h - copied unchanged from r279524, vendor/mdocml/dist/libmdoc.h vendor/mdocml/20150302/libroff.h - copied unchanged from r279524, vendor/mdocml/dist/libroff.h vendor/mdocml/20150302/main.c - copied unchanged from r279524, vendor/mdocml/dist/main.c vendor/mdocml/20150302/main.h - copied unchanged from r279524, vendor/mdocml/dist/main.h vendor/mdocml/20150302/man-cgi.css - copied unchanged from r279524, vendor/mdocml/dist/man-cgi.css vendor/mdocml/20150302/man.1 - copied unchanged from r279524, vendor/mdocml/dist/man.1 vendor/mdocml/20150302/man.7 - copied unchanged from r279524, vendor/mdocml/dist/man.7 vendor/mdocml/20150302/man.c - copied unchanged from r279524, vendor/mdocml/dist/man.c vendor/mdocml/20150302/man.h - copied unchanged from r279524, vendor/mdocml/dist/man.h vendor/mdocml/20150302/man_html.c - copied unchanged from r279524, vendor/mdocml/dist/man_html.c vendor/mdocml/20150302/man_macro.c - copied unchanged from r279524, vendor/mdocml/dist/man_macro.c vendor/mdocml/20150302/man_term.c - copied unchanged from r279524, vendor/mdocml/dist/man_term.c vendor/mdocml/20150302/man_validate.c - copied unchanged from r279524, vendor/mdocml/dist/man_validate.c vendor/mdocml/20150302/mandoc.1 - copied unchanged from r279524, vendor/mdocml/dist/mandoc.1 vendor/mdocml/20150302/mandoc.3 - copied unchanged from r279524, vendor/mdocml/dist/mandoc.3 vendor/mdocml/20150302/mandoc.c - copied unchanged from r279524, vendor/mdocml/dist/mandoc.c vendor/mdocml/20150302/mandoc.db.5 - copied unchanged from r279524, vendor/mdocml/dist/mandoc.db.5 vendor/mdocml/20150302/mandoc.h - copied unchanged from r279524, vendor/mdocml/dist/mandoc.h vendor/mdocml/20150302/mandoc_char.7 - copied unchanged from r279524, vendor/mdocml/dist/mandoc_char.7 vendor/mdocml/20150302/mandoc_escape.3 - copied unchanged from r279524, vendor/mdocml/dist/mandoc_escape.3 vendor/mdocml/20150302/mandoc_headers.3 - copied unchanged from r279524, vendor/mdocml/dist/mandoc_headers.3 vendor/mdocml/20150302/mandocdb.c - copied unchanged from r279524, vendor/mdocml/dist/mandocdb.c vendor/mdocml/20150302/manpage.c - copied unchanged from r279524, vendor/mdocml/dist/manpage.c vendor/mdocml/20150302/mansearch.c - copied unchanged from r279524, vendor/mdocml/dist/mansearch.c vendor/mdocml/20150302/mdoc.7 - copied unchanged from r279524, vendor/mdocml/dist/mdoc.7 vendor/mdocml/20150302/mdoc.c - copied unchanged from r279524, vendor/mdocml/dist/mdoc.c vendor/mdocml/20150302/mdoc.h - copied unchanged from r279524, vendor/mdocml/dist/mdoc.h vendor/mdocml/20150302/mdoc_argv.c - copied unchanged from r279524, vendor/mdocml/dist/mdoc_argv.c vendor/mdocml/20150302/mdoc_html.c - copied unchanged from r279524, vendor/mdocml/dist/mdoc_html.c vendor/mdocml/20150302/mdoc_macro.c - copied unchanged from r279524, vendor/mdocml/dist/mdoc_macro.c vendor/mdocml/20150302/mdoc_man.c - copied unchanged from r279524, vendor/mdocml/dist/mdoc_man.c vendor/mdocml/20150302/mdoc_term.c - copied unchanged from r279524, vendor/mdocml/dist/mdoc_term.c vendor/mdocml/20150302/mdoc_validate.c - copied unchanged from r279524, vendor/mdocml/dist/mdoc_validate.c vendor/mdocml/20150302/msec.c - copied unchanged from r279524, vendor/mdocml/dist/msec.c vendor/mdocml/20150302/out.c - copied unchanged from r279524, vendor/mdocml/dist/out.c vendor/mdocml/20150302/preconv.c - copied unchanged from r279524, vendor/mdocml/dist/preconv.c vendor/mdocml/20150302/read.c - copied unchanged from r279524, vendor/mdocml/dist/read.c vendor/mdocml/20150302/roff.7 - copied unchanged from r279524, vendor/mdocml/dist/roff.7 vendor/mdocml/20150302/roff.c - copied unchanged from r279525, vendor/mdocml/dist/roff.c vendor/mdocml/20150302/st.in - copied unchanged from r279524, vendor/mdocml/dist/st.in vendor/mdocml/20150302/style.css - copied unchanged from r279524, vendor/mdocml/dist/style.css vendor/mdocml/20150302/tbl.3 - copied unchanged from r279524, vendor/mdocml/dist/tbl.3 vendor/mdocml/20150302/tbl.7 - copied unchanged from r279524, vendor/mdocml/dist/tbl.7 vendor/mdocml/20150302/tbl.c - copied unchanged from r279524, vendor/mdocml/dist/tbl.c vendor/mdocml/20150302/tbl_data.c - copied unchanged from r279524, vendor/mdocml/dist/tbl_data.c vendor/mdocml/20150302/tbl_html.c - copied unchanged from r279524, vendor/mdocml/dist/tbl_html.c vendor/mdocml/20150302/tbl_layout.c - copied unchanged from r279524, vendor/mdocml/dist/tbl_layout.c vendor/mdocml/20150302/tbl_opts.c - copied unchanged from r279524, vendor/mdocml/dist/tbl_opts.c vendor/mdocml/20150302/tbl_term.c - copied unchanged from r279524, vendor/mdocml/dist/tbl_term.c vendor/mdocml/20150302/term.c - copied unchanged from r279524, vendor/mdocml/dist/term.c vendor/mdocml/20150302/term.h - copied unchanged from r279524, vendor/mdocml/dist/term.h vendor/mdocml/20150302/term_ascii.c - copied unchanged from r279524, vendor/mdocml/dist/term_ascii.c vendor/mdocml/20150302/term_ps.c - copied unchanged from r279524, vendor/mdocml/dist/term_ps.c vendor/mdocml/20150302/tree.c - copied unchanged from r279524, vendor/mdocml/dist/tree.c Copied: vendor/mdocml/20150302/LICENSE (from r279524, vendor/mdocml/dist/LICENSE) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/mdocml/20150302/LICENSE Mon Mar 2 16:49:45 2015 (r279526, copy of r279524, vendor/mdocml/dist/LICENSE) @@ -0,0 +1,47 @@ +$Id: LICENSE,v 1.7 2015/02/16 14:56:22 schwarze Exp $ + +With the exceptions noted below, all code and documentation +contained in the mdocml toolkit is protected by the Copyright +of the following developers: + +Copyright (c) 2008-2012, 2014 Kristaps Dzonsons +Copyright (c) 2010-2015 Ingo Schwarze +Copyright (c) 2009, 2010, 2011, 2012 Joerg Sonnenberger +Copyright (c) 2013 Franco Fichtner +Copyright (c) 1999, 2004 Marc Espie +Copyright (c) 1998, 2004, 2010 Todd C. Miller +Copyright (c) 2008 Otto Moerbeek +Copyright (c) 2004 Ted Unangst +Copyright (c) 2003, 2007, 2008, 2014 Jason McIntyre + +See the individual source files for information about who contributed +to which file during which years. + + +The mdocml distribution as a whole is distributed by its developers +under the following license: + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +The following files included from outside sources are protected by +other people's Copyright and are distributed under a 3-clause BSD +license; see these individual files for details. + +compat_fts.c, compat_fts.h, +compat_getsubopt.c, compat_strcasestr.c, compat_strsep.c, +man.1: +Copyright (c) 1989,1990,1993,1994 The Regents of the University of California + +compat_fgetln.c: +Copyright (c) 1998 The NetBSD Foundation, Inc. Copied: vendor/mdocml/20150302/Makefile (from r279524, vendor/mdocml/dist/Makefile) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/mdocml/20150302/Makefile Mon Mar 2 16:49:45 2015 (r279526, copy of r279524, vendor/mdocml/dist/Makefile) @@ -0,0 +1,419 @@ +# $Id: Makefile,v 1.456 2015/02/16 16:23:54 schwarze Exp $ +# +# Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons +# Copyright (c) 2011, 2013, 2014 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 +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +VERSION = 1.13.2 + +# === LIST OF FILES ==================================================== + +TESTSRCS = test-dirent-namlen.c \ + test-fgetln.c \ + test-fts.c \ + test-getsubopt.c \ + test-mmap.c \ + test-ohash.c \ + test-reallocarray.c \ + test-sqlite3.c \ + test-sqlite3_errstr.c \ + test-strcasestr.c \ + test-strlcat.c \ + test-strlcpy.c \ + test-strptime.c \ + test-strsep.c \ + test-strtonum.c \ + test-wchar.c + +SRCS = att.c \ + cgi.c \ + chars.c \ + compat_fgetln.c \ + compat_fts.c \ + compat_getsubopt.c \ + compat_ohash.c \ + compat_reallocarray.c \ + compat_sqlite3_errstr.c \ + compat_strcasestr.c \ + compat_strlcat.c \ + compat_strlcpy.c \ + compat_strsep.c \ + compat_strtonum.c \ + demandoc.c \ + eqn.c \ + eqn_html.c \ + eqn_term.c \ + html.c \ + lib.c \ + main.c \ + man.c \ + man_hash.c \ + man_html.c \ + man_macro.c \ + man_term.c \ + man_validate.c \ + mandoc.c \ + mandoc_aux.c \ + mandocdb.c \ + manpage.c \ + manpath.c \ + mansearch.c \ + mansearch_const.c \ + mdoc.c \ + mdoc_argv.c \ + mdoc_hash.c \ + mdoc_html.c \ + mdoc_macro.c \ + mdoc_man.c \ + mdoc_term.c \ + mdoc_validate.c \ + msec.c \ + out.c \ + preconv.c \ + read.c \ + roff.c \ + st.c \ + tbl.c \ + tbl_data.c \ + tbl_html.c \ + tbl_layout.c \ + tbl_opts.c \ + tbl_term.c \ + term.c \ + term_ascii.c \ + term_ps.c \ + tree.c \ + $(TESTSRCS) + +DISTFILES = INSTALL \ + LICENSE \ + Makefile \ + Makefile.depend \ + NEWS \ + TODO \ + apropos.1 \ + cgi.h.example \ + chars.in \ + compat_fts.h \ + compat_ohash.h \ + configure \ + configure.local.example \ + demandoc.1 \ + eqn.7 \ + example.style.css \ + gmdiff \ + html.h \ + lib.in \ + libman.h \ + libmandoc.h \ + libmdoc.h \ + libroff.h \ + main.h \ + makewhatis.8 \ + man-cgi.css \ + man.1 \ + man.7 \ + man.cgi.8 \ + man.h \ + mandoc.1 \ + mandoc.3 \ + mandoc.db.5 \ + mandoc.h \ + mandoc_aux.h \ + mandoc_char.7 \ + mandoc_escape.3 \ + mandoc_headers.3 \ + mandoc_html.3 \ + mandoc_malloc.3 \ + manpath.h \ + mansearch.3 \ + mansearch.h \ + mchars_alloc.3 \ + mdoc.7 \ + mdoc.h \ + msec.in \ + out.h \ + predefs.in \ + roff.7 \ + st.in \ + style.css \ + tbl.3 \ + tbl.7 \ + term.h \ + $(SRCS) + +LIBMAN_OBJS = man.o \ + man_hash.o \ + man_macro.o \ + man_validate.o + +LIBMDOC_OBJS = att.o \ + lib.o \ + mdoc.o \ + mdoc_argv.o \ + mdoc_hash.o \ + mdoc_macro.o \ + mdoc_validate.o \ + st.o + +LIBROFF_OBJS = eqn.o \ + roff.o \ + tbl.o \ + tbl_data.o \ + tbl_layout.o \ + tbl_opts.o + +LIBMANDOC_OBJS = $(LIBMAN_OBJS) \ + $(LIBMDOC_OBJS) \ + $(LIBROFF_OBJS) \ + chars.o \ + mandoc.o \ + mandoc_aux.o \ + msec.o \ + preconv.o \ + read.o + +COMPAT_OBJS = compat_fgetln.o \ + compat_fts.o \ + compat_getsubopt.o \ + compat_ohash.o \ + compat_reallocarray.o \ + compat_sqlite3_errstr.o \ + compat_strcasestr.o \ + compat_strlcat.o \ + compat_strlcpy.o \ + compat_strsep.o \ + compat_strtonum.o + +MANDOC_HTML_OBJS = eqn_html.o \ + html.o \ + man_html.o \ + mdoc_html.o \ + tbl_html.o + +MANDOC_MAN_OBJS = mdoc_man.o + +MANDOC_TERM_OBJS = eqn_term.o \ + man_term.o \ + mdoc_term.o \ + term.o \ + term_ascii.o \ + term_ps.o \ + tbl_term.o + +BASE_OBJS = $(MANDOC_HTML_OBJS) \ + $(MANDOC_MAN_OBJS) \ + $(MANDOC_TERM_OBJS) \ + main.o \ + manpath.o \ + out.o \ + tree.o + +MAIN_OBJS = $(BASE_OBJS) + +DB_OBJS = mandocdb.o \ + mansearch.o \ + mansearch_const.o + +CGI_OBJS = $(MANDOC_HTML_OBJS) \ + cgi.o \ + mansearch.o \ + mansearch_const.o \ + out.o + +MANPAGE_OBJS = manpage.o mansearch.o mansearch_const.o manpath.o + +DEMANDOC_OBJS = demandoc.o + +WWW_MANS = apropos.1.html \ + demandoc.1.html \ + man.1.html \ + mandoc.1.html \ + mandoc.3.html \ + mandoc_escape.3.html \ + mandoc_headers.3.html \ + mandoc_html.3.html \ + mandoc_malloc.3.html \ + mansearch.3.html \ + mchars_alloc.3.html \ + tbl.3.html \ + mandoc.db.5.html \ + eqn.7.html \ + man.7.html \ + mandoc_char.7.html \ + mdoc.7.html \ + roff.7.html \ + tbl.7.html \ + makewhatis.8.html \ + man.cgi.8.html \ + man.h.html \ + mandoc.h.html \ + mandoc_aux.h.html \ + manpath.h.html \ + mansearch.h.html \ + mdoc.h.html + +WWW_OBJS = mdocml.tar.gz \ + mdocml.sha256 + +# === USER CONFIGURATION =============================================== + +include Makefile.local + +# === DEPENDENCY HANDLING ============================================== + +all: base-build $(BUILD_TARGETS) Makefile.local + +base-build: mandoc demandoc + +cgi-build: man.cgi + +install: base-install $(INSTALL_TARGETS) + +www: $(WWW_OBJS) $(WWW_MANS) + +$(WWW_MANS): mandoc + +.PHONY: base-install cgi-install db-install install www-install +.PHONY: clean distclean depend + +include Makefile.depend + +# === TARGETS CONTAINING SHELL COMMANDS ================================ + +distclean: clean + rm -f Makefile.local config.h config.h.old config.log config.log.old + +clean: + rm -f libmandoc.a $(LIBMANDOC_OBJS) $(COMPAT_OBJS) + rm -f mandoc $(BASE_OBJS) $(DB_OBJS) + rm -f man.cgi $(CGI_OBJS) + rm -f manpage $(MANPAGE_OBJS) + rm -f demandoc $(DEMANDOC_OBJS) + rm -f $(WWW_MANS) $(WWW_OBJS) + rm -rf *.dSYM + +base-install: base-build + mkdir -p $(DESTDIR)$(BINDIR) + mkdir -p $(DESTDIR)$(EXAMPLEDIR) + mkdir -p $(DESTDIR)$(LIBDIR) + mkdir -p $(DESTDIR)$(INCLUDEDIR) + mkdir -p $(DESTDIR)$(MANDIR)/man1 + mkdir -p $(DESTDIR)$(MANDIR)/man3 + mkdir -p $(DESTDIR)$(MANDIR)/man7 + $(INSTALL_PROGRAM) mandoc demandoc $(DESTDIR)$(BINDIR) + ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_MAN) + $(INSTALL_LIB) libmandoc.a $(DESTDIR)$(LIBDIR) + $(INSTALL_LIB) man.h mandoc.h mandoc_aux.h mdoc.h \ + $(DESTDIR)$(INCLUDEDIR) + $(INSTALL_MAN) mandoc.1 demandoc.1 $(DESTDIR)$(MANDIR)/man1 + $(INSTALL_MAN) man.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_MAN).1 + $(INSTALL_MAN) mandoc.3 mandoc_escape.3 mandoc_malloc.3 \ + mchars_alloc.3 tbl.3 $(DESTDIR)$(MANDIR)/man3 + $(INSTALL_MAN) man.7 $(DESTDIR)$(MANDIR)/man7/${MANM_MAN}.7 + $(INSTALL_MAN) mdoc.7 $(DESTDIR)$(MANDIR)/man7/${MANM_MDOC}.7 + $(INSTALL_MAN) roff.7 $(DESTDIR)$(MANDIR)/man7/${MANM_ROFF}.7 + $(INSTALL_MAN) eqn.7 $(DESTDIR)$(MANDIR)/man7/${MANM_EQN}.7 + $(INSTALL_MAN) tbl.7 $(DESTDIR)$(MANDIR)/man7/${MANM_TBL}.7 + $(INSTALL_MAN) mandoc_char.7 $(DESTDIR)$(MANDIR)/man7 + $(INSTALL_DATA) example.style.css $(DESTDIR)$(EXAMPLEDIR) + +db-install: base-build + mkdir -p $(DESTDIR)$(BINDIR) + mkdir -p $(DESTDIR)$(SBINDIR) + mkdir -p $(DESTDIR)$(MANDIR)/man1 + mkdir -p $(DESTDIR)$(MANDIR)/man3 + mkdir -p $(DESTDIR)$(MANDIR)/man5 + mkdir -p $(DESTDIR)$(MANDIR)/man8 + ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_APROPOS) + ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_WHATIS) + ln -f $(DESTDIR)$(BINDIR)/mandoc \ + $(DESTDIR)$(SBINDIR)/$(BINM_MAKEWHATIS) + $(INSTALL_MAN) apropos.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 + ln -f $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 \ + $(DESTDIR)$(MANDIR)/man1/$(BINM_WHATIS).1 + $(INSTALL_MAN) mansearch.3 $(DESTDIR)$(MANDIR)/man3 + $(INSTALL_MAN) mandoc.db.5 $(DESTDIR)$(MANDIR)/man5 + $(INSTALL_MAN) makewhatis.8 \ + $(DESTDIR)$(MANDIR)/man8/$(BINM_MAKEWHATIS).8 + +cgi-install: cgi-build + mkdir -p $(DESTDIR)$(CGIBINDIR) + mkdir -p $(DESTDIR)$(HTDOCDIR) + mkdir -p $(DESTDIR)$(WWWPREFIX)/man/mandoc/man1 + mkdir -p $(DESTDIR)$(WWWPREFIX)/man/mandoc/man8 + $(INSTALL_PROGRAM) man.cgi $(DESTDIR)$(CGIBINDIR) + $(INSTALL_DATA) example.style.css $(DESTDIR)$(HTDOCDIR)/man.css + $(INSTALL_DATA) man-cgi.css $(DESTDIR)$(HTDOCDIR) + $(INSTALL_MAN) apropos.1 $(DESTDIR)$(WWWPREFIX)/man/mandoc/man1/ + $(INSTALL_MAN) man.cgi.8 $(DESTDIR)$(WWWPREFIX)/man/mandoc/man8/ + +Makefile.local config.h: configure ${TESTSRCS} + @echo "$@ is out of date; please run ./configure" + @exit 1 + +libmandoc.a: $(COMPAT_OBJS) $(LIBMANDOC_OBJS) + $(AR) rs $@ $(COMPAT_OBJS) $(LIBMANDOC_OBJS) + +mandoc: $(MAIN_OBJS) libmandoc.a + $(CC) $(LDFLAGS) -o $@ $(MAIN_OBJS) libmandoc.a $(DBLIB) + +manpage: $(MANPAGE_OBJS) libmandoc.a + $(CC) $(LDFLAGS) -o $@ $(MANPAGE_OBJS) libmandoc.a $(DBLIB) + +man.cgi: $(CGI_OBJS) libmandoc.a + $(CC) $(LDFLAGS) $(STATIC) -o $@ $(CGI_OBJS) libmandoc.a $(DBLIB) + +demandoc: $(DEMANDOC_OBJS) libmandoc.a + $(CC) $(LDFLAGS) -o $@ $(DEMANDOC_OBJS) libmandoc.a + +# --- maintainer targets --- + +www-install: www + mkdir -p $(HTDOCDIR)/snapshots + $(INSTALL_DATA) $(WWW_MANS) style.css $(HTDOCDIR) + $(INSTALL_DATA) $(WWW_OBJS) $(HTDOCDIR)/snapshots + $(INSTALL_DATA) mdocml.tar.gz \ + $(HTDOCDIR)/snapshots/mdocml-$(VERSION).tar.gz + $(INSTALL_DATA) mdocml.sha256 \ + $(HTDOCDIR)/snapshots/mdocml-$(VERSION).sha256 + +depend: config.h + mkdep -f Makefile.depend $(CFLAGS) $(SRCS) + perl -e 'undef $$/; $$_ = <>; s|/usr/include/\S+||g; \ + s|\\\n||g; s| +| |g; s| $$||mg; print;' \ + Makefile.depend > Makefile.tmp + mv Makefile.tmp Makefile.depend + +mdocml.sha256: mdocml.tar.gz + sha256 mdocml.tar.gz > $@ + +mdocml.tar.gz: $(DISTFILES) + mkdir -p .dist/mdocml-$(VERSION)/ + $(INSTALL) -m 0644 $(DISTFILES) .dist/mdocml-$(VERSION) + chmod 755 .dist/mdocml-$(VERSION)/configure + ( cd .dist/ && tar zcf ../$@ mdocml-$(VERSION) ) + rm -rf .dist/ + +# === SUFFIX RULES ===================================================== + +.SUFFIXES: .1 .3 .5 .7 .8 .h +.SUFFIXES: .1.html .3.html .5.html .7.html .8.html .h.html + +.h.h.html: + highlight -I $< > $@ + +.1.1.html .3.3.html .5.5.html .7.7.html .8.8.html: mandoc + ./mandoc -Thtml -Wall,stop \ + -Ostyle=style.css,man=%N.%S.html,includes=%I.html $< > $@ Copied: vendor/mdocml/20150302/Makefile.depend (from r279524, vendor/mdocml/dist/Makefile.depend) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/mdocml/20150302/Makefile.depend Mon Mar 2 16:49:45 2015 (r279526, copy of r279524, vendor/mdocml/dist/Makefile.depend) @@ -0,0 +1,74 @@ +att.o: att.c config.h mdoc.h libmdoc.h +cgi.o: cgi.c config.h mandoc.h mandoc_aux.h main.h manpath.h mansearch.h cgi.h +chars.o: chars.c config.h mandoc.h mandoc_aux.h libmandoc.h chars.in +compat_fgetln.o: compat_fgetln.c config.h +compat_fts.o: compat_fts.c config.h compat_fts.h +compat_getsubopt.o: compat_getsubopt.c config.h +compat_ohash.o: compat_ohash.c config.h compat_ohash.h +compat_reallocarray.o: compat_reallocarray.c config.h +compat_sqlite3_errstr.o: compat_sqlite3_errstr.c config.h +compat_strcasestr.o: compat_strcasestr.c config.h +compat_strlcat.o: compat_strlcat.c config.h +compat_strlcpy.o: compat_strlcpy.c config.h +compat_strsep.o: compat_strsep.c config.h +compat_strtonum.o: compat_strtonum.c config.h +demandoc.o: demandoc.c config.h man.h mdoc.h mandoc.h +eqn.o: eqn.c config.h mandoc.h mandoc_aux.h libmandoc.h libroff.h +eqn_html.o: eqn_html.c config.h mandoc.h out.h html.h +eqn_term.o: eqn_term.c config.h mandoc.h out.h term.h +html.o: html.c config.h mandoc.h mandoc_aux.h out.h html.h main.h +lib.o: lib.c config.h mdoc.h libmdoc.h lib.in +main.o: main.c config.h mandoc.h mandoc_aux.h main.h mdoc.h man.h manpath.h mansearch.h +man.o: man.c config.h man.h mandoc.h mandoc_aux.h libman.h libmandoc.h +man_hash.o: man_hash.c config.h man.h libman.h +man_html.o: man_html.c config.h mandoc_aux.h man.h out.h html.h main.h +man_macro.o: man_macro.c config.h man.h mandoc.h libmandoc.h libman.h +man_term.o: man_term.c config.h mandoc.h mandoc_aux.h out.h man.h term.h main.h +man_validate.o: man_validate.c config.h man.h mandoc.h mandoc_aux.h libman.h libmandoc.h +mandoc.o: mandoc.c config.h mandoc.h mandoc_aux.h libmandoc.h +mandoc_aux.o: mandoc_aux.c config.h mandoc.h mandoc_aux.h +mandocdb.o: mandocdb.c config.h compat_fts.h compat_ohash.h mdoc.h man.h mandoc.h mandoc_aux.h manpath.h mansearch.h +manpage.o: manpage.c config.h manpath.h mansearch.h +manpath.o: manpath.c config.h mandoc_aux.h manpath.h +mansearch.o: mansearch.c config.h compat_ohash.h mandoc.h mandoc_aux.h manpath.h mansearch.h +mansearch_const.o: mansearch_const.c config.h mansearch.h +mdoc.o: mdoc.c config.h mdoc.h mandoc.h mandoc_aux.h libmdoc.h libmandoc.h +mdoc_argv.o: mdoc_argv.c config.h mdoc.h mandoc.h mandoc_aux.h libmdoc.h libmandoc.h +mdoc_hash.o: mdoc_hash.c config.h mdoc.h libmdoc.h +mdoc_html.o: mdoc_html.c config.h mandoc_aux.h mdoc.h out.h html.h main.h +mdoc_macro.o: mdoc_macro.c config.h mdoc.h mandoc.h libmdoc.h libmandoc.h +mdoc_man.o: mdoc_man.c config.h mandoc.h mandoc_aux.h out.h man.h mdoc.h main.h +mdoc_term.o: mdoc_term.c config.h mandoc.h mandoc_aux.h out.h term.h mdoc.h main.h +mdoc_validate.o: mdoc_validate.c config.h mdoc.h mandoc.h mandoc_aux.h libmdoc.h libmandoc.h +msec.o: msec.c config.h mandoc.h libmandoc.h msec.in +out.o: out.c config.h mandoc_aux.h mandoc.h out.h +preconv.o: preconv.c config.h mandoc.h libmandoc.h +read.o: read.c config.h mandoc.h mandoc_aux.h libmandoc.h mdoc.h man.h +roff.o: roff.c config.h mandoc.h mandoc_aux.h libmandoc.h libroff.h predefs.in +st.o: st.c config.h mdoc.h libmdoc.h st.in +tbl.o: tbl.c config.h mandoc.h mandoc_aux.h libmandoc.h libroff.h +tbl_data.o: tbl_data.c config.h mandoc.h mandoc_aux.h libmandoc.h libroff.h +tbl_html.o: tbl_html.c config.h mandoc.h out.h html.h +tbl_layout.o: tbl_layout.c config.h mandoc.h mandoc_aux.h libmandoc.h libroff.h +tbl_opts.o: tbl_opts.c config.h mandoc.h libmandoc.h libroff.h +tbl_term.o: tbl_term.c config.h mandoc.h out.h term.h +term.o: term.c config.h mandoc.h mandoc_aux.h out.h term.h main.h +term_ascii.o: term_ascii.c config.h mandoc.h mandoc_aux.h out.h term.h main.h +term_ps.o: term_ps.c config.h mandoc_aux.h out.h term.h main.h +tree.o: tree.c config.h mandoc.h mdoc.h man.h main.h +test-dirent-namlen.o: test-dirent-namlen.c +test-fgetln.o: test-fgetln.c +test-fts.o: test-fts.c +test-getsubopt.o: test-getsubopt.c +test-mmap.o: test-mmap.c +test-ohash.o: test-ohash.c +test-reallocarray.o: test-reallocarray.c +test-sqlite3.o: test-sqlite3.c +test-sqlite3_errstr.o: test-sqlite3_errstr.c +test-strcasestr.o: test-strcasestr.c +test-strlcat.o: test-strlcat.c +test-strlcpy.o: test-strlcpy.c +test-strptime.o: test-strptime.c +test-strsep.o: test-strsep.c +test-strtonum.o: test-strtonum.c +test-wchar.o: test-wchar.c Copied: vendor/mdocml/20150302/Makefile.local (from r279524, vendor/mdocml/dist/Makefile.local) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/mdocml/20150302/Makefile.local Mon Mar 2 16:49:45 2015 (r279526, copy of r279524, vendor/mdocml/dist/Makefile.local) @@ -0,0 +1,30 @@ +BUILD_TARGETS = base-build +INSTALL_TARGETS = base-install db-install +CFLAGS = -g -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings -I/usr/local/include +DBLIB = -L/usr/local/lib -lsqlite3 +STATIC = -static +PREFIX = /usr/local +BINDIR = /usr/local/bin +SBINDIR = /usr/local/sbin +INCLUDEDIR = /usr/local/include/mandoc +LIBDIR = /usr/local/lib/mandoc +MANDIR = /usr/local/man +EXAMPLEDIR = /usr/local/share/examples/mandoc +WWWPREFIX = /var/www +HTDOCDIR = /var/www/htdocs +CGIBINDIR = /var/www/cgi-bin +BINM_APROPOS = apropos +BINM_MAN = man +BINM_WHATIS = whatis +BINM_MAKEWHATIS = makewhatis +MANM_MAN = man +MANM_MDOC = mdoc +MANM_ROFF = roff +MANM_EQN = eqn +MANM_TBL = tbl +INSTALL = install +INSTALL_PROGRAM = install -m 0555 +INSTALL_LIB = install -m 0444 +INSTALL_MAN = install -m 0444 +INSTALL_DATA = install -m 0444 +MAIN_OBJS = $(BASE_OBJS) $(DB_OBJS) Copied: vendor/mdocml/20150302/TODO (from r279524, vendor/mdocml/dist/TODO) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/mdocml/20150302/TODO Mon Mar 2 16:49:45 2015 (r279526, copy of r279524, vendor/mdocml/dist/TODO) @@ -0,0 +1,602 @@ +************************************************************************ +* Official mandoc TODO. +* $Id: TODO,v 1.201 2015/02/20 13:47:28 schwarze Exp $ +************************************************************************ + +Many issues are annotated for difficulty as follows: + + - loc = locality of the issue + * single file issue, affects file only, or very few + ** single module issue, affects several files of one module + *** cross-module issue, significantly impacts multiple modules + and may require substantial changes to internal interfaces + - exist = difficulty of the existing code in this area + * affected code is straightforward and easy to read and change + ** affected code is somewhat complex, but once you understand + the design, not particularly difficult to understand + *** affected code uses a special, exceptionally tricky design + - algo = difficulty of the new algorithm to be written + * the required logic and code is straightforward + ** the required logic is somewhat complex and needs a careful design + *** the required logic is exceptionally tricky, + maybe an approach to solve that is not even known yet + - size = the amount of code to be written or changed + * a small number of lines (at most 100, usually much less) + ** a considerable amount of code (several dozen to a few hundred) + *** a large amount of code (many hundreds, maybe thousands) + - imp = importance of the issue + * mostly for completeness + ** would be nice to have + *** issue causes considerable inconvenience + +Obviously, as the issues have not been solved yet, these annotations +are mere guesses, and some may be wrong. + +************************************************************************ +* crashes +************************************************************************ + +- The abort() in bufcat(), html.c, can be triggered via buffmt_includes() + by running -Thtml -Oincludes on a file containing a long .In argument. + Fixing this will probably require reworking the whole bufcat() concept. + loc ** exist * algo * size ** imp ** + +************************************************************************ +* missing features +************************************************************************ + +--- missing roff features ---------------------------------------------- + +- .ad (adjust margins) + .ad l -- adjust left margin only (flush left) + .ad r -- adjust right margin only (flush right) + .ad c -- center text on line + .ad b -- adjust both margins (alias: .ad n) + .na -- temporarily disable adjustment without changing the mode + .ad -- re-enable adjustment without changing the mode + Adjustment mode is ignored while in no-fill mode (.nf). + loc *** exist *** algo ** size ** imp ** (parser reorg would help) + +- .fc (field control) + found by naddy@ in xloadimage(1) + loc ** exist *** algo * size * imp * + +- .nr third argument (auto-increment step size, requires \n+) + found by bentley@ in sbcl(1) Mon, 9 Dec 2013 18:36:57 -0700 + loc * exist * algo * size * imp ** + +- .ns (no-space mode) occurs in xine-config(1) + reported by brad@ Sat, 15 Jan 2011 15:45:23 -0500 + loc *** exist *** algo *** size ** imp * + +- .ta (tab settings) + #1 most important issue naddy@ Mon, 16 Feb 2015 20:59:17 +0100 + ircbug(1) gnats(1) reported by brad@ Sat, 15 Jan 2011 15:50:51 -0500 + also Tcl_NewStringObj(3) via wiz@ Wed, 5 Mar 2014 22:27:43 +0100 + also posix2time(3) Carsten Kunze Mon, 1 Dec 2014 13:03:10 +0100 + loc ** exist *** algo ** size ** imp *** + +- .ti (temporary indent) + found by naddy@ in xloadimage(1) [devel/libvstr] vstr(3) + found by bentley@ in nmh(1) Mon, 23 Apr 2012 13:38:28 -0600 + loc ** exist ** algo ** size * imp ** (parser reorg helps a lot) + +- .while and .shift + found by jca@ in ratpoison(1) Sun, 30 Jun 2013 12:01:09 +0200 + loc * exist ** algo ** size ** imp ** + +- \h horizontal move + #2 most important issue naddy@ Mon, 16 Feb 2015 20:59:17 +0100 + found in cclive(1) nasm(1) bogofilter(1) asciidoc/DocBook output + bentley@ on discuss@ Sat, 21 Sep 2013 22:29:34 -0600 + naddy@ Thu, 4 Dec 2014 16:26:41 +0100 + loc ** exist ** algo ** size * imp *** (parser reorg helps a lot) + +- \n+ and \n- numerical register increment and decrement + found by bentley@ in sbcl(1) Mon, 9 Dec 2013 18:36:57 -0700 + loc * exist * algo * size * imp ** + +- \n(.$ macro argument count number register; ocserv(8) by autogen + found by sthen@ Thu, 19 Feb 2015 22:03:01 +0000 + loc * exist ** algo * size * imp ** + +- \w'' improve width measurements + would not be very useful without an expression parser, see below + needed for Tcl_NewStringObj(3) via wiz@ Wed, 5 Mar 2014 22:27:43 +0100 + loc ** exist *** algo *** size * imp *** + +- using undefined strings or macros defines them to be empty + wl@ Mon, 14 Nov 2011 14:37:01 +0000 + loc * exist * algo * size * imp * + +--- missing mdoc features ---------------------------------------------- + +- .Bl -column .Xo support is missing + ultimate goal: + restore .Xr and .Dv to + lib/libc/compat-43/sigvec.3 + lib/libc/gen/signal.3 + lib/libc/sys/sigaction.2 + loc * exist *** algo *** size * imp ** + +- edge case: decide how to deal with blk_full bad nesting, e.g. + .Sh .Nm .Bk .Nm .Ek .Sh found by jmc@ in ssh-keygen(1) + from jmc@ Wed, 14 Jul 2010 18:10:32 +0100 + loc * exist *** algo *** size ** imp ** + +- .Bd -centered implies -filled, not -unfilled, which is not + easy to implement; it requires code similar to .ce, which + we don't have either. + Besides, groff has bug causing text right *before* .Bd -centered + to be centered as well. + loc *** exist *** algo ** size ** imp ** (parser reorg would help) + +- .Bd -filled should not be the same as .Bd -ragged, but align both + the left and right margin. In groff, it is implemented in terms + of .ad b, which we don't have either. Found in cksum(1). + loc *** exist *** algo ** size ** imp ** (parser reorg would help) + +- implement blank `Bl -column', such as + .Bl -column + .It foo Ta bar + .El + loc * exist *** algo *** size * imp * + +- explicitly disallow nested `Bl -column', which would clobber internal + flags defined for struct mdoc_macro + loc * exist * algo * size * imp ** + +- In .Bl -column .It, the end of the line probably has to be regarded + as an implicit .Ta, if there could be one, see the following mildly + ugly code from login.conf(5): + .Bl -column minpasswordlen program xetcxmotd + .It path Ta path Ta value of Dv _PATH_DEFPATH + .br + Default search path. + reported by Michal Mazurek + via jmc@ Thu, 7 Apr 2011 16:00:53 +0059 + loc * exist *** algo ** size * imp ** + +- inside `.Bl -column' phrases, punctuation is handled like normal + text, e.g. `.Bl -column .It Fl x . Ta ...' should give "-x -." + +- inside `.Bl -column' phrases, TERMP_IGNDELIM handling by `Pf' + is not safe, e.g. `.Bl -column .It Pf a b .' gives "ab." + but should give "ab ." + +- check whether it is correct that `D1' uses INDENT+1; + does it need its own constant? + loc * exist ** algo ** size * imp ** + +- prohibit `Nm' from having non-text HEAD children + (e.g., NetBSD mDNSShared/dns-sd.1) + (mdoc_html.c and mdoc_term.c `Nm' handlers can be slightly simplified) + +- support translated section names + e.g. x11/scrotwm scrotwm_es.1:21:2: error: NAME section must be first + that one uses NOMBRE because it is spanish... + deraadt tends to think that section-dependent macro behaviour + is a bad idea in the first place, so this may be irrelevant + loc ** exist ** algo ** size * imp ** + +- When there is free text in the SYNOPSIS and that free text contains + the .Nm macro, groff somehow understands to treat the .Nm as an in-line + macro, while mandoc treats it as a block macro and breaks the line. + No idea how the logic for distinguishing in-line and block instances + should be, needs investigation. + uqs@ Thu, 2 Jun 2011 11:03:51 +0200 + uqs@ Thu, 2 Jun 2011 11:33:35 +0200 + loc * exist ** algo *** size * imp ** + +--- missing man features ----------------------------------------------- + +- -T[x]html doesn't stipulate non-collapsing spaces in literal mode + +--- missing tbl features ----------------------------------------------- + +- look at the POSIX manuals in the books/man-pages-posix port, + they use some unsupported tbl(7) features. + loc * exist ** algo ** size ** imp *** + +- use Unicode U+2500 to U+256C for table borders + in tbl(7) -Tutf-8 output + suggested by bentley@ Tue, 14 Oct 2014 04:10:55 -0600 + loc * exist ** algo * size * imp ** + +- allow standalone `.' to be interpreted as an end-of-layout + delimiter instead of being thrown away as a no-op roff line + reported by Yuri Pankov, Wed 18 May 2011 11:34:59 CEST + loc ** exist ** algo ** size * imp ** + +--- missing eqn features ----------------------------------------------- + +- The "size" keyword is parsed, but ignored by the formatter. + loc * exist * algo * size * imp * + +- The spacing characters `~', `^', and tab are currently ignored, + see User's Guide (Second Edition) page 2 section 4. + loc * exist * algo ** size * imp ** + +- Mark and lineup are parsed and ignored, + see User's Guide (Second Edition) page 5 section 15. + loc ** exist ** algo ** size ** imp ** + +--- missing misc features ---------------------------------------------- + +- italic correction (\/) in PostScript mode + Werner LEMBERG on groff at gnu dot org Sun, 10 Nov 2013 12:47:46 + loc ** exist ** algo * size * imp * + +- When makewhatis(8) encounters a FATAL parse error, + it silently treats the file as formatted, which makes no sense + at all for paths like man1/foo.1 - and which also contradicts + what the manual says at the end of the description. + The end result will be ENOENT for file names returned + by mansearch() in manpage.file. + loc * exist * algo * size * imp ** + +- makewhatis(8) for preformatted pages: + parse the section number from the header line + and compare to the section number from the directory name + loc * exist * algo * size * imp ** + +- Does makewhatis(8) detect missing NAME sections, missing names, + and missing descriptions in all the file formats? + loc * exist * algo * size * imp *** + +- clean up escape sequence handling, creating three classes: + (1) fully implemented, or parsed and ignored without loss of content + (2) unimplemented, potentially causing loss of content + or serious mangling of formatting (e.g. \n) -> ERROR + see textproc/mgdiff(1) for nice examples + (3) undefined, just output the character -> perhaps WARNING + loc *** exist ** algo ** size ** imp *** (parser reorg helps) + +- kettenis wants base roff, ms, and me Fri, 1 Jan 2010 22:13:15 +0100 (CET) + loc ** exist ** algo ** size *** imp * + +--- compatibility checks ----------------------------------------------- + +- write a configure check for [[:<:]] support and provide some + fallback for whatis(1) when it doesn't work; + Svyatoslav Mishyn Wed, 17 Dec 2014 11:07:10 +0200 + +- is .Bk implemented correctly in modern groff? + sobrado@ Tue, 19 Apr 2011 22:12:55 +0200 + +- compare output to Heirloom roff, Solaris roff, and + http://repo.or.cz/w/neatroff.git http://litcave.rudi.ir/ + +- look at AT&T DWB http://www2.research.att.com/sw/download + Carsten Kunze has patches + Mon, 4 Aug 2014 17:01:28 +0200 + +- look at pages generated from reStructeredText, e.g. devel/mercurial hg(1) + These are a weird mixture of man(7) and custom autogenerated low-level + roff stuff. Figure out to what extent we can cope. + For details, see http://docutils.sourceforge.net/rst.html + noted by stsp@ Sat, 24 Apr 2010 09:17:55 +0200 + reminded by nicm@ Mon, 3 May 2010 09:52:41 +0100 + +- look at pages generated from ronn(1) github.com/rtomayko/ronn + (based on markdown) + +- look at pages generated from Texinfo source by yat2m, e.g. security/gnupg + First impression is not that bad. + +- look at pages generated by pandoc; see + https://github.com/jgm/pandoc/blob/master/src/Text/Pandoc/Writers/Man.hs + porting planned by kili@ Thu, 19 Jun 2014 19:46:28 +0200 + +- check compatibility with Plan9: + http://swtch.com/usr/local/plan9/tmac/tmac.an + http://swtch.com/plan9port/man/man7/man.html + "Anthony J. Bentley" 28 Dec 2010 21:58:40 -0700 + +- check compatibility with the man(7) formatter + https://raw.githubusercontent.com/rofl0r/hardcore-utils/master/man.c + +- check compatibility with + http://ikiwiki.info/plugins/contrib/mandoc/ + https://github.com/schmonz/ikiwiki/compare/mandoc + Amitai Schlair Mon, 19 May 2014 14:05:53 -0400 + +************************************************************************ +* formatting issues: ugly output +************************************************************************ + +- revisit empty in-line macros + look at the difference between "Em x Em ." and "Sq x Em ." + Carsten Kunze Fri, 12 Dec 2014 00:15:41 +0100 + loc *** exist *** algo *** size * imp ** + +- a column list with blank `Ta' cells triggers a spurious + start-with-whitespace printing of a newline + +- In .Bl -column, .It a"bc" + shows the quotes in groff, but not in mandoc + loc * exist *** algo ** size * imp ** + +- In .Bl -column, + .It Em AuthenticationKey Length + ought to render "Key Length" with emphasis, too, + see OpenBSD iked.conf(5). + reported again Nicolas Joly via wiz@ Wed, 12 Oct 2011 00:20:00 +0200 + loc * exist *** algo *** size ** imp *** + +- empty phrases in .Bl column produce too few blanks + try e.g. .Bl -column It Ta Ta + reported by millert Fri, 02 Apr 2010 16:13:46 -0400 + loc * exist *** algo *** size * imp ** + +- .%T can have trailing punctuation. Currently, it puts the trailing + punctuation into a trailing MDOC_TEXT element inside its own scope. + That element should rather be outside its scope, such that the + punctuation does not get underlines. This is not trivial to + implement because .%T then needs some features of in_line_eoln() - + slurp all arguments into one single text element - and one feature + of in_line() - put trailing punctuation out of scope. + Found in mount_nfs(8) and exports(5), search for "Appendix". + loc ** exist ** algo *** size * imp ** + +- Trailing punctuation after .%T triggers EOS spacing, at least + outside .Rs (eek!). Simply setting ARGSFL_DELIM for .%T is not + the right solution, it sends mandoc into an endless loop. + reported by Nicolas Joly Sat, 17 Nov 2012 11:49:54 +0100 + loc * exist ** algo ** size * imp ** + +- global variables in the SYNOPSIS of section 3 pages + .Vt vs .Vt/.Va vs .Ft/.Va vs .Ft/.Fa ... + from kristaps@ Tue, 08 Jun 2010 11:13:32 +0200 + +- in enclosures, mandoc sometimes fancies a bogus end of sentence + reminded by jmc@ Thu, 23 Sep 2010 18:13:39 +0059 + loc * exist ** algo *** size * imp *** + +- a line starting with "\fB something" counts as starting with whitespace + and triggers a line break; found in audio/normalize-mp3(1) + loc ** exist * algo ** size * imp ** + +- formatting /usr/local/man/man1/latex2man.1 with groff and mandoc + reveals lots of bugs both in groff and mandoc... + reported by bentley@ Wed, 22 May 2013 23:49:30 -0600 + +--- PDF issues --------------------------------------------------------- + +- PDF output doesn't use a monospaced font for .Bd -literal + Example: "mandoc -Tpdf afterboot.8 > output.pdf && pdfviewer output.pdf". + Search the text "Routing tables". + Also check what PostScript mode does when fixing this. + reported by juanfra@ Wed, 04 Jun 2014 21:44:58 +0200 + instructions from juanfra@ Wed, 11 Jun 2014 02:21:01 +0200 + add a new <> block to the PDF files with /BaseFont /Courier + and change the /Name from /F0 to the new font (/F5 (?)). + loc * exist ** algo ** size * imp ** + +--- HTML issues -------------------------------------------------------- + +-
formatting is ugly + hints are easy to find on the web, e.g. + http://stackoverflow.com/questions/1713048/ + see also matthew@ Fri, 18 Jul 2014 19:25:12 -0700 + loc * exist * algo ** size * imp *** + +- jsg on icb, Nov 3, 2014: + try to guess Xr in man(7) for hyperlinking + +- The tables used to render the three-part page headers actually force + the width of the to the max-width given for . + Not yet sure how to fix that... + Observed by an Anonymous Coward on undeadly.org: + http://undeadly.org/cgi?action=article&sid=20140925064244&pid=1 + loc * exist * algo ** size * imp *** + +- consider whether can be used for Ar Dv Er Ev Fa Va. + from bentley@ Wed, 13 Aug 2014 09:17:55 -0600 + +- check https://github.com/trentm/mdocml + +************************************************************************ +* formatting issues: gratuitous differences +************************************************************************ + +- .Fn reopens a new scope after punctuation in mandoc, + but closes its scope for good in groff. + Do we want to change mandoc or groff? + Steffen Nurpmeso Sat, 08 Nov 2014 13:34:59 +0100 + loc * exist ** algo ** size * imp ** + +- In .Bl -enum -width 0n, groff continues one the same line after + the number, mandoc breaks the line. + mail to kristaps@ Mon, 20 Jul 2009 02:21:39 +0200 + loc * exist ** algo ** size * imp ** + +- .Pp between two .It in .Bl -column should produce one, + not two blank lines, see e.g. login.conf(5). *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@FreeBSD.ORG Mon Mar 2 21:35:35 2015 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B9389CA2; Mon, 2 Mar 2015 21:35:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A184DAB7; Mon, 2 Mar 2015 21:35:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t22LZZOe014847; Mon, 2 Mar 2015 21:35:35 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t22LZWo1014824; Mon, 2 Mar 2015 21:35:32 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201503022135.t22LZWo1014824@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 2 Mar 2015 21:35:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r279546 - in vendor/libucl/dist: . cmake doc include klib m4 src tests tests/basic uthash X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2015 21:35:35 -0000 Author: bapt Date: Mon Mar 2 21:35:31 2015 New Revision: 279546 URL: https://svnweb.freebsd.org/changeset/base/279546 Log: Update libucl to git version 8d3b186 Added: vendor/libucl/dist/klib/ vendor/libucl/dist/klib/khash.h (contents, props changed) vendor/libucl/dist/klib/kvec.h (contents, props changed) vendor/libucl/dist/tests/basic/14.in (contents, props changed) vendor/libucl/dist/tests/basic/14.res Deleted: vendor/libucl/dist/m4/ Modified: vendor/libucl/dist/ChangeLog.md vendor/libucl/dist/Makefile.am vendor/libucl/dist/README.md vendor/libucl/dist/cmake/CMakeLists.txt vendor/libucl/dist/configure.ac vendor/libucl/dist/doc/Makefile.am vendor/libucl/dist/doc/api.md vendor/libucl/dist/doc/libucl.3 vendor/libucl/dist/doc/pandoc.template vendor/libucl/dist/include/ucl.h vendor/libucl/dist/src/Makefile.am vendor/libucl/dist/src/ucl_emitter.c vendor/libucl/dist/src/ucl_emitter_utils.c vendor/libucl/dist/src/ucl_hash.c vendor/libucl/dist/src/ucl_hash.h vendor/libucl/dist/src/ucl_internal.h vendor/libucl/dist/src/ucl_parser.c vendor/libucl/dist/src/ucl_schema.c vendor/libucl/dist/src/ucl_util.c vendor/libucl/dist/tests/schema.test vendor/libucl/dist/tests/test_generate.c vendor/libucl/dist/tests/test_schema.c vendor/libucl/dist/uthash/utstring.h Modified: vendor/libucl/dist/ChangeLog.md ============================================================================== --- vendor/libucl/dist/ChangeLog.md Mon Mar 2 21:00:54 2015 (r279545) +++ vendor/libucl/dist/ChangeLog.md Mon Mar 2 21:35:31 2015 (r279546) @@ -20,3 +20,15 @@ ### Libucl 0.6.1 - Various utilities fixes + +### Libucl 0.7.0 + +- Move to klib library from uthash to reduce memory overhead and increase performance + +### Libucl 0.7.1 + +- Added safe iterators API + +### Libucl 0.7.2 + +- Fixed serious bugs in schema and arrays iteration Modified: vendor/libucl/dist/Makefile.am ============================================================================== --- vendor/libucl/dist/Makefile.am Mon Mar 2 21:00:54 2015 (r279545) +++ vendor/libucl/dist/Makefile.am Mon Mar 2 21:35:31 2015 (r279546) @@ -1,5 +1,5 @@ ACLOCAL_AMFLAGS = -I m4 -EXTRA_DIST = uthash README.md +EXTRA_DIST = uthash klib README.md pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libucl.pc Modified: vendor/libucl/dist/README.md ============================================================================== --- vendor/libucl/dist/README.md Mon Mar 2 21:00:54 2015 (r279545) +++ vendor/libucl/dist/README.md Mon Mar 2 21:35:31 2015 (r279546) @@ -1,6 +1,6 @@ # LIBUCL -[![Build Status](https://travis-ci.org/vstakhov/libucl.svg?branch=master)](https://travis-ci.org/vstakhov/libucl) +[![Build Status](https://travis-ci.org/vstakhov/libucl.svg?branch=master)](https://travis-ci.org/vstakhov/libucl)[![Coverity](https://scan.coverity.com/projects/4138/badge.svg)](https://scan.coverity.com/projects/4138) **Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)* @@ -156,10 +156,10 @@ is converted to the following object: ```nginx section { blah { - key = value; + key = value; } foo { - key = value; + key = value; } } ``` @@ -177,9 +177,9 @@ is presented as: ```nginx section { blah { - foo { - key = value; - } + foo { + key = value; + } } } ``` @@ -219,8 +219,8 @@ UCL supports external macros both multil ```nginx .macro "sometext"; .macro { - Some long text - .... + Some long text + .... }; ``` Modified: vendor/libucl/dist/cmake/CMakeLists.txt ============================================================================== --- vendor/libucl/dist/cmake/CMakeLists.txt Mon Mar 2 21:00:54 2015 (r279545) +++ vendor/libucl/dist/cmake/CMakeLists.txt Mon Mar 2 21:35:31 2015 (r279546) @@ -82,6 +82,7 @@ ENDIF(ENABLE_URL_SIGN MATCHES "ON") INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}/../src") INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}/../include") INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}/../uthash") +INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}/../klib") SET(UCLSRC ../src/ucl_util.c ../src/ucl_parser.c Modified: vendor/libucl/dist/configure.ac ============================================================================== --- vendor/libucl/dist/configure.ac Mon Mar 2 21:00:54 2015 (r279545) +++ vendor/libucl/dist/configure.ac Mon Mar 2 21:35:31 2015 (r279546) @@ -1,7 +1,7 @@ m4_define([maj_ver], [0]) -m4_define([med_ver], [6]) -m4_define([min_ver], [1]) -m4_define([so_version], [3:0:1]) +m4_define([med_ver], [7]) +m4_define([min_ver], [2]) +m4_define([so_version], [5:0:1]) m4_define([ucl_version], [maj_ver.med_ver.min_ver]) AC_INIT([libucl],[ucl_version],[https://github.com/vstakhov/libucl],[libucl]) Modified: vendor/libucl/dist/doc/Makefile.am ============================================================================== --- vendor/libucl/dist/doc/Makefile.am Mon Mar 2 21:00:54 2015 (r279545) +++ vendor/libucl/dist/doc/Makefile.am Mon Mar 2 21:35:31 2015 (r279546) @@ -4,5 +4,6 @@ dist_man_MANS = libucl.3 gen-man: @PANDOC@ tail -n +$$(grep -n '# Synopsis' api.md | cut -d':' -f1) api.md | \ - cat pandoc.template - | sed -e 's/^# \(.*\)/# \U\1/' | \ + cat pandoc.template - | sed -e 's/^# \(.*\)/# \U\1/' \ + -e "s/%%date%%/$$(LANG=C date +'%d %B, %Y')/" | \ @PANDOC@ -s -f markdown -t man -o libucl.3 \ No newline at end of file Modified: vendor/libucl/dist/doc/api.md ============================================================================== --- vendor/libucl/dist/doc/api.md Mon Mar 2 21:00:54 2015 (r279545) +++ vendor/libucl/dist/doc/api.md Mon Mar 2 21:35:31 2015 (r279546) @@ -377,7 +377,9 @@ If parsing operations fail then the resu # Iteration functions -Iteration are used to iterate over UCL compound types: arrays and objects. Moreover, iterations could be performed over the keys with multiple values (implicit arrays). To iterate over an object, an array or a key with multiple values there is a function `ucl_iterate_object`. +Iteration are used to iterate over UCL compound types: arrays and objects. Moreover, iterations could be performed over the keys with multiple values (implicit arrays). +There are two types of iterators API: old and unsafe one via `ucl_iterate_object` and the proposed interface of safe iterators. + ## ucl_iterate_object ~~~C @@ -402,6 +404,60 @@ while ((obj = ucl_iterate_object (top, & } ~~~ +## Safe iterators API + +Safe iterators are defined to clarify iterating over UCL objects and simplify flattening of UCL objects in non-trivial cases. +For example, if there is an implicit array that contains another array and a boolean value it is extremely unclear how to iterate over +such an object. Safe iterators are desinged to define two sorts of iteration: + +1. Iteration over complex objects with expanding all values +2. Iteration over complex objects without expanding of values + +The following example demonstrates the difference between these two types of iteration: + +~~~ +key = 1; +key = [2, 3, 4]; + +Iteration with expansion: + +1, 2, 3, 4 + +Iteration without expansion: + +1, [2, 3, 4] +~~~ + +UCL defines the following functions to manage safe iterators: + +- `ucl_object_iterate_new` - creates new safe iterator +- `ucl_object_iterate_reset` - resets iterator to a new object +- `ucl_object_iterate_safe` - safely iterate the object inside iterator +- `ucl_object_iterate_free` - free memory associated with the safe iterator + +Please note that unlike unsafe iterators, safe iterators *must* be explicitly initialized and freed. +An assert is likely generated if you use uninitialized or `NULL` iterator in all safe iterators functions. + +~~~C +ucl_object_iter_t it; +const ucl_object_t *cur; + +it = ucl_object_iterate_new (obj); + +while ((cur = ucl_object_iterate_safe (it, true)) != NULL) { + /* Do something */ +} + +/* Switch to another object */ +it = ucl_object_iterate_reset (it, another_obj); + +while ((cur = ucl_object_iterate_safe (it, true)) != NULL) { + /* Do something else */ +} + +ucl_object_iterate_free (it); +~~~ + # Validation functions Currently, there is only one validation function called `ucl_object_validate`. It performs validation of object using the specified schema. This function is defined as following: Modified: vendor/libucl/dist/doc/libucl.3 ============================================================================== --- vendor/libucl/dist/doc/libucl.3 Mon Mar 2 21:00:54 2015 (r279545) +++ vendor/libucl/dist/doc/libucl.3 Mon Mar 2 21:35:31 2015 (r279546) @@ -1,4 +1,4 @@ -.TH "LIBUCL" "3" "July 26, 2014" "Libucl manual" "" +.TH "LIBUCL" "3" "27 December, 2014" "Libucl manual" "" .SH NAME .PP \f[B]ucl_parser_new\f[], \f[B]ucl_parser_register_macro\f[], @@ -528,8 +528,9 @@ Iteration are used to iterate over UCL c objects. Moreover, iterations could be performed over the keys with multiple values (implicit arrays). -To iterate over an object, an array or a key with multiple values there -is a function \f[C]ucl_iterate_object\f[]. +There are two types of iterators API: old and unsafe one via +\f[C]ucl_iterate_object\f[] and the proposed interface of safe +iterators. .SS ucl_iterate_object .IP .nf @@ -578,6 +579,75 @@ while\ ((obj\ =\ ucl_iterate_object\ (to } \f[] .fi +.SS Safe iterators API +.PP +Safe iterators are defined to clarify iterating over UCL objects and +simplify flattening of UCL objects in non\-trivial cases. +For example, if there is an implicit array that contains another array +and a boolean value it is extremely unclear how to iterate over such an +object. +Safe iterators are desinged to define two sorts of iteration: +.IP "1." 3 +Iteration over complex objects with expanding all values +.IP "2." 3 +Iteration over complex objects without expanding of values +.PP +The following example demonstrates the difference between these two +types of iteration: +.IP +.nf +\f[C] +key\ =\ 1; +key\ =\ [2,\ 3,\ 4]; + +Iteration\ with\ expansion: + +1,\ 2,\ 3,\ 4 + +Iteration\ without\ expansion: + +1,\ [2,\ 3,\ 4] +\f[] +.fi +.PP +UCL defines the following functions to manage safe iterators: +.IP \[bu] 2 +\f[C]ucl_object_iterate_new\f[] \- creates new safe iterator +.IP \[bu] 2 +\f[C]ucl_object_iterate_reset\f[] \- resets iterator to a new object +.IP \[bu] 2 +\f[C]ucl_object_iterate_safe\f[] \- safely iterate the object inside +iterator +.IP \[bu] 2 +\f[C]ucl_object_iterate_free\f[] \- free memory associated with the safe +iterator +.PP +Please note that unlike unsafe iterators, safe iterators \f[I]must\f[] +be explicitly initialized and freed. +An assert is likely generated if you use uninitialized or \f[C]NULL\f[] +iterator in all safe iterators functions. +.IP +.nf +\f[C] +ucl_object_iter_t\ it; +const\ ucl_object_t\ *cur; + +it\ =\ ucl_object_iterate_new\ (obj); + +while\ ((cur\ =\ ucl_object_iterate_safe\ (it,\ true))\ !=\ NULL)\ { +\ \ \ \ /*\ Do\ something\ */ +} + +/*\ Switch\ to\ another\ object\ */ +it\ =\ ucl_object_iterate_reset\ (it,\ another_obj); + +while\ ((cur\ =\ ucl_object_iterate_safe\ (it,\ true))\ !=\ NULL)\ { +\ \ \ \ /*\ Do\ something\ else\ */ +} + +ucl_object_iterate_free\ (it); +\f[] +.fi .SH VALIDATION FUNCTIONS .PP Currently, there is only one validation function called Modified: vendor/libucl/dist/doc/pandoc.template ============================================================================== --- vendor/libucl/dist/doc/pandoc.template Mon Mar 2 21:00:54 2015 (r279545) +++ vendor/libucl/dist/doc/pandoc.template Mon Mar 2 21:35:31 2015 (r279546) @@ -1,6 +1,6 @@ % LIBUCL(3) Libucl manual % Vsevolod Stakhov -% July 26, 2014 +% %%date%% # Name Modified: vendor/libucl/dist/include/ucl.h ============================================================================== --- vendor/libucl/dist/include/ucl.h Mon Mar 2 21:00:54 2015 (r279545) +++ vendor/libucl/dist/include/ucl.h Mon Mar 2 21:35:31 2015 (r279546) @@ -192,7 +192,7 @@ typedef struct ucl_object_s { int64_t iv; /**< Int value of an object */ const char *sv; /**< String value of an object */ double dv; /**< Double value of an object */ - struct ucl_object_s *av; /**< Array */ + void *av; /**< Array */ void *ov; /**< Object */ void* ud; /**< Opaque user data */ } value; @@ -715,6 +715,37 @@ typedef void* ucl_object_iter_t; */ UCL_EXTERN const ucl_object_t* ucl_iterate_object (const ucl_object_t *obj, ucl_object_iter_t *iter, bool expand_values); + +/** + * Create new safe iterator for the specified object + * @param obj object to iterate + * @return new iterator object that should be used with safe iterators API only + */ +UCL_EXTERN ucl_object_iter_t ucl_object_iterate_new (const ucl_object_t *obj) + UCL_WARN_UNUSED_RESULT; +/** + * Reset initialized iterator to a new object + * @param obj new object to iterate + * @return modified iterator object + */ +UCL_EXTERN ucl_object_iter_t ucl_object_iterate_reset (ucl_object_iter_t it, + const ucl_object_t *obj); + +/** + * Get the next object from the `obj`. This fucntion iterates over arrays, objects + * and implicit arrays + * @param iter safe iterator + * @return the next object in sequence + */ +UCL_EXTERN const ucl_object_t* ucl_object_iterate_safe (ucl_object_iter_t iter, + bool expand_values); + +/** + * Free memory associated with the safe iterator + * @param it safe iterator object + */ +UCL_EXTERN void ucl_object_iterate_free (ucl_object_iter_t it); + /** @} */ @@ -854,6 +885,13 @@ UCL_EXTERN ucl_object_t* ucl_parser_get_ * @param parser parser object */ UCL_EXTERN const char *ucl_parser_get_error(struct ucl_parser *parser); + +/** + * Clear the error in the parser + * @param parser parser object + */ +UCL_EXTERN void ucl_parser_clear_error(struct ucl_parser *parser); + /** * Free ucl parser object * @param parser parser object Added: vendor/libucl/dist/klib/khash.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libucl/dist/klib/khash.h Mon Mar 2 21:35:31 2015 (r279546) @@ -0,0 +1,627 @@ +/* The MIT License + + Copyright (c) 2008, 2009, 2011 by Attractive Chaos + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +*/ + +/* + An example: + +#include "khash.h" +KHASH_MAP_INIT_INT(32, char) +int main() { + int ret, is_missing; + khiter_t k; + khash_t(32) *h = kh_init(32); + k = kh_put(32, h, 5, &ret); + kh_value(h, k) = 10; + k = kh_get(32, h, 10); + is_missing = (k == kh_end(h)); + k = kh_get(32, h, 5); + kh_del(32, h, k); + for (k = kh_begin(h); k != kh_end(h); ++k) + if (kh_exist(h, k)) kh_value(h, k) = 1; + kh_destroy(32, h); + return 0; +} +*/ + +/* + 2013-05-02 (0.2.8): + + * Use quadratic probing. When the capacity is power of 2, stepping function + i*(i+1)/2 guarantees to traverse each bucket. It is better than double + hashing on cache performance and is more robust than linear probing. + + In theory, double hashing should be more robust than quadratic probing. + However, my implementation is probably not for large hash tables, because + the second hash function is closely tied to the first hash function, + which reduce the effectiveness of double hashing. + + Reference: http://research.cs.vt.edu/AVresearch/hashing/quadratic.php + + 2011-12-29 (0.2.7): + + * Minor code clean up; no actual effect. + + 2011-09-16 (0.2.6): + + * The capacity is a power of 2. This seems to dramatically improve the + speed for simple keys. Thank Zilong Tan for the suggestion. Reference: + + - http://code.google.com/p/ulib/ + - http://nothings.org/computer/judy/ + + * Allow to optionally use linear probing which usually has better + performance for random input. Double hashing is still the default as it + is more robust to certain non-random input. + + * Added Wang's integer hash function (not used by default). This hash + function is more robust to certain non-random input. + + 2011-02-14 (0.2.5): + + * Allow to declare global functions. + + 2009-09-26 (0.2.4): + + * Improve portability + + 2008-09-19 (0.2.3): + + * Corrected the example + * Improved interfaces + + 2008-09-11 (0.2.2): + + * Improved speed a little in kh_put() + + 2008-09-10 (0.2.1): + + * Added kh_clear() + * Fixed a compiling error + + 2008-09-02 (0.2.0): + + * Changed to token concatenation which increases flexibility. + + 2008-08-31 (0.1.2): + + * Fixed a bug in kh_get(), which has not been tested previously. + + 2008-08-31 (0.1.1): + + * Added destructor +*/ + + +#ifndef __AC_KHASH_H +#define __AC_KHASH_H + +/*! + @header + + Generic hash table library. + */ + +#define AC_VERSION_KHASH_H "0.2.8" + +#include +#include +#include + +/* compiler specific configuration */ + +#if UINT_MAX == 0xffffffffu +typedef unsigned int khint32_t; +#elif ULONG_MAX == 0xffffffffu +typedef unsigned long khint32_t; +#endif + +#if ULONG_MAX == ULLONG_MAX +typedef unsigned long khint64_t; +#else +typedef unsigned long long khint64_t; +#endif + +#ifndef kh_inline +#ifdef _MSC_VER +#define kh_inline __inline +#else +#define kh_inline inline +#endif +#endif /* kh_inline */ + +#ifndef kh_unused +# ifdef __GNUC__ +# define kh_unused(x) __attribute__((__unused__)) x +# else +# define kh_unused(x) x +# endif +#endif + +typedef khint32_t khint_t; +typedef khint_t khiter_t; + +#define __ac_isempty(flag, i) ((flag[i>>4]>>((i&0xfU)<<1))&2) +#define __ac_isdel(flag, i) ((flag[i>>4]>>((i&0xfU)<<1))&1) +#define __ac_iseither(flag, i) ((flag[i>>4]>>((i&0xfU)<<1))&3) +#define __ac_set_isdel_false(flag, i) (flag[i>>4]&=~(1ul<<((i&0xfU)<<1))) +#define __ac_set_isempty_false(flag, i) (flag[i>>4]&=~(2ul<<((i&0xfU)<<1))) +#define __ac_set_isboth_false(flag, i) (flag[i>>4]&=~(3ul<<((i&0xfU)<<1))) +#define __ac_set_isdel_true(flag, i) (flag[i>>4]|=1ul<<((i&0xfU)<<1)) + +#define __ac_fsize(m) ((m) < 16? 1 : (m)>>4) + +#ifndef kroundup32 +#define kroundup32(x) (--(x), (x)|=(x)>>1, (x)|=(x)>>2, (x)|=(x)>>4, (x)|=(x)>>8, (x)|=(x)>>16, ++(x)) +#endif + +#ifndef kcalloc +#define kcalloc(N,Z) calloc(N,Z) +#endif +#ifndef kmalloc +#define kmalloc(Z) malloc(Z) +#endif +#ifndef krealloc +#define krealloc(P,Z) realloc(P,Z) +#endif +#ifndef kfree +#define kfree(P) free(P) +#endif + +static const double __ac_HASH_UPPER = 0.77; + +#define __KHASH_TYPE(name, khkey_t, khval_t) \ + typedef struct kh_##name##_s { \ + khint_t n_buckets, size, n_occupied, upper_bound; \ + khint32_t *flags; \ + khkey_t *keys; \ + khval_t *vals; \ + } kh_##name##_t; + +#define __KHASH_PROTOTYPES(name, khkey_t, khval_t) \ + extern kh_##name##_t * kh_init_##name(void); \ + extern void kh_destroy_##name(kh_##name##_t *h); \ + extern void kh_clear_##name(kh_##name##_t *h); \ + extern khint_t kh_get_##name(const kh_##name##_t *h, khkey_t key); \ + extern int kh_resize_##name(kh_##name##_t *h, khint_t new_n_buckets); \ + extern khint_t kh_put_##name(kh_##name##_t *h, khkey_t key, int *ret); \ + extern void kh_del_##name(kh_##name##_t *h, khint_t x); + +#define __KHASH_IMPL(name, SCOPE, khkey_t, khval_t, kh_is_map, __hash_func, __hash_equal) \ + SCOPE kh_##name##_t *kh_init_##name(void) { \ + return (kh_##name##_t*)kcalloc(1, sizeof(kh_##name##_t)); \ + } \ + SCOPE void kh_destroy_##name(kh_##name##_t *h) \ + { \ + if (h) { \ + kfree((void *)h->keys); kfree(h->flags); \ + kfree((void *)h->vals); \ + kfree(h); \ + } \ + } \ + SCOPE void kh_unused(kh_clear_##name)(kh_##name##_t *h) \ + { \ + if (h && h->flags) { \ + memset(h->flags, 0xaa, __ac_fsize(h->n_buckets) * sizeof(khint32_t)); \ + h->size = h->n_occupied = 0; \ + } \ + } \ + SCOPE khint_t kh_get_##name(const kh_##name##_t *h, khkey_t key) \ + { \ + if (h->n_buckets) { \ + khint_t k, i, last, mask, step = 0; \ + mask = h->n_buckets - 1; \ + k = __hash_func(key); i = k & mask; \ + last = i; \ + while (!__ac_isempty(h->flags, i) && (__ac_isdel(h->flags, i) || !__hash_equal(h->keys[i], key))) { \ + i = (i + (++step)) & mask; \ + if (i == last) return h->n_buckets; \ + } \ + return __ac_iseither(h->flags, i)? h->n_buckets : i; \ + } else return 0; \ + } \ + SCOPE int kh_resize_##name(kh_##name##_t *h, khint_t new_n_buckets) \ + { /* This function uses 0.25*n_buckets bytes of working space instead of [sizeof(key_t+val_t)+.25]*n_buckets. */ \ + khint32_t *new_flags = 0; \ + khint_t j = 1; \ + { \ + kroundup32(new_n_buckets); \ + if (new_n_buckets < 4) new_n_buckets = 4; \ + if (h->size >= (khint_t)(new_n_buckets * __ac_HASH_UPPER + 0.5)) j = 0; /* requested size is too small */ \ + else { /* hash table size to be changed (shrink or expand); rehash */ \ + new_flags = (khint32_t*)kmalloc(__ac_fsize(new_n_buckets) * sizeof(khint32_t)); \ + if (!new_flags) return -1; \ + memset(new_flags, 0xaa, __ac_fsize(new_n_buckets) * sizeof(khint32_t)); \ + if (h->n_buckets < new_n_buckets) { /* expand */ \ + khkey_t *new_keys = (khkey_t*)krealloc((void *)h->keys, new_n_buckets * sizeof(khkey_t)); \ + if (!new_keys) { kfree(new_flags); return -1; } \ + h->keys = new_keys; \ + if (kh_is_map) { \ + khval_t *new_vals = (khval_t*)krealloc((void *)h->vals, new_n_buckets * sizeof(khval_t)); \ + if (!new_vals) { kfree(new_flags); return -1; } \ + h->vals = new_vals; \ + } \ + } /* otherwise shrink */ \ + } \ + } \ + if (j) { /* rehashing is needed */ \ + for (j = 0; j != h->n_buckets; ++j) { \ + if (__ac_iseither(h->flags, j) == 0) { \ + khkey_t key = h->keys[j]; \ + khval_t val; \ + khint_t new_mask; \ + new_mask = new_n_buckets - 1; \ + if (kh_is_map) val = h->vals[j]; \ + __ac_set_isdel_true(h->flags, j); \ + while (1) { /* kick-out process; sort of like in Cuckoo hashing */ \ + khint_t k, i, step = 0; \ + k = __hash_func(key); \ + i = k & new_mask; \ + while (!__ac_isempty(new_flags, i)) i = (i + (++step)) & new_mask; \ + __ac_set_isempty_false(new_flags, i); \ + if (i < h->n_buckets && __ac_iseither(h->flags, i) == 0) { /* kick out the existing element */ \ + { khkey_t tmp = h->keys[i]; h->keys[i] = key; key = tmp; } \ + if (kh_is_map) { khval_t tmp = h->vals[i]; h->vals[i] = val; val = tmp; } \ + __ac_set_isdel_true(h->flags, i); /* mark it as deleted in the old hash table */ \ + } else { /* write the element and jump out of the loop */ \ + h->keys[i] = key; \ + if (kh_is_map) h->vals[i] = val; \ + break; \ + } \ + } \ + } \ + } \ + if (h->n_buckets > new_n_buckets) { /* shrink the hash table */ \ + h->keys = (khkey_t*)krealloc((void *)h->keys, new_n_buckets * sizeof(khkey_t)); \ + if (kh_is_map) h->vals = (khval_t*)krealloc((void *)h->vals, new_n_buckets * sizeof(khval_t)); \ + } \ + kfree(h->flags); /* free the working space */ \ + h->flags = new_flags; \ + h->n_buckets = new_n_buckets; \ + h->n_occupied = h->size; \ + h->upper_bound = (khint_t)(h->n_buckets * __ac_HASH_UPPER + 0.5); \ + } \ + return 0; \ + } \ + SCOPE khint_t kh_put_##name(kh_##name##_t *h, khkey_t key, int *ret) \ + { \ + khint_t x; \ + if (h->n_occupied >= h->upper_bound) { /* update the hash table */ \ + if (h->n_buckets > (h->size<<1)) { \ + if (kh_resize_##name(h, h->n_buckets - 1) < 0) { /* clear "deleted" elements */ \ + *ret = -1; return h->n_buckets; \ + } \ + } else if (kh_resize_##name(h, h->n_buckets + 1) < 0) { /* expand the hash table */ \ + *ret = -1; return h->n_buckets; \ + } \ + } /* TODO: to implement automatically shrinking; resize() already support shrinking */ \ + { \ + khint_t k, i, site, last, mask = h->n_buckets - 1, step = 0; \ + x = site = h->n_buckets; k = __hash_func(key); i = k & mask; \ + if (__ac_isempty(h->flags, i)) x = i; /* for speed up */ \ + else { \ + last = i; \ + while (!__ac_isempty(h->flags, i) && (__ac_isdel(h->flags, i) || !__hash_equal(h->keys[i], key))) { \ + if (__ac_isdel(h->flags, i)) site = i; \ + i = (i + (++step)) & mask; \ + if (i == last) { x = site; break; } \ + } \ + if (x == h->n_buckets) { \ + if (__ac_isempty(h->flags, i) && site != h->n_buckets) x = site; \ + else x = i; \ + } \ + } \ + } \ + if (__ac_isempty(h->flags, x)) { /* not present at all */ \ + h->keys[x] = key; \ + __ac_set_isboth_false(h->flags, x); \ + ++h->size; ++h->n_occupied; \ + *ret = 1; \ + } else if (__ac_isdel(h->flags, x)) { /* deleted */ \ + h->keys[x] = key; \ + __ac_set_isboth_false(h->flags, x); \ + ++h->size; \ + *ret = 2; \ + } else *ret = 0; /* Don't touch h->keys[x] if present and not deleted */ \ + return x; \ + } \ + SCOPE void kh_del_##name(kh_##name##_t *h, khint_t x) \ + { \ + if (x != h->n_buckets && !__ac_iseither(h->flags, x)) { \ + __ac_set_isdel_true(h->flags, x); \ + --h->size; \ + } \ + } + +#define KHASH_DECLARE(name, khkey_t, khval_t) \ + __KHASH_TYPE(name, khkey_t, khval_t) \ + __KHASH_PROTOTYPES(name, khkey_t, khval_t) + +#define KHASH_INIT2(name, SCOPE, khkey_t, khval_t, kh_is_map, __hash_func, __hash_equal) \ + __KHASH_TYPE(name, khkey_t, khval_t) \ + __KHASH_IMPL(name, SCOPE, khkey_t, khval_t, kh_is_map, __hash_func, __hash_equal) + +#define KHASH_INIT(name, khkey_t, khval_t, kh_is_map, __hash_func, __hash_equal) \ + KHASH_INIT2(name, static kh_inline, khkey_t, khval_t, kh_is_map, __hash_func, __hash_equal) + +/* --- BEGIN OF HASH FUNCTIONS --- */ + +/*! @function + @abstract Integer hash function + @param key The integer [khint32_t] + @return The hash value [khint_t] + */ +#define kh_int_hash_func(key) (khint32_t)(key) +/*! @function + @abstract Integer comparison function + */ +#define kh_int_hash_equal(a, b) ((a) == (b)) +/*! @function + @abstract 64-bit integer hash function + @param key The integer [khint64_t] + @return The hash value [khint_t] + */ +#define kh_int64_hash_func(key) (khint32_t)((key)>>33^(key)^(key)<<11) +/*! @function + @abstract 64-bit integer comparison function + */ +#define kh_int64_hash_equal(a, b) ((a) == (b)) +/*! @function + @abstract const char* hash function + @param s Pointer to a null terminated string + @return The hash value + */ +static kh_inline khint_t __ac_X31_hash_string(const char *s) +{ + khint_t h = (khint_t)*s; + if (h) for (++s ; *s; ++s) h = (h << 5) - h + (khint_t)*s; + return h; +} +/*! @function + @abstract Another interface to const char* hash function + @param key Pointer to a null terminated string [const char*] + @return The hash value [khint_t] + */ +#define kh_str_hash_func(key) __ac_X31_hash_string(key) +/*! @function + @abstract Const char* comparison function + */ +#define kh_str_hash_equal(a, b) (strcmp(a, b) == 0) + +static kh_inline khint_t __ac_Wang_hash(khint_t key) +{ + key += ~(key << 15); + key ^= (key >> 10); + key += (key << 3); + key ^= (key >> 6); + key += ~(key << 11); + key ^= (key >> 16); + return key; +} +#define kh_int_hash_func2(k) __ac_Wang_hash((khint_t)key) + +/* --- END OF HASH FUNCTIONS --- */ + +/* Other convenient macros... */ + +/*! + @abstract Type of the hash table. + @param name Name of the hash table [symbol] + */ +#define khash_t(name) kh_##name##_t + +/*! @function + @abstract Initiate a hash table. + @param name Name of the hash table [symbol] + @return Pointer to the hash table [khash_t(name)*] + */ +#define kh_init(name) kh_init_##name() + +/*! @function + @abstract Destroy a hash table. + @param name Name of the hash table [symbol] + @param h Pointer to the hash table [khash_t(name)*] + */ +#define kh_destroy(name, h) kh_destroy_##name(h) + +/*! @function + @abstract Reset a hash table without deallocating memory. + @param name Name of the hash table [symbol] + @param h Pointer to the hash table [khash_t(name)*] + */ +#define kh_clear(name, h) kh_clear_##name(h) + +/*! @function + @abstract Resize a hash table. + @param name Name of the hash table [symbol] + @param h Pointer to the hash table [khash_t(name)*] + @param s New size [khint_t] + */ +#define kh_resize(name, h, s) kh_resize_##name(h, s) + +/*! @function + @abstract Insert a key to the hash table. + @param name Name of the hash table [symbol] + @param h Pointer to the hash table [khash_t(name)*] + @param k Key [type of keys] + @param r Extra return code: -1 if the operation failed; + 0 if the key is present in the hash table; + 1 if the bucket is empty (never used); 2 if the element in + the bucket has been deleted [int*] + @return Iterator to the inserted element [khint_t] + */ +#define kh_put(name, h, k, r) kh_put_##name(h, k, r) + +/*! @function + @abstract Retrieve a key from the hash table. + @param name Name of the hash table [symbol] + @param h Pointer to the hash table [khash_t(name)*] + @param k Key [type of keys] + @return Iterator to the found element, or kh_end(h) if the element is absent [khint_t] + */ +#define kh_get(name, h, k) kh_get_##name(h, k) + +/*! @function + @abstract Remove a key from the hash table. + @param name Name of the hash table [symbol] + @param h Pointer to the hash table [khash_t(name)*] + @param k Iterator to the element to be deleted [khint_t] + */ +#define kh_del(name, h, k) kh_del_##name(h, k) + +/*! @function + @abstract Test whether a bucket contains data. + @param h Pointer to the hash table [khash_t(name)*] + @param x Iterator to the bucket [khint_t] + @return 1 if containing data; 0 otherwise [int] + */ +#define kh_exist(h, x) (!__ac_iseither((h)->flags, (x))) + +/*! @function + @abstract Get key given an iterator + @param h Pointer to the hash table [khash_t(name)*] + @param x Iterator to the bucket [khint_t] + @return Key [type of keys] + */ +#define kh_key(h, x) ((h)->keys[x]) + +/*! @function + @abstract Get value given an iterator + @param h Pointer to the hash table [khash_t(name)*] + @param x Iterator to the bucket [khint_t] + @return Value [type of values] + @discussion For hash sets, calling this results in segfault. + */ +#define kh_val(h, x) ((h)->vals[x]) + +/*! @function + @abstract Alias of kh_val() + */ +#define kh_value(h, x) ((h)->vals[x]) + +/*! @function + @abstract Get the start iterator + @param h Pointer to the hash table [khash_t(name)*] + @return The start iterator [khint_t] + */ +#define kh_begin(h) (khint_t)(0) + +/*! @function + @abstract Get the end iterator + @param h Pointer to the hash table [khash_t(name)*] + @return The end iterator [khint_t] + */ +#define kh_end(h) ((h)->n_buckets) + +/*! @function + @abstract Get the number of elements in the hash table + @param h Pointer to the hash table [khash_t(name)*] + @return Number of elements in the hash table [khint_t] + */ +#define kh_size(h) ((h)->size) + +/*! @function + @abstract Get the number of buckets in the hash table + @param h Pointer to the hash table [khash_t(name)*] + @return Number of buckets in the hash table [khint_t] + */ +#define kh_n_buckets(h) ((h)->n_buckets) + +/*! @function + @abstract Iterate over the entries in the hash table + @param h Pointer to the hash table [khash_t(name)*] + @param kvar Variable to which key will be assigned + @param vvar Variable to which value will be assigned + @param code Block of code to execute + */ +#define kh_foreach(h, kvar, vvar, code) { khint_t __i; \ + for (__i = kh_begin(h); __i != kh_end(h); ++__i) { \ + if (!kh_exist(h,__i)) continue; \ + (kvar) = kh_key(h,__i); \ + (vvar) = kh_val(h,__i); \ + code; \ + } } + +/*! @function + @abstract Iterate over the values in the hash table + @param h Pointer to the hash table [khash_t(name)*] + @param vvar Variable to which value will be assigned + @param code Block of code to execute + */ +#define kh_foreach_value(h, vvar, code) { khint_t __i; \ + for (__i = kh_begin(h); __i != kh_end(h); ++__i) { \ + if (!kh_exist(h,__i)) continue; \ + (vvar) = kh_val(h,__i); \ + code; \ + } } + +/* More conenient interfaces */ + +/*! @function + @abstract Instantiate a hash set containing integer keys + @param name Name of the hash table [symbol] + */ +#define KHASH_SET_INIT_INT(name) \ + KHASH_INIT(name, khint32_t, char, 0, kh_int_hash_func, kh_int_hash_equal) + +/*! @function + @abstract Instantiate a hash map containing integer keys + @param name Name of the hash table [symbol] + @param khval_t Type of values [type] + */ +#define KHASH_MAP_INIT_INT(name, khval_t) \ + KHASH_INIT(name, khint32_t, khval_t, 1, kh_int_hash_func, kh_int_hash_equal) + +/*! @function + @abstract Instantiate a hash map containing 64-bit integer keys + @param name Name of the hash table [symbol] + */ +#define KHASH_SET_INIT_INT64(name) \ + KHASH_INIT(name, khint64_t, char, 0, kh_int64_hash_func, kh_int64_hash_equal) + +/*! @function + @abstract Instantiate a hash map containing 64-bit integer keys + @param name Name of the hash table [symbol] + @param khval_t Type of values [type] + */ +#define KHASH_MAP_INIT_INT64(name, khval_t) \ + KHASH_INIT(name, khint64_t, khval_t, 1, kh_int64_hash_func, kh_int64_hash_equal) + +typedef const char *kh_cstr_t; +/*! @function + @abstract Instantiate a hash map containing const char* keys + @param name Name of the hash table [symbol] + */ +#define KHASH_SET_INIT_STR(name) \ + KHASH_INIT(name, kh_cstr_t, char, 0, kh_str_hash_func, kh_str_hash_equal) + +/*! @function + @abstract Instantiate a hash map containing const char* keys + @param name Name of the hash table [symbol] + @param khval_t Type of values [type] + */ +#define KHASH_MAP_INIT_STR(name, khval_t) \ + KHASH_INIT(name, kh_cstr_t, khval_t, 1, kh_str_hash_func, kh_str_hash_equal) + +#endif /* __AC_KHASH_H */ Added: vendor/libucl/dist/klib/kvec.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libucl/dist/klib/kvec.h Mon Mar 2 21:35:31 2015 (r279546) @@ -0,0 +1,103 @@ +/* The MIT License + + Copyright (c) 2008, by Attractive Chaos + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@FreeBSD.ORG Mon Mar 2 21:36:45 2015 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EC3E5DE5; Mon, 2 Mar 2015 21:36:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D751DAD3; Mon, 2 Mar 2015 21:36:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t22LajJD015158; Mon, 2 Mar 2015 21:36:45 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t22Laj9L015157; Mon, 2 Mar 2015 21:36:45 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201503022136.t22Laj9L015157@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 2 Mar 2015 21:36:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r279547 - vendor/libucl/dist/utils X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2015 21:36:46 -0000 Author: bapt Date: Mon Mar 2 21:36:45 2015 New Revision: 279547 URL: https://svnweb.freebsd.org/changeset/base/279547 Log: Really update to 8d3b186 Modified: vendor/libucl/dist/utils/objdump.c Modified: vendor/libucl/dist/utils/objdump.c ============================================================================== --- vendor/libucl/dist/utils/objdump.c Mon Mar 2 21:35:31 2015 (r279546) +++ vendor/libucl/dist/utils/objdump.c Mon Mar 2 21:36:45 2015 (r279547) @@ -46,7 +46,7 @@ ucl_obj_dump (const ucl_object_t *obj, u if (obj->key != NULL) { printf ("%skey: \"%s\"\n", pre, ucl_object_key (obj)); } - printf ("%sref: %hd\n", pre, obj->ref); + printf ("%sref: %u\n", pre, obj->ref); printf ("%slen: %u\n", pre, obj->len); printf ("%sprev: %p\n", pre, obj->prev); printf ("%snext: %p\n", pre, obj->next); @@ -61,7 +61,10 @@ ucl_obj_dump (const ucl_object_t *obj, u else if (obj->type == UCL_ARRAY) { printf ("%stype: UCL_ARRAY\n", pre); printf ("%svalue: %p\n", pre, obj->value.av); - ucl_obj_dump (obj->value.av, shift + 2); + it_obj = NULL; + while ((cur = ucl_iterate_object (obj, &it_obj, true))) { + ucl_obj_dump (cur, shift + 2); + } } else if (obj->type == UCL_INT) { printf ("%stype: UCL_INT\n", pre); @@ -96,7 +99,7 @@ int main(int argc, char **argv) { const char *fn = NULL; - char inbuf[8192]; + unsigned char inbuf[8192]; struct ucl_parser *parser; int k, ret = 0, r = 0; ucl_object_t *obj = NULL; From owner-svn-src-vendor@FreeBSD.ORG Mon Mar 2 21:37:58 2015 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1D2EC1CE; Mon, 2 Mar 2015 21:37:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 05C12B38; Mon, 2 Mar 2015 21:37:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t22LbvFv015586; Mon, 2 Mar 2015 21:37:57 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t22Lbu9T015573; Mon, 2 Mar 2015 21:37:56 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201503022137.t22Lbu9T015573@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 2 Mar 2015 21:37:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r279548 - in vendor/libucl/20150302: . cmake doc include klib m4 src tests tests/basic uthash utils X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2015 21:37:58 -0000 Author: bapt Date: Mon Mar 2 21:37:55 2015 New Revision: 279548 URL: https://svnweb.freebsd.org/changeset/base/279548 Log: Tag import of libucl from git as of 20150302 Added: vendor/libucl/20150302/ - copied from r279545, vendor/libucl/dist/ vendor/libucl/20150302/klib/ - copied from r279546, vendor/libucl/dist/klib/ vendor/libucl/20150302/tests/basic/14.in - copied unchanged from r279546, vendor/libucl/dist/tests/basic/14.in vendor/libucl/20150302/tests/basic/14.res - copied unchanged from r279546, vendor/libucl/dist/tests/basic/14.res Replaced: vendor/libucl/20150302/ChangeLog.md - copied unchanged from r279546, vendor/libucl/dist/ChangeLog.md vendor/libucl/20150302/Makefile.am - copied unchanged from r279546, vendor/libucl/dist/Makefile.am vendor/libucl/20150302/README.md - copied unchanged from r279546, vendor/libucl/dist/README.md vendor/libucl/20150302/cmake/CMakeLists.txt - copied unchanged from r279546, vendor/libucl/dist/cmake/CMakeLists.txt vendor/libucl/20150302/configure.ac - copied unchanged from r279546, vendor/libucl/dist/configure.ac vendor/libucl/20150302/doc/Makefile.am - copied unchanged from r279546, vendor/libucl/dist/doc/Makefile.am vendor/libucl/20150302/doc/api.md - copied unchanged from r279546, vendor/libucl/dist/doc/api.md vendor/libucl/20150302/doc/libucl.3 - copied unchanged from r279546, vendor/libucl/dist/doc/libucl.3 vendor/libucl/20150302/doc/pandoc.template - copied unchanged from r279546, vendor/libucl/dist/doc/pandoc.template vendor/libucl/20150302/include/ucl.h - copied unchanged from r279546, vendor/libucl/dist/include/ucl.h vendor/libucl/20150302/src/Makefile.am - copied unchanged from r279546, vendor/libucl/dist/src/Makefile.am vendor/libucl/20150302/src/ucl_emitter.c - copied unchanged from r279546, vendor/libucl/dist/src/ucl_emitter.c vendor/libucl/20150302/src/ucl_emitter_utils.c - copied unchanged from r279546, vendor/libucl/dist/src/ucl_emitter_utils.c vendor/libucl/20150302/src/ucl_hash.c - copied unchanged from r279546, vendor/libucl/dist/src/ucl_hash.c vendor/libucl/20150302/src/ucl_hash.h - copied unchanged from r279546, vendor/libucl/dist/src/ucl_hash.h vendor/libucl/20150302/src/ucl_internal.h - copied unchanged from r279546, vendor/libucl/dist/src/ucl_internal.h vendor/libucl/20150302/src/ucl_parser.c - copied unchanged from r279546, vendor/libucl/dist/src/ucl_parser.c vendor/libucl/20150302/src/ucl_schema.c - copied unchanged from r279546, vendor/libucl/dist/src/ucl_schema.c vendor/libucl/20150302/src/ucl_util.c - copied unchanged from r279546, vendor/libucl/dist/src/ucl_util.c vendor/libucl/20150302/tests/schema.test - copied unchanged from r279546, vendor/libucl/dist/tests/schema.test vendor/libucl/20150302/tests/test_generate.c - copied unchanged from r279546, vendor/libucl/dist/tests/test_generate.c vendor/libucl/20150302/tests/test_schema.c - copied unchanged from r279546, vendor/libucl/dist/tests/test_schema.c vendor/libucl/20150302/uthash/utstring.h - copied unchanged from r279546, vendor/libucl/dist/uthash/utstring.h vendor/libucl/20150302/utils/objdump.c - copied unchanged from r279547, vendor/libucl/dist/utils/objdump.c Deleted: vendor/libucl/20150302/m4/ Copied: vendor/libucl/20150302/ChangeLog.md (from r279546, vendor/libucl/dist/ChangeLog.md) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libucl/20150302/ChangeLog.md Mon Mar 2 21:37:55 2015 (r279548, copy of r279546, vendor/libucl/dist/ChangeLog.md) @@ -0,0 +1,34 @@ +# Version history + +## Libucl 0.5 + +- Streamline emitter has been added, so it is now possible to output partial `ucl` objects +- Emitter now is more flexible due to emitter_context structure + +### 0.5.1 +- Fixed number of bugs and memory leaks + +### 0.5.2 + +- Allow userdata objects to be emitted and destructed +- Use userdata objects to store lua function references + +### Libucl 0.6 + +- Reworked macro interface + +### Libucl 0.6.1 + +- Various utilities fixes + +### Libucl 0.7.0 + +- Move to klib library from uthash to reduce memory overhead and increase performance + +### Libucl 0.7.1 + +- Added safe iterators API + +### Libucl 0.7.2 + +- Fixed serious bugs in schema and arrays iteration Copied: vendor/libucl/20150302/Makefile.am (from r279546, vendor/libucl/dist/Makefile.am) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libucl/20150302/Makefile.am Mon Mar 2 21:37:55 2015 (r279548, copy of r279546, vendor/libucl/dist/Makefile.am) @@ -0,0 +1,11 @@ +ACLOCAL_AMFLAGS = -I m4 +EXTRA_DIST = uthash klib README.md + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = libucl.pc + +if LUA_SUB + LUA_SUBDIR = lua +endif + +SUBDIRS = src tests utils doc $(LUA_SUBDIR) \ No newline at end of file Copied: vendor/libucl/20150302/README.md (from r279546, vendor/libucl/dist/README.md) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libucl/20150302/README.md Mon Mar 2 21:37:55 2015 (r279548, copy of r279546, vendor/libucl/dist/README.md) @@ -0,0 +1,369 @@ +# LIBUCL + +[![Build Status](https://travis-ci.org/vstakhov/libucl.svg?branch=master)](https://travis-ci.org/vstakhov/libucl)[![Coverity](https://scan.coverity.com/projects/4138/badge.svg)](https://scan.coverity.com/projects/4138) + +**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)* + +- [Introduction](#introduction) +- [Basic structure](#basic-structure) +- [Improvements to the json notation](#improvements-to-the-json-notation) + - [General syntax sugar](#general-syntax-sugar) + - [Automatic arrays creation](#automatic-arrays-creation) + - [Named keys hierarchy](#named-keys-hierarchy) + - [Convenient numbers and booleans](#convenient-numbers-and-booleans) +- [General improvements](#general-improvements) + - [Commments](#commments) + - [Macros support](#macros-support) + - [Variables support](#variables-support) + - [Multiline strings](#multiline-strings) +- [Emitter](#emitter) +- [Validation](#validation) +- [Performance](#performance) +- [Conclusion](#conclusion) + +## Introduction + +This document describes the main features and principles of the configuration +language called `UCL` - universal configuration language. + +If you are looking for the libucl API documentation you can find it at [this page](doc/api.md). + +## Basic structure + +UCL is heavily infused by `nginx` configuration as the example of a convenient configuration +system. However, UCL is fully compatible with `JSON` format and is able to parse json files. +For example, you can write the same configuration in the following ways: + +* in nginx like: + +```nginx +param = value; +section { + param = value; + param1 = value1; + flag = true; + number = 10k; + time = 0.2s; + string = "something"; + subsection { + host = { + host = "hostname"; + port = 900; + } + host = { + host = "hostname"; + port = 901; + } + } +} +``` + +* or in JSON: + +```json +{ + "param": "value", + "param1": "value1", + "flag": true, + "subsection": { + "host": [ + { + "host": "hostname", + "port": 900 + }, + { + "host": "hostname", + "port": 901 + } + ] + } +} +``` + +## Improvements to the json notation. + +There are various things that make ucl configuration more convenient for editing than strict json: + +### General syntax sugar + +* Braces are not necessary to enclose a top object: it is automatically treated as an object: + +```json +"key": "value" +``` +is equal to: +```json +{"key": "value"} +``` + +* There is no requirement of quotes for strings and keys, moreover, `:` may be replaced `=` or even be skipped for objects: + +```nginx +key = value; +section { + key = value; +} +``` +is equal to: +```json +{ + "key": "value", + "section": { + "key": "value" + } +} +``` + +* No commas mess: you can safely place a comma or semicolon for the last element in an array or an object: + +```json +{ + "key1": "value", + "key2": "value", +} +``` +### Automatic arrays creation + +* Non-unique keys in an object are allowed and are automatically converted to the arrays internally: + +```json +{ + "key": "value1", + "key": "value2" +} +``` +is converted to: +```json +{ + "key": ["value1", "value2"] +} +``` + +### Named keys hierarchy + +UCL accepts named keys and organize them into objects hierarchy internally. Here is an example of this process: +```nginx +section "blah" { + key = value; +} +section foo { + key = value; +} +``` + +is converted to the following object: + +```nginx +section { + blah { + key = value; + } + foo { + key = value; + } +} +``` + +Plain definitions may be more complex and contain more than a single level of nested objects: + +```nginx +section "blah" "foo" { + key = value; +} +``` + +is presented as: + +```nginx +section { + blah { + foo { + key = value; + } + } +} +``` + +### Convenient numbers and booleans + +* Numbers can have suffixes to specify standard multipliers: + + `[kKmMgG]` - standard 10 base multipliers (so `1k` is translated to 1000) + + `[kKmMgG]b` - 2 power multipliers (so `1kb` is translated to 1024) + + `[s|min|d|w|y]` - time multipliers, all time values are translated to float number of seconds, for example `10min` is translated to 600.0 and `10ms` is translated to 0.01 +* Hexadecimal integers can be used by `0x` prefix, for example `key = 0xff`. However, floating point values can use decimal base only. +* Booleans can be specified as `true` or `yes` or `on` and `false` or `no` or `off`. +* It is still possible to treat numbers and booleans as strings by enclosing them in double quotes. + +## General improvements + +### Commments + +UCL supports different style of comments: + +* single line: `#` +* multiline: `/* ... */` + +Multiline comments may be nested: +```c +# Sample single line comment +/* + some comment + /* nested comment */ + end of comment +*/ +``` + +### Macros support + +UCL supports external macros both multiline and single line ones: +```nginx +.macro "sometext"; +.macro { + Some long text + .... +}; +``` + +Moreover, each macro can accept an optional list of arguments in braces. These +arguments themselves are the UCL object that is parsed and passed to a macro as +options: + +```nginx +.macro(param=value) "something"; +.macro(param={key=value}) "something"; +.macro(.include "params.conf") "something"; +.macro(#this is multiline macro +param = [value1, value2]) "something"; +.macro(key="()") "something"; +``` + +UCL also provide a convenient `include` macro to load content from another files +to the current UCL object. This macro accepts either path to file: + +```nginx +.include "/full/path.conf" +.include "./relative/path.conf" +.include "${CURDIR}/path.conf" +``` + +or URL (if ucl is built with url support provided by either `libcurl` or `libfetch`): + + .include "http://example.com/file.conf" + +`.include` macro supports a set of options: + +* `try` (default: **false**) - if this option is `true` than UCL treats errors on loading of +this file as non-fatal. For example, such a file can be absent but it won't stop the parsing +of the top-level document. +* `sign` (default: **false**) - if this option is `true` UCL loads and checks the signature for +a file from path named `.sig`. Trusted public keys should be provided for UCL API after +parser is created but before any configurations are parsed. +* `glob` (default: **false**) - if this option is `true` UCL treats the filename as GLOB pattern and load +all files that matches the specified pattern (normally the format of patterns is defined in `glob` manual page +for your operating system). This option is meaningless for URL includes. +* `url` (default: **true**) - allow URL includes. +* `priority` (default: 0) - specify priority for the include (see below). + +Priorities are used by UCL parser to manage the policy of objects rewriting during including other files +as following: + +* If we have two objects with the same priority then we form an implicit array +* If a new object has bigger priority then we overwrite an old one +* If a new object has lower priority then we ignore it + +By default, the priority of top-level object is set to zero (lowest priority). Currently, +you can define up to 16 priorities (from 0 to 15). Includes with bigger priorities will +rewrite keys from the objects with lower priorities as specified by the policy. + +### Variables support + +UCL supports variables in input. Variables are registered by a user of the UCL parser and can be presented in the following forms: + +* `${VARIABLE}` +* `$VARIABLE` + +UCL currently does not support nested variables. To escape variables one could use double dollar signs: + +* `$${VARIABLE}` is converted to `${VARIABLE}` +* `$$VARIABLE` is converted to `$VARIABLE` + +However, if no valid variables are found in a string, no expansion will be performed (and `$$` thus remains unchanged). This may be a subject +to change in future libucl releases. + +### Multiline strings + +UCL can handle multiline strings as well as single line ones. It uses shell/perl like notation for such objects: +``` +key = <@]), [], + [enable_urls=no]) +AC_ARG_ENABLE([regex], AS_HELP_STRING([--enable-regex], + [Enable regex checking for schema @<:@default=yes@:>@]), [], + [enable_regex=yes]) +AC_ARG_ENABLE([signatures], AS_HELP_STRING([--enable-signatures], + [Enable signatures check (requires openssl) @<:@default=no@:>@]), [], + [enable_signatures=no]) +AC_ARG_ENABLE([lua], AS_HELP_STRING([--enable-lua], + [Enable lua API build (requires lua libraries and headers) @<:@default=no@:>@]), [], + [enable_lua=no]) +AC_ARG_ENABLE([utils], + AS_HELP_STRING([--enable-utils], [Build and install utils @<:@default=no@:>@]), + [case "${enableval}" in + yes) utils=true ;; + no) utils=false ;; + *) AC_MSG_ERROR([bad value ${enableval} for --enable-utils]) ;; + esac],[utils=false]) +AM_CONDITIONAL([UTILS], [test x$utils = xtrue]) + +AS_IF([test "x$enable_signatures" = "xyes"], [ + AC_SEARCH_LIBS([EVP_MD_CTX_create], [crypto], [ + AC_DEFINE(HAVE_OPENSSL, 1, [Define to 1 if you have the 'crypto' library (-lcrypto).]) + LIBCRYPTO_LIB="-lcrypto" + LIBS_EXTRA="${LIBS_EXTRA} -lcrypto" + ], [AC_MSG_ERROR([unable to find the EVP_MD_CTX_create() function])]) +]) +AC_SUBST(LIBCRYPTO_LIB) +AC_PATH_PROG(PANDOC, pandoc, [/non/existent]) + +AC_SEARCH_LIBS([clock_gettime], [rt], [], [ + AC_CHECK_HEADER([mach/mach_time.h], [ + AC_DEFINE(HAVE_MACH_MACH_TIME_H, 1, [Define to 1 on Darwin]) + ], [AC_MSG_ERROR([unable to find clock_gettime or mach_absolute_time])]) +]) +AC_SEARCH_LIBS([remainder], [m], [], [AC_MSG_ERROR([unable to find remainder() function])]) + +AS_IF([test "x$enable_regex" = "xyes"], [ + AC_CHECK_HEADER([regex.h], [ + AC_DEFINE(HAVE_REGEX_H, 1, [Define to 1 if you have the header file.]) + AC_SEARCH_LIBS([regexec], [regex], [ + AS_IF([test "x$ac_cv_search_regexec" = "x-lregex"], [ + LIBREGEX_LIB="-lregex" + LIBS_EXTRA="${LIBS_EXTRA} -lregex" + ] + )], + [AC_MSG_ERROR([unable to find the regexec() function])])], + [AC_MSG_ERROR([unable to find the regex.h header]) + ], + [#include ]) +]) +AC_SUBST(LIBREGEX_LIB) + +AS_IF([test "x$enable_lua" = "xyes"], [ + AX_PROG_LUA([5.1], [], [ + AX_LUA_HEADERS([ + AX_LUA_LIBS([ + AC_DEFINE(HAVE_LUA, 1, [Define to 1 for lua support.]) + with_lua="yes" + ], [AC_MSG_ERROR([unable to find the lua libraries]) + ]) + ], [AC_MSG_ERROR([unable to find the lua header files]) + ]) + ], [AC_MSG_ERROR([unable to find the lua interpreter])]) +], [with_lua="no"]) + +AM_CONDITIONAL([LUA_SUB], [test "$with_lua" = "yes"]) + +AS_IF([test "x$enable_urls" = "xyes"], [ + AC_CHECK_HEADER([fetch.h], [ + AC_DEFINE(HAVE_FETCH_H, 1, [Define to 1 if you have the header file.]) + AC_CHECK_LIB(fetch, fetchXGet, [ + AC_DEFINE(HAVE_LIBFETCH, 1, [Define to 1 if you have the 'fetch' library (-lfetch).]) + LIBFETCH_LIBS="-lfetch" + have_libfetch="yes" + LIBS_EXTRA="${LIBS_EXTRA} -lfetch" + ]) + ], [],[ + #include + #ifdef HAVE_SYS_PARAM_H + #include + #endif + ]) + AC_SUBST(LIBFETCH_LIBS) + + AS_IF([ test "x$have_libfetch" != "xyes"], [ + dnl Fallback to libcurl + PKG_CHECK_MODULES([CURL], [libcurl], [ + AC_DEFINE(CURL_FOUND, 1, [Use libcurl]) + LIBS_EXTRA="${LIBS_EXTRA} -lcurl"], + [AC_MSG_ERROR([unable to find neither libfetch nor libcurl])]) + ]) + AC_SUBST(CURL_FOUND) + AC_SUBST(CURL_LIBS) + AC_SUBST(CURL_CFLAGS) +]) + +AC_SUBST(LIBS_EXTRA) + +AC_MSG_CHECKING(for GCC atomic builtins) +AC_LINK_IFELSE([ + AC_LANG_SOURCE([[ + int main() { + volatile unsigned long val = 1; + __sync_synchronize(); + __sync_val_compare_and_swap(&val, 1, 0); + __sync_add_and_fetch(&val, 1); + __sync_sub_and_fetch(&val, 1); + return 0; + } + ]]) +], +[ + AC_MSG_RESULT([yes]) + AC_DEFINE([HAVE_ATOMIC_BUILTINS], [1], [Has gcc/MSVC atomic intrinsics]) +], +[ + AC_MSG_RESULT([no]) + AC_DEFINE([HAVE_ATOMIC_BUILTINS], [0], [Has gcc/MSVC atomic intrinsics]) + AC_MSG_WARN([Libucl references could be thread-unsafe because atomic builtins are missing]) +]) + +AC_CONFIG_FILES(Makefile \ + src/Makefile \ + lua/Makefile + tests/Makefile \ + utils/Makefile \ + doc/Makefile \ + lua/libucl.rockspec \ + libucl.pc) +AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h]) +AC_OUTPUT Copied: vendor/libucl/20150302/doc/Makefile.am (from r279546, vendor/libucl/dist/doc/Makefile.am) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libucl/20150302/doc/Makefile.am Mon Mar 2 21:37:55 2015 (r279548, copy of r279546, vendor/libucl/dist/doc/Makefile.am) @@ -0,0 +1,9 @@ +EXTRA_DIST = api.md + +dist_man_MANS = libucl.3 + +gen-man: @PANDOC@ + tail -n +$$(grep -n '# Synopsis' api.md | cut -d':' -f1) api.md | \ + cat pandoc.template - | sed -e 's/^# \(.*\)/# \U\1/' \ + -e "s/%%date%%/$$(LANG=C date +'%d %B, %Y')/" | \ + @PANDOC@ -s -f markdown -t man -o libucl.3 \ No newline at end of file Copied: vendor/libucl/20150302/doc/api.md (from r279546, vendor/libucl/dist/doc/api.md) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libucl/20150302/doc/api.md Mon Mar 2 21:37:55 2015 (r279548, copy of r279546, vendor/libucl/dist/doc/api.md) @@ -0,0 +1,495 @@ +# API documentation + +**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)* + +- [Synopsis](#synopsis) +- [Description](#description) + - [Parser functions](#parser-functions) + - [Emitting functions](#emitting-functions) + - [Conversion functions](#conversion-functions) + - [Generation functions](#generation-functions) + - [Iteration functions](#iteration-functions) + - [Validation functions](#validation-functions) + - [Utility functions](#utility-functions) +- [Parser functions](#parser-functions-1) + - [ucl_parser_new](#ucl_parser_new) + - [ucl_parser_register_macro](#ucl_parser_register_macro) + - [ucl_parser_register_variable](#ucl_parser_register_variable) + - [ucl_parser_add_chunk](#ucl_parser_add_chunk) + - [ucl_parser_add_string](#ucl_parser_add_string) + - [ucl_parser_add_file](#ucl_parser_add_file) + - [ucl_parser_get_object](#ucl_parser_get_object) + - [ucl_parser_get_error](#ucl_parser_get_error) + - [ucl_parser_free](#ucl_parser_free) + - [ucl_pubkey_add](#ucl_pubkey_add) + - [ucl_parser_set_filevars](#ucl_parser_set_filevars) + - [Parser usage example](#parser-usage-example) +- [Emitting functions](#emitting-functions-1) + - [ucl_object_emit](#ucl_object_emit) + - [ucl_object_emit_full](#ucl_object_emit_full) +- [Conversion functions](#conversion-functions-1) +- [Generation functions](#generation-functions-1) + - [ucl_object_new](#ucl_object_new) + - [ucl_object_typed_new](#ucl_object_typed_new) + - [Primitive objects generation](#primitive-objects-generation) + - [ucl_object_fromstring_common](#ucl_object_fromstring_common) +- [Iteration functions](#iteration-functions-1) + - [ucl_iterate_object](#ucl_iterate_object) +- [Validation functions](#validation-functions-1) + - [ucl_object_validate](#ucl_object_validate) + +# Synopsis + +`#include ` + +# Description + +Libucl is a parser and `C` API to parse and generate `ucl` objects. Libucl consist of several groups of functions: + +### Parser functions +Used to parse `ucl` files and provide interface to extract `ucl` object. Currently, `libucl` can parse only full `ucl` documents, for instance, it is impossible to parse a part of document and therefore it is impossible to use `libucl` as a streaming parser. In future, this limitation can be removed. + +### Emitting functions +Convert `ucl` objects to some textual or binary representation. Currently, libucl supports the following exports: + +- `JSON` - valid json format (can possibly lose some original data, such as implicit arrays) +- `Config` - human-readable configuration format (lossless) +- `YAML` - embedded yaml format (has the same limitations as `json` output) + +### Conversion functions +Help to convert `ucl` objects to C types. These functions are used to convert `ucl_object_t` to C primitive types, such as numbers, strings or boolean values. + +### Generation functions +Allow creation of `ucl` objects from C types and creating of complex `ucl` objects, such as hashes or arrays from primitive `ucl` objects, such as numbers or strings. + +### Iteration functions +Iterate over `ucl` complex objects or over a chain of values, for example when a key in an object has multiple values (that can be treated as implicit array or implicit consolidation). + +### Validation functions +Validation functions are used to validate some object `obj` using json-schema compatible object `schema`. Both input and schema must be UCL objects to perform validation. + +### Utility functions +Provide basic utilities to manage `ucl` objects: creating, removing, retaining and releasing reference count and so on. + +# Parser functions + +Parser functions operates with `struct ucl_parser`. + +### ucl_parser_new + +~~~C +struct ucl_parser* ucl_parser_new (int flags); +~~~ + +Creates new parser with the specified flags: + +- `UCL_PARSER_KEY_LOWERCASE` - lowercase keys parsed +- `UCL_PARSER_ZEROCOPY` - try to use zero-copy mode when reading files (in zero-copy mode text chunk being parsed without copying strings so it should exist till any object parsed is used) +- `UCL_PARSER_NO_TIME` - treat time values as strings without parsing them as floats + +### ucl_parser_register_macro + +~~~C +void ucl_parser_register_macro (struct ucl_parser *parser, + const char *macro, ucl_macro_handler handler, void* ud); +~~~ + +Register new macro with name .`macro` parsed by handler `handler` that accepts opaque data pointer `ud`. Macro handler should be of the following type: + +~~~C +bool (*ucl_macro_handler) (const unsigned char *data, + size_t len, void* ud);` +~~~ + +Handler function accepts macro text `data` of length `len` and the opaque pointer `ud`. If macro is parsed successfully the handler should return `true`. `false` indicates parsing failure and the parser can be terminated. + +### ucl_parser_register_variable + +~~~C +void ucl_parser_register_variable (struct ucl_parser *parser, + const char *var, const char *value); +~~~ + +Register new variable $`var` that should be replaced by the parser to the `value` string. + +### ucl_parser_add_chunk + +~~~C +bool ucl_parser_add_chunk (struct ucl_parser *parser, + const unsigned char *data, size_t len); +~~~ + +Add new text chunk with `data` of length `len` to the parser. At the moment, `libucl` parser is not a streamlined parser and chunk *must* contain the *valid* ucl object. For example, this object should be valid: + +~~~json +{ "var": "value" } +~~~ + +while this one won't be parsed correctly: + +~~~json +{ "var": +~~~ + +This limitation may possible be removed in future. + +### ucl_parser_add_string +~~~C +bool ucl_parser_add_string (struct ucl_parser *parser, + const char *data, size_t len); +~~~ + +This function acts exactly like `ucl_parser_add_chunk` does but if `len` argument is zero, then the string `data` must be zero-terminated and the actual length is calculated up to `\0` character. + +### ucl_parser_add_file + +~~~C +bool ucl_parser_add_file (struct ucl_parser *parser, + const char *filename); +~~~ + +Load file `filename` and parse it with the specified `parser`. This function uses `mmap` call to load file, therefore, it should not be `shrunk` during parsing. Otherwise, `libucl` can cause memory corruption and terminate the calling application. This function is also used by the internal handler of `include` macro, hence, this macro has the same limitation. + +### ucl_parser_get_object + +~~~C +ucl_object_t* ucl_parser_get_object (struct ucl_parser *parser); +~~~ + +If the `ucl` data has been parsed correctly this function returns the top object for the parser. Otherwise, this function returns the `NULL` pointer. The reference count for `ucl` object returned is increased by one, therefore, a caller should decrease reference by using `ucl_object_unref` to free object after usage. + +### ucl_parser_get_error + +~~~C +const char *ucl_parser_get_error(struct ucl_parser *parser); +~~~ + +Returns the constant error string for the parser object. If no error occurred during parsing a `NULL` object is returned. A caller should not try to free or modify this string. + +### ucl_parser_free + +~~~C +void ucl_parser_free (struct ucl_parser *parser); +~~~ + +Frees memory occupied by the parser object. The reference count for top object is decreased as well, however if the function `ucl_parser_get_object` was called previously then the top object won't be freed. + +### ucl_pubkey_add + +~~~C +bool ucl_pubkey_add (struct ucl_parser *parser, + const unsigned char *key, size_t len); +~~~ + +This function adds a public key from text blob `key` of length `len` to the `parser` object. This public key should be in the `PEM` format and can be used by `.includes` macro for checking signatures of files included. `Openssl` support should be enabled to make this function working. If a key cannot be added (e.g. due to format error) or `openssl` was not linked to `libucl` then this function returns `false`. + +### ucl_parser_set_filevars + +~~~C +bool ucl_parser_set_filevars (struct ucl_parser *parser, + const char *filename, bool need_expand); +~~~ + +Add the standard file variables to the `parser` based on the `filename` specified: + +- `$FILENAME` - a filename of `ucl` input +- `$CURDIR` - a current directory of the input + +For example, if a `filename` param is `../something.conf` then the variables will have the following values: + +- `$FILENAME` - "../something.conf" +- `$CURDIR` - ".." + +if `need_expand` parameter is `true` then all relative paths are expanded using `realpath` call. In this example if `..` is `/etc/dir` then variables will have these values: + +- `$FILENAME` - "/etc/something.conf" +- `$CURDIR` - "/etc" + +## Parser usage example + +The following example loads, parses and extracts `ucl` object from stdin using `libucl` parser functions (the length of input is limited to 8K): + +~~~C +char inbuf[8192]; +struct ucl_parser *parser = NULL; +int ret = 0, r = 0; +ucl_object_t *obj = NULL; +FILE *in; + +in = stdin; +parser = ucl_parser_new (0); +while (!feof (in) && r < (int)sizeof (inbuf)) { + r += fread (inbuf + r, 1, sizeof (inbuf) - r, in); +} +ucl_parser_add_chunk (parser, inbuf, r); +fclose (in); + +if (ucl_parser_get_error (parser)) { + printf ("Error occurred: %s\n", ucl_parser_get_error (parser)); + ret = 1; +} +else { + obj = ucl_parser_get_object (parser); +} + +if (parser != NULL) { + ucl_parser_free (parser); +} +if (obj != NULL) { + ucl_object_unref (obj); +} +return ret; +~~~ + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@FreeBSD.ORG Fri Mar 6 21:41:39 2015 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 85168C5; Fri, 6 Mar 2015 21:41:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6ED01836; Fri, 6 Mar 2015 21:41:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t26LfdKI097214; Fri, 6 Mar 2015 21:41:39 GMT (envelope-from edwin@FreeBSD.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t26LfamG097200; Fri, 6 Mar 2015 21:41:36 GMT (envelope-from edwin@FreeBSD.org) Message-Id: <201503062141.t26LfamG097200@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: edwin set sender to edwin@FreeBSD.org using -f From: Edwin Groothuis Date: Fri, 6 Mar 2015 21:41:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r279704 - vendor/tzdata/dist X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2015 21:41:39 -0000 Author: edwin Date: Fri Mar 6 21:41:35 2015 New Revision: 279704 URL: https://svnweb.freebsd.org/changeset/base/279704 Log: Vendor import of tzdata2015a: hanges affecting future time stamps The Mexican state of Quintana Roo, represented by America/Cancun, will shift from Central Time with DST to Eastern Time without DST on 2015-02-01 at 02:00. (Thanks to Steffen Thorsen and Gwillim Law.) Chile will not change clocks in April or thereafter; its new standard time will be its old daylight saving time. This affects America/Santiago, Pacific/Easter, and Antarctica/Palmer. (Thanks to Juan Correa.) New leap second 2015-06-30 23:59:60 UTC as per IERS Bulletin C 49. (Thanks to Tim Parenti.) Changes affecting past time stamps Iceland observed DST in 1919 and 1921, and its 1939 fallback transition was Oct. 29, not Nov. 29. Remove incorrect data from Shanks about time in Iceland between 1837 and 1908. Some more zones have been turned into links, when they differed from existing zones only for older time stamps. As usual, these changes affect UTC offsets in pre-1970 time stamps only. Their old contents have been moved to the 'backzone' file. The affected zones are: Asia/Aden, Asia/Bahrain, Asia/Kuwait, and Asia/Muscat. Modified: vendor/tzdata/dist/antarctica vendor/tzdata/dist/asia vendor/tzdata/dist/backward vendor/tzdata/dist/europe vendor/tzdata/dist/leap-seconds.list vendor/tzdata/dist/northamerica vendor/tzdata/dist/southamerica vendor/tzdata/dist/zone.tab vendor/tzdata/dist/zone1970.tab Modified: vendor/tzdata/dist/antarctica ============================================================================== --- vendor/tzdata/dist/antarctica Fri Mar 6 20:53:56 2015 (r279703) +++ vendor/tzdata/dist/antarctica Fri Mar 6 21:41:35 2015 (r279704) @@ -47,8 +47,8 @@ Rule ChileAQ 2009 only - Mar Sun>=9 3:00 Rule ChileAQ 2010 only - Apr Sun>=1 3:00u 0 - Rule ChileAQ 2011 only - May Sun>=2 3:00u 0 - Rule ChileAQ 2011 only - Aug Sun>=16 4:00u 1:00 S -Rule ChileAQ 2012 max - Apr Sun>=23 3:00u 0 - -Rule ChileAQ 2012 max - Sep Sun>=2 4:00u 1:00 S +Rule ChileAQ 2012 2015 - Apr Sun>=23 3:00u 0 - +Rule ChileAQ 2012 2014 - Sep Sun>=2 4:00u 1:00 S # Argentina - year-round bases # Belgrano II, Confin Coast, -770227-0343737, since 1972-02-05 @@ -354,9 +354,10 @@ Zone Antarctica/Rothera 0 - zzz 1976 Dec # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Antarctica/Palmer 0 - zzz 1965 - -4:00 ArgAQ AR%sT 1969 Oct 5 + -4:00 ArgAQ AR%sT 1969 Oct 5 -3:00 ArgAQ AR%sT 1982 May - -4:00 ChileAQ CL%sT + -4:00 ChileAQ CL%sT 2015 Apr 26 3:00u + -3:00 - CLT # # # McMurdo Station, Ross Island, since 1955-12 Modified: vendor/tzdata/dist/asia ============================================================================== --- vendor/tzdata/dist/asia Fri Mar 6 20:53:56 2015 (r279703) +++ vendor/tzdata/dist/asia Fri Mar 6 21:41:35 2015 (r279704) @@ -145,10 +145,7 @@ Zone Asia/Baku 3:19:24 - LMT 1924 May 2 4:00 Azer AZ%sT # Bahrain -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Asia/Bahrain 3:22:20 - LMT 1920 # Manamah - 4:00 - GST 1972 Jun - 3:00 - AST +# See Asia/Qatar. # Bangladesh # From Alexander Krivenyshev (2009-05-13): @@ -1731,9 +1728,7 @@ Zone Asia/Pyongyang 8:23:00 - LMT 1908 A ############################################################################### # Kuwait -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Asia/Kuwait 3:11:56 - LMT 1950 - 3:00 - AST +# See Asia/Riyadh. # Laos # See Asia/Bangkok. @@ -1954,12 +1949,7 @@ Zone Asia/Kathmandu 5:41:16 - LMT 1920 5:45 - NPT # Nepal Time # Oman - -# Milne says 3:54:24 was the meridian of the Muscat Tidal Observatory. - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Asia/Muscat 3:54:24 - LMT 1920 - 4:00 - GST +# See Asia/Dubai. # Pakistan @@ -2453,6 +2443,7 @@ Zone Asia/Manila -15:56:00 - LMT 1844 De Zone Asia/Qatar 3:26:08 - LMT 1920 # Al Dawhah / Doha 4:00 - GST 1972 Jun 3:00 - AST +Link Asia/Qatar Asia/Bahrain # Saudi Arabia # @@ -2479,6 +2470,8 @@ Zone Asia/Qatar 3:26:08 - LMT 1920 # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Riyadh 3:06:52 - LMT 1947 Mar 14 3:00 - AST +Link Asia/Riyadh Asia/Aden # Yemen +Link Asia/Riyadh Asia/Kuwait # Singapore # taken from Mok Ly Yng (2003-10-30) @@ -2767,6 +2760,7 @@ Zone Asia/Ashgabat 3:53:32 - LMT 1924 Ma # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Dubai 3:41:12 - LMT 1920 4:00 - GST +Link Asia/Dubai Asia/Muscat # Oman # Uzbekistan # Byalokoz 1919 says Uzbekistan was 4:27:53. @@ -2851,10 +2845,4 @@ Zone Asia/Ho_Chi_Minh 7:06:40 - LMT 1906 7:00 - ICT # Yemen - -# Milne says 2:59:54 was the meridian of the saluting battery at Aden, -# and that Yemen was at 1:55:56, the meridian of the Hagia Sophia. - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Asia/Aden 2:59:54 - LMT 1950 - 3:00 - AST +# See Asia/Riyadh. Modified: vendor/tzdata/dist/backward ============================================================================== --- vendor/tzdata/dist/backward Fri Mar 6 20:53:56 2015 (r279703) +++ vendor/tzdata/dist/backward Fri Mar 6 21:41:35 2015 (r279704) @@ -5,7 +5,7 @@ # and their old names. Many names changed in late 1993. # Link TARGET LINK-NAME -Link Africa/Asmara Africa/Asmera +Link Africa/Nairobi Africa/Asmera Link Africa/Abidjan Africa/Timbuktu Link America/Argentina/Catamarca America/Argentina/ComodRivadavia Link America/Adak America/Atka Modified: vendor/tzdata/dist/europe ============================================================================== --- vendor/tzdata/dist/europe Fri Mar 6 20:53:56 2015 (r279703) +++ vendor/tzdata/dist/europe Fri Mar 6 21:41:35 2015 (r279704) @@ -1407,35 +1407,32 @@ Zone Europe/Budapest 1:16:20 - LMT 1890 # might be a reference to the Julian calendar as opposed to Gregorian, or it # might mean something else (???). # -# From Paul Eggert (2006-03-22): -# The Iceland Almanak, Shanks & Pottenger, and Whitman disagree on many points. -# We go with the Almanak, except for one claim from Shanks & Pottenger, namely -# that Reykavik was 21W57 from 1837 to 1908, local mean time before that. +# From Paul Eggert (2014-11-22): +# The information below is taken from the 1988 Almanak; see +# http://www.almanak.hi.is/klukkan.html # # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Iceland 1917 1918 - Feb 19 23:00 1:00 S +Rule Iceland 1917 1919 - Feb 19 23:00 1:00 S Rule Iceland 1917 only - Oct 21 1:00 0 - -Rule Iceland 1918 only - Nov 16 1:00 0 - +Rule Iceland 1918 1919 - Nov 16 1:00 0 - +Rule Iceland 1921 only - Mar 19 23:00 1:00 S +Rule Iceland 1921 only - Jun 23 1:00 0 - Rule Iceland 1939 only - Apr 29 23:00 1:00 S -Rule Iceland 1939 only - Nov 29 2:00 0 - +Rule Iceland 1939 only - Oct 29 2:00 0 - Rule Iceland 1940 only - Feb 25 2:00 1:00 S -Rule Iceland 1940 only - Nov 3 2:00 0 - -Rule Iceland 1941 only - Mar 2 1:00s 1:00 S -Rule Iceland 1941 only - Nov 2 1:00s 0 - -Rule Iceland 1942 only - Mar 8 1:00s 1:00 S -Rule Iceland 1942 only - Oct 25 1:00s 0 - +Rule Iceland 1940 1941 - Nov Sun>=2 1:00s 0 - +Rule Iceland 1941 1942 - Mar Sun>=2 1:00s 1:00 S # 1943-1946 - first Sunday in March until first Sunday in winter Rule Iceland 1943 1946 - Mar Sun>=1 1:00s 1:00 S -Rule Iceland 1943 1948 - Oct Sun>=22 1:00s 0 - +Rule Iceland 1942 1948 - Oct Sun>=22 1:00s 0 - # 1947-1967 - first Sunday in April until first Sunday in winter Rule Iceland 1947 1967 - Apr Sun>=1 1:00s 1:00 S -# 1949 Oct transition delayed by 1 week +# 1949 and 1967 Oct transitions delayed by 1 week Rule Iceland 1949 only - Oct 30 1:00s 0 - Rule Iceland 1950 1966 - Oct Sun>=22 1:00s 0 - Rule Iceland 1967 only - Oct 29 1:00s 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Atlantic/Reykjavik -1:27:24 - LMT 1837 - -1:27:48 - RMT 1908 # Reykjavik Mean Time? +Zone Atlantic/Reykjavik -1:28 - LMT 1908 -1:00 Iceland IS%sT 1968 Apr 7 1:00s 0:00 - GMT Modified: vendor/tzdata/dist/leap-seconds.list ============================================================================== --- vendor/tzdata/dist/leap-seconds.list Fri Mar 6 20:53:56 2015 (r279703) +++ vendor/tzdata/dist/leap-seconds.list Fri Mar 6 21:41:35 2015 (r279704) @@ -47,7 +47,7 @@ # and can be ignored for many purposes. These differences # are tabulated in Circular T, which is published monthly # by the International Bureau of Weights and Measures -# (BIPM). See www.bipm.fr for more information. +# (BIPM). See www.bipm.org for more information. # # 3. The current definition of the relationship between UTC # and TAI dates from 1 January 1972. A number of different @@ -127,6 +127,15 @@ # with, since the difficulty of unambiguously representing the epoch # during the leap second does not arise. # +# Some systems implement leap seconds by amortizing the leap second +# over the last few minutes of the day. The frequency of the local +# clock is decreased (or increased) to realize the positive (or +# negative) leap second. This method removes the time step described +# above. Although the long-term behavior of the time scale is correct +# in this case, this method introduces an error during the adjustment +# period both in time and in frequency with respect to the official +# defintion of UTC. +# # Questions or comments to: # Judah Levine # Time and Frequency Division @@ -134,7 +143,7 @@ # Boulder, Colorado # Judah.Levine@nist.gov # -# Last Update of leap second values: 11 January 2012 +# Last Update of leap second values: 5 January 2015 # # The following line shows this last update date in NTP timestamp # format. This is the date on which the most recent change to @@ -142,7 +151,7 @@ # be identified by the unique pair of characters in the first two # columns as shown below. # -#$ 3535228800 +#$ 3629404800 # # The NTP timestamps are in units of seconds since the NTP epoch, # which is 1 January 1900, 00:00:00. The Modified Julian Day number @@ -190,10 +199,10 @@ # current -- the update time stamp, the data and the name of the file # will not change. # -# Updated through IERS Bulletin C48 -# File expires on: 28 June 2015 +# Updated through IERS Bulletin C49 +# File expires on: 28 December 2015 # -#@ 3644438400 +#@ 3660249600 # 2272060800 10 # 1 Jan 1972 2287785600 11 # 1 Jul 1972 @@ -221,6 +230,7 @@ 3345062400 33 # 1 Jan 2006 3439756800 34 # 1 Jan 2009 3550089600 35 # 1 Jul 2012 +3644697600 36 # 1 Jul 2015 # # the following special comment contains the # hash value of the data in this file computed @@ -236,4 +246,4 @@ # the hash line is also ignored in the # computation. # -#h a4862ccd c6f43c6 964f3604 85944a26 b5cfad4e +#h 45e70fa7 a9df2033 f4a49ab0 ec648273 7b6c22c Modified: vendor/tzdata/dist/northamerica ============================================================================== --- vendor/tzdata/dist/northamerica Fri Mar 6 20:53:56 2015 (r279703) +++ vendor/tzdata/dist/northamerica Fri Mar 6 21:41:35 2015 (r279704) @@ -124,7 +124,7 @@ Rule US 1918 1919 - Mar lastSun 2:00 1:0 Rule US 1918 1919 - Oct lastSun 2:00 0 S Rule US 1942 only - Feb 9 2:00 1:00 W # War Rule US 1945 only - Aug 14 23:00u 1:00 P # Peace -Rule US 1945 only - Sep 30 2:00 0 S +Rule US 1945 only - Sep lastSun 2:00 0 S Rule US 1967 2006 - Oct lastSun 2:00 0 S Rule US 1967 1973 - Apr lastSun 2:00 1:00 D Rule US 1974 only - Jan 6 2:00 1:00 D @@ -2124,11 +2124,11 @@ Zone America/Dawson -9:17:40 - LMT 1900 # Mexico -# From Paul Eggert (2001-03-05): +# From Paul Eggert (2014-12-07): # The Investigation and Analysis Service of the # Mexican Library of Congress (MLoC) has published a # history of Mexican local time (in Spanish) -# http://www.cddhcu.gob.mx/bibliot/publica/inveyana/polisoc/horver/ +# http://www.diputados.gob.mx/bibliot/publica/inveyana/polisoc/horver/index.htm # # Here are the discrepancies between Shanks & Pottenger (S&P) and the MLoC. # (In all cases we go with the MLoC.) @@ -2297,6 +2297,24 @@ Zone America/Dawson -9:17:40 - LMT 1900 # efecto desde las dos horas del segundo domingo de marzo y concluirá a # las dos horas del primer domingo de noviembre. +# From Steffen Thorsen (2014-12-08), translated by Gwillim Law: +# The Mexican state of Quintana Roo will likely change to EST in 2015. +# +# http://www.unioncancun.mx/articulo/2014/12/04/medio-ambiente/congreso-aprueba-una-hora-mas-de-sol-en-qroo +# "With this change, the time conflict that has existed between the municipios +# of Quintana Roo and the municipio of Felipe Carrillo Puerto may come to an +# end. The latter declared itself in rebellion 15 years ago when a time change +# was initiated in Mexico, and since then it has refused to change its time +# zone along with the rest of the country." +# +# From Steffen Thorsen (2015-01-14), translated by Gwillim Law: +# http://sipse.com/novedades/confirman-aplicacion-de-nueva-zona-horaria-para-quintana-roo-132331.html +# "...the new time zone will come into effect at two o'clock on the first Sunday +# of February, when we will have to advance the clock one hour from its current +# time..." +# +# Also, the new zone will not use DST. + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Mexico 1939 only - Feb 5 0:00 1:00 D Rule Mexico 1939 only - Jun 25 0:00 0 S @@ -2317,7 +2335,8 @@ Rule Mexico 2002 max - Oct lastSun 2:00 Zone America/Cancun -5:47:04 - LMT 1922 Jan 1 0:12:56 -6:00 - CST 1981 Dec 23 -5:00 Mexico E%sT 1998 Aug 2 2:00 - -6:00 Mexico C%sT + -6:00 Mexico C%sT 2015 Feb 1 2:00 + -5:00 - EST # Campeche, Yucatán; represented by Mérida Zone America/Merida -5:58:28 - LMT 1922 Jan 1 0:01:32 -6:00 - CST 1981 Dec 23 Modified: vendor/tzdata/dist/southamerica ============================================================================== --- vendor/tzdata/dist/southamerica Fri Mar 6 20:53:56 2015 (r279703) +++ vendor/tzdata/dist/southamerica Fri Mar 6 21:41:35 2015 (r279704) @@ -1206,6 +1206,11 @@ Zone America/Rio_Branco -4:31:12 - LMT 1 # DST Start: first Saturday of September 2014 (Sun 07 Sep 2014 04:00 UTC) # http://www.diariooficial.interior.gob.cl//media/2014/02/19/do-20140219.pdf +# From Juan Correa (2015-01-28): +# ... today the Ministry of Energy announced that Chile will drop DST, will keep +# "summer time" (UTC -3 / UTC -5) all year round.... +# http://www.minenergia.cl/ministerio/noticias/generales/ministerio-de-energia-anuncia.html + # NOTE: ChileAQ rules for Antarctic bases are stored separately in the # 'antarctica' file. @@ -1247,8 +1252,8 @@ Rule Chile 2009 only - Mar Sun>=9 3:00u Rule Chile 2010 only - Apr Sun>=1 3:00u 0 - Rule Chile 2011 only - May Sun>=2 3:00u 0 - Rule Chile 2011 only - Aug Sun>=16 4:00u 1:00 S -Rule Chile 2012 max - Apr Sun>=23 3:00u 0 - -Rule Chile 2012 max - Sep Sun>=2 4:00u 1:00 S +Rule Chile 2012 2015 - Apr Sun>=23 3:00u 0 - +Rule Chile 2012 2014 - Sep Sun>=2 4:00u 1:00 S # IATA SSIM anomalies: (1992-02) says 1992-03-14; # (1996-09) says 1998-03-08. Ignore these. # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -1259,11 +1264,13 @@ Zone America/Santiago -4:42:46 - LMT 189 -4:00 - CLT 1919 Jul 1 # Chile Time -4:42:46 - SMT 1927 Sep 1 # Santiago Mean Time -5:00 Chile CL%sT 1947 May 22 # Chile Time - -4:00 Chile CL%sT + -4:00 Chile CL%sT 2015 Apr 26 3:00u + -3:00 - CLT Zone Pacific/Easter -7:17:44 - LMT 1890 -7:17:28 - EMT 1932 Sep # Easter Mean Time - -7:00 Chile EAS%sT 1982 Mar 13 21:00 # Easter Time - -6:00 Chile EAS%sT + -7:00 Chile EAS%sT 1982 Mar 13 3:00u # Easter Time + -6:00 Chile EAS%sT 2015 Apr 26 3:00u + -5:00 - EAST # # Salas y Gómez Island is uninhabited. # Other Chilean locations, including Juan Fernández Is, Desventuradas Is, Modified: vendor/tzdata/dist/zone.tab ============================================================================== --- vendor/tzdata/dist/zone.tab Fri Mar 6 20:53:56 2015 (r279703) +++ vendor/tzdata/dist/zone.tab Fri Mar 6 21:41:35 2015 (r279704) @@ -274,7 +274,7 @@ MU -2010+05730 Indian/Mauritius MV +0410+07330 Indian/Maldives MW -1547+03500 Africa/Blantyre MX +1924-09909 America/Mexico_City Central Time - most locations -MX +2105-08646 America/Cancun Central Time - Quintana Roo +MX +2105-08646 America/Cancun Eastern Standard Time - Quintana Roo MX +2058-08937 America/Merida Central Time - Campeche, Yucatan MX +2540-10019 America/Monterrey Mexican Central Time - Coahuila, Durango, Nuevo Leon, Tamaulipas away from US border MX +2550-09730 America/Matamoros US Central Time - Coahuila, Durango, Nuevo Leon, Tamaulipas near US border Modified: vendor/tzdata/dist/zone1970.tab ============================================================================== --- vendor/tzdata/dist/zone1970.tab Fri Mar 6 20:53:56 2015 (r279703) +++ vendor/tzdata/dist/zone1970.tab Fri Mar 6 21:41:35 2015 (r279704) @@ -233,7 +233,7 @@ MT +3554+01431 Europe/Malta MU -2010+05730 Indian/Mauritius MV +0410+07330 Indian/Maldives MX +1924-09909 America/Mexico_City Central Time - most locations -MX +2105-08646 America/Cancun Central Time - Quintana Roo +MX +2105-08646 America/Cancun Eastern Standard Time - Quintana Roo MX +2058-08937 America/Merida Central Time - Campeche, Yucatán MX +2540-10019 America/Monterrey Mexican Central Time - Coahuila, Durango, Nuevo León, Tamaulipas away from US border MX +2550-09730 America/Matamoros US Central Time - Coahuila, Durango, Nuevo León, Tamaulipas near US border From owner-svn-src-vendor@FreeBSD.ORG Fri Mar 6 21:43:41 2015 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A70E020B; Fri, 6 Mar 2015 21:43:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7873F84E; Fri, 6 Mar 2015 21:43:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t26Lhf2o097952; Fri, 6 Mar 2015 21:43:41 GMT (envelope-from edwin@FreeBSD.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t26LhfRh097951; Fri, 6 Mar 2015 21:43:41 GMT (envelope-from edwin@FreeBSD.org) Message-Id: <201503062143.t26LhfRh097951@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: edwin set sender to edwin@FreeBSD.org using -f From: Edwin Groothuis Date: Fri, 6 Mar 2015 21:43:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r279705 - vendor/tzdata/tzdata2015a X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2015 21:43:41 -0000 Author: edwin Date: Fri Mar 6 21:43:40 2015 New Revision: 279705 URL: https://svnweb.freebsd.org/changeset/base/279705 Log: Tag of tzdata 2015a Added: vendor/tzdata/tzdata2015a/ - copied from r279704, vendor/tzdata/dist/