57 #define NORETURN __declspec(noreturn) |
57 #define NORETURN __declspec(noreturn) |
58 #else |
58 #else |
59 #define NORETURN __attribute__((noreturn)) |
59 #define NORETURN __attribute__((noreturn)) |
60 #endif |
60 #endif |
61 |
61 |
62 /* verbosity level: |
62 /** |
63 0: only errors and warnings (E, W) |
63 * verbosity level |
64 1: major status messages (*) |
64 * |
65 2: minor status, progress (-) |
65 * - 0: only errors and warnings (E, W) |
66 3: debug messages (D) |
66 * - 1: major status messages (*) |
67 4: thread debug |
67 * - 2: minor status, progress (-) |
68 default = 2 |
68 * - 3: debug messages (D) |
69 */ |
69 * - 4: thread debug |
|
70 * |
|
71 * default is 2 |
|
72 */ |
70 extern int pyrit_verbosity; |
73 extern int pyrit_verbosity; |
71 |
74 |
|
75 /** |
|
76 * print status or debugging message |
|
77 * @param[in] vlevel verbosity level of the message |
|
78 * @see pyrit_verbosity |
|
79 */ |
72 void dbgmsg(const int vlevel, const char *format, ...); |
80 void dbgmsg(const int vlevel, const char *format, ...); |
73 |
81 |
|
82 /** template for minimum of three numbers */ |
74 template<typename Type> const Type &min3(const Type &a, const Type &b, const Type &c) |
83 template<typename Type> const Type &min3(const Type &a, const Type &b, const Type &c) |
75 { |
84 { |
76 if (a <= b) |
85 if (a <= b) |
77 { |
86 { |
78 if (a <= c) |
87 if (a <= c) |