Rizin
unix-like reverse engineering framework and cli tools
rz_diff.h File Reference
#include <rz_types.h>
#include <rz_list.h>
#include <rz_util/rz_pj.h>
#include <rz_util/rz_strbuf.h>

Go to the source code of this file.

Classes

struct  rz_diff_methods_t
 
struct  rz_diff_op_t
 
struct  match_p_t
 

Macros

#define RZ_DIFF_OP_SIZE_A(op)   (((op)->a_end) - ((op)->a_beg))
 
#define RZ_DIFF_OP_SIZE_B(op)   (((op)->b_end) - ((op)->b_beg))
 
#define RZ_DIFF_DEFAULT_N_GROUPS   3
 

Typedefs

typedef enum rz_diff_op_type_t RzDiffOpType
 
typedef const void *(* RzDiffMethodElemAt) (RZ_BORROW const void *array, ut32 index)
 
typedef ut32(* RzDiffMethodElemHash) (RZ_BORROW const void *elem)
 
typedef int(* RzDiffMethodCompare) (RZ_BORROW const void *a_elem, RZ_BORROW const void *b_elem)
 
typedef bool(* RzDiffMethodIgnore) (RZ_BORROW const void *elem)
 
typedef void(* RzDiffMethodStringify) (RZ_BORROW const void *elem, RZ_BORROW RzStrBuf *sb)
 
typedef struct rz_diff_methods_t RzDiffMethods
 
typedef struct rz_diff_op_t RzDiffOp
 
typedef struct match_p_t RzDiffMatch
 
typedef bool(* RzDiffIgnoreByte) (const ut64 byte)
 
typedef bool(* RzDiffIgnoreLine) (RZ_BORROW const char *line)
 
typedef struct rz_diff_t RzDiff
 

Enumerations

enum  rz_diff_op_type_t {
  RZ_DIFF_OP_INVALID = 0 , RZ_DIFF_OP_DELETE , RZ_DIFF_OP_EQUAL , RZ_DIFF_OP_INSERT ,
  RZ_DIFF_OP_REPLACE
}
 

Functions

 RZ_LIB_VERSION_HEADER (rz_diff)
 

Macro Definition Documentation

◆ RZ_DIFF_DEFAULT_N_GROUPS

#define RZ_DIFF_DEFAULT_N_GROUPS   3

Definition at line 59 of file rz_diff.h.

◆ RZ_DIFF_OP_SIZE_A

#define RZ_DIFF_OP_SIZE_A (   op)    (((op)->a_end) - ((op)->a_beg))

Definition at line 57 of file rz_diff.h.

◆ RZ_DIFF_OP_SIZE_B

#define RZ_DIFF_OP_SIZE_B (   op)    (((op)->b_end) - ((op)->b_beg))

Definition at line 58 of file rz_diff.h.

Typedef Documentation

◆ RzDiff

typedef struct rz_diff_t RzDiff

Definition at line 68 of file rz_diff.h.

◆ RzDiffIgnoreByte

typedef bool(* RzDiffIgnoreByte) (const ut64 byte)

Definition at line 67 of file rz_diff.h.

◆ RzDiffIgnoreLine

typedef bool(* RzDiffIgnoreLine) (RZ_BORROW const char *line)

Definition at line 68 of file rz_diff.h.

◆ RzDiffMatch

typedef struct match_p_t RzDiffMatch

◆ RzDiffMethodCompare

typedef int(* RzDiffMethodCompare) (RZ_BORROW const void *a_elem, RZ_BORROW const void *b_elem)

Definition at line 38 of file rz_diff.h.

◆ RzDiffMethodElemAt

typedef const void*(* RzDiffMethodElemAt) (RZ_BORROW const void *array, ut32 index)

This interface allows to analyze any data using the same algorithm elem_at(array, index) [required] must return the an element of the array at position 'index' elem_hash(elem) [required] must return the hash value of the element (use rz_diff_hash_data) compare(a_elem, b_elem) [required] must return true if the two elements are the same stringify(elem, sb) [required] appends into sb the stringified element of the array ignore(elem) [optional] must return true if the element matches the user define rule (if set to NULL, it will be considered as always false)

Definition at line 36 of file rz_diff.h.

◆ RzDiffMethodElemHash

typedef ut32(* RzDiffMethodElemHash) (RZ_BORROW const void *elem)

Definition at line 37 of file rz_diff.h.

◆ RzDiffMethodIgnore

typedef bool(* RzDiffMethodIgnore) (RZ_BORROW const void *elem)

Definition at line 39 of file rz_diff.h.

◆ RzDiffMethods

◆ RzDiffMethodStringify

typedef void(* RzDiffMethodStringify) (RZ_BORROW const void *elem, RZ_BORROW RzStrBuf *sb)

Definition at line 40 of file rz_diff.h.

◆ RzDiffOp

typedef struct rz_diff_op_t RzDiffOp

◆ RzDiffOpType

Enumeration Type Documentation

◆ rz_diff_op_type_t

Enumerator
RZ_DIFF_OP_INVALID 
RZ_DIFF_OP_DELETE 
RZ_DIFF_OP_EQUAL 
RZ_DIFF_OP_INSERT 
RZ_DIFF_OP_REPLACE 

Definition at line 19 of file rz_diff.h.

19  {
25 } RzDiffOpType;
@ RZ_DIFF_OP_INVALID
Definition: rz_diff.h:20
@ RZ_DIFF_OP_REPLACE
Definition: rz_diff.h:24
@ RZ_DIFF_OP_DELETE
Definition: rz_diff.h:21
@ RZ_DIFF_OP_EQUAL
Definition: rz_diff.h:22
@ RZ_DIFF_OP_INSERT
Definition: rz_diff.h:23
enum rz_diff_op_type_t RzDiffOpType

Function Documentation

◆ RZ_LIB_VERSION_HEADER()

RZ_LIB_VERSION_HEADER ( rz_diff  )