From owner-svn-src-head@freebsd.org Fri Jun 9 03:32:50 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1C7ED89FA6; Fri, 9 Jun 2017 03:32:50 +0000 (UTC) (envelope-from phil@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 8E0747C69D; Fri, 9 Jun 2017 03:32:50 +0000 (UTC) (envelope-from phil@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v593WnSX047008; Fri, 9 Jun 2017 03:32:49 GMT (envelope-from phil@FreeBSD.org) Received: (from phil@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v593Wnj5047003; Fri, 9 Jun 2017 03:32:49 GMT (envelope-from phil@FreeBSD.org) Message-Id: <201706090332.v593Wnj5047003@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: phil set sender to phil@FreeBSD.org using -f From: Phil Shafer Date: Fri, 9 Jun 2017 03:32:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319731 - in head: contrib/libxo contrib/libxo/doc contrib/libxo/libxo lib/libxo X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jun 2017 03:32:50 -0000 Author: phil Date: Fri Jun 9 03:32:49 2017 New Revision: 319731 URL: https://svnweb.freebsd.org/changeset/base/319731 Log: Import libxo-0.8.1 with official fix to today's build break. Submitted by: phil Modified: head/contrib/libxo/configure.ac head/contrib/libxo/doc/libxo-manual.html head/contrib/libxo/libxo/libxo.c head/lib/libxo/add.man head/lib/libxo/xo_config.h Directory Properties: head/contrib/libxo/ (props changed) Modified: head/contrib/libxo/configure.ac ============================================================================== --- head/contrib/libxo/configure.ac Fri Jun 9 03:30:40 2017 (r319730) +++ head/contrib/libxo/configure.ac Fri Jun 9 03:32:49 2017 (r319731) @@ -12,7 +12,7 @@ # AC_PREREQ(2.2) -AC_INIT([libxo], [0.8.0], [phil@juniper.net]) +AC_INIT([libxo], [0.8.1], [phil@juniper.net]) AM_INIT_AUTOMAKE([-Wall -Werror foreign -Wno-portability]) # Support silent build rules. Requires at least automake-1.11. Modified: head/contrib/libxo/doc/libxo-manual.html ============================================================================== --- head/contrib/libxo/doc/libxo-manual.html Fri Jun 9 03:30:40 2017 (r319730) +++ head/contrib/libxo/doc/libxo-manual.html Fri Jun 9 03:32:49 2017 (r319731) @@ -22011,7 +22011,7 @@ jQuery(function ($) { -June 3, 2017 +June 8, 2017

libxo: The Easy Way to Generate text, XML, JSON, and HTML output
libxo-manual

Modified: head/contrib/libxo/libxo/libxo.c ============================================================================== --- head/contrib/libxo/libxo/libxo.c Fri Jun 9 03:30:40 2017 (r319730) +++ head/contrib/libxo/libxo/libxo.c Fri Jun 9 03:32:49 2017 (r319731) @@ -684,6 +684,7 @@ xo_default_init (void) #if !defined(NO_LIBXO_OPTIONS) if (!XOF_ISSET(xop, XOF_NO_ENV)) { char *env = getenv("LIBXO_OPTIONS"); + if (env) xo_set_options_simple(xop, env); @@ -1157,7 +1158,7 @@ xo_utf8_emit_len (wchar_t wc) } /* - * Emit a single wide character into the given buffer + * Emit one wide character into the given buffer */ static void xo_utf8_emit_char (char *buf, ssize_t len, wchar_t wc) @@ -1169,7 +1170,7 @@ xo_utf8_emit_char (char *buf, ssize_t len, wchar_t wc) return; } - /* Start with the low bits and insert them, six bits as a time */ + /* Start with the low bits and insert them, six bits at a time */ for (i = len - 1; i >= 0; i--) { buf[i] = 0x80 | (wc & 0x3f); wc >>= 6; /* Drop the low six bits */ @@ -1177,7 +1178,7 @@ xo_utf8_emit_char (char *buf, ssize_t len, wchar_t wc) /* Finish off the first byte with the length bits */ buf[0] &= xo_utf8_data_bits[len]; /* Clear out the length bits */ - buf[0] |= xo_utf8_len_bits[len]; /* Drop in new length bits */ + buf[0] |= xo_utf8_len_bits[len]; /* Drop in new length bits */ } /* @@ -1517,6 +1518,7 @@ xo_warn_hcv (xo_handle_t *xop, int code, int check_war newfmt[plen++] = ':'; newfmt[plen++] = ' '; } + memcpy(newfmt + plen, fmt, len); newfmt[len + plen] = '\0'; @@ -1536,6 +1538,7 @@ xo_warn_hcv (xo_handle_t *xop, int code, int check_war ssize_t left = xbp->xb_size - (xbp->xb_curp - xbp->xb_bufp); ssize_t rc = vsnprintf(xbp->xb_curp, left, newfmt, vap); + if (rc >= left) { if (!xo_buf_has_room(xbp, rc)) { va_end(va_local); @@ -1548,6 +1551,7 @@ xo_warn_hcv (xo_handle_t *xop, int code, int check_war left = xbp->xb_size - (xbp->xb_curp - xbp->xb_bufp); rc = vsnprintf(xbp->xb_curp, left, fmt, vap); } + va_end(va_local); rc = xo_escape_xml(xbp, rc, 1); @@ -1558,6 +1562,7 @@ xo_warn_hcv (xo_handle_t *xop, int code, int check_war if (code >= 0) { const char *msg = strerror(code); + if (msg) { xo_buf_append(xbp, ": ", 2); xo_buf_append(xbp, msg, strlen(msg)); @@ -1571,6 +1576,7 @@ xo_warn_hcv (xo_handle_t *xop, int code, int check_war vfprintf(stderr, newfmt, vap); if (code >= 0) { const char *msg = strerror(code); + if (msg) fprintf(stderr, ": %s", msg); } @@ -1687,6 +1693,7 @@ xo_message_hcv (xo_handle_t *xop, int code, const char va_copy(va_local, vap); ssize_t left = xbp->xb_size - (xbp->xb_curp - xbp->xb_bufp); + rc = vsnprintf(xbp->xb_curp, left, fmt, vap); if (rc >= left) { if (!xo_buf_has_room(xbp, rc)) { @@ -1700,6 +1707,7 @@ xo_message_hcv (xo_handle_t *xop, int code, const char left = xbp->xb_size - (xbp->xb_curp - xbp->xb_bufp); rc = vsnprintf(xbp->xb_curp, left, fmt, vap); } + va_end(va_local); rc = xo_escape_xml(xbp, rc, 0); @@ -1707,6 +1715,7 @@ xo_message_hcv (xo_handle_t *xop, int code, const char if (need_nl && code > 0) { const char *msg = strerror(code); + if (msg) { xo_buf_append(xbp, ": ", 2); xo_buf_append(xbp, msg, strlen(msg)); @@ -1740,6 +1749,7 @@ xo_message_hcv (xo_handle_t *xop, int code, const char va_copy(va_local, vap); rc = vsnprintf(bp, bufsiz, fmt, va_local); } + va_end(va_local); cp = bp + rc; @@ -1775,6 +1785,7 @@ xo_message_hcv (xo_handle_t *xop, int code, const char if (need_nl && code > 0) { const char *msg = strerror(code); + if (msg) { xo_printf(xop, ": %s", msg); } @@ -1789,6 +1800,7 @@ xo_message_hcv (xo_handle_t *xop, int code, const char case XO_STYLE_HTML: if (XOIF_ISSET(xop, XOIF_DIV_OPEN)) { static char div_close[] = ""; + XOIF_CLEAR(xop, XOIF_DIV_OPEN); xo_data_append(xop, div_close, sizeof(div_close) - 1); @@ -2157,6 +2169,7 @@ xo_set_style_name (xo_handle_t *xop, const char *name) return -1; int style = xo_name_to_style(name); + if (style < 0) return -1; Modified: head/lib/libxo/add.man ============================================================================== --- head/lib/libxo/add.man Fri Jun 9 03:30:40 2017 (r319730) +++ head/lib/libxo/add.man Fri Jun 9 03:32:49 2017 (r319731) @@ -3,10 +3,10 @@ .Fx uses .Nm libxo -version 0.8.0. +version 0.8.1. Complete documentation can be found on github: .Bd -literal -offset indent -http://juniper.github.io/libxo/0.8.0/libxo\-manual.html +http://juniper.github.io/libxo/0.8.1/libxo\-manual.html .Ed .Pp .Nm libxo Modified: head/lib/libxo/xo_config.h ============================================================================== --- head/lib/libxo/xo_config.h Fri Jun 9 03:30:40 2017 (r319730) +++ head/lib/libxo/xo_config.h Fri Jun 9 03:32:49 2017 (r319731) @@ -183,16 +183,16 @@ /* #undef LIBXO_TEXT_ONLY */ /* Version number as dotted value */ -#define LIBXO_VERSION "0.8.0" +#define LIBXO_VERSION "0.8.1" /* Version number extra information */ #define LIBXO_VERSION_EXTRA "" /* Version number as a number */ -#define LIBXO_VERSION_NUMBER 8000 +#define LIBXO_VERSION_NUMBER 8001 /* Version number as string */ -#define LIBXO_VERSION_STRING "8000" +#define LIBXO_VERSION_STRING "8001" /* Enable local wcwidth implementation */ #define LIBXO_WCWIDTH 1 @@ -210,7 +210,7 @@ #define PACKAGE_NAME "libxo" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "libxo 0.8.0" +#define PACKAGE_STRING "libxo 0.8.1" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "libxo" @@ -219,7 +219,7 @@ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "0.8.0" +#define PACKAGE_VERSION "0.8.1" /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -236,7 +236,7 @@ /* #undef USE_INT_RETURN_CODES */ /* Version number of package */ -#define VERSION "0.8.0" +#define VERSION "0.8.1" /* Retain hash bucket size */ /* #undef XO_RETAIN_SIZE */