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
16 /* An edge of the graph, specifying that predecessor must come before
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
30 struct list
*tsort(struct list
*nodes
, struct list
*edges
);