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
January 2007
----- 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
893 discussions
Start a n
N
ew thread
Alexandre Julliard : widl: Skip local functions when building format strings.
by Alexandre Julliard
25 Jan '07
25 Jan '07
Module: wine Branch: master Commit: 8e3c5c9ab927536fd1f479825ddde29cb66eaa73 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8e3c5c9ab927536fd1f479825…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jan 24 20:06:51 2007 +0100 widl: Skip local functions when building format strings. --- tools/widl/typegen.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c index ac3ab94..936812d 100644 --- a/tools/widl/typegen.c +++ b/tools/widl/typegen.c @@ -283,6 +283,7 @@ void write_procformatstring(FILE *file, const func_t *func; LIST_FOR_EACH_ENTRY( func, iface->iface->funcs, const func_t, entry ) { + if (is_local(func->def->attrs)) continue; /* emit argument data */ if (func->args) { @@ -1473,6 +1474,7 @@ void write_typeformatstring(FILE *file, const func_t *func; LIST_FOR_EACH_ENTRY( func, iface->iface->funcs, const func_t, entry ) { + if (is_local(func->def->attrs)) continue; current_func = func; if (func->args) LIST_FOR_EACH_ENTRY( var, func->args, const var_t, entry ) @@ -2032,6 +2034,7 @@ size_t get_size_typeformatstring(const i { LIST_FOR_EACH_ENTRY( func, iface->iface->funcs, const func_t, entry ) { + if (is_local(func->def->attrs)) continue; /* argument list size */ if (func->args) LIST_FOR_EACH_ENTRY( var, func->args, const var_t, entry )
1
0
0
0
Alexandre Julliard : widl: Export a function to compute the proc format string size for a function.
by Alexandre Julliard
25 Jan '07
25 Jan '07
Module: wine Branch: master Commit: 6dd5afd723703c67d79cf8d27e08250a6ad73dba URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6dd5afd723703c67d79cf8d27…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jan 24 20:05:22 2007 +0100 widl: Export a function to compute the proc format string size for a function. --- tools/widl/server.c | 10 +--------- tools/widl/typegen.c | 37 +++++++++++++++++++++---------------- tools/widl/typegen.h | 1 + 3 files changed, 23 insertions(+), 25 deletions(-) diff --git a/tools/widl/server.c b/tools/widl/server.c index 56c2761..75b9647 100644 --- a/tools/widl/server.c +++ b/tools/widl/server.c @@ -270,15 +270,7 @@ static void write_function_stubs(type_t fprintf(server, "\n"); /* update proc_offset */ - if (func->args) - { - LIST_FOR_EACH_ENTRY( var, func->args, const var_t, entry ) - *proc_offset += get_size_procformatstring_var(var); - } - if (!is_void(def->type, NULL)) - *proc_offset += get_size_procformatstring_var(def); - else - *proc_offset += 2; /* FC_END and FC_PAD */ + *proc_offset += get_size_procformatstring_func( func ); } } diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c index 1e6c2da..ac3ab94 100644 --- a/tools/widl/typegen.c +++ b/tools/widl/typegen.c @@ -1971,6 +1971,25 @@ size_t get_size_procformatstring_var(con } +size_t get_size_procformatstring_func(const func_t *func) +{ + const var_t *var; + size_t size = 0; + + /* argument list size */ + if (func->args) + LIST_FOR_EACH_ENTRY( var, func->args, const var_t, entry ) + size += get_size_procformatstring_var(var); + + /* return value size */ + if (is_void(func->def->type, NULL)) + size += 2; /* FC_END and FC_PAD */ + else + size += get_size_procformatstring_var(func->def); + + return size; +} + size_t get_size_typeformatstring_var(const var_t *var) { unsigned int type_offset = 0; @@ -1983,7 +2002,6 @@ size_t get_size_procformatstring(const i const ifref_t *iface; size_t size = 1; const func_t *func; - const var_t *var; if (ifaces) LIST_FOR_EACH_ENTRY( iface, ifaces, const ifref_t, entry ) { @@ -1991,22 +2009,9 @@ size_t get_size_procformatstring(const i continue; if (iface->iface->funcs) - { LIST_FOR_EACH_ENTRY( func, iface->iface->funcs, const func_t, entry ) - { - /* argument list size */ - if (func->args) - LIST_FOR_EACH_ENTRY( var, func->args, const var_t, entry ) - size += get_size_procformatstring_var(var); - - var = func->def; - /* return value size */ - if (is_void(var->type, NULL)) - size += 2; - else - size += get_size_procformatstring_var(var); - } - } + if (!is_local(func->def->attrs)) + size += get_size_procformatstring_func( func ); } return size; } diff --git a/tools/widl/typegen.h b/tools/widl/typegen.h index dcbe4d3..7ebf6d9 100644 --- a/tools/widl/typegen.h +++ b/tools/widl/typegen.h @@ -42,6 +42,7 @@ size_t get_type_memsize(const type_t *ty void print_phase_basetype(FILE *file, int indent, enum remoting_phase phase, enum pass pass, const var_t *var, const char *varname); void write_remoting_arguments(FILE *file, int indent, const func_t *func, unsigned int *type_offset, enum pass pass, enum remoting_phase phase); size_t get_size_procformatstring_var(const var_t *var); +size_t get_size_procformatstring_func(const func_t *func); size_t get_size_typeformatstring_var(const var_t *var); size_t get_size_procformatstring(const ifref_list_t *ifaces, int for_objects); size_t get_size_typeformatstring(const ifref_list_t *ifaces, int for_objects);
1
0
0
0
Alexandre Julliard : widl: Move initialization of the stub buffer size into write_remoting_arguments( ).
by Alexandre Julliard
25 Jan '07
25 Jan '07
Module: wine Branch: master Commit: 6655071a3feca80835eaf2b8274d1765915471c9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6655071a3feca80835eaf2b82…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jan 24 20:02:05 2007 +0100 widl: Move initialization of the stub buffer size into write_remoting_arguments(). --- tools/widl/client.c | 23 ----------------------- tools/widl/server.c | 24 ------------------------ tools/widl/typegen.c | 30 +++++++++++++++++++++++++++++- tools/widl/typegen.h | 1 - 4 files changed, 29 insertions(+), 49 deletions(-) diff --git a/tools/widl/client.c b/tools/widl/client.c index 60eb27d..5fcffeb 100644 --- a/tools/widl/client.c +++ b/tools/widl/client.c @@ -59,24 +59,6 @@ static int print_client( const char *for } -static void print_message_buffer_size(const func_t *func) -{ - unsigned int total_size = 0; - - if (func->args) - { - const var_t *var; - LIST_FOR_EACH_ENTRY( var, func->args, const var_t, entry ) - { - unsigned int alignment; - - total_size += get_required_buffer_size(var, &alignment, PASS_IN); - total_size += alignment; - } - } - fprintf(client, " %u", total_size); -} - static void check_pointers(const func_t *func) { const var_t *var; @@ -189,11 +171,6 @@ static void write_function_stubs(type_t fprintf(client, "\n"); } - /* emit the message buffer size */ - print_client("_StubMsg.BufferLength ="); - print_message_buffer_size(func); - fprintf(client, ";\n"); - type_offset_func = *type_offset; write_remoting_arguments(client, indent, func, &type_offset_func, PASS_IN, PHASE_BUFFERSIZE); diff --git a/tools/widl/server.c b/tools/widl/server.c index 3719aae..56c2761 100644 --- a/tools/widl/server.c +++ b/tools/widl/server.c @@ -88,7 +88,6 @@ static void write_function_stubs(type_t LIST_FOR_EACH_ENTRY( func, iface->funcs, const func_t, entry ) { const var_t *def = func->def; - unsigned long buffer_size = 0; unsigned int type_offset_func; /* check for a defined binding handle */ @@ -222,31 +221,8 @@ static void write_function_stubs(type_t fprintf(server, "();\n"); } - if (func->args) - { - LIST_FOR_EACH_ENTRY( var, func->args, const var_t, entry ) - { - if (is_attr(var->attrs, ATTR_OUT)) - { - unsigned int alignment; - buffer_size += get_required_buffer_size(var, &alignment, PASS_OUT); - buffer_size += alignment; - } - } - } - - if (!is_void(def->type, NULL)) - { - unsigned int alignment; - buffer_size += get_required_buffer_size(def, &alignment, PASS_RETURN); - buffer_size += alignment; - } - if (has_out_arg_or_return(func)) { - fprintf(server, "\n"); - print_server("_StubMsg.BufferLength = %u;\n", buffer_size); - type_offset_func = *type_offset; write_remoting_arguments(server, indent, func, &type_offset_func, PASS_OUT, PHASE_BUFFERSIZE); diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c index def9d4b..1e6c2da 100644 --- a/tools/widl/typegen.c +++ b/tools/widl/typegen.c @@ -1551,7 +1551,7 @@ static unsigned int get_required_buffer_ return 0; } -unsigned int get_required_buffer_size(const var_t *var, unsigned int *alignment, enum pass pass) +static unsigned int get_required_buffer_size(const var_t *var, unsigned int *alignment, enum pass pass) { expr_t *size_is = get_attrp(var->attrs, ATTR_SIZEIS); int has_size = (size_is && (size_is->type != EXPR_VOID)); @@ -1621,6 +1621,28 @@ unsigned int get_required_buffer_size(co } } +static unsigned int get_function_buffer_size( const func_t *func, enum pass pass ) +{ + const var_t *var; + unsigned int total_size = 0, alignment; + + if (func->args) + { + LIST_FOR_EACH_ENTRY( var, func->args, const var_t, entry ) + { + total_size += get_required_buffer_size(var, &alignment, pass); + total_size += alignment; + } + } + + if (pass == PASS_OUT && !is_void(func->def->type, NULL)) + { + total_size += get_required_buffer_size(func->def, &alignment, PASS_RETURN); + total_size += alignment; + } + return total_size; +} + static void print_phase_function(FILE *file, int indent, const char *type, enum remoting_phase phase, const char *varname, unsigned int type_offset) @@ -1767,6 +1789,12 @@ void write_remoting_arguments(FILE *file if (!func->args) return; + if (phase == PHASE_BUFFERSIZE) + { + unsigned int size = get_function_buffer_size( func, pass ); + print_file(file, indent, "_StubMsg.BufferLength = %u;\n", size); + } + LIST_FOR_EACH_ENTRY( var, func->args, const var_t, entry ) { const type_t *type = var->type; diff --git a/tools/widl/typegen.h b/tools/widl/typegen.h index 63d2626..dcbe4d3 100644 --- a/tools/widl/typegen.h +++ b/tools/widl/typegen.h @@ -39,7 +39,6 @@ void write_formatstringsdecl(FILE *f, in void write_procformatstring(FILE *file, const ifref_list_t *ifaces, int for_objects); void write_typeformatstring(FILE *file, const ifref_list_t *ifaces, int for_objects); size_t get_type_memsize(const type_t *type); -unsigned int get_required_buffer_size(const var_t *var, unsigned int *alignment, enum pass pass); void print_phase_basetype(FILE *file, int indent, enum remoting_phase phase, enum pass pass, const var_t *var, const char *varname); void write_remoting_arguments(FILE *file, int indent, const func_t *func, unsigned int *type_offset, enum pass pass, enum remoting_phase phase); size_t get_size_procformatstring_var(const var_t *var);
1
0
0
0
Alexandre Julliard : widl: Move support for stub arguments to typegen. c to make it usable for proxies too.
by Alexandre Julliard
25 Jan '07
25 Jan '07
Module: wine Branch: master Commit: 85ed9ca31a3383d195b4712951f2e61930588b1b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=85ed9ca31a3383d195b471295…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jan 24 19:59:16 2007 +0100 widl: Move support for stub arguments to typegen.c to make it usable for proxies too. --- tools/widl/server.c | 105 +------------------------------------------------- tools/widl/typegen.c | 102 ++++++++++++++++++++++++++++++++++++++++++++++++ tools/widl/typegen.h | 2 + 3 files changed, 106 insertions(+), 103 deletions(-) diff --git a/tools/widl/server.c b/tools/widl/server.c index c7613d4..3719aae 100644 --- a/tools/widl/server.c +++ b/tools/widl/server.c @@ -76,99 +76,6 @@ static void write_parameters_init(const } -static void declare_args(const func_t *func) -{ - int in_attr, out_attr; - int i = 0; - const var_t *var; - - if (!func->args) - return; - - LIST_FOR_EACH_ENTRY( var, func->args, const var_t, entry ) - { - const expr_t *size_is = get_attrp(var->attrs, ATTR_SIZEIS); - int has_size = size_is && (size_is->type != EXPR_VOID); - int is_string = is_attr(var->attrs, ATTR_STRING); - - in_attr = is_attr(var->attrs, ATTR_IN); - out_attr = is_attr(var->attrs, ATTR_OUT); - if (!out_attr && !in_attr) - in_attr = 1; - - if (!in_attr && !has_size && !is_string) - { - int indirection; - print_server(""); - write_type(server, var->type, NULL, var->tname); - for (indirection = 0; indirection < var->ptr_level - 1; indirection++) - fprintf(server, "*"); - fprintf(server, " _W%u;\n", i++); - } - - print_server(""); - write_type(server, var->type, var, var->tname); - fprintf(server, " "); - write_name(server, var); - write_array(server, var->array, 0); - fprintf(server, ";\n"); - } -} - - -static void assign_out_args(const func_t *func) -{ - int in_attr, out_attr; - int i = 0, sep = 0; - const var_t *var; - const expr_t *size_is; - int has_size; - - if (!func->args) - return; - - LIST_FOR_EACH_ENTRY( var, func->args, const var_t, entry ) - { - int is_string = is_attr(var->attrs, ATTR_STRING); - size_is = get_attrp(var->attrs, ATTR_SIZEIS); - has_size = size_is && (size_is->type != EXPR_VOID); - in_attr = is_attr(var->attrs, ATTR_IN); - out_attr = is_attr(var->attrs, ATTR_OUT); - if (!out_attr && !in_attr) - in_attr = 1; - - if (!in_attr) - { - print_server(""); - write_name(server, var); - - if (has_size) - { - unsigned int size; - type_t *type = var->type; - - fprintf(server, " = NdrAllocate(&_StubMsg, "); - write_expr(server, size_is, 1); - size = get_type_memsize(type); - fprintf(server, " * %u);\n", size); - } - else if (!is_string) - { - fprintf(server, " = &_W%u;\n", i); - if (var->ptr_level > 1) - print_server("_W%u = 0;\n", i); - i++; - } - - sep = 1; - } - } - - if (sep) - fprintf(server, "\n"); -} - - static void write_function_stubs(type_t *iface, unsigned int *proc_offset, unsigned int *type_offset) { char *implicit_handle = get_attrp(iface->attrs, ATTR_IMPLICIT_HANDLE); @@ -215,16 +122,8 @@ static void write_function_stubs(type_t fprintf(server, "{\n"); indent++; - /* declare return value '_RetVal' */ - if (!is_void(def->type, NULL)) - { - print_server(""); - write_type(server, def->type, def, def->tname); - fprintf(server, " _RetVal;\n"); - } - /* Declare arguments */ - declare_args(func); + declare_stub_args(server, indent, func); print_server("MIDL_STUB_MESSAGE _StubMsg;\n"); print_server("RPC_STATUS _Status;\n"); @@ -291,7 +190,7 @@ static void write_function_stubs(type_t fprintf(server, "\n"); /* Assign 'out' arguments */ - assign_out_args(func); + assign_stub_out_args(server, indent, func); /* Call the real server function */ if (!is_void(def->type, NULL)) diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c index 5bba033..def9d4b 100644 --- a/tools/widl/typegen.c +++ b/tools/widl/typegen.c @@ -2099,6 +2099,108 @@ static void write_struct_expr(FILE *h, c } } + +void declare_stub_args( FILE *file, int indent, const func_t *func ) +{ + int in_attr, out_attr; + int i = 0; + const var_t *def = func->def; + const var_t *var; + + /* declare return value '_RetVal' */ + if (!is_void(def->type, NULL)) + { + print_file(file, indent, ""); + write_type(file, def->type, def, def->tname); + fprintf(file, " _RetVal;\n"); + } + + if (!func->args) + return; + + LIST_FOR_EACH_ENTRY( var, func->args, const var_t, entry ) + { + const expr_t *size_is = get_attrp(var->attrs, ATTR_SIZEIS); + int has_size = size_is && (size_is->type != EXPR_VOID); + int is_string = is_attr(var->attrs, ATTR_STRING); + + in_attr = is_attr(var->attrs, ATTR_IN); + out_attr = is_attr(var->attrs, ATTR_OUT); + if (!out_attr && !in_attr) + in_attr = 1; + + if (!in_attr && !has_size && !is_string) + { + int indirection; + print_file(file, indent, ""); + write_type(file, var->type, NULL, var->tname); + for (indirection = 0; indirection < var->ptr_level - 1; indirection++) + fprintf(file, "*"); + fprintf(file, " _W%u;\n", i++); + } + + print_file(file, indent, ""); + write_type(file, var->type, var, var->tname); + fprintf(file, " "); + write_name(file, var); + write_array(file, var->array, 0); + fprintf(file, ";\n"); + } +} + + +void assign_stub_out_args( FILE *file, int indent, const func_t *func ) +{ + int in_attr, out_attr; + int i = 0, sep = 0; + const var_t *var; + const expr_t *size_is; + int has_size; + + if (!func->args) + return; + + LIST_FOR_EACH_ENTRY( var, func->args, const var_t, entry ) + { + int is_string = is_attr(var->attrs, ATTR_STRING); + size_is = get_attrp(var->attrs, ATTR_SIZEIS); + has_size = size_is && (size_is->type != EXPR_VOID); + in_attr = is_attr(var->attrs, ATTR_IN); + out_attr = is_attr(var->attrs, ATTR_OUT); + if (!out_attr && !in_attr) + in_attr = 1; + + if (!in_attr) + { + print_file(file, indent, ""); + write_name(file, var); + + if (has_size) + { + unsigned int size; + type_t *type = var->type; + + fprintf(file, " = NdrAllocate(&_StubMsg, "); + write_expr(file, size_is, 1); + size = get_type_memsize(type); + fprintf(file, " * %u);\n", size); + } + else if (!is_string) + { + fprintf(file, " = &_W%u;\n", i); + if (var->ptr_level > 1) + print_file(file, indent, "_W%u = 0;\n", i); + i++; + } + + sep = 1; + } + } + if (sep) + fprintf(file, "\n"); +} + + int write_expr_eval_routines(FILE *file, const char *iface) { int result = 0; diff --git a/tools/widl/typegen.h b/tools/widl/typegen.h index 4e8b63d..63d2626 100644 --- a/tools/widl/typegen.h +++ b/tools/widl/typegen.h @@ -46,5 +46,7 @@ size_t get_size_procformatstring_var(con size_t get_size_typeformatstring_var(const var_t *var); size_t get_size_procformatstring(const ifref_list_t *ifaces, int for_objects); size_t get_size_typeformatstring(const ifref_list_t *ifaces, int for_objects); +void assign_stub_out_args( FILE *file, int indent, const func_t *func ); +void declare_stub_args( FILE *file, int indent, const func_t *func ); int write_expr_eval_routines(FILE *file, const char *iface); void write_expr_eval_routine_list(FILE *file, const char *iface);
1
0
0
0
Alexandre Julliard : include: Simplify the variable declarations in the makefile to allow make_makefiles to parse it .
by Alexandre Julliard
25 Jan '07
25 Jan '07
Module: wine Branch: master Commit: 7d659398255099043e5852cb54e9849f9abe698f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7d659398255099043e5852cb5…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jan 24 16:24:19 2007 +0100 include: Simplify the variable declarations in the makefile to allow make_makefiles to parse it. --- .gitignore | 50 +++++++++++++++++ include/.gitignore | 50 ----------------- include/Makefile.in | 145 ++++++++++++++++++++++++-------------------------- tools/make_makefiles | 4 +- 4 files changed, 122 insertions(+), 127 deletions(-) diff --git a/.gitignore b/.gitignore index 5e59d07..24b6912 100644 --- a/.gitignore +++ b/.gitignore @@ -640,7 +640,57 @@ dlls/ws2_32/version.res dlls/wsock32/libwsock32.def dlls/wsock32/version.res dlls/wtsapi32/libwtsapi32.def +include/activscp.h +include/amstream.h +include/amvideo.h +include/austream.h +include/comcat.h +include/config.h +include/control.h +include/ddstream.h +include/dispex.h +include/docobj.h +include/downloadmgr.h +include/exdisp.h +include/hlink.h +include/htiframe.h +include/iads.h +include/indexsrv.h +include/mediaobj.h +include/mimeinfo.h +include/mlang.h +include/mmstream.h +include/mshtmhst.h +include/mshtml.h +include/msxml.h +include/msxml2.h +include/oaidl.h +include/objidl.h +include/objsafe.h +include/ocidl.h +include/ocmm.h +include/oledb.h +include/oleidl.h +include/optary.h +include/propidl.h +include/pstore.h +include/richole.h +include/sensevts.h +include/servprov.h +include/shldisp.h +include/shobjidl.h +include/shtypes.h +include/stamp-h include/stdole2.tlb +include/strmif.h +include/tom.h +include/unknwn.h +include/urlhist.h +include/urlmon.h +include/wine/itss.h +include/wtypes.h +include/xmldom.h +include/xmldso.h libs/wpp/ppl.yy.c libs/wpp/ppy.tab.c libs/wpp/ppy.tab.h diff --git a/include/.gitignore b/include/.gitignore deleted file mode 100644 index 2229c5f..0000000 --- a/include/.gitignore +++ /dev/null @@ -1,50 +0,0 @@ -/activscp.h -/amstream.h -/amvideo.h -/austream.h -/comcat.h -/config.h -/control.h -/ddstream.h -/dispex.h -/docobj.h -/downloadmgr.h -/exdisp.h -/hlink.h -/htiframe.h -/iads.h -/indexsrv.h -/mediaobj.h -/mimeinfo.h -/mlang.h -/mmstream.h -/mshtmhst.h -/mshtml.h -/msxml.h -/msxml2.h -/oaidl.h -/objidl.h -/objsafe.h -/ocidl.h -/ocmm.h -/oledb.h -/oleidl.h -/optary.h -/propidl.h -/pstore.h -/richole.h -/sensevts.h -/servprov.h -/shldisp.h -/shobjidl.h -/shtypes.h -/stamp-h -/strmif.h -/tom.h -/unknwn.h -/urlhist.h -/urlmon.h -/wtypes.h -/xmldom.h -/xmldso.h -wine/itss.h diff --git a/include/Makefile.in b/include/Makefile.in index 36257c4..ba75d05 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -4,7 +4,7 @@ SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = none -WINDOWS_IDL_SRCS = \ +IDL_H_SRCS = \ activscp.idl \ amstream.idl \ amvideo.idl \ @@ -49,6 +49,7 @@ WINDOWS_IDL_SRCS = \ unknwn.idl \ urlhist.idl \ urlmon.idl \ + wine/itss.idl \ wtypes.idl \ xmldom.idl \ xmldso.idl @@ -56,19 +57,9 @@ WINDOWS_IDL_SRCS = \ IDL_TLB_SRCS = \ stdole2.idl -WINDOWS_IDL_INCLUDES = \ +SRCDIR_INCLUDES = \ $(IDL_TLB_SRCS) \ - $(WINDOWS_IDL_SRCS) \ - axcore.idl \ - axextend.idl \ - dbinit.idl \ - dbprop.idl \ - dbs.idl \ - devenum.idl \ - dyngraph.idl - -WINDOWS_INCLUDES = \ - $(WINDOWS_IDL_INCLUDES) \ + $(IDL_H_SRCS) \ accctrl.h \ aclapi.h \ adshlp.h \ @@ -76,6 +67,8 @@ WINDOWS_INCLUDES = \ appmgmt.h \ audevcod.h \ aviriff.h \ + axcore.idl \ + axextend.idl \ basetsd.h \ basetyps.h \ cderr.h \ @@ -103,6 +96,9 @@ WINDOWS_INCLUDES = \ d3dvec.inl \ d3dx8core.h \ dbghelp.h \ + dbinit.idl \ + dbprop.idl \ + dbs.idl \ dbt.h \ dciddi.h \ dciman.h \ @@ -116,6 +112,7 @@ WINDOWS_INCLUDES = \ ddk/winsplp.h \ ddraw.h \ ddrawi.h \ + devenum.idl \ devguid.h \ digitalv.h \ dinput.h \ @@ -150,6 +147,7 @@ WINDOWS_INCLUDES = \ dxerr8.h \ dxerr9.h \ dxfile.h \ + dyngraph.idl \ errors.h \ evcode.h \ evntrace.h \ @@ -213,6 +211,42 @@ WINDOWS_INCLUDES = \ msidefs.h \ msiquery.h \ mssip.h \ + msvcrt/conio.h \ + msvcrt/crtdbg.h \ + msvcrt/ctype.h \ + msvcrt/direct.h \ + msvcrt/dirent.h \ + msvcrt/dos.h \ + msvcrt/eh.h \ + msvcrt/errno.h \ + msvcrt/fcntl.h \ + msvcrt/float.h \ + msvcrt/io.h \ + msvcrt/limits.h \ + msvcrt/locale.h \ + msvcrt/malloc.h \ + msvcrt/math.h \ + msvcrt/mbctype.h \ + msvcrt/mbstring.h \ + msvcrt/process.h \ + msvcrt/search.h \ + msvcrt/setjmp.h \ + msvcrt/share.h \ + msvcrt/signal.h \ + msvcrt/stddef.h \ + msvcrt/stdio.h \ + msvcrt/stdlib.h \ + msvcrt/string.h \ + msvcrt/sys/locking.h \ + msvcrt/sys/stat.h \ + msvcrt/sys/timeb.h \ + msvcrt/sys/types.h \ + msvcrt/sys/unistd.h \ + msvcrt/sys/utime.h \ + msvcrt/time.h \ + msvcrt/unistd.h \ + msvcrt/wchar.h \ + msvcrt/wctype.h \ mswsock.h \ msxml2did.h \ msxmldid.h \ @@ -298,6 +332,10 @@ WINDOWS_INCLUDES = \ windns.h \ windows.h \ windowsx.h \ + wine/debug.h \ + wine/exception.h \ + wine/library.h \ + wine/unicode.h \ winerror.h \ wingdi.h \ wininet.h \ @@ -334,56 +372,6 @@ WINDOWS_INCLUDES = \ xmldsodid.h \ zmouse.h -MSVCRT_INCLUDES = \ - msvcrt/conio.h \ - msvcrt/crtdbg.h \ - msvcrt/ctype.h \ - msvcrt/direct.h \ - msvcrt/dirent.h \ - msvcrt/dos.h \ - msvcrt/eh.h \ - msvcrt/errno.h \ - msvcrt/fcntl.h \ - msvcrt/float.h \ - msvcrt/io.h \ - msvcrt/limits.h \ - msvcrt/locale.h \ - msvcrt/malloc.h \ - msvcrt/math.h \ - msvcrt/mbctype.h \ - msvcrt/mbstring.h \ - msvcrt/process.h \ - msvcrt/search.h \ - msvcrt/setjmp.h \ - msvcrt/share.h \ - msvcrt/signal.h \ - msvcrt/stddef.h \ - msvcrt/stdio.h \ - msvcrt/stdlib.h \ - msvcrt/string.h \ - msvcrt/sys/locking.h \ - msvcrt/sys/stat.h \ - msvcrt/sys/timeb.h \ - msvcrt/sys/types.h \ - msvcrt/sys/unistd.h \ - msvcrt/sys/utime.h \ - msvcrt/time.h \ - msvcrt/unistd.h \ - msvcrt/wchar.h \ - msvcrt/wctype.h - -WINE_IDL_SRCS = \ - itss.idl - -WINE_INCLUDES = \ - $(WINE_IDL_SRCS) \ - debug.h \ - exception.h \ - library.h \ - unicode.h - -IDL_H_SRCS = $(WINDOWS_IDL_SRCS) $(WINE_IDL_SRCS:%=wine/%) - EXTRASUBDIRS = ddk msvcrt msvcrt/sys wine INSTALLDIRS = \ @@ -395,25 +383,30 @@ INSTALLDIRS = \ @MAKE_RULES@ -WINDOWS_IDL_HEADERS = $(WINDOWS_IDL_SRCS:.idl=.h) -WINE_IDL_HEADERS = $(WINE_IDL_SRCS:.idl=.h) -IDL_HEADERS = $(IDL_H_SRCS:.idl=.h) -IDL_TLBS = $(IDL_TLB_SRCS:.idl=.tlb) +OBJDIR_INCLUDES = $(IDL_H_SRCS:.idl=.h) $(IDL_TLB_SRCS:.idl=.tlb) -all: $(IDL_HEADERS) $(IDL_TLBS) +all: $(OBJDIR_INCLUDES) -install:: $(IDL_HEADERS) $(IDL_TLBS) $(INSTALLDIRS) - for f in $(WINDOWS_INCLUDES); do $(INSTALL_DATA) $(SRCDIR)/$$f $(DESTDIR)$(includedir)/windows/$$f; done - for f in $(WINDOWS_IDL_HEADERS) $(IDL_TLBS); do $(INSTALL_DATA) $$f $(DESTDIR)$(includedir)/windows/$$f; done - for f in $(MSVCRT_INCLUDES); do $(INSTALL_DATA) $(SRCDIR)/$$f $(DESTDIR)$(includedir)/$$f; done - for f in $(WINE_INCLUDES); do $(INSTALL_DATA) $(SRCDIR)/wine/$$f $(DESTDIR)$(includedir)/$$f; done - for f in $(WINE_IDL_HEADERS); do $(INSTALL_DATA) wine/$$f $(DESTDIR)$(includedir)/$$f; done +install:: $(OBJDIR_INCLUDES) $(INSTALLDIRS) + for f in $(SRCDIR_INCLUDES); do case $$f in \ + wine/*) $(INSTALL_DATA) $(SRCDIR)/$$f $(DESTDIR)$(includedir)/`expr $$f : 'wine/\(.*\)'` ;; \ + msvcrt/*) $(INSTALL_DATA) $(SRCDIR)/$$f $(DESTDIR)$(includedir)/$$f ;; \ + *) $(INSTALL_DATA) $(SRCDIR)/$$f $(DESTDIR)$(includedir)/windows/$$f ;; \ + esac; done + for f in $(OBJDIR_INCLUDES); do case $$f in \ + wine/*) $(INSTALL_DATA) $$f $(DESTDIR)$(includedir)/`expr $$f : 'wine/\(.*\)'` ;; \ + msvcrt/*) $(INSTALL_DATA) $$f $(DESTDIR)$(includedir)/$$f ;; \ + *) $(INSTALL_DATA) $$f $(DESTDIR)$(includedir)/windows/$$f ;; \ + esac; done # Don't just do a rm -rf on $(includedir) -- don't want to wipe out # anything extra the user may have put there. uninstall:: - -cd $(DESTDIR)$(includedir)/windows && $(RM) $(WINDOWS_INCLUDES) $(WINDOWS_IDL_HEADERS) $(IDL_TLBS) - -cd $(DESTDIR)$(includedir) && $(RM) $(MSVCRT_INCLUDES) $(WINE_INCLUDES) $(WINE_IDL_HEADERS) + for f in $(SRCDIR_INCLUDES) $(OBJDIR_INCLUDES); do case $$f in \ + wine/*) $(RM) $(DESTDIR)$(includedir)/`expr $$f : 'wine/\(.*\)'` ;; \ + msvcrt/*) $(RM) $(DESTDIR)$(includedir)/$$f ;; \ + *) $(RM) $(DESTDIR)$(includedir)/windows/$$f ;; \ + esac; done -rmdir $(INSTALLDIRS) @DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/tools/make_makefiles b/tools/make_makefiles index 1064bef..ede3d9d 100755 --- a/tools/make_makefiles +++ b/tools/make_makefiles @@ -77,7 +77,9 @@ my @ignores = ( "/config.status", "/TAGS", "/tags", - "Makefile" + "Makefile", + "include/config.h", + "include/stamp-h" ); # Source files and their resulting target to ignore
1
0
0
0
Kai Blin : secur32: Fix off-by-one error in converting the password to unicode.
by Alexandre Julliard
24 Jan '07
24 Jan '07
Module: wine Branch: master Commit: 747ab4bf7406c8142897bdbfb9db7389f6186cd5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=747ab4bf7406c8142897bdbfb…
Author: Kai Blin <kai.blin(a)gmail.com> Date: Wed Jan 24 12:05:33 2007 +0100 secur32: Fix off-by-one error in converting the password to unicode. --- dlls/secur32/ntlm.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/secur32/ntlm.c b/dlls/secur32/ntlm.c index dec559b..39c16c2 100644 --- a/dlls/secur32/ntlm.c +++ b/dlls/secur32/ntlm.c @@ -332,12 +332,12 @@ static SECURITY_STATUS SEC_ENTRY ntlm_Ac if(identity->PasswordLength != 0) { passwd_sizeW = MultiByteToWideChar(CP_ACP, 0, - (LPCSTR)identity->Password, identity->PasswordLength+1, + (LPCSTR)identity->Password, identity->PasswordLength, NULL, 0); passwd = HeapAlloc(GetProcessHeap(), 0, passwd_sizeW * sizeof(SEC_WCHAR)); MultiByteToWideChar(CP_ACP, 0, (LPCSTR)identity->Password, - identity->PasswordLength+1, passwd, passwd_sizeW); + identity->PasswordLength, passwd, passwd_sizeW); } else {
1
0
0
0
Alexandre Julliard : ntdll: Properly handle embedded nulls in NTDLL_dbg_vprintf.
by Alexandre Julliard
24 Jan '07
24 Jan '07
Module: wine Branch: master Commit: 938e6758608ebb6c18aee9eb88e244f141b64879 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=938e6758608ebb6c18aee9eb8…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jan 24 12:46:17 2007 +0100 ntdll: Properly handle embedded nulls in NTDLL_dbg_vprintf. --- dlls/ntdll/debugtools.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dlls/ntdll/debugtools.c b/dlls/ntdll/debugtools.c index 760dff4..d66124c 100644 --- a/dlls/ntdll/debugtools.c +++ b/dlls/ntdll/debugtools.c @@ -121,7 +121,7 @@ static const char *NTDLL_dbgstr_wn( cons static int NTDLL_dbg_vprintf( const char *format, va_list args ) { struct debug_info *info = get_info(); - char *p; + int end; int ret = vsnprintf( info->out_pos, sizeof(info->output) - (info->out_pos - info->output), format, args ); @@ -138,16 +138,16 @@ static int NTDLL_dbg_vprintf( const char abort(); } - p = strrchr( info->out_pos, '\n' ); - if (!p) info->out_pos += ret; + for (end = ret; end > 0; end--) if (info->out_pos[end - 1] == '\n') break; + + if (!end) info->out_pos += ret; else { char *pos = info->output; - p++; - write( 2, pos, p - pos ); + write( 2, pos, info->out_pos + end - pos ); /* move beginning of next line to start of buffer */ - while ((*pos = *p++)) pos++; - info->out_pos = pos; + memmove( pos, info->out_pos + end, ret - end ); + info->out_pos = pos + ret - end; } return ret; }
1
0
0
0
Jacek Caban : urlmon: Added BindProtocol's IInternetPriority implementation .
by Alexandre Julliard
24 Jan '07
24 Jan '07
Module: wine Branch: master Commit: fed5d9e1fffaa2b0c6e9bb0bd027ca74959866b7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fed5d9e1fffaa2b0c6e9bb0bd…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Jan 23 23:33:38 2007 +0100 urlmon: Added BindProtocol's IInternetPriority implementation. --- dlls/urlmon/bindprot.c | 24 ++++++++++-- dlls/urlmon/tests/protocol.c | 79 ++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 96 insertions(+), 7 deletions(-) diff --git a/dlls/urlmon/bindprot.c b/dlls/urlmon/bindprot.c index c3ad2b0..c7e62f9 100644 --- a/dlls/urlmon/bindprot.c +++ b/dlls/urlmon/bindprot.c @@ -42,6 +42,8 @@ typedef struct { IInternetProtocol *protocol; IInternetBindInfo *bind_info; IInternetProtocolSink *protocol_sink; + + LONG priority; } BindProtocol; #define PROTOCOL(x) ((IInternetProtocol*) &(x)->lpInternetProtocolVtbl) @@ -126,6 +128,7 @@ static HRESULT WINAPI BindProtocol_Start { BindProtocol *This = PROTOCOL_THIS(iface); IInternetProtocol *protocol = NULL; + IInternetPriority *priority; IServiceProvider *service_provider; CLSID clsid = IID_NULL; LPOLESTR clsid_str; @@ -178,6 +181,12 @@ static HRESULT WINAPI BindProtocol_Start IInternetProtocolSink_AddRef(pOIProtSink); This->protocol_sink = pOIProtSink; + hres = IInternetProtocol_QueryInterface(protocol, &IID_IInternetPriority, (void**)&priority); + if(SUCCEEDED(hres)) { + IInternetPriority_SetPriority(priority, This->priority); + IInternetPriority_Release(priority); + } + return IInternetProtocol_Start(protocol, szUrl, PROTSINK(This), BINDINFO(This), 0, 0); } @@ -356,15 +365,21 @@ static ULONG WINAPI InternetPriority_Rel static HRESULT WINAPI InternetPriority_SetPriority(IInternetPriority *iface, LONG nPriority) { BindProtocol *This = PRIORITY_THIS(iface); - FIXME("(%p)->(%d)\n", This, nPriority); - return E_NOTIMPL; + + TRACE("(%p)->(%d)\n", This, nPriority); + + This->priority = nPriority; + return S_OK; } static HRESULT WINAPI InternetPriority_GetPriority(IInternetPriority *iface, LONG *pnPriority) { BindProtocol *This = PRIORITY_THIS(iface); - FIXME("(%p)->(%p)\n", This, pnPriority); - return E_NOTIMPL; + + TRACE("(%p)->(%p)\n", This, pnPriority); + + *pnPriority = This->priority; + return S_OK; } #undef PRIORITY_THIS @@ -476,6 +491,7 @@ HRESULT create_binding_protocol(LPCWSTR ret->protocol = NULL; ret->bind_info = NULL; ret->protocol_sink = NULL; + ret->priority = 0; *protocol = PROTOCOL(ret); return S_OK; diff --git a/dlls/urlmon/tests/protocol.c b/dlls/urlmon/tests/protocol.c index ddcf47e..81c3757 100644 --- a/dlls/urlmon/tests/protocol.c +++ b/dlls/urlmon/tests/protocol.c @@ -1,5 +1,5 @@ /* - * Copyright 2005 Jacek Caban + * Copyright 2005-2007 Jacek Caban for CodeWeavers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -77,6 +77,7 @@ DEFINE_EXPECT(CreateInstance); DEFINE_EXPECT(Start); DEFINE_EXPECT(Terminate); DEFINE_EXPECT(Read); +DEFINE_EXPECT(SetPriority); static const WCHAR wszIndexHtml[] = {'i','n','d','e','x','.','h','t','m','l',0}; static const WCHAR index_url[] = @@ -486,6 +487,47 @@ static IInternetBindInfoVtbl bind_info_v static IInternetBindInfo bind_info = { &bind_info_vtbl }; +static HRESULT WINAPI InternetPriority_QueryInterface(IInternetPriority *iface, + REFIID riid, void **ppv) +{ + ok(0, "unexpected call\n"); + return E_NOINTERFACE; +} + +static ULONG WINAPI InternetPriority_AddRef(IInternetPriority *iface) +{ + return 2; +} + +static ULONG WINAPI InternetPriority_Release(IInternetPriority *iface) +{ + return 1; +} + +static HRESULT WINAPI InternetPriority_SetPriority(IInternetPriority *iface, LONG nPriority) +{ + CHECK_EXPECT(SetPriority); + ok(nPriority == 100, "nPriority=%d\n", nPriority); + return S_OK; +} + +static HRESULT WINAPI InternetPriority_GetPriority(IInternetPriority *iface, LONG *pnPriority) +{ + ok(0, "unexpected call\n"); + return E_NOTIMPL; +} + + +static const IInternetPriorityVtbl InternetPriorityVtbl = { + InternetPriority_QueryInterface, + InternetPriority_AddRef, + InternetPriority_Release, + InternetPriority_SetPriority, + InternetPriority_GetPriority +}; + +static IInternetPriority InternetPriority = { &InternetPriorityVtbl }; + static HRESULT WINAPI Protocol_QueryInterface(IInternetProtocol *iface, REFIID riid, void **ppv) { if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IInternetProtocol, riid)) { @@ -493,8 +535,10 @@ static HRESULT WINAPI Protocol_QueryInte return S_OK; } - if(IsEqualGUID(&IID_IInternetPriority, riid)) - return E_NOINTERFACE; /* TODO */ + if(IsEqualGUID(&IID_IInternetPriority, riid)) { + *ppv = &InternetPriority; + return S_OK; + } ok(0, "unexpected call\n"); *ppv = NULL; @@ -1233,7 +1277,9 @@ static void test_mk_protocol(void) static void test_CreateBinding(void) { IInternetProtocol *protocol; + IInternetPriority *priority; IInternetSession *session; + LONG p; BYTE buf[1000]; DWORD read; HRESULT hres; @@ -1265,9 +1311,26 @@ static void test_CreateBinding(void) hres = IInternetProtocol_Start(protocol, NULL, &protocol_sink, &bind_info, 0, 0); ok(hres == E_INVALIDARG, "Start failed: %08x, expected E_INVALIDARG\n", hres); + hres = IInternetProtocol_QueryInterface(protocol, &IID_IInternetPriority, (void**)&priority); + ok(hres == S_OK, "QueryInterface(IID_IInternetPriority) failed: %08x\n", hres); + + p = 0xdeadbeef; + hres = IInternetPriority_GetPriority(priority, &p); + ok(hres == S_OK, "GetPriority failed: %08x\n", hres); + ok(!p, "p=%d\n", p); + + hres = IInternetPriority_SetPriority(priority, 100); + ok(hres == S_OK, "SetPriority failed: %08x\n", hres); + + p = 0xdeadbeef; + hres = IInternetPriority_GetPriority(priority, &p); + ok(hres == S_OK, "GetPriority failed: %08x\n", hres); + ok(p == 100, "p=%d\n", p); + SET_EXPECT(QueryService_InternetProtocol); SET_EXPECT(CreateInstance); SET_EXPECT(ReportProgress_PROTOCOLCLASSID); + SET_EXPECT(SetPriority); SET_EXPECT(Start); expect_hrResult = S_OK; @@ -1277,6 +1340,7 @@ static void test_CreateBinding(void) CHECK_CALLED(QueryService_InternetProtocol); CHECK_CALLED(CreateInstance); CHECK_CALLED(ReportProgress_PROTOCOLCLASSID); + CHECK_CALLED(SetPriority); CHECK_CALLED(Start); SET_EXPECT(Read); @@ -1293,11 +1357,20 @@ static void test_CreateBinding(void) ok(!read, "read = %d\n", read); CHECK_CALLED(Read); + p = 0xdeadbeef; + hres = IInternetPriority_GetPriority(priority, &p); + ok(hres == S_OK, "GetPriority failed: %08x\n", hres); + ok(p == 100, "p=%d\n", p); + + hres = IInternetPriority_SetPriority(priority, 101); + ok(hres == S_OK, "SetPriority failed: %08x\n", hres); + SET_EXPECT(Terminate); hres = IInternetProtocol_Terminate(protocol, 0xdeadbeef); ok(hres == S_OK, "Terminate failed: %08x\n", hres); CHECK_CALLED(Terminate); + IInternetPriority_Release(priority); IInternetBindInfo_Release(prot_bind_info); IInternetProtocol_Release(protocol); IInternetSession_Release(session);
1
0
0
0
Andrew Talbot : riched20: Declare some functions static.
by Alexandre Julliard
24 Jan '07
24 Jan '07
Module: wine Branch: master Commit: 166b3a6cdbdddc5dcecbc8f34491fbe94eeac653 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=166b3a6cdbdddc5dcecbc8f34…
Author: Andrew Talbot <Andrew.Talbot(a)talbotville.com> Date: Tue Jan 23 21:00:27 2007 +0000 riched20: Declare some functions static. --- dlls/riched20/paint.c | 4 ++-- dlls/riched20/run.c | 20 ++++++++++---------- dlls/riched20/style.c | 4 ++-- dlls/riched20/undo.c | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/dlls/riched20/paint.c b/dlls/riched20/paint.c index e924f80..63a0c4c 100644 --- a/dlls/riched20/paint.c +++ b/dlls/riched20/paint.c @@ -206,8 +206,8 @@ static void ME_DebugWrite(HDC hDC, POINT SetTextColor(hDC, color); } -void ME_DrawGraphics(ME_Context *c, int x, int y, ME_Run *run, - ME_Paragraph *para, BOOL selected) { +static void ME_DrawGraphics(ME_Context *c, int x, int y, ME_Run *run, + ME_Paragraph *para, BOOL selected) { SIZE sz; int xs, ys, xe, ye, h, ym, width, eyes; ME_GetGraphicsSize(c->editor, run, &sz); diff --git a/dlls/riched20/run.c b/dlls/riched20/run.c index df67536..29fc309 100644 --- a/dlls/riched20/run.c +++ b/dlls/riched20/run.c @@ -634,11 +634,10 @@ int ME_PointFromChar(ME_TextEditor *edit /****************************************************************************** * ME_GetTextExtent - * - * Finds a width and a height of the text using a specified style - */ -void ME_GetTextExtent(ME_Context *c, LPCWSTR szText, int nChars, ME_Style *s, - SIZE *size) + * + * Finds a width and a height of the text using a specified style + */ +static void ME_GetTextExtent(ME_Context *c, LPCWSTR szText, int nChars, ME_Style *s, SIZE *size) { HDC hDC = c->hDC; HGDIOBJ hOldFont; @@ -650,10 +649,11 @@ void ME_GetTextExtent(ME_Context *c, LPC /****************************************************************************** * ME_GetRunSizeCommon * - * Finds width, height, ascent and descent of a run, up to given character - * (nLen). - */ -SIZE ME_GetRunSizeCommon(ME_Context *c, ME_Paragraph *para, ME_Run *run, int nLen, int *pAscent, int *pDescent) + * Finds width, height, ascent and descent of a run, up to given character + * (nLen). + */ +static SIZE ME_GetRunSizeCommon(ME_Context *c, ME_Paragraph *para, ME_Run *run, int nLen, + int *pAscent, int *pDescent) { SIZE size; int nMaxLen = ME_StrVLen(run->strText); @@ -865,7 +865,7 @@ void ME_SetDefaultCharFormat(ME_TextEdit /* pcf = editor->pBuffer->pDefaultStyle->fmt; */ } -void ME_GetRunCharFormat(ME_TextEditor *editor, ME_DisplayItem *run, CHARFORMAT2W *pFmt) +static void ME_GetRunCharFormat(ME_TextEditor *editor, ME_DisplayItem *run, CHARFORMAT2W *pFmt) { ME_CopyCharFormat(pFmt, &run->member.run.style->fmt); } diff --git a/dlls/riched20/style.c b/dlls/riched20/style.c index 14c8d80..1dfdef1 100644 --- a/dlls/riched20/style.c +++ b/dlls/riched20/style.c @@ -305,10 +305,10 @@ void ME_CharFormatFromLogFont(HDC hDC, L would add an erronious CFM_UNDERLINE. This isn't currently ever a problem */ if (lf->lfStrikeOut) fmt->dwEffects |= CFM_STRIKEOUT; fmt->bPitchAndFamily = lf->lfPitchAndFamily; - fmt->bCharSet = lf->lfCharSet; + fmt->bCharSet = lf->lfCharSet; } -BOOL ME_IsFontEqual(LOGFONTW *p1, LOGFONTW *p2) +static BOOL ME_IsFontEqual(LOGFONTW *p1, LOGFONTW *p2) { if (memcmp(p1, p2, sizeof(LOGFONTW)-sizeof(p1->lfFaceName))) return FALSE; diff --git a/dlls/riched20/undo.c b/dlls/riched20/undo.c index 88de04a..2a9d915 100644 --- a/dlls/riched20/undo.c +++ b/dlls/riched20/undo.c @@ -165,7 +165,7 @@ void ME_CommitUndo(ME_TextEditor *editor ME_SendSelChange(editor); } -void ME_PlayUndoItem(ME_TextEditor *editor, ME_DisplayItem *pItem) +static void ME_PlayUndoItem(ME_TextEditor *editor, ME_DisplayItem *pItem) { ME_UndoItem *pUItem = (ME_UndoItem *)pItem;
1
0
0
0
Andrew Talbot : quartz: Declare a function static.
by Alexandre Julliard
24 Jan '07
24 Jan '07
Module: wine Branch: master Commit: d303896fe0247549253596f9cf75e377146f3e45 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d303896fe0247549253596f9c…
Author: Andrew Talbot <Andrew.Talbot(a)talbotville.com> Date: Tue Jan 23 20:53:30 2007 +0000 quartz: Declare a function static. --- dlls/quartz/parser.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/quartz/parser.c b/dlls/quartz/parser.c index 3a280b2..13fa2bc 100644 --- a/dlls/quartz/parser.c +++ b/dlls/quartz/parser.c @@ -596,7 +596,7 @@ static const IMediaSeekingVtbl Parser_Se MediaSeekingImpl_GetPreroll }; -HRESULT WINAPI Parser_OutputPin_QueryInterface(IPin * iface, REFIID riid, LPVOID * ppv) +static HRESULT WINAPI Parser_OutputPin_QueryInterface(IPin * iface, REFIID riid, LPVOID * ppv) { Parser_OutputPin *This = (Parser_OutputPin *)iface;
1
0
0
0
← Newer
1
...
6
7
8
9
10
11
12
...
90
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
Results per page:
10
25
50
100
200