mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
Removed patches for UTF7 support (accepted upstream).
This commit is contained in:
parent
e2cd273303
commit
d329354032
@ -183,7 +183,7 @@ Included bug fixes and improvements
|
||||
* Support for SLGetWindowsInformationDWORD ([Wine Bug #36709](https://bugs.winehq.org/show_bug.cgi?id=36709))
|
||||
* Support for TOOLTIPS_GetTipText edge cases ([Wine Bug #30648](https://bugs.winehq.org/show_bug.cgi?id=30648))
|
||||
* Support for TransmitFile ([Wine Bug #5048](https://bugs.winehq.org/show_bug.cgi?id=5048))
|
||||
* Support for UTF7 encoding/decoding ([Wine Bug #27388](https://bugs.winehq.org/show_bug.cgi?id=27388))
|
||||
* ~~Support for UTF7 encoding/decoding~~ ([Wine Bug #27388](https://bugs.winehq.org/show_bug.cgi?id=27388))
|
||||
* Support for WTSEnumerateProcessesW ([Wine Bug #29903](https://bugs.winehq.org/show_bug.cgi?id=29903))
|
||||
* Support for extra large and jumbo icon lists in shell32 ([Wine Bug #24721](https://bugs.winehq.org/show_bug.cgi?id=24721))
|
||||
* Support for inherited file ACLs ([Wine Bug #34406](https://bugs.winehq.org/show_bug.cgi?id=34406))
|
||||
|
1
debian/changelog
vendored
1
debian/changelog
vendored
@ -1,5 +1,6 @@
|
||||
wine-staging (1.7.37) UNRELEASED; urgency=low
|
||||
* Fix a TRACE line in the iphlpapi-TCP_Table patchset.
|
||||
* Removed patches for UTF7 support (accepted upstream).
|
||||
-- Sebastian Lackner <sebastian@fds-team.de> Sun, 08 Feb 2015 20:29:38 +0100
|
||||
|
||||
wine-staging (1.7.36) unstable; urgency=low
|
||||
|
@ -1,185 +0,0 @@
|
||||
From a8bf53baa972197e228ea01701d5992a11151824 Mon Sep 17 00:00:00 2001
|
||||
From: Alex Henrie <alexhenrie24@gmail.com>
|
||||
Date: Fri, 17 Oct 2014 12:54:02 -0600
|
||||
Subject: kernel32: Support UTF-7 in MultiByteToWideChar. (try 3)
|
||||
|
||||
Portions of utf7_mbstowcs were written by Sebastian Lackner
|
||||
<sebastian@fds-team.de>
|
||||
---
|
||||
dlls/kernel32/locale.c | 153 ++++++++++++++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 150 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/locale.c b/dlls/kernel32/locale.c
|
||||
index 730574b..0123124 100644
|
||||
--- a/dlls/kernel32/locale.c
|
||||
+++ b/dlls/kernel32/locale.c
|
||||
@@ -1954,6 +1954,154 @@ BOOL WINAPI EnumSystemCodePagesW( CODEPAGE_ENUMPROCW lpfnCodePageEnum, DWORD fla
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
+ * utf7_write_w
|
||||
+ *
|
||||
+ * Helper for utf7_mbstowcs
|
||||
+ *
|
||||
+ * RETURNS
|
||||
+ * TRUE on success, FALSE on error
|
||||
+ */
|
||||
+static inline BOOL utf7_write_w(WCHAR *dst, int dstlen, int *index, WCHAR character)
|
||||
+{
|
||||
+ if (dstlen > 0)
|
||||
+ {
|
||||
+ if (*index >= dstlen)
|
||||
+ return FALSE;
|
||||
+
|
||||
+ dst[*index] = character;
|
||||
+ }
|
||||
+
|
||||
+ (*index)++;
|
||||
+
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
+/***********************************************************************
|
||||
+ * utf7_mbstowcs
|
||||
+ *
|
||||
+ * UTF-7 to UTF-16 string conversion, helper for MultiByteToWideChar
|
||||
+ *
|
||||
+ * RETURNS
|
||||
+ * On success, the number of characters written
|
||||
+ * On dst buffer overflow, -1
|
||||
+ */
|
||||
+static int utf7_mbstowcs(const char *src, int srclen, WCHAR *dst, int dstlen)
|
||||
+{
|
||||
+ static const signed char base64_decoding_table[] = {
|
||||
+ /* \0 \x01 \x02 \x03 \x04 \x05 \x06 \a */
|
||||
+ -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
+ /* \b \t \n \v \f \r \x0E \x0F */
|
||||
+ -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
+ /* \x10 \x11 \x12 \x13 \x14 \x15 \x16 \x17 */
|
||||
+ -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
+ /* \x18 \x19 \x1A \e \x1C \x1D \x1E \x1F */
|
||||
+ -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
+ /* ! " # $ % & ' */
|
||||
+ -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
+ /* ( ) * + , - . / */
|
||||
+ -1, -1, -1, 62, -1, -1, -1, 63,
|
||||
+ /* 0 1 2 3 4 5 6 7 */
|
||||
+ 52, 53, 54, 55, 56, 57, 58, 59,
|
||||
+ /* 8 9 : ; < = > ? */
|
||||
+ 60, 61, -1, -1, -1, -1, -1, -1,
|
||||
+ /* @ A B C D E F G */
|
||||
+ -1, 0, 1, 2, 3, 4, 5, 6,
|
||||
+ /* H I J K L M N O */
|
||||
+ 7, 8, 9, 10, 11, 12, 13, 14,
|
||||
+ /* P Q R S T U V W */
|
||||
+ 15, 16, 17, 18, 19, 20, 21, 22,
|
||||
+ /* X Y Z [ \ ] ^ _ */
|
||||
+ 23, 24, 25, -1, -1, -1, -1, -1,
|
||||
+ /* ` a b c d e f g */
|
||||
+ -1, 26, 27, 28, 29, 30, 31, 32,
|
||||
+ /* h i j k l m n o */
|
||||
+ 33, 34, 35, 36, 37, 38, 39, 40,
|
||||
+ /* p q r s t u v w */
|
||||
+ 41, 42, 43, 44, 45, 46, 47, 48,
|
||||
+ /* x y z { | } ~ \x7F */
|
||||
+ 49, 50, 51, -1, -1, -1, -1, -1
|
||||
+ };
|
||||
+
|
||||
+ const char *source_end = src + srclen;
|
||||
+ int dest_index = 0;
|
||||
+
|
||||
+ DWORD byte_pair = 0;
|
||||
+ short offset = 0;
|
||||
+
|
||||
+ while (src < source_end)
|
||||
+ {
|
||||
+ if (*src == '+')
|
||||
+ {
|
||||
+ src++;
|
||||
+ if (src >= source_end)
|
||||
+ break;
|
||||
+
|
||||
+ if (*src == '-')
|
||||
+ {
|
||||
+ /* just a plus sign escaped as +- */
|
||||
+ if (!utf7_write_w(dst, dstlen, &dest_index, '+'))
|
||||
+ return -1;
|
||||
+ src++;
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ do
|
||||
+ {
|
||||
+ signed char sextet = *src;
|
||||
+ if (sextet == '-')
|
||||
+ {
|
||||
+ /* skip over the dash and end base64 decoding */
|
||||
+ /* the current, unfinished byte pair is discarded */
|
||||
+ src++;
|
||||
+ offset = 0;
|
||||
+ break;
|
||||
+ }
|
||||
+ if (sextet < 0)
|
||||
+ {
|
||||
+ /* the next character of src is < 0 and therefore not part of a base64 sequence */
|
||||
+ /* the current, unfinished byte pair is NOT discarded in this case */
|
||||
+ /* this is probably a bug in Windows */
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ sextet = base64_decoding_table[sextet];
|
||||
+ if (sextet == -1)
|
||||
+ {
|
||||
+ /* -1 means that the next character of src is not part of a base64 sequence */
|
||||
+ /* in other words, all sextets in this base64 sequence have been processed */
|
||||
+ /* the current, unfinished byte pair is discarded */
|
||||
+ offset = 0;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ byte_pair = (byte_pair << 6) | sextet;
|
||||
+ offset += 6;
|
||||
+
|
||||
+ if (offset >= 16)
|
||||
+ {
|
||||
+ /* this byte pair is done */
|
||||
+ if (!utf7_write_w(dst, dstlen, &dest_index, (byte_pair >> (offset - 16)) & 0xFFFF))
|
||||
+ return -1;
|
||||
+ offset -= 16;
|
||||
+ }
|
||||
+
|
||||
+ src++;
|
||||
+ }
|
||||
+ while (src < source_end);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ /* we have to convert to unsigned char in case *src < 0 */
|
||||
+ if (!utf7_write_w(dst, dstlen, &dest_index, (unsigned char)*src))
|
||||
+ return -1;
|
||||
+ src++;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return dest_index;
|
||||
+}
|
||||
+
|
||||
+/***********************************************************************
|
||||
* MultiByteToWideChar (KERNEL32.@)
|
||||
*
|
||||
* Convert a multibyte character string into a Unicode string.
|
||||
@@ -2006,9 +2154,8 @@ INT WINAPI MultiByteToWideChar( UINT page, DWORD flags, LPCSTR src, INT srclen,
|
||||
SetLastError( ERROR_INVALID_FLAGS );
|
||||
return 0;
|
||||
}
|
||||
- FIXME("UTF-7 not supported\n");
|
||||
- SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
|
||||
- return 0;
|
||||
+ ret = utf7_mbstowcs( src, srclen, dst, dstlen );
|
||||
+ break;
|
||||
case CP_UNIXCP:
|
||||
if (unix_cptable)
|
||||
{
|
||||
--
|
||||
2.1.2
|
||||
|
@ -1,180 +0,0 @@
|
||||
From 02cb021277295aa3a2166e2497a686d2ebb32126 Mon Sep 17 00:00:00 2001
|
||||
From: Alex Henrie <alexhenrie24@gmail.com>
|
||||
Date: Fri, 17 Oct 2014 15:40:51 -0600
|
||||
Subject: kernel32: Support UTF-7 in WideCharToMultiByte. (try 3)
|
||||
|
||||
Portions of utf7_wcstombs were written by Sebastian Lackner
|
||||
<sebastian@fds-team.de>
|
||||
---
|
||||
dlls/kernel32/locale.c | 148 ++++++++++++++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 145 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/locale.c b/dlls/kernel32/locale.c
|
||||
index 0123124..6c2b6e7 100644
|
||||
--- a/dlls/kernel32/locale.c
|
||||
+++ b/dlls/kernel32/locale.c
|
||||
@@ -2195,6 +2195,149 @@ INT WINAPI MultiByteToWideChar( UINT page, DWORD flags, LPCSTR src, INT srclen,
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
+ * utf7_can_directly_encode
|
||||
+ *
|
||||
+ * Helper for utf7_wcstombs
|
||||
+ */
|
||||
+static inline BOOL utf7_can_directly_encode(WCHAR codepoint)
|
||||
+{
|
||||
+ static const BOOL directly_encodable_table[] = {
|
||||
+ /* \0 \x01 \x02 \x03 \x04 \x05 \x06 \a */
|
||||
+ TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
|
||||
+ /* \b \t \n \v \f \r \x0E \x0F */
|
||||
+ FALSE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE,
|
||||
+ /* \x10 \x11 \x12 \x13 \x14 \x15 \x16 \x17 */
|
||||
+ FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
|
||||
+ /* \x18 \x19 \x1A \e \x1C \x1D \x1E \x1F */
|
||||
+ FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
|
||||
+ /* ! " # $ % & ' */
|
||||
+ TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE,
|
||||
+ /* ( ) * + , - . / */
|
||||
+ TRUE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE,
|
||||
+ /* 0 1 2 3 4 5 6 7 */
|
||||
+ TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,
|
||||
+ /* 8 9 : ; < = > ? */
|
||||
+ TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, TRUE,
|
||||
+ /* @ A B C D E F G */
|
||||
+ FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,
|
||||
+ /* H I J K L M N O */
|
||||
+ TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,
|
||||
+ /* P Q R S T U V W */
|
||||
+ TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,
|
||||
+ /* X Y Z [ \ ] ^ _ */
|
||||
+ TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE,
|
||||
+ /* ` a b c d e f g */
|
||||
+ FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,
|
||||
+ /* h i j k l m n o */
|
||||
+ TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,
|
||||
+ /* p q r s t u v w */
|
||||
+ TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,
|
||||
+ /* x y z */
|
||||
+ TRUE, TRUE, TRUE
|
||||
+ };
|
||||
+
|
||||
+ return codepoint <= 'z' ? directly_encodable_table[codepoint] : FALSE;
|
||||
+}
|
||||
+
|
||||
+/***********************************************************************
|
||||
+ * utf7_write_c
|
||||
+ *
|
||||
+ * Helper for utf7_wcstombs
|
||||
+ *
|
||||
+ * RETURNS
|
||||
+ * TRUE on success, FALSE on error
|
||||
+ */
|
||||
+static inline BOOL utf7_write_c(char *dst, int dstlen, int *index, char character)
|
||||
+{
|
||||
+ if (dstlen > 0)
|
||||
+ {
|
||||
+ if (*index >= dstlen)
|
||||
+ return FALSE;
|
||||
+
|
||||
+ dst[*index] = character;
|
||||
+ }
|
||||
+
|
||||
+ (*index)++;
|
||||
+
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
+/***********************************************************************
|
||||
+ * utf7_wcstombs
|
||||
+ *
|
||||
+ * UTF-16 to UTF-7 string conversion, helper for WideCharToMultiByte
|
||||
+ *
|
||||
+ * RETURNS
|
||||
+ * On success, the number of characters written
|
||||
+ * On dst buffer overflow, -1
|
||||
+ */
|
||||
+static int utf7_wcstombs(const WCHAR *src, int srclen, char *dst, int dstlen)
|
||||
+{
|
||||
+ static const char base64_encoding_table[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
||||
+
|
||||
+ const WCHAR *source_end = src + srclen;
|
||||
+ int dest_index = 0;
|
||||
+
|
||||
+ while (src < source_end)
|
||||
+ {
|
||||
+ if (*src == '+')
|
||||
+ {
|
||||
+ if (!utf7_write_c(dst, dstlen, &dest_index, '+'))
|
||||
+ return -1;
|
||||
+ if (!utf7_write_c(dst, dstlen, &dest_index, '-'))
|
||||
+ return -1;
|
||||
+ src++;
|
||||
+ }
|
||||
+ else if (utf7_can_directly_encode(*src))
|
||||
+ {
|
||||
+ if (!utf7_write_c(dst, dstlen, &dest_index, *src))
|
||||
+ return -1;
|
||||
+ src++;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ unsigned int offset = 0;
|
||||
+ DWORD byte_pair = 0;
|
||||
+
|
||||
+ if (!utf7_write_c(dst, dstlen, &dest_index, '+'))
|
||||
+ return -1;
|
||||
+
|
||||
+ do
|
||||
+ {
|
||||
+ byte_pair = (byte_pair << 16) | *src;
|
||||
+ offset += 16;
|
||||
+ while (offset >= 6)
|
||||
+ {
|
||||
+ if (!utf7_write_c(dst, dstlen, &dest_index, base64_encoding_table[(byte_pair >> (offset - 6)) & 0x3F]))
|
||||
+ return -1;
|
||||
+ offset -= 6;
|
||||
+ }
|
||||
+ src++;
|
||||
+ }
|
||||
+ while (src < source_end && !utf7_can_directly_encode(*src));
|
||||
+
|
||||
+ if (offset)
|
||||
+ {
|
||||
+ /* Windows won't create a padded base64 character if there's not room for the - sign too */
|
||||
+ /* this is probably a bug in Windows */
|
||||
+ if (dstlen > 0 && dest_index + 1 >= dstlen)
|
||||
+ return -1;
|
||||
+
|
||||
+ byte_pair <<= (6 - offset);
|
||||
+ if (!utf7_write_c(dst, dstlen, &dest_index, base64_encoding_table[byte_pair & 0x3F]))
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ /* Windows always explicitly terminates the base64 sequence even though RFC 2152 (page 3, rule 2) does not require this */
|
||||
+ if (!utf7_write_c(dst, dstlen, &dest_index, '-'))
|
||||
+ return -1;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return dest_index;
|
||||
+}
|
||||
+
|
||||
+/***********************************************************************
|
||||
* WideCharToMultiByte (KERNEL32.@)
|
||||
*
|
||||
* Convert a Unicode character string into a multibyte string.
|
||||
@@ -2261,9 +2404,8 @@ INT WINAPI WideCharToMultiByte( UINT page, DWORD flags, LPCWSTR src, INT srclen,
|
||||
SetLastError( ERROR_INVALID_FLAGS );
|
||||
return 0;
|
||||
}
|
||||
- FIXME("UTF-7 not supported\n");
|
||||
- SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
|
||||
- return 0;
|
||||
+ ret = utf7_wcstombs( src, srclen, dst, dstlen );
|
||||
+ break;
|
||||
case CP_UNIXCP:
|
||||
if (unix_cptable)
|
||||
{
|
||||
--
|
||||
2.1.2
|
||||
|
@ -1 +0,0 @@
|
||||
Fixes: [27388] Support for UTF7 encoding/decoding
|
@ -105,7 +105,6 @@ patch_enable_all ()
|
||||
enable_kernel32_Named_Pipe="$1"
|
||||
enable_kernel32_NeedCurrentDirectoryForExePath="$1"
|
||||
enable_kernel32_Profile="$1"
|
||||
enable_kernel32_UTF7_Support="$1"
|
||||
enable_kernel32_VerifyVersionInfo="$1"
|
||||
enable_libs_Unicode_Collation="$1"
|
||||
enable_makedep_PARENTSPEC="$1"
|
||||
@ -343,9 +342,6 @@ patch_enable ()
|
||||
kernel32-Profile)
|
||||
enable_kernel32_Profile="$2"
|
||||
;;
|
||||
kernel32-UTF7_Support)
|
||||
enable_kernel32_UTF7_Support="$2"
|
||||
;;
|
||||
kernel32-VerifyVersionInfo)
|
||||
enable_kernel32_VerifyVersionInfo="$2"
|
||||
;;
|
||||
@ -1802,23 +1798,6 @@ if test "$enable_kernel32_Profile" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset kernel32-UTF7_Support
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#27388] Support for UTF7 encoding/decoding
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/kernel32/locale.c
|
||||
# |
|
||||
if test "$enable_kernel32_UTF7_Support" -eq 1; then
|
||||
patch_apply kernel32-UTF7_Support/0001-kernel32-Support-UTF-7-in-MultiByteToWideChar.patch
|
||||
patch_apply kernel32-UTF7_Support/0002-kernel32-Support-UTF-7-in-WideCharToMultiByte.patch
|
||||
(
|
||||
echo '+ { "Alex Henrie", "kernel32: Support UTF-7 in MultiByteToWideChar.", 3 },';
|
||||
echo '+ { "Alex Henrie", "kernel32: Support UTF-7 in WideCharToMultiByte.", 3 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset kernel32-VerifyVersionInfo
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
|
@ -8988,7 +8988,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
|
||||
--- a/dlls/wined3d/shader.c
|
||||
+++ b/dlls/wined3d/shader.c
|
||||
@@ -1758,7 +1758,11 @@
|
||||
@@ -1761,7 +1761,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
@ -9000,7 +9000,7 @@ diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
|
||||
{
|
||||
HeapFree(GetProcessHeap(), 0, shader->signature_strings);
|
||||
shader->device->shader_backend->shader_destroy(shader);
|
||||
@@ -2013,10 +2017,16 @@
|
||||
@@ -2016,10 +2020,16 @@
|
||||
|
||||
if (!refcount)
|
||||
{
|
||||
@ -9017,7 +9017,7 @@ diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
|
||||
}
|
||||
|
||||
return refcount;
|
||||
@@ -2241,7 +2251,11 @@
|
||||
@@ -2244,7 +2254,11 @@
|
||||
memset(args, 0, sizeof(*args)); /* FIXME: Make sure all bits are set. */
|
||||
if (!gl_info->supported[ARB_FRAMEBUFFER_SRGB] && state->render_states[WINED3D_RS_SRGBWRITEENABLE])
|
||||
{
|
||||
@ -9521,7 +9521,7 @@ diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
|
||||
--- a/dlls/wined3d/directx.c
|
||||
+++ b/dlls/wined3d/directx.c
|
||||
@@ -5345,9 +5345,15 @@
|
||||
@@ -5347,9 +5347,15 @@
|
||||
DebugBreak();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user