aboutsummaryrefslogtreecommitdiffstats
path: root/colorize.c
diff options
context:
space:
mode:
authorGravatar Steven Schubiger <stsc@refcnt.org> 2013-07-30 23:21:05 +0200
committerGravatar Steven Schubiger <stsc@refcnt.org> 2013-07-30 23:21:05 +0200
commit712d03dec18769c5ce00af7edfc1b5f3f35e48da (patch)
tree9812e629b517a4a8644ee8a12342974764d1b076 /colorize.c
parentfbbedc1d43af9c4fbc92611db19c617378dce2e8 (diff)
downloadcolorize-712d03dec18769c5ce00af7edfc1b5f3f35e48da.tar.gz
colorize-712d03dec18769c5ce00af7edfc1b5f3f35e48da.tar.bz2
Revert "Make vfprintf_{fail,diag} wrappers"
This reverts commit fbbedc1d43af9c4fbc92611db19c617378dce2e8. Undo as variadic macros are not allowed in C89.
Diffstat (limited to 'colorize.c')
-rw-r--r--colorize.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/colorize.c b/colorize.c
index 6cd51f7..da444e4 100644
--- a/colorize.c
+++ b/colorize.c
@@ -43,9 +43,6 @@
#define streq(s1, s2) (strcmp (s1, s2) == 0)
-#define vfprintf_fail(fmt, ...) vfprintf_name(true, fmt, __VA_ARGS__)
-#define vfprintf_diag(fmt, ...) vfprintf_name(false, fmt, __VA_ARGS__)
-
#if DEBUG
# define xmalloc(size) malloc_wrap_debug(size, __FILE__, __LINE__)
# define xcalloc(nmemb, size) calloc_wrap_debug(nmemb, size, __FILE__, __LINE__)
@@ -199,7 +196,7 @@ static void *realloc_wrap_debug (void *, size_t, const char *, unsigned int);
static void free_wrap (void **);
static char *strdup_wrap (const char *);
static char *str_concat (const char *, const char *);
-static void vfprintf_name (bool, const char *, ...);
+static void vfprintf_fail (const char *, ...);
static void stack_var (void ***, unsigned int *, unsigned int, void *);
static void release_var (void **, unsigned int, void **);
@@ -975,7 +972,7 @@ str_concat (const char *str1, const char *str2)
}
static void
-vfprintf_name (bool fatal, const char *fmt, ...)
+vfprintf_fail (const char *fmt, ...)
{
va_list ap;
fprintf (stderr, "%s: ", program_name);
@@ -983,8 +980,7 @@ vfprintf_name (bool fatal, const char *fmt, ...)
vfprintf (stderr, fmt, ap);
va_end (ap);
fprintf (stderr, "\n");
- if (fatal)
- exit (EXIT_FAILURE);
+ exit (EXIT_FAILURE);
}
static void