|
Corewar documentation 1.0.0
|
The header file of the libmylist. More...
#include "my.h"Go to the source code of this file.
Data Structures | |
| struct | node_s |
Typedefs | |
| typedef enum type | type_t |
| typedef struct node_s | node_t |
Functions | |
| void | my_push_front (node_t **begin, void *data, type_t type) |
| Adds a node at the beginning of the list. | |
| void | my_push_back (node_t **begin, void *data, type_t type) |
| Adds a node at the end of the list. | |
| int | my_delete_nodes (node_t **begin, void const *data_ref, int(*cmp)()) |
| Deletes nodes from a linked list. | |
| void | my_delete_list (node_t **begin) |
| Deletes the linked list. | |
| node_t * | my_pop_front (node_t **begin) |
| Removes the first node of the list. | |
| node_t * | my_pop_back (node_t **begin) |
| Removes the last node of the list. | |
| node_t * | my_pop_node (node_t **begin, void const *data_ref, int(*cmp)()) |
| Removes a node from the list. | |
| void | my_push_back_circled (node_t **begin, void *data, type_t type) |
| Adds a node at the beginning of the circular linked list. | |
| int | my_list_size_circled (node_t const *begin) |
| Adds a node at the end of the circular linked list. | |
| void ** | my_list_to_array_circled (node_t **list) |
| Converts the circular linked list to an array. | |
| void | my_delete_circle_list (node_t **begin) |
| Deletes a circular linked list. | |
| void | my_show_list (node_t *list) |
| Displays the linked list. | |
| int | my_list_size (node_t const *begin) |
| Returns the size of the linked list. | |
| void | my_rev_list (node_t **begin) |
| Reverses the linked list. | |
| node_t * | my_find_node (node_t const *begin, void const *data, int(*cmp)()) |
| Finds a node in the linked list. | |
| void | my_concat_list (node_t **begin1, node_t *begin2) |
| Concatenates two linked lists. | |
| void | my_sort_list (node_t **begin, int(*cmp)()) |
| Sorts the linked list. | |
| void | my_merge_list (node_t **begin1, node_t *begin2, int(*cmp)()) |
| Merges two linked lists. | |
| void ** | my_list_to_array (node_t *list) |
| Converts the linked list to an array. | |
| node_t * | my_params_to_list (int ac, char *const *av) |
| Creates a linked list from the arguments (argc and argv) | |
| node_t * | my_previous_to_next (node_t **head, node_t *to_delete) |
| Skip a node in a linked list and change the previous node to the next node. | |
The header file of the libmylist.
Concatenates two linked lists.
| begin1 | The beginning of the first list |
| begin2 | The beginning of the second list |
| void my_delete_circle_list | ( | node_t ** | begin | ) |
Deletes a circular linked list.
| begin | The beginning of the list |
| begin | The beginning of the list |
| void my_delete_list | ( | node_t ** | begin | ) |
Deletes the linked list.
| begin | The beginning of the list |
| int my_delete_nodes | ( | node_t ** | begin, |
| void const * | data_ref, | ||
| int(* | cmp )() ) |
Deletes nodes from a linked list.
| begin | The beginning of the list |
| data_ref | The data to delete |
| cmp | The comparison function |
Finds a node in the linked list.
| begin | The beginning of the list |
| data | The data to find |
| cmp | The comparison function |
| int my_list_size | ( | node_t const * | begin | ) |
Returns the size of the linked list.
| begin | The beginning of the list |
| int my_list_size_circled | ( | node_t const * | begin | ) |
Adds a node at the end of the circular linked list.
| begin | The beginning of the list |
| data | The data to add |
| type | The type of the data |
| void ** my_list_to_array | ( | node_t * | list | ) |
Converts the linked list to an array.
| list | The linked list to convert |
| void ** my_list_to_array_circled | ( | node_t ** | list | ) |
Converts the circular linked list to an array.
| list | The circular linked list to convert |
Merges two linked lists.
| begin1 | The beginning of the first list |
| begin2 | The beginning of the second list |
| cmp | The comparison function |
| node_t * my_params_to_list | ( | int | ac, |
| char *const * | av ) |
Creates a linked list from the arguments (argc and argv)
| ac | The number of arguments |
| av | The array of arguments |
Removes the last node of the list.
| begin | The beginning of the list |
Removes the first node of the list.
| begin | The beginning of the list |
Removes a node from the list.
| begin | The beginning of the list |
| data_ref | The data to remove |
| cmp | The comparison function |
Skip a node in a linked list and change the previous node to the next node.
| head | The beginning of the list |
| to_delete | The node to skip |
| void my_push_back | ( | node_t ** | begin, |
| void * | data, | ||
| type_t | type ) |
Adds a node at the end of the list.
| begin | The beginning of the list |
| data | The data to add |
| type | The type of the data |
| void my_push_back_circled | ( | node_t ** | begin, |
| void * | data, | ||
| type_t | type ) |
Adds a node at the beginning of the circular linked list.
| begin | The beginning of the list |
| data | The data to add |
| type | The type of the data |
| void my_push_front | ( | node_t ** | begin, |
| void * | data, | ||
| type_t | type ) |
Adds a node at the beginning of the list.
| begin | The beginning of the list |
| data | The data to add |
| type | The type of the data |
| void my_rev_list | ( | node_t ** | begin | ) |
Reverses the linked list.
| begin | The beginning of the list |
| void my_show_list | ( | node_t * | list | ) |
Displays the linked list.
| list | The linked list to display |
| void my_sort_list | ( | node_t ** | begin, |
| int(* | cmp )() ) |
Sorts the linked list.
| begin | The beginning of the list |
| cmp | The comparison function |