7 lines
334 B
Text
7 lines
334 B
Text
/* Let H be a pointer to a node in a one-way-linked list. */
|
|
/* Insert an element, whose value is given by variable V, following that node. */
|
|
|
|
allocate node set (Q);
|
|
node.p = H; /* The new node now points at the list where we want to insert it. */
|
|
node.value = V;
|
|
H->p = Q; /* Break the list at H, and point it at the new node. */
|