<commit_before>/**
 * @file linked_list.c
 * Handle linked lists. The nodes are dynamically allocated by the dyn_mem module.
 */

#ifndef LINKED_LIST_H
#define LINKED_LIST_H

/*********************
 *      INCLUDES
 *********************/
#include "misc_conf.h"

#if USE_LINKED_LIST != 0
#include "dyn_mem.h"

/*********************
 *      DEFINES
 *********************/

/**********************
 *      TYPEDEFS
 **********************/

/*Dummy type to make handling easier*/
typedef uint8_t ll_node_t;

/*Description of a linked list*/
typedef struct
{
    uint32_t n_size;
    ll_node_t* head_dp;
    ll_node_t* tail_dp;
}ll_dsc_t;

/**********************
 * GLOBAL PROTOTYPES
 **********************/
void ll_init(ll_dsc_t * ll_dsc, uint32_t n_size);
void * ll_ins_head(ll_dsc_t * ll);
void * ll_ins_tail(ll_dsc_t * ll);
void * ll_ins_after(ll_dsc_t * ll, void * n_act);
void * ll_ins_before(ll_dsc_t * ll, void * n_act);
void ll_rem(ll_dsc_t * ll, void * n_act);
void ll_chg_list(ll_dsc_t * ll_ori_p, ll_dsc_t * ll_new_p, void * node_dp);
void * ll_get_head(ll_dsc_t * ll);
void * ll_get_tail(ll_dsc_t * ll);
void * ll_get_next(ll_dsc_t * ll, void * n_act_dp);
void * ll_get_prev(ll_dsc_t * ll, void * n_act_dp);
void ll_swap(ll_dsc_t * ll_p, void * n1_p, void * n2_p);


/**********************
 *      MACROS
 **********************/

#define LL_READ(list, i) for(i = ll_get_head(&list); i != NULL; i = ll_get_next(&list, i))

#define LL_READ_BACK(list, i) for(i = ll_get_tail(&list); i != NULL; i = ll_get_prev(&list, i))

#define LL_READ_DEL

#define LL_READ_DEL_BACK

#endif /*USE_LINKED_LIST != 0*/

#endif<commit_msg>Remove unnecessary defines form linked list<commit_after>/**
 * @file linked_list.c
 * Handle linked lists. The nodes are dynamically allocated by the dyn_mem module.
 */

#ifndef LINKED_LIST_H
#define LINKED_LIST_H

/*********************
 *      INCLUDES
 *********************/
#include "misc_conf.h"

#if USE_LINKED_LIST != 0
#include "dyn_mem.h"

/*********************
 *      DEFINES
 *********************/

/**********************
 *      TYPEDEFS
 **********************/

/*Dummy type to make handling easier*/
typedef uint8_t ll_node_t;

/*Description of a linked list*/
typedef struct
{
    uint32_t n_size;
    ll_node_t* head_dp;
    ll_node_t* tail_dp;
}ll_dsc_t;

/**********************
 * GLOBAL PROTOTYPES
 **********************/
void ll_init(ll_dsc_t * ll_dsc, uint32_t n_size);
void * ll_ins_head(ll_dsc_t * ll);
void * ll_ins_tail(ll_dsc_t * ll);
void * ll_ins_after(ll_dsc_t * ll, void * n_act);
void * ll_ins_before(ll_dsc_t * ll, void * n_act);
void ll_rem(ll_dsc_t * ll, void * n_act);
void ll_chg_list(ll_dsc_t * ll_ori_p, ll_dsc_t * ll_new_p, void * node_dp);
void * ll_get_head(ll_dsc_t * ll);
void * ll_get_tail(ll_dsc_t * ll);
void * ll_get_next(ll_dsc_t * ll, void * n_act_dp);
void * ll_get_prev(ll_dsc_t * ll, void * n_act_dp);
void ll_swap(ll_dsc_t * ll_p, void * n1_p, void * n2_p);


/**********************
 *      MACROS
 **********************/

#define LL_READ(list, i) for(i = ll_get_head(&list); i != NULL; i = ll_get_next(&list, i))

#define LL_READ_BACK(list, i) for(i = ll_get_tail(&list); i != NULL; i = ll_get_prev(&list, i))

#endif /*USE_LINKED_LIST != 0*/

#endif
{'fraction_non_alphanumeric': 0.24438288704216682, 'fraction_numerical': 0.00554016620498615, 'mean_word_length': 4.845323741007194, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4072975', 'n_tokens_mistral': 1338, 'n_tokens_neox': 1319, 'n_words': 278}