mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-21 23:01:03 +00:00
Removed some spaces
This commit is contained in:
parent
bbe5c2a31e
commit
e830306ff0
@ -486,7 +486,7 @@ R_API const char *r_utf_block_name(int idx) {
|
||||
#define r_utf_blocks_count (sizeof (r_utf_blocks) / sizeof (r_utf_blocks[0]))
|
||||
|
||||
/* Convert an UTF-8 buf into a unicode RRune */
|
||||
R_API int r_utf8_decode (const ut8 *ptr, int ptrlen, RRune *ch) {
|
||||
R_API int r_utf8_decode(const ut8 *ptr, int ptrlen, RRune *ch) {
|
||||
if (ptrlen < 1) {
|
||||
return 0;
|
||||
}
|
||||
@ -515,7 +515,7 @@ R_API int r_utf8_decode (const ut8 *ptr, int ptrlen, RRune *ch) {
|
||||
}
|
||||
|
||||
/* Convert a unicode RRune into an UTF-8 buf */
|
||||
R_API int r_utf8_encode (ut8 *ptr, const RRune ch) {
|
||||
R_API int r_utf8_encode(ut8 *ptr, const RRune ch) {
|
||||
if (ch < 0x80) {
|
||||
ptr[0] = (ut8)ch;
|
||||
return 1;
|
||||
@ -542,7 +542,7 @@ R_API int r_utf8_encode (ut8 *ptr, const RRune ch) {
|
||||
}
|
||||
|
||||
/* Convert a unicode RRune string into an utf-8 one */
|
||||
R_API int r_utf8_encode_str (const RRune *str, ut8 *dst, const int dst_length) {
|
||||
R_API int r_utf8_encode_str(const RRune *str, ut8 *dst, const int dst_length) {
|
||||
int i, pos = 0;
|
||||
|
||||
if (!str || !dst) {
|
||||
@ -558,7 +558,7 @@ R_API int r_utf8_encode_str (const RRune *str, ut8 *dst, const int dst_length) {
|
||||
}
|
||||
|
||||
/* Returns the size in bytes of the utf-8 encoded char */
|
||||
R_API int r_utf8_size (const ut8 *ptr) {
|
||||
R_API int r_utf8_size(const ut8 *ptr) {
|
||||
const int utf8_size[] = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
@ -572,7 +572,7 @@ R_API int r_utf8_size (const ut8 *ptr) {
|
||||
return (ptr[0]&0x80) ? utf8_size[ptr[0]^0x80] : 1;
|
||||
}
|
||||
|
||||
R_API int r_utf8_strlen (const ut8 *str) {
|
||||
R_API int r_utf8_strlen(const ut8 *str) {
|
||||
int i, len = 0;
|
||||
|
||||
for (i = 0; str[i]; i++) {
|
||||
@ -584,7 +584,7 @@ R_API int r_utf8_strlen (const ut8 *str) {
|
||||
return len;
|
||||
}
|
||||
|
||||
R_API int r_isprint (const RRune c) {
|
||||
R_API int r_isprint(const RRune c) {
|
||||
const int last = nonprintable_ranges_count;
|
||||
|
||||
int low = 0;
|
||||
@ -607,7 +607,7 @@ R_API int r_isprint (const RRune c) {
|
||||
}
|
||||
|
||||
#if __WINDOWS__
|
||||
R_API char *r_utf16_to_utf8_l (const wchar_t *wc, int len) {
|
||||
R_API char *r_utf16_to_utf8_l(const wchar_t *wc, int len) {
|
||||
if (!wc || !len || len < -1) {
|
||||
return NULL;
|
||||
}
|
||||
@ -626,7 +626,7 @@ R_API char *r_utf16_to_utf8_l (const wchar_t *wc, int len) {
|
||||
return rutf8;
|
||||
}
|
||||
|
||||
R_API wchar_t *r_utf8_to_utf16_l (const char *cstring, int len) {
|
||||
R_API wchar_t *r_utf8_to_utf16_l(const char *cstring, int len) {
|
||||
if (!cstring || !len || len < -1) {
|
||||
return NULL;
|
||||
}
|
||||
@ -645,7 +645,7 @@ R_API wchar_t *r_utf8_to_utf16_l (const char *cstring, int len) {
|
||||
return rutf16;
|
||||
}
|
||||
|
||||
R_API const char *r_acp_to_utf8_l (const ut8 *str, int len) {
|
||||
R_API const char *r_acp_to_utf8_l(const ut8 *str, int len) {
|
||||
if (!str || !len || len < -1) {
|
||||
return NULL;
|
||||
}
|
||||
@ -668,7 +668,7 @@ R_API const char *r_acp_to_utf8_l (const ut8 *str, int len) {
|
||||
|
||||
#endif // __WINDOWS__
|
||||
|
||||
R_API int r_utf_block_idx (RRune ch) {
|
||||
R_API int r_utf_block_idx(RRune ch) {
|
||||
const int last = r_utf_blocks_count;
|
||||
int low, hi, mid;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user