summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
5ba06ea)
linklistdebug:integer;\r
\r
implementation\r
linklistdebug:integer;\r
\r
implementation\r
\r
procedure linklistadd(var baseptr:tlinklist;newptr:tlinklist);\r
var\r
p:tlinklist;\r
begin\r
\r
procedure linklistadd(var baseptr:tlinklist;newptr:tlinklist);\r
var\r
p:tlinklist;\r
begin\r
- if (newptr=baseptr) or assigned(newptr.prev) then raise exception.create('linklist double insertion detected');\r
+ if (newptr=baseptr) or assigned(newptr.prev) then raise exception.create('linklist double insertion detected');
p := baseptr;\r
baseptr := newptr;\r
baseptr.prev := nil;\r
p := baseptr;\r
baseptr := newptr;\r
baseptr.prev := nil;\r
begin\r
if item = baseptr then baseptr := item.next;\r
if item.prev <> nil then item.prev.next := item.next;\r
begin\r
if item = baseptr then baseptr := item.next;\r
if item.prev <> nil then item.prev.next := item.next;\r
- if item.next <> nil then item.next.prev := item.prev;\r
- item.prev := nil;\r
+ if item.next <> nil then item.next.prev := item.prev;
+ item.prev := nil;
item.next := nil;\r
end;\r
\r
item.next := nil;\r
end;\r
\r
var\r
p:tlinklist2;\r
begin\r
var\r
p:tlinklist2;\r
begin\r
- if (newptr=baseptr) or assigned(newptr.prev) then raise exception.create('linklist2 double insertion detected');\r
+ if (newptr=baseptr) or assigned(newptr.prev2) then raise exception.create('linklist2 double insertion detected');
p := baseptr;\r
baseptr := newptr;\r
baseptr.prev2 := nil;\r
p := baseptr;\r
baseptr := newptr;\r
baseptr.prev2 := nil;\r
begin\r
if item = baseptr then baseptr := item.next2;\r
if item.prev2 <> nil then item.prev2.next2 := item.next2;\r
begin\r
if item = baseptr then baseptr := item.next2;\r
if item.prev2 <> nil then item.prev2.next2 := item.next2;\r
- if item.next2 <> nil then item.next2.prev2 := item.prev2;\r
- item.prev2 := nil;\r
+ if item.next2 <> nil then item.next2.prev2 := item.prev2;
+ item.prev2 := nil;
item.next2 := nil;\r
end;\r
\r
item.next2 := nil;\r
end;\r
\r