Skip to content
Snippets Groups Projects
Commit 34277630 authored by Michael Platzer's avatar Michael Platzer
Browse files

sequential/ammunition: replace all long by long long

parent 82665cd9
No related branches found
No related tags found
No related merge requests found
...@@ -145,7 +145,7 @@ int ammunition_sprintf_u( char *s, unsigned int number ) ...@@ -145,7 +145,7 @@ int ammunition_sprintf_u( char *s, unsigned int number )
/* How many decimal digits do we need? */ /* How many decimal digits do we need? */
char digits = 0; char digits = 0;
unsigned char writePos = 0; unsigned char writePos = 0;
unsigned long copyOfNumber = number; unsigned long long copyOfNumber = number;
_Pragma( "loopbound min 1 max 10" ) _Pragma( "loopbound min 1 max 10" )
do { do {
digits++; digits++;
......
...@@ -246,7 +246,7 @@ int ammunition_multiply_unsigned_integer_without_overflow_reaction ...@@ -246,7 +246,7 @@ int ammunition_multiply_unsigned_integer_without_overflow_reaction
int op1_digit_num; int op1_digit_num;
int op2_digit_num; int op2_digit_num;
int carry; int carry;
unsigned long int partial_sum; unsigned long long int partial_sum;
int result_digit_number; int result_digit_number;
int overflow_flag; int overflow_flag;
unsigned char long_result [ 2 * MAX_INTEGER_OPERAND_SIZE ]; unsigned char long_result [ 2 * MAX_INTEGER_OPERAND_SIZE ];
...@@ -384,8 +384,8 @@ int ammunition_divide_unsigned_integer_without_overflow_reaction ...@@ -384,8 +384,8 @@ int ammunition_divide_unsigned_integer_without_overflow_reaction
/* Division by digit. */ /* Division by digit. */
int digit_num; int digit_num;
int digit; int digit;
unsigned long divisable; unsigned long long divisable;
unsigned long remainder; unsigned long long remainder;
digit = ( ( unsigned char * ) op2 ) [ first_nonzero_digit_number ]; digit = ( ( unsigned char * ) op2 ) [ first_nonzero_digit_number ];
ammunition_memcpy ( result, op1, ( size_t ) size ); ammunition_memcpy ( result, op1, ( size_t ) size );
...@@ -434,7 +434,7 @@ int ammunition_divide_unsigned_integer_without_overflow_reaction ...@@ -434,7 +434,7 @@ int ammunition_divide_unsigned_integer_without_overflow_reaction
_Pragma( "loopbound min 0 max 0" ) _Pragma( "loopbound min 0 max 0" )
while ( normalized_op2 [ first_nonzero_digit_number + 1 ] * q_approximation while ( normalized_op2 [ first_nonzero_digit_number + 1 ] * q_approximation
> ( ( ( unsigned long int ) scaled_op1 [ scaled_op1_digit_num ] > ( ( ( unsigned long long int ) scaled_op1 [ scaled_op1_digit_num ]
* ( UCHAR_MAX + 1 ) * ( UCHAR_MAX + 1 )
+ scaled_op1 [ scaled_op1_digit_num + 1 ] + scaled_op1 [ scaled_op1_digit_num + 1 ]
- q_approximation - q_approximation
...@@ -1168,8 +1168,8 @@ ammunition_unsigned_integer_to_based_string ( int size, const void *operand, ...@@ -1168,8 +1168,8 @@ ammunition_unsigned_integer_to_based_string ( int size, const void *operand,
{ {
int digit_num; int digit_num;
int i; int i;
unsigned long divisable; unsigned long long divisable;
unsigned long remainder; unsigned long long remainder;
int nonzero_flag; int nonzero_flag;
int length; int length;
int temporary; int temporary;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment