Author: phil Date: Thu Nov 7 18:06:44 2019 New Revision: 354455 URL: https://svnweb.freebsd.org/changeset/base/354455
Log: Import libxo-1.3.1: - handle argv[0] without '/' - add test case for argv[0] without '/' Modified: head/contrib/libxo/configure.ac head/contrib/libxo/libxo/libxo.c head/contrib/libxo/tests/core/test_01.c head/lib/libxo/add.man head/lib/libxo/encoder/csv/Makefile head/lib/libxo/xo_config.h head/usr.bin/xohtml/xohtml.sh Directory Properties: head/contrib/libxo/ (props changed) Modified: head/contrib/libxo/configure.ac ============================================================================== --- head/contrib/libxo/configure.ac Thu Nov 7 18:05:38 2019 (r354454) +++ head/contrib/libxo/configure.ac Thu Nov 7 18:06:44 2019 (r354455) @@ -12,7 +12,7 @@ # AC_PREREQ(2.2) -AC_INIT([libxo], [1.3.0], [p...@juniper.net]) +AC_INIT([libxo], [1.3.1], [p...@juniper.net]) AM_INIT_AUTOMAKE([-Wall -Werror foreign -Wno-portability]) # Support silent build rules. Requires at least automake-1.11. Modified: head/contrib/libxo/libxo/libxo.c ============================================================================== --- head/contrib/libxo/libxo/libxo.c Thu Nov 7 18:05:38 2019 (r354454) +++ head/contrib/libxo/libxo/libxo.c Thu Nov 7 18:06:44 2019 (r354455) @@ -8104,12 +8104,14 @@ xo_parse_args (int argc, char **argv) cp = strrchr(xo_program, '/'); if (cp) xo_program = ++cp; + else + cp = argv[0]; /* Reset to front of string */ /* GNU tools add an annoying ".test" as the program extension; remove it */ size_t len = strlen(xo_program); static const char gnu_ext[] = ".test"; if (len >= sizeof(gnu_ext)) { - cp = &cp[len + 1 - sizeof(gnu_ext)]; + cp += len + 1 - sizeof(gnu_ext); if (xo_streq(cp, gnu_ext)) *cp = '\0'; } Modified: head/contrib/libxo/tests/core/test_01.c ============================================================================== --- head/contrib/libxo/tests/core/test_01.c Thu Nov 7 18:05:38 2019 (r354454) +++ head/contrib/libxo/tests/core/test_01.c Thu Nov 7 18:06:44 2019 (r354455) @@ -50,6 +50,9 @@ main (int argc, char **argv) { "sold", "number", "Number of items sold" }, { XO_INFO_NULL }, }; + + char name[] = "test_01.test"; /* test trimming of xo_program */ + argv[0] = name; argc = xo_parse_args(argc, argv); if (argc < 0) Modified: head/lib/libxo/add.man ============================================================================== --- head/lib/libxo/add.man Thu Nov 7 18:05:38 2019 (r354454) +++ head/lib/libxo/add.man Thu Nov 7 18:06:44 2019 (r354455) @@ -3,10 +3,10 @@ .Fx uses .Nm libxo -version 1.3.0. +version 1.3.1. Complete documentation can be found on github: .Bd -literal -offset indent -https://juniper.github.io/libxo/1.3.0/html/index.html +https://juniper.github.io/libxo/1.3.1/html/index.html .Ed .Pp .Nm libxo Modified: head/lib/libxo/encoder/csv/Makefile ============================================================================== --- head/lib/libxo/encoder/csv/Makefile Thu Nov 7 18:05:38 2019 (r354454) +++ head/lib/libxo/encoder/csv/Makefile Thu Nov 7 18:06:44 2019 (r354455) @@ -2,7 +2,7 @@ LIBXODIR= ${STAGEDIR}${PREFIX}/usr/lib/libxo/encoder SHLIBDIR?= ${LIBXODIR} -LIBDIR?= ${LIBXODIR} +LIBDIR?= ${LIBXODIR} .include <src.opts.mk> @@ -21,6 +21,7 @@ CFLAGS+=-I${LIBXOSRC}/libxo -I${.CURDIR} CFLAGS+=-DXO_ENCODERDIR=\"/usr/lib/libxo/encoder\" LIBADD= util xo +LDFLAGS += -L${.OBJDIR}/../../wildebeast WARNS?= 5 Modified: head/lib/libxo/xo_config.h ============================================================================== --- head/lib/libxo/xo_config.h Thu Nov 7 18:05:38 2019 (r354454) +++ head/lib/libxo/xo_config.h Thu Nov 7 18:06:44 2019 (r354455) @@ -183,16 +183,16 @@ /* #undef LIBXO_TEXT_ONLY */ /* Version number as dotted value */ -#define LIBXO_VERSION "1.3.0" +#define LIBXO_VERSION "1.3.1" /* Version number extra information */ #define LIBXO_VERSION_EXTRA "" /* Version number as a number */ -#define LIBXO_VERSION_NUMBER 1003000 +#define LIBXO_VERSION_NUMBER 1003001 /* Version number as string */ -#define LIBXO_VERSION_STRING "1003000" +#define LIBXO_VERSION_STRING "1003001" /* 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 1.3.0" +#define PACKAGE_STRING "libxo 1.3.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 "1.3.0" +#define PACKAGE_VERSION "1.3.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 "1.3.0" +#define VERSION "1.3.1" /* Retain hash bucket size */ /* #undef XO_RETAIN_SIZE */ Modified: head/usr.bin/xohtml/xohtml.sh ============================================================================== --- head/usr.bin/xohtml/xohtml.sh Thu Nov 7 18:05:38 2019 (r354454) +++ head/usr.bin/xohtml/xohtml.sh Thu Nov 7 18:06:44 2019 (r354455) @@ -12,7 +12,7 @@ # BASE=/usr/share/libxo -VERSION=1.3.0 +VERSION=1.3.1 CMD=cat DONE= WEB=http://juniper.github.io/libxo/${VERSION}/xohtml _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"