39 return idx ==
b->idx ? 0 : -1;
73 }
else if (!cur &&
from) {
97 rz_list_foreach (neighbours, it,
v) {
170 node->
free = user_free;
183 rz_list_foreach (
n->in_nodes, it, gn) {
189 rz_list_foreach (
n->out_nodes, it, gn) {
246 return n ?
n->out_nodes :
NULL;
257 return n ?
n->in_nodes :
NULL;
262 return n ?
n->all_neighbours :
NULL;
266 return g ?
g->nodes :
NULL;
278 if (!
g || !
n || !vis) {
289 if (!
g || !
n || !vis) {
306 rz_list_foreach (
g->nodes, it,
n) {
RZ_API RzGraph * rz_graph_new(void)
static int node_cmp(unsigned int idx, RzGraphNode *b)
RZ_API void rz_graph_free(RzGraph *t)
RZ_API RzGraphNode * rz_graph_add_node(RzGraph *t, void *data)
RZ_API void rz_graph_add_edge_at(RzGraph *t, RzGraphNode *from, RzGraphNode *to, int nth)
RZ_API const RzList * rz_graph_all_neighbours(const RzGraph *g, const RzGraphNode *n)
RZ_API void rz_graph_dfs(RzGraph *g, RzGraphVisitor *vis)
static void dfs_node(RzGraph *g, RzGraphNode *n, RzGraphVisitor *vis, int color[], const bool direction)
RZ_API RzGraphNode * rz_graph_nth_neighbour(const RzGraph *g, const RzGraphNode *n, int nth)
RZ_API bool rz_graph_adjacent(const RzGraph *g, const RzGraphNode *from, const RzGraphNode *to)
RZ_API const RzList * rz_graph_get_nodes(const RzGraph *g)
RZ_API void rz_graph_dfs_node(RzGraph *g, RzGraphNode *n, RzGraphVisitor *vis)
RZ_API RzGraphNode * rz_graph_node_split_forward(RzGraph *g, RzGraphNode *split_me, void *data)
static RzGraphNode * rz_graph_node_new(void *data)
RZ_API void rz_graph_add_edge(RzGraph *t, RzGraphNode *from, RzGraphNode *to)
RZ_API const RzList * rz_graph_get_neighbours(const RzGraph *g, const RzGraphNode *n)
RZ_API void rz_graph_reset(RzGraph *t)
RZ_API RzGraphNode * rz_graph_get_node(const RzGraph *t, unsigned int idx)
static void rz_graph_node_free(RzGraphNode *n)
RZ_API void rz_graph_del_node(RzGraph *t, RzGraphNode *n)
RZ_API void rz_graph_dfs_node_reverse(RzGraph *g, RzGraphNode *n, RzGraphVisitor *vis)
RZ_API RzListIter * rz_graph_node_iter(const RzGraph *t, unsigned int idx)
RZ_API const RzList * rz_graph_innodes(const RzGraph *g, const RzGraphNode *n)
RZ_API RzGraphNode * rz_graph_add_nodef(RzGraph *graph, void *data, RzListFree user_free)
RZ_API void rz_graph_del_edge(RzGraph *t, RzGraphNode *from, RzGraphNode *to)
RZ_API void Ht_() free(HtName_(Ht) *ht)
RZ_API RZ_BORROW RzListIter * rz_list_find(RZ_NONNULL const RzList *list, const void *p, RZ_NONNULL RzListComparator cmp)
Returns RzListIter element which matches via the RzListComparator.
RZ_API RZ_BORROW RzListIter * rz_list_contains(RZ_NONNULL const RzList *list, RZ_NONNULL const void *ptr)
Returns the RzListIter of the given pointer, if found.
RZ_API RZ_BORROW RzListIter * rz_list_insert(RZ_NONNULL RzList *list, ut32 n, void *data)
Inserts a new element at the N-th position.
RZ_API bool rz_list_delete_data(RZ_NONNULL RzList *list, void *ptr)
Deletes an entry in the list by searching for a pointer.
RZ_API RZ_OWN RzList * rz_list_new(void)
Returns a new initialized RzList pointer (free method is not initialized)
RZ_API RZ_BORROW void * rz_list_get_n(RZ_NONNULL const RzList *list, ut32 n)
Returns the N-th element of the list.
RZ_API RZ_BORROW RzListIter * rz_list_append(RZ_NONNULL RzList *list, void *data)
Appends at the end of the list a new element.
RZ_API void rz_list_free(RZ_NONNULL RzList *list)
Empties the list and frees the list pointer.
#define rz_return_if_fail(expr)
void(* RzListFree)(void *ptr)
int(* RzListComparator)(const void *value, const void *list_data)
RZ_API bool rz_stack_is_empty(RzStack *s)
RZ_API void * rz_stack_pop(RzStack *s)
RZ_API bool rz_stack_push(RzStack *s, void *el)
RZ_API RzStack * rz_stack_new(ut32 n)
RZ_API void rz_stack_free(RzStack *s)
static struct sockaddr static addrlen static backlog const void static flags void struct sockaddr from
static struct sockaddr static addrlen static backlog const void static flags void struct sockaddr socklen_t static fromlen const void const struct sockaddr to
void(* finish_node)(RzGraphNode *n, struct rz_graph_visitor_t *vis)
void(* discover_node)(RzGraphNode *n, struct rz_graph_visitor_t *vis)
void(* back_edge)(const RzGraphEdge *e, struct rz_graph_visitor_t *vis)
void(* tree_edge)(const RzGraphEdge *e, struct rz_graph_visitor_t *vis)
void(* fcross_edge)(const RzGraphEdge *e, struct rz_graph_visitor_t *vis)