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
June
May
April
March
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
April 2008
----- 2025 -----
June 2025
May 2025
April 2025
March 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
1278 discussions
Start a n
N
ew thread
James Hawkins : kernel32: Fix a test that fails in win2k and up.
by Alexandre Julliard
17 Apr '08
17 Apr '08
Module: wine Branch: master Commit: c5ebc4acb0af3da2799e58fab6c7f73a3184c51b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c5ebc4acb0af3da2799e58fab…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Wed Apr 16 16:30:19 2008 -0500 kernel32: Fix a test that fails in win2k and up. --- dlls/kernel32/tests/volume.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/kernel32/tests/volume.c b/dlls/kernel32/tests/volume.c index f238146..9a21db1 100644 --- a/dlls/kernel32/tests/volume.c +++ b/dlls/kernel32/tests/volume.c @@ -49,7 +49,7 @@ static void test_query_dos_deviceA(void) static void test_FindFirstVolume(void) { - char volume[50]; + char volume[51]; HANDLE handle; if (!pFindFirstVolumeA) { @@ -65,7 +65,7 @@ static void test_FindFirstVolume(void) handle = pFindFirstVolumeA( volume, 49 ); ok( handle == INVALID_HANDLE_VALUE, "succeeded with short buffer\n" ); ok( GetLastError() == ERROR_FILENAME_EXCED_RANGE, "wrong error %u\n", GetLastError() ); - handle = pFindFirstVolumeA( volume, 50 ); + handle = pFindFirstVolumeA( volume, 51 ); ok( handle != INVALID_HANDLE_VALUE, "failed err %u\n", GetLastError() ); if (handle != INVALID_HANDLE_VALUE) {
1
0
0
0
James Hawkins : kernel32: Fix a test that fails in win2k.
by Alexandre Julliard
17 Apr '08
17 Apr '08
Module: wine Branch: master Commit: c009d1e9c431d461f37569d2ddf68921bf67bcab URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c009d1e9c431d461f37569d2d…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Wed Apr 16 16:02:21 2008 -0500 kernel32: Fix a test that fails in win2k. --- dlls/kernel32/tests/locale.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c index 47f50b1..60e6f11 100644 --- a/dlls/kernel32/tests/locale.c +++ b/dlls/kernel32/tests/locale.c @@ -1002,7 +1002,9 @@ static void test_CompareStringA(void) ok(ret == 2, "a vs a expected 2, got %d\n", ret); ret = CompareStringA(lcid, 0, "a\0b", 4, "a", 2); - ok(ret == 3, "a\\0b vs a expected 3, got %d\n", ret); + ok(ret == CSTR_EQUAL || /* win2k */ + ret == CSTR_GREATER_THAN, + "a\\0b vs a expected CSTR_EQUAL or CSTR_GREATER_THAN, got %d\n", ret); ret = CompareStringA(lcid, 0, "\2", 2, "\1", 2); todo_wine ok(ret != 2, "\\2 vs \\1 expected unequal\n");
1
0
0
0
Alexandre Julliard : server: Keep a file descriptor open to the config directory to make sure we don' t write the registry in the wrong place.
by Alexandre Julliard
17 Apr '08
17 Apr '08
Module: wine Branch: master Commit: 161160f05ae2340ab5bb35307ca02056cbca68e9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=161160f05ae2340ab5bb35307…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Apr 17 12:41:34 2008 +0200 server: Keep a file descriptor open to the config directory to make sure we don't write the registry in the wrong place. --- server/registry.c | 57 +++++++++++++++++++--------------------------------- server/request.c | 11 ++++++++- server/request.h | 1 + 3 files changed, 31 insertions(+), 38 deletions(-) diff --git a/server/registry.c b/server/registry.c index 5084892..d2c0b23 100644 --- a/server/registry.c +++ b/server/registry.c @@ -112,7 +112,7 @@ static void set_periodic_save_timer(void); struct save_branch_info { struct key *key; - char *path; + const char *path; }; #define MAX_SAVE_BRANCH_INFO 3 @@ -1396,11 +1396,9 @@ static void load_init_registry_from_file( const char *filename, struct key *key assert( save_branch_count < MAX_SAVE_BRANCH_INFO ); - if ((save_branch_info[save_branch_count].path = strdup( filename ))) - { - save_branch_info[save_branch_count++].key = (struct key *)grab_object( key ); - make_object_static( &key->obj ); - } + save_branch_info[save_branch_count].path = filename; + save_branch_info[save_branch_count++].key = (struct key *)grab_object( key ); + make_object_static( &key->obj ); } static WCHAR *format_user_registry_path( const SID *sid, struct unicode_str *path ) @@ -1438,27 +1436,24 @@ void init_registry(void) WCHAR *current_user_path; struct unicode_str current_user_str; - const char *config = wine_get_config_dir(); - char *p, *filename; struct key *key; int dummy; + /* switch to the config dir */ + + if (fchdir( config_dir_fd ) == -1) fatal_perror( "chdir to config dir" ); + /* create the root key */ root_key = alloc_key( &root_name, time(NULL) ); assert( root_key ); make_object_static( &root_key->obj ); - if (!(filename = malloc( strlen(config) + 16 ))) fatal_error( "out of memory\n" ); - strcpy( filename, config ); - p = filename + strlen(filename); - /* load system.reg into Registry\Machine */ if (!(key = create_key( root_key, &HKLM_name, NULL, 0, time(NULL), &dummy ))) fatal_error( "could not create Machine registry key\n" ); - strcpy( p, "/system.reg" ); - load_init_registry_from_file( filename, key ); + load_init_registry_from_file( "system.reg", key ); release_object( key ); /* load userdef.reg into Registry\User\.Default */ @@ -1466,8 +1461,7 @@ void init_registry(void) if (!(key = create_key( root_key, &HKU_name, NULL, 0, time(NULL), &dummy ))) fatal_error( "could not create User\\.Default registry key\n" ); - strcpy( p, "/userdef.reg" ); - load_init_registry_from_file( filename, key ); + load_init_registry_from_file( "userdef.reg", key ); release_object( key ); /* load user.reg into HKEY_CURRENT_USER */ @@ -1478,14 +1472,14 @@ void init_registry(void) !(key = create_key( root_key, ¤t_user_str, NULL, 0, time(NULL), &dummy ))) fatal_error( "could not create HKEY_CURRENT_USER registry key\n" ); free( current_user_path ); - strcpy( p, "/user.reg" ); - load_init_registry_from_file( filename, key ); + load_init_registry_from_file( "user.reg", key ); release_object( key ); - free( filename ); - /* start the periodic save timer */ set_periodic_save_timer(); + + /* go back to the server dir */ + if (fchdir( server_dir_fd ) == -1) fatal_perror( "chdir to server dir" ); } /* save a registry branch to a file */ @@ -1532,8 +1526,8 @@ static void save_registry( struct key *key, obj_handle_t handle ) static int save_branch( struct key *key, const char *path ) { struct stat st; - char *p, *real, *tmp = NULL; - int fd, count = 0, ret = 0, by_symlink; + char *p, *tmp = NULL; + int fd, count = 0, ret = 0; FILE *f; if (!(key->flags & KEY_DIRTY)) @@ -1542,25 +1536,13 @@ static int save_branch( struct key *key, const char *path ) return 1; } - /* get the real path */ - - by_symlink = (!lstat(path, &st) && S_ISLNK (st.st_mode)); - if (!(real = malloc( PATH_MAX ))) return 0; - if (!realpath( path, real )) - { - free( real ); - real = NULL; - } - else path = real; - /* test the file type */ if ((fd = open( path, O_WRONLY )) != -1) { /* if file is not a regular file or has multiple links or is accessed * via symbolic links, write directly into it; otherwise use a temp file */ - if (by_symlink || - (!fstat( fd, &st ) && (!S_ISREG(st.st_mode) || st.st_nlink > 1))) + if (!lstat( path, &st ) && (!S_ISREG(st.st_mode) || st.st_nlink > 1)) { ftruncate( fd, 0 ); goto save; @@ -1610,7 +1592,6 @@ static int save_branch( struct key *key, const char *path ) done: free( tmp ); - free( real ); if (ret) make_clean( key ); return ret; } @@ -1620,9 +1601,11 @@ static void periodic_save( void *arg ) { int i; + if (fchdir( config_dir_fd ) == -1) return; save_timeout_user = NULL; for (i = 0; i < save_branch_count; i++) save_branch( save_branch_info[i].key, save_branch_info[i].path ); + if (fchdir( server_dir_fd ) == -1) fatal_perror( "chdir to server dir" ); set_periodic_save_timer(); } @@ -1638,6 +1621,7 @@ void flush_registry(void) { int i; + if (fchdir( config_dir_fd ) == -1) return; for (i = 0; i < save_branch_count; i++) { if (!save_branch( save_branch_info[i].key, save_branch_info[i].path )) @@ -1647,6 +1631,7 @@ void flush_registry(void) perror( " " ); } } + if (fchdir( server_dir_fd ) == -1) fatal_perror( "chdir to server dir" ); } diff --git a/server/request.c b/server/request.c index 9a2c7b1..8726e1c 100644 --- a/server/request.c +++ b/server/request.c @@ -120,6 +120,8 @@ static const struct fd_ops master_socket_fd_ops = struct thread *current = NULL; /* thread handling the current request */ unsigned int global_error = 0; /* global error code for when no thread is current */ timeout_t server_start_time = 0; /* server startup time */ +int server_dir_fd = -1; /* file descriptor for the server dir */ +int config_dir_fd = -1; /* file descriptor for the config dir */ static struct master_socket *master_socket; /* the master socket object */ static struct timeout_user *master_timeout; @@ -553,7 +555,8 @@ static void create_server_dir( const char *dir ) create_dir( server_dir, &st ); if (chdir( server_dir ) == -1) fatal_perror( "chdir %s", server_dir ); - if (stat( ".", &st2 ) == -1) fatal_perror( "stat %s", server_dir ); + if ((server_dir_fd = open( ".", O_RDONLY )) == -1) fatal_perror( "open %s", server_dir ); + if (fstat( server_dir_fd, &st2 ) == -1) fatal_perror( "stat %s", server_dir ); if (st.st_dev != st2.st_dev || st.st_ino != st2.st_ino) fatal_error( "chdir did not end up in %s\n", server_dir ); @@ -733,6 +736,7 @@ static void acquire_lock(void) void open_master_socket(void) { const char *server_dir = wine_get_server_dir(); + const char *config_dir = wine_get_config_dir(); int fd, pid, status, sync_pipe[2]; char dummy; @@ -740,7 +744,10 @@ void open_master_socket(void) assert( sizeof(union generic_request) == sizeof(struct request_max_size) ); assert( sizeof(union generic_reply) == sizeof(struct request_max_size) ); - if (!server_dir) fatal_error( "directory %s cannot be accessed\n", wine_get_config_dir() ); + if (!server_dir) fatal_error( "directory %s cannot be accessed\n", config_dir ); + if (chdir( config_dir ) == -1) fatal_perror( "chdir to %s", config_dir ); + if ((config_dir_fd = open( ".", O_RDONLY )) == -1) fatal_perror( "open %s", config_dir ); + create_server_dir( server_dir ); if (!foreground) diff --git a/server/request.h b/server/request.h index 283ad97..496c5ff 100644 --- a/server/request.h +++ b/server/request.h @@ -61,6 +61,7 @@ extern void close_master_socket( timeout_t timeout ); extern void shutdown_master_socket(void); extern int wait_for_lock(void); extern int kill_lock_owner( int sig ); +extern int server_dir_fd, config_dir_fd; extern void trace_request(void); extern void trace_reply( enum request req, const union generic_reply *reply );
1
0
0
0
James Hawkins : fusion: Explicitly check for -1 for a missing table.
by Alexandre Julliard
17 Apr '08
17 Apr '08
Module: wine Branch: master Commit: e52e5e67159753cdc0c5abfa409f71c0710dab47 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e52e5e67159753cdc0c5abfa4…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Wed Apr 16 11:48:31 2008 -0500 fusion: Explicitly check for -1 for a missing table. --- dlls/fusion/assembly.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/fusion/assembly.c b/dlls/fusion/assembly.c index 024e611..eee889a 100644 --- a/dlls/fusion/assembly.c +++ b/dlls/fusion/assembly.c @@ -416,7 +416,7 @@ HRESULT assembly_get_name(ASSEMBLY *assembly, LPSTR *name) ULONG offset; offset = assembly->tables[0x20].offset; /* FIXME: add constants */ - if (offset < 0) + if (offset == -1) return E_FAIL; asmtbl = (ASSEMBLYTABLE *)assembly_data_offset(assembly, offset); @@ -527,7 +527,7 @@ HRESULT assembly_get_pubkey_token(ASSEMBLY *assembly, LPSTR *token) *token = NULL; offset = assembly->tables[0x20].offset; /* FIXME: add constants */ - if (offset < 0) + if (offset == -1) return E_FAIL; asmtbl = (ASSEMBLYTABLE *)assembly_data_offset(assembly, offset);
1
0
0
0
Dmitry Timoshkov : winedump: Print names for all known EMF records.
by Alexandre Julliard
17 Apr '08
17 Apr '08
Module: wine Branch: master Commit: d43758b2744be43e509ae06288fd60cd6a9ecb8f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d43758b2744be43e509ae0628…
Author: Dmitry Timoshkov <dmitry(a)codeweavers.com> Date: Thu Apr 17 19:15:43 2008 +0900 winedump: Print names for all known EMF records. --- tools/winedump/emf.c | 99 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 98 insertions(+), 1 deletions(-) diff --git a/tools/winedump/emf.c b/tools/winedump/emf.c index f5375d0..7975e21 100644 --- a/tools/winedump/emf.c +++ b/tools/winedump/emf.c @@ -62,32 +62,129 @@ static int dump_emfrecord(void) switch(type) { EMRCASE(EMR_HEADER); + EMRCASE(EMR_POLYBEZIER); EMRCASE(EMR_POLYGON); EMRCASE(EMR_POLYLINE); + EMRCASE(EMR_POLYBEZIERTO); + EMRCASE(EMR_POLYLINETO); + EMRCASE(EMR_POLYPOLYLINE); + EMRCASE(EMR_POLYPOLYGON); EMRCASE(EMR_SETWINDOWEXTEX); EMRCASE(EMR_SETWINDOWORGEX); EMRCASE(EMR_SETVIEWPORTEXTEX); + EMRCASE(EMR_SETVIEWPORTORGEX); + EMRCASE(EMR_SETBRUSHORGEX); EMRCASE(EMR_EOF); + EMRCASE(EMR_SETPIXELV); + EMRCASE(EMR_SETMAPPERFLAGS); EMRCASE(EMR_SETMAPMODE); + EMRCASE(EMR_SETBKMODE); EMRCASE(EMR_SETPOLYFILLMODE); EMRCASE(EMR_SETROP2); + EMRCASE(EMR_SETSTRETCHBLTMODE); + EMRCASE(EMR_SETTEXTALIGN); + EMRCASE(EMR_SETCOLORADJUSTMENT); + EMRCASE(EMR_SETTEXTCOLOR); + EMRCASE(EMR_SETBKCOLOR); + EMRCASE(EMR_OFFSETCLIPRGN); + EMRCASE(EMR_MOVETOEX); + EMRCASE(EMR_SETMETARGN); + EMRCASE(EMR_EXCLUDECLIPRECT); + EMRCASE(EMR_INTERSECTCLIPRECT); + EMRCASE(EMR_SCALEVIEWPORTEXTEX); EMRCASE(EMR_SCALEWINDOWEXTEX); EMRCASE(EMR_SAVEDC); + EMRCASE(EMR_RESTOREDC); + EMRCASE(EMR_SETWORLDTRANSFORM); + EMRCASE(EMR_MODIFYWORLDTRANSFORM); EMRCASE(EMR_SELECTOBJECT); EMRCASE(EMR_CREATEPEN); EMRCASE(EMR_CREATEBRUSHINDIRECT); EMRCASE(EMR_DELETEOBJECT); + EMRCASE(EMR_ANGLEARC); + EMRCASE(EMR_ELLIPSE); EMRCASE(EMR_RECTANGLE); + EMRCASE(EMR_ROUNDRECT); + EMRCASE(EMR_ARC); + EMRCASE(EMR_CHORD); + EMRCASE(EMR_PIE); EMRCASE(EMR_SELECTPALETTE); + EMRCASE(EMR_CREATEPALETTE); + EMRCASE(EMR_SETPALETTEENTRIES); + EMRCASE(EMR_RESIZEPALETTE); + EMRCASE(EMR_REALIZEPALETTE); + EMRCASE(EMR_EXTFLOODFILL); + EMRCASE(EMR_LINETO); + EMRCASE(EMR_ARCTO); + EMRCASE(EMR_POLYDRAW); + EMRCASE(EMR_SETARCDIRECTION); + EMRCASE(EMR_SETMITERLIMIT); + EMRCASE(EMR_BEGINPATH); + EMRCASE(EMR_ENDPATH); + EMRCASE(EMR_CLOSEFIGURE); + EMRCASE(EMR_FILLPATH); + EMRCASE(EMR_STROKEANDFILLPATH); + EMRCASE(EMR_STROKEPATH); + EMRCASE(EMR_FLATTENPATH); + EMRCASE(EMR_WIDENPATH); + EMRCASE(EMR_SELECTCLIPPATH); + EMRCASE(EMR_ABORTPATH); EMRCASE(EMR_GDICOMMENT); + EMRCASE(EMR_FILLRGN); + EMRCASE(EMR_FRAMERGN); + EMRCASE(EMR_INVERTRGN); + EMRCASE(EMR_PAINTRGN); EMRCASE(EMR_EXTSELECTCLIPRGN); + EMRCASE(EMR_BITBLT); + EMRCASE(EMR_STRETCHBLT); + EMRCASE(EMR_MASKBLT); + EMRCASE(EMR_PLGBLT); + EMRCASE(EMR_SETDIBITSTODEVICE); + EMRCASE(EMR_STRETCHDIBITS); EMRCASE(EMR_EXTCREATEFONTINDIRECTW); + EMRCASE(EMR_EXTTEXTOUTA); EMRCASE(EMR_EXTTEXTOUTW); + EMRCASE(EMR_POLYBEZIER16); EMRCASE(EMR_POLYGON16); EMRCASE(EMR_POLYLINE16); + EMRCASE(EMR_POLYBEZIERTO16); + EMRCASE(EMR_POLYLINETO16); + EMRCASE(EMR_POLYPOLYLINE16); + EMRCASE(EMR_POLYPOLYGON16); + EMRCASE(EMR_POLYDRAW16); + EMRCASE(EMR_CREATEMONOBRUSH); + EMRCASE(EMR_CREATEDIBPATTERNBRUSHPT); + EMRCASE(EMR_EXTCREATEPEN); + EMRCASE(EMR_POLYTEXTOUTA); + EMRCASE(EMR_POLYTEXTOUTW); + EMRCASE(EMR_SETICMMODE); + EMRCASE(EMR_CREATECOLORSPACE); + EMRCASE(EMR_SETCOLORSPACE); + EMRCASE(EMR_DELETECOLORSPACE); + EMRCASE(EMR_GLSRECORD); + EMRCASE(EMR_GLSBOUNDEDRECORD); + EMRCASE(EMR_PIXELFORMAT); + EMRCASE(EMR_DRAWESCAPE); + EMRCASE(EMR_EXTESCAPE); + EMRCASE(EMR_STARTDOC); + EMRCASE(EMR_SMALLTEXTOUT); + EMRCASE(EMR_FORCEUFIMAPPING); + EMRCASE(EMR_NAMEDESCAPE); + EMRCASE(EMR_COLORCORRECTPALETTE); + EMRCASE(EMR_SETICMPROFILEA); + EMRCASE(EMR_SETICMPROFILEW); + EMRCASE(EMR_ALPHABLEND); + EMRCASE(EMR_SETLAYOUT); + EMRCASE(EMR_TRANSPARENTBLT); + EMRCASE(EMR_RESERVED_117); + EMRCASE(EMR_GRADIENTFILL); + EMRCASE(EMR_SETLINKEDUFI); + EMRCASE(EMR_SETTEXTJUSTIFICATION); + EMRCASE(EMR_COLORMATCHTOTARGETW); + EMRCASE(EMR_CREATECOLORSPACEW); default: - printf("%08x %08x\n",type,length); + printf("%u %08x\n", type, length); break; }
1
0
0
0
Dmitry Timoshkov : winex11.drv: Map zero-sized windows but don' t add WM decoration to them.
by Alexandre Julliard
17 Apr '08
17 Apr '08
Module: wine Branch: master Commit: 15c0bcb3d8eff7c38def24b58633bb1d6116d8c4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=15c0bcb3d8eff7c38def24b58…
Author: Dmitry Timoshkov <dmitry(a)codeweavers.com> Date: Wed Apr 16 16:50:29 2008 +0900 winex11.drv: Map zero-sized windows but don't add WM decoration to them. --- dlls/winex11.drv/window.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index ab63f3b..e0e8ea1 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -113,9 +113,6 @@ BOOL is_window_managed( HWND hwnd, UINT swp_flags, const RECT *window_rect ) */ BOOL X11DRV_is_window_rect_mapped( const RECT *rect ) { - /* don't map if rect is empty */ - if (IsRectEmpty( rect )) return FALSE; - /* don't map if rect is off-screen */ if (rect->left >= virtual_screen_rect.right || rect->top >= virtual_screen_rect.bottom || @@ -144,11 +141,14 @@ static inline BOOL is_window_resizable( struct x11drv_win_data *data, DWORD styl /*********************************************************************** * get_mwm_decorations */ -static unsigned long get_mwm_decorations( DWORD style, DWORD ex_style ) +static unsigned long get_mwm_decorations( struct x11drv_win_data *data, + DWORD style, DWORD ex_style ) { unsigned long ret = 0; - if (!decorated_mode) return ret; + if (!decorated_mode) return 0; + + if (IsRectEmpty( &data->window_rect )) return 0; if (ex_style & WS_EX_TOOLWINDOW) return 0; @@ -180,7 +180,7 @@ static void get_x11_rect_offset( struct x11drv_win_data *data, RECT *rect ) style = GetWindowLongW( data->hwnd, GWL_STYLE ); ex_style = GetWindowLongW( data->hwnd, GWL_EXSTYLE ); - decor = get_mwm_decorations( style, ex_style ); + decor = get_mwm_decorations( data, style, ex_style ); if (decor & MWM_DECOR_TITLE) style_mask |= WS_CAPTION; if (decor & MWM_DECOR_BORDER) @@ -876,7 +876,7 @@ void X11DRV_set_wm_hints( Display *display, struct x11drv_win_data *data ) XA_ATOM, 32, PropModeReplace, (unsigned char*)&window_type, 1); mwm_hints.flags = MWM_HINTS_FUNCTIONS | MWM_HINTS_DECORATIONS; - mwm_hints.decorations = get_mwm_decorations( style, ex_style ); + mwm_hints.decorations = get_mwm_decorations( data, style, ex_style ); mwm_hints.functions = MWM_FUNC_MOVE; if (is_window_resizable( data, style )) mwm_hints.functions |= MWM_FUNC_RESIZE; if (style & WS_MINIMIZEBOX) mwm_hints.functions |= MWM_FUNC_MINIMIZE;
1
0
0
0
Hin-Tak Leung : hhctrl.ocx: Look up in chm if url doesn't contain "://".
by Alexandre Julliard
17 Apr '08
17 Apr '08
Module: wine Branch: master Commit: 8988ab8f8d165b511c38395676c9fde88218b3ba URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8988ab8f8d165b511c3839567…
Author: Hin-Tak Leung <hintak_leung(a)yahoo.co.uk> Date: Mon Apr 14 20:17:27 2008 +0000 hhctrl.ocx: Look up in chm if url doesn't contain "://". --- dlls/hhctrl.ocx/help.c | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/dlls/hhctrl.ocx/help.c b/dlls/hhctrl.ocx/help.c index 900cfd9..a2081ce 100644 --- a/dlls/hhctrl.ocx/help.c +++ b/dlls/hhctrl.ocx/help.c @@ -89,9 +89,15 @@ BOOL NavigateToUrl(HHInfo *info, LPCWSTR surl) BOOL ret; HRESULT hres; - hres = navigate_url(info, surl); - if(SUCCEEDED(hres)) - return TRUE; + static const WCHAR url_indicator[] = {':', '/', '/'}; + + TRACE("%s\n", debugstr_w(surl)); + + if (strstrW(surl, url_indicator)) { + hres = navigate_url(info, surl); + if(SUCCEEDED(hres)) + return TRUE; + } /* look up in chm if it doesn't look like a full url */ SetChmPath(&chm_path, info->pCHMInfo->szFile, surl); ret = NavigateToChm(info, chm_path.chm_file, chm_path.chm_index);
1
0
0
0
Hin-Tak Leung : hhctrl.ocx: Return help window handle to caller.
by Alexandre Julliard
17 Apr '08
17 Apr '08
Module: wine Branch: master Commit: 76299b37ea61c23faa429c1489ba2952a5aa86ad URL:
http://source.winehq.org/git/wine.git/?a=commit;h=76299b37ea61c23faa429c148…
Author: Hin-Tak Leung <htl10(a)users.sourceforge.net> Date: Wed Apr 16 01:03:49 2008 +0000 hhctrl.ocx: Return help window handle to caller. --- dlls/hhctrl.ocx/hhctrl.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/dlls/hhctrl.ocx/hhctrl.c b/dlls/hhctrl.ocx/hhctrl.c index 472b7cf..c0054de 100644 --- a/dlls/hhctrl.ocx/hhctrl.c +++ b/dlls/hhctrl.ocx/hhctrl.c @@ -132,8 +132,7 @@ HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD_PTR dat if(!res) ReleaseHelpViewer(info); } - - return NULL; /* FIXME */ + return info->WinType.hwndHelp; } case HH_HELP_CONTEXT: { HHInfo *info; @@ -149,8 +148,7 @@ HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD_PTR dat NavigateToUrl(info, url); heap_free(url); - - return NULL; /* FIXME */ + return info->WinType.hwndHelp; } case HH_PRETRANSLATEMESSAGE: { static BOOL warned = FALSE;
1
0
0
0
Vincent Povirk : tools: Modify wine.desktop to use start.exe /unix.
by Alexandre Julliard
17 Apr '08
17 Apr '08
Module: wine Branch: master Commit: 790715123a27ae215ad9474c4aaea7547c393da7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=790715123a27ae215ad9474c4…
Author: Vincent Povirk <madewokherd+d41d(a)gmail.com> Date: Sat Apr 12 20:31:00 2008 -0400 tools: Modify wine.desktop to use start.exe /unix. --- tools/wine.desktop | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/wine.desktop b/tools/wine.desktop index a499530..2be9b53 100644 --- a/tools/wine.desktop +++ b/tools/wine.desktop @@ -7,6 +7,6 @@ Name[nl]=Wine Windows-emulator Name[sv]=Windows-emulatorn Wine Name[ru]=Wine Эмулятор Windows Name[fr]=Émulateur Windows Wine -Exec=wine %f +Exec=wine start /unix %f MimeType=application/x-ms-dos-executable;application/x-msdos-program;application/x-msdownload;application/exe;application/x-exe;application/dos-exe;vms/exe;application/x-winexe;application/msdos-windows;application/x-zip-compressed;application/x-executable; NoDisplay=true
1
0
0
0
Vincent Povirk : start.exe: Add /Unix switch for native file managers.
by Alexandre Julliard
17 Apr '08
17 Apr '08
Module: wine Branch: master Commit: fc29e334f6dcaf566bc17c5c5514929a395686f8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fc29e334f6dcaf566bc17c5c5…
Author: Vincent Povirk <madewokherd+d41d(a)gmail.com> Date: Sat Apr 12 20:30:42 2008 -0400 start.exe: Add /Unix switch for native file managers. --- programs/start/En.rc | 5 ++- programs/start/resources.h | 1 + programs/start/start.c | 97 +++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 101 insertions(+), 2 deletions(-) diff --git a/programs/start/En.rc b/programs/start/En.rc index 3817a59..212046c 100644 --- a/programs/start/En.rc +++ b/programs/start/En.rc @@ -33,6 +33,7 @@ Options: \n\ /MAX[imized] Start the program maximized. \n\ /R[estored] Start the program normally (neither minimized nor maximized). \n\ /W[ait] Wait for started program to finish, then exit with its exit code. \n\ +/Unix Use a Unix filename and start the file like windows explorer. \n\ /L Show end-user license. \n\ \n\ start.exe version 0.2 Copyright (C) 2003, Dan Kegel \n\ @@ -59,5 +60,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. \n\ See the COPYING.LIB file for license information. \n\ " -STRING_EXECFAIL "Application could not be started, or no application associated with the specified file.\nShellExecuteEx failed" +STRING_EXECFAIL, "Application could not be started, or no application associated with the specified file.\nShellExecuteEx failed" + +STRING_UNIXFAIL "Could not translate the specified Unix filename to a DOS filename." } diff --git a/programs/start/resources.h b/programs/start/resources.h index fb4fff8..f5abd31 100644 --- a/programs/start/resources.h +++ b/programs/start/resources.h @@ -21,3 +21,4 @@ #define STRING_USAGE 101 #define STRING_LICENSE 102 #define STRING_EXECFAIL 103 +#define STRING_UNIXFAIL 104 diff --git a/programs/start/start.c b/programs/start/start.c index 58748c8..c7a4ba4 100644 --- a/programs/start/start.c +++ b/programs/start/start.c @@ -151,13 +151,37 @@ static WCHAR *build_args( int argc, WCHAR **argvW ) return ret; } +static WCHAR *get_parent_dir(WCHAR* path) +{ + WCHAR *last_slash; + WCHAR *result; + int len; + + last_slash = strrchrW( path, '\\' ); + if (last_slash == NULL) + len = 1; + else + len = last_slash - path + 1; + + result = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + CopyMemory(result, path, (len-1)*sizeof(WCHAR)); + result[len-1] = '\0'; + + return result; +} + int wmain (int argc, WCHAR *argv[]) { SHELLEXECUTEINFOW sei; WCHAR *args = NULL; int i; + int unix_mode = 0; + WCHAR *dos_filename = NULL; + WCHAR *parent_directory = NULL; + DWORD binary_type; static const WCHAR openW[] = { 'o', 'p', 'e', 'n', 0 }; + static const WCHAR unixW[] = { 'u', 'n', 'i', 'x', 0 }; memset(&sei, 0, sizeof(sei)); sei.cbSize = sizeof(sei); @@ -178,6 +202,10 @@ int wmain (int argc, WCHAR *argv[]) if (argv[i][0] != '/') break; + /* Unix paths can start with / so we have to assume anything following /U is not a flag */ + if (unix_mode) + break; + /* Handle all options in this word */ for (ci=0; argv[i][ci]; ) { /* Skip slash */ @@ -198,6 +226,15 @@ int wmain (int argc, WCHAR *argv[]) case 'R': /* sei.nShow = SW_SHOWNORMAL; */ break; + case 'u': + case 'U': + if (strncmpiW(&argv[i][ci], unixW, 4) == 0) + unix_mode = 1; + else { + WINE_ERR("Option '%s' not recognized\n", wine_dbgstr_w( argv[i]+ci-1)); + usage(); + } + break; case 'w': case 'W': sei.fMask |= SEE_MASK_NOCLOSEPROCESS; @@ -220,10 +257,68 @@ int wmain (int argc, WCHAR *argv[]) args = build_args( argc - i, &argv[i] ); sei.lpParameters = args; - if (!ShellExecuteExW(&sei)) + if (unix_mode) { + LPWSTR (*wine_get_dos_file_name_ptr)(LPCSTR); + char* multibyte_unixpath; + int multibyte_unixpath_len; + + wine_get_dos_file_name_ptr = (void*)GetProcAddress(GetModuleHandle("KERNEL32"), "wine_get_dos_file_name"); + + if (!wine_get_dos_file_name_ptr) + fatal_string(STRING_UNIXFAIL); + + multibyte_unixpath_len = WideCharToMultiByte(CP_UNIXCP, 0, sei.lpFile, -1, NULL, 0, NULL, NULL); + multibyte_unixpath = HeapAlloc(GetProcessHeap(), 0, multibyte_unixpath_len); + + WideCharToMultiByte(CP_UNIXCP, 0, sei.lpFile, -1, multibyte_unixpath, multibyte_unixpath_len, NULL, NULL); + + dos_filename = wine_get_dos_file_name_ptr(multibyte_unixpath); + + HeapFree(GetProcessHeap(), 0, multibyte_unixpath); + + if (!dos_filename) + fatal_string(STRING_UNIXFAIL); + + sei.lpFile = dos_filename; + sei.lpDirectory = parent_directory = get_parent_dir(dos_filename); + + if (GetBinaryTypeW(sei.lpFile, &binary_type)) { + WCHAR *commandline; + STARTUPINFOW startup_info; + PROCESS_INFORMATION process_information; + static WCHAR commandlineformat[] = {'"','%','s','"','%','s',0}; + + /* explorer on windows always quotes the filename when running a binary on windows (see bug 5224) so we have to use CreateProcessW in this case */ + + commandline = HeapAlloc(GetProcessHeap(), 0, (strlenW(sei.lpFile)+3+strlenW(sei.lpParameters))*sizeof(WCHAR)); + sprintfW(commandline, commandlineformat, sei.lpFile, sei.lpParameters); + + ZeroMemory(&startup_info, sizeof(startup_info)); + startup_info.cb = sizeof(startup_info); + + if (!CreateProcessW( + NULL, /* lpApplicationName */ + commandline, /* lpCommandLine */ + NULL, /* lpProcessAttributes */ + NULL, /* lpThreadAttributes */ + FALSE, /* bInheritHandles */ + CREATE_NEW_CONSOLE, /* dwCreationFlags */ + NULL, /* lpEnvironment */ + sei.lpDirectory, /* lpCurrentDirectory */ + &startup_info, /* lpStartupInfo */ + &process_information /* lpProcessInformation */ )) + { + fatal_string_error(STRING_EXECFAIL, GetLastError()); + } + sei.hProcess = process_information.hProcess; + } + } + else if (!ShellExecuteExW(&sei)) fatal_string_error(STRING_EXECFAIL, GetLastError()); HeapFree( GetProcessHeap(), 0, args ); + HeapFree( GetProcessHeap(), 0, dos_filename ); + HeapFree( GetProcessHeap(), 0, parent_directory ); if (sei.fMask & SEE_MASK_NOCLOSEPROCESS) { DWORD exitcode;
1
0
0
0
← Newer
1
...
57
58
59
60
61
62
63
...
128
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
Results per page:
10
25
50
100
200