use newer read_em module, + checking library

This commit is contained in:
ceriel 1987-08-06 18:56:36 +00:00
parent 45264c9c25
commit 60b336dd34
2 changed files with 7 additions and 8 deletions

View file

@ -9,9 +9,9 @@ mh=$d/modules/h
DEC_PATH=decode DEC_PATH=decode
ENC_PATH=encode ENC_PATH=encode
DATA_PATH=$l/em_data.a 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 $(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 $(ml)/libsystem.a
HFILES=$h/em_mnem.h $h/em_spec.h $h/em_pseu.h $h/em_flag.h $h/em_ptyp.h \ 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 $h/em_mes.h $(mh)/em.h $(mh)/em_comp.h

View file

@ -31,9 +31,8 @@ int errors; /* Number of errors */
main(argc,argv) main(argc,argv)
char **argv; char **argv;
{ {
struct e_instr *EM_getinstr(); struct e_instr buf;
register struct e_instr *p; register struct e_instr *p = &buf;
register struct e_args *ap;
if (argc >= 2) { if (argc >= 2) {
filename = argv[1]; filename = argv[1];
@ -42,7 +41,7 @@ main(argc,argv)
if (!EM_open(filename)) { if (!EM_open(filename)) {
fatal(EM_error); fatal(EM_error);
} }
p = EM_getinstr(); EM_getinstr(p);
C_init((arith) EM_wordsize, (arith) EM_pointersize); C_init((arith) EM_wordsize, (arith) EM_pointersize);
if (argc >= 3) { if (argc >= 3) {
if (!C_open(argv[2])) { if (!C_open(argv[2])) {
@ -51,7 +50,7 @@ main(argc,argv)
} }
else if (!C_open( (char *) 0)) fatal("C_open failed"); else if (!C_open( (char *) 0)) fatal("C_open failed");
C_magic(); C_magic();
while (p) { while (p->em_type != EM_EOF) {
if (p->em_type == EM_FATAL) { if (p->em_type == EM_FATAL) {
fatal("%s", EM_error); fatal("%s", EM_error);
} }
@ -61,7 +60,7 @@ main(argc,argv)
if (p->em_type != EM_ERROR && !EM_mkcalls(p)) { if (p->em_type != EM_ERROR && !EM_mkcalls(p)) {
error("%s", EM_error); error("%s", EM_error);
} }
p = EM_getinstr(); EM_getinstr(p);
} }
C_close(); C_close();
EM_close(); EM_close();