4 #ifndef RZ_LIBDEMANGLE_UTIL_H
5 #define RZ_LIBDEMANGLE_UTIL_H
21 #define RZ_NEW0(x) (x *)calloc(1, sizeof(x))
22 #define RZ_NEW(x) (x *)malloc(sizeof(x))
33 #if defined(__GNUC__) && __GNUC__ >= 4
34 #define RZ_API __attribute__((visibility("default")))
35 #elif defined(_MSC_VER)
36 #define RZ_API __declspec(dllexport)
41 #define IS_UPPER(c) ((c) >= 'A' && (c) <= 'Z')
42 #define IS_DIGIT(x) ((x) >= '0' && (x) <= '9')
43 #define RZ_MIN(x, y) (((x) > (y)) ? (y) : (x))
44 #define RZ_STR_ISEMPTY(x) (!(x) || !*(x))
81 #define dem_list_foreach_prev(list, it, pos) \
83 for (it = list->tail; it && (pos = it->data, 1); it = it->p)
85 #define dem_list_head(x) ((x) ? (x)->head : NULL)
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset struct stat static buf void long static basep static whence static length const void static len key
void dem_list_free(DemList *list)
char * dem_str_ndup(const char *ptr, int len)
DemListIter * dem_list_append(DemList *list, void *data)
char * dem_string_drain(DemString *ds)
char * dem_str_replace(char *str, const char *key, const char *val, int g)
ut32 dem_list_length(const DemList *list)
void * dem_list_get_n(const DemList *list, ut32 n)
void dem_string_free(DemString *ds)
DemString * dem_string_new()
char * dem_str_newf(const char *fmt,...)
void(* DemListFree)(void *ptr)
char * dem_str_append(char *ptr, const char *string)
bool dem_string_append(DemString *ds, const char *string)
bool dem_string_appendf(DemString *ds, const char *fmt,...)
bool dem_string_append_n(DemString *ds, const char *string, size_t size)
DemList * dem_list_newf(DemListFree f)
struct dem_list_t DemList
void dem_string_replace_char(DemString *ds, char ch, char rp)
struct dem_list_iter_t DemListIter
void dem_str_replace_char(char *string, size_t size, char ch, char rp)
static void list(RzEgg *egg)
struct dem_list_iter_t * n
struct dem_list_iter_t * p