diff --git a/lang/cem/cemcom.ansi/dumpidf.c b/lang/cem/cemcom.ansi/dumpidf.c index 849354bd3..e5d6d0941 100644 --- a/lang/cem/cemcom.ansi/dumpidf.c +++ b/lang/cem/cemcom.ansi/dumpidf.c @@ -8,6 +8,7 @@ #ifdef DEBUG #include "parameters.h" +#include #include #include #include "arith.h" @@ -455,8 +456,6 @@ p1_expr(lvl, expr) break; case String: { - char *bts2str(); - print( "\"%s\"\n", bts2str(expr->SG_VALUE, expr->SG_LEN-1, diff --git a/lang/cem/cemcom.ansi/eval.c b/lang/cem/cemcom.ansi/eval.c index 22d5c0854..0ec25dac6 100644 --- a/lang/cem/cemcom.ansi/eval.c +++ b/lang/cem/cemcom.ansi/eval.c @@ -9,6 +9,7 @@ #ifndef LINT #include +#include #include #include #include @@ -32,7 +33,6 @@ #define CRASH() crash("EVAL: CRASH at line %u", __LINE__) char *symbol2str(); -char *long2str(); arith NewLocal(); /* util.c */ #define LocalPtrVar() NewLocal(pointer_size, pointer_align, reg_pointer, REGISTER) extern int err_occurred; /* error.c */ diff --git a/lang/cem/cemcom.ansi/ival.g b/lang/cem/cemcom.ansi/ival.g index 69239c40c..e867aad86 100644 --- a/lang/cem/cemcom.ansi/ival.g +++ b/lang/cem/cemcom.ansi/ival.g @@ -15,6 +15,7 @@ #include "l_em.h" #include "l_lint.h" #endif /* LINT */ +#include #include #include #include @@ -38,7 +39,6 @@ #define con_nullbyte() C_con_ucon("0", (arith)1) #define aggregate_type(tp) ((tp)->tp_fund == ARRAY || (tp)->tp_fund == STRUCT) -char *long2str(); char *strncpy(); extern char options[]; static int gen_error; diff --git a/lang/cem/cemcom.ansi/l_outdef.c b/lang/cem/cemcom.ansi/l_outdef.c index 773b0681d..5317546fc 100644 --- a/lang/cem/cemcom.ansi/l_outdef.c +++ b/lang/cem/cemcom.ansi/l_outdef.c @@ -10,6 +10,7 @@ #ifdef LINT #include +#include #include #include "interface.h" #ifdef ANSI @@ -35,7 +36,6 @@ #include "l_outdef.h" #include "l_class.h" -extern char *bts2str(); extern char *symbol2str(); int stat_number = 9999; /* static scope number */ diff --git a/lang/cem/cemcom.ansi/main.c b/lang/cem/cemcom.ansi/main.c index 00e7eb3f8..5c7ada033 100644 --- a/lang/cem/cemcom.ansi/main.c +++ b/lang/cem/cemcom.ansi/main.c @@ -6,6 +6,7 @@ /* MAIN PROGRAM */ #include "parameters.h" +#include #include #include "idf.h" #include "input.h" @@ -442,7 +443,6 @@ preprocess() case STRING: { char sbuf[1024]; /* a transient buffer */ - char *bts2str(); print("\"%s\" ", bts2str(dot.tk_bts, dot.tk_len - 1, sbuf)); diff --git a/lang/cem/cemcom.ansi/replace.c b/lang/cem/cemcom.ansi/replace.c index e29412d2e..a1c53f32b 100644 --- a/lang/cem/cemcom.ansi/replace.c +++ b/lang/cem/cemcom.ansi/replace.c @@ -12,6 +12,7 @@ #ifndef NOPP +#include #include #include "idf.h" #include "input.h" @@ -514,7 +515,6 @@ macro_func(idef) */ register struct macro *mac = idef->id_macro; static char FilNamBuf[PATHLENGTH]; - char *long2str(); switch (idef->id_text[2]) { case 'F': /* __FILE__ */ diff --git a/lang/cem/cemcom.ansi/switch.c b/lang/cem/cemcom.ansi/switch.c index 0074584ff..77a9dcef3 100644 --- a/lang/cem/cemcom.ansi/switch.c +++ b/lang/cem/cemcom.ansi/switch.c @@ -12,6 +12,7 @@ #else #include "l_em.h" #endif /* LINT */ +#include #include #include "Lpars.h" #include "label.h" @@ -84,8 +85,6 @@ code_startswitch(expp) C_bra(l_table); /* goto start of switch_table */ } -extern char *long2str(); - code_endswitch() { register struct switch_hdr *sh = switch_stack; diff --git a/lang/cem/cpp.ansi/replace.c b/lang/cem/cpp.ansi/replace.c index c0b10e3ef..270cd36c2 100644 --- a/lang/cem/cpp.ansi/replace.c +++ b/lang/cem/cpp.ansi/replace.c @@ -10,6 +10,7 @@ #include #include +#include #include "parameters.h" #include "alloc.h" #include "idf.h" @@ -506,7 +507,6 @@ macro_func(idef) */ register struct macro *mac = idef->id_macro; static char FilNamBuf[PATHLENGTH]; - char *long2str(); switch (idef->id_text[2]) { case 'F': /* __FILE__ */ diff --git a/lang/m2/comp/type.c b/lang/m2/comp/type.c index 5912771fe..cfb00f599 100644 --- a/lang/m2/comp/type.c +++ b/lang/m2/comp/type.c @@ -13,6 +13,7 @@ #include "debug.h" #include +#include #include #include #include @@ -455,7 +456,6 @@ genrck(tp) arith lb, ub; register label ol; arith size = tp->tp_size; - extern char *long2str(); register t_type *btp = BaseType(tp); if (size < word_size) size = word_size; diff --git a/lang/pc/comp/cstoper.c b/lang/pc/comp/cstoper.c index c4196e522..a756b351b 100644 --- a/lang/pc/comp/cstoper.c +++ b/lang/pc/comp/cstoper.c @@ -5,6 +5,7 @@ #include "parameters.h" #include "debug.h" +#include #include #include #include @@ -475,7 +476,7 @@ CutSize(expr) InitCst() { - extern char *long2str(), *Salloc(); + extern char *Salloc(); register int i = 0; register arith bt = (arith)0; diff --git a/modules/src/read_em/build.lua b/modules/src/read_em/build.lua index 7c147dfc0..86794b036 100644 --- a/modules/src/read_em/build.lua +++ b/modules/src/read_em/build.lua @@ -1,4 +1,3 @@ - normalrule { name = "c_mnem_narg_h", ins = { @@ -53,6 +52,7 @@ local function variant(name, cflags) "modules/src/alloc+lib", "modules/src/em_code+headers", "modules/src/em_data+lib", + "modules/src/string+lib", "modules/src/system+lib", "./*.h", } @@ -61,4 +61,3 @@ end variant("lib_ev", {}) variant("lib_kv", { "-DCOMPACT" }) - diff --git a/modules/src/read_em/reade.c b/modules/src/read_em/reade.c index f8bf157f8..22737ec37 100644 --- a/modules/src/read_em/reade.c +++ b/modules/src/read_em/reade.c @@ -10,6 +10,7 @@ #include #include +#include /* #define XXX_YYY /* only for early debugging */ @@ -283,7 +284,6 @@ getnumber(c, ap) register char *p = str; int n; int expsign; - long str2long(); ap->ema_argtype = cst_ptyp; expsign = 0;