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