diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index ba2b814d053..a79bef954ac 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -15,6 +15,7 @@ jobs: outputs: yaml: ${{ steps.filter.outputs.yaml }} clang-format: ${{ steps.filter.outputs.clang-format }} + bindgen-linter: ${{ steps.filter.outputs.bindgen-linter }} prettier: ${{ steps.filter.outputs.prettier }} python: ${{ steps.filter.outputs.python }} steps: @@ -27,6 +28,11 @@ jobs: - '**.yml' - '**.yaml' - '.github/workflows/linter.yml' + bindgen-linter: + - '**.c' + - '**.h' + - '**.inc' + - '.github/workflows/linter.yml' clang-format: - '**.c' - '**.h' @@ -59,6 +65,37 @@ jobs: ./librz/core/cmd_descs/cmd_descs_generate.py --output-dir /tmp ./librz/core/cmd_descs/*.yaml diff /tmp/cmd_descs.c ./librz/core/cmd_descs/cmd_descs.c && diff /tmp/cmd_descs.h ./librz/core/cmd_descs/cmd_descs.h + bindgen-linter: + needs: changes + runs-on: ubuntu-22.04 + if: ${{ needs.changes.outputs.bindgen-linter == 'true' }} + steps: + - name: Checkout rizin + uses: actions/checkout@v3 + with: + path: rizin + - name: Checkout rz-bindgen + uses: actions/checkout@v3 + with: + repository: rizinorg/rz-bindgen + path: rz-bindgen + - name: Install dependencies + run: | + sudo pip install meson ninja + sudo apt update + sudo apt install libclang-14-dev + - name: Build rizin + working-directory: rizin + run: | + meson setup build + ninja -C build + - name: Run rz-bindgen linter + run: | + python3 rz-bindgen/src/lint.py \ + --clang-path "/usr/lib/llvm-14/lib" \ + --clang-args "-resource-dir=$(clang -print-resource-dir) " \ + --rizin-path rizin + clang-format: needs: changes runs-on: ubuntu-20.04 diff --git a/binrz/rz-test/load.c b/binrz/rz-test/load.c index 4bc42005cd0..22ec96897ae 100644 --- a/binrz/rz-test/load.c +++ b/binrz/rz-test/load.c @@ -102,7 +102,7 @@ static char *read_string_val(char **nextline, const char *val, ut64 *linenum) { return strdup(val); } -RZ_API RzPVector *rz_test_load_cmd_test_file(const char *file) { +RZ_API RzPVector /**/ *rz_test_load_cmd_test_file(const char *file) { char *contents = rz_file_slurp(file, NULL); if (!contents) { eprintf("Failed to open file \"%s\"\n", file); @@ -310,7 +310,7 @@ static bool parse_asm_path(const char *path, RzStrConstPool *strpool, const char return true; } -RZ_API RzPVector *rz_test_load_asm_test_file(RzStrConstPool *strpool, const char *file) { +RZ_API RzPVector /**/ *rz_test_load_asm_test_file(RzStrConstPool *strpool, const char *file) { const char *arch; const char *cpu; int bits; @@ -479,7 +479,7 @@ RZ_API void rz_test_json_test_free(RzJsonTest *test) { free(test); } -RZ_API RzPVector *rz_test_load_json_test_file(const char *file) { +RZ_API RzPVector /**/ *rz_test_load_json_test_file(const char *file) { char *contents = rz_file_slurp(file, NULL); if (!contents) { eprintf("Failed to open file \"%s\"\n", file); diff --git a/binrz/rz-test/run.c b/binrz/rz-test/run.c index 565df64c281..0a4505e051e 100644 --- a/binrz/rz-test/run.c +++ b/binrz/rz-test/run.c @@ -110,7 +110,7 @@ static char *convert_win_cmds(const char *cmds) { } #endif -static RzSubprocessOutput *run_rz_test(RzTestRunConfig *config, ut64 timeout_ms, const char *cmds, RzList *files, RzList *extra_args, bool load_plugins, RzTestCmdRunner runner, void *user) { +static RzSubprocessOutput *run_rz_test(RzTestRunConfig *config, ut64 timeout_ms, const char *cmds, RzList /**/ *files, RzList /**/ *extra_args, bool load_plugins, RzTestCmdRunner runner, void *user) { RzPVector args; rz_pvector_init(&args, NULL); rz_pvector_push(&args, "-escr.utf8=0"); diff --git a/binrz/rz-test/rz-test.c b/binrz/rz-test/rz-test.c index ec1b017d9d4..c2b29d3d760 100644 --- a/binrz/rz-test/rz-test.c +++ b/binrz/rz-test/rz-test.c @@ -42,22 +42,22 @@ typedef struct rz_test_state_t { RzThreadCond *cond; // signaled from workers to main thread to update status RzThreadLock *lock; // protects everything below HtPP *path_left; // char * (path to test file) => RzTestFileCounts * - RzPVector completed_paths; + RzPVector /**/ completed_paths; ut64 ok_count; ut64 xx_count; ut64 br_count; ut64 fx_count; - RzPVector queue; - RzPVector results; + RzPVector /**/ queue; + RzPVector /**/ results; } RzTestState; static void *worker_th(RzTestState *state); static void print_state(RzTestState *state, ut64 prev_completed); static void print_log(RzTestState *state, ut64 prev_completed, ut64 prev_paths_completed); static void interact(RzTestState *state); -static bool interact_fix(RzTestResultInfo *result, RzPVector *fixup_results); -static void interact_break(RzTestResultInfo *result, RzPVector *fixup_results); -static void interact_commands(RzTestResultInfo *result, RzPVector *fixup_results); +static bool interact_fix(RzTestResultInfo *result, RzPVector /**/ *fixup_results); +static void interact_break(RzTestResultInfo *result, RzPVector /**/ *fixup_results); +static void interact_commands(RzTestResultInfo *result, RzPVector /**/ *fixup_results); static int help(bool verbose) { printf("Usage: rz-test [-qvVnL] [-j threads] [test file/dir | @test-type]\n"); @@ -1075,7 +1075,7 @@ static char *replace_lines(const char *src, size_t from, size_t to, const char * } // After editing a test, fix the line numbers previously saved for all the other tests -static void fixup_tests(RzPVector *results, const char *edited_file, ut64 start_line, st64 delta) { +static void fixup_tests(RzPVector /**/ *results, const char *edited_file, ut64 start_line, st64 delta) { void **it; rz_pvector_foreach (results, it) { RzTestResultInfo *result = *it; @@ -1133,7 +1133,7 @@ static void save_test_file_for_fix(const char *path, const char *newc) { } } -static char *replace_cmd_kv(const char *path, const char *content, size_t line_begin, size_t line_end, const char *key, const char *value, RzPVector *fixup_results) { +static char *replace_cmd_kv(const char *path, const char *content, size_t line_begin, size_t line_end, const char *key, const char *value, RzPVector /**/ *fixup_results) { char *kv = format_cmd_kv(key, value); if (!kv) { return NULL; @@ -1153,7 +1153,7 @@ static char *replace_cmd_kv(const char *path, const char *content, size_t line_b return newc; } -static void replace_cmd_kv_file(const char *path, ut64 line_begin, ut64 line_end, const char *key, const char *value, RzPVector *fixup_results) { +static void replace_cmd_kv_file(const char *path, ut64 line_begin, ut64 line_end, const char *key, const char *value, RzPVector /**/ *fixup_results) { char *content = read_test_file_for_fix(path); if (!content) { return; @@ -1167,7 +1167,7 @@ static void replace_cmd_kv_file(const char *path, ut64 line_begin, ut64 line_end free(newc); } -static bool interact_fix_cmd(RzTestResultInfo *result, RzPVector *fixup_results) { +static bool interact_fix_cmd(RzTestResultInfo *result, RzPVector /**/ *fixup_results) { assert(result->test->type == RZ_TEST_TYPE_CMD); if (result->run_failed || result->proc_out->ret != 0) { return false; @@ -1279,7 +1279,7 @@ static bool interact_fix_asm(RzTestResultInfo *result) { return true; } -static bool interact_fix(RzTestResultInfo *result, RzPVector *fixup_results) { +static bool interact_fix(RzTestResultInfo *result, RzPVector /**/ *fixup_results) { switch (result->test->type) { case RZ_TEST_TYPE_CMD: return interact_fix_cmd(result, fixup_results); @@ -1290,7 +1290,7 @@ static bool interact_fix(RzTestResultInfo *result, RzPVector *fixup_results) { } } -static void interact_break_cmd(RzTestResultInfo *result, RzPVector *fixup_results) { +static void interact_break_cmd(RzTestResultInfo *result, RzPVector /**/ *fixup_results) { assert(result->test->type == RZ_TEST_TYPE_CMD); RzCmdTest *test = result->test->cmd_test; ut64 line_begin; @@ -1311,7 +1311,7 @@ static void interact_break_asm(RzTestResultInfo *result) { test->mode | RZ_ASM_TEST_MODE_BROKEN, test->disasm, test->bytes, test->bytes_size, test->offset, test->il); } -static void interact_break(RzTestResultInfo *result, RzPVector *fixup_results) { +static void interact_break(RzTestResultInfo *result, RzPVector /**/ *fixup_results) { switch (result->test->type) { case RZ_TEST_TYPE_CMD: interact_break_cmd(result, fixup_results); @@ -1324,7 +1324,7 @@ static void interact_break(RzTestResultInfo *result, RzPVector *fixup_results) { } } -static void interact_commands(RzTestResultInfo *result, RzPVector *fixup_results) { +static void interact_commands(RzTestResultInfo *result, RzPVector /**/ *fixup_results) { assert(result->test->type == RZ_TEST_TYPE_CMD); RzCmdTest *test = result->test->cmd_test; if (!test->cmds.value) { diff --git a/binrz/rz-test/rz_test.h b/binrz/rz-test/rz_test.h index ec2a4d977da..ff13837fd7f 100644 --- a/binrz/rz-test/rz_test.h +++ b/binrz/rz-test/rz_test.h @@ -135,7 +135,7 @@ typedef struct rz_test_test_t { } RzTest; typedef struct rz_test_test_database_t { - RzPVector tests; + RzPVector /**/ tests; RzStrConstPool strpool; } RzTestDatabase; @@ -179,15 +179,15 @@ typedef struct rz_test_test_result_info_t { RZ_API RzCmdTest *rz_test_cmd_test_new(void); RZ_API void rz_test_cmd_test_free(RzCmdTest *test); -RZ_API RzPVector *rz_test_load_cmd_test_file(const char *file); +RZ_API RzPVector /**/ *rz_test_load_cmd_test_file(const char *file); RZ_API RzAsmTest *rz_test_asm_test_new(void); RZ_API void rz_test_asm_test_free(RzAsmTest *test); -RZ_API RzPVector *rz_test_load_asm_test_file(RzStrConstPool *strpool, const char *file); +RZ_API RzPVector /**/ *rz_test_load_asm_test_file(RzStrConstPool *strpool, const char *file); RZ_API RzJsonTest *rz_test_json_test_new(void); RZ_API void rz_test_json_test_free(RzJsonTest *test); -RZ_API RzPVector *rz_test_load_json_test_file(const char *file); +RZ_API RzPVector /**/ *rz_test_load_json_test_file(const char *file); RZ_API RzTestDatabase *rz_test_test_database_new(void); RZ_API void rz_test_test_database_free(RzTestDatabase *db); diff --git a/librz/analysis/block.c b/librz/analysis/block.c index 3d600ea111b..4d89b3f170c 100644 --- a/librz/analysis/block.c +++ b/librz/analysis/block.c @@ -408,7 +408,7 @@ RZ_API bool rz_analysis_block_successor_addrs_foreach(RzAnalysisBlock *block, Rz typedef struct rz_analysis_block_recurse_context_t { RzAnalysis *analysis; - RzPVector /**/ to_visit; + RzPVector /**/ to_visit; HtUP *visited; } RzAnalysisBlockRecurseContext; @@ -486,7 +486,7 @@ RZ_API bool rz_analysis_block_recurse_followthrough(RzAnalysisBlock *block, RzAn typedef struct { RzAnalysisBlock *bb; - RzListIter *switch_it; + RzListIter /**/ *switch_it; } RecurseDepthFirstCtx; RZ_API bool rz_analysis_block_recurse_depth_first(RzAnalysisBlock *block, RzAnalysisBlockCb cb, RZ_NULLABLE RzAnalysisBlockCb on_exit, void *user) { @@ -601,8 +601,8 @@ typedef struct { RzAnalysis *analysis; RzAnalysisBlock *cur_parent; ut64 dst; - RzPVector /**/ *next_visit; // accumulate block of the next level in the tree - HtUP /**/ *visited; // maps addrs to their previous block (or NULL for entry) + RzPVector /**/ *next_visit; // accumulate block of the next level in the tree + HtUP /**/ *visited; // maps addrs to their previous block (or NULL for entry) } PathContext; static bool shortest_path_successor_cb(ut64 addr, void *user) { diff --git a/librz/analysis/dwarf_process.c b/librz/analysis/dwarf_process.c index 0e216eb59c3..19d1d53366b 100644 --- a/librz/analysis/dwarf_process.c +++ b/librz/analysis/dwarf_process.c @@ -994,7 +994,7 @@ static const char *get_dwarf_reg_name(RZ_NONNULL char *arch, int reg_num, Variab return "unsupported_reg"; } -static RzBinDwarfLocRange *find_largest_loc_range(RzList *loc_list) { +static RzBinDwarfLocRange *find_largest_loc_range(RzList /**/ *loc_list) { RzBinDwarfLocRange *largest = NULL; ut64 max_range_size = 0; RzListIter *iter; diff --git a/librz/analysis/fcn.c b/librz/analysis/fcn.c index a6324b5d224..b006fd4390f 100644 --- a/librz/analysis/fcn.c +++ b/librz/analysis/fcn.c @@ -556,7 +556,7 @@ static inline void set_bb_branches(RZ_OUT RzAnalysisBlock *bb, const ut64 jump, * \param tasks The task list to append the new task items to. * \return RzAnalysisBBEndCause Cause a basic block ended. */ -static RzAnalysisBBEndCause run_basic_block_analysis(RzAnalysisTaskItem *item, RzVector *tasks) { +static RzAnalysisBBEndCause run_basic_block_analysis(RzAnalysisTaskItem *item, RzVector /**/ *tasks) { rz_return_val_if_fail(item && tasks, RZ_ANALYSIS_RET_ERROR); RzAnalysis *analysis = item->fcn->analysis; RzAnalysisFunction *fcn = item->fcn; @@ -2334,7 +2334,7 @@ static void clear_bb_vars(RzAnalysisFunction *fcn, RzAnalysisBlock *bb, ut64 fro } } -static void update_analysis(RzAnalysis *analysis, RzList *fcns, HtUP *reachable) { +static void update_analysis(RzAnalysis *analysis, RzList /**/ *fcns, HtUP *reachable) { RzListIter *it, *it2, *tmp; RzAnalysisFunction *fcn; bool old_jmpmid = analysis->opt.jmpmid; @@ -2378,7 +2378,7 @@ static void update_analysis(RzAnalysis *analysis, RzList *fcns, HtUP *reachable) analysis->opt.jmpmid = old_jmpmid; } -static void calc_reachable_and_remove_block(RzList *fcns, RzAnalysisFunction *fcn, RzAnalysisBlock *bb, HtUP *reachable) { +static void calc_reachable_and_remove_block(RzList /**/ *fcns, RzAnalysisFunction *fcn, RzAnalysisBlock *bb, HtUP *reachable) { clear_bb_vars(fcn, bb, bb->addr, bb->addr + bb->size); if (!rz_list_contains(fcns, fcn)) { rz_list_append(fcns, fcn); diff --git a/librz/analysis/meta.c b/librz/analysis/meta.c index 973e2943812..6e2e9b632e5 100644 --- a/librz/analysis/meta.c +++ b/librz/analysis/meta.c @@ -50,7 +50,7 @@ typedef struct { RzAnalysisMetaType type; const RzSpace *space; - RzPVector /*RzIntervalNode*/ *result; + RzPVector /**/ *result; } CollectCtx; static bool collect_nodes_cb(RzIntervalNode *node, void *user) { @@ -61,7 +61,7 @@ static bool collect_nodes_cb(RzIntervalNode *node, void *user) { return true; } -static RzPVector *collect_nodes_at(RzAnalysis *analysis, RzAnalysisMetaType type, RZ_NULLABLE const RzSpace *space, ut64 addr) { +static RzPVector /**/ *collect_nodes_at(RzAnalysis *analysis, RzAnalysisMetaType type, RZ_NULLABLE const RzSpace *space, ut64 addr) { CollectCtx ctx = { .type = type, .space = space, @@ -74,7 +74,7 @@ static RzPVector *collect_nodes_at(RzAnalysis *analysis, RzAnalysisMetaType type return ctx.result; } -static RzPVector *collect_nodes_in(RzAnalysis *analysis, RzAnalysisMetaType type, RZ_NULLABLE const RzSpace *space, ut64 addr) { +static RzPVector /**/ *collect_nodes_in(RzAnalysis *analysis, RzAnalysisMetaType type, RZ_NULLABLE const RzSpace *space, ut64 addr) { CollectCtx ctx = { .type = type, .space = space, @@ -87,7 +87,7 @@ static RzPVector *collect_nodes_in(RzAnalysis *analysis, RzAnalysisMetaType type return ctx.result; } -static RzPVector *collect_nodes_intersect(RzAnalysis *analysis, RzAnalysisMetaType type, RZ_NULLABLE const RzSpace *space, ut64 start, ut64 end) { +static RzPVector /**/ *collect_nodes_intersect(RzAnalysis *analysis, RzAnalysisMetaType type, RZ_NULLABLE const RzSpace *space, ut64 start, ut64 end) { CollectCtx ctx = { .type = type, .space = space, diff --git a/librz/analysis/p/analysis_arm_cs.c b/librz/analysis/p/analysis_arm_cs.c index 78c02745078..15031282c46 100644 --- a/librz/analysis/p/analysis_arm_cs.c +++ b/librz/analysis/p/analysis_arm_cs.c @@ -2349,7 +2349,7 @@ static ut8 *analysis_mask(RzAnalysis *analysis, int size, const ut8 *data, ut64 return ret; } -static RzList *analysis_preludes(RzAnalysis *analysis) { +static RzList /**/ *analysis_preludes(RzAnalysis *analysis) { #define KW(d, ds, m, ms) rz_list_append(l, rz_search_keyword_new((const ut8 *)d, ds, (const ut8 *)m, ms, NULL)) RzList *l = rz_list_newf((RzListFree)rz_search_keyword_free); switch (analysis->bits) { diff --git a/librz/analysis/p/analysis_mips_cs.c b/librz/analysis/p/analysis_mips_cs.c index 4eac8cf0527..a4150511e13 100644 --- a/librz/analysis/p/analysis_mips_cs.c +++ b/librz/analysis/p/analysis_mips_cs.c @@ -1215,7 +1215,7 @@ static int archinfo(RzAnalysis *a, RzAnalysisInfoType query) { } } -static RzList *analysis_preludes(RzAnalysis *analysis) { +static RzList /**/ *analysis_preludes(RzAnalysis *analysis) { #define KW(d, ds, m, ms) rz_list_append(l, rz_search_keyword_new((const ut8 *)d, ds, (const ut8 *)m, ms, NULL)) RzList *l = rz_list_newf((RzListFree)rz_search_keyword_free); KW("\x27\xbd\x00", 3, NULL, 0); diff --git a/librz/analysis/p/analysis_ppc_cs.c b/librz/analysis/p/analysis_ppc_cs.c index 59c7b3b4b03..d605bf7ce04 100644 --- a/librz/analysis/p/analysis_ppc_cs.c +++ b/librz/analysis/p/analysis_ppc_cs.c @@ -1633,7 +1633,7 @@ static int archinfo(RzAnalysis *a, RzAnalysisInfoType query) { } } -static RzList *analysis_preludes(RzAnalysis *analysis) { +static RzList /**/ *analysis_preludes(RzAnalysis *analysis) { #define KW(d, ds, m, ms) rz_list_append(l, rz_search_keyword_new((const ut8 *)d, ds, (const ut8 *)m, ms, NULL)) RzList *l = rz_list_newf((RzListFree)rz_search_keyword_free); KW("\x7c\x08\x02\xa6", 4, NULL, 0); diff --git a/librz/analysis/p/analysis_pyc.c b/librz/analysis/p/analysis_pyc.c index 42f84bd3a3c..82908616600 100644 --- a/librz/analysis/p/analysis_pyc.c +++ b/librz/analysis/p/analysis_pyc.c @@ -39,7 +39,7 @@ static char *get_reg_profile(RzAnalysis *analysis) { ); } -static RzList *get_pyc_code_obj(RzAnalysis *analysis) { +static RzList /* *>*/ *get_pyc_code_obj(RzAnalysis *analysis) { RzBin *b = analysis->binb.bin; RzBinPlugin *plugin = b->cur && b->cur->o ? b->cur->o->plugin : NULL; bool is_pyc = (plugin && strcmp(plugin->name, "pyc") == 0); diff --git a/librz/analysis/p/analysis_v850.c b/librz/analysis/p/analysis_v850.c index 42796261974..561508afc55 100644 --- a/librz/analysis/p/analysis_v850.c +++ b/librz/analysis/p/analysis_v850.c @@ -555,7 +555,7 @@ static char *get_reg_profile(RzAnalysis *analysis) { return strdup(p); } -static RzList *analysis_preludes(RzAnalysis *analysis) { +static RzList /**/ *analysis_preludes(RzAnalysis *analysis) { #define KW(d, ds, m, ms) rz_list_append(l, rz_search_keyword_new((const ut8 *)d, ds, (const ut8 *)m, ms, NULL)) RzList *l = rz_list_newf((RzListFree)rz_search_keyword_free); KW("\x80\x07", 2, "\xf0\xff", 2); diff --git a/librz/analysis/p/analysis_x86_cs.c b/librz/analysis/p/analysis_x86_cs.c index 9abbb809f12..bb5b92e82c1 100644 --- a/librz/analysis/p/analysis_x86_cs.c +++ b/librz/analysis/p/analysis_x86_cs.c @@ -3705,7 +3705,7 @@ static int archinfo(RzAnalysis *a, RzAnalysisInfoType query) { } } -static RzList *analysis_preludes(RzAnalysis *analysis) { +static RzList /**/ *analysis_preludes(RzAnalysis *analysis) { #define KW(d, ds, m, ms) rz_list_append(l, rz_search_keyword_new((const ut8 *)d, ds, (const ut8 *)m, ms, NULL)) RzList *l = rz_list_newf((RzListFree)rz_search_keyword_free); switch (analysis->bits) { diff --git a/librz/analysis/reflines.c b/librz/analysis/reflines.c index 22c8d9a5682..0c79a93f52d 100644 --- a/librz/analysis/reflines.c +++ b/librz/analysis/reflines.c @@ -36,7 +36,7 @@ static ReflineEnd *refline_end_new(ut64 val, bool is_from, RzAnalysisRefline *re return re; } -static bool add_refline(RzList *list, RzList *sten, ut64 addr, ut64 to, int *idx) { +static bool add_refline(RzList /**/ *list, RzList /**/ *sten, ut64 addr, ut64 to, int *idx) { ReflineEnd *re1, *re2; RzAnalysisRefline *item = RZ_NEW0(RzAnalysisRefline); if (!item) { diff --git a/librz/analysis/rtti_msvc.c b/librz/analysis/rtti_msvc.c index 66545e917dc..0bde7d5e595 100644 --- a/librz/analysis/rtti_msvc.c +++ b/librz/analysis/rtti_msvc.c @@ -153,7 +153,7 @@ static bool rtti_msvc_read_base_class_descriptor(RVTableContext *context, ut64 a return true; } -static RzList *rtti_msvc_read_base_class_array(RVTableContext *context, ut32 num_base_classes, ut64 base, ut32 offset) { +static RzList /**/ *rtti_msvc_read_base_class_array(RVTableContext *context, ut32 num_base_classes, ut64 base, ut32 offset) { if (base == UT64_MAX || offset == UT32_MAX || num_base_classes == UT32_MAX) { return NULL; } @@ -632,8 +632,8 @@ typedef struct recovery_complete_object_locator_t { rtti_complete_object_locator col; RecoveryTypeDescriptor *td; rtti_class_hierarchy_descriptor chd; - RzList *bcd; // - RzVector base_td; // + RzList /**/ *bcd; + RzVector /**/ base_td; } RecoveryCompleteObjectLocator; RecoveryCompleteObjectLocator *recovery_complete_object_locator_new() { @@ -685,10 +685,10 @@ void recovery_type_descriptor_free(RecoveryTypeDescriptor *td) { typedef struct rtti_msvc_analysis_context_t { RVTableContext *vt_context; - RzPVector vtables; // - RzPVector complete_object_locators; // + RzPVector /**/ vtables; + RzPVector /**/ complete_object_locators; HtUP *addr_col; // - RzPVector type_descriptors; // + RzPVector /**/ type_descriptors; HtUP *addr_td; // HtUP *col_td_classes; // contains already recovered classes for col (or td) addresses } RRTTIMSVCAnalContext; @@ -852,7 +852,7 @@ static void recovery_apply_vtable(RVTableContext *context, const char *class_nam static const char *recovery_apply_complete_object_locator(RRTTIMSVCAnalContext *context, RecoveryCompleteObjectLocator *col); static const char *recovery_apply_type_descriptor(RRTTIMSVCAnalContext *context, RecoveryTypeDescriptor *td); -static void recovery_apply_bases(RRTTIMSVCAnalContext *context, const char *class_name, RzVector *base_descs) { +static void recovery_apply_bases(RRTTIMSVCAnalContext *context, const char *class_name, RzVector /**/ *base_descs) { RecoveryBaseDescriptor *base_desc; rz_vector_foreach(base_descs, base_desc) { RecoveryTypeDescriptor *base_td = base_desc->td; diff --git a/librz/analysis/type_pdb.c b/librz/analysis/type_pdb.c index 552ed44b102..e76fe0b28f4 100644 --- a/librz/analysis/type_pdb.c +++ b/librz/analysis/type_pdb.c @@ -15,7 +15,7 @@ static RzType *parse_type_modifier(const RzTypeDB *typedb, RzPdbTpiStream *strea static RzType *parse_type_pointer(const RzTypeDB *typedb, RzPdbTpiStream *stream, RzPdbTpiType *type, char *name); static RzType *parse_type_procedure(const RzTypeDB *typedb, RzPdbTpiStream *stream, RzPdbTpiType *type, char *name); static RzType *parse_type_array(const RzTypeDB *typedb, RzPdbTpiStream *stream, RzPdbTpiType *type); -static void parse_type_arglist(const RzTypeDB *typedb, RzPdbTpiStream *stream, RzPdbTpiType *arglist, RzPVector *vec); +static void parse_type_arglist(const RzTypeDB *typedb, RzPdbTpiStream *stream, RzPdbTpiType *arglist, RzPVector /**/ *vec); static RzType *parse_type_mfunction(const RzTypeDB *typedb, RzPdbTpiStream *stream, RzPdbTpiType *type_info, char *name); static RzType *parse_type_onemethod(const RzTypeDB *typedb, RzPdbTpiStream *stream, RzPdbTpiType *type_info); static RzType *parse_type_member(const RzTypeDB *typedb, RzPdbTpiStream *stream, RzPdbTpiType *type_info, char *name); @@ -171,7 +171,7 @@ static RzType *parse_type(const RzTypeDB *typedb, RzPdbTpiStream *stream, RzPdbT } } -static void parse_type_arglist(const RzTypeDB *typedb, RzPdbTpiStream *stream, RzPdbTpiType *arglist, RzPVector *vec) { +static void parse_type_arglist(const RzTypeDB *typedb, RzPdbTpiStream *stream, RzPdbTpiType *arglist, RzPVector /**/ *vec) { rz_return_if_fail(arglist && typedb && vec); Tpi_LF_Arglist *lf_arglist = arglist->type_data; if (!vec) { diff --git a/librz/analysis/typelink.c b/librz/analysis/typelink.c index 089b6e24102..18937db0c4a 100644 --- a/librz/analysis/typelink.c +++ b/librz/analysis/typelink.c @@ -102,7 +102,7 @@ RZ_API RZ_OWN RzList /**/ *rz_analysis_type_links(RzAnalysis *analysis struct TListMeta { const RzTypeDB *typedb; - RzList *l; + RzList /**/ *l; ut64 addr; ut64 offset; }; diff --git a/librz/analysis/var.c b/librz/analysis/var.c index 11ef9b7c224..8eb6094584c 100644 --- a/librz/analysis/var.c +++ b/librz/analysis/var.c @@ -590,7 +590,7 @@ RZ_API int rz_analysis_var_count(RzAnalysis *a, RzAnalysisFunction *fcn, int kin return count[type]; } -static bool var_add_structure_fields_to_list(RzAnalysis *a, RzAnalysisVar *av, RzList *list) { +static bool var_add_structure_fields_to_list(RzAnalysis *a, RzAnalysisVar *av, RzList /**/ *list) { if (av->type->kind != RZ_TYPE_KIND_IDENTIFIER) { return false; } @@ -1114,7 +1114,7 @@ RZ_API void rz_analysis_extract_vars(RzAnalysis *analysis, RzAnalysisFunction *f } } -static RzList *var_generate_list(RzAnalysis *a, RzAnalysisFunction *fcn, int kind) { +static RzList /**/ *var_generate_list(RzAnalysis *a, RzAnalysisFunction *fcn, int kind) { if (!a || !fcn) { return NULL; } diff --git a/librz/analysis/var_global.c b/librz/analysis/var_global.c index 38323b87021..df15bb9eb9c 100644 --- a/librz/analysis/var_global.c +++ b/librz/analysis/var_global.c @@ -193,7 +193,7 @@ RZ_API RZ_BORROW RzAnalysisVarGlobal *rz_analysis_var_global_get_byname(RzAnalys } struct list_addr { - RzList /* */ *list; + RzList /**/ *list; ut64 addr; }; diff --git a/librz/analysis/xrefs.c b/librz/analysis/xrefs.c index f515e3175a2..3477d46ee25 100644 --- a/librz/analysis/xrefs.c +++ b/librz/analysis/xrefs.c @@ -80,11 +80,11 @@ static int ref_cmp(const RzAnalysisXRef *a, const RzAnalysisXRef *b) { return 0; } -static void sortxrefs(RzList *list) { +static void sortxrefs(RzList /**/ *list) { rz_list_sort(list, (RzListComparator)ref_cmp); } -static void listxrefs(HtUP *m, ut64 addr, RzList *list) { +static void listxrefs(HtUP *m, ut64 addr, RzList /**/ *list) { if (addr == UT64_MAX) { ht_up_foreach(m, mylistrefs_cb, list); } else { @@ -275,7 +275,7 @@ RZ_API ut64 rz_analysis_xrefs_count(RzAnalysis *analysis) { return ret; } -static RzList *fcn_get_refs(RzAnalysisFunction *fcn, HtUP *ht) { +static RzList /**/ *fcn_get_refs(RzAnalysisFunction *fcn, HtUP *ht) { RzListIter *iter; RzAnalysisBlock *bb; RzList *list = rz_analysis_xref_list_new(); diff --git a/librz/asm/arch/hexagon/hexagon.h b/librz/asm/arch/hexagon/hexagon.h index 49917828c2e..3cca6275d64 100644 --- a/librz/asm/arch/hexagon/hexagon.h +++ b/librz/asm/arch/hexagon/hexagon.h @@ -127,7 +127,7 @@ typedef struct { * The container holds the instructions or sub-instructions. */ typedef struct { - RzList /* HexInsnContainer */ *bin; ///< Descending by address sorted list of instruction containers. + RzList /**/ *bin; ///< Descending by address sorted list of instruction containers. bool last_instr_present; ///< Has an instruction the parsing bits 0b11 set (is last instruction). bool is_valid; ///< Is it a valid packet? Do we know which instruction is the first? ut32 hw_loop0_addr; ///< Start address of hardware loop 0 @@ -151,7 +151,7 @@ typedef struct { RzList *const_ext_l; // Constant extender values. RzAsm rz_asm; // Copy of RzAsm struct. Holds certain flags of interesed for disassembly formatting. RzConfig *cfg; - RzPVector /* RzAsmTokenPattern* */ *token_patterns; ///< PVector with token patterns. Priority ordered. + RzPVector /**/ *token_patterns; ///< PVector with token patterns. Priority ordered. } HexState; typedef enum { @@ -603,4 +603,4 @@ RZ_API void hex_extend_op(HexState *state, RZ_INOUT HexOp *op, const bool set_ne int resolve_n_register(const int reg_num, const ut32 addr, const HexPkt *p); int hexagon_disasm_instruction(HexState *state, const ut32 hi_u32, RZ_INOUT HexInsnContainer *hi, HexPkt *pkt); -#endif \ No newline at end of file +#endif diff --git a/librz/asm/arch/pyc/opcode.h b/librz/asm/arch/pyc/opcode.h index 59a3834b818..6589194991f 100644 --- a/librz/asm/arch/pyc/opcode.h +++ b/librz/asm/arch/pyc/opcode.h @@ -47,7 +47,7 @@ typedef struct { ut8 have_argument; ut8 bits; void *(*version_sig)(); - RzList *opcode_arg_fmt; + RzList /**/ *opcode_arg_fmt; pyc_opcode_object *opcodes; } pyc_opcodes; diff --git a/librz/asm/arch/pyc/pyc_dis.c b/librz/asm/arch/pyc/pyc_dis.c index 2682e9c3272..423e7dabfc1 100644 --- a/librz/asm/arch/pyc/pyc_dis.c +++ b/librz/asm/arch/pyc/pyc_dis.c @@ -6,9 +6,9 @@ static const char *cmp_op[] = { "<", "<=", "==", "!=", ">", ">=", "in", "not in", "is", "is not", "exception match", "BAD" }; -static const char *parse_arg(pyc_opcode_object *op, ut32 oparg, RzList *names, RzList *consts, RzList *varnames, RzList *interned_table, RzList *freevars, RzList *cellvars, RzList *opcode_arg_fmt); +static const char *parse_arg(pyc_opcode_object *op, ut32 oparg, RzList /**/ *names, RzList /**/ *consts, RzList /**/ *varnames, RzList /**/ *freevars, RzList /**/ *cellvars, RzList /**/ *opcode_arg_fmt); -int rz_pyc_disasm(RzAsmOp *opstruct, const ut8 *code, RzList *cobjs, RzList *interned_table, ut64 pc, pyc_opcodes *ops) { +int rz_pyc_disasm(RzAsmOp *opstruct, const ut8 *code, RzList /**/ *cobjs, ut64 pc, pyc_opcodes *ops) { pyc_code_object *cobj = NULL, *t = NULL; ut32 i = 0, oparg; st64 start_offset, end_offset; @@ -46,7 +46,7 @@ int rz_pyc_disasm(RzAsmOp *opstruct, const ut8 *code, RzList *cobjs, RzList *int oparg = code[i]; i += 1; } - const char *arg = parse_arg(&ops->opcodes[op], oparg, names, consts, varnames, interned_table, freevars, cellvars, ops->opcode_arg_fmt); + const char *arg = parse_arg(&ops->opcodes[op], oparg, names, consts, varnames, freevars, cellvars, ops->opcode_arg_fmt); if (arg != NULL) { rz_strbuf_appendf(&opstruct->buf_asm, "%20s", arg); free((char *)arg); @@ -60,9 +60,9 @@ int rz_pyc_disasm(RzAsmOp *opstruct, const ut8 *code, RzList *cobjs, RzList *int return 0; } -static char *generic_array_obj_to_string(RzList *l); +static char *generic_array_obj_to_string(RzList /**/ *l); -static const char *parse_arg(pyc_opcode_object *op, ut32 oparg, RzList *names, RzList *consts, RzList *varnames, RzList *interned_table, RzList *freevars, RzList *cellvars, RzList *opcode_arg_fmt) { +static const char *parse_arg(pyc_opcode_object *op, ut32 oparg, RzList /**/ *names, RzList /**/ *consts, RzList /**/ *varnames, RzList /**/ *freevars, RzList /**/ *cellvars, RzList /**/ *opcode_arg_fmt) { pyc_object *t = NULL; const char *arg = NULL; pyc_code_object *tmp_cobj; @@ -151,7 +151,7 @@ static const char *parse_arg(pyc_opcode_object *op, ut32 oparg, RzList *names, R return arg; } -static char *generic_array_obj_to_string(RzList *l) { +static char *generic_array_obj_to_string(RzList /**/ *l) { RzListIter *iter = NULL; pyc_object *e = NULL; diff --git a/librz/asm/arch/pyc/pyc_dis.h b/librz/asm/arch/pyc/pyc_dis.h index abaed57580e..89b824ecdb7 100644 --- a/librz/asm/arch/pyc/pyc_dis.h +++ b/librz/asm/arch/pyc/pyc_dis.h @@ -14,6 +14,6 @@ #include "../../../bin/format/pyc/marshal.h" -int rz_pyc_disasm(RzAsmOp *op, const ut8 *buf, RzList *cobjs, RzList *interned_table, ut64 pc, pyc_opcodes *opcodes); +int rz_pyc_disasm(RzAsmOp *op, const ut8 *buf, RzList /**/ *cobjs, ut64 pc, pyc_opcodes *opcodes); #endif diff --git a/librz/asm/asm.c b/librz/asm/asm.c index 8856dd12b57..8300831f20e 100644 --- a/librz/asm/asm.c +++ b/librz/asm/asm.c @@ -1188,7 +1188,7 @@ RZ_API char *rz_asm_describe(RzAsm *a, const char *str) { return (a && a->pair) ? sdb_get(a->pair, str, 0) : NULL; } -RZ_API RzList *rz_asm_get_plugins(RzAsm *a) { +RZ_API RzList /**/ *rz_asm_get_plugins(RzAsm *a) { return a->plugins; } @@ -1766,4 +1766,4 @@ RZ_API RZ_OWN RzAsmParseParam *rz_asm_get_parse_param(RZ_NULLABLE const RzReg *r param->reg_sets = reg->regset; param->ana_op_type = ana_op_type; return param; -} \ No newline at end of file +} diff --git a/librz/asm/p/asm_hexagon.c b/librz/asm/p/asm_hexagon.c index cf6e8ef6617..93d481cd250 100644 --- a/librz/asm/p/asm_hexagon.c +++ b/librz/asm/p/asm_hexagon.c @@ -19,7 +19,7 @@ #include "hexagon_insn.h" #include "hexagon_arch.h" -static RZ_OWN RzPVector /* RzAsmTokenPattern */ *get_token_patterns() { +static RZ_OWN RzPVector /**/ *get_token_patterns() { static RzPVector *pvec = NULL; if (pvec) { return pvec; @@ -111,7 +111,7 @@ static RZ_OWN RzPVector /* RzAsmTokenPattern */ *get_token_patterns() { return pvec; } -static void compile_token_patterns(RZ_INOUT RzPVector /* RzAsmTokenPattern* */ *patterns) { +static void compile_token_patterns(RZ_INOUT RzPVector /**/ *patterns) { rz_return_if_fail(patterns); void **it; diff --git a/librz/asm/p/asm_pyc.c b/librz/asm/p/asm_pyc.c index 252ad5bf668..a4ede22ce91 100644 --- a/librz/asm/p/asm_pyc.c +++ b/librz/asm/p/asm_pyc.c @@ -26,11 +26,9 @@ static int disassemble(RzAsm *a, RzAsmOp *opstruct, const ut8 *buf, int len) { } RzList *cobjs = NULL; - RzList *interned_table = NULL; if (shared) { cobjs = rz_list_get_n(shared, 0); - interned_table = rz_list_get_n(shared, 1); } if (!opcodes_cache || !pyc_opcodes_equal(opcodes_cache, a->cpu)) { @@ -41,7 +39,7 @@ static int disassemble(RzAsm *a, RzAsmOp *opstruct, const ut8 *buf, int len) { } opcodes_cache->bits = a->bits; } - int r = rz_pyc_disasm(opstruct, buf, cobjs, interned_table, pc, opcodes_cache); + int r = rz_pyc_disasm(opstruct, buf, cobjs, pc, opcodes_cache); opstruct->size = r; return r; } diff --git a/librz/bin/bfile.c b/librz/bin/bfile.c index b4160847763..7d3636dc165 100644 --- a/librz/bin/bfile.c +++ b/librz/bin/bfile.c @@ -368,7 +368,7 @@ RZ_API bool rz_bin_file_close(RzBin *bin, int bd) { return false; } -static inline bool add_file_hash(RzHashCfg *md, const char *name, RzList *list) { +static inline bool add_file_hash(RzHashCfg *md, const char *name, RzList /**/ *list) { char hash[128]; const ut8 *digest = NULL; RzHashSize digest_size = 0; diff --git a/librz/bin/bfile_string.c b/librz/bin/bfile_string.c index 97a3088dc07..a3abf3f2d15 100644 --- a/librz/bin/bfile_string.c +++ b/librz/bin/bfile_string.c @@ -21,7 +21,7 @@ typedef struct shared_data_t { typedef struct search_thread_data_t { RzThreadQueue *intervals; - RzList *results; + RzList /**/ *results; size_t min_length; RzStrEnc encoding; bool check_ascii_freq; @@ -73,7 +73,7 @@ static RzBinString *to_bin_string(RzDetectedString *src) { return dst; } -static RzList *string_scan_range(SearchThreadData *std, const ut64 paddr, const ut64 size) { +static RzList /**/ *string_scan_range(SearchThreadData *std, const ut64 paddr, const ut64 size) { RzList *found = rz_list_newf((RzListFree)free); if (!found) { return NULL; @@ -238,7 +238,7 @@ static int string_compare_sort(const RzBinString *a, const RzBinString *b) { return 0; } -static void string_scan_range_cfstring(RzBinFile *bf, HtUP *strings_db, RzList *results, const RzBinSection *section) { +static void string_scan_range_cfstring(RzBinFile *bf, HtUP *strings_db, RzList /**/ *results, const RzBinSection *section) { // load objc/swift strings from CFstring table section RzBinObject *o = bf->o; @@ -290,7 +290,7 @@ static void string_scan_range_cfstring(RzBinFile *bf, HtUP *strings_db, RzList * free(sbuf); } -static void scan_cfstring_table(RzBinFile *bf, HtUP *strings_db, RzList *results, ut64 max_interval) { +static void scan_cfstring_table(RzBinFile *bf, HtUP *strings_db, RzList /**/ *results, ut64 max_interval) { RzListIter *iter = NULL; RzBinSection *section = NULL; RzBinObject *o = bf->o; diff --git a/librz/bin/bobj.c b/librz/bin/bobj.c index bb7298107ac..fb683762653 100644 --- a/librz/bin/bobj.c +++ b/librz/bin/bobj.c @@ -36,7 +36,7 @@ RZ_API void rz_bin_string_decode_base64(RZ_NONNULL RzBinString *bstr) { bstr->type = RZ_STRING_ENC_BASE64; } -static void bin_object_decode_all_base64_strings(RzList *strings) { +static void bin_object_decode_all_base64_strings(RzList /**/ *strings) { rz_return_if_fail(strings); RzBinString *bstr; @@ -240,7 +240,7 @@ static char *swiftField(const char *dn, const char *cn) { return NULL; } -static RzList *classes_from_symbols(RzBinFile *bf) { +static RzList /**/ *classes_from_symbols(RzBinFile *bf) { RzBinSymbol *sym; RzListIter *iter; rz_list_foreach (bf->o->symbols, iter, sym) { @@ -334,7 +334,7 @@ RZ_IPI RzBinObject *rz_bin_object_new(RzBinFile *bf, RzBinPlugin *plugin, RzBinO return o; } -static void filter_classes(RzBinFile *bf, RzList *list) { +static void filter_classes(RzBinFile *bf, RzList /**/ *list) { HtPU *db = ht_pu_new0(); HtPP *ht = ht_pp_new0(); RzListIter *iter, *iter2; @@ -751,7 +751,7 @@ RZ_API const RzList /**/ *rz_bin_object_get_sections_all(RZ_NONN return obj->sections; } -static RzList *get_sections_or_segment(RzBinObject *obj, bool is_segment) { +static RzList /**/ *get_sections_or_segment(RzBinObject *obj, bool is_segment) { RzList *res = rz_list_new(); if (!res) { return NULL; diff --git a/librz/bin/dwarf.c b/librz/bin/dwarf.c index 173a3982914..f257348d7ac 100644 --- a/librz/bin/dwarf.c +++ b/librz/bin/dwarf.c @@ -937,7 +937,7 @@ RZ_API bool rz_bin_dwarf_line_op_run(const RzBinDwarfLineHeader *hdr, RzBinDwarf } static size_t parse_opcodes(const ut8 *obuf, - size_t len, const RzBinDwarfLineHeader *hdr, RzVector *ops_out, + size_t len, const RzBinDwarfLineHeader *hdr, RzVector /**/ *ops_out, RzBinDwarfSMRegisters *regs, RZ_NULLABLE RzBinSourceLineInfoBuilder *bob, RZ_NULLABLE RzBinDwarfDebugInfo *info, RZ_NULLABLE RzBinDwarfLineFileCache fnc, bool big_endian, ut8 target_addr_size) { const ut8 *buf, *buf_end; diff --git a/librz/bin/format/coff/coff.h b/librz/bin/format/coff/coff.h index 3215f039797..8cebd13f612 100644 --- a/librz/bin/format/coff/coff.h +++ b/librz/bin/format/coff/coff.h @@ -48,7 +48,7 @@ RZ_API char *rz_coff_symbol_name(struct rz_bin_coff_obj *obj, void *ptr); RZ_API ut64 rz_coff_import_index_addr(struct rz_bin_coff_obj *obj, ut64 imp_index); RZ_API ut64 rz_coff_get_reloc_targets_map_base(struct rz_bin_coff_obj *obj); -RZ_API RzList *rz_coff_get_relocs(struct rz_bin_coff_obj *bin); +RZ_API RzList /**/ *rz_coff_get_relocs(struct rz_bin_coff_obj *bin); RZ_API ut64 rz_coff_get_reloc_targets_vfile_size(struct rz_bin_coff_obj *obj); RZ_API RZ_BORROW RzBuffer *rz_coff_get_patched_buf(struct rz_bin_coff_obj *bin); diff --git a/librz/bin/format/coff/coff_reloc.c b/librz/bin/format/coff/coff_reloc.c index ba98f76268f..d7302c08ae0 100644 --- a/librz/bin/format/coff/coff_reloc.c +++ b/librz/bin/format/coff/coff_reloc.c @@ -192,7 +192,7 @@ void get_relocs_list_cb(RZ_BORROW RzBinReloc *reloc, ut8 *patch_buf, size_t patc rz_list_push(r, reloc_copy); } -RZ_API RzList *rz_coff_get_relocs(struct rz_bin_coff_obj *bin) { +RZ_API RzList /**/ *rz_coff_get_relocs(struct rz_bin_coff_obj *bin) { rz_return_val_if_fail(bin, NULL); RzList *r = rz_list_newf(free); if (!r) { diff --git a/librz/bin/format/dex/dex.c b/librz/bin/format/dex/dex.c index 4745aa7b27d..48df4a32941 100644 --- a/librz/bin/format/dex/dex.c +++ b/librz/bin/format/dex/dex.c @@ -217,7 +217,7 @@ static DexEncodedField *dex_new_encoded_field(RzBuffer *buf, ut64 base, ut64 *di return encoded_field; } -static DexEncodedMethod *dex_new_encoded_method(RzBuffer *buf, ut64 base, ut64 *diff_value_prev, bool first, RzPVector *method_ids) { +static DexEncodedMethod *dex_new_encoded_method(RzBuffer *buf, ut64 base, ut64 *diff_value_prev, bool first, RzPVector /**/ *method_ids) { DexEncodedMethod *encoded_method = RZ_NEW0(DexEncodedMethod); if (!encoded_method) { return NULL; @@ -263,7 +263,7 @@ static DexEncodedMethod *dex_new_encoded_method(RzBuffer *buf, ut64 base, ut64 * return NULL; } -static DexClassDef *dex_class_def_new(RzBuffer *buf, ut64 offset, ut64 base, RzPVector *method_ids) { +static DexClassDef *dex_class_def_new(RzBuffer *buf, ut64 offset, ut64 base, RzPVector /**/ *method_ids) { DexClassDef *class_def = RZ_NEW0(DexClassDef); if (!class_def) { return NULL; diff --git a/librz/bin/format/dex/dex.h b/librz/bin/format/dex/dex.h index 0c0736e5f7a..77d94d99057 100644 --- a/librz/bin/format/dex/dex.h +++ b/librz/bin/format/dex/dex.h @@ -150,10 +150,10 @@ typedef struct dex_class_def_t { ut32 n_interfaces; ut16 *interfaces; - RzList /**/ *static_fields; - RzList /**/ *instance_fields; - RzList /**/ *direct_methods; - RzList /**/ *virtual_methods; + RzList /**/ *static_fields; + RzList /**/ *instance_fields; + RzList /**/ *direct_methods; + RzList /**/ *virtual_methods; } DexClassDef; #define DEX_CLASS_DEF_SIZE (0x20) @@ -187,11 +187,11 @@ typedef struct dex_t { ut32 data_offset; /* lists */ - RzPVector /**/ *strings; - RzPVector /**/ *proto_ids; - RzPVector /**/ *field_ids; - RzPVector /**/ *method_ids; - RzPVector /**/ *class_defs; + RzPVector /**/ *strings; + RzPVector /**/ *proto_ids; + RzPVector /**/ *field_ids; + RzPVector /**/ *method_ids; + RzPVector /**/ *class_defs; DexTypeId *types; diff --git a/librz/bin/format/dmp/dmp64.h b/librz/bin/format/dmp/dmp64.h index ea1b524b0ee..4502778b6d8 100644 --- a/librz/bin/format/dmp/dmp64.h +++ b/librz/bin/format/dmp/dmp64.h @@ -29,9 +29,9 @@ struct rz_bin_dmp64_obj_t { dmp_p_memory_run *runs; ut8 *bitmap; ut64 dtb; - RzList *pages; - RzList *datablocks; - RzList *drivers; + RzList /**/ *pages; + RzList /**/ *datablocks; + RzList /**/ *drivers; RzBuffer *b; int size; diff --git a/librz/bin/format/elf/elf.c b/librz/bin/format/elf/elf.c index ac098f56b17..cf3ca27701a 100644 --- a/librz/bin/format/elf/elf.c +++ b/librz/bin/format/elf/elf.c @@ -118,7 +118,7 @@ static bool init_phdr_sdb(ELFOBJ *bin) { sdb_set(bin->kv, "elf_phdr.format", sdb_elf_phdr_format, 0); } -static bool init_phdr_aux(ELFOBJ *bin, RzVector *sections, RzBinObjectLoadOptions *options) { +static bool init_phdr_aux(ELFOBJ *bin, RzVector /**/ *sections, RzBinObjectLoadOptions *options) { bin->segments = Elf_(rz_bin_elf_segments_new)(bin, sections, options); if (!bin->segments) { return false; @@ -127,7 +127,7 @@ static bool init_phdr_aux(ELFOBJ *bin, RzVector *sections, RzBinObjectLoadOption return init_phdr_sdb(bin); } -static void init_phdr(ELFOBJ *bin, RzVector *sections, RzBinObjectLoadOptions *options) { +static void init_phdr(ELFOBJ *bin, RzVector /**/ *sections, RzBinObjectLoadOptions *options) { if (!bin->ehdr.e_phnum) { RZ_LOG_WARN("There is no program header.\n"); return; @@ -171,7 +171,7 @@ static bool init_shdr_sdb(ELFOBJ *bin) { sdb_set(bin->kv, "elf_shdr.format", sdb_elf_shdr_format, 0); } -static bool init_shdr_aux(ELFOBJ *bin, RzBinObjectLoadOptions *options, RzVector *sections) { +static bool init_shdr_aux(ELFOBJ *bin, RzBinObjectLoadOptions *options, RzVector /**/ *sections) { bin->sections = Elf_(rz_bin_elf_convert_sections)(bin, options, sections); if (!bin->sections) { return false; @@ -180,7 +180,7 @@ static bool init_shdr_aux(ELFOBJ *bin, RzBinObjectLoadOptions *options, RzVector return init_shdr_sdb(bin); } -static void init_shdr(ELFOBJ *bin, RzBinObjectLoadOptions *options, RzVector *sections) { +static void init_shdr(ELFOBJ *bin, RzBinObjectLoadOptions *options, RzVector /**/ *sections) { if (!init_shdr_aux(bin, options, sections)) { RZ_LOG_WARN("Failed to initialize section header.\n"); } @@ -191,7 +191,7 @@ static bool init_shstrtab_sdb(ELFOBJ *bin, ut64 offset, ut64 size) { sdb_num_set(bin->kv, "elf_shstrtab.size", size, 0); } -static bool init_shstrtab_aux(ELFOBJ *bin, RzVector *sections) { +static bool init_shstrtab_aux(ELFOBJ *bin, RzVector /**/ *sections) { if (!sections) { return true; } @@ -210,7 +210,7 @@ static bool init_shstrtab_aux(ELFOBJ *bin, RzVector *sections) { return init_shstrtab_sdb(bin, section->sh_offset, section->sh_size); } -static void init_shstrtab(ELFOBJ *bin, RzVector *sections) { +static void init_shstrtab(ELFOBJ *bin, RzVector /**/ *sections) { if (!init_shstrtab_aux(bin, sections)) { RZ_LOG_WARN("Failed to initialize section string table.\n"); } diff --git a/librz/bin/format/elf/elf.h b/librz/bin/format/elf/elf.h index cef3ca0eba4..3a41bc80935 100644 --- a/librz/bin/format/elf/elf.h +++ b/librz/bin/format/elf/elf.h @@ -201,21 +201,21 @@ struct Elf_(rz_bin_elf_obj_t) { Elf_(Ehdr) ehdr; - RzVector *segments; // should be use with elf_segments.c - RzVector *sections; // should be use with elf_sections.c + RzVector /**/ *segments; // should be use with elf_segments.c + RzVector /**/ *sections; // should be use with elf_sections.c RzBinElfDtDynamic *dt_dynamic; // should be use with elf_dynamic.c RzBinElfStrtab *dynstr; // should be use with elf_strtab.c RzBinElfStrtab *shstrtab; // should be use with elf_strtab.c - RzVector *relocs; // should be use with elf_relocs.c + RzVector /**/ *relocs; // should be use with elf_relocs.c // This is RzVector of note segment reprensented as RzVector - RzVector *notes; // RzVector> + RzVector /*>*/ *notes; // RzVector> - RzVector *symbols; // RzVector - RzVector *imports; // RzVector + RzVector /**/ *symbols; // RzVector + RzVector /**/ *imports; // RzVector }; // elf.c @@ -238,7 +238,7 @@ void Elf_(rz_bin_elf_fix_arm_thumb_symbol)(RZ_NONNULL RzBinSymbol *symbol); ut64 Elf_(rz_bin_elf_get_sp_val)(RZ_NONNULL ELFOBJ *bin); // elf_dynamic.c -RZ_BORROW RzVector *Elf_(rz_bin_elf_get_dt_needed)(RZ_NONNULL ELFOBJ *bin); +RZ_BORROW RzVector /**/ *Elf_(rz_bin_elf_get_dt_needed)(RZ_NONNULL ELFOBJ *bin); RZ_OWN RzBinElfDtDynamic *Elf_(rz_bin_elf_dt_dynamic_new)(RZ_NONNULL ELFOBJ *bin); bool Elf_(rz_bin_elf_get_dt_info)(RZ_NONNULL ELFOBJ *bin, ut64 key, RZ_OUT ut64 *info); bool Elf_(rz_bin_elf_has_dt_dynamic)(RZ_NONNULL ELFOBJ *bin); @@ -270,14 +270,14 @@ size_t Elf_(rz_bin_elf_get_number_of_symbols_from_hash_table)(RZ_NONNULL ELFOBJ // elf_imports.c RZ_BORROW RzBinElfSymbol *Elf_(rz_bin_elf_get_import)(RZ_NONNULL ELFOBJ *bin, ut32 ordinal); -RZ_OWN RzVector *Elf_(rz_bin_elf_analyse_imports)(RZ_NONNULL ELFOBJ *bin); +RZ_OWN RzVector /**/ *Elf_(rz_bin_elf_analyse_imports)(RZ_NONNULL ELFOBJ *bin); bool Elf_(rz_bin_elf_has_imports)(RZ_NONNULL ELFOBJ *bin); // elf_map.c ut64 Elf_(rz_bin_elf_get_targets_map_base)(ELFOBJ *bin); // elf_info.c -RZ_OWN RzList *Elf_(rz_bin_elf_get_libs)(RZ_NONNULL ELFOBJ *bin); +RZ_OWN RzList /**/ *Elf_(rz_bin_elf_get_libs)(RZ_NONNULL ELFOBJ *bin); RZ_OWN Sdb *Elf_(rz_bin_elf_get_symbols_info)(RZ_NONNULL ELFOBJ *bin); RZ_OWN char *Elf_(rz_bin_elf_get_abi)(RZ_NONNULL ELFOBJ *bin); RZ_OWN char *Elf_(rz_bin_elf_get_arch)(RZ_NONNULL ELFOBJ *bin); @@ -308,7 +308,7 @@ ut64 Elf_(rz_bin_elf_get_main_offset)(RZ_NONNULL ELFOBJ *bin); // elf_notes.c RZ_BORROW RzBinElfPrStatusLayout *Elf_(rz_bin_elf_get_prstatus_layout)(RZ_NONNULL ELFOBJ *bin); -RZ_OWN RzVector *Elf_(rz_bin_elf_notes_new)(RZ_NONNULL ELFOBJ *bin); +RZ_OWN RzVector /*>*/ *Elf_(rz_bin_elf_notes_new)(RZ_NONNULL ELFOBJ *bin); bool Elf_(rz_bin_elf_has_notes)(RZ_NONNULL ELFOBJ *bin); // elf_misc.c @@ -336,22 +336,22 @@ bool Elf_(rz_bin_elf_mul_addr)(Elf_(Addr) * result, Elf_(Addr) addr, Elf_(Addr) bool Elf_(rz_bin_elf_mul_off)(Elf_(Off) * result, Elf_(Off) addr, Elf_(Off) value); // elf_relocs.c -RZ_OWN RzVector *Elf_(rz_bin_elf_relocs_new)(RZ_NONNULL ELFOBJ *bin); +RZ_OWN RzVector /**/ *Elf_(rz_bin_elf_relocs_new)(RZ_NONNULL ELFOBJ *bin); bool Elf_(rz_bin_elf_has_relocs)(RZ_NONNULL ELFOBJ *bin); size_t Elf_(rz_bin_elf_get_relocs_count)(RZ_NONNULL ELFOBJ *bin); ut64 Elf_(rz_bin_elf_get_num_relocs_dynamic_plt)(RZ_NONNULL ELFOBJ *bin); // elf_segments.c RZ_BORROW RzBinElfSegment *Elf_(rz_bin_elf_get_segment_with_type)(RZ_NONNULL ELFOBJ *bin, Elf_(Word) type); -RZ_OWN RzVector *Elf_(rz_bin_elf_segments_new)(RZ_NONNULL ELFOBJ *bin, RzVector *sections, RZ_NONNULL RzBinObjectLoadOptions *options); +RZ_OWN RzVector /**/ *Elf_(rz_bin_elf_segments_new)(RZ_NONNULL ELFOBJ *bin, RzVector /**/ *sections, RZ_NONNULL RzBinObjectLoadOptions *options); bool Elf_(rz_bin_elf_has_segments)(RZ_NONNULL ELFOBJ *bin); // elf_sections.c RZ_BORROW RzBinElfSection *Elf_(rz_bin_elf_get_section)(RZ_NONNULL ELFOBJ *bin, Elf_(Half) index); RZ_BORROW RzBinElfSection *Elf_(rz_bin_elf_get_section_with_name)(RZ_NONNULL ELFOBJ *bin, RZ_NONNULL const char *name); -RZ_OWN RzList *Elf_(rz_bin_elf_section_flag_to_rzlist)(ut64 flag); -RZ_OWN RzVector *Elf_(rz_bin_elf_convert_sections)(RZ_NONNULL ELFOBJ *bin, RZ_NONNULL RzBinObjectLoadOptions *options, RzVector *sections); -RZ_OWN RzVector *Elf_(rz_bin_elf_sections_new)(RZ_NONNULL ELFOBJ *bin); +RZ_OWN RzList /**/ *Elf_(rz_bin_elf_section_flag_to_rzlist)(ut64 flag); +RZ_OWN RzVector /**/ *Elf_(rz_bin_elf_convert_sections)(RZ_NONNULL ELFOBJ *bin, RZ_NONNULL RzBinObjectLoadOptions *options, RzVector /**/ *sections); +RZ_OWN RzVector /**/ *Elf_(rz_bin_elf_sections_new)(RZ_NONNULL ELFOBJ *bin); RZ_OWN char *Elf_(rz_bin_elf_section_type_to_string)(ut64 type); bool Elf_(rz_bin_elf_has_sections)(RZ_NONNULL ELFOBJ *bin); @@ -367,8 +367,8 @@ typedef bool (*RzBinElfSymbolFilter)(ELFOBJ *bin, Elf_(Sym) * entry, bool is_dyn Elf_(Word) Elf_(rz_bin_elf_get_number_of_dynamic_symbols)(RZ_NONNULL ELFOBJ *bin); RZ_BORROW RzBinElfSymbol *Elf_(rz_bin_elf_get_symbol)(RZ_NONNULL ELFOBJ *bin, ut32 ordinal); -RZ_OWN RzVector *Elf_(rz_bin_elf_compute_symbols)(ELFOBJ *bin, RzBinElfSymbolFilter filter); -RZ_OWN RzVector *Elf_(rz_bin_elf_symbols_new)(RZ_NONNULL ELFOBJ *bin); +RZ_OWN RzVector /**/ *Elf_(rz_bin_elf_compute_symbols)(ELFOBJ *bin, RzBinElfSymbolFilter filter); +RZ_OWN RzVector /**/ *Elf_(rz_bin_elf_symbols_new)(RZ_NONNULL ELFOBJ *bin); bool Elf_(rz_bin_elf_has_symbols)(RZ_NONNULL ELFOBJ *bin); #endif diff --git a/librz/bin/format/elf/elf_dynamic.c b/librz/bin/format/elf/elf_dynamic.c index 85831186fff..c7baaa17709 100644 --- a/librz/bin/format/elf/elf_dynamic.c +++ b/librz/bin/format/elf/elf_dynamic.c @@ -85,7 +85,7 @@ static bool init_dt_dynamic(ELFOBJ *bin, RzBinElfDtDynamic *ptr) { return fill_dt_dynamic(bin, ptr, offset, segment->data.p_filesz); } -RZ_BORROW RzVector *Elf_(rz_bin_elf_get_dt_needed)(RZ_NONNULL ELFOBJ *bin) { +RZ_BORROW RzVector /**/ *Elf_(rz_bin_elf_get_dt_needed)(RZ_NONNULL ELFOBJ *bin) { rz_return_val_if_fail(bin, NULL); if (!Elf_(rz_bin_elf_has_dt_dynamic)(bin)) { diff --git a/librz/bin/format/elf/elf_dynamic.h b/librz/bin/format/elf/elf_dynamic.h index 08cb1da7637..4fb946adf4b 100644 --- a/librz/bin/format/elf/elf_dynamic.h +++ b/librz/bin/format/elf/elf_dynamic.h @@ -10,7 +10,7 @@ struct rz_bin_elf_dt_dynamic_t { HtUU *info; - RzVector /* */ dt_needed; + RzVector /**/ dt_needed; }; #endif diff --git a/librz/bin/format/elf/elf_imports.c b/librz/bin/format/elf/elf_imports.c index ece343680c8..b87036c3a13 100644 --- a/librz/bin/format/elf/elf_imports.c +++ b/librz/bin/format/elf/elf_imports.c @@ -302,7 +302,7 @@ static void convert_elf_symbol_to_elf_import(ELFOBJ *bin, RzBinElfSymbol *symbol symbol->paddr = Elf_(rz_bin_elf_v2p)(bin, symbol->vaddr); } -static void convert_elf_symbols_to_elf_imports(ELFOBJ *bin, RzVector *symbols) { +static void convert_elf_symbols_to_elf_imports(ELFOBJ *bin, RzVector /**/ *symbols) { RzBinElfSymbol *symbol; rz_vector_foreach(symbols, symbol) { convert_elf_symbol_to_elf_import(bin, symbol); @@ -326,7 +326,7 @@ RZ_BORROW RzBinElfSymbol *Elf_(rz_bin_elf_get_import)(RZ_NONNULL ELFOBJ *bin, ut return NULL; } -RZ_OWN RzVector *Elf_(rz_bin_elf_analyse_imports)(RZ_NONNULL ELFOBJ *bin) { +RZ_OWN RzVector /**/ *Elf_(rz_bin_elf_analyse_imports)(RZ_NONNULL ELFOBJ *bin) { rz_return_val_if_fail(bin, NULL); RzVector *result = Elf_(rz_bin_elf_compute_symbols)(bin, filter_import); diff --git a/librz/bin/format/elf/elf_info.c b/librz/bin/format/elf/elf_info.c index 32079b4c362..8d22235a46a 100644 --- a/librz/bin/format/elf/elf_info.c +++ b/librz/bin/format/elf/elf_info.c @@ -870,11 +870,11 @@ static char *get_abi_mips(ELFOBJ *bin) { /** * \brief List all imported lib * \param elf binary - * \return an allocated list of RzBinElfLib + * \return an allocated list of char* * * Use dynamic information (dt_needed) to generate a list of imported lib */ -RZ_OWN RzList *Elf_(rz_bin_elf_get_libs)(RZ_NONNULL ELFOBJ *bin) { +RZ_OWN RzList /**/ *Elf_(rz_bin_elf_get_libs)(RZ_NONNULL ELFOBJ *bin) { rz_return_val_if_fail(bin, NULL); if (!Elf_(rz_bin_elf_has_dt_dynamic)(bin) || !bin->dynstr) { diff --git a/librz/bin/format/elf/elf_notes.c b/librz/bin/format/elf/elf_notes.c index cd4c888b6bc..aa7cb742633 100644 --- a/librz/bin/format/elf/elf_notes.c +++ b/librz/bin/format/elf/elf_notes.c @@ -21,7 +21,7 @@ static RzBinElfPrStatusLayout prstatus_layouts[ARCH_LEN] = { [AARCH64] = { 272, 0x70, 64, 0xf8 } }; -static bool parse_note_prstatus(ELFOBJ *bin, RzVector *notes, Elf_(Nhdr) * note_segment_header, ut64 offset) { +static bool parse_note_prstatus(ELFOBJ *bin, RzVector /**/ *notes, Elf_(Nhdr) * note_segment_header, ut64 offset) { RzBinElfPrStatusLayout *layout = Elf_(rz_bin_elf_get_prstatus_layout)(bin); if (!layout) { RZ_LOG_WARN("Fetching registers from core file not supported for this architecture.\n"); @@ -73,7 +73,7 @@ static bool set_note_file(ELFOBJ *bin, RzBinElfNoteFile *file, ut64 *offset, cha return true; } -static bool parse_note_file(ELFOBJ *bin, RzVector *notes, Elf_(Nhdr) * note_segment_header, ut64 offset) { +static bool parse_note_file(ELFOBJ *bin, RzVector /**/ *notes, Elf_(Nhdr) * note_segment_header, ut64 offset) { Elf_(Addr) n_maps; if (!Elf_(rz_bin_elf_read_addr)(bin, &offset, &n_maps)) { return false; @@ -115,7 +115,7 @@ static bool parse_note_file(ELFOBJ *bin, RzVector *notes, Elf_(Nhdr) * note_segm return true; } -static bool set_note(ELFOBJ *bin, RzVector *notes, Elf_(Nhdr) * note_segment_header, ut64 offset) { +static bool set_note(ELFOBJ *bin, RzVector /**/ *notes, Elf_(Nhdr) * note_segment_header, ut64 offset) { switch (note_segment_header->n_type) { case NT_FILE: if (!parse_note_file(bin, notes, note_segment_header, offset)) { @@ -150,7 +150,7 @@ static bool read_note_segment_header(ELFOBJ *bin, ut64 *offset, Elf_(Nhdr) * not return true; } -static bool set_note_segment(ELFOBJ *bin, RzVector *notes, RzBinElfSegment *segment) { +static bool set_note_segment(ELFOBJ *bin, RzVector /**/ *notes, RzBinElfSegment *segment) { ut64 offset = segment->data.p_offset; while (offset < segment->data.p_filesz) { @@ -215,7 +215,7 @@ RZ_BORROW RzBinElfPrStatusLayout *Elf_(rz_bin_elf_get_prstatus_layout)(RZ_NONNUL return NULL; } -RZ_OWN RzVector *Elf_(rz_bin_elf_notes_new)(RZ_NONNULL ELFOBJ *bin) { +RZ_OWN RzVector /*>*/ *Elf_(rz_bin_elf_notes_new)(RZ_NONNULL ELFOBJ *bin) { rz_return_val_if_fail(bin, false); RzVector *result = rz_vector_new(sizeof(RzVector), note_segment_free, NULL); diff --git a/librz/bin/format/elf/elf_relocs.c b/librz/bin/format/elf/elf_relocs.c index 1b0dfcfce35..3672db40c45 100644 --- a/librz/bin/format/elf/elf_relocs.c +++ b/librz/bin/format/elf/elf_relocs.c @@ -102,7 +102,7 @@ static bool has_already_been_processed(ELFOBJ *bin, ut64 offset, HtUU *set) { return found; } -static bool get_relocs_entry(ELFOBJ *bin, RzBinElfSection *section, RzVector *relocs, struct relocs_segment *segment, HtUU *set) { +static bool get_relocs_entry(ELFOBJ *bin, RzBinElfSection *section, RzVector /**/ *relocs, struct relocs_segment *segment, HtUU *set) { for (ut64 entry_offset = 0; entry_offset < segment->size; entry_offset += segment->entry_size) { if (has_already_been_processed(bin, segment->offset + entry_offset, set)) { continue; @@ -127,7 +127,7 @@ static bool get_relocs_entry(ELFOBJ *bin, RzBinElfSection *section, RzVector *re return true; } -static bool get_relocs_entry_from_dt_dynamic_aux(ELFOBJ *bin, RzVector *relocs, ut64 dt_addr, ut64 dt_size, ut64 entry_size, ut64 mode, HtUU *set) { +static bool get_relocs_entry_from_dt_dynamic_aux(ELFOBJ *bin, RzVector /**/ *relocs, ut64 dt_addr, ut64 dt_size, ut64 entry_size, ut64 mode, HtUU *set) { ut64 addr; ut64 size; @@ -145,7 +145,7 @@ static bool get_relocs_entry_from_dt_dynamic_aux(ELFOBJ *bin, RzVector *relocs, return get_relocs_entry(bin, NULL, relocs, &segment, set); } -static bool get_relocs_entry_from_dt_dynamic(ELFOBJ *bin, RzVector *relocs, HtUU *set) { +static bool get_relocs_entry_from_dt_dynamic(ELFOBJ *bin, RzVector /**/ *relocs, HtUU *set) { ut64 entry_size; if (!Elf_(rz_bin_elf_has_dt_dynamic)(bin)) { @@ -179,7 +179,7 @@ static ut64 get_section_relocation_mode(RzBinElfSection *section) { return section->type == SHT_REL ? DT_REL : DT_RELA; } -static bool get_relocs_entry_from_sections(ELFOBJ *bin, RzVector *relocs, HtUU *set) { +static bool get_relocs_entry_from_sections(ELFOBJ *bin, RzVector /**/ *relocs, HtUU *set) { RzBinElfSection *section; rz_bin_elf_foreach_sections(bin, section) { if (!section->is_valid || (section->type != SHT_REL && section->type != SHT_RELA)) { @@ -199,7 +199,7 @@ static bool get_relocs_entry_from_sections(ELFOBJ *bin, RzVector *relocs, HtUU * return true; } -RZ_OWN RzVector *Elf_(rz_bin_elf_relocs_new)(RZ_NONNULL ELFOBJ *bin) { +RZ_OWN RzVector /**/ *Elf_(rz_bin_elf_relocs_new)(RZ_NONNULL ELFOBJ *bin) { rz_return_val_if_fail(bin, NULL); HtUU *set = ht_uu_new0(); diff --git a/librz/bin/format/elf/elf_sections.c b/librz/bin/format/elf/elf_sections.c index a962cc0dd4e..ee61668184a 100644 --- a/librz/bin/format/elf/elf_sections.c +++ b/librz/bin/format/elf/elf_sections.c @@ -63,7 +63,7 @@ static const struct flag_translation flag_translation_table[] = { { SHF_COMPRESSED, "compressed" } }; -static bool create_section_from_phdr(ELFOBJ *bin, RzVector *result, const char *name, ut64 addr, ut64 sz) { +static bool create_section_from_phdr(ELFOBJ *bin, RzVector /**/ *result, const char *name, ut64 addr, ut64 sz) { RzBinElfSection section = { 0 }; section.offset = Elf_(rz_bin_elf_v2p)(bin, addr); @@ -100,7 +100,7 @@ static const char *get_plt_name(ELFOBJ *bin) { return ".rela.plt"; } -static bool create_section_plt(ELFOBJ *bin, RzVector *result) { +static bool create_section_plt(ELFOBJ *bin, RzVector /**/ *result) { ut64 addr; ut64 size; @@ -121,7 +121,7 @@ static void rz_bin_elf_section_free(void *e, RZ_UNUSED void *user) { free(ptr->name); } -static RzVector *get_sections_from_dt_dynamic(ELFOBJ *bin) { +static RzVector /**/ *get_sections_from_dt_dynamic(ELFOBJ *bin) { ut64 addr; ut64 size; @@ -295,7 +295,7 @@ RZ_BORROW RzBinElfSection *Elf_(rz_bin_elf_get_section_with_name)(RZ_NONNULL ELF * * Compare the flag to common option such as SHF_WRITE, SHF_ALLOC, ect */ -RZ_OWN RzList *Elf_(rz_bin_elf_section_flag_to_rzlist)(ut64 flag) { +RZ_OWN RzList /**/ *Elf_(rz_bin_elf_section_flag_to_rzlist)(ut64 flag) { RzList *flag_list = rz_list_new(); if (!flag_list) { return NULL; @@ -323,7 +323,7 @@ static RzBinElfSection convert_elf_section(ELFOBJ *bin, RzBinObjectLoadOptions * return section; } -static RzVector *convert_sections_from_shdr(ELFOBJ *bin, RzBinObjectLoadOptions *options, RzVector *sections) { +static RzVector /**/ *convert_sections_from_shdr(ELFOBJ *bin, RzBinObjectLoadOptions *options, RzVector /**/ *sections) { if (!sections) { return NULL; } @@ -346,7 +346,7 @@ static RzVector *convert_sections_from_shdr(ELFOBJ *bin, RzBinObjectLoadOptions return result; } -static RzVector *convert_sections(ELFOBJ *bin, RzBinObjectLoadOptions *options, RzVector *sections) { +static RzVector /**/ *convert_sections(ELFOBJ *bin, RzBinObjectLoadOptions *options, RzVector /**/ *sections) { RzVector *result = convert_sections_from_shdr(bin, options, sections); if (result) { return result; @@ -359,7 +359,7 @@ static RzVector *convert_sections(ELFOBJ *bin, RzBinObjectLoadOptions *options, return result; } -RZ_OWN RzVector *Elf_(rz_bin_elf_convert_sections)(RZ_NONNULL ELFOBJ *bin, RZ_NONNULL RzBinObjectLoadOptions *options, RzVector *sections) { +RZ_OWN RzVector /**/ *Elf_(rz_bin_elf_convert_sections)(RZ_NONNULL ELFOBJ *bin, RZ_NONNULL RzBinObjectLoadOptions *options, RzVector /**/ *sections) { rz_return_val_if_fail(bin && options, NULL); RzVector *result = convert_sections(bin, options, sections); @@ -375,7 +375,7 @@ RZ_OWN RzVector *Elf_(rz_bin_elf_convert_sections)(RZ_NONNULL ELFOBJ *bin, RZ_NO return result; } -RZ_OWN RzVector *Elf_(rz_bin_elf_sections_new)(RZ_NONNULL ELFOBJ *bin) { +RZ_OWN RzVector /**/ *Elf_(rz_bin_elf_sections_new)(RZ_NONNULL ELFOBJ *bin) { rz_return_val_if_fail(bin, NULL); if (!bin->ehdr.e_shnum) { diff --git a/librz/bin/format/elf/elf_segments.c b/librz/bin/format/elf/elf_segments.c index 3a487791547..f88c3d7bd71 100644 --- a/librz/bin/format/elf/elf_segments.c +++ b/librz/bin/format/elf/elf_segments.c @@ -67,7 +67,7 @@ static bool get_elf_segment(ELFOBJ *bin, RzBinObjectLoadOptions *options, RzBinE return true; } -static RzVector *get_segments_from_phdr(ELFOBJ *bin, size_t count, RzBinObjectLoadOptions *options) { +static RzVector /**/ *get_segments_from_phdr(ELFOBJ *bin, size_t count, RzBinObjectLoadOptions *options) { RzVector *result = rz_vector_new(sizeof(RzBinElfSegment), NULL, NULL); if (!result) { return NULL; @@ -98,7 +98,7 @@ static RzVector *get_segments_from_phdr(ELFOBJ *bin, size_t count, RzBinObjectLo return result; } -static size_t get_number_of_segments(ELFOBJ *bin, RzVector *sections) { +static size_t get_number_of_segments(ELFOBJ *bin, RzVector /**/ *sections) { if (bin->ehdr.e_phnum != PN_XNUM) { return bin->ehdr.e_phnum; } @@ -130,7 +130,7 @@ RZ_BORROW RzBinElfSegment *Elf_(rz_bin_elf_get_segment_with_type)(RZ_NONNULL ELF return NULL; } -RZ_OWN RzVector *Elf_(rz_bin_elf_segments_new)(RZ_NONNULL ELFOBJ *bin, RzVector *sections, RZ_NONNULL RzBinObjectLoadOptions *options) { +RZ_OWN RzVector /**/ *Elf_(rz_bin_elf_segments_new)(RZ_NONNULL ELFOBJ *bin, RzVector /**/ *sections, RZ_NONNULL RzBinObjectLoadOptions *options) { rz_return_val_if_fail(bin && options, NULL); size_t count = get_number_of_segments(bin, sections); diff --git a/librz/bin/format/elf/elf_symbols.c b/librz/bin/format/elf/elf_symbols.c index 03ec36159de..7fe5083f417 100644 --- a/librz/bin/format/elf/elf_symbols.c +++ b/librz/bin/format/elf/elf_symbols.c @@ -252,7 +252,7 @@ static void elf_symbol_fini(void *e, RZ_UNUSED void *user) { free(ptr->name); } -static bool compute_symbols_from_segment(ELFOBJ *bin, RzVector *result, struct symbols_segment *segment, RzBinElfSymbolFilter filter, HtUU *set) { +static bool compute_symbols_from_segment(ELFOBJ *bin, RzVector /**/ *result, struct symbols_segment *segment, RzBinElfSymbolFilter filter, HtUU *set) { ut64 offset = segment->offset + segment->entry_size; for (size_t i = 1; i < segment->number; i++) { @@ -292,7 +292,7 @@ static bool compute_symbols_from_segment(ELFOBJ *bin, RzVector *result, struct s return true; } -static bool get_dynamic_elf_symbols(ELFOBJ *bin, RzVector *result, RzBinElfSymbolFilter filter, HtUU *set) { +static bool get_dynamic_elf_symbols(ELFOBJ *bin, RzVector /**/ *result, RzBinElfSymbolFilter filter, HtUU *set) { if (!Elf_(rz_bin_elf_is_executable)(bin)) { return true; } @@ -322,7 +322,7 @@ static bool get_dynamic_elf_symbols(ELFOBJ *bin, RzVector *result, RzBinElfSymbo return true; } -static bool get_section_elf_symbols(ELFOBJ *bin, RzVector *result, RzBinElfSymbolFilter filter, HtUU *set) { +static bool get_section_elf_symbols(ELFOBJ *bin, RzVector /**/ *result, RzBinElfSymbolFilter filter, HtUU *set) { size_t i; RzBinElfSection *section; rz_bin_elf_enumerate_sections(bin, section, i) { @@ -364,7 +364,7 @@ static bool get_section_elf_symbols(ELFOBJ *bin, RzVector *result, RzBinElfSymbo return true; } -static bool get_gnu_debugdata_elf_symbols(ELFOBJ *bin, RzVector *result, RzBinElfSymbolFilter filter, HtUU *set) { +static bool get_gnu_debugdata_elf_symbols(ELFOBJ *bin, RzVector /**/ *result, RzBinElfSymbolFilter filter, HtUU *set) { // Get symbols from .gnu_debugdata according to https://sourceware.org/gdb/onlinedocs/gdb/MiniDebugInfo.html bool res = false; const RzBinElfSection *gnu_debugdata = Elf_(rz_bin_elf_get_section_with_name)(bin, ".gnu_debugdata"); @@ -483,7 +483,7 @@ RZ_BORROW RzBinElfSymbol *Elf_(rz_bin_elf_get_symbol)(RZ_NONNULL ELFOBJ *bin, ut return NULL; } -RZ_OWN RzVector *Elf_(rz_bin_elf_compute_symbols)(ELFOBJ *bin, RzBinElfSymbolFilter filter) { +RZ_OWN RzVector /**/ *Elf_(rz_bin_elf_compute_symbols)(ELFOBJ *bin, RzBinElfSymbolFilter filter) { RzVector *result = rz_vector_new(sizeof(RzBinElfSymbol), elf_symbol_fini, NULL); if (!result) { return NULL; @@ -520,7 +520,7 @@ RZ_OWN RzVector *Elf_(rz_bin_elf_compute_symbols)(ELFOBJ *bin, RzBinElfSymbolFil return result; } -RZ_OWN RzVector *Elf_(rz_bin_elf_symbols_new)(RZ_NONNULL ELFOBJ *bin) { +RZ_OWN RzVector /**/ *Elf_(rz_bin_elf_symbols_new)(RZ_NONNULL ELFOBJ *bin) { rz_return_val_if_fail(bin, NULL); RzVector *result = Elf_(rz_bin_elf_compute_symbols)(bin, filter_symbol); diff --git a/librz/bin/format/java/class_bin.c b/librz/bin/format/java/class_bin.c index 6c21d591cb2..db9a67745a3 100644 --- a/librz/bin/format/java/class_bin.c +++ b/librz/bin/format/java/class_bin.c @@ -924,7 +924,7 @@ RZ_API RZ_OWN RzBinAddr *rz_bin_java_class_resolve_symbol(RZ_NONNULL RzBinJavaCl /** * \brief Returns a RzList containing the entrypoints */ -RZ_API RZ_OWN RzList *rz_bin_java_class_entrypoints(RZ_NONNULL RzBinJavaClass *bin) { +RZ_API RZ_OWN RzList /**/ *rz_bin_java_class_entrypoints(RZ_NONNULL RzBinJavaClass *bin) { rz_return_val_if_fail(bin, NULL); RzList *list = rz_list_newf(free); @@ -983,7 +983,7 @@ RZ_API RZ_OWN RzList *rz_bin_java_class_entrypoints(RZ_NONNULL RzBinJavaClass *b /** * \brief Returns a RzList containing the strings */ -RZ_API RZ_OWN RzList *rz_bin_java_class_strings(RZ_NONNULL RzBinJavaClass *bin) { +RZ_API RZ_OWN RzList /**/ *rz_bin_java_class_strings(RZ_NONNULL RzBinJavaClass *bin) { rz_return_val_if_fail(bin, NULL); RzList *list = rz_list_newf(rz_bin_string_free); @@ -1049,7 +1049,7 @@ static char *add_class_name_to_name(char *name, char *classname) { /** * \brief Returns a RzList containing the class methods */ -RZ_API RZ_OWN RzList *rz_bin_java_class_methods_as_symbols(RZ_NONNULL RzBinJavaClass *bin) { +RZ_API RZ_OWN RzList /**/ *rz_bin_java_class_methods_as_symbols(RZ_NONNULL RzBinJavaClass *bin) { rz_return_val_if_fail(bin, NULL); RzList *list = rz_list_newf((RzListFree)rz_bin_symbol_free); @@ -1224,7 +1224,7 @@ RZ_API void rz_bin_java_class_methods_as_json(RZ_NONNULL RzBinJavaClass *bin, RZ /** * \brief Returns a RzList containing the class fields */ -RZ_API RZ_OWN RzList *rz_bin_java_class_fields_as_symbols(RZ_NONNULL RzBinJavaClass *bin) { +RZ_API RZ_OWN RzList /**/ *rz_bin_java_class_fields_as_symbols(RZ_NONNULL RzBinJavaClass *bin) { rz_return_val_if_fail(bin, NULL); RzList *list = rz_list_newf((RzListFree)rz_bin_symbol_free); @@ -1274,7 +1274,7 @@ RZ_API RZ_OWN RzList *rz_bin_java_class_fields_as_symbols(RZ_NONNULL RzBinJavaCl /** * \brief Returns a RzList containing the class fields */ -RZ_API RZ_OWN RzList *rz_bin_java_class_fields_as_binfields(RZ_NONNULL RzBinJavaClass *bin) { +RZ_API RZ_OWN RzList /**/ *rz_bin_java_class_fields_as_binfields(RZ_NONNULL RzBinJavaClass *bin) { rz_return_val_if_fail(bin, NULL); RzList *list = rz_list_newf((RzListFree)rz_bin_field_free); @@ -1432,7 +1432,7 @@ static char *import_type(const ConstPool *cpool) { /** * \brief Returns a RzList containing the class const pool */ -RZ_API RZ_OWN RzList *rz_bin_java_class_const_pool_as_symbols(RZ_NONNULL RzBinJavaClass *bin) { +RZ_API RZ_OWN RzList /**/ *rz_bin_java_class_const_pool_as_symbols(RZ_NONNULL RzBinJavaClass *bin) { rz_return_val_if_fail(bin, NULL); RzList *list = rz_list_newf((RzListFree)rz_bin_symbol_free); @@ -1506,7 +1506,7 @@ RZ_API RZ_OWN RzList *rz_bin_java_class_const_pool_as_symbols(RZ_NONNULL RzBinJa /** * \brief Returns a RzList containing the class const pool */ -RZ_API RZ_OWN RzList *rz_bin_java_class_const_pool_as_imports(RZ_NONNULL RzBinJavaClass *bin) { +RZ_API RZ_OWN RzList /**/ *rz_bin_java_class_const_pool_as_imports(RZ_NONNULL RzBinJavaClass *bin) { rz_return_val_if_fail(bin, NULL); RzList *imports = rz_list_newf((RzListFree)rz_bin_import_free); @@ -1715,7 +1715,7 @@ static int compare_section_names(const void *a, const void *b) { /** * \brief Returns a RzList containing the class sections */ -RZ_API RZ_OWN RzList *rz_bin_java_class_as_sections(RZ_NONNULL RzBinJavaClass *bin) { +RZ_API RZ_OWN RzList /**/ *rz_bin_java_class_as_sections(RZ_NONNULL RzBinJavaClass *bin) { rz_return_val_if_fail(bin, NULL); RzList *sections = rz_list_newf(section_free); @@ -1843,7 +1843,7 @@ static int compare_strings(const void *a, const void *b) { /** * \brief Returns a RzList containing the class libraries */ -RZ_API RZ_OWN RzList *rz_bin_java_class_as_libraries(RZ_NONNULL RzBinJavaClass *bin) { +RZ_API RZ_OWN RzList /**/ *rz_bin_java_class_as_libraries(RZ_NONNULL RzBinJavaClass *bin) { rz_return_val_if_fail(bin, NULL); RzList *list = rz_list_newf(free); diff --git a/librz/bin/format/java/class_bin.h b/librz/bin/format/java/class_bin.h index 4c6af3c0d0e..63a6a68ae6b 100644 --- a/librz/bin/format/java/class_bin.h +++ b/librz/bin/format/java/class_bin.h @@ -80,21 +80,21 @@ RZ_API RZ_OWN char *rz_bin_java_class_const_pool_resolve_index(RZ_NONNULL RzBinJ /* used in bin_java.c and core_java.c */ RZ_API void rz_bin_java_class_as_source_code(RZ_NONNULL RzBinJavaClass *bin, RZ_NONNULL RzStrBuf *sb); RZ_API RZ_OWN RzBinAddr *rz_bin_java_class_resolve_symbol(RZ_NONNULL RzBinJavaClass *bin, RzBinSpecialSymbol resolve); -RZ_API RZ_OWN RzList *rz_bin_java_class_strings(RZ_NONNULL RzBinJavaClass *bin); -RZ_API RZ_OWN RzList *rz_bin_java_class_entrypoints(RZ_NONNULL RzBinJavaClass *bin); -RZ_API RZ_OWN RzList *rz_bin_java_class_methods_as_symbols(RZ_NONNULL RzBinJavaClass *bin); +RZ_API RZ_OWN RzList /**/ *rz_bin_java_class_strings(RZ_NONNULL RzBinJavaClass *bin); +RZ_API RZ_OWN RzList /**/ *rz_bin_java_class_entrypoints(RZ_NONNULL RzBinJavaClass *bin); +RZ_API RZ_OWN RzList /**/ *rz_bin_java_class_methods_as_symbols(RZ_NONNULL RzBinJavaClass *bin); RZ_API void rz_bin_java_class_methods_as_text(RZ_NONNULL RzBinJavaClass *bin, RZ_NONNULL RzStrBuf *sb); RZ_API void rz_bin_java_class_methods_as_json(RZ_NONNULL RzBinJavaClass *bin, RZ_NONNULL PJ *j); -RZ_API RZ_OWN RzList *rz_bin_java_class_fields_as_symbols(RZ_NONNULL RzBinJavaClass *bin); -RZ_API RZ_OWN RzList *rz_bin_java_class_fields_as_binfields(RZ_NONNULL RzBinJavaClass *bin); +RZ_API RZ_OWN RzList /**/ *rz_bin_java_class_fields_as_symbols(RZ_NONNULL RzBinJavaClass *bin); +RZ_API RZ_OWN RzList /**/ *rz_bin_java_class_fields_as_binfields(RZ_NONNULL RzBinJavaClass *bin); RZ_API void rz_bin_java_class_fields_as_text(RZ_NONNULL RzBinJavaClass *bin, RZ_NONNULL RzStrBuf *sb); RZ_API void rz_bin_java_class_fields_as_json(RZ_NONNULL RzBinJavaClass *bin, RZ_NONNULL PJ *j); -RZ_API RZ_OWN RzList *rz_bin_java_class_const_pool_as_symbols(RZ_NONNULL RzBinJavaClass *bin); -RZ_API RZ_OWN RzList *rz_bin_java_class_const_pool_as_imports(RZ_NONNULL RzBinJavaClass *bin); +RZ_API RZ_OWN RzList /**/ *rz_bin_java_class_const_pool_as_symbols(RZ_NONNULL RzBinJavaClass *bin); +RZ_API RZ_OWN RzList /**/ *rz_bin_java_class_const_pool_as_imports(RZ_NONNULL RzBinJavaClass *bin); RZ_API void rz_bin_java_class_const_pool_as_text(RZ_NONNULL RzBinJavaClass *bin, RZ_NONNULL RzStrBuf *sb); RZ_API void rz_bin_java_class_const_pool_as_json(RZ_NONNULL RzBinJavaClass *bin, RZ_NONNULL PJ *j); -RZ_API RZ_OWN RzList *rz_bin_java_class_as_sections(RZ_NONNULL RzBinJavaClass *bin); -RZ_API RZ_OWN RzList *rz_bin_java_class_as_libraries(RZ_NONNULL RzBinJavaClass *bin); +RZ_API RZ_OWN RzList /**/ *rz_bin_java_class_as_sections(RZ_NONNULL RzBinJavaClass *bin); +RZ_API RZ_OWN RzList /**/ *rz_bin_java_class_as_libraries(RZ_NONNULL RzBinJavaClass *bin); RZ_API void rz_bin_java_class_interfaces_as_text(RZ_NONNULL RzBinJavaClass *bin, RZ_NONNULL RzStrBuf *sb); RZ_API void rz_bin_java_class_interfaces_as_json(RZ_NONNULL RzBinJavaClass *bin, RZ_NONNULL PJ *j); diff --git a/librz/bin/format/le/le.c b/librz/bin/format/le/le.c index ff8e796c18d..00828f8bb56 100644 --- a/librz/bin/format/le/le.c +++ b/librz/bin/format/le/le.c @@ -94,7 +94,7 @@ static RzBinSymbol *le_get_symbol(rz_bin_le_obj_t *bin, ut64 *offset) { return sym; } -RzList *le_get_entries(rz_bin_le_obj_t *bin) { +RzList /**/ *le_get_entries(rz_bin_le_obj_t *bin) { ut64 offset = (ut64)bin->header->enttab + bin->headerOff; RzList *l = rz_list_newf(free); if (!l) { @@ -166,7 +166,7 @@ RzList *le_get_entries(rz_bin_le_obj_t *bin) { return l; } -static void le_get_symbols_at(rz_bin_le_obj_t *bin, RzList *syml, RzList *entl, ut64 offset, ut64 end) { +static void le_get_symbols_at(rz_bin_le_obj_t *bin, RzList /**/ *syml, RzList /**/ *entl, ut64 offset, ut64 end) { while (offset < end) { RzBinSymbol *sym = le_get_symbol(bin, &offset); if (!sym) { @@ -188,7 +188,7 @@ static void le_get_symbols_at(rz_bin_le_obj_t *bin, RzList *syml, RzList *entl, } } -RzList *rz_bin_le_get_symbols(rz_bin_le_obj_t *bin) { +RzList /**/ *rz_bin_le_get_symbols(rz_bin_le_obj_t *bin) { RzList *l = rz_list_newf((RzListFree)rz_bin_symbol_free); RzList *entries = le_get_entries(bin); LE_image_header *h = bin->header; @@ -202,7 +202,7 @@ RzList *rz_bin_le_get_symbols(rz_bin_le_obj_t *bin) { return l; } -RzList *rz_bin_le_get_imports(rz_bin_le_obj_t *bin) { +RzList /**/ *rz_bin_le_get_imports(rz_bin_le_obj_t *bin) { RzList *l = rz_list_newf((RzListFree)rz_bin_import_free); if (!l) { return NULL; @@ -226,7 +226,7 @@ RzList *rz_bin_le_get_imports(rz_bin_le_obj_t *bin) { return l; } -RzList *rz_bin_le_get_entrypoints(rz_bin_le_obj_t *bin) { +RzList /**/ *rz_bin_le_get_entrypoints(rz_bin_le_obj_t *bin) { RzList *l = rz_list_newf((RzListFree)free); if (!l) { return NULL; @@ -242,7 +242,7 @@ RzList *rz_bin_le_get_entrypoints(rz_bin_le_obj_t *bin) { return l; } -RzList *rz_bin_le_get_libs(rz_bin_le_obj_t *bin) { +RzList /**/ *rz_bin_le_get_libs(rz_bin_le_obj_t *bin) { RzList *l = rz_list_newf((RzListFree)free); if (!l) { return NULL; @@ -265,7 +265,7 @@ RzList *rz_bin_le_get_libs(rz_bin_le_obj_t *bin) { * page->size is the total size of iter records that describe the page * TODO: Don't do this */ -static void __create_iter_sections(RzList *l, rz_bin_le_obj_t *bin, RzBinSection *sec, LE_object_page_entry *page, ut64 vaddr, int cur_page) { +static void __create_iter_sections(RzList /**/ *l, rz_bin_le_obj_t *bin, RzBinSection *sec, LE_object_page_entry *page, ut64 vaddr, int cur_page) { rz_return_if_fail(l && bin && sec && page); LE_image_header *h = bin->header; ut32 offset = (h->itermap + (page->offset << (bin->is_le ? 0 : h->pageshift))); @@ -335,7 +335,7 @@ static void __create_iter_sections(RzList *l, rz_bin_le_obj_t *bin, RzBinSection } // TODO: Compressed page -RzList *rz_bin_le_get_sections(rz_bin_le_obj_t *bin) { +RzList /**/ *rz_bin_le_get_sections(rz_bin_le_obj_t *bin) { RzList *l = rz_list_newf((RzListFree)rz_bin_section_free); if (!l) { return NULL; @@ -450,7 +450,7 @@ char *le_get_modname_by_ord(rz_bin_le_obj_t *bin, ut32 ordinal) { return modname; } -RzList *rz_bin_le_get_relocs(rz_bin_le_obj_t *bin) { +RzList /**/ *rz_bin_le_get_relocs(rz_bin_le_obj_t *bin) { RzList *l = rz_list_newf((RzListFree)free); if (!l) { return NULL; diff --git a/librz/bin/format/le/le.h b/librz/bin/format/le/le.h index ebb845614ff..800ae97937f 100644 --- a/librz/bin/format/le/le.h +++ b/librz/bin/format/le/le.h @@ -21,10 +21,10 @@ typedef struct rz_bin_le_obj_s { rz_bin_le_obj_t *rz_bin_le_new_buf(RzBuffer *buf); void rz_bin_le_free(rz_bin_le_obj_t *bin); -RzList *rz_bin_le_get_entrypoints(rz_bin_le_obj_t *bin); -RzList *rz_bin_le_get_sections(rz_bin_le_obj_t *bin); -RzList *rz_bin_le_get_symbols(rz_bin_le_obj_t *bin); -RzList *rz_bin_le_get_imports(rz_bin_le_obj_t *bin); -RzList *rz_bin_le_get_libs(rz_bin_le_obj_t *bin); -RzList *rz_bin_le_get_relocs(rz_bin_le_obj_t *bin); +RzList /**/ *rz_bin_le_get_entrypoints(rz_bin_le_obj_t *bin); +RzList /**/ *rz_bin_le_get_sections(rz_bin_le_obj_t *bin); +RzList /**/ *rz_bin_le_get_symbols(rz_bin_le_obj_t *bin); +RzList /**/ *rz_bin_le_get_imports(rz_bin_le_obj_t *bin); +RzList /**/ *rz_bin_le_get_libs(rz_bin_le_obj_t *bin); +RzList /**/ *rz_bin_le_get_relocs(rz_bin_le_obj_t *bin); #endif diff --git a/librz/bin/format/luac/luac_bin.c b/librz/bin/format/luac/luac_bin.c index 34589821f83..695cfeb7bf6 100644 --- a/librz/bin/format/luac/luac_bin.c +++ b/librz/bin/format/luac/luac_bin.c @@ -3,7 +3,7 @@ #include "luac_common.h" -void luac_add_section(RzList *section_list, char *name, ut64 offset, ut32 size, bool is_func) { +void luac_add_section(RzList /**/ *section_list, char *name, ut64 offset, ut32 size, bool is_func) { RzBinSection *bin_sec = RZ_NEW0(RzBinSection); if (!bin_sec || !name) { free(bin_sec); @@ -30,7 +30,7 @@ void luac_add_section(RzList *section_list, char *name, ut64 offset, ut32 size, } } -void luac_add_symbol(RzList *symbol_list, char *name, ut64 offset, ut64 size, const char *type) { +void luac_add_symbol(RzList /**/ *symbol_list, char *name, ut64 offset, ut64 size, const char *type) { RzBinSymbol *bin_sym = RZ_NEW0(RzBinSymbol); if (!bin_sym) { return; @@ -44,7 +44,7 @@ void luac_add_symbol(RzList *symbol_list, char *name, ut64 offset, ut64 size, co rz_list_append(symbol_list, bin_sym); } -void luac_add_entry(RzList *entry_list, ut64 offset, int entry_type) { +void luac_add_entry(RzList /**/ *entry_list, ut64 offset, int entry_type) { RzBinAddr *entry = RZ_NEW0(RzBinAddr); if (!entry) { return; @@ -57,7 +57,7 @@ void luac_add_entry(RzList *entry_list, ut64 offset, int entry_type) { rz_list_append(entry_list, entry); } -void luac_add_string(RzList *string_list, char *string, ut64 offset, ut64 size) { +void luac_add_string(RzList /**/ *string_list, char *string, ut64 offset, ut64 size) { RzBinString *bin_string = RZ_NEW0(RzBinString); if (!bin_string) { return; diff --git a/librz/bin/format/luac/luac_common.h b/librz/bin/format/luac/luac_common.h index 27c39651af6..f7d2515be3b 100644 --- a/librz/bin/format/luac/luac_common.h +++ b/librz/bin/format/luac/luac_common.h @@ -60,27 +60,27 @@ typedef struct lua_proto_ex { ut64 code_skipped; ///< opcode data offset to code_offset. /* store constant entries */ - RzList *const_entries; ///< A list to store constant entries + RzList /**/ *const_entries; ///< A list to store constant entries ut64 const_offset; ///< const section offset ut64 const_size; ///< const section size /* store upvalue entries */ - RzList *upvalue_entries; ///< A list to store upvalue entries + RzList /**/ *upvalue_entries; ///< A list to store upvalue entries ut64 upvalue_offset; ///< upvalue section offset ut64 upvalue_size; ///< upvalue section size /* store protos defined in this proto */ - RzList *proto_entries; ///< A list to store sub proto entries + RzList /**/ *proto_entries; ///< A list to store sub proto entries ut64 inner_proto_offset; ///< sub proto section offset ut64 inner_proto_size; ///< sub proto section size /* store Debug info */ ut64 debug_offset; ///< debug section offset ut64 debug_size; ///< debug section size - RzList *line_info_entries; ///< A list to store line info entries - RzList *abs_line_info_entries; ///< A list to store absolutely line info entries - RzList *local_var_info_entries; ///< A list to store local var entries - RzList *dbg_upvalue_entries; ///< A list to store upvalue names + RzList /**/ *line_info_entries; ///< A list to store line info entries + RzList /**/ *abs_line_info_entries; ///< A list to store absolutely line info entries + RzList /**/ *local_var_info_entries; ///< A list to store local var entries + RzList /**/ *dbg_upvalue_entries; ///< A list to store upvalue names } LuaProtoHeavy; @@ -159,10 +159,10 @@ typedef struct lua_dbg_upvalue_entry { typedef struct luac_bin_info { st32 major; ///< major version st32 minor; ///< minor version - RzList *section_list; ///< list of sections - RzList *symbol_list; ///< list of symbols - RzList *entry_list; ///< list of entries - RzList *string_list; ///< list of strings + RzList /**/ *section_list; ///< list of sections + RzList /**/ *symbol_list; ///< list of symbols + RzList /**/ *entry_list; ///< list of entries + RzList /**/ *string_list; ///< list of strings RzBinInfo *general_info; ///< general binary info from luac header } LuacBinInfo; @@ -187,10 +187,10 @@ void lua_free_proto_entry(LuaProto *); * Common Operation to RzBinInfo * Implemented in 'bin/format/luac/luac_bin.c' * ======================================================== */ -void luac_add_section(RzList *section_list, char *name, ut64 offset, ut32 size, bool is_func); -void luac_add_symbol(RzList *symbol_list, char *name, ut64 offset, ut64 size, const char *type); -void luac_add_entry(RzList *entry_list, ut64 offset, int entry_type); -void luac_add_string(RzList *string_list, char *string, ut64 offset, ut64 size); +void luac_add_section(RzList /**/ *section_list, char *name, ut64 offset, ut32 size, bool is_func); +void luac_add_symbol(RzList /**/ *symbol_list, char *name, ut64 offset, ut64 size, const char *type); +void luac_add_entry(RzList /**/ *entry_list, ut64 offset, int entry_type); +void luac_add_string(RzList /**/ *string_list, char *string, ut64 offset, ut64 size); LuacBinInfo *luac_build_info(LuaProto *proto); void luac_build_info_free(LuacBinInfo *bin_info); diff --git a/librz/bin/format/mach0/dyldcache.c b/librz/bin/format/mach0/dyldcache.c index ca1260714f9..cc2f965c52c 100644 --- a/librz/bin/format/mach0/dyldcache.c +++ b/librz/bin/format/mach0/dyldcache.c @@ -482,7 +482,7 @@ static void carve_deps_at_address(RzDyldCache *cache, cache_img_t *img, HtPU *pa free(cmds); } -static RzList *create_cache_bins(RzDyldCache *cache) { +static RzList /**/ *create_cache_bins(RzDyldCache *cache) { RzList *bins = rz_list_newf((RzListFree)free_bin); if (!bins) { return NULL; @@ -1117,7 +1117,7 @@ RZ_API ut64 rz_dyldcache_get_slide(RzDyldCache *cache) { return 0; } -RZ_API void rz_dyldcache_symbols_from_locsym(RzDyldCache *cache, RzDyldBinImage *bin, RzList *symbols, SetU *hash) { +RZ_API void rz_dyldcache_symbols_from_locsym(RzDyldCache *cache, RzDyldBinImage *bin, RzList /**/ *symbols, SetU *hash) { RzDyldLocSym *locsym = cache->locsym; if (!locsym) { return; diff --git a/librz/bin/format/mach0/dyldcache.h b/librz/bin/format/mach0/dyldcache.h index f1c5d3c7a8a..e29ef63ca98 100644 --- a/librz/bin/format/mach0/dyldcache.h +++ b/librz/bin/format/mach0/dyldcache.h @@ -101,7 +101,7 @@ typedef struct rz_dyldcache_t { cache_map_t *maps; ut32 n_maps; - RzList *bins; + RzList /**/ *bins; RzBuffer *buf; RzDyldRebaseInfos *rebase_infos; cache_accel_t *accel; @@ -116,7 +116,7 @@ RZ_API void rz_dyldcache_free(RzDyldCache *cache); RZ_API ut64 rz_dyldcache_va2pa(RzDyldCache *cache, uint64_t vaddr, ut32 *offset, ut32 *left); RZ_API ut64 rz_dyldcache_get_slide(RzDyldCache *cache); RZ_API objc_cache_opt_info *rz_dyldcache_get_objc_opt_info(RzBinFile *bf, RzDyldCache *cache); -RZ_API void rz_dyldcache_symbols_from_locsym(RzDyldCache *cache, RzDyldBinImage *bin, RzList *symbols, SetU *hash); +RZ_API void rz_dyldcache_symbols_from_locsym(RzDyldCache *cache, RzDyldBinImage *bin, RzList /**/ *symbols, SetU *hash); RZ_API RzBuffer *rz_dyldcache_new_rebasing_buf(RzDyldCache *cache); RZ_API bool rz_dyldcache_needs_rebasing(RzDyldCache *cache); diff --git a/librz/bin/format/mach0/mach0.c b/librz/bin/format/mach0/mach0.c index 75c7311db84..8d61306327d 100644 --- a/librz/bin/format/mach0/mach0.c +++ b/librz/bin/format/mach0/mach0.c @@ -2160,7 +2160,7 @@ static bool __isDataSection(RzBinSection *sect) { return false; } -RzList *MACH0_(get_virtual_files)(RzBinFile *bf) { +RzList /**/ *MACH0_(get_virtual_files)(RzBinFile *bf) { rz_return_val_if_fail(bf, NULL); RzList *ret = rz_list_newf((RzListFree)rz_bin_virtual_file_free); if (!ret) { @@ -2215,7 +2215,7 @@ RzList *MACH0_(get_virtual_files)(RzBinFile *bf) { return ret; } -RzList *MACH0_(get_maps_unpatched)(RzBinFile *bf) { +RzList /**/ *MACH0_(get_maps_unpatched)(RzBinFile *bf) { rz_return_val_if_fail(bf, NULL); struct MACH0_(obj_t) *bin = bf->o->bin_obj; RzList *ret = rz_list_newf((RzListFree)rz_bin_map_free); @@ -2250,7 +2250,7 @@ RzList *MACH0_(get_maps_unpatched)(RzBinFile *bf) { return ret; } -RzList *MACH0_(get_maps)(RzBinFile *bf) { +RzList /**/ *MACH0_(get_maps)(RzBinFile *bf) { RzList *ret = MACH0_(get_maps_unpatched)(bf); if (!ret) { return NULL; @@ -2265,7 +2265,7 @@ RzList *MACH0_(get_maps)(RzBinFile *bf) { return ret; } -RzList *MACH0_(get_segments)(RzBinFile *bf) { +RzList /**/ *MACH0_(get_segments)(RzBinFile *bf) { struct MACH0_(obj_t) *bin = bf->o->bin_obj; if (bin->sections_cache) { return bin->sections_cache; @@ -2376,7 +2376,7 @@ char *MACH0_(section_type_to_string)(ut64 type) { } } -RzList *MACH0_(section_flag_to_rzlist)(ut64 flag) { +RzList /**/ *MACH0_(section_flag_to_rzlist)(ut64 flag) { RzList *flag_list = rz_list_new(); if (flag & S_ATTR_PURE_INSTRUCTIONS) { rz_list_append(flag_list, "PURE_INSTRUCTIONS"); @@ -3763,7 +3763,7 @@ void MACH0_(mach_headerfields)(RzBinFile *bf) { free(mh); } -RzList *MACH0_(mach_fields)(RzBinFile *bf) { +RzList /**/ *MACH0_(mach_fields)(RzBinFile *bf) { RzBuffer *buf = bf->buf; ut64 length = rz_buf_size(buf); struct MACH0_(mach_header) *mh = MACH0_(get_hdr)(buf); diff --git a/librz/bin/format/mach0/mach0.h b/librz/bin/format/mach0/mach0.h index 7e4b1c4892a..d496859d795 100644 --- a/librz/bin/format/mach0/mach0.h +++ b/librz/bin/format/mach0/mach0.h @@ -178,14 +178,14 @@ struct MACH0_(obj_t) { struct symbol_t *symbols; ut64 main_addr; - RzList *sections_cache; + RzList /**/ *sections_cache; RzSkipList *relocs; ///< lazily loaded, use only MACH0_(get_relocs)() to access this bool relocs_parsed; ///< whether relocs have already been parsed and relocs is filled (or NULL on error) bool reloc_targets_map_base_calculated; bool relocs_patched; RzBuffer *buf_patched; ut64 reloc_targets_map_base; - RzPVector /* */ *patchable_relocs; ///< weak pointers to relocs in `relocs` which should be patched + RzPVector /**/ *patchable_relocs; ///< weak pointers to relocs in `relocs` which should be patched RzHash *hash; }; @@ -198,11 +198,11 @@ struct MACH0_(obj_t) * MACH0_(new_buf)(RzBuffer *buf, struct MACH0_(opts_t) * op void *MACH0_(mach0_free)(struct MACH0_(obj_t) * bin); struct section_t *MACH0_(get_sections)(struct MACH0_(obj_t) * bin); char *MACH0_(section_type_to_string)(ut64 type); -RzList *MACH0_(section_flag_to_rzlist)(ut64 flag); -RzList *MACH0_(get_virtual_files)(RzBinFile *bf); -RzList *MACH0_(get_maps_unpatched)(RzBinFile *bf); -RzList *MACH0_(get_maps)(RzBinFile *bf); -RzList *MACH0_(get_segments)(RzBinFile *bf); +RzList /**/ *MACH0_(section_flag_to_rzlist)(ut64 flag); +RzList /**/ *MACH0_(get_virtual_files)(RzBinFile *bf); +RzList /**/ *MACH0_(get_maps_unpatched)(RzBinFile *bf); +RzList /**/ *MACH0_(get_maps)(RzBinFile *bf); +RzList /**/ *MACH0_(get_segments)(RzBinFile *bf); const struct symbol_t *MACH0_(get_symbols)(struct MACH0_(obj_t) * bin); void MACH0_(pull_symbols)(struct MACH0_(obj_t) * mo, RzBinSymbolCallback cb, void *user); struct import_t *MACH0_(get_imports)(struct MACH0_(obj_t) * bin); @@ -227,7 +227,7 @@ const char *MACH0_(get_cputype_from_hdr)(struct MACH0_(mach_header) * hdr); int MACH0_(get_bits_from_hdr)(struct MACH0_(mach_header) * hdr); struct MACH0_(mach_header) * MACH0_(get_hdr)(RzBuffer *buf); void MACH0_(mach_headerfields)(RzBinFile *bf); -RzList *MACH0_(mach_fields)(RzBinFile *bf); +RzList /**/ *MACH0_(mach_fields)(RzBinFile *bf); RZ_API RZ_OWN char *MACH0_(get_name)(struct MACH0_(obj_t) * mo, ut32 stridx, bool filter); RZ_API ut64 MACH0_(paddr_to_vaddr)(struct MACH0_(obj_t) * bin, ut64 offset); RZ_API ut64 MACH0_(vaddr_to_paddr)(struct MACH0_(obj_t) * bin, ut64 addr); diff --git a/librz/bin/format/mach0/mach0_relocs.c b/librz/bin/format/mach0/mach0_relocs.c index cff1bc8fdab..4a7ebd13348 100644 --- a/librz/bin/format/mach0/mach0_relocs.c +++ b/librz/bin/format/mach0/mach0_relocs.c @@ -497,7 +497,7 @@ RZ_BORROW RzSkipList *MACH0_(get_relocs)(struct MACH0_(obj_t) * bin) { return relocs; } -static RzPVector *get_patchable_relocs(struct MACH0_(obj_t) * obj) { +static RzPVector /**/ *get_patchable_relocs(struct MACH0_(obj_t) * obj) { if (!obj->options.patch_relocs) { return NULL; } diff --git a/librz/bin/format/mdmp/mdmp.h b/librz/bin/format/mdmp/mdmp.h index f6b36662d08..7731dbb7d78 100644 --- a/librz/bin/format/mdmp/mdmp.h +++ b/librz/bin/format/mdmp/mdmp.h @@ -49,8 +49,8 @@ struct rz_bin_mdmp_obj { } streams; /* Binary memory objects */ - RzList *pe32_bins; - RzList *pe64_bins; + RzList /**/ *pe32_bins; + RzList /**/ *pe64_bins; RzBuffer *b; size_t size; diff --git a/librz/bin/format/mdmp/mdmp_pe.c b/librz/bin/format/mdmp/mdmp_pe.c index fe2305d6a79..9546dc4b511 100644 --- a/librz/bin/format/mdmp/mdmp_pe.c +++ b/librz/bin/format/mdmp/mdmp_pe.c @@ -7,7 +7,7 @@ #include "mdmp_pe.h" -static void PE_(add_tls_callbacks)(struct PE_(rz_bin_pe_obj_t) * bin, RzList *list) { +static void PE_(add_tls_callbacks)(struct PE_(rz_bin_pe_obj_t) * bin, RzList /**/ *list) { char *key; int count = 0; PE_DWord haddr, paddr, vaddr; @@ -42,7 +42,7 @@ static void PE_(add_tls_callbacks)(struct PE_(rz_bin_pe_obj_t) * bin, RzList *li } while (vaddr); } -RzList *PE_(rz_bin_mdmp_pe_get_entrypoint)(struct PE_(rz_bin_mdmp_pe_bin) * pe_bin) { +RzList /**/ *PE_(rz_bin_mdmp_pe_get_entrypoint)(struct PE_(rz_bin_mdmp_pe_bin) * pe_bin) { ut64 offset; struct rz_bin_pe_addr_t *entry = NULL; RzBinAddr *ptr = NULL; @@ -87,7 +87,7 @@ static void filter_import(ut8 *n) { } } -RzList *PE_(rz_bin_mdmp_pe_get_imports)(struct PE_(rz_bin_mdmp_pe_bin) * pe_bin) { +RzList /**/ *PE_(rz_bin_mdmp_pe_get_imports)(struct PE_(rz_bin_mdmp_pe_bin) * pe_bin) { int i; ut64 offset; struct rz_bin_pe_import_t *imports = NULL; @@ -143,7 +143,7 @@ RzList *PE_(rz_bin_mdmp_pe_get_imports)(struct PE_(rz_bin_mdmp_pe_bin) * pe_bin) return ret; } -RzList *PE_(rz_bin_mdmp_pe_get_sections)(struct PE_(rz_bin_mdmp_pe_bin) * pe_bin) { +RzList /**/ *PE_(rz_bin_mdmp_pe_get_sections)(struct PE_(rz_bin_mdmp_pe_bin) * pe_bin) { /* TODO: Vet code, taken verbatim(ish) from bin_pe.c */ int i; ut64 ba = pe_bin->vaddr; // baddr (arch); @@ -209,7 +209,7 @@ RzList *PE_(rz_bin_mdmp_pe_get_sections)(struct PE_(rz_bin_mdmp_pe_bin) * pe_bin return ret; } -RzList *PE_(rz_bin_mdmp_pe_get_symbols)(RzBin *rbin, struct PE_(rz_bin_mdmp_pe_bin) * pe_bin) { +RzList /**/ *PE_(rz_bin_mdmp_pe_get_symbols)(RzBin *rbin, struct PE_(rz_bin_mdmp_pe_bin) * pe_bin) { int i; ut64 offset; struct rz_bin_pe_export_t *symbols = NULL; diff --git a/librz/bin/format/mdmp/mdmp_pe.h b/librz/bin/format/mdmp/mdmp_pe.h index 3ec97e971ba..11b89faea9e 100644 --- a/librz/bin/format/mdmp/mdmp_pe.h +++ b/librz/bin/format/mdmp/mdmp_pe.h @@ -20,9 +20,9 @@ struct PE_(rz_bin_mdmp_pe_bin) { struct PE_(rz_bin_pe_obj_t) * bin; }; -RzList *PE_(rz_bin_mdmp_pe_get_entrypoint)(struct PE_(rz_bin_mdmp_pe_bin) * pe_bin); -RzList *PE_(rz_bin_mdmp_pe_get_imports)(struct PE_(rz_bin_mdmp_pe_bin) * pe_bin); -RzList *PE_(rz_bin_mdmp_pe_get_sections)(struct PE_(rz_bin_mdmp_pe_bin) * pe_bin); -RzList *PE_(rz_bin_mdmp_pe_get_symbols)(RzBin *rbin, struct PE_(rz_bin_mdmp_pe_bin) * pe_bin); +RzList /**/ *PE_(rz_bin_mdmp_pe_get_entrypoint)(struct PE_(rz_bin_mdmp_pe_bin) * pe_bin); +RzList /**/ *PE_(rz_bin_mdmp_pe_get_imports)(struct PE_(rz_bin_mdmp_pe_bin) * pe_bin); +RzList /**/ *PE_(rz_bin_mdmp_pe_get_sections)(struct PE_(rz_bin_mdmp_pe_bin) * pe_bin); +RzList /**/ *PE_(rz_bin_mdmp_pe_get_symbols)(RzBin *rbin, struct PE_(rz_bin_mdmp_pe_bin) * pe_bin); #endif /* MDMP_PE_H */ diff --git a/librz/bin/format/mz/mz.c b/librz/bin/format/mz/mz.c index 98b2eda0c8c..b0b5d0b27fe 100644 --- a/librz/bin/format/mz/mz.c +++ b/librz/bin/format/mz/mz.c @@ -59,7 +59,7 @@ static RzBinSection *rz_bin_mz_init_section(const struct rz_bin_mz_obj_t *bin, return section; } -RzList *rz_bin_mz_get_segments(const struct rz_bin_mz_obj_t *bin) { +RzList /**/ *rz_bin_mz_get_segments(const struct rz_bin_mz_obj_t *bin) { RzList *seg_list; RzListIter *iter; RzBinSection *section; diff --git a/librz/bin/format/mz/mz.h b/librz/bin/format/mz/mz.h index cafafd7b03b..7a4c57545a3 100644 --- a/librz/bin/format/mz/mz.h +++ b/librz/bin/format/mz/mz.h @@ -39,7 +39,7 @@ struct rz_bin_mz_obj_t { }; RzBinAddr *rz_bin_mz_get_entrypoint(const struct rz_bin_mz_obj_t *bin); -RzList *rz_bin_mz_get_segments(const struct rz_bin_mz_obj_t *bin); +RzList /**/ *rz_bin_mz_get_segments(const struct rz_bin_mz_obj_t *bin); struct rz_bin_mz_reloc_t *rz_bin_mz_get_relocs(const struct rz_bin_mz_obj_t *bin); void *rz_bin_mz_free(struct rz_bin_mz_obj_t *bin); struct rz_bin_mz_obj_t *rz_bin_mz_new(const char *file); diff --git a/librz/bin/format/ne/ne.c b/librz/bin/format/ne/ne.c index c8097e8bc38..9c4ab6976b4 100644 --- a/librz/bin/format/ne/ne.c +++ b/librz/bin/format/ne/ne.c @@ -75,7 +75,7 @@ static char *__func_name_from_ord(char *module, ut16 ordinal) { return name; } -RzList *rz_bin_ne_get_segments(rz_bin_ne_obj_t *bin) { +RzList /**/ *rz_bin_ne_get_segments(rz_bin_ne_obj_t *bin) { int i; if (!bin) { return NULL; @@ -118,7 +118,7 @@ static void ne_sanitize_name(char *name, ut16 count) { } } -RzList *rz_bin_ne_get_symbols(rz_bin_ne_obj_t *bin) { +RzList /**/ *rz_bin_ne_get_symbols(rz_bin_ne_obj_t *bin) { RzBinSymbol *sym; ut16 off = bin->ne_header->ResidNamTable + bin->header_offset; RzList *symbols = rz_list_newf(free); @@ -354,7 +354,7 @@ static bool __ne_get_resources(rz_bin_ne_obj_t *bin) { return true; } -RzList *rz_bin_ne_get_imports(rz_bin_ne_obj_t *bin) { +RzList /**/ *rz_bin_ne_get_imports(rz_bin_ne_obj_t *bin) { RzList *imports = rz_list_newf((RzListFree)rz_bin_import_free); if (!imports) { return NULL; @@ -390,7 +390,7 @@ RzList *rz_bin_ne_get_imports(rz_bin_ne_obj_t *bin) { return imports; } -RzList *rz_bin_ne_get_entrypoints(rz_bin_ne_obj_t *bin) { +RzList /**/ *rz_bin_ne_get_entrypoints(rz_bin_ne_obj_t *bin) { RzList *entries = rz_list_newf(free); if (!entries) { return NULL; @@ -472,7 +472,7 @@ RzList *rz_bin_ne_get_entrypoints(rz_bin_ne_obj_t *bin) { return entries; } -RzList *rz_bin_ne_get_relocs(rz_bin_ne_obj_t *bin) { +RzList /**/ *rz_bin_ne_get_relocs(rz_bin_ne_obj_t *bin) { RzList *segments = bin->segments; if (!segments) { return NULL; diff --git a/librz/bin/format/ne/ne.h b/librz/bin/format/ne/ne.h index ee8cd565d58..c9ff692d03b 100644 --- a/librz/bin/format/ne/ne.h +++ b/librz/bin/format/ne/ne.h @@ -17,7 +17,7 @@ typedef struct { typedef struct { char *name; - RzList /**/ *entry; + RzList /**/ *entry; } rz_ne_resource; typedef struct { @@ -28,20 +28,20 @@ typedef struct { ut8 *entry_table; ut8 *resident_name_table; RzBuffer *buf; - RzList *segments; - RzList *entries; - RzList *resources; - RzList *imports; - RzList *symbols; + RzList /**/ *segments; + RzList /**/ *entries; + RzList /**/ *resources; + RzList /**/ *imports; + RzList /**/ *symbols; char *os; } rz_bin_ne_obj_t; void rz_bin_ne_free(rz_bin_ne_obj_t *bin); rz_bin_ne_obj_t *rz_bin_ne_new_buf(RzBuffer *buf, bool verbose); -RzList *rz_bin_ne_get_relocs(rz_bin_ne_obj_t *bin); -RzList *rz_bin_ne_get_imports(rz_bin_ne_obj_t *bin); -RzList *rz_bin_ne_get_symbols(rz_bin_ne_obj_t *bin); -RzList *rz_bin_ne_get_segments(rz_bin_ne_obj_t *bin); -RzList *rz_bin_ne_get_entrypoints(rz_bin_ne_obj_t *bin); +RzList /**/ *rz_bin_ne_get_relocs(rz_bin_ne_obj_t *bin); +RzList /**/ *rz_bin_ne_get_imports(rz_bin_ne_obj_t *bin); +RzList /**/ *rz_bin_ne_get_symbols(rz_bin_ne_obj_t *bin); +RzList /**/ *rz_bin_ne_get_segments(rz_bin_ne_obj_t *bin); +RzList /**/ *rz_bin_ne_get_entrypoints(rz_bin_ne_obj_t *bin); #endif diff --git a/librz/bin/format/nxo/nxo.h b/librz/bin/format/nxo/nxo.h index f313654008a..41aec99b499 100644 --- a/librz/bin/format/nxo/nxo.h +++ b/librz/bin/format/nxo/nxo.h @@ -59,9 +59,8 @@ typedef struct { typedef struct { ut32 *strings; - RzList *methods_list; - RzList *imports_list; - RzList *classes_list; + RzList /**/ *methods_list; + RzList /**/ *imports_list; RZ_NULLABLE RzBuffer *decompressed; /// nso-only void *header; } RzBinNXOObj; diff --git a/librz/bin/format/objc/mach0_classes.c b/librz/bin/format/objc/mach0_classes.c index 87e29047a9b..24a70b66a4e 100644 --- a/librz/bin/format/objc/mach0_classes.c +++ b/librz/bin/format/objc/mach0_classes.c @@ -113,7 +113,7 @@ static void get_objc_property_list(mach0_ut p, RzBinFile *bf, RzBuffer *buf, RzB static void get_method_list_t(mach0_ut p, RzBinFile *bf, RzBuffer *buf, char *class_name, RzBinClass *klass, bool is_static, objc_cache_opt_info *oi); static void get_protocol_list_t(mach0_ut p, RzBinFile *bf, RzBuffer *buf, RzBinClass *klass, objc_cache_opt_info *oi); static void get_class_ro_t(mach0_ut p, RzBinFile *bf, RzBuffer *buf, ut32 *is_meta_class, RzBinClass *klass, objc_cache_opt_info *oi); -static RzList *MACH0_(parse_categories)(RzBinFile *bf, RzBuffer *buf, RzSkipList *relocs, objc_cache_opt_info *oi); +static RzList /**/ *MACH0_(parse_categories)(RzBinFile *bf, RzBuffer *buf, RzSkipList *relocs, objc_cache_opt_info *oi); static bool read_ptr_pa(RzBinFile *bf, RzBuffer *buf, ut64 paddr, mach0_ut *out); static bool read_ptr_va(RzBinFile *bf, RzBuffer *buf, ut64 vaddr, mach0_ut *out); static char *read_str(RzBinFile *bf, RzBuffer *buf, mach0_ut p, ut32 *offset, ut32 *left); @@ -1240,8 +1240,8 @@ static RzList *parse_swift_classes(RzBinFile *bf) { } #endif -RZ_API RzList *MACH0_(parse_classes)(RzBinFile *bf, objc_cache_opt_info *oi) { - RzList /**/ *ret = NULL; +RZ_API RzList /**/ *MACH0_(parse_classes)(RzBinFile *bf, objc_cache_opt_info *oi) { + RzList /**/ *ret = NULL; ut64 num_of_unnamed_class = 0; RzBinClass *klass = NULL; ut32 i = 0, size = 0; @@ -1365,7 +1365,7 @@ RZ_API RzList *MACH0_(parse_classes)(RzBinFile *bf, objc_cache_opt_info *oi) { return NULL; } -static RzList *MACH0_(parse_categories)(RzBinFile *bf, RzBuffer *buf, RzSkipList *relocs, objc_cache_opt_info *oi) { +static RzList /**/ *MACH0_(parse_categories)(RzBinFile *bf, RzBuffer *buf, RzSkipList *relocs, objc_cache_opt_info *oi) { rz_return_val_if_fail(bf && bf->o && bf->o->bin_obj && bf->o->info, NULL); RzList /**/ *ret = NULL; diff --git a/librz/bin/format/objc/mach0_classes.h b/librz/bin/format/objc/mach0_classes.h index 1b06fb698ea..116eaa15282 100644 --- a/librz/bin/format/objc/mach0_classes.h +++ b/librz/bin/format/objc/mach0_classes.h @@ -21,7 +21,7 @@ #ifndef MACH0_CLASSES_H #define MACH0_CLASSES_H -RZ_API RzList *MACH0_(parse_classes)(RzBinFile *bf, objc_cache_opt_info *oi); +RZ_API RzList /**/ *MACH0_(parse_classes)(RzBinFile *bf, objc_cache_opt_info *oi); RZ_API void MACH0_(get_class_t)(mach0_ut p, RzBinFile *bf, RzBuffer *buf, RzBinClass *klass, bool dupe, RzSkipList *relocs, objc_cache_opt_info *oi); RZ_API void MACH0_(get_category_t)(mach0_ut p, RzBinFile *bf, RzBuffer *buf, RzBinClass *klass, RzSkipList *relocs, objc_cache_opt_info *oi); diff --git a/librz/bin/format/omf/omf.c b/librz/bin/format/omf/omf.c index 431d0316efb..76542ca4b7b 100644 --- a/librz/bin/format/omf/omf.c +++ b/librz/bin/format/omf/omf.c @@ -743,7 +743,7 @@ int rz_bin_omf_get_bits(rz_bin_omf_obj *obj) { return 16; } -int rz_bin_omf_send_sections(RzList *list, OMF_segment *section, rz_bin_omf_obj *obj) { +int rz_bin_omf_send_sections(RzList /**/ *list, OMF_segment *section, rz_bin_omf_obj *obj) { RzBinSection *new; OMF_data *data = section->data; ut32 ct_name = 1; diff --git a/librz/bin/format/omf/omf.h b/librz/bin/format/omf/omf.h index d60ad17cc4e..840cee5c52b 100644 --- a/librz/bin/format/omf/omf.h +++ b/librz/bin/format/omf/omf.h @@ -65,7 +65,7 @@ rz_bin_omf_obj *rz_bin_internal_omf_load(const ut8 *buf, ut64 size); void rz_bin_free_all_omf_obj(rz_bin_omf_obj *obj); bool rz_bin_omf_get_entry(rz_bin_omf_obj *obj, RzBinAddr *addr); int rz_bin_omf_get_bits(rz_bin_omf_obj *obj); -int rz_bin_omf_send_sections(RzList *list, OMF_segment *section, rz_bin_omf_obj *obj); +int rz_bin_omf_send_sections(RzList /**/ *list, OMF_segment *section, rz_bin_omf_obj *obj); ut64 rz_bin_omf_get_paddr_sym(rz_bin_omf_obj *obj, OMF_symbol *sym); ut64 rz_bin_omf_get_vaddr_sym(rz_bin_omf_obj *obj, OMF_symbol *sym); diff --git a/librz/bin/format/pe/dotnet.h b/librz/bin/format/pe/dotnet.h index 555470f0fcf..fe6aa2a4758 100644 --- a/librz/bin/format/pe/dotnet.h +++ b/librz/bin/format/pe/dotnet.h @@ -150,7 +150,7 @@ typedef struct { typedef struct { Pe_image_clr_header *header; Pe_image_metadata_header *metadata_header; - RzList /* Pe_image_metadata_stream */ *streams; + RzList /**/ *streams; // special streams Pe_image_metadata_stream *tilde_stream; @@ -160,8 +160,8 @@ typedef struct { // header data Pe_image_metadata_tilde_header *tilde; RzBuffer *strings; - RzPVector /* Pe_image_metadata_methoddef */ *methoddefs; - RzList /* Pe_image_metadata_typedef */ *typedefs; + RzPVector /**/ *methoddefs; + RzList /**/ *typedefs; } Pe_image_clr; int bin_pe_dotnet_init_metadata(Pe_image_clr *clr, bool big_endian, RzBuffer *b, ut64 metadata_directory); diff --git a/librz/bin/format/pe/pe.h b/librz/bin/format/pe/pe.h index 05a91fd8a28..11e553e8643 100644 --- a/librz/bin/format/pe/pe.h +++ b/librz/bin/format/pe/pe.h @@ -158,9 +158,9 @@ struct PE_(rz_bin_pe_obj_t) { int endian; bool verbose; int big_endian; - RzList *rich_entries; - RzList *relocs; - RzList *resources; // RzList of rz_pe_resources + RzList /**/ *rich_entries; + RzList /**/ *relocs; + RzList /**/ *resources; const char *file; RzBuffer *b; Sdb *kv; @@ -177,7 +177,7 @@ struct PE_(rz_bin_pe_obj_t) { #define PE_READ_STRUCT_FIELD(var, struct_type, field, size) var->field = rz_read_le##size(buf + offsetof(struct_type, field)) // pe_clr.c -RZ_OWN RzList *PE_(rz_bin_pe_get_clr_symbols)(RzBinPEObj *bin); +RZ_OWN RzList /**/ *PE_(rz_bin_pe_get_clr_symbols)(RzBinPEObj *bin); ut64 PE_(rz_bin_pe_get_clr_methoddef_offset)(RzBinPEObj *bin, Pe_image_metadata_methoddef *methoddef); int PE_(bin_pe_init_clr)(RzBinPEObj *bin); @@ -234,7 +234,7 @@ int PE_(bin_pe_init_resource)(RzBinPEObj *bin); // pe_section.c int PE_(bin_pe_init_sections)(RzBinPEObj *bin); void PE_(rz_bin_pe_check_sections)(RzBinPEObj *bin, struct rz_bin_pe_section_t **sects); -RzList *PE_(section_flag_to_rzlist)(ut64 flag); +RzList /**/ *PE_(section_flag_to_rzlist)(ut64 flag); struct rz_bin_pe_section_t *PE_(rz_bin_pe_get_sections)(RzBinPEObj *bin); // pe_security.c diff --git a/librz/bin/format/pe/pe_clr.c b/librz/bin/format/pe/pe_clr.c index 98e306e869f..5a8898c8de1 100644 --- a/librz/bin/format/pe/pe_clr.c +++ b/librz/bin/format/pe/pe_clr.c @@ -5,11 +5,11 @@ #include "pe.h" -RZ_OWN RzList /* RzBinSymbol */ *PE_(rz_bin_pe_get_clr_symbols)(RzBinPEObj *bin) { +RZ_OWN RzList /**/ *PE_(rz_bin_pe_get_clr_symbols)(RzBinPEObj *bin) { if (!bin || !bin->clr || !bin->clr->methoddefs) { return NULL; } - RzList /* RzBinSymbol */ *methods = rz_list_newf((RzListFree)rz_bin_symbol_free); + RzList /**/ *methods = rz_list_newf((RzListFree)rz_bin_symbol_free); if (!methods) { return NULL; } @@ -139,4 +139,4 @@ int PE_(bin_pe_init_clr)(RzBinPEObj *bin) { bin->clr = clr; return 0; -} \ No newline at end of file +} diff --git a/librz/bin/format/pe/pe_section.c b/librz/bin/format/pe/pe_section.c index 509f8532a0b..7c74fd82bfc 100644 --- a/librz/bin/format/pe/pe_section.c +++ b/librz/bin/format/pe/pe_section.c @@ -110,7 +110,7 @@ void PE_(rz_bin_pe_check_sections)(RzBinPEObj *bin, struct rz_bin_pe_section_t * return; } -RzList *PE_(section_flag_to_rzlist)(ut64 flag) { +RzList /**/ *PE_(section_flag_to_rzlist)(ut64 flag) { RzList *flag_list = rz_list_new(); if (flag & IMAGE_SCN_TYPE_NO_PAD) { rz_list_append(flag_list, "TYPE_NO_PAD"); @@ -403,4 +403,4 @@ int PE_(bin_pe_init_sections)(RzBinPEObj *bin) { out_error: bin->num_sections = 0; return false; -} \ No newline at end of file +} diff --git a/librz/bin/format/pyc/marshal.c b/librz/bin/format/pyc/marshal.c index dbccc1cf8e4..a665980b014 100644 --- a/librz/bin/format/pyc/marshal.c +++ b/librz/bin/format/pyc/marshal.c @@ -1120,7 +1120,7 @@ static pyc_object *get_object(RzBinPycObj *pyc, RzBuffer *buffer) { return ret; } -static bool extract_sections_symbols(RzBinPycObj *pyc, pyc_object *obj, RzList *sections, RzList *symbols, RzList *cobjs, char *prefix) { +static bool extract_sections_symbols(RzBinPycObj *pyc, pyc_object *obj, RzList /**/ *sections, RzList /**/ *symbols, RzList /**/ *cobjs, char *prefix) { pyc_code_object *cobj = NULL; RzBinSection *section = NULL; RzBinSymbol *symbol = NULL; @@ -1185,7 +1185,7 @@ static bool extract_sections_symbols(RzBinPycObj *pyc, pyc_object *obj, RzList * return false; } -bool get_sections_symbols_from_code_objects(RzBinPycObj *pyc, RzBuffer *buffer, RzList *sections, RzList *symbols, RzList *cobjs, ut32 magic) { +bool get_sections_symbols_from_code_objects(RzBinPycObj *pyc, RzBuffer *buffer, RzList /**/ *sections, RzList /**/ *symbols, RzList /**/ *cobjs, ut32 magic) { bool ret; pyc->magic_int = magic; pyc->refs = rz_list_newf((RzListFree)free_object); diff --git a/librz/bin/format/pyc/marshal.h b/librz/bin/format/pyc/marshal.h index c5022135042..37570975a7c 100644 --- a/librz/bin/format/pyc/marshal.h +++ b/librz/bin/format/pyc/marshal.h @@ -77,15 +77,15 @@ typedef struct pyc_context { ut64 code_start_offset; struct pyc_version version; /* used from marshall.c */ - RzList *interned_table; - RzList *sections_cache; - RzList *shared; - RzList *refs; // If you don't have a good reason, do not change this. And also checkout !refs in get_code_object() + RzList /**/ *interned_table; + RzList /**/ *sections_cache; + RzList /* *>*/ *shared; + RzList /**/ *refs; // If you don't have a good reason, do not change this. And also checkout !refs in get_code_object() ut32 magic_int; ut32 symbols_ordinal; } RzBinPycObj; -bool get_sections_symbols_from_code_objects(RzBinPycObj *pyc, RzBuffer *buffer, RzList *sections, RzList *symbols, RzList *objs, ut32 magic); +bool get_sections_symbols_from_code_objects(RzBinPycObj *pyc, RzBuffer *buffer, RzList /**/ *sections, RzList /**/ *symbols, RzList /**/ *objs, ut32 magic); ut64 get_code_object_addr(RzBinPycObj *pyc, RzBuffer *buffer, ut32 magic); #endif diff --git a/librz/bin/format/pyc/pyc.c b/librz/bin/format/pyc/pyc.c index e7b19f54ad3..96c6f7a287f 100644 --- a/librz/bin/format/pyc/pyc.c +++ b/librz/bin/format/pyc/pyc.c @@ -5,7 +5,7 @@ #include "pyc.h" #include "marshal.h" -bool pyc_get_sections_symbols(RzBinPycObj *pyc, RzList *sections, RzList *symbols, RzList *cobjs, RzBuffer *buf, ut32 magic) { +bool pyc_get_sections_symbols(RzBinPycObj *pyc, RzList /**/ *sections, RzList /**/ *symbols, RzList /**/ *cobjs, RzBuffer *buf, ut32 magic) { return get_sections_symbols_from_code_objects(pyc, buf, sections, symbols, cobjs, magic); } diff --git a/librz/bin/format/pyc/pyc.h b/librz/bin/format/pyc/pyc.h index 5ebbf68347d..7f952a529b8 100644 --- a/librz/bin/format/pyc/pyc.h +++ b/librz/bin/format/pyc/pyc.h @@ -12,7 +12,7 @@ #include "pyc_magic.h" #include "marshal.h" -bool pyc_get_sections_symbols(RzBinPycObj *pyc, RzList *sections, RzList *symbols, RzList *mem, RzBuffer *buf, ut32 magic); +bool pyc_get_sections_symbols(RzBinPycObj *pyc, RzList /**/ *sections, RzList /**/ *symbols, RzList /**/ *mem, RzBuffer *buf, ut32 magic); bool pyc_is_code(ut8 b, ut32 magic); #endif diff --git a/librz/bin/format/qnx/qnx.h b/librz/bin/format/qnx/qnx.h index 5bf19e9478c..fc0a7ba4714 100644 --- a/librz/bin/format/qnx/qnx.h +++ b/librz/bin/format/qnx/qnx.h @@ -87,9 +87,9 @@ RZ_PACKED( typedef struct { Sdb *kv; lmf_header lmfh; - RzList *fixups; - RzList *sections; - RzList *maps; + RzList /**/ *fixups; + RzList /**/ *sections; + RzList /**/ *maps; lmf_rw_end rwend; }) QnxObj; diff --git a/librz/bin/format/wasm/wasm.c b/librz/bin/format/wasm/wasm.c index 4da29a80c39..d15b994956f 100644 --- a/librz/bin/format/wasm/wasm.c +++ b/librz/bin/format/wasm/wasm.c @@ -159,7 +159,7 @@ static size_t consume_limits_r(RzBuffer *b, ut64 max, struct rz_bin_wasm_resizab } // Utils -static RzList *rz_bin_wasm_get_sections_by_id(RzList *sections, ut8 id) { +static RzList /**/ *rz_bin_wasm_get_sections_by_id(RzList /**/ *sections, ut8 id) { RzBinWasmSection *sec = NULL; RzList *ret = rz_list_newf(NULL); if (!ret) { @@ -233,7 +233,7 @@ static void rz_bin_wasm_free_codes(RzBinWasmCodeEntry *ptr) { } // Parsing -static RzList *get_entries_from_section(RzBinWasmObj *bin, RzBinWasmSection *sec, ParseEntryFcn parse_entry, RzListFree free_entry) { +static RzList /**/ *get_entries_from_section(RzBinWasmObj *bin, RzBinWasmSection *sec, ParseEntryFcn parse_entry, RzListFree free_entry) { rz_return_val_if_fail(sec && bin, NULL); RzList *ret = rz_list_newf(free_entry); @@ -668,23 +668,23 @@ static void *parse_element_entry(RzBuffer *b, ut64 max) { return NULL; } -static RzList *rz_bin_wasm_get_type_entries(RzBinWasmObj *bin, RzBinWasmSection *sec) { +static RzList /**/ *rz_bin_wasm_get_type_entries(RzBinWasmObj *bin, RzBinWasmSection *sec) { return get_entries_from_section(bin, sec, parse_type_entry, (RzListFree)rz_bin_wasm_free_types); } -static RzList *rz_bin_wasm_get_import_entries(RzBinWasmObj *bin, RzBinWasmSection *sec) { +static RzList /**/ *rz_bin_wasm_get_import_entries(RzBinWasmObj *bin, RzBinWasmSection *sec) { return get_entries_from_section(bin, sec, parse_import_entry, (RzListFree)free); } -static RzList *rz_bin_wasm_get_export_entries(RzBinWasmObj *bin, RzBinWasmSection *sec) { +static RzList /**/ *rz_bin_wasm_get_export_entries(RzBinWasmObj *bin, RzBinWasmSection *sec) { return get_entries_from_section(bin, sec, parse_export_entry, (RzListFree)free); } -static RzList *rz_bin_wasm_get_code_entries(RzBinWasmObj *bin, RzBinWasmSection *sec) { +static RzList /**/ *rz_bin_wasm_get_code_entries(RzBinWasmObj *bin, RzBinWasmSection *sec) { return get_entries_from_section(bin, sec, parse_code_entry, (RzListFree)rz_bin_wasm_free_codes); } -static RzList *rz_bin_wasm_get_data_entries(RzBinWasmObj *bin, RzBinWasmSection *sec) { +static RzList /**/ *rz_bin_wasm_get_data_entries(RzBinWasmObj *bin, RzBinWasmSection *sec) { return get_entries_from_section(bin, sec, parse_data_entry, (RzListFree)free); } @@ -711,23 +711,23 @@ static RzBinWasmStartEntry *rz_bin_wasm_get_start(RzBinWasmObj *bin, RzBinWasmSe return NULL; } -static RzList *rz_bin_wasm_get_memory_entries(RzBinWasmObj *bin, RzBinWasmSection *sec) { +static RzList /**/ *rz_bin_wasm_get_memory_entries(RzBinWasmObj *bin, RzBinWasmSection *sec) { return get_entries_from_section(bin, sec, parse_memory_entry, (RzListFree)free); } -static RzList *rz_bin_wasm_get_table_entries(RzBinWasmObj *bin, RzBinWasmSection *sec) { +static RzList /**/ *rz_bin_wasm_get_table_entries(RzBinWasmObj *bin, RzBinWasmSection *sec) { return get_entries_from_section(bin, sec, parse_table_entry, (RzListFree)free); } -static RzList *rz_bin_wasm_get_global_entries(RzBinWasmObj *bin, RzBinWasmSection *sec) { +static RzList /**/ *rz_bin_wasm_get_global_entries(RzBinWasmObj *bin, RzBinWasmSection *sec) { return get_entries_from_section(bin, sec, parse_global_entry, (RzListFree)free); } -static RzList *rz_bin_wasm_get_element_entries(RzBinWasmObj *bin, RzBinWasmSection *sec) { +static RzList /**/ *rz_bin_wasm_get_element_entries(RzBinWasmObj *bin, RzBinWasmSection *sec) { return get_entries_from_section(bin, sec, parse_element_entry, (RzListFree)free); } -static RzList *rz_bin_wasm_get_custom_name_entries(RzBinWasmObj *bin, RzBinWasmSection *sec) { +static RzList /**/ *rz_bin_wasm_get_custom_name_entries(RzBinWasmObj *bin, RzBinWasmSection *sec) { RzList *ret = rz_list_new(); RzBuffer *buf = bin->buf; @@ -843,7 +843,7 @@ void rz_bin_wasm_destroy(RzBinFile *bf) { bf->o->bin_obj = NULL; } -RzList *rz_bin_wasm_get_sections(RzBinWasmObj *bin) { +RzList /**/ *rz_bin_wasm_get_sections(RzBinWasmObj *bin) { RzList *ret = NULL; RzBinWasmSection *ptr = NULL; @@ -1000,7 +1000,7 @@ ut32 rz_bin_wasm_get_entrypoint(RzBinWasmObj *bin) { return (ut32)(func ? func->code : 0); } -RzList *rz_bin_wasm_get_imports(RzBinWasmObj *bin) { +RzList /**/ *rz_bin_wasm_get_imports(RzBinWasmObj *bin) { RzBinWasmSection *import = NULL; RzList *imports = NULL; @@ -1023,7 +1023,7 @@ RzList *rz_bin_wasm_get_imports(RzBinWasmObj *bin) { return bin->g_imports; } -RzList *rz_bin_wasm_get_exports(RzBinWasmObj *bin) { +RzList /**/ *rz_bin_wasm_get_exports(RzBinWasmObj *bin) { RzBinWasmSection *export = NULL; RzList *exports = NULL; @@ -1046,7 +1046,7 @@ RzList *rz_bin_wasm_get_exports(RzBinWasmObj *bin) { return bin->g_exports; } -RzList *rz_bin_wasm_get_types(RzBinWasmObj *bin) { +RzList /**/ *rz_bin_wasm_get_types(RzBinWasmObj *bin) { RzBinWasmSection *type = NULL; RzList *types = NULL; @@ -1069,7 +1069,7 @@ RzList *rz_bin_wasm_get_types(RzBinWasmObj *bin) { return bin->g_types; } -RzList *rz_bin_wasm_get_tables(RzBinWasmObj *bin) { +RzList /**/ *rz_bin_wasm_get_tables(RzBinWasmObj *bin) { RzBinWasmSection *table = NULL; RzList *tables = NULL; @@ -1092,7 +1092,7 @@ RzList *rz_bin_wasm_get_tables(RzBinWasmObj *bin) { return bin->g_tables; } -RzList *rz_bin_wasm_get_memories(RzBinWasmObj *bin) { +RzList /**/ *rz_bin_wasm_get_memories(RzBinWasmObj *bin) { RzBinWasmSection *memory; RzList *memories; @@ -1119,7 +1119,7 @@ RzList *rz_bin_wasm_get_memories(RzBinWasmObj *bin) { return bin->g_memories; } -RzList *rz_bin_wasm_get_globals(RzBinWasmObj *bin) { +RzList /**/ *rz_bin_wasm_get_globals(RzBinWasmObj *bin) { RzBinWasmSection *global = NULL; RzList *globals = NULL; @@ -1142,7 +1142,7 @@ RzList *rz_bin_wasm_get_globals(RzBinWasmObj *bin) { return bin->g_globals; } -RzList *rz_bin_wasm_get_elements(RzBinWasmObj *bin) { +RzList /**/ *rz_bin_wasm_get_elements(RzBinWasmObj *bin) { RzBinWasmSection *element = NULL; RzList *elements = NULL; @@ -1165,7 +1165,7 @@ RzList *rz_bin_wasm_get_elements(RzBinWasmObj *bin) { return bin->g_elements; } -RzList *rz_bin_wasm_get_codes(RzBinWasmObj *bin) { +RzList /**/ *rz_bin_wasm_get_codes(RzBinWasmObj *bin) { RzBinWasmSection *code = NULL; ; RzList *codes = NULL; @@ -1189,7 +1189,7 @@ RzList *rz_bin_wasm_get_codes(RzBinWasmObj *bin) { return bin->g_codes; } -RzList *rz_bin_wasm_get_datas(RzBinWasmObj *bin) { +RzList /**/ *rz_bin_wasm_get_datas(RzBinWasmObj *bin) { RzBinWasmSection *data = NULL; RzList *datas = NULL; @@ -1212,7 +1212,7 @@ RzList *rz_bin_wasm_get_datas(RzBinWasmObj *bin) { return bin->g_datas; } -RzList *rz_bin_wasm_get_custom_names(RzBinWasmObj *bin) { +RzList /**/ *rz_bin_wasm_get_custom_names(RzBinWasmObj *bin) { RzBinWasmSection *cust = NULL; RzList *customs = NULL; diff --git a/librz/bin/format/wasm/wasm.h b/librz/bin/format/wasm/wasm.h index d4aa2f3dce4..70ef089f70b 100644 --- a/librz/bin/format/wasm/wasm.h +++ b/librz/bin/format/wasm/wasm.h @@ -197,7 +197,7 @@ typedef struct rz_bin_wasm_custom_name_local_name_t { typedef struct rz_bin_wasm_custom_name_local_names_t { ut32 count; - RzList *locals; // RzBinWasmCustomNameLocalName + RzList /**/ *locals; } RzBinWasmCustomNameLocalNames; // "name" section entry @@ -221,36 +221,36 @@ typedef struct rz_bin_wasm_obj_t { ut32 entrypoint; // cache purposes - RzList *g_sections; - RzList *g_types; - RzList *g_imports; - RzList *g_exports; - RzList *g_tables; - RzList *g_memories; - RzList *g_globals; - RzList *g_elements; - RzList *g_codes; - RzList *g_datas; + RzList /**/ *g_sections; + RzList /**/ *g_types; + RzList /**/ *g_imports; + RzList /**/ *g_exports; + RzList /**/ *g_tables; + RzList /**/ *g_memories; + RzList /**/ *g_globals; + RzList /**/ *g_elements; + RzList /**/ *g_codes; + RzList /**/ *g_datas; RzBinWasmStartEntry *g_start; - RzList *g_names; + RzList /**/ *g_names; // etc... } RzBinWasmObj; RzBinWasmObj *rz_bin_wasm_init(RzBinFile *bf, RzBuffer *buf); void rz_bin_wasm_destroy(RzBinFile *bf); -RzList *rz_bin_wasm_get_sections(RzBinWasmObj *bin); -RzList *rz_bin_wasm_get_types(RzBinWasmObj *bin); -RzList *rz_bin_wasm_get_imports(RzBinWasmObj *bin); -RzList *rz_bin_wasm_get_exports(RzBinWasmObj *bin); -RzList *rz_bin_wasm_get_tables(RzBinWasmObj *bin); -RzList *rz_bin_wasm_get_memories(RzBinWasmObj *bin); -RzList *rz_bin_wasm_get_globals(RzBinWasmObj *bin); -RzList *rz_bin_wasm_get_elements(RzBinWasmObj *bin); -RzList *rz_bin_wasm_get_codes(RzBinWasmObj *bin); -RzList *rz_bin_wasm_get_datas(RzBinWasmObj *bin); -RzList *rz_bin_wasm_get_custom_names(RzBinWasmObj *bin); +RzList /**/ *rz_bin_wasm_get_sections(RzBinWasmObj *bin); +RzList /**/ *rz_bin_wasm_get_types(RzBinWasmObj *bin); +RzList /**/ *rz_bin_wasm_get_imports(RzBinWasmObj *bin); +RzList /**/ *rz_bin_wasm_get_exports(RzBinWasmObj *bin); +RzList /**/ *rz_bin_wasm_get_tables(RzBinWasmObj *bin); +RzList /**/ *rz_bin_wasm_get_memories(RzBinWasmObj *bin); +RzList /**/ *rz_bin_wasm_get_globals(RzBinWasmObj *bin); +RzList /**/ *rz_bin_wasm_get_elements(RzBinWasmObj *bin); +RzList /**/ *rz_bin_wasm_get_codes(RzBinWasmObj *bin); +RzList /**/ *rz_bin_wasm_get_datas(RzBinWasmObj *bin); +RzList /**/ *rz_bin_wasm_get_custom_names(RzBinWasmObj *bin); ut32 rz_bin_wasm_get_entrypoint(RzBinWasmObj *bin); const char *rz_bin_wasm_get_function_name(RzBinWasmObj *bin, ut32 idx); const char *rz_bin_wasm_valuetype_to_string(rz_bin_wasm_value_type_t type); diff --git a/librz/bin/format/xnu/rz_cf_dict.h b/librz/bin/format/xnu/rz_cf_dict.h index b5748c47f30..28e43ea9718 100644 --- a/librz/bin/format/xnu/rz_cf_dict.h +++ b/librz/bin/format/xnu/rz_cf_dict.h @@ -30,12 +30,12 @@ typedef struct _CFKeyValue { typedef struct _CFValueDict { RCFValueType type; - RzList *pairs; //_CFKeyValue + RzList /**/ *pairs; } RCFValueDict; typedef struct _CFValueArray { RCFValueType type; - RzList *values; //_CFValue + RzList /**/ *values; } RCFValueArray; typedef struct _CFValueString { diff --git a/librz/bin/format/zimg/zimg.h b/librz/bin/format/zimg/zimg.h index d4b526e290e..11911115e41 100644 --- a/librz/bin/format/zimg/zimg.h +++ b/librz/bin/format/zimg/zimg.h @@ -25,8 +25,6 @@ typedef struct rz_bin_zimg_obj_t { RzBuffer *b; struct zimg_header_t header; ut32 *strings; - RzList *methods_list; - RzList *imports_list; ut64 code_from; ut64 code_to; Sdb *kv; diff --git a/librz/bin/p/bin_art.c b/librz/bin/p/bin_art.c index aab186181c5..8168f075e3b 100644 --- a/librz/bin/p/bin_art.c +++ b/librz/bin/p/bin_art.c @@ -94,7 +94,7 @@ static ut64 baddr(RzBinFile *bf) { return ao ? ao->art.image_base : 0; } -static RzList *strings(RzBinFile *bf) { +static RzList /**/ *strings(RzBinFile *bf) { return NULL; } @@ -132,7 +132,7 @@ static bool check_buffer(RzBuffer *buf) { return r == 4 && !strncmp(tmp, "art\n", 4); } -static RzList *entries(RzBinFile *bf) { +static RzList /**/ *entries(RzBinFile *bf) { RzList *ret = rz_list_newf(free); if (ret) { RzBinAddr *ptr = RZ_NEW0(RzBinAddr); @@ -144,7 +144,7 @@ static RzList *entries(RzBinFile *bf) { return ret; } -static RzList *sections(RzBinFile *bf) { +static RzList /**/ *sections(RzBinFile *bf) { ArtObj *ao = bf->o->bin_obj; if (!ao) { return NULL; diff --git a/librz/bin/p/bin_avr.c b/librz/bin/p/bin_avr.c index 7dd6eda8e97..2766f3aabe3 100644 --- a/librz/bin/p/bin_avr.c +++ b/librz/bin/p/bin_avr.c @@ -139,7 +139,7 @@ static RzBinInfo *info(RzBinFile *bf) { return bi; } -static RzList *entries(RzBinFile *bf) { +static RzList /**/ *entries(RzBinFile *bf) { RzList *ret; RzBinAddr *ptr = NULL; if (tmp_entry == UT64_MAX) { @@ -157,7 +157,7 @@ static RzList *entries(RzBinFile *bf) { return ret; } -static void addsym(RzList *ret, const char *name, ut64 addr) { +static void addsym(RzList /**/ *ret, const char *name, ut64 addr) { RzBinSymbol *ptr = RZ_NEW0(RzBinSymbol); if (ptr) { ptr->name = strdup(name ? name : ""); @@ -168,7 +168,7 @@ static void addsym(RzList *ret, const char *name, ut64 addr) { } } -static void addptr(RzList *ret, const char *name, ut64 addr, RzBuffer *b) { +static void addptr(RzList /**/ *ret, const char *name, ut64 addr, RzBuffer *b) { if (b && rjmp(b, 0)) { addsym(ret, sdb_fmt("vector.%s", name), addr); ut64 ptr_addr; @@ -178,7 +178,7 @@ static void addptr(RzList *ret, const char *name, ut64 addr, RzBuffer *b) { } } -static RzList *symbols(RzBinFile *bf) { +static RzList /**/ *symbols(RzBinFile *bf) { RzList *ret = NULL; RzBuffer *obj = bf->o->bin_obj; @@ -195,7 +195,7 @@ static RzList *symbols(RzBinFile *bf) { return ret; } -static RzList *strings(RzBinFile *bf) { +static RzList /**/ *strings(RzBinFile *bf) { // we dont want to find strings in avr bins because there are lot of false positives return NULL; } diff --git a/librz/bin/p/bin_bf.c b/librz/bin/p/bin_bf.c index c098390e0aa..12ee52e985d 100644 --- a/librz/bin/p/bin_bf.c +++ b/librz/bin/p/bin_bf.c @@ -18,7 +18,7 @@ static ut64 baddr(RzBinFile *bf) { return 0; } -static RzList *strings(RzBinFile *bf) { +static RzList /**/ *strings(RzBinFile *bf) { return NULL; } @@ -98,7 +98,7 @@ static bool check_filename(const char *filename) { return rz_str_endswith_icase(filename, ".bf"); } -static RzList *entries(RzBinFile *bf) { +static RzList /**/ *entries(RzBinFile *bf) { RzList *ret; RzBinAddr *ptr = NULL; @@ -113,7 +113,7 @@ static RzList *entries(RzBinFile *bf) { return ret; } -static RzList *maps(RzBinFile *bf) { +static RzList /**/ *maps(RzBinFile *bf) { RzList *ret = rz_list_newf((RzListFree)rz_bin_map_free); if (!ret) { return NULL; diff --git a/librz/bin/p/bin_bflt.c b/librz/bin/p/bin_bflt.c index 6580b30eb02..065ecc1dc19 100644 --- a/librz/bin/p/bin_bflt.c +++ b/librz/bin/p/bin_bflt.c @@ -16,7 +16,7 @@ static bool load_buffer(RzBinFile *bf, RzBinObject *obj, RzBuffer *buf, Sdb *sdb return obj->bin_obj; } -static RzList *entries(RzBinFile *bf) { +static RzList /**/ *entries(RzBinFile *bf) { RzBfltObj *obj = bf->o->bin_obj; RzList *ret; RzBinAddr *ptr; @@ -33,7 +33,7 @@ static RzList *entries(RzBinFile *bf) { return ret; } -static RzList *maps(RzBinFile *bf) { +static RzList /**/ *maps(RzBinFile *bf) { RzBfltObj *obj = bf->o->bin_obj; RzList *ret = rz_list_newf((RzListFree)rz_bin_map_free); if (!ret) { @@ -71,7 +71,7 @@ static RzList *maps(RzBinFile *bf) { return ret; } -static RzList *sections(RzBinFile *bf) { +static RzList /**/ *sections(RzBinFile *bf) { RzBfltObj *obj = bf->o->bin_obj; RzList *ret = rz_list_newf((RzListFree)rz_bin_section_free); if (!ret) { @@ -164,7 +164,7 @@ static RzList *sections(RzBinFile *bf) { return NULL; } -static RzList *virtual_files(RzBinFile *bf) { +static RzList /**/ *virtual_files(RzBinFile *bf) { RzBfltObj *obj = bf->o->bin_obj; RzList *r = rz_list_newf((RzListFree)rz_bin_virtual_file_free); if (!r) { @@ -182,7 +182,7 @@ static RzList *virtual_files(RzBinFile *bf) { return r; } -static void convert_relocs(RzBfltObj *bin, RzList *out, RzVector /**/ *relocs) { +static void convert_relocs(RzBfltObj *bin, RzList /**/ *out, RzVector /**/ *relocs) { RzBfltReloc *br; rz_vector_foreach(relocs, br) { RzBinReloc *r = RZ_NEW0(RzBinReloc); @@ -200,7 +200,7 @@ static void convert_relocs(RzBfltObj *bin, RzList *out, RzVector /* } } -static RzList *relocs(RzBinFile *bf) { +static RzList /**/ *relocs(RzBinFile *bf) { RzBfltObj *obj = (RzBfltObj *)bf->o->bin_obj; RzList *list = rz_list_newf((RzListFree)free); if (!list || !obj) { @@ -248,7 +248,7 @@ static void destroy(RzBinFile *bf) { rz_bflt_free(bf->o->bin_obj); } -static RzList *strings(RzBinFile *bf) { +static RzList /**/ *strings(RzBinFile *bf) { return rz_bin_file_strings(bf, 0, false); } diff --git a/librz/bin/p/bin_bios.c b/librz/bin/p/bin_bios.c index c0dc2975c6f..b7f8d55cfe0 100644 --- a/librz/bin/p/bin_bios.c +++ b/librz/bin/p/bin_bios.c @@ -59,7 +59,7 @@ static ut64 baddr(RzBinFile *bf) { } /* accelerate binary load */ -static RzList *strings(RzBinFile *bf) { +static RzList /**/ *strings(RzBinFile *bf) { return NULL; } @@ -84,7 +84,7 @@ static RzBinInfo *info(RzBinFile *bf) { return ret; } -static RzList *sections(RzBinFile *bf) { +static RzList /**/ *sections(RzBinFile *bf) { RzList *ret = NULL; RzBinSection *ptr = NULL; RzBuffer *obj = bf->o->bin_obj; @@ -117,7 +117,7 @@ static RzList *sections(RzBinFile *bf) { return ret; } -static RzList *entries(RzBinFile *bf) { +static RzList /**/ *entries(RzBinFile *bf) { RzList *ret; RzBinAddr *ptr = NULL; if (!(ret = rz_list_new())) { diff --git a/librz/bin/p/bin_bootimg.c b/librz/bin/p/bin_bootimg.c index ff158b0ae75..f4e2cc4c471 100644 --- a/librz/bin/p/bin_bootimg.c +++ b/librz/bin/p/bin_bootimg.c @@ -116,7 +116,7 @@ static ut64 baddr(RzBinFile *bf) { return bio ? bio->bi.kernel_addr : 0; } -static RzList *strings(RzBinFile *bf) { +static RzList /**/ *strings(RzBinFile *bf) { return NULL; } @@ -152,7 +152,7 @@ static bool check_buffer(RzBuffer *buf) { return r > 12 && !strncmp((const char *)tmp, "ANDROID!", 8); } -static RzList *entries(RzBinFile *bf) { +static RzList /**/ *entries(RzBinFile *bf) { BootImageObj *bio = bf->o->bin_obj; RzBinAddr *ptr = NULL; if (!bio) { @@ -173,7 +173,7 @@ static RzList *entries(RzBinFile *bf) { return ret; } -static RzList *sections(RzBinFile *bf) { +static RzList /**/ *sections(RzBinFile *bf) { BootImageObj *bio = bf->o->bin_obj; if (!bio) { return NULL; diff --git a/librz/bin/p/bin_coff.c b/librz/bin/p/bin_coff.c index 0fd3cc37edc..c005d0d68cd 100644 --- a/librz/bin/p/bin_coff.c +++ b/librz/bin/p/bin_coff.c @@ -167,7 +167,7 @@ static RzBinImport *_fill_bin_import(struct rz_bin_coff_obj *bin, int idx) { return ptr; } -static RzList *entries(RzBinFile *bf) { +static RzList /**/ *entries(RzBinFile *bf) { struct rz_bin_coff_obj *obj = (struct rz_bin_coff_obj *)bf->o->bin_obj; RzList *ret; if (!(ret = rz_list_newf(free))) { @@ -180,7 +180,7 @@ static RzList *entries(RzBinFile *bf) { return ret; } -static RzList *virtual_files(RzBinFile *bf) { +static RzList /**/ *virtual_files(RzBinFile *bf) { RzList *r = rz_list_newf((RzListFree)rz_bin_virtual_file_free); if (!r) { return NULL; @@ -221,7 +221,7 @@ static RzList *virtual_files(RzBinFile *bf) { return r; } -static RzList *maps(RzBinFile *bf) { +static RzList /**/ *maps(RzBinFile *bf) { RzList *ret = rz_list_newf((RzListFree)rz_bin_map_free); if (!ret) { return NULL; @@ -270,7 +270,7 @@ static RzList *maps(RzBinFile *bf) { return ret; } -static RzList *sections(RzBinFile *bf) { +static RzList /**/ *sections(RzBinFile *bf) { struct rz_bin_coff_obj *obj = (struct rz_bin_coff_obj *)bf->o->bin_obj; RzList *ret = rz_list_newf((RzListFree)rz_bin_section_free); if (!ret) { @@ -337,7 +337,7 @@ static void populate_symbols(RzBinFile *bf) { } } -static RzList *symbols(RzBinFile *bf) { +static RzList /**/ *symbols(RzBinFile *bf) { struct rz_bin_coff_obj *obj = (struct rz_bin_coff_obj *)bf->o->bin_obj; RzList *ret = rz_list_newf((RzListFree)rz_bin_symbol_free); if (!ret) { @@ -356,7 +356,7 @@ static RzList *symbols(RzBinFile *bf) { return ret; } -static RzList *imports(RzBinFile *bf) { +static RzList /**/ *imports(RzBinFile *bf) { int i; struct rz_bin_coff_obj *obj = (struct rz_bin_coff_obj *)bf->o->bin_obj; RzList *ret = rz_list_newf((RzListFree)rz_bin_import_free); @@ -376,11 +376,11 @@ static RzList *imports(RzBinFile *bf) { return ret; } -static RzList *libs(RzBinFile *bf) { +static RzList /**/ *libs(RzBinFile *bf) { return NULL; } -static RzList *relocs(RzBinFile *bf) { +static RzList /**/ *relocs(RzBinFile *bf) { populate_symbols(bf); return rz_coff_get_relocs(bf->o->bin_obj); } @@ -494,7 +494,7 @@ static RzBinInfo *info(RzBinFile *bf) { return ret; } -static RzList *fields(RzBinFile *bf) { +static RzList /**/ *fields(RzBinFile *bf) { return NULL; } diff --git a/librz/bin/p/bin_dex.c b/librz/bin/p/bin_dex.c index fffa8754834..dff7c10db58 100644 --- a/librz/bin/p/bin_dex.c +++ b/librz/bin/p/bin_dex.c @@ -68,7 +68,7 @@ static Sdb *get_sdb(RzBinFile *bf) { return bf->sdb; } -static RzList *classes(RzBinFile *bf) { +static RzList /**/ *classes(RzBinFile *bf) { RzBinDex *dex = rz_bin_file_get_dex(bf); if (!dex) { return NULL; @@ -77,7 +77,7 @@ static RzList *classes(RzBinFile *bf) { return rz_bin_dex_classes(dex); } -static RzList *imports(RzBinFile *bf) { +static RzList /**/ *imports(RzBinFile *bf) { RzBinDex *dex = rz_bin_file_get_dex(bf); if (!dex) { return NULL; @@ -86,7 +86,7 @@ static RzList *imports(RzBinFile *bf) { return rz_bin_dex_imports(dex); } -static RzList *sections(RzBinFile *bf) { +static RzList /**/ *sections(RzBinFile *bf) { RzBinDex *dex = rz_bin_file_get_dex(bf); if (!dex) { return NULL; @@ -95,7 +95,7 @@ static RzList *sections(RzBinFile *bf) { return rz_bin_dex_sections(dex); } -static RzList *symbols(RzBinFile *bf) { +static RzList /**/ *symbols(RzBinFile *bf) { RzBinDex *dex = rz_bin_file_get_dex(bf); if (!dex) { return NULL; @@ -104,7 +104,7 @@ static RzList *symbols(RzBinFile *bf) { return rz_bin_dex_symbols(dex); } -static RzList *fields(RzBinFile *bf) { +static RzList /**/ *fields(RzBinFile *bf) { RzBinDex *dex = rz_bin_file_get_dex(bf); if (!dex) { return NULL; @@ -113,7 +113,7 @@ static RzList *fields(RzBinFile *bf) { return rz_bin_dex_fields(dex); } -static RzList *libraries(RzBinFile *bf) { +static RzList /**/ *libraries(RzBinFile *bf) { RzBinDex *dex = rz_bin_file_get_dex(bf); if (!dex) { return NULL; @@ -131,7 +131,7 @@ static RzBinAddr *binsym(RzBinFile *bf, RzBinSpecialSymbol sym) { return rz_bin_dex_resolve_symbol(dex, sym); } -static RzList *entrypoints(RzBinFile *bf) { +static RzList /**/ *entrypoints(RzBinFile *bf) { RzBinDex *dex = rz_bin_file_get_dex(bf); if (!dex) { return NULL; @@ -140,7 +140,7 @@ static RzList *entrypoints(RzBinFile *bf) { return rz_bin_dex_entrypoints(dex); } -static RzList *strings(RzBinFile *bf) { +static RzList /**/ *strings(RzBinFile *bf) { RzBinDex *dex = rz_bin_file_get_dex(bf); if (!dex) { return NULL; @@ -149,7 +149,7 @@ static RzList *strings(RzBinFile *bf) { return rz_bin_dex_strings(dex); } -static RzList *virtual_files(RzBinFile *bf) { +static RzList /**/ *virtual_files(RzBinFile *bf) { RzBinDex *dex = rz_bin_file_get_dex(bf); if (!dex) { return NULL; @@ -223,7 +223,7 @@ static ut64 get_offset(RzBinFile *bf, int type, int index) { } } -static RzList *maps(RzBinFile *bf) { +static RzList /**/ *maps(RzBinFile *bf) { RzList *maps = rz_bin_maps_of_file_sections(bf); RzListIter *iter; RzBinMap *map; diff --git a/librz/bin/p/bin_dmp64.c b/librz/bin/p/bin_dmp64.c index 5d29ca31182..b6c098afacb 100644 --- a/librz/bin/p/bin_dmp64.c +++ b/librz/bin/p/bin_dmp64.c @@ -80,11 +80,11 @@ static void header(RzBinFile *bf) { } } -static RzList *strings(RzBinFile *bf) { +static RzList /**/ *strings(RzBinFile *bf) { return rz_bin_file_strings(bf, 4, false); } -static RzList *fields(RzBinFile *bf) { +static RzList /**/ *fields(RzBinFile *bf) { RzList *fields = rz_list_newf((RzListFree)rz_bin_field_free); struct rz_bin_dmp64_obj_t *obj = (struct rz_bin_dmp64_obj_t *)bf->o->bin_obj; #define FIELD_COMMENT(header, field, comment) \ @@ -185,7 +185,7 @@ static RzBinInfo *info(RzBinFile *bf) { return ret; } -static RzList *maps(RzBinFile *bf) { +static RzList /**/ *maps(RzBinFile *bf) { dmp_page_desc *page; dmp64_triage_datablock *datablock; RzList *ret; @@ -227,7 +227,7 @@ static RzList *maps(RzBinFile *bf) { return ret; } -static RzList *libs(RzBinFile *bf) { +static RzList /**/ *libs(RzBinFile *bf) { struct rz_bin_dmp64_obj_t *obj = (struct rz_bin_dmp64_obj_t *)bf->o->bin_obj; if (!obj->drivers) { return NULL; diff --git a/librz/bin/p/bin_dol.c b/librz/bin/p/bin_dol.c index 6dabc6fca37..8137ff2c20d 100644 --- a/librz/bin/p/bin_dol.c +++ b/librz/bin/p/bin_dol.c @@ -83,7 +83,7 @@ static bool load_buffer(RzBinFile *bf, RzBinObject *obj, RzBuffer *buf, Sdb *sdb return false; } -static RzList *sections(RzBinFile *bf) { +static RzList /**/ *sections(RzBinFile *bf) { rz_return_val_if_fail(bf && bf->o && bf->o->bin_obj, NULL); int i; RzList *ret; @@ -134,7 +134,7 @@ static RzList *sections(RzBinFile *bf) { return ret; } -static RzList *entries(RzBinFile *bf) { +static RzList /**/ *entries(RzBinFile *bf) { rz_return_val_if_fail(bf && bf->o && bf->o->bin_obj, NULL); RzList *ret = rz_list_new(); RzBinAddr *addr = RZ_NEW0(RzBinAddr); diff --git a/librz/bin/p/bin_dyldcache.c b/librz/bin/p/bin_dyldcache.c index 18678a309be..d94a136fd9e 100644 --- a/librz/bin/p/bin_dyldcache.c +++ b/librz/bin/p/bin_dyldcache.c @@ -81,7 +81,7 @@ static bool load_buffer(RzBinFile *bf, RzBinObject *obj, RzBuffer *buf, Sdb *sdb return true; } -static RzList *entries(RzBinFile *bf) { +static RzList /**/ *entries(RzBinFile *bf) { RzBinAddr *ptr = NULL; RzList *ret = rz_list_newf(free); if (!ret) { @@ -133,7 +133,7 @@ static ut64 baddr(RzBinFile *bf) { return 0x180000000; } -void symbols_from_bin(RzDyldCache *cache, RzList *ret, RzBinFile *bf, RzDyldBinImage *bin, SetU *hash) { +void symbols_from_bin(RzDyldCache *cache, RzList /**/ *ret, RzBinFile *bf, RzDyldBinImage *bin, SetU *hash) { struct MACH0_(obj_t) *mach0 = bin_to_mach0(bf, bin); if (!mach0) { return; @@ -190,7 +190,7 @@ static bool __is_data_section(const char *name) { return false; } -static void sections_from_bin(RzList *ret, RzBinFile *bf, RzDyldBinImage *bin) { +static void sections_from_bin(RzList /**/ *ret, RzBinFile *bf, RzDyldBinImage *bin) { RzDyldCache *cache = (RzDyldCache *)bf->o->bin_obj; if (!cache) { return; @@ -237,7 +237,7 @@ static void sections_from_bin(RzList *ret, RzBinFile *bf, RzDyldBinImage *bin) { (mach0); } -static RzList *virtual_files(RzBinFile *bf) { +static RzList /**/ *virtual_files(RzBinFile *bf) { RzList *ret = rz_list_newf((RzListFree)rz_bin_virtual_file_free); if (!ret) { return NULL; @@ -270,7 +270,7 @@ static int prot2perm(int x) { return r; } -static RzList *maps(RzBinFile *bf) { +static RzList /**/ *maps(RzBinFile *bf) { RzDyldCache *cache = (RzDyldCache *)bf->o->bin_obj; if (!cache) { return NULL; @@ -300,7 +300,7 @@ static RzList *maps(RzBinFile *bf) { return ret; } -static RzList *sections(RzBinFile *bf) { +static RzList /**/ *sections(RzBinFile *bf) { RzDyldCache *cache = (RzDyldCache *)bf->o->bin_obj; if (!cache) { return NULL; @@ -324,7 +324,7 @@ static RzList *sections(RzBinFile *bf) { return ret; } -static RzList *symbols(RzBinFile *bf) { +static RzList /**/ *symbols(RzBinFile *bf) { RzDyldCache *cache = (RzDyldCache *)bf->o->bin_obj; if (!cache) { return NULL; @@ -364,7 +364,7 @@ static void destroy(RzBinFile *bf) { rz_dyldcache_free(cache); } -static RzList *classes(RzBinFile *bf) { +static RzList /**/ *classes(RzBinFile *bf) { RzDyldCache *cache = (RzDyldCache *)bf->o->bin_obj; if (!cache) { return NULL; diff --git a/librz/bin/p/bin_elf.inc b/librz/bin/p/bin_elf.inc index 252837e154d..8136dfe25f7 100644 --- a/librz/bin/p/bin_elf.inc +++ b/librz/bin/p/bin_elf.inc @@ -153,7 +153,7 @@ typedef struct rz_bin_reloc_formular_symbols_t { static RzBinInfo *info(RzBinFile *bf); static void patch_relocs(RzBinFile *bf, struct Elf_(rz_bin_elf_obj_t) * bin); -static RzList *imports(RzBinFile *bf); +static RzList /**/ *imports(RzBinFile *bf); struct special_symbol_translation { RzBinSpecialSymbol symbol; @@ -273,7 +273,7 @@ static RzBinAddr *binsym(RzBinFile *bf, RzBinSpecialSymbol sym) { return rz_bin_addr_new_from_paddr(bin, paddr); } -static void add_constructor(ELFOBJ *bin, ut64 addr, ut64 size, int type, RzList *result) { +static void add_constructor(ELFOBJ *bin, ut64 addr, ut64 size, int type, RzList /**/ *result) { ut64 constructor_offset = Elf_(rz_bin_elf_v2p)(bin, addr); if (constructor_offset == UT64_MAX) { return; @@ -309,7 +309,7 @@ static void add_constructor(ELFOBJ *bin, ut64 addr, ut64 size, int type, RzList } } -static void add_constructors(ELFOBJ *bin, RzList *result) { +static void add_constructors(ELFOBJ *bin, RzList /**/ *result) { ut64 addr, size; if (Elf_(rz_bin_elf_get_dt_info)(bin, DT_PREINIT_ARRAY, &addr) && Elf_(rz_bin_elf_get_dt_info)(bin, DT_PREINIT_ARRAYSZ, &size)) { @@ -325,7 +325,7 @@ static void add_constructors(ELFOBJ *bin, RzList *result) { } } -static void add_entry_offset(ELFOBJ *bin, RzList *result) { +static void add_entry_offset(ELFOBJ *bin, RzList /**/ *result) { ut64 paddr = Elf_(rz_bin_elf_get_entry_offset)(bin); if (paddr == UT64_MAX) { return; @@ -346,7 +346,7 @@ static void add_entry_offset(ELFOBJ *bin, RzList *result) { rz_list_append(result, tmp); } -static void add_java_libraries(ELFOBJ *bin, RzList *result) { +static void add_java_libraries(ELFOBJ *bin, RzList /**/ *result) { RzBinElfSymbol *symbol; rz_bin_elf_foreach_symbols(bin, symbol) { if (symbol->name && rz_str_startswith(symbol->name, "Java") && rz_str_endswith(symbol->name, "_init")) { @@ -359,7 +359,7 @@ static void add_java_libraries(ELFOBJ *bin, RzList *result) { } } -static RzList *entries(RzBinFile *bf) { +static RzList /**/ *entries(RzBinFile *bf) { rz_return_val_if_fail(bf && bf->o, NULL); ELFOBJ *bin = rz_bin_file_get_elf(bf); @@ -650,7 +650,7 @@ static ut32 section_perms_from_flags(ut32 flags) { return r; } -static RzList *maps_unpatched(RzBinFile *bf) { +static RzList /**/ *maps_unpatched(RzBinFile *bf) { struct Elf_(rz_bin_elf_obj_t) *obj = (bf && bf->o) ? bf->o->bin_obj : NULL; if (!obj) { return NULL; @@ -1443,7 +1443,7 @@ static void patch_relocs(RzBinFile *bf, ELFOBJ *bin) { rz_buf_sparse_set_write_mode(bin->buf_patched, RZ_BUF_SPARSE_WRITE_MODE_THROUGH); } -static RzList *virtual_files(RzBinFile *bf) { +static RzList /**/ *virtual_files(RzBinFile *bf) { RzList *r = rz_list_newf((RzListFree)rz_bin_virtual_file_free); if (!r) { return NULL; @@ -1484,7 +1484,7 @@ static RzList *virtual_files(RzBinFile *bf) { return r; } -static RzList *maps(RzBinFile *bf) { +static RzList /**/ *maps(RzBinFile *bf) { struct Elf_(rz_bin_elf_obj_t) *obj = (bf && bf->o) ? bf->o->bin_obj : NULL; if (!obj) { return NULL; @@ -1503,7 +1503,7 @@ static RzList *maps(RzBinFile *bf) { return ret; } -static RzList *sections(RzBinFile *bf) { +static RzList /**/ *sections(RzBinFile *bf) { ELFOBJ *obj = (bf && bf->o) ? bf->o->bin_obj : NULL; RzBinSection *ptr = NULL; RzList *ret = NULL; @@ -1630,7 +1630,7 @@ static RzList *sections(RzBinFile *bf) { return ret; } -static RzList *symbols(RzBinFile *bf) { +static RzList /**/ *symbols(RzBinFile *bf) { rz_return_val_if_fail(bf && bf->o && bf->o->bin_obj, NULL); ELFOBJ *bin = bf->o->bin_obj; @@ -1666,7 +1666,7 @@ static RzList *symbols(RzBinFile *bf) { return ret; } -static RzList *imports(RzBinFile *bf) { +static RzList /**/ *imports(RzBinFile *bf) { rz_return_val_if_fail(bf && bf->o, NULL); ELFOBJ *bin = bf->o->bin_obj; @@ -1694,12 +1694,12 @@ static RzList *imports(RzBinFile *bf) { return result; } -static RzList *libs(RzBinFile *bf) { +static RzList /**/ *libs(RzBinFile *bf) { rz_return_val_if_fail(bf && bf->o && bf->o->bin_obj, NULL); return Elf_(rz_bin_elf_get_libs)(bf->o->bin_obj); } -static RzList *relocs(RzBinFile *bf) { +static RzList /**/ *relocs(RzBinFile *bf) { rz_return_val_if_fail(bf && bf->o && bf->o->bin_obj, NULL); RzList *ret = NULL; RzBinReloc *ptr = NULL; @@ -1886,7 +1886,7 @@ static RzBinInfo *info(RzBinFile *bf) { return ret; } -static bool add_fields_aux(ELFOBJ *bin, RzList *result, ut64 offset, size_t size, const char *name, char *(get_value)(ELFOBJ *bin), const char *fmt) { +static bool add_fields_aux(ELFOBJ *bin, RzList /**/ *result, ut64 offset, size_t size, const char *name, char *(get_value)(ELFOBJ *bin), const char *fmt) { char *value = get_value(bin); if (!value) { return false; @@ -1908,7 +1908,7 @@ static bool add_fields_aux(ELFOBJ *bin, RzList *result, ut64 offset, size_t size return true; } -static bool add_fields(ELFOBJ *bin, RzList *result) { +static bool add_fields(ELFOBJ *bin, RzList /**/ *result) { size_t size = bin->ehdr.e_ident[EI_CLASS] == ELFCLASS64 ? 8 : 4; return add_fields_aux(bin, result, E_IDENT_OFFSET, 16, "MAGIC", Elf_(rz_bin_elf_get_e_indent_as_string), "x") && @@ -1927,7 +1927,7 @@ static bool add_fields(ELFOBJ *bin, RzList *result) { add_fields_aux(bin, result, E_SHSTRNDX_OFFSET, 2, "ShStrndx", Elf_(rz_bin_elf_get_e_shstrndx_as_string), "d"); } -static RzList *fields(RzBinFile *bf) { +static RzList /**/ *fields(RzBinFile *bf) { rz_return_val_if_fail(bf && bf->o && bf->o->bin_obj, NULL); ELFOBJ *bin = rz_bin_file_get_elf(bf); @@ -1962,6 +1962,6 @@ static ut64 size(RzBinFile *bf) { return off + len; } -static RzList *strings(RzBinFile *bf) { +static RzList /**/ *strings(RzBinFile *bf) { return rz_bin_file_strings(bf, 4, false); } diff --git a/librz/bin/p/bin_java.c b/librz/bin/p/bin_java.c index cf3a3d04e99..3291ae398b8 100644 --- a/librz/bin/p/bin_java.c +++ b/librz/bin/p/bin_java.c @@ -78,7 +78,7 @@ static void free_rz_bin_class(void /*RzBinClass*/ *k) { } } -static RzList *classes(RzBinFile *bf) { +static RzList /**/ *classes(RzBinFile *bf) { RzBinClass *bclass = NULL; RzList *classes = NULL; RzBinJavaClass *jclass = rz_bin_file_get_java_class(bf); @@ -113,7 +113,7 @@ static RzList *classes(RzBinFile *bf) { return classes; } -static RzList *imports(RzBinFile *bf) { +static RzList /**/ *imports(RzBinFile *bf) { RzBinJavaClass *jclass = rz_bin_file_get_java_class(bf); if (!jclass) { return NULL; @@ -122,7 +122,7 @@ static RzList *imports(RzBinFile *bf) { return rz_bin_java_class_const_pool_as_imports(jclass); } -static RzList *sections(RzBinFile *bf) { +static RzList /**/ *sections(RzBinFile *bf) { RzBinJavaClass *jclass = rz_bin_file_get_java_class(bf); if (!jclass) { return NULL; @@ -131,7 +131,7 @@ static RzList *sections(RzBinFile *bf) { return rz_bin_java_class_as_sections(jclass); } -static RzList *symbols(RzBinFile *bf) { +static RzList /**/ *symbols(RzBinFile *bf) { RzList *tmp; RzBinJavaClass *jclass = rz_bin_file_get_java_class(bf); if (!jclass) { @@ -153,7 +153,7 @@ static RzList *symbols(RzBinFile *bf) { return list; } -static RzList *fields(RzBinFile *bf) { +static RzList /**/ *fields(RzBinFile *bf) { RzBinJavaClass *jclass = rz_bin_file_get_java_class(bf); if (!jclass) { return NULL; @@ -162,7 +162,7 @@ static RzList *fields(RzBinFile *bf) { return rz_bin_java_class_fields_as_binfields(jclass); } -static RzList *libs(RzBinFile *bf) { +static RzList /**/ *libs(RzBinFile *bf) { RzBinJavaClass *jclass = rz_bin_file_get_java_class(bf); if (!jclass) { return NULL; @@ -180,7 +180,7 @@ static RzBinAddr *binsym(RzBinFile *bf, RzBinSpecialSymbol sym) { return rz_bin_java_class_resolve_symbol(jclass, sym); } -static RzList *entrypoints(RzBinFile *bf) { +static RzList /**/ *entrypoints(RzBinFile *bf) { RzBinJavaClass *jclass = rz_bin_file_get_java_class(bf); if (!jclass) { return NULL; @@ -189,7 +189,7 @@ static RzList *entrypoints(RzBinFile *bf) { return rz_bin_java_class_entrypoints(jclass); } -static RzList *strings(RzBinFile *bf) { +static RzList /**/ *strings(RzBinFile *bf) { RzBinJavaClass *jclass = rz_bin_file_get_java_class(bf); if (!jclass) { return NULL; diff --git a/librz/bin/p/bin_le.c b/librz/bin/p/bin_le.c index 79f2ec68b60..e17fa6f0a11 100644 --- a/librz/bin/p/bin_le.c +++ b/librz/bin/p/bin_le.c @@ -107,27 +107,27 @@ static void header(RzBinFile *bf) { p("Stack Size: 0x%04x\n", h->stacksize); } -static RzList *sections(RzBinFile *bf) { +static RzList /**/ *sections(RzBinFile *bf) { return rz_bin_le_get_sections(bf->o->bin_obj); } -static RzList *entries(RzBinFile *bf) { +static RzList /**/ *entries(RzBinFile *bf) { return rz_bin_le_get_entrypoints(bf->o->bin_obj); } -static RzList *symbols(RzBinFile *bf) { +static RzList /**/ *symbols(RzBinFile *bf) { return rz_bin_le_get_symbols(bf->o->bin_obj); } -static RzList *imports(RzBinFile *bf) { +static RzList /**/ *imports(RzBinFile *bf) { return rz_bin_le_get_imports(bf->o->bin_obj); } -static RzList *libs(RzBinFile *bf) { +static RzList /**/ *libs(RzBinFile *bf) { return rz_bin_le_get_libs(bf->o->bin_obj); } -static RzList *relocs(RzBinFile *bf) { +static RzList /**/ *relocs(RzBinFile *bf) { return rz_bin_le_get_relocs(bf->o->bin_obj); } @@ -149,7 +149,7 @@ static RzBinInfo *info(RzBinFile *bf) { return info; } -static RzList *strings(RzBinFile *bf) { +static RzList /**/ *strings(RzBinFile *bf) { return rz_bin_file_strings(bf, 0, false); } diff --git a/librz/bin/p/bin_luac.c b/librz/bin/p/bin_luac.c index 508d8c6fdb8..4681c4e847c 100644 --- a/librz/bin/p/bin_luac.c +++ b/librz/bin/p/bin_luac.c @@ -83,7 +83,7 @@ static RzBinInfo *info(RzBinFile *bf) { return bin_info_obj->general_info; } -static RzList *sections(RzBinFile *bf) { +static RzList /**/ *sections(RzBinFile *bf) { if (!bf) { return NULL; } @@ -95,7 +95,7 @@ static RzList *sections(RzBinFile *bf) { return rz_list_clone(bin_info_obj->section_list); } -static RzList *symbols(RzBinFile *bf) { +static RzList /**/ *symbols(RzBinFile *bf) { if (!bf) { return NULL; } @@ -107,7 +107,7 @@ static RzList *symbols(RzBinFile *bf) { return rz_list_clone(bin_info_obj->symbol_list); } -static RzList *entries(RzBinFile *bf) { +static RzList /**/ *entries(RzBinFile *bf) { if (!bf) { return NULL; } @@ -119,7 +119,7 @@ static RzList *entries(RzBinFile *bf) { return rz_list_clone(bin_info_obj->entry_list); } -static RzList *strings(RzBinFile *bf) { +static RzList /**/ *strings(RzBinFile *bf) { if (!bf) { return NULL; } diff --git a/librz/bin/p/bin_mach0.c b/librz/bin/p/bin_mach0.c index 7229f159afe..9976b6821f9 100644 --- a/librz/bin/p/bin_mach0.c +++ b/librz/bin/p/bin_mach0.c @@ -64,15 +64,15 @@ static ut64 baddr(RzBinFile *bf) { return MACH0_(get_baddr)(bin); } -static RzList *virtual_files(RzBinFile *bf) { +static RzList /**/ *virtual_files(RzBinFile *bf) { return MACH0_(get_virtual_files)(bf); } -static RzList *maps(RzBinFile *bf) { +static RzList /**/ *maps(RzBinFile *bf) { return MACH0_(get_maps)(bf); } -static RzList *sections(RzBinFile *bf) { +static RzList /**/ *sections(RzBinFile *bf) { return MACH0_(get_segments)(bf); } @@ -93,7 +93,7 @@ static RzBinAddr *newEntry(ut64 hpaddr, ut64 paddr, int type, int bits) { return ptr; } -static void process_constructors(RzBinFile *bf, RzList *ret, int bits) { +static void process_constructors(RzBinFile *bf, RzList /**/ *ret, int bits) { RzList *secs = sections(bf); RzListIter *iter; RzBinSection *sec; @@ -137,7 +137,7 @@ static void process_constructors(RzBinFile *bf, RzList *ret, int bits) { } } -static RzList *entries(RzBinFile *bf) { +static RzList /**/ *entries(RzBinFile *bf) { rz_return_val_if_fail(bf && bf->o, NULL); RzBinAddr *ptr = NULL; @@ -184,7 +184,7 @@ static void _handle_arm_thumb(struct MACH0_(obj_t) * bin, RzBinSymbol **p) { } } -static RzList *symbols(RzBinFile *bf) { +static RzList /**/ *symbols(RzBinFile *bf) { struct MACH0_(obj_t) * bin; int i; const struct symbol_t *syms = NULL; @@ -334,7 +334,7 @@ static RzBinImport *import_from_name(RzBin *rbin, const char *orig_name, HtPP *i return ptr; } -static RzList *imports(RzBinFile *bf) { +static RzList /**/ *imports(RzBinFile *bf) { RzBinObject *obj = bf ? bf->o : NULL; struct MACH0_(obj_t) *bin = bf ? bf->o->bin_obj : NULL; const char *name; @@ -380,7 +380,7 @@ static RzList *imports(RzBinFile *bf) { return ret; } -static RzList *relocs(RzBinFile *bf) { +static RzList /**/ *relocs(RzBinFile *bf) { RzList *ret = NULL; struct MACH0_(obj_t) *bin = NULL; RzBinObject *obj = bf ? bf->o : NULL; @@ -428,7 +428,7 @@ static RzList *relocs(RzBinFile *bf) { return ret; } -static RzList *libs(RzBinFile *bf) { +static RzList /**/ *libs(RzBinFile *bf) { int i; char *ptr = NULL; struct lib_t *libs; @@ -495,7 +495,7 @@ static RzBinInfo *info(RzBinFile *bf) { return ret; } -static RzList *classes(RzBinFile *bf) { +static RzList /**/ *classes(RzBinFile *bf) { return MACH0_(parse_classes)(bf, NULL); } @@ -821,7 +821,7 @@ static ut64 size(RzBinFile *bf) { return off + len; } -static RzList *strings(RzBinFile *bf) { +static RzList /**/ *strings(RzBinFile *bf) { return rz_bin_file_strings(bf, 4, false); } diff --git a/librz/bin/p/bin_mach064.c b/librz/bin/p/bin_mach064.c index f4dfddc8ef2..cf0d635c925 100644 --- a/librz/bin/p/bin_mach064.c +++ b/librz/bin/p/bin_mach064.c @@ -287,7 +287,7 @@ static RzBinAddr *binsym(RzBinFile *bf, RzBinSpecialSymbol sym) { return ret; } -static RzList *strings(RzBinFile *bf) { +static RzList /**/ *strings(RzBinFile *bf) { return rz_bin_file_strings(bf, 4, false); } diff --git a/librz/bin/p/bin_mbn.c b/librz/bin/p/bin_mbn.c index 6fffce48514..ccaa9f57d8f 100644 --- a/librz/bin/p/bin_mbn.c +++ b/librz/bin/p/bin_mbn.c @@ -83,7 +83,7 @@ static ut64 baddr(RzBinFile *bf) { return sb.vaddr; // XXX } -static RzList *entries(RzBinFile *bf) { +static RzList /**/ *entries(RzBinFile *bf) { RzList *ret = rz_list_newf(free); ; if (ret) { @@ -97,7 +97,7 @@ static RzList *entries(RzBinFile *bf) { return ret; } -static RzList *sections(RzBinFile *bf) { +static RzList /**/ *sections(RzBinFile *bf) { RzBinSection *ptr = NULL; RzList *ret = NULL; int rc; diff --git a/librz/bin/p/bin_mdmp.c b/librz/bin/p/bin_mdmp.c index 6fc1093d68a..5d8c00eae94 100644 --- a/librz/bin/p/bin_mdmp.c +++ b/librz/bin/p/bin_mdmp.c @@ -20,7 +20,7 @@ static void destroy(RzBinFile *bf) { rz_bin_mdmp_free((struct rz_bin_mdmp_obj *)bf->o->bin_obj); } -static RzList *entries(RzBinFile *bf) { +static RzList /**/ *entries(RzBinFile *bf) { struct rz_bin_mdmp_obj *obj; struct Pe32_rz_bin_mdmp_pe_bin *pe32_bin; struct Pe64_rz_bin_mdmp_pe_bin *pe64_bin; @@ -121,7 +121,7 @@ static RzBinInfo *info(RzBinFile *bf) { return ret; } -static RzList *libs(RzBinFile *bf) { +static RzList /**/ *libs(RzBinFile *bf) { char *ptr = NULL; int i; struct rz_bin_mdmp_obj *obj; @@ -176,7 +176,7 @@ static bool load_buffer(RzBinFile *bf, RzBinObject *obj, RzBuffer *buf, Sdb *sdb return false; } -static RzList *maps(RzBinFile *bf) { +static RzList /**/ *maps(RzBinFile *bf) { struct rz_bin_mdmp_obj *obj = (struct rz_bin_mdmp_obj *)bf->o->bin_obj; RzList *ret = rz_list_newf((RzListFree)rz_bin_map_free); if (!ret) { @@ -219,7 +219,7 @@ static RzList *maps(RzBinFile *bf) { return ret; } -static RzList *sections(RzBinFile *bf) { +static RzList /**/ *sections(RzBinFile *bf) { struct minidump_module *module; struct minidump_string *str; struct rz_bin_mdmp_obj *obj; @@ -297,7 +297,7 @@ static RzList *sections(RzBinFile *bf) { return ret; } -static RzList *mem(RzBinFile *bf) { +static RzList /**/ *mem(RzBinFile *bf) { struct minidump_location_descriptor *location = NULL; struct minidump_memory_descriptor *module; struct minidump_memory_descriptor64 *module64; @@ -368,7 +368,7 @@ static RzList *mem(RzBinFile *bf) { return ret; } -static RzList *relocs(RzBinFile *bf) { +static RzList /**/ *relocs(RzBinFile *bf) { struct rz_bin_mdmp_obj *obj; struct Pe32_rz_bin_mdmp_pe_bin *pe32_bin; struct Pe64_rz_bin_mdmp_pe_bin *pe64_bin; @@ -395,7 +395,7 @@ static RzList *relocs(RzBinFile *bf) { return ret; } -static RzList *imports(RzBinFile *bf) { +static RzList /**/ *imports(RzBinFile *bf) { struct rz_bin_mdmp_obj *obj; struct Pe32_rz_bin_mdmp_pe_bin *pe32_bin; struct Pe64_rz_bin_mdmp_pe_bin *pe64_bin; @@ -426,7 +426,7 @@ static RzList *imports(RzBinFile *bf) { return ret; } -static RzList *symbols(RzBinFile *bf) { +static RzList /**/ *symbols(RzBinFile *bf) { struct rz_bin_mdmp_obj *obj; struct Pe32_rz_bin_mdmp_pe_bin *pe32_bin; struct Pe64_rz_bin_mdmp_pe_bin *pe64_bin; @@ -460,7 +460,7 @@ static bool check_buffer(RzBuffer *b) { return false; } -static RzList *strings(RzBinFile *bf) { +static RzList /**/ *strings(RzBinFile *bf) { return rz_bin_file_strings(bf, 0, false); } diff --git a/librz/bin/p/bin_menuet.c b/librz/bin/p/bin_menuet.c index 6d5eb486a59..6df10db296c 100644 --- a/librz/bin/p/bin_menuet.c +++ b/librz/bin/p/bin_menuet.c @@ -84,7 +84,7 @@ static ut64 menuetEntry(const ut8 *buf, int buf_size) { return UT64_MAX; } -static RzList *entries(RzBinFile *bf) { +static RzList /**/ *entries(RzBinFile *bf) { RzList *ret; ut8 buf[64] = { 0 }; RzBinAddr *ptr = NULL; @@ -107,7 +107,7 @@ static RzList *entries(RzBinFile *bf) { return ret; } -static RzList *sections(RzBinFile *bf) { +static RzList /**/ *sections(RzBinFile *bf) { RzList *ret = NULL; RzBinSection *ptr = NULL; ut8 buf[64] = { 0 }; diff --git a/librz/bin/p/bin_mz.c b/librz/bin/p/bin_mz.c index 27128db8586..ab0ceea1cf2 100644 --- a/librz/bin/p/bin_mz.c +++ b/librz/bin/p/bin_mz.c @@ -149,7 +149,7 @@ static RzBinAddr *binsym(RzBinFile *bf, RzBinSpecialSymbol type) { return mzaddr; } -static RzList *entries(RzBinFile *bf) { +static RzList /**/ *entries(RzBinFile *bf) { RzBinAddr *ptr = NULL; RzList *res = NULL; if (!(res = rz_list_newf(free))) { @@ -162,7 +162,7 @@ static RzList *entries(RzBinFile *bf) { return res; } -static RzList *sections(RzBinFile *bf) { +static RzList /**/ *sections(RzBinFile *bf) { return rz_bin_mz_get_segments(bf->o->bin_obj); } @@ -224,7 +224,7 @@ static void header(RzBinFile *bf) { mz->dos_header->overlay_number); } -static RzList *relocs(RzBinFile *bf) { +static RzList /**/ *relocs(RzBinFile *bf) { RzList *ret = NULL; RzBinReloc *rel = NULL; const struct rz_bin_mz_reloc_t *relocs = NULL; diff --git a/librz/bin/p/bin_ne.c b/librz/bin/p/bin_ne.c index 41b51060f33..a3652ef17c4 100644 --- a/librz/bin/p/bin_ne.c +++ b/librz/bin/p/bin_ne.c @@ -95,23 +95,23 @@ RzBinInfo *info(RzBinFile *bf) { return i; } -RzList *entries(RzBinFile *bf) { +RzList /**/ *entries(RzBinFile *bf) { return rz_bin_ne_get_entrypoints(bf->o->bin_obj); } -RzList *symbols(RzBinFile *bf) { +RzList /**/ *symbols(RzBinFile *bf) { return rz_bin_ne_get_symbols(bf->o->bin_obj); } -RzList *imports(RzBinFile *bf) { +RzList /**/ *imports(RzBinFile *bf) { return rz_bin_ne_get_imports(bf->o->bin_obj); } -RzList *sections(RzBinFile *bf) { +RzList /**/ *sections(RzBinFile *bf) { return rz_bin_ne_get_segments(bf->o->bin_obj); } -RzList *relocs(RzBinFile *bf) { +RzList /**/ *relocs(RzBinFile *bf) { return rz_bin_ne_get_relocs(bf->o->bin_obj); } diff --git a/librz/bin/p/bin_nes.c b/librz/bin/p/bin_nes.c index e222dd88cb6..7ac84a00595 100644 --- a/librz/bin/p/bin_nes.c +++ b/librz/bin/p/bin_nes.c @@ -40,7 +40,7 @@ static RzBinInfo *info(RzBinFile *bf) { return ret; } -static void addsym(RzList *ret, const char *name, ut64 addr, ut32 size) { +static void addsym(RzList /**/ *ret, const char *name, ut64 addr, ut32 size) { RzBinSymbol *ptr = RZ_NEW0(RzBinSymbol); if (!ptr) { return; @@ -52,7 +52,7 @@ static void addsym(RzList *ret, const char *name, ut64 addr, ut32 size) { rz_list_append(ret, ptr); } -static RzList *symbols(RzBinFile *bf) { +static RzList /**/ *symbols(RzBinFile *bf) { RzList *ret = NULL; if (!(ret = rz_list_newf((RzListFree)rz_bin_symbol_free))) { return NULL; @@ -82,7 +82,7 @@ static RzList *symbols(RzBinFile *bf) { return ret; } -static RzList *sections(RzBinFile *bf) { +static RzList /**/ *sections(RzBinFile *bf) { RzList *ret = NULL; RzBinSection *ptr = NULL; ines_hdr ihdr; @@ -121,7 +121,7 @@ static RzList *sections(RzBinFile *bf) { return ret; } -static RzList *mem(RzBinFile *bf) { +static RzList /**/ *mem(RzBinFile *bf) { RzList *ret; RzBinMem *m, *n; if (!(ret = rz_list_new())) { @@ -200,7 +200,7 @@ static RzList *mem(RzBinFile *bf) { return ret; } -static RzList *entries(RzBinFile *bf) { // Should be 3 offsets pointed by NMI, RESET, IRQ after mapping && default = 1st CHR +static RzList /**/ *entries(RzBinFile *bf) { // Should be 3 offsets pointed by NMI, RESET, IRQ after mapping && default = 1st CHR RzList *ret; RzBinAddr *ptr = NULL; if (!(ret = rz_list_new())) { diff --git a/librz/bin/p/bin_nin3ds.c b/librz/bin/p/bin_nin3ds.c index 7269d18a4cc..17639de0ef7 100644 --- a/librz/bin/p/bin_nin3ds.c +++ b/librz/bin/p/bin_nin3ds.c @@ -25,7 +25,7 @@ static bool load_buffer(RzBinFile *bf, RzBinObject *obj, RzBuffer *b, Sdb *sdb) return false; } -static RzList *sections(RzBinFile *bf) { +static RzList /**/ *sections(RzBinFile *bf) { RzList *ret = NULL; RzBinSection *sections[4] = { NULL, NULL, NULL, NULL @@ -76,7 +76,7 @@ static RzList *sections(RzBinFile *bf) { return ret; } -static RzList *entries(RzBinFile *bf) { +static RzList /**/ *entries(RzBinFile *bf) { RzList *ret = rz_list_new(); RzBinAddr *ptr9 = NULL, *ptr11 = NULL; diff --git a/librz/bin/p/bin_ninds.c b/librz/bin/p/bin_ninds.c index e8609e829c0..a525e103dac 100644 --- a/librz/bin/p/bin_ninds.c +++ b/librz/bin/p/bin_ninds.c @@ -40,7 +40,7 @@ static ut64 boffset(RzBinFile *bf) { return 0LL; } -static RzList *sections(RzBinFile *bf) { +static RzList /**/ *sections(RzBinFile *bf) { RzList *ret = NULL; RzBinSection *ptr9 = NULL, *ptr7 = NULL; @@ -76,7 +76,7 @@ static RzList *sections(RzBinFile *bf) { return ret; } -static RzList *entries(RzBinFile *bf) { +static RzList /**/ *entries(RzBinFile *bf) { RzList *ret = rz_list_new(); RzBinAddr *ptr9 = NULL, *ptr7 = NULL; diff --git a/librz/bin/p/bin_ningb.c b/librz/bin/p/bin_ningb.c index 45b066834fa..db7ed339102 100644 --- a/librz/bin/p/bin_ningb.c +++ b/librz/bin/p/bin_ningb.c @@ -41,7 +41,7 @@ static RzBinAddr *binsym(RzBinFile *bf, RzBinSpecialSymbol type) { return NULL; } -static RzList *entries(RzBinFile *bf) { +static RzList /**/ *entries(RzBinFile *bf) { RzList *ret = rz_list_new(); RzBinAddr *ptr = NULL; @@ -59,7 +59,7 @@ static RzList *entries(RzBinFile *bf) { return ret; } -static RzList *sections(RzBinFile *bf) { +static RzList /**/ *sections(RzBinFile *bf) { if (!bf || !bf->buf) { return NULL; } @@ -82,7 +82,7 @@ static RzList *sections(RzBinFile *bf) { return ret; } -static RzList *symbols(RzBinFile *bf) { +static RzList /**/ *symbols(RzBinFile *bf) { RzList *ret = NULL; RzBinSymbol *ptr[13]; int i; @@ -178,7 +178,7 @@ static RzBinInfo *info(RzBinFile *bf) { return ret; } -RzList *mem(RzBinFile *bf) { +RzList /**/ *mem(RzBinFile *bf) { RzList *ret; RzBinMem *m, *n; if (!(ret = rz_list_new())) { diff --git a/librz/bin/p/bin_ningba.c b/librz/bin/p/bin_ningba.c index fb7397baa65..b7e603e0a7e 100644 --- a/librz/bin/p/bin_ningba.c +++ b/librz/bin/p/bin_ningba.c @@ -19,7 +19,7 @@ static bool load_buffer(RzBinFile *bf, RzBinObject *obj, RzBuffer *buf, Sdb *sdb return check_buffer(buf); } -static RzList *entries(RzBinFile *bf) { +static RzList /**/ *entries(RzBinFile *bf) { RzList *ret = rz_list_newf(free); RzBinAddr *ptr = NULL; @@ -63,7 +63,7 @@ static RzBinInfo *info(RzBinFile *bf) { return ret; } -static RzList *sections(RzBinFile *bf) { +static RzList /**/ *sections(RzBinFile *bf) { RzList *ret = NULL; RzBinSection *s = RZ_NEW0(RzBinSection); if (!s) { diff --git a/librz/bin/p/bin_nro.c b/librz/bin/p/bin_nro.c index d2a74f7b67a..5f99b04ab52 100644 --- a/librz/bin/p/bin_nro.c +++ b/librz/bin/p/bin_nro.c @@ -63,7 +63,6 @@ static bool load_buffer(RzBinFile *bf, RzBinObject *obj, RzBuffer *b, Sdb *sdb) ut64 ba = baddr(bf); bin->methods_list = rz_list_newf((RzListFree)rz_bin_symbol_free); bin->imports_list = rz_list_newf((RzListFree)rz_bin_import_free); - bin->classes_list = rz_list_newf((RzListFree)free); parseMod(b, bin, mod0, ba); obj->bin_obj = bin; @@ -74,7 +73,7 @@ static RzBinAddr *binsym(RzBinFile *bf, RzBinSpecialSymbol type) { return NULL; // TODO } -static RzList *entries(RzBinFile *bf) { +static RzList /**/ *entries(RzBinFile *bf) { RzList *ret; RzBinAddr *ptr = NULL; if (!(ret = rz_list_new())) { @@ -101,7 +100,7 @@ static Sdb *get_sdb(RzBinFile *bf) { return kv; } -static RzList *maps(RzBinFile *bf) { +static RzList /**/ *maps(RzBinFile *bf) { RzBuffer *b = bf->buf; RzList *ret = rz_list_newf((RzListFree)rz_bin_map_free); if (!ret) { @@ -209,7 +208,7 @@ static RzList *maps(RzBinFile *bf) { return ret; } -static RzList *sections(RzBinFile *bf) { +static RzList /**/ *sections(RzBinFile *bf) { RzList *ret = NULL; RzBinSection *ptr = NULL; if (!(ret = rz_list_newf((RzListFree)rz_bin_section_free))) { @@ -269,7 +268,7 @@ static RzList *sections(RzBinFile *bf) { return ret; } -static RzList *symbols(RzBinFile *bf) { +static RzList /**/ *symbols(RzBinFile *bf) { RzBinNXOObj *bin; if (!bf || !bf->o || !bf->o->bin_obj) { return NULL; @@ -278,7 +277,7 @@ static RzList *symbols(RzBinFile *bf) { return bin->methods_list; } -static RzList *imports(RzBinFile *bf) { +static RzList /**/ *imports(RzBinFile *bf) { RzBinNXOObj *bin; if (!bf || !bf->o || !bf->o->bin_obj) { return NULL; @@ -287,7 +286,7 @@ static RzList *imports(RzBinFile *bf) { return bin->imports_list; } -static RzList *libs(RzBinFile *bf) { +static RzList /**/ *libs(RzBinFile *bf) { return NULL; } diff --git a/librz/bin/p/bin_nso.c b/librz/bin/p/bin_nso.c index ecfaeda2630..2b0569c9e2a 100644 --- a/librz/bin/p/bin_nso.c +++ b/librz/bin/p/bin_nso.c @@ -191,7 +191,7 @@ static RzBinAddr *binsym(RzBinFile *bf, RzBinSpecialSymbol type) { return NULL; // TODO } -static RzList *entries(RzBinFile *bf) { +static RzList /**/ *entries(RzBinFile *bf) { RzList *ret; RzBuffer *b = bf->buf; @@ -241,7 +241,7 @@ static Sdb *get_sdb(RzBinFile *bf) { return kv; } -static RzList *virtual_files(RzBinFile *bf) { +static RzList /**/ *virtual_files(RzBinFile *bf) { RzList *ret = rz_list_newf((RzListFree)rz_bin_virtual_file_free); if (!ret) { return NULL; @@ -260,7 +260,7 @@ static RzList *virtual_files(RzBinFile *bf) { return ret; } -static RzList *maps(RzBinFile *bf) { +static RzList /**/ *maps(RzBinFile *bf) { RzList *ret = rz_list_newf((RzListFree)rz_bin_map_free); if (!ret) { return NULL; @@ -310,7 +310,7 @@ static RzList *maps(RzBinFile *bf) { return ret; } -static RzList *sections(RzBinFile *bf) { +static RzList /**/ *sections(RzBinFile *bf) { RzList *ret = NULL; RzBinSection *ptr = NULL; RzBuffer *b = bf->buf; diff --git a/librz/bin/p/bin_omf.c b/librz/bin/p/bin_omf.c index d348ea824d3..77657d2c429 100644 --- a/librz/bin/p/bin_omf.c +++ b/librz/bin/p/bin_omf.c @@ -67,7 +67,7 @@ static ut64 baddr(RzBinFile *bf) { return OMF_BASE_ADDR; } -static RzList *entries(RzBinFile *bf) { +static RzList /**/ *entries(RzBinFile *bf) { RzList *ret; RzBinAddr *addr; @@ -86,7 +86,7 @@ static RzList *entries(RzBinFile *bf) { return ret; } -static RzList *sections(RzBinFile *bf) { +static RzList /**/ *sections(RzBinFile *bf) { RzList *ret; ut32 ct_omf_sect = 0; @@ -108,7 +108,7 @@ static RzList *sections(RzBinFile *bf) { return ret; } -static RzList *symbols(RzBinFile *bf) { +static RzList /**/ *symbols(RzBinFile *bf) { RzList *ret; RzBinSymbol *sym; OMF_symbol *sym_omf; diff --git a/librz/bin/p/bin_p9.c b/librz/bin/p/bin_p9.c index 3e8430ddd07..359978f90c2 100644 --- a/librz/bin/p/bin_p9.c +++ b/librz/bin/p/bin_p9.c @@ -28,7 +28,7 @@ static RzBinAddr *binsym(RzBinFile *bf, RzBinSpecialSymbol type) { return NULL; // TODO } -static RzList *entries(RzBinFile *bf) { +static RzList /**/ *entries(RzBinFile *bf) { RzList *ret; RzBinAddr *ptr = NULL; @@ -44,7 +44,7 @@ static RzList *entries(RzBinFile *bf) { return ret; } -static RzList *sections(RzBinFile *bf) { +static RzList /**/ *sections(RzBinFile *bf) { RzList *ret = NULL; RzBinSection *ptr = NULL; if (!bf->o->info) { @@ -155,16 +155,16 @@ static RzList *sections(RzBinFile *bf) { return ret; } -static RzList *symbols(RzBinFile *bf) { +static RzList /**/ *symbols(RzBinFile *bf) { // TODO: parse symbol table return NULL; } -static RzList *imports(RzBinFile *bf) { +static RzList /**/ *imports(RzBinFile *bf) { return NULL; } -static RzList *libs(RzBinFile *bf) { +static RzList /**/ *libs(RzBinFile *bf) { return NULL; } diff --git a/librz/bin/p/bin_pe.c b/librz/bin/p/bin_pe.c index ef4736e3ae0..96dcbb6ed7c 100644 --- a/librz/bin/p/bin_pe.c +++ b/librz/bin/p/bin_pe.c @@ -129,7 +129,7 @@ static char *signature(RzBinFile *bf, bool json) { return rz_pkcs7_cms_to_string(bin->cms); } -static RzList *fields(RzBinFile *bf) { +static RzList /**/ *fields(RzBinFile *bf) { RzList *ret = rz_list_newf((RzListFree)rz_bin_field_free); if (!ret) { return NULL; diff --git a/librz/bin/p/bin_pe.inc b/librz/bin/p/bin_pe.inc index 64460bb5b85..c5f6d853270 100644 --- a/librz/bin/p/bin_pe.inc +++ b/librz/bin/p/bin_pe.inc @@ -60,7 +60,7 @@ static RzBinAddr *binsym(RzBinFile *bf, RzBinSpecialSymbol type) { return ret; } -static void add_tls_callbacks(RzBinFile *bf, RzList *list) { +static void add_tls_callbacks(RzBinFile *bf, RzList /**/ *list) { PE_DWord paddr, vaddr, haddr; int count = 0; RzBinAddr *ptr = NULL; @@ -96,7 +96,7 @@ static void add_tls_callbacks(RzBinFile *bf, RzList *list) { } while (vaddr); } -static RzList *entries(RzBinFile *bf) { +static RzList /**/ *entries(RzBinFile *bf) { struct rz_bin_pe_addr_t *entry = NULL; RzBinAddr *ptr = NULL; RzList *ret; @@ -139,7 +139,7 @@ static ut32 perm_of_section_perm(ut64 perm) { return r; } -static RzList *maps(RzBinFile *bf) { +static RzList /**/ *maps(RzBinFile *bf) { struct PE_(rz_bin_pe_obj_t) *bin = (struct PE_(rz_bin_pe_obj_t) *)bf->o->bin_obj; struct rz_bin_pe_section_t *sections = NULL; if (!bin || !(sections = bin->sections)) { @@ -194,7 +194,7 @@ static RzList *maps(RzBinFile *bf) { return ret; } -static RzList *sections(RzBinFile *bf) { +static RzList /**/ *sections(RzBinFile *bf) { RzList *ret = NULL; RzBinSection *ptr = NULL; struct rz_bin_pe_section_t *sections = NULL; @@ -307,7 +307,7 @@ static ut64 find_go_pclntab(RzBinFile *bf, ut32 *size, ut64 *vaddr) { return 0; } -static RzList *symbols(RzBinFile *bf) { +static RzList /**/ *symbols(RzBinFile *bf) { RzList *ret = NULL; ut64 go_pclntab_paddr = 0; ut64 go_pclntab_vaddr = 0; @@ -405,7 +405,7 @@ static void filter_import(ut8 *n) { } } -static RzList *imports(RzBinFile *bf) { +static RzList /**/ *imports(RzBinFile *bf) { RzList *relocs = NULL; RzBinImport *ptr = NULL; RzBinReloc *rel = NULL; @@ -473,7 +473,7 @@ static RzList *imports(RzBinFile *bf) { return ret; } -static RzList *relocs(RzBinFile *bf) { +static RzList /**/ *relocs(RzBinFile *bf) { struct PE_(rz_bin_pe_obj_t) *obj = bf->o->bin_obj; if (obj) { return obj->relocs; @@ -481,7 +481,7 @@ static RzList *relocs(RzBinFile *bf) { return NULL; } -static RzList *libs(RzBinFile *bf) { +static RzList /**/ *libs(RzBinFile *bf) { struct rz_bin_pe_lib_t *libs = NULL; RzList *ret = NULL; char *ptr = NULL; @@ -502,7 +502,7 @@ static RzList *libs(RzBinFile *bf) { return ret; } -static RzList *resources(RzBinFile *bf) { +static RzList /**/ *resources(RzBinFile *bf) { struct PE_(rz_bin_pe_obj_t) *obj = bf->o->bin_obj; if (!obj) { return NULL; @@ -711,7 +711,7 @@ static ut64 get_vaddr(RzBinFile *bf, ut64 baddr, ut64 paddr, ut64 vaddr) { return baddr + vaddr; } -static RzList *compute_hashes(RzBinFile *bf) { +static RzList /**/ *compute_hashes(RzBinFile *bf) { RzList *file_hashes = rz_list_newf((RzListFree)rz_bin_file_hash_free); const char *authentihash = PE_(bin_pe_get_authentihash)(bf->o->bin_obj); if (authentihash) { @@ -726,7 +726,7 @@ static RzList *compute_hashes(RzBinFile *bf) { return file_hashes; } -static RzList *strings(RzBinFile *bf) { +static RzList /**/ *strings(RzBinFile *bf) { return rz_bin_file_strings(bf, 4, false); } diff --git a/librz/bin/p/bin_pe64.c b/librz/bin/p/bin_pe64.c index a12a774340d..dbf2b03f2d9 100644 --- a/librz/bin/p/bin_pe64.c +++ b/librz/bin/p/bin_pe64.c @@ -34,7 +34,7 @@ static bool check_buffer(RzBuffer *b) { return false; } -static RzList *fields(RzBinFile *bf) { +static RzList /**/ *fields(RzBinFile *bf) { RzList *ret = rz_list_newf((RzListFree)rz_bin_field_free); if (!ret) { return NULL; @@ -390,7 +390,7 @@ static inline const struct rz_bin_pe_section_t *get_section(RzBinPEObj *bin, con return unwind_data_section; } -static RzList *trycatch(RzBinFile *bf) { +static RzList /**/ *trycatch(RzBinFile *bf) { ut64 baseAddr = bf->o->opts.baseaddr; ut64 offset; diff --git a/librz/bin/p/bin_pebble.c b/librz/bin/p/bin_pebble.c index 80a38987a47..93a3c9e859e 100644 --- a/librz/bin/p/bin_pebble.c +++ b/librz/bin/p/bin_pebble.c @@ -55,7 +55,7 @@ static ut64 baddr(RzBinFile *bf) { } /* accelerate binary load */ -static RzList *strings(RzBinFile *bf) { +static RzList /**/ *strings(RzBinFile *bf) { return NULL; } @@ -87,7 +87,7 @@ static RzBinInfo *info(RzBinFile *bf) { return ret; } -static RzList *sections(RzBinFile *bf) { +static RzList /**/ *sections(RzBinFile *bf) { ut64 textsize = UT64_MAX; RzList *ret = NULL; RzBinSection *ptr = NULL; @@ -161,7 +161,7 @@ static RzList* relocs(RzBinFile *bf) { } #endif -static RzList *entries(RzBinFile *bf) { +static RzList /**/ *entries(RzBinFile *bf) { RzBinAddr *ptr = NULL; RzList *ret; PebbleAppInfo pai; diff --git a/librz/bin/p/bin_prg.c b/librz/bin/p/bin_prg.c index b30b66a7f9e..9ff668e4eda 100644 --- a/librz/bin/p/bin_prg.c +++ b/librz/bin/p/bin_prg.c @@ -37,7 +37,7 @@ static RzBinInfo *info(RzBinFile *bf) { return ret; } -static RzList *sections(RzBinFile *bf) { +static RzList /**/ *sections(RzBinFile *bf) { RzList *ret = rz_list_newf((RzListFree)rz_bin_section_free); if (!ret) { return NULL; @@ -60,7 +60,7 @@ static RzList *sections(RzBinFile *bf) { return ret; } -static RzList *entries(RzBinFile *bf) { +static RzList /**/ *entries(RzBinFile *bf) { RzList *ret = rz_list_newf(free); if (!ret) { return NULL; diff --git a/librz/bin/p/bin_psxexe.c b/librz/bin/p/bin_psxexe.c index b8ea7a0ffd9..b0727062201 100644 --- a/librz/bin/p/bin_psxexe.c +++ b/librz/bin/p/bin_psxexe.c @@ -44,7 +44,7 @@ static RzBinInfo *info(RzBinFile *bf) { return ret; } -static RzList *sections(RzBinFile *bf) { +static RzList /**/ *sections(RzBinFile *bf) { RzList *ret = NULL; RzBinSection *sect = NULL; psxexe_header psxheader; @@ -80,7 +80,7 @@ static RzList *sections(RzBinFile *bf) { return ret; } -static RzList *entries(RzBinFile *bf) { +static RzList /**/ *entries(RzBinFile *bf) { RzList *ret = NULL; RzBinAddr *addr = NULL; psxexe_header psxheader; @@ -108,7 +108,7 @@ static RzList *entries(RzBinFile *bf) { return ret; } -static RzList *strings(RzBinFile *bf) { +static RzList /**/ *strings(RzBinFile *bf) { // hardcode minstrlen = 20 return rz_bin_file_strings(bf, 20, true); } diff --git a/librz/bin/p/bin_pyc.c b/librz/bin/p/bin_pyc.c index 79689cf40c5..e748fcbae26 100644 --- a/librz/bin/p/bin_pyc.c +++ b/librz/bin/p/bin_pyc.c @@ -66,12 +66,12 @@ static RzBinInfo *info(RzBinFile *arch) { return ret; } -static RzList *sections(RzBinFile *arch) { +static RzList /**/ *sections(RzBinFile *arch) { RzBinPycObj *ctx = arch->o->bin_obj; return ctx->sections_cache; } -static RzList *entries(RzBinFile *arch) { +static RzList /**/ *entries(RzBinFile *arch) { RzList *entries = rz_list_newf((RzListFree)free); if (!entries) { return NULL; @@ -93,7 +93,7 @@ static ut64 baddr(RzBinFile *bf) { return 0; } -static RzList *symbols(RzBinFile *arch) { +static RzList /**/ *symbols(RzBinFile *arch) { RzBinPycObj *pyc = arch->o->bin_obj; RzList *shared = rz_list_newf((RzListFree)rz_list_free); if (!shared) { diff --git a/librz/bin/p/bin_qnx.c b/librz/bin/p/bin_qnx.c index ba09529f8d1..e6409b824c0 100644 --- a/librz/bin/p/bin_qnx.c +++ b/librz/bin/p/bin_qnx.c @@ -188,7 +188,7 @@ static RzBinInfo *info(RzBinFile *bf) { return ret; } -static RzList *relocs(RzBinFile *bf) { +static RzList /**/ *relocs(RzBinFile *bf) { rz_return_val_if_fail(bf && bf->o, NULL); QnxObj *qo = bf->o->bin_obj; RzBinReloc *reloc = NULL; @@ -235,18 +235,18 @@ static void header(RzBinFile *bf) { /* * No mention of symbols in the doc */ -static RzList *symbols(RzBinFile *bf) { +static RzList /**/ *symbols(RzBinFile *bf) { return NULL; } -static RzList *maps(RzBinFile *bf) { +static RzList /**/ *maps(RzBinFile *bf) { rz_return_val_if_fail(bf && bf->o, NULL); QnxObj *qo = bf->o->bin_obj; return rz_list_clone(qo->maps); } // Returns the sections -static RzList *sections(RzBinFile *bf) { +static RzList /**/ *sections(RzBinFile *bf) { rz_return_val_if_fail(bf && bf->o, NULL); QnxObj *qo = bf->o->bin_obj; return rz_list_clone(qo->sections); @@ -280,7 +280,7 @@ static ut64 baddr(RzBinFile *bf) { * Currently both physical and virtual address are set to 0 * The memory map has different values for entry */ -static RzList *entries(RzBinFile *bf) { +static RzList /**/ *entries(RzBinFile *bf) { RzList *ret; RzBinAddr *ptr = NULL; QnxObj *qo = bf->o->bin_obj; diff --git a/librz/bin/p/bin_sfc.c b/librz/bin/p/bin_sfc.c index b5b6ec15070..ff8b49d24b4 100644 --- a/librz/bin/p/bin_sfc.c +++ b/librz/bin/p/bin_sfc.c @@ -95,7 +95,7 @@ static RzBinInfo *info(RzBinFile *bf) { return ret; } -static void addrom(RzList *ret, const char *name, int i, ut64 paddr, ut64 vaddr, ut32 size) { +static void addrom(RzList /**/ *ret, const char *name, int i, ut64 paddr, ut64 vaddr, ut32 size) { RzBinSection *ptr = RZ_NEW0(RzBinSection); if (!ptr) { return; @@ -122,11 +122,11 @@ static void addsym(RzList *ret, const char *name, ut64 addr, ut32 size) { } #endif -static RzList *symbols(RzBinFile *bf) { +static RzList /**/ *symbols(RzBinFile *bf) { return NULL; } -static RzList *sections(RzBinFile *bf) { +static RzList /**/ *sections(RzBinFile *bf) { RzList *ret = NULL; // RzBinSection *ptr = NULL; int hdroffset = 0; @@ -185,7 +185,7 @@ static RzList *sections(RzBinFile *bf) { return ret; } -static RzList *mem(RzBinFile *bf) { +static RzList /**/ *mem(RzBinFile *bf) { RzList *ret; RzBinMem *m; RzBinMem *m_bak; @@ -268,7 +268,7 @@ static RzList *mem(RzBinFile *bf) { return ret; } -static RzList *entries(RzBinFile *bf) { // Should be 3 offsets pointed by NMI, RESET, IRQ after mapping && default = 1st CHR +static RzList /**/ *entries(RzBinFile *bf) { // Should be 3 offsets pointed by NMI, RESET, IRQ after mapping && default = 1st CHR RzList *ret; if (!(ret = rz_list_new())) { return NULL; diff --git a/librz/bin/p/bin_smd.c b/librz/bin/p/bin_smd.c index 8db3c15f757..5e4912670e4 100644 --- a/librz/bin/p/bin_smd.c +++ b/librz/bin/p/bin_smd.c @@ -128,7 +128,7 @@ static RzBinInfo *info(RzBinFile *bf) { return ret; } -static void addsym(RzList *ret, const char *name, ut64 addr) { +static void addsym(RzList /**/ *ret, const char *name, ut64 addr) { RzBinSymbol *ptr = RZ_NEW0(RzBinSymbol); if (!ptr) { return; @@ -146,7 +146,7 @@ static void showstr(const char *str, const ut8 *s, int len) { free(msg); } -static RzList *symbols(RzBinFile *bf) { +static RzList /**/ *symbols(RzBinFile *bf) { RzList *ret = NULL; const char *name = NULL; int i; @@ -252,7 +252,7 @@ static RzList *symbols(RzBinFile *bf) { return ret; } -static RzList *sections(RzBinFile *bf) { +static RzList /**/ *sections(RzBinFile *bf) { RzList *ret = NULL; if (!(ret = rz_list_new())) { return NULL; @@ -293,7 +293,7 @@ static RzList *sections(RzBinFile *bf) { return ret; } -static RzList *entries(RzBinFile *bf) { // Should be 3 offsets pointed by NMI, RESET, IRQ after mapping && default = 1st CHR +static RzList /**/ *entries(RzBinFile *bf) { // Should be 3 offsets pointed by NMI, RESET, IRQ after mapping && default = 1st CHR RzList *ret; RzBinAddr *ptr = NULL; if (!(ret = rz_list_new())) { @@ -315,7 +315,7 @@ static RzList *entries(RzBinFile *bf) { // Should be 3 offsets pointed by NMI, R return ret; } -static RzList *strings(RzBinFile *bf) { +static RzList /**/ *strings(RzBinFile *bf) { return rz_bin_file_strings(bf, 0, false); } diff --git a/librz/bin/p/bin_spc700.c b/librz/bin/p/bin_spc700.c index a02345c75f2..680a4fc0035 100644 --- a/librz/bin/p/bin_spc700.c +++ b/librz/bin/p/bin_spc700.c @@ -39,7 +39,7 @@ static RzBinInfo *info(RzBinFile *bf) { return ret; } -static RzList *sections(RzBinFile *bf) { +static RzList /**/ *sections(RzBinFile *bf) { RzList *ret = NULL; RzBinSection *ptr = NULL; spc_hdr spchdr; @@ -66,7 +66,7 @@ static RzList *sections(RzBinFile *bf) { return ret; } -static RzList *entries(RzBinFile *bf) { +static RzList /**/ *entries(RzBinFile *bf) { RzList *ret = rz_list_newf(free); if (ret) { RzBinAddr *ptr = RZ_NEW0(RzBinAddr); diff --git a/librz/bin/p/bin_symbols.c b/librz/bin/p/bin_symbols.c index d4b7bbd8963..f4645b52a33 100644 --- a/librz/bin/p/bin_symbols.c +++ b/librz/bin/p/bin_symbols.c @@ -300,7 +300,7 @@ static bool load_buffer(RzBinFile *bf, RzBinObject *obj, RzBuffer *buf, Sdb *sdb return obj->bin_obj != NULL; } -static RzList *sections(RzBinFile *bf) { +static RzList /**/ *sections(RzBinFile *bf) { RzList *res = rz_list_newf((RzListFree)rz_bin_section_free); rz_return_val_if_fail(res && bf->o && bf->o->bin_obj, res); RzCoreSymCacheElement *element = bf->o->bin_obj; @@ -353,7 +353,7 @@ static bool check_buffer(RzBuffer *b) { return !memcmp(buf, "\x02\xff\x01\xff", 4); } -static RzList *symbols(RzBinFile *bf) { +static RzList /**/ *symbols(RzBinFile *bf) { RzList *res = rz_list_newf((RzListFree)rz_bin_symbol_free); rz_return_val_if_fail(res && bf->o && bf->o->bin_obj, res); RzCoreSymCacheElement *element = bf->o->bin_obj; diff --git a/librz/bin/p/bin_te.c b/librz/bin/p/bin_te.c index f09a51b3c52..cb5cf4d1f66 100644 --- a/librz/bin/p/bin_te.c +++ b/librz/bin/p/bin_te.c @@ -54,7 +54,7 @@ static RzBinAddr *binsym(RzBinFile *bf, RzBinSpecialSymbol type) { return ret; } -static RzList *entries(RzBinFile *bf) { +static RzList /**/ *entries(RzBinFile *bf) { RzList *ret = rz_list_newf(free); if (ret) { RzBinAddr *entry = rz_bin_te_get_entrypoint(bf->o->bin_obj); @@ -71,7 +71,7 @@ static RzList *entries(RzBinFile *bf) { return ret; } -static RzList *sections(RzBinFile *bf) { +static RzList /**/ *sections(RzBinFile *bf) { RzList *ret = NULL; RzBinSection *ptr = NULL; struct rz_bin_te_section_t *sections = NULL; diff --git a/librz/bin/p/bin_vsf.c b/librz/bin/p/bin_vsf.c index 1f2100eb6b9..275893823a3 100644 --- a/librz/bin/p/bin_vsf.c +++ b/librz/bin/p/bin_vsf.c @@ -114,7 +114,7 @@ static bool load_buffer(RzBinFile *bf, RzBinObject *obj, RzBuffer *b, Sdb *sdb) return true; } -static RzList *mem(RzBinFile *bf) { +static RzList /**/ *mem(RzBinFile *bf) { // FIXME: What does Mem do? Should I remove it ? struct rz_bin_vsf_obj *vsf_obj = (struct rz_bin_vsf_obj *)bf->o->bin_obj; if (!vsf_obj) { @@ -138,7 +138,7 @@ static RzList *mem(RzBinFile *bf) { return ret; } -static RzList *sections(RzBinFile *bf) { +static RzList /**/ *sections(RzBinFile *bf) { struct rz_bin_vsf_obj *vsf_obj = (struct rz_bin_vsf_obj *)bf->o->bin_obj; if (!vsf_obj) { return NULL; @@ -329,7 +329,7 @@ static RzBinInfo *info(RzBinFile *bf) { return ret; } -static RzList *symbols(RzBinFile *bf) { +static RzList /**/ *symbols(RzBinFile *bf) { static const struct { const ut16 address; @@ -501,7 +501,7 @@ static void destroy(RzBinFile *bf) { free(obj); } -static RzList *entries(RzBinFile *bf) { +static RzList /**/ *entries(RzBinFile *bf) { struct rz_bin_vsf_obj *vsf_obj = (struct rz_bin_vsf_obj *)bf->o->bin_obj; if (!vsf_obj) { return NULL; diff --git a/librz/bin/p/bin_wasm.c b/librz/bin/p/bin_wasm.c index c432bdd8a50..6a4d23876c1 100644 --- a/librz/bin/p/bin_wasm.c +++ b/librz/bin/p/bin_wasm.c @@ -46,9 +46,9 @@ static RzBinAddr *binsym(RzBinFile *bf, RzBinSpecialSymbol type) { return NULL; // TODO } -static RzList *sections(RzBinFile *bf); +static RzList /**/ *sections(RzBinFile *bf); -static RzList *entries(RzBinFile *bf) { +static RzList /**/ *entries(RzBinFile *bf) { RzBinWasmObj *bin = bf && bf->o ? bf->o->bin_obj : NULL; // TODO RzList *ret = NULL; @@ -83,7 +83,7 @@ static RzList *entries(RzBinFile *bf) { return ret; } -static RzList *sections(RzBinFile *bf) { +static RzList /**/ *sections(RzBinFile *bf) { RzBinWasmObj *bin = bf && bf->o ? bf->o->bin_obj : NULL; RzList *ret = NULL; RzList *secs = NULL; @@ -119,7 +119,7 @@ static RzList *sections(RzBinFile *bf) { return ret; } -static RzList *symbols(RzBinFile *bf) { +static RzList /**/ *symbols(RzBinFile *bf) { RzBinWasmObj *bin = NULL; RzList *ret = NULL, *codes = NULL, *imports = NULL, *exports = NULL; RzBinSymbol *ptr = NULL; @@ -229,7 +229,7 @@ static RzList *symbols(RzBinFile *bf) { return NULL; } -static RzList *imports(RzBinFile *bf) { +static RzList /**/ *imports(RzBinFile *bf) { RzBinWasmObj *bin = NULL; RzList *imports = NULL; RzBinImport *ptr = NULL; @@ -280,7 +280,7 @@ static RzList *imports(RzBinFile *bf) { return NULL; } -static RzList *libs(RzBinFile *bf) { +static RzList /**/ *libs(RzBinFile *bf) { return NULL; } diff --git a/librz/bin/p/bin_xbe.c b/librz/bin/p/bin_xbe.c index 03e6de74a4b..249d631fcf9 100644 --- a/librz/bin/p/bin_xbe.c +++ b/librz/bin/p/bin_xbe.c @@ -124,7 +124,7 @@ static RzBinAddr *binsym(RzBinFile *bf, RzBinSpecialSymbol type) { return ret; } -static RzList *entries(RzBinFile *bf) { +static RzList /**/ *entries(RzBinFile *bf) { const rz_bin_xbe_obj_t *obj; RzList *ret; RzBinAddr *ptr = RZ_NEW0(RzBinAddr); @@ -145,7 +145,7 @@ static RzList *entries(RzBinFile *bf) { return ret; } -static RzList *sections(RzBinFile *bf) { +static RzList /**/ *sections(RzBinFile *bf) { rz_bin_xbe_obj_t *obj = NULL; xbe_header *h = NULL; RzList *ret = NULL; @@ -232,7 +232,7 @@ static char *describe_xbe_lib_at(RzBuffer *b, ut64 off, ut64 filesz) { return rz_str_newf("%s %i.%i.%i", name, lib.major, lib.minor, lib.build); } -static RzList *libs(RzBinFile *bf) { +static RzList /**/ *libs(RzBinFile *bf) { if (!bf || !bf->o || !bf->o->bin_obj) { return NULL; } @@ -259,7 +259,7 @@ static RzList *libs(RzBinFile *bf) { return ret; } -static RzList *symbols(RzBinFile *bf) { +static RzList /**/ *symbols(RzBinFile *bf) { rz_bin_xbe_obj_t *obj; xbe_header *h; RzList *ret; diff --git a/librz/bin/p/bin_xnu_kernelcache.c b/librz/bin/p/bin_xnu_kernelcache.c index 1a026ee3034..61844457796 100644 --- a/librz/bin/p/bin_xnu_kernelcache.c +++ b/librz/bin/p/bin_xnu_kernelcache.c @@ -95,16 +95,16 @@ static RzXNUKernelCacheRebaseInfo *rz_rebase_info_new_from_mach0(RzBuffer *cache static void rz_rebase_info_free(RzXNUKernelCacheRebaseInfo *info); static RPrelinkRange *get_prelink_info_range_from_mach0(struct MACH0_(obj_t) * mach0); -static RzList *filter_kexts(RzXNUKernelCacheObj *obj); -static RzList *carve_kexts(RzXNUKernelCacheObj *obj); -static RzList *kexts_from_load_commands(RzXNUKernelCacheObj *obj); +static RzList /**/ *filter_kexts(RzXNUKernelCacheObj *obj); +static RzList /**/ *carve_kexts(RzXNUKernelCacheObj *obj); +static RzList /**/ *kexts_from_load_commands(RzXNUKernelCacheObj *obj); -static void sections_from_mach0(RzList *ret, struct MACH0_(obj_t) * mach0, RzBinFile *bf, ut64 paddr, char *prefix, RzXNUKernelCacheObj *obj); +static void sections_from_mach0(RzList /**/ *ret, struct MACH0_(obj_t) * mach0, RzBinFile *bf, ut64 paddr, char *prefix, RzXNUKernelCacheObj *obj); static void handle_data_sections(RzBinSection *sect); -static void symbols_from_mach0(RzList *ret, struct MACH0_(obj_t) * mach0, RzBinFile *bf, ut64 paddr, int ordinal); -static RzList *resolve_syscalls(RzXNUKernelCacheObj *obj, ut64 enosys_addr); -static RzList *resolve_mig_subsystem(RzXNUKernelCacheObj *obj); -static void symbols_from_stubs(RzList *ret, HtPP *kernel_syms_by_addr, RzXNUKernelCacheObj *obj, RzBinFile *bf, RKext *kext, int ordinal); +static void symbols_from_mach0(RzList /**/ *ret, struct MACH0_(obj_t) * mach0, RzBinFile *bf, ut64 paddr, int ordinal); +static RzList /**/ *resolve_syscalls(RzXNUKernelCacheObj *obj, ut64 enosys_addr); +static RzList /**/ *resolve_mig_subsystem(RzXNUKernelCacheObj *obj); +static void symbols_from_stubs(RzList /**/ *ret, HtPP *kernel_syms_by_addr, RzXNUKernelCacheObj *obj, RzBinFile *bf, RKext *kext, int ordinal); static RStubsInfo *get_stubs_info(struct MACH0_(obj_t) * mach0, ut64 paddr, RzXNUKernelCacheObj *obj); static int prot2perm(int x); @@ -118,13 +118,13 @@ static struct MACH0_(obj_t) * create_kext_shared_mach0(RzXNUKernelCacheObj *obj, if (index) \ for (i = 0; i < index->length && (item = index->entries[i], 1); i++) -static RKextIndex *rz_kext_index_new(RzList *kexts); +static RKextIndex *rz_kext_index_new(RzList /**/ *kexts); static void rz_kext_index_free(RKextIndex *index); static RKext *rz_kext_index_vget(RKextIndex *index, ut64 vaddr); -static void process_kmod_init_term(RzXNUKernelCacheObj *obj, RKext *kext, RzList *ret, ut64 **inits, ut64 **terms); -static void create_initterm_syms(RKext *kext, RzList *ret, int type, ut64 *pointers); -static void process_constructors(RzXNUKernelCacheObj *obj, struct MACH0_(obj_t) * mach0, RzList *ret, ut64 paddr, bool is_first, int mode, const char *prefix); +static void process_kmod_init_term(RzXNUKernelCacheObj *obj, RKext *kext, RzList /**/ *ret, ut64 **inits, ut64 **terms); +static void create_initterm_syms(RKext *kext, RzList /**/ *ret, int type, ut64 *pointers); +static void process_constructors(RzXNUKernelCacheObj *obj, struct MACH0_(obj_t) * mach0, RzList /**/ *ret, ut64 paddr, bool is_first, int mode, const char *prefix); static RzBinAddr *newEntry(ut64 haddr, ut64 vaddr, int type); static void ensure_kexts_initialized(RzXNUKernelCacheObj *obj); @@ -281,7 +281,7 @@ static RPrelinkRange *get_prelink_info_range_from_mach0(struct MACH0_(obj_t) * m return prelink_range; } -static RzList *filter_kexts(RzXNUKernelCacheObj *obj) { +static RzList /**/ *filter_kexts(RzXNUKernelCacheObj *obj) { RCFValueArray *kext_array = NULL; RzListIter *iter; RCFKeyValue *item; @@ -397,7 +397,7 @@ static ut64 rz_ptr(ut8 *buf, RzXNUKernelCacheObj *obj) { return K_PPTR(decorated_addr); } -static RzList *carve_kexts(RzXNUKernelCacheObj *obj) { +static RzList /**/ *carve_kexts(RzXNUKernelCacheObj *obj) { struct section_t *sections = NULL; if (!(sections = MACH0_(get_sections)(obj->mach0))) { return NULL; @@ -541,7 +541,7 @@ static RzList *carve_kexts(RzXNUKernelCacheObj *obj) { return NULL; } -static RzList *kexts_from_load_commands(RzXNUKernelCacheObj *obj) { +static RzList /**/ *kexts_from_load_commands(RzXNUKernelCacheObj *obj) { RzList *kexts = rz_list_newf((RzListFree)&rz_kext_free); if (!kexts) { return NULL; @@ -685,7 +685,7 @@ static int kexts_sort_vaddr_func(const void *a, const void *b) { return vaddr_compare; } -static RKextIndex *rz_kext_index_new(RzList *kexts) { +static RKextIndex *rz_kext_index_new(RzList /**/ *kexts) { if (!kexts) { return NULL; } @@ -775,7 +775,7 @@ static struct MACH0_(obj_t) * create_kext_shared_mach0(RzXNUKernelCacheObj *obj, return mach0; } -static RzList *entries(RzBinFile *bf) { +static RzList /**/ *entries(RzBinFile *bf) { RzList *ret; RzBinObject *obj = bf ? bf->o : NULL; @@ -798,7 +798,7 @@ static RzList *entries(RzBinFile *bf) { return ret; } -static void process_kmod_init_term(RzXNUKernelCacheObj *obj, RKext *kext, RzList *ret, ut64 **inits, ut64 **terms) { +static void process_kmod_init_term(RzXNUKernelCacheObj *obj, RKext *kext, RzList /**/ *ret, ut64 **inits, ut64 **terms) { if (!*inits || !*terms) { struct section_t *sections = NULL; if (!(sections = MACH0_(get_sections)(obj->mach0))) { @@ -870,7 +870,7 @@ static const char *kext_short_name(RKext *kext) { return sn ? sn + 1 : kext->name; } -static void create_initterm_syms(RKext *kext, RzList *ret, int type, ut64 *pointers) { +static void create_initterm_syms(RKext *kext, RzList /**/ *ret, int type, ut64 *pointers) { int i = 0; int count = 0; for (; pointers[i]; i++) { @@ -903,7 +903,7 @@ static void create_initterm_syms(RKext *kext, RzList *ret, int type, ut64 *point } } -static void process_constructors(RzXNUKernelCacheObj *obj, struct MACH0_(obj_t) * mach0, RzList *ret, ut64 paddr, bool is_first, int mode, const char *prefix) { +static void process_constructors(RzXNUKernelCacheObj *obj, struct MACH0_(obj_t) * mach0, RzList /**/ *ret, ut64 paddr, bool is_first, int mode, const char *prefix) { struct section_t *sections = NULL; if (!(sections = MACH0_(get_sections)(mach0))) { return; @@ -985,7 +985,7 @@ static bool check_buffer(RzBuffer *b) { return false; } -static RzList *virtual_files(RzBinFile *bf) { +static RzList /**/ *virtual_files(RzBinFile *bf) { rz_return_val_if_fail(bf, NULL); RzList *ret = rz_list_newf((RzListFree)rz_bin_virtual_file_free); if (!ret) { @@ -1005,7 +1005,7 @@ static RzList *virtual_files(RzBinFile *bf) { return ret; } -static RzList *maps(RzBinFile *bf) { +static RzList /**/ *maps(RzBinFile *bf) { RzBinObject *obj = bf ? bf->o : NULL; if (!obj || !obj->bin_obj) { return NULL; @@ -1045,7 +1045,7 @@ static RzList *maps(RzBinFile *bf) { return ret; } -static RzList *sections(RzBinFile *bf) { +static RzList /**/ *sections(RzBinFile *bf) { RzList *ret = NULL; RzBinObject *obj = bf ? bf->o : NULL; @@ -1116,7 +1116,7 @@ static int prot2perm(int x) { return r; } -static void sections_from_mach0(RzList *ret, struct MACH0_(obj_t) * mach0, RzBinFile *bf, ut64 paddr, char *prefix, RzXNUKernelCacheObj *obj) { +static void sections_from_mach0(RzList /**/ *ret, struct MACH0_(obj_t) * mach0, RzBinFile *bf, ut64 paddr, char *prefix, RzXNUKernelCacheObj *obj) { struct section_t *sections = NULL; if (!(sections = MACH0_(get_sections)(mach0))) { return; @@ -1167,7 +1167,7 @@ static void handle_data_sections(RzBinSection *sect) { } } -static RzList *symbols(RzBinFile *bf) { +static RzList /**/ *symbols(RzBinFile *bf) { RzList *ret = rz_list_newf((RzListFree)rz_bin_symbol_free); if (!ret) { return NULL; @@ -1248,7 +1248,7 @@ static RzList *symbols(RzBinFile *bf) { return ret; } -static void symbols_from_mach0(RzList *ret, struct MACH0_(obj_t) * mach0, RzBinFile *bf, ut64 paddr, int ordinal) { +static void symbols_from_mach0(RzList /**/ *ret, struct MACH0_(obj_t) * mach0, RzBinFile *bf, ut64 paddr, int ordinal) { const struct symbol_t *symbols = MACH0_(get_symbols)(mach0); if (!symbols) { return; @@ -1303,7 +1303,7 @@ typedef struct _r_sysent { ut16 sy_arg_bytes; } RSysEnt; -static RzList *resolve_syscalls(RzXNUKernelCacheObj *obj, ut64 enosys_addr) { +static RzList /**/ *resolve_syscalls(RzXNUKernelCacheObj *obj, ut64 enosys_addr) { struct section_t *sections = NULL; if (!(sections = MACH0_(get_sections)(obj->mach0))) { return NULL; @@ -1464,7 +1464,7 @@ static HtPP *mig_hash_new(void) { return hash; } -static RzList *resolve_mig_subsystem(RzXNUKernelCacheObj *obj) { +static RzList /**/ *resolve_mig_subsystem(RzXNUKernelCacheObj *obj) { struct section_t *sections = NULL; if (!(sections = MACH0_(get_sections)(obj->mach0))) { return NULL; @@ -1626,7 +1626,7 @@ static ut64 extract_addr_from_code(ut8 *arm64_code, ut64 vaddr) { return addr; } -static void symbols_from_stubs(RzList *ret, HtPP *kernel_syms_by_addr, RzXNUKernelCacheObj *obj, RzBinFile *bf, RKext *kext, int ordinal) { +static void symbols_from_stubs(RzList /**/ *ret, HtPP *kernel_syms_by_addr, RzXNUKernelCacheObj *obj, RzBinFile *bf, RKext *kext, int ordinal) { RStubsInfo *stubs_info = get_stubs_info(kext->mach0, kext->range.offset, obj); if (!stubs_info) { return; diff --git a/librz/bin/p/bin_xtr_fatmach0.c b/librz/bin/p/bin_xtr_fatmach0.c index 40fd16ef6f2..e62a280553d 100644 --- a/librz/bin/p/bin_xtr_fatmach0.c +++ b/librz/bin/p/bin_xtr_fatmach0.c @@ -125,7 +125,7 @@ static RzBinXtrData *oneshot_buffer(RzBin *bin, RzBuffer *b, int idx) { return NULL; } -static RzList *oneshotall_buffer(RzBin *bin, RzBuffer *b) { +static RzList /**/ *oneshotall_buffer(RzBin *bin, RzBuffer *b) { RzBinXtrData *data = oneshot_buffer(bin, b, 0); if (data) { // XXX - how do we validate a valid narch? diff --git a/librz/bin/p/bin_xtr_pemixed.c b/librz/bin/p/bin_xtr_pemixed.c index 78b52c06d4f..4f916bdcbcb 100644 --- a/librz/bin/p/bin_xtr_pemixed.c +++ b/librz/bin/p/bin_xtr_pemixed.c @@ -7,7 +7,7 @@ #include #include "pe/pemixed.h" -static RzList *oneshotall(RzBin *bin, const ut8 *buf, ut64 size); +static RzList /**/ *oneshotall(RzBin *bin, const ut8 *buf, ut64 size); static RzBinXtrData *oneshot(RzBin *bin, const ut8 *buf, ut64 size, int subbin_type); static void free_xtr(void *xtr_obj) { @@ -48,7 +48,7 @@ static bool check_buffer(RzBuffer *b) { } // TODO RzBufferify -static RzList *oneshotall(RzBin *bin, const ut8 *buf, ut64 size) { +static RzList /**/ *oneshotall(RzBin *bin, const ut8 *buf, ut64 size) { // extract dos componenent first RzBinXtrData *data = oneshot(bin, buf, size, SUB_BIN_DOS); diff --git a/librz/bin/p/bin_xtr_sep64.c b/librz/bin/p/bin_xtr_sep64.c index 14ce7e7c690..7513e9fae53 100644 --- a/librz/bin/p/bin_xtr_sep64.c +++ b/librz/bin/p/bin_xtr_sep64.c @@ -196,7 +196,7 @@ static RzBinXtrData *oneshot_buffer(RzBin *bin, RzBuffer *b, int idx) { return res; } -static RzList *oneshotall_buffer(RzBin *bin, RzBuffer *b) { +static RzList /**/ *oneshotall_buffer(RzBin *bin, RzBuffer *b) { RzBinXtrData *data = oneshot_buffer(bin, b, 0); if (data) { int narch = data->file_count; diff --git a/librz/bin/p/bin_z64.c b/librz/bin/p/bin_z64.c index 24d5e0ff4a8..fac13bb7f56 100644 --- a/librz/bin/p/bin_z64.c +++ b/librz/bin/p/bin_z64.c @@ -89,8 +89,8 @@ static bool load_buffer(RzBinFile *bf, RzBinObject *obj, RzBuffer *b, Sdb *sdb) return false; } -static RzList *entries(RzBinFile *bf) { - RzList /**/ *ret = rz_list_newf(free); +static RzList /**/ *entries(RzBinFile *bf) { + RzList /**/ *ret = rz_list_newf(free); if (!ret) { return NULL; } @@ -103,8 +103,8 @@ static RzList *entries(RzBinFile *bf) { return ret; } -static RzList *sections(RzBinFile *bf) { - RzList /**/ *ret = rz_list_new(); +static RzList /**/ *sections(RzBinFile *bf) { + RzList /**/ *ret = rz_list_new(); if (!ret) { return NULL; } diff --git a/librz/bin/pdb/pdb.c b/librz/bin/pdb/pdb.c index 9fef664f272..0a8409d1a77 100644 --- a/librz/bin/pdb/pdb.c +++ b/librz/bin/pdb/pdb.c @@ -113,7 +113,7 @@ static ut64 count_blocks(ut64 length, ut64 block_size) { return num_blocks; } -static RzList *pdb7_extract_streams(RzPdb *pdb, RzPdbMsfStreamDirectory *msd) { +static RzList /**/ *pdb7_extract_streams(RzPdb *pdb, RzPdbMsfStreamDirectory *msd) { RzList *streams = rz_list_newf(msf_stream_free); if (!streams) { goto error_memory; diff --git a/librz/bin/pdb/tpi.c b/librz/bin/pdb/tpi.c index 3912bc5b47c..9dee5b60ccc 100644 --- a/librz/bin/pdb/tpi.c +++ b/librz/bin/pdb/tpi.c @@ -403,7 +403,7 @@ RZ_API bool rz_bin_pdb_type_is_fwdref(RZ_NONNULL RzPdbTpiType *t) { * \param t RzPdbTpiType * \return RzList * */ -RZ_API RZ_BORROW RzList *rz_bin_pdb_get_type_members(RZ_NONNULL RzPdbTpiStream *stream, RzPdbTpiType *t) { +RZ_API RZ_BORROW RzList /**/ *rz_bin_pdb_get_type_members(RZ_NONNULL RzPdbTpiStream *stream, RzPdbTpiType *t) { rz_return_val_if_fail(t, NULL); RzPdbTpiType *tmp; switch (t->leaf_type) { diff --git a/librz/bin/pdb/tpi.h b/librz/bin/pdb/tpi.h index dfef8a33251..327a3a6361b 100644 --- a/librz/bin/pdb/tpi.h +++ b/librz/bin/pdb/tpi.h @@ -530,7 +530,7 @@ typedef struct { } Tpi_Type_MethodListMember; typedef struct { - RzList /* Tpi_Type_MethodListMember */ *members; + RzList /**/ *members; } Tpi_LF_MethodList; typedef struct { @@ -578,7 +578,7 @@ typedef struct { } Tpi_LF_VBClass, Tpi_LF_IVBClass; typedef struct { - RzList /* RzPdbTpiType */ *substructs; + RzList /**/ *substructs; } Tpi_LF_FieldList; typedef struct { @@ -586,4 +586,4 @@ typedef struct { char *type; } Tpi_LF_SimpleType; -#endif \ No newline at end of file +#endif diff --git a/librz/bp/bp_plugin.c b/librz/bp/bp_plugin.c index 9b842bc45cc..af7f05468c8 100644 --- a/librz/bp/bp_plugin.c +++ b/librz/bp/bp_plugin.c @@ -26,7 +26,7 @@ RZ_API bool rz_bp_plugin_add(RzBreakpoint *bp, RZ_BORROW RZ_NONNULL RzBreakpoint RzListIter *iter; RzBreakpointPlugin *h; /* avoid dupped plugins */ - rz_list_foreach (bp->bps, iter, h) { + rz_list_foreach (bp->plugins, iter, h) { if (!strcmp(h->name, plugin->name)) { return false; } diff --git a/librz/bp/bp_traptrace.c b/librz/bp/bp_traptrace.c index fe6d9085d3f..f96eb472ac6 100644 --- a/librz/bp/bp_traptrace.c +++ b/librz/bp/bp_traptrace.c @@ -13,7 +13,7 @@ RZ_API void rz_bp_traptrace_free(void *ptr) { free(trace); } -RZ_API RzList *rz_bp_traptrace_new(void) { +RZ_API RzList /**/ *rz_bp_traptrace_new(void) { RzList *list = rz_list_new(); if (!list) { return NULL; diff --git a/librz/cons/dietline.c b/librz/cons/dietline.c index 791132ed1da..d734b7ce171 100644 --- a/librz/cons/dietline.c +++ b/librz/cons/dietline.c @@ -632,7 +632,7 @@ static void replace_buffer_text(RzLineBuffer *buf, size_t start, size_t end, con buf->data[buf->length] = '\0'; } -static char *get_max_common_pfx(RzPVector *options) { +static char *get_max_common_pfx(RzPVector /**/ *options) { const char *ref = rz_pvector_at(options, 0); size_t min_common_len = strlen(ref); void **it; diff --git a/librz/cons/hud.c b/librz/cons/hud.c index 397685df412..cc671bf501d 100644 --- a/librz/cons/hud.c +++ b/librz/cons/hud.c @@ -109,7 +109,7 @@ static bool __matchString(char *entry, char *filter, char *mask, const int mask_ return true; } -static RzList *hud_filter(RzList *list, char *user_input, int top_entry_n, int *current_entry_n, char **selected_entry) { +static RzList /**/ *hud_filter(RzList /**/ *list, char *user_input, int top_entry_n, int *current_entry_n, char **selected_entry) { RzListIter *iter; char *current_entry; char mask[HUD_BUF_SIZE]; diff --git a/librz/cons/pager.c b/librz/cons/pager.c index c618139e0ed..88dd17f8679 100644 --- a/librz/cons/pager.c +++ b/librz/cons/pager.c @@ -6,7 +6,7 @@ #include #include "pager_private.h" -RZ_IPI void pager_color_line(const char *line, RzStrpool *p, RzList *ml) { +RZ_IPI void pager_color_line(const char *line, RzStrpool *p, RzList /**/ *ml) { int m_len, offset = 0; char *m_addr; RzListIter *it; @@ -45,7 +45,7 @@ RZ_IPI void pager_color_line(const char *line, RzStrpool *p, RzList *ml) { rz_strpool_append(p, line + offset); } -RZ_IPI void pager_printpage(const char *line, int *index, RzList **mla, int from, int to, int w) { +RZ_IPI void pager_printpage(const char *line, int *index, RzList /**/ **mla, int from, int to, int w) { int i; rz_cons_clear00(); @@ -71,7 +71,7 @@ RZ_IPI void pager_printpage(const char *line, int *index, RzList **mla, int from rz_cons_flush(); } -RZ_IPI int pager_next_match(int from, RzList **mla, int lcount) { +RZ_IPI int pager_next_match(int from, RzList /**/ **mla, int lcount) { int l; if (from > lcount - 2) { return from; @@ -85,7 +85,7 @@ RZ_IPI int pager_next_match(int from, RzList **mla, int lcount) { return from; } -RZ_IPI int pager_prev_match(int from, RzList **mla) { +RZ_IPI int pager_prev_match(int from, RzList /**/ **mla) { int l; if (from < 1) { return from; @@ -98,7 +98,7 @@ RZ_IPI int pager_prev_match(int from, RzList **mla) { return from; } -RZ_IPI bool pager_all_matches(const char *s, RzRegex *rx, RzList **mla, int *lines, int lcount) { +RZ_IPI bool pager_all_matches(const char *s, RzRegex *rx, RzList /**/ **mla, int *lines, int lcount) { bool res = false; RzRegexMatch m = { 0 }; int l, slen; diff --git a/librz/cons/pager_private.h b/librz/cons/pager_private.h index 7eda9178fc1..5c2c8b79e36 100644 --- a/librz/cons/pager_private.h +++ b/librz/cons/pager_private.h @@ -4,11 +4,11 @@ #ifndef PAGER_PRIVATE_H #define PAGER_PRIVATE_H -RZ_IPI void pager_color_line(const char *line, RzStrpool *p, RzList *ml); -RZ_IPI void pager_printpage(const char *line, int *index, RzList **mla, int from, int to, int w); -RZ_IPI int pager_next_match(int from, RzList **mla, int lcount); -RZ_IPI int pager_prev_match(int from, RzList **mla); -RZ_IPI bool pager_all_matches(const char *s, RzRegex *rx, RzList **mla, int *lines, int lcount); +RZ_IPI void pager_color_line(const char *line, RzStrpool *p, RzList /**/ *ml); +RZ_IPI void pager_printpage(const char *line, int *index, RzList /**/ **mla, int from, int to, int w); +RZ_IPI int pager_next_match(int from, RzList /**/ **mla, int lcount); +RZ_IPI int pager_prev_match(int from, RzList /**/ **mla); +RZ_IPI bool pager_all_matches(const char *s, RzRegex *rx, RzList /**/ **mla, int *lines, int lcount); RZ_IPI int *pager_splitlines(char *s, int *lines_count); #endif diff --git a/librz/core/agraph.c b/librz/core/agraph.c index 15bf2b0acc9..dd492681ae5 100644 --- a/librz/core/agraph.c +++ b/librz/core/agraph.c @@ -80,7 +80,7 @@ struct g_cb { typedef struct ascii_edge_t { RzANode *from; RzANode *to; - RzList *x, *y; + RzList /**/ *x, *y; // void* is treated as a size_t int is_reversed; } AEdge; @@ -209,7 +209,7 @@ static void agraph_node_free(RzANode *n) { static int agraph_refresh(struct agraph_refresh_data *grd); -static void update_node_dimension(const RzGraph *g, int is_mini, int zoom, int edgemode, bool callgraph, int layout) { +static void update_node_dimension(const RzGraph /**/ *g, int is_mini, int zoom, int edgemode, bool callgraph, int layout) { const RzList *nodes = rz_graph_get_nodes(g); RzGraphNode *gn; RzListIter *it; @@ -430,7 +430,7 @@ static void normal_RzANode_print(const RzAGraph *g, const RzANode *n, int cur) { rz_cons_canvas_box(g->can, n->x, n->y, n->w, n->h, get_node_color(color, cur)); } -static int **get_crossing_matrix(const RzGraph *g, +static int **get_crossing_matrix(const RzGraph /**/ *g, const struct layer_t layers[], int maxlayer, int i, int from_up, int *n_rows) { @@ -540,7 +540,7 @@ static int **get_crossing_matrix(const RzGraph *g, return NULL; } -static int layer_sweep(const RzGraph *g, const struct layer_t layers[], +static int layer_sweep(const RzGraph /**/ *g, const struct layer_t layers[], int maxlayer, int i, int from_up) { RzGraphNode *u, *v; const RzANode *au, *av; @@ -958,7 +958,7 @@ static HtPP *compute_vertical_nodes(const RzAGraph *g) { * - v E C * - w E C => L(v) is a subset of C * - w E C, the s+(w) exists and is not in any class yet => s+(w) E C */ -static RzList **compute_classes(const RzAGraph *g, HtPP *v_nodes, int is_left, int *n_classes) { +static RzList /**/ **compute_classes(const RzAGraph *g, HtPP *v_nodes, int is_left, int *n_classes) { int i, j, c; RzList **res = RZ_NEWS0(RzList *, g->n_layers); RzGraphNode *gn; @@ -1038,7 +1038,7 @@ static int adjust_class_val(const RzAGraph *g, const RzGraphNode *gn, const RzGr /* adjusts the position of previously placed left/right classes */ /* tries to place classes as close as possible */ -static void adjust_class(const RzAGraph *g, int is_left, RzList **classes, HtPU *res, int c) { +static void adjust_class(const RzAGraph *g, int is_left, RzList /**/ **classes, HtPU *res, int c) { const RzGraphNode *gn; const RzListIter *it; const RzANode *an; @@ -1117,7 +1117,7 @@ static int place_nodes_sel_p(int newval, int oldval, int is_first, int is_left) } /* places left/right the nodes of a class */ -static void place_nodes(const RzAGraph *g, const RzGraphNode *gn, int is_left, HtPP *v_nodes, RzList **classes, HtPU *res, SetP *placed) { +static void place_nodes(const RzAGraph *g, const RzGraphNode *gn, int is_left, HtPP *v_nodes, HtPU *res, SetP *placed) { const RzList *lv = ht_pp_find(v_nodes, gn, NULL); int p = 0, v, is_first = true; const RzGraphNode *gk; @@ -1135,7 +1135,7 @@ static void place_nodes(const RzAGraph *g, const RzGraphNode *gn, int is_left, H sibl_anode = get_anode(sibling); if (ak->klass == sibl_anode->klass) { if (!set_p_contains(placed, sibling)) { - place_nodes(g, sibling, is_left, v_nodes, classes, res, placed); + place_nodes(g, sibling, is_left, v_nodes, res, placed); } v = place_nodes_val(g, gk, sibling, res, is_left); @@ -1178,7 +1178,7 @@ static HtPU *compute_pos(const RzAGraph *g, int is_left, HtPP *v_nodes) { rz_list_foreach (classes[i], it, gn) { if (!set_p_contains(placed, gn)) { - place_nodes(g, gn, is_left, v_nodes, classes, res, placed); + place_nodes(g, gn, is_left, v_nodes, res, placed); } } @@ -1355,7 +1355,7 @@ static int RP_listcmp(const struct len_pos_t *a, const struct len_pos_t *b) { return (a->pos > b->pos) - (a->pos < b->pos); } -static void collect_changes(const RzAGraph *g, int l, const RzGraphNode *b, int from_up, int s, int e, RzList *list, int is_left) { +static void collect_changes(const RzAGraph *g, int l, const RzGraphNode *b, int from_up, int s, int e, RzList /**/ *list, int is_left) { const RzGraphNode *vt = g->layers[l].nodes[e - 1]; const RzGraphNode *vtp = g->layers[l].nodes[s]; struct len_pos_t *cx; diff --git a/librz/core/analysis_tp.c b/librz/core/analysis_tp.c index 5d9770063b9..8810b02e899 100644 --- a/librz/core/analysis_tp.c +++ b/librz/core/analysis_tp.c @@ -148,7 +148,7 @@ static void var_type_set_resolve_overlaps(RzAnalysis *analysis, RzAnalysisVar *v var_type_set(analysis, var, type, ref, true); } -static void vars_resolve_overlaps(RzPVector *vars) { +static void vars_resolve_overlaps(RzPVector /**/ *vars) { for (size_t i = 0; i < rz_pvector_len(vars); i++) { RzAnalysisVar *var = rz_pvector_at(vars, i); rz_analysis_var_resolve_overlaps(var); @@ -213,7 +213,7 @@ static ut64 get_addr(RzAnalysis *analysis, const char *regname, int idx) { return reg_op->value; } -static RzList *parse_format(RzCore *core, char *fmt) { +static RzList /**/ *parse_format(RzCore *core, char *fmt) { if (!fmt || !*fmt) { return NULL; } @@ -570,7 +570,7 @@ static inline bool return_type_analysis_context_unresolved(struct ReturnTypeAnal } // Progate return type passed using pointer -static void propagate_return_type_pointer(RzCore *core, RzAnalysisOp *aop, RzPVector *used_vars, ut64 addr, struct ReturnTypeAnalysisCtx *ctx) { +static void propagate_return_type_pointer(RzCore *core, RzAnalysisOp *aop, RzPVector /**/ *used_vars, ut64 addr, struct ReturnTypeAnalysisCtx *ctx) { // int *ret; *ret = strlen(s); // TODO: memref check , dest and next src match char nsrc[REGNAME_SIZE] = { 0 }; @@ -588,7 +588,7 @@ static void propagate_return_type_pointer(RzCore *core, RzAnalysisOp *aop, RzPVe } // Forward propagation of function return type -static void propagate_return_type(RzCore *core, RzAnalysisOp *aop, RzAnalysisOp *next_op, RzILTraceInstruction *trace, struct ReturnTypeAnalysisCtx *ctx, RzPVector *used_vars) { +static void propagate_return_type(RzCore *core, RzAnalysisOp *aop, RzAnalysisOp *next_op, RzILTraceInstruction *trace, struct ReturnTypeAnalysisCtx *ctx, RzPVector /**/ *used_vars) { char src[REGNAME_SIZE] = { 0 }; void **uvit; diff --git a/librz/core/basefind.c b/librz/core/basefind.c index 7ea66668e1b..02bc8d98cf5 100644 --- a/librz/core/basefind.c +++ b/librz/core/basefind.c @@ -32,7 +32,7 @@ typedef struct basefind_thread_data_t { ut64 io_size; ut32 score_min; RzThreadLock *lock; - RzList *scores; + RzList /**/ *scores; HtUU *pointers; BaseFindArray *array; RzAtomicBool *loop; @@ -333,7 +333,7 @@ static inline bool create_thread_interval(RzThreadPool *pool, BaseFindThreadData * \param core RzCore struct to use. * \param options Pointer to the RzBaseFindOpt structure. */ -RZ_API RZ_OWN RzList *rz_basefind(RZ_NONNULL RzCore *core, RZ_NONNULL RzBaseFindOpt *options) { +RZ_API RZ_OWN RzList /**/ *rz_basefind(RZ_NONNULL RzCore *core, RZ_NONNULL RzBaseFindOpt *options) { rz_return_val_if_fail(core && options, NULL); RzList *scores = NULL; BaseFindArray *array = NULL; diff --git a/librz/core/cagraph.c b/librz/core/cagraph.c index fc103593873..4ef8e9895b4 100644 --- a/librz/core/cagraph.c +++ b/librz/core/cagraph.c @@ -271,7 +271,7 @@ RZ_IPI bool rz_core_add_shortcuts(RzCore *core, RzAGraph *ag) { return true; } -RZ_IPI bool rz_core_agraph_apply(RzCore *core, RzGraph *graph) { +RZ_IPI bool rz_core_agraph_apply(RzCore *core, RzGraph /**/ *graph) { if (!(core && core->graph && graph)) { return false; } diff --git a/librz/core/canalysis.c b/librz/core/canalysis.c index 65afdc519f2..3225d121a46 100644 --- a/librz/core/canalysis.c +++ b/librz/core/canalysis.c @@ -1630,7 +1630,7 @@ RZ_API RzList /**/ *rz_core_analysis_fcn_get_calls(RzCore *cor typedef struct { int count; - RzPVector reg_set; + RzPVector /**/ reg_set; bool argonly; RzAnalysisFunction *fcn; RzCore *core; @@ -1722,7 +1722,7 @@ RZ_API void rz_core_recover_vars(RzCore *core, RzAnalysisFunction *fcn, bool arg fcn->stack = saved_stack; } -static bool analysis_path_exists(RzCore *core, ut64 from, ut64 to, RzList *bbs, int depth, HtUP *state, HtUP *avoid) { +static bool analysis_path_exists(RzCore *core, ut64 from, ut64 to, RzList /**/ *bbs, int depth, HtUP *state, HtUP *avoid) { rz_return_val_if_fail(bbs, false); RzAnalysisBlock *bb = rz_analysis_find_most_relevant_block_in(core->analysis, from); RzListIter *iter = NULL; @@ -1776,7 +1776,7 @@ static bool analysis_path_exists(RzCore *core, ut64 from, ut64 to, RzList *bbs, return false; } -static RzList *analysis_graph_to(RzCore *core, ut64 addr, int depth, HtUP *avoid) { +static RzList /**/ *analysis_graph_to(RzCore *core, ut64 addr, int depth, HtUP *avoid) { RzAnalysisFunction *cur_fcn = rz_analysis_get_fcn_in(core->analysis, core->offset, 0); RzList *list = rz_list_new(); HtUP *state = ht_up_new0(); @@ -3236,7 +3236,8 @@ typedef struct { ut64 end_addr; RzAnalysisFunction *fcn; RzAnalysisBlock *cur_bb; - RzList *bbl, *path, *switch_path; + RzList /**/ *bbl, *path; + RzList /**/ *switch_path; } IterCtx; static int find_bb(ut64 *addr, RzAnalysisBlock *bb) { @@ -3845,7 +3846,7 @@ RZ_API int rz_core_search_value_in_range(RzCore *core, RzInterval search_itv, ut typedef struct { HtUU *visited; - RzList *path; + RzList /**/ *path; RzCore *core; ut64 from; RzAnalysisBlock *fromBB; @@ -4356,7 +4357,7 @@ static void relocation_function_process_noreturn(RzCore *core, RzAnalysisBlock * rz_analysis_block_chop_noreturn(b, addr + opsize); } -static void relocation_noreturn_process(RzCore *core, RzList *noretl, SetU *todo, RzAnalysisBlock *b, RzBinReloc *rel, ut64 opsize, ut64 addr) { +static void relocation_noreturn_process(RzCore *core, RzList /**/ *noretl, SetU *todo, RzAnalysisBlock *b, RzBinReloc *rel, ut64 opsize, ut64 addr) { RzListIter *iter3; char *noret; if (rel->import) { @@ -4378,7 +4379,7 @@ static void relocation_noreturn_process(RzCore *core, RzList *noretl, SetU *todo struct core_noretl { RzCore *core; - RzList *noretl; + RzList /**/ *noretl; SetU *todo; }; diff --git a/librz/core/casm.c b/librz/core/casm.c index c7e510c3ced..5aa86b8cbcf 100644 --- a/librz/core/casm.c +++ b/librz/core/casm.c @@ -6,12 +6,12 @@ #include #include -static RzCoreAsmHit *find_addr(RzList *hits, ut64 addr); -static int prune_hits_in_hit_range(RzList *hits, RzCoreAsmHit *hit); +static RzCoreAsmHit *find_addr(RzList /**/ *hits, ut64 addr); +static int prune_hits_in_hit_range(RzList /**/ *hits, RzCoreAsmHit *hit); static int is_hit_inrange(RzCoreAsmHit *hit, ut64 start_range, ut64 end_range); static int is_addr_in_range(ut64 start, ut64 end, ut64 start_range, ut64 end_range); -static void add_hit_to_sorted_hits(RzList *hits, ut64 addr, int len, ut8 is_valid); -static int prune_hits_in_addr_range(RzList *hits, ut64 addr, ut64 len, ut8 is_valid); +static void add_hit_to_sorted_hits(RzList /**/ *hits, ut64 addr, int len, ut8 is_valid); +static int prune_hits_in_addr_range(RzList /**/ *hits, ut64 addr, ut64 len, ut8 is_valid); static int rcoreasm_address_comparator(RzCoreAsmHit *a, RzCoreAsmHit *b) { if (a->addr == b->addr) { @@ -408,7 +408,7 @@ RZ_API RzList /**/ *rz_core_asm_strsearch(RzCore *core, const ch return hits; } -static void add_hit_to_sorted_hits(RzList *hits, ut64 addr, int len, ut8 is_valid) { +static void add_hit_to_sorted_hits(RzList /**/ *hits, ut64 addr, int len, ut8 is_valid) { RzCoreAsmHit *hit = rz_core_asm_hit_new(); if (hit) { RZ_LOG_DEBUG("*** Inserting instruction (valid?: %d): instr_addr: 0x%" PFMT64x " instr_len: %d\n", is_valid, addr, len); @@ -420,7 +420,7 @@ static void add_hit_to_sorted_hits(RzList *hits, ut64 addr, int len, ut8 is_vali } } -static void add_hit_to_hits(RzList *hits, ut64 addr, int len, ut8 is_valid) { +static void add_hit_to_hits(RzList /**/ *hits, ut64 addr, int len, ut8 is_valid) { RzCoreAsmHit *hit = rz_core_asm_hit_new(); if (hit) { RZ_LOG_DEBUG("*** Inserting instruction (valid?: %d): instr_addr: 0x%" PFMT64x " instr_len: %d\n", is_valid, addr, len); @@ -434,7 +434,7 @@ static void add_hit_to_hits(RzList *hits, ut64 addr, int len, ut8 is_valid) { } } -static int prune_hits_in_addr_range(RzList *hits, ut64 addr, ut64 len, ut8 is_valid) { +static int prune_hits_in_addr_range(RzList /**/ *hits, ut64 addr, ut64 len, ut8 is_valid) { RzCoreAsmHit hit = RZ_EMPTY; hit.addr = addr; hit.len = len; @@ -442,7 +442,7 @@ static int prune_hits_in_addr_range(RzList *hits, ut64 addr, ut64 len, ut8 is_va return prune_hits_in_hit_range(hits, &hit); } -static int prune_hits_in_hit_range(RzList *hits, RzCoreAsmHit *hit) { +static int prune_hits_in_hit_range(RzList /**/ *hits, RzCoreAsmHit *hit) { RzListIter *iter, *iter_tmp; RzCoreAsmHit *to_check_hit; int result = 0; @@ -470,7 +470,7 @@ static int prune_hits_in_hit_range(RzList *hits, RzCoreAsmHit *hit) { return result; } -static RzCoreAsmHit *find_addr(RzList *hits, ut64 addr) { +static RzCoreAsmHit *find_addr(RzList /**/ *hits, ut64 addr) { // Find an address in the list of hits RzListIter *addr_iter = NULL; RzCoreAsmHit dummy_value; @@ -479,7 +479,7 @@ static RzCoreAsmHit *find_addr(RzList *hits, ut64 addr) { return rz_list_iter_get_data(addr_iter); } -static int handle_forward_disassemble(RzCore *core, RzList *hits, ut8 *buf, ut64 len, ut64 current_buf_pos, ut64 current_instr_addr, ut64 end_addr) { +static int handle_forward_disassemble(RzCore *core, RzList /**/ *hits, ut8 *buf, ut64 len, ut64 current_buf_pos, ut64 current_instr_addr, ut64 end_addr) { RzCoreAsmHit *hit = NULL, *found_addr = NULL; // forward disassemble from the current instruction up to the end address ut64 temp_instr_addr = current_instr_addr; @@ -660,7 +660,7 @@ RZ_API RzList /**/ *rz_core_asm_bwdisassemble(RzCore *core, ut64 return hits; } -static RzList *rz_core_asm_back_disassemble_all(RzCore *core, ut64 addr, ut64 len, ut64 max_hit_count, ut32 extra_padding) { +static RzList /**/ *rz_core_asm_back_disassemble_all(RzCore *core, ut64 addr, ut64 len, ut64 max_hit_count, ut32 extra_padding) { RzList *hits = rz_core_asm_hit_list_new(); RzCoreAsmHit dummy_value; RzCoreAsmHit *hit = NULL; @@ -717,7 +717,7 @@ static RzList *rz_core_asm_back_disassemble_all(RzCore *core, ut64 addr, ut64 le return hits; } -static RzList *rz_core_asm_back_disassemble(RzCore *core, ut64 addr, int len, ut64 max_hit_count, ut8 disassmble_each_addr, ut32 extra_padding) { +static RzList /**/ *rz_core_asm_back_disassemble(RzCore *core, ut64 addr, int len, ut64 max_hit_count, ut8 disassmble_each_addr, ut32 extra_padding) { RzList *hits; ; RzAsmOp op; diff --git a/librz/core/cbin.c b/librz/core/cbin.c index a8c586f9018..0042a92278c 100644 --- a/librz/core/cbin.c +++ b/librz/core/cbin.c @@ -38,7 +38,7 @@ if (binfile && binfile->rbin && binfile->rbin->verbose) \ eprintf -static RZ_NULLABLE RZ_BORROW const RzList *core_bin_strings(RzCore *r, RzBinFile *file); +static RZ_NULLABLE RZ_BORROW const RzList /**/ *core_bin_strings(RzCore *r, RzBinFile *file); static void table_add_row_bool(RzTable *t, const char *key, bool val) { RzTableColumnType *typeString = rz_table_type("bool"); @@ -1688,7 +1688,7 @@ RZ_API bool rz_core_bin_set_cur(RZ_NONNULL RzCore *core, RZ_NULLABLE RzBinFile * /** * Strings for the given file, respecting settings like bin.strings */ -static RZ_NULLABLE RZ_BORROW const RzList *core_bin_strings(RzCore *r, RzBinFile *file) { +static RZ_NULLABLE RZ_BORROW const RzList /**/ *core_bin_strings(RzCore *r, RzBinFile *file) { rz_return_val_if_fail(r && file, false); RzBinPlugin *plugin = rz_bin_file_cur_plugin(file); if (!plugin || !rz_config_get_i(r->config, "bin.strings")) { @@ -2353,7 +2353,7 @@ static bool digests_pj_cb(void *user, const void *k, const void *v) { return true; } -static void sections_print_json(RzCore *core, PJ *pj, RzBinObject *o, RzBinSection *section, RzList *hashes) { +static void sections_print_json(RzCore *core, PJ *pj, RzBinObject *o, RzBinSection *section, RzList /**/ *hashes) { ut64 addr = get_section_addr(core, o, section); char perms[5]; section_perms_str(perms, section->perm); @@ -2400,7 +2400,7 @@ static void sections_print_json(RzCore *core, PJ *pj, RzBinObject *o, RzBinSecti pj_end(pj); } -static bool sections_print_table(RzCore *core, RzTable *t, RzBinObject *o, RzBinSection *section, RzList *hashes) { +static bool sections_print_table(RzCore *core, RzTable *t, RzBinObject *o, RzBinSection *section, RzList /**/ *hashes) { ut64 addr = get_section_addr(core, o, section); char perms[5]; section_perms_str(perms, section->perm); @@ -2454,7 +2454,7 @@ static bool sections_print_table(RzCore *core, RzTable *t, RzBinObject *o, RzBin return result; } -static void sections_headers_setup(RzCore *core, RzCmdStateOutput *state, RzList *hashes) { +static void sections_headers_setup(RzCore *core, RzCmdStateOutput *state, RzList /**/ *hashes) { RzListIter *iter; char *hashname; @@ -2680,7 +2680,7 @@ RZ_API bool rz_core_bin_segments_print(RZ_NONNULL RzCore *core, RZ_NONNULL RzBin return true; } -static bool strings_print(RzCore *core, RzCmdStateOutput *state, const RzList *list) { +static bool strings_print(RzCore *core, RzCmdStateOutput *state, const RzList /**/ *list) { bool b64str = rz_config_get_i(core->config, "bin.b64str"); int va = (core->io->va || core->bin->is_debugger) ? VA_TRUE : VA_FALSE; RzBinObject *obj = rz_bin_cur_object(core->bin); @@ -4915,7 +4915,7 @@ RZ_API RZ_OWN char *rz_core_bin_pdb_get_filename(RZ_NONNULL RzCore *core) { symstore_path, basename, info->guid, basename); } -static void bin_memory_print_rec(RzCmdStateOutput *state, RzBinMem *mirror, const RzList *mems, int perms) { +static void bin_memory_print_rec(RzCmdStateOutput *state, RzBinMem *mirror, const RzList /**/ *mems, int perms) { RzListIter *it; RzBinMem *mem; @@ -4963,7 +4963,7 @@ RZ_API bool rz_core_bin_memory_print(RZ_NONNULL RzCore *core, RZ_NONNULL RzBinFi return true; } -static void bin_resources_print_standard(RzCore *core, RzList *hashes, RzBinResource *resource) { +static void bin_resources_print_standard(RzCore *core, RzList /**/ *hashes, RzBinResource *resource) { char humansz[8]; rz_num_units(humansz, sizeof(humansz), resource->size); rz_cons_printf("Resource %zd\n", resource->index); @@ -4991,7 +4991,7 @@ static void bin_resources_print_standard(RzCore *core, RzList *hashes, RzBinReso } } -static void bin_resources_print_table(RzCore *core, RzCmdStateOutput *state, RzList *hashes, RzBinResource *resource) { +static void bin_resources_print_table(RzCore *core, RzCmdStateOutput *state, RzList /**/ *hashes, RzBinResource *resource) { rz_table_add_rowf(state->d.t, "dssXxss", resource->index, resource->name, resource->type, resource->vaddr, resource->size, resource->language, resource->time); if (hashes && resource->size > 0) { @@ -5012,7 +5012,7 @@ static void bin_resources_print_table(RzCore *core, RzCmdStateOutput *state, RzL } } -static void bin_resources_print_json(RzCore *core, RzCmdStateOutput *state, RzList *hashes, RzBinResource *resource) { +static void bin_resources_print_json(RzCore *core, RzCmdStateOutput *state, RzList /**/ *hashes, RzBinResource *resource) { pj_o(state->d.pj); pj_ks(state->d.pj, "name", resource->name); pj_ki(state->d.pj, "index", resource->index); diff --git a/librz/core/cdebug.c b/librz/core/cdebug.c index 8dd6b636ac6..f79e4698bc9 100644 --- a/librz/core/cdebug.c +++ b/librz/core/cdebug.c @@ -545,7 +545,7 @@ static int cmp(const void *a, const void *b) { * Used to determine the min & max addresses of maps and * scale the ascii bar to the width of the terminal */ -static int findMinMax(RzList *maps, ut64 *min, ut64 *max, int skip, int width) { +static int findMinMax(RzList /**/ *maps, ut64 *min, ut64 *max, int skip, int width) { RzDebugMap *map; RzListIter *iter; *min = UT64_MAX; @@ -565,7 +565,7 @@ static int findMinMax(RzList *maps, ut64 *min, ut64 *max, int skip, int width) { return (int)(*max - *min) / width; } -static void print_debug_maps_ascii_art(RzDebug *dbg, RzList *maps, ut64 addr, int colors) { +static void print_debug_maps_ascii_art(RzDebug *dbg, RzList /**/ *maps, ut64 addr, int colors) { ut64 mul; // The amount of address space a single console column will represent in bar graph ut64 min = -1, max = 0; int width = rz_cons_get_size(NULL) - 90; diff --git a/librz/core/cfile.c b/librz/core/cfile.c index 63585f84286..cb3f00debb6 100644 --- a/librz/core/cfile.c +++ b/librz/core/cfile.c @@ -53,7 +53,7 @@ static void loadGP(RzCore *core) { } } -static RZ_OWN RzList *__save_old_sections(RzCore *core) { +static RZ_OWN RzList /**/ *__save_old_sections(RzCore *core) { RzList *sections = rz_bin_get_sections(core->bin); RzListIter *it; RzBinSection *sec; @@ -81,7 +81,7 @@ static RZ_OWN RzList *__save_old_sections(RzCore *core) { struct __rebase_struct { RzCore *core; - RzList *old_sections; + RzList /**/ *old_sections; ut64 old_base; ut64 diff; int type; @@ -120,7 +120,7 @@ static bool __rebase_xrefs(void *user, const ut64 k, const void *v) { return true; } -static void __rebase_everything(RzCore *core, RzList *old_sections, ut64 old_base) { +static void __rebase_everything(RzCore *core, RzList /**/ *old_sections, ut64 old_base) { RzListIter *it, *itit, *ititit; RzAnalysisFunction *fcn; ut64 new_base = core->bin->cur->o->baddr_shift; diff --git a/librz/core/cgraph.c b/librz/core/cgraph.c index d71fdd9ae8c..5e1c99ee2b7 100644 --- a/librz/core/cgraph.c +++ b/librz/core/cgraph.c @@ -17,7 +17,7 @@ static inline char *core_flag_name(const RzCore *core, ut64 addr) { return item ? strdup(item->name) : rz_str_newf("0x%08" PFMT64x, addr); } -static inline void core_graph_dataref(RzCore *core, RzAnalysisFunction *fcn, RzGraph *graph) { +static inline void core_graph_dataref(RzCore *core, RzAnalysisFunction *fcn, RzGraph /**/ *graph) { if (!fcn) { return; } @@ -72,7 +72,7 @@ RZ_API RZ_OWN RzGraph /**/ *rz_core_graph_datarefs(RZ_NONNULL return graph; } -static void core_graph_coderef(RzCore *core, RzAnalysisFunction *fcn, RzGraph *graph) { +static void core_graph_coderef(RzCore *core, RzAnalysisFunction *fcn, RzGraph /**/ *graph) { if (!fcn) { return; } @@ -123,7 +123,7 @@ RZ_API RZ_OWN RzGraph /**/ *rz_core_graph_coderefs(RZ_NONNULL return graph; } -static void add_single_addr_xrefs(RzCore *core, ut64 addr, RzGraph *graph) { +static void add_single_addr_xrefs(RzCore *core, ut64 addr, RzGraph /**/ *graph) { char *me = core_flag_name(core, addr); RzGraphNode *curr_node = rz_graph_add_node_info(graph, me, NULL, addr); RZ_FREE(me); @@ -174,7 +174,7 @@ RZ_API RZ_OWN RzGraph /**/ *rz_core_graph_importxrefs(RZ_NONN /** * \brief Get the graph of code cross references to \p addr. */ -RZ_API RzGraph /**/ *rz_core_graph_codexrefs(RzCore *core, ut64 addr) { +RZ_API RZ_OWN RzGraph /**/ *rz_core_graph_codexrefs(RZ_NONNULL RzCore *core, ut64 addr) { rz_return_val_if_fail(core && core->analysis, NULL); RzGraph *graph = rz_graph_new(); if (!graph) { @@ -184,7 +184,7 @@ RZ_API RzGraph /**/ *rz_core_graph_codexrefs(RzCore *core, ut return graph; } -static void core_graph_fn_call(RzCore *core, RzAnalysisFunction *fcn, RzGraph *graph) { +static void core_graph_fn_call(RzCore *core, RzAnalysisFunction *fcn, RzGraph /**/ *graph) { if (!fcn) { return; } @@ -266,7 +266,7 @@ static inline char *block_diff(RzCore *core, ut64 addr, RzAnalysisBlock *bb) { return body; } -static inline RzGraphNode *graph_add_cached(RzCore *core, HtUP *cache, RzAnalysisBlock *bb, ut64 offset, RzGraph *graph, GraphBodyFn body_fn) { +static inline RzGraphNode *graph_add_cached(RzCore *core, HtUP *cache, RzAnalysisBlock *bb, ut64 offset, RzGraph /**/ *graph, GraphBodyFn body_fn) { RzGraphNode *node = (RzGraphNode *)ht_up_find(cache, offset, NULL); if (node) { return node; @@ -281,7 +281,7 @@ static inline RzGraphNode *graph_add_cached(RzCore *core, HtUP *cache, RzAnalysi return node; } -static void core_graph_fn_bbs(RzCore *core, RzAnalysisFunction *fcn, RzGraph *graph, HtUP *cache, GraphBodyFn body_fn) { +static void core_graph_fn_bbs(RzCore *core, RzAnalysisFunction *fcn, RzGraph /**/ *graph, HtUP *cache, GraphBodyFn body_fn) { if (!(fcn && fcn->bbs)) { return; } diff --git a/librz/core/cmd/cmd.c b/librz/core/cmd/cmd.c index 99746238321..a4abbc433b0 100644 --- a/librz/core/cmd/cmd.c +++ b/librz/core/cmd/cmd.c @@ -164,7 +164,7 @@ RZ_API void rz_core_cmd_help(const RzCore *core, const char *help[]) { } struct duplicate_flag_t { - RzList *ret; + RzList /**/ *ret; const char *word; }; @@ -3356,7 +3356,7 @@ static char *do_handle_substitution_cmd(struct tsr2cmd_state *state, TSNode inn_ return out; } -static void handle_cmd_substitution_arg(struct tsr2cmd_state *state, TSNode arg, RzList *edits) { +static void handle_cmd_substitution_arg(struct tsr2cmd_state *state, TSNode arg, RzList /**/ *edits) { TSNode inn_cmd = ts_node_child(arg, 1); rz_return_if_fail(!ts_node_is_null(inn_cmd)); char *out = do_handle_substitution_cmd(state, inn_cmd); @@ -3395,7 +3395,7 @@ static bool is_handled_args(TSNode args) { is_ts_cmd_substitution_arg(args) || is_ts_grep_specifier(args); } -static void handle_substitution_args(struct tsr2cmd_state *state, TSNode args, RzList *edits) { +static void handle_substitution_args(struct tsr2cmd_state *state, TSNode args, RzList /**/ *edits) { if (is_group_of_args(args)) { uint32_t n_children = ts_node_named_child_count(args); uint32_t i; @@ -3475,7 +3475,7 @@ static RzCmdParsedArgs *parse_args(struct tsr2cmd_state *state, TSNode args, boo } } -static TSTree *apply_edits(struct tsr2cmd_state *state, RzList *edits) { +static TSTree *apply_edits(struct tsr2cmd_state *state, RzList /**/ *edits) { struct tsr2cmd_edit *edit; RzListIter *it; @@ -3511,7 +3511,7 @@ static void substitute_args_init(struct tsr2cmd_state *state, TSNode command) { RZ_LOG_DEBUG("Shrinking input to '%s'\n", state->input); } -static bool substitute_args_do(struct tsr2cmd_state *state, RzList *edits, TSNode *new_command) { +static bool substitute_args_do(struct tsr2cmd_state *state, RzList /**/ *edits, TSNode *new_command) { TSTree *new_tree = apply_edits(state, edits); if (!new_tree) { return false; diff --git a/librz/core/cmd/cmd_analysis.c b/librz/core/cmd/cmd_analysis.c index dd7e3e1a895..8778f228c82 100644 --- a/librz/core/cmd/cmd_analysis.c +++ b/librz/core/cmd/cmd_analysis.c @@ -727,7 +727,7 @@ static void core_analysis_bytes_standard(RzCore *core, const ut8 *buf, int len, #undef PRINTF_LN_NOT #undef PRINTF_LN_STR -static char *fcnjoin(RzList *list) { +static char *fcnjoin(RzList /**/ *list) { RzAnalysisFunction *n; RzListIter *iter; RzStrBuf buf; @@ -740,7 +740,7 @@ static char *fcnjoin(RzList *list) { return s; } -static char *ut64join(RzList *list) { +static char *ut64join(RzList /**/ *list) { ut64 *n; RzListIter *iter; RzStrBuf buf; @@ -1124,11 +1124,11 @@ static void cmd_address_info(RzCore *core, const ut64 addr, RzCmdStateOutput *st } typedef struct { - RzList *regs; - RzList *regread; - RzList *regwrite; - RzList *regvalues; - RzList *inputregs; + RzList /**/ *regs; + RzList /**/ *regread; + RzList /**/ *regwrite; + RzList /**/ *regvalues; + RzList /**/ *inputregs; } AeaStats; static void aea_stats_init(AeaStats *stats) { @@ -1146,7 +1146,7 @@ static void aea_stats_fini(AeaStats *stats) { RZ_FREE(stats->inputregs); } -static bool contains(RzList *list, const char *name) { +static bool contains(RzList /**/ *list, const char *name) { RzListIter *iter; const char *n; rz_list_foreach (list, iter, n) { @@ -1246,7 +1246,7 @@ static int myregread(RzAnalysisEsil *esil, const char *name, ut64 *val, int *len return 0; } -static void showregs(RzList *list) { +static void showregs(RzList /**/ *list) { if (!rz_list_empty(list)) { char *reg; RzListIter *iter; @@ -1260,7 +1260,7 @@ static void showregs(RzList *list) { rz_cons_newline(); } -static void showmem(RzList *list) { +static void showmem(RzList /**/ *list) { if (!rz_list_empty(list)) { AeaMemItem *item; RzListIter *iter; @@ -1271,7 +1271,7 @@ static void showmem(RzList *list) { rz_cons_newline(); } -static void showregs_json(RzList *list, PJ *pj) { +static void showregs_json(RzList /**/ *list, PJ *pj) { pj_a(pj); if (!rz_list_empty(list)) { char *reg; @@ -1284,7 +1284,7 @@ static void showregs_json(RzList *list, PJ *pj) { pj_end(pj); } -static void showmem_json(RzList *list, PJ *pj) { +static void showmem_json(RzList /**/ *list, PJ *pj) { pj_a(pj); if (!rz_list_empty(list)) { RzListIter *iter; @@ -2897,7 +2897,7 @@ static void xref_print_to_json(RZ_UNUSED RzCore *core, RzAnalysisXRef *xref, PJ pj_end(pj); } -static void xref_list_print_to_json(RZ_UNUSED RzCore *core, RzList *list, PJ *pj) { +static void xref_list_print_to_json(RZ_UNUSED RzCore *core, RzList /**/ *list, PJ *pj) { RzAnalysisXRef *xref; RzListIter *iter; pj_a(pj); @@ -3674,7 +3674,7 @@ RZ_IPI RzCmdStatus rz_analysis_xrefs_set_s_handler(RzCore *core, int argc, const return xrefs_set(core, argc, argv, RZ_ANALYSIS_XREF_TYPE_STRING); } -static void xrefs_list_print(RzCore *core, RzList *list) { +static void xrefs_list_print(RzCore *core, RzList /**/ *list) { RzListIter *iter; RzAnalysisXRef *xref; @@ -3715,7 +3715,7 @@ static const char *xref_type2cmd(RzAnalysisXRefType type) { return "ax"; } -static void xref_list_print_as_cmd(RZ_UNUSED RzCore *core, RzList *list) { +static void xref_list_print_as_cmd(RZ_UNUSED RzCore *core, RzList /**/ *list) { RzListIter *iter; RzAnalysisXRef *xref; rz_list_foreach (list, iter, xref) { @@ -4048,7 +4048,7 @@ static int RzAnalysisRef_cmp(const RzAnalysisXRef *xref1, const RzAnalysisXRef * return xref1->to != xref2->to; } -static void function_list_print_to_table(RzCore *core, RzList *list, RzTable *t, bool verbose) { +static void function_list_print_to_table(RzCore *core, RzList /**/ *list, RzTable *t, bool verbose) { RzTableColumnType *typeString = rz_table_type("string"); RzTableColumnType *typeNumber = rz_table_type("number"); rz_table_add_column(t, typeNumber, "addr", 0); @@ -4118,7 +4118,7 @@ static void function_list_print_to_table(RzCore *core, RzList *list, RzTable *t, } } -static void function_list_print(RzCore *core, RzList *list) { +static void function_list_print(RzCore *core, RzList /**/ *list) { RzListIter *it; RzAnalysisFunction *fcn; rz_list_foreach (list, it, fcn) { @@ -4137,7 +4137,7 @@ static void function_list_print(RzCore *core, RzList *list) { } } -static void function_list_print_quiet(RZ_UNUSED RzCore *core, RzList *list) { +static void function_list_print_quiet(RZ_UNUSED RzCore *core, RzList /**/ *list) { RzListIter *it; RzAnalysisFunction *fcn; rz_list_foreach (list, it, fcn) { @@ -4186,7 +4186,7 @@ static void fcn_list_bbs(RzAnalysisFunction *fcn) { } } -static void function_list_print_as_cmd(RzCore *core, RzList *list, RzCmdStateOutput *state) { +static void function_list_print_as_cmd(RzCore *core, RzList /**/ *list, RzCmdStateOutput *state) { RzListIter *it; RzAnalysisFunction *fcn; rz_list_foreach (list, it, fcn) { @@ -4338,7 +4338,7 @@ static void function_print_to_json(RzCore *core, RzAnalysisFunction *fcn, RzCmdS pj_end(state->d.pj); } -static void function_list_print_to_json(RzCore *core, RzList *list, RzCmdStateOutput *state) { +static void function_list_print_to_json(RzCore *core, RzList /**/ *list, RzCmdStateOutput *state) { RzListIter *it; RzAnalysisFunction *fcn; pj_a(state->d.pj); @@ -4407,7 +4407,7 @@ RZ_IPI RzCmdStatus rz_analysis_function_size_sum_handler(RzCore *core, int argc, } // Lists function names and their calls (uniqified) -static void function_print_calls(RzCore *core, RzList *fcns, RzCmdStateOutput *state) { +static void function_print_calls(RzCore *core, RzList /**/ *fcns, RzCmdStateOutput *state) { PJ *pj = state->d.pj; if (state->mode == RZ_OUTPUT_MODE_JSON) { pj_a(pj); @@ -4635,7 +4635,7 @@ static void fcn_print_info(RzCore *core, RzAnalysisFunction *fcn, RzCmdStateOutp } } -static void fcn_list_print_info(RzCore *core, RzList *fcns, RzCmdStateOutput *state) { +static void fcn_list_print_info(RzCore *core, RzList /**/ *fcns, RzCmdStateOutput *state) { RzListIter *iter; RzAnalysisFunction *fcn; rz_list_foreach (fcns, iter, fcn) { @@ -4757,7 +4757,7 @@ static void gather_opcode_stat_for_fcn(RzCore *core, HtPU *ht, RzAnalysisFunctio } } -static bool list_keys_cb(RzList *list, char *k, RZ_UNUSED ut64 v) { +static bool list_keys_cb(RzList /**/ *list, char *k, RZ_UNUSED ut64 v) { rz_list_push(list, k); return true; } @@ -6387,7 +6387,7 @@ RZ_IPI RzCmdStatus rz_analysis_all_esil_functions_handler(RzCore *core, int argc return RZ_CMD_STATUS_OK; } -static RzList *get_xrefs(RzAnalysisBlock *block) { +static RzList /**/ *get_xrefs(RzAnalysisBlock *block) { RzListIter *iter; RzAnalysisXRef *xref; RzList *list = NULL; @@ -6405,7 +6405,7 @@ static RzList *get_xrefs(RzAnalysisBlock *block) { return list; } -static RzList *get_calls(RzAnalysisBlock *block) { +static RzList /**/ *get_calls(RzAnalysisBlock *block) { ut8 *data = malloc(block->size); if (!data) { return NULL; diff --git a/librz/core/cmd/cmd_api.c b/librz/core/cmd/cmd_api.c index 9e81f00be7d..792602e89c7 100644 --- a/librz/core/cmd/cmd_api.c +++ b/librz/core/cmd/cmd_api.c @@ -1686,7 +1686,7 @@ static bool macros_to_list(void *user, const void *key, const void *value) { * \param cmd Reference to RzCmd * \return List of macros */ -RZ_API RZ_OWN RzList /**/ *rz_cmd_macro_list(RZ_NONNULL RzCmd *cmd) { +RZ_API RZ_OWN RzList /**/ *rz_cmd_macro_list(RZ_NONNULL RzCmd *cmd) { rz_return_val_if_fail(cmd, NULL); RzList *res = rz_list_new(); diff --git a/librz/core/cmd/cmd_debug.c b/librz/core/cmd/cmd_debug.c index d60a54e95cd..72c08ad0507 100644 --- a/librz/core/cmd/cmd_debug.c +++ b/librz/core/cmd/cmd_debug.c @@ -179,7 +179,7 @@ static const char *help_msg_dx[] = { }; struct dot_trace_ght { - RzGraph *graph; + RzGraph /**/ *graph; Sdb *graphnodes; }; @@ -239,7 +239,7 @@ static void cmd_debug_cont_syscall(RzCore *core, const char *_str) { free(syscalls); } -static RzGraphNode *get_graphtrace_node(RzGraph *g, Sdb *nodes, struct trace_node *tn) { +static RzGraphNode *get_graphtrace_node(RzGraph /**/ *g, Sdb *nodes, struct trace_node *tn) { RzGraphNode *gn; char tn_key[TN_KEY_LEN]; @@ -483,7 +483,7 @@ RZ_API void rz_core_dbg_follow_seek_register(RzCore *core) { rz_core_debug_sync_bits(core); } -static bool step_until_optype(RzCore *core, RzList *optypes_list) { +static bool step_until_optype(RzCore *core, RzList /**/ *optypes_list) { RzAnalysisOp op; ut8 buf[32]; ut64 pc; @@ -1452,7 +1452,7 @@ RZ_API void rz_core_debug_clear_register_flags(RzCore *core) { foreach_reg_set_or_clear(core, false); } -static void backtrace_vars(RzCore *core, RzList *frames) { +static void backtrace_vars(RzCore *core, RzList /**/ *frames) { RzDebugFrame *f; RzListIter *iter; // analysis vs debug ? @@ -1513,7 +1513,7 @@ static void backtrace_vars(RzCore *core, RzList *frames) { rz_reg_setv(r, sp, dsp); } -static void asciiart_backtrace(RzCore *core, RzList *frames) { +static void asciiart_backtrace(RzCore *core, RzList /**/ *frames) { // TODO: show local variables // TODO: show function/flags/symbols related // TODO: show contents of stack diff --git a/librz/core/cmd/cmd_eval.c b/librz/core/cmd/cmd_eval.c index bc7d97dbb9b..6544878f6e1 100644 --- a/librz/core/cmd/cmd_eval.c +++ b/librz/core/cmd/cmd_eval.c @@ -19,7 +19,7 @@ static bool load_theme(RzCore *core, const char *path) { return res; } -static bool pal_seek(RzCore *core, RzConsPalSeekMode mode, const char *file, RzListIter *iter) { +static bool pal_seek(RzCore *core, RzConsPalSeekMode mode, const char *file, RzListIter /**/ *iter) { const char *fn = rz_str_lchr(file, '/'); if (!fn) { fn = file; diff --git a/librz/core/cmd/cmd_flag.c b/librz/core/cmd/cmd_flag.c index 86af8146b8c..e66f299a65a 100644 --- a/librz/core/cmd/cmd_flag.c +++ b/librz/core/cmd/cmd_flag.c @@ -22,7 +22,7 @@ static size_t countMatching(const char *a, const char *b) { return matches; } -static const char *__isOnlySon(RzCore *core, RzList *flags, const char *kw) { +static const char *__isOnlySon(RzCore *core, RzList /**/ *flags, const char *kw) { RzListIter *iter; RzFlagItem *f; @@ -40,7 +40,7 @@ static const char *__isOnlySon(RzCore *core, RzList *flags, const char *kw) { return fname; } -static RzList *__childrenFlagsOf(RzCore *core, RzList *flags, const char *prefix) { +static RzList /**/ *__childrenFlagsOf(RzCore *core, RzList /**/ *flags, const char *prefix) { RzList *list = rz_list_newf(free); RzListIter *iter, *iter2; RzFlagItem *f, *f2; @@ -129,9 +129,7 @@ static RzList *__childrenFlagsOf(RzCore *core, RzList *flags, const char *prefix return list; } -static void __printRecursive(RzCore *core, RzList *list, const char *name, RzOutputMode mode, int depth); - -static void __printRecursive(RzCore *core, RzList *flags, const char *name, RzOutputMode mode, int depth) { +static void __printRecursive(RzCore *core, RzList /**/ *flags, const char *name, RzOutputMode mode, int depth) { char *fn; RzListIter *iter; if (mode == RZ_OUTPUT_MODE_RIZIN && RZ_STR_ISEMPTY(name)) { diff --git a/librz/core/cmd/cmd_info.c b/librz/core/cmd/cmd_info.c index 03abf330ace..a0548293430 100644 --- a/librz/core/cmd/cmd_info.c +++ b/librz/core/cmd/cmd_info.c @@ -26,7 +26,7 @@ static int bin_is_executable(RzBinObject *obj) { return false; } -static bool is_equal_file_hashes(RzList *lfile_hashes, RzList *rfile_hashes, bool *equal) { +static bool is_equal_file_hashes(RzList /**/ *lfile_hashes, RzList /**/ *rfile_hashes, bool *equal) { rz_return_val_if_fail(lfile_hashes, false); rz_return_val_if_fail(rfile_hashes, false); rz_return_val_if_fail(equal, false); diff --git a/librz/core/cmd/cmd_print.c b/librz/core/cmd/cmd_print.c index 717285ff926..e9aa35937e4 100644 --- a/librz/core/cmd/cmd_print.c +++ b/librz/core/cmd/cmd_print.c @@ -869,7 +869,7 @@ static void cmd_pCd(RzCore *core, const char *input) { free(o_ab); } -static void findMethodBounds(RzList *methods, ut64 *min, ut64 *max) { +static void findMethodBounds(RzList /**/ *methods, ut64 *min, ut64 *max) { RzBinSymbol *sym; RzListIter *iter; ut64 at_min = UT64_MAX; diff --git a/librz/core/cmd/cmd_regs.c b/librz/core/cmd/cmd_regs.c index ae4bb57d1be..2df7903e0e1 100644 --- a/librz/core/cmd/cmd_regs.c +++ b/librz/core/cmd/cmd_regs.c @@ -33,7 +33,7 @@ HEAPTYPE(ut64); rz_core_reg_update_flags(core); \ } while (0) -static RzList *filter_reg_items(RzReg *reg, RZ_NULLABLE const char *filter) { +static RzList /**/ *filter_reg_items(RzReg *reg, RZ_NULLABLE const char *filter) { rz_return_val_if_fail(reg, NULL); // default if (RZ_STR_ISEMPTY(filter)) { @@ -343,7 +343,7 @@ RZ_IPI RzCmdStatus rz_regs_columns_handler(RzCore *core, RzReg *reg, RzCmdRegSyn return RZ_CMD_STATUS_OK; } -static RzCmdStatus references_handler(RzCore *core, RzReg *reg, RzCmdRegSync sync_cb, RzList *ritems, RzOutputMode mode) { +static RzCmdStatus references_handler(RzCore *core, RzReg *reg, RzCmdRegSync sync_cb, RzList /**/ *ritems, RzOutputMode mode) { bool failed; SYNC_READ_LIST(ritems, failed); if (failed) { @@ -420,7 +420,7 @@ static bool valgroup_regcb(void *u, const ut64 k, const void *v) { return true; } -RZ_IPI void rz_regs_show_valgroup(RzCore *core, RzReg *reg, RzCmdRegSync sync_cb, const RzList *list) { +RZ_IPI void rz_regs_show_valgroup(RzCore *core, RzReg *reg, RzCmdRegSync sync_cb, const RzList /**/ *list) { int use_colors = rz_config_get_i(core->config, "scr.color"); RzListIter *iter; diff --git a/librz/core/cmd/cmd_search.c b/librz/core/cmd/cmd_search.c index 62b9710957f..d4c9bc73f63 100644 --- a/librz/core/cmd/cmd_search.c +++ b/librz/core/cmd/cmd_search.c @@ -158,7 +158,7 @@ static const char *searchprefix = NULL; struct search_parameters { RzCore *core; - RzList *boundaries; + RzList /**/ *boundaries; const char *mode; const char *cmd_hit; PJ *pj; @@ -532,7 +532,7 @@ static inline void print_search_progress(ut64 at, ut64 to, int n, struct search_ } } -static void append_bound(RzList *list, RzIO *io, RzInterval search_itv, ut64 from, ut64 size, int perms) { +static void append_bound(RzList /**/ *list, RzIO *io, RzInterval search_itv, ut64 from, ut64 size, int perms) { RzIOMap *map = RZ_NEW0(RzIOMap); if (!map) { return; @@ -987,7 +987,7 @@ static bool insert_into(void *user, const ut64 k, const ut64 v) { } // TODO: follow unconditional jumps -static RzList *construct_rop_gadget(RzCore *core, ut64 addr, ut8 *buf, int buflen, int idx, const char *grep, int regex, RzList *rx_list, struct endlist_pair *end_gadget, HtUU *badstart) { +static RzList /**/ *construct_rop_gadget(RzCore *core, ut64 addr, ut8 *buf, int buflen, int idx, const char *grep, int regex, RzList /**/ *rx_list, struct endlist_pair *end_gadget, HtUU *badstart) { int endaddr = end_gadget->instr_offset; int branch_delay = end_gadget->delay_size; RzAnalysisOp aop = { 0 }; @@ -1121,7 +1121,7 @@ static RzList *construct_rop_gadget(RzCore *core, ut64 addr, ut8 *buf, int bufle return hitlist; } -static void print_rop(RzCore *core, RzList *hitlist, PJ *pj, int mode) { +static void print_rop(RzCore *core, RzList /**/ *hitlist, PJ *pj, int mode) { RzCoreAsmHit *hit = NULL; RzListIter *iter; RzList *ropList = NULL; @@ -1288,7 +1288,7 @@ static int rz_core_search_rop(RzCore *core, RzInterval search_itv, int opt, cons int max_count = rz_config_get_i(core->config, "search.maxhits"); int i = 0, end = 0, mode = 0, increment = 1, ret, result = true; RzList /**/ *end_list = rz_list_newf(free); - RzList /**/ *rx_list = NULL; + RzList /**/ *rx_list = NULL; int align = core->search->align; RzListIter *itermap = NULL; char *tok, *gregexp = NULL; @@ -2605,7 +2605,7 @@ void _CbInRangeSearchV(RzCore *core, ut64 from, ut64 to, int vsize, void *user) } } -static ut8 *v_writebuf(RzCore *core, RzList *nums, int len, char ch, int bsize) { +static ut8 *v_writebuf(RzCore *core, RzList /**/ *nums, int len, char ch, int bsize) { ut8 *ptr; ut64 n64; ut32 n32; diff --git a/librz/core/cmd/cmd_search_rop.c b/librz/core/cmd/cmd_search_rop.c index 8f5e93d8b6a..ecf5750e0d9 100644 --- a/librz/core/cmd/cmd_search_rop.c +++ b/librz/core/cmd/cmd_search_rop.c @@ -8,7 +8,7 @@ #include "rz_list.h" #include "rz_types_base.h" -static RzList *parse_list(const char *str) { +static RzList /**/ *parse_list(const char *str) { char *line, *data, *str_n; if (!str) { @@ -24,7 +24,7 @@ static RzList *parse_list(const char *str) { return list; } -static RzList *get_constants(const char *str) { +static RzList /**/ *get_constants(const char *str) { RzList *list; char *p, *data; if (!str) { @@ -211,7 +211,7 @@ static void esil_split_flg(char *esil_str, char **esil_main, char **esil_flg) { mem_write = NULL; \ } -static char *rop_classify_constant(RzCore *core, RzList *ropList) { +static char *rop_classify_constant(RzCore *core, RzList /**/ *ropList) { char *esil_str, *constant; char *ct = NULL, *esil_main = NULL, *esil_flg = NULL, *out = NULL; RzListIter *iter_r, *iter_dst, *iter_const; @@ -297,7 +297,7 @@ static char *rop_classify_constant(RzCore *core, RzList *ropList) { return NULL; } -static char *rop_classify_mov(RzCore *core, RzList *ropList) { +static char *rop_classify_mov(RzCore *core, RzList /**/ *ropList) { char *esil_str; char *mov = NULL, *esil_main = NULL, *esil_flg = NULL, *out = NULL; RzListIter *iter_src, *iter_r, *iter_dst; @@ -391,7 +391,7 @@ static char *rop_classify_mov(RzCore *core, RzList *ropList) { return NULL; } -static char *rop_classify_arithmetic(RzCore *core, RzList *ropList) { +static char *rop_classify_arithmetic(RzCore *core, RzList /**/ *ropList) { char *esil_str, *op; char *arithmetic = NULL, *esil_flg = NULL, *esil_main = NULL, *out = NULL; @@ -519,7 +519,7 @@ static char *rop_classify_arithmetic(RzCore *core, RzList *ropList) { return NULL; } -static char *rop_classify_arithmetic_const(RzCore *core, RzList *ropList) { +static char *rop_classify_arithmetic_const(RzCore *core, RzList /**/ *ropList) { char *esil_str, *op, *constant; char *arithmetic = NULL, *esil_flg = NULL, *esil_main = NULL; RzListIter *iter_src1, *iter_r, *iter_dst, *iter_ops, *iter_const; @@ -643,7 +643,7 @@ static char *rop_classify_arithmetic_const(RzCore *core, RzList *ropList) { return arithmetic; } -static int rop_classify_nops(RzCore *core, RzList *ropList) { +static int rop_classify_nops(RzCore *core, RzList /**/ *ropList) { char *esil_str; int changes = 1; RzListIter *iter_r; @@ -673,7 +673,7 @@ static int rop_classify_nops(RzCore *core, RzList *ropList) { return changes; } -static void rop_classify(RzCore *core, Sdb *db, RzList *ropList, const char *key, unsigned int size) { +static void rop_classify(RzCore *core, Sdb *db, RzList /**/ *ropList, const char *key, unsigned int size) { int nop = 0; rop_classify_nops(core, ropList); char *mov, *ct, *arithm, *arithm_ct, *str; diff --git a/librz/core/cmeta.c b/librz/core/cmeta.c index ca872ee1e31..b008c30700f 100644 --- a/librz/core/cmeta.c +++ b/librz/core/cmeta.c @@ -295,7 +295,7 @@ typedef struct { RzAnalysisMetaType type; const RzSpace *space; - RzPVector /*RzIntervalNode*/ *result; + RzPVector /**/ *result; } CollectCtx; static bool item_matches_filter(RzAnalysisMetaItem *item, RzAnalysisMetaType type, RZ_NULLABLE const RzSpace *space) { @@ -310,7 +310,7 @@ static bool collect_nodes_cb(RzIntervalNode *node, void *user) { return true; } -static RzPVector *collect_nodes_at(RzAnalysis *analysis, RzAnalysisMetaType type, RZ_NULLABLE const RzSpace *space, ut64 addr) { +static RzPVector /**/ *collect_nodes_at(RzAnalysis *analysis, RzAnalysisMetaType type, RZ_NULLABLE const RzSpace *space, ut64 addr) { CollectCtx ctx = { .type = type, .space = space, diff --git a/librz/core/core.c b/librz/core/core.c index a3f3aacb14c..99921022086 100644 --- a/librz/core/core.c +++ b/librz/core/core.c @@ -362,7 +362,7 @@ static ut64 numget(RzCore *core, const char *k) { return rz_num_math(core->num, k); } -static const RzList *__flagsGet(RzCore *core, ut64 offset) { +static const RzList /**/ *__flagsGet(RzCore *core, ut64 offset) { return rz_flag_get_list(core->flags, offset); } diff --git a/librz/core/core_private.h b/librz/core/core_private.h index 17e85db130a..cd4fbc14f1e 100644 --- a/librz/core/core_private.h +++ b/librz/core/core_private.h @@ -113,7 +113,7 @@ RZ_IPI void rz_core_agraph_print_gml(RzCore *core); RZ_IPI bool rz_core_agraph_print(RzCore *core, RzCoreGraphFormat format); RZ_IPI bool rz_core_agraph_is_shortcuts(RzCore *core, RzAGraph *g); RZ_IPI bool rz_core_agraph_add_shortcut(RzCore *core, RzAGraph *g, RzANode *an, ut64 addr, char *title); -RZ_IPI bool rz_core_agraph_apply(RzCore *core, RzGraph *graph); +RZ_IPI bool rz_core_agraph_apply(RzCore *core, RzGraph /**/ *graph); /* cgraph.c */ RZ_IPI bool rz_core_graph_print_graph(RZ_NONNULL RzCore *core, RZ_NONNULL RzGraph /**/ *graph, RzCoreGraphFormat format, bool use_offset); @@ -124,7 +124,7 @@ RZ_IPI RzCmdStatus rz_core_binxtr_plugin_print(const RzBinXtrPlugin *bx, RzCmdSt /* creg.c */ RZ_IPI RzList /**/ *rz_core_reg_flags_candidates(RzCore *core, RzReg *reg); -RZ_IPI void rz_core_reg_print_diff(RzReg *reg, RzList *items); +RZ_IPI void rz_core_reg_print_diff(RzReg *reg, RzList /**/ *items); /* cdebug.c */ RZ_IPI void rz_core_debug_sync_bits(RzCore *core); @@ -178,7 +178,7 @@ RZ_IPI RzCmdStatus rz_macros_handler(RzCore *core, const char *name, const char RZ_IPI RzCmdStatus rz_regs_handler(RzCore *core, RzReg *reg, RzCmdRegSync sync_cb, int argc, const char **argv, RzCmdStateOutput *state); RZ_IPI RzCmdStatus rz_regs_columns_handler(RzCore *core, RzReg *reg, RzCmdRegSync sync_cb, int argc, const char **argv); RZ_IPI RzCmdStatus rz_regs_references_handler(RzCore *core, RzReg *reg, RzCmdRegSync sync_cb, int argc, const char **argv, RzOutputMode mode); -RZ_IPI void rz_regs_show_valgroup(RzCore *core, RzReg *reg, RzCmdRegSync sync_cb, const RzList *list); +RZ_IPI void rz_regs_show_valgroup(RzCore *core, RzReg *reg, RzCmdRegSync sync_cb, const RzList /**/ *list); RZ_IPI RzCmdStatus rz_regs_valgroup_handler(RzCore *core, RzReg *reg, RzCmdRegSync sync_cb, int argc, const char **argv); RZ_IPI RzCmdStatus rz_reg_arenas_handler(RzCore *core, RzReg *reg, int argc, const char **argv); RZ_IPI RzCmdStatus rz_reg_arenas_push_handler(RzCore *core, RzReg *reg, RzCmdRegSync sync_cb, int argc, const char **argv); @@ -257,7 +257,7 @@ typedef struct rz_core_visual_tab_t { } RzCoreVisualTab; typedef struct rz_core_visual_t { - RzList *tabs; + RzList /**/ *tabs; int tab; bool is_inputing; // whether the user is inputing char *inputing; // for filter on the go in Vv mode diff --git a/librz/core/cpdb.c b/librz/core/cpdb.c index 1ded5bed846..f31a66fd73c 100644 --- a/librz/core/cpdb.c +++ b/librz/core/cpdb.c @@ -5,7 +5,7 @@ #include #include "../bin/pdb/pdb.h" -static void pdb_types_print_standard(const RzTypeDB *db, const RzPdb *pdb, const RzList *types) { +static void pdb_types_print_standard(const RzTypeDB *db, const RzPdb *pdb, const RzList /**/ *types) { rz_return_if_fail(pdb && db && types); if (!types) { RZ_LOG_ERROR("core: there is nothing to print!\n"); @@ -21,7 +21,7 @@ static void pdb_types_print_standard(const RzTypeDB *db, const RzPdb *pdb, const return; } -static void pdb_types_print_json(const RzTypeDB *db, const RzPdb *pdb, const RzList *types, PJ *pj) { +static void pdb_types_print_json(const RzTypeDB *db, const RzPdb *pdb, const RzList /**/ *types, PJ *pj) { rz_return_if_fail(db && pdb && types && pj); RzListIter *it; RzBaseType *type; diff --git a/librz/core/cprint.c b/librz/core/cprint.c index e925132fab6..e146e691a82 100644 --- a/librz/core/cprint.c +++ b/librz/core/cprint.c @@ -192,7 +192,7 @@ RZ_IPI void rz_core_print_hexdiff(RZ_NONNULL RzCore *core, ut64 aa, RZ_NONNULL c /** * \brief Print hexdump diff between \p aa and \p ba with \p len */ -RZ_API char *rz_core_print_hexdump_diff_str(RZ_NONNULL RzCore *core, ut64 aa, ut64 ba, ut64 len) { +RZ_API RZ_OWN char *rz_core_print_hexdump_diff_str(RZ_NONNULL RzCore *core, ut64 aa, ut64 ba, ut64 len) { rz_return_val_if_fail(core && core->cons && len > 0, false); ut8 *a = malloc(len); if (!a) { @@ -278,7 +278,7 @@ static inline void len_fixup(RzCore *core, ut64 *addr, int *len) { * \param len Dump bytes length * \param format Print format, such as RZ_CORE_PRINT_FORMAT_TYPE_HEXADECIMAL */ -RZ_API char *rz_core_print_dump_str(RZ_NONNULL RzCore *core, RzOutputMode mode, +RZ_API RZ_OWN char *rz_core_print_dump_str(RZ_NONNULL RzCore *core, RzOutputMode mode, ut64 addr, ut8 n, int len, RzCorePrintFormatType format) { rz_return_val_if_fail(core, false); if (!len) { @@ -335,7 +335,7 @@ RZ_IPI bool rz_core_print_dump(RZ_NONNULL RzCore *core, RzOutputMode mode, * \brief Print hexdump at \p addr, but maybe print hexdiff if (diff.from or diff.to), \see "el diff" * \param len Dump bytes length */ -RZ_API char *rz_core_print_hexdump_or_hexdiff_str(RZ_NONNULL RzCore *core, RzOutputMode mode, ut64 addr, int len, +RZ_API RZ_OWN char *rz_core_print_hexdump_or_hexdiff_str(RZ_NONNULL RzCore *core, RzOutputMode mode, ut64 addr, int len, bool use_comment) { rz_return_val_if_fail(core, false); if (!len) { diff --git a/librz/core/creg.c b/librz/core/creg.c index 021c9d36ee2..9674e08f478 100644 --- a/librz/core/creg.c +++ b/librz/core/creg.c @@ -113,7 +113,7 @@ RZ_API void rz_core_reg_update_flags(RzCore *core) { /** * \brief Print registers that have changed since the last step (drd/ard) */ -RZ_IPI void rz_core_reg_print_diff(RzReg *reg, RzList *items) { +RZ_IPI void rz_core_reg_print_diff(RzReg *reg, RzList /**/ *items) { RzListIter *iter; RzRegItem *item; rz_list_foreach (items, iter, item) { diff --git a/librz/core/ctypes.c b/librz/core/ctypes.c index 73726eaff61..bc52bc7aabd 100644 --- a/librz/core/ctypes.c +++ b/librz/core/ctypes.c @@ -527,7 +527,7 @@ RZ_IPI void rz_core_types_function_print_all(RzCore *core, RzOutputMode mode) { // Noreturn function attributes -static bool nonreturn_print(RzCore *core, RzList *noretl) { +static bool nonreturn_print(RzCore *core, RzList /**/ *noretl) { RzListIter *it; char *s; rz_list_foreach (noretl, it, s) { @@ -536,7 +536,7 @@ static bool nonreturn_print(RzCore *core, RzList *noretl) { return true; } -static bool nonreturn_print_json(RzCore *core, RzList *noretl) { +static bool nonreturn_print_json(RzCore *core, RzList /**/ *noretl) { RzListIter *it; char *s; PJ *pj = pj_new(); diff --git a/librz/core/disasm.c b/librz/core/disasm.c index 48ad11cfa05..31c8d6e5f3f 100644 --- a/librz/core/disasm.c +++ b/librz/core/disasm.c @@ -306,7 +306,7 @@ typedef struct { int maxflags; int asm_types; - RzPVector *vec; + RzPVector /**/ *vec; } RzDisasmState; static void ds_setup_print_pre(RzDisasmState *ds, bool tail, bool middle); @@ -1797,7 +1797,7 @@ static void ds_show_functions_argvar(RzDisasmState *ds, RzAnalysisFunction *fcn, free(constr); } -static void printVarSummary(RzDisasmState *ds, RzList *list) { +static void printVarSummary(RzDisasmState *ds, RzList /**/ *list) { const char *numColor = ds->core->cons->context->pal.num; RzAnalysisVar *var; RzListIter *iter; diff --git a/librz/core/linux_heap_glibc.c b/librz/core/linux_heap_glibc.c index eb857f05f9a..c48883ca169 100644 --- a/librz/core/linux_heap_glibc.c +++ b/librz/core/linux_heap_glibc.c @@ -1060,7 +1060,7 @@ static GHT GH(tcache_get_entry)(GH(RTcache) * tcache, int index) { * \param arena_base Base address of the arena * \return RzList of RzHeapBin pointers */ -RZ_API RzList *GH(rz_heap_tcache_content)(RzCore *core, GHT arena_base) { +RZ_API RzList /**/ *GH(rz_heap_tcache_content)(RzCore *core, GHT arena_base) { // check if tcache is even present in this Glibc version const int tc = rz_config_get_i(core->config, "dbg.glibc.tcache"); if (!tc) { @@ -1693,13 +1693,13 @@ void GH(rz_arena_list_free)(RzArenaListItem *item) { free(item); } /** - * \brief Get a list of MallocState structs for all the arenas + * \brief Get a list of RzArenaListItem structs for all the arenas * \param core RzCore pointer * \param m_arena Base address of MallocState struct of main arena * \param main_arena MallocState struct of main arena - * \return RzList pointer for list of MallocState structs of all the arenas + * \return RzList pointer for list of RzArenaListItem structs of all the arenas */ -RZ_API RzList *GH(rz_heap_arenas_list)(RzCore *core, GHT m_arena, MallocState *main_arena) { +RZ_API RzList /**/ *GH(rz_heap_arenas_list)(RzCore *core, GHT m_arena, MallocState *main_arena) { RzList *arena_list = rz_list_newf((RzListFree)GH(rz_arena_list_free)); MallocState *ta = RZ_NEW0(MallocState); if (!ta) { @@ -1752,7 +1752,7 @@ RZ_API RzList *GH(rz_heap_arenas_list)(RzCore *core, GHT m_arena, MallocState *m * \param top_chunk Boolean value to return the top chunk in the list or not * \return RzList pointer for list of all chunks in a given arena */ -RZ_API RzList *GH(rz_heap_chunks_list)(RzCore *core, MallocState *main_arena, +RZ_API RzList /**/ *GH(rz_heap_chunks_list)(RzCore *core, MallocState *main_arena, GHT m_arena, GHT m_state, bool top_chunk) { RzList *chunks = rz_list_newf((RzListFree)GH(rz_heap_chunk_free)); if (!core || !core->dbg || !core->dbg->maps) { @@ -2430,7 +2430,7 @@ RZ_IPI RzCmdStatus GH(rz_cmd_heap_arena_bins_print_handler)(RzCore *core, int ar * \param core RzCore pointer * \return RzList of RzArenaListItem */ -RZ_API RzList *GH(rz_heap_arena_list_wrapper)(RzCore *core) { +RZ_API RzList /**/ *GH(rz_heap_arena_list_wrapper)(RzCore *core) { GHT m_arena; if (!GH(rz_heap_resolve_main_arena)(core, &m_arena)) { return rz_list_newf(free); @@ -2454,7 +2454,7 @@ RZ_API RzList *GH(rz_heap_arena_list_wrapper)(RzCore *core) { * \param m_arena Base Address of the arena * \return RzList of heap chunks as RzHeapChunkListItem structs */ -RZ_API RzList *GH(rz_heap_chunks_list_wrapper)(RzCore *core, ut64 m_state) { +RZ_API RzList /**/ *GH(rz_heap_chunks_list_wrapper)(RzCore *core, ut64 m_state) { GHT m_arena; if (!GH(rz_heap_resolve_main_arena)(core, &m_arena)) { return rz_list_newf(free); diff --git a/librz/core/tui/classes.c b/librz/core/tui/classes.c index 02cc349193e..9a68c8daa5e 100644 --- a/librz/core/tui/classes.c +++ b/librz/core/tui/classes.c @@ -16,7 +16,7 @@ // TODO: wrap index when out of boundaries // TODO: Add support to show class fields too // Segfaults - stack overflow, because of recursion -static void *show_class(RzCore *core, int mode, int *idx, RzBinClass *_c, const char *grep, RzList *list) { +static void *show_class(RzCore *core, int mode, int *idx, RzBinClass *_c, const char *grep, RzList /**/ *list) { bool show_color = rz_config_get_i(core->config, "scr.color"); RzListIter *iter; RzBinClass *c, *cur = NULL; diff --git a/librz/core/tui/flags.c b/librz/core/tui/flags.c index 2f356f83620..d352c7b3150 100644 --- a/librz/core/tui/flags.c +++ b/librz/core/tui/flags.c @@ -37,7 +37,7 @@ static int flag_offset_sort(const void *a, const void *b) { return 0; } -static void sort_flags(RzList *l, int sort) { +static void sort_flags(RzList /**/ *l, int sort) { switch (sort) { case SORT_NAME: rz_list_sort(l, flag_name_sort); diff --git a/librz/core/tui/panels.c b/librz/core/tui/panels.c index 7500ea67582..328d2183560 100644 --- a/librz/core/tui/panels.c +++ b/librz/core/tui/panels.c @@ -555,7 +555,7 @@ static void __clear_panels_menuRec(RzPanelsMenuItem *pmi); static RzStrBuf *__draw_menu(RzCore *core, RzPanelsMenuItem *item); static void __handle_menu(RzCore *core, const int key); static int cmpstr(const void *_a, const void *_b); -static RzList *__sorted_list(RzCore *core, char *menu[], int count); +static RzList /**/ *__sorted_list(RzCore *core, char *menu[], int count); /* config */ static char *__get_panels_config_dir_path(void); @@ -4559,7 +4559,7 @@ int cmpstr(const void *_a, const void *_b) { return strcmp(a, b); } -RzList *__sorted_list(RzCore *core, char *menu[], int count) { +RzList /**/ *__sorted_list(RzCore *core, char *menu[], int count) { RzList *list = rz_list_new(); int i; for (i = 0; i < count; i++) { diff --git a/librz/core/tui/tabs.c b/librz/core/tui/tabs.c index ac653d33e21..90df368625c 100644 --- a/librz/core/tui/tabs.c +++ b/librz/core/tui/tabs.c @@ -152,7 +152,7 @@ RZ_IPI void rz_core_visual_tab_update(RzCore *core) { } } -RZ_IPI RzCoreVisualTab *rz_core_visual_newtab(RzCore *core) { +RZ_IPI RZ_OWN RzCoreVisualTab *rz_core_visual_newtab(RzCore *core) { RzCoreVisual *visual = core->visual; if (!visual->tabs) { visual->tabs = rz_list_newf((RzListFree)rz_core_visual_tab_free); diff --git a/librz/core/tui/visual.c b/librz/core/tui/visual.c index 39d2504aee1..bfa076b3f1c 100644 --- a/librz/core/tui/visual.c +++ b/librz/core/tui/visual.c @@ -1209,7 +1209,7 @@ static void add_comment(RzCore *core, ut64 addr, const char *prompt) { rz_cons_set_raw(true); } -static int follow_ref(RzCore *core, RzList *xrefs, int choice, bool xref_to) { +static int follow_ref(RzCore *core, RzList /**/ *xrefs, int choice, bool xref_to) { RzAnalysisXRef *xrefi = rz_list_get_n(xrefs, choice); if (xrefi) { if (core->print->cur_enabled) { diff --git a/librz/core/tui/vmenus.c b/librz/core/tui/vmenus.c index 3280d77740b..d2fa9fc7995 100644 --- a/librz/core/tui/vmenus.c +++ b/librz/core/tui/vmenus.c @@ -73,7 +73,7 @@ static void variable_set_type(RzCore *core, ut64 addr, int vindex, const char *t * \param inputing * \return return the pointer of RzPVector */ -static RzPVector *capture_filter_keywords(char *inputing) { +static RzPVector /**/ *capture_filter_keywords(char *inputing) { rz_return_val_if_fail(inputing, NULL); RzPVector *keywords = rz_pvector_new(free); @@ -108,7 +108,7 @@ static RzPVector *capture_filter_keywords(char *inputing) { * \param filter_fcn store the filtered functions * \return return the number of functions that conform to the keywords */ -static ut32 filter_function(RzCore *core, RzList *filter_fcn, RzPVector *keywords) { +static ut32 filter_function(RzCore *core, RzList /**/ *filter_fcn, RzPVector /**/ *keywords) { rz_return_val_if_fail(core, 0); RzListIter *iter; RzAnalysisFunction *fcn; diff --git a/librz/core/tui/vmenus_graph.c b/librz/core/tui/vmenus_graph.c index ee109bbbfa7..c6ddc950d10 100644 --- a/librz/core/tui/vmenus_graph.c +++ b/librz/core/tui/vmenus_graph.c @@ -45,9 +45,9 @@ typedef struct { int cur; // current row selected int cur_sort; // holds current sort RzCore *core; - RzList *mainCol; - RzList *xrefsCol; - RzList *refsCol; + RzList /**/ *mainCol; + RzList /**/ *xrefsCol; + RzList /**/ *refsCol; } RzCoreVisualViewGraph; typedef struct { @@ -69,7 +69,7 @@ static char *print_item(void *_core, void *_item, bool selected) { return rz_str_newf("%c 0x%08" PFMT64x "\n", selected ? '>' : ' ', item->addr); } -static RzList *__xrefs(RzCore *core, ut64 addr) { +static RzList /**/ *__xrefs(RzCore *core, ut64 addr) { RzList *r = rz_list_newf(free); RzListIter *iter; RzAnalysisXRef *xref; @@ -92,7 +92,7 @@ static RzList *__xrefs(RzCore *core, ut64 addr) { return r; } -static RzList *__refs(RzCore *core, ut64 addr) { +static RzList /**/ *__refs(RzCore *core, ut64 addr) { RzList *r = rz_list_newf(free); RzListIter *iter; RzAnalysisXRef *xref; @@ -119,7 +119,7 @@ static RzList *__refs(RzCore *core, ut64 addr) { return r; } -static RzList *__fcns(RzCore *core) { +static RzList /**/ *__fcns(RzCore *core) { RzList *r = rz_list_newf(free); RzListIter *iter; RzAnalysisFunction *fcn; @@ -166,7 +166,7 @@ static int cmpname(const void *_a, const void *_b) { return (int)strcmp(a->name, b->name); } -static void __sort(RzCoreVisualViewGraph *status, RzList *list) { +static void __sort(RzCoreVisualViewGraph *status, RzList /**/ *list) { rz_return_if_fail(status && list); RzListComparator cmp = (status->cur_sort == SORT_ADDRESS) ? cmpaddr : cmpname; list->sorted = false; diff --git a/librz/debug/debug.c b/librz/debug/debug.c index 54f3667f8cd..f2f31117724 100644 --- a/librz/debug/debug.c +++ b/librz/debug/debug.c @@ -394,7 +394,6 @@ RZ_API RZ_OWN RzDebug *rz_debug_new(RZ_BORROW RZ_NONNULL RzBreakpointContext *bp /* TODO: needs a redesign? */ dbg->maps = rz_debug_map_list_new(); dbg->maps_user = rz_debug_map_list_new(); - dbg->q_regs = NULL; dbg->call_frames = NULL; dbg->main_arena_resolved = false; dbg->glibc_version = 231; /* default version ubuntu 20 */ @@ -1609,7 +1608,7 @@ RZ_API int rz_debug_kill(RzDebug *dbg, int pid, int tid, int sig) { return false; } -RZ_API RzList *rz_debug_frames(RzDebug *dbg, ut64 at) { +RZ_API RzList /**/ *rz_debug_frames(RzDebug *dbg, ut64 at) { if (dbg && dbg->cur && dbg->cur->frames) { return dbg->cur->frames(dbg, at); } diff --git a/librz/debug/dmap.c b/librz/debug/dmap.c index 99f1c4d2270..1b1fb7bd48a 100644 --- a/librz/debug/dmap.c +++ b/librz/debug/dmap.c @@ -26,7 +26,7 @@ RZ_API RzDebugMap *rz_debug_map_new(char *name, ut64 addr, ut64 addr_end, int pe return map; } -RZ_API RzList *rz_debug_modules_list(RzDebug *dbg) { +RZ_API RzList /**/ *rz_debug_modules_list(RzDebug *dbg) { return (dbg && dbg->cur && dbg->cur->modules_get) ? dbg->cur->modules_get(dbg) : NULL; } @@ -80,7 +80,7 @@ RZ_API void rz_debug_map_free(RzDebugMap *map) { free(map); } -RZ_API RzList *rz_debug_map_list_new(void) { +RZ_API RzList /**/ *rz_debug_map_list_new(void) { RzList *list = rz_list_new(); if (!list) { return NULL; @@ -95,6 +95,6 @@ RZ_API RzList *rz_debug_map_list_new(void) { * \param user_map Boolean value, if true return memory maps belonging to user space else return memory maps belonging to kernel space * \return */ -RZ_API RZ_BORROW RzList *rz_debug_map_list(RzDebug *dbg, bool user_map) { +RZ_API RZ_BORROW RzList /**/ *rz_debug_map_list(RzDebug *dbg, bool user_map) { return user_map ? dbg->maps_user : dbg->maps; } diff --git a/librz/debug/dsession.c b/librz/debug/dsession.c index 3e41875a59a..12ae9cf61f5 100644 --- a/librz/debug/dsession.c +++ b/librz/debug/dsession.c @@ -301,7 +301,7 @@ static void serialize_memory(Sdb *db, HtUP *memory) { ht_up_foreach(memory, serialize_memory_cb, db); } -static void serialize_checkpoints(Sdb *db, RzVector *checkpoints) { +static void serialize_checkpoints(Sdb *db, RzVector /**/ *checkpoints) { size_t i; RzDebugCheckpoint *chkpt; RzDebugSnap *snap; @@ -660,7 +660,7 @@ static bool deserialize_checkpoints_cb(void *user, const char *cnum, const char return true; } -static void deserialize_checkpoints(Sdb *db, RzVector *checkpoints) { +static void deserialize_checkpoints(Sdb *db, RzVector /**/ *checkpoints) { sdb_foreach(db, deserialize_checkpoints_cb, checkpoints); } diff --git a/librz/debug/dsignal.c b/librz/debug/dsignal.c index 04087b1cf35..c3f36dc51db 100644 --- a/librz/debug/dsignal.c +++ b/librz/debug/dsignal.c @@ -161,7 +161,7 @@ RZ_API int rz_debug_signal_set(RzDebug *dbg, int num, ut64 addr) { } /* TODO rename to _kill_ -> _signal_ */ -RZ_API RzList *rz_debug_kill_list(RzDebug *dbg) { +RZ_API RzList /**/ *rz_debug_kill_list(RzDebug *dbg) { if (dbg->cur->kill_list) { return dbg->cur->kill_list(dbg); } diff --git a/librz/debug/p/debug_bf.c b/librz/debug/p/debug_bf.c index 3e99473f08c..3e990d5fdef 100644 --- a/librz/debug/p/debug_bf.c +++ b/librz/debug/p/debug_bf.c @@ -170,7 +170,7 @@ static bool rz_debug_bf_kill(RzDebug *dbg, int pid, int tid, int sig) { return true; } -static RzList *rz_debug_native_map_get(RzDebug *dbg) { +static RzList /**/ *rz_debug_native_map_get(RzDebug *dbg) { if (!is_io_bf(dbg)) { return false; } diff --git a/librz/debug/p/debug_bochs.c b/librz/debug/p/debug_bochs.c index 09a799e6c8d..3b9f8c7691a 100644 --- a/librz/debug/p/debug_bochs.c +++ b/librz/debug/p/debug_bochs.c @@ -218,7 +218,7 @@ void map_free(RzDebugMap *map) { free(map); } -static RzList *rz_debug_bochs_map_get(RzDebug *dbg) { // TODO +static RzList /**/ *rz_debug_bochs_map_get(RzDebug *dbg) { // TODO if (!isBochs(dbg)) { return NULL; } diff --git a/librz/debug/p/debug_dmp.c b/librz/debug/p/debug_dmp.c index 36c6e23fe4e..1cc3f226b3b 100644 --- a/librz/debug/p/debug_dmp.c +++ b/librz/debug/p/debug_dmp.c @@ -254,7 +254,7 @@ static int rz_debug_dmp_attach(RzDebug *dbg, int pid) { return ctx->windctx.target.uniqueid; } -static RzList *rz_debug_dmp_pids(RzDebug *dbg, int pid) { +static RzList /**/ *rz_debug_dmp_pids(RzDebug *dbg, int pid) { DmpCtx *ctx = dbg->plugin_data; RzList *ret = rz_list_newf((RzListFree)rz_debug_pid_free); if (!ret) { @@ -392,7 +392,7 @@ static char *rz_debug_dmp_reg_profile(RzDebug *dbg) { return NULL; } -static RzList *rz_debug_dmp_threads(RzDebug *dbg, int pid) { +static RzList /**/ *rz_debug_dmp_threads(RzDebug *dbg, int pid) { DmpCtx *ctx = dbg->plugin_data; RzList *ret = rz_list_newf(free); if (!ret) { @@ -417,7 +417,7 @@ static RzList *rz_debug_dmp_threads(RzDebug *dbg, int pid) { return ret; } -static RzList *dmp_get_modules(DmpCtx *ctx) { +static RzList /**/ *dmp_get_modules(DmpCtx *ctx) { if (ctx->type != DMP_DUMPTYPE_TRIAGE) { return winkd_list_modules(&ctx->windctx); } @@ -443,7 +443,7 @@ static RzList *dmp_get_modules(DmpCtx *ctx) { return ret; } -static RzList *rz_debug_dmp_modules(RzDebug *dbg) { +static RzList /**/ *rz_debug_dmp_modules(RzDebug *dbg) { DmpCtx *ctx = dbg->plugin_data; RzList *ret = rz_list_newf((RzListFree)rz_debug_map_free); if (!ret) { @@ -470,7 +470,7 @@ static RzList *rz_debug_dmp_modules(RzDebug *dbg) { return ret; } -static RzList *rz_debug_dmp_maps(RzDebug *dbg) { +static RzList /**/ *rz_debug_dmp_maps(RzDebug *dbg) { DmpCtx *ctx = dbg->plugin_data; RzList *maps = winkd_list_maps(&ctx->windctx); RzListIter *it; @@ -513,7 +513,7 @@ static int is_pc_inside_windmodule(const void *value, const void *list_data) { typedef RzList *(*RzDebugFrameCallback)(RzDebug *dbg, ut64 at); -RzList *rz_debug_dmp_frames(RzDebug *dbg, ut64 at) { +RzList /**/ *rz_debug_dmp_frames(RzDebug *dbg, ut64 at) { RzCore *core = dbg->corebind.core; DmpCtx *ctx = dbg->plugin_data; RzList *ret = NULL; diff --git a/librz/debug/p/debug_gdb.c b/librz/debug/p/debug_gdb.c index ebbbaaf57a0..6778d1968f3 100644 --- a/librz/debug/p/debug_gdb.c +++ b/librz/debug/p/debug_gdb.c @@ -58,7 +58,7 @@ static int rz_debug_gdb_step(RzDebug *dbg) { return true; } -static RzList *rz_debug_gdb_threads(RzDebug *dbg, int pid) { +static RzList /**/ *rz_debug_gdb_threads(RzDebug *dbg, int pid) { RzDebugGdbCtx *ctx = dbg->plugin_data; RzList *list; if ((list = gdbr_threads_list(ctx->desc, pid))) { @@ -67,7 +67,7 @@ static RzList *rz_debug_gdb_threads(RzDebug *dbg, int pid) { return list; } -static RzList *rz_debug_gdb_pids(RzDebug *dbg, int pid) { +static RzList /**/ *rz_debug_gdb_pids(RzDebug *dbg, int pid) { RzDebugGdbCtx *ctx = dbg->plugin_data; RzList *list; if ((list = gdbr_pids_list(ctx->desc, pid))) { @@ -130,7 +130,7 @@ static int rz_debug_gdb_reg_read(RzDebug *dbg, int type, ut8 *buf, int size) { return ctx->desc->data_len; } -static RzList *rz_debug_gdb_map_get(RzDebug *dbg) { // TODO +static RzList /**/ *rz_debug_gdb_map_get(RzDebug *dbg) { // TODO RzDebugGdbCtx *ctx = dbg->plugin_data; check_connection(dbg); if (!ctx->desc || ctx->desc->pid <= 0) { @@ -265,7 +265,7 @@ static RzList *rz_debug_gdb_map_get(RzDebug *dbg) { // TODO return retlist; } -static RzList *rz_debug_gdb_modules_get(RzDebug *dbg) { +static RzList /**/ *rz_debug_gdb_modules_get(RzDebug *dbg) { char *lastname = NULL; RzDebugMap *map; RzListIter *iter, *iter2; @@ -567,7 +567,7 @@ static RzDebugInfo *rz_debug_gdb_info(RzDebug *dbg, const char *arg) { #include "native/bt.c" -static RzList *rz_debug_gdb_frames(RzDebug *dbg, ut64 at) { +static RzList /**/ *rz_debug_gdb_frames(RzDebug *dbg, ut64 at) { return rz_debug_native_frames(dbg, at); } diff --git a/librz/debug/p/debug_io.c b/librz/debug/p/debug_io.c index 01f3facfdd4..940aeae8eeb 100644 --- a/librz/debug/p/debug_io.c +++ b/librz/debug/p/debug_io.c @@ -14,7 +14,7 @@ static int __io_step_over(RzDebug *dbg) { return true; } -static RzList *__io_maps(RzDebug *dbg) { +static RzList /**/ *__io_maps(RzDebug *dbg) { RzList *list = rz_list_new(); char *str = dbg->iob.system(dbg->iob.io, "dm"); if (!str) { diff --git a/librz/debug/p/debug_native.c b/librz/debug/p/debug_native.c index c1088661fa3..54a79500e4c 100644 --- a/librz/debug/p/debug_native.c +++ b/librz/debug/p/debug_native.c @@ -560,13 +560,13 @@ static RzDebugReasonType rz_debug_native_wait(RzDebug *dbg, int pid) { #undef MAXPID #define MAXPID 99999 -static RzList *rz_debug_native_tids(RzDebug *dbg, int pid) { +static RzList /**/ *rz_debug_native_tids(RzDebug *dbg, int pid) { printf("TODO: Threads: \n"); // T return NULL; } -static RzList *rz_debug_native_pids(RzDebug *dbg, int pid) { +static RzList /**/ *rz_debug_native_pids(RzDebug *dbg, int pid) { RzList *list = rz_list_new(); if (!list) { return NULL; @@ -596,7 +596,7 @@ static RzList *rz_debug_native_pids(RzDebug *dbg, int pid) { return list; } -static RzList *rz_debug_native_threads(RzDebug *dbg, int pid) { +static RzList /**/ *rz_debug_native_threads(RzDebug *dbg, int pid) { RzList *list = rz_list_new(); if (!list) { eprintf("No list?\n"); @@ -986,7 +986,7 @@ static void _map_free(RzDebugMap *map) { } #endif -static RzList *rz_debug_native_map_get(RzDebug *dbg) { +static RzList /**/ *rz_debug_native_map_get(RzDebug *dbg) { RzList *list = NULL; #if __KFBSD__ int ign; @@ -1136,7 +1136,7 @@ static RzList *rz_debug_native_map_get(RzDebug *dbg) { return list; } -static RzList *rz_debug_native_modules_get(RzDebug *dbg) { +static RzList /**/ *rz_debug_native_modules_get(RzDebug *dbg) { char *lastname = NULL; RzDebugMap *map; RzListIter *iter, *iter2; @@ -1501,7 +1501,7 @@ static RzList *xnu_desc_list(int pid) { } #endif -static RzList *rz_debug_desc_native_list(int pid) { +static RzList /**/ *rz_debug_desc_native_list(int pid) { #if __APPLE__ return xnu_desc_list(pid); #elif __WINDOWS__ diff --git a/librz/debug/p/debug_qnx.c b/librz/debug/p/debug_qnx.c index b13a0a74579..c7a1f0aff8c 100644 --- a/librz/debug/p/debug_qnx.c +++ b/librz/debug/p/debug_qnx.c @@ -43,12 +43,12 @@ static int rz_debug_qnx_select(RzDebug *dbg, int pid, int tid) { return qnxr_select(desc, pid, tid); } -static RzList *rz_debug_qnx_tids(RzDebug *dbg, int pid) { +static RzList /**/ *rz_debug_qnx_tids(RzDebug *dbg, int pid) { eprintf("%s: TODO: Threads\n", __func__); return NULL; } -static RzList *rz_debug_qnx_pids(RzDebug *dbg, int pid) { +static RzList /**/ *rz_debug_qnx_pids(RzDebug *dbg, int pid) { RzList *list = rz_list_new(); if (!list) { return NULL; @@ -108,7 +108,7 @@ static int rz_debug_qnx_reg_read(RzDebug *dbg, int type, ut8 *buf, int size) { return len; } -static RzList *rz_debug_qnx_map_get(RzDebug *dbg) { +static RzList /**/ *rz_debug_qnx_map_get(RzDebug *dbg) { return NULL; } diff --git a/librz/debug/p/debug_winkd.c b/librz/debug/p/debug_winkd.c index c4a423263ad..46f2e7dff97 100644 --- a/librz/debug/p/debug_winkd.c +++ b/librz/debug/p/debug_winkd.c @@ -266,7 +266,7 @@ static bool rz_debug_winkd_init(RZ_BORROW RZ_NONNULL RzDebug *dbg, void **user) return true; } -static RzList *rz_debug_winkd_pids(RZ_BORROW RZ_NONNULL RzDebug *dbg, int pid) { +static RzList /**/ *rz_debug_winkd_pids(RZ_BORROW RZ_NONNULL RzDebug *dbg, int pid) { if (!kdctx || !kdctx->desc || !kdctx->syncd) { return NULL; } @@ -323,7 +323,7 @@ static int rz_debug_winkd_select(RZ_BORROW RZ_NONNULL RzDebug *dbg, int pid, int return true; } -static RzList *rz_debug_winkd_threads(RZ_BORROW RZ_NONNULL RzDebug *dbg, int pid) { +static RzList /**/ *rz_debug_winkd_threads(RZ_BORROW RZ_NONNULL RzDebug *dbg, int pid) { if (!kdctx || !kdctx->desc || !kdctx->syncd) { return NULL; } @@ -355,7 +355,7 @@ static RzList *rz_debug_winkd_threads(RZ_BORROW RZ_NONNULL RzDebug *dbg, int pid return ret; } -static RzList *rz_debug_winkd_modules(RZ_BORROW RZ_NONNULL RzDebug *dbg) { +static RzList /**/ *rz_debug_winkd_modules(RZ_BORROW RZ_NONNULL RzDebug *dbg) { if (!kdctx || !kdctx->desc || !kdctx->syncd) { return NULL; } @@ -386,7 +386,7 @@ static RzList *rz_debug_winkd_modules(RZ_BORROW RZ_NONNULL RzDebug *dbg) { #include "native/bt/windows-x64.c" #include "native/bt/generic-all.c" -static RzList *rz_debug_winkd_frames(RZ_BORROW RZ_NONNULL RzDebug *dbg, ut64 at) { +static RzList /**/ *rz_debug_winkd_frames(RZ_BORROW RZ_NONNULL RzDebug *dbg, ut64 at) { if (!kdctx || !kdctx->desc || !kdctx->syncd) { return NULL; } @@ -400,7 +400,7 @@ static RzList *rz_debug_winkd_frames(RZ_BORROW RZ_NONNULL RzDebug *dbg, ut64 at) return ret; } -static RzList *rz_debug_winkd_maps(RZ_BORROW RZ_NONNULL RzDebug *dbg) { +static RzList /**/ *rz_debug_winkd_maps(RZ_BORROW RZ_NONNULL RzDebug *dbg) { RzList *maps = winkd_list_maps(&kdctx->windctx); RzListIter *it; WindMap *m; diff --git a/librz/debug/p/native/bt.c b/librz/debug/p/native/bt.c index b17dcb574bb..4ed752b2df8 100644 --- a/librz/debug/p/native/bt.c +++ b/librz/debug/p/native/bt.c @@ -12,7 +12,7 @@ typedef RzList *(*RzDebugFrameCallback)(RzDebug *dbg, ut64 at); -static void prepend_current_pc(RzDebug *dbg, RzList *list) { +static void prepend_current_pc(RzDebug *dbg, RzList /**/ *list) { RzDebugFrame *frame; const char *pcname; if (list) { @@ -43,7 +43,7 @@ static void *backtrace_proxy(void *user) { } #endif -static RzList *rz_debug_native_frames(RzDebug *dbg, ut64 at) { +static RzList /**/ *rz_debug_native_frames(RzDebug *dbg, ut64 at) { RzDebugFrameCallback cb = NULL; if (dbg->btalgo) { if (!strcmp(dbg->btalgo, "fuzzy")) { diff --git a/librz/debug/p/native/bt/fuzzy-all.c b/librz/debug/p/native/bt/fuzzy-all.c index de6e73ba47c..dd5eb789050 100644 --- a/librz/debug/p/native/bt/fuzzy-all.c +++ b/librz/debug/p/native/bt/fuzzy-all.c @@ -38,7 +38,7 @@ static int iscallret(RzDebug *dbg, ut64 addr) { return 0; } -static RzList *backtrace_fuzzy(RzDebug *dbg, ut64 at) { +static RzList /**/ *backtrace_fuzzy(RzDebug *dbg, ut64 at) { ut8 *stack, *ptr; int wordsize = dbg->bits; // XXX, dbg->bits is wordsize not bits ut64 sp; diff --git a/librz/debug/p/native/bt/generic-all.c b/librz/debug/p/native/bt/generic-all.c index 4606fdfa12a..1775f7f8dcd 100644 --- a/librz/debug/p/native/bt/generic-all.c +++ b/librz/debug/p/native/bt/generic-all.c @@ -11,7 +11,7 @@ static ut64 read_ptr(RzDebug *dbg, ut64 at) { return rz_read_ble(buf, dbg->analysis->big_endian, dbg->bits * 8); } -static RzList *backtrace_generic(RZ_BORROW RZ_NONNULL RzDebug *dbg) { +static RzList /**/ *backtrace_generic(RZ_BORROW RZ_NONNULL RzDebug *dbg) { rz_return_val_if_fail(dbg, NULL); const size_t pointer_size = dbg->bits; RzList *ret = rz_list_newf(free); diff --git a/librz/debug/p/native/bt/generic-x64.c b/librz/debug/p/native/bt/generic-x64.c index 1562c6341f4..a48de695fc0 100644 --- a/librz/debug/p/native/bt/generic-x64.c +++ b/librz/debug/p/native/bt/generic-x64.c @@ -1,7 +1,7 @@ // SPDX-FileCopyrightText: 2015 pancake // SPDX-License-Identifier: LGPL-3.0-only -static RzList *backtrace_x86_64(RzDebug *dbg, ut64 at) { +static RzList /**/ *backtrace_x86_64(RzDebug *dbg, ut64 at) { int i; ut8 buf[8]; RzDebugFrame *frame; @@ -55,7 +55,7 @@ static RzList *backtrace_x86_64(RzDebug *dbg, ut64 at) { return list; } // XXX: Do this work correctly? -static RzList *backtrace_x86_64_analysis(RzDebug *dbg, ut64 at) { +static RzList /**/ *backtrace_x86_64_analysis(RzDebug *dbg, ut64 at) { int i; ut8 buf[8]; RzDebugFrame *frame; diff --git a/librz/debug/p/native/bt/generic-x86.c b/librz/debug/p/native/bt/generic-x86.c index a9223f6df87..10777a64431 100644 --- a/librz/debug/p/native/bt/generic-x86.c +++ b/librz/debug/p/native/bt/generic-x86.c @@ -9,7 +9,7 @@ /* implementation */ #include -static RzList *backtrace_x86_32(RzDebug *dbg, ut64 at) { +static RzList /**/ *backtrace_x86_32(RzDebug *dbg, ut64 at) { RzRegItem *ri; RzReg *reg = dbg->reg; ut32 i, _esp, esp, ebp2; @@ -42,7 +42,7 @@ static RzList *backtrace_x86_32(RzDebug *dbg, ut64 at) { } /* TODO: Can I use this as in a coroutine? */ -static RzList *backtrace_x86_32_analysis(RzDebug *dbg, ut64 at) { +static RzList /**/ *backtrace_x86_32_analysis(RzDebug *dbg, ut64 at) { RzRegItem *ri; RzReg *reg = dbg->reg; ut32 i, _esp, esp, eip, ebp2; diff --git a/librz/debug/p/native/bt/windows-x64.c b/librz/debug/p/native/bt/windows-x64.c index f99dd0a8f94..a386bf5ecf2 100644 --- a/librz/debug/p/native/bt/windows-x64.c +++ b/librz/debug/p/native/bt/windows-x64.c @@ -14,7 +14,7 @@ static int is_pc_inside_module(const void *value, const void *list_data) { #define CMP(x, y) (st64)((st64)x - ((PE64_RUNTIME_FUNCTION *)y)->EndAddress) #define READ_AT(address, buf, size) dbg->iob.read_at(dbg->iob.io, address, buf, size) -static inline bool init_module_runtime_functions(RzDebug *dbg, RzVector *functions, ut64 module_base) { +static inline bool init_module_runtime_functions(RzDebug *dbg, RzVector /**/ *functions, ut64 module_base) { ut8 buf[4]; const ut64 lfanew_offset = module_base + rz_offsetof(Pe64_image_dos_header, e_lfanew); @@ -270,7 +270,7 @@ static inline bool unwind_function( return true; } -static bool backtrace_windows_x64(RZ_IN RzDebug *dbg, RZ_INOUT RzList **out_frames, RZ_INOUT struct context_type_amd64 *context) { +static bool backtrace_windows_x64(RZ_IN RzDebug *dbg, RZ_INOUT RzList /**/ **out_frames, RZ_INOUT struct context_type_amd64 *context) { RzList *frames = *out_frames ? *out_frames : rz_list_newf(free); *out_frames = frames; if (!frames) { diff --git a/librz/debug/p/native/linux/linux_debug.c b/librz/debug/p/native/linux/linux_debug.c index ca812d2d1c0..7a5d5b0740d 100644 --- a/librz/debug/p/native/linux/linux_debug.c +++ b/librz/debug/p/native/linux/linux_debug.c @@ -706,7 +706,7 @@ static bool linux_attach_single_pid(RzDebug *dbg, int ptid) { return true; } -static RzList *get_pid_thread_list(RzDebug *dbg, int main_pid) { +static RzList /**/ *get_pid_thread_list(RzDebug *dbg, int main_pid) { RzList *list = rz_list_new(); if (list) { list = linux_thread_list(dbg, main_pid, list); @@ -835,7 +835,7 @@ RzDebugPid *fill_pid_info(const char *info, const char *path, int tid) { return pid_info; } -RzList *linux_pid_list(int pid, RzList *list) { +RzList /**/ *linux_pid_list(int pid, RzList /**/ *list) { list->free = (RzListFree)&rz_debug_pid_free; DIR *dh = NULL; struct dirent *de = NULL; @@ -872,7 +872,7 @@ RzList *linux_pid_list(int pid, RzList *list) { return list; } -RzList *linux_thread_list(RzDebug *dbg, int pid, RzList *list) { +RzList /**/ *linux_thread_list(RzDebug *dbg, int pid, RzList /**/ *list) { int i = 0, thid = 0; char *ptr, buf[PATH_MAX]; RzDebugPid *pid_info = NULL; @@ -1316,7 +1316,7 @@ int linux_reg_write(RzDebug *dbg, int type, const ut8 *buf, int size) { return false; } -RzList *linux_desc_list(int pid) { +RzList /**/ *linux_desc_list(int pid) { RzList *ret = NULL; char path[512], file[512], buf[512]; struct dirent *de; diff --git a/librz/debug/p/native/linux/linux_debug.h b/librz/debug/p/native/linux/linux_debug.h index c9b766f3970..9a5436cc358 100644 --- a/librz/debug/p/native/linux/linux_debug.h +++ b/librz/debug/p/native/linux/linux_debug.h @@ -164,13 +164,13 @@ RzDebugReasonType linux_ptrace_event(RzDebug *dbg, int pid, int status, bool dow int linux_attach(RzDebug *dbg, int pid); bool linux_attach_new_process(RzDebug *dbg, int pid); RzDebugInfo *linux_info(RzDebug *dbg, const char *arg); -RzList *linux_pid_list(int pid, RzList *list); -RzList *linux_thread_list(RzDebug *dbg, int pid, RzList *list); +RzList /**/ *linux_pid_list(int pid, RzList /**/ *list); +RzList /**/ *linux_thread_list(RzDebug *dbg, int pid, RzList /**/ *list); bool linux_select(RzDebug *dbg, int pid, int tid); RzDebugPid *fill_pid_info(const char *info, const char *path, int tid); int linux_reg_read(RzDebug *dbg, int type, ut8 *buf, int size); int linux_reg_write(RzDebug *dbg, int type, const ut8 *buf, int size); -RzList *linux_desc_list(int pid); +RzList /**/ *linux_desc_list(int pid); bool linux_stop_threads(RzDebug *dbg, int except); int linux_handle_signals(RzDebug *dbg, int tid); int linux_dbg_wait(RzDebug *dbg, int pid); diff --git a/librz/debug/pid.c b/librz/debug/pid.c index d3d7ceebe01..2fe154d101d 100644 --- a/librz/debug/pid.c +++ b/librz/debug/pid.c @@ -23,7 +23,7 @@ RZ_API RzDebugPid *rz_debug_pid_free(RzDebugPid *pid) { return NULL; } -RZ_API RzList *rz_debug_pids(RzDebug *dbg, int pid) { +RZ_API RzList /**/ *rz_debug_pids(RzDebug *dbg, int pid) { if (dbg && dbg->cur && dbg->cur->pids) { return dbg->cur->pids(dbg, pid); } diff --git a/librz/debug/trace.c b/librz/debug/trace.c index e9ab281e1f3..92684794ea5 100644 --- a/librz/debug/trace.c +++ b/librz/debug/trace.c @@ -215,7 +215,7 @@ static int cmpaddr(const void *_a, const void *_b) { * @param offset offset of address * @return a RzList of RzListInfo */ -RZ_API RZ_OWN RzList *rz_debug_traces_info(RzDebug *dbg, ut64 offset) { +RZ_API RZ_OWN RzList /**/ *rz_debug_traces_info(RzDebug *dbg, ut64 offset) { rz_return_val_if_fail(dbg, NULL); int tag = dbg->trace->tag; RzListIter *iter; diff --git a/librz/diff/diff.c b/librz/diff/diff.c index 8d4f05cb31d..a870e7524c5 100644 --- a/librz/diff/diff.c +++ b/librz/diff/diff.c @@ -324,7 +324,7 @@ RZ_API RZ_BORROW const void *rz_diff_get_b(RZ_NONNULL RzDiff *diff) { return diff->b; } -static inline bool stack_append_block(RzList *stack, ut32 a_low, ut32 a_hi, ut32 b_low, ut32 b_hi) { +static inline bool stack_append_block(RzList /**/ *stack, ut32 a_low, ut32 a_hi, ut32 b_low, ut32 b_hi) { Block *block = RZ_NEW0(Block); if (!block) { return false; @@ -698,7 +698,7 @@ RZ_API RZ_OWN RzList /**/ *rz_diff_opcodes_new(RZ_NONNULL RzDiff *di return NULL; } -static void group_op_free(RzList *ops) { +static void group_op_free(RzList /**/ *ops) { rz_list_free(ops); } diff --git a/librz/diff/lines_diff.c b/librz/diff/lines_diff.c index d1180a96053..4c56fe912f0 100644 --- a/librz/diff/lines_diff.c +++ b/librz/diff/lines_diff.c @@ -5,7 +5,7 @@ /* Helpers for handling lines */ #define DIFF_IS_LINES_METHOD(x) (x.elem_at == methods_lines.elem_at) -static RzList *tokenize_lines(const char *string) { +static RzList /**/ *tokenize_lines(const char *string) { RzList *lines = NULL; size_t last = 0; size_t size = 0; @@ -46,7 +46,7 @@ static RzList *tokenize_lines(const char *string) { return NULL; } -static const void *line_elem_at(const RzList *array, ut32 index) { +static const void *line_elem_at(const RzList /**/ *array, ut32 index) { return rz_list_get_n(array, index); } @@ -63,7 +63,7 @@ static void line_stringify(const char *a_elem, RzStrBuf *sb) { rz_strbuf_set(sb, a_elem); } -static void line_free(RzList *array) { +static void line_free(RzList /**/ *array) { rz_list_free(array); } diff --git a/librz/diff/unified_diff.c b/librz/diff/unified_diff.c index 06193faf61c..b37e7ba0294 100644 --- a/librz/diff/unified_diff.c +++ b/librz/diff/unified_diff.c @@ -38,7 +38,7 @@ static inline ut32 count_newlines(RzDiff *diff, const void *array, st32 beg, st3 return count; } -static inline void diff_unified_append_ranges(RzList *opcodes, RzStrBuf *sb, bool color) { +static inline void diff_unified_append_ranges(RzList /**/ *opcodes, RzStrBuf *sb, bool color) { const char *color_beg = color ? Color_RANGE : ""; const char *color_end = color ? Color_RESET : ""; @@ -50,7 +50,7 @@ static inline void diff_unified_append_ranges(RzList *opcodes, RzStrBuf *sb, boo rz_strbuf_appendf(sb, "%s@@ -%d,%d +%d,%d @@%s\n", color_beg, first->a_beg + 1, a_len, first->b_beg + 1, b_len, color_end); } -static inline void diff_unified_json_ranges(RzList *opcodes, PJ *pj) { +static inline void diff_unified_json_ranges(RzList /**/ *opcodes, PJ *pj) { RzDiffOp *first = rz_list_first(opcodes); RzDiffOp *last = rz_list_last(opcodes); st32 a_len = last->a_end - first->a_beg; diff --git a/librz/egg/egg.c b/librz/egg/egg.c index fc4c62b8e25..a214e1084bb 100644 --- a/librz/egg/egg.c +++ b/librz/egg/egg.c @@ -115,7 +115,6 @@ RZ_API void rz_egg_free(RzEgg *egg) { rz_buf_free(egg->src); rz_buf_free(egg->buf); rz_buf_free(egg->bin); - rz_list_free(egg->list); rz_asm_free(egg->rasm); rz_syscall_free(egg->syscall); sdb_free(egg->db); diff --git a/librz/flag/tags.c b/librz/flag/tags.c index be5553b41ce..9fdfe3ee00f 100644 --- a/librz/flag/tags.c +++ b/librz/flag/tags.c @@ -33,8 +33,8 @@ RZ_API void rz_flag_tags_reset(RzFlag *f, const char *name) { } struct iter_glob_flag_t { - RzList *res; - RzList *words; + RzList /**/ *res; + RzList /**/ *words; }; static bool iter_glob_flag(RzFlagItem *fi, void *user) { diff --git a/librz/include/rz_agraph.h b/librz/include/rz_agraph.h index 3a593f74b4c..6e5e16583cd 100644 --- a/librz/include/rz_agraph.h +++ b/librz/include/rz_agraph.h @@ -31,7 +31,7 @@ typedef struct rz_ascii_node_t { typedef struct rz_core_graph_hits_t { char *old_word; - RzVector word_list; + RzVector /**/ word_list; int word_nth; } RzAGraphHits; @@ -48,12 +48,12 @@ typedef void (*RAEdgeCallback)(RzANode *from, RzANode *to, void *user); typedef struct rz_ascii_graph_t { RzConsCanvas *can; - RzGraph *graph; + RzGraph /**/ *graph; const RzGraphNode *curnode; char *title; Sdb *db; HtPP *nodes; // HT with title(key)=RzANode*(value) - RzList *dummy_nodes; + RzList /**/ *dummy_nodes; int layout; int is_instep; @@ -84,12 +84,12 @@ typedef struct rz_ascii_graph_t { int w, h; /* layout algorithm info */ - RzList *back_edges; - RzList *long_edges; + RzList /**/ *back_edges; + RzList /**/ *long_edges; struct layer_t *layers; unsigned int n_layers; - RzList *dists; /* RzList */ - RzList *edges; /* RzList */ + RzList /**/ *dists; + RzList /**/ *edges; RzAGraphHits ghits; } RzAGraph; diff --git a/librz/include/rz_analysis.h b/librz/include/rz_analysis.h index b5b7782f512..dc3c109783a 100644 --- a/librz/include/rz_analysis.h +++ b/librz/include/rz_analysis.h @@ -113,75 +113,6 @@ typedef enum rz_analysis_arch_info_type_t { #define RZ_ANALYSIS_GET_NAME(x, y, z) \ (x && x->binb.bin && x->binb.get_name) ? x->binb.get_name(x->binb.bin, y, z) : NULL -/* type = (RZ_ANALYSIS_VAR_TYPE_BYTE & RZ_ANALYSIS_VAR_TYPE_SIZE_MASK) | - * ( RANAL_VAR_TYPE_SIGNED & RANAL_VAR_TYPE_SIGN_MASK) | - * ( RANAL_VAR_TYPE_CONST & RANAL_VAR_TYPE_MODIFIER_MASK) - */ -typedef struct rz_analysis_type_var_t { - char *name; - int index; - int scope; - ut16 type; // contain (type || signedness || modifier) - ut8 size; - union { - ut8 v8; - ut16 v16; - ut32 v32; - ut64 v64; - } value; -} RzAnalysisTypeVar; - -typedef struct rz_analysis_type_ptr_t { - char *name; - ut16 type; // contain (type || signedness || modifier) - ut8 size; - union { - ut8 v8; - ut16 v16; - ut32 v32; - ut64 v64; - } value; -} RzAnalysisTypePtr; - -typedef struct rz_analysis_type_array_t { - char *name; - ut16 type; // contain (type || signedness || modifier) - ut8 size; - ut64 count; - union { - ut8 *v8; - ut16 *v16; - ut32 *v32; - ut64 *v64; - } value; -} RzAnalysisTypeArray; - -typedef struct rz_analysis_type_struct_t RzAnalysisTypeStruct; -typedef struct rz_analysis_type_t RzAnalysisType; - -struct rz_analysis_type_struct_t { - char *name; - ut8 type; - ut32 size; - void *parent; - RzAnalysisType *items; -}; - -typedef struct rz_analysis_type_union_t { - char *name; - ut8 type; - ut32 size; - void *parent; - RzAnalysisType *items; -} RzAnalysisTypeUnion; - -typedef struct rz_analysis_type_alloca_t { - long address; - long size; - void *parent; - RzAnalysisType *items; -} RzAnalysisTypeAlloca; - enum { RZ_ANALYSIS_FQUALIFIER_NONE = 0, RZ_ANALYSIS_FQUALIFIER_STATIC = 1, @@ -282,13 +213,6 @@ typedef struct rz_analysis_func_arg_t { ut64 src; // Function-call argument value or pointer to it } RzAnalysisFuncArg; -struct rz_analysis_type_t { - char *name; - ut32 type; - ut32 size; - RzList *content; -}; - typedef enum { RZ_META_TYPE_ANY = -1, RZ_META_TYPE_DATA = 'd', //< marks the data as data (not a code) @@ -493,7 +417,7 @@ typedef struct rz_analysis_switch_obj_t { ut64 min_val; ut64 def_val; ut64 max_val; - RzList /**/ *cases; + RzList /**/ *cases; RzType *enum_type; } RzAnalysisSwitchOp; @@ -843,7 +767,7 @@ typedef struct rz_analysis_op_t { ut64 mmio_address; // mmio address RzAnalysisValue *src[3]; RzAnalysisValue *dst; - RzList *access; /* RzAnalysisValue access information */ + RzList /**/ *access; /* RzAnalysisValue access information */ RzStrBuf esil; RzStrBuf opex; RzAnalysisLiftedILOp il_op; @@ -888,7 +812,7 @@ typedef struct rz_analysis_bb_t { const char *cmpreg; ut32 bbhash; // calculated with xxhash - RzList *fcns; + RzList /**/ *fcns; RzAnalysis *analysis; int ref; } RzAnalysisBlock; @@ -927,7 +851,7 @@ typedef struct rz_analysis_refline_t { typedef struct rz_analysis_cycle_frame_t { ut64 naddr; // next addr - RzList *hooks; + RzList /**/ *hooks; struct rz_analysis_cycle_frame_t *prev; } RzAnalysisCycleFrame; @@ -1023,8 +947,7 @@ typedef struct rz_analysis_esil_trace_t { ut64 stack_addr; ut64 stack_size; ut8 *stack_data; - // RzVector - RzPVector *instructions; + RzPVector /**/ *instructions; } RzAnalysisEsilTrace; typedef int (*RzAnalysisEsilHookRegWriteCB)(ANALYSIS_ESIL *esil, const char *name, ut64 *val); @@ -1120,7 +1043,7 @@ typedef struct rz_analysis_il_init_state_var_t { * whatever contents the RzReg currently has). */ typedef struct rz_analysis_il_init_state_t { - RzVector /* */ vars; ///< Contents of global variables + RzVector /**/ vars; ///< Contents of global variables } RzAnalysisILInitState; /** @@ -1145,7 +1068,7 @@ typedef struct rz_analysis_il_config_t { */ RZ_NULLABLE const char **reg_bindings; ut32 mem_key_size; ///< address size for memory 0, bound against IO - RzPVector /* */ labels; ///< global labels, primarily for syscall/hook callbacks + RzPVector /**/ labels; ///< global labels, primarily for syscall/hook callbacks RZ_NULLABLE RzAnalysisILInitState *init_state; ///< optional, initial contents for variables/registers, etc. // more information might go in here, for example additional memories, etc. } RzAnalysisILConfig; @@ -1226,7 +1149,7 @@ typedef char *(*RzAnalysisRegProfGetCallback)(RzAnalysis *a); typedef int (*RzAnalysisFPBBCallback)(RzAnalysis *a, RzAnalysisBlock *bb); typedef int (*RzAnalysisFPFcnCallback)(RzAnalysis *a, RzAnalysisFunction *fcn); typedef int (*RzAnalysisDiffBBCallback)(RzAnalysis *analysis, RzAnalysisFunction *fcn, RzAnalysisFunction *fcn2); -typedef int (*RzAnalysisDiffFcnCallback)(RzAnalysis *analysis, RzList *fcns, RzList *fcns2); +typedef int (*RzAnalysisDiffFcnCallback)(RzAnalysis *analysis, RzList /**/ *fcns, RzList /**/ *fcns2); typedef int (*RzAnalysisDiffEvalCallback)(RzAnalysis *analysis); typedef int (*RzAnalysisEsilCB)(RzAnalysisEsil *esil); @@ -1250,7 +1173,7 @@ typedef struct rz_analysis_plugin_t { // int (*reset_counter) (RzAnalysis *analysis, ut64 start_addr); int (*archinfo)(RzAnalysis *analysis, RzAnalysisInfoType query); ut8 *(*analysis_mask)(RzAnalysis *analysis, int size, const ut8 *data, ut64 at); - RzList *(*preludes)(RzAnalysis *analysis); + RzList /**/ *(*preludes)(RzAnalysis *analysis); /** * The actual bit-size of an address for given analysis.bits. @@ -1556,11 +1479,11 @@ typedef struct { ut64 addr; ///< Address of instruction ut32 stats; ///< Has write/read to reg/mem ? see RZ_IL_TRACE_INS_HAS_* enums - RzPVector *write_mem_ops; ///< Vector - RzPVector *read_mem_ops; ///< Vector + RzPVector /**/ *write_mem_ops; ///< Vector + RzPVector /**/ *read_mem_ops; ///< Vector - RzPVector *write_reg_ops; ///< Vector - RzPVector *read_reg_ops; ///< Vector + RzPVector /**/ *write_reg_ops; ///< Vector + RzPVector /**/ *read_reg_ops; ///< Vector } RzILTraceInstruction; /* Independent Trace Functions */ @@ -1712,9 +1635,9 @@ RZ_API void rz_analysis_extract_rarg(RzAnalysis *analysis, RzAnalysisOp *op, RzA RZ_API RzAnalysisVar *rz_analysis_var_get_dst_var(RzAnalysisVar *var); typedef struct rz_analysis_fcn_vars_cache { - RzList *bvars; - RzList *rvars; - RzList *svars; + RzList /**/ *bvars; + RzList /**/ *rvars; + RzList /**/ *svars; } RzAnalysisFcnVarsCache; RZ_API void rz_analysis_fcn_vars_cache_init(RzAnalysis *analysis, RzAnalysisFcnVarsCache *cache, RzAnalysisFunction *fcn); RZ_API void rz_analysis_fcn_vars_cache_fini(RzAnalysisFcnVarsCache *cache); @@ -1798,7 +1721,7 @@ typedef struct rz_jmptable_params_t { ut64 entry_size; /// Size in bytes of each case entry inside the jump table ut64 table_count; /// Count of cases inside the jump table ut64 default_case; /// Code address of the default case of the switch - RzVector *tasks; /// RzVector of RzAnalysisTaskItem to add new tasks to + RzVector /**/ *tasks; /// RzVector of RzAnalysisTaskItem to add new tasks to } RzAnalysisJmpTableParams; RZ_API bool rz_analysis_get_delta_jmptbl_info(RZ_NONNULL RzAnalysis *analysis, RZ_NONNULL RzAnalysisFunction *fcn, ut64 jmp_address, ut64 lea_address, RZ_NONNULL RzAnalysisJmpTableParams *params); @@ -2020,7 +1943,7 @@ typedef struct { typedef struct vtable_info_t { ut64 saddr; // starting address - RzVector methods; + RzVector /**/ methods; } RVTableInfo; typedef struct vtable_method_info_t { diff --git a/librz/include/rz_asm.h b/librz/include/rz_asm.h index 2a2c6d015a3..80fa2b13f05 100644 --- a/librz/include/rz_asm.h +++ b/librz/include/rz_asm.h @@ -82,7 +82,7 @@ typedef struct rz_asm_code_t { #else RzAsmOp op; // we have those fields already inside RzAsmOp #endif - RzList *equs; // TODO: must be a hash + RzList /**/ *equs; // TODO: must be a hash ut64 code_offset; ut64 data_offset; int code_align; @@ -105,7 +105,7 @@ typedef struct rz_asm_t { void *plugin_data; _RzAsmPlugin *cur; _RzAsmPlugin *acur; - RzList *plugins; + RzList /**/ *plugins; RzBinBind binb; RzParse *ifilter; RzParse *ofilter; @@ -176,7 +176,7 @@ RZ_API ut8 *rz_asm_from_string(RzAsm *a, ut64 addr, const char *b, int *l); RZ_API int rz_asm_sub_names_input(RzAsm *a, const char *f); RZ_API int rz_asm_sub_names_output(RzAsm *a, const char *f); RZ_API char *rz_asm_describe(RzAsm *a, const char *str); -RZ_API RzList *rz_asm_get_plugins(RzAsm *a); +RZ_API RzList /**/ *rz_asm_get_plugins(RzAsm *a); RZ_API void rz_asm_list_directives(void); /* code.c */ diff --git a/librz/include/rz_basefind.h b/librz/include/rz_basefind.h index a5fc0d57cb9..561e3b67744 100644 --- a/librz/include/rz_basefind.h +++ b/librz/include/rz_basefind.h @@ -45,7 +45,7 @@ typedef struct rz_basefind_options_t { void *user; ///< User pointer to pass to the callback function for the thread info } RzBaseFindOpt; -RZ_API RZ_OWN RzList *rz_basefind(RZ_NONNULL RzCore *core, RZ_NONNULL RzBaseFindOpt *options); +RZ_API RZ_OWN RzList /**/ *rz_basefind(RZ_NONNULL RzCore *core, RZ_NONNULL RzBaseFindOpt *options); #ifdef __cplusplus } diff --git a/librz/include/rz_bin.h b/librz/include/rz_bin.h index 47f32c29b36..6cfa823ad82 100644 --- a/librz/include/rz_bin.h +++ b/librz/include/rz_bin.h @@ -262,27 +262,27 @@ typedef struct rz_bin_object_t { ut64 boffset; ut64 size; ut64 obj_size; - RzList /**/ *vfiles; - RzList /**/ *maps; - RzList /**/ *sections; - RzList /**/ *imports; - RzList /**/ *symbols; - RzList /**/ *resources; + RzList /**/ *vfiles; + RzList /**/ *maps; + RzList /**/ *sections; + RzList /**/ *imports; + RzList /**/ *symbols; + RzList /**/ *resources; /** * \brief Acceleration structure for fast access of the symbol for a given import. * This associates the name of every symbol where is_imported == true to the symbol itself. */ HtPP /**/ *import_name_symbols; // currently only used for imports, but could be extended to all symbols if needed. - RzList /**/ *entries; - RzList /**/ *fields; - RzList /**/ *libs; + RzList /**/ *entries; + RzList /**/ *fields; + RzList /**/ *libs; RzBinRelocStorage *relocs; RzBinStrDb *strings; - RzList /**/ *classes; + RzList /**/ *classes; HtPP *classes_ht; HtPP *methods_ht; RzBinSourceLineInfo *lines; - RzList /**/ *mem; + RzList /**/ *mem; char *regstate; RzBinInfo *info; RzBinAddr *binsym[RZ_BIN_SPECIAL_SYMBOL_LAST]; @@ -399,10 +399,10 @@ typedef struct rz_bin_xtr_plugin_t { RzBinXtrData *(*extract_from_bytes)(RzBin *bin, const ut8 *buf, ut64 size, int idx); RzBinXtrData *(*extract_from_buffer)(RzBin *bin, RzBuffer *buf, int idx); - RzList *(*extractall_from_bytes)(RzBin *bin, const ut8 *buf, ut64 size); - RzList *(*extractall_from_buffer)(RzBin *bin, RzBuffer *buf); + RzList /**/ *(*extractall_from_bytes)(RzBin *bin, const ut8 *buf, ut64 size); + RzList /**/ *(*extractall_from_buffer)(RzBin *bin, RzBuffer *buf); RzBinXtrData *(*extract)(RzBin *bin, int idx); - RzList *(*extractall)(RzBin *bin); + RzList /**/ *(*extractall)(RzBin *bin); bool (*load)(RzBin *bin); int (*size)(RzBin *bin); @@ -529,7 +529,7 @@ typedef struct rz_bin_plugin_t { RzList /**/ *(*symbols)(RzBinFile *bf); RzList /**/ *(*imports)(RzBinFile *bf); RzList /**/ *(*strings)(RzBinFile *bf); - RzBinInfo /**/ *(*info)(RzBinFile *bf); + RzBinInfo *(*info)(RzBinFile *bf); RzList /**/ *(*fields)(RzBinFile *bf); RzList /**/ *(*libs)(RzBinFile *bf); RzList /**/ *(*relocs)(RzBinFile *bf); @@ -640,7 +640,7 @@ typedef struct rz_bin_section_t { */ typedef struct rz_bin_section_map_t { const RzBinSection *segment; - RzPVector sections; + RzPVector /**/ sections; } RzBinSectionMap; typedef struct rz_bin_class_t { @@ -650,8 +650,8 @@ typedef struct rz_bin_class_t { char *visibility_str; // XXX only used by java int index; ut64 addr; - RzList *methods; // - RzList *fields; // + RzList /**/ *methods; + RzList /**/ *fields; // RzList *interfaces; // int visibility; } RzBinClass; @@ -781,7 +781,7 @@ typedef struct rz_bin_mem_t { ut64 addr; int size; int perms; - RzList /**/ *mirrors; // for mirror access; stuff here should only create new maps not new fds + RzList /**/ *mirrors; // for mirror access; stuff here should only create new maps not new fds } RzBinMem; typedef struct rz_bin_resource_t { diff --git a/librz/include/rz_bin_dwarf.h b/librz/include/rz_bin_dwarf.h index 3f92d0cc2d5..f34c4bb488c 100644 --- a/librz/include/rz_bin_dwarf.h +++ b/librz/include/rz_bin_dwarf.h @@ -899,7 +899,7 @@ typedef struct { * \brief Line info of all compilation units from the entire debug_line section */ typedef struct { - RzList /**/ *units; + RzList /**/ *units; struct rz_bin_source_line_info_t *lines; } RzBinDwarfLineInfo; @@ -916,7 +916,7 @@ typedef struct rz_bin_dwarf_loc_entry_t { } RzBinDwarfLocRange; typedef struct rz_bin_dwarf_loc_list_t { - RzList /**/ *list; + RzList /**/ *list; ut64 offset; } RzBinDwarfLocList; diff --git a/librz/include/rz_bp.h b/librz/include/rz_bp.h index 2022f451154..4db9ef9ef0b 100644 --- a/librz/include/rz_bp.h +++ b/librz/include/rz_bp.h @@ -83,14 +83,14 @@ typedef struct rz_bp_t { bool bpinmaps; /* Only enable breakpoints inside a valid map */ RzIOBind iob; // compile time dependency RzBreakpointPlugin *cur; - RzList *traces; // XXX - RzList *plugins; + RzList /**/ *traces; // XXX + RzList /**/ *plugins; PrintfCallback cb_printf; RzBreakpointCallback breakpoint; /* storage of breakpoints */ int nbps; int nhwbps; - RzList *bps; // list of breakpoints + RzList /**/ *bps; // list of breakpoints RzBreakpointItem **bps_idx; int bps_idx_count; ut64 baddr; @@ -160,7 +160,7 @@ RZ_API int rz_bp_traptrace_add(RzBreakpoint *bp, ut64 from, ut64 to); RZ_API int rz_bp_traptrace_free_at(RzBreakpoint *bp, ut64 from); RZ_API void rz_bp_traptrace_list(RzBreakpoint *bp); RZ_API int rz_bp_traptrace_at(RzBreakpoint *bp, ut64 from, int len); -RZ_API RzList *rz_bp_traptrace_new(void); +RZ_API RzList /**/ *rz_bp_traptrace_new(void); /* watchpoint */ RZ_API RZ_BORROW RzBreakpointItem *rz_bp_watch_add(RZ_NONNULL RzBreakpoint *bp, ut64 addr, int size, int hw, int perm); diff --git a/librz/include/rz_cmd.h b/librz/include/rz_cmd.h index a7d51b8cfe7..91703dcd4de 100644 --- a/librz/include/rz_cmd.h +++ b/librz/include/rz_cmd.h @@ -416,7 +416,7 @@ typedef struct rz_cmd_desc_t { /** * Vector of childrens command descriptors. */ - RzPVector children; + RzPVector /**/ children; /** * Reference to the help structure of this command descriptor. */ @@ -583,7 +583,7 @@ RZ_API bool rz_cmd_macro_add(RZ_NONNULL RzCmd *cmd, RZ_NONNULL const char *name, RZ_API bool rz_cmd_macro_update(RZ_NONNULL RzCmd *cmd, RZ_NONNULL const char *name, const char **args, RZ_NONNULL const char *code); RZ_API bool rz_cmd_macro_rm(RZ_NONNULL RzCmd *cmd, RZ_NONNULL const char *name); RZ_API const RzCmdMacro *rz_cmd_macro_get(RZ_NONNULL RzCmd *cmd, RZ_NONNULL const char *name); -RZ_API RZ_OWN RzList /**/ *rz_cmd_macro_list(RZ_NONNULL RzCmd *cmd); +RZ_API RZ_OWN RzList /**/ *rz_cmd_macro_list(RZ_NONNULL RzCmd *cmd); RZ_API RzCmdStatus rz_cmd_macro_call(RZ_NONNULL RzCmd *cmd, RZ_NONNULL const char *name, RZ_NONNULL const char **argv); RZ_API RzCmdStatus rz_cmd_macro_call_multiple(RZ_NONNULL RzCmd *cmd, RZ_NONNULL const char *name, RZ_NONNULL const char **argv); RZ_API void rz_cmd_macro_foreach(RZ_NONNULL RzCmd *cmd, RzCmdForeachMacroCb cb, void *user); diff --git a/librz/include/rz_config.h b/librz/include/rz_config.h index c368e86f250..39816814365 100644 --- a/librz/include/rz_config.h +++ b/librz/include/rz_config.h @@ -44,7 +44,7 @@ typedef struct rz_config_node_t { RzConfigCallback getter; RzConfigCallback setter; char *desc; - RzList *options; + RzList /**/ *options; } RzConfigNode; RZ_API const char *rz_config_node_type(RzConfigNode *node); @@ -53,7 +53,7 @@ typedef struct rz_config_t { int lock; void *user; RzNum *num; - RzList *nodes; + RzList /**/ *nodes; HtPP *ht; } RzConfig; @@ -69,8 +69,8 @@ typedef struct rz_config_hold_char_t { typedef struct rz_config_hold_t { RzConfig *cfg; - RzList *list_num; // list of RzConfigHoldNum to hold numeric values - RzList *list_char; // list of RzConfigHoldChar to hold char values + RzList /**/ *list_num; // holds numeric values + RzList /**/ *list_char; // holds char values } RzConfigHold; #ifdef RZ_API diff --git a/librz/include/rz_cons.h b/librz/include/rz_cons.h index ec758bf3a3b..1b3b48c79ad 100644 --- a/librz/include/rz_cons.h +++ b/librz/include/rz_cons.h @@ -1059,7 +1059,7 @@ struct rz_line_comp_t { bool opt; size_t args_limit; bool quit; - RzPVector args; /* */ + RzPVector /**/ args; RzLineCompletionCb run; void *run_user; }; @@ -1072,7 +1072,7 @@ typedef struct rz_line_ns_completion_t RzLineNSCompletion; * user. */ typedef struct rz_line_ns_completion_result_t { - RzPVector options; ///< Vector of options that can be used for autocompletion + RzPVector /**/ options; ///< Vector of options that can be used for autocompletion HtPP *options_ht; ///< Hash table to keep track of duplicated autocompletion suggestions size_t start; ///< First byte that was considered for autocompletion. Everything before this will be left intact. size_t end; ///< Last byte that was considered for autocompletion. Everything after this will be left intact. @@ -1116,7 +1116,7 @@ struct rz_line_t { int echo; int has_echo; char *prompt; - RzList /**/ *kill_ring; + RzList /**/ *kill_ring; int kill_ring_ptr; char *clipboard; int disable; @@ -1132,8 +1132,8 @@ struct rz_line_t { int offset_hist_index; int file_hist_index; RzLineHud *hud; - RzList *sdbshell_hist; - RzListIter *sdbshell_hist_iter; + RzList /**/ *sdbshell_hist; + RzListIter /**/ *sdbshell_hist_iter; RzVirtTermMode vtmode; }; /* RzLine */ diff --git a/librz/include/rz_core.h b/librz/include/rz_core.h index 15d74d53d32..24b9ecd7e77 100644 --- a/librz/include/rz_core.h +++ b/librz/include/rz_core.h @@ -216,9 +216,9 @@ typedef struct rz_core_tasks_t { RzCoreTaskBreak break_cb; void *break_cb_user; int task_id_next; - RzList *tasks; - RzList *tasks_queue; - RzList *oneshot_queue; + RzList /**/ *tasks; + RzList /**/ *tasks_queue; + RzList /**/ *oneshot_queue; int oneshots_enqueued; struct rz_core_task_t *current_task; struct rz_core_task_t *main_task; @@ -235,8 +235,8 @@ typedef struct rz_core_tasks_t { * Once a new seek is performed, all redos are lost. */ typedef struct rz_core_seek_history_t { - RzVector undos; ///< Stack of RzCoreSeekItems, allowing to "go back in time" - RzVector redos; ///< Stack of RzCoreSeekItems, allowing to re-do an action that was undone. + RzVector /**/ undos; ///< Stack of RzCoreSeekItems, allowing to "go back in time" + RzVector /**/ redos; ///< Stack of RzCoreSeekItems, allowing to re-do an action that was undone. bool saved_set; ///< When true, the \p saved field is set RzCoreSeekItem saved_item; ///< Position to save in history } RzCoreSeekHistory; @@ -481,11 +481,11 @@ RZ_API bool rz_core_write_seq_at(RzCore *core, ut64 addr, ut64 from, ut64 to, ut RZ_API bool rz_core_shift_block(RzCore *core, ut64 addr, ut64 b_size, st64 dist); RZ_API void rz_core_autocomplete(RZ_NULLABLE RzCore *core, RzLineCompletion *completion, RzLineBuffer *buf, RzLinePromptType prompt_type); RZ_API RzLineNSCompletionResult *rz_core_autocomplete_rzshell(RzCore *core, RzLineBuffer *buf, RzLinePromptType prompt_type); -RZ_API void rz_core_print_scrollbar(RzCore *core); -RZ_API void rz_core_print_scrollbar_bottom(RzCore *core); +RZ_IPI void rz_core_print_scrollbar(RzCore *core); +RZ_IPI void rz_core_print_scrollbar_bottom(RzCore *core); RZ_API void rz_core_help_vars_print(RzCore *core); -RZ_API bool rz_core_prevop_addr(RzCore *core, ut64 start_addr, int numinstrs, ut64 *prev_addr); -RZ_API ut64 rz_core_prevop_addr_force(RzCore *core, ut64 start_addr, int numinstrs); +RZ_IPI bool rz_core_prevop_addr(RzCore *core, ut64 start_addr, int numinstrs, ut64 *prev_addr); +RZ_IPI ut64 rz_core_prevop_addr_force(RzCore *core, ut64 start_addr, int numinstrs); RZ_API RzBinReloc *rz_core_getreloc(RzCore *core, ut64 addr, int size); RZ_API RzBinReloc *rz_core_get_reloc_to(RzCore *core, ut64 addr); RZ_API ut64 rz_core_get_asmqjmps(RzCore *core, const char *str); @@ -800,7 +800,7 @@ typedef struct rz_core_disasm_options { int invbreak; int cbytes; RzAnalysisFunction *function; ///< Disassemble a function - RzPVector *vec; ///< Not print, but append as RzPVector + RzPVector /**/ *vec; ///< Not print, but append as RzPVector } RzCoreDisasmOptions; #define RZ_CORE_MAX_DISASM (1024 * 1024 * 8) @@ -1068,7 +1068,7 @@ RZ_API bool rz_core_hack(RzCore *core, const char *op); RZ_API bool rz_core_dump(RzCore *core, const char *file, ut64 addr, ut64 size, int append); RZ_API void rz_core_diff_show(RzCore *core, RzCore *core2, bool json); RZ_API bool rz_core_diff_show_function(RzCore *core, RzCore *core2, ut64 addr, bool json); -RZ_API RZ_OWN char *rz_core_clippy(RzCore *core, const char *msg); +RZ_API RZ_OWN char *rz_core_clippy(RZ_NONNULL RzCore *core, RZ_NONNULL const char *msg); // TODO MOVE SOMEWHERE ELSE typedef char *(*PrintItemCallback)(void *user, void *p, bool selected); @@ -1103,7 +1103,7 @@ typedef struct { ut64 from; ut64 to; ut64 step; - RzVector blocks; + RzVector /**/ blocks; } RzCoreAnalysisStats; RZ_API char *rz_core_analysis_hasrefs(RzCore *core, ut64 value, int mode); @@ -1113,8 +1113,8 @@ RZ_API void rz_core_analysis_stats_free(RzCoreAnalysisStats *s); RZ_API ut64 rz_core_analysis_stats_get_block_from(RZ_NONNULL const RzCoreAnalysisStats *s, size_t i); RZ_API ut64 rz_core_analysis_stats_get_block_to(RZ_NONNULL const RzCoreAnalysisStats *s, size_t i); -RZ_API int rz_line_hist_offset_up(RzLine *line); -RZ_API int rz_line_hist_offset_down(RzLine *line); +RZ_IPI int rz_line_hist_offset_up(RzLine *line); +RZ_IPI int rz_line_hist_offset_down(RzLine *line); RZ_API RZ_OWN char *rz_core_syscall_as_string(RzCore *core, st64 num, ut64 addr); diff --git a/librz/include/rz_crypto.h b/librz/include/rz_crypto.h index ee71ba3565c..d9bb7b62926 100644 --- a/librz/include/rz_crypto.h +++ b/librz/include/rz_crypto.h @@ -34,7 +34,7 @@ typedef struct rz_crypto_t { int output_size; int dir; void *user; - RzList *plugins; + RzList /**/ *plugins; } RzCrypto; typedef struct rz_crypto_plugin_t { diff --git a/librz/include/rz_debug.h b/librz/include/rz_debug.h index 84c04ee43cd..a3ae62cfd85 100644 --- a/librz/include/rz_debug.h +++ b/librz/include/rz_debug.h @@ -183,14 +183,14 @@ typedef struct { typedef struct rz_debug_checkpoint_t { int cnum; RzRegArena *arena[RZ_REG_TYPE_LAST]; - RzList *snaps; // + RzList /**/ *snaps; } RzDebugCheckpoint; typedef struct rz_debug_session_t { ut32 cnum; ut32 maxcnum; RzDebugCheckpoint *cur_chkpt; - RzVector *checkpoints; /* RzVector */ + RzVector /**/ *checkpoints; HtUP *memory; /* RzVector */ HtUP *registers; /* RzVector */ int reasontype /*RzDebugReasonType*/; @@ -217,7 +217,7 @@ typedef struct rz_snap_entry { } RSnapEntry; typedef struct rz_debug_trace_t { - RzList *traces; + RzList /**/ *traces; int count; int enabled; // int changed; @@ -248,7 +248,7 @@ typedef struct rz_debug_t { int tid; /* selected thread id */ int forked_pid; /* last pid created by fork */ int n_threads; - RzList *threads; /* NOTE: list contents are platform-specific */ + RzList /**/ *threads; /* NOTE: list contents are platform-specific */ char *malloc; /*choose malloc parser: 0 = glibc, 1 = jemalloc*/ @@ -281,10 +281,8 @@ typedef struct rz_debug_t { RzDebugTrace *trace; HtUP *tracenodes; RTree *tree; - RzList *call_frames; - + RzList /**/ *call_frames; RzReg *reg; - RzList *q_regs; RzBreakpoint *bp; char *snap_path; @@ -294,7 +292,7 @@ typedef struct rz_debug_t { struct rz_debug_plugin_t *cur; void *plugin_data; - RzList *plugins; + RzList /**/ *plugins; bool pc_at_bp; /* after a breakpoint, is the pc at the bp? */ bool pc_at_bp_set; /* is the pc_at_bp variable set already? */ @@ -303,8 +301,8 @@ typedef struct rz_debug_t { RzHash *hash; RzAnalysis *analysis; - RzList *maps; // - RzList *maps_user; // + RzList /**/ *maps; + RzList /**/ *maps_user; bool trace_continue; RzAnalysisOp *cur_op; @@ -330,7 +328,7 @@ typedef struct rz_debug_desc_plugin_t { int (*write)(int fd, ut64 addr, int len); int (*seek)(int fd, ut64 addr); int (*dup)(int fd, int newfd); - RzList *(*list)(int pid); + RzList /**/ *(*list)(int pid); } RzDebugDescPlugin; typedef struct rz_debug_info_t { @@ -372,10 +370,9 @@ typedef struct rz_debug_plugin_t { int (*attach)(RzDebug *dbg, int pid); int (*detach)(RzDebug *dbg, int pid); int (*select)(RzDebug *dbg, int pid, int tid); - RzList *(*threads)(RzDebug *dbg, int pid); - RzList *(*pids)(RzDebug *dbg, int pid); - RzList *(*tids)(RzDebug *dbg, int pid); - RzList (*backtrace)(RzDebug *dbg, int count); + RzList /**/ *(*threads)(RzDebug *dbg, int pid); + RzList /**/ *(*pids)(RzDebug *dbg, int pid); + RzList /**/ *(*tids)(RzDebug *dbg, int pid); /* flow */ int (*stop)(RzDebug *dbg); int (*step)(RzDebug *dbg); @@ -384,9 +381,9 @@ typedef struct rz_debug_plugin_t { RzDebugReasonType (*wait)(RzDebug *dbg, int pid); bool (*gcore)(RzDebug *dbg, char *path, RzBuffer *dest); bool (*kill)(RzDebug *dbg, int pid, int tid, int sig); - RzList *(*kill_list)(RzDebug *dbg); + RzList /**/ *(*kill_list)(RzDebug *dbg); int (*contsc)(RzDebug *dbg, int pid, int sc); - RzList *(*frames)(RzDebug *dbg, ut64 at); + RzList /**/ *(*frames)(RzDebug *dbg, ut64 at); RzBreakpointCallback breakpoint; /// Callback to be used for RzBreakpoint. When called, RzBreakpoint.user points to the RzDebug. // XXX: specify, pid, tid, or RzDebug ? int (*reg_read)(RzDebug *dbg, int type, ut8 *buf, int size); @@ -394,8 +391,8 @@ typedef struct rz_debug_plugin_t { char *(*reg_profile)(RzDebug *dbg); int (*set_reg_profile)(RzDebug *dbg, const char *str); /* memory */ - RzList *(*map_get)(RzDebug *dbg); - RzList *(*modules_get)(RzDebug *dbg); + RzList /**/ *(*map_get)(RzDebug *dbg); + RzList /**/ *(*modules_get)(RzDebug *dbg); RzDebugMap *(*map_alloc)(RzDebug *dbg, ut64 addr, int size, bool thp); int (*map_dealloc)(RzDebug *dbg, ut64 addr, int size); int (*map_protect)(RzDebug *dbg, ut64 addr, int size, int perms); @@ -465,7 +462,7 @@ RZ_API bool rz_debug_select(RzDebug *dbg, int pid, int tid); RZ_API int rz_debug_pid_list(RzDebug *dbg, int pid, char fmt); RZ_API RzDebugPid *rz_debug_pid_new(const char *path, int pid, int uid, char status, ut64 pc); RZ_API RzDebugPid *rz_debug_pid_free(RzDebugPid *pid); -RZ_API RzList *rz_debug_pids(RzDebug *dbg, int pid); +RZ_API RzList /**/ *rz_debug_pids(RzDebug *dbg, int pid); RZ_API bool rz_debug_set_arch(RzDebug *dbg, const char *arch, int bits); RZ_API bool rz_debug_use(RzDebug *dbg, const char *str); @@ -484,7 +481,7 @@ RZ_API int rz_debug_signal_set(RzDebug *dbg, int num, ut64 addr); RZ_API void rz_debug_signal_list(RzDebug *dbg, RzOutputMode mode); RZ_API bool rz_debug_can_kill(RzDebug *dbg); RZ_API int rz_debug_kill(RzDebug *dbg, int pid, int tid, int sig); -RZ_API RzList *rz_debug_kill_list(RzDebug *dbg); +RZ_API RzList /**/ *rz_debug_kill_list(RzDebug *dbg); // XXX: must be uint64 action RZ_API int rz_debug_kill_setup(RzDebug *dbg, int sig, int action); @@ -494,15 +491,15 @@ RZ_API bool rz_debug_plugin_add(RzDebug *dbg, RzDebugPlugin *foo); RZ_API bool rz_debug_plugin_set_reg_profile(RzDebug *dbg, const char *str); /* memory */ -RZ_API RzList *rz_debug_modules_list(RzDebug *); +RZ_API RzList /**/ *rz_debug_modules_list(RzDebug *); RZ_API RzDebugMap *rz_debug_map_alloc(RzDebug *dbg, ut64 addr, int size, bool thp); RZ_API int rz_debug_map_dealloc(RzDebug *dbg, RzDebugMap *map); -RZ_API RzList *rz_debug_map_list_new(void); +RZ_API RzList /**/ *rz_debug_map_list_new(void); RZ_API RzDebugMap *rz_debug_map_get(RzDebug *dbg, ut64 addr); RZ_API RzDebugMap *rz_debug_map_new(char *name, ut64 addr, ut64 addr_end, int perm, int user); RZ_API void rz_debug_map_free(RzDebugMap *map); RZ_API void rz_debug_map_list_visual(RzDebug *dbg, ut64 addr, const char *input, int colors); -RZ_API RZ_BORROW RzList *rz_debug_map_list(RzDebug *dbg, bool user_map); +RZ_API RZ_BORROW RzList /**/ *rz_debug_map_list(RzDebug *dbg, bool user_map); /* descriptors */ RZ_API RzDebugDesc *rz_debug_desc_new(int fd, char *path, int perm, int type, int off); @@ -527,7 +524,7 @@ RZ_API bool rz_debug_map_sync(RzDebug *dbg); RZ_API int rz_debug_stop(RzDebug *dbg); /* backtrace */ -RZ_API RzList *rz_debug_frames(RzDebug *dbg, ut64 at); +RZ_API RzList /**/ *rz_debug_frames(RzDebug *dbg, ut64 at); RZ_API bool rz_debug_is_dead(RzDebug *dbg); RZ_API int rz_debug_map_protect(RzDebug *dbg, ut64 addr, int size, int perms); @@ -548,7 +545,7 @@ RZ_API void rz_debug_trace_op(RzDebug *dbg, RzAnalysisOp *op); RZ_API void rz_debug_trace_at(RzDebug *dbg, const char *str); RZ_API RzDebugTracepoint *rz_debug_trace_get(RzDebug *dbg, ut64 addr); RZ_API void rz_debug_trace_print(RzDebug *dbg, RzCmdStateOutput *state, ut64 offset); -RZ_API RZ_OWN RzList *rz_debug_traces_info(RzDebug *dbg, ut64 offset); +RZ_API RZ_OWN RzList /**/ *rz_debug_traces_info(RzDebug *dbg, ut64 offset); RZ_API void rz_debug_traces_ascii(RzDebug *dbg, ut64 offset); RZ_API RzDebugTracepoint *rz_debug_trace_add(RzDebug *dbg, ut64 addr, int size); RZ_API RzDebugTrace *rz_debug_trace_new(void); diff --git a/librz/include/rz_demangler.h b/librz/include/rz_demangler.h index d63eb050f99..2b9a5580acc 100644 --- a/librz/include/rz_demangler.h +++ b/librz/include/rz_demangler.h @@ -21,7 +21,7 @@ typedef struct rz_demangler_plugin_t { } RzDemanglerPlugin; typedef struct rz_demangler_t { - RzList *plugins; + RzList /**/ *plugins; } RzDemangler; typedef bool (*RzDemanglerIter)(const RzDemanglerPlugin *plugin, void *data); @@ -45,4 +45,4 @@ RZ_API bool rz_demangler_resolve(RZ_NONNULL RzDemangler *demangler, RZ_NULLABLE } #endif -#endif /* RZ_DEMANGLER_H */ \ No newline at end of file +#endif /* RZ_DEMANGLER_H */ diff --git a/librz/include/rz_egg.h b/librz/include/rz_egg.h index 5f9681ff52b..f35141ef0df 100644 --- a/librz/include/rz_egg.h +++ b/librz/include/rz_egg.h @@ -94,14 +94,13 @@ typedef struct rz_egg_t { RzBuffer *src; RzBuffer *buf; RzBuffer *bin; - RzList *list; // RzList *shellcodes; // XXX is plugins nao? RzAsm *rasm; RzSyscall *syscall; RzEggLang lang; Sdb *db; - RzList *plugins; - RzList *patches; // + RzList /**/ *plugins; + RzList /**/ *patches; // struct rz_egg_emit_t *remit; int arch; int endian; diff --git a/librz/include/rz_flag.h b/librz/include/rz_flag.h index 9cf2dfab7b1..561be10036c 100644 --- a/librz/include/rz_flag.h +++ b/librz/include/rz_flag.h @@ -28,7 +28,7 @@ typedef struct rz_flag_zone_item_t { typedef struct rz_flags_at_offset_t { ut64 off; - RzList *flags; /* list of RzFlagItem at offset */ + RzList /**/ *flags; /* list of RzFlagItem at offset */ } RzFlagsAtOffset; typedef struct rz_flag_item_t { @@ -61,7 +61,7 @@ typedef RzFlagItem *(*RzFlagGet)(RzFlag *f, const char *name); typedef RzFlagItem *(*RzFlagGetAtAddr)(RzFlag *f, ut64); typedef RzFlagItem *(*RzFlagGetAt)(RzFlag *f, ut64 addr, bool closest); typedef RzFlagItem *(*RzFlagGetAtBySpaces)(RzFlag *f, ut64 off, ...); -typedef const RzList *(*RzFlagGetList)(RzFlag *f, ut64 addr); +typedef const RzList /**/ *(*RzFlagGetList)(RzFlag *f, ut64 addr); typedef RzFlagItem *(*RzFlagSet)(RzFlag *f, const char *name, ut64 addr, ut32 size); typedef bool (*RzFlagUnset)(RzFlag *f, RzFlagItem *item); typedef bool (*RzFlagUnsetName)(RzFlag *f, const char *name); diff --git a/librz/include/rz_flirt.h b/librz/include/rz_flirt.h index 3ebedfb30be..154730a5e9c 100644 --- a/librz/include/rz_flirt.h +++ b/librz/include/rz_flirt.h @@ -168,14 +168,14 @@ typedef struct rz_flirt_module_t { // until but not including the first variant byte // this is a custom crc16 ut32 length; // total length of the module - RzList *public_functions; - RzList *tail_bytes; - RzList *referenced_functions; + RzList /**/ *public_functions; + RzList /**/ *tail_bytes; + RzList /**/ *referenced_functions; } RzFlirtModule; typedef struct rz_flirt_node_t { - RzList *child_list; - RzList *module_list; + RzList /**/ *child_list; + RzList /**/ *module_list; ut32 length; // length of the pattern ut64 variant_mask; // this is the mask that will define variant bytes in ut8 *pattern_bytes ut8 *pattern_bytes; // holds the pattern bytes of the signature diff --git a/librz/include/rz_hash.h b/librz/include/rz_hash.h index 486311d6b03..0dd2e76b959 100644 --- a/librz/include/rz_hash.h +++ b/librz/include/rz_hash.h @@ -39,11 +39,11 @@ typedef struct rz_hash_plugin_t { } RzHashPlugin; typedef struct rz_hash_t { - RzList *plugins; + RzList /**/ *plugins; } RzHash; typedef struct rz_hash_cfg_t { - RzList *configurations; + RzList /**/ *configurations; RzHashStatus status; RzHash *hash; } RzHashCfg; diff --git a/librz/include/rz_heap_glibc.h b/librz/include/rz_heap_glibc.h index 4cdb9d426b5..7a4fdd36194 100644 --- a/librz/include/rz_heap_glibc.h +++ b/librz/include/rz_heap_glibc.h @@ -300,7 +300,7 @@ typedef struct rz_heap_bin { ut64 bk; int bin_num; char *type; - RzList *chunks; /* list of chunks in the bins */ + RzList /**/ *chunks; /* list of chunks in the bins */ char *message; /* indicating the list is corrupted or double free*/ } RzHeapBin; @@ -310,11 +310,11 @@ RZ_API RzHeapChunkSimple *rz_heap_chunk_wrapper_64(RzCore *core, ut64 addr); RZ_API RzHeapChunk_64 *rz_heap_get_chunk_at_addr_64(RzCore *core, ut64 addr); RZ_API RzHeapChunk_32 *rz_heap_get_chunk_at_addr_32(RzCore *core, ut32 addr); -RZ_API RzList *rz_heap_arenas_list_64(RzCore *core, ut64 m_arena, MallocState *main_arena); -RZ_API RzList *rz_heap_arenas_list_32(RzCore *core, ut32 m_arena, MallocState *main_arena); +RZ_API RzList /**/ *rz_heap_arenas_list_64(RzCore *core, ut64 m_arena, MallocState *main_arena); +RZ_API RzList /**/ *rz_heap_arenas_list_32(RzCore *core, ut32 m_arena, MallocState *main_arena); -RZ_API RzList *rz_heap_chunks_list_64(RzCore *core, MallocState *main_arena, ut64 m_arena, ut64 m_state, bool top_chunk); -RZ_API RzList *rz_heap_chunks_list_32(RzCore *core, MallocState *main_arena, ut32 m_arena, ut32 m_state, bool top_chunk); +RZ_API RzList /**/ *rz_heap_chunks_list_64(RzCore *core, MallocState *main_arena, ut64 m_arena, ut64 m_state, bool top_chunk); +RZ_API RzList /**/ *rz_heap_chunks_list_32(RzCore *core, MallocState *main_arena, ut32 m_arena, ut32 m_state, bool top_chunk); RZ_API bool rz_heap_resolve_main_arena_64(RzCore *core, ut64 *m_arena); RZ_API bool rz_heap_resolve_main_arena_32(RzCore *core, ut32 *m_arena); @@ -325,8 +325,8 @@ RZ_API bool rz_heap_update_main_arena_32(RzCore *core, ut32 m_arena, MallocState RZ_API bool rz_heap_write_heap_chunk_64(RzCore *core, RzHeapChunkSimple *chunk_simple); RZ_API bool rz_heap_write_heap_chunk_32(RzCore *core, RzHeapChunkSimple *chunk_simple); -RZ_API RzList *rz_heap_tcache_content_64(RzCore *core, ut64 arena_base); -RZ_API RzList *rz_heap_tcache_content_32(RzCore *core, ut32 arena_base); +RZ_API RzList /**/ *rz_heap_tcache_content_64(RzCore *core, ut64 arena_base); +RZ_API RzList /**/ *rz_heap_tcache_content_32(RzCore *core, ut32 arena_base); RZ_API MallocState *rz_heap_get_arena_64(RzCore *core, ut64 m_state); RZ_API MallocState *rz_heap_get_arena_32(RzCore *core, ut32 m_state); @@ -337,11 +337,11 @@ RZ_API RzHeapBin *rz_heap_fastbin_content_32(RzCore *core, MallocState *main_are RZ_API RzHeapBin *rz_heap_bin_content_64(RzCore *core, MallocState *main_arena, int bin_num, ut64 m_arena); RZ_API RzHeapBin *rz_heap_bin_content_32(RzCore *core, MallocState *main_arena, int bin_num, ut32 m_arena); -RZ_API RzList *rz_heap_chunks_list_wrapper_64(RzCore *core, ut64 m_state); -RZ_API RzList *rz_heap_chunks_list_wrapper_32(RzCore *core, ut64 m_state); +RZ_API RzList /**/ *rz_heap_chunks_list_wrapper_64(RzCore *core, ut64 m_state); +RZ_API RzList /**/ *rz_heap_chunks_list_wrapper_32(RzCore *core, ut64 m_state); -RZ_API RzList *rz_heap_arena_list_wrapper_64(RzCore *core); -RZ_API RzList *rz_heap_arena_list_wrapper_32(RzCore *core); +RZ_API RzList /**/ *rz_heap_arena_list_wrapper_64(RzCore *core); +RZ_API RzList /**/ *rz_heap_arena_list_wrapper_32(RzCore *core); RZ_IPI int rz_cmd_heap_fastbins_print_64(void *data, const char *input); RZ_IPI int rz_cmd_heap_fastbins_print_32(void *data, const char *input); diff --git a/librz/include/rz_il/definitions/variable.h b/librz/include/rz_il/definitions/variable.h index 5097695c1ad..881bf3e543d 100644 --- a/librz/include/rz_il/definitions/variable.h +++ b/librz/include/rz_il/definitions/variable.h @@ -29,8 +29,8 @@ RZ_API void rz_il_variable_free(RZ_NULLABLE RzILVar *var); * This is meant only as a low-level container to be used in RzILVM. */ typedef struct rz_il_var_set_t { - HtPP /* */ *vars; - HtPP /* */ *contents; + HtPP /**/ *vars; + HtPP /**/ *contents; } RzILVarSet; RZ_API bool rz_il_var_set_init(RzILVarSet *vs); diff --git a/librz/include/rz_il/rz_il_vm.h b/librz/include/rz_il/rz_il_vm.h index 630e3f8f0ff..16bbe2f801a 100644 --- a/librz/include/rz_il/rz_il_vm.h +++ b/librz/include/rz_il/rz_il_vm.h @@ -38,7 +38,7 @@ struct rz_il_vm_t { RzILVarSet global_vars; ///< All global variables (usually bound to registers) RzILVarSet local_vars; ///< All local variables, created by local set ops RzILVarSet local_pure_vars; ///< All local variables, during execution temporarily bound by let, only usable in pure expressions and immutable - RzPVector /**/ vm_memory; ///< Memories available in the VM, by their index. May be sparse (contain NULLs). + RzPVector /**/ vm_memory; ///< Memories available in the VM, by their index. May be sparse (contain NULLs). ut32 val_count, lab_count; ///< count for VM predefined things ut32 addr_size; ///< size of address space HtPP *vm_global_label_table; ///< Hashtable to maintain the label and address @@ -46,7 +46,7 @@ struct rz_il_vm_t { RzBitVector *pc; ///< Program Counter of VM RzILOpPureHandler *op_handler_pure_table; ///< Array of Handler, handler can be indexed by opcode RzILOpEffectHandler *op_handler_effect_table; ///< Array of Handler, handler can be indexed by opcode - RzList *events; ///< List of events that has happened in the last step + RzList /**/ *events; ///< List of events that has happened in the last step bool big_endian; ///< Sets the endianness of the memory reads/writes operations }; diff --git a/librz/include/rz_io.h b/librz/include/rz_io.h index c3b28fc617b..073a3dd3ee0 100644 --- a/librz/include/rz_io.h +++ b/librz/include/rz_io.h @@ -70,14 +70,14 @@ typedef struct rz_io_t { bool cachemode; // write in cache all the read operations (EXPERIMENTAL) int p_cache; RzIDPool *map_ids; - RzPVector maps; // from tail backwards maps with higher priority are found + RzPVector /**/ maps; // from tail backwards maps with higher priority are found RzSkyline map_skyline; // map parts that are not covered by others RzIDStorage *files; - RzPVector cache; + RzPVector /**/ cache; RzSkyline cache_skyline; ut8 *write_mask; int write_mask_len; - RzList *plugins; + RzList /**/ *plugins; char *runprofile; char *envprofile; #if USE_PTRACE_WRAP @@ -125,7 +125,7 @@ typedef struct rz_io_plugin_t { // int (*is_file_opened)(RzIO *io, RzIODesc *fd, const char *); char *(*system)(RzIO *io, RzIODesc *fd, const char *); RzIODesc *(*open)(RzIO *io, const char *, int perm, int mode); - RzList * /*RzIODesc* */ (*open_many)(RzIO *io, const char *, int perm, int mode); + RzList /**/ *(*open_many)(RzIO *io, const char *, int perm, int mode); int (*read)(RzIO *io, RzIODesc *fd, ut8 *buf, int count); ut64 (*lseek)(RzIO *io, RzIODesc *fd, ut64 offset, int whence); int (*write)(RzIO *io, RzIODesc *fd, const ut8 *buf, int count); @@ -297,9 +297,9 @@ RZ_API void rz_io_map_cleanup(RzIO *io); RZ_API void rz_io_map_fini(RzIO *io); RZ_API void rz_io_map_set_name(RzIOMap *map, const char *name); RZ_API void rz_io_map_del_name(RzIOMap *map); -RZ_API RzList *rz_io_map_get_for_fd(RzIO *io, int fd); +RZ_API RzList /**/ *rz_io_map_get_for_fd(RzIO *io, int fd); RZ_API bool rz_io_map_resize(RzIO *io, ut32 id, ut64 newsize); -RZ_API RZ_BORROW RzPVector *rz_io_maps(RzIO *io); +RZ_API RZ_BORROW RzPVector /**/ *rz_io_maps(RzIO *io); // next free address to place a map.. maybe just unify RZ_API ut64 rz_io_map_next_available(RzIO *io, ut64 addr, ut64 size, ut64 load_align); @@ -316,7 +316,7 @@ RZ_API RzIO *rz_io_init(RzIO *io); RZ_API RzIODesc *rz_io_open_nomap(RzIO *io, const char *uri, int flags, int mode); // should return int RZ_API RzIODesc *rz_io_open(RzIO *io, const char *uri, int flags, int mode); RZ_API RzIODesc *rz_io_open_at(RzIO *io, const char *uri, int flags, int mode, ut64 at, RZ_NULLABLE RZ_OUT RzIOMap **map); -RZ_API RzList *rz_io_open_many(RzIO *io, const char *uri, int flags, int mode); +RZ_API RzList /**/ *rz_io_open_many(RzIO *io, const char *uri, int flags, int mode); RZ_API RzIODesc *rz_io_open_buffer(RzIO *io, RzBuffer *b, int flags, int mode); RZ_API bool rz_io_close(RzIO *io); RZ_API bool rz_io_reopen(RzIO *io, int fd, int flags, int mode); @@ -399,7 +399,7 @@ RZ_API bool rz_io_desc_cache_commit(RzIODesc *desc); RZ_API void rz_io_desc_cache_cleanup(RzIODesc *desc); RZ_API void rz_io_desc_cache_fini(RzIODesc *desc); RZ_API void rz_io_desc_cache_fini_all(RzIO *io); -RZ_API RzList *rz_io_desc_cache_list(RzIODesc *desc); +RZ_API RzList /**/ *rz_io_desc_cache_list(RzIODesc *desc); /* io/fd.c */ RZ_API int rz_io_fd_open(RzIO *io, const char *uri, int flags, int mode); diff --git a/librz/include/rz_lang.h b/librz/include/rz_lang.h index cb435688f12..5bd6c0dbb6f 100644 --- a/librz/include/rz_lang.h +++ b/librz/include/rz_lang.h @@ -17,8 +17,8 @@ typedef int (*RzCoreCmdfCallback)(void *core, const char *s, ...); typedef struct rz_lang_t { struct rz_lang_plugin_t *cur; void *user; - RzList *defs; - RzList *langs; + RzList /**/ *defs; + RzList /**/ *langs; PrintfCallback cb_printf; RzCoreCmdStrCallback cmd_str; RzCoreCmdfCallback cmdf; diff --git a/librz/include/rz_lib.h b/librz/include/rz_lib.h index 2a4e5f19d43..b759b5d1348 100644 --- a/librz/include/rz_lib.h +++ b/librz/include/rz_lib.h @@ -92,8 +92,8 @@ typedef struct rz_lib_t { /* this is checked in add_handler function */ char *symname; char *symnamefunc; - RzList /*RzLibPlugin*/ *plugins; - RzList /*RzLibHandler*/ *handlers; + RzList /**/ *plugins; + RzList /**/ *handlers; HtPU *opened_dirs; ///< Hashtable to keep track of already opened directories } RzLib; diff --git a/librz/include/rz_parse.h b/librz/include/rz_parse.h index 072d2719556..04f8a1f2c6c 100644 --- a/librz/include/rz_parse.h +++ b/librz/include/rz_parse.h @@ -32,7 +32,7 @@ typedef struct rz_parse_t { char *retleave_asm; struct rz_parse_plugin_t *cur; // RzAnalysis *analysis; // weak analysis ref XXX do not use. use analb.anal - RzList *parsers; + RzList /**/ *parsers; RzAnalysisVarList varlist; st64 (*get_ptr_at)(RzAnalysisFunction *fcn, st64 delta, ut64 addr); const char *(*get_reg_at)(RzAnalysisFunction *fcn, st64 delta, ut64 addr); diff --git a/librz/include/rz_pdb.h b/librz/include/rz_pdb.h index 3a694d52e2c..6237fe9551e 100644 --- a/librz/include/rz_pdb.h +++ b/librz/include/rz_pdb.h @@ -58,26 +58,26 @@ typedef struct { typedef struct dbi_stream_t { RzPdbRzPdbDbiStreamHdr hdr; - RzList /* RzPdbDbiStreamExHdr */ *ex_hdrs; + RzList /**/ *ex_hdrs; RzPdbRzPdbDbiStreamDbgHeader dbg_hdr; } RzPdbDbiStream; // GDATA typedef struct { - RzList /* GDataGlobal */ *global_list; + RzList /**/ *global_list; } RzPdbGDataStream; // OMAP typedef struct { - RzList /* OmapEntry */ *entries; + RzList /**/ *entries; ut32 *froms; } RzPdbOmapStream; // PE Stream typedef struct { - RzList /* PeImageSectionHeader */ *sections_hdrs; + RzList /**/ *sections_hdrs; } RzPdbPeStream; // TPI @@ -154,7 +154,7 @@ typedef struct tpi_stream_t { RzPdbTpiStreamHeader header; RBTree types; ut64 type_index_base; - RzList /* RzBaseType */ *print_type; + RzList /**/ *print_type; } RzPdbTpiStream; // PDB @@ -241,7 +241,7 @@ typedef struct { typedef struct rz_pdb_t { RzBuffer *buf; // mmap of file RzPdbMsfSuperBlock *super_block; - RzList /* RzPdbMsfStream */ *streams; + RzList /**/ *streams; RzPdbStream *s_pdb; RzPdbDbiStream *s_dbi; RzPdbTpiStream *s_tpi; @@ -260,7 +260,7 @@ RZ_API void rz_bin_pdb_free(RzPdb *pdb); RZ_API RZ_BORROW RzPdbTpiType *rz_bin_pdb_get_type_by_index(RZ_NONNULL RzPdbTpiStream *stream, ut32 index); RZ_API RZ_OWN char *rz_bin_pdb_calling_convention_as_string(RZ_NONNULL RzPdbTpiCallingConvention idx); RZ_API bool rz_bin_pdb_type_is_fwdref(RZ_NONNULL RzPdbTpiType *t); -RZ_API RZ_BORROW RzList *rz_bin_pdb_get_type_members(RZ_NONNULL RzPdbTpiStream *stream, RzPdbTpiType *t); +RZ_API RZ_BORROW RzList /**/ *rz_bin_pdb_get_type_members(RZ_NONNULL RzPdbTpiStream *stream, RzPdbTpiType *t); RZ_API RZ_BORROW char *rz_bin_pdb_get_type_name(RZ_NONNULL RzPdbTpiType *type); RZ_API ut64 rz_bin_pdb_get_type_val(RZ_NONNULL RzPdbTpiType *type); diff --git a/librz/include/rz_platform.h b/librz/include/rz_platform.h index 6c0f5fc509b..247c9444819 100644 --- a/librz/include/rz_platform.h +++ b/librz/include/rz_platform.h @@ -24,8 +24,8 @@ typedef struct rz_platform_profile_t { ut64 pc; ut64 page_size; ut64 interrupt_vector_size; - HtUP /* */ *registers_mmio; - HtUP /* */ *registers_extended; + HtUP /**/ *registers_mmio; + HtUP /**/ *registers_extended; } RzPlatformProfile; typedef struct rz_platform_target_t { @@ -40,7 +40,7 @@ typedef struct rz_platform_item_t { } RzPlatformItem; typedef struct rz_platform_target_index_t { - HtUP /* */ *platforms; + HtUP /**/ *platforms; char *path; ///< Path used to load the platforms, used to avoid reloading } RzPlatformTargetIndex; diff --git a/librz/include/rz_reg.h b/librz/include/rz_reg.h index 9447fd6ab41..1d0ab6ed61b 100644 --- a/librz/include/rz_reg.h +++ b/librz/include/rz_reg.h @@ -110,8 +110,8 @@ typedef struct { } RzRegProfileDef; typedef struct { - RzList /* RzRegProfileAlias */ *alias; - RzList /* RzRegProfileDef */ *defs; + RzList /**/ *alias; + RzList /**/ *defs; } RzRegProfile; typedef struct rz_reg_item_t { @@ -134,10 +134,10 @@ typedef struct rz_reg_arena_t { typedef struct rz_reg_set_t { RzRegArena *arena; - RzList *pool; ///< RzRegArena - RzList *regs; ///< RzRegItem + RzList /**/ *pool; ///< RzRegArena + RzList /**/ *regs; ///< RzRegItem HtPP *ht_regs; ///< name:RzRegItem - RzListIter *cur; + RzListIter /**/ *cur; ut32 maskregstype; ///< which type of regs has this register set (logic mask with 1 << RZ_REG_TYPE_XXX) } RzRegSet; @@ -148,8 +148,8 @@ typedef struct rz_reg_t { RzRegProfile reg_profile; char *name[RZ_REG_NAME_LAST]; // aliases RzRegSet regset[RZ_REG_TYPE_LAST]; - RzList *allregs; - RzList *roregs; + RzList /**/ *allregs; + RzList /**/ *roregs; int iters; int arch; int bits; @@ -193,7 +193,7 @@ RZ_API const char *rz_reg_get_role(int role); RZ_API int rz_reg_role_by_name(RZ_NONNULL const char *str); RZ_API RzRegItem *rz_reg_get(RzReg *reg, const char *name, int type); RZ_API RzRegItem *rz_reg_get_by_role_or_name(RzReg *reg, const char *name); -RZ_API const RzList *rz_reg_get_list(RzReg *reg, int type); +RZ_API const RzList /**/ *rz_reg_get_list(RzReg *reg, int type); RZ_API RzRegItem *rz_reg_get_at(RzReg *reg, int type, int regsize, int delta); RZ_API RzRegItem *rz_reg_next_diff(RzReg *reg, int type, const ut8 *buf, int buflen, RzRegItem *prev_ri, int regsize); @@ -213,7 +213,7 @@ RZ_API bool rz_reg_cond_set(RzReg *reg, const char *name, bool val); RZ_API int rz_reg_cond_get_value(RzReg *r, const char *name); RZ_API bool rz_reg_cond_bits_set(RzReg *r, int type, RzRegFlags *f, bool v); RZ_API int rz_reg_cond_bits(RzReg *r, int type, RzRegFlags *f); -RZ_API RzRegFlags *rz_reg_cond_retrieve(RzReg *r, RzRegFlags *); +RZ_API RzRegFlags *rz_reg_cond_retrieve(RzReg *r, RzRegFlags *f); RZ_API int rz_reg_cond(RzReg *r, int type); /* bitvector, for everything */ @@ -267,7 +267,7 @@ RZ_API const char *rz_reg_cond_to_string(int n); RZ_API int rz_reg_cond_from_string(const char *str); RZ_API void rz_reg_arena_shrink(RzReg *reg); -RZ_API RZ_OWN RzList *rz_reg_filter_items_covered(RZ_BORROW RZ_NONNULL const RzList /**/ *regs); +RZ_API RZ_OWN RzList /**/ *rz_reg_filter_items_covered(RZ_BORROW RZ_NONNULL const RzList /**/ *regs); #ifdef __cplusplus } diff --git a/librz/include/rz_regex.h b/librz/include/rz_regex.h index 6276a4ee07c..6b7393ff301 100644 --- a/librz/include/rz_regex.h +++ b/librz/include/rz_regex.h @@ -60,7 +60,7 @@ typedef struct rz_regmatch_t { RZ_API RzRegex *rz_regex_new(const char *pattern, const char *cflags); RZ_API int rz_regex_match(const char *pattern, const char *flags, const char *text); -RZ_API RzList *rz_regex_get_match_list(const char *pattern, const char *flags, const char *text); +RZ_API RzList /**/ *rz_regex_get_match_list(const char *pattern, const char *flags, const char *text); RZ_API int rz_regex_flags(const char *flags); RZ_API int rz_regex_comp(RzRegex *, const char *, int); RZ_API size_t rz_regex_error(int, const RzRegex *, char *, size_t); diff --git a/librz/include/rz_search.h b/librz/include/rz_search.h index 156402b31ef..c5b178a125f 100644 --- a/librz/include/rz_search.h +++ b/librz/include/rz_search.h @@ -62,14 +62,14 @@ typedef struct rz_search_t { RzSearchCallback callback; ut64 nhits; ut64 maxhits; // search.maxhits - RzList *hits; + RzList /**/ *hits; int distance; int inverse; bool overlap; // whether two matches can overlap int contiguous; int align; int (*update)(struct rz_search_t *s, ut64 from, const ut8 *buf, int len); - RzList *kws; // TODO: Use rz_search_kw_new () + RzList /**/ *kws; // TODO: Use rz_search_kw_new () RzIOBind iob; char bckwrds; } RzSearch; @@ -83,7 +83,7 @@ RZ_API int rz_search_set_mode(RzSearch *s, int mode); RZ_API RzSearch *rz_search_free(RzSearch *s); /* keyword management */ -RZ_API RzList *rz_search_find(RzSearch *s, ut64 addr, const ut8 *buf, int len); +RZ_API RzList /**/ *rz_search_find(RzSearch *s, ut64 addr, const ut8 *buf, int len); RZ_API int rz_search_update(RzSearch *s, ut64 from, const ut8 *buf, long len); RZ_API int rz_search_update_i(RzSearch *s, ut64 from, const ut8 *buf, long len); diff --git a/librz/include/rz_skyline.h b/librz/include/rz_skyline.h index 87899c215ed..1fd07b83ed9 100644 --- a/librz/include/rz_skyline.h +++ b/librz/include/rz_skyline.h @@ -10,7 +10,7 @@ typedef struct rz_skyline_item_t { } RzSkylineItem; typedef struct rz_skyline_t { - RzVector v; + RzVector /**/ v; } RzSkyline; RZ_API bool rz_skyline_add(RzSkyline *skyline, RzInterval itv, void *user); diff --git a/librz/include/rz_socket.h b/librz/include/rz_socket.h index 0c883a8653e..4439ff3bebc 100644 --- a/librz/include/rz_socket.h +++ b/librz/include/rz_socket.h @@ -80,7 +80,7 @@ typedef struct rz_socket_t { } RzSocket; typedef struct rz_socket_http_options { - RzList *authtokens; + RzList /**/ *authtokens; bool accept_timeout; int timeout; bool httpauth; diff --git a/librz/include/rz_syscall.h b/librz/include/rz_syscall.h index 40624d1cc83..711353ce540 100644 --- a/librz/include/rz_syscall.h +++ b/librz/include/rz_syscall.h @@ -31,7 +31,7 @@ typedef struct rz_sysreg_item_t { } RzSysregItem; typedef struct rz_sysreg_db_t { - HtUP /* */ *port; + HtUP /**/ *port; } RzSysregsDB; typedef struct rz_syscall_t { @@ -99,7 +99,7 @@ RZ_API bool rz_syscall_setup(RzSyscall *s, const char *arch, int bits, const cha RZ_API RzSyscallItem *rz_syscall_get(RzSyscall *ctx, int num, int swi); RZ_API int rz_syscall_get_num(RzSyscall *ctx, const char *str); RZ_API const char *rz_syscall_get_i(RzSyscall *ctx, int num, int swi); -RZ_API RzList *rz_syscall_list(RzSyscall *ctx); +RZ_API RzList /**/ *rz_syscall_list(RzSyscall *ctx); RZ_API int rz_syscall_get_swi(RzSyscall *s); RZ_API const char *rz_sysreg_get(RzSyscall *s, const char *type, ut64 num); diff --git a/librz/include/rz_type.h b/librz/include/rz_type.h index 5c252dff435..2161e8536e1 100644 --- a/librz/include/rz_type.h +++ b/librz/include/rz_type.h @@ -30,9 +30,9 @@ typedef struct rz_type_parser_t RzTypeParser; typedef struct rz_type_db_t { void *user; - HtPP /* */ *types; //< name -> base type - HtPP /* */ *formats; //< name -> `pf` format - HtPP /* */ *callables; //< name -> RzCallable (function type) + HtPP /**/ *types; //< name -> base type + HtPP /**/ *formats; //< name -> `pf` format + HtPP /**/ *callables; //< name -> RzCallable (function type) RzTypeTarget *target; RzTypeParser *parser; RzNum *num; @@ -105,7 +105,7 @@ typedef struct rz_base_type_union_t { } RzBaseTypeUnion; typedef struct rz_base_type_enum_t { - RzVector /**/ cases; // list of all the enum cases } RzBaseTypeEnum; typedef struct rz_base_type_t { @@ -146,7 +146,7 @@ typedef struct rz_callable_arg_t { typedef struct rz_callable_at { RZ_NULLABLE char *name; // optional RZ_NULLABLE RzType *ret; /// optional for the time being - RzPVector /* RzCallableArg */ *args; + RzPVector /**/ *args; RZ_NULLABLE const char *cc; // optional bool noret; // Does not return } RzCallable; @@ -295,8 +295,8 @@ RZ_API bool rz_base_type_is_integral_signed(const RzTypeDB *typedb, RZ_NONNULL c RZ_API bool rz_type_is_integral_signed(const RzTypeDB *typedb, RZ_NONNULL const RzType *type); RZ_API bool rz_base_type_is_integral_unsigned(const RzTypeDB *typedb, RZ_NONNULL const RzBaseType *type); RZ_API bool rz_type_is_integral_unsigned(const RzTypeDB *typedb, RZ_NONNULL const RzType *type); -RZ_API RZ_OWN RzList *rz_type_typeclass_get_all(const RzTypeDB *typedb, RzTypeTypeclass typeclass); -RZ_API RZ_OWN RzList *rz_type_typeclass_get_all_sized(const RzTypeDB *typedb, RzTypeTypeclass typeclass, size_t size); +RZ_API RZ_OWN RzList /**/ *rz_type_typeclass_get_all(const RzTypeDB *typedb, RzTypeTypeclass typeclass); +RZ_API RZ_OWN RzList /**/ *rz_type_typeclass_get_all_sized(const RzTypeDB *typedb, RzTypeTypeclass typeclass, size_t size); RZ_API RZ_OWN RzBaseType *rz_type_typeclass_get_default_sized(const RzTypeDB *typedb, RzTypeTypeclass typeclass, size_t size); // Type paths @@ -335,7 +335,7 @@ RZ_API RzBaseType *rz_type_db_get_typedef(const RzTypeDB *typedb, RZ_NONNULL con RZ_API int rz_type_db_enum_member_by_name(const RzTypeDB *typedb, RZ_NONNULL const char *name, const char *member); RZ_API RZ_BORROW const char *rz_type_db_enum_member_by_val(const RzTypeDB *typedb, RZ_NONNULL const char *name, ut64 val); -RZ_API RZ_OWN RzList *rz_type_db_find_enums_by_val(const RzTypeDB *typedb, ut64 val); +RZ_API RZ_OWN RzList /**/ *rz_type_db_find_enums_by_val(const RzTypeDB *typedb, ut64 val); RZ_API RZ_OWN char *rz_type_db_enum_get_bitfield(const RzTypeDB *typedb, RZ_NONNULL const char *name, ut64 val); // Type size calculation @@ -378,7 +378,7 @@ RZ_API RZ_BORROW RzBaseType *rz_type_get_base_type(const RzTypeDB *typedb, RZ_NO // Type formats (`tp` and `pf` commands) RZ_API const char *rz_type_db_format_get(const RzTypeDB *typedb, const char *name); RZ_API void rz_type_db_format_set(RzTypeDB *typedb, const char *name, const char *fmt); -RZ_API RZ_OWN RzList *rz_type_db_format_all(RzTypeDB *typedb); +RZ_API RZ_OWN RzList /**/ *rz_type_db_format_all(RzTypeDB *typedb); RZ_API void rz_type_db_format_delete(RzTypeDB *typedb, const char *name); RZ_API void rz_type_db_format_purge(RzTypeDB *typedb); @@ -428,15 +428,15 @@ RZ_API bool rz_type_func_is_noreturn(RzTypeDB *typedb, RZ_NONNULL const char *na RZ_API bool rz_type_func_noreturn_add(RzTypeDB *typedb, RZ_NONNULL const char *name); RZ_API bool rz_type_func_noreturn_drop(RzTypeDB *typedb, RZ_NONNULL const char *name); -RZ_API RZ_OWN RzList *rz_type_function_names(RzTypeDB *typedb); -RZ_API RZ_OWN RzList *rz_type_noreturn_function_names(RzTypeDB *typedb); +RZ_API RZ_OWN RzList /**/ *rz_type_function_names(RzTypeDB *typedb); +RZ_API RZ_OWN RzList /**/ *rz_type_noreturn_function_names(RzTypeDB *typedb); // Listing API -RZ_API RZ_OWN RzList *rz_type_db_enum_names(RzTypeDB *typedb); -RZ_API RZ_OWN RzList *rz_type_db_struct_names(RzTypeDB *typedb); -RZ_API RZ_OWN RzList *rz_type_db_union_names(RzTypeDB *typedb); -RZ_API RZ_OWN RzList *rz_type_db_typedef_names(RzTypeDB *typedb); -RZ_API RZ_OWN RzList *rz_type_db_all(RzTypeDB *typedb); +RZ_API RZ_OWN RzList /**/ *rz_type_db_enum_names(RzTypeDB *typedb); +RZ_API RZ_OWN RzList /**/ *rz_type_db_struct_names(RzTypeDB *typedb); +RZ_API RZ_OWN RzList /**/ *rz_type_db_union_names(RzTypeDB *typedb); +RZ_API RZ_OWN RzList /**/ *rz_type_db_typedef_names(RzTypeDB *typedb); +RZ_API RZ_OWN RzList /**/ *rz_type_db_all(RzTypeDB *typedb); // Serialization API RZ_API void rz_serialize_types_save(RZ_NONNULL Sdb *db, RZ_NONNULL const RzTypeDB *typedb); diff --git a/librz/include/rz_util/rz_annotated_code.h b/librz/include/rz_util/rz_annotated_code.h index ff9c2d926a6..6913642fa44 100644 --- a/librz/include/rz_util/rz_annotated_code.h +++ b/librz/include/rz_util/rz_annotated_code.h @@ -78,7 +78,7 @@ typedef struct rz_code_annotation_t { */ typedef struct rz_annotated_code_t { char *code; /**< Decompiled code. RzAnnotatedCode owns this string and it must free it. */ - RzVector annotations; /**< @ref RzVector contains the list of annotations for the decompiled code. */ + RzVector /**/ annotations; /**< @ref RzVector contains the list of annotations for the decompiled code. */ } RzAnnotatedCode; /** @@ -148,7 +148,7 @@ RZ_API void rz_annotated_code_add_annotation(RzAnnotatedCode *code, RzCodeAnnota * @param offset Offset. * @return Pointer to the @ref RzPVector created. */ -RZ_API RzPVector *rz_annotated_code_annotations_in(RzAnnotatedCode *code, size_t offset); +RZ_API RzPVector /**/ *rz_annotated_code_annotations_in(RzAnnotatedCode *code, size_t offset); /** * @brief Returns all annotations with range that overlap with the specified range. * @@ -160,7 +160,7 @@ RZ_API RzPVector *rz_annotated_code_annotations_in(RzAnnotatedCode *code, size_t * @param end End of the range(exclusive). * @return Pointer to the @ref RzPVector created. */ -RZ_API RzPVector *rz_annotated_code_annotations_range(RzAnnotatedCode *code, size_t start, size_t end); +RZ_API RzPVector /**/ *rz_annotated_code_annotations_range(RzAnnotatedCode *code, size_t start, size_t end); /** * @brief Returns the offset for every line of decompiled code in the specified RzAnnotatedCode. * @@ -171,7 +171,7 @@ RZ_API RzPVector *rz_annotated_code_annotations_range(RzAnnotatedCode *code, siz * @param code Pointer to a RzAnnotatedCode. * @return Pointer to the @ref RzVector created. */ -RZ_API RzVector *rz_annotated_code_line_offsets(RzAnnotatedCode *code); +RZ_API RzVector /**/ *rz_annotated_code_line_offsets(RzAnnotatedCode *code); #ifdef __cplusplus } diff --git a/librz/include/rz_util/rz_event.h b/librz/include/rz_util/rz_event.h index 25cab08ec19..b4db71bb134 100644 --- a/librz/include/rz_util/rz_event.h +++ b/librz/include/rz_util/rz_event.h @@ -15,7 +15,7 @@ typedef struct rz_event_t { void *user; bool incall; HtUP *callbacks; - RzVector all_callbacks; + RzVector /**/ all_callbacks; RzVector /**/ pending_unhook; ///< while inside of a call and a handle is unhooked, the unhook is deferred and saved here int next_handle; } RzEvent; diff --git a/librz/include/rz_util/rz_file.h b/librz/include/rz_util/rz_file.h index a0655d86eb0..eb87bdfb503 100644 --- a/librz/include/rz_util/rz_file.h +++ b/librz/include/rz_util/rz_file.h @@ -71,7 +71,7 @@ RZ_API int rz_file_mkstemp(RZ_NULLABLE const char *prefix, char **oname); RZ_API char *rz_file_tmpdir(void); RZ_API char *rz_file_readlink(const char *path); RZ_API bool rz_file_copy(const char *src, const char *dst); -RZ_API RzList *rz_file_globsearch(const char *globbed_path, int maxdepth); +RZ_API RzList /**/ *rz_file_globsearch(const char *globbed_path, int maxdepth); RZ_API bool rz_file_deflate(RZ_NONNULL const char *src, RZ_NONNULL const char *dst); RZ_API bool rz_file_inflate(RZ_NONNULL const char *src, RZ_NONNULL const char *dst); RZ_API bool rz_file_is_deflated(RZ_NONNULL const char *src); diff --git a/librz/include/rz_util/rz_graph_drawable.h b/librz/include/rz_util/rz_graph_drawable.h index b034b3fc7ef..4b55527e1ad 100644 --- a/librz/include/rz_util/rz_graph_drawable.h +++ b/librz/include/rz_util/rz_graph_drawable.h @@ -28,7 +28,7 @@ typedef struct rz_analysis_graph_node_info_t { RZ_API void rz_graph_free_node_info(void *ptr); RZ_API RzGraphNodeInfo *rz_graph_create_node_info(const char *title, const char *body, ut64 offset); -RZ_API RzGraphNode *rz_graph_add_node_info(RzGraph *graph, const char *title, const char *body, ut64 offset); +RZ_API RzGraphNode *rz_graph_add_node_info(RzGraph /**/ *graph, const char *title, const char *body, ut64 offset); /** * @brief Convert graph to Graphviz dot format. diff --git a/librz/include/rz_util/rz_print.h b/librz/include/rz_util/rz_print.h index ae400576eff..38447f205c8 100644 --- a/librz/include/rz_util/rz_print.h +++ b/librz/include/rz_util/rz_print.h @@ -72,7 +72,7 @@ typedef struct { typedef struct { ut32 op_type; ///< RzAnalysisOpType. Mnemonic color depends on this. RzStrBuf *str; //< Contains the raw asm string - RzVector /* */ *tokens; //< Contains only the tokenization meta-info without strings, ordered by start for log2(n) access + RzVector /**/ *tokens; //< Contains only the tokenization meta-info without strings, ordered by start for log2(n) access } RzAsmTokenString; typedef struct { @@ -161,7 +161,6 @@ typedef struct rz_print_t { bool esc_bslash; bool wide_offsets; const char *strconv_mode; - RzList *vars; char io_unalloc_ch; bool show_offset; diff --git a/librz/include/rz_util/rz_range.h b/librz/include/rz_util/rz_range.h index 0d678f2c673..38d5fbe2ca6 100644 --- a/librz/include/rz_util/rz_range.h +++ b/librz/include/rz_util/rz_range.h @@ -20,7 +20,7 @@ typedef struct rz_range_item_t { typedef struct rz_range_t { int count; int changed; - RzList *ranges; + RzList /**/ *ranges; } RRange; RZ_API RRange *rz_range_new(void); diff --git a/librz/include/rz_util/rz_spaces.h b/librz/include/rz_util/rz_spaces.h index 7153e67b079..be0393cf013 100644 --- a/librz/include/rz_util/rz_spaces.h +++ b/librz/include/rz_util/rz_spaces.h @@ -57,7 +57,7 @@ typedef struct rz_spaces_t { const char *name; RzSpace *current; RBTree spaces; - RzList *spacestack; + RzList /**/ *spacestack; RzEvent *event; } RzSpaces; diff --git a/librz/include/rz_util/rz_str.h b/librz/include/rz_util/rz_str.h index ad4762d8aa7..8efd266afc2 100644 --- a/librz/include/rz_util/rz_str.h +++ b/librz/include/rz_util/rz_str.h @@ -97,11 +97,11 @@ RZ_API const char *rz_str_casestr(const char *a, const char *b); RZ_API const char *rz_str_firstbut(const char *s, char ch, const char *but); RZ_API const char *rz_str_lastbut(const char *s, char ch, const char *but); RZ_API size_t rz_str_split(char *str, char ch); -RZ_API RzList *rz_str_split_list(char *str, const char *c, int n); -RZ_API RZ_OWN RzList *rz_str_split_list_regex(RZ_NONNULL char *str, RZ_NONNULL const char *r, int n); -RZ_API RzList *rz_str_split_duplist(const char *str, const char *c, bool trim); -RZ_API RzList *rz_str_split_duplist_n(const char *str, const char *c, int n, bool trim); -RZ_API RZ_OWN RzList *rz_str_split_duplist_n_regex(RZ_NONNULL const char *_str, RZ_NONNULL const char *r, int n, bool trim); +RZ_API RzList /**/ *rz_str_split_list(char *str, const char *c, int n); +RZ_API RZ_OWN RzList /**/ *rz_str_split_list_regex(RZ_NONNULL char *str, RZ_NONNULL const char *r, int n); +RZ_API RzList /**/ *rz_str_split_duplist(const char *str, const char *c, bool trim); +RZ_API RzList /**/ *rz_str_split_duplist_n(const char *str, const char *c, int n, bool trim); +RZ_API RZ_OWN RzList /**/ *rz_str_split_duplist_n_regex(RZ_NONNULL const char *_str, RZ_NONNULL const char *r, int n, bool trim); RZ_API size_t *rz_str_split_lines(char *str, size_t *count); RZ_API char *rz_str_replace(char *str, const char *key, const char *val, int g); RZ_API char *rz_str_replace_icase(char *str, const char *key, const char *val, int g, int keep_case); @@ -252,9 +252,9 @@ RZ_API const char *rz_str_last(const char *in, const char *ch); RZ_API char *rz_str_highlight(char *str, const char *word, const char *color, const char *color_reset); RZ_API char *rz_str_from_ut64(ut64 val); RZ_API void rz_str_stripLine(char *str, const char *key); -RZ_API char *rz_str_list_join(RzList *str, const char *sep); +RZ_API char *rz_str_list_join(RzList /**/ *str, const char *sep); RZ_API char *rz_str_array_join(const char **a, size_t n, const char *sep); -RZ_API RzList *rz_str_wrap(char *str, size_t width); +RZ_API RzList /**/ *rz_str_wrap(char *str, size_t width); RZ_API const char *rz_str_sep(const char *base, const char *sep); RZ_API const char *rz_str_rsep(const char *base, const char *p, const char *sep); diff --git a/librz/include/rz_util/rz_str_search.h b/librz/include/rz_util/rz_str_search.h index 80799bfc51b..8f55fc32bda 100644 --- a/librz/include/rz_util/rz_str_search.h +++ b/librz/include/rz_util/rz_str_search.h @@ -34,9 +34,9 @@ typedef struct { RZ_API void rz_detected_string_free(RzDetectedString *str); -RZ_API int rz_scan_strings_raw(RZ_NONNULL const ut8 *buf, RZ_NONNULL RzList *list, RZ_NONNULL const RzUtilStrScanOptions *opt, +RZ_API int rz_scan_strings_raw(RZ_NONNULL const ut8 *buf, RZ_NONNULL RzList /**/ *list, RZ_NONNULL const RzUtilStrScanOptions *opt, const ut64 from, const ut64 to, RzStrEnc type); -RZ_API int rz_scan_strings(RZ_NONNULL RzBuffer *buf_to_scan, RZ_NONNULL RzList *list, RZ_NONNULL const RzUtilStrScanOptions *opt, +RZ_API int rz_scan_strings(RZ_NONNULL RzBuffer *buf_to_scan, RZ_NONNULL RzList /**/ *list, RZ_NONNULL const RzUtilStrScanOptions *opt, const ut64 from, const ut64 to, RzStrEnc type); #ifdef __cplusplus diff --git a/librz/include/rz_util/rz_sys.h b/librz/include/rz_util/rz_sys.h index ad840de0f57..ba8338eb27d 100644 --- a/librz/include/rz_util/rz_sys.h +++ b/librz/include/rz_util/rz_sys.h @@ -86,7 +86,7 @@ RZ_API int rz_sys_crash_handler(const char *cmd); RZ_API const char *rz_sys_arch_str(int arch); RZ_API int rz_sys_arch_id(const char *arch); RZ_API bool rz_sys_arch_match(const char *archstr, const char *arch); -RZ_API RzList *rz_sys_dir(const char *path); +RZ_API RzList /**/ *rz_sys_dir(const char *path); RZ_API void rz_sys_perror_str(const char *fun); #define rz_sys_mkdir_failed() (errno != EEXIST) RZ_API bool rz_sys_mkdir(const char *dir); diff --git a/librz/include/rz_util/rz_table.h b/librz/include/rz_util/rz_table.h index 2b9d3bbd21c..adda5b88017 100644 --- a/librz/include/rz_util/rz_table.h +++ b/librz/include/rz_util/rz_table.h @@ -37,12 +37,12 @@ enum { }; typedef struct { - RzPVector *items; + RzPVector /**/ *items; } RzTableRow; typedef struct { - RzVector *rows; - RzVector *cols; + RzVector /**/ *rows; + RzVector /**/ *cols; int totalCols; bool showHeader; bool showFancy; @@ -68,11 +68,11 @@ RZ_API int rz_table_column_nth(RzTable *t, const char *name); RZ_API void rz_table_add_column(RzTable *t, RzTableColumnType *type, const char *name, int maxWidth); RZ_API void rz_table_set_columnsf(RzTable *t, const char *fmt, ...); RZ_API void rz_table_set_vcolumnsf(RzTable *t, const char *fmt, va_list ap); -RZ_API RzTableRow *rz_table_row_new(RzPVector *items); +RZ_API RzTableRow *rz_table_row_new(RzPVector /**/ *items); RZ_API void rz_table_add_row(RZ_NONNULL RzTable *t, const char *name, ...); RZ_API void rz_table_add_rowf(RzTable *t, const char *fmt, ...); RZ_API void rz_table_add_row_columnsf(RzTable *t, const char *fmt, ...); -RZ_API void rz_table_add_row_vec(RZ_NONNULL RzTable *t, RZ_NONNULL RzPVector *items); +RZ_API void rz_table_add_row_vec(RZ_NONNULL RzTable *t, RZ_NONNULL RzPVector /**/ *items); RZ_API RZ_OWN char *rz_table_tofancystring(RZ_NONNULL RzTable *t); RZ_API char *rz_table_tosimplestring(RzTable *t); RZ_API char *rz_table_tostring(RzTable *t); @@ -85,9 +85,9 @@ RZ_API void rz_table_group(RzTable *t, int nth, RzTableSelector fcn); RZ_API bool rz_table_query(RzTable *t, const char *q); RZ_API void rz_table_hide_header(RzTable *t); RZ_API bool rz_table_align(RzTable *t, int nth, int align); -RZ_API void rz_table_visual_list(RzTable *table, RzList *list, ut64 seek, ut64 len, int width, bool va); +RZ_API void rz_table_visual_list(RzTable *table, RzList /**/ *list, ut64 seek, ut64 len, int width, bool va); RZ_API RZ_OWN RzTable *rz_table_transpose(RZ_NONNULL RzTable *t); -RZ_API void rz_table_columns(RzTable *t, RzList *cols); // const char *name, ...); +RZ_API void rz_table_columns(RzTable *t, RzList /**/ *cols); // const char *name, ...); #ifdef __cplusplus } #endif diff --git a/librz/include/rz_util/rz_tree.h b/librz/include/rz_util/rz_tree.h index 7d478514fff..105c9ffb919 100644 --- a/librz/include/rz_util/rz_tree.h +++ b/librz/include/rz_util/rz_tree.h @@ -7,7 +7,7 @@ struct rz_tree_t; typedef struct rz_tree_node_t { struct rz_tree_node_t *parent; struct rz_tree_t *tree; - RzList *children; // + RzList /**/ *children; unsigned int n_children; int depth; RzListFree free; diff --git a/librz/io/io.c b/librz/io/io.c index d42bcbe889e..3473308704a 100644 --- a/librz/io/io.c +++ b/librz/io/io.c @@ -198,7 +198,7 @@ RZ_API RzIODesc *rz_io_open_at(RzIO *io, const char *uri, int perm, int mode, ut } /* opens many files, without mapping them. This should be discussed */ -RZ_API RzList *rz_io_open_many(RzIO *io, const char *uri, int perm, int mode) { +RZ_API RzList /**/ *rz_io_open_many(RzIO *io, const char *uri, int perm, int mode) { RzList *desc_list; RzListIter *iter; RzIODesc *desc; diff --git a/librz/io/io_map.c b/librz/io/io_map.c index 85dda3ec937..eabb26ac69c 100644 --- a/librz/io/io_map.c +++ b/librz/io/io_map.c @@ -385,7 +385,7 @@ RZ_API ut64 rz_io_map_next_address(RzIO *io, ut64 addr) { return lowest; } -RZ_API RzList *rz_io_map_get_for_fd(RzIO *io, int fd) { +RZ_API RzList /**/ *rz_io_map_get_for_fd(RzIO *io, int fd) { RzList *map_list = rz_list_newf(NULL); if (!map_list) { return NULL; @@ -432,7 +432,7 @@ RZ_API ut64 rz_io_map_location(RzIO *io, ut64 size) { * * \param io RzIO instance */ -RZ_API RZ_BORROW RzPVector *rz_io_maps(RzIO *io) { +RZ_API RZ_BORROW RzPVector /**/ *rz_io_maps(RzIO *io) { rz_return_val_if_fail(io, NULL); return &io->maps; } diff --git a/librz/io/p/io_ar.c b/librz/io/p/io_ar.c index 4dcfcd48dab..2c401f4402c 100644 --- a/librz/io/p/io_ar.c +++ b/librz/io/p/io_ar.c @@ -10,7 +10,7 @@ static bool rz_io_ar_plugin_open(RzIO *io, const char *file, bool many) { return !strncmp("ar://", file, 5) || !strncmp("lib://", file, 6); } -static RzList *rz_io_ar_open_many(RzIO *io, const char *file, int perm, int mode) { +static RzList /**/ *rz_io_ar_open_many(RzIO *io, const char *file, int perm, int mode) { const char *arname = strstr(file, "://"); if (!arname) { return NULL; diff --git a/librz/io/p/io_zip.c b/librz/io/p/io_zip.c index ab250e02745..b447165cb51 100644 --- a/librz/io/p/io_zip.c +++ b/librz/io/p/io_zip.c @@ -157,7 +157,7 @@ static int rz_io_zip_slurp_file(RzIOZipFileObj *zfo) { return res; } -RzList *rz_io_zip_get_files(const char *archivename, ut32 perm, int mode, int rw) { +RzList /**/ *rz_io_zip_get_files(const char *archivename, ut32 perm, int mode, int rw) { struct zip *zipArch = rz_io_zip_open_archive(archivename, perm, mode, rw); ut64 num_entries = 0, i = 0; struct zip_stat sb; @@ -281,7 +281,7 @@ RzIOZipFileObj *rz_io_zip_alloc_zipfileobj(const char *archivename, const char * } // Below this line are the rz_io_zip plugin APIs -static RzList *rz_io_zip_open_many(RzIO *io, const char *file, int rw, int mode) { +static RzList /**/ *rz_io_zip_open_many(RzIO *io, const char *file, int rw, int mode) { RzList *list_fds = NULL; RzListIter *iter; RzList *filenames = NULL; diff --git a/librz/io/p_cache.c b/librz/io/p_cache.c index 26f5aa2b86f..284e29e9428 100644 --- a/librz/io/p_cache.c +++ b/librz/io/p_cache.c @@ -246,7 +246,7 @@ static bool __desc_cache_list_cb(void *user, const ut64 k, const void *v) { return true; } -RZ_API RzList *rz_io_desc_cache_list(RzIODesc *desc) { +RZ_API RzList /**/ *rz_io_desc_cache_list(RzIODesc *desc) { if (!desc || !desc->io || !desc->io->desc || !desc->io->p_cache || !desc->cache) { return NULL; } diff --git a/librz/main/rizin.c b/librz/main/rizin.c index 32be1a1ae96..30b7e27e3b0 100644 --- a/librz/main/rizin.c +++ b/librz/main/rizin.c @@ -276,7 +276,7 @@ static int main_print_var(const char *var_name) { return 0; } -static bool run_commands(RzCore *r, RzList *cmds, RzList *files, bool quiet, int do_analysis) { +static bool run_commands(RzCore *r, RzList /**/ *cmds, RzList /**/ *files, bool quiet, int do_analysis) { RzListIter *iter; const char *cmdn; const char *file; diff --git a/librz/main/rz-diff.c b/librz/main/rz-diff.c index 8861442fd88..5bf6fb82a1d 100644 --- a/librz/main/rz-diff.c +++ b/librz/main/rz-diff.c @@ -82,7 +82,7 @@ typedef struct diff_context_t { const char *file_a; const char *file_b; DiffScreen screen; - RzList *evars; + RzList /**/ *evars; } DiffContext; typedef struct diff_io_t { @@ -551,7 +551,7 @@ static inline RzBinFile *core_get_file(RzCoreFile *cfile) { return rz_pvector_at(&cfile->binfiles, 0); } -static RzCoreFile *rz_diff_load_file_with_core(const char *filename, const char *architecture, ut32 arch_bits, RzList *evars, bool colors) { +static RzCoreFile *rz_diff_load_file_with_core(const char *filename, const char *architecture, ut32 arch_bits, RzList /**/ *evars, bool colors) { RzCore *core = NULL; RzCoreFile *cfile = NULL; RzBinFile *bfile = NULL; @@ -669,7 +669,7 @@ static void rz_diff_file_close(DiffFile *file) { /**************************************** rzlists ***************************************/ -static const void *rz_diff_list_elem_at(const RzList *array, ut32 index) { +static const void *rz_diff_list_elem_at(const RzList /**/ *array, ut32 index) { return rz_list_get_n(array, index); } diff --git a/librz/main/rz-find.c b/librz/main/rz-find.c index 86c2345d48b..f7e8e94fcfe 100644 --- a/librz/main/rz-find.c +++ b/librz/main/rz-find.c @@ -34,7 +34,7 @@ typedef struct { ut64 to; ut64 cur; RzPrint *pr; - RzList *keywords; + RzList /**/ *keywords; const char *mask; const char *curfile; const char *comma; diff --git a/librz/main/rz-hash.c b/librz/main/rz-hash.c index 6d6ed7c4e82..2276507b421 100644 --- a/librz/main/rz-hash.c +++ b/librz/main/rz-hash.c @@ -782,7 +782,7 @@ static void hash_context_compare_hashes(RzHashContext *ctx, size_t filesize, boo } } -static RzList *parse_hash_algorithms(RzHashContext *ctx) { +static RzList /**/ *parse_hash_algorithms(RzHashContext *ctx) { if (!strcmp(ctx->algorithm, "all")) { const RzHashPlugin *plugin; RzList *list = rz_list_newf(NULL); diff --git a/librz/parse/p/parse_6502_pseudo.c b/librz/parse/p/parse_6502_pseudo.c index 665622ae2bb..daf0861935c 100644 --- a/librz/parse/p/parse_6502_pseudo.c +++ b/librz/parse/p/parse_6502_pseudo.c @@ -13,7 +13,7 @@ #include "parse_common.c" -static RzList *_6502_tokenize(const char *assembly, size_t length); +static RzList /**/ *_6502_tokenize(const char *assembly, size_t length); static const RzPseudoGrammar _6502_lexicon[] = { RZ_PSEUDO_DEFINE_GRAMMAR("adc", "a += (1 + 2)"), @@ -70,7 +70,7 @@ static const RzPseudoGrammar _6502_lexicon[] = { static const RzPseudoConfig _6502_config = RZ_PSEUDO_DEFINE_CONFIG_ONLY_LEXICON(_6502_lexicon, 3, _6502_tokenize); -RzList *_6502_tokenize(const char *assembly, size_t length) { +RzList /**/ *_6502_tokenize(const char *assembly, size_t length) { size_t i, p; char *buf = NULL; bool insert_zero = false; diff --git a/librz/parse/p/parse_arm_pseudo.c b/librz/parse/p/parse_arm_pseudo.c index 021dbffdeca..c6580265c10 100644 --- a/librz/parse/p/parse_arm_pseudo.c +++ b/librz/parse/p/parse_arm_pseudo.c @@ -13,7 +13,7 @@ #include "parse_common.c" -static RzList *arm_tokenize(const char *assembly, size_t length); +static RzList /**/ *arm_tokenize(const char *assembly, size_t length); static const RzPseudoGrammar arm_lexicon[] = { RZ_PSEUDO_DEFINE_GRAMMAR("abs", "1 = abs(1)"), @@ -133,7 +133,7 @@ static const RzPseudoReplace arm_replace[] = { static const RzPseudoConfig arm_config = RZ_PSEUDO_DEFINE_CONFIG(arm_direct, arm_lexicon, arm_replace, 5, arm_tokenize); -RzList *arm_tokenize(const char *assembly, size_t length) { +RzList /**/ *arm_tokenize(const char *assembly, size_t length) { size_t i, p; char *buf = NULL; const char *comma_replace = NULL; diff --git a/librz/parse/p/parse_avr_pseudo.c b/librz/parse/p/parse_avr_pseudo.c index 9a251cd9f15..24d4d1d692c 100644 --- a/librz/parse/p/parse_avr_pseudo.c +++ b/librz/parse/p/parse_avr_pseudo.c @@ -13,7 +13,7 @@ #include "parse_common.c" -static RzList *avr_tokenize(const char *assembly, size_t length); +static RzList /**/ *avr_tokenize(const char *assembly, size_t length); static const RzPseudoGrammar avr_lexicon[] = { RZ_PSEUDO_DEFINE_GRAMMAR("adc", "1 += 2 + carry"), @@ -104,7 +104,7 @@ static const RzPseudoGrammar avr_lexicon[] = { static const RzPseudoConfig avr_config = RZ_PSEUDO_DEFINE_CONFIG_ONLY_LEXICON(avr_lexicon, 3, avr_tokenize); -RzList *avr_tokenize(const char *assembly, size_t length) { +RzList /**/ *avr_tokenize(const char *assembly, size_t length) { size_t i, p; char *buf = NULL; bool insert_zero = false; diff --git a/librz/parse/p/parse_common.c b/librz/parse/p/parse_common.c index 19ed91484ea..fe0ecdd5979 100644 --- a/librz/parse/p/parse_common.c +++ b/librz/parse/p/parse_common.c @@ -52,7 +52,7 @@ typedef struct { const RzPseudoGrammar *lexicon; size_t lexicon_length; int max_args; - RzList *(*tokenize)(const char *assembly, size_t length); + RzList /**/ *(*tokenize)(const char *assembly, size_t length); } RzPseudoConfig; #define RZ_PSEUDO_DEFINE_GRAMMAR(x, y) \ diff --git a/librz/parse/p/parse_dalvik_pseudo.c b/librz/parse/p/parse_dalvik_pseudo.c index 074b5ead9d1..bd28137544a 100644 --- a/librz/parse/p/parse_dalvik_pseudo.c +++ b/librz/parse/p/parse_dalvik_pseudo.c @@ -13,7 +13,7 @@ #include "parse_common.c" -static RzList *dalvik_tokenize(const char *assembly, size_t length); +static RzList /**/ *dalvik_tokenize(const char *assembly, size_t length); static const RzPseudoGrammar dalvik_lexicon[] = { RZ_PSEUDO_DEFINE_GRAMMAR("+iget-wide-volatile", "1 = (wide-volatile) 2 [3]"), @@ -203,7 +203,7 @@ static const RzPseudoReplace dalvik_replace[] = { static const RzPseudoConfig dalvik_config = RZ_PSEUDO_DEFINE_CONFIG_NO_DIRECT(dalvik_lexicon, dalvik_replace, 4, dalvik_tokenize); -RzList *dalvik_tokenize(const char *assembly, size_t length) { +RzList /**/ *dalvik_tokenize(const char *assembly, size_t length) { size_t i, p; char *buf = NULL; RzList *tokens = NULL; diff --git a/librz/parse/p/parse_m68k_pseudo.c b/librz/parse/p/parse_m68k_pseudo.c index a342938b185..3c485558bb2 100644 --- a/librz/parse/p/parse_m68k_pseudo.c +++ b/librz/parse/p/parse_m68k_pseudo.c @@ -13,7 +13,7 @@ #include "parse_common.c" -static RzList *m68k_tokenize(const char *assembly, size_t length); +static RzList /**/ *m68k_tokenize(const char *assembly, size_t length); static const RzPseudoGrammar m68k_lexicon[] = { RZ_PSEUDO_DEFINE_GRAMMAR("add", "1 += 2"), @@ -59,7 +59,7 @@ static const RzPseudoReplace m68k_replace[] = { static const RzPseudoConfig m68k_config = RZ_PSEUDO_DEFINE_CONFIG_NO_DIRECT(m68k_lexicon, m68k_replace, 4, m68k_tokenize); -RzList *m68k_tokenize(const char *assembly, size_t length) { +RzList /**/ *m68k_tokenize(const char *assembly, size_t length) { size_t i, p; char *buf = NULL; RzList *tokens = NULL; diff --git a/librz/parse/p/parse_mips_pseudo.c b/librz/parse/p/parse_mips_pseudo.c index 06ec547a1ad..872f4f09f27 100644 --- a/librz/parse/p/parse_mips_pseudo.c +++ b/librz/parse/p/parse_mips_pseudo.c @@ -14,7 +14,7 @@ #include "parse_common.c" -static RzList *mips_tokenize(const char *assembly, size_t length); +static RzList /**/ *mips_tokenize(const char *assembly, size_t length); static const RzPseudoGrammar mips_lexicon[] = { RZ_PSEUDO_DEFINE_GRAMMAR("add", "1 = 2 + 3"), @@ -92,7 +92,7 @@ static const RzPseudoReplace mips_replace[] = { static const RzPseudoConfig mips_config = RZ_PSEUDO_DEFINE_CONFIG(mips_direct, mips_lexicon, mips_replace, 4, mips_tokenize); -RzList *mips_tokenize(const char *assembly, size_t length) { +RzList /**/ *mips_tokenize(const char *assembly, size_t length) { size_t i, p; char *buf = NULL; bool insert_zero = false; diff --git a/librz/parse/p/parse_sh_pseudo.c b/librz/parse/p/parse_sh_pseudo.c index fef1a7bb10f..277c7671f23 100644 --- a/librz/parse/p/parse_sh_pseudo.c +++ b/librz/parse/p/parse_sh_pseudo.c @@ -13,7 +13,7 @@ #include "parse_common.c" -static RzList *sh_tokenize(const char *assembly, size_t length); +static RzList /**/ *sh_tokenize(const char *assembly, size_t length); static const RzPseudoGrammar sh_lexicon[] = { RZ_PSEUDO_DEFINE_GRAMMAR("add", "2 += 1"), @@ -129,7 +129,7 @@ static const RzPseudoReplace sh_replace[] = { static const RzPseudoConfig sh_config = RZ_PSEUDO_DEFINE_CONFIG_NO_DIRECT(sh_lexicon, sh_replace, 4, sh_tokenize); -RzList *sh_tokenize(const char *assembly, size_t length) { +RzList /**/ *sh_tokenize(const char *assembly, size_t length) { size_t i, p; char *buf = NULL; bool ignore_comma = false; diff --git a/librz/parse/p/parse_tms320_pseudo.c b/librz/parse/p/parse_tms320_pseudo.c index 06c4bb32557..5912d4bb487 100644 --- a/librz/parse/p/parse_tms320_pseudo.c +++ b/librz/parse/p/parse_tms320_pseudo.c @@ -9,7 +9,7 @@ // https://www.ti.com/lit/ug/spru732j/spru732j.pdf #include "parse_common.c" -static RzList *tms320_tokenize(const char *assembly, size_t length); +static RzList /**/ *tms320_tokenize(const char *assembly, size_t length); static const RzPseudoGrammar tms320_lexicon[] = { RZ_PSEUDO_DEFINE_GRAMMAR("add", "3 = 1 + 2"), @@ -94,7 +94,7 @@ static const RzPseudoGrammar tms320_lexicon[] = { static const RzPseudoConfig tms320_config = RZ_PSEUDO_DEFINE_CONFIG_ONLY_LEXICON(tms320_lexicon, 5, tms320_tokenize); -RzList *tms320_tokenize(const char *assembly, size_t length) { +RzList /**/ *tms320_tokenize(const char *assembly, size_t length) { char *buf = NULL, *sp = NULL; RzList *tokens = NULL; buf = rz_str_ndup(assembly, length); diff --git a/librz/parse/p/parse_v850_pseudo.c b/librz/parse/p/parse_v850_pseudo.c index 6a769392125..7c9465fc0f5 100644 --- a/librz/parse/p/parse_v850_pseudo.c +++ b/librz/parse/p/parse_v850_pseudo.c @@ -10,7 +10,7 @@ #include "parse_common.c" -static RzList *v850_tokenize(const char *assembly, size_t length); +static RzList /**/ *v850_tokenize(const char *assembly, size_t length); static const RzPseudoGrammar v850_lexicon[] = { RZ_PSEUDO_DEFINE_GRAMMAR("add", "2 += 1"), @@ -79,7 +79,7 @@ static const char *v850_short_op[] = { "or", }; -RzList *v850_tokenize(const char *assembly, size_t length) { +RzList /**/ *v850_tokenize(const char *assembly, size_t length) { size_t i, p; char *buf = NULL; bool insert_zero = false; diff --git a/librz/parse/p/parse_z80_pseudo.c b/librz/parse/p/parse_z80_pseudo.c index aab3b2e1a18..fcf23e926ac 100644 --- a/librz/parse/p/parse_z80_pseudo.c +++ b/librz/parse/p/parse_z80_pseudo.c @@ -13,7 +13,7 @@ #include "parse_common.c" -static RzList *z80_tokenize(const char *assembly, size_t length); +static RzList /**/ *z80_tokenize(const char *assembly, size_t length); // https://wikiti.brandonw.net/index.php?title=Z80_Instruction_Set static const RzPseudoGrammar z80_lexicon[] = { @@ -92,7 +92,7 @@ static const RzPseudoGrammar z80_lexicon[] = { static const RzPseudoConfig z80_config = RZ_PSEUDO_DEFINE_CONFIG_ONLY_LEXICON(z80_lexicon, 3, z80_tokenize); -RzList *z80_tokenize(const char *assembly, size_t length) { +RzList /**/ *z80_tokenize(const char *assembly, size_t length) { size_t i, p; char *buf = NULL; const char *comma_replace = NULL; diff --git a/librz/reg/profile.c b/librz/reg/profile.c index 7e61f9366d2..705139d528c 100644 --- a/librz/reg/profile.c +++ b/librz/reg/profile.c @@ -141,7 +141,7 @@ static bool parse_offset(const char *s, RZ_OUT RzRegProfileDef *def) { * \return true On success. * \return false On Failure. */ -static bool parse_alias(RZ_OUT RzList *alias_list, RZ_BORROW RzList *tokens) { +static bool parse_alias(RZ_OUT RzList /**/ *alias_list, RZ_BORROW RzList /**/ *tokens) { rz_return_val_if_fail(alias_list && tokens, false); RzRegProfileAlias *pa = RZ_NEW0(RzRegProfileAlias); if (!pa) { @@ -180,7 +180,7 @@ static bool parse_alias(RZ_OUT RzList *alias_list, RZ_BORROW RzList *tokens) { * \return false On failure. * \return true On success. */ -static bool parse_def(RZ_OUT RzList *def_list, RZ_BORROW RzList *tokens) { +static bool parse_def(RZ_OUT RzList /**/ *def_list, RZ_BORROW RzList /**/ *tokens) { rz_return_val_if_fail(def_list && tokens, false); RzRegProfileDef *def = RZ_NEW0(RzRegProfileDef); @@ -267,7 +267,7 @@ static bool parse_def(RZ_OUT RzList *def_list, RZ_BORROW RzList *tokens) { * \return false On failure. * \return true On success. */ -static bool parse_reg_profile_str(RZ_OUT RzList *alias_list, RZ_OUT RzList *def_list, const char *profile_str) { +static bool parse_reg_profile_str(RZ_OUT RzList /**/ *alias_list, RZ_OUT RzList /**/ *def_list, const char *profile_str) { rz_return_val_if_fail(alias_list && def_list && profile_str, false); RzList *def_lines = rz_str_split_duplist_n(profile_str, "\n", 0, true); diff --git a/librz/reg/reg.c b/librz/reg/reg.c index c5f8c4bc5af..714f4f91bdb 100644 --- a/librz/reg/reg.c +++ b/librz/reg/reg.c @@ -386,7 +386,7 @@ RZ_API RzRegItem *rz_reg_get_by_role_or_name(RzReg *reg, const char *name) { return rz_reg_get(reg, name, RZ_REG_TYPE_ANY); } -RZ_API const RzList *rz_reg_get_list(RzReg *reg, int type) { +RZ_API const RzList /**/ *rz_reg_get_list(RzReg *reg, int type) { if (type == RZ_REG_TYPE_ANY) { return reg->allregs; } @@ -486,7 +486,7 @@ static bool foreach_reg_cb(RzIntervalNode *node, void *user) { * \brief Filter out all register items that are smaller than but covered entirely by some other register * \param regs list of RzRegItem */ -RZ_API RZ_OWN RzList *rz_reg_filter_items_covered(RZ_BORROW RZ_NONNULL const RzList /**/ *regs) { +RZ_API RZ_OWN RzList /**/ *rz_reg_filter_items_covered(RZ_BORROW RZ_NONNULL const RzList /**/ *regs) { rz_return_val_if_fail(regs, NULL); RzList *ret = rz_list_new(); if (!ret) { diff --git a/librz/search/search.c b/librz/search/search.c index 081041be9ac..86c8eddb35d 100644 --- a/librz/search/search.c +++ b/librz/search/search.c @@ -495,7 +495,7 @@ static int listcb(RzSearchKeyword *k, void *user, ut64 addr) { return 1; } -RZ_API RzList *rz_search_find(RzSearch *s, ut64 addr, const ut8 *buf, int len) { +RZ_API RzList /**/ *rz_search_find(RzSearch *s, ut64 addr, const ut8 *buf, int len) { RzList *ret = rz_list_new(); rz_search_set_callback(s, listcb, ret); rz_search_update(s, addr, buf, len); diff --git a/librz/syscall/syscall.c b/librz/syscall/syscall.c index 9ad9f3cbf97..20c9e24c736 100644 --- a/librz/syscall/syscall.c +++ b/librz/syscall/syscall.c @@ -412,7 +412,7 @@ static bool callback_list(void *u, const char *k, const char *v) { return true; // continue loop } -RZ_API RzList *rz_syscall_list(RzSyscall *s) { +RZ_API RzList /**/ *rz_syscall_list(RzSyscall *s) { rz_return_val_if_fail(s, NULL); if (!s->db) { return NULL; diff --git a/librz/type/base.c b/librz/type/base.c index 12fe2e2a67a..059dfd44d7c 100644 --- a/librz/type/base.c +++ b/librz/type/base.c @@ -78,7 +78,7 @@ RZ_API bool rz_type_db_delete_base_type(RzTypeDB *typedb, RZ_NONNULL RzBaseType } struct list_kind { - RzList *types; + RzList /**/ *types; RzBaseTypeKind kind; }; diff --git a/librz/type/format.c b/librz/type/format.c index b1196819447..15f81c6c9d4 100644 --- a/librz/type/format.c +++ b/librz/type/format.c @@ -1922,7 +1922,7 @@ static bool format_collect_cb(void *user, const void *k, const void *v) { return true; } -RZ_API RZ_OWN RzList *rz_type_db_format_all(RzTypeDB *typedb) { +RZ_API RZ_OWN RzList /**/ *rz_type_db_format_all(RzTypeDB *typedb) { rz_return_val_if_fail(typedb, NULL); RzList *formats = rz_list_newf(free); ht_pp_foreach(typedb->formats, format_collect_cb, formats); diff --git a/librz/type/function.c b/librz/type/function.c index 5c76e1e17af..835eee9ce12 100644 --- a/librz/type/function.c +++ b/librz/type/function.c @@ -564,7 +564,7 @@ static bool function_names_collect_cb(void *user, const void *k, const void *v) * * \param typedb Types Database instance */ -RZ_API RZ_OWN RzList *rz_type_function_names(RzTypeDB *typedb) { +RZ_API RZ_OWN RzList /**/ *rz_type_function_names(RzTypeDB *typedb) { rz_return_val_if_fail(typedb, NULL); RzList *result = rz_list_newf(free); ht_pp_foreach(typedb->callables, function_names_collect_cb, result); @@ -585,7 +585,7 @@ static bool noreturn_function_names_collect_cb(void *user, const void *k, const * * \param typedb Types Database instance */ -RZ_API RZ_OWN RzList *rz_type_noreturn_function_names(RzTypeDB *typedb) { +RZ_API RZ_OWN RzList /**/ *rz_type_noreturn_function_names(RzTypeDB *typedb) { rz_return_val_if_fail(typedb, NULL); RzList *noretl = rz_list_newf(free); ht_pp_foreach(typedb->callables, noreturn_function_names_collect_cb, noretl); diff --git a/librz/type/serialize_functions.c b/librz/type/serialize_functions.c index b7272bf6de1..654c2e30cf4 100644 --- a/librz/type/serialize_functions.c +++ b/librz/type/serialize_functions.c @@ -14,7 +14,7 @@ * * \param newly_added list of strings where str is appended if it has been added to the cache in this pass */ -static RzType *parse_type_string_cached(RzTypeParser *parser, HtPP *cache, const char *str, char **error_msg, RZ_OUT RzList *newly_added) { +static RzType *parse_type_string_cached(RzTypeParser *parser, HtPP *cache, const char *str, char **error_msg, RZ_OUT RzList /**/ *newly_added) { rz_return_val_if_fail(str, NULL); RzType *r = ht_pp_find(cache, str, NULL); if (r) { @@ -32,7 +32,7 @@ static RzType *parse_type_string_cached(RzTypeParser *parser, HtPP *cache, const return r; } -static void type_string_cache_rollback(HtPP *cache, RzList *newly_added) { +static void type_string_cache_rollback(HtPP *cache, RzList /**/ *newly_added) { RzListIter *it; char *s; rz_list_foreach (newly_added, it, s) { diff --git a/librz/type/type.c b/librz/type/type.c index 715fd55d00d..d2a7e611a84 100644 --- a/librz/type/type.c +++ b/librz/type/type.c @@ -366,7 +366,7 @@ RZ_API void rz_type_db_reload(RzTypeDB *typedb, const char *types_dir) { * * \param typedb Types Database instance */ -RZ_API RZ_OWN RzList *rz_type_db_enum_names(RzTypeDB *typedb) { +RZ_API RZ_OWN RzList /**/ *rz_type_db_enum_names(RzTypeDB *typedb) { rz_return_val_if_fail(typedb, NULL); RzList *enums = rz_type_db_get_base_types_of_kind(typedb, RZ_BASE_TYPE_KIND_ENUM); RzList *result = rz_list_new(); @@ -384,7 +384,7 @@ RZ_API RZ_OWN RzList *rz_type_db_enum_names(RzTypeDB *typedb) { * * \param typedb Types Database instance */ -RZ_API RZ_OWN RzList *rz_type_db_union_names(RzTypeDB *typedb) { +RZ_API RZ_OWN RzList /**/ *rz_type_db_union_names(RzTypeDB *typedb) { rz_return_val_if_fail(typedb, NULL); RzList *unions = rz_type_db_get_base_types_of_kind(typedb, RZ_BASE_TYPE_KIND_UNION); RzList *result = rz_list_new(); @@ -402,7 +402,7 @@ RZ_API RZ_OWN RzList *rz_type_db_union_names(RzTypeDB *typedb) { * * \param typedb Types Database instance */ -RZ_API RZ_OWN RzList *rz_type_db_struct_names(RzTypeDB *typedb) { +RZ_API RZ_OWN RzList /**/ *rz_type_db_struct_names(RzTypeDB *typedb) { rz_return_val_if_fail(typedb, NULL); RzList *structs = rz_type_db_get_base_types_of_kind(typedb, RZ_BASE_TYPE_KIND_STRUCT); RzList *result = rz_list_new(); @@ -420,7 +420,7 @@ RZ_API RZ_OWN RzList *rz_type_db_struct_names(RzTypeDB *typedb) { * * \param typedb Types Database instance */ -RZ_API RZ_OWN RzList *rz_type_db_typedef_names(RzTypeDB *typedb) { +RZ_API RZ_OWN RzList /**/ *rz_type_db_typedef_names(RzTypeDB *typedb) { rz_return_val_if_fail(typedb, NULL); RzList *typedefs = rz_type_db_get_base_types_of_kind(typedb, RZ_BASE_TYPE_KIND_TYPEDEF); RzList *result = rz_list_new(); @@ -438,7 +438,7 @@ RZ_API RZ_OWN RzList *rz_type_db_typedef_names(RzTypeDB *typedb) { * * \param typedb Types Database instance */ -RZ_API RZ_OWN RzList *rz_type_db_all(RzTypeDB *typedb) { +RZ_API RZ_OWN RzList /**/ *rz_type_db_all(RzTypeDB *typedb) { rz_return_val_if_fail(typedb, NULL); RzList *types = rz_type_db_get_base_types(typedb); RzList *result = rz_list_new(); @@ -556,7 +556,7 @@ RZ_API int rz_type_db_enum_member_by_name(const RzTypeDB *typedb, RZ_NONNULL con * \param typedb Types Database instance * \param val The value to search for */ -RZ_API RZ_OWN RzList *rz_type_db_find_enums_by_val(const RzTypeDB *typedb, ut64 val) { +RZ_API RZ_OWN RzList /**/ *rz_type_db_find_enums_by_val(const RzTypeDB *typedb, ut64 val) { rz_return_val_if_fail(typedb, NULL); RzList *enums = rz_type_db_get_base_types_of_kind(typedb, RZ_BASE_TYPE_KIND_ENUM); RzList *result = rz_list_newf(free); diff --git a/librz/type/typeclass.c b/librz/type/typeclass.c index 174803e36f4..cf79d1adffb 100644 --- a/librz/type/typeclass.c +++ b/librz/type/typeclass.c @@ -292,7 +292,7 @@ RZ_API bool rz_type_is_integral_unsigned(const RzTypeDB *typedb, RZ_NONNULL cons struct list_typeclass { const RzTypeDB *typedb; - RzList *types; + RzList /**/ *types; RzTypeTypeclass typeclass; }; @@ -311,7 +311,7 @@ static bool base_type_typeclass_collect_cb(void *user, const void *k, const void struct list_typeclass_size { const RzTypeDB *typedb; - RzList *types; + RzList /**/ *types; RzTypeTypeclass typeclass; size_t size; }; @@ -335,7 +335,7 @@ static bool base_type_typeclass_sized_collect_cb(void *user, const void *k, cons * \param typedb Type Database instance * \param typeclass typeclass (cannot be None) */ -RZ_API RZ_OWN RzList *rz_type_typeclass_get_all(const RzTypeDB *typedb, RzTypeTypeclass typeclass) { +RZ_API RZ_OWN RzList /**/ *rz_type_typeclass_get_all(const RzTypeDB *typedb, RzTypeTypeclass typeclass) { rz_return_val_if_fail(typedb && typeclass != RZ_TYPE_TYPECLASS_NONE, NULL); rz_return_val_if_fail(typeclass < RZ_TYPE_TYPECLASS_INVALID, NULL); RzList *types = rz_list_new(); @@ -351,7 +351,7 @@ RZ_API RZ_OWN RzList *rz_type_typeclass_get_all(const RzTypeDB *typedb, RzTypeTy * \param typeclass typeclass (cannot be None) * \param size The bitsize of a type to select from */ -RZ_API RZ_OWN RzList *rz_type_typeclass_get_all_sized(const RzTypeDB *typedb, RzTypeTypeclass typeclass, size_t size) { +RZ_API RZ_OWN RzList /**/ *rz_type_typeclass_get_all_sized(const RzTypeDB *typedb, RzTypeTypeclass typeclass, size_t size) { rz_return_val_if_fail(typedb && typeclass != RZ_TYPE_TYPECLASS_NONE, NULL); rz_return_val_if_fail(size && typeclass < RZ_TYPE_TYPECLASS_INVALID, NULL); RzList *types = rz_list_new(); diff --git a/librz/util/annotated_code.c b/librz/util/annotated_code.c index 5e0d291c8e4..fcf7e87f0cd 100644 --- a/librz/util/annotated_code.c +++ b/librz/util/annotated_code.c @@ -46,7 +46,7 @@ RZ_API void rz_annotated_code_add_annotation(RzAnnotatedCode *code, RzCodeAnnota rz_vector_push(&code->annotations, annotation); } -RZ_API RzPVector *rz_annotated_code_annotations_in(RzAnnotatedCode *code, size_t offset) { +RZ_API RzPVector /**/ *rz_annotated_code_annotations_in(RzAnnotatedCode *code, size_t offset) { RzPVector *r = rz_pvector_new(NULL); if (!r) { return NULL; @@ -60,7 +60,7 @@ RZ_API RzPVector *rz_annotated_code_annotations_in(RzAnnotatedCode *code, size_t return r; } -RZ_API RzPVector *rz_annotated_code_annotations_range(RzAnnotatedCode *code, size_t start, size_t end) { +RZ_API RzPVector /**/ *rz_annotated_code_annotations_range(RzAnnotatedCode *code, size_t start, size_t end) { RzPVector *r = rz_pvector_new(NULL); if (!r) { return NULL; @@ -75,7 +75,7 @@ RZ_API RzPVector *rz_annotated_code_annotations_range(RzAnnotatedCode *code, siz return r; } -RZ_API RzVector *rz_annotated_code_line_offsets(RzAnnotatedCode *code) { +RZ_API RzVector /**/ *rz_annotated_code_line_offsets(RzAnnotatedCode *code) { RzVector *r = rz_vector_new(sizeof(ut64), NULL, NULL); if (!r) { return NULL; diff --git a/librz/util/buf_sparse.c b/librz/util/buf_sparse.c index 5a76ec6d2e1..2c099434422 100644 --- a/librz/util/buf_sparse.c +++ b/librz/util/buf_sparse.c @@ -11,7 +11,7 @@ typedef struct sparse_init_config_t { typedef struct buf_sparse_priv { RzBuffer *base; ///< If not NULL, unpopulated bytes are taken from this, else Oxff - RzVector chunks; ///< of RzBufferSparseChunk, non-overlapping, ordered by from addr + RzVector /**/ chunks; ///< of RzBufferSparseChunk, non-overlapping, ordered by from addr ut64 offset; RzBufferSparseWriteMode write_mode; } SparsePriv; diff --git a/librz/util/event.c b/librz/util/event.c index d5b9f25c2ff..2308033dfa4 100644 --- a/librz/util/event.c +++ b/librz/util/event.c @@ -44,7 +44,7 @@ RZ_API void rz_event_free(RzEvent *ev) { free(ev); } -static RzVector *get_cbs(RzEvent *ev, int type) { +static RzVector /**/ *get_cbs(RzEvent *ev, int type) { RzVector *cbs = ht_up_find(ev->callbacks, (ut64)type, NULL); if (!cbs) { cbs = rz_vector_new(sizeof(RzEventCallbackHook), NULL, NULL); diff --git a/librz/util/file.c b/librz/util/file.c index e380181a27a..67a2f634570 100644 --- a/librz/util/file.c +++ b/librz/util/file.c @@ -1229,7 +1229,7 @@ RZ_API bool rz_file_copy(const char *src, const char *dst) { #endif } -static void recursive_search_glob(const char *path, const char *glob, RzList *list, int depth) { +static void recursive_search_glob(const char *path, const char *glob, RzList /**/ *list, int depth) { if (depth < 1) { return; } @@ -1260,7 +1260,7 @@ static void recursive_search_glob(const char *path, const char *glob, RzList *li rz_list_free(dir); } -RZ_API RzList *rz_file_globsearch(const char *_globbed_path, int maxdepth) { +RZ_API RzList /**/ *rz_file_globsearch(const char *_globbed_path, int maxdepth) { char *globbed_path = strdup(_globbed_path); RzList *files = rz_list_newf(free); char *glob = strchr(globbed_path, '*'); diff --git a/librz/util/graph_drawable.c b/librz/util/graph_drawable.c index c8f283432e5..d3e136dd38d 100644 --- a/librz/util/graph_drawable.c +++ b/librz/util/graph_drawable.c @@ -25,7 +25,7 @@ RZ_API RzGraphNodeInfo *rz_graph_create_node_info(const char *title, const char return data; } -RZ_API RzGraphNode *rz_graph_add_node_info(RzGraph *graph, const char *title, const char *body, ut64 offset) { +RZ_API RzGraphNode *rz_graph_add_node_info(RzGraph /**/ *graph, const char *title, const char *body, ut64 offset) { rz_return_val_if_fail(graph, NULL); RzGraphNodeInfo *data = rz_graph_create_node_info(title, body, offset); if (!data) { diff --git a/librz/util/regex/regcomp.c b/librz/util/regex/regcomp.c index 3ccf038e223..b5f18a25bf0 100644 --- a/librz/util/regex/regcomp.c +++ b/librz/util/regex/regcomp.c @@ -152,7 +152,7 @@ RZ_API int rz_regex_match(const char *pattern, const char *flags, const char *te return ret ? 0 : 1; } -RZ_API RzList *rz_regex_get_match_list(const char *pattern, const char *flags, const char *text) { +RZ_API RzList /**/ *rz_regex_get_match_list(const char *pattern, const char *flags, const char *text) { RzList *list = rz_list_newf(free); RzRegex rx; RzRegexMatch match; diff --git a/librz/util/str.c b/librz/util/str.c index 8551abfa430..4bf196bdfd4 100644 --- a/librz/util/str.c +++ b/librz/util/str.c @@ -3341,7 +3341,7 @@ RZ_API bool rz_str_endswith_icase(RZ_NONNULL const char *str, RZ_NONNULL const c return str_endswith(str, needle, false); } -static RzList *str_split_list_common(char *str, const char *c, int n, bool trim, bool dup) { +static RzList /**/ *str_split_list_common(char *str, const char *c, int n, bool trim, bool dup) { rz_return_val_if_fail(str && c, NULL); RzList *lst = rz_list_newf(dup ? free : NULL); char *aux = str; @@ -3367,7 +3367,7 @@ static RzList *str_split_list_common(char *str, const char *c, int n, bool trim, return lst; } -static RzList *str_split_list_common_regex(RZ_BORROW char *str, RZ_BORROW RzRegex *r, int n, bool trim, bool dup) { +static RzList /**/ *str_split_list_common_regex(RZ_BORROW char *str, RZ_BORROW RzRegex *r, int n, bool trim, bool dup) { rz_return_val_if_fail(str && r, NULL); RzList *lst = rz_list_newf(dup ? free : NULL); RzRegexMatch m[1]; @@ -3426,7 +3426,7 @@ static RzList *str_split_list_common_regex(RZ_BORROW char *str, RZ_BORROW RzRege * \param c Delimiter string used to split \p str * \param n If > 0 at most this number of delimiters are considered. */ -RZ_API RzList *rz_str_split_list(char *str, const char *c, int n) { +RZ_API RzList /**/ *rz_str_split_list(char *str, const char *c, int n) { rz_return_val_if_fail(str && c, NULL); return str_split_list_common(str, c, n, true, false); } @@ -3442,7 +3442,7 @@ RZ_API RzList *rz_str_split_list(char *str, const char *c, int n) { * \param r Delimiter regex used to split \p str * \param n If > 0 at most this number of delimiters are considered. */ -RZ_API RZ_OWN RzList *rz_str_split_list_regex(RZ_NONNULL char *str, RZ_NONNULL const char *r, int n) { +RZ_API RZ_OWN RzList /**/ *rz_str_split_list_regex(RZ_NONNULL char *str, RZ_NONNULL const char *r, int n) { rz_return_val_if_fail(str && r, NULL); RzRegex *regex = rz_regex_new(r, "e"); RzList *res = str_split_list_common_regex(str, regex, n, false, false); @@ -3461,7 +3461,7 @@ RZ_API RZ_OWN RzList *rz_str_split_list_regex(RZ_NONNULL char *str, RZ_NONNULL c * \param c Delimiter string used to split \p str * \param trim If true each token is considered without trailing/leading whitespaces. */ -RZ_API RzList *rz_str_split_duplist(const char *_str, const char *c, bool trim) { +RZ_API RzList /**/ *rz_str_split_duplist(const char *_str, const char *c, bool trim) { rz_return_val_if_fail(_str && c, NULL); char *str = strdup(_str); RzList *res = str_split_list_common(str, c, 0, trim, true); @@ -3482,7 +3482,7 @@ RZ_API RzList *rz_str_split_duplist(const char *_str, const char *c, bool trim) * \param n If > 0 at most this number of delimiters are considered. * \param trim If true each token is considered without trailing/leading whitespaces. */ -RZ_API RzList *rz_str_split_duplist_n(const char *_str, const char *c, int n, bool trim) { +RZ_API RzList /**/ *rz_str_split_duplist_n(const char *_str, const char *c, int n, bool trim) { rz_return_val_if_fail(_str && c, NULL); char *str = strdup(_str); RzList *res = str_split_list_common(str, c, n, trim, true); @@ -3503,7 +3503,7 @@ RZ_API RzList *rz_str_split_duplist_n(const char *_str, const char *c, int n, bo * \param n If > 0 at most this number of delimiters are considered. * \param trim If true each token is considered without trailing/leading whitespaces. */ -RZ_API RZ_OWN RzList *rz_str_split_duplist_n_regex(RZ_NONNULL const char *_str, RZ_NONNULL const char *r, int n, bool trim) { +RZ_API RZ_OWN RzList /**/ *rz_str_split_duplist_n_regex(RZ_NONNULL const char *_str, RZ_NONNULL const char *r, int n, bool trim) { rz_return_val_if_fail(_str && r, NULL); char *str = strdup(_str); RzRegex *regex = rz_regex_new(r, "e"); @@ -3777,7 +3777,7 @@ RZ_API void rz_str_stripLine(char *str, const char *key) { } } -RZ_API char *rz_str_list_join(RzList *str, const char *sep) { +RZ_API char *rz_str_list_join(RzList /**/ *str, const char *sep) { RzStrBuf *sb = rz_strbuf_new(""); const char *p; while ((p = rz_list_pop_head(str))) { @@ -3924,7 +3924,7 @@ RZ_API const char *rz_str_str_xy(const char *s, const char *word, const char *pr * \param width the maximum size of each line. It will be respected only if * possible, as the function won't split words. */ -RZ_API RzList *rz_str_wrap(char *str, size_t width) { +RZ_API RzList /**/ *rz_str_wrap(char *str, size_t width) { rz_return_val_if_fail(str, NULL); RzList *res = rz_list_new(); diff --git a/librz/util/str_search.c b/librz/util/str_search.c index e3cfa75029f..58deba6d59a 100644 --- a/librz/util/str_search.c +++ b/librz/util/str_search.c @@ -359,7 +359,7 @@ static inline bool can_be_ebcdic(const ut8 *buf, ut64 size) { * * Used to look for strings in a give RzBuffer. The function can also automatically detect string types. */ -RZ_API int rz_scan_strings_raw(RZ_NONNULL const ut8 *buf, RZ_NONNULL RzList *list, RZ_NONNULL const RzUtilStrScanOptions *opt, +RZ_API int rz_scan_strings_raw(RZ_NONNULL const ut8 *buf, RZ_NONNULL RzList /**/ *list, RZ_NONNULL const RzUtilStrScanOptions *opt, const ut64 from, const ut64 to, RzStrEnc type) { rz_return_val_if_fail(opt && list && buf, -1); @@ -522,7 +522,7 @@ RZ_API int rz_scan_strings_raw(RZ_NONNULL const ut8 *buf, RZ_NONNULL RzList *lis * * Used to look for strings in a give RzBuffer. The function can also automatically detect string types. */ -RZ_API int rz_scan_strings(RZ_NONNULL RzBuffer *buf_to_scan, RZ_NONNULL RzList *list, RZ_NONNULL const RzUtilStrScanOptions *opt, +RZ_API int rz_scan_strings(RZ_NONNULL RzBuffer *buf_to_scan, RZ_NONNULL RzList /**/ *list, RZ_NONNULL const RzUtilStrScanOptions *opt, const ut64 from, const ut64 to, RzStrEnc type) { rz_return_val_if_fail(opt && list && buf_to_scan, -1); diff --git a/librz/util/sys.c b/librz/util/sys.c index 6ad3a0b8f2f..922f8534f7b 100644 --- a/librz/util/sys.c +++ b/librz/util/sys.c @@ -213,7 +213,7 @@ static DIR *sys_opendir(const char *path) { } #endif -RZ_API RzList *rz_sys_dir(const char *path) { +RZ_API RzList /**/ *rz_sys_dir(const char *path) { RzList *list = NULL; #if __WINDOWS__ WIN32_FIND_DATAW entry; diff --git a/librz/util/table.c b/librz/util/table.c index 0c6d5a43517..3b58b5fde6c 100644 --- a/librz/util/table.c +++ b/librz/util/table.c @@ -149,13 +149,13 @@ RZ_API void rz_table_add_column(RzTable *t, RzTableColumnType *type, const char RZ_FREE(c); } -RZ_API RzTableRow *rz_table_row_new(RzPVector *items) { +RZ_API RzTableRow *rz_table_row_new(RzPVector /**/ *items) { RzTableRow *row = RZ_NEW(RzTableRow); row->items = items; return row; } -static bool __addRow(RzTable *t, RzPVector *items, const char *arg, int col) { +static bool __addRow(RzTable *t, RzPVector /**/ *items, const char *arg, int col) { int itemLength = rz_str_len_utf8_ansi(arg) + 1; RzTableColumn *c = rz_vector_index_ptr(t->cols, col); if (c) { @@ -173,7 +173,7 @@ static bool __addRow(RzTable *t, RzPVector *items, const char *arg, int col) { * \param t pointer to RzTable * \param items pointer to RzPVector which contains row elements */ -RZ_API void rz_table_add_row_vec(RZ_NONNULL RzTable *t, RZ_NONNULL RzPVector *items) { +RZ_API void rz_table_add_row_vec(RZ_NONNULL RzTable *t, RZ_NONNULL RzPVector /**/ *items) { rz_return_if_fail(t && items); RzTableRow *row = rz_table_row_new(items); rz_vector_push(t->rows, row); @@ -812,7 +812,7 @@ RZ_API void rz_table_sortlen(RzTable *t, int nth, bool dec) { } } -static int rz_rows_cmp(RzPVector *lhs, RzPVector *rhs, RzVector *cols, int nth) { +static int rz_rows_cmp(RzPVector /**/ *lhs, RzPVector /**/ *rhs, RzVector /**/ *cols, int nth) { void *item_lhs, *item_rhs; RzTableColumn *item_col; st32 tmp, i; @@ -911,7 +911,7 @@ static int __resolveOperation(const char *op) { * \param t pointer to RzTable * \param col_names pointer to RzList containing column names */ -RZ_API void rz_table_columns(RzTable *t, RzList *col_names) { +RZ_API void rz_table_columns(RzTable *t, RzList /**/ *col_names) { // 1 bool per OLD column to indicate whether it should be freed (masked out) bool *free_cols = malloc(sizeof(bool) * rz_vector_len(t->cols)); if (!free_cols) { @@ -1012,7 +1012,7 @@ RZ_API void rz_table_columns(RzTable *t, RzList *col_names) { free(free_cols); } -RZ_API void rz_table_filter_columns(RzTable *t, RzList *list) { +RZ_API void rz_table_filter_columns(RzTable *t, RzList /**/ *list) { const char *col; RzListIter *iter; RzVector *cols = t->cols; @@ -1223,7 +1223,7 @@ RZ_API void rz_listinfo_free(RzListInfo *info) { free(info); } -RZ_API void rz_table_visual_list(RzTable *table, RzList *list, ut64 seek, ut64 len, int width, bool va) { +RZ_API void rz_table_visual_list(RzTable *table, RzList /**/ *list, ut64 seek, ut64 len, int width, bool va) { ut64 mul, min = -1, max = -1; RzListIter *iter; RzListInfo *info; diff --git a/librz/util/thread_queue.c b/librz/util/thread_queue.c index d3d9030e6f3..ec36666e46a 100644 --- a/librz/util/thread_queue.c +++ b/librz/util/thread_queue.c @@ -18,7 +18,7 @@ struct rz_th_queue_t { RzThreadLock *lock; RzThreadCond *cond; size_t max_size; - RzList *list; + RzList /**/ *list; }; /** diff --git a/subprojects/rzar/ar.c b/subprojects/rzar/ar.c index e579022769d..a71d5094fbf 100644 --- a/subprojects/rzar/ar.c +++ b/subprojects/rzar/ar.c @@ -215,7 +215,7 @@ static int ar_parse_header(RzArFp *arf, filetable *tbl, ut64 arsize) { * * Open an ar/lib and returns all the object files inside it. */ -RZ_API RzList *ar_open_all(const char *arname, int perm) { +RZ_API RzList /**/ *ar_open_all(const char *arname, int perm) { if (!arname) { rz_sys_perror(__FUNCTION__); return NULL; diff --git a/subprojects/rzar/ar.h b/subprojects/rzar/ar.h index ae470e5ef9f..996b23bd1b3 100644 --- a/subprojects/rzar/ar.h +++ b/subprojects/rzar/ar.h @@ -15,7 +15,7 @@ typedef struct RZARFP { /* Offset passed is always the real io->off of the inspected file, * the functions automatically translate it to relative offset within the archive */ RZ_API RzArFp *ar_open_file(const char *arname, int perm, const char *filename); -RZ_API RzList *ar_open_all(const char *arname, int perm); +RZ_API RzList /**/ *ar_open_all(const char *arname, int perm); RZ_API void ar_close(RzArFp *f); RZ_API int ar_read_at(RzArFp *f, ut64 off, void *buf, int count); RZ_API int ar_write_at(RzArFp *f, ut64 off, void *buf, int count); diff --git a/subprojects/rzgdb/include/gdbclient/commands.h b/subprojects/rzgdb/include/gdbclient/commands.h index 69fab3e0ac0..49e2c9fa718 100644 --- a/subprojects/rzgdb/include/gdbclient/commands.h +++ b/subprojects/rzgdb/include/gdbclient/commands.h @@ -132,12 +132,12 @@ int gdbr_close_file(libgdbr_t *g); /*! * \brief get list of threads for given pid */ -RzList *gdbr_threads_list(libgdbr_t *g, int pid); +RzList /**/ *gdbr_threads_list(libgdbr_t *g, int pid); /*! * \brief get a list of the child processes of the given pid */ -RzList *gdbr_pids_list(libgdbr_t *g, int pid); +RzList /**/ *gdbr_pids_list(libgdbr_t *g, int pid); /*! * Get absolute name of file executed to create a process diff --git a/subprojects/rzgdb/src/gdbclient/core.c b/subprojects/rzgdb/src/gdbclient/core.c index 931bf129329..357ac5aa7d2 100644 --- a/subprojects/rzgdb/src/gdbclient/core.c +++ b/subprojects/rzgdb/src/gdbclient/core.c @@ -1728,7 +1728,7 @@ bool gdbr_is_thread_dead(libgdbr_t *g, int pid, int tid) { return ret; } -RzList *gdbr_pids_list(libgdbr_t *g, int pid) { +RzList /**/ *gdbr_pids_list(libgdbr_t *g, int pid) { int ret = -1; RzList *list = NULL; int tpid = -1, ttid = -1; @@ -1830,7 +1830,7 @@ RzList *gdbr_pids_list(libgdbr_t *g, int pid) { return list; } -RzList *gdbr_threads_list(libgdbr_t *g, int pid) { +RzList /**/ *gdbr_threads_list(libgdbr_t *g, int pid) { int ret = -1; RzList *list = NULL; int tpid = -1, ttid = -1; diff --git a/subprojects/rzwinkd/winkd.c b/subprojects/rzwinkd/winkd.c index 836ba08e086..d0e92ff1541 100644 --- a/subprojects/rzwinkd/winkd.c +++ b/subprojects/rzwinkd/winkd.c @@ -473,7 +473,7 @@ void winkd_walk_vadtree(RZ_BORROW RZ_NONNULL WindCtx *ctx, ut64 address, ut64 pa } } -RzList *winkd_list_maps(RZ_BORROW RZ_NONNULL WindCtx *ctx) { +RzList /**/ *winkd_list_maps(RZ_BORROW RZ_NONNULL WindCtx *ctx) { if (!ctx->target.vadroot) { return NULL; } @@ -510,7 +510,7 @@ WindProc *winkd_get_process_at(RZ_BORROW RZ_NONNULL WindCtx *ctx, ut64 address) return proc; } -RzList *winkd_list_process(RZ_BORROW RZ_NONNULL WindCtx *ctx) { +RzList /**/ *winkd_list_process(RZ_BORROW RZ_NONNULL WindCtx *ctx) { RzList *ret = NULL; bool current_process_found = false; // Grab the PsActiveProcessHead from _KDDEBUGGER_DATA64 @@ -622,7 +622,7 @@ static int read_at_uva_or_kernel(RZ_BORROW RZ_NONNULL WindCtx *ctx, ut64 address return winkd_read_at_uva(ctx, address, buf, count); } -RzList *winkd_list_modules(RZ_BORROW RZ_NONNULL WindCtx *ctx) { +RzList /**/ *winkd_list_modules(RZ_BORROW RZ_NONNULL WindCtx *ctx) { RzList *ret = rz_list_newf(winkd_windmodule_free); if (!ret) { return NULL; @@ -779,7 +779,7 @@ WindThread *winkd_get_thread_at(RZ_BORROW RZ_NONNULL WindCtx *ctx, ut64 address) return thread; } -RzList *winkd_list_threads(RZ_BORROW RZ_NONNULL WindCtx *ctx) { +RzList /**/ *winkd_list_threads(RZ_BORROW RZ_NONNULL WindCtx *ctx) { RzList *ret; ut64 ptr, base; bool current_thread_found = false; diff --git a/subprojects/rzwinkd/winkd.h b/subprojects/rzwinkd/winkd.h index 3887c90b3d0..8efb9caca5a 100644 --- a/subprojects/rzwinkd/winkd.h +++ b/subprojects/rzwinkd/winkd.h @@ -100,8 +100,8 @@ typedef struct _KdCtx { int syncd; int cpu_count; int cpu; - RzList *plist_cache; - RzList *tlist_cache; + RzList /**/ *plist_cache; + RzList /**/ *tlist_cache; RzThreadLock *dontmix; WindModule kernel_module; ut8 *context_cache; @@ -154,11 +154,11 @@ ut32 winkd_get_target_thread(RZ_BORROW RZ_NONNULL WindCtx *ctx); bool winkd_set_target(RZ_BORROW RZ_NONNULL WindCtx *ctx, ut32 pid, ut32 tid); WindProc *winkd_get_process_at(RZ_BORROW RZ_NONNULL WindCtx *ctx, ut64 address); WindThread *winkd_get_thread_at(RZ_BORROW RZ_NONNULL WindCtx *ctx, ut64 address); -RzList *winkd_list_process(RZ_BORROW RZ_NONNULL WindCtx *ctx); -RzList *winkd_list_threads(RZ_BORROW RZ_NONNULL WindCtx *ctx); +RzList /**/ *winkd_list_process(RZ_BORROW RZ_NONNULL WindCtx *ctx); +RzList /**/ *winkd_list_threads(RZ_BORROW RZ_NONNULL WindCtx *ctx); void winkd_windmodule_free(void *ptr); -RzList *winkd_list_modules(RZ_BORROW RZ_NONNULL WindCtx *ctx); -RzList *winkd_list_maps(RZ_BORROW RZ_NONNULL WindCtx *ctx); +RzList /**/ *winkd_list_modules(RZ_BORROW RZ_NONNULL WindCtx *ctx); +RzList /**/ *winkd_list_maps(RZ_BORROW RZ_NONNULL WindCtx *ctx); int winkd_read_at_uva(RZ_BORROW RZ_NONNULL WindCtx *ctx, ut64 offset, RZ_BORROW RZ_NONNULL RZ_OUT ut8 *buf, int count); int winkd_write_at_uva(RZ_BORROW RZ_NONNULL WindCtx *ctx, ut64 offset, RZ_BORROW RZ_NONNULL RZ_IN const ut8 *buf, int count);