mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 17:38:59 +00:00
Changed spandsp from using TRUE and FALSE to using C99 true and false. It seems
like the quirks we used to get using those with C++ have gone away.
This commit is contained in:
@@ -75,6 +75,11 @@
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
#if defined(HAVE_STDBOOL_H)
|
||||
#include <stdbool.h>
|
||||
#else
|
||||
#include "spandsp/stdbool.h"
|
||||
#endif
|
||||
#include "floating_fudge.h"
|
||||
#include <tiffio.h>
|
||||
|
||||
@@ -381,12 +386,12 @@ static int put_bits(t4_t6_decode_state_t *s, uint32_t bit_string, int quantity)
|
||||
need a minimum of 13 bits in the buffer to proceed with any bit stream
|
||||
analysis. */
|
||||
if ((s->rx_bits += quantity) < 13)
|
||||
return FALSE;
|
||||
return false;
|
||||
if (s->consecutive_eols)
|
||||
{
|
||||
/* Check if the image has already terminated. */
|
||||
if (s->consecutive_eols >= EOLS_TO_END_ANY_RX_PAGE)
|
||||
return TRUE;
|
||||
return true;
|
||||
/* Check if the image hasn't even started. */
|
||||
if (s->consecutive_eols < 0)
|
||||
{
|
||||
@@ -397,14 +402,14 @@ static int put_bits(t4_t6_decode_state_t *s, uint32_t bit_string, int quantity)
|
||||
{
|
||||
s->rx_bitstream >>= 1;
|
||||
if (--s->rx_bits < 13)
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
/* We have an EOL, so now the page begins and we can proceed to
|
||||
process the bit stream as image data. */
|
||||
s->consecutive_eols = 0;
|
||||
if (s->encoding == T4_COMPRESSION_T4_1D)
|
||||
{
|
||||
s->row_is_2d = FALSE;
|
||||
s->row_is_2d = false;
|
||||
force_drop_rx_bits(s, 12);
|
||||
}
|
||||
else
|
||||
@@ -445,7 +450,7 @@ static int put_bits(t4_t6_decode_state_t *s, uint32_t bit_string, int quantity)
|
||||
if (s->consecutive_eols >= EOLS_TO_END_T6_RX_PAGE)
|
||||
{
|
||||
s->consecutive_eols = EOLS_TO_END_ANY_RX_PAGE;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -453,7 +458,7 @@ static int put_bits(t4_t6_decode_state_t *s, uint32_t bit_string, int quantity)
|
||||
if (s->consecutive_eols >= EOLS_TO_END_T4_RX_PAGE)
|
||||
{
|
||||
s->consecutive_eols = EOLS_TO_END_ANY_RX_PAGE;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -465,7 +470,7 @@ static int put_bits(t4_t6_decode_state_t *s, uint32_t bit_string, int quantity)
|
||||
add_run_to_row(s);
|
||||
s->consecutive_eols = 0;
|
||||
if (put_decoded_row(s))
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
if (s->encoding == T4_COMPRESSION_T4_2D)
|
||||
{
|
||||
@@ -476,7 +481,7 @@ static int put_bits(t4_t6_decode_state_t *s, uint32_t bit_string, int quantity)
|
||||
{
|
||||
force_drop_rx_bits(s, 12);
|
||||
}
|
||||
s->in_black = FALSE;
|
||||
s->in_black = false;
|
||||
s->black_white = 0;
|
||||
s->run_length = 0;
|
||||
s->row_len = 0;
|
||||
@@ -609,7 +614,7 @@ static int put_bits(t4_t6_decode_state_t *s, uint32_t bit_string, int quantity)
|
||||
s->a0 += t4_1d_black_table[bits].param;
|
||||
break;
|
||||
case S_TermB:
|
||||
s->in_black = FALSE;
|
||||
s->in_black = false;
|
||||
if (s->row_len < s->image_width)
|
||||
{
|
||||
s->run_length += t4_1d_black_table[bits].param;
|
||||
@@ -643,7 +648,7 @@ static int put_bits(t4_t6_decode_state_t *s, uint32_t bit_string, int quantity)
|
||||
s->a0 += t4_1d_white_table[bits].param;
|
||||
break;
|
||||
case S_TermW:
|
||||
s->in_black = TRUE;
|
||||
s->in_black = true;
|
||||
if (s->row_len < s->image_width)
|
||||
{
|
||||
s->run_length += t4_1d_white_table[bits].param;
|
||||
@@ -676,15 +681,15 @@ static int put_bits(t4_t6_decode_state_t *s, uint32_t bit_string, int quantity)
|
||||
if (s->run_length > 0)
|
||||
add_run_to_row(s);
|
||||
if (put_decoded_row(s))
|
||||
return TRUE;
|
||||
s->in_black = FALSE;
|
||||
return true;
|
||||
s->in_black = false;
|
||||
s->black_white = 0;
|
||||
s->run_length = 0;
|
||||
s->row_len = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
@@ -715,7 +720,7 @@ SPAN_DECLARE(int) t4_t6_decode_put_bit(t4_t6_decode_state_t *s, int bit)
|
||||
if (bit < 0)
|
||||
{
|
||||
t4_t6_decode_rx_status(s, bit);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
s->compressed_image_size++;
|
||||
if (put_bits(s, bit & 1, 1))
|
||||
@@ -858,7 +863,7 @@ SPAN_DECLARE(int) t4_t6_decode_restart(t4_t6_decode_state_t *s, int image_width)
|
||||
s->pixels = 8;
|
||||
|
||||
s->row_len = 0;
|
||||
s->in_black = FALSE;
|
||||
s->in_black = false;
|
||||
s->black_white = 0;
|
||||
s->b_cursor = 1;
|
||||
s->a_cursor = 0;
|
||||
|
Reference in New Issue
Block a user