#ifndef DLIST_MERGE_SORT
#define DLIST_MERGE_SORT

#include <stddef.h>

struct node
{
    int data;
    struct node *next;
    struct node *prev;
};

struct dlist
{
    size_t size;
    struct node *head;
    struct node *tail;
};

struct dlist *dlist_init(void);
void dlist_clear(struct dlist *list);
void dlist_push_back(struct dlist *l, int data);
void dlist_merge_sort(struct dlist *l);

#endif /* ! DLIST_MERGE_SORT */
