#include <string.h>
#include <ctype.h>
#include <assert.h>
+#include <errno.h>
#include "assemble.h"
#include "cerr.h"
setcerr(106, ""); /* operand count mismatch */
return;
}
- if(cmdl->label == '\0') {
+ if(*(cmdl->label) == '\0') {
setcerr(107, ""); /* no label in START */
return;
}
stat = (cerr->num == 0) ? true : false;
if(cmdl != NULL) {
if(stat == true) {
- if(pass == FIRST && cmdl->label != '\0') {
+ if(pass == FIRST && *(cmdl->label) != '\0') {
stat = addlabel(asptr->prog, cmdl->label, asptr->ptr);
}
}
FILE *fp;
if((fp = fopen(file, "r")) == NULL) {
+ cerr->num = errno;
perror(file);
return false;
}