Skip to content
/ emlist Public

A simple linked list in C for embedded applications

License

Notifications You must be signed in to change notification settings

openxc/emlist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A simple linked list in C for embedded applications

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published