#ifndef sp_icon
#include <em_spec.h>
#endif
+
+/* prototypes, also hand written. */
+_PROTOTYPE(void CC_bhcst, (int, arith, arith, int));
+_PROTOTYPE(void CC_bhdlb, (int, arith, label, arith, int));
+_PROTOTYPE(void CC_bhdnam, (int, arith, char *, arith, int));
+_PROTOTYPE(void CC_bhfcon, (int, arith, char *, arith, int));
+_PROTOTYPE(void CC_bhicon, (int, arith, char *, arith, int));
+_PROTOTYPE(void CC_bhilb, (int, arith, label, int));
+_PROTOTYPE(void CC_bhpnam, (int, arith, char *, int));
+_PROTOTYPE(void CC_bhucon, (int, arith, char *, arith, int));
+_PROTOTYPE(void CC_crcst, (int, arith));
+_PROTOTYPE(void CC_crdlb, (int, label, arith));
+_PROTOTYPE(void CC_crdnam, (int, char *, arith));
+_PROTOTYPE(void CC_crilb, (int, label));
+_PROTOTYPE(void CC_crpnam, (int, char *));
+_PROTOTYPE(void CC_crscon, (int, char *, arith));
+_PROTOTYPE(void CC_crxcon, (int, int, char *, arith));
+_PROTOTYPE(void CC_cst, (arith));
+_PROTOTYPE(void CC_dfdlb, (label));
+_PROTOTYPE(void CC_dfdnam, (char *));
+_PROTOTYPE(void CC_dfilb, (label));
+_PROTOTYPE(void CC_dlb, (label, arith));
+_PROTOTYPE(void CC_dnam, (char *, arith));
+_PROTOTYPE(void CC_end, (arith));
+_PROTOTYPE(void CC_endnarg, (void));
+_PROTOTYPE(void CC_exc, (arith, arith));
+_PROTOTYPE(void CC_fcon, (char *, arith));
+_PROTOTYPE(void CC_icon, (char *, arith));
+_PROTOTYPE(void CC_ilb, (label));
+_PROTOTYPE(void CC_msend, (void));
+_PROTOTYPE(void CC_msstart, (int));
+_PROTOTYPE(void CC_op, (int));
+_PROTOTYPE(void CC_opcst, (int, arith));
+_PROTOTYPE(void CC_opdlb, (int, label, arith));
+_PROTOTYPE(void CC_opdnam, (int, char *, arith));
+_PROTOTYPE(void CC_opilb, (int, label));
+_PROTOTYPE(void CC_opnarg, (int));
+_PROTOTYPE(void CC_oppnam, (int, char *));
+_PROTOTYPE(void CC_pnam, (char *));
+_PROTOTYPE(void CC_pro, (char *, arith));
+_PROTOTYPE(void CC_pronarg, (char *));
+_PROTOTYPE(void CC_psdlb, (int, label));
+_PROTOTYPE(void CC_psdnam, (int, char *));
+_PROTOTYPE(void CC_pspnam, (int, char *));
+_PROTOTYPE(void CC_scon, (char *, arith));
+_PROTOTYPE(void CC_ucon, (char *, arith));
+
+_PROTOTYPE(void C_init, (arith, arith));
+_PROTOTYPE(void C_failed, (void));
+_PROTOTYPE(void C_internal_error, (void));
+_PROTOTYPE(int C_open, (char *));
+_PROTOTYPE(void C_close, (void));
+_PROTOTYPE(int C_busy, (void));
+_PROTOTYPE(void C_magic, (void));
+_PROTOTYPE(int C_getid, (void));
+_PROTOTYPE(void C_insertpart, (int));
+_PROTOTYPE(void C_beginpart, (int));
+_PROTOTYPE(void C_endpart, (int));
#include <em_mnem.h>
#include <em_reg.h>
+#include <ansi.h>
+
+#include "em_codeEK.h"
+
#ifdef READABLE_EM
/* macros used in the definitions of the interface functions C_* */
#define OP(x) C_pt_op(x)
#define C_pt_op(x) C_putbyte(x)
#define C_pt_ps(x) C_putbyte(x)
#endif /* READABLE_EM */
+
+_PROTOTYPE(void C_pt_dnam, (char *));
+_PROTOTYPE(void C_pt_ilb, (label));
+_PROTOTYPE(void C_pt_op, (int));
+_PROTOTYPE(void C_pt_cst, (arith));
+_PROTOTYPE(void C_pt_scon, (char *, arith));
+_PROTOTYPE(void C_pt_ps, (int));
+_PROTOTYPE(void C_pt_dlb, (label));
+_PROTOTYPE(void C_pt_doff, (label, arith));
+_PROTOTYPE(void C_pt_noff, (char *, arith));
+_PROTOTYPE(void C_pt_pnam, (char *));
+_PROTOTYPE(void C_pt_dfilb, (label));
+_PROTOTYPE(void C_pt_wcon, (int, char *, arith));
+#ifdef READABLE_EM
+_PROTOTYPE(void C_pt_nl, (void));
+_PROTOTYPE(void C_pt_comma, (void));
+_PROTOTYPE(void C_pt_ccend, (void));
+#endif /* READABLE_EM */
SRC_DIR = $(SRC_HOME)/modules/src/em_code
MOD_DIR = $(TARGET_HOME)/modules
-INCLUDES = -I$(TARGET_HOME)/h -I$(TARGET_HOME)/config -I$(MOD_DIR)/h -I$(SRC_HOME)/modules/src/read_em -I$(SRC_DIR)
+INCLUDES = -I. -I$(TARGET_HOME)/h -I$(TARGET_HOME)/config -I$(MOD_DIR)/h -I$(SRC_HOME)/modules/src/read_em -I$(SRC_DIR)
CFLAGS = $(INCLUDES) $(COPTIONS)
SRC = $(SRC_DIR)/bhcst.c\
$(SRC_DIR)/bhdlb.c\
all: em_codeEK.h libeme.$(LIBSUF) libemk.$(LIBSUF) em_code.3
install: all
+ -mkdir $(MOD_DIR)/lib
+ -mkdir $(MOD_DIR)/h
cp libeme.$(LIBSUF) $(MOD_DIR)/lib/libeme.$(LIBSUF)
$(RANLIB) $(MOD_DIR)/lib/libeme.$(LIBSUF)
cp libemk.$(LIBSUF) $(MOD_DIR)/lib/libemk.$(LIBSUF)
$(RANLIB) $(MOD_DIR)/lib/libemk.$(LIBSUF)
- cp em_code.3 $(MOD_DIR)/man/em_code.3
cp em_codeEK.h $(MOD_DIR)/h/em_codeEK.h
if [ $(DO_MACHINE_INDEP) = y ] ; \
then mk_manpage em_code.3 $(TARGET_HOME) ; \
-cmp libeme.$(LIBSUF) $(MOD_DIR)/lib/libeme.$(LIBSUF)
-cmp libemk.$(LIBSUF) $(MOD_DIR)/lib/libemk.$(LIBSUF)
-cmp em_codeEK.h $(MOD_DIR)/h/em_codeEK.h
- -cmp em_code.3 $(MOD_DIR)/man/em_code.3
em_code.3: $(SRC_DIR)/em_code.3X
-sh -c 'tbl < $(SRC_DIR)/em_code.3X > em_code.3'