diff --git a/lang/cem/cpp.ansi/preprocess.c b/lang/cem/cpp.ansi/preprocess.c index 11a373c3f8..5c35874901 100644 --- a/lang/cem/cpp.ansi/preprocess.c +++ b/lang/cem/cpp.ansi/preprocess.c @@ -22,6 +22,7 @@ #include "error.h" #include "bits.h" #include "skip.h" +#include "print.h" char _obuf[OBUFSIZE]; #ifdef DOBITS @@ -29,8 +30,6 @@ char bits[128]; #endif extern int InputLevel; -extern char* sprint(); - void Xflush(void) { sys_write(STDOUT, _obuf, OBUFSIZE); diff --git a/lang/m2/comp/enter.c b/lang/m2/comp/enter.c index d55ed4f56e..a685445f00 100644 --- a/lang/m2/comp/enter.c +++ b/lang/m2/comp/enter.c @@ -118,7 +118,6 @@ void EnterVarList(struct node *Idlist, struct type *type, int local) register struct node *idlist = Idlist; register struct scopelist *sc = CurrVis; char buf[256]; - extern char *sprint(); if (local) { /* Find the closest enclosing open scope. This diff --git a/lang/m2/comp/f_info.h b/lang/m2/comp/f_info.h index ba2ea84016..f7f4277188 100644 --- a/lang/m2/comp/f_info.h +++ b/lang/m2/comp/f_info.h @@ -9,6 +9,8 @@ /* $Id$ */ +#include "print.h" + struct f_info { unsigned short f_lineno; char *f_filename; diff --git a/lang/m2/comp/misc.c b/lang/m2/comp/misc.c index 031816f1db..04882d529b 100644 --- a/lang/m2/comp/misc.c +++ b/lang/m2/comp/misc.c @@ -46,7 +46,6 @@ struct idf *gen_anon_idf(void) */ static int name_cnt; char *s = Malloc(strlen(FileName)+50); - char *sprint(); sprint(s, "#%d in %s, line %u", ++name_cnt, FileName, LineNumber); diff --git a/lang/m2/comp/program.g b/lang/m2/comp/program.g index 4e6180793a..41c085e40a 100644 --- a/lang/m2/comp/program.g +++ b/lang/m2/comp/program.g @@ -144,7 +144,6 @@ DefinitionModule int dummy; extern struct idf *DefId; extern int ForeignFlag; - extern char *sprint(); register struct scope *currscope = CurrentScope; char buf[512]; } : diff --git a/lang/m2/comp/stab.c b/lang/m2/comp/stab.c index 2f09ec9255..7ade98bfec 100644 --- a/lang/m2/comp/stab.c +++ b/lang/m2/comp/stab.c @@ -28,13 +28,13 @@ #include "error.h" #include "stab.h" #include "main.h" +#include "print.h" extern int gdb_flag; #define INCR_SIZE 64 extern int proclevel; -extern char *sprint(); static struct db_str { unsigned sz; diff --git a/lang/m2/m2mm/f_info.h b/lang/m2/m2mm/f_info.h index 7645d732ae..3b5d8ca1cf 100644 --- a/lang/m2/m2mm/f_info.h +++ b/lang/m2/m2mm/f_info.h @@ -9,6 +9,8 @@ /* $Id$ */ +#include "print.h" + struct f_info { unsigned short f_lineno; char *f_fn; diff --git a/lang/m2/m2mm/misc.c b/lang/m2/m2mm/misc.c index 01fb332bc5..eabf2091c7 100644 --- a/lang/m2/m2mm/misc.c +++ b/lang/m2/m2mm/misc.c @@ -23,7 +23,6 @@ gen_anon_idf() */ static int name_cnt; char buff[100]; - char *sprint(); sprint(buff, "#%d in %s, line %u", ++name_cnt, FileName, LineNumber);