Factor out strbuf abstraction into its own header

This commit is contained in:
Hamish Coleman 2022-02-13 12:52:10 +00:00
parent f3e305b254
commit 7590ed51d5

View File

@ -19,15 +19,7 @@
#include "n2n.h" #include "n2n.h"
#include "edge_utils_win32.h" #include "edge_utils_win32.h"
typedef struct strbuf { #include "strbuf.h"
size_t size;
char str[];
} strbuf_t;
#define STRBUF_INIT(buf,p) do { \
buf = (void *)p; \
buf->size = sizeof(*p) - sizeof(size_t); \
} while(0)
enum n2n_mgmt_type { enum n2n_mgmt_type {
N2N_MGMT_UNKNOWN = 0, N2N_MGMT_UNKNOWN = 0,