Revision: 337
http://svn.sourceforge.net/pmplib/?rev=337&view=rev
Author: nyaochi
Date: 2007-02-11 09:14:18 -0800 (Sun, 11 Feb 2007)
Log Message:
-----------
Implement necessary dummy functions in libucs2 for Win32 and POSIX.
Modified Paths:
--------------
trunk/pmplib/lib/ucs2/ucs2char_iconv.c
trunk/pmplib/lib/ucs2/ucs2char_win32.c
Modified: trunk/pmplib/lib/ucs2/ucs2char_iconv.c
===================================================================
--- trunk/pmplib/lib/ucs2/ucs2char_iconv.c 2007-02-11 16:59:22 UTC (rev 336)
+++ trunk/pmplib/lib/ucs2/ucs2char_iconv.c 2007-02-11 17:14:18 UTC (rev 337)
@@ -152,6 +152,16 @@
return g_encoding;
}
+void ucs2setcp(int cp)
+{
+}
+
+int ucs2getcp()
+{
+ return 0;
+}
+
+
int ucs2toi(const ucs2char_t* str)
{
int ret;
Modified: trunk/pmplib/lib/ucs2/ucs2char_win32.c
===================================================================
--- trunk/pmplib/lib/ucs2/ucs2char_win32.c 2007-02-11 16:59:22 UTC (rev 336)
+++ trunk/pmplib/lib/ucs2/ucs2char_win32.c 2007-02-11 17:14:18 UTC (rev 337)
@@ -42,14 +42,30 @@
static UINT g_codepage = CP_ACP;
static const char *g_encoding = "";
+int ucs2init()
+{
+ return 0;
+}
+int ucs2setenc(const char *encoding)
+{
+ memset(g_encoding, 0, sizeof(g_encoding));
+ strncpy(g_encoding, encoding, sizeof(g_encoding));
+ return 0;
+}
+
+const char *ucs2getenc()
+{
+ return g_encoding;
+}
+
void ucs2setcp(int cp)
{
g_codepage = (UINT)cp;
}
-UCS2API const char *ucs2getenc()
+int ucs2getcp()
{
- return g_encoding;
+ return g_codepage;
}
int ucs2toi(const ucs2char_t* str)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|