Browse Source

Test

etomic
jl777 8 years ago
parent
commit
b87a05f364
  1. 18
      crypto777/iguana_utils.c

18
crypto777/iguana_utils.c

@ -585,31 +585,31 @@ static int _decreasing_uint32(const void *a,const void *b)
int32_t sortds(double *buf,uint32_t num,int32_t size)
{
heapsort(buf,num,size,_increasing_double);
qsort(buf,num,size,_increasing_double);
return(0);
}
int32_t revsortds(double *buf,uint32_t num,int32_t size)
{
heapsort(buf,num,size,_decreasing_double);
qsort(buf,num,size,_decreasing_double);
return(0);
}
int32_t sort64s(uint64_t *buf,uint32_t num,int32_t size)
{
heapsort(buf,num,size,_increasing_uint64);
qsort(buf,num,size,_increasing_uint64);
return(0);
}
int32_t revsort64s(uint64_t *buf,uint32_t num,int32_t size)
{
heapsort(buf,num,size,_decreasing_uint64);
qsort(buf,num,size,_decreasing_uint64);
return(0);
}
int32_t revsort32(uint32_t *buf,uint32_t num,int32_t size)
{
heapsort(buf,num,size,_decreasing_uint32);
qsort(buf,num,size,_decreasing_uint32);
return(0);
}
@ -619,17 +619,17 @@ int32_t revsort32(uint32_t *buf,uint32_t num,int32_t size)
if ( dir > 0 )
{
if ( size == 32 )
heapsort(buf,num,structsize,_increasing_bits256);
qsort(buf,num,structsize,_increasing_bits256);
else if ( size == 20 )
heapsort(buf,num,structsize,_increasing_rmd160);
qsort(buf,num,structsize,_increasing_rmd160);
else retval = -1;
}
else
{
if ( size == 32 )
heapsort(buf,num,structsize,_decreasing_bits256);
qsort(buf,num,structsize,_decreasing_bits256);
else if ( size == 20 )
heapsort(buf,num,structsize,_decreasing_rmd160);
qsort(buf,num,structsize,_decreasing_rmd160);
else retval = -1;
}
if ( retval < 0 )

Loading…
Cancel
Save