summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2018-11-18 13:52:55 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2018-11-18 13:52:55 +0100
commit21fcced971129ae4fbf9c9de3cfdec4cf96a46cf (patch)
treed271caf192414f80b30df39e827bd14e2e083eb0
parentec30c5e79707dfb6a52b0e5f7dd476374888e89c (diff)
parent9ab517d65bbe24869c2c449a52eb17f572d1ac8d (diff)
Update upstream source from tag 'upstream/3.24'
Update to upstream version '3.24' with Debian dir 0a6e08a83f1f2a2aa8e726c19c24ed27cb08f134
-rwxr-xr-xconfigure20
-rw-r--r--configure.ac2
-rw-r--r--doc/changelog.txt7
-rw-r--r--doc/libHX_Documentation.lyx2
-rw-r--r--doc/libHX_Documentation.pdfbin507683 -> 507850 bytes
-rw-r--r--include/libHX/list.h14
-rw-r--r--include/libHX/option.h6
-rw-r--r--src/opt.c28
8 files changed, 43 insertions, 36 deletions
diff --git a/configure b/configure
index ccbfcdb..2e849c1 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for libHX 3.23.
+# Generated by GNU Autoconf 2.69 for libHX 3.24.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -587,8 +587,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='libHX'
PACKAGE_TARNAME='libhx'
-PACKAGE_VERSION='3.23'
-PACKAGE_STRING='libHX 3.23'
+PACKAGE_VERSION='3.24'
+PACKAGE_STRING='libHX 3.24'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1342,7 +1342,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures libHX 3.23 to adapt to many kinds of systems.
+\`configure' configures libHX 3.24 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1412,7 +1412,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of libHX 3.23:";;
+ short | recursive ) echo "Configuration of libHX 3.24:";;
esac
cat <<\_ACEOF
@@ -1527,7 +1527,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-libHX configure 3.23
+libHX configure 3.24
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2253,7 +2253,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by libHX $as_me 3.23, which was
+It was created by libHX $as_me 3.24, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -3119,7 +3119,7 @@ fi
# Define the identity of the package.
PACKAGE='libhx'
- VERSION='3.23'
+ VERSION='3.24'
cat >>confdefs.h <<_ACEOF
@@ -17720,7 +17720,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by libHX $as_me 3.23, which was
+This file was extended by libHX $as_me 3.24, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -17786,7 +17786,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-libHX config.status 3.23
+libHX config.status 3.24
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index 04ff937..f03a863 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-AC_INIT([libHX], [3.23])
+AC_INIT([libHX], [3.24])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
diff --git a/doc/changelog.txt b/doc/changelog.txt
index 6ce5889..9aff713 100644
--- a/doc/changelog.txt
+++ b/doc/changelog.txt
@@ -1,5 +1,12 @@
+v3.24 (2018-10-17)
+==================
+Fixes:
+- defs: avoid compiler warning when using HX_list_for_each when used in C++
+- opt: synchronize HXOPT_AUTOHELP C behavior to C++ mode
+
+
v3.23 (2018-08-28)
==================
Enhancements:
diff --git a/doc/libHX_Documentation.lyx b/doc/libHX_Documentation.lyx
index afaff61..a28f1c6 100644
--- a/doc/libHX_Documentation.lyx
+++ b/doc/libHX_Documentation.lyx
@@ -91,7 +91,7 @@
\begin_body
\begin_layout Title
-libHX 3.23
+libHX 3.24
\begin_inset Newline newline
\end_inset
diff --git a/doc/libHX_Documentation.pdf b/doc/libHX_Documentation.pdf
index 40e8c81..1e9db69 100644
--- a/doc/libHX_Documentation.pdf
+++ b/doc/libHX_Documentation.pdf
Binary files differ
diff --git a/include/libHX/list.h b/include/libHX/list.h
index 3146c22..f226bec 100644
--- a/include/libHX/list.h
+++ b/include/libHX/list.h
@@ -63,37 +63,37 @@ static __inline__ bool HXlist_empty(const struct HXlist_head *head)
}
#define HXlist_for_each(pos, head) \
- for ((pos) = (head)->next; (pos) != static_cast(void *, (head)); \
+ for ((pos) = (head)->next; (pos) != static_cast(const void *, (head)); \
(pos) = (pos)->next)
#define HXlist_for_each_rev(pos, head) \
- for ((pos) = (head)->prev; (pos) != static_cast(void *, (head)); \
+ for ((pos) = (head)->prev; (pos) != static_cast(const void *, (head)); \
(pos) = (pos)->prev)
#define HXlist_for_each_safe(pos, n, head) \
for ((pos) = (head)->next, (n) = (pos)->next; \
- (pos) != static_cast(void *, (head)); \
+ (pos) != static_cast(const void *, (head)); \
(pos) = (n), (n) = (pos)->next)
#define HXlist_for_each_rev_safe(pos, n, head) \
for ((pos) = (head)->prev, (n) = (pos)->prev; \
- (pos) != static_cast(void *, (head)); \
+ (pos) != static_cast(const void *, (head)); \
(pos) = (n), (n) = (pos)->prev)
#define HXlist_for_each_entry(pos, head, member) \
for ((pos) = HXlist_entry((head)->next, __typeof__(*(pos)), member); \
- &(pos)->member != static_cast(void *, (head)); \
+ &(pos)->member != static_cast(const void *, (head)); \
(pos) = HXlist_entry((pos)->member.next, __typeof__(*(pos)), member))
#define HXlist_for_each_entry_rev(pos, head, member) \
for ((pos) = HXlist_entry((head)->prev, __typeof__(*(pos)), member); \
- &(pos)->member != static_cast(void *, (head)); \
+ &(pos)->member != static_cast(const void *, (head)); \
(pos) = HXlist_entry((pos)->member.prev, __typeof__(*(pos)), member))
#define HXlist_for_each_entry_safe(pos, n, head, member) \
for ((pos) = HXlist_entry((head)->next, __typeof__(*(pos)), member), \
(n) = HXlist_entry((pos)->member.next, __typeof__(*(pos)), member); \
- &(pos)->member != static_cast(void *, (head)); \
+ &(pos)->member != static_cast(const void *, (head)); \
(pos) = (n), (n) = HXlist_entry((n)->member.next, __typeof__(*(n)), \
member))
diff --git a/include/libHX/option.h b/include/libHX/option.h
index d60c3f1..82255d3 100644
--- a/include/libHX/option.h
+++ b/include/libHX/option.h
@@ -254,8 +254,10 @@ extern void HX_shconfig_free(const struct HXoption *);
# define HXOPT_TABLEEND {.type = HXTYPE_XSNTMARK}
#else
# define HXOPT_AUTOHELP \
- {NULL, '?', HXTYPE_XHELP, NULL, NULL, HX_getopt_help_cb, \
- 0, "Show this help message"}
+ {"help", '?', HXTYPE_XHELP, NULL, NULL, HX_getopt_help_cb, \
+ 0, "Show this help message"}, \
+ {"usage", 0, HXTYPE_NONE, NULL, NULL, HX_getopt_usage_cb, \
+ 0, "Display brief usage message"}
# define HXOPT_TABLEEND {NULL, 0, HXTYPE_XSNTMARK}
#endif
diff --git a/src/opt.c b/src/opt.c
index d64e521..8efbf52 100644
--- a/src/opt.c
+++ b/src/opt.c
@@ -304,22 +304,20 @@ static void opt_to_text(const struct HXoption *opt, char *buf, size_t len,
buf[i++] = opt->sh;
if (!takes_void(opt->type))
i += snprintf(buf + i, len - i, " %s", htyp);
+ } else if (opt->sh == '\0') {
+ if (takes_void(opt->type))
+ i += snprintf(buf + i, len - i,
+ "--%s", opt->ln);
+ else
+ i += snprintf(buf + i, len - i,
+ "--%s=%s", opt->ln, htyp);
} else {
- if (opt->sh == '\0') {
- if (takes_void(opt->type))
- i += snprintf(buf + i, len - i,
- "--%s", opt->ln);
- else
- i += snprintf(buf + i, len - i,
- "--%s=%s", opt->ln, htyp);
- } else {
- if (takes_void(opt->type))
- i += snprintf(buf + i, len - i, "-%c%s--%s",
- opt->sh, alt, opt->ln);
- else
- i += snprintf(buf + i, len - i, "-%c%s--%s%c%s",
- opt->sh, alt, opt->ln, equ, htyp);
- }
+ if (takes_void(opt->type))
+ i += snprintf(buf + i, len - i, "-%c%s--%s",
+ opt->sh, alt, opt->ln);
+ else
+ i += snprintf(buf + i, len - i, "-%c%s--%s%c%s",
+ opt->sh, alt, opt->ln, equ, htyp);
}
if (flags & W_BRACKET)