-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstack.h
39 lines (29 loc) · 1.01 KB
/
stack.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
39
#ifndef IJF_STACK_H
#define IJF_STACK_H
typedef struct tDLElem{
void *data; /*points to any data*/
struct tDLElem *lptr; /*points to left element*/
struct tDLElem *rptr; /*points to right element*/
} *tDLElemPtr;
typedef struct tDLList{
tDLElemPtr First; /*points to firts element in the list*/
tDLElemPtr Last; /*points to last element in the list*/
tDLElemPtr Active; /*points to active element in the list*/
} tDLList;
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include "precedence.h"
void init_list(tDLList *L);
void dispose_list(tDLList *L);
void insert_last(tDLList *L, void *data);
void delete_last(tDLList *L);
void post_insert(tDLList *L, void *data);
void activate_last(tDLList *L);
void shift_active_right(tDLList *L);
void *copy_last(tDLList *L);
void preinsert_lastNode(tDLList *L, void *data);
void delete_element(tDLList *L, tDLElemPtr element);
int length_list(tDLList *L);
tDLElemPtr find_last(tDLList *L, bool NODE );
#endif //IJF_STACK_H