A simple linked list in C for embedded applications
Switch branches/tags
Nothing to show
Clone or download

README.mkd

Generic C List for Embedded Systems

This library is an implementation of a singly linked list in C that holds void pointers. The pointers remain the responsibility of the list user - if you remove something from the list, you are responsible for freeing any memory associated with it.

The list type is void*, but it can hold ints with some casting.

Dependencies

  • emlist

To get the dependencies:

$ git submodule update --init

Compiling

$ make

Test Suite

Dependencies

  • check

This library has a test suite built with the check C library. Run the tests like so:

$ make test

Examples

#include "emlist.h"

LinkedList* list = emlist_create();

char* a_value = "foo";
emlist_insert(list, (void*)a_value);

bool contains = emlist_contains(list, (void*) a_value);
// contains == true

emlist_destroy(list);

License

This library is licensed under the BSD license and is Copyright 2013, Ford Motor Company

Contributors