Remove a bunch of bogus extern declarations for things like strcpy(). dtrg-clang
authorDavid Given <dg@cowlark.com>
Sun, 30 Oct 2016 15:31:08 +0000 (16:31 +0100)
committerDavid Given <dg@cowlark.com>
Sun, 30 Oct 2016 15:31:08 +0000 (16:31 +0100)
38 files changed:
fast/driver/driver.c
fcc/driver/fcc.c
lang/basic/src/bem.h
lang/cem/cemcom.ansi/replace.c
lang/cem/cemcom/init.c
lang/cem/cemcom/replace.c
lang/cem/cpp.ansi/LLlex.c
lang/cem/cpp.ansi/init.c
lang/cem/cpp.ansi/replace.c
lang/cem/libcc/gen/ttyname.c
lang/cem/lint/lpass2/checkargs.c
lang/cem/lint/lpass2/lpass2.c
lang/m2/m2mm/main.c
lang/occam/comp/occam.g
mach/proto/cg/compute.c
modules/src/em_code/em.c
modules/src/em_code/insert.c
modules/src/em_opt/outputdfa.c
modules/src/system/lock.c
util/LLgen/src/machdep.c
util/LLgen/src/tokens.c
util/LLgen/src/tokens.g
util/ass/assex.h
util/byacc/defs.h
util/cmisc/cclash.c
util/cmisc/cid.c
util/cmisc/mkdep.c
util/cmisc/prid.c
util/cpp/LLlex.c
util/cpp/init.c
util/cpp/replace.c
util/ego/em_ego/em_ego.c
util/ego/ic/ic_lookup.c
util/grind/commands.g
util/grind/expr.c
util/grind/rd.c
util/int/log.c
util/int/main.c

index 3f43889..ff9a6fa 100644 (file)
@@ -198,8 +198,6 @@ USTRING tmp_file;
 
 int noexec = 0;
 
-extern char *strcat(), *strcpy(), *mktemp(), *strchr();
-
 trapcc(sig)
        int sig;
 {
index 101fa3f..385ef1d 100644 (file)
@@ -138,8 +138,6 @@ USTRING tmp_file;
 
 int noexec = 0;
 
-extern char *strcat(), *strcpy(), *mktemp(), *strchr();
-
 trapcc(sig)
        int sig;
 {
index deb6eb4..273c062 100644 (file)
@@ -71,13 +71,9 @@ extern int   dataused;
 extern Linerecord *currline;
 
 
-extern char *itoa();
 extern char *salloc();
 
-extern char *strcpy();
-extern char *strcat();
 #if __STDC__
 #include <stdlib.h>
 #else
-extern char *malloc();
 #endif
index cde3aaf..7585d48 100644 (file)
@@ -24,7 +24,6 @@
 extern struct idf *GetIdentifier();
 extern int InputLevel;
 struct repl *ReplaceList;      /* list of currently active macros */
-extern char *strcat(), *strcpy();
 
 int
 replace(idf)
index b7c8553..1abd5d8 100644 (file)
@@ -33,8 +33,6 @@ PRIVATE struct mkey   {
        {0,             K_UNKNOWN}
 };
 
-char *strcpy();
-
 EXPORT
 init_pp()
 {
index 758d14d..9f98818 100644 (file)
@@ -25,7 +25,6 @@
 #include       "interface.h"
 #include       "static.h"
 
-char *strcpy(), *strcat();
 char *long2str();
 extern int InputLevel;
 
index 3cd1628..84cc573 100644 (file)
@@ -30,7 +30,6 @@ int LexSave = 0;                /* last character read by GetChar       */
 extern int InputLevel;         /* # of current macro expansions        */
 
 extern char    *string_token();
-extern char    *strcpy();
 extern arith   char_constant();
 #define                FLG_ESEEN       0x01    /* possibly a floating point number */
 #define                FLG_DOTSEEN     0x02    /* certainly a floating point number */
index a9cba4d..070c1ba 100644 (file)
@@ -33,7 +33,6 @@ struct mkey   {
        {0,             K_UNKNOWN}
 };
 
-char *strcpy();
 char *sprint();
 
 init_pp()
index 255902f..d544dd3 100644 (file)
@@ -21,8 +21,6 @@
 #include       "replace.h"
 
 extern char *GetIdentifier();
-extern char *strcpy();
-extern char *strcat();
 extern int InputLevel;
 struct repl *ReplaceList;      /* list of currently active macros */
 
index ad991ac..d8307af 100644 (file)
@@ -5,8 +5,6 @@
 
 #define DEV "/dev/"
 
-extern char *strcpy(), *strcat();
-
 char *
 ttyname(filedes)
 {
index 6e0c774..4f10f25 100644 (file)
@@ -9,8 +9,6 @@
 #include       "private.h"
 #include       "inpdef.h"
 
-extern char *strcpy();
-
 #define        streq(s1,s2)    (strcmp(s1, s2) == 0)
 
 /* a format is developed into a normal parameter definition */
index 6775f17..500e5cb 100644 (file)
@@ -12,8 +12,6 @@
 #include       "class.h"
 #include       "inpdef.h"
 
-extern char *strcpy();
-
 #define        streq(s1,s2)    (strcmp(s1, s2) == 0)
 
 PRIVATE char cur_name[NAMESIZE];
index 8b951a8..367cbb4 100644 (file)
@@ -27,8 +27,6 @@ int           nDEF, mDEF;
 struct file_list *CurrentArg;
 extern int     err_occurred;
 extern int     Roption;
-extern char    *strrchr();
-extern char    *strcpy(), *strcat();
 
 char *
 basename(s)
index 3385cca..97984b1 100644 (file)
@@ -6,6 +6,7 @@
 /*     OCCAM           */
 {
 #include <stdlib.h>
+#include <string.h>
 #include "token.h"
 #include "symtab.h"
 #include "expr.h"
@@ -18,7 +19,6 @@
 
 static void nonconst(), nonpositive(), rep_cleanup(), check_assoc();
 void init_builtins();
-char *strcpy();
 
 extern int lineno, LLsymb;
 union type_info info, none;
index 26570f4..49d2381 100644 (file)
@@ -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;
index f13ab28..cf6948b 100644 (file)
@@ -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
index f7526b8..bb71c83 100644 (file)
@@ -134,8 +134,6 @@ C_findpart(part)
        return p;
 }
 
-extern char    *strcpy(), *strcat(), *mktemp();
-
 static
 swttmp()
 {
index cebdd95..7eb81cf 100644 (file)
@@ -40,7 +40,6 @@ PRIVATE
 openofile(filename)
        char *filename;
 {
-       char *strcpy(), *strcat();
        strcpy(ofilename,filename);
        strcpy(ofiletemp,filename);
        strcat(ofiletemp,".new");
index 0f6be59..52d2f38 100644 (file)
@@ -12,7 +12,6 @@ sys_lock(path)
 {
        char buf[1024];
        char *tmpf = ".lockXXXXXX";
-       char *strrchr(), *strcpy(), *mktemp();
        char *p;
        int ok, fd;
 
index 7809514..7fddf8e 100644 (file)
@@ -57,7 +57,6 @@ libpath(s) string s; {
        register string p;
        register length;
        p_mem alloc();
-       string strcpy(), strcat();
 
        char* libdir = getenv("LLGEN_LIB_DIR");
        if (!libdir)
index 8fa2b36..09bd75a 100644 (file)
@@ -577,8 +577,6 @@ cpy(s,p,inserted) register string p; {
        return p;
 }
 
-string strcpy();
-
 LLmessage(d) {
        /*
         * d is either 0, in which case the current token has been deleted,
index fbdd83d..ccc214b 100644 (file)
@@ -547,8 +547,6 @@ cpy(s,p,inserted) register string p; {
        return p;
 }
 
-string strcpy();
-
 LLmessage(d) {
        /*
         * d is either 0, in which case the current token has been deleted,
index f28c6f5..d3a50ed 100644 (file)
@@ -150,16 +150,4 @@ extern  relc_t  *text_reloc();
 extern  relc_t  *data_reloc();
 extern  area_t  getarea();
 
-/*
- * all used library routines
- */
-extern  char    *malloc();
-extern  int     open();
-extern  int     creat();
-extern  int     getpid();
-extern  int     unlink();
-extern  int     close();
-extern  int     strcmp();
-extern  char    *strcpy();
-
 #define void    int
index 5eef5c5..5d13945 100644 (file)
@@ -269,17 +269,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();
index 44fa6cb..89ad40c 100644 (file)
@@ -184,8 +184,6 @@ char *
 Salloc(str)
        char *str;
 {
-       char *strcpy();
-
        if (str == 0)
                str = "";
 
index a21a4d9..f2f4457 100644 (file)
@@ -159,8 +159,6 @@ char *
 Salloc(str)
        char *str;
 {
-       char *strcpy();
-
        if (str == 0) {
                str = "";
        }
index 8e14ae2..da14ff8 100644 (file)
@@ -64,7 +64,6 @@ add_name(nm)
        char *nm;
 {
        struct namelist *nlp = nl, *lnlp = 0, *nnlp;
-       char *strcpy();
 
        while (nlp) {
                register i = strcmp(nm, nlp->name);
index e81efe5..8221cfb 100644 (file)
@@ -101,8 +101,6 @@ char *
 Salloc(str)
        char *str;
 {
-       char *strcpy();
-
        if (str == 0)
                str = "";
 
index 93602e9..498c489 100644 (file)
@@ -26,7 +26,6 @@ int AccDefined = 0;           /* accept "defined(...)"                */
 int UnknownIdIsZero = 0;       /* interpret unknown id as integer 0    */
 
 char *string_token();
-char *strcpy();
 
 PushLex()
 {
index 61e2ac8..44fc2d7 100644 (file)
@@ -30,8 +30,6 @@ PRIVATE struct mkey   {
        {0,             K_UNKNOWN}
 };
 
-char *strcpy();
-
 EXPORT
 init_pp()
 {
index 1951e1b..2c3eec8 100644 (file)
@@ -20,7 +20,6 @@
 #include       "class.h"
 #include       "interface.h"
 
-char *strcpy(), *strcat();
 char *long2str();
 extern int InputLevel;
 
index e7bab27..2c8717c 100644 (file)
@@ -59,10 +59,6 @@ static const struct
 #define MAXARGS 1024 /* mar # of args */
 #define NTEMPS 4 /* # of temporary files; not tunable */
 
-extern char* mktemp();
-extern char* strcpy(), *strcat();
-extern char* strrchr();
-
 static char ddump[128] = TMP_DIR; /* data label dump file */
 static char pdump[128] = TMP_DIR; /* procedure name dump file */
 static char tmpbufs[NTEMPS * 2][128] = {
index 8a7afa2..34c2391 100644 (file)
@@ -26,8 +26,6 @@ prc_p prochash[NPROCHASH];
 num_p numhash[NNUMHASH];
 char *lastname;
 
-extern char    *strcpy();
-
 #define newsym()       (sym_p) newstruct(sym)
 #define newprc()       (prc_p) newstruct(prc)
 #define newnum()       (num_p) newstruct(num)
index eeb3332..9f8f759 100644 (file)
@@ -19,8 +19,6 @@
 #include       "misc.h"
 
 extern char    *Salloc();
-extern char    *strchr();
-extern char    *strcpy();
 extern void    signal_child();
 extern FILE    *db_in;
 extern int     disable_intr;
index 8b9409c..579515e 100644 (file)
@@ -56,7 +56,6 @@
 
 extern FILE    *db_out;
 extern int     stack_offset;
-extern char    *strcpy();
 extern t_addr  *get_EM_regs();
 extern char    *memcpy();
 extern char    *malloc(), *realloc();
index 13085b5..07ba02e 100644 (file)
@@ -205,8 +205,6 @@ rd_name(names, count)
   }
 }
 
-extern char    *strcpy();
-
 rd_string(strings, count)
   register char        *strings;
   long count;
index 517d90a..70d1d29 100644 (file)
@@ -17,9 +17,6 @@
 
 #ifdef LOGGING
 
-extern int strlen();
-extern char *strcpy();
-
 extern long mess_id;                   /* from io.c */
 extern FILE *fcreat_high();            /* from io.c */
 
index 3681d91..5934476 100644 (file)
 #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;