summaryrefslogtreecommitdiff
path: root/lib/libutils/ext/include/printk.h
blob: 0a5e103446d78a7a6bf9c22250776577eb4f37d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* SPDX-License-Identifier: BSD-2-Clause */
/*
 * Copyright (c) 2015 Linaro Limited
 */

/*
 * This file provides extensions to the standard snprintf() and vsnprintf()
 * functions. These 'k' variants support additional formats.
 */

#ifndef PRINTK_H
#define PRINTK_H

#include <stddef.h>
#include <stdarg.h>
#include <stdbool.h>

int snprintk(char *str, size_t size, const char *fmt, ...)
		    __attribute__((__format__(__printf__, 3, 4)));
int vsnprintk(char *str, size_t size, const char *fmt, va_list ap)
		    __attribute__((__format__(__printf__, 3, 0)));

int __vsnprintf(char *str, size_t size, const char *fmt, va_list ap,
		bool ext) __attribute__((__format__(__printf__, 3, 0)));

#endif /* PRINTK_H */