use newer read_em module, + checking library
authorceriel <none@none>
Thu, 6 Aug 1987 18:56:36 +0000 (18:56 +0000)
committerceriel <none@none>
Thu, 6 Aug 1987 18:56:36 +0000 (18:56 +0000)
util/misc/Makefile
util/misc/convert.c

index 11dbebb..a3842e2 100644 (file)
@@ -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
index d871ad4..b5cfdf4 100644 (file)
@@ -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();