DEC_PATH=decode
ENC_PATH=encode
DATA_PATH=$l/em_data.a
-DECLIBS=$(ml)/libread_emk.a $(ml)/libeme.a $(ml)/libprint.a $(ml)/libstring.a \
+DECLIBS=$(ml)/libread_emkV.a $(ml)/libeme.a $(ml)/liballoc.a $(ml)/libprint.a $(ml)/libstring.a \
$(ml)/libsystem.a
-ENCLIBS=$(ml)/libread_emeV.a $(ml)/libemk.a $(ml)/libprint.a $(ml)/libstring.a \
+ENCLIBS=$(ml)/libread_emeV.a $(ml)/libemk.a $(ml)/liballoc.a $(ml)/libprint.a $(ml)/libstring.a \
$(ml)/libsystem.a
HFILES=$h/em_mnem.h $h/em_spec.h $h/em_pseu.h $h/em_flag.h $h/em_ptyp.h \
$h/em_mes.h $(mh)/em.h $(mh)/em_comp.h
main(argc,argv)
char **argv;
{
- struct e_instr *EM_getinstr();
- register struct e_instr *p;
- register struct e_args *ap;
+ struct e_instr buf;
+ register struct e_instr *p = &buf;
if (argc >= 2) {
filename = argv[1];
if (!EM_open(filename)) {
fatal(EM_error);
}
- p = EM_getinstr();
+ EM_getinstr(p);
C_init((arith) EM_wordsize, (arith) EM_pointersize);
if (argc >= 3) {
if (!C_open(argv[2])) {
}
else if (!C_open( (char *) 0)) fatal("C_open failed");
C_magic();
- while (p) {
+ while (p->em_type != EM_EOF) {
if (p->em_type == EM_FATAL) {
fatal("%s", EM_error);
}
if (p->em_type != EM_ERROR && !EM_mkcalls(p)) {
error("%s", EM_error);
}
- p = EM_getinstr();
+ EM_getinstr(p);
}
C_close();
EM_close();