From d0b1fe6f9a58693bd7019003e76511d11475c1da Mon Sep 17 00:00:00 2001 From: David Phillips Date: Mon, 11 Dec 2017 19:37:37 +1300 Subject: Don't require GNU extensions for va args --- sand-leek.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'sand-leek.c') diff --git a/sand-leek.c b/sand-leek.c index 02e9464..0a85138 100644 --- a/sand-leek.c +++ b/sand-leek.c @@ -43,29 +43,25 @@ static volatile char working; /* "Bare" eprintf that does not change colour, apply prefix, etc. * Only directs information to the appropriate stream */ -#define eprintf_bare(format, ...) \ - fprintf(stderr, \ - format, \ - ##__VA_ARGS__) +#define eprintf_bare(...) \ + fprintf(stderr, __VA_ARGS__) /* "Real" eprintf, error printf. Outputs a message to stderr, prefixed and * coloured all fancy */ -#define eprintf(format, ...) \ +#define eprintf(...) \ iprintf_bare(COLOUR_BOLD_OFF COLOUR_RED "ERROR: " \ - COLOUR_BWHITE format, ##__VA_ARGS__); + COLOUR_BWHITE __VA_ARGS__); /* "Bare" iprintf that does not change colour, apply prefix, etc. * Only directs information to the appropriate stream */ -#define iprintf_bare(format, ...) \ - fprintf(stderr, \ - format, \ - ##__VA_ARGS__) +#define iprintf_bare(...) \ + fprintf(stderr, __VA_ARGS__) /* "Real" iprintf, information printf. Outputs a message to stderr, prefixed * and coloured all fancy */ -#define iprintf(format, ...) \ +#define iprintf(...) \ iprintf_bare(COLOUR_BOLD_OFF COLOUR_CYAN "INFO: " \ - COLOUR_BWHITE format, ##__VA_ARGS__); + COLOUR_BWHITE __VA_ARGS__); void* work(void *arg) { char onion[17]; -- cgit v1.1