projects
/
YACASL2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
93f3bbb
)
アセンブル時の動作を整理
author
j8takagi
<j8takagi@nifty.com>
Thu, 7 Apr 2011 03:17:14 +0000
(12:17 +0900)
committer
j8takagi
<j8takagi@nifty.com>
Thu, 7 Apr 2011 03:17:14 +0000
(12:17 +0900)
src/assemble.c
patch
|
blob
|
history
diff --git
a/src/assemble.c
b/src/assemble.c
index
366ccf9
..
929288e
100644
(file)
--- 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;
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);
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) ||
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);
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);
}
FREE(line);
fclose(fp);