X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/mLib/blobdiff_plain/2be33c7cbc32a245d360be404a5cc190f4ee0029..08bb7015a9e28c5c9d38fe05a6f6644bc21fa527:/struct/dstr.h diff --git a/struct/dstr.h b/struct/dstr.h index e1851a2..93c60e2 100644 --- a/struct/dstr.h +++ b/struct/dstr.h @@ -47,6 +47,7 @@ #include #include #include +#include #ifndef MLIB_ALLOC_H # include "alloc.h" @@ -56,6 +57,10 @@ # include "arena.h" #endif +#ifndef MLIB_MACROS_H +# include "macros.h" +#endif + /*----- Data structures ---------------------------------------------------*/ typedef struct dstr { @@ -67,6 +72,8 @@ 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@ --- * @@ -225,7 +232,7 @@ extern int dstr_vputf(dstr */*d*/, const char */*p*/, va_list */*ap*/); * 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@ --- * *