Skip to content

Latest commit

 

History

History
55 lines (32 loc) · 1.04 KB

README.mkd

File metadata and controls

55 lines (32 loc) · 1.04 KB

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