* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+/** @file lib/snprintf.c
+ * @brief UTF-8 capable *snprintf workalikes
+ */
#define NO_MEMORY_ALLOCATION
/* because used from log.c */
#include "printf.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;
};