lifo.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2013 Freie Universit├Ąt Berlin
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
23 #ifndef LIFO_H
24 #define LIFO_H
25 
26 #ifdef __cplusplus
27  extern "C" {
28 #endif
29 
38 int lifo_empty(int *array);
39 
46 void lifo_init(int *array, int n);
47 
57 void lifo_insert(int *array, int i);
58 
67 int lifo_get(int *array);
68 
69 #ifdef __cplusplus
70 }
71 #endif
72 
73 #endif /* LIFO_H */
74 
void lifo_insert(int *array, int i)
Insert an element into the lifo.
int lifo_empty(int *array)
Check if the given lifo is empty.
int lifo_get(int *array)
Extract the least recently inserted element from the lifo.
void lifo_init(int *array, int n)
Initialize a lifo array.