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
November 2021
----- 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
2 participants
951 discussions
Start a n
N
ew thread
Alexandre Julliard : widl: Windows file formats are always little-endian.
by Alexandre Julliard
11 Nov '21
11 Nov '21
Module: wine Branch: master Commit: ad53edfab98a1544b4367a4afa31f5fe770bc03e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ad53edfab98a1544b4367a4a…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Nov 11 17:44:35 2021 +0100 widl: Windows file formats are always little-endian. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/widl/typelib_struct.h | 20 -------------------- tools/widl/utils.c | 26 ++++++++++---------------- tools/widl/utils.h | 1 - tools/widl/write_msft.c | 14 -------------- 4 files changed, 10 insertions(+), 51 deletions(-) diff --git a/tools/widl/typelib_struct.h b/tools/widl/typelib_struct.h index 58dd95ec3bd..2a1fb745087 100644 --- a/tools/widl/typelib_struct.h +++ b/tools/widl/typelib_struct.h @@ -138,13 +138,8 @@ typedef struct tagMSFT_TypeInfoBase { /*040*/ INT helpstringcontext; /* */ INT helpcontext; /* */ INT oCustData; /* offset in customer data table */ -#ifdef WORDS_BIGENDIAN - INT16 cbSizeVft; /* virtual table size, including inherits */ - INT16 cImplTypes; /* nr of implemented interfaces */ -#else INT16 cImplTypes; /* nr of implemented interfaces */ INT16 cbSizeVft; /* virtual table size, including inherits */ -#endif /*050*/ INT size; /* size in bytes, at least for structures */ /* FIXME: name of this field */ INT datatype1; /* position in type description table */ @@ -174,13 +169,8 @@ typedef struct { /* INT recsize; record size including some extra stuff */ INT DataType; /* data type of the member, eg return of function */ INT Flags; /* something to do with attribute flags (LOWORD) */ -#ifdef WORDS_BIGENDIAN - INT16 funcdescsize; /* size of reconstituted FUNCDESC and related structs */ - INT16 VtableOffset; /* offset in vtable */ -#else INT16 VtableOffset; /* offset in vtable */ INT16 funcdescsize; /* size of reconstituted FUNCDESC and related structs */ -#endif INT FKCCIC; /* bit string with the following */ /* meaning (bit 0 is the lsb): */ /* bits 0 - 2: FUNCKIND */ @@ -191,13 +181,8 @@ typedef struct { /* bit 13: oEntry is numeric */ /* bit 14: has retval param */ /* bits 16 - 31: index of next function with same id */ -#ifdef WORDS_BIGENDIAN - INT16 nroargs; /* nr of optional arguments */ - INT16 nrargs; /* number of arguments (including optional ????) */ -#else INT16 nrargs; /* number of arguments (including optional ????) */ INT16 nroargs; /* nr of optional arguments */ -#endif /* optional attribute fields, the number of them is variable */ INT OptAttr[1]; /* @@ -230,13 +215,8 @@ typedef struct { /* INT recsize; // record size including some extra stuff */ INT DataType; /* data type of the variable */ INT Flags; /* VarFlags (LOWORD) */ -#ifdef WORDS_BIGENDIAN - INT16 vardescsize; /* size of reconstituted VARDESC and related structs */ - INT16 VarKind; /* VarKind */ -#else INT16 VarKind; /* VarKind */ INT16 vardescsize; /* size of reconstituted VARDESC and related structs */ -#endif INT OffsValue; /* value of the variable or the offset */ /* in the data structure */ /* optional attribute fields, the number of them is variable */ diff --git a/tools/widl/utils.c b/tools/widl/utils.c index 81558011d66..cf95f76e602 100644 --- a/tools/widl/utils.c +++ b/tools/widl/utils.c @@ -211,7 +211,6 @@ size_t strappend(char **buf, size_t *len, size_t pos, const char* fmt, ...) * Function for writing to a memory buffer. */ -int byte_swapped = 0; unsigned char *output_buffer; size_t output_buffer_pos; size_t output_buffer_size; @@ -351,29 +350,24 @@ void put_byte( unsigned char val ) void put_word( unsigned short val ) { - if (byte_swapped) val = (val << 8) | (val >> 8); - put_data( &val, sizeof(val) ); + check_output_buffer_space( 2 ); + output_buffer[output_buffer_pos++] = val; + output_buffer[output_buffer_pos++] = val >> 8; } void put_dword( unsigned int val ) { - if (byte_swapped) - val = ((val << 24) | ((val << 8) & 0x00ff0000) | ((val >> 8) & 0x0000ff00) | (val >> 24)); - put_data( &val, sizeof(val) ); + check_output_buffer_space( 4 ); + output_buffer[output_buffer_pos++] = val; + output_buffer[output_buffer_pos++] = val >> 8; + output_buffer[output_buffer_pos++] = val >> 16; + output_buffer[output_buffer_pos++] = val >> 24; } void put_qword( unsigned int val ) { - if (byte_swapped) - { - put_dword( 0 ); - put_dword( val ); - } - else - { - put_dword( val ); - put_dword( 0 ); - } + put_dword( val ); + put_dword( 0 ); } /* pointer-sized word */ diff --git a/tools/widl/utils.h b/tools/widl/utils.h index 1c172206781..29a04bff69d 100644 --- a/tools/widl/utils.h +++ b/tools/widl/utils.h @@ -40,7 +40,6 @@ int is_valid_uuid(const char *s); /* buffer management */ -extern int byte_swapped; extern unsigned char *output_buffer; extern size_t output_buffer_pos; extern size_t output_buffer_size; diff --git a/tools/widl/write_msft.c b/tools/widl/write_msft.c index 311b5017049..5e1e7274152 100644 --- a/tools/widl/write_msft.c +++ b/tools/widl/write_msft.c @@ -302,17 +302,10 @@ static int ctl2_encode_name( value = lhash_val_of_name_sys(typelib->typelib_header.varflags & 0x0f, typelib->typelib_header.lcid, converted_name + 4); -#ifdef WORDS_BIGENDIAN - converted_name[3] = length & 0xff; - converted_name[2] = length >> 8; - converted_name[1] = value; - converted_name[0] = value >> 8; -#else converted_name[0] = length & 0xff; converted_name[1] = length >> 8; converted_name[2] = value; converted_name[3] = value >> 8; -#endif for (offset = (4 - length) & 3; offset; offset--) converted_name[length + offset + 3] = 0x57; @@ -349,14 +342,8 @@ static int ctl2_encode_string( if (length < 3) size += 4; converted_string = xmalloc(size); memcpy(converted_string + 2, string, length); - -#ifdef WORDS_BIGENDIAN - converted_string[1] = length & 0xff; - converted_string[0] = (length >> 8) & 0xff; -#else converted_string[0] = length & 0xff; converted_string[1] = (length >> 8) & 0xff; -#endif if(length < 3) { /* strings of this length are padded with up to 8 bytes incl the 2 byte length */ for(offset = 0; offset < 4; offset++) @@ -2738,7 +2725,6 @@ static void save_all_changes(msft_typelib_t *typelib) ctl2_finalize_typeinfos(typelib, filepos); - byte_swapped = 0; init_output_buffer(); put_data(&typelib->typelib_header, sizeof(typelib->typelib_header));
1
0
0
0
Alexandre Julliard : wmc: Windows file formats are always little-endian.
by Alexandre Julliard
11 Nov '21
11 Nov '21
Module: wine Branch: master Commit: af046fe6361e414a7ed8917656540c0ee014815a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=af046fe6361e414a7ed89176…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Nov 11 17:36:56 2021 +0100 wmc: Windows file formats are always little-endian. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/wmc/mcl.c | 2 +- tools/wmc/utils.c | 21 ++++++++------------- tools/wmc/utils.h | 2 -- tools/wmc/wmc.c | 40 +--------------------------------------- tools/wmc/wmc.h | 1 - tools/wmc/wmc.man.in | 3 --- tools/wmc/wmctypes.h | 12 ------------ 7 files changed, 10 insertions(+), 71 deletions(-) diff --git a/tools/wmc/mcl.c b/tools/wmc/mcl.c index 0d7b50027c5..df058476129 100644 --- a/tools/wmc/mcl.c +++ b/tools/wmc/mcl.c @@ -239,7 +239,7 @@ static int fill_inputbuffer(void) case INPUT_UNICODE: len += fread( inputbuffer + len, sizeof(WCHAR), INPUTBUFFER_SIZE - len, yyin ); if (!len) break; - if (swapped) for (i = 0; i < len; i++) inputbuffer[i] = BYTESWAP_WORD( inputbuffer[i] ); + if (swapped) for (i = 0; i < len; i++) inputbuffer[i] = (inputbuffer[i] << 8) | (inputbuffer[i] >> 8); ninputbuffer = len; return 1; case INPUT_UNKNOWN: diff --git a/tools/wmc/utils.c b/tools/wmc/utils.c index d9d803413da..80e9cf0c96b 100644 --- a/tools/wmc/utils.c +++ b/tools/wmc/utils.c @@ -439,7 +439,6 @@ WCHAR *codepage_to_unicode( int codepage, const char *src, int srclen, int *dstl * Function for writing to a memory buffer. */ -int byte_swapped = 0; unsigned char *output_buffer; size_t output_buffer_pos; size_t output_buffer_size; @@ -470,13 +469,6 @@ void flush_output_buffer( const char *name ) free( output_buffer ); } -void put_data( const void *data, size_t size ) -{ - check_output_buffer_space( size ); - memcpy( output_buffer + output_buffer_pos, data, size ); - output_buffer_pos += size; -} - void put_byte( unsigned char val ) { check_output_buffer_space( 1 ); @@ -485,15 +477,18 @@ void put_byte( unsigned char val ) void put_word( unsigned short val ) { - if (byte_swapped) val = (val << 8) | (val >> 8); - put_data( &val, sizeof(val) ); + check_output_buffer_space( 2 ); + output_buffer[output_buffer_pos++] = val; + output_buffer[output_buffer_pos++] = val >> 8; } void put_dword( unsigned int val ) { - if (byte_swapped) - val = ((val << 24) | ((val << 8) & 0x00ff0000) | ((val >> 8) & 0x0000ff00) | (val >> 24)); - put_data( &val, sizeof(val) ); + check_output_buffer_space( 4 ); + output_buffer[output_buffer_pos++] = val; + output_buffer[output_buffer_pos++] = val >> 8; + output_buffer[output_buffer_pos++] = val >> 16; + output_buffer[output_buffer_pos++] = val >> 24; } void align_output( unsigned int align ) diff --git a/tools/wmc/utils.h b/tools/wmc/utils.h index 3a8010d77cc..4a4bef37ee8 100644 --- a/tools/wmc/utils.h +++ b/tools/wmc/utils.h @@ -43,14 +43,12 @@ WCHAR *codepage_to_unicode( int codepage, const char *src, int srclen, int *dstl /* buffer management */ -extern int byte_swapped; extern unsigned char *output_buffer; extern size_t output_buffer_pos; extern size_t output_buffer_size; extern void init_output_buffer(void); extern void flush_output_buffer( const char *name ); -extern void put_data( const void *data, size_t size ); extern void put_byte( unsigned char val ); extern void put_word( unsigned short val ); extern void put_dword( unsigned int val ); diff --git a/tools/wmc/wmc.c b/tools/wmc/wmc.c index 2993d3c5ef7..2d3dcaf328c 100644 --- a/tools/wmc/wmc.c +++ b/tools/wmc/wmc.c @@ -37,14 +37,6 @@ static const char usage[] = "Usage: wmc [options...] [inputfile.mc]\n" - " -B x Set output byte-order x={n[ative], l[ittle], b[ig]}\n" - " (default is n[ative] which equals " -#ifdef WORDS_BIGENDIAN - "big" -#else - "little" -#endif - "-endian)\n" " -c Set 'custom-bit' in values\n" " -d Use decimal values in output\n" " -D Set debug flag\n" @@ -70,11 +62,6 @@ static const char version_string[] = "Copyright 2000 Bertho A. Stultiens\n" ; -/* - * The output byte-order of resources (set with -B) - */ -int byteorder = WMC_BO_NATIVE; - /* * Custom bit (bit 29) in output values must be set (-c option) */ @@ -136,7 +123,7 @@ enum long_options_values LONG_OPT_NLS_DIR = 1, }; -static const char short_options[] = "B:cdDhH:io:O:P:uUvVW"; +static const char short_options[] = "cdDhH:io:O:P:uUvVW"; static const struct long_option long_options[] = { { "help", 0, 'h' }, @@ -190,25 +177,6 @@ static void option_callback( int optc, char *optarg ) { switch(optc) { - case 'B': - switch(optarg[0]) - { - case 'n': - case 'N': - byteorder = WMC_BO_NATIVE; - break; - case 'l': - case 'L': - byteorder = WMC_BO_LITTLE; - break; - case 'b': - case 'B': - byteorder = WMC_BO_BIG; - break; - default: - error("Byteordering must be n[ative], l[ittle] or b[ig]\n"); - } - break; case 'c': custombit = 1; break; @@ -347,12 +315,6 @@ int main(int argc,char *argv[]) exit(1); } -#ifdef WORDS_BIGENDIAN - byte_swapped = (byteorder == WMC_BO_LITTLE); -#else - byte_swapped = (byteorder == WMC_BO_BIG); -#endif - switch (output_format) { case FORMAT_RC: diff --git a/tools/wmc/wmc.h b/tools/wmc/wmc.h index e9736103fe3..1939cb8c084 100644 --- a/tools/wmc/wmc.h +++ b/tools/wmc/wmc.h @@ -39,7 +39,6 @@ extern int pedantic; extern int leave_case; -extern int byteorder; extern int decimal; extern int custombit; extern int unicodein; diff --git a/tools/wmc/wmc.man.in b/tools/wmc/wmc.man.in index 123af446a5e..bfa0a19a314 100644 --- a/tools/wmc/wmc.man.in +++ b/tools/wmc/wmc.man.in @@ -22,9 +22,6 @@ with \fB-o\fR, then \fBwmc\fR will write the output to \fIinputfile.{rc,h}\fR. The outputfile is named \fIwmc.tab.{rc,h}\fR if no inputfile was given. .SH OPTIONS .TP -.BI \-B\ x -Set output byte-order x={n[ative], l[ittle], b[ig]}. Default is n[ative]. -.TP .B \-c Set 'custom-bit' in message-code values. .TP diff --git a/tools/wmc/wmctypes.h b/tools/wmc/wmctypes.h index 116ace20545..12227f2d7aa 100644 --- a/tools/wmc/wmctypes.h +++ b/tools/wmc/wmctypes.h @@ -25,18 +25,6 @@ #include "windef.h" #include "winbase.h" -/* Byteordering defines */ -#define WMC_BO_NATIVE 0x00 -#define WMC_BO_LITTLE 0x01 -#define WMC_BO_BIG 0x02 - -#define WMC_LOBYTE(w) ((WORD)(w) & 0xff) -#define WMC_HIBYTE(w) (((WORD)(w) >> 8) & 0xff) -#define WMC_LOWORD(d) ((DWORD)(d) & 0xffff) -#define WMC_HIWORD(d) (((DWORD)(d) >> 16) & 0xffff) -#define BYTESWAP_WORD(w) ((WORD)(((WORD)WMC_LOBYTE(w) << 8) + (WORD)WMC_HIBYTE(w))) -#define BYTESWAP_DWORD(d) ((DWORD)(((DWORD)BYTESWAP_WORD(WMC_LOWORD(d)) << 16) + ((DWORD)BYTESWAP_WORD(WMC_HIWORD(d))))) - /* * Tokenizer types */
1
0
0
0
Alexandre Julliard : wrc: Windows file formats are always little-endian.
by Alexandre Julliard
11 Nov '21
11 Nov '21
Module: wine Branch: master Commit: 923461f3d81b14a1645334331403892015a5b482 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=923461f3d81b14a164533433…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Nov 11 17:36:17 2021 +0100 wrc: Windows file formats are always little-endian. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/wrc/genres.c | 116 ++------- tools/wrc/newstruc.c | 670 +++------------------------------------------------ tools/wrc/parser.y | 95 +------- tools/wrc/wrc.c | 34 --- tools/wrc/wrc.h | 2 +- tools/wrc/wrc.man.in | 6 - tools/wrc/wrctypes.h | 13 +- 7 files changed, 61 insertions(+), 875 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=923461f3d81b14a16453…
1
0
0
0
Alexandre Julliard : wrc: Ignore the target option.
by Alexandre Julliard
11 Nov '21
11 Nov '21
Module: wine Branch: master Commit: 7c5761ed40f0b8cead7fa837b745b687d5df67d8 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7c5761ed40f0b8cead7fa837…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Nov 11 16:21:00 2021 +0100 wrc: Ignore the target option. Nothing in resource files depends on the pointer size. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/makedep.c | 1 - tools/wrc/wrc.c | 33 ++++----------------------------- tools/wrc/wrc.man.in | 5 ----- 3 files changed, 4 insertions(+), 35 deletions(-) diff --git a/tools/makedep.c b/tools/makedep.c index 8d682e763fb..2a52ecd09c0 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -2697,7 +2697,6 @@ static void output_source_rc( struct makefile *make, struct incl_file *source, c output( "\n" ); output( "\t%s%s -u -o $@", cmd_prefix( "WRC" ), tools_path( make, "wrc" ) ); if (make->is_win16) output_filename( "-m16" ); - else output_filenames( target_flags ); output_filename( "--nostdinc" ); if (po_dir) output_filename( strmake( "--po-dir=%s", po_dir )); output_filenames( defines ); diff --git a/tools/wrc/wrc.c b/tools/wrc/wrc.c index b44ae6fd0e5..e3dc2d3f2b1 100644 --- a/tools/wrc/wrc.c +++ b/tools/wrc/wrc.c @@ -50,20 +50,19 @@ static const char usage[] = "Usage: wrc [options...] [infile[.rc|.res]]\n" - " -b, --target=TARGET Specify target CPU and platform when cross-compiling\n" " -D, --define id[=val] Define preprocessor identifier id=val\n" " --debug=nn Set debug level to 'nn'\n" " -E Preprocess only\n" " --endianness=e Set output byte-order e={n[ative], l[ittle], b[ig]}\n" " (win32 only; default is " ENDIAN "-endian)\n" - " -F TARGET Synonym for -b for compatibility with windres\n" + " -F TARGET Ignored, for compatibility with windres\n" " -fo FILE Synonym for -o for compatibility with windres\n" " -h, --help Prints this summary\n" " -i, --input=FILE The name of the input file\n" " -I, --include-dir=PATH Set include search dir to path (multiple -I allowed)\n" " -J, --input-format=FORMAT The input format (either `rc' or `rc16')\n" " -l, --language=LANG Set default language to LANG (default is neutral {0, 0})\n" - " -m16, -m32, -m64 Build for 16-bit, 32-bit resp. 64-bit platforms\n" + " -m16 Build a 16-bit resource file\n" " --nls-dir=DIR Directory containing the NLS codepage mappings\n" " --no-use-temp-file Ignored for compatibility with windres\n" " --nostdinc Disables searching the standard include path\n" @@ -147,8 +146,6 @@ int utf8_input = 0; int check_utf8 = 1; /* whether to check for valid utf8 */ -static int pointer_size = sizeof(void *); - static int verify_translations_mode; static char *output_name; /* The name given by the -o option */ @@ -317,22 +314,6 @@ static int load_file( const char *input_name, const char *output_name ) return ret; } -static void set_target( const char *target ) -{ - char *p, *cpu = xstrdup( target ); - - /* target specification is in the form CPU-MANUFACTURER-OS or CPU-MANUFACTURER-KERNEL-OS */ - if (!(p = strchr( cpu, '-' ))) error( "Invalid target specification '%s'\n", target ); - *p = 0; - if (!strcmp( cpu, "amd64" ) || !strcmp( cpu, "x86_64" ) || - !strcmp( cpu, "ia64" ) || !strcmp( cpu, "aarch64" ) || - !strcmp( cpu, "powerpc64" ) || !strcmp( cpu, "powerpc64le" )) - pointer_size = 8; - else - pointer_size = 4; - free( cpu ); -} - static void init_argv0_dir( const char *argv0 ) { #ifndef _WIN32 @@ -424,7 +405,6 @@ static void option_callback( int optc, char *optarg ) break; case 'b': case 'F': - set_target( optarg ); break; case 'h': printf(usage); @@ -450,8 +430,7 @@ static void option_callback( int optc, char *optarg ) break; case 'm': if (!strcmp( optarg, "16" )) win32 = 0; - else if (!strcmp( optarg, "32" )) { win32 = 1; pointer_size = 4; } - else if (!strcmp( optarg, "64" )) { win32 = 1; pointer_size = 8; } + else win32 = 1; break; case 'f': if (*optarg != 'o') error("Unknown option: -f%s\n", optarg); @@ -506,11 +485,7 @@ int main(int argc,char *argv[]) strarray_addall( &input_files, parse_options( argc, argv, short_options, long_options, 0, option_callback )); - if (win32) - { - wpp_add_cmdline_define("_WIN32=1"); - if (pointer_size == 8) wpp_add_cmdline_define("_WIN64=1"); - } + if (win32) wpp_add_cmdline_define("_WIN32=1"); /* If we do need to search standard includes, add them to the path */ if (stdinc) diff --git a/tools/wrc/wrc.man.in b/tools/wrc/wrc.man.in index e3ad8fca4d9..275a6b609f4 100644 --- a/tools/wrc/wrc.man.in +++ b/tools/wrc/wrc.man.in @@ -21,11 +21,6 @@ specified with \fB-o\fR, then \fBwrc\fR will write the output to no inputfile was given. .SH OPTIONS .TP -.BI \-b,\ --target= cpu-manufacturer\fR[\fI\fB-\fIkernel\fR]\fB-\fIos -Specify the target CPU and platform on which the generated code will -be built. The target specification is in the standard autoconf format -as returned by \fBconfig.sub\fR. -.TP .I \fB\-D\fR, \fB\-\-define\fR=\fIid\fR[\fB=\fIval\fR] Define preprocessor identifier \fIid\fR to (optionally) value \fIval\fR. See also
1
0
0
0
Alexandre Julliard : makefiles: Explicitly import all the needed libraries.
by Alexandre Julliard
11 Nov '21
11 Nov '21
Module: wine Branch: master Commit: 6ebcc54a5c2c4b5724571f37ab41e99ee9e49acb URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6ebcc54a5c2c4b5724571f37…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Nov 11 11:38:31 2021 +0100 makefiles: Explicitly import all the needed libraries. Don't rely on winegcc adding any default libraries. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/krnl386.exe16/Makefile.in | 3 +- tools/makedep.c | 162 +++++++++++++++++++++-------------------- tools/winegcc/winegcc.c | 4 - 3 files changed, 85 insertions(+), 84 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=6ebcc54a5c2c4b572457…
1
0
0
0
Zhiyi Zhang : comctl32/button: Support BS_PUSHLIKE for themed command links.
by Alexandre Julliard
11 Nov '21
11 Nov '21
Module: wine Branch: master Commit: ce9d006a4511f36aeab4c0205c23725d0e03e730 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ce9d006a4511f36aeab4c020…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Thu Nov 11 15:04:26 2021 +0800 comctl32/button: Support BS_PUSHLIKE for themed command links. Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/button.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/dlls/comctl32/button.c b/dlls/comctl32/button.c index f158a7423b9..2e3d8912a66 100644 --- a/dlls/comctl32/button.c +++ b/dlls/comctl32/button.c @@ -3040,6 +3040,7 @@ static void CL_ThemedPaint(HTHEME theme, const BUTTON_INFO *infoPtr, HDC hDC, in NMCUSTOMDRAW nmcd; LRESULT cdrf; HWND parent; + int part; RECT rc; if (infoPtr->font) SelectObject(hDC, infoPtr->font); @@ -3054,9 +3055,10 @@ static void CL_ThemedPaint(HTHEME theme, const BUTTON_INFO *infoPtr, HDC hDC, in cdrf = SendMessageW(parent, WM_NOTIFY, nmcd.hdr.idFrom, (LPARAM)&nmcd); if (cdrf & CDRF_SKIPDEFAULT) return; - if (IsThemeBackgroundPartiallyTransparent(theme, BP_COMMANDLINK, state)) + part = GetWindowLongW(infoPtr->hwnd, GWL_STYLE) & BS_PUSHLIKE ? BP_PUSHBUTTON : BP_COMMANDLINK; + if (IsThemeBackgroundPartiallyTransparent(theme, part, state)) DrawThemeParentBackground(infoPtr->hwnd, hDC, NULL); - DrawThemeBackground(theme, hDC, BP_COMMANDLINK, state, &rc, NULL); + DrawThemeBackground(theme, hDC, part, state, &rc, NULL); if (cdrf & CDRF_NOTIFYPOSTERASE) { @@ -3076,7 +3078,7 @@ static void CL_ThemedPaint(HTHEME theme, const BUTTON_INFO *infoPtr, HDC hDC, in SIZE img_size; WCHAR *text; - GetThemeBackgroundContentRect(theme, hDC, BP_COMMANDLINK, state, &rc, &r); + GetThemeBackgroundContentRect(theme, hDC, part, state, &rc, &r); /* The text alignment and styles are fixed and don't depend on button styles */ dtFlags = DT_TOP | DT_LEFT | DT_WORDBREAK; @@ -3096,10 +3098,9 @@ static void CL_ThemedPaint(HTHEME theme, const BUTTON_INFO *infoPtr, HDC hDC, in UINT len = lstrlenW(text); RECT text_rect; - GetThemeTextExtent(theme, hDC, BP_COMMANDLINK, state, text, len, - dtFlags | DT_END_ELLIPSIS, &r, &text_rect); - DrawThemeText(theme, hDC, BP_COMMANDLINK, state, text, len, - dtFlags | DT_END_ELLIPSIS, 0, &r); + GetThemeTextExtent(theme, hDC, part, state, text, len, dtFlags | DT_END_ELLIPSIS, &r, + &text_rect); + DrawThemeText(theme, hDC, part, state, text, len, dtFlags | DT_END_ELLIPSIS, 0, &r); txt_h = text_rect.bottom - text_rect.top; heap_free(text); @@ -3114,8 +3115,7 @@ static void CL_ThemedPaint(HTHEME theme, const BUTTON_INFO *infoPtr, HDC hDC, in opts.dwSize = sizeof(opts); opts.dwFlags = DTT_FONTPROP; opts.iFontPropId = TMT_BODYFONT; - DrawThemeTextEx(theme, hDC, BP_COMMANDLINK, state, - infoPtr->note, infoPtr->note_length, + DrawThemeTextEx(theme, hDC, part, state, infoPtr->note, infoPtr->note_length, dtFlags | DT_NOPREFIX, &r, &opts); }
1
0
0
0
Zhiyi Zhang : comctl32/button: Support BS_PUSHLIKE for themed group boxes.
by Alexandre Julliard
11 Nov '21
11 Nov '21
Module: wine Branch: master Commit: 3a2d2adc4ea771fcfb03fe60dc7afe568e1bfaf0 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3a2d2adc4ea771fcfb03fe60…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Thu Nov 11 15:04:19 2021 +0800 comctl32/button: Support BS_PUSHLIKE for themed group boxes. Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/button.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/dlls/comctl32/button.c b/dlls/comctl32/button.c index 74de83b461a..f158a7423b9 100644 --- a/dlls/comctl32/button.c +++ b/dlls/comctl32/button.c @@ -448,7 +448,7 @@ static int get_draw_state(const BUTTON_INFO *infoPtr) return style & BS_PUSHLIKE ? pushlike_rb_states[check_state][state] : rb_states[check_state][state]; case BS_GROUPBOX: - return gb_states[state]; + return style & BS_PUSHLIKE ? pb_states[state] : gb_states[state]; default: WARN("Unsupported button type 0x%08x\n", type); return PBS_NORMAL; @@ -2883,6 +2883,7 @@ static void GB_ThemedPaint(HTHEME theme, const BUTTON_INFO *infoPtr, HDC hDC, in HFONT font, hPrevFont = NULL; BOOL created_font = FALSE; TEXTMETRICW textMetric; + int part; HRESULT hr = GetThemeFont(theme, hDC, BP_GROUPBOX, state, TMT_FONT, &lf); if (SUCCEEDED(hr)) { @@ -2914,9 +2915,10 @@ static void GB_ThemedPaint(HTHEME theme, const BUTTON_INFO *infoPtr, HDC hDC, in ExtSelectClipRgn(hDC, textRegion, RGN_DIFF); } - if (IsThemeBackgroundPartiallyTransparent(theme, BP_GROUPBOX, state)) + part = GetWindowLongW(infoPtr->hwnd, GWL_STYLE) & BS_PUSHLIKE ? BP_PUSHBUTTON : BP_GROUPBOX; + if (IsThemeBackgroundPartiallyTransparent(theme, part, state)) DrawThemeParentBackground(infoPtr->hwnd, hDC, NULL); - DrawThemeBackground(theme, hDC, BP_GROUPBOX, state, &bgRect, NULL); + DrawThemeBackground(theme, hDC, part, state, &bgRect, NULL); if (dtFlags != (UINT)-1) { @@ -2928,7 +2930,7 @@ static void GB_ThemedPaint(HTHEME theme, const BUTTON_INFO *infoPtr, HDC hDC, in SelectClipRgn(hDC, textRegion); DeleteObject(textRegion); } - BUTTON_DrawThemedLabel(infoPtr, hDC, dtFlags, &imageRect, &textRect, theme, BP_GROUPBOX, state); + BUTTON_DrawThemedLabel(infoPtr, hDC, dtFlags, &imageRect, &textRect, theme, part, state); } SelectClipRgn(hDC, region);
1
0
0
0
Zhiyi Zhang : comctl32/button: Correctly align parts in group boxes with BS_PUSHLIKE when theming is off.
by Alexandre Julliard
11 Nov '21
11 Nov '21
Module: wine Branch: master Commit: 9e9448e72b132e97b74b3f8b603c7a83682eced6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9e9448e72b132e97b74b3f8b…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Thu Nov 11 15:04:06 2021 +0800 comctl32/button: Correctly align parts in group boxes with BS_PUSHLIKE when theming is off. Parts in group boxes with BS_PUSHLIKE can be at the bottom, center and top when theming is off. Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/button.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/dlls/comctl32/button.c b/dlls/comctl32/button.c index af2fefabe2b..74de83b461a 100644 --- a/dlls/comctl32/button.c +++ b/dlls/comctl32/button.c @@ -1589,6 +1589,11 @@ static UINT BUTTON_CalcLayoutRects(const BUTTON_INFO *infoPtr, HDC hdc, RECT *la split_style = infoPtr->imagelist.himl ? BUTTON_ILStoBS(infoPtr->imagelist.uAlign) : style; dtStyle = BUTTON_BStoDT(style, ex_style); + /* Group boxes are top aligned unless BS_PUSHLIKE is set and it's not themed */ + if (get_button_type(style) == BS_GROUPBOX + && (!(style & BS_PUSHLIKE) || GetWindowTheme(infoPtr->hwnd))) + style &= ~BS_VCENTER | BS_TOP; + SetRect(&imageRect, 0, 0, imageSize.cx, imageSize.cy); imageRectWithMargin = imageRect; if (infoPtr->imagelist.himl) @@ -1670,11 +1675,7 @@ static UINT BUTTON_CalcLayoutRects(const BUTTON_INFO *infoPtr, HDC hdc, RECT *la /* Show text only */ else { - if (get_button_type(style) != BS_GROUPBOX) - BUTTON_PositionRect(style, labelRc, &textRect, textMargin); - else - /* GroupBox is always top aligned */ - BUTTON_PositionRect((style & ~BS_VCENTER) | BS_TOP, labelRc, &textRect, textMargin); + BUTTON_PositionRect(style, labelRc, &textRect, textMargin); labelRect = textRect; SetRectEmpty(&imageRect); }
1
0
0
0
Zhiyi Zhang : comctl32/button: Support BS_PUSHLIKE for themed check boxes and radio buttons.
by Alexandre Julliard
11 Nov '21
11 Nov '21
Module: wine Branch: master Commit: fcd63df4213342a26687eaa9bf17d9aff9ab177c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=fcd63df4213342a26687eaa9…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Thu Nov 11 15:03:58 2021 +0800 comctl32/button: Support BS_PUSHLIKE for themed check boxes and radio buttons. Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/button.c | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/dlls/comctl32/button.c b/dlls/comctl32/button.c index 93f6c21bab1..af2fefabe2b 100644 --- a/dlls/comctl32/button.c +++ b/dlls/comctl32/button.c @@ -393,11 +393,22 @@ static int get_draw_state(const BUTTON_INFO *infoPtr) { CBS_CHECKEDNORMAL, CBS_CHECKEDDISABLED, CBS_CHECKEDHOT, CBS_CHECKEDPRESSED, CBS_CHECKEDNORMAL }, { CBS_MIXEDNORMAL, CBS_MIXEDDISABLED, CBS_MIXEDHOT, CBS_MIXEDPRESSED, CBS_MIXEDNORMAL } }; + static const int pushlike_cb_states[3][DRAW_STATE_COUNT] = + { + { PBS_NORMAL, PBS_DISABLED, PBS_HOT, PBS_PRESSED, PBS_NORMAL }, + { PBS_PRESSED, PBS_PRESSED, PBS_HOT, PBS_PRESSED, PBS_PRESSED }, + { PBS_NORMAL, PBS_DISABLED, PBS_HOT, PBS_PRESSED, PBS_NORMAL } + }; static const int rb_states[2][DRAW_STATE_COUNT] = { { RBS_UNCHECKEDNORMAL, RBS_UNCHECKEDDISABLED, RBS_UNCHECKEDHOT, RBS_UNCHECKEDPRESSED, RBS_UNCHECKEDNORMAL }, { RBS_CHECKEDNORMAL, RBS_CHECKEDDISABLED, RBS_CHECKEDHOT, RBS_CHECKEDPRESSED, RBS_CHECKEDNORMAL } }; + static const int pushlike_rb_states[2][DRAW_STATE_COUNT] = + { + { PBS_NORMAL, PBS_DISABLED, PBS_HOT, PBS_PRESSED, PBS_NORMAL }, + { PBS_PRESSED, PBS_PRESSED, PBS_HOT, PBS_PRESSED, PBS_PRESSED } + }; static const int gb_states[DRAW_STATE_COUNT] = { GBS_NORMAL, GBS_DISABLED, GBS_NORMAL, GBS_NORMAL, GBS_NORMAL }; LONG style = GetWindowLongW(infoPtr->hwnd, GWL_STYLE); UINT type = get_button_type(style); @@ -430,10 +441,12 @@ static int get_draw_state(const BUTTON_INFO *infoPtr) case BS_AUTOCHECKBOX: case BS_3STATE: case BS_AUTO3STATE: - return cb_states[check_state][state]; + return style & BS_PUSHLIKE ? pushlike_cb_states[check_state][state] + : cb_states[check_state][state]; case BS_RADIOBUTTON: case BS_AUTORADIOBUTTON: - return rb_states[check_state][state]; + return style & BS_PUSHLIKE ? pushlike_rb_states[check_state][state] + : rb_states[check_state][state]; case BS_GROUPBOX: return gb_states[state]; default: @@ -2763,8 +2776,15 @@ static void CB_ThemedPaint(HTHEME theme, const BUTTON_INFO *infoPtr, HDC hDC, in int text_offset; SIZE box_size; HRGN region; + HRESULT hr; + + if (dwStyle & BS_PUSHLIKE) + { + PB_ThemedPaint(theme, infoPtr, hDC, state, dtFlags, focused); + return; + } - HRESULT hr = GetThemeFont(theme, hDC, part, state, TMT_FONT, &lf); + hr = GetThemeFont(theme, hDC, part, state, TMT_FONT, &lf); if (SUCCEEDED(hr)) { font = CreateFontIndirectW(&lf); if (!font)
1
0
0
0
Zhiyi Zhang : comctl32/button: Use correct state for default buttons.
by Alexandre Julliard
11 Nov '21
11 Nov '21
Module: wine Branch: master Commit: ed06aa2f7efc045f6f9914c817c255085e9d1daf URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ed06aa2f7efc045f6f9914c8…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Thu Nov 11 15:03:51 2021 +0800 comctl32/button: Use correct state for default buttons. Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/button.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/comctl32/button.c b/dlls/comctl32/button.c index b612273c0c1..93f6c21bab1 100644 --- a/dlls/comctl32/button.c +++ b/dlls/comctl32/button.c @@ -410,7 +410,8 @@ static int get_draw_state(const BUTTON_INFO *infoPtr) state = STATE_PRESSED; else if (infoPtr->state & BST_HOT) state = STATE_HOT; - else if (infoPtr->state & BST_FOCUS) + else if (infoPtr->state & BST_FOCUS || type == BS_DEFPUSHBUTTON || type == BS_DEFSPLITBUTTON + || (type == BS_DEFCOMMANDLINK && !(style & BS_PUSHLIKE))) state = STATE_DEFAULTED; else state = STATE_NORMAL;
1
0
0
0
← Newer
1
...
54
55
56
57
58
59
60
...
96
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
Results per page:
10
25
50
100
200