20 #ifndef LIBAUDCORE_CORE_H
21 #define LIBAUDCORE_CORE_H
27 #define NULL ((void *) 0)
35 #define FALSE ((bool_t) 0)
37 #define TRUE ((bool_t) 1)
40 #define MIN(a,b) ((a) < (b) ? (a) : (b))
42 #define MAX(a,b) ((a) > (b) ? (a) : (b))
44 #define CLAMP(a,min,max) ((a) < (min) ? (min) : (a) > (max) ? (max) : (a))
46 #define SPRINTF(s,...) \
47 char s[snprintf (NULL, 0, __VA_ARGS__) + 1]; \
48 snprintf (s, sizeof s, __VA_ARGS__);
53 #define STR_CHECK(str) do {if ((str) && (str)[-1] != '@') strpool_abort (str);} while (0)
60 char *
str_get (
const char * str);
76 char *
str_nget (
const char * str,
int len);
void strpool_shutdown(void)
char * str_printf(const char *format,...)
char * str_ref(char *str)
char * str_nget(const char *str, int len)
void str_unref(char *str)
void strpool_abort(char *str)
char * str_get(const char *str)