mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-06-02 19:40:08 +00:00
FS-8953 [core] white space clean up.
This commit is contained in:
parent
10b46424f3
commit
e18c12b609
@ -110,8 +110,7 @@ static const EVP_MD *get_evp_by_name(const char *name)
|
|||||||
* Solaris 10 with the Sun Studio compilers doesn't have strsep in the
|
* Solaris 10 with the Sun Studio compilers doesn't have strsep in the
|
||||||
* C library either.
|
* C library either.
|
||||||
*/
|
*/
|
||||||
char
|
char *strsep(char **stringp, const char *delim)
|
||||||
*strsep(char **stringp, const char *delim)
|
|
||||||
{
|
{
|
||||||
char *res;
|
char *res;
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ SWITCH_DECLARE(int) switch_u8_seqlen(char *s)
|
|||||||
dest will always be L'\0'-terminated, even if there isn't enough room
|
dest will always be L'\0'-terminated, even if there isn't enough room
|
||||||
for all the characters.
|
for all the characters.
|
||||||
if sz = srcsz+1 (i.e. 4*srcsz+4 bytes), there will always be enough space.
|
if sz = srcsz+1 (i.e. 4*srcsz+4 bytes), there will always be enough space.
|
||||||
*/
|
*/
|
||||||
SWITCH_DECLARE(int) switch_u8_toucs(uint32_t *dest, int sz, char *src, int srcsz)
|
SWITCH_DECLARE(int) switch_u8_toucs(uint32_t *dest, int sz, char *src, int srcsz)
|
||||||
{
|
{
|
||||||
uint32_t ch;
|
uint32_t ch;
|
||||||
@ -105,7 +105,7 @@ SWITCH_DECLARE(int) switch_u8_toucs(uint32_t *dest, int sz, char *src, int srcsz
|
|||||||
ch -= offsetsFromUTF8[nb];
|
ch -= offsetsFromUTF8[nb];
|
||||||
dest[i++] = ch;
|
dest[i++] = ch;
|
||||||
}
|
}
|
||||||
done_toucs:
|
done_toucs:
|
||||||
dest[i] = 0;
|
dest[i] = 0;
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
@ -121,7 +121,7 @@ SWITCH_DECLARE(int) switch_u8_toucs(uint32_t *dest, int sz, char *src, int srcsz
|
|||||||
only NUL-terminates if all the characters fit, and there's space for
|
only NUL-terminates if all the characters fit, and there's space for
|
||||||
the NUL as well.
|
the NUL as well.
|
||||||
the destination string will never be bigger than the source string.
|
the destination string will never be bigger than the source string.
|
||||||
*/
|
*/
|
||||||
SWITCH_DECLARE(int) switch_u8_toutf8(char *dest, int sz, uint32_t *src, int srcsz)
|
SWITCH_DECLARE(int) switch_u8_toutf8(char *dest, int sz, uint32_t *src, int srcsz)
|
||||||
{
|
{
|
||||||
uint32_t ch;
|
uint32_t ch;
|
||||||
@ -325,8 +325,8 @@ SWITCH_DECLARE(int) switch_u8_read_escape_sequence(char *str, uint32_t *dest)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* convert a string with literal \uxxxx or \Uxxxxxxxx characters to UTF-8
|
/* convert a string with literal \uxxxx or \Uxxxxxxxx characters to UTF-8
|
||||||
example: u8_unescape(mybuf, 256, "hello\\u220e")
|
example: u8_unescape(mybuf, 256, "hello\\u220e")
|
||||||
note the double backslash is needed if called on a C string literal */
|
note the double backslash is needed if called on a C string literal */
|
||||||
SWITCH_DECLARE(int) switch_u8_unescape(char *buf, int sz, char *src)
|
SWITCH_DECLARE(int) switch_u8_unescape(char *buf, int sz, char *src)
|
||||||
{
|
{
|
||||||
int c=0, amt;
|
int c=0, amt;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user