1 /* SPDX-License-Identifier: LGPL-2.1 */
11 /* Can be overridden */
12 void warning(const char *fmt, ...);
13 void pr_stat(const char *fmt, ...);
14 void vpr_stat(const char *fmt, va_list ap);
16 /* Always available */
17 void __warning(const char *fmt, ...);
18 void __pr_stat(const char *fmt, ...);
20 void __vwarning(const char *fmt, ...);
21 void __vpr_stat(const char *fmt, ...);
23 #define min(x, y) ({ \
24 typeof(x) _min1 = (x); \
25 typeof(y) _min2 = (y); \
26 (void) (&_min1 == &_min2); \
27 _min1 < _min2 ? _min1 : _min2; })
29 static inline char *strim(char *string)
36 if (!isspace(*string))
42 string = ret + strlen(ret) - 1;
43 while (string > ret) {
44 if (!isspace(*string))
53 static inline int has_text(const char *text)