2020-08-24 13:38:27 +08:00
|
|
|
/* SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
*
|
|
|
|
* Copyright(c) 2020 Intel Corporation. All rights reserved.
|
|
|
|
*
|
|
|
|
* Author: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdarg.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
2021-12-01 20:32:37 +08:00
|
|
|
char *log_vasprintf(const char *format, va_list args);
|
2020-09-11 11:25:54 +08:00
|
|
|
|
|
|
|
#ifdef __GNUC__
|
|
|
|
__attribute__((format(printf, 1, 2)))
|
|
|
|
#endif
|
2021-12-01 20:32:37 +08:00
|
|
|
char *log_asprintf(const char *format, ...);
|
2020-08-24 13:38:27 +08:00
|
|
|
|
2020-09-11 11:25:54 +08:00
|
|
|
#ifdef __GNUC__
|
|
|
|
__attribute__((format(printf, 1, 2)))
|
|
|
|
#endif
|
2020-08-31 20:15:35 +08:00
|
|
|
void log_err(const char *fmt, ...);
|
2020-08-24 14:08:44 +08:00
|
|
|
|
|
|
|
/* trim whitespaces from string begin */
|
|
|
|
char *ltrim(char *s);
|
|
|
|
|
|
|
|
/* trim whitespaces from string end */
|
|
|
|
char *rtrim(char *s);
|
|
|
|
|
|
|
|
/* trim whitespaces from string begin and end*/
|
|
|
|
char *trim(char *s);
|