summaryrefslogtreecommitdiffstats
path: root/lib/graph.h
diff options
context:
space:
mode:
authorwhitespace / reindent <invalid@invalid.invalid>2017-07-17 14:03:14 +0200
committerwhitespace / reindent <invalid@invalid.invalid>2017-07-17 14:04:07 +0200
commitd62a17aedeb0eebdba98238874bb13d62c48dbf9 (patch)
tree3b319b1d61c8b85b4d1f06adf8b844bb8a9b5107 /lib/graph.h
parent*: add indent control files (diff)
downloadfrr-d62a17aedeb0eebdba98238874bb13d62c48dbf9.tar.xz
frr-d62a17aedeb0eebdba98238874bb13d62c48dbf9.zip
indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'` Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib/graph.h')
-rw-r--r--lib/graph.h36
1 files changed, 15 insertions, 21 deletions
diff --git a/lib/graph.h b/lib/graph.h
index d3973d4b0..10ee00fed 100644
--- a/lib/graph.h
+++ b/lib/graph.h
@@ -26,22 +26,19 @@
#include "vector.h"
-struct graph
-{
- vector nodes;
+struct graph {
+ vector nodes;
};
-struct graph_node
-{
- vector from; // nodes which have edges to this node
- vector to; // nodes which this node has edges to
+struct graph_node {
+ vector from; // nodes which have edges to this node
+ vector to; // nodes which this node has edges to
- void *data; // node data
- void (*del) (void *data); // deletion callback
+ void *data; // node data
+ void (*del)(void *data); // deletion callback
};
-struct graph *
-graph_new (void);
+struct graph *graph_new(void);
/**
* Creates a new node.
@@ -51,8 +48,8 @@ graph_new (void);
* @param[in] del data deletion callback
* @return the new node
*/
-struct graph_node *
-graph_new_node (struct graph *graph, void *data, void (*del) (void*));
+struct graph_node *graph_new_node(struct graph *graph, void *data,
+ void (*del)(void *));
/**
* Deletes a node.
@@ -66,8 +63,7 @@ graph_new_node (struct graph *graph, void *data, void (*del) (void*));
* @param[in] graph the graph this node belongs to
* @param[out] node pointer to node to delete
*/
-void
-graph_delete_node (struct graph *graph, struct graph_node *node);
+void graph_delete_node(struct graph *graph, struct graph_node *node);
/**
* Makes a directed edge between two nodes.
@@ -76,8 +72,8 @@ graph_delete_node (struct graph *graph, struct graph_node *node);
* @param[in] to
* @return to
*/
-struct graph_node *
-graph_add_edge (struct graph_node *from, struct graph_node *to);
+struct graph_node *graph_add_edge(struct graph_node *from,
+ struct graph_node *to);
/**
* Removes a directed edge between two nodes.
@@ -85,8 +81,7 @@ graph_add_edge (struct graph_node *from, struct graph_node *to);
* @param[in] from
* @param[in] to
*/
-void
-graph_remove_edge (struct graph_node *from, struct graph_node *to);
+void graph_remove_edge(struct graph_node *from, struct graph_node *to);
/**
* Deletes a graph.
@@ -94,7 +89,6 @@ graph_remove_edge (struct graph_node *from, struct graph_node *to);
*
* @param graph the graph to delete
*/
-void
-graph_delete_graph (struct graph *graph);
+void graph_delete_graph(struct graph *graph);
#endif /* _ZEBRA_COMMAND_GRAPH_H */