Numerous little changes to spandsp that haven't been pushed to Freeswitch for a

while. The only big changes are a majorly rewritten V.42 and V.42bis which are
now basically functional.
This commit is contained in:
Steve Underwood
2011-07-02 14:45:27 +08:00
parent 6f62f39139
commit d30e82e226
68 changed files with 2517 additions and 2118 deletions

View File

@@ -114,11 +114,11 @@ static const int year_lengths[2] =
static int increment_overflow(int *number, int delta)
{
int number0;
int last_number;
number0 = *number;
last_number = *number;
*number += delta;
return (*number < number0) != (delta < 0);
return (*number < last_number) != (delta < 0);
}
/*- End of function --------------------------------------------------------*/
@@ -164,6 +164,10 @@ static struct tm *time_sub(const time_t * const timep, const long int offset, co
int y;
int hit;
int i;
int newy;
time_t tdelta;
int idelta;
int leapdays;
corr = 0;
hit = 0;
@@ -198,11 +202,6 @@ static struct tm *time_sub(const time_t * const timep, const long int offset, co
rem = *timep - tdays*SECS_PER_DAY;
while (tdays < 0 || tdays >= year_lengths[isleap(y)])
{
int newy;
time_t tdelta;
int idelta;
int leapdays;
tdelta = tdays / DAYS_PER_LEAP_YEAR;
idelta = tdelta;
if (tdelta - idelta >= 1 || idelta - tdelta >= 1)