45 same_list_t samehead = {0};
46 same_list_t sametail = {0};
62 for (
size_t i = 0; i < same_list_size(&samehead); i++) {
63 if (edge_list_size(&same_list_at(&samehead, i)->l) > 1)
64 sameport(n, same_list_get(&samehead, i).l);
66 same_list_clear(&samehead);
67 for (
size_t i = 0; i < same_list_size(&sametail); i++) {
68 if (edge_list_size(&same_list_at(&sametail, i)->l) > 1)
69 sameport(n, same_list_get(&sametail, i).l);
71 same_list_clear(&sametail);
74 same_list_free(&samehead);
75 same_list_free(&sametail);
80 for (
size_t i = 0; i < same_list_size(same); i++)
81 if (
streq(same_list_get(same, i).
id,
id)) {
82 edge_list_append(&same_list_at(same, i)->l, e);
87 edge_list_append(&to_append.
l, e);
88 same_list_append(same, to_append);
103 double x = 0, y = 0, x1, y1, x2, y2, r;
108 for (
size_t i = 0; i < edge_list_size(&l); i++) {
109 edge_t *e = edge_list_get(&l, i);
134 curve[1].
x = (2 * x1 + x2) / 3;
135 curve[1].
y = (2 * y1 + y2) / 3;
136 curve[2].
x = (2 * x2 + x1) / 3;
137 curve[2].
y = (2 * y2 + y1) / 3;
147 port prt = {.
p = {.
x = round(x1), .y = round(y1)}};
160 for (
size_t i = 0; i < edge_list_size(&l); i++) {
161 edge_t *e = edge_list_get(&l, i);
Agsym_t * agattr(Agraph_t *g, int kind, char *name, const char *value)
creates or looks up attributes of a graph
char * agxget(void *obj, Agsym_t *sym)
Agedge_t * agnxtedge(Agraph_t *g, Agedge_t *e, Agnode_t *n)
Agedge_t * agfstedge(Agraph_t *g, Agnode_t *n)
Agnode_t * agnxtnode(Agraph_t *g, Agnode_t *n)
Agnode_t * agfstnode(Agraph_t *g)
Agraph_t * agraphof(void *obj)
#define DEFINE_LIST_WITH_DTOR(name, type, dtor)
#define DEFINE_LIST(name, type)
void shape_clip(node_t *n, pointf curve[4])
static void free_same(same_t s)
static void sameport(node_t *u, edge_list_t l)
void dot_sameports(graph_t *g)
static void sameedge(same_list_t *same, edge_t *e, char *id)
register e in the same structure of the originating node under id
static bool streq(const char *a, const char *b)
are a and b equal?