From 8fc22f0db7c401484a65665261c594752806f340 Mon Sep 17 00:00:00 2001 From: ceriel Date: Fri, 5 Feb 1988 15:10:08 +0000 Subject: [PATCH] allow assembler to read from STDIN --- mach/proto/as/comm4.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/mach/proto/as/comm4.c b/mach/proto/as/comm4.c index 6ec475cb2..b0c058d1c 100644 --- a/mach/proto/as/comm4.c +++ b/mach/proto/as/comm4.c @@ -149,13 +149,13 @@ char **argv; if (nfile != 0) fatal("second source file %s", p); nfile++; -#endif +#else if (p[0] == '-' && p[1] == '\0') { input = stdin; parse("STDIN"); continue; } - +#endif if ((input = fopen(p, "r")) == NULL) fatal("can't open %s", p); #ifdef ASLD @@ -174,6 +174,12 @@ char **argv; parse(p); fclose(input); } +#ifndef ASLD + if (nfile == 0) { + input = stdin; + parse("STDIN"); + } +#endif commfinish(); machfinish(PASS_1); #ifdef ASLD @@ -195,8 +201,10 @@ char **argv; #else if (unresolved) outhead.oh_flags |= HF_LINK; + /* if (nfile == 0) fatal("no source file"); + */ #endif } -- 2.34.1