configure: basic regular expressions know no '+'
[vlock.git] / src / tsort.h
blobb3c7390316b845a47baa4d252b8a5b1da50b8d56
1 /* tsort.h -- header file for topological sort for vlock,
2 * the VT locking program for linux
4 * This program is copyright (C) 2007 Frank Benkstein, and is free
5 * software which is freely distributable under the terms of the
6 * GNU General Public License version 2, included as the file COPYING in this
7 * distribution. It is NOT public domain software, and any
8 * redistribution not permitted by the GNU General Public License is
9 * expressly forbidden without prior written permission from
10 * the author.
14 #include <stdbool.h>
16 /* An edge of the graph, specifying that predecessor must come before
17 * successor. */
18 struct edge {
19 void *predecessor;
20 void *successor;
23 struct list;
25 /* For the given directed graph, generate a topological sort of the nodes.
27 * Sorts the list and deletes all edges. If there are circles found in the
28 * graph or there are edges that have no corresponding nodes the erroneous
29 * edges are left. */
30 void tsort(struct list *nodes, struct list *edges);