summaryrefslogtreecommitdiff
path: root/include/libHX
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2018-11-18 13:52:53 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2018-11-18 13:52:53 +0100
commit9ab517d65bbe24869c2c449a52eb17f572d1ac8d (patch)
tree6cf2c7c9298da2de43f058988f14124c0734c10e /include/libHX
parentd45dd31e35190cf08b1e716e7c3bd1468ddd5d88 (diff)
New upstream version 3.24upstream/3.24
Diffstat (limited to 'include/libHX')
-rw-r--r--include/libHX/list.h14
-rw-r--r--include/libHX/option.h6
2 files changed, 11 insertions, 9 deletions
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