From abf052244b17b30afbd6c605fe502a4b8e7719f4 Mon Sep 17 00:00:00 2001 From: ceriel Date: Wed, 10 Nov 1993 10:26:07 +0000 Subject: [PATCH] Added prototyping stuff --- modules/src/em_code/bhcst.c | 1 + modules/src/em_code/bhdlb.c | 1 + modules/src/em_code/bhdnam.c | 1 + modules/src/em_code/bhfcon.c | 1 + modules/src/em_code/bhicon.c | 1 + modules/src/em_code/bhilb.c | 1 + modules/src/em_code/bhpnam.c | 1 + modules/src/em_code/bhucon.c | 1 + modules/src/em_code/crcst.c | 1 + modules/src/em_code/crdlb.c | 1 + modules/src/em_code/crdnam.c | 1 + modules/src/em_code/crilb.c | 1 + modules/src/em_code/crpnam.c | 1 + modules/src/em_code/crscon.c | 1 + modules/src/em_code/crxcon.c | 1 + modules/src/em_code/cst.c | 1 + modules/src/em_code/dfdlb.c | 1 + modules/src/em_code/dfdnam.c | 1 + modules/src/em_code/dfilb.c | 1 + modules/src/em_code/dlb.c | 1 + modules/src/em_code/dnam.c | 1 + modules/src/em_code/em.c | 83 ++++++++++++++++++++++++-------- modules/src/em_code/em.nogen | 58 ++++++++++++++++++++++ modules/src/em_code/em_code.3X | 62 ++++++++++++------------ modules/src/em_code/em_private.h | 22 +++++++++ modules/src/em_code/end.c | 1 + modules/src/em_code/endarg.c | 1 + modules/src/em_code/exc.c | 1 + modules/src/em_code/failed.c | 1 + modules/src/em_code/fcon.c | 1 + modules/src/em_code/getid.c | 1 + modules/src/em_code/icon.c | 1 + modules/src/em_code/ilb.c | 1 + modules/src/em_code/insert.c | 3 ++ modules/src/em_code/internerr.c | 1 + modules/src/em_code/msend.c | 1 + modules/src/em_code/msstart.c | 1 + modules/src/em_code/op.c | 1 + modules/src/em_code/opcst.c | 1 + modules/src/em_code/opdlb.c | 1 + modules/src/em_code/opdnam.c | 1 + modules/src/em_code/opilb.c | 1 + modules/src/em_code/opnarg.c | 1 + modules/src/em_code/oppnam.c | 1 + modules/src/em_code/pnam.c | 1 + modules/src/em_code/pro.c | 1 + modules/src/em_code/pronarg.c | 1 + modules/src/em_code/proto.make | 6 +-- modules/src/em_code/psdlb.c | 1 + modules/src/em_code/psdnam.c | 1 + modules/src/em_code/pspnam.c | 1 + modules/src/em_code/scon.c | 1 + modules/src/em_code/ucon.c | 1 + 53 files changed, 226 insertions(+), 55 deletions(-) diff --git a/modules/src/em_code/bhcst.c b/modules/src/em_code/bhcst.c index 8e44cd544..c1bec0765 100644 --- a/modules/src/em_code/bhcst.c +++ b/modules/src/em_code/bhcst.c @@ -2,6 +2,7 @@ /* $Header$ */ +void CC_bhcst(op, n, w, i) arith n; arith w; diff --git a/modules/src/em_code/bhdlb.c b/modules/src/em_code/bhdlb.c index a94796c9d..0ad56784a 100644 --- a/modules/src/em_code/bhdlb.c +++ b/modules/src/em_code/bhdlb.c @@ -2,6 +2,7 @@ /* $Header$ */ +void CC_bhdlb(op, n, s, off, i) arith n; label s; diff --git a/modules/src/em_code/bhdnam.c b/modules/src/em_code/bhdnam.c index cd9bb2f86..a99ce3694 100644 --- a/modules/src/em_code/bhdnam.c +++ b/modules/src/em_code/bhdnam.c @@ -2,6 +2,7 @@ /* $Header$ */ +void CC_bhdnam(op, n, s, off, i) arith n; char *s; diff --git a/modules/src/em_code/bhfcon.c b/modules/src/em_code/bhfcon.c index 558953c0b..0d9277d05 100644 --- a/modules/src/em_code/bhfcon.c +++ b/modules/src/em_code/bhfcon.c @@ -2,6 +2,7 @@ /* $Header$ */ +void CC_bhfcon(op, n, s, sz, i) arith n; char *s; diff --git a/modules/src/em_code/bhicon.c b/modules/src/em_code/bhicon.c index feb330f27..09ca503d1 100644 --- a/modules/src/em_code/bhicon.c +++ b/modules/src/em_code/bhicon.c @@ -2,6 +2,7 @@ /* $Header$ */ +void CC_bhicon(op, n, s, sz, i) arith n; char *s; diff --git a/modules/src/em_code/bhilb.c b/modules/src/em_code/bhilb.c index 81d53c940..45dcf2bbd 100644 --- a/modules/src/em_code/bhilb.c +++ b/modules/src/em_code/bhilb.c @@ -2,6 +2,7 @@ /* $Header$ */ +void CC_bhilb(op, n, l, i) arith n; label l; diff --git a/modules/src/em_code/bhpnam.c b/modules/src/em_code/bhpnam.c index d0dc07668..a4bfddfc5 100644 --- a/modules/src/em_code/bhpnam.c +++ b/modules/src/em_code/bhpnam.c @@ -2,6 +2,7 @@ /* $Header$ */ +void CC_bhpnam(op, n, p, i) arith n; char *p; diff --git a/modules/src/em_code/bhucon.c b/modules/src/em_code/bhucon.c index 9fd5d3045..219e961ee 100644 --- a/modules/src/em_code/bhucon.c +++ b/modules/src/em_code/bhucon.c @@ -2,6 +2,7 @@ /* $Header$ */ +void CC_bhucon(op, n, s, sz, i) arith n; char *s; diff --git a/modules/src/em_code/crcst.c b/modules/src/em_code/crcst.c index 414b6135a..ab454aba0 100644 --- a/modules/src/em_code/crcst.c +++ b/modules/src/em_code/crcst.c @@ -2,6 +2,7 @@ /* $Header$ */ +void CC_crcst(op, v) arith v; { diff --git a/modules/src/em_code/crdlb.c b/modules/src/em_code/crdlb.c index ff44a5607..2f8909cbb 100644 --- a/modules/src/em_code/crdlb.c +++ b/modules/src/em_code/crdlb.c @@ -2,6 +2,7 @@ /* $Header$ */ +void CC_crdlb(op, v, off) label v; arith off; diff --git a/modules/src/em_code/crdnam.c b/modules/src/em_code/crdnam.c index ab398dd43..8f69c3151 100644 --- a/modules/src/em_code/crdnam.c +++ b/modules/src/em_code/crdnam.c @@ -2,6 +2,7 @@ /* $Header$ */ +void CC_crdnam(op, s, off) char *s; arith off; diff --git a/modules/src/em_code/crilb.c b/modules/src/em_code/crilb.c index e43268af2..8f8ba22e9 100644 --- a/modules/src/em_code/crilb.c +++ b/modules/src/em_code/crilb.c @@ -2,6 +2,7 @@ /* $Header$ */ +void CC_crilb(op, l) label l; { diff --git a/modules/src/em_code/crpnam.c b/modules/src/em_code/crpnam.c index a31aa82f9..37f322230 100644 --- a/modules/src/em_code/crpnam.c +++ b/modules/src/em_code/crpnam.c @@ -2,6 +2,7 @@ /* $Header$ */ +void CC_crpnam(op, p) char *p; { diff --git a/modules/src/em_code/crscon.c b/modules/src/em_code/crscon.c index 6b6dd563c..b0d46ab22 100644 --- a/modules/src/em_code/crscon.c +++ b/modules/src/em_code/crscon.c @@ -2,6 +2,7 @@ /* $Header$ */ +void CC_crscon(op, v, s) char *v; arith s; diff --git a/modules/src/em_code/crxcon.c b/modules/src/em_code/crxcon.c index 88e168bc4..68a69d06d 100644 --- a/modules/src/em_code/crxcon.c +++ b/modules/src/em_code/crxcon.c @@ -2,6 +2,7 @@ /* $Header$ */ +void CC_crxcon(op, spec, v, s) char *v; arith s; diff --git a/modules/src/em_code/cst.c b/modules/src/em_code/cst.c index 4adfd3bdb..e6c945411 100644 --- a/modules/src/em_code/cst.c +++ b/modules/src/em_code/cst.c @@ -2,6 +2,7 @@ /* $Header$ */ +void CC_cst(l) arith l; { diff --git a/modules/src/em_code/dfdlb.c b/modules/src/em_code/dfdlb.c index aed1dd9f1..bfb553b78 100644 --- a/modules/src/em_code/dfdlb.c +++ b/modules/src/em_code/dfdlb.c @@ -2,6 +2,7 @@ /* $Header$ */ +void CC_dfdlb(l) label l; { diff --git a/modules/src/em_code/dfdnam.c b/modules/src/em_code/dfdnam.c index ab533838b..8d24349c4 100644 --- a/modules/src/em_code/dfdnam.c +++ b/modules/src/em_code/dfdnam.c @@ -2,6 +2,7 @@ /* $Header$ */ +void CC_dfdnam(s) char *s; { diff --git a/modules/src/em_code/dfilb.c b/modules/src/em_code/dfilb.c index 9b87cbb22..1f957894b 100644 --- a/modules/src/em_code/dfilb.c +++ b/modules/src/em_code/dfilb.c @@ -2,6 +2,7 @@ /* $Header$ */ +void CC_dfilb(l) label l; { diff --git a/modules/src/em_code/dlb.c b/modules/src/em_code/dlb.c index 8e1913577..3d92c1e61 100644 --- a/modules/src/em_code/dlb.c +++ b/modules/src/em_code/dlb.c @@ -2,6 +2,7 @@ /* $Header$ */ +void CC_dlb(l, val) label l; arith val; diff --git a/modules/src/em_code/dnam.c b/modules/src/em_code/dnam.c index 6b414d6a5..6cec649b5 100644 --- a/modules/src/em_code/dnam.c +++ b/modules/src/em_code/dnam.c @@ -2,6 +2,7 @@ /* $Header$ */ +void CC_dnam(str, val) char *str; arith val; diff --git a/modules/src/em_code/em.c b/modules/src/em_code/em.c index 8aac6ed5d..a74252652 100644 --- a/modules/src/em_code/em.c +++ b/modules/src/em_code/em.c @@ -46,6 +46,7 @@ char *C_current_out = obuf; char *C_opp = obuf; #endif +void C_flush() { #ifdef INCORE static unsigned int bufsiz; @@ -78,6 +79,7 @@ C_flush() { #define Xputbyte(c) put(c) #endif +void C_putbyte(c) int c; { @@ -89,11 +91,13 @@ C_putbyte(c) #endif /*ARGSUSED*/ +void C_init(w, p) arith w, p; { } +int C_open(nm) char *nm; { @@ -108,6 +112,7 @@ C_open(nm) return 1; } +void C_close() { /* Finish the code-generation. @@ -142,6 +147,7 @@ C_close() C_ofp = 0; } +int C_busy() { return C_ofp != 0; /* true if code is being generated */ @@ -156,6 +162,7 @@ C_busy() names. */ +void C_magic() { } @@ -171,12 +178,14 @@ wrs(s) } } +void C_pt_dnam(s) char *s; { wrs(s); } +void C_pt_ilb(l) label l; { @@ -189,6 +198,7 @@ C_pt_ilb(l) extern char em_mnem[][4]; extern char em_pseu[][4]; +void C_pt_op(x) { C_putbyte(' '); @@ -196,6 +206,7 @@ C_pt_op(x) C_putbyte(' '); } +void C_pt_cst(l) arith l; { @@ -205,6 +216,7 @@ C_pt_cst(l) wrs(buf); } +void C_pt_scon(x, y) char *x; arith y; @@ -224,6 +236,7 @@ C_pt_scon(x, y) C_putbyte('\''); } +void C_pt_ps(x) { C_putbyte(' '); @@ -231,6 +244,7 @@ C_pt_ps(x) C_putbyte(' '); } +void C_pt_dlb(l) label l; { @@ -240,6 +254,7 @@ C_pt_dlb(l) wrs(buf); } +void C_pt_doff(l, v) label l; arith v; @@ -253,6 +268,7 @@ C_pt_doff(l, v) } } +void C_pt_noff(s, v) char *s; arith v; @@ -266,6 +282,7 @@ C_pt_noff(s, v) } } +void C_pt_pnam(s) char *s; { @@ -273,6 +290,7 @@ C_pt_pnam(s) wrs(s); } +void C_pt_dfilb(l) label l; { @@ -282,6 +300,7 @@ C_pt_dfilb(l) wrs(buf); } +void C_pt_wcon(sp, v, sz) /* sp_icon, sp_ucon or sp_fcon with int repr */ int sp; char *v; @@ -294,9 +313,20 @@ C_pt_wcon(sp, v, sz) /* sp_icon, sp_ucon or sp_fcon with int repr */ C_pt_cst(sz); } -C_pt_nl() { C_putbyte('\n'); } -C_pt_comma() { C_putbyte(','); } -C_pt_ccend() { C_putbyte('?'); } +void +C_pt_nl() { + C_putbyte('\n'); +} + +void +C_pt_comma() { + C_putbyte(','); +} + +void +C_pt_ccend() { + C_putbyte('?'); +} #else /* READABLE_EM */ @@ -312,6 +342,7 @@ C_pt_ccend() { C_putbyte('?'); } names. */ +void C_magic() { put16(sp_magic); @@ -321,6 +352,7 @@ C_magic() #define fit16i(x) ((x) >= (long)0xFFFF8000 && (x) <= (long)0x00007FFF) #define fit8u(x) ((x) <= 0xFF) /* x is already unsigned */ +void C_pt_ilb(l) register label l; { @@ -334,6 +366,7 @@ C_pt_ilb(l) } } +void C_pt_dlb(l) register label l; { @@ -347,6 +380,7 @@ C_pt_dlb(l) } } +void C_pt_cst(l) register arith l; { @@ -367,6 +401,7 @@ C_pt_cst(l) } } +void C_pt_doff(l, v) label l; arith v; @@ -381,6 +416,27 @@ C_pt_doff(l, v) } } +void +C_pt_str(s) + register char *s; +{ + register int len; + + C_pt_cst((arith) (len = strlen(s))); + while (--len >= 0) { + put8(*s++); + } +} + +void +C_pt_dnam(s) + char *s; +{ + put8(sp_dnam); + C_pt_str(s); +} + +void C_pt_noff(s, v) char *s; arith v; @@ -395,13 +451,7 @@ C_pt_noff(s, v) } } -C_pt_dnam(s) - char *s; -{ - put8(sp_dnam); - C_pt_str(s); -} - +void C_pt_pnam(s) char *s; { @@ -409,6 +459,7 @@ C_pt_pnam(s) C_pt_str(s); } +void C_pt_wcon(sp, v, sz) /* sp_icon, sp_ucon or sp_fcon with int repr */ int sp; char *v; @@ -420,17 +471,7 @@ C_pt_wcon(sp, v, sz) /* sp_icon, sp_ucon or sp_fcon with int repr */ C_pt_str(v); } -C_pt_str(s) - register char *s; -{ - register int len; - - C_pt_cst((arith) (len = strlen(s))); - while (--len >= 0) { - put8(*s++); - } -} - +void C_pt_scon(b, n) register char *b; register arith n; diff --git a/modules/src/em_code/em.nogen b/modules/src/em_code/em.nogen index 1b17ec1d5..8a0d6de72 100644 --- a/modules/src/em_code/em.nogen +++ b/modules/src/em_code/em.nogen @@ -87,3 +87,61 @@ #ifndef sp_icon #include #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)); diff --git a/modules/src/em_code/em_code.3X b/modules/src/em_code/em_code.3X index e2dab085a..84c051672 100644 --- a/modules/src/em_code/em_code.3X +++ b/modules/src/em_code/em_code.3X @@ -6,61 +6,61 @@ emcode \- EM code interface for compilers .nf .B #include .PP -.B C_init(wsize, psize) +.B void C_init(wsize, psize) .B arith wsize, psize; .PP .B int C_open(filename) -.B C_close() +.B void C_close() .B int C_busy() .B char *filename; .PP -.B C_magic() +.B void C_magic() .PP -.B C_df_dlb(l) -.B C_df_dnam(s) -.B C_df_ilb(l) +.B void C_df_dlb(l) +.B void C_df_dnam(s) +.B void C_df_ilb(l) .B label l; char *s; .PP -.B C_pro(s, l) -.B C_pro_narg(s) -.B C_end(l) -.B C_end_narg() +.B void C_pro(s, l) +.B void C_pro_narg(s) +.B void C_end(l) +.B void C_end_narg() .B char *s; arith l; .PP -.B C_exa_dlb(l) -.B C_exa_dnam(s) -.B C_exp(s) -.B C_ina_dlb(l) -.B C_ina_dnam(s) -.B C_inp(s) +.B void C_exa_dlb(l) +.B void C_exa_dnam(s) +.B void C_exp(s) +.B void C_ina_dlb(l) +.B void C_ina_dnam(s) +.B void C_inp(s) .B char *s; label l; .PP -.BI C_bss_ cstp () -.BI C_hol_ cstp () -.BI C_con_ cstp () -.BI C_rom_ cstp () +.BI "void C_bss_" cstp () +.BI "void C_hol_" cstp () +.BI "void C_con_" cstp () +.BI "void C_rom_" cstp () .PP .B #include -.B C_mes_begin(ms) -.BI C_ cstp () -.B C_mes_end() +.B void C_mes_begin(ms) +.BI "void C_" cstp () +.B void C_mes_end() .B int ms; .PP -.B C_exc(c1, c2) +.B void C_exc(c1, c2) .B arith c1, c2; .PP -.BI C_ mnem () -.BI C_ mnem _dlb() -.BI C_ mnem _dnam() -.BI C_ mnem _narg() +.BI "void C_" mnem () +.BI "void C_" mnem _dlb() +.BI "void C_" mnem _dnam() +.BI "void C_" mnem _narg() .PP -.B C_insertpart(id) +.B void C_insertpart(id) .B int id; .PP -.B C_beginpart(id) +.B void C_beginpart(id) .B int id; .PP -.B C_endpart(id) +.B void C_endpart(id) .B int id; .PP .B int C_getid() diff --git a/modules/src/em_code/em_private.h b/modules/src/em_code/em_private.h index 7fc357e45..0388b91b6 100644 --- a/modules/src/em_code/em_private.h +++ b/modules/src/em_code/em_private.h @@ -14,6 +14,10 @@ #include #include +#include + +#include "em_codeEK.h" + #ifdef READABLE_EM /* macros used in the definitions of the interface functions C_* */ #define OP(x) C_pt_op(x) @@ -64,3 +68,21 @@ #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 */ diff --git a/modules/src/em_code/end.c b/modules/src/em_code/end.c index bf3c42c93..027a21111 100644 --- a/modules/src/em_code/end.c +++ b/modules/src/em_code/end.c @@ -2,6 +2,7 @@ /* $Header$ */ +void CC_end(l) arith l; { diff --git a/modules/src/em_code/endarg.c b/modules/src/em_code/endarg.c index d9419f7a5..a5a3fee7d 100644 --- a/modules/src/em_code/endarg.c +++ b/modules/src/em_code/endarg.c @@ -2,6 +2,7 @@ /* $Header$ */ +void CC_endnarg() { /* END pseudo of procedure with unknown # of locals diff --git a/modules/src/em_code/exc.c b/modules/src/em_code/exc.c index 887e248d5..ac575e6ab 100644 --- a/modules/src/em_code/exc.c +++ b/modules/src/em_code/exc.c @@ -2,6 +2,7 @@ /* $Header$ */ +void CC_exc(c1,c2) arith c1,c2; { diff --git a/modules/src/em_code/failed.c b/modules/src/em_code/failed.c index 92fe96098..9eee8a910 100644 --- a/modules/src/em_code/failed.c +++ b/modules/src/em_code/failed.c @@ -5,6 +5,7 @@ */ #include +void C_failed() { sys_write(STDERR,"read, write, or open failed\n",28); diff --git a/modules/src/em_code/fcon.c b/modules/src/em_code/fcon.c index 162573c84..fc13bbadb 100644 --- a/modules/src/em_code/fcon.c +++ b/modules/src/em_code/fcon.c @@ -2,6 +2,7 @@ /* $Header$ */ +void CC_fcon(val, siz) char *val; arith siz; diff --git a/modules/src/em_code/getid.c b/modules/src/em_code/getid.c index 4b107bcef..ec7f96096 100644 --- a/modules/src/em_code/getid.c +++ b/modules/src/em_code/getid.c @@ -3,6 +3,7 @@ /* Get a unique id for C_insertpart, etc. */ +int C_getid() { static int id = 0; diff --git a/modules/src/em_code/icon.c b/modules/src/em_code/icon.c index 3785b3f0e..5cbbb0bb0 100644 --- a/modules/src/em_code/icon.c +++ b/modules/src/em_code/icon.c @@ -2,6 +2,7 @@ /* $Header$ */ +void CC_icon(val, siz) char *val; arith siz; diff --git a/modules/src/em_code/ilb.c b/modules/src/em_code/ilb.c index c3c209ed9..744582622 100644 --- a/modules/src/em_code/ilb.c +++ b/modules/src/em_code/ilb.c @@ -2,6 +2,7 @@ /* $Header$ */ +void CC_ilb(l) label l; { diff --git a/modules/src/em_code/insert.c b/modules/src/em_code/insert.c index 167eb38eb..cb9d6e65d 100644 --- a/modules/src/em_code/insert.c +++ b/modules/src/em_code/insert.c @@ -302,6 +302,7 @@ resume(p) pp->pp_begin = C_current_out - C_BASE; } +void C_insertpart(part) int part; { @@ -340,6 +341,7 @@ C_insertpart(part) resume(p); } +void C_beginpart(part) int part; { @@ -359,6 +361,7 @@ C_beginpart(part) resume(p); } +void C_endpart(part) int part; { diff --git a/modules/src/em_code/internerr.c b/modules/src/em_code/internerr.c index 187d72b65..517fe37ee 100644 --- a/modules/src/em_code/internerr.c +++ b/modules/src/em_code/internerr.c @@ -5,6 +5,7 @@ */ #include +void C_internal_error() { sys_write(STDERR,"internal error\n",15); diff --git a/modules/src/em_code/msend.c b/modules/src/em_code/msend.c index f7cdb4ccf..df7c30b04 100644 --- a/modules/src/em_code/msend.c +++ b/modules/src/em_code/msend.c @@ -2,6 +2,7 @@ /* $Header$ */ +void CC_msend() { CEND(); diff --git a/modules/src/em_code/msstart.c b/modules/src/em_code/msstart.c index 9ecf39832..74d39f705 100644 --- a/modules/src/em_code/msstart.c +++ b/modules/src/em_code/msstart.c @@ -2,6 +2,7 @@ /* $Header$ */ +void CC_msstart(cst) int cst; { diff --git a/modules/src/em_code/op.c b/modules/src/em_code/op.c index d57f9e678..28f901aae 100644 --- a/modules/src/em_code/op.c +++ b/modules/src/em_code/op.c @@ -2,6 +2,7 @@ /* $Header$ */ +void CC_op(opcode) { /* Instruction that never has an argument diff --git a/modules/src/em_code/opcst.c b/modules/src/em_code/opcst.c index 98ce4b25e..5cd6860db 100644 --- a/modules/src/em_code/opcst.c +++ b/modules/src/em_code/opcst.c @@ -2,6 +2,7 @@ /* $Header$ */ +void CC_opcst(opcode, cst) arith cst; { diff --git a/modules/src/em_code/opdlb.c b/modules/src/em_code/opdlb.c index 7b7d3df5b..2186918f5 100644 --- a/modules/src/em_code/opdlb.c +++ b/modules/src/em_code/opdlb.c @@ -2,6 +2,7 @@ /* $Header$ */ +void CC_opdlb(opcode, dlb, offset) label dlb; arith offset; diff --git a/modules/src/em_code/opdnam.c b/modules/src/em_code/opdnam.c index a40a0f288..88223f93f 100644 --- a/modules/src/em_code/opdnam.c +++ b/modules/src/em_code/opdnam.c @@ -2,6 +2,7 @@ /* $Header$ */ +void CC_opdnam(opcode, dnam, offset) char *dnam; arith offset; diff --git a/modules/src/em_code/opilb.c b/modules/src/em_code/opilb.c index 35c4763d4..e2ffa42f9 100644 --- a/modules/src/em_code/opilb.c +++ b/modules/src/em_code/opilb.c @@ -2,6 +2,7 @@ /* $Header$ */ +void CC_opilb(opcode, ilb) label ilb; { diff --git a/modules/src/em_code/opnarg.c b/modules/src/em_code/opnarg.c index 62e3bfeff..fa15a1bfa 100644 --- a/modules/src/em_code/opnarg.c +++ b/modules/src/em_code/opnarg.c @@ -2,6 +2,7 @@ /* $Header$ */ +void CC_opnarg(opcode) { /* Instruction with optional argument, but now without one diff --git a/modules/src/em_code/oppnam.c b/modules/src/em_code/oppnam.c index 756e4c786..141984948 100644 --- a/modules/src/em_code/oppnam.c +++ b/modules/src/em_code/oppnam.c @@ -2,6 +2,7 @@ /* $Header$ */ +void CC_oppnam(opcode, pnam) char *pnam; { diff --git a/modules/src/em_code/pnam.c b/modules/src/em_code/pnam.c index 6de38647d..fb2f730e2 100644 --- a/modules/src/em_code/pnam.c +++ b/modules/src/em_code/pnam.c @@ -2,6 +2,7 @@ /* $Header$ */ +void CC_pnam(str) char *str; { diff --git a/modules/src/em_code/pro.c b/modules/src/em_code/pro.c index 28c1608a5..aea680e50 100644 --- a/modules/src/em_code/pro.c +++ b/modules/src/em_code/pro.c @@ -2,6 +2,7 @@ /* $Header$ */ +void CC_pro(pnam, l) char *pnam; arith l; diff --git a/modules/src/em_code/pronarg.c b/modules/src/em_code/pronarg.c index f3a1b93e4..a8fabf90f 100644 --- a/modules/src/em_code/pronarg.c +++ b/modules/src/em_code/pronarg.c @@ -2,6 +2,7 @@ /* $Header$ */ +void CC_pronarg(pnam) char *pnam; { diff --git a/modules/src/em_code/proto.make b/modules/src/em_code/proto.make index 3a156ff10..f54154b09 100644 --- a/modules/src/em_code/proto.make +++ b/modules/src/em_code/proto.make @@ -6,7 +6,7 @@ ETC = $(SRC_HOME)/etc 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\ @@ -64,11 +64,12 @@ OBS = failed.$(SUF) insert.$(SUF) internerr.$(SUF) getid.$(SUF) 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) ; \ @@ -78,7 +79,6 @@ cmp: all -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' diff --git a/modules/src/em_code/psdlb.c b/modules/src/em_code/psdlb.c index 4a1c6be3e..9687ce386 100644 --- a/modules/src/em_code/psdlb.c +++ b/modules/src/em_code/psdlb.c @@ -2,6 +2,7 @@ /* $Header$ */ +void CC_psdlb(op, dlb) label dlb; { diff --git a/modules/src/em_code/psdnam.c b/modules/src/em_code/psdnam.c index d903d7bbd..e426d6c97 100644 --- a/modules/src/em_code/psdnam.c +++ b/modules/src/em_code/psdnam.c @@ -2,6 +2,7 @@ /* $Header$ */ +void CC_psdnam(op, dnam) char *dnam; { diff --git a/modules/src/em_code/pspnam.c b/modules/src/em_code/pspnam.c index 3a4bd369f..d033a1e0b 100644 --- a/modules/src/em_code/pspnam.c +++ b/modules/src/em_code/pspnam.c @@ -2,6 +2,7 @@ /* $Header$ */ +void CC_pspnam(op, pnam) char *pnam; { diff --git a/modules/src/em_code/scon.c b/modules/src/em_code/scon.c index c900b2730..d5f762427 100644 --- a/modules/src/em_code/scon.c +++ b/modules/src/em_code/scon.c @@ -2,6 +2,7 @@ /* $Header$ */ +void CC_scon(str, siz) char *str; arith siz; diff --git a/modules/src/em_code/ucon.c b/modules/src/em_code/ucon.c index b24d34385..df532bbd6 100644 --- a/modules/src/em_code/ucon.c +++ b/modules/src/em_code/ucon.c @@ -2,6 +2,7 @@ /* $Header$ */ +void CC_ucon(val,siz) char *val; arith siz; -- 2.34.1