Move json_value and obj_t to same file - Rename json_obj.* -> json_value.* - Move `print_json_value(...)` to json_value.* Move `err_ctx(...)` to util.* parse.h now only exposes `parse_json_value(...)`
16 lines
325 B
C
16 lines
325 B
C
|
|
#ifndef _UTIL_H
|
|
#define _UTIL_H
|
|
|
|
#include <stddef.h>
|
|
#include <stdio.h>
|
|
|
|
__attribute__((__noreturn__)) void err_ctx(int exit_code, FILE* fp, const char* format, ...);
|
|
|
|
void* malloc_or_die(size_t size);
|
|
void* realloc_or_die(void* ptr, size_t size);
|
|
void* calloc_or_die(size_t nmemb, size_t size);
|
|
void print_trace();
|
|
|
|
#endif
|