#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#ifndef MLIB_ALLOC_H
# include "alloc.h"
# include "arena.h"
#endif
+#ifndef MLIB_MACROS_H
+# include "macros.h"
+#endif
+
/*----- Data structures ---------------------------------------------------*/
typedef struct dstr {
#define DSTR_INIT { 0, 0, 0, &arena_stdlib } /* How to initialize one */
+extern const struct gprintf_ops dstr_printops;
+
/*----- Functions provided ------------------------------------------------*/
/* --- @dstr_create@ --- *
* itself is malicious.
*/
-extern int dstr_putf(dstr */*d*/, const char */*p*/, ...);
+extern PRINTF_LIKE(2, 3) int dstr_putf(dstr */*d*/, const char */*p*/, ...);
/* --- @dstr_putd@ --- *
*