11 const char *
n, *
p =
str;
25 register char va = *
a;
26 register char vb = *
b;
28 if (va ==
'\0' || va ==
SDB_RS) {
38 return (va >
vb) ? 1 : -1;
46 const char **va = (
const char **)
a;
47 const char **
vb = (
const char **)
b;
51 static inline int int_cmp(
const void *
a,
const void *
b) {
70 for (
i = 0;
i <
idx;
i++) {
111 for (
i = 0;
i <
idx;
i++) {
156 size_t lstr_tmp = lstr;
160 x =
malloc(lval + lstr_tmp + 2);
174 char *nstr =
malloc(lstr + 1);
182 int lptr = (nstr + lstr + 1) - ptr;
183 char *p_1 = ptr > nstr ? ptr - 1 : ptr;
185 lnstr = ptr - nstr - 1;
191 memcpy(
x + lval + 2 + lnstr, ptr, lptr);
232 int lstr, lval,
i, j;
234 char *nstr, *nstr_p, **vals;
235 const char null =
'\0';
241 str_lp = str_p =
str;
247 for (
i = 0; vals[
i];
i++) {
253 nstr_p = nstr =
malloc(lstr + lval + 3);
257 for (
i = 0; vals[
i];
i++) {
258 while (str_p < str_e) {
267 memcpy(nstr_p, str_lp, str_p - str_lp);
268 nstr_p += str_p - str_lp;
269 if (str_p == str_e && str_lp != str_e) {
278 if (str_lp < str_e) {
279 memcpy(nstr_p, str_lp, str_e - str_lp);
280 nstr_p += str_e - str_lp;
299 for (
i = 0;
n;
i++) {
317 if (!
val || (cas && cas != kas)) {
321 if (
str && *
str && str_len > 0) {
322 int val_len = strlen(
val);
323 char *newval =
malloc(str_len + val_len + 2);
329 memcpy(newval + str_len + 1,
val, val_len);
330 newval[str_len + val_len + 1] = 0;
360 char *newkey =
malloc(ilen + lval + 1);
364 for (
i = 0;
i < ilen;
i++) {
375 int diff = ptr -
str;
376 char *nstr =
malloc(lstr + lval + 2);
387 strcpy(ptr + lval + 1, usr);
418 const char *
n, *
p =
str;
439 const char *
n, *
p =
str;
469 for (
i = 0;
i <
idx;
i++) {
479 memmove(
p,
n + 1, strlen(
n));
503 size_t vlen = strlen(
val);
505 next = strchr(ptr,
SDB_RS);
506 size_t len = next ? (
size_t)(next - ptr) : strlen(ptr);
507 if (
len == vlen && !memcmp(ptr,
val,
len)) {
550 if (!
val || (cas && cas != kas)) {
555 int val_len = strlen(
val);
556 char *newval =
malloc(str_len + val_len + 2);
562 memcpy(newval + val_len + 1,
str, str_len);
563 newval[str_len + val_len + 1] = 0;
601 if (cas && *cas != kas) {
621 if (cas && *cas != kas) {
636 char *nstr, *
str, **strs;
647 for (
i = 0; strs[
i];
i++) {
652 for (
i = 0; strs[
i];
i++) {
RZ_API int sdb_array_length(Sdb *s, const char *key)
RZ_API bool sdb_array_append_num(Sdb *s, const char *key, ut64 val, ut32 cas)
RZ_API int sdb_array_size(Sdb *s, const char *key)
static const char * Aindexof(const char *str, int idx)
RZ_API char * sdb_array_get(Sdb *s, const char *key, int idx, ut32 *cas)
RZ_API int sdb_array_add_sorted_num(Sdb *s, const char *key, ut64 val, ut32 cas)
RZ_API int sdb_array_indexof(Sdb *s, const char *key, const char *val, ut32 cas)
RZ_API ut64 sdb_array_pop_num(Sdb *s, const char *key, ut32 *cas)
RZ_API int sdb_array_add_num(Sdb *s, const char *key, ut64 val, ut32 cas)
RZ_API int sdb_array_add_sorted(Sdb *s, const char *key, const char *val, ut32 cas)
RZ_API int sdb_array_insert_num(Sdb *s, const char *key, int idx, ut64 val, ut32 cas)
RZ_API bool sdb_array_prepend(Sdb *s, const char *key, const char *val, ut32 cas)
RZ_API bool sdb_array_append(Sdb *s, const char *key, const char *val, ut32 cas)
RZ_API bool sdb_array_contains_num(Sdb *s, const char *key, ut64 num, ut32 *cas)
RZ_API void sdb_array_sort(Sdb *s, const char *key, ut32 cas)
static int cstring_cmp(const void *a, const void *b)
RZ_API int sdb_array_set(Sdb *s, const char *key, int idx, const char *val, ut32 cas)
RZ_API int sdb_array_add(Sdb *s, const char *key, const char *val, ut32 cas)
RZ_API bool sdb_array_push(Sdb *s, const char *key, const char *val, ut32 cas)
RZ_API int sdb_array_insert(Sdb *s, const char *key, int idx, const char *val, ut32 cas)
RZ_API char * sdb_array_pop(Sdb *s, const char *key, ut32 *cas)
RZ_API char * sdb_array_pop_tail(Sdb *s, const char *key, ut32 *cas)
RZ_API int sdb_array_remove(Sdb *s, const char *key, const char *val, ut32 cas)
RZ_API int sdb_array_delete(Sdb *s, const char *key, int idx, ut32 cas)
RZ_API int sdb_array_remove_num(Sdb *s, const char *key, ut64 val, ut32 cas)
RZ_API bool sdb_array_contains(Sdb *s, const char *key, const char *val, ut32 *cas)
RZ_API void sdb_array_sort_num(Sdb *s, const char *key, ut32 cas)
RZ_API int sdb_array_unset(Sdb *s, const char *key, int idx, ut32 cas)
RZ_API int sdb_array_push_num(Sdb *s, const char *key, ut64 num, ut32 cas)
static int astrcmp(const char *a, const char *b)
static int int_cmp(const void *a, const void *b)
RZ_API int sdb_array_set_num(Sdb *s, const char *key, int idx, ut64 val, ut32 cas)
RZ_API bool sdb_array_prepend_num(Sdb *s, const char *key, ut64 num, ut32 cas)
RZ_API ut64 sdb_array_get_num(Sdb *s, const char *key, int idx, ut32 *cas)
RZ_API char * sdb_array_pop_head(Sdb *s, const char *key, ut32 *cas)
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
RZ_API char * sdb_fmt_tostr(void *p, const char *fmt)
RZ_API char ** sdb_fmt_array(const char *list)
RZ_API ut64 * sdb_fmt_array_num(const char *list)
RZ_API void Ht_() free(HtName_(Ht) *ht)
return memset(p, 0, total)
memcpy(mem, inblock.get(), min(CONTAINING_RECORD(inblock.get(), MEMBLOCK, data) ->size, size))
void * malloc(size_t size)
static static fork const void static count static fd const char const char static newpath char char char static envp time_t static t const char static mode static whence const char static dir time_t static t unsigned static seconds const char struct utimbuf static buf static inc static sig const char static mode static oldfd struct tms static buf static getgid static geteuid const char static filename static arg static mask struct ustat static ubuf static getppid static setsid static egid sigset_t static set struct timeval struct timezone static tz fd_set fd_set fd_set struct timeval static timeout const char char static bufsiz const char static swapflags void static offset const char static length static mode static who const char struct statfs static buf unsigned unsigned num
return strdup("=SP r13\n" "=LR r14\n" "=PC r15\n" "=A0 r0\n" "=A1 r1\n" "=A2 r2\n" "=A3 r3\n" "=ZF zf\n" "=SF nf\n" "=OF vf\n" "=CF cf\n" "=SN or0\n" "gpr lr .32 56 0\n" "gpr pc .32 60 0\n" "gpr cpsr .32 64 0 ____tfiae_________________qvczn\n" "gpr or0 .32 68 0\n" "gpr tf .1 64.5 0 thumb\n" "gpr ef .1 64.9 0 endian\n" "gpr jf .1 64.24 0 java\n" "gpr qf .1 64.27 0 sticky_overflow\n" "gpr vf .1 64.28 0 overflow\n" "gpr cf .1 64.29 0 carry\n" "gpr zf .1 64.30 0 zero\n" "gpr nf .1 64.31 0 negative\n" "gpr itc .4 64.10 0 if_then_count\n" "gpr gef .4 64.16 0 great_or_equal\n" "gpr r0 .32 0 0\n" "gpr r1 .32 4 0\n" "gpr r2 .32 8 0\n" "gpr r3 .32 12 0\n" "gpr r4 .32 16 0\n" "gpr r5 .32 20 0\n" "gpr r6 .32 24 0\n" "gpr r7 .32 28 0\n" "gpr r8 .32 32 0\n" "gpr r9 .32 36 0\n" "gpr r10 .32 40 0\n" "gpr r11 .32 44 0\n" "gpr r12 .32 48 0\n" "gpr r13 .32 52 0\n" "gpr r14 .32 56 0\n" "gpr r15 .32 60 0\n" "gpr r16 .32 64 0\n" "gpr r17 .32 68 0\n")
void qsort(void *a, size_t n, size_t es, int(*cmp)(const void *, const void *))
#define SZT_ADD_OVFCHK(x, y)
RZ_API int sdb_set_owned(Sdb *s, const char *key, char *val, ut32 cas)
RZ_API int sdb_set(Sdb *s, const char *key, const char *val, ut32 cas)
RZ_API char * sdb_get(Sdb *s, const char *key, ut32 *cas)
RZ_API char * sdb_get_len(Sdb *s, const char *key, int *vlen, ut32 *cas)
RZ_API const char * sdb_const_get(Sdb *s, const char *key, ut32 *cas)
RZ_API int sdb_unset(Sdb *s, const char *key, ut32 cas)
RZ_API const char * sdb_const_get_len(Sdb *s, const char *key, int *vlen, ut32 *cas)
RZ_API int sdb_alen(const char *str)
RZ_API char * sdb_itoa(ut64 n, char *s, int base)
RZ_API const char * sdb_const_anext(const char *str)
RZ_API int sdb_alen_ignore_empty(const char *str)
RZ_API ut64 sdb_atoi(const char *s)
ut64(WINAPI *w32_GetEnabledXStateFeatures)()