Subversion Repositories oidplus

Compare Revisions

Regard whitespace Rev 739 → Rev 740

/trunk_dos/OIDFILE.PAS
67,15 → 67,17
CreateOidDef(oid);
end;
 
procedure BubbleSortSubIds(oid: POid);
procedure ListBubbleSortSubIds(oid: POid);
var
n, i: integer;
a, b: string;
swapped: boolean;
begin
n := ListCount(oid^.SubIds);
while n>1 do
begin
i := 0;
swapped := false;
while i<n-1 do
begin
a := DotNotationPart(ListGetElement(oid^.SubIds, i));
83,9 → 85,11
if CompareOID(a, b) > 0 then
begin
ListSwapElement(oid^.SubIds, i, i+1);
swapped := true;
end;
Inc(i);
end;
if not swapped then break;
Dec(n);
end;
end;
108,7 → 112,8
WriteLn(f,'SUPR' + oid^.Parent);
 
(* Sort sub IDs *)
BubbleSortSubIds(oid);
ListBubbleSortSubIds(oid);
 
for i := 0 to ListCount(oid^.SubIds)-1 do
begin
sTmp := ListGetElement(oid^.SubIds, i);
188,7 → 193,7
end;
(* Sort sub IDs *)
BubbleSortSubIds(oid);
ListBubbleSortSubIds(oid);
 
(* Remove last CRLF *)
oid^.Description := Copy(oid^.Description, 1, Length(oid^.Description)-Length(#13#10));