Skip to content

Commit

Permalink
Remove ../include/rz_util from rz_util_includes (#3935)
Browse files Browse the repository at this point in the history
  • Loading branch information
kazarmy authored Oct 22, 2023
1 parent 7982454 commit 7a7945c
Show file tree
Hide file tree
Showing 40 changed files with 49 additions and 49 deletions.
2 changes: 1 addition & 1 deletion librz/analysis/block.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include <rz_analysis.h>
#include <rz_hash.h>
#include <ht_uu.h>
#include <rz_util/ht_uu.h>
#include <assert.h>

#define unwrap(rbnode) ((rbnode) ? container_of(rbnode, RzAnalysisBlock, _rb) : NULL)
Expand Down
2 changes: 1 addition & 1 deletion librz/analysis/p/analysis_arm_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include <rz_analysis.h>
#include <rz_lib.h>
#include <ht_uu.h>
#include <rz_util/ht_uu.h>
#include <capstone/capstone.h>
#include <capstone/arm.h>
#include <rz_util/rz_assert.h>
Expand Down
2 changes: 1 addition & 1 deletion librz/asm/arch/arm/arm_it.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/

#include <rz_util.h>
#include <ht_uu.h>
#include <rz_util/ht_uu.h>
#include <capstone/capstone.h>

typedef struct rz_arm_it_context_t {
Expand Down
2 changes: 1 addition & 1 deletion librz/asm/p/asm_arm_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include <rz_asm.h>
#include <rz_lib.h>
#include <ht_uu.h>
#include <rz_util/ht_uu.h>
#include <capstone/capstone.h>
#include "../arch/arm/asm-arm.h"
#include "../arch/arm/arm_it.h"
Expand Down
4 changes: 2 additions & 2 deletions librz/bin/format/coff/coff.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
#include <rz_util.h>
#include <rz_lib.h>
#include <rz_bin.h>
#include <ht_up.h>
#include <ht_uu.h>
#include <rz_util/ht_up.h>
#include <rz_util/ht_uu.h>

#define COFF_IS_BIG_ENDIAN 1
#define COFF_IS_LITTLE_ENDIAN 0
Expand Down
2 changes: 1 addition & 1 deletion librz/bin/format/coff/coff_reloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include "coff.h"
#include <rz_util.h>
#include <ht_uu.h>
#include <rz_util/ht_uu.h>

/// base vaddr where to map the artificial reloc target vfile
RZ_API ut64 rz_coff_get_reloc_targets_map_base(struct rz_bin_coff_obj *obj) {
Expand Down
2 changes: 1 addition & 1 deletion librz/bin/format/elf/elf_dynamic.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// SPDX-License-Identifier: LGPL-3.0-only

#include "elf.h"
#include <ht_uu.h>
#include <rz_util/ht_uu.h>

#ifndef _INCLUDE_ELF_DYNAMIC_H_
#define _INCLUDE_ELF_DYNAMIC_H_
Expand Down
2 changes: 1 addition & 1 deletion librz/bin/format/elf/elf_relocs.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// SPDX-License-Identifier: LGPL-3.0-only

#include "elf.h"
#include <ht_uu.h>
#include <rz_util/ht_uu.h>

struct relocs_segment {
ut64 offset;
Expand Down
2 changes: 1 addition & 1 deletion librz/bin/format/elf/elf_symbols.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// SPDX-License-Identifier: LGPL-3.0-only

#include "elf.h"
#include <ht_uu.h>
#include <rz_util/ht_uu.h>

#define HASH_NCHAIN_OFFSET(x) ((x) + 4)

Expand Down
2 changes: 1 addition & 1 deletion librz/bin/format/mach0/dyldcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include "dyldcache.h"

#include <ht_pu.h>
#include <rz_util/ht_pu.h>

#define MAX_N_HDR 16

Expand Down
2 changes: 1 addition & 1 deletion librz/bin/format/mach0/dyldcache.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#define RZ_BIN_FORMAT_DYLDCACHE_H

#include <rz_util.h>
#include <set.h>
#include <rz_util/set.h>

#define RZ_BIN_MACH064 1

Expand Down
2 changes: 1 addition & 1 deletion librz/bin/format/mach0/mach0_relocs.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <rz_util.h>
#include "mach0.h"
#include <ht_uu.h>
#include <rz_util/ht_uu.h>

#include "mach0_utils.inc"

Expand Down
2 changes: 1 addition & 1 deletion librz/bin/format/pe/pe_rsrc.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// SPDX-License-Identifier: LGPL-3.0-only

#include "pe.h"
#include <ht_uu.h>
#include <rz_util/ht_uu.h>

static void _free_resource(rz_pe_resource *rs) {
if (rs) {
Expand Down
2 changes: 1 addition & 1 deletion librz/bin/p/bin_coff.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <rz_util.h>
#include <rz_lib.h>
#include <rz_bin.h>
#include <ht_uu.h>
#include <rz_util/ht_uu.h>

#include "coff/coff.h"

Expand Down
2 changes: 1 addition & 1 deletion librz/bin/p/bin_elf.inc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <rz_cons.h>
#include "../i/private.h"
#include "elf/elf.h"
#include <ht_uu.h>
#include <rz_util/ht_uu.h>

#define rz_bin_file_get_elf(bf) ((ELFOBJ *)bf->o->bin_obj)

Expand Down
2 changes: 1 addition & 1 deletion librz/bin/p/bin_mach0.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "../i/private.h"
#include "mach0/mach0.h"
#include "objc/mach0_classes.h"
#include <ht_uu.h>
#include <rz_util/ht_uu.h>

// wip settings

Expand Down
2 changes: 1 addition & 1 deletion librz/bin/p/bin_symbols.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <rz_util.h>
#include <rz_lib.h>
#include <rz_bin.h>
#include <ht_uu.h>
#include <rz_util/ht_uu.h>
#include "../i/private.h"
#include "mach0/coresymbolication.h"

Expand Down
2 changes: 1 addition & 1 deletion librz/bin/relocs_patch.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-License-Identifier: LGPL-3.0-only

#include <rz_bin.h>
#include <ht_uu.h>
#include <rz_util/ht_uu.h>

/// Finm a suitable location for putting the artificial reloc targets map
RZ_API ut64 rz_bin_relocs_patch_find_targets_map_base(RzList /*<RzBinMap *>*/ *maps, ut64 target_sz) {
Expand Down
2 changes: 1 addition & 1 deletion librz/core/agraph.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <rz_core.h>
#include <rz_cons.h>
#include <rz_util/rz_graph_drawable.h>
#include <ht_pu.h>
#include <rz_util/ht_pu.h>
#include <ctype.h>
#include <limits.h>
#include "core_private.h"
Expand Down
2 changes: 1 addition & 1 deletion librz/core/analysis_tp.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include <rz_analysis.h>
#include <rz_util.h>
#include <ht_uu.h>
#include <rz_util/ht_uu.h>
#include <rz_core.h>
#define LOOP_MAX 10

Expand Down
2 changes: 1 addition & 1 deletion librz/core/canalysis.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <rz_flag.h>
#include <rz_core.h>
#include <rz_bin.h>
#include <ht_uu.h>
#include <rz_util/ht_uu.h>
#include <rz_util/rz_graph_drawable.h>
#include <rz_util/rz_path.h>

Expand Down
2 changes: 1 addition & 1 deletion librz/core/cil.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <rz_flag.h>
#include <rz_core.h>
#include <rz_bin.h>
#include <ht_uu.h>
#include <rz_util/ht_uu.h>
#include <rz_util/rz_graph_drawable.h>

#include "core_private.h"
Expand Down
2 changes: 1 addition & 1 deletion librz/core/cmd/cmd_search.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2010-2021 pancake <[email protected]>
// SPDX-License-Identifier: LGPL-3.0-only

#include <ht_uu.h>
#include <rz_util/ht_uu.h>
#include <rz_asm.h>
#include <rz_core.h>
#include <rz_io.h>
Expand Down
4 changes: 2 additions & 2 deletions librz/diff/diff.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@
#include <rz_diff.h>
#include <rz_util.h>
/**/
#include <ht_pp.h>
#include <ht_uu.h>
#include <rz_util/ht_pp.h>
#include <rz_util/ht_uu.h>

#define NUM2PTR(x) ((void *)(intptr_t)(x))
#define PTR2NUM(x) ((intptr_t)(void *)(x))
Expand Down
2 changes: 1 addition & 1 deletion librz/il/il_validate.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-License-Identifier: LGPL-3.0-only

#include <rz_il/rz_il_validate.h>
#include <ht_uu.h>
#include <rz_util/ht_uu.h>

/////////////////////////////////////////////////////////
// ---------------------- context -----------------------
Expand Down
2 changes: 1 addition & 1 deletion librz/include/rz_util/ht_pp.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ extern "C" {
* value. The API functions starts with "ht_pp_" and the types starts with "HtPP".
*/
#define HT_TYPE 1
#include "ht_inc.h"
#include <rz_util/ht_inc.h>

RZ_API HtName_(Ht) * Ht_(new0)(void);
RZ_API HtName_(Ht) * Ht_(new)(HT_(DupValue) valdup, HT_(KvFreeFunc) pair_free, HT_(CalcSizeV) valueSize);
Expand Down
2 changes: 1 addition & 1 deletion librz/include/rz_util/ht_pu.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ extern "C" {
* value. The API functions starts with "ht_pu_" and the types starts with "HtPU".
*/
#define HT_TYPE 4
#include "ht_inc.h"
#include <rz_util/ht_inc.h>

RZ_API HtName_(Ht) * Ht_(new0)(void);
#undef HT_TYPE
Expand Down
2 changes: 1 addition & 1 deletion librz/include/rz_util/ht_up.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ extern "C" {
* value. The API functions starts with "ht_up_" and the types starts with "HtUP".
*/
#define HT_TYPE 2
#include "ht_inc.h"
#include <rz_util/ht_inc.h>

RZ_API HtName_(Ht) * Ht_(new0)(void);
RZ_API HtName_(Ht) * Ht_(new)(HT_(DupValue) valdup, HT_(KvFreeFunc) pair_free, HT_(CalcSizeV) valueSize);
Expand Down
2 changes: 1 addition & 1 deletion librz/include/rz_util/ht_uu.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ extern "C" {
* value. The API functions starts with "ht_" and the types starts with "Ht".
*/
#define HT_TYPE 3
#include "ht_inc.h"
#include <rz_util/ht_inc.h>

RZ_API HtName_(Ht) * Ht_(new0)(void);
#undef HT_TYPE
Expand Down
2 changes: 1 addition & 1 deletion librz/include/rz_util/rz_event.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
extern "C" {
#endif

#include "ht_up.h"
#include <rz_util/ht_up.h>
#include <rz_vector.h>

typedef struct rz_event_t {
Expand Down
8 changes: 4 additions & 4 deletions librz/include/rz_util/rz_th_ht.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
#define RZ_TH_HASH_TABLE_H

#include <rz_th.h>
#include "ht_pp.h"
#include "ht_up.h"
#include "ht_uu.h"
#include "ht_pu.h"
#include <rz_util/ht_pp.h>
#include <rz_util/ht_up.h>
#include <rz_util/ht_uu.h>
#include <rz_util/ht_pu.h>

#ifdef __cplusplus
extern "C" {
Expand Down
4 changes: 2 additions & 2 deletions librz/include/rz_util/set.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#ifndef SDB_SET_H
#define SDB_SET_H

#include "ht_pp.h"
#include "ht_up.h"
#include <rz_util/ht_pp.h>
#include <rz_util/ht_up.h>

#ifdef __cplusplus
extern "C" {
Expand Down
2 changes: 1 addition & 1 deletion librz/util/ht/ht_pp.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// SPDX-License-Identifier: BSD-3-Clause

#include "sdb.h"
#include "ht_pp.h"
#include <rz_util/ht_pp.h>
#include "ht_inc.c"

static HtName_(Ht) * internal_ht_default_new(ut32 size, ut32 prime_idx, HT_(DupValue) valdup, HT_(KvFreeFunc) pair_free, HT_(CalcSizeV) calcsizeV) {
Expand Down
2 changes: 1 addition & 1 deletion librz/util/ht/ht_pu.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// SPDX-License-Identifier: BSD-3-Clause

#include "sdb.h"
#include "ht_pu.h"
#include <rz_util/ht_pu.h>
#include "ht_inc.c"

static void free_kv_key(HT_(Kv) * kv) {
Expand Down
2 changes: 1 addition & 1 deletion librz/util/ht/ht_up.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// SPDX-FileCopyrightText: 2016-2018 ret2libc <[email protected]>
// SPDX-License-Identifier: BSD-3-Clause

#include "ht_up.h"
#include <rz_util/ht_up.h>
#include "ht_inc.c"

static HtName_(Ht) * internal_ht_default_new(ut32 size, ut32 prime_idx, HT_(DupValue) valdup, HT_(KvFreeFunc) pair_free, HT_(CalcSizeV) calcsizeV) {
Expand Down
2 changes: 1 addition & 1 deletion librz/util/ht/ht_uu.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// SPDX-FileCopyrightText: 2016-2018 ret2libc <[email protected]>
// SPDX-License-Identifier: BSD-3-Clause

#include "ht_uu.h"
#include <rz_util/ht_uu.h>

#include "ht_inc.c"

Expand Down
2 changes: 1 addition & 1 deletion librz/util/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ else
rz_util_sources += ['big.c']
endif

rz_util_includes = [platform_inc, include_directories('sdb/src', 'sdb', '../include/rz_util')]
rz_util_includes = [platform_inc, include_directories('sdb/src', 'sdb')]

rz_util = library('rz_util', rz_util_sources, libsdb_sources,
include_directories: rz_util_includes,
Expand Down
2 changes: 1 addition & 1 deletion librz/util/set.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2019 pancake <[email protected]>
// SPDX-License-Identifier: MIT

#include "set.h"
#include <rz_util/set.h>

// p

Expand Down
2 changes: 1 addition & 1 deletion librz/util/sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -1364,7 +1364,7 @@ RZ_API int rz_sys_pipe_close(int fd) {
}

#elif __UNIX__ && HAVE_PIPE
#include <ht_uu.h>
#include <rz_util/ht_uu.h>
static HtUU *fd2close;
// Use this lock to wraps pipe, close, exec*, system to ensure all pipe file
// descriptors are either created AND added to fd2close or not created at all.
Expand Down
8 changes: 4 additions & 4 deletions test/unit/test_sdb_hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

#include "minunit.h"
#include <sdb.h>
#include <ht_uu.h>
#include <ht_up.h>
#include <ht_pp.h>
#include <ht_pu.h>
#include <rz_util/ht_uu.h>
#include <rz_util/ht_up.h>
#include <rz_util/ht_pp.h>
#include <rz_util/ht_pu.h>

typedef struct _test_struct {
char *name;
Expand Down

0 comments on commit 7a7945c

Please sign in to comment.