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 
48 void lifo_init(int *array, int n);
49 
61 void lifo_insert(int *array, int i);
62 
73 int lifo_get(int *array);
74 
75 #ifdef __cplusplus
76 }
77 #endif
78 
79 #endif /* LIFO_H */
80 
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.