diff --git a/legacy/embryo/src/bin/embryo_cc_sc.h b/legacy/embryo/src/bin/embryo_cc_sc.h index 024c8adb62..023485a324 100644 --- a/legacy/embryo/src/bin/embryo_cc_sc.h +++ b/legacy/embryo/src/bin/embryo_cc_sc.h @@ -412,7 +412,7 @@ typedef struct __s_stringpair /* output to intermediate (.ASM) file */ void *sc_openasm(int fd); /* read/write */ - void sc_closeasm(void *handle, int deletefile); + void sc_closeasm(void *handle); void sc_resetasm(void *handle); int sc_writeasm(void *handle, char *str); char *sc_readasm(void *handle, char *target, int maxchars); diff --git a/legacy/embryo/src/bin/embryo_cc_sc1.c b/legacy/embryo/src/bin/embryo_cc_sc1.c index 75c3b712e3..111e16f15f 100644 --- a/legacy/embryo/src/bin/embryo_cc_sc1.c +++ b/legacy/embryo/src/bin/embryo_cc_sc1.c @@ -220,12 +220,10 @@ sc_openasm(int fd) } void -sc_closeasm(void *handle, int deletefile) +sc_closeasm(void *handle) { if (handle != NULL) fclose((FILE *) handle); - if (deletefile) - unlink(outfname); } void @@ -326,6 +324,8 @@ sc_compile(int argc, char *argv[]) if (fd_out < 0) error(101, outfname); + unlink (outfname); /* kill this file as soon as it's (f)close'd */ + setconfig(argv[0]); /* the path to the include files */ lcl_ctrlchar = sc_ctrlchar; lcl_packstr = sc_packstr; @@ -428,7 +428,7 @@ sc_compile(int argc, char *argv[]) assemble(binf, outf); /* assembler file is now input */ } /* if */ if (outf != NULL) - sc_closeasm(outf, TRUE); + sc_closeasm(outf); if (binf != NULL) sc_closebin(binf, errnum != 0); diff --git a/legacy/embryo/src/bin/embryo_cc_sc5.c b/legacy/embryo/src/bin/embryo_cc_sc5.c index 728544f42a..0bd5fe0e11 100644 --- a/legacy/embryo/src/bin/embryo_cc_sc5.c +++ b/legacy/embryo/src/bin/embryo_cc_sc5.c @@ -94,7 +94,7 @@ error(int number, ...) if (sc_error(number, string, inpfname, start, fline, argptr)) { - sc_closeasm(outf, TRUE); + sc_closeasm(outf); outf = NULL; longjmp(errbuf, 3); } @@ -109,7 +109,7 @@ error(int number, ...) if (outf != NULL) { - sc_closeasm(outf, TRUE); + sc_closeasm(outf); outf = NULL; } /* if */ longjmp(errbuf, 2); /* fatal error, quit */