fix utfconv.h duplicate functions
This commit is contained in:
+8
-2
@@ -1,6 +1,12 @@
|
|||||||
#ifndef MBSEC_H
|
#ifndef MBSEC_H
|
||||||
#define MBSEC_H
|
#define MBSEC_H
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#define UNUSED __attribute__((__unused__))
|
||||||
|
#else
|
||||||
|
#define UNUSED
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@@ -8,7 +14,7 @@
|
|||||||
|
|
||||||
#define UTFCONV_ERROR_INVALID_CONVERSION "Input contains invalid byte sequences."
|
#define UTFCONV_ERROR_INVALID_CONVERSION "Input contains invalid byte sequences."
|
||||||
|
|
||||||
LPWSTR utfconv_utf8towc(const char *str) {
|
static UNUSED LPWSTR utfconv_utf8towc(const char *str) {
|
||||||
LPWSTR output;
|
LPWSTR output;
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
@@ -30,7 +36,7 @@ LPWSTR utfconv_utf8towc(const char *str) {
|
|||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *utfconv_wctoutf8(LPCWSTR str) {
|
static UNUSED char *utfconv_wctoutf8(LPCWSTR str) {
|
||||||
char *output;
|
char *output;
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user