|
@@ -362,12 +362,19 @@ var
|
|
c : integer;
|
|
c : integer;
|
|
begin
|
|
begin
|
|
{ x := cardinal(get_byte(s)); - you can't do this with TP, no unsigned longint }
|
|
{ x := cardinal(get_byte(s)); - you can't do this with TP, no unsigned longint }
|
|
- { the following assumes a little endian machine and TP }
|
|
|
|
|
|
+{$ifdef ENDIAN_LITTLE}
|
|
x[0] := Byte(get_byte(s));
|
|
x[0] := Byte(get_byte(s));
|
|
x[1] := Byte(get_byte(s));
|
|
x[1] := Byte(get_byte(s));
|
|
x[2] := Byte(get_byte(s));
|
|
x[2] := Byte(get_byte(s));
|
|
c := get_byte(s);
|
|
c := get_byte(s);
|
|
x[3] := Byte(c);
|
|
x[3] := Byte(c);
|
|
|
|
+{$else}
|
|
|
|
+ x[3] := Byte(get_byte(s));
|
|
|
|
+ x[2] := Byte(get_byte(s));
|
|
|
|
+ x[1] := Byte(get_byte(s));
|
|
|
|
+ c := get_byte(s);
|
|
|
|
+ x[0] := Byte(c);
|
|
|
|
+{$endif}
|
|
if (c = Z_EOF) then
|
|
if (c = Z_EOF) then
|
|
s^.z_err := Z_DATA_ERROR;
|
|
s^.z_err := Z_DATA_ERROR;
|
|
GetLong := cardinal(longint(x));
|
|
GetLong := cardinal(longint(x));
|