Skip to content
/ fl-lib Public

Yet another single header C standard containers authorial library

Notifications You must be signed in to change notification settings

flplv/fl-lib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fl-lib

Yet another single header C/CPP authorial library

Fully GNU C compliant, 100% type checked, tested and safe.

These are the last released single headers:

How to use it?

Have a look at the tests folder, there you'll find usage examples. Anyways, enjoy this ring FIFO snipped below:

#include <fl-lib.h>

void look_how_beautiful_i_get_with_ring_fifos()
{
    fl_ring_fifo_t my_fifo;
    whatever_type_you_want_t my_fifo_buffer[128];

    fl_ring_fifo_init(&my_fifo, FL_ARRAY_SIZE(my_fifo_buffer));

    while (!fl_ring_fifo_full(&my_fifo))
    {
        my_fifo_buffer[fl_ring_fifo_write_index(&my_fifo)] = data[i++];
        fl_ring_fifo_write_increment(&my_fifo);
    }
}

Planned next features

  • Push/pop/peek signatures for the storage classes

Whould you like a feature? Please, ask.

Licensing

Use as you want. Have fun. Code as is, no grantees.

About

Yet another single header C standard containers authorial library

Resources

Stars

Watchers

Forks

Packages

No packages published