#include <derive-c/core/prelude.h>
#include <stdio.h>
#include <sys/types.h>
Go to the source code of this file.
◆ dc_null_stream()
Definition at line 12 of file null_stream.h.
12 {
13 cookie_io_functions_t io = {
14 .read = NULL,
15 .write = NULL,
16 .seek = NULL,
17 .close = NULL,
18 };
19
20 FILE* f = fopencookie(NULL, "w", io);
21 DC_ASSERT(f,
"received nullptr from fopencookie");
22
23
24 DC_ASSERT(setvbuf(f, NULL, _IONBF, 0) == 0,
"setvbuf failed");
25
26 return f;
27}
#define DC_ASSERT(expr,...)