mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-31 09:30:17 +02:00
+ New const MaxzbaseInt, set to maxlongint for FPC
to avoid range check errors within code if compiled with range check enabled. git-svn-id: trunk@17805 -
This commit is contained in:
parent
239944f8d0
commit
0c210a9df3
@ -106,7 +106,7 @@ type
|
||||
dtree_type = array[0..2*D_CODES+1-1] of ct_data; { distance tree }
|
||||
htree_type = array[0..2*BL_CODES+1-1] of ct_data; { Huffman tree for bit lengths }
|
||||
{ generic tree type }
|
||||
tree_type = array[0..(maxint div SizeOf(ct_data))-1] of ct_data;
|
||||
tree_type = array[0..(maxzbaseint div SizeOf(ct_data))-1] of ct_data;
|
||||
|
||||
tree_ptr = ^ct_data;
|
||||
ltree_ptr = ^ltree_type;
|
||||
@ -139,7 +139,7 @@ type
|
||||
|
||||
pPosf = ^Posf;
|
||||
|
||||
zPosfArray = array[0..(maxint div SizeOf(Posf))-1] of Posf;
|
||||
zPosfArray = array[0..(maxzbaseint div SizeOf(Posf))-1] of Posf;
|
||||
pzPosfArray = ^zPosfArray;
|
||||
|
||||
{ A Pos is an index in the character window. We use short instead of integer to
|
||||
|
@ -88,9 +88,11 @@ const
|
||||
{ Maximum value for windowBits in deflateInit2 and inflateInit2 }
|
||||
const
|
||||
{$IFDEF TP}
|
||||
MAX_WBITS = 14; { 32K LZ77 window }
|
||||
MAX_WBITS = 14; { 16K LZ77 window }
|
||||
maxzbaseint = maxint;
|
||||
{$ELSE}
|
||||
MAX_WBITS = 15; { 32K LZ77 window }
|
||||
maxzbaseint = maxlongint;
|
||||
{$ENDIF}
|
||||
|
||||
{ default windowBits for decompression. MAX_WBITS is for compression only }
|
||||
@ -102,10 +104,10 @@ type Pbytearray=^Tbytearray;
|
||||
Pwordarray=^Twordarray;
|
||||
Pcardinalarray=^Tcardinalarray;
|
||||
|
||||
Tbytearray = array [0..maxint div sizeof(byte)-1] of byte;
|
||||
Twordarray = array [0..maxint div sizeof(word)-1] of word;
|
||||
Tintegerarray = array [0..maxint div sizeof(integer)-1] of integer;
|
||||
Tcardinalarray = array [0..maxint div sizeof(cardinal)-1] of cardinal;
|
||||
Tbytearray = array [0..maxzbaseint div sizeof(byte)-1] of byte;
|
||||
Twordarray = array [0..maxzbaseint div sizeof(word)-1] of word;
|
||||
Tintegerarray = array [0..maxzbaseint div sizeof(integer)-1] of integer;
|
||||
Tcardinalarray = array [0..maxzbaseint div sizeof(cardinal)-1] of cardinal;
|
||||
|
||||
|
||||
{ The memory requirements for deflate are (in bytes):
|
||||
@ -136,7 +138,7 @@ type
|
||||
End;
|
||||
|
||||
type
|
||||
huft_field = Array[0..(maxint div SizeOf(inflate_huft))-1] of inflate_huft;
|
||||
huft_field = Array[0..(maxzbaseint div SizeOf(inflate_huft))-1] of inflate_huft;
|
||||
huft_ptr = ^huft_field;
|
||||
type
|
||||
ppInflate_huft = ^pInflate_huft;
|
||||
|
Loading…
Reference in New Issue
Block a user