<commit_before># libcdll
a cozy C library that implements circular doubly linked list
<commit_msg>Add README content and cdll_init function doc<commit_after># libcdll
This project created as part of my data structures course in university. <br/ >
I really tried to write my codes as clean as I can so every one can read it quikly, no matter he is a hard worker C programmer or some college student who wants to learn C.

I'm a perfectionist and this project like all creations in the world is not flawless, so feel free to commit! :)

## Usage

To use libcdll you have to compile it with a compiler that supports c99 standard.

An example command for compiling libcdll with your program using gcc or clang:

```Shell
gcc -std=c99 main.c libcdll.c
```
```Shell
clang -std=c99 main.c libcdll.c
```

## How to use it? (or API!)

First of all you need to define a CDLL object (frankly it is a pointer to a struct).

```C
// Don't forget to initialize it with NULL
// so cdll functions can find out your list
// is empty at the moment.

CDLL list = NULL;
```

###Functions

####cdll_init (CDLL *list, void *data) => void
This function initialize a list if it is empty and gets a data as it's first data.
You rarely have to use this function because when you use other functions to manipulate the list, they know when to invoke this function.

This function does nothing if list is not empty.

```C
CDLL list = NULL;

int *a = malloc(sizeof(int));
*a = 10;
cdll_init (&list, a);

// list = [4]

int *b = malloc(sizeof(int));
*b = 20;
// This time nothing happens because our list
// is already initialized
cdll_init (&list, b);

// list = [4]

```









{'fraction_non_alphanumeric': 0.08424242424242424, 'fraction_numerical': 0.007272727272727273, 'mean_word_length': 3.7442528735632186, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 5, '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': '2688477', 'n_tokens_mistral': 521, 'n_tokens_neox': 484, 'n_words': 268}