summaryrefslogtreecommitdiff
path: root/testing/misc_tools.h
diff options
context:
space:
mode:
authorAnony Moose <noMail@nomail.su>2013-08-24 20:52:20 +0000
committerAnony Moose <noMail@nomail.su>2013-08-24 20:52:20 +0000
commit39101b00a2e3666d8a65df44eaf6f44609df551b (patch)
tree14b6b8bd8bd3121b0a00391740be854e283e3ae3 /testing/misc_tools.h
parent4326c4c8b5f9e4e5ec0fd09cf1a50ae43db607a2 (diff)
Fixed style in several macros.
Diffstat (limited to 'testing/misc_tools.h')
-rw-r--r--testing/misc_tools.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/testing/misc_tools.h b/testing/misc_tools.h
index 006ddbd9..9a3d5b40 100644
--- a/testing/misc_tools.h
+++ b/testing/misc_tools.h
@@ -39,26 +39,26 @@ unsigned char *hex_string_to_bin(char hex_string[]);
39#include <string.h> 39#include <string.h>
40 40
41#define DEBUG_PRINT(str, ...) do { \ 41#define DEBUG_PRINT(str, ...) do { \
42 char msg[1000]; \ 42 char msg[1000]; \
43 sprintf(msg, "%s(): line %d (file %s): %s%%c\n", __FUNCTION__, __LINE__, __FILE__, str); \ 43 sprintf(msg, "%s(): line %d (file %s): %s%%c\n", __FUNCTION__, __LINE__, __FILE__, str); \
44 fprintf(stderr, msg, __VA_ARGS__); \ 44 fprintf(stderr, msg, __VA_ARGS__); \
45 } while (0) 45} while (0)
46 46
47#define WARNING(...) do { \ 47#define WARNING(...) do { \
48 fprintf(stderr, "warning in "); \ 48 fprintf(stderr, "warning in "); \
49 DEBUG_PRINT(__VA_ARGS__, ' '); \ 49 DEBUG_PRINT(__VA_ARGS__, ' '); \
50 } while (0) 50} while (0)
51 51
52#define INFO(...) do { \ 52#define INFO(...) do { \
53 DEBUG_PRINT(__VA_ARGS__, ' '); \ 53 DEBUG_PRINT(__VA_ARGS__, ' '); \
54 } while (0) 54} while (0)
55 55
56#undef ERROR 56#undef ERROR
57#define ERROR(exit_status, ...) do { \ 57#define ERROR(exit_status, ...) do { \
58 fprintf(stderr, "error in "); \ 58 fprintf(stderr, "error in "); \
59 DEBUG_PRINT(__VA_ARGS__, ' '); \ 59 DEBUG_PRINT(__VA_ARGS__, ' '); \
60 exit(exit_status); \ 60 exit(exit_status); \
61 } while (0) 61} while (0)
62#else 62#else
63#define WARNING(...) 63#define WARNING(...)
64#define INFO(...) 64#define INFO(...)