Mescal
|
Implementation of doubly linked lists. More...
#include "alloc.h"
#include "type_basic.h"
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
Go to the source code of this file.
Classes | |
struct | dcell |
Type used to represent a single cell inside a doubly linked list. More... | |
struct | dlist |
Type used to represent a doubly linked list. More... | |
Typedefs | |
typedef struct dcell | dcell |
Type used to represent a single cell inside a doubly linked list. | |
Functions | |
dlist * | create_dlist (void) |
Creation of an empty list. | |
void | delete_dlist (dlist *) |
Release of a list. | |
void | insertnext_dlist (dlist *, dcell *, int) |
Insertion of a new cell after a given one. | |
void | insertprevious_dlist (dlist *, dcell *, int) |
Insertion of a new cell before a given one. | |
void | deletecell_dlist (dlist *, dcell *) |
Release of a single cell. | |
void | concat_dlist (dlist *, dlist *) |
Merging of two lists. | |
Implementation of doubly linked lists.
Merging of two lists.
l1 | The first list. |
l2 | The second list. |
dlist * create_dlist | ( | void | ) |
Creation of an empty list.
void delete_dlist | ( | dlist * | p | ) |
Release of a list.
p | The list. |
Release of a single cell.
p | The list. |
c | The cell. |
Insertion of a new cell after a given one.
p | The list. |
c | The cell. |
newval | The value of the new cell. |