Module: wine Branch: master Commit: 7ebf75f92d3a2a198e3144fca5a08ff305d7dac6 URL: https://gitlab.winehq.org/wine/wine/-/commit/7ebf75f92d3a2a198e3144fca5a08ff...
Author: Rémi Bernon rbernon@codeweavers.com Date: Tue Jan 24 22:19:45 2023 +0100
widl: Use open_input_file to open the main input.
---
tools/widl/widl.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-)
diff --git a/tools/widl/widl.c b/tools/widl/widl.c index 513fbe507f7..2cb1b59ac45 100644 --- a/tools/widl/widl.c +++ b/tools/widl/widl.c @@ -701,7 +701,6 @@ int main(int argc,char *argv[]) int i; int ret = 0; struct strarray files; - char *input;
init_signals( exit_on_signal ); init_argv0_dir( argv[0] ); @@ -835,27 +834,8 @@ int main(int argc,char *argv[]) wpp_add_cmdline_define("_WIN32=1");
atexit(rm_tempfile); - input = input_name; if (preprocess_only) exit( wpp_parse( input_name, stdout ) ); - - if (!no_preprocess) - { - FILE *output; - char *name; - - 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(!(parser_in = fopen(input, "r"))) { - fprintf(stderr, "Could not open %s for input\n", input); - return 1; - } + parser_in = open_input_file( input_name );
header_token = make_token(header_name);