mirror of https://github.com/D4-project/d4-core
added macro for inserting errors in the error stack
parent
741018cc2b
commit
e1ba7834c4
|
@ -89,5 +89,7 @@ int main (int argc, char* argv[])
|
|||
d4 = d4_init(confdir);
|
||||
free(confdir);
|
||||
d4_load_config(d4);
|
||||
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -6,6 +6,11 @@
|
|||
#define SZCONFVALUE 1024
|
||||
#define SZERRVALUE 1024
|
||||
|
||||
#define INSERT_ERROR(...) do { \
|
||||
if (d4->err_idx < NERRORS) \
|
||||
snprintf(d4->errors[d4->err_idx],SZERRVALUE,__VA_ARGS__); \
|
||||
} while(0)
|
||||
|
||||
typedef struct d4_header_s {
|
||||
uint8_t version;
|
||||
uint8_t type;
|
||||
|
|
Loading…
Reference in New Issue