added macro for inserting errors in the error stack

pull/23/head
Gerard Wagener 2018-11-27 17:24:45 +01:00
parent 741018cc2b
commit e1ba7834c4
2 changed files with 7 additions and 0 deletions

View File

@ -89,5 +89,7 @@ int main (int argc, char* argv[])
d4 = d4_init(confdir);
free(confdir);
d4_load_config(d4);
return EXIT_SUCCESS;
}

View File

@ -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;