usage.c: remove unused functions
This removes three functions that are not used anywhere. Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com> Acked-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
This commit is contained in:

committed by
Shawn O. Pearce

parent
15dc66abf0
commit
07ad5a157d
@ -154,10 +154,7 @@ extern void die(const char *err, ...) NORETURN __attribute__((format (printf, 1,
|
|||||||
extern int error(const char *err, ...) __attribute__((format (printf, 1, 2)));
|
extern int error(const char *err, ...) __attribute__((format (printf, 1, 2)));
|
||||||
extern void warning(const char *err, ...) __attribute__((format (printf, 1, 2)));
|
extern void warning(const char *err, ...) __attribute__((format (printf, 1, 2)));
|
||||||
|
|
||||||
extern void set_usage_routine(void (*routine)(const char *err) NORETURN);
|
|
||||||
extern void set_die_routine(void (*routine)(const char *err, va_list params) NORETURN);
|
extern void set_die_routine(void (*routine)(const char *err, va_list params) NORETURN);
|
||||||
extern void set_error_routine(void (*routine)(const char *err, va_list params));
|
|
||||||
extern void set_warn_routine(void (*routine)(const char *warn, va_list params));
|
|
||||||
|
|
||||||
extern int prefixcmp(const char *str, const char *prefix);
|
extern int prefixcmp(const char *str, const char *prefix);
|
||||||
extern time_t tm_to_time_t(const struct tm *tm);
|
extern time_t tm_to_time_t(const struct tm *tm);
|
||||||
|
16
usage.c
16
usage.c
@ -41,27 +41,11 @@ static void (*die_routine)(const char *err, va_list params) NORETURN = die_built
|
|||||||
static void (*error_routine)(const char *err, va_list params) = error_builtin;
|
static void (*error_routine)(const char *err, va_list params) = error_builtin;
|
||||||
static void (*warn_routine)(const char *err, va_list params) = warn_builtin;
|
static void (*warn_routine)(const char *err, va_list params) = warn_builtin;
|
||||||
|
|
||||||
void set_usage_routine(void (*routine)(const char *err) NORETURN)
|
|
||||||
{
|
|
||||||
usage_routine = routine;
|
|
||||||
}
|
|
||||||
|
|
||||||
void set_die_routine(void (*routine)(const char *err, va_list params) NORETURN)
|
void set_die_routine(void (*routine)(const char *err, va_list params) NORETURN)
|
||||||
{
|
{
|
||||||
die_routine = routine;
|
die_routine = routine;
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_error_routine(void (*routine)(const char *err, va_list params))
|
|
||||||
{
|
|
||||||
error_routine = routine;
|
|
||||||
}
|
|
||||||
|
|
||||||
void set_warn_routine(void (*routine)(const char *warn, va_list params))
|
|
||||||
{
|
|
||||||
warn_routine = routine;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void usage(const char *err)
|
void usage(const char *err)
|
||||||
{
|
{
|
||||||
usage_routine(err);
|
usage_routine(err);
|
||||||
|
Reference in New Issue
Block a user