| 68 |
|
Result := 4; |
| 69 |
|
100..300: |
| 70 |
|
Result := datatype - 100; |
| 71 |
+ |
500..614: |
| 72 |
+ |
Result := 4; |
| 73 |
|
1000..9999: |
| 74 |
|
Result := datatype - 1000; |
| 75 |
|
10000..65535: |
| 130 |
|
|
| 131 |
|
function LoadStructureDefinition(ConnectionID, FileID: Integer): TStructDef; |
| 132 |
|
var |
| 131 |
– |
i: Integer; |
| 133 |
|
current_type: Byte; //0: Global, 1: Undynamic, 2: Dynamic |
| 134 |
|
current_base, current_package, current_package_size: Integer; |
| 135 |
|
packages: Integer; |
| 178 |
|
3: |
| 179 |
|
begin |
| 180 |
|
current_type := 1; |
| 181 |
< |
current_base := HexToLong(fields[2]); |
| 181 |
> |
current_base := StrToInt(fields[2]); |
| 182 |
|
SetLength(Result.Subs, Length(Result.Subs) + 1); |
| 183 |
|
Result.Subs[High(Result.Subs)].SubName := |
| 184 |
|
MidStr(fields[0], 2, Length(fields[0]) - 1); |
| 187 |
|
6: |
| 188 |
|
begin |
| 189 |
|
current_type := 2; |
| 190 |
< |
current_base := HexToLong(fields[2]); |
| 190 |
> |
current_base := StrToInt(fields[2]); |
| 191 |
|
current_package := 0; |
| 192 |
|
current_package_size := StrToInt(fields[5]); |
| 193 |
|
if fields[4][1] <> '$' then |
| 194 |
|
begin |
| 195 |
|
case StrToInt(fields[4]) of |
| 196 |
|
1: |
| 197 |
< |
packages := Data[HexToLong(fields[3])]; |
| 197 |
> |
packages := Data[StrToInt(fields[3])]; |
| 198 |
|
2: |
| 199 |
< |
packages := Data[HexToLong(fields[3])] + Data[HexToLong(fields[3]) + 1] * 256; |
| 199 |
> |
packages := Data[StrToInt(fields[3])] + Data[StrToInt(fields[3]) + 1] * 256; |
| 200 |
|
4: |
| 201 |
< |
packages := Data[HexToLong(fields[3])] + Data[HexToLong(fields[3]) + 1] * |
| 202 |
< |
256 + Data[HexToLong(fields[3]) + 2] * 256 * 256 + Data[HexToLong(fields[3]) + 3] * 256 * 256 * 256; |
| 201 |
> |
packages := Data[StrToInt(fields[3])] + Data[StrToInt(fields[3]) + 1] * |
| 202 |
> |
256 + Data[StrToInt(fields[3]) + 2] * 256 * 256 + Data[StrToInt(fields[3]) + 3] * 256 * 256 * 256; |
| 203 |
|
end; |
| 204 |
|
end |
| 205 |
|
else |
| 206 |
|
begin |
| 207 |
< |
packages := HexToLong(fields[4]); |
| 207 |
> |
packages := StrToInt(fields[4]); |
| 208 |
|
end; |
| 209 |
|
SetLength(Result.Subs, Length(Result.Subs) + packages); |
| 210 |
|
for current_package := 0 to packages - 1 do |
| 238 |
|
structentry.description := ''; |
| 239 |
|
if current_type in [0, 1] then |
| 240 |
|
begin |
| 241 |
< |
structentry.offset := HexToLong(fields[1]) + current_base; |
| 241 |
> |
structentry.offset := StrToInt(fields[1]) + current_base; |
| 242 |
|
if Length(Result.Subs) = 0 then |
| 243 |
|
begin |
| 244 |
|
SetLength(Result.Global, Length(Result.Global) + 1); |
| 257 |
|
for current_package := 0 to packages - 1 do |
| 258 |
|
begin |
| 259 |
|
structentry.offset := |
| 260 |
< |
current_base + current_package * current_package_size + HexToLong(fields[1]); |
| 260 |
> |
current_base + current_package * current_package_size + StrToInt(fields[1]); |
| 261 |
|
with Result.Subs[High(Result.Subs) - packages + current_package + 1] do |
| 262 |
|
begin |
| 263 |
|
SetLength(Entries, Length(Entries) + 1); |