equal
deleted
inserted
replaced
42 #define ERROR error_exit(__FILE__,__LINE__) |
42 #define ERROR error_exit(__FILE__,__LINE__) |
43 #define ERROR_MSG(msg, ...) error_exit(__FILE__,__LINE__, msg) |
43 #define ERROR_MSG(msg, ...) error_exit(__FILE__,__LINE__, msg) |
44 // #define ERROR_MSG(msg, ...) error_exit(__FILE__,__LINE__, msg, __VA_ARGS__) |
44 // #define ERROR_MSG(msg, ...) error_exit(__FILE__,__LINE__, msg, __VA_ARGS__) |
45 |
45 |
46 extern void error_exit(const char *file_name, int line_no, const char *errmsg = NULL, ...); |
46 extern void error_exit(const char *file_name, int line_no, const char *errmsg = NULL, ...); |
47 |
|
48 |
|
49 |
47 |
50 |
48 |
51 |
49 |
52 |
50 |
53 /* Get the definition of INT16_MAX, INT16_MIN, UINT64_MAX, INT64_MAX, INT64_MIN, ... */ |
51 /* Get the definition of INT16_MAX, INT16_MIN, UINT64_MAX, INT64_MAX, INT64_MIN, ... */ |
120 #error Could not find the macro that defines the value for NAN in the current platform. |
118 #error Could not find the macro that defines the value for NAN in the current platform. |
121 #endif |
119 #endif |
122 |
120 |
123 |
121 |
124 |
122 |
|
123 /* get the printf format macros for printing variables of fixed data size |
|
124 * e.g. int64_t v; printf("value=%"PRId64" !!\n", v); |
|
125 * e.g. uint64_t v; printf("value=%"PRIu64" !!\n", v); |
|
126 * e.g. uint64_t v; printf("value=%"PRIx64" !!\n", v); // hexadecimal format |
|
127 */ |
|
128 #define __STDC_FORMAT_MACROS |
|
129 #include <inttypes.h> |
125 |
130 |
126 |
131 |
127 #endif // #ifndef _MAIN_HH |
132 #endif // #ifndef _MAIN_HH |