-
Notifications
You must be signed in to change notification settings - Fork 0
/
dll.h
38 lines (29 loc) · 862 Bytes
/
dll.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/**
* Project: IFJ21 imperative language compiler
*
* Author: Stepan Bakaj <xbakaj00>
*
*/
#ifndef IFJ_BRATWURST2021_DLL_H
#define IFJ_BRATWURST2021_DLL_H
/** Two-way bound list element */
typedef struct DLLElement {
/** Useful data */
char* data;
/** Pointer to the previous list element */
struct DLLElement *previousElement;
/** Pointer to the next list element */
struct DLLElement *nextElement;
} *DLLElementPtr;
/** Two-way bound list */
typedef struct {
/** Pointer to the first element of the list */
DLLElementPtr firstElement;
/** Pointer to the last element of the list */
DLLElementPtr lastElement;
} DLList;
void DLL_Init( DLList * );
void DLL_Dispose( DLList * );
void DLL_PrintAll( DLList * );
void DLL_InsertLast( DLList *, char *, unsigned size);
#endif //IFJ_BRATWURST2021_DLL_H