/* This software was written by Dirk Engling It is considered beerware. Prost. Skol. Cheers or whatever. $id$ */ #ifndef OT_FMT_H__ #define OT_FMT_H__ #include /* Appending to a cursor that walks a fixed buffer. Both take the cursor by reference and advance it, so a reply is written as a run of statements and no caller does pointer arithmetic of its own. */ void fmt_append(char **cursor, const char *end, const char *format, ...) __attribute__((format(printf, 3, 4))); /* Append raw bytes for the binary stretches of a bencoded reply. Either everything is appended or nothing at all */ void fmt_bytes(char **cursor, const char *end, const void *bytes, size_t length); #endif