Rizin
unix-like reverse engineering framework and cli tools
rz_cf_dict.c
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2019 Francesco Tamagni <mrmacete@protonmail.ch>
2 // SPDX-License-Identifier: LGPL-3.0-only
3 
4 #include <stdio.h>
5 #include <stdlib.h>
6 #include <rz_util.h>
7 #include <rz_list.h>
8 
9 #include <yxml.h>
10 #include "rz_cf_dict.h"
11 
12 #define XMLBUFSIZE 4096
13 
14 typedef enum {
22 
23 typedef struct _RCFParseState {
25  char *key;
30 
33 
35 static void rz_cf_key_value_free(RCFKeyValue *key_value);
36 
38 static void rz_cf_value_dict_add(RCFValueDict *dict, RCFKeyValue *key_value);
39 static void rz_cf_value_dict_print(RCFValueDict *dict);
40 
42 static void rz_cf_value_array_free(RCFValueArray *array);
44 static void rz_cf_value_array_print(RCFValueArray *dict);
45 
46 static RCFValueString *rz_cf_value_string_new(char *string);
47 static void rz_cf_value_string_free(RCFValueString *string);
48 static void rz_cf_value_string_print(RCFValueString *string);
49 
50 static RCFValueInteger *rz_cf_value_integer_new(char *string);
51 static void rz_cf_value_integer_free(RCFValueInteger *integer);
52 static void rz_cf_value_integer_print(RCFValueInteger *integer);
53 
54 static RCFValueData *rz_cf_value_data_new(char *string);
55 static void rz_cf_value_data_free(RCFValueData *data);
56 static void rz_cf_value_data_print(RCFValueData *data);
57 
59 static void rz_cf_value_null_free(RCFValueNULL *null);
60 static void rz_cf_value_null_print(RCFValueNULL *null);
61 
63 static void rz_cf_value_bool_free(RCFValueBool *bool_value);
64 static void rz_cf_value_bool_print(RCFValueBool *bool_value);
65 
66 static void rz_cf_value_free(RCFValue *value);
67 
69  RCFValueDict *result = NULL;
70  yxml_t x;
71  int i, depth = 0;
72  char *content = NULL;
73 
74  void *xml_buf = malloc(XMLBUFSIZE);
75  if (!xml_buf) {
76  return NULL;
77  }
78 
79  yxml_init(&x, xml_buf, XMLBUFSIZE);
80 
82  if (!stack) {
83  goto beach;
84  }
85 
87 
88  for (i = 0; i < size; i++) {
89  ut8 doc = 0;
90  rz_buf_read_at(file_buf, offset + i, &doc, 1);
91  if (!doc) {
92  break;
93  }
94 
95  yxml_ret_t r = yxml_parse(&x, doc);
96  if (r < 0) {
97  RZ_LOG_ERROR("Parsing error at :%" PRIu32 ":%" PRIu64 " byte offset %" PRIu64 "\n",
98  x.line, x.byte, x.total);
99  goto beach;
100  }
101 
102  switch (r) {
103  case YXML_ELEMSTART: {
105  RCFParseState *next_state = NULL;
106 
107  if (!strcmp(x.elem, "dict")) {
109  if (!next_state) {
110  goto beach;
111  }
112  next_state->dict = rz_cf_value_dict_new();
113  } else if (!strcmp(x.elem, "array")) {
115  if (!next_state) {
116  goto beach;
117  }
118  next_state->array = rz_cf_value_array_new();
119  } else if (!strcmp(x.elem, "key") && state->phase == RZ_CF_STATE_IN_DICT) {
121  if (!next_state) {
122  goto beach;
123  }
124  next_state->dict = state->dict;
125  } else if (!strcmp(x.elem, "string")) {
127  if (!next_state) {
128  goto beach;
129  }
130  next_state->value_type = RZ_CF_STRING;
131  } else if (!strcmp(x.elem, "integer")) {
133  if (!next_state) {
134  goto beach;
135  }
136  next_state->value_type = RZ_CF_INTEGER;
137  } else if (!strcmp(x.elem, "data")) {
140  } else {
142  if (!next_state) {
143  goto beach;
144  }
145  next_state->value_type = RZ_CF_DATA;
146  }
147  } else if (!strcmp(x.elem, "true")) {
149  if (!next_state) {
150  goto beach;
151  }
152  next_state->value_type = RZ_CF_TRUE;
153  } else if (!strcmp(x.elem, "false")) {
155  if (!next_state) {
156  goto beach;
157  }
158  next_state->value_type = RZ_CF_FALSE;
159  }
160 
161  if (next_state) {
162  rz_list_push(stack, next_state);
163  } else {
164  RZ_LOG_ERROR("Missing next state for elem: %s phase: %d\n", x.elem, state->phase);
165  break;
166  }
167  depth++;
168 
169  break;
170  }
171  case YXML_ELEMEND: {
174  if (!state || !next_state) {
175  goto beach;
176  }
177 
178  if (next_state->phase == RZ_CF_STATE_ROOT) {
179  if (state->phase == RZ_CF_STATE_IN_DICT) {
180  result = state->dict;
182  break;
183  } else {
184  RZ_LOG_ERROR("Root element is not a dict\n");
185  goto beach;
186  }
187  }
188 
189  if (next_state->phase == RZ_CF_STATE_IN_DICT && state->phase == RZ_CF_STATE_IN_KEY) {
190  if (!content) {
191  RZ_LOG_ERROR("NULL key is not supported");
192  goto beach;
193  }
194  next_state->key = content;
195  }
196 
197  if (state->phase != RZ_CF_STATE_IN_KEY) {
198  RCFValue *value = NULL;
199 
200  switch (state->phase) {
201  case RZ_CF_STATE_IN_DICT:
202  value = (RCFValue *)state->dict;
203  break;
205  value = (RCFValue *)state->array;
206  break;
208  if (!content && state->value_type != RZ_CF_FALSE && state->value_type != RZ_CF_TRUE) {
210  } else {
211  switch (state->value_type) {
212  case RZ_CF_STRING:
213  value = (RCFValue *)rz_cf_value_string_new(content);
214  break;
215  case RZ_CF_INTEGER:
216  value = (RCFValue *)rz_cf_value_integer_new(content);
217  RZ_FREE(content);
218  break;
219  case RZ_CF_DATA:
220  value = (RCFValue *)rz_cf_value_data_new(content);
221  RZ_FREE(content);
222  break;
223  case RZ_CF_TRUE:
225  break;
226  case RZ_CF_FALSE:
227  value = (RCFValue *)rz_cf_value_bool_new(false);
228  break;
229  default:
230  break;
231  }
232  }
233  break;
234  default:
235  break;
236  }
237 
238  if (next_state->phase == RZ_CF_STATE_IN_DICT) {
239  if (value) {
240  RCFKeyValue *key_value = rz_cf_key_value_new(next_state->key, value);
241  rz_cf_value_dict_add(next_state->dict, key_value);
242  } else if (state->phase != RZ_CF_STATE_IN_IGNORE) {
243  RZ_LOG_ERROR("Missing value for key %s\n", next_state->key);
245  goto beach;
246  }
247  } else if (next_state->phase == RZ_CF_STATE_IN_ARRAY) {
248  if (value) {
249  rz_cf_value_array_add(next_state->array, value);
250  } else if (state->phase != RZ_CF_STATE_IN_IGNORE) {
251  RZ_LOG_ERROR("Missing value for array\n");
253  goto beach;
254  }
255  }
256  }
257 
258  depth--;
259  content = NULL;
261  break;
262  }
263  case YXML_CONTENT: {
265  if (state->phase == RZ_CF_STATE_IN_IGNORE) {
266  break;
267  }
268  if (!content) {
269  content = rz_str_new(x.data);
270  } else {
271  content = rz_str_append(content, x.data);
272  }
273  break;
274  }
275  default:
276  break;
277  }
278 
279  if (result) {
280  break;
281  }
282  }
283 
284  yxml_ret_t r = yxml_eof(&x);
285  if (r < 0) {
286  RZ_LOG_ERROR("Invalid xml\n");
287  }
288 
289 beach:
290  RZ_FREE(xml_buf);
291  if (stack) {
293  }
294 
295  return result;
296 }
297 
300  if (state) {
301  state->phase = phase;
302  }
303  return state;
304 }
305 
307  if (state) {
308  RZ_FREE(state);
309  }
310 }
311 
313  RCFKeyValue *key_value = RZ_NEW0(RCFKeyValue);
314  if (!key_value) {
315  return NULL;
316  }
317 
318  key_value->key = key;
319  key_value->value = value;
320 
321  return key_value;
322 }
323 
324 static void rz_cf_key_value_free(RCFKeyValue *key_value) {
325  if (!key_value) {
326  return;
327  }
328 
329  if (key_value->key) {
330  RZ_FREE(key_value->key);
331  }
332  if (key_value->value) {
333  rz_cf_value_free(key_value->value);
334  key_value->value = NULL;
335  }
336 
337  RZ_FREE(key_value);
338 }
339 
342  if (!dict) {
343  return NULL;
344  }
345 
346  dict->type = RZ_CF_DICT;
348 
349  return dict;
350 }
351 
353  rz_return_if_fail(dict);
354 
355  if (dict->pairs) {
356  rz_list_free(dict->pairs);
357  dict->pairs = NULL;
358  }
359  dict->type = RZ_CF_INVALID;
360  RZ_FREE(dict);
361 }
362 
363 static void rz_cf_value_dict_add(RCFValueDict *dict, RCFKeyValue *key_value) {
364  if (!dict || !dict->pairs) {
365  return;
366  }
367 
368  rz_list_push(dict->pairs, key_value);
369 }
370 
372  RzListIter *iter;
373  RCFKeyValue *key_value;
374  int length = rz_list_length(dict->pairs);
375  int i = 0;
376  printf("{");
377  rz_list_foreach (dict->pairs, iter, key_value) {
378  printf("\"%s\":", key_value->key);
379  rz_cf_value_print(key_value->value);
380  if (i++ < length - 1) {
381  printf(",");
382  }
383  }
384  printf("}");
385 }
386 
389  if (!array) {
390  return NULL;
391  }
392 
393  array->type = RZ_CF_ARRAY;
395 
396  return array;
397 }
398 
400  if (!array) {
401  return;
402  }
403 
404  if (array->values) {
405  rz_list_free(array->values);
406  array->values = NULL;
407  }
408 
409  array->type = RZ_CF_INVALID;
410  RZ_FREE(array);
411 }
412 
414  if (!array || !array->values) {
415  return;
416  }
417 
418  rz_list_push(array->values, value);
419 }
420 
422  RzListIter *iter;
423  RCFValue *value;
424  int length = rz_list_length(array->values);
425  int i = 0;
426  printf("[");
427  rz_list_foreach (array->values, iter, value) {
429  if (i++ < length - 1) {
430  printf(",");
431  }
432  }
433  printf("]");
434 }
435 
436 static RCFValueString *rz_cf_value_string_new(char *string) {
437  RCFValueString *value_string = RZ_NEW0(RCFValueString);
438  if (!value_string) {
439  return NULL;
440  }
441 
442  value_string->type = RZ_CF_STRING;
443  value_string->value = string;
444 
445  return value_string;
446 }
447 
449  if (!string) {
450  return;
451  }
452 
453  if (string->value) {
454  RZ_FREE(string->value);
455  }
456 
457  string->type = RZ_CF_INVALID;
458  RZ_FREE(string);
459 }
460 
462  char *escaped = strdup(string->value);
463  escaped = rz_str_replace(escaped, "\"", "\\\"", 1);
464  printf("\"%s\"", escaped);
465  RZ_FREE(escaped);
466 }
467 
470  if (!integer) {
471  return NULL;
472  }
473 
474  integer->type = RZ_CF_INTEGER;
475  integer->value = rz_num_get(NULL, string);
476 
477  return integer;
478 }
479 
481  if (!integer) {
482  return;
483  }
484 
485  integer->type = RZ_CF_INVALID;
486  RZ_FREE(integer);
487 }
488 
490  printf("%llu", integer->value);
491 }
492 
493 static RCFValueData *rz_cf_value_data_new(char *string) {
495  if (!data) {
496  return NULL;
497  }
498 
499  const int len = strlen(string);
500  const int out_len = len / 4 * 3 + 1;
501  ut8 *out = calloc(sizeof(ut8), out_len);
502  if (!out) {
503  RZ_FREE(data);
504  return NULL;
505  }
506  rz_base64_decode(out, string, len);
507 
508  data->type = RZ_CF_DATA;
509  data->value = rz_buf_new_with_pointers(out, out_len, true);
510 
511  return data;
512 }
513 
515  if (!data) {
516  return;
517  }
518 
519  data->type = RZ_CF_INVALID;
520  if (data->value) {
521  rz_buf_free(data->value);
522  data->value = NULL;
523  }
524 
525  RZ_FREE(data);
526 }
527 
529  printf("\"...\"");
530 }
531 
534  if (!null) {
535  return NULL;
536  }
537 
538  null->type = RZ_CF_NULL;
539 
540  return null;
541 }
542 
544  if (!null) {
545  return;
546  }
547 
548  null->type = RZ_CF_INVALID;
549  RZ_FREE(null);
550 }
551 
553  printf("null");
554 }
555 
557  RCFValueBool *bool_value = RZ_NEW0(RCFValueBool);
558  if (!bool_value) {
559  return NULL;
560  }
561 
562  bool_value->type = value ? RZ_CF_TRUE : RZ_CF_FALSE;
563  return bool_value;
564 }
565 
566 static void rz_cf_value_bool_free(RCFValueBool *bool_value) {
567  if (bool_value) {
568  bool_value->type = RZ_CF_INVALID;
569  RZ_FREE(bool_value);
570  }
571 }
572 
573 static void rz_cf_value_bool_print(RCFValueBool *bool_value) {
574  if (bool_value->type == RZ_CF_TRUE) {
575  printf("true");
576  } else {
577  printf("false");
578  }
579 }
581  if (!value) {
582  return;
583  }
584 
585  switch (value->type) {
586  case RZ_CF_DICT:
588  break;
589  case RZ_CF_ARRAY:
591  break;
592  case RZ_CF_STRING:
594  break;
595  case RZ_CF_INTEGER:
597  break;
598  case RZ_CF_DATA:
600  break;
601  case RZ_CF_NULL:
603  break;
604  case RZ_CF_TRUE:
605  case RZ_CF_FALSE:
607  break;
608  default:
609  break;
610  }
611 }
612 
614  if (!value) {
615  return;
616  }
617 
618  switch (value->type) {
619  case RZ_CF_DICT:
621  break;
622  case RZ_CF_ARRAY:
624  break;
625  case RZ_CF_STRING:
627  break;
628  case RZ_CF_INTEGER:
630  break;
631  case RZ_CF_DATA:
633  break;
634  case RZ_CF_NULL:
636  break;
637  case RZ_CF_TRUE:
638  case RZ_CF_FALSE:
640  break;
641  default:
642  break;
643  }
644 }
size_t len
Definition: 6502dis.c:15
lzma_index ** i
Definition: index.h:629
const lzma_allocator const uint8_t size_t uint8_t * out
Definition: block.h:528
static int value
Definition: cmd_api.c:93
#define RZ_API
#define NULL
Definition: cris-opc.c:27
#define r
Definition: crypto_rc6.c:12
_Use_decl_annotations_ int __cdecl printf(const char *const _Format,...)
Definition: cs_driver.c:93
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
Definition: sflib.h:118
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 static semflg const void static shmflg const struct timespec struct timespec static rem const char static group const void length
Definition: sflib.h:133
voidpf void uLong size
Definition: ioapi.h:138
voidpf uLong offset
Definition: ioapi.h:144
uint8_t ut8
Definition: lh5801.h:11
#define PRIu32
Definition: macros.h:20
#define PRIu64
Definition: macros.h:18
RZ_API RZ_OWN RzList * rz_list_newf(RzListFree f)
Returns a new initialized RzList pointer and sets the free method.
Definition: list.c:248
RZ_API RZ_BORROW void * rz_list_get_top(RZ_NONNULL const RzList *list)
Returns the last element of the list.
Definition: list.c:457
RZ_API RZ_OWN void * rz_list_pop(RZ_NONNULL RzList *list)
Removes and returns the last element of the list.
Definition: list.c:376
RZ_API RZ_BORROW RzListIter * rz_list_push(RZ_NONNULL RzList *list, void *item)
Alias for rz_list_append.
Definition: list.c:60
RZ_API ut32 rz_list_length(RZ_NONNULL const RzList *list)
Returns the length of the list.
Definition: list.c:109
RZ_API void rz_list_free(RZ_NONNULL RzList *list)
Empties the list and frees the list pointer.
Definition: list.c:137
void * malloc(size_t size)
Definition: malloc.c:123
void * calloc(size_t number, size_t size)
Definition: malloc.c:102
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")
static const char struct stat static buf struct stat static buf static vhangup int options
Definition: sflib.h:145
int x
Definition: mipsasm.c:20
#define rz_return_if_fail(expr)
Definition: rz_assert.h:100
RZ_API int rz_base64_decode(ut8 *bout, const char *bin, int len)
Definition: ubase64.c:48
RZ_API st64 rz_buf_read_at(RZ_NONNULL RzBuffer *b, ut64 addr, RZ_NONNULL RZ_OUT ut8 *buf, ut64 len)
Read len bytes of the buffer at the specified address.
Definition: buf.c:1136
RZ_API RZ_OWN RzBuffer * rz_buf_new_with_pointers(const ut8 *bytes, ut64 len, bool steal)
Creates a new buffer with a bytes array.
Definition: buf.c:552
RZ_API void rz_buf_free(RzBuffer *b)
Free all internal data hold by the buffer and the buffer.
Definition: buf.c:1253
static void rz_cf_value_integer_free(RCFValueInteger *integer)
Definition: rz_cf_dict.c:480
#define XMLBUFSIZE
Definition: rz_cf_dict.c:12
static void rz_cf_value_null_free(RCFValueNULL *null)
Definition: rz_cf_dict.c:543
RZ_API void rz_cf_value_print(RCFValue *value)
Definition: rz_cf_dict.c:613
static RCFValueBool * rz_cf_value_bool_new(bool value)
Definition: rz_cf_dict.c:556
static void rz_cf_value_dict_print(RCFValueDict *dict)
Definition: rz_cf_dict.c:371
static void rz_cf_key_value_free(RCFKeyValue *key_value)
Definition: rz_cf_dict.c:324
static void rz_cf_value_bool_print(RCFValueBool *bool_value)
Definition: rz_cf_dict.c:573
static void rz_cf_value_bool_free(RCFValueBool *bool_value)
Definition: rz_cf_dict.c:566
static void rz_cf_value_array_add(RCFValueArray *array, RCFValue *value)
Definition: rz_cf_dict.c:413
static RCFValueData * rz_cf_value_data_new(char *string)
Definition: rz_cf_dict.c:493
static void rz_cf_value_data_free(RCFValueData *data)
Definition: rz_cf_dict.c:514
static RCFValueDict * rz_cf_value_dict_new(void)
Definition: rz_cf_dict.c:340
static void rz_cf_value_string_free(RCFValueString *string)
Definition: rz_cf_dict.c:448
static void rz_cf_value_array_print(RCFValueArray *dict)
Definition: rz_cf_dict.c:421
static RCFValueNULL * rz_cf_value_null_new(void)
Definition: rz_cf_dict.c:532
RCFParsePhase
Definition: rz_cf_dict.c:14
@ RZ_CF_STATE_IN_KEY
Definition: rz_cf_dict.c:18
@ RZ_CF_STATE_ROOT
Definition: rz_cf_dict.c:15
@ RZ_CF_STATE_IN_ARRAY
Definition: rz_cf_dict.c:17
@ RZ_CF_STATE_IN_SCALAR
Definition: rz_cf_dict.c:19
@ RZ_CF_STATE_IN_IGNORE
Definition: rz_cf_dict.c:20
@ RZ_CF_STATE_IN_DICT
Definition: rz_cf_dict.c:16
static void rz_cf_value_dict_add(RCFValueDict *dict, RCFKeyValue *key_value)
Definition: rz_cf_dict.c:363
static void rz_cf_value_integer_print(RCFValueInteger *integer)
Definition: rz_cf_dict.c:489
static RCFValueArray * rz_cf_value_array_new(void)
Definition: rz_cf_dict.c:387
static void rz_cf_value_array_free(RCFValueArray *array)
Definition: rz_cf_dict.c:399
static RCFValueString * rz_cf_value_string_new(char *string)
Definition: rz_cf_dict.c:436
RZ_API void rz_cf_value_dict_free(RCFValueDict *dict)
Definition: rz_cf_dict.c:352
static RCFKeyValue * rz_cf_key_value_new(char *key, RCFValue *value)
Definition: rz_cf_dict.c:312
static void rz_cf_value_data_print(RCFValueData *data)
Definition: rz_cf_dict.c:528
static void rz_cf_parse_state_free(RCFParseState *state)
Definition: rz_cf_dict.c:306
RZ_API RCFValueDict * rz_cf_value_dict_parse(RzBuffer *file_buf, ut64 offset, ut64 size, int options)
Definition: rz_cf_dict.c:68
static void rz_cf_value_null_print(RCFValueNULL *null)
Definition: rz_cf_dict.c:552
static RCFValueInteger * rz_cf_value_integer_new(char *string)
Definition: rz_cf_dict.c:468
struct _RCFParseState RCFParseState
static void rz_cf_value_free(RCFValue *value)
Definition: rz_cf_dict.c:580
static void rz_cf_value_string_print(RCFValueString *string)
Definition: rz_cf_dict.c:461
static RCFParseState * rz_cf_parse_state_new(RCFParsePhase phase)
Definition: rz_cf_dict.c:298
RCFValueType
Definition: rz_cf_dict.h:10
@ RZ_CF_DICT
Definition: rz_cf_dict.h:12
@ RZ_CF_STRING
Definition: rz_cf_dict.h:14
@ RZ_CF_TRUE
Definition: rz_cf_dict.h:18
@ RZ_CF_INTEGER
Definition: rz_cf_dict.h:15
@ RZ_CF_FALSE
Definition: rz_cf_dict.h:19
@ RZ_CF_DATA
Definition: rz_cf_dict.h:16
@ RZ_CF_NULL
Definition: rz_cf_dict.h:17
@ RZ_CF_INVALID
Definition: rz_cf_dict.h:11
@ RZ_CF_ARRAY
Definition: rz_cf_dict.h:13
#define RZ_CF_OPTION_SKIP_NSDATA
Definition: rz_cf_dict.h:8
void(* RzListFree)(void *ptr)
Definition: rz_list.h:11
#define RZ_LOG_ERROR(fmtstr,...)
Definition: rz_log.h:58
RZ_API ut64 rz_num_get(RzNum *num, const char *str)
Definition: unum.c:172
RZ_API char * rz_str_append(char *ptr, const char *string)
Definition: str.c:1063
RZ_API char * rz_str_new(const char *str)
Definition: str.c:865
RZ_API char * rz_str_replace(char *str, const char *key, const char *val, int g)
Definition: str.c:1110
#define RZ_NEW0(x)
Definition: rz_types.h:284
#define RZ_FREE(x)
Definition: rz_types.h:369
char * key
Definition: rz_cf_dict.h:27
RCFValue * value
Definition: rz_cf_dict.h:28
RzList * values
Definition: rz_cf_dict.h:38
RCFValueType type
Definition: rz_cf_dict.h:37
RCFValueType type
Definition: rz_cf_dict.h:57
RzBuffer * value
Definition: rz_cf_dict.h:53
RCFValueType type
Definition: rz_cf_dict.h:52
RCFValueType type
Definition: rz_cf_dict.h:32
RzList * pairs
Definition: rz_cf_dict.h:33
RCFValueType type
Definition: rz_cf_dict.h:47
char * value
Definition: rz_cf_dict.h:43
RCFValueType type
Definition: rz_cf_dict.h:42
RCFValueDict * dict
Definition: rz_cf_dict.c:27
RCFValueArray * array
Definition: rz_cf_dict.c:28
RCFParsePhase phase
Definition: rz_cf_dict.c:24
RCFValueType value_type
Definition: rz_cf_dict.c:26
Definition: z80asm.h:140
Definition: dis.h:43
Definition: yxml.h:79
ut64(WINAPI *w32_GetEnabledXStateFeatures)()
yxml_ret_t yxml_eof(yxml_t *x)
Definition: yxml.c:1056
yxml_ret_t yxml_parse(yxml_t *x, int _ch)
Definition: yxml.c:338
void yxml_init(yxml_t *x, void *stack, size_t stacksize)
Definition: yxml.c:327
yxml_ret_t
Definition: yxml.h:39
@ YXML_ELEMSTART
Definition: yxml.h:46
@ YXML_ELEMEND
Definition: yxml.h:48
@ YXML_CONTENT
Definition: yxml.h:47