summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/c.h6
-rw-r--r--include/strutils.h7
2 files changed, 2 insertions, 11 deletions
diff --git a/include/c.h b/include/c.h
index f89e065b2..9c676ff04 100644
--- a/include/c.h
+++ b/include/c.h
@@ -216,12 +216,6 @@ errmsg(char doexit, int excode, char adderr, const char *fmt, ...)
exit(eval); \
})
-#define errtryh(eval) __extension__ ({ \
- fprintf(stderr, _("Try '%s -h' for more information.\n"), \
- program_invocation_short_name); \
- exit(eval); \
-})
-
static inline __attribute__((const)) int is_power_of_2(unsigned long num)
{
diff --git a/include/strutils.h b/include/strutils.h
index 28c1b5e5d..be1ba6737 100644
--- a/include/strutils.h
+++ b/include/strutils.h
@@ -9,11 +9,8 @@
#include <stdio.h>
#include <errno.h>
-/* default strtoxx_or_err() exit code */
-#ifndef STRTOXX_EXIT_CODE
-# define STRTOXX_EXIT_CODE EXIT_FAILURE
-#endif
-
+/* initialize a custom exit code for all *_or_err functions */
+extern void strutils_set_exitcode(int exit_code);
extern int parse_size(const char *str, uintmax_t *res, int *power);
extern int strtosize(const char *str, uintmax_t *res);