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:
Steve Underwood
2013-08-08 21:40:28 +08:00
parent bf9809c10c
commit 365fc08719
212 changed files with 3152 additions and 2664 deletions

View File

@@ -39,6 +39,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 "spandsp/telephony.h"
@@ -129,7 +134,7 @@ static __inline__ int get_scrambled_bit(v27ter_tx_state_t *s)
if (s->status_handler)
s->status_handler(s->status_user_data, SIG_STATUS_END_OF_DATA);
s->current_get_bit = fake_get_bit;
s->in_training = TRUE;
s->in_training = true;
bit = 1;
}
return scramble(s, bit);
@@ -209,7 +214,7 @@ static complexf_t getbaud(v27ter_tx_state_t *s)
/* Switch from the fake get_bit routine, to the user supplied real
one, and we are up and running. */
s->current_get_bit = s->get_bit;
s->in_training = FALSE;
s->in_training = false;
}
if (s->training_step == V27TER_TRAINING_SHUTDOWN_END)
{
@@ -368,7 +373,7 @@ SPAN_DECLARE(logging_state_t *) v27ter_tx_get_logging_state(v27ter_tx_state_t *s
}
/*- End of function --------------------------------------------------------*/
SPAN_DECLARE(int) v27ter_tx_restart(v27ter_tx_state_t *s, int bit_rate, int tep)
SPAN_DECLARE(int) v27ter_tx_restart(v27ter_tx_state_t *s, int bit_rate, bool tep)
{
if (bit_rate != 4800 && bit_rate != 2400)
return -1;
@@ -383,7 +388,7 @@ SPAN_DECLARE(int) v27ter_tx_restart(v27ter_tx_state_t *s, int bit_rate, int tep)
s->rrc_filter_step = 0;
s->scramble_reg = 0x3C;
s->scrambler_pattern_count = 0;
s->in_training = TRUE;
s->in_training = true;
s->training_step = (tep) ? V27TER_TRAINING_SEG_1 : V27TER_TRAINING_SEG_2;
s->carrier_phase = 0;
s->baud_phase = 0;
@@ -393,7 +398,7 @@ SPAN_DECLARE(int) v27ter_tx_restart(v27ter_tx_state_t *s, int bit_rate, int tep)
}
/*- End of function --------------------------------------------------------*/
SPAN_DECLARE(v27ter_tx_state_t *) v27ter_tx_init(v27ter_tx_state_t *s, int bit_rate, int tep, get_bit_func_t get_bit, void *user_data)
SPAN_DECLARE(v27ter_tx_state_t *) v27ter_tx_init(v27ter_tx_state_t *s, int bit_rate, bool tep, get_bit_func_t get_bit, void *user_data)
{
switch (bit_rate)
{