1 /* SPDX-License-Identifier: BSD-2-Clause */ 2 /* 3 * Copyright (c) 2015 Linaro Limited 4 */ 5 6 /* 7 * This file provides extensions to the standard snprintf() and vsnprintf() 8 * functions. These 'k' variants support additional formats. 9 */ 10 11 #ifndef PRINTK_H 12 #define PRINTK_H 13 14 #include <stddef.h> 15 #include <stdarg.h> 16 #include <stdbool.h> 17 18 int snprintk(char *str, size_t size, const char *fmt, ...) 19 __attribute__((__format__(__printf__, 3, 4))); 20 int vsnprintk(char *str, size_t size, const char *fmt, va_list ap) 21 __attribute__((__format__(__printf__, 3, 0))); 22 23 int __vsnprintf(char *str, size_t size, const char *fmt, va_list ap, 24 bool ext) __attribute__((__format__(__printf__, 3, 0))); 25 int __vsprintf(char *bf, const char *fmt, va_list ap) 26 __attribute__((__format__(__printf__, 2, 0))); 27 28 #endif /* PRINTK_H */ 29