]> git.ipfire.org Git - thirdparty/coreutils.git/commit
tsort now works more like the traditional UNIX tsort. Before it would
authorJim Meyering <jim@meyering.net>
Tue, 25 Jan 2000 12:03:15 +0000 (12:03 +0000)
committerJim Meyering <jim@meyering.net>
Tue, 25 Jan 2000 12:03:15 +0000 (12:03 +0000)
commita8b0898ba5e7c9ed414472030c726813d216d216
tree0a569c8c2f5648cb4646d9e5b801f64cfadb5834
parent9a2ff5e31cd5156a0ee4946940f4181f8786ed4c
tsort now works more like the traditional UNIX tsort.  Before it would
exit when it found a loop.  Now it continues and outputs all items.

(exit_status): New variable.
(loop): New varibale.
(count_items, scan_zeroes): Change return type to int.
(detect_loop): Complete rewrite to correctly implement detection
of loops.  Also change return type to int.
(recurse_tree): Stop if ACTION returns non-zero.  This involves
changing the return type of this function and ACTION to int.
(walk_tree): Change return type of ACTION to int.
(tsort): Continue sort after a loop has been detected (and
broken).  Set exit_status to 1 if a loop was detected.
(main): Use exit_status to determine exit code.
src/tsort.c