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.
- emlist
To get the dependencies:
$ git submodule update --init
$ make
Dependencies
- check
This library has a test suite built with the check
C library. Run the tests
like so:
$ make test
#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);
This library is licensed under the BSD license and is Copyright 2013, Ford Motor Company
- Chris Peplin, [email protected]