Add DLIST_FIND and DLIST_FOREACH macros
commit2500a037679b783a89a8cc93733508e2b84be4e7
authorSam Liddicott <sam@liddicott.com>
Thu, 3 Jul 2008 08:38:29 +0000 (3 09:38 +0100)
committerSam Liddicott <sam@liddicott.com>
Wed, 10 Dec 2008 10:10:50 +0000 (10 10:10 +0000)
treeaa4e8c41999ed58e6f2923a2a30324970c374e84
parentcbe6e2a77602a802ad1f8b1ffd9f38c3119f3000
Add DLIST_FIND and DLIST_FOREACH macros

DLIST_FIND(list, result, test-expression)
puts the first match in result, or NULL if nothing matches.

DLIST_FOREACH(list, result, expression)
evaluates expression on each member, using result as
a temporary variable.

In each case result must be declared of the type of a list member
lib/util/dlinklist.h