ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
December 2012
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
12 participants
287 discussions
Start a n
N
ew thread
[jgardou] 57912: [INCLUDE/PSDK] - Add LdrAddRefDll definition
by jgardou@svn.reactos.org
Author: jgardou Date: Fri Dec 14 08:29:55 2012 New Revision: 57912 URL:
http://svn.reactos.org/svn/reactos?rev=57912&view=rev
Log: [INCLUDE/PSDK] - Add LdrAddRefDll definition Modified: trunk/reactos/include/psdk/winternl.h Modified: trunk/reactos/include/psdk/winternl.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winternl.h?re…
============================================================================== --- trunk/reactos/include/psdk/winternl.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/winternl.h [iso-8859-1] Fri Dec 14 08:29:55 2012 @@ -1837,6 +1837,7 @@ NTSTATUS WINAPI LdrGetProcedureAddress(HMODULE, const ANSI_STRING*, ULONG, void**); void WINAPI LdrInitializeThunk(HANDLE,ULONG,ULONG,ULONG); NTSTATUS WINAPI LdrLoadDll(LPCWSTR, DWORD, const UNICODE_STRING*, HMODULE*); +NTSTATUS WINAPI LdrAddRefDll(ULONG, HMODULE); void WINAPI LdrShutdownProcess(void); void WINAPI LdrShutdownThread(void); NTSTATUS WINAPI NtAcceptConnectPort(PHANDLE,ULONG,PLPC_MESSAGE,BOOLEAN,PLPC_SECTION_WRITE,PLPC_SECTION_READ);
12 years
1
0
0
0
[jgardou] 57911: [CRT] - sync _mbbtombc and _mbctombb implementations with wine
by jgardou@svn.reactos.org
Author: jgardou Date: Thu Dec 13 21:36:27 2012 New Revision: 57911 URL:
http://svn.reactos.org/svn/reactos?rev=57911&view=rev
Log: [CRT] - sync _mbbtombc and _mbctombb implementations with wine Modified: trunk/reactos/lib/sdk/crt/mbstring/hanzen.c Modified: trunk/reactos/lib/sdk/crt/mbstring/hanzen.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/mbstring/hanze…
============================================================================== --- trunk/reactos/lib/sdk/crt/mbstring/hanzen.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/mbstring/hanzen.c [iso-8859-1] Thu Dec 13 21:36:27 2012 @@ -9,98 +9,90 @@ * 12/04/99: Created */ -#include <mbctype.h> +#include <precomp.h> +#include <mbstring.h> +#include <locale.h> -static unsigned short han_to_zen_ascii_table[0x5f] = { - 0x8140, 0x8149, 0x8168, 0x8194, 0x8190, 0x8193, 0x8195, 0x8166, - 0x8169, 0x816a, 0x8196, 0x817b, 0x8143, 0x817c, 0x8144, 0x815e, - 0x824f, 0x8250, 0x8251, 0x8252, 0x8253, 0x8254, 0x8255, 0x8256, - 0x8257, 0x8258, 0x8146, 0x8147, 0x8183, 0x8181, 0x8184, 0x8148, - 0x8197, 0x8260, 0x8261, 0x8262, 0x8263, 0x8264, 0x8265, 0x8266, - 0x8267, 0x8268, 0x8269, 0x826a, 0x826b, 0x826c, 0x826d, 0x826e, - 0x826f, 0x8270, 0x8271, 0x8272, 0x8273, 0x8274, 0x8275, 0x8276, - 0x8277, 0x8278, 0x8279, 0x816d, 0x818f, 0x816e, 0x814f, 0x8151, - 0x8165, 0x8281, 0x8282, 0x8283, 0x8284, 0x8285, 0x8286, 0x8287, - 0x8288, 0x8289, 0x828a, 0x828b, 0x828c, 0x828d, 0x828e, 0x828f, - 0x8290, 0x8291, 0x8292, 0x8293, 0x8294, 0x8295, 0x8296, 0x8297, - 0x8298, 0x8299, 0x829a, 0x816f, 0x8162, 0x8170, 0x8150 -}; -static unsigned short han_to_zen_kana_table[0x40] = { - 0x8140, 0x8142, 0x8175, 0x8176, 0x8141, 0x8145, 0x8392, 0x8340, - 0x8342, 0x8344, 0x8346, 0x8348, 0x8383, 0x8385, 0x8387, 0x8362, - 0x815b, 0x8341, 0x8343, 0x8345, 0x8347, 0x8349, 0x834a, 0x834c, - 0x834e, 0x8350, 0x8352, 0x8354, 0x8356, 0x8358, 0x835a, 0x835c, - 0x835e, 0x8360, 0x8363, 0x8365, 0x8367, 0x8369, 0x836a, 0x836b, - 0x836c, 0x836d, 0x836e, 0x8371, 0x8374, 0x8377, 0x837a, 0x837d, - 0x837e, 0x8380, 0x8381, 0x8382, 0x8384, 0x8386, 0x8388, 0x8389, - 0x838a, 0x838b, 0x838c, 0x838d, 0x838f, 0x8393, 0x814a, 0x814b -}; -static unsigned char zen_to_han_kana_table[0x8396-0x8340+1] = { - 0xa7, 0xb1, 0xa8, 0xb2, 0xa9, 0xb3, 0xaa, 0xb4, - 0xab, 0xb5, 0xb6, 0xb6, 0xb7, 0xb7, 0xb8, 0xb8, - 0xb9, 0xb9, 0xba, 0xba, 0xbb, 0xbb, 0xbc, 0xbc, - 0xbd, 0xbd, 0xbe, 0xbe, 0xbf, 0xbf, 0xc0, 0xc0, - 0xc1, 0xc1, 0xaf, 0xc2, 0xc2, 0xc3, 0xc3, 0xc4, - 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xca, - 0xca, 0xcb, 0xcb, 0xcb, 0xcc, 0xcc, 0xcc, 0xcd, - 0xcd, 0xcd, 0xce, 0xce, 0xce, 0xcf, 0xd0, 0, - 0xd1, 0xd2, 0xd3, 0xac, 0xd4, 0xad, 0xd5, 0xae, - 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdc, - 0xb2, 0xb4, 0xa6, 0xdd, 0xb3, 0xb6, 0xb9 -}; -#define ZTOH_SYMBOLS 9 -static unsigned short zen_to_han_symbol_table_1[ZTOH_SYMBOLS] = { - 0x8142, 0x8175, 0x8176, 0x8141, 0x8145, 0x815b, 0x814a, 0x814b -}; -static unsigned char zen_to_han_symbol_table_2[ZTOH_SYMBOLS] = { - 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xb0, 0xde, 0xdf -}; -#define ISKANA(c) ((c) >= 0xa1 && (c) <= 0xdf) -#define JISHIRA(c) ((c) >= 0x829f && (c) <= 0x82f1) -#define JISKANA(c) ((c) >= 0x8340 && (c) <= 0x8396 && (c) != 0x837f) -#define JTOKANA(c) ((c) <= 0x82dd ? (c) + 0xa1 : (c) + 0xa2) +/* Maps cp932 single byte character to multi byte character */ +static const unsigned char mbbtombc_932[] = { + 0x40,0x49,0x68,0x94,0x90,0x93,0x95,0x66,0x69,0x6a,0x96,0x7b,0x43,0x7c,0x44,0x5e, + 0x4f,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x46,0x47,0x83,0x81,0x84,0x48, + 0x97,0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6a,0x6b,0x6c,0x6d,0x6e, + 0x6f,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x6d,0x8f,0x6e,0x4f,0x76, + 0x77,0x78,0x79,0x6d,0x8f,0x6e,0x4f,0x51,0x65,0x81,0x82,0x83,0x84,0x85,0x86,0x87, + 0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,0x95,0x50, + 0x42,0x75,0x76,0x41,0x45,0x92,0x40,0x42,0x44,0x46,0x48,0x83,0x85,0x87,0x62, + 0x5b,0x41,0x43,0x45,0x47,0x49,0x4a,0x4c,0x4e,0x50,0x52,0x54,0x56,0x58,0x5a,0x5c, + 0x5e,0x60,0x63,0x65,0x67,0x69,0x6a,0x6b,0x6c,0x6d,0x6e,0x71,0x74,0x77,0x7a,0x7d, + 0x7e,0x80,0x81,0x82,0x84,0x86,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8f,0x93,0x4a,0x4b }; +/* Maps multibyte cp932 punctuation marks to single byte equivalents */ +static const unsigned char mbctombb_932_punct[] = { + 0x20,0xa4,0xa1,0x2c,0x2e,0xa5,0x3a,0x3b,0x3f,0x21,0xde,0xdf,0x00,0x00,0x00,0x5e, + 0x7e,0x5f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb0,0x00,0x00,0x2f,0x00, + 0x00,0x00,0x7c,0x00,0x00,0x60,0x27,0x00,0x22,0x28,0x29,0x00,0x00,0x5b,0x5d,0x7b, + 0x7d,0x00,0x00,0x00,0x00,0xa2,0xa3,0x00,0x00,0x00,0x00,0x2b,0x2d,0x00,0x00,0x00, + 0x00,0x3d,0x00,0x3c,0x3e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5c, + 0x24,0x00,0x00,0x25,0x23,0x26,0x2a,0x40}; -/* - * @implemented +/* Maps multibyte cp932 hiragana/katakana to single-byte equivalents */ +static const unsigned char mbctombb_932_kana[] = { + 0xa7,0xb1,0xa8,0xb2,0xa9,0xb3,0xaa,0xb4,0xab,0xb5,0xb6,0xb6,0xb7,0xb7,0xb8,0xb8, + 0xb9,0xb9,0xba,0xba,0xbb,0xbb,0xbc,0xbc,0xbd,0xbd,0xbe,0xbe,0xbf,0xbf,0xc0,0xc0, + 0xc1,0xc1,0xaf,0xc2,0xc2,0xc3,0xc3,0xc4,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xca, + 0xca,0xcb,0xcb,0xcb,0xcc,0xcc,0xcc,0xcd,0xcd,0xcd,0xce,0xce,0xce,0xcf,0xd0,0xd1, + 0xd2,0xd3,0xac,0xd4,0xad,0xd5,0xae,0xd6,0xd7,0xd8,0xd9,0xda,0xdb,0xdc,0xdc,0xb2, + 0xb4,0xa6,0xdd,0xb3,0xb6,0xb9}; + +/********************************************************************* + * _mbbtombc(MSVCRT.@) */ -unsigned short _mbbtombc(unsigned short c) +unsigned int __cdecl _mbbtombc(unsigned int c) { - if (c >= 0x20 && c <= 0x7e) { - return han_to_zen_ascii_table[c - 0x20]; - } else if (ISKANA(c)) { - return han_to_zen_kana_table[c - 0xa0]; + if(get_mbcinfo()->mbcodepage == 932) + { + if(c >= 0x20 && c <= 0x7e) { + if((c >= 0x41 && c <= 0x5a) || (c >= 0x61 && c <= 0x7a) || (c >= 0x30 && c <= 0x39)) + return mbbtombc_932[c - 0x20] | 0x8200; + else + return mbbtombc_932[c - 0x20] | 0x8100; + } + else if(c >= 0xa1 && c <= 0xdf) { + if(c >= 0xa6 && c <= 0xdd && c != 0xb0) + return mbbtombc_932[c - 0xa1 + 0x5f] | 0x8300; + else + return mbbtombc_932[c - 0xa1 + 0x5f] | 0x8100; + } } - return c; + return c; /* not Japanese or no MB char */ } + /********************************************************************* + * _mbctombb (MSVCRT.@) + */ +unsigned int CDECL _mbctombb(unsigned int c) +{ + unsigned int value; -/* - * @implemented - */ -unsigned short _mbctombb(unsigned short c) -{ - int i; - unsigned short *p; - - if (JISKANA(c)) { - return zen_to_han_kana_table[c - 0x8340]; - } else if (JISHIRA(c)) { - c = JTOKANA(c); - return zen_to_han_kana_table[c - 0x8340]; - } else if (c <= 0x8396) { - for (i = 0x20, p = han_to_zen_ascii_table; i <= 0x7e; i++, p++) { - if (*p == c) { - return i; - } + if(get_mbcinfo()->mbcodepage == 932) + { + if(c >= 0x829f && c <= 0x82f1) /* Hiragana */ + return mbctombb_932_kana[c - 0x829f]; + if(c >= 0x8340 && c <= 0x8396 && c != 0x837f) /* Katakana */ + return mbctombb_932_kana[c - 0x8340 - (c >= 0x837f ? 1 : 0)]; + if(c >= 0x8140 && c <= 0x8197) /* Punctuation */ + { + value = mbctombb_932_punct[c - 0x8140]; + return value ? value : c; + } + if((c >= 0x824f && c <= 0x8258) || /* Fullwidth digits */ + (c >= 0x8260 && c <= 0x8279)) /* Fullwidth capitals letters */ + return c - 0x821f; + if(c >= 0x8281 && c <= 0x829a) /* Fullwidth small letters */ + return c - 0x8220; + /* all other cases return c */ } - for (i = 0; i < ZTOH_SYMBOLS; i++) { - if (zen_to_han_symbol_table_1[i] == c) { - return zen_to_han_symbol_table_2[i]; - } - } - } - return c; + return c; }
12 years
1
0
0
0
[jgardou] 57910: [CRT] -fix __lc_codepage confusion -fix implementations of _mbsjistojms and _mbsjmstojis
by jgardou@svn.reactos.org
Author: jgardou Date: Thu Dec 13 21:13:06 2012 New Revision: 57910 URL:
http://svn.reactos.org/svn/reactos?rev=57910&view=rev
Log: [CRT] -fix __lc_codepage confusion -fix implementations of _mbsjistojms and _mbsjmstojis Modified: trunk/reactos/dll/win32/msvcrt/msvcrt.spec trunk/reactos/lib/sdk/crt/include/internal/mbstring.h trunk/reactos/lib/sdk/crt/include/internal/wine/msvcrt.h trunk/reactos/lib/sdk/crt/locale/locale.c trunk/reactos/lib/sdk/crt/mbstring/jistojms.c trunk/reactos/lib/sdk/crt/mbstring/jmstojis.c Modified: trunk/reactos/dll/win32/msvcrt/msvcrt.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msvcrt/msvcrt.sp…
============================================================================== --- trunk/reactos/dll/win32/msvcrt/msvcrt.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msvcrt/msvcrt.spec [iso-8859-1] Thu Dec 13 21:13:06 2012 @@ -156,7 +156,7 @@ @ cdecl __isascii(long) @ cdecl __iscsym(long) @ cdecl __iscsymf(long) -@ extern __lc_codepage MSVCRT___lc_codepage +@ extern __lc_codepage # @ stub __lc_collate # not in XP / 7 @ extern __lc_collate_cp MSVCRT___lc_collate_cp @ extern __lc_handle MSVCRT___lc_handle Modified: trunk/reactos/lib/sdk/crt/include/internal/mbstring.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/include/intern…
============================================================================== --- trunk/reactos/lib/sdk/crt/include/internal/mbstring.h [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/include/internal/mbstring.h [iso-8859-1] Thu Dec 13 21:13:06 2012 @@ -39,7 +39,6 @@ #define MAX_LOCALE_LENGTH 256 extern unsigned char _mbctype[257]; -extern unsigned int MSVCRT___lc_codepage; extern char MSVCRT_current_lc_all[MAX_LOCALE_LENGTH]; #if defined (_MSC_VER) Modified: trunk/reactos/lib/sdk/crt/include/internal/wine/msvcrt.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/include/intern…
============================================================================== --- trunk/reactos/lib/sdk/crt/include/internal/wine/msvcrt.h [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/include/internal/wine/msvcrt.h [iso-8859-1] Thu Dec 13 21:13:06 2012 @@ -25,7 +25,7 @@ #include "windef.h" #include "winbase.h" -extern int __lc_codepage; +extern unsigned int __lc_codepage; extern int __lc_collate_cp; extern int __mb_cur_max; extern const unsigned short _ctype [257]; Modified: trunk/reactos/lib/sdk/crt/locale/locale.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/locale/locale.…
============================================================================== --- trunk/reactos/lib/sdk/crt/locale/locale.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/locale/locale.c [iso-8859-1] Thu Dec 13 21:13:06 2012 @@ -31,7 +31,7 @@ #error _pctype should not be defined #endif -unsigned int MSVCRT___lc_codepage = 0; +unsigned int __lc_codepage = 0; int MSVCRT___lc_collate_cp = 0; LCID MSVCRT___lc_handle[LC_MAX - LC_MIN + 1] = { 0 }; int __mb_cur_max = 1; @@ -622,7 +622,7 @@ */ unsigned int CDECL ___lc_codepage_func(void) { - return MSVCRT___lc_codepage; + return __lc_codepage; } /********************************************************************* @@ -1391,7 +1391,7 @@ if(locinfo == MSVCRT_locale->locinfo) { int i; - MSVCRT___lc_codepage = locinfo->lc_codepage; + __lc_codepage = locinfo->lc_codepage; MSVCRT___lc_collate_cp = locinfo->lc_collate_cp; __mb_cur_max = locinfo->mb_cur_max; _pctype = locinfo->pctype; @@ -1488,7 +1488,7 @@ return; global_locale = MSVCRT__create_locale(0, "C"); - MSVCRT___lc_codepage = MSVCRT_locale->locinfo->lc_codepage; + __lc_codepage = MSVCRT_locale->locinfo->lc_codepage; MSVCRT___lc_collate_cp = MSVCRT_locale->locinfo->lc_collate_cp; __mb_cur_max = MSVCRT_locale->locinfo->mb_cur_max; for(i=LC_MIN; i<=LC_MAX; i++) Modified: trunk/reactos/lib/sdk/crt/mbstring/jistojms.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/mbstring/jisto…
============================================================================== --- trunk/reactos/lib/sdk/crt/mbstring/jistojms.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/mbstring/jistojms.c [iso-8859-1] Thu Dec 13 21:13:06 2012 @@ -33,7 +33,7 @@ { /* Conversion takes place only when codepage is 932. In all other cases, c is returned unchanged */ - if(MSVCRT___lc_codepage == 932) + if(get_mbcinfo()->mbcodepage == 932) { if(HIBYTE(c) >= 0x21 && HIBYTE(c) <= 0x7e && LOBYTE(c) >= 0x21 && LOBYTE(c) <= 0x7e) @@ -43,7 +43,7 @@ else c += 0x7d; - if(LOBYTE(c) > 0x7F) + if(LOBYTE(c) >= 0x7F) c += 0x1; c = (((HIBYTE(c) - 0x21)/2 + 0x81) << 8) | LOBYTE(c); Modified: trunk/reactos/lib/sdk/crt/mbstring/jmstojis.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/mbstring/jmsto…
============================================================================== --- trunk/reactos/lib/sdk/crt/mbstring/jmstojis.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/mbstring/jmstojis.c [iso-8859-1] Thu Dec 13 21:13:06 2012 @@ -1,28 +1,34 @@ +#include <precomp.h> #include <mbstring.h> +#include <locale.h> /* * @implemented */ -unsigned int _mbcjmstojis(unsigned int c) +unsigned int __cdecl _mbcjmstojis(unsigned int c) { - int c1, c2; + /* Conversion takes place only when codepage is 932. + In all other cases, c is returned unchanged */ + if(get_mbcinfo()->mbcodepage == 932) + { + if(_ismbclegal(c) && HIBYTE(c) < 0xf0) + { + if(HIBYTE(c) >= 0xe0) + c -= 0x4000; - c2 = (unsigned char)c; - c1 = c >> 8; - if (c1 < 0xf0 && _ismbblead(c1) && _ismbbtrail(c2)) { - if (c1 >= 0xe0) - c1 -= 0x40; - c1 -= 0x70; - c1 <<= 1; - if (c2 < 0x9f) { - c1 --; - c2 -= 0x1f; - if (c2 >= (0x80-0x1f)) - c2 --; - } else { - c2 -= 0x7e; + c = (((HIBYTE(c) - 0x81)*2 + 0x21) << 8) | LOBYTE(c); + + if(LOBYTE(c) > 0x7f) + c -= 0x1; + + if(LOBYTE(c) > 0x9d) + c += 0x83; + else + c -= 0x1f; } - return ((c1 << 8) | c2); + else + return 0; /* Codepage is 932, but c can't be converted */ } - return 0; + + return c; }
12 years
1
0
0
0
[jgardou] 57909: [INCLUDE/CRT] - _CRT_NON_CONFORMING_SWPRINTFS is not relevant for us.
by jgardou@svn.reactos.org
Author: jgardou Date: Thu Dec 13 19:21:30 2012 New Revision: 57909 URL:
http://svn.reactos.org/svn/reactos?rev=57909&view=rev
Log: [INCLUDE/CRT] - _CRT_NON_CONFORMING_SWPRINTFS is not relevant for us. Modified: trunk/reactos/include/crt/stdio.h trunk/reactos/include/crt/wchar.h Modified: trunk/reactos/include/crt/stdio.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/stdio.h?rev=57…
============================================================================== --- trunk/reactos/include/crt/stdio.h [iso-8859-1] (original) +++ trunk/reactos/include/crt/stdio.h [iso-8859-1] Thu Dec 13 19:21:30 2012 @@ -322,12 +322,14 @@ #include <vadefs.h> #endif +#if 0 //this is for MSVCRT80 and higher, which we don't use nor implement #ifdef _CRT_NON_CONFORMING_SWPRINTFS #ifndef __cplusplus #define swprintf _swprintf #define vswprintf _vswprintf #define _swprintf_l __swprintf_l #define _vswprintf_l __vswprintf_l +#endif #endif #endif Modified: trunk/reactos/include/crt/wchar.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/wchar.h?rev=57…
============================================================================== --- trunk/reactos/include/crt/wchar.h [iso-8859-1] (original) +++ trunk/reactos/include/crt/wchar.h [iso-8859-1] Thu Dec 13 19:21:30 2012 @@ -561,12 +561,14 @@ _CRTIMP int __cdecl __swprintf_l(wchar_t *_Dest,const wchar_t *_Format,_locale_t _Plocinfo,...); _CRTIMP int __cdecl __vswprintf_l(wchar_t *_Dest,const wchar_t *_Format,_locale_t _Plocinfo,va_list _Args); +#if 0 //this is for MSVCRT80 and higher, which we don't use nor implement #ifdef _CRT_NON_CONFORMING_SWPRINTFS #ifndef __cplusplus #define swprintf _swprintf #define vswprintf _vswprintf #define _swprintf_l __swprintf_l #define _vswprintf_l __vswprintf_l +#endif #endif #endif
12 years
1
0
0
0
[jgardou] 57908: [ATL] - silence "unused but set" warning
by jgardou@svn.reactos.org
Author: jgardou Date: Thu Dec 13 18:38:46 2012 New Revision: 57908 URL:
http://svn.reactos.org/svn/reactos?rev=57908&view=rev
Log: [ATL] - silence "unused but set" warning Modified: trunk/reactos/lib/atl/atlcore.h Modified: trunk/reactos/lib/atl/atlcore.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/atl/atlcore.h?rev=5790…
============================================================================== --- trunk/reactos/lib/atl/atlcore.h [iso-8859-1] (original) +++ trunk/reactos/lib/atl/atlcore.h [iso-8859-1] Thu Dec 13 18:38:46 2012 @@ -101,7 +101,7 @@ public: CComAutoCriticalSection() { - HRESULT hResult; + HRESULT hResult __MINGW_ATTRIB_UNUSED; hResult = CComCriticalSection::Init(); ATLASSERT(SUCCEEDED(hResult));
12 years
1
0
0
0
[jgardou] 57907: [CRT] - fix isleadbyte - implement mbrlen - avoid race condition when creatong global ANSI locale
by jgardou@svn.reactos.org
Author: jgardou Date: Thu Dec 13 16:32:17 2012 New Revision: 57907 URL:
http://svn.reactos.org/svn/reactos?rev=57907&view=rev
Log: [CRT] - fix isleadbyte - implement mbrlen - avoid race condition when creatong global ANSI locale Modified: trunk/reactos/dll/win32/msvcrt/msvcrt.spec trunk/reactos/lib/sdk/crt/locale/locale.c trunk/reactos/lib/sdk/crt/mbstring/islead.c trunk/reactos/lib/sdk/crt/mbstring/mbclen.c Modified: trunk/reactos/dll/win32/msvcrt/msvcrt.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msvcrt/msvcrt.sp…
============================================================================== --- trunk/reactos/dll/win32/msvcrt/msvcrt.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msvcrt/msvcrt.spec [iso-8859-1] Thu Dec 13 16:32:17 2012 @@ -1266,7 +1266,7 @@ @ cdecl -i386 longjmp(ptr long) @ cdecl malloc(long) @ cdecl mblen(ptr long) -# stub mbrlen +@ cdecl mbrlen(ptr long ptr) # stub mbrtowc # stub mbsdup_dbg # stub mbsrtowcs Modified: trunk/reactos/lib/sdk/crt/locale/locale.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/locale/locale.…
============================================================================== --- trunk/reactos/lib/sdk/crt/locale/locale.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/locale/locale.c [iso-8859-1] Thu Dec 13 16:32:17 2012 @@ -1483,6 +1483,9 @@ unsigned i; LOCK_LOCALE; + /* Someone created it before us */ + if(global_locale) + return; global_locale = MSVCRT__create_locale(0, "C"); MSVCRT___lc_codepage = MSVCRT_locale->locinfo->lc_codepage; Modified: trunk/reactos/lib/sdk/crt/mbstring/islead.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/mbstring/islea…
============================================================================== --- trunk/reactos/lib/sdk/crt/mbstring/islead.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/mbstring/islead.c [iso-8859-1] Thu Dec 13 16:32:17 2012 @@ -6,6 +6,6 @@ */ int isleadbyte(int c) { - return _isctype( c, _MLEAD ); + return _isctype( c, _LEADBYTE ); } Modified: trunk/reactos/lib/sdk/crt/mbstring/mbclen.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/mbstring/mbcle…
============================================================================== --- trunk/reactos/lib/sdk/crt/mbstring/mbclen.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/mbstring/mbclen.c [iso-8859-1] Thu Dec 13 16:32:17 2012 @@ -9,10 +9,8 @@ * */ +#include <precomp.h> #include <mbstring.h> -#include <stdlib.h> - -int isleadbyte(int byte); /* * @implemented @@ -40,3 +38,33 @@ } return 0; } + +size_t __cdecl mbrlen(const char *str, size_t len, mbstate_t *state) +{ + mbstate_t s = (state ? *state : 0); + size_t ret; + + if(!len || !str || !*str) + return 0; + + if(get_locinfo()->mb_cur_max == 1) { + return 1; + }else if(!s && isleadbyte((unsigned char)*str)) { + if(len == 1) { + s = (unsigned char)*str; + ret = -2; + }else { + ret = 2; + } + }else if(!s) { + ret = 1; + }else { + s = 0; + ret = 2; + } + + if(state) + *state = s; + return ret; +} +
12 years
1
0
0
0
[jgardou] 57906: [OLE32_WINETEST] - Addendum to r57905 Both of them already sent upstream
by jgardou@svn.reactos.org
Author: jgardou Date: Thu Dec 13 16:02:04 2012 New Revision: 57906 URL:
http://svn.reactos.org/svn/reactos?rev=57906&view=rev
Log: [OLE32_WINETEST] - Addendum to r57905 Both of them already sent upstream Modified: trunk/rostests/winetests/ole32/propvariant.c Modified: trunk/rostests/winetests/ole32/propvariant.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ole32/propvaria…
============================================================================== --- trunk/rostests/winetests/ole32/propvariant.c [iso-8859-1] (original) +++ trunk/rostests/winetests/ole32/propvariant.c [iso-8859-1] Thu Dec 13 16:02:04 2012 @@ -255,17 +255,17 @@ } PMemoryAllocator; #ifdef __i386__ -#define __thiscall __stdcall +#define __thiscall_wrapper __stdcall #else -#define __thiscall __cdecl +#define __thiscall_wrapper __cdecl #endif -static void * __thiscall PMemoryAllocator_Allocate(PMemoryAllocator *_this, ULONG cbSize) +static void * __thiscall_wrapper PMemoryAllocator_Allocate(PMemoryAllocator *_this, ULONG cbSize) { return CoTaskMemAlloc(cbSize); } -static void __thiscall PMemoryAllocator_Free(PMemoryAllocator *_this, void *pv) +static void __thiscall_wrapper PMemoryAllocator_Free(PMemoryAllocator *_this, void *pv) { CoTaskMemFree(pv); }
12 years
1
0
0
0
[jgardou] 57905: [OLE32] - Fix compilation with newer GCC
by jgardou@svn.reactos.org
Author: jgardou Date: Thu Dec 13 16:00:44 2012 New Revision: 57905 URL:
http://svn.reactos.org/svn/reactos?rev=57905&view=rev
Log: [OLE32] - Fix compilation with newer GCC Modified: trunk/reactos/dll/win32/ole32/stg_prop.c Modified: trunk/reactos/dll/win32/ole32/stg_prop.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/stg_prop.c…
============================================================================== --- trunk/reactos/dll/win32/ole32/stg_prop.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ole32/stg_prop.c [iso-8859-1] Thu Dec 13 16:00:44 2012 @@ -1035,12 +1035,12 @@ } #ifdef __i386__ -#define __thiscall __stdcall +#define __thiscall_wrapper __stdcall #else -#define __thiscall __cdecl +#define __thiscall_wrapper __cdecl #endif -static void* __thiscall Allocate_CoTaskMemAlloc(void *userdata, ULONG size) +static void* __thiscall_wrapper Allocate_CoTaskMemAlloc(void *userdata, ULONG size) { return CoTaskMemAlloc(size); } @@ -1049,7 +1049,7 @@ * end of the buffer. */ static HRESULT PropertyStorage_ReadProperty(PROPVARIANT *prop, const BYTE *data, - UINT codepage, void* (__thiscall *allocate)(void *userdata, ULONG size), void *allocate_data) + UINT codepage, void* (__thiscall_wrapper *allocate)(void *userdata, ULONG size), void *allocate_data) { HRESULT hr = S_OK; @@ -2738,13 +2738,13 @@ "jmp *(4*(" #num "))(%eax)" ) DEFINE_STDCALL_WRAPPER(0,Allocate_PMemoryAllocator,8) -extern void* __thiscall Allocate_PMemoryAllocator(void *this, ULONG cbSize); +extern void* __stdcall Allocate_PMemoryAllocator(void *this, ULONG cbSize); #else -static void* __thiscall Allocate_PMemoryAllocator(void *this, ULONG cbSize) -{ - void* (__thiscall *fn)(void*,ULONG) = **(void***)this; +static void* __cdecl Allocate_PMemoryAllocator(void *this, ULONG cbSize) +{ + void* (__cdecl *fn)(void*,ULONG) = **(void***)this; return fn(this, cbSize); }
12 years
1
0
0
0
[jgardou] 57904: [INCLUDE/PSDK] - winuser.h: properly cast CW_USEDEFAULT to int
by jgardou@svn.reactos.org
Author: jgardou Date: Thu Dec 13 14:10:49 2012 New Revision: 57904 URL:
http://svn.reactos.org/svn/reactos?rev=57904&view=rev
Log: [INCLUDE/PSDK] - winuser.h: properly cast CW_USEDEFAULT to int Modified: trunk/reactos/include/psdk/winuser.h Modified: trunk/reactos/include/psdk/winuser.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winuser.h?rev…
============================================================================== --- trunk/reactos/include/psdk/winuser.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/winuser.h [iso-8859-1] Thu Dec 13 14:10:49 2012 @@ -222,7 +222,7 @@ #define DESKTOP_READOBJECTS 1 #define DESKTOP_SWITCHDESKTOP 256 #define DESKTOP_WRITEOBJECTS 128 -#define CW_USEDEFAULT 0x80000000 +#define CW_USEDEFAULT ((int)0x80000000) #define WS_BORDER 0x800000 #define WS_CAPTION 0xc00000 #define WS_CHILD 0x40000000
12 years
1
0
0
0
[akhaldi] 57903: [CABINET] * Sync with Wine 1.5.19.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Dec 13 13:25:38 2012 New Revision: 57903 URL:
http://svn.reactos.org/svn/reactos?rev=57903&view=rev
Log: [CABINET] * Sync with Wine 1.5.19. Modified: trunk/reactos/dll/win32/cabinet/cabinet_main.c trunk/reactos/dll/win32/cabinet/fdi.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/cabinet/cabinet_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cabinet/cabinet_…
============================================================================== --- trunk/reactos/dll/win32/cabinet/cabinet_main.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/cabinet/cabinet_main.c [iso-8859-1] Thu Dec 13 13:25:38 2012 @@ -365,6 +365,7 @@ if ((end = strrchr(str, '\\'))) { + path = str; end++; name = HeapAlloc( GetProcessHeap(), 0, strlen(end) + 1 ); if (!name) @@ -374,7 +375,6 @@ } strcpy( name, end ); *end = 0; - path = str; } else { Modified: trunk/reactos/dll/win32/cabinet/fdi.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cabinet/fdi.c?re…
============================================================================== --- trunk/reactos/dll/win32/cabinet/fdi.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/cabinet/fdi.c [iso-8859-1] Thu Dec 13 13:25:38 2012 @@ -703,14 +703,14 @@ pfdici->cFiles = num_files; pfdici->setID = setid; pfdici->iCabinet = cabidx; - pfdici->fReserve = (flags & cfheadRESERVE_PRESENT) ? TRUE : FALSE; - pfdici->hasprev = (flags & cfheadPREV_CABINET) ? TRUE : FALSE; - pfdici->hasnext = (flags & cfheadNEXT_CABINET) ? TRUE : FALSE; + pfdici->fReserve = (flags & cfheadRESERVE_PRESENT) != 0; + pfdici->hasprev = (flags & cfheadPREV_CABINET) != 0; + pfdici->hasnext = (flags & cfheadNEXT_CABINET) != 0; return TRUE; } /*********************************************************************** - * FDIIsCabinet (CABINET.21) + * FDIIsCabinet (CABINET.21) * * Informs the caller as to whether or not the provided file handle is * really a cabinet or not, filling out the provided PFDICABINETINFO @@ -725,7 +725,7 @@ * be filled out with information about the cabinet * file indicated by hf if, indeed, it is determined * to be a cabinet. - * + * * RETURNS * TRUE if the file is a cabinet. The info pointed to by pfdici will * be provided. @@ -736,10 +736,7 @@ * INCLUDES * fdi.c */ -BOOL __cdecl FDIIsCabinet( - HFDI hfdi, - INT_PTR hf, - PFDICABINETINFO pfdici) +BOOL __cdecl FDIIsCabinet(HFDI hfdi, INT_PTR hf, PFDICABINETINFO pfdici) { BOOL rv; FDI_Int *fdi = get_fdi_ptr( hfdi ); @@ -749,13 +746,11 @@ if (!fdi) return FALSE; if (!hf) { - ERR("(!hf)!\n"); SetLastError(ERROR_INVALID_HANDLE); return FALSE; } if (!pfdici) { - ERR("(!pfdici)!\n"); SetLastError(ERROR_BAD_ARGUMENTS); return FALSE; } @@ -820,20 +815,20 @@ /* initialize arithmetic coding models */ - QTMfdi_initmodel(&QTM(model7), &QTM(m7sym)[0], 7, 0); - - QTMfdi_initmodel(&QTM(model00), &QTM(m00sym)[0], 0x40, 0x00); - QTMfdi_initmodel(&QTM(model40), &QTM(m40sym)[0], 0x40, 0x40); - QTMfdi_initmodel(&QTM(model80), &QTM(m80sym)[0], 0x40, 0x80); - QTMfdi_initmodel(&QTM(modelC0), &QTM(mC0sym)[0], 0x40, 0xC0); + QTMfdi_initmodel(&QTM(model7), QTM(m7sym), 7, 0); + + QTMfdi_initmodel(&QTM(model00), QTM(m00sym), 0x40, 0x00); + QTMfdi_initmodel(&QTM(model40), QTM(m40sym), 0x40, 0x40); + QTMfdi_initmodel(&QTM(model80), QTM(m80sym), 0x40, 0x80); + QTMfdi_initmodel(&QTM(modelC0), QTM(mC0sym), 0x40, 0xC0); /* model 4 depends on table size, ranges from 20 to 24 */ - QTMfdi_initmodel(&QTM(model4), &QTM(m4sym)[0], (msz < 24) ? msz : 24, 0); + QTMfdi_initmodel(&QTM(model4), QTM(m4sym), (msz < 24) ? msz : 24, 0); /* model 5 depends on table size, ranges from 20 to 36 */ - QTMfdi_initmodel(&QTM(model5), &QTM(m5sym)[0], (msz < 36) ? msz : 36, 0); + QTMfdi_initmodel(&QTM(model5), QTM(m5sym), (msz < 36) ? msz : 36, 0); /* model 6pos depends on table size, ranges from 20 to 42 */ - QTMfdi_initmodel(&QTM(model6pos), &QTM(m6psym)[0], msz, 0); - QTMfdi_initmodel(&QTM(model6len), &QTM(m6lsym)[0], 27, 0); + QTMfdi_initmodel(&QTM(model6pos), QTM(m6psym), msz, 0); + QTMfdi_initmodel(&QTM(model6len), QTM(m6lsym), 27, 0); return DECR_OK; } @@ -2046,7 +2041,7 @@ /* outlen=0 means this block was the last contiguous part of a split block, continued in the next cabinet */ if (outlen == 0) { - int pathlen, filenamelen, idx, i; + int pathlen, filenamelen, i; INT_PTR cabhf; char fullpath[MAX_PATH], userpath[256]; FDINOTIFICATION fdin; @@ -2065,24 +2060,22 @@ if (!((cab->next = CAB(fdi)->alloc(sizeof(fdi_decomp_state))))) return DECR_NOMEMORY; - + ZeroMemory(cab->next, sizeof(fdi_decomp_state)); /* copy pszCabPath to userpath */ ZeroMemory(userpath, 256); - pathlen = (pszCabPath) ? strlen(pszCabPath) : 0; + pathlen = pszCabPath ? strlen(pszCabPath) : 0; if (pathlen) { - if (pathlen < 256) { - for (i = 0; i <= pathlen; i++) - userpath[i] = pszCabPath[i]; - } /* else we are in a weird place... let's leave it blank and see if the user fixes it */ - } + if (pathlen < 256) /* else we are in a weird place... let's leave it blank and see if the user fixes it */ + strcpy(userpath, pszCabPath); + } /* initial fdintNEXT_CABINET notification */ ZeroMemory(&fdin, sizeof(FDINOTIFICATION)); - fdin.psz1 = (cab->mii.nextname) ? cab->mii.nextname : &emptystring; - fdin.psz2 = (cab->mii.nextinfo) ? cab->mii.nextinfo : &emptystring; - fdin.psz3 = &userpath[0]; + fdin.psz1 = cab->mii.nextname ? cab->mii.nextname : &emptystring; + fdin.psz2 = cab->mii.nextinfo ? cab->mii.nextinfo : &emptystring; + fdin.psz3 = userpath; fdin.fdie = FDIERROR_NONE; fdin.pv = pvUser; @@ -2091,7 +2084,7 @@ do { pathlen = strlen(userpath); - filenamelen = (cab->mii.nextname) ? strlen(cab->mii.nextname) : 0; + filenamelen = cab->mii.nextname ? strlen(cab->mii.nextname) : 0; /* slight overestimation here to save CPU cycles in the developer's brain */ if ((pathlen + filenamelen + 3) > MAX_PATH) { @@ -2100,16 +2093,17 @@ } /* paste the path and filename together */ - idx = 0; + fullpath[0] = '\0'; if (pathlen) { - for (i = 0; i < pathlen; i++) fullpath[idx++] = userpath[i]; - if (fullpath[idx - 1] != '\\') fullpath[idx++] = '\\'; + strcpy(fullpath, userpath); + if (fullpath[pathlen - 1] != '\\') + strcat(fullpath, "\\"); } - if (filenamelen) for (i = 0; i < filenamelen; i++) fullpath[idx++] = cab->mii.nextname[i]; - fullpath[idx] = '\0'; - + if (filenamelen) + strcat(fullpath, cab->mii.nextname); + TRACE("full cab path/file name: %s\n", debugstr_a(fullpath)); - + /* try to get a handle to the cabfile */ cabhf = CAB(fdi)->open(fullpath, _O_RDONLY|_O_BINARY, _S_IREAD | _S_IWRITE); if (cabhf == -1) { @@ -2118,14 +2112,14 @@ if (((*pfnfdin)(fdintNEXT_CABINET, &fdin))) return DECR_USERABORT; continue; } - + if (cabhf == 0) { ERR("PFDI_OPEN returned zero for %s.\n", fullpath); fdin.fdie = FDIERROR_CABINET_NOT_FOUND; if (((*pfnfdin)(fdintNEXT_CABINET, &fdin))) return DECR_USERABORT; continue; } - + /* check if it's really a cabfile. Note that this doesn't implement the bug */ if (!FDI_read_entries(CAB(fdi), cabhf, &fdici, &(cab->next->mii))) { WARN("FDIIsCabinet failed.\n"); @@ -2479,7 +2473,6 @@ FDICABINETINFO fdici; FDINOTIFICATION fdin; INT_PTR cabhf, filehf = 0; - int idx; unsigned int i; char fullpath[MAX_PATH]; size_t pathlen, filenamelen; @@ -2490,9 +2483,9 @@ fdi_decomp_state *decomp_state; FDI_Int *fdi = get_fdi_ptr( hfdi ); - TRACE("(hfdi == ^%p, pszCabinet == ^%p, pszCabPath == ^%p, flags == %0d, " + TRACE("(hfdi == ^%p, pszCabinet == %s, pszCabPath == %s, flags == %x, " "pfnfdin == ^%p, pfnfdid == ^%p, pvUser == ^%p)\n", - hfdi, pszCabinet, pszCabPath, flags, pfnfdin, pfnfdid, pvUser); + hfdi, debugstr_a(pszCabinet), debugstr_a(pszCabPath), flags, pfnfdin, pfnfdid, pvUser); if (!fdi) return FALSE; @@ -2503,8 +2496,8 @@ } ZeroMemory(decomp_state, sizeof(fdi_decomp_state)); - pathlen = (pszCabPath) ? strlen(pszCabPath) : 0; - filenamelen = (pszCabinet) ? strlen(pszCabinet) : 0; + pathlen = pszCabPath ? strlen(pszCabPath) : 0; + filenamelen = pszCabinet ? strlen(pszCabinet) : 0; /* slight overestimation here to save CPU cycles in the developer's brain */ if ((pathlen + filenamelen + 3) > MAX_PATH) { @@ -2515,12 +2508,11 @@ } /* paste the path and filename together */ - idx = 0; - if (pathlen) { - for (i = 0; i < pathlen; i++) fullpath[idx++] = pszCabPath[i]; - } - if (filenamelen) for (i = 0; i < filenamelen; i++) fullpath[idx++] = pszCabinet[i]; - fullpath[idx] = '\0'; + fullpath[0] = '\0'; + if (pathlen) + strcpy(fullpath, pszCabPath); + if (filenamelen) + strcat(fullpath, pszCabinet); TRACE("full cab path/file name: %s\n", debugstr_a(fullpath)); @@ -2535,12 +2527,12 @@ /* check if it's really a cabfile. Note that this doesn't implement the bug */ if (!FDI_read_entries(fdi, cabhf, &fdici, &(CAB(mii)))) { - ERR("FDIIsCabinet failed: %u.\n", fdi->perf->erfOper); + WARN("FDI_read_entries failed: %u\n", fdi->perf->erfOper); fdi->free(decomp_state); fdi->close(cabhf); return FALSE; } - + /* cabinet notification */ ZeroMemory(&fdin, sizeof(FDINOTIFICATION)); fdin.setID = fdici.setID; @@ -2815,7 +2807,7 @@ fdin.pv = pvUser; fdin.psz1 = (char *)file->filename; fdin.hf = filehf; - fdin.cb = (file->attribs & cffile_A_EXEC) ? TRUE : FALSE; /* FIXME: is that right? */ + fdin.cb = (file->attribs & cffile_A_EXEC) != 0; /* FIXME: is that right? */ fdin.date = file->date; fdin.time = file->time; fdin.attribs = file->attribs; /* FIXME: filter _A_EXEC? */ 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] Thu Dec 13 13:25:38 2012 @@ -45,7 +45,7 @@ reactos/dll/win32/avifil32 # Synced to Wine-1.3.37 reactos/dll/win32/bcrypt # Synced to Wine-1.5.19 reactos/dll/win32/browseui # Out of sync -reactos/dll/win32/cabinet # Synced to Wine-1.5.4 +reactos/dll/win32/cabinet # Synced to Wine-1.5.19 reactos/dll/win32/clusapi # Synced to Wine-1.5.19 reactos/dll/win32/comcat # Synced to Wine-1.5.4 reactos/dll/win32/comctl32 # Synced to Wine 1.3.37
12 years
1
0
0
0
← Newer
1
...
14
15
16
17
18
19
20
...
29
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Results per page:
10
25
50
100
200