Rizin
unix-like reverse engineering framework and cli tools
|
#include <stdio.h>
#include <stdlib.h>
#include <rz_util.h>
#include <rz_list.h>
#include <yxml.h>
#include "rz_cf_dict.h"
Go to the source code of this file.
Classes | |
struct | _RCFParseState |
Macros | |
#define | XMLBUFSIZE 4096 |
Typedefs | |
typedef struct _RCFParseState | RCFParseState |
Enumerations | |
enum | RCFParsePhase { RZ_CF_STATE_ROOT , RZ_CF_STATE_IN_DICT , RZ_CF_STATE_IN_ARRAY , RZ_CF_STATE_IN_KEY , RZ_CF_STATE_IN_SCALAR , RZ_CF_STATE_IN_IGNORE } |
#define XMLBUFSIZE 4096 |
Definition at line 12 of file rz_cf_dict.c.
typedef struct _RCFParseState RCFParseState |
enum RCFParsePhase |
Enumerator | |
---|---|
RZ_CF_STATE_ROOT | |
RZ_CF_STATE_IN_DICT | |
RZ_CF_STATE_IN_ARRAY | |
RZ_CF_STATE_IN_KEY | |
RZ_CF_STATE_IN_SCALAR | |
RZ_CF_STATE_IN_IGNORE |
Definition at line 14 of file rz_cf_dict.c.
|
static |
Definition at line 324 of file rz_cf_dict.c.
References _CFKeyValue::key, NULL, rz_cf_value_free(), RZ_FREE, and _CFKeyValue::value.
Referenced by rz_cf_value_dict_new().
|
static |
Definition at line 312 of file rz_cf_dict.c.
References _CFKeyValue::key, key, NULL, RZ_NEW0, _CFKeyValue::value, and value.
Referenced by rz_cf_value_dict_parse().
|
static |
Definition at line 306 of file rz_cf_dict.c.
References RZ_FREE.
Referenced by rz_cf_value_dict_parse().
|
static |
Definition at line 298 of file rz_cf_dict.c.
References RZ_NEW0.
Referenced by rz_cf_value_dict_parse().
|
static |
Definition at line 413 of file rz_cf_dict.c.
References rz_list_push(), value, and _CFValueArray::values.
Referenced by rz_cf_value_dict_parse().
|
static |
Definition at line 399 of file rz_cf_dict.c.
References NULL, RZ_CF_INVALID, RZ_FREE, rz_list_free(), _CFValueArray::type, and _CFValueArray::values.
Referenced by rz_cf_value_free().
|
static |
Definition at line 387 of file rz_cf_dict.c.
References NULL, RZ_CF_ARRAY, rz_cf_value_free(), rz_list_newf(), RZ_NEW0, _CFValueArray::type, and _CFValueArray::values.
Referenced by rz_cf_value_dict_parse().
|
static |
Definition at line 421 of file rz_cf_dict.c.
References i, length, printf(), rz_cf_value_print(), rz_list_length(), value, and _CFValueArray::values.
Referenced by rz_cf_value_print().
|
static |
Definition at line 566 of file rz_cf_dict.c.
References RZ_CF_INVALID, RZ_FREE, and _CFValueBool::type.
Referenced by rz_cf_value_free().
|
static |
Definition at line 556 of file rz_cf_dict.c.
References NULL, RZ_CF_FALSE, RZ_CF_TRUE, RZ_NEW0, _CFValueBool::type, and value.
Referenced by rz_cf_value_dict_parse().
|
static |
Definition at line 573 of file rz_cf_dict.c.
References printf(), RZ_CF_TRUE, and _CFValueBool::type.
Referenced by rz_cf_value_print().
|
static |
Definition at line 514 of file rz_cf_dict.c.
References NULL, rz_buf_free(), RZ_CF_INVALID, RZ_FREE, _CFValueData::type, and _CFValueData::value.
Referenced by rz_cf_value_free().
|
static |
Definition at line 493 of file rz_cf_dict.c.
References calloc(), len, NULL, out, rz_base64_decode(), rz_buf_new_with_pointers(), RZ_CF_DATA, RZ_FREE, RZ_NEW0, _CFValueData::type, and _CFValueData::value.
Referenced by rz_cf_value_dict_parse().
|
static |
Definition at line 528 of file rz_cf_dict.c.
References printf().
Referenced by rz_cf_value_print().
|
static |
Definition at line 363 of file rz_cf_dict.c.
References _CFValueDict::pairs, and rz_list_push().
Referenced by rz_cf_value_dict_parse().
RZ_API void rz_cf_value_dict_free | ( | RCFValueDict * | dict | ) |
Definition at line 352 of file rz_cf_dict.c.
References NULL, _CFValueDict::pairs, RZ_CF_INVALID, RZ_FREE, rz_list_free(), rz_return_if_fail, and _CFValueDict::type.
Referenced by rz_cf_value_free(), and rz_kernel_cache_free().
|
static |
Definition at line 340 of file rz_cf_dict.c.
References NULL, _CFValueDict::pairs, RZ_CF_DICT, rz_cf_key_value_free(), rz_list_newf(), RZ_NEW0, and _CFValueDict::type.
Referenced by rz_cf_value_dict_parse().
RZ_API RCFValueDict* rz_cf_value_dict_parse | ( | RzBuffer * | file_buf, |
ut64 | offset, | ||
ut64 | size, | ||
int | options | ||
) |
Definition at line 68 of file rz_cf_dict.c.
References _RCFParseState::array, _RCFParseState::dict, i, _RCFParseState::key, malloc(), NULL, options, _RCFParseState::phase, PRIu32, PRIu64, r, rz_buf_read_at(), RZ_CF_DATA, RZ_CF_FALSE, RZ_CF_INTEGER, rz_cf_key_value_new(), RZ_CF_OPTION_SKIP_NSDATA, rz_cf_parse_state_free(), rz_cf_parse_state_new(), RZ_CF_STATE_IN_ARRAY, RZ_CF_STATE_IN_DICT, RZ_CF_STATE_IN_IGNORE, RZ_CF_STATE_IN_KEY, RZ_CF_STATE_IN_SCALAR, RZ_CF_STATE_ROOT, RZ_CF_STRING, RZ_CF_TRUE, rz_cf_value_array_add(), rz_cf_value_array_new(), rz_cf_value_bool_new(), rz_cf_value_data_new(), rz_cf_value_dict_add(), rz_cf_value_dict_new(), rz_cf_value_free(), rz_cf_value_integer_new(), rz_cf_value_null_new(), rz_cf_value_string_new(), RZ_FREE, rz_list_free(), rz_list_get_top(), rz_list_newf(), rz_list_pop(), rz_list_push(), RZ_LOG_ERROR, rz_str_append(), rz_str_new(), value, _RCFParseState::value_type, x, XMLBUFSIZE, YXML_CONTENT, YXML_ELEMEND, YXML_ELEMSTART, yxml_eof(), yxml_init(), and yxml_parse().
|
static |
Definition at line 371 of file rz_cf_dict.c.
References i, _CFKeyValue::key, length, _CFValueDict::pairs, printf(), rz_cf_value_print(), rz_list_length(), and _CFKeyValue::value.
Referenced by rz_cf_value_print().
|
static |
Definition at line 580 of file rz_cf_dict.c.
References RZ_CF_ARRAY, RZ_CF_DATA, RZ_CF_DICT, RZ_CF_FALSE, RZ_CF_INTEGER, RZ_CF_NULL, RZ_CF_STRING, RZ_CF_TRUE, rz_cf_value_array_free(), rz_cf_value_bool_free(), rz_cf_value_data_free(), rz_cf_value_dict_free(), rz_cf_value_integer_free(), rz_cf_value_null_free(), rz_cf_value_string_free(), and value.
Referenced by rz_cf_key_value_free(), rz_cf_value_array_new(), and rz_cf_value_dict_parse().
|
static |
Definition at line 480 of file rz_cf_dict.c.
References RZ_CF_INVALID, RZ_FREE, and _CFValueInteger::type.
Referenced by rz_cf_value_free().
|
static |
Definition at line 468 of file rz_cf_dict.c.
References NULL, RZ_CF_INTEGER, RZ_NEW0, rz_num_get(), _CFValueInteger::type, and _CFValueInteger::value.
Referenced by rz_cf_value_dict_parse().
|
static |
Definition at line 489 of file rz_cf_dict.c.
References printf(), and _CFValueInteger::value.
Referenced by rz_cf_value_print().
|
static |
Definition at line 543 of file rz_cf_dict.c.
References RZ_CF_INVALID, and RZ_FREE.
Referenced by rz_cf_value_free().
|
static |
Definition at line 532 of file rz_cf_dict.c.
References NULL, RZ_CF_NULL, and RZ_NEW0.
Referenced by rz_cf_value_dict_parse().
|
static |
Definition at line 552 of file rz_cf_dict.c.
References printf().
Referenced by rz_cf_value_print().
Definition at line 613 of file rz_cf_dict.c.
References RZ_CF_ARRAY, RZ_CF_DATA, RZ_CF_DICT, RZ_CF_FALSE, RZ_CF_INTEGER, RZ_CF_NULL, RZ_CF_STRING, RZ_CF_TRUE, rz_cf_value_array_print(), rz_cf_value_bool_print(), rz_cf_value_data_print(), rz_cf_value_dict_print(), rz_cf_value_integer_print(), rz_cf_value_null_print(), rz_cf_value_string_print(), and value.
Referenced by rz_cf_value_array_print(), and rz_cf_value_dict_print().
|
static |
Definition at line 448 of file rz_cf_dict.c.
References RZ_CF_INVALID, RZ_FREE, and _CFValueString::value.
Referenced by rz_cf_value_free().
|
static |
Definition at line 436 of file rz_cf_dict.c.
References NULL, RZ_CF_STRING, RZ_NEW0, _CFValueString::type, and _CFValueString::value.
Referenced by rz_cf_value_dict_parse().
|
static |
Definition at line 461 of file rz_cf_dict.c.
References printf(), RZ_FREE, rz_str_replace(), strdup(), and _CFValueString::value.
Referenced by rz_cf_value_print().