Merge pull request #756 in FS/freeswitch from bugfix/FS-8953-whitespace-cleanup-src-switch_-.c to master

* commit 'e18c12b6092114df9f6e149e49fc563858367c21':
  FS-8953 [core] white space clean up.
This commit is contained in:
Mike Jerris 2016-03-17 10:06:19 -05:00
commit a107910907
25 changed files with 812 additions and 813 deletions

View File

@ -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;

View File

@ -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;