<commit_before>#ifndef INCLUDE_POD_NODE_H
#define INCLUDE_POD_NODE_H



// A node is a place on a list.  It simplifies doubly linked lists because the
// header is just another node.  Everything in Pod is a node, potentially a
// part of a list or map.  Header nodes should be initialized to point to
// themselves.  Otherwise, initialize them to NULL.
//
// For example:
//      pod_node header;
//
//      header.previous = &header;
//      header.next = &header;


struct pod_node;
typedef struct pod_node pod_node;

struct pod_node {
    pod_node *previous;
    pod_node *next;
};



#endif /*INCLUDE_POD_NODE_H */<commit_msg>Created pod_node_remove to handle trivial node removal.<commit_after>#ifndef INCLUDE_POD_NODE_H
#define INCLUDE_POD_NODE_H

#include <stddef.h>



// A node is a place on a list.  It simplifies doubly linked lists because the
// header is just another node.  Everything in Pod is a node, potentially a
// part of a list or map.  Header nodes should be initialized to point to
// themselves.  Otherwise, initialize them to NULL.
//
// For example:
//      pod_node header;
//
//      header.previous = &header;
//      header.next = &header;


struct pod_node;
typedef struct pod_node pod_node;

struct pod_node {
    pod_node *previous;
    pod_node *next;
};



extern pod_node *pod_node_remove(pod_node *node);
inline pod_node *pod_node_remove(pod_node *node) 
{
    pod_node *next;

    next = node->next;
    node->previous->next = node->next;
    node->next->previous = node->previous;
    node->previous = node->next = NULL;

    return next;
}
 



#endif /*INCLUDE_POD_NODE_H */
{'fraction_non_alphanumeric': 0.09777227722772278, 'fraction_numerical': 0.0, 'mean_word_length': 3.1782945736434107, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1109762', 'n_tokens_mistral': 537, 'n_tokens_neox': 506, 'n_words': 177}