Import libxo-1.3.1:
- handle argv[0] without '/' - add test case for argv[0] without '/'
This commit is contained in:
commit
67322d1642
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=354455
@ -12,7 +12,7 @@
|
||||
#
|
||||
|
||||
AC_PREREQ(2.2)
|
||||
AC_INIT([libxo], [1.3.0], [phil@juniper.net])
|
||||
AC_INIT([libxo], [1.3.1], [phil@juniper.net])
|
||||
AM_INIT_AUTOMAKE([-Wall -Werror foreign -Wno-portability])
|
||||
|
||||
# Support silent build rules. Requires at least automake-1.11.
|
||||
|
@ -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';
|
||||
}
|
||||
|
@ -51,6 +51,9 @@ main (int argc, char **argv)
|
||||
{ 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)
|
||||
return 1;
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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 */
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user