[ILUG] C puzzle

Dave Airlie airlied at csn.ul.ie
Sun Jul 4 05:30:58 IST 2004


> #define LIST_LOOP(L,V,N) \
>   for ((N) = (L)->head; (N); (N) = (N)->next)
>    if (((V) = (N)->data) != NULL)
>

take a look at Linux's list.h it does all this stuff.. maybe it uses gcc
extensions though..

Dave.
-- 
David Airlie, Software Engineer
http://www.skynet.ie/~airlied / airlied at skynet.ie
pam_smb / Linux DECstation / Linux VAX / ILUG person




More information about the ILUG mailing list