Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-04-17 07:17:24 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-17 07:21:24 +0300
commite12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 (patch)
tree8cf3453d12edb177a218ef8009357518ec6cab6a /intern/utfconv/utfconv.h
parentb3dabc200a4b0399ec6b81f2ff2730d07b44fcaa (diff)
ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
Diffstat (limited to 'intern/utfconv/utfconv.h')
-rw-r--r--intern/utfconv/utfconv.h23
1 files changed, 13 insertions, 10 deletions
diff --git a/intern/utfconv/utfconv.h b/intern/utfconv/utfconv.h
index 35bbe3ac108..f13afbc0934 100644
--- a/intern/utfconv/utfconv.h
+++ b/intern/utfconv/utfconv.h
@@ -25,8 +25,8 @@
#include <stdio.h>
#include <stdlib.h>
-#ifdef __cplusplus
-extern "C" {
+#ifdef __cplusplus
+extern "C" {
#endif
/**
@@ -48,8 +48,9 @@ size_t count_utf_16_from_8(const char *string8);
*/
#define UTF_ERROR_NULL_IN 1 << 0 /* Error occures when requered parameter is missing*/
#define UTF_ERROR_ILLCHAR 1 << 1 /* Error if character is in illigal UTF rage*/
-#define UTF_ERROR_SMALL 1 << 2 /* Passed size is to small. It gives legal string with character missing at the end*/
-#define UTF_ERROR_ILLSEQ 1 << 3 /* Error if sequence is broken and doesn't finish*/
+#define UTF_ERROR_SMALL \
+ 1 << 2 /* Passed size is to small. It gives legal string with character missing at the end*/
+#define UTF_ERROR_ILLSEQ 1 << 3 /* Error if sequence is broken and doesn't finish*/
/**
* Converts utf-16 string to allocated utf-8 string
@@ -69,7 +70,6 @@ int conv_utf_16_to_8(const wchar_t *in16, char *out8, size_t size8);
*/
int conv_utf_8_to_16(const char *in8, wchar_t *out16, size_t size16);
-
/**
* Allocates and converts the utf-8 string from utf-16
* @param in16 utf-16 string to convert
@@ -87,14 +87,17 @@ char *alloc_utf_8_from_16(const wchar_t *in16, size_t add);
wchar_t *alloc_utf16_from_8(const char *in8, size_t add);
/* Easy allocation and conversion of new utf-16 string. New string has _16 suffix. Must be deallocated with UTF16_UN_ENCODE in right order*/
-#define UTF16_ENCODE(in8str) if (1) { \
- wchar_t *in8str ## _16 = alloc_utf16_from_8((const char *)in8str, 0)
+#define UTF16_ENCODE(in8str) \
+ if (1) { \
+ wchar_t *in8str##_16 = alloc_utf16_from_8((const char *)in8str, 0)
#define UTF16_UN_ENCODE(in8str) \
- free(in8str ## _16); } (void)0
+ free(in8str##_16); \
+ } \
+ (void)0
-#ifdef __cplusplus
+#ifdef __cplusplus
}
#endif
-#endif /* __UTFCONV_H__ */
+#endif /* __UTFCONV_H__ */