Skip to content

EPITECH-Bordeaux/list

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

List

This document is written for C programmers. Since you’re reading this, chances are that you know a list is used for store items in a mutable way. This software provides complete list system.

This is just a single header file: list.h. All you need to do is copy the header file into your project, and:

#include "list.h"

Since list is a header file only, you don't need to link any code. It's very portable, easy to use, and very fast integration.

Features

```C LIST_PUSH(list, data_element, function) MAP_LIST(list, map_fct, arg) MAP_LIST_WITH_BREAK(list, map_fct, arg) MAP_LIST_WITH_MATCH(list, map_fct, match_fct, arg) DELETE_ALL_LIST(list) LIST_POP(list) LIST_REMOVE_WITH_DATA(head_list, node, match_fct) ```

Overview

Each item has a free function for free the data only.

typedef struct s_list t_list;

typedef struct          s_list
{
  void                  *data;
  free_function         free;
  struct s_list         *next;
}                       t_list;

For more informations, check out test.c.

Some good features are comming, keep an eye on it.

Releases

No releases published

Packages

No packages published

Languages

  • C 100.0%