From: Rémi Bernon rbernon@codeweavers.com
--- tools/widl/widl.c | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-)
diff --git a/tools/widl/widl.c b/tools/widl/widl.c index f259f0abe20..7ed3bfd1f8c 100644 --- a/tools/widl/widl.c +++ b/tools/widl/widl.c @@ -836,29 +836,20 @@ int main(int argc,char *argv[])
atexit(rm_tempfile); input = input_name; + if (preprocess_only) exit( wpp_parse( input_name, stdout ) ); + if (!no_preprocess) { - chat("Starting preprocess\n"); - - if (!preprocess_only) - { - FILE *output; - char *name = make_temp_file( header_name, NULL ); - - if (!(output = fopen(name, "wt"))) - error("Could not open fd %s for writing\n", name); + FILE *output; + char *name;
- ret = wpp_parse( input_name, output ); - fclose( output ); - input = name; - } - else - { - ret = wpp_parse( input_name, stdout ); - } + name = make_temp_file( header_name, NULL ); + if (!(output = fopen( name, "wt" ))) error( "Could not open fd %s for writing\n", name ); + ret = wpp_parse( input_name, output ); + fclose( output ); + input = name;
- if(ret) exit(1); - if(preprocess_only) exit(0); + if (ret) exit( 1 ); }
if(!(parser_in = fopen(input, "r"))) {