mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-17 14:58:34 +00:00
a little update to the sofia-sip library
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4939 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
fabed21ea8
commit
853936abd3
270 files changed
+37121
-11402
No files matched your search
@@ -57,6 +57,9 @@ SOFIAPUBFUN isize_t base64_e(char buf[], isize_t bsiz, void *data, isize_t dsiz)
|
||||
/** Calculate size of n bytes encoded in base64 */
|
||||
#define BASE64_SIZE(n) ((((n) + 2) / 3) * 4)
|
||||
|
||||
/** Calculate size of n bytes encoded in base64 sans trailing =. @NEW_1_12_5 */
|
||||
#define BASE64_MINSIZE(n) ((n * 4 + 2) / 3)
|
||||
|
||||
SOFIA_END_DECLS
|
||||
|
||||
#endif /* !BASE_64 */
|
||||
@@ -43,56 +43,39 @@
|
||||
|
||||
SOFIA_BEGIN_DECLS
|
||||
|
||||
#if SU_HAVE_INLINE
|
||||
su_inline
|
||||
#else
|
||||
SOFIAPUBFUN
|
||||
#endif
|
||||
int
|
||||
str0cmp(char const *a, char const *b),
|
||||
str0ncmp(char const *a, char const *b, size_t n),
|
||||
str0casecmp(char const *a, char const *b),
|
||||
str0ncasecmp(char const *a, char const *b, size_t n);
|
||||
|
||||
#if SU_HAVE_INLINE
|
||||
su_inline
|
||||
#else
|
||||
SOFIAPUBFUN
|
||||
#endif
|
||||
size_t
|
||||
strnspn(char const *s, size_t size, char const *term),
|
||||
strncspn(char const *s, size_t ssize, char const *reject);
|
||||
|
||||
#if SU_HAVE_INLINE
|
||||
int str0cmp(char const *a, char const *b)
|
||||
su_inline int str0cmp(char const *a, char const *b)
|
||||
{
|
||||
if (a == NULL) a = "";
|
||||
if (b == NULL) b = "";
|
||||
return strcmp(a, b);
|
||||
}
|
||||
|
||||
int str0ncmp(char const *a, char const *b, size_t n)
|
||||
su_inline int str0ncmp(char const *a, char const *b, size_t n)
|
||||
{
|
||||
if (a == NULL) a = "";
|
||||
if (b == NULL) b = "";
|
||||
return strncmp(a, b, n);
|
||||
}
|
||||
|
||||
int str0casecmp(char const *a, char const *b)
|
||||
su_inline int str0casecmp(char const *a, char const *b)
|
||||
{
|
||||
if (a == NULL) a = "";
|
||||
if (b == NULL) b = "";
|
||||
return strcasecmp(a, b);
|
||||
}
|
||||
|
||||
int str0ncasecmp(char const *a, char const *b, size_t n)
|
||||
su_inline int str0ncasecmp(char const *a, char const *b, size_t n)
|
||||
{
|
||||
if (a == NULL) a = "";
|
||||
if (b == NULL) b = "";
|
||||
return strncasecmp(a, b, n);
|
||||
}
|
||||
|
||||
size_t strnspn(char const *s, size_t ssize, char const *term)
|
||||
#if !SU_HAVE_INLINE
|
||||
SOFIAPUBFUN size_t strnspn(char const *s, size_t size, char const *term);
|
||||
SOFIAPUBFUN size_t strncspn(char const *s, size_t ssize, char const *reject);
|
||||
#else
|
||||
su_inline size_t strnspn(char const *s, size_t ssize, char const *term)
|
||||
{
|
||||
size_t n;
|
||||
size_t tsize = strlen(term);
|
||||
@@ -123,7 +106,7 @@ size_t strnspn(char const *s, size_t ssize, char const *term)
|
||||
return n;
|
||||
}
|
||||
|
||||
size_t strncspn(char const *s, size_t ssize, char const *reject)
|
||||
su_inline size_t strncspn(char const *s, size_t ssize, char const *reject)
|
||||
{
|
||||
size_t n;
|
||||
size_t rsize = strlen(reject);
|
||||
|
||||
Reference in new issue
Block a user