winehq.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
2025
February
January
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
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
March 2008
----- 2025 -----
February 2025
January 2025
----- 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
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
4 participants
1001 discussions
Start a n
N
ew thread
Alexandre Julliard : libwine: Export functions that return the Wine version number and build id.
by Alexandre Julliard
27 Mar '08
27 Mar '08
Module: wine Branch: master Commit: 8505f1429d5a00eb99ece1ae33354c353911e445 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8505f1429d5a00eb99ece1ae3…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Mar 26 19:33:06 2008 +0100 libwine: Export functions that return the Wine version number and build id. --- include/wine/library.h | 2 ++ libs/.gitignore | 2 ++ libs/wine/Makefile.in | 10 +++++++++- libs/wine/config.c | 13 +++++++++++++ libs/wine/wine.def | 2 ++ libs/wine/wine.map | 2 ++ loader/.gitignore | 2 -- loader/Makefile.in | 13 ++----------- loader/main.c | 3 +-- 9 files changed, 33 insertions(+), 16 deletions(-) diff --git a/include/wine/library.h b/include/wine/library.h index 2c3b7bb..0c60378 100644 --- a/include/wine/library.h +++ b/include/wine/library.h @@ -38,6 +38,8 @@ extern const char *wine_get_config_dir(void); extern const char *wine_get_data_dir(void); extern const char *wine_get_server_dir(void); extern const char *wine_get_user_name(void); +extern const char *wine_get_version(void); +extern const char *wine_get_build_id(void); extern void wine_init_argv0_path( const char *argv0 ); extern void wine_exec_wine_binary( const char *name, char **argv, const char *env_var ); diff --git a/libs/.gitignore b/libs/.gitignore index ff27f54..b332749 100644 --- a/libs/.gitignore +++ b/libs/.gitignore @@ -1,2 +1,4 @@ *.dylib *.so.* +wine/version-stamp +wine/version.c diff --git a/libs/wine/Makefile.in b/libs/wine/Makefile.in index 11278b7..ea74396 100644 --- a/libs/wine/Makefile.in +++ b/libs/wine/Makefile.in @@ -96,6 +96,8 @@ C_SRCS = \ c_28605.c \ c_28606.c +EXTRA_OBJS = version.o + all: $(MODULE) $(MODULE:.dll=.a) @MAKE_RULES@ @@ -173,8 +175,14 @@ uninstall:: -cd $(DESTDIR)$(libdir) && $(RM) libwine.a libwine.dll libwine.so libwine.so.$(VERSION) \ libwine.so.$(SOVERSION) libwine.dylib libwine.$(VERSION).dylib libwine.$(SOVERSION).dylib +version-stamp: dummy + (GIT_DIR=$(TOPSRCDIR)/.git git describe HEAD 2>/dev/null || echo "wine-@PACKAGE_VERSION@") | sed -e 's/\(.*\)/const char wine_build[] = "\1";/' >$@ || ($(RM) $@ && exit 1) + +version.c: version-stamp + @cmp -s version-stamp $@ || cp version-stamp $@ + clean:: - $(RM) libwine.so.$(SOVERSION) libwine.so.$(VERSION) + $(RM) libwine.so.$(SOVERSION) libwine.so.$(VERSION) version.c version-stamp $(RELPATH): @cd $(TOOLSDIR)/tools && $(MAKE) relpath diff --git a/libs/wine/config.c b/libs/wine/config.c index eb187e5..9e33f4e 100644 --- a/libs/wine/config.c +++ b/libs/wine/config.c @@ -407,6 +407,19 @@ const char *wine_get_user_name(void) return user_name; } +/* return the standard version string */ +const char *wine_get_version(void) +{ + return PACKAGE_VERSION; +} + +/* return the build id string */ +const char *wine_get_build_id(void) +{ + extern const char wine_build[]; + return wine_build; +} + /* exec a binary using the preloader if requested; helper for wine_exec_wine_binary */ static void preloader_exec( char **argv, int use_preloader ) { diff --git a/libs/wine/wine.def b/libs/wine/wine.def index 6304113..dc5f853 100644 --- a/libs/wine/wine.def +++ b/libs/wine/wine.def @@ -77,6 +77,7 @@ EXPORTS wine_exec_wine_binary wine_fold_string wine_get_build_dir + wine_get_build_id wine_get_config_dir wine_get_cs wine_get_data_dir @@ -88,6 +89,7 @@ EXPORTS wine_get_sortkey wine_get_ss wine_get_user_name + wine_get_version wine_init wine_init_argv0_path wine_is_dbcs_leadbyte diff --git a/libs/wine/wine.map b/libs/wine/wine.map index ef8d823..2159fac 100644 --- a/libs/wine/wine.map +++ b/libs/wine/wine.map @@ -77,6 +77,7 @@ WINE_1.0 wine_exec_wine_binary; wine_fold_string; wine_get_build_dir; + wine_get_build_id; wine_get_config_dir; wine_get_cs; wine_get_data_dir; @@ -88,6 +89,7 @@ WINE_1.0 wine_get_sortkey; wine_get_ss; wine_get_user_name; + wine_get_version; wine_init; wine_init_argv0_path; wine_is_dbcs_leadbyte; diff --git a/loader/.gitignore b/loader/.gitignore deleted file mode 100644 index b047063..0000000 --- a/loader/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/version-stamp -/version.c diff --git a/loader/Makefile.in b/loader/Makefile.in index 64695fe..3179e22 100644 --- a/loader/Makefile.in +++ b/loader/Makefile.in @@ -12,8 +12,8 @@ C_SRCS = \ preloader.c \ pthread.c -KTHREAD_OBJS = kthread.o main.o version.o -PTHREAD_OBJS = pthread.o main.o version.o +KTHREAD_OBJS = kthread.o main.o +PTHREAD_OBJS = pthread.o main.o MAIN_BINARY = @MAIN_BINARY@ EXTRA_BINARIES = @EXTRA_BINARIES@ @@ -97,13 +97,4 @@ uninstall:: $(RM) $(DESTDIR)$(mandir)/de.UTF-8/man$(prog_manext)/wine.$(prog_manext) $(RM) $(DESTDIR)$(mandir)/fr.UTF-8/man$(prog_manext)/wine.$(prog_manext) -clean:: - $(RM) version.c version-stamp - -version-stamp: dummy - (GIT_DIR=$(TOPSRCDIR)/.git git-describe HEAD 2>/dev/null || echo "wine-@PACKAGE_VERSION@") | sed -e 's/\(.*\)/const char wine_version[] = "\1";/' >$@ || ($(RM) $@ && exit 1) - -version.c: version-stamp - @cmp -s version-stamp $@ || cp version-stamp $@ - @DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/loader/main.c b/loader/main.c index 5e0f330..0a1afbb 100644 --- a/loader/main.c +++ b/loader/main.c @@ -68,7 +68,6 @@ static inline void reserve_area( void *addr, size_t size ) */ static void check_command_line( int argc, char *argv[] ) { - extern const char wine_version[]; static const char usage[] = "Usage: wine PROGRAM [ARGUMENTS...] Run the specified program\n" " wine --help Display this help and exit\n" @@ -86,7 +85,7 @@ static void check_command_line( int argc, char *argv[] ) } if (!strcmp( argv[1], "--version" )) { - printf( "%s\n", wine_version ); + printf( "%s\n", wine_get_build_id() ); exit(0); } }
1
0
0
0
Dan Kegel : kernel32: Test negative dest len in WideCharToMultiByte.
by Alexandre Julliard
27 Mar '08
27 Mar '08
Module: wine Branch: master Commit: dcefb67781e261aff504562f4902a00ceacc673f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dcefb67781e261aff504562f4…
Author: Dan Kegel <dank(a)kegel.com> Date: Wed Mar 26 06:50:14 2008 -0700 kernel32: Test negative dest len in WideCharToMultiByte. --- dlls/kernel32/tests/codepage.c | 52 ++++++++++++++++++++++++++++++++++++++++ 1 files changed, 52 insertions(+), 0 deletions(-) diff --git a/dlls/kernel32/tests/codepage.c b/dlls/kernel32/tests/codepage.c index 6f15826..e8908f7 100644 --- a/dlls/kernel32/tests/codepage.c +++ b/dlls/kernel32/tests/codepage.c @@ -19,6 +19,7 @@ */ #include <stdarg.h> +#include <limits.h> #include "wine/test.h" #include "windef.h" @@ -145,6 +146,56 @@ static void test_negative_source_length(void) "MultiByteToWideChar(-1): len=%d error=%u\n", len, GetLastError()); } +#define LONGBUFLEN 100000 +static void test_negative_dest_length(void) +{ + int len, i; + static char buf[LONGBUFLEN]; + static WCHAR originalW[LONGBUFLEN]; + static char originalA[LONGBUFLEN]; + DWORD theError; + + /* Test return on -1 dest length */ + SetLastError( 0xdeadbeef ); + memset(buf,'x',sizeof(buf)); + len = WideCharToMultiByte(CP_ACP, 0, foobarW, -1, buf, -1, NULL, NULL); + todo_wine { + ok(len == 0 && GetLastError() == ERROR_INVALID_PARAMETER, + "WideCharToMultiByte(destlen -1): len=%d error=%x\n", len, GetLastError()); + } + + /* Test return on -1000 dest length */ + SetLastError( 0xdeadbeef ); + memset(buf,'x',sizeof(buf)); + len = WideCharToMultiByte(CP_ACP, 0, foobarW, -1, buf, -1000, NULL, NULL); + todo_wine { + ok(len == 0 && GetLastError() == ERROR_INVALID_PARAMETER, + "WideCharToMultiByte(destlen -1000): len=%d error=%x\n", len, GetLastError()); + } + + /* Test return on INT_MAX dest length */ + SetLastError( 0xdeadbeef ); + memset(buf,'x',sizeof(buf)); + len = WideCharToMultiByte(CP_ACP, 0, foobarW, -1, buf, INT_MAX, NULL, NULL); + ok(len == 7 && !lstrcmpA(buf, "foobar") && GetLastError() == 0xdeadbeef, + "WideCharToMultiByte(destlen INT_MAX): len=%d error=%x\n", len, GetLastError()); + + /* Test return on INT_MAX dest length and very long input */ + SetLastError( 0xdeadbeef ); + memset(buf,'x',sizeof(buf)); + for (i=0; i < LONGBUFLEN - 1; i++) { + originalW[i] = 'Q'; + originalA[i] = 'Q'; + } + originalW[LONGBUFLEN-1] = 0; + originalA[LONGBUFLEN-1] = 0; + len = WideCharToMultiByte(CP_ACP, 0, originalW, -1, buf, INT_MAX, NULL, NULL); + theError = GetLastError(); + ok(len == LONGBUFLEN && !lstrcmpA(buf, originalA) && theError == 0xdeadbeef, + "WideCharToMultiByte(srclen %d, destlen INT_MAX): len %d error=%x\n", LONGBUFLEN, len, theError); + +} + static void test_overlapped_buffers(void) { static const WCHAR strW[] = {'j','u','s','t',' ','a',' ','t','e','s','t',0}; @@ -163,5 +214,6 @@ START_TEST(codepage) test_destination_buffer(); test_null_source(); test_negative_source_length(); + test_negative_dest_length(); test_overlapped_buffers(); }
1
0
0
0
Jacek Caban : urlmon: Don't use -1 length in WideCharToMultiByte call.
by Alexandre Julliard
27 Mar '08
27 Mar '08
Module: wine Branch: master Commit: d43de316c3ae2e1e90458e2964671e99142a0bea URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d43de316c3ae2e1e90458e296…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Mar 26 16:47:24 2008 +0100 urlmon: Don't use -1 length in WideCharToMultiByte call. --- dlls/urlmon/sec_mgr.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/urlmon/sec_mgr.c b/dlls/urlmon/sec_mgr.c index 049ed2a..943b6dd 100644 --- a/dlls/urlmon/sec_mgr.c +++ b/dlls/urlmon/sec_mgr.c @@ -445,7 +445,7 @@ static HRESULT WINAPI SecManagerImpl_GetSecurityId(IInternetSecurityManager *ifa return HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER); } - WideCharToMultiByte(CP_ACP, 0, url, -1, (LPSTR)pbSecurityId, -1, NULL, NULL); + WideCharToMultiByte(CP_ACP, 0, url, -1, (LPSTR)pbSecurityId, len, NULL, NULL); heap_free(url); *(DWORD*)(pbSecurityId+len) = zone;
1
0
0
0
Jacek Caban : mshtml: Fixed invalid use of -1 length in WideCharToMultiByte calls.
by Alexandre Julliard
27 Mar '08
27 Mar '08
Module: wine Branch: master Commit: c94e646fc16ac027ba8774b62b6977c4b3a0e05f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c94e646fc16ac027ba8774b62…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Mar 26 15:32:46 2008 +0100 mshtml: Fixed invalid use of -1 length in WideCharToMultiByte calls. --- dlls/mshtml/editor.c | 7 +------ dlls/mshtml/install.c | 7 ++----- dlls/mshtml/persist.c | 2 +- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/dlls/mshtml/editor.c b/dlls/mshtml/editor.c index 057ac24..12f2c35 100644 --- a/dlls/mshtml/editor.c +++ b/dlls/mshtml/editor.c @@ -559,7 +559,6 @@ static HRESULT exec_fontname(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in, if(in) { char *stra; - DWORD len; if(V_VT(in) != VT_BSTR) { FIXME("Unsupported vt=%d\n", V_VT(out)); @@ -568,12 +567,8 @@ static HRESULT exec_fontname(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in, TRACE("%s\n", debugstr_w(V_BSTR(in))); - len = WideCharToMultiByte(CP_ACP, 0, V_BSTR(in), -1, NULL, 0, NULL, NULL); - stra = heap_alloc(len); - WideCharToMultiByte(CP_ACP, 0, V_BSTR(in), -1, stra, -1, NULL, NULL); - + stra = heap_strdupWtoA(V_BSTR(in)); set_ns_fontname(This->nscontainer, stra); - heap_free(stra); update_doc(This, UPDATE_UI); diff --git a/dlls/mshtml/install.c b/dlls/mshtml/install.c index fd36290..edb5f58 100644 --- a/dlls/mshtml/install.c +++ b/dlls/mshtml/install.c @@ -135,7 +135,7 @@ static BOOL install_cab(LPCWSTR file_name) char install_dir[MAX_PATH]; HRESULT (WINAPI *pExtractFilesA)(LPCSTR,LPCSTR,DWORD,LPCSTR,LPVOID,DWORD); LPSTR file_name_a; - DWORD res, len; + DWORD res; HRESULT hres; static const WCHAR wszAdvpack[] = {'a','d','v','p','a','c','k','.','d','l','l',0}; @@ -160,11 +160,8 @@ static BOOL install_cab(LPCWSTR file_name) advpack = LoadLibraryW(wszAdvpack); pExtractFilesA = (void *)GetProcAddress(advpack, "ExtractFiles"); - len = WideCharToMultiByte(CP_ACP, 0, file_name, -1, NULL, 0, NULL, NULL); - file_name_a = heap_alloc(len); - WideCharToMultiByte(CP_ACP, 0, file_name, -1, file_name_a, -1, NULL, NULL); - /* FIXME: Use unicode version (not yet implemented) */ + file_name_a = heap_strdupWtoA(file_name); hres = pExtractFilesA(file_name_a, install_dir, 0, NULL, NULL, 0); FreeLibrary(advpack); heap_free(file_name_a); diff --git a/dlls/mshtml/persist.c b/dlls/mshtml/persist.c index a094dc1..78a5d6b 100644 --- a/dlls/mshtml/persist.c +++ b/dlls/mshtml/persist.c @@ -134,7 +134,7 @@ static nsIInputStream *get_post_data_stream(IBindCtx *bctx) data = heap_alloc(headers_len+post_len+sizeof(content_length)+8); if(headers_len) { - WideCharToMultiByte(CP_ACP, 0, headers, -1, data, -1, NULL, NULL); + WideCharToMultiByte(CP_ACP, 0, headers, -1, data, headers_len, NULL, NULL); len = fix_headers(data, post_len); }
1
0
0
0
Jacek Caban : mshtml: Fixed crash in tests if Gecko is not available.
by Alexandre Julliard
27 Mar '08
27 Mar '08
Module: wine Branch: master Commit: 4a46a0193abe70a1d46d3e0171f0e30c9d0be84f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4a46a0193abe70a1d46d3e017…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Mar 26 15:24:50 2008 +0100 mshtml: Fixed crash in tests if Gecko is not available. --- dlls/mshtml/tests/script.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/dlls/mshtml/tests/script.c b/dlls/mshtml/tests/script.c index 8b15d92..ac604cc 100644 --- a/dlls/mshtml/tests/script.c +++ b/dlls/mshtml/tests/script.c @@ -432,7 +432,10 @@ static void test_simple_script(void) IHTMLDocument2 *doc; SET_EXPECT(CreateInstance); + doc = create_and_load_doc(simple_script_str); + if(!doc) return; + CHECK_CALLED(CreateInstance); IHTMLDocument2_Release(doc);
1
0
0
0
Jacek Caban : mshtml: Added nsIChannel::SetContentType implementation.
by Alexandre Julliard
27 Mar '08
27 Mar '08
Module: wine Branch: master Commit: e2645dec1cd3d9ad0b67a43db8112be8022f879b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e2645dec1cd3d9ad0b67a43db…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Mar 26 15:24:38 2008 +0100 mshtml: Added nsIChannel::SetContentType implementation. --- dlls/mshtml/nsio.c | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c index f690344..0331882 100644 --- a/dlls/mshtml/nsio.c +++ b/dlls/mshtml/nsio.c @@ -485,14 +485,21 @@ static nsresult NSAPI nsChannel_SetContentType(nsIHttpChannel *iface, const nsACString *aContentType) { nsChannel *This = NSCHANNEL_THIS(iface); + const char *content_type; TRACE("(%p)->(%p)\n", This, aContentType); + nsACString_GetData(aContentType, &content_type); + + TRACE("content_type %s\n", content_type); + + heap_free(This->content_type); + This->content_type = heap_strdupA(content_type); + if(This->channel) return nsIChannel_SetContentType(This->channel, aContentType); - FIXME("default action not implemented\n"); - return NS_ERROR_NOT_IMPLEMENTED; + return NS_OK; } static nsresult NSAPI nsChannel_GetContentCharset(nsIHttpChannel *iface,
1
0
0
0
Jacek Caban : mshtml: Pass buffer length to MultiByteToWideChar instead of -1.
by Alexandre Julliard
27 Mar '08
27 Mar '08
Module: wine Branch: master Commit: 91800118a859e3040a55d090bc36e933964f06c8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=91800118a859e3040a55d090b…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Mar 26 15:24:20 2008 +0100 mshtml: Pass buffer length to MultiByteToWideChar instead of -1. --- dlls/mshtml/mshtml_private.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 151d266..6d44f32 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -592,7 +592,7 @@ static inline WCHAR *heap_strdupAtoW(const char *str) len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0); ret = heap_alloc(len*sizeof(WCHAR)); - MultiByteToWideChar(CP_ACP, 0, str, -1, ret, -1); + MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len); } return ret;
1
0
0
0
Jacek Caban : mshtml: Rename nsChannel:: content to content_type and clean up its handling.
by Alexandre Julliard
27 Mar '08
27 Mar '08
Module: wine Branch: master Commit: 8abf7a8cc94f43266f1246e1c9df52e19559ded0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8abf7a8cc94f43266f1246e1c…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Mar 26 15:24:03 2008 +0100 mshtml: Rename nsChannel::content to content_type and clean up its handling. --- dlls/mshtml/mshtml_private.h | 30 +++++++++++++++++++++++++++++- dlls/mshtml/navigate.c | 17 +++++------------ dlls/mshtml/nsio.c | 24 ++++++------------------ 3 files changed, 40 insertions(+), 31 deletions(-) diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 4253a87..151d266 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -241,7 +241,7 @@ typedef struct { nsIInterfaceRequestor *notif_callback; nsLoadFlags load_flags; nsIURI *original_uri; - char *content; + char *content_type; char *charset; } nsChannel; @@ -568,6 +568,21 @@ static inline LPWSTR heap_strdupW(LPCWSTR str) return ret; } +static inline char *heap_strdupA(const char *str) +{ + char *ret = NULL; + + if(str) { + DWORD size; + + size = strlen(str)+1; + ret = heap_alloc(size); + memcpy(ret, str, size); + } + + return ret; +} + static inline WCHAR *heap_strdupAtoW(const char *str) { LPWSTR ret = NULL; @@ -583,6 +598,19 @@ static inline WCHAR *heap_strdupAtoW(const char *str) return ret; } +static inline char *heap_strdupWtoA(LPCWSTR str) +{ + char *ret = NULL; + + if(str) { + DWORD size = WideCharToMultiByte(CP_ACP, 0, str, -1, NULL, 0, NULL, NULL); + ret = heap_alloc(size); + WideCharToMultiByte(CP_ACP, 0, str, -1, ret, size, NULL, NULL); + } + + return ret; +} + HINSTANCE get_shdoclc(void); extern HINSTANCE hInst; diff --git a/dlls/mshtml/navigate.c b/dlls/mshtml/navigate.c index a0dc67f..8ae064c 100644 --- a/dlls/mshtml/navigate.c +++ b/dlls/mshtml/navigate.c @@ -884,17 +884,12 @@ static HRESULT nsChannelBSC_on_progress(BSCallback *bsc, ULONG status_code, LPCW nsChannelBSC *This = NSCHANNELBSC_THIS(bsc); switch(status_code) { - case BINDSTATUS_MIMETYPEAVAILABLE: { - int len; - + case BINDSTATUS_MIMETYPEAVAILABLE: if(!This->nschannel) return S_OK; - heap_free(This->nschannel->content); - len = WideCharToMultiByte(CP_ACP, 0, status_text, -1, NULL, 0, NULL, NULL); - This->nschannel->content = heap_alloc(len*sizeof(WCHAR)); - WideCharToMultiByte(CP_ACP, 0, status_text, -1, This->nschannel->content, -1, NULL, NULL); - } + heap_free(This->nschannel->content_type); + This->nschannel->content_type = heap_strdupWtoA(status_text); } return S_OK; @@ -958,10 +953,8 @@ HRESULT channelbsc_load_stream(nsChannelBSC *bscallback, IStream *stream) add_nsrequest(bscallback); - if(bscallback->nschannel) { - bscallback->nschannel->content = heap_alloc(sizeof(text_html)); - memcpy(bscallback->nschannel->content, text_html, sizeof(text_html)); - } + if(bscallback->nschannel) + bscallback->nschannel->content_type = heap_strdupA(text_html); hres = read_stream_data(bscallback, stream); IBindStatusCallback_OnStopBinding(STATUSCLB(&bscallback->bsc), hres, ERROR_SUCCESS); diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c index b45bb08..f690344 100644 --- a/dlls/mshtml/nsio.c +++ b/dlls/mshtml/nsio.c @@ -209,7 +209,7 @@ static nsrefcnt NSAPI nsChannel_Release(nsIHttpChannel *iface) nsIInterfaceRequestor_Release(This->notif_callback); if(This->original_uri) nsIURI_Release(This->original_uri); - heap_free(This->content); + heap_free(This->content_type); heap_free(This->charset); heap_free(This); } @@ -468,8 +468,8 @@ static nsresult NSAPI nsChannel_GetContentType(nsIHttpChannel *iface, nsACString TRACE("(%p)->(%p)\n", This, aContentType); - if(This->content) { - nsACString_SetData(aContentType, This->content); + if(This->content_type) { + nsACString_SetData(aContentType, This->content_type); return S_OK; } @@ -688,13 +688,8 @@ static nsresult async_open_doc_uri(nsChannel *This, NSContainer *container, channelbsc_set_channel(container->bscallback, This, listener, context); if(container->doc && container->doc->mime) { - DWORD len; - - heap_free(This->content); - - len = WideCharToMultiByte(CP_ACP, 0, container->doc->mime, -1, NULL, 0, NULL, NULL); - This->content = heap_alloc(len); - WideCharToMultiByte(CP_ACP, 0, container->doc->mime, -1, This->content, -1, NULL, NULL); + heap_free(This->content_type); + This->content_type = heap_strdupWtoA(container->doc->mime); } if(do_load_from_moniker_hack(This)) @@ -2155,20 +2150,13 @@ static nsresult NSAPI nsIOService_NewChannelFromURI(nsIIOService *iface, nsIURI return channel ? NS_OK : NS_ERROR_UNEXPECTED; } - ret = heap_alloc(sizeof(nsChannel)); + ret = heap_alloc_zero(sizeof(nsChannel)); ret->lpHttpChannelVtbl = &nsChannelVtbl; ret->lpUploadChannelVtbl = &nsUploadChannelVtbl; ret->ref = 1; ret->channel = channel; - ret->http_channel = NULL; ret->uri = wine_uri; - ret->post_data_stream = NULL; - ret->load_group = NULL; - ret->notif_callback = NULL; - ret->load_flags = 0; - ret->content = NULL; - ret->charset = NULL; nsIURI_AddRef(aURI); ret->original_uri = aURI;
1
0
0
0
Jacek Caban : mshtml: Added IHTMLDocument2::get_location implementation.
by Alexandre Julliard
27 Mar '08
27 Mar '08
Module: wine Branch: master Commit: 1caf73be28dda1ad6fcc9ba3f2d0349686d300b7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1caf73be28dda1ad6fcc9ba3f…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Mar 26 15:23:41 2008 +0100 mshtml: Added IHTMLDocument2::get_location implementation. --- dlls/mshtml/Makefile.in | 1 + dlls/mshtml/htmldoc.c | 22 ++- dlls/mshtml/htmllocation.c | 311 ++++++++++++++++++++++++++++++++++++++++++ dlls/mshtml/mshtml_private.h | 11 ++ dlls/mshtml/tests/dom.c | 28 ++++ 5 files changed, 366 insertions(+), 7 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=1caf73be28dda1ad6fcc9…
1
0
0
0
Alexandre Julliard : quartz: Avoid %ll printf formats.
by Alexandre Julliard
27 Mar '08
27 Mar '08
Module: wine Branch: master Commit: 6af76b3daa2be9567ce605b49c1bffa5df74044c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6af76b3daa2be9567ce605b49…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Mar 26 18:01:09 2008 +0100 quartz: Avoid %ll printf formats. --- dlls/quartz/acmwrapper.c | 4 ++-- dlls/quartz/mpegsplit.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/quartz/acmwrapper.c b/dlls/quartz/acmwrapper.c index 4d5fbc9..d34fcc6 100644 --- a/dlls/quartz/acmwrapper.c +++ b/dlls/quartz/acmwrapper.c @@ -128,7 +128,7 @@ static HRESULT ACMWrapper_ProcessSampleData(TransformFilterImpl* pTransformFilte assert(hr == S_OK); assert(ash.cbSrcLengthUsed); - TRACE("Sample start time: %lld.%03lld\n", (tStart/10000000), (tStart/10000)%1000); + TRACE("Sample start time: %u.%03u\n", (DWORD)(tStart/10000000), (DWORD)((tStart/10000)%1000)); if (ash.cbSrcLengthUsed == cbSrcStream) { IMediaSample_SetTime(pOutSample, &tStart, &tStop); @@ -146,7 +146,7 @@ static HRESULT ACMWrapper_ProcessSampleData(TransformFilterImpl* pTransformFilte ERR("No valid timestamp found\n"); IMediaSample_SetTime(pOutSample, NULL, NULL); } - TRACE("Sample stop time: %lld.%03lld\n", (tStart/10000000), (tStart/10000)%1000); + TRACE("Sample stop time: %u.%03u\n", (DWORD)(tStart/10000000), (DWORD)((tStart/10000)%1000)); hr = OutputPin_SendSample((OutputPin*)This->tf.ppPins[1], pOutSample); if (hr != S_OK && hr != VFW_E_NOT_CONNECTED) { diff --git a/dlls/quartz/mpegsplit.c b/dlls/quartz/mpegsplit.c index 0314462..ab4d371 100644 --- a/dlls/quartz/mpegsplit.c +++ b/dlls/quartz/mpegsplit.c @@ -291,7 +291,7 @@ static HRESULT FillBuffer(MPEGSplitterImpl *This, BYTE** fbuf, DWORD *flen) hr = copy_data(This->pCurrentSample, fbuf, flen, length); if (FAILED(hr)) { - WARN("Couldn't set data size to %lld\n", length); + WARN("Couldn't set data size to %x%08x\n", (DWORD)(length >> 32), (DWORD)length); This->skipbytes = length; return hr; } @@ -313,7 +313,7 @@ out_append: sampleduration = 0; IMediaSample_SetTime(This->pCurrentSample, &time, &This->position); } - TRACE("Media time: %lld.%03lld\n", (This->position/10000000), (This->position/10000)%1000); + TRACE("Media time: %u.%03u\n", (DWORD)(This->position/10000000), (DWORD)((This->position/10000)%1000)); hr = OutputPin_SendSample(&pOutputPin->pin, This->pCurrentSample); if (FAILED(hr)) @@ -662,7 +662,7 @@ static HRESULT MPEGSplitter_pre_connect(IPin *iface, IPin *pConnectPin) } } hr = S_OK; - TRACE("Duration: %lld seconds\n", duration / 10000000); + TRACE("Duration: %d seconds\n", (DWORD)(duration / 10000000)); TRACE("Parsing took %u ms\n", GetTickCount() - ticks); break; }
1
0
0
0
← Newer
1
...
16
17
18
19
20
21
22
...
101
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
Results per page:
10
25
50
100
200