From e4fafe879c23a11c068c4563a361d56c21a08ab2 Mon Sep 17 00:00:00 2001 From: j8takagi Date: Thu, 7 Apr 2011 12:17:14 +0900 Subject: [PATCH] =?utf8?q?=E3=82=A2=E3=82=BB=E3=83=B3=E3=83=96=E3=83=AB?= =?utf8?q?=E6=99=82=E3=81=AE=E5=8B=95=E4=BD=9C=E3=82=92=E6=95=B4=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/assemble.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/assemble.c b/src/assemble.c index 366ccf9..929288e 100644 --- a/src/assemble.c +++ b/src/assemble.c @@ -639,15 +639,14 @@ void addcerrlist_assemble() void assemble(const char *file, PASS pass) { int lineno = 0; - bool status = true; - char *line = malloc_chk(LINESIZE + 1, "assemble.line"); + char *line; FILE *fp; if((fp = fopen(file, "r")) == NULL) { perror(file); - setcerr(127, NULL); - return; + exit(-1); } + line = malloc_chk(LINESIZE + 1, "assemble.line"); while(fgets(line, LINESIZE, fp)) { lineno++; if((pass == FIRST && asmode.src == true) || @@ -662,7 +661,6 @@ void assemble(const char *file, PASS pass) if(cerr->num > 0) { fprintf(stderr, "Assemble error - %d: %s\n", cerr->num, cerr->msg); printline(stderr, file, lineno, line); - status = false; } FREE(line); fclose(fp); -- 2.18.0