From fbb9a9fddc2af4d93b56fae94c7dc3c7634818e5 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 23 Nov 1999 19:38:18 +0000 Subject: [PATCH] Differentiate tracing functions between request and reply. Added possibility to have dumping functions for specific types. --- tools/make_requests | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/tools/make_requests b/tools/make_requests index e5af2601349..62ff329540a 100755 --- a/tools/make_requests +++ b/tools/make_requests @@ -14,7 +14,9 @@ "unsigned int" => "%08x", "void*" => "%p", "time_t" => "%ld", - "char[1]" => "\\\"%s\\\"" + "path_t" => "&dump_unicode_string", + "char[1]" => "\\\"%s\\\"", + "WCHAR[1]" => "&dump_unicode_string" ); my @requests = (); @@ -128,15 +130,25 @@ sub DO_DUMP_FUNC my $var = shift; if (defined($formats{$type})) { - push @trace_lines, " fprintf( stderr, \" $var=$formats{$type}"; - push @trace_lines, "," if ($#_ > 0); - push @trace_lines, "\", "; - push @trace_lines, "req->$var );\n"; + if ($formats{$type} =~ /^&(.*)/) + { + my $func = $1; + push @trace_lines, " fprintf( stderr, \" $var=\" );\n"; + push @trace_lines, " $func( req->$var );\n"; + push @trace_lines, " fprintf( stderr, \",\" );\n" if ($#_ > 0); + } + else + { + push @trace_lines, " fprintf( stderr, \" $var=$formats{$type}"; + push @trace_lines, "," if ($#_ > 0); + push @trace_lines, "\", "; + push @trace_lines, "req->$var );\n"; + } } else # must be some varargs format { push @trace_lines, " fprintf( stderr, \" $var=\" );\n"; - push @trace_lines, " dump_varargs_${name}( req );\n"; + push @trace_lines, " dump_varargs_${name}_${req}( req );\n"; } } push @trace_lines, "}\n\n";