Author: akhaldi
Date: Sat Jul 2 13:46:41 2016
New Revision: 71746
URL:
http://svn.reactos.org/svn/reactos?rev=71746&view=rev
Log:
[UNICODE] Sync with Wine Staging 1.9.11. CORE-11368
Modified:
trunk/reactos/media/doc/README.WINE
trunk/reactos/sdk/tools/unicode/fold.c
trunk/reactos/sdk/tools/unicode/mbtowc.c
trunk/reactos/sdk/tools/unicode/string.c
Modified: trunk/reactos/media/doc/README.WINE
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
==============================================================================
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sat Jul 2 13:46:41 2016
@@ -15,7 +15,7 @@
The following build tools are shared with Wine.
-reactos/tools/unicode # Synced to WineStaging-1.9.4
+reactos/tools/unicode # Synced to WineStaging-1.9.11
reactos/tools/widl # Synced to WineStaging-1.7.55
reactos/tools/wpp # Synced to WineStaging-1.9.4
Modified: trunk/reactos/sdk/tools/unicode/fold.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/tools/unicode/fold.c?r…
==============================================================================
--- trunk/reactos/sdk/tools/unicode/fold.c [iso-8859-1] (original)
+++ trunk/reactos/sdk/tools/unicode/fold.c [iso-8859-1] Sat Jul 2 13:46:41 2016
@@ -22,13 +22,13 @@
static inline WCHAR to_unicode_digit( WCHAR ch )
{
- extern const WCHAR wine_digitmap[];
+ extern const WCHAR wine_digitmap[] DECLSPEC_HIDDEN;
return ch + wine_digitmap[wine_digitmap[ch >> 8] + (ch & 0xff)];
}
static inline WCHAR to_unicode_native( WCHAR ch )
{
- extern const WCHAR wine_compatmap[];
+ extern const WCHAR wine_compatmap[] DECLSPEC_HIDDEN;
return ch + wine_compatmap[wine_compatmap[ch >> 8] + (ch & 0xff)];
}
Modified: trunk/reactos/sdk/tools/unicode/mbtowc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/tools/unicode/mbtowc.c…
==============================================================================
--- trunk/reactos/sdk/tools/unicode/mbtowc.c [iso-8859-1] (original)
+++ trunk/reactos/sdk/tools/unicode/mbtowc.c [iso-8859-1] Sat Jul 2 13:46:41 2016
@@ -131,7 +131,7 @@
for (len = 0; srclen; srclen--, src++, len++)
{
- if (cp2uni_lb[*src] && srclen > 1)
+ if (cp2uni_lb[*src] && srclen > 1 && src[1])
{
src++;
srclen--;
@@ -183,7 +183,7 @@
for (len = dstlen; srclen && len; len--, srclen--, src++, dst++)
{
unsigned char off = cp2uni_lb[*src];
- if (off && srclen > 1)
+ if (off && srclen > 1 && src[1])
{
src++;
srclen--;
@@ -212,7 +212,7 @@
for (len = 0; srclen; srclen--, src++)
{
unsigned char off = cp2uni_lb[*src];
- if (off && srclen > 1)
+ if (off && srclen > 1 && src[1])
{
src++;
srclen--;
@@ -227,7 +227,7 @@
for (len = dstlen; srclen && len; srclen--, src++)
{
unsigned char off = cp2uni_lb[*src];
- if (off && srclen > 1)
+ if (off && srclen > 1 && src[1])
{
src++;
srclen--;
Modified: trunk/reactos/sdk/tools/unicode/string.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/tools/unicode/string.c…
==============================================================================
--- trunk/reactos/sdk/tools/unicode/string.c [iso-8859-1] (original)
+++ trunk/reactos/sdk/tools/unicode/string.c [iso-8859-1] Sat Jul 2 13:46:41 2016
@@ -19,6 +19,7 @@
*/
#include <assert.h>
+#include <errno.h>
#include <limits.h>
#include <stdio.h>
@@ -164,6 +165,7 @@
if (overflow)
{
+ errno = ERANGE;
return negative ? LONG_MIN : LONG_MAX;
}
@@ -276,6 +278,7 @@
if (overflow)
{
+ errno = ERANGE;
return ULONG_MAX;
}