Import libxo-0.8.1 with official fix to today's build break.

Submitted by:	phil
This commit is contained in:
phil 2017-06-09 03:32:49 +00:00
parent 4623d5ec30
commit f408ea744d
5 changed files with 26 additions and 13 deletions

View File

@ -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.

View File

@ -22011,7 +22011,7 @@ jQuery(function ($) {
</tr>
<tr>
<td class="header left"></td>
<td class="header right">June 3, 2017</td>
<td class="header right">June 8, 2017</td>
</tr>
</table></div>
<p id="title" class="title">libxo: The Easy Way to Generate text, XML, JSON, and HTML output<br><span class="filename">libxo-manual</span></p>

View File

@ -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_warn,
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_warn,
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_warn,
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_warn,
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_warn,
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 *fmt, va_list vap)
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 *fmt, va_list vap)
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 *fmt, va_list vap)
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 *fmt, va_list vap)
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 *fmt, va_list vap)
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 *fmt, va_list vap)
case XO_STYLE_HTML:
if (XOIF_ISSET(xop, XOIF_DIV_OPEN)) {
static char div_close[] = "</div>";
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;

View File

@ -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

View File

@ -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 */