From 58698bed19ecc58d932dd1b74d35647ba6710109 Mon Sep 17 00:00:00 2001 From: David Given Date: Sun, 10 Feb 2019 13:20:04 +0100 Subject: [PATCH] Removed a whole bunch of old strcpy() prototypes in favour of . --- lang/cem/cpp.ansi/init.c | 1 - mach/proto/cg/compute.c | 2 +- modules/src/em_code/em.c | 1 - modules/src/em_opt/outputdfa.c | 2 +- util/byacc/defs.h | 16 ++-------------- util/cmisc/cclash.c | 3 +-- util/cmisc/cid.c | 3 +-- util/cmisc/mkdep.c | 2 +- util/cmisc/prid.c | 3 +-- util/cpp/LLlex.c | 2 +- util/cpp/init.c | 3 +-- util/cpp/replace.c | 1 - util/int/log.c | 4 +--- util/int/main.c | 6 ++---- 14 files changed, 13 insertions(+), 36 deletions(-) diff --git a/lang/cem/cpp.ansi/init.c b/lang/cem/cpp.ansi/init.c index 3953609b5..810b4204c 100644 --- a/lang/cem/cpp.ansi/init.c +++ b/lang/cem/cpp.ansi/init.c @@ -34,7 +34,6 @@ struct mkey { {0, K_UNKNOWN} }; -char *strcpy(); char *sprint(); init_pp() diff --git a/mach/proto/cg/compute.c b/mach/proto/cg/compute.c index 26570f49d..49d2381fa 100644 --- a/mach/proto/cg/compute.c +++ b/mach/proto/cg/compute.c @@ -73,7 +73,7 @@ char opdesc[] = { LLDEF, /* EX_REGVAR */ }; -string salloc(),strcpy(),strcat(); +string salloc(); string mycat(s1,s2) string s1,s2; { register string s; diff --git a/modules/src/em_code/em.c b/modules/src/em_code/em.c index f13ab28dc..cf6948bff 100644 --- a/modules/src/em_code/em.c +++ b/modules/src/em_code/em.c @@ -31,7 +31,6 @@ File *C_ofp; #ifndef INCORE File *C_tfr; char *C_tmpfile; -char *strcpy(), *strcat(); char *C_ibuf = 0; long C_current_out; #endif diff --git a/modules/src/em_opt/outputdfa.c b/modules/src/em_opt/outputdfa.c index cebdd958c..c58c966b9 100644 --- a/modules/src/em_opt/outputdfa.c +++ b/modules/src/em_opt/outputdfa.c @@ -2,6 +2,7 @@ static char rcsidp5[] = "$Id$"; #endif +#include #include "parser.h" #include "Lpars.h" @@ -40,7 +41,6 @@ PRIVATE openofile(filename) char *filename; { - char *strcpy(), *strcat(); strcpy(ofilename,filename); strcpy(ofiletemp,filename); strcat(ofiletemp,".new"); diff --git a/util/byacc/defs.h b/util/byacc/defs.h index 5eef5c55a..8be3d80db 100644 --- a/util/byacc/defs.h +++ b/util/byacc/defs.h @@ -1,6 +1,8 @@ #include #include #include +#include +#include /* machine dependent definitions */ /* the following definitions are for the VAX */ @@ -269,17 +271,3 @@ extern short final_state; extern char *allocate(); extern bucket *lookup(); extern bucket *make_bucket(); - - -/* system variables */ - -extern int errno; - - -/* system functions */ - -extern void free(); -extern char *calloc(); -extern char *malloc(); -extern char *realloc(); -extern char *strcpy(); diff --git a/util/cmisc/cclash.c b/util/cmisc/cclash.c index 44fa6cbe6..1bc8c68b3 100644 --- a/util/cmisc/cclash.c +++ b/util/cmisc/cclash.c @@ -30,6 +30,7 @@ */ #include +#include #define DEF_LENGTH 8 @@ -184,8 +185,6 @@ char * Salloc(str) char *str; { - char *strcpy(); - if (str == 0) str = ""; diff --git a/util/cmisc/cid.c b/util/cmisc/cid.c index a21a4d940..b09136e33 100644 --- a/util/cmisc/cid.c +++ b/util/cmisc/cid.c @@ -14,6 +14,7 @@ */ #include +#include #ifndef DEF_LENGTH #define DEF_LENGTH 8 @@ -159,8 +160,6 @@ char * Salloc(str) char *str; { - char *strcpy(); - if (str == 0) { str = ""; } diff --git a/util/cmisc/mkdep.c b/util/cmisc/mkdep.c index 8e14ae2dc..065678929 100644 --- a/util/cmisc/mkdep.c +++ b/util/cmisc/mkdep.c @@ -10,6 +10,7 @@ */ #include +#incoude #define BSIZ 1024 char *prog; @@ -64,7 +65,6 @@ add_name(nm) char *nm; { struct namelist *nlp = nl, *lnlp = 0, *nnlp; - char *strcpy(); while (nlp) { register i = strcmp(nm, nlp->name); diff --git a/util/cmisc/prid.c b/util/cmisc/prid.c index e81efe59e..79818bb27 100644 --- a/util/cmisc/prid.c +++ b/util/cmisc/prid.c @@ -14,6 +14,7 @@ */ #include +#include extern char *ProgName; @@ -101,8 +102,6 @@ char * Salloc(str) char *str; { - char *strcpy(); - if (str == 0) str = ""; diff --git a/util/cpp/LLlex.c b/util/cpp/LLlex.c index 93602e9d9..4bba8c0a2 100644 --- a/util/cpp/LLlex.c +++ b/util/cpp/LLlex.c @@ -5,6 +5,7 @@ /* $Id$ */ /* L E X I C A L A N A L Y Z E R */ +#include #include "idfsize.h" #include "numsize.h" #include "strsize.h" @@ -26,7 +27,6 @@ int AccDefined = 0; /* accept "defined(...)" */ int UnknownIdIsZero = 0; /* interpret unknown id as integer 0 */ char *string_token(); -char *strcpy(); PushLex() { diff --git a/util/cpp/init.c b/util/cpp/init.c index 61e2ac809..8a7273711 100644 --- a/util/cpp/init.c +++ b/util/cpp/init.c @@ -5,6 +5,7 @@ */ /* PREPROCESSOR: INITIALIZATION ROUTINES */ +#include #include #include #include "class.h" @@ -30,8 +31,6 @@ PRIVATE struct mkey { {0, K_UNKNOWN} }; -char *strcpy(); - EXPORT init_pp() { diff --git a/util/cpp/replace.c b/util/cpp/replace.c index 1951e1bda..2c3eec830 100644 --- a/util/cpp/replace.c +++ b/util/cpp/replace.c @@ -20,7 +20,6 @@ #include "class.h" #include "interface.h" -char *strcpy(), *strcat(); char *long2str(); extern int InputLevel; diff --git a/util/int/log.c b/util/int/log.c index 517d90a88..add9f356a 100644 --- a/util/int/log.c +++ b/util/int/log.c @@ -5,6 +5,7 @@ /* $Id$ */ #include +#include #if __STDC__ #include #else @@ -17,9 +18,6 @@ #ifdef LOGGING -extern int strlen(); -extern char *strcpy(); - extern long mess_id; /* from io.c */ extern FILE *fcreat_high(); /* from io.c */ diff --git a/util/int/main.c b/util/int/main.c index 3681d915f..a3fd17b4f 100644 --- a/util/int/main.c +++ b/util/int/main.c @@ -5,6 +5,8 @@ /* $Id$ */ #include +#include +#include #include #include @@ -20,10 +22,6 @@ #include "opcode.h" #include "rsb.h" -extern int atoi(); -extern long atol(); -extern char *strcpy(); - char mess_file[64] = "int.mess"; /* name of message file */ jmp_buf trapbuf;