git-svn-id: https://spexeah.com:8443/svn/Asuro@465 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c

This commit is contained in:
kieron 2018-04-10 14:41:02 +00:00
parent 9976400832
commit 50fcfb8e22
9 changed files with 11 additions and 0 deletions

BIN
Asuro.iso

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -29,6 +29,7 @@ function LL_Delete(LinkedList : PLinkedListBase; idx : uint32) : boolean;
function LL_Size(LinkedList : PLinkedListBase) : uint32; function LL_Size(LinkedList : PLinkedListBase) : uint32;
function LL_Insert(LinkedList : PLinkedListBase; idx : uint32) : Void; function LL_Insert(LinkedList : PLinkedListBase; idx : uint32) : Void;
function LL_Get(LinkedList : PLinkedListBase; idx : uint32) : Void; function LL_Get(LinkedList : PLinkedListBase; idx : uint32) : Void;
procedure LL_Free(LinkedList : PLinkedListBase);
procedure LL_TEST(); procedure LL_TEST();
implementation implementation
@ -166,6 +167,14 @@ begin
LL_Get:= Base^.Data; LL_Get:= Base^.Data;
end; end;
procedure LL_Free(LinkedList : PLinkedListBase);
begin
while LL_Size(LinkedList) > 0 do begin
LL_Delete(LinkedList, 0);
end;
kfree(void(LinkedList));
end;
procedure LL_Test(); procedure LL_Test();
var var
i : uint32; i : uint32;
@ -211,6 +220,8 @@ begin
for i:=0 to LL_Size(LList)-1 do begin for i:=0 to LL_Size(LList)-1 do begin
console.writestringln(PChar(LL_Get(LList, i))); console.writestringln(PChar(LL_Get(LList, i)));
end; end;
LL_Free(LList);
end; end;
end. end.