]> mj.ucw.cz Git - libucw.git/commit
Added a single-linked double-ended list module. Mostly syntactic sugar.
authorMartin Mares <mj@ucw.cz>
Sun, 2 Oct 2005 13:10:42 +0000 (13:10 +0000)
committerMartin Mares <mj@ucw.cz>
Sun, 2 Oct 2005 13:10:42 +0000 (13:10 +0000)
commitfd926b3901c5d6d8e7d3942faf392af3e0422835
treec52a44657429541abc03939bd84cc9464298eb85
parentefb6ac56ec7017fede18527387546e2e1d776795
Added a single-linked double-ended list module. Mostly syntactic sugar.

The SLIST_WALK_DELSAFE macro has well-defined semantics of the auxilliary
variable: it's a pointer to the previous list item or to the list head,
making it possible to delete the current item efficiently by calling
slist_remove_after().

Unfortunately, I failed to write SLIST_FOR_EACH_DELSAFE, C syntax doesn't
seem to be flexible enough for that.
lib/Makefile
lib/slists.c [new file with mode: 0644]
lib/slists.h [new file with mode: 0644]
lib/slists.t [new file with mode: 0644]