1 // © 2021 Qualcomm Innovation Center, Inc. All rights reserved.
2 //
3 // SPDX-License-Identifier: BSD-3-Clause
4 
5 // snprint produces null terminated output string, of maximum length not
6 // exceeding size characters (including the terminating null).
7 //
8 // Unlike the C printf family of functions, the format string is however a
9 // python format string like syntax.
10 // For example  "This is a hex value: {:x}" will print the hex representation
11 // of the corresponding argument.
12 //
13 // Not all python format string syntax is implemented, including positional
14 // arguments. The following approximate python format string syntax is
15 // accepted.
16 //	[[fill]align][sign][#][0][minimumwidth][.precision][type]
17 //
18 // This function returns the count of bytes written, up to a maximum of size-1.
19 // A return value of size or larger indicates that the output was truncated.
20 size_result_t
21 snprint(char *str, size_t size, const char *format, register_t arg0,
22 	register_t arg1, register_t arg2, register_t arg3, register_t arg4);
23