added code to check for write errors on codefile
+#ifndef NORCSID
+static char rcsid2[] = "$Header$";
+#endif
+
#include <stdio.h>
#include "assert.h"
#include <em_spec.h>
case EOF:
swtxt();
popstr(0);
+ tstoutput();
exit(0);
default:
error("Unknown opcode %d",savetab1);
#ifdef REGVARS
unlinkregs();
#endif
+ tstoutput();
break;
default:
error("No table entry for %d",savetab1);
+#ifndef NORCSID
+static char rcsid[] = "$Header$";
+#endif
+
#include "assert.h"
#include <stdio.h>
#include "param.h"
fclose(codefile);
}
+tstoutput() {
+
+ if (ferror(codefile))
+ error("Write error on output");
+}
+
gencode(code) register char *code; {
register c;
int tokno,fldno,insno,regno,subno;