24#define NODE_FROM_CELL(_cell_) containerof(_cell_, struct cons_node, cell)
26#define NODE_FROM_CELL(_cell_) ((struct cons_node *)((char *)(_cell_) - offsetof(struct cons_node, cell)))
static struct cons * cons_cdr(const struct cons *cell)
Accessor for the cdr field of a cons cell.
static void * cons_car(const struct cons *cell)
Accessor for the car field of a cons cell.
#define CONS_NOT_NIL_P(_cell)
Returns true if the cons cell is not CONS_NIL.
struct cons * cons_remove(struct cons **list, struct cons *cell)
Destructively removes the specified cons cell from the list.
static void cons_rplaca(struct cons *cell, void *car)
Mutator for the car field of a cons cell.
struct cons_node * cons_car_node(struct cons_node *node)
Accessor for the parent node (super-node) of a cons node.
struct cons_node * cons_cdr_node(struct cons_node *node)
Accessor for the next sibling node of a cons node.
struct cons_node * cons_sub_node(struct cons_node *node)
Accessor for the first child node (sub-node) of a cons node.
Defines the structure and functions for cons nodes.
Structure representing a cons node.
struct cons * head
Pointer to the list of child nodes (sub-nodes).
struct cons cell
The cons cell forming the basis of the node.
Construct cell structure for building linked lists.