From 39d4d12c08e033d997c25d28078c65f3ab8f6a11 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sat, 8 Aug 2009 11:00:36 +0200 Subject: [PATCH] wrc: Handle "no files == stdin". --- tools/wrc/wrc.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/wrc/wrc.c b/tools/wrc/wrc.c index 6a856eb7f91..5879d92c1f7 100644 --- a/tools/wrc/wrc.c +++ b/tools/wrc/wrc.c @@ -514,6 +514,13 @@ int main(int argc,char *argv[]) } if (load_file( input_name, output_name )) exit(1); } + /* stdin special case. NULL means "stdin" for wpp. */ + if (nb_files == 0) + { + if(!output_name && !preprocess_only) + output_name = strdup("wrc.tab.res"); + if (load_file( NULL, output_name )) exit(1); + } if(debuglevel & DEBUGLEVEL_DUMP) dump_resources(resource_top);