aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/utf8.h
diff options
context:
space:
mode:
authorGravatar Kurtis Rader <krader@skepticism.us>2016-05-03 15:05:47 -0700
committerGravatar Kurtis Rader <krader@skepticism.us>2016-05-03 15:12:19 -0700
commitee44879d4d6ae28968885823db5f0ce13e5a6dec (patch)
tree90388f6c6c00658eeb8828e810a5194889f1ffa2 /src/utf8.h
parentc14bac42846506ab01090e1f6384a60126d7c596 (diff)
restyle utf8 module to match project style
Reduces lint errors from 63 to 57 (-10%). Line count from 518 to 418 (-19%). Another step in resolving issue #2902.
Diffstat (limited to 'src/utf8.h')
-rw-r--r--src/utf8.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/utf8.h b/src/utf8.h
index 72e1cc8b..99a12a8e 100644
--- a/src/utf8.h
+++ b/src/utf8.h
@@ -14,22 +14,22 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/*
- * utf8: implementation of UTF-8 charset encoding (RFC3629).
- */
+// Implementation of UTF-8 charset encoding (RFC3629).
#ifndef _UTF8_H_
#define _UTF8_H_
#include <stddef.h>
#include <string>
-#define UTF8_IGNORE_ERROR 0x01
-#define UTF8_SKIP_BOM 0x02
+#define UTF8_IGNORE_ERROR 0x01
+#define UTF8_SKIP_BOM 0x02
-/* Convert a string between UTF8 and UCS-2/4 (depending on size of wchar_t). Returns true if successful, storing the result of the conversion in *result */
+/// Convert a string between UTF8 and UCS-2/4 (depending on size of wchar_t). Returns true if
+/// successful, storing the result of the conversion in *result*.
bool wchar_to_utf8_string(const std::wstring &input, std::string *result);
-/* Convert a string between UTF8 and UCS-2/4 (depending on size of wchar_t). Returns nonzero if successful, storing the result of the conversion in *out */
+/// Convert a string between UTF8 and UCS-2/4 (depending on size of wchar_t). Returns nonzero if
+/// successful, storing the result of the conversion in *out*.
size_t utf8_to_wchar(const char *in, size_t insize, std::wstring *out, int flags);
size_t wchar_to_utf8(const wchar_t *in, size_t insize, char *out, size_t outsize, int flags);