syntax++;
i--;
}
- printf("%s unknown opcode %s\n", SYNTAX_ERROR_PREFIX, opword);
+ printf("%d:%s unknown opcode %s\n", s->line, SYNTAX_ERROR_PREFIX, opword);
return 1;
}
text[line] = buf;
line++;
while(length != 0){
- int current_crlf = 0;
+ //Àµ³Î¤Ê¹Ô¿ôÇÄ°®¤È¼êÈ´¤¤Î¤¿¤á CR only ¤Î²þ¹Ô¥³¡¼¥É¤ò̤¥µ¥Ý¡¼¥È¤È¤¹¤ë
+ int current_lf = 0;
+
switch(*buf){
case '\n':
+ *buf = '\0';
+ current_lf = 1;
+ break;
case '\r':
*buf = '\0';
- current_crlf = 1;
break;
}
switch(pastdata){
PRINT("line over")
return 0;
}
- if(current_crlf == 0){
+ if(current_lf == 0){
text[line] = buf;
line++;
}