summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuo Jinghua <sunmoon1997@gmail.com>2010-01-07 20:20:15 +0800
committerLuo Jinghua <sunmoon1997@gmail.com>2010-01-07 20:20:15 +0800
commit8d39a1faa0e387829a30e1f56af6eb6437cdcb4d (patch)
tree9b9faba5222cb11105c83e81f9b842d234c77e61
parent4015027e7161ad18bdce75541b3ba5e5b3a6543f (diff)
mbcs: set flush flags for encoders
-rw-r--r--multibytecodec.c2
-rw-r--r--multibytecodec.h19
2 files changed, 7 insertions, 14 deletions
diff --git a/multibytecodec.c b/multibytecodec.c
index 0bf8aa9..85d2e7f 100644
--- a/multibytecodec.c
+++ b/multibytecodec.c
@@ -158,7 +158,7 @@ mbcs_encode(MultibyteCodecState *state,
state->codec->config,
inbuf, inlen,
(unsigned char **)outbuf, outlen,
- ERROR_STRICT);
+ MBENC_FLUSH);
}
void
diff --git a/multibytecodec.h b/multibytecodec.h
index 5452bab..1fc4000 100644
--- a/multibytecodec.h
+++ b/multibytecodec.h
@@ -6,23 +6,15 @@
#ifndef _MULTIBYTECODEC_H_
#define _MULTIBYTECODEC_H_
-#ifdef __cplusplus
-extern "C" {
-#endif
-#include <stddef.h>
+#include <uniconvint.h>
-#ifdef uint32_t
- typedef uint32_t ucs4_t;
-#else
- typedef unsigned int ucs4_t;
+#ifdef __cplusplus
+extern "C" {
#endif
-#ifdef uint16_t
- typedef uint16_t ucs2_t, DBCHAR;
-#else
- typedef unsigned short ucs2_t, DBCHAR;
-#endif
+ typedef uc_char_t ucs4_t;
+ typedef uc_uint16_t ucs2_t, DBCHAR;
typedef union {
void *p;
@@ -116,4 +108,5 @@ mbcs_encode(MultibyteCodecState *state,
#ifdef __cplusplus
}
#endif
+
#endif