-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlinkedList.inc
54 lines (39 loc) · 1.01 KB
/
linkedList.inc
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
IFNDEF LINKED_LIST
LINKED_LIST equ <1>
; (linkedList.inc)
String STRUCT
string DWORD 0
dataLength DWORD 0
bufferLength DWORD 0
String ENDS
Node STRUCT
data String <>
next DWORD 0
prev DWORD 0
Node ENDS
LinkedList STRUCT
head DWORD 0
currentNode DWORD 0
listLength DWORD 0
LinkedList ENDS
;create the head node of the list and initial currentNode and listLength
InitList PROTO,
listPtr: DWORD
InsertNode PROTO,
listPtr: DWORD
;delete currentNode and currentNode will be the next node, if doesn't have next node ,currentNode will be the prev node
DeleteNode PROTO,
listPtr: DWORD
DestroyList PROTO,
listPtr: DWORD
InitString PROTO,
stringPtr: DWORD
InsertChar PROTO,
stringPtr: DWORD, char: BYTE, pos:DWORD
DeleteChar PROTO,
stringPtr: DWORD, pos:DWORD
DestroyString PROTO,
stringPtr: DWORD
ConcatString PROTO,
pstring_source:DWORD, pstring_dest:DWORD
ENDIF