Potential bugs (fixed)
This commit is contained in:
parent
083eb123c4
commit
f15a8d97cb
|
@ -129,6 +129,7 @@
|
||||||
# define ABL_ATOM( E ) ( ( E )->NEXT == (ablexpr *)0 )
|
# define ABL_ATOM( E ) ( ( E )->NEXT == (ablexpr *)0 )
|
||||||
# define ABL_ATOM_VALUE( E ) ( (char *)( ( E )->DATA ) )
|
# define ABL_ATOM_VALUE( E ) ( (char *)( ( E )->DATA ) )
|
||||||
# define ABL_OPER( E ) ( (long)( ( ABL_CAR( ( E ) ) )->DATA ) )
|
# define ABL_OPER( E ) ( (long)( ( ABL_CAR( ( E ) ) )->DATA ) )
|
||||||
|
# define SET_ABL_OPER( E,O ) ( ( ABL_CAR( (E) )->DATA = (void *)(O) ) )
|
||||||
|
|
||||||
/*------------------------------------------------------\
|
/*------------------------------------------------------\
|
||||||
| |
|
| |
|
||||||
|
|
|
@ -111,7 +111,7 @@ static ablexpr *local_normablctl( Expr )
|
||||||
if ( NormExpr != ABL_CADR( Expr ) )
|
if ( NormExpr != ABL_CADR( Expr ) )
|
||||||
ABL_CADR( Expr ) = NormExpr;
|
ABL_CADR( Expr ) = NormExpr;
|
||||||
ABL_CADR( Expr ) = createablnotexpr( ABL_CADR( Expr ) );
|
ABL_CADR( Expr ) = createablnotexpr( ABL_CADR( Expr ) );
|
||||||
ABL_OPER( Expr ) = ABL_EX;
|
SET_ABL_OPER( Expr, ABL_EX );
|
||||||
NormExpr = createablnotexpr( Expr );
|
NormExpr = createablnotexpr( Expr );
|
||||||
return( NormExpr );
|
return( NormExpr );
|
||||||
}
|
}
|
||||||
|
@ -143,7 +143,7 @@ static ablexpr *local_normablctl( Expr )
|
||||||
if ( NormExpr != ABL_CADR( Expr ) )
|
if ( NormExpr != ABL_CADR( Expr ) )
|
||||||
ABL_CADR( Expr ) = NormExpr;
|
ABL_CADR( Expr ) = NormExpr;
|
||||||
ABL_CADR( Expr ) = createablnotexpr( ABL_CADR( Expr ) );
|
ABL_CADR( Expr ) = createablnotexpr( ABL_CADR( Expr ) );
|
||||||
ABL_OPER( Expr ) = ABL_EG;
|
SET_ABL_OPER( Expr, ABL_EG );
|
||||||
NormExpr = createablnotexpr( Expr );
|
NormExpr = createablnotexpr( Expr );
|
||||||
return( NormExpr );
|
return( NormExpr );
|
||||||
}
|
}
|
||||||
|
@ -157,7 +157,7 @@ static ablexpr *local_normablctl( Expr )
|
||||||
if ( NormExpr != ABL_CADR( Expr ) )
|
if ( NormExpr != ABL_CADR( Expr ) )
|
||||||
ABL_CADR( Expr ) = NormExpr;
|
ABL_CADR( Expr ) = NormExpr;
|
||||||
ABL_CADR( Expr ) = createablnotexpr( ABL_CADR( Expr ) );
|
ABL_CADR( Expr ) = createablnotexpr( ABL_CADR( Expr ) );
|
||||||
ABL_OPER( Expr ) = ABL_EF;
|
SET_ABL_OPER( Expr, ABL_EF );
|
||||||
NormExpr = createablnotexpr( Expr );
|
NormExpr = createablnotexpr( Expr );
|
||||||
NormExpr = local_normablctl( NormExpr );
|
NormExpr = local_normablctl( NormExpr );
|
||||||
return( NormExpr );
|
return( NormExpr );
|
||||||
|
|
|
@ -189,7 +189,7 @@ ablexpr *optimablnotexpr( Expr )
|
||||||
else
|
else
|
||||||
if ( NotOper != -1 )
|
if ( NotOper != -1 )
|
||||||
{
|
{
|
||||||
ABL_OPER( Expr ) = NotOper;
|
SET_ABL_OPER( Expr, NotOper );
|
||||||
return( Expr );
|
return( Expr );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -239,7 +239,7 @@ ablexpr *polarablexpr( Expr, Polar )
|
||||||
if ( AblPolarOperTable[ Oper ][ 2 ] == 1 ) Polar = ! Polar;
|
if ( AblPolarOperTable[ Oper ][ 2 ] == 1 ) Polar = ! Polar;
|
||||||
if ( AblPolarOperTable[ Oper ][ 2 ] == -1 ) Polar = ABL_POLAR_POSITIVE;
|
if ( AblPolarOperTable[ Oper ][ 2 ] == -1 ) Polar = ABL_POLAR_POSITIVE;
|
||||||
|
|
||||||
ABL_OPER( Expr ) = NewOper;
|
SET_ABL_OPER( Expr, NewOper );
|
||||||
ScanExpr = Expr;
|
ScanExpr = Expr;
|
||||||
|
|
||||||
while ( ( ScanExpr = ABL_CDR( ScanExpr ) ) != (ablexpr *)0 )
|
while ( ( ScanExpr = ABL_CDR( ScanExpr ) ) != (ablexpr *)0 )
|
||||||
|
|
|
@ -312,7 +312,7 @@ ablexpr *loc_simpablexpr( Expr )
|
||||||
if ( getabloperpolar( Oper ) == ABL_POLAR_NEGATIVE )
|
if ( getabloperpolar( Oper ) == ABL_POLAR_NEGATIVE )
|
||||||
{
|
{
|
||||||
Oper = getablopernot( Oper );
|
Oper = getablopernot( Oper );
|
||||||
ABL_OPER( Expr ) = Oper;
|
SET_ABL_OPER( Expr, Oper );
|
||||||
Negative = 1;
|
Negative = 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -99,7 +99,7 @@ ablexpr *unflatablexpr( Expr )
|
||||||
if ( Polar != ABL_POLAR_POSITIVE )
|
if ( Polar != ABL_POLAR_POSITIVE )
|
||||||
{
|
{
|
||||||
Oper = getablopernot( Oper );
|
Oper = getablopernot( Oper );
|
||||||
ABL_OPER( Expr ) = Oper;
|
SET_ABL_OPER( Expr, Oper );
|
||||||
|
|
||||||
ScanExpr = createabloper( ABL_NOT );
|
ScanExpr = createabloper( ABL_NOT );
|
||||||
addablhexpr( ScanExpr, Expr );
|
addablhexpr( ScanExpr, Expr );
|
||||||
|
|
|
@ -290,4 +290,4 @@ static char LIP6bw_bits[] = {
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
||||||
|
|
|
@ -85,10 +85,10 @@ int SyfGetNumberBit( Value )
|
||||||
|
|
||||||
long Value;
|
long Value;
|
||||||
{
|
{
|
||||||
long Mask;
|
unsigned long Mask;
|
||||||
int NumberBit;
|
int NumberBit;
|
||||||
|
|
||||||
Mask = 1 << 31;
|
Mask = 1U << 31;
|
||||||
|
|
||||||
for ( NumberBit = 32; NumberBit > 0; NumberBit-- )
|
for ( NumberBit = 32; NumberBit > 0; NumberBit-- )
|
||||||
{
|
{
|
||||||
|
|
|
@ -1012,7 +1012,7 @@ int right;
|
||||||
|
|
||||||
if ( Value != 0 )
|
if ( Value != 0 )
|
||||||
{
|
{
|
||||||
Mask = 1L << 31;
|
Mask = 1U << 31;
|
||||||
|
|
||||||
if ( src[ 0 ] == '-' )
|
if ( src[ 0 ] == '-' )
|
||||||
{
|
{
|
||||||
|
|
|
@ -412,7 +412,7 @@ vexexpr *createvexatomlongarray( Array, Size, Width, Signed )
|
||||||
{
|
{
|
||||||
Width = MaxWidth;
|
Width = MaxWidth;
|
||||||
Index = 0;
|
Index = 0;
|
||||||
Mask = 1L << 31;
|
Mask = 1U << 31;
|
||||||
|
|
||||||
Integer = Array[ 0 ];
|
Integer = Array[ 0 ];
|
||||||
|
|
||||||
|
@ -431,7 +431,7 @@ vexexpr *createvexatomlongarray( Array, Size, Width, Signed )
|
||||||
if ( Index == Size ) break;
|
if ( Index == Size ) break;
|
||||||
|
|
||||||
Integer = Array[ Index ];
|
Integer = Array[ Index ];
|
||||||
Mask = 1L << 31;
|
Mask = 1U << 31;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -453,7 +453,7 @@ vexexpr *createvexatomlongarray( Array, Size, Width, Signed )
|
||||||
if ( Index == Size ) break;
|
if ( Index == Size ) break;
|
||||||
|
|
||||||
Integer = Array[ Index ];
|
Integer = Array[ Index ];
|
||||||
Mask = 1L << 31;
|
Mask = 1U << 31;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -470,7 +470,7 @@ vexexpr *createvexatomlongarray( Array, Size, Width, Signed )
|
||||||
|
|
||||||
Scan = 1;
|
Scan = 1;
|
||||||
Index = Size - ((Width + 31) / 32);
|
Index = Size - ((Width + 31) / 32);
|
||||||
Mask = 1L << ((Width - 1) % 32);
|
Mask = 1U << ((Width - 1) % 32);
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
@ -482,7 +482,7 @@ vexexpr *createvexatomlongarray( Array, Size, Width, Signed )
|
||||||
|
|
||||||
if ( Mask == 0 )
|
if ( Mask == 0 )
|
||||||
{
|
{
|
||||||
Mask = 1L << 31; Index++;
|
Mask = 1U << 31; Index++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
while ( Index < Size );
|
while ( Index < Size );
|
||||||
|
|
|
@ -184,7 +184,7 @@ int getvexintnumbit( Size )
|
||||||
if ( Size < 0 ) return( 0 );
|
if ( Size < 0 ) return( 0 );
|
||||||
if ( Size == 0 ) return( 1 );
|
if ( Size == 0 ) return( 1 );
|
||||||
|
|
||||||
Mask = 1L << 31;
|
Mask = 1U << 31;
|
||||||
|
|
||||||
for ( NumberBit = 32; NumberBit > 0; NumberBit-- )
|
for ( NumberBit = 32; NumberBit > 0; NumberBit-- )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue