aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Phillips <david@sighup.nz>2017-12-11 19:37:37 +1300
committerDavid Phillips <david@sighup.nz>2017-12-11 19:37:56 +1300
commitd0b1fe6f9a58693bd7019003e76511d11475c1da (patch)
tree450f138bfb69aed7c149952d12cdf73e1aeb2541
parentcf9da83f2b78278a4a527803113d5050ad8100a5 (diff)
downloadsand-leek-fancy-monitor.tar.xz
Don't require GNU extensions for va argsfancy-monitor
-rw-r--r--sand-leek.c20
1 files changed, 8 insertions, 12 deletions
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];