|
|
@ -168,7 +168,37 @@ char *ast_uri_encode(char *string, char *outbuf, int buflen, int doreserved);
|
|
|
|
\param s String to be decoded
|
|
|
|
\param s String to be decoded
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
void ast_uri_decode(char *s);
|
|
|
|
void ast_uri_decode(char *s);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static inline void ast_slinear_saturated_add(short *input, short value)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
int res;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
res = *input + value;
|
|
|
|
|
|
|
|
if (res > 32767)
|
|
|
|
|
|
|
|
*input = 32767;
|
|
|
|
|
|
|
|
else if (res < -32767)
|
|
|
|
|
|
|
|
*input = -32767;
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
*input = (short) res;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static inline void ast_slinear_saturated_multiply(short *input, short value)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
int res;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
res = *input * value;
|
|
|
|
|
|
|
|
if (res > 32767)
|
|
|
|
|
|
|
|
*input = 32767;
|
|
|
|
|
|
|
|
else if (res < -32767)
|
|
|
|
|
|
|
|
*input = -32767;
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
*input = (short) res;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static inline void ast_slinear_saturated_divide(short *input, short value)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
*input /= value;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
extern int test_for_thread_safety(void);
|
|
|
|
extern int test_for_thread_safety(void);
|
|
|
|
|
|
|
|
|
|
|
|