widl: Rename some variables.

This commit is contained in:
Eric Kohl 2005-12-08 12:45:45 +01:00 committed by Alexandre Julliard
parent 1d4bec79ff
commit 80e262202f
2 changed files with 45 additions and 45 deletions

View File

@ -67,7 +67,7 @@ static int print_client( const char *format, ... )
static void write_procformatstring(type_t *iface)
{
func_t *cur = iface->funcs;
func_t *func = iface->funcs;
print_client("static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =\n");
print_client("{\n");
@ -76,10 +76,10 @@ static void write_procformatstring(type_t *iface)
print_client("{\n");
indent++;
while (NEXT_LINK(cur)) cur = NEXT_LINK(cur);
while (cur)
while (NEXT_LINK(func)) func = NEXT_LINK(func);
while (func)
{
var_t *def = cur->def;
var_t *def = func->def;
if (is_void(def->type, NULL))
{
@ -92,7 +92,7 @@ static void write_procformatstring(type_t *iface)
print_client("0x%02x, /* <type> */\n", def->type->type);
}
cur = PREV_LINK(cur);
func = PREV_LINK(func);
}
print_client("0x0\n");
@ -124,23 +124,23 @@ static void write_typeformatstring(void)
static void write_function_stubs(type_t *iface)
{
func_t *cur = iface->funcs;
char *handle_name = get_attrp(iface->attrs, ATTR_IMPLICIT_HANDLE);
func_t *func = iface->funcs;
char *implicit_handle = get_attrp(iface->attrs, ATTR_IMPLICIT_HANDLE);
int method_count = 0;
unsigned int proc_offset = 0;
while (NEXT_LINK(cur)) cur = NEXT_LINK(cur);
while (cur)
while (NEXT_LINK(func)) func = NEXT_LINK(func);
while (func)
{
var_t *def = cur->def;
var_t *def = func->def;
write_type(client, def->type, def, def->tname);
fprintf(client, " ");
write_name(client, def);
fprintf(client, "(\n");
indent++;
if (cur->args)
write_args(client, cur->args, iface->name, 0, TRUE);
if (func->args)
write_args(client, func->args, iface->name, 0, TRUE);
else
print_client("void");
fprintf(client, ")\n");
@ -158,7 +158,7 @@ static void write_function_stubs(type_t *iface)
fprintf(client, " _RetVal;\n");
}
if (handle_name)
if (implicit_handle)
print_client("RPC_BINDING_HANDLE _Handle = 0;\n");
print_client("RPC_MESSAGE _RpcMessage;\n");
@ -177,8 +177,8 @@ static void write_function_stubs(type_t *iface)
indent--;
fprintf(client, "\n");
if (handle_name)
print_client("_Handle = %s;\n", handle_name);
if (implicit_handle)
print_client("_Handle = %s;\n", implicit_handle);
/* FIXME: marshal arguments */
print_client("_StubMsg.BufferLength = 0UL;\n");
@ -187,7 +187,7 @@ static void write_function_stubs(type_t *iface)
indent++;
print_client("(PMIDL_STUB_MESSAGE)&_StubMsg,\n");
print_client("_StubMsg.BufferLength,\n");
if (handle_name)
if (implicit_handle)
print_client("%_Handle);\n");
else
print_client("%s__MIDL_AutoBindHandle);\n", iface->name);
@ -259,7 +259,7 @@ static void write_function_stubs(type_t *iface)
fprintf(client, "\n");
method_count++;
cur = PREV_LINK(cur);
func = PREV_LINK(func);
}
}
@ -280,7 +280,7 @@ static void write_stubdescdecl(type_t *iface)
static void write_stubdescriptor(type_t *iface)
{
char *handle_name = get_attrp(iface->attrs, ATTR_IMPLICIT_HANDLE);
char *implicit_handle = get_attrp(iface->attrs, ATTR_IMPLICIT_HANDLE);
print_client("static const MIDL_STUB_DESC %s_StubDesc =\n", iface->name);
print_client("{\n");
@ -288,8 +288,8 @@ static void write_stubdescriptor(type_t *iface)
print_client("(void __RPC_FAR *)& %s___RpcClientInterface,\n", iface->name);
print_client("MIDL_user_allocate,\n");
print_client("MIDL_user_free,\n");
if (handle_name)
print_client("&%s,\n", handle_name);
if (implicit_handle)
print_client("&%s,\n", implicit_handle);
else
print_client("&%s__MIDL_AutoBindHandle,\n", iface->name);
print_client("0,\n");
@ -357,18 +357,18 @@ static void write_formatdesc( const char *str )
static void write_formatstringsdecl(type_t *iface)
{
func_t *cur;
func_t *func;
int byte_count = 1;
print_client("#define TYPE_FORMAT_STRING_SIZE %d\n", 3); /* FIXME */
/* determine the proc format string size */
cur = iface->funcs;
while (NEXT_LINK(cur)) cur = NEXT_LINK(cur);
while (cur)
func = iface->funcs;
while (NEXT_LINK(func)) func = NEXT_LINK(func);
while (func)
{
byte_count += 2; /* FIXME: determine real size */
cur = PREV_LINK(cur);
func = PREV_LINK(func);
}
print_client("#define PROC_FORMAT_STRING_SIZE %d\n", byte_count);

View File

@ -69,7 +69,7 @@ static int print_server(const char *format, ...)
static void write_procformatstring(type_t *iface)
{
func_t *cur = iface->funcs;
func_t *func = iface->funcs;
print_server("static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =\n");
print_server("{\n");
@ -78,10 +78,10 @@ static void write_procformatstring(type_t *iface)
print_server("{\n");
indent++;
while (NEXT_LINK(cur)) cur = NEXT_LINK(cur);
while (cur)
while (NEXT_LINK(func)) func = NEXT_LINK(func);
while (func)
{
var_t *def = cur->def;
var_t *def = func->def;
if (is_void(def->type, NULL))
{
@ -94,7 +94,7 @@ static void write_procformatstring(type_t *iface)
print_server("0x%02x, /* <type> */\n", def->type->type);
}
cur = PREV_LINK(cur);
func = PREV_LINK(func);
}
print_server("0x0\n");
@ -149,11 +149,11 @@ static unsigned int get_required_stack_size(type_t *type)
static void write_function_stubs(type_t *iface)
{
func_t *cur = iface->funcs;
while (NEXT_LINK(cur)) cur = NEXT_LINK(cur);
while (cur)
func_t *func = iface->funcs;
while (NEXT_LINK(func)) func = NEXT_LINK(func);
while (func)
{
var_t *def = cur->def;
var_t *def = func->def;
write_type(server, def->type, def, def->tname);
fprintf(server, " __RPC_STUB\n");
@ -260,7 +260,7 @@ static void write_function_stubs(type_t *iface)
fprintf(server, "}\n");
fprintf(server, "\n");
cur = PREV_LINK(cur);
func = PREV_LINK(func);
}
}
@ -269,22 +269,22 @@ static void write_dispatchtable(type_t *iface)
{
unsigned long ver = get_attrv(iface->attrs, ATTR_VERSION);
unsigned long method_count = 0;
func_t *cur = iface->funcs;
func_t *func = iface->funcs;
print_server("static RPC_DISPATCH_FUNCTION %s_table[] =\n", iface->name);
print_server("{\n");
indent++;
while (NEXT_LINK(cur)) cur = NEXT_LINK(cur);
while (cur)
while (NEXT_LINK(func)) func = NEXT_LINK(func);
while (func)
{
var_t *def = cur->def;
var_t *def = func->def;
print_server("%s_", iface->name);
write_name(server, def);
fprintf(server, ",\n");
method_count++;
cur = PREV_LINK(cur);
func = PREV_LINK(func);
}
print_server("0\n");
indent--;
@ -382,18 +382,18 @@ static void write_formatdesc( const char *str )
static void write_formatstringsdecl(type_t *iface)
{
func_t *cur;
func_t *func;
int byte_count = 1;
print_server("#define TYPE_FORMAT_STRING_SIZE %d\n", 3); /* FIXME */
/* determine the proc format string size */
cur = iface->funcs;
while (NEXT_LINK(cur)) cur = NEXT_LINK(cur);
while (cur)
func = iface->funcs;
while (NEXT_LINK(func)) func = NEXT_LINK(func);
while (func)
{
byte_count += 2; /* FIXME: determine real size */
cur = PREV_LINK(cur);
func = PREV_LINK(func);
}
print_server("#define PROC_FORMAT_STRING_SIZE %d\n", byte_count);