chiark / gitweb /
Merge branch 'master' of git.distorted.org.uk:~mdw/publish/public-git/disorder
[disorder] / lib / snprintf.c
index e62e3c9434a80c0698d5ab69141710cff950f812..27ac595d81e1f7bc8f45f98d99ca620dd8c231c7 100644 (file)
 #include <stddef.h>
 
 #include "printf.h"
+#include "log.h"
 #include "sink.h"
 
+/** @brief A @ref sink that stores to a fixed buffer
+ *
+ * If there is too much output, it is truncated.
+ */
 struct fixedstr_sink {
+  /** @brief Base */
   struct sink s;
+
+  /** @brief Output buffer */
   char *buffer;
+
+  /** @brief Bytes written so far */
   int nbytes;
+
+  /** @brief Size of buffer */
   size_t size;
 };