On 4/30/13 8:57 PM, Lawrence Stewart wrote:
[reposting from freebsd-arch@ - was probably the wrong list]Hi all, I've had use for these a few times now when wanting to restart a loop at a previously found element, and wonder if there are any thoughts about sticking them (and equivalents for other list types) in <sys/queue.h>? Cheers, Lawrence #define TAILQ_FOREACH_CONTINUE(var, head, field) \ for ((var) = ((var) ? (var) : TAILQ_FIRST((head))); \ (var); \ (var) = TAILQ_NEXT((var), field)) #define SLIST_FOREACH_CONTINUE(var, head, field) \ for ((var) = ((var) ? (var) : SLIST_FIRST((head))); \ (var); \ (var) = SLIST_NEXT((var), field)) _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[email protected]"
Can you show a few uses please? If it can significantly cut down on extra code it seems wise.
-Alfred _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[email protected]"

