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

This commit is contained in:
kieron
2018-04-11 14:49:41 +00:00
parent e98881e31c
commit d492b8a122
8 changed files with 9 additions and 0 deletions

View File

@ -60,6 +60,7 @@ var
i : uint32;
begin
push_trace('terminal.paramCount');
current:= params;
i:= 0;
while current^.param <> nil do begin
@ -67,6 +68,7 @@ begin
current:= current^.next;
end;
paramCount:= i-1;
pop_trace;
end;
function getParams(buf : TCommandBuffer) : PParamList;
@ -78,6 +80,7 @@ var
current : PParamList;
begin
push_trace('terminal.getParams');
root:= PParamList(kalloc(sizeof(TParamList)));
current:= root;
current^.next:= nil;
@ -103,6 +106,7 @@ begin
inc(finish);
end;
getParams:= root;
pop_trace;
end;
function getParam(index : uint32; params : PParamList) : pchar;
@ -112,12 +116,15 @@ var
i : uint32;
begin
push_trace('terminal.getParam');
result:= nil;
search:= params;
for i:=0 to index do begin
search:= search^.next;
end;
result:= search^.param;
getParam:= result;
pop_trace;
end;
procedure freeParams(params : PParamList);
@ -126,6 +133,7 @@ var
next : PParamList;
begin
push_trace('terminal.freeParams');
p:= params;
next:= p^.next;
while p^.next <> nil do begin
@ -134,6 +142,7 @@ begin
p:= next;
next:= p^.next;
end;
pop_trace;
end;
procedure testParams(params : PParamList);