summaryrefslogtreecommitdiff
path: root/iconvdata/gb2312.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-04-26 10:28:28 +0000
committerUlrich Drepper <drepper@redhat.com>1998-04-26 10:28:28 +0000
commitbc900b1118e1fc7b065b37e4d28aa7c998ce5a66 (patch)
treea357833b862e355303d57f645f5e2d52f3e775c3 /iconvdata/gb2312.h
parent918b9d72a9980efd4622bd25506da9531a952dbe (diff)
Update.
1998-04-26 Ulrich Drepper <drepper@cygnus.com> * iconvdata/gconv-modules: Add entry for ISO-2022-JP and ISO-2022-JP-2.
Diffstat (limited to 'iconvdata/gb2312.h')
-rw-r--r--iconvdata/gb2312.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/iconvdata/gb2312.h b/iconvdata/gb2312.h
index 3de274e06b..cde9375e84 100644
--- a/iconvdata/gb2312.h
+++ b/iconvdata/gb2312.h
@@ -23,6 +23,7 @@
#include <gconv.h>
#include <stdint.h>
+#include <assert.h>
/* Conversion table. */
extern const uint16_t __gb2312_to_ucs[];
@@ -66,7 +67,7 @@ extern const char __gb2312_from_ucs4_tab8[][2];
extern const char __gb2312_from_ucs4_tab9[][2];
static inline size_t
-ucs4_to_gb2312 (uint32_t wch, unsigned char **s, size_t avail)
+ucs4_to_gb2312 (uint32_t wch, unsigned char *s, size_t avail)
{
unsigned int ch = (unsigned int) wch;
char buf[2];
@@ -220,8 +221,8 @@ ucs4_to_gb2312 (uint32_t wch, unsigned char **s, size_t avail)
if (avail < 2)
return 0;
- *(*s)++ = cp[0];
- *(*s)++ = cp[1];
+ s[0] = cp[0];
+ s[1] = cp[1];
return 2;
}