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
May 2006
----- 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
3 participants
863 discussions
Start a n
N
ew thread
Kai Blin : secur32: Cleaning up the authentication tests.
by Alexandre Julliard
28 May '06
28 May '06
Module: wine Branch: refs/heads/master Commit: b1049be48f457f960c8f7f255ed746828c13403b URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=b1049be48f457f960c8f7f2…
Author: Kai Blin <kai.blin(a)gmail.com> Date: Sun May 28 12:30:42 2006 +0000 secur32: Cleaning up the authentication tests. This should make it easier to add encryption tests later. --- dlls/secur32/tests/main.c | 339 ++++++++++++++++++++------------------------- 1 files changed, 154 insertions(+), 185 deletions(-) Diff:
http://source.winehq.org/git/?p=wine.git;a=commitdiff;h=b1049be48f457f960c8…
1
0
0
0
Jacek Caban : urlmon: Improve debug traces.
by Alexandre Julliard
28 May '06
28 May '06
Module: wine Branch: refs/heads/master Commit: 1c5074329660b5a1152c84ae996b71f4d56b61fd URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=1c5074329660b5a1152c84a…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Sat May 27 22:56:40 2006 +0200 urlmon: Improve debug traces. --- dlls/urlmon/binding.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 46 insertions(+), 0 deletions(-) diff --git a/dlls/urlmon/binding.c b/dlls/urlmon/binding.c index 6862be5..11b067c 100644 --- a/dlls/urlmon/binding.c +++ b/dlls/urlmon/binding.c @@ -198,6 +198,50 @@ static void on_progress(Binding *This, U PostMessageW(This->notif_hwnd, WM_MK_ONPROGRESS, 0, (LPARAM)data); } +static void dump_BINDINFO(BINDINFO *bi) +{ + static const char *BINDINFOF_str[] = { + "#0", + "BINDINFOF_URLENCODESTGMEDDATA", + "BINDINFOF_URLENCODEDEXTRAINFO" + }; + + static const char *BINDVERB_str[] = { + "BINDVERB_GET", + "BINDVERB_POST", + "BINDVERB_PUT", + "BINDVERB_CUSTOM" + }; + + TRACE("\n" + "BINDINFO = {\n" + " %ld, %s,\n" + " {%ld, %p, %p},\n" + " %s,\n" + " %s,\n" + " %s,\n" + " %ld, %08lx, %ld, %ld\n" + " {%ld %p %x},\n" + " %s\n" + " %p, %ld\n" + "}\n", + + bi->cbSize, debugstr_w(bi->szExtraInfo), + bi->stgmedData.tymed, bi->stgmedData.u.hGlobal, bi->stgmedData.pUnkForRelease, + bi->grfBindInfoF > BINDINFOF_URLENCODEDEXTRAINFO + ? "unknown" : BINDINFOF_str[bi->grfBindInfoF], + bi->dwBindVerb > BINDVERB_CUSTOM + ? "unknown" : BINDVERB_str[bi->dwBindVerb], + debugstr_w(bi->szCustomVerb), + bi->cbStgmedData, bi->dwOptions, bi->dwOptionsFlags, bi->dwCodePage, + bi->securityAttributes.nLength, + bi->securityAttributes.lpSecurityDescriptor, + bi->securityAttributes.bInheritHandle, + debugstr_guid(&bi->iid), + bi->pUnk, bi->dwReserved + ); +} + static HRESULT WINAPI HttpNegotiate_QueryInterface(IHttpNegotiate2 *iface, REFIID riid, void **ppv) { @@ -1013,6 +1057,8 @@ static HRESULT Binding_Create(LPCWSTR ur return hres; } + dump_BINDINFO(&ret->bindinfo); + ret->bindf |= BINDF_FROMURLMON; len = strlenW(url)+1;
1
0
0
0
Jacek Caban : urlmon: Store STGMEDIUM in Binding object and set its pUnkForRelease.
by Alexandre Julliard
28 May '06
28 May '06
Module: wine Branch: refs/heads/master Commit: 4797edf4bc4b54e170d29605492dab5fed3bcd99 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=4797edf4bc4b54e170d2960…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Sat May 27 22:56:20 2006 +0200 urlmon: Store STGMEDIUM in Binding object and set its pUnkForRelease. --- dlls/urlmon/binding.c | 11 ++++++----- dlls/urlmon/tests/url.c | 18 ++++++++++++++++++ 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/dlls/urlmon/binding.c b/dlls/urlmon/binding.c index 37f2752..6862be5 100644 --- a/dlls/urlmon/binding.c +++ b/dlls/urlmon/binding.c @@ -56,6 +56,8 @@ typedef struct { DWORD apartment_thread; HWND notif_hwnd; + + STGMEDIUM stgmed; } Binding; struct ProtocolStream { @@ -707,7 +709,6 @@ static HRESULT WINAPI InternetProtocolSi DWORD grfBSCF, ULONG ulProgress, ULONG ulProgressMax) { Binding *This = PROTSINK_THIS(iface); - STGMEDIUM stgmed; FORMATETC formatetc; TRACE("(%p)->(%ld %lu %lu)\n", This, grfBSCF, ulProgress, ulProgressMax); @@ -729,9 +730,6 @@ static HRESULT WINAPI InternetProtocolSi fill_stream_buffer(This->stream); - stgmed.tymed = TYMED_ISTREAM; - stgmed.u.pstm = STREAM(This->stream); - formatetc.cfFormat = 0; /* FIXME */ formatetc.ptd = NULL; formatetc.dwAspect = 1; @@ -739,7 +737,7 @@ static HRESULT WINAPI InternetProtocolSi formatetc.tymed = TYMED_ISTREAM; IBindStatusCallback_OnDataAvailable(This->callback, grfBSCF, This->stream->buf_size, - &formatetc, &stgmed); + &formatetc, &This->stgmed); if(grfBSCF & BSCF_LASTDATANOTIFICATION) IBindStatusCallback_OnStopBinding(This->callback, S_OK, NULL); @@ -1026,6 +1024,9 @@ static HRESULT Binding_Create(LPCWSTR ur memcpy(ret->url, url, len*sizeof(WCHAR)); ret->stream = create_stream(ret->protocol); + ret->stgmed.tymed = TYMED_ISTREAM; + ret->stgmed.u.pstm = STREAM(ret->stream); + ret->stgmed.pUnkForRelease = (IUnknown*)BINDING(ret); /* NOTE: Windows uses other IUnknown */ *binding = ret; return S_OK; diff --git a/dlls/urlmon/tests/url.c b/dlls/urlmon/tests/url.c index 1c6129e..d9ba6a6 100644 --- a/dlls/urlmon/tests/url.c +++ b/dlls/urlmon/tests/url.c @@ -460,6 +460,24 @@ static HRESULT WINAPI statusclb_OnDataAv CHECK_EXPECT2(OnDataAvailable); +#if 0 /* Uncomment after removing BindToStorage hack. */ + ok(pformatetc != NULL, "pformatetx == NULL\n"); + if(pformatetc) { + ok(pformatetc->cfFormat == 0xc02d, "clipformat=%x\n", pformatetc->cfFormat); + ok(pformatetc->ptd == NULL, "ptd = %p\n", pformatetc->ptd); + ok(pformatetc->dwAspect == 1, "dwAspect=%ld\n", pformatetc->dwAspect); + ok(pformatetc->lindex == -1, "lindex=%ld\n", pformatetc->lindex); + ok(pformatetc->tymed == TYMED_ISTREAM, "tymed=%ld\n", pformatetc->tymed); + } + + ok(pstgmed != NULL, "stgmeg == NULL\n"); + if(pstgmed) { + ok(pstgmed->tymed == TYMED_ISTREAM, "tymed=%ld\n", pstgmed->tymed); + ok(U(*pstgmed).pstm != NULL, "pstm == NULL\n"); + ok(pstgmed->pUnkForRelease != NULL, "pUnkForRelease == NULL\n"); + } +#endif + if(U(*pstgmed).pstm) { do hres = IStream_Read(U(*pstgmed).pstm, buf, 512, &readed); while(hres == S_OK);
1
0
0
0
Jacek Caban : urlmon: Return IClassFactory in get_protocol_handler and fix get_protocol.
by Alexandre Julliard
28 May '06
28 May '06
Module: wine Branch: refs/heads/master Commit: 21621b285683059bbab63defc7f45767c4ca3c55 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=21621b285683059bbab63de…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Sat May 27 22:55:32 2006 +0200 urlmon: Return IClassFactory in get_protocol_handler and fix get_protocol. --- dlls/urlmon/binding.c | 8 +------- dlls/urlmon/session.c | 16 +++++++++++----- dlls/urlmon/urlmon_main.h | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/dlls/urlmon/binding.c b/dlls/urlmon/binding.c index 44d3e39..37f2752 100644 --- a/dlls/urlmon/binding.c +++ b/dlls/urlmon/binding.c @@ -929,7 +929,6 @@ static HRESULT get_callback(IBindCtx *pb static HRESULT get_protocol(Binding *This, LPCWSTR url) { - IUnknown *unk = NULL; IClassFactory *cf = NULL; HRESULT hres; @@ -945,12 +944,7 @@ static HRESULT get_protocol(Binding *Thi return S_OK; } - hres = get_protocol_handler(url, &unk); - if(FAILED(hres)) - return hres; - - hres = IUnknown_QueryInterface(unk, &IID_IClassFactory, (void**)&cf); - IUnknown_Release(unk); + hres = get_protocol_handler(url, &cf); if(FAILED(hres)) return hres; diff --git a/dlls/urlmon/session.c b/dlls/urlmon/session.c index deb7146..af07afc 100644 --- a/dlls/urlmon/session.c +++ b/dlls/urlmon/session.c @@ -130,9 +130,10 @@ IInternetProtocolInfo *get_protocol_info return ret; } -HRESULT get_protocol_handler(LPCWSTR url, IUnknown **ret) +HRESULT get_protocol_handler(LPCWSTR url, IClassFactory **ret) { IClassFactory *cf; + IUnknown *unk; WCHAR schema[64]; DWORD schema_len; HRESULT hres; @@ -144,12 +145,17 @@ HRESULT get_protocol_handler(LPCWSTR url cf = find_name_space(schema); if(cf) { - hres = IClassFactory_CreateInstance(cf, NULL, &IID_IUnknown, (void**)ret); - if(SUCCEEDED(hres)) - return hres; + *ret = cf; + return S_OK; } - return get_protocol_iface(schema, schema_len, ret); + hres = get_protocol_iface(schema, schema_len, &unk); + if(FAILED(hres)) + return hres; + + hres = IUnknown_QueryInterface(unk, &IID_IClassFactory, (void**)ret); + IUnknown_Release(unk); + return hres; } static HRESULT WINAPI InternetSession_QueryInterface(IInternetSession *iface, diff --git a/dlls/urlmon/urlmon_main.h b/dlls/urlmon/urlmon_main.h index 9b9f149..240fdfe 100644 --- a/dlls/urlmon/urlmon_main.h +++ b/dlls/urlmon/urlmon_main.h @@ -55,7 +55,7 @@ HRESULT UMCreateStreamOnCacheFile(LPCWST void UMCloseCacheFileStream(IUMCacheStream *pstr); IInternetProtocolInfo *get_protocol_info(LPCWSTR url); -HRESULT get_protocol_handler(LPCWSTR url, IUnknown **ret); +HRESULT get_protocol_handler(LPCWSTR url, IClassFactory **ret); HRESULT start_binding(LPCWSTR url, IBindCtx *pbc, REFIID riid, void **ppv);
1
0
0
0
Alexandre Julliard : sfnt2fnt: Clean output files when aborting on a signal .
by Alexandre Julliard
27 May '06
27 May '06
Module: wine Branch: refs/heads/master Commit: 4ca7a064fabbc8ce4d5c8ddd72b54db3cbd9d7ed URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=4ca7a064fabbc8ce4d5c8dd…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Sat May 27 13:24:36 2006 +0200 sfnt2fnt: Clean output files when aborting on a signal. --- tools/sfnt2fnt.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/tools/sfnt2fnt.c b/tools/sfnt2fnt.c index 755b3ff..955f61a 100644 --- a/tools/sfnt2fnt.c +++ b/tools/sfnt2fnt.c @@ -23,6 +23,7 @@ #include "wine/port.h" #include <assert.h> #include <ctype.h> +#include <signal.h> #include <stdio.h> #include <stdlib.h> @@ -113,6 +114,11 @@ static void cleanup(void) if (output_name) unlink( output_name ); } +static void exit_on_signal( int sig ) +{ + exit(1); /* this will call the atexit functions */ +} + static void error(const char *s, ...) __attribute__((format (printf, 1, 2))); static void error(const char *s, ...) @@ -479,6 +485,12 @@ int main(int argc, char **argv) sprintf(output, "%s-%d-%d-%d.fnt", name, enc, dpi, ppem); atexit( cleanup ); + signal( SIGTERM, exit_on_signal ); + signal( SIGINT, exit_on_signal ); +#ifdef SIGHUP + signal( SIGHUP, exit_on_signal ); +#endif + fp = fopen(output, "w"); output_name = output;
1
0
0
0
Alexandre Julliard : make_ctests: Clean output files when aborting on an error or signal.
by Alexandre Julliard
27 May '06
27 May '06
Module: wine Branch: refs/heads/master Commit: 4e07d0d6d900f516da99bd9abe93d431fd3da875 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=4e07d0d6d900f516da99bd9…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Sat May 27 13:24:25 2006 +0200 make_ctests: Clean output files when aborting on an error or signal. --- tools/make_ctests.c | 20 +++++++++++++++++++- 1 files changed, 19 insertions(+), 1 deletions(-) diff --git a/tools/make_ctests.c b/tools/make_ctests.c index b43b588..54f7484 100644 --- a/tools/make_ctests.c +++ b/tools/make_ctests.c @@ -24,6 +24,7 @@ #include "config.h" +#include <signal.h> #include <stdarg.h> #include <stdio.h> #include <stdlib.h> @@ -34,6 +35,16 @@ #endif static const char *output_file; +static void cleanup_files(void) +{ + if (output_file) unlink( output_file ); +} + +static void exit_on_signal( int sig ) +{ + exit(1); /* this will call the atexit functions */ +} + static void fatal_error( const char *msg, ... ) { va_list valist; @@ -41,7 +52,6 @@ static void fatal_error( const char *msg fprintf( stderr, "make_ctests: " ); vfprintf( stderr, msg, valist ); va_end( valist ); - if (output_file) unlink( output_file ); exit(1); } @@ -108,6 +118,13 @@ int main( int argc, const char** argv ) tests[count++] = basename( argv[i] ); } + atexit( cleanup_files ); + signal( SIGTERM, exit_on_signal ); + signal( SIGINT, exit_on_signal ); +#ifdef SIGHUP + signal( SIGHUP, exit_on_signal ); +#endif + if (output_file) { if (!(out = fopen( output_file, "w" ))) @@ -138,5 +155,6 @@ int main( int argc, const char** argv ) if (output_file && fclose( out )) fatal_perror( "error writing to %s", output_file ); + output_file = NULL; return 0; }
1
0
0
0
Alexandre Julliard : fnt2fon: Clean output files when aborting on an error or signal.
by Alexandre Julliard
27 May '06
27 May '06
Module: wine Branch: refs/heads/master Commit: 411fe29a546e895900d5204df3ed29cf8aaf7f9d URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=411fe29a546e895900d5204…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Sat May 27 13:24:13 2006 +0200 fnt2fon: Clean output files when aborting on an error or signal. --- tools/fnt2fon.c | 24 +++++++++++++++++++++++- 1 files changed, 23 insertions(+), 1 deletions(-) diff --git a/tools/fnt2fon.c b/tools/fnt2fon.c index ab869e3..3f82fd9 100644 --- a/tools/fnt2fon.c +++ b/tools/fnt2fon.c @@ -21,6 +21,7 @@ #include "config.h" #include "wine/port.h" +#include <signal.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -55,6 +56,18 @@ static const BYTE MZ_hdr[] = {'M', 'Z', 'm', 'o', 'd', 'e', 0x0d, 0x0a, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; +static const char *output_file; + +static void cleanup_files(void) +{ + if (output_file) unlink( output_file ); +} + +static void exit_on_signal( int sig ) +{ + exit(1); /* this will call the atexit functions */ +} + static void usage(char **argv) { fprintf(stderr, "%s fntfiles output.fon\n", argv[0]); @@ -177,7 +190,15 @@ int main(int argc, char **argv) fontdir_off = (non_resident_name_off + non_resident_name_len + 15) & ~0xf; font_off = (fontdir_off + fontdir_len + 15) & ~0x0f; - ofp = fopen(argv[argc - 1], "wb"); + atexit( cleanup_files ); + signal( SIGTERM, exit_on_signal ); + signal( SIGINT, exit_on_signal ); +#ifdef SIGHUP + signal( SIGHUP, exit_on_signal ); +#endif + + output_file = argv[argc - 1]; + ofp = fopen(output_file, "wb"); fwrite(MZ_hdr, sizeof(MZ_hdr), 1, ofp); fwrite(&NE_hdr, sizeof(NE_hdr), 1, ofp); @@ -288,6 +309,7 @@ int main(int argc, char **argv) fputc(0x00, ofp); } fclose(ofp); + output_file = NULL; return 0; }
1
0
0
0
Alexandre Julliard : bin2res: Clean output files when aborting on an error or signal.
by Alexandre Julliard
27 May '06
27 May '06
Module: wine Branch: refs/heads/master Commit: 3f1bc3a0a2ff3541e13ef5864656c1a56bac7a74 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=3f1bc3a0a2ff3541e13ef58…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Sat May 27 13:23:59 2006 +0200 bin2res: Clean output files when aborting on an error or signal. --- tools/bin2res.c | 34 ++++++++++++++++++++++++++++------ 1 files changed, 28 insertions(+), 6 deletions(-) diff --git a/tools/bin2res.c b/tools/bin2res.c index 090bbf4..3ccabb0 100644 --- a/tools/bin2res.c +++ b/tools/bin2res.c @@ -23,6 +23,7 @@ #include "config.h" #include "wine/port.h" +#include <signal.h> #include <stdio.h> #include <stdlib.h> #include <ctype.h> @@ -33,6 +34,8 @@ #ifdef HAVE_SYS_PARAM_H # include <sys/param.h> #endif +static const char *clean_file; + static const char* help = "Usage: bin2res [OPTIONS] <rsrc.rc>\n" " -a archive binaries into the <rsrc.rc> file\n" @@ -70,6 +73,16 @@ static void usage(void) exit(1); } +static void cleanup_files(void) +{ + if (clean_file) unlink( clean_file ); +} + +static void exit_on_signal( int sig ) +{ + exit(1); /* this will call the atexit functions */ +} + static int insert_hexdump (FILE* outfile, FILE* infile) { int i, c; @@ -148,6 +161,7 @@ static int process_resources(const char* strcpy(tmp_file_name, "/tmp/bin2res-XXXXXX.temp"); if ((fd = mkstemps(tmp_file_name, 5)) == -1) return 0; } + clean_file = tmp_file_name; if (!(ftmp = fdopen(fd, "w"))) return 0; } @@ -167,17 +181,21 @@ static int process_resources(const char* if (inserting) fputc(c, ftmp); if (c == EOF) break; - if (!(fres = fopen(res_file_name, inserting ? "rb" : "wb"))) break; if (inserting) { + if (!(fres = fopen(res_file_name, "rb"))) break; if (!insert_hexdump(ftmp, fres)) break; while ( (c = fgetc(fin)) != EOF && c != '}') /**/; + fclose(fres); } else { + clean_file = res_file_name; + if (!(fres = fopen(res_file_name, "wb"))) break; if (!extract_hexdump(fres, fin)) break; + fclose(fres); + clean_file = NULL; } - fclose(fres); } fclose(fin); @@ -191,13 +209,10 @@ static int process_resources(const char* { /* try unlinking first, Windows rename is brain-damaged */ if (unlink(input_file_name) < 0 || rename(tmp_file_name, input_file_name) < 0) - { - unlink(tmp_file_name); return 0; - } } + clean_file = NULL; } - else unlink(tmp_file_name); } return c == EOF; @@ -210,6 +225,13 @@ int main(int argc, char **argv) const char* input_file_name = 0; const char* specific_file_name = 0; + atexit( cleanup_files ); + signal( SIGTERM, exit_on_signal ); + signal( SIGINT, exit_on_signal ); +#ifdef SIGHUP + signal( SIGHUP, exit_on_signal ); +#endif + while((optc = getopt(argc, argv, "axi:o:fhv")) != EOF) { switch(optc)
1
0
0
0
Alexandre Julliard : widl: Clean output files when aborting on a signal.
by Alexandre Julliard
27 May '06
27 May '06
Module: wine Branch: refs/heads/master Commit: 25dc6d912e70d0748da102b3227b93174ffb5b31 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=25dc6d912e70d0748da102b…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Sat May 27 13:23:47 2006 +0200 widl: Clean output files when aborting on a signal. --- tools/widl/widl.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/tools/widl/widl.c b/tools/widl/widl.c index b0589b1..c6c4a1c 100644 --- a/tools/widl/widl.c +++ b/tools/widl/widl.c @@ -152,6 +152,12 @@ static char *dup_basename_token(const ch return ret; } +/* clean things up when aborting on a signal */ +static void exit_on_signal( int sig ) +{ + exit(1); /* this will call the atexit functions */ +} + int main(int argc,char *argv[]) { extern char* optarg; @@ -161,6 +167,11 @@ int main(int argc,char *argv[]) int opti = 0; signal(SIGSEGV, segvhandler); + signal( SIGTERM, exit_on_signal ); + signal( SIGINT, exit_on_signal ); +#ifdef SIGHUP + signal( SIGHUP, exit_on_signal ); +#endif now = time(NULL);
1
0
0
0
Alexandre Julliard : wrc: Clean output files when aborting on an error or signal.
by Alexandre Julliard
27 May '06
27 May '06
Module: wine Branch: refs/heads/master Commit: f1de64db39f6344d49afaee5ca4a619ad7622aa2 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=f1de64db39f6344d49afaee…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Sat May 27 13:23:37 2006 +0200 wrc: Clean output files when aborting on an error or signal. --- tools/wrc/wrc.c | 25 ++++++++++++++++++++----- 1 files changed, 20 insertions(+), 5 deletions(-) diff --git a/tools/wrc/wrc.c b/tools/wrc/wrc.c index 42675f0..a5c46ef 100644 --- a/tools/wrc/wrc.c +++ b/tools/wrc/wrc.c @@ -171,7 +171,7 @@ int yy_flex_debug; resource_t *resource_top; /* The top of the parsed resources */ int getopt (int argc, char *const *argv, const char *optstring); -static void rm_tempfile(void); +static void cleanup_files(void); static void segvhandler(int sig); static const char* short_options = @@ -226,6 +226,12 @@ static void set_version_defines(void) free( version ); } +/* clean things up when aborting on a signal */ +static void exit_on_signal( int sig ) +{ + exit(1); /* this will call the atexit functions */ +} + int main(int argc,char *argv[]) { extern char* optarg; @@ -239,6 +245,11 @@ int main(int argc,char *argv[]) int cmdlen; signal(SIGSEGV, segvhandler); + signal( SIGTERM, exit_on_signal ); + signal( SIGINT, exit_on_signal ); +#ifdef SIGHUP + signal( SIGHUP, exit_on_signal ); +#endif now = time(NULL); @@ -430,6 +441,7 @@ int main(int argc,char *argv[]) output_name = dup_basename(input_name, ".rc"); strcat(output_name, ".res"); } + atexit(cleanup_files); /* Run the preprocessor on the input */ if(!no_preprocess) @@ -443,7 +455,6 @@ int main(int argc,char *argv[]) if (!preprocess_only) { - atexit(rm_tempfile); ret = wpp_parse_temp( input_name, output_name, &temp_name ); } else if (output_name) @@ -464,7 +475,10 @@ int main(int argc,char *argv[]) exit(1); /* Error during preprocess */ if(preprocess_only) + { + output_name = NULL; exit(0); + } input_name = temp_name; } @@ -495,15 +509,16 @@ int main(int argc,char *argv[]) chat("Writing .res-file"); write_resfile(output_name, resource_top); + output_name = NULL; return 0; } -static void rm_tempfile(void) +static void cleanup_files(void) { - if(temp_name) - unlink(temp_name); + if (output_name) unlink(output_name); + if (temp_name) unlink(temp_name); } static void segvhandler(int sig)
1
0
0
0
← Newer
1
...
4
5
6
7
8
9
10
...
87
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
Results per page:
10
25
50
100
200