mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-14 09:58:17 +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:
@@ -44,6 +44,11 @@
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <stdlib.h>
|
||||
#if defined(HAVE_STDBOOL_H)
|
||||
#include <stdbool.h>
|
||||
#else
|
||||
#include "spandsp/stdbool.h"
|
||||
#endif
|
||||
#include <assert.h>
|
||||
|
||||
#include "spandsp/telephony.h"
|
||||
@@ -52,14 +57,6 @@
|
||||
|
||||
#include "spandsp/private/timezone.h"
|
||||
|
||||
#if !defined(FALSE)
|
||||
#define FALSE 0
|
||||
#endif
|
||||
|
||||
#if !defined(TRUE)
|
||||
#define TRUE (!FALSE)
|
||||
#endif
|
||||
|
||||
#define SECS_PER_MIN 60
|
||||
#define MINS_PER_HOUR 60
|
||||
#define HOURS_PER_DAY 24
|
||||
@@ -645,7 +642,7 @@ static int tzparse(const char *name, struct tz_state_s * const sp, const int las
|
||||
}
|
||||
}
|
||||
/* Initially we're assumed to be in standard time. */
|
||||
isdst = FALSE;
|
||||
isdst = false;
|
||||
theiroffset = theirstdoffset;
|
||||
/* Now juggle transition times and types tracking offsets as you do. */
|
||||
for (i = 0; i < sp->timecnt; i++)
|
||||
@@ -681,10 +678,10 @@ static int tzparse(const char *name, struct tz_state_s * const sp, const int las
|
||||
}
|
||||
/* Finally, fill in ttis. ttisstd and ttisgmt need not be handled. */
|
||||
sp->ttis[0].gmtoff = -stdoffset;
|
||||
sp->ttis[0].isdst = FALSE;
|
||||
sp->ttis[0].isdst = false;
|
||||
sp->ttis[0].abbrind = 0;
|
||||
sp->ttis[1].gmtoff = -dstoffset;
|
||||
sp->ttis[1].isdst = TRUE;
|
||||
sp->ttis[1].isdst = true;
|
||||
sp->ttis[1].abbrind = stdlen + 1;
|
||||
sp->typecnt = 2;
|
||||
}
|
||||
@@ -742,9 +739,9 @@ static void tz_set(tz_t *tz, const char *tzstring)
|
||||
lclptr->ttis[0].abbrind = 0;
|
||||
strcpy(lclptr->chars, gmt);
|
||||
}
|
||||
else if (name[0] == ':' || tzparse(name, lclptr, FALSE) != 0)
|
||||
else if (name[0] == ':' || tzparse(name, lclptr, false) != 0)
|
||||
{
|
||||
tzparse(gmt, lclptr, TRUE);
|
||||
tzparse(gmt, lclptr, true);
|
||||
}
|
||||
set_tzname(tz);
|
||||
}
|
||||
|
Reference in New Issue
Block a user