From: sater Date: Sat, 19 May 1984 11:40:08 +0000 (+0000) Subject: added rcsid X-Git-Tag: release-5-5~6271 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=445ee4ccb8612cbba9adea4b4c4e441cf93e5ce7;p=ack.git added rcsid added code to check for write errors on codefile --- diff --git a/mach/proto/cg/fillem.c b/mach/proto/cg/fillem.c index 3a365ec70..e33439fdc 100644 --- a/mach/proto/cg/fillem.c +++ b/mach/proto/cg/fillem.c @@ -1,3 +1,7 @@ +#ifndef NORCSID +static char rcsid2[] = "$Header$"; +#endif + #include #include "assert.h" #include @@ -203,6 +207,7 @@ dopseudo() { case EOF: swtxt(); popstr(0); + tstoutput(); exit(0); default: error("Unknown opcode %d",savetab1); @@ -330,6 +335,7 @@ dopseudo() { #ifdef REGVARS unlinkregs(); #endif + tstoutput(); break; default: error("No table entry for %d",savetab1); diff --git a/mach/proto/cg/gencode.c b/mach/proto/cg/gencode.c index 8667277b6..ea1ccbe5c 100644 --- a/mach/proto/cg/gencode.c +++ b/mach/proto/cg/gencode.c @@ -1,3 +1,7 @@ +#ifndef NORCSID +static char rcsid[] = "$Header$"; +#endif + #include "assert.h" #include #include "param.h" @@ -59,6 +63,12 @@ out_finish() { fclose(codefile); } +tstoutput() { + + if (ferror(codefile)) + error("Write error on output"); +} + gencode(code) register char *code; { register c; int tokno,fldno,insno,regno,subno;