Documentation Project 1
ContentsIndexHome
PreviousUpNext
sack::LinkThing Macro
C++
#define LinkThing( root, node ) \
        ((( (node)->next = (root) )?        \
    (((root)->me) = &((node)->next)):0),  \
    (((node)->me) = &(root)),             \
    ((root) = (node)) )

Link a new node into the list.

struct mynode 

DeclareLink( struct mynode ); 

} *node; 

 

struct mynode *list; 

LinkThing( list_root, node );

Copyright (c) 2010. All rights reserved.
What do you think about this topic? Send feedback!