From 60b336dd34ea5d0003029e71a8e0ca6e5c68f452 Mon Sep 17 00:00:00 2001 From: ceriel Date: Thu, 6 Aug 1987 18:56:36 +0000 Subject: [PATCH] use newer read_em module, + checking library --- util/misc/Makefile | 4 ++-- util/misc/convert.c | 11 +++++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/util/misc/Makefile b/util/misc/Makefile index 11dbebbb3..a3842e25d 100644 --- a/util/misc/Makefile +++ b/util/misc/Makefile @@ -9,9 +9,9 @@ mh=$d/modules/h 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 diff --git a/util/misc/convert.c b/util/misc/convert.c index d871ad4ab..b5cfdf471 100644 --- a/util/misc/convert.c +++ b/util/misc/convert.c @@ -31,9 +31,8 @@ int errors; /* Number of errors */ 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]; @@ -42,7 +41,7 @@ main(argc,argv) 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])) { @@ -51,7 +50,7 @@ main(argc,argv) } 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); } @@ -61,7 +60,7 @@ main(argc,argv) if (p->em_type != EM_ERROR && !EM_mkcalls(p)) { error("%s", EM_error); } - p = EM_getinstr(); + EM_getinstr(p); } C_close(); EM_close();