lifo.h File Reference

LIFO buffer API, read long description carefully. More...

Detailed Description

Heiko Will

This LIFO implementation very efficiently handles integer values. The caveat is that it can only handle values between 0 and its own size - 1. Also it can only handle up to one element of each value. If you insert a value twice the LIFO will break.

Definition in file lifo.h.

Go to the source code of this file.


int lifo_empty (int *array)
 Check if the given lifo is empty. More...
void lifo_init (int *array, int n)
 Initialize a lifo array. More...
void lifo_insert (int *array, int i)
 Insert an element into the lifo. More...
int lifo_get (int *array)
 Extract the least recently inserted element from the lifo. More...