Changeset 4 for trunk/UShpFile.pas
- Timestamp:
- Jan 30, 2016, 12:15:16 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UShpFile.pas
r3 r4 6 6 7 7 uses 8 Classes, SysUtils, Contnrs, Graphics, U Format80, Types;8 Classes, SysUtils, Contnrs, Graphics, UDecode, Types; 9 9 10 10 type … … 39 39 implementation 40 40 41 function Format20(Source: TByteDynArray): TByteDynArray;42 var43 D: Byte;44 Count: Integer;45 SourceIndex: Integer;46 DestIndex: Integer;47 begin48 SourceIndex := 0;49 DestIndex := 0;50 SetLength(Result, Length(Source));51 while SourceIndex < Length(Source) do begin52 D := Source[SourceIndex];53 Inc(SourceIndex);54 if D = 0 then begin55 if SourceIndex >= Length(Source) then56 Break;57 Count := Source[SourceIndex];58 if Count = 0 then Break;59 Inc(SourceIndex);60 if (DestIndex + Count) >= Length(Result) then61 SetLength(Result, DestIndex + Count + 1);62 FillChar(Result[DestIndex], Count, 0);63 Inc(DestIndex, Count);64 end else begin65 if DestIndex >= Length(Result) then66 SetLength(Result, DestIndex + 1);67 Result[DestIndex] := D;68 Inc(DestIndex);69 end;70 end;71 end;72 41 73 42 { TShpFileItem }
Note:
See TracChangeset
for help on using the changeset viewer.