From cd3ed1959e92845f2e1c5ab60a1b823e0bcf0eec Mon Sep 17 00:00:00 2001 From: steve Date: Tue, 23 Nov 1999 01:04:57 +0000 Subject: [PATCH] A file name of - means standard input. --- pform.cc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pform.cc b/pform.cc index 1b297161a..2b3dc7df6 100644 --- a/pform.cc +++ b/pform.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) -#ident "$Id: pform.cc,v 1.46 1999/09/30 01:22:37 steve Exp $" +#ident "$Id: pform.cc,v 1.47 1999/11/23 01:04:57 steve Exp $" #endif # include "compiler.h" @@ -693,7 +693,10 @@ int pform_parse(const char*path, map&modules, map&prim) { vl_file = path; - vl_input = fopen(path, "r"); + if (strcmp(path, "-") == 0) + vl_input = stdin; + else + vl_input = fopen(path, "r"); if (vl_input == 0) { cerr << "Unable to open " <&modules, /* * $Log: pform.cc,v $ + * Revision 1.47 1999/11/23 01:04:57 steve + * A file name of - means standard input. + * * Revision 1.46 1999/09/30 01:22:37 steve * Handle declaration of integers (including scope) in functions. *