summaryrefslogtreecommitdiffstats
path: root/usr.bin/make
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/make')
-rw-r--r--usr.bin/make/arch.c10
-rw-r--r--usr.bin/make/buf.h24
-rw-r--r--usr.bin/make/compat.c6
-rw-r--r--usr.bin/make/cond.c30
-rw-r--r--usr.bin/make/dir.c12
-rw-r--r--usr.bin/make/dir.h28
-rw-r--r--usr.bin/make/for.c4
-rw-r--r--usr.bin/make/hash.c2
-rw-r--r--usr.bin/make/hash.h14
-rw-r--r--usr.bin/make/job.c38
-rw-r--r--usr.bin/make/job.h26
-rw-r--r--usr.bin/make/lst.h61
-rw-r--r--usr.bin/make/lst.lib/lstDestroy.c2
-rw-r--r--usr.bin/make/lst.lib/lstDupl.c2
-rw-r--r--usr.bin/make/lst.lib/lstFind.c2
-rw-r--r--usr.bin/make/lst.lib/lstFindFrom.c2
-rw-r--r--usr.bin/make/lst.lib/lstForEach.c2
-rw-r--r--usr.bin/make/lst.lib/lstForEachFrom.c2
-rw-r--r--usr.bin/make/main.c10
-rw-r--r--usr.bin/make/make.c12
-rw-r--r--usr.bin/make/make.h39
-rw-r--r--usr.bin/make/nonints.h170
-rw-r--r--usr.bin/make/parse.c42
-rw-r--r--usr.bin/make/suff.c48
-rw-r--r--usr.bin/make/targ.c8
-rw-r--r--usr.bin/make/var.c43
26 files changed, 303 insertions, 336 deletions
diff --git a/usr.bin/make/arch.c b/usr.bin/make/arch.c
index a842577..7aba6c9 100644
--- a/usr.bin/make/arch.c
+++ b/usr.bin/make/arch.c
@@ -115,13 +115,13 @@ typedef struct Arch {
size_t fnamesize; /* Size of the string table */
} Arch;
-static int ArchFindArchive __P((void *, void *));
-static void ArchFree __P((void *));
-static struct ar_hdr *ArchStatMember __P((char *, char *, Boolean));
-static FILE *ArchFindMember __P((char *, char *, struct ar_hdr *, char *));
+static int ArchFindArchive(void *, void *);
+static void ArchFree(void *);
+static struct ar_hdr *ArchStatMember(char *, char *, Boolean);
+static FILE *ArchFindMember(char *, char *, struct ar_hdr *, char *);
#if defined(__svr4__) || defined(__SVR4) || defined(__ELF__)
#define SVR4ARCHIVES
-static int ArchSVR4Entry __P((Arch *, char *, size_t, FILE *));
+static int ArchSVR4Entry(Arch *, char *, size_t, FILE *);
#endif
/*-
diff --git a/usr.bin/make/buf.h b/usr.bin/make/buf.h
index 207262b..d6367be 100644
--- a/usr.bin/make/buf.h
+++ b/usr.bin/make/buf.h
@@ -66,17 +66,17 @@ typedef struct Buffer {
#define BUF_ERROR 256
-void Buf_OvAddByte __P((Buffer, int));
-void Buf_AddBytes __P((Buffer, int, const Byte *));
-void Buf_UngetByte __P((Buffer, int));
-void Buf_UngetBytes __P((Buffer, int, Byte *));
-int Buf_GetByte __P((Buffer));
-int Buf_GetBytes __P((Buffer, int, Byte *));
-Byte *Buf_GetAll __P((Buffer, int *));
-void Buf_Discard __P((Buffer, int));
-int Buf_Size __P((Buffer));
-Buffer Buf_Init __P((int));
-void Buf_Destroy __P((Buffer, Boolean));
-void Buf_ReplaceLastByte __P((Buffer, int));
+void Buf_OvAddByte(Buffer, int);
+void Buf_AddBytes(Buffer, int, const Byte *);
+void Buf_UngetByte(Buffer, int);
+void Buf_UngetBytes(Buffer, int, Byte *);
+int Buf_GetByte(Buffer);
+int Buf_GetBytes(Buffer, int, Byte *);
+Byte *Buf_GetAll(Buffer, int *);
+void Buf_Discard(Buffer, int);
+int Buf_Size(Buffer);
+Buffer Buf_Init(int);
+void Buf_Destroy(Buffer, Boolean);
+void Buf_ReplaceLastByte(Buffer, int);
#endif /* _BUF_H */
diff --git a/usr.bin/make/compat.c b/usr.bin/make/compat.c
index b4d2823..0a60bac 100644
--- a/usr.bin/make/compat.c
+++ b/usr.bin/make/compat.c
@@ -80,9 +80,9 @@ static char meta[256];
static GNode *curTarg = NULL;
static GNode *ENDNode;
-static void CompatInterrupt __P((int));
-static int CompatRunCommand __P((void *, void *));
-static int CompatMake __P((void *, void *));
+static void CompatInterrupt(int);
+static int CompatRunCommand(void *, void *);
+static int CompatMake(void *, void *);
static char *sh_builtin[] = {
"alias", "cd", "eval", "exec", "exit", "read", "set", "ulimit",
diff --git a/usr.bin/make/cond.c b/usr.bin/make/cond.c
index 8e94700..2def8dc 100644
--- a/usr.bin/make/cond.c
+++ b/usr.bin/make/cond.c
@@ -97,24 +97,24 @@ typedef enum {
* Structures to handle elegantly the different forms of #if's. The
* last two fields are stored in condInvert and condDefProc, respectively.
*/
-static void CondPushBack __P((Token));
-static int CondGetArg __P((char **, char **, char *, Boolean));
-static Boolean CondDoDefined __P((int, char *));
-static int CondStrMatch __P((void *, void *));
-static Boolean CondDoMake __P((int, char *));
-static Boolean CondDoExists __P((int, char *));
-static Boolean CondDoTarget __P((int, char *));
-static char * CondCvtArg __P((char *, double *));
-static Token CondToken __P((Boolean));
-static Token CondT __P((Boolean));
-static Token CondF __P((Boolean));
-static Token CondE __P((Boolean));
+static void CondPushBack(Token);
+static int CondGetArg(char **, char **, char *, Boolean);
+static Boolean CondDoDefined(int, char *);
+static int CondStrMatch(void *, void *);
+static Boolean CondDoMake(int, char *);
+static Boolean CondDoExists(int, char *);
+static Boolean CondDoTarget(int, char *);
+static char * CondCvtArg(char *, double *);
+static Token CondToken(Boolean);
+static Token CondT(Boolean);
+static Token CondF(Boolean);
+static Token CondE(Boolean);
static struct If {
char *form; /* Form of if */
int formlen; /* Length of form */
Boolean doNot; /* TRUE if default function should be negated */
- Boolean (*defProc) __P((int, char *)); /* Default function to apply */
+ Boolean (*defProc)(int, char *); /* Default function to apply */
} ifs[] = {
{ "ifdef", 5, FALSE, CondDoDefined },
{ "ifndef", 6, TRUE, CondDoDefined },
@@ -126,7 +126,7 @@ static struct If {
static Boolean condInvert; /* Invert the default function */
static Boolean (*condDefProc) /* Default function to apply */
- __P((int, char *));
+(int, char *);
static char *condExpr; /* The expression to parse */
static Token condPushBack=None; /* Single push-back token used in
* parsing */
@@ -764,7 +764,7 @@ error:
break;
}
default: {
- Boolean (*evalProc) __P((int, char *));
+ Boolean (*evalProc)(int, char *);
Boolean invert = FALSE;
char *arg;
int arglen;
diff --git a/usr.bin/make/dir.c b/usr.bin/make/dir.c
index 76b2478..f20df20 100644
--- a/usr.bin/make/dir.c
+++ b/usr.bin/make/dir.c
@@ -190,12 +190,12 @@ static Hash_Table mtimes; /* Results of doing a last-resort stat in
* should be ok, but... */
-static int DirFindName __P((void *, void *));
-static int DirMatchFiles __P((char *, Path *, Lst));
-static void DirExpandCurly __P((char *, char *, Lst, Lst));
-static void DirExpandInt __P((char *, Lst, Lst));
-static int DirPrintWord __P((void *, void *));
-static int DirPrintDir __P((void *, void *));
+static int DirFindName(void *, void *);
+static int DirMatchFiles(char *, Path *, Lst);
+static void DirExpandCurly(char *, char *, Lst, Lst);
+static void DirExpandInt(char *, Lst, Lst);
+static int DirPrintWord(void *, void *);
+static int DirPrintDir(void *, void *);
/*-
*-----------------------------------------------------------------------
diff --git a/usr.bin/make/dir.h b/usr.bin/make/dir.h
index c1f8d93..0f84a7b 100644
--- a/usr.bin/make/dir.h
+++ b/usr.bin/make/dir.h
@@ -53,19 +53,19 @@ typedef struct Path {
Hash_Table files; /* Hash table of files in directory */
} Path;
-void Dir_Init __P((void));
-void Dir_End __P((void));
-Boolean Dir_HasWildcards __P((char *));
-void Dir_Expand __P((char *, Lst, Lst));
-char *Dir_FindFile __P((char *, Lst));
-int Dir_MTime __P((GNode *));
-void Dir_AddDir __P((Lst, char *));
-char *Dir_MakeFlags __P((char *, Lst));
-void Dir_ClearPath __P((Lst));
-void Dir_Concat __P((Lst, Lst));
-void Dir_PrintDirectories __P((void));
-void Dir_PrintPath __P((Lst));
-void Dir_Destroy __P((void *));
-void * Dir_CopyDir __P((void *));
+void Dir_Init(void);
+void Dir_End(void);
+Boolean Dir_HasWildcards(char *);
+void Dir_Expand(char *, Lst, Lst);
+char *Dir_FindFile(char *, Lst);
+int Dir_MTime(GNode *);
+void Dir_AddDir(Lst, char *);
+char *Dir_MakeFlags(char *, Lst);
+void Dir_ClearPath(Lst);
+void Dir_Concat(Lst, Lst);
+void Dir_PrintDirectories(void);
+void Dir_PrintPath(Lst);
+void Dir_Destroy(void *);
+void * Dir_CopyDir(void *);
#endif /* _DIR */
diff --git a/usr.bin/make/for.c b/usr.bin/make/for.c
index 714ccfb..22e0f73 100644
--- a/usr.bin/make/for.c
+++ b/usr.bin/make/for.c
@@ -82,7 +82,7 @@ typedef struct _For {
Lst lst; /* List of variables */
} For;
-static int ForExec __P((void *, void *));
+static int ForExec(void *, void *);
@@ -297,6 +297,6 @@ For_Run()
Lst_ForEach(arg.lst, ForExec, (void *) &arg);
free(arg.var);
- Lst_Destroy(arg.lst, (void (*) __P((void *))) free);
+ Lst_Destroy(arg.lst, (void (*)(void *)) free);
Buf_Destroy(arg.buf, TRUE);
}
diff --git a/usr.bin/make/hash.c b/usr.bin/make/hash.c
index c063f45..1e03dd3 100644
--- a/usr.bin/make/hash.c
+++ b/usr.bin/make/hash.c
@@ -60,7 +60,7 @@ __RCSID("$FreeBSD$");
* defined:
*/
-static void RebuildTable __P((Hash_Table *));
+static void RebuildTable(Hash_Table *);
/*
* The following defines the ratio of # entries to # buckets
diff --git a/usr.bin/make/hash.h b/usr.bin/make/hash.h
index 19012fa..6809901 100644
--- a/usr.bin/make/hash.h
+++ b/usr.bin/make/hash.h
@@ -106,12 +106,12 @@ typedef struct Hash_Search {
#define Hash_Size(n) (((n) + sizeof (int) - 1) / sizeof (int))
-void Hash_InitTable __P((Hash_Table *, int));
-void Hash_DeleteTable __P((Hash_Table *));
-Hash_Entry *Hash_FindEntry __P((Hash_Table *, char *));
-Hash_Entry *Hash_CreateEntry __P((Hash_Table *, char *, Boolean *));
-void Hash_DeleteEntry __P((Hash_Table *, Hash_Entry *));
-Hash_Entry *Hash_EnumFirst __P((Hash_Table *, Hash_Search *));
-Hash_Entry *Hash_EnumNext __P((Hash_Search *));
+void Hash_InitTable(Hash_Table *, int);
+void Hash_DeleteTable(Hash_Table *);
+Hash_Entry *Hash_FindEntry(Hash_Table *, char *);
+Hash_Entry *Hash_CreateEntry(Hash_Table *, char *, Boolean *);
+void Hash_DeleteEntry(Hash_Table *, Hash_Entry *);
+Hash_Entry *Hash_EnumFirst(Hash_Table *, Hash_Search *);
+Hash_Entry *Hash_EnumNext(Hash_Search *);
#endif /* _HASH */
diff --git a/usr.bin/make/job.c b/usr.bin/make/job.c
index 72d3f3c..b12b39a 100644
--- a/usr.bin/make/job.c
+++ b/usr.bin/make/job.c
@@ -298,29 +298,29 @@ STATIC Lst stoppedJobs; /* Lst of Job structures describing
#define W_SETEXITSTATUS(st, val) W_SETMASKED(st, val, WEXITSTATUS)
-static int JobCondPassSig __P((void *, void *));
-static void JobPassSig __P((int));
-static int JobCmpPid __P((void *, void *));
-static int JobPrintCommand __P((void *, void *));
-static int JobSaveCommand __P((void *, void *));
-static void JobClose __P((Job *));
+static int JobCondPassSig(void *, void *);
+static void JobPassSig(int);
+static int JobCmpPid(void *, void *);
+static int JobPrintCommand(void *, void *);
+static int JobSaveCommand(void *, void *);
+static void JobClose(Job *);
#ifdef REMOTE
-static int JobCmpRmtID __P((Job *, int));
+static int JobCmpRmtID(Job *, int);
# ifdef RMT_WILL_WATCH
-static void JobLocalInput __P((int, Job *));
+static void JobLocalInput(int, Job *);
# endif
#else
-static void JobFinish __P((Job *, int *));
-static void JobExec __P((Job *, char **));
+static void JobFinish(Job *, int *);
+static void JobExec(Job *, char **);
#endif
-static void JobMakeArgv __P((Job *, char **));
-static void JobRestart __P((Job *));
-static int JobStart __P((GNode *, int, Job *));
-static char *JobOutput __P((Job *, char *, char *, int));
-static void JobDoOutput __P((Job *, Boolean));
-static Shell *JobMatchShell __P((char *));
-static void JobInterrupt __P((int, int));
-static void JobRestartJobs __P((void));
+static void JobMakeArgv(Job *, char **);
+static void JobRestart(Job *);
+static int JobStart(GNode *, int, Job *);
+static char *JobOutput(Job *, char *, char *, int);
+static void JobDoOutput(Job *, Boolean);
+static Shell *JobMatchShell(char *);
+static void JobInterrupt(int, int);
+static void JobRestartJobs(void);
/*-
*-----------------------------------------------------------------------
@@ -1093,7 +1093,7 @@ Boolean
Job_CheckCommands(gn, abortProc)
GNode *gn; /* The target whose commands need
* verifying */
- void (*abortProc) __P((char *, ...));
+ void (*abortProc)(char *, ...);
/* Function to abort with message */
{
if (OP_NOP(gn->type) && Lst_IsEmpty(gn->commands) &&
diff --git a/usr.bin/make/job.h b/usr.bin/make/job.h
index e52b9cc..7626f39 100644
--- a/usr.bin/make/job.h
+++ b/usr.bin/make/job.h
@@ -219,18 +219,18 @@ extern Lst stoppedJobs; /* List of jobs that are stopped or didn't
extern Boolean jobFull; /* Non-zero if no more jobs should/will start*/
-void Job_Touch __P((GNode *, Boolean));
-Boolean Job_CheckCommands __P((GNode *, void (*abortProc )(char *, ...)));
-void Job_CatchChildren __P((Boolean));
-void Job_CatchOutput __P((void));
-void Job_Make __P((GNode *));
-void Job_Init __P((int, int));
-Boolean Job_Full __P((void));
-Boolean Job_Empty __P((void));
-ReturnStatus Job_ParseShell __P((char *));
-int Job_End __P((void));
-void Job_Wait __P((void));
-void Job_AbortAll __P((void));
-void JobFlagForMigration __P((int));
+void Job_Touch(GNode *, Boolean);
+Boolean Job_CheckCommands(GNode *, void (*abortProc )(char *, ...));
+void Job_CatchChildren(Boolean);
+void Job_CatchOutput(void);
+void Job_Make(GNode *);
+void Job_Init(int, int);
+Boolean Job_Full(void);
+Boolean Job_Empty(void);
+ReturnStatus Job_ParseShell(char *);
+int Job_End(void);
+void Job_Wait(void);
+void Job_AbortAll(void);
+void JobFlagForMigration(int);
#endif /* _JOB_H_ */
diff --git a/usr.bin/make/lst.h b/usr.bin/make/lst.h
index 86691d7..7bb5f74 100644
--- a/usr.bin/make/lst.h
+++ b/usr.bin/make/lst.h
@@ -64,8 +64,8 @@ typedef struct LstNode *LstNode;
* not to be freed.
* NOCOPY performs similarly when given as the copyProc to Lst_Duplicate.
*/
-#define NOFREE ((void (*) __P((void *))) 0)
-#define NOCOPY ((void * (*) __P((void *))) 0)
+#define NOFREE ((void (*)(void *)) 0)
+#define NOCOPY ((void * (*)(void *)) 0)
#define LST_CONCNEW 0 /* create new LstNode's when using Lst_Concat */
#define LST_CONCLINK 1 /* relink LstNode's when using Lst_Concat */
@@ -74,89 +74,84 @@ typedef struct LstNode *LstNode;
* Creation/destruction functions
*/
/* Create a new list */
-Lst Lst_Init __P((Boolean));
+Lst Lst_Init(Boolean);
/* Duplicate an existing list */
-Lst Lst_Duplicate __P((Lst, void * (*)(void *)));
+Lst Lst_Duplicate(Lst, void * (*)(void *));
/* Destroy an old one */
-void Lst_Destroy __P((Lst, void (*)(void *)));
+void Lst_Destroy(Lst, void (*)(void *));
/* True if list is empty */
-Boolean Lst_IsEmpty __P((Lst));
+Boolean Lst_IsEmpty(Lst);
/*
* Functions to modify a list
*/
/* Insert an element before another */
-ReturnStatus Lst_Insert __P((Lst, LstNode, void *));
+ReturnStatus Lst_Insert(Lst, LstNode, void *);
/* Insert an element after another */
-ReturnStatus Lst_Append __P((Lst, LstNode, void *));
+ReturnStatus Lst_Append(Lst, LstNode, void *);
/* Place an element at the front of a lst. */
-ReturnStatus Lst_AtFront __P((Lst, void *));
+ReturnStatus Lst_AtFront(Lst, void *);
/* Place an element at the end of a lst. */
-ReturnStatus Lst_AtEnd __P((Lst, void *));
+ReturnStatus Lst_AtEnd(Lst, void *);
/* Remove an element */
-ReturnStatus Lst_Remove __P((Lst, LstNode));
+ReturnStatus Lst_Remove(Lst, LstNode);
/* Replace a node with a new value */
-ReturnStatus Lst_Replace __P((LstNode, void *));
+ReturnStatus Lst_Replace(LstNode, void *);
/* Concatenate two lists */
-ReturnStatus Lst_Concat __P((Lst, Lst, int));
+ReturnStatus Lst_Concat(Lst, Lst, int);
/*
* Node-specific functions
*/
/* Return first element in list */
-LstNode Lst_First __P((Lst));
+LstNode Lst_First(Lst);
/* Return last element in list */
-LstNode Lst_Last __P((Lst));
+LstNode Lst_Last(Lst);
/* Return successor to given element */
-LstNode Lst_Succ __P((LstNode));
+LstNode Lst_Succ(LstNode);
/* Get datum from LstNode */
-void * Lst_Datum __P((LstNode));
+void * Lst_Datum(LstNode);
/*
* Functions for entire lists
*/
/* Find an element in a list */
-LstNode Lst_Find __P((Lst, void *,
- int (*)(void *, void *)));
+LstNode Lst_Find(Lst, void *, int (*)(void *, void *));
/* Find an element starting from somewhere */
-LstNode Lst_FindFrom __P((Lst, LstNode, void *,
- int (*cProc)(void *, void *)));
+LstNode Lst_FindFrom(Lst, LstNode, void *, int (*cProc)(void *, void *));
/*
* See if the given datum is on the list. Returns the LstNode containing
* the datum
*/
-LstNode Lst_Member __P((Lst, void *));
+LstNode Lst_Member(Lst, void *);
/* Apply a function to all elements of a lst */
-void Lst_ForEach __P((Lst, int (*)(void *, void *),
- void *));
+void Lst_ForEach(Lst, int (*)(void *, void *), void *);
/*
* Apply a function to all elements of a lst starting from a certain point.
* If the list is circular, the application will wrap around to the
* beginning of the list again.
*/
-void Lst_ForEachFrom __P((Lst, LstNode,
- int (*)(void *, void *),
- void *));
+void Lst_ForEachFrom(Lst, LstNode, int (*)(void *, void *), void *);
/*
* these functions are for dealing with a list as a table, of sorts.
* An idea of the "current element" is kept and used by all the functions
* between Lst_Open() and Lst_Close().
*/
/* Open the list */
-ReturnStatus Lst_Open __P((Lst));
+ReturnStatus Lst_Open(Lst);
/* Next element please */
-LstNode Lst_Next __P((Lst));
+LstNode Lst_Next(Lst);
/* Done yet? */
-Boolean Lst_IsAtEnd __P((Lst));
+Boolean Lst_IsAtEnd(Lst);
/* Finish table access */
-void Lst_Close __P((Lst));
+void Lst_Close(Lst);
/*
* for using the list as a queue
*/
/* Place an element at tail of queue */
-ReturnStatus Lst_EnQueue __P((Lst, void *));
+ReturnStatus Lst_EnQueue(Lst, void *);
/* Remove an element from head of queue */
-void * Lst_DeQueue __P((Lst));
+void * Lst_DeQueue(Lst);
#endif /* _LST_H_ */
diff --git a/usr.bin/make/lst.lib/lstDestroy.c b/usr.bin/make/lst.lib/lstDestroy.c
index a0316b8..f640ec5 100644
--- a/usr.bin/make/lst.lib/lstDestroy.c
+++ b/usr.bin/make/lst.lib/lstDestroy.c
@@ -66,7 +66,7 @@ __RCSID("$FreeBSD$");
void
Lst_Destroy (l, freeProc)
Lst l;
- register void (*freeProc) __P((void *));
+ register void (*freeProc)(void *);
{
register ListNode ln;
register ListNode tln = NULL;
diff --git a/usr.bin/make/lst.lib/lstDupl.c b/usr.bin/make/lst.lib/lstDupl.c
index cf69388..5742dad 100644
--- a/usr.bin/make/lst.lib/lstDupl.c
+++ b/usr.bin/make/lst.lib/lstDupl.c
@@ -66,7 +66,7 @@ Lst
Lst_Duplicate (l, copyProc)
Lst l; /* the list to duplicate */
/* A function to duplicate each void * */
- void * (*copyProc) __P((void *));
+ void * (*copyProc)(void *);
{
register Lst nl;
register ListNode ln;
diff --git a/usr.bin/make/lst.lib/lstFind.c b/usr.bin/make/lst.lib/lstFind.c
index fe85e73..abdb581 100644
--- a/usr.bin/make/lst.lib/lstFind.c
+++ b/usr.bin/make/lst.lib/lstFind.c
@@ -66,7 +66,7 @@ LstNode
Lst_Find (l, d, cProc)
Lst l;
void * d;
- int (*cProc) __P((void *, void *));
+ int (*cProc)(void *, void *);
{
return (Lst_FindFrom (l, Lst_First(l), d, cProc));
}
diff --git a/usr.bin/make/lst.lib/lstFindFrom.c b/usr.bin/make/lst.lib/lstFindFrom.c
index 0da8020..87a56da 100644
--- a/usr.bin/make/lst.lib/lstFindFrom.c
+++ b/usr.bin/make/lst.lib/lstFindFrom.c
@@ -68,7 +68,7 @@ Lst_FindFrom (l, ln, d, cProc)
Lst l;
register LstNode ln;
register void * d;
- register int (*cProc) __P((void *, void *));
+ register int (*cProc)(void *, void *);
{
register ListNode tln;
Boolean found = FALSE;
diff --git a/usr.bin/make/lst.lib/lstForEach.c b/usr.bin/make/lst.lib/lstForEach.c
index e897448..0971b75 100644
--- a/usr.bin/make/lst.lib/lstForEach.c
+++ b/usr.bin/make/lst.lib/lstForEach.c
@@ -67,7 +67,7 @@ __RCSID("$FreeBSD$");
void
Lst_ForEach (l, proc, d)
Lst l;
- register int (*proc) __P((void *, void *));
+ register int (*proc)(void *, void *);
register void * d;
{
Lst_ForEachFrom(l, Lst_First(l), proc, d);
diff --git a/usr.bin/make/lst.lib/lstForEachFrom.c b/usr.bin/make/lst.lib/lstForEachFrom.c
index 6655ab8..9fa5c2e 100644
--- a/usr.bin/make/lst.lib/lstForEachFrom.c
+++ b/usr.bin/make/lst.lib/lstForEachFrom.c
@@ -69,7 +69,7 @@ void
Lst_ForEachFrom (l, ln, proc, d)
Lst l;
LstNode ln;
- register int (*proc) __P((void *, void *));
+ register int (*proc)(void *, void *);
register void * d;
{
register ListNode tln = (ListNode)ln;
diff --git a/usr.bin/make/main.c b/usr.bin/make/main.c
index 6c2381d..7767937 100644
--- a/usr.bin/make/main.c
+++ b/usr.bin/make/main.c
@@ -136,10 +136,10 @@ Boolean checkEnvFirst; /* -e flag */
Lst envFirstVars; /* (-E) vars to override from env */
static Boolean jobsRunning; /* TRUE if the jobs might be running */
-static void MainParseArgs __P((int, char **));
-char * chdir_verify_path __P((char *, char *));
-static int ReadMakefile __P((void *, void *));
-static void usage __P((void));
+static void MainParseArgs(int, char **);
+char * chdir_verify_path(char *, char *);
+static int ReadMakefile(void *, void *);
+static void usage(void);
static char *curdir; /* startup directory */
static char *objdir; /* where we chdir'ed to */
@@ -874,7 +874,7 @@ main(argc, argv)
Lst_Destroy(targs, NOFREE);
Lst_Destroy(variables, NOFREE);
Lst_Destroy(makefiles, NOFREE);
- Lst_Destroy(create, (void (*) __P((void *))) free);
+ Lst_Destroy(create, (void (*)(void *)) free);
/* print the graph now it's been processed if the user requested it */
if (DEBUG(GRAPH2))
diff --git a/usr.bin/make/make.c b/usr.bin/make/make.c
index 8153af1..99685b6 100644
--- a/usr.bin/make/make.c
+++ b/usr.bin/make/make.c
@@ -89,12 +89,12 @@ static int numNodes; /* Number of nodes to be processed. If this
* is non-zero when Job_Empty() returns
* TRUE, there's a cycle in the graph */
-static int MakeAddChild __P((void *, void *));
-static int MakeAddAllSrc __P((void *, void *));
-static int MakeTimeStamp __P((void *, void *));
-static int MakeHandleUse __P((void *, void *));
-static Boolean MakeStartJobs __P((void));
-static int MakePrintStatus __P((void *, void *));
+static int MakeAddChild(void *, void *);
+static int MakeAddAllSrc(void *, void *);
+static int MakeTimeStamp(void *, void *);
+static int MakeHandleUse(void *, void *);
+static Boolean MakeStartJobs(void);
+static int MakePrintStatus(void *, void *);
/*-
*-----------------------------------------------------------------------
* Make_TimeStamp --
diff --git a/usr.bin/make/make.h b/usr.bin/make/make.h
index 81aabcb..4f4e571 100644
--- a/usr.bin/make/make.h
+++ b/usr.bin/make/make.h
@@ -52,30 +52,8 @@
#include <string.h>
#include <ctype.h>
-#if !defined(MAKE_BOOTSTRAP) && defined(BSD4_4)
-# include <sys/cdefs.h>
-#else
-# ifndef __P
-# if defined(__STDC__) || defined(__cplusplus)
-# define __P(protos) protos /* full-blown ANSI C */
-# else
-# define __P(protos) () /* traditional C preprocessor */
-# endif
-# endif
-# ifndef __STDC__
-# ifndef const
-# define const
-# endif
-# ifndef volatile
-# define volatile
-# endif
-# endif
-#endif
-
-#ifdef __STDC__
#include <stdlib.h>
#include <unistd.h>
-#endif
#include "sprite.h"
#include "lst.h"
#include "config.h"
@@ -357,12 +335,7 @@ extern int debug;
#define DEBUG_FOR 0x0400
#define DEBUG_LOUD 0x0800
-#ifdef __STDC__
#define CONCAT(a,b) a##b
-#else
-#define I(a) a
-#define CONCAT(a,b) I(a)b
-#endif /* __STDC__ */
#define DEBUG(module) (debug & CONCAT(DEBUG_,module))
#define ISDOT(c) ((c)[0] == '.' && (((c)[1] == '\0') || ((c)[1] == '/')))
@@ -374,11 +347,11 @@ extern int debug;
*/
#include "nonints.h"
-int Make_TimeStamp __P((GNode *, GNode *));
-Boolean Make_OODate __P((GNode *));
-int Make_HandleUse __P((GNode *, GNode *));
-void Make_Update __P((GNode *));
-void Make_DoAllVar __P((GNode *));
-Boolean Make_Run __P((Lst));
+int Make_TimeStamp(GNode *, GNode *);
+Boolean Make_OODate(GNode *);
+int Make_HandleUse(GNode *, GNode *);
+void Make_Update(GNode *);
+void Make_DoAllVar(GNode *);
+Boolean Make_Run(Lst);
#endif /* _MAKE_H_ */
diff --git a/usr.bin/make/nonints.h b/usr.bin/make/nonints.h
index d3c9a7f..81c0f4b 100644
--- a/usr.bin/make/nonints.h
+++ b/usr.bin/make/nonints.h
@@ -40,109 +40,109 @@
*/
/* arch.c */
-ReturnStatus Arch_ParseArchive __P((char **, Lst, GNode *));
-void Arch_Touch __P((GNode *));
-void Arch_TouchLib __P((GNode *));
-int Arch_MTime __P((GNode *));
-int Arch_MemMTime __P((GNode *));
-void Arch_FindLib __P((GNode *, Lst));
-Boolean Arch_LibOODate __P((GNode *));
-void Arch_Init __P((void));
-void Arch_End __P((void));
+ReturnStatus Arch_ParseArchive(char **, Lst, GNode *);
+void Arch_Touch(GNode *);
+void Arch_TouchLib(GNode *);
+int Arch_MTime(GNode *);
+int Arch_MemMTime(GNode *);
+void Arch_FindLib(GNode *, Lst);
+Boolean Arch_LibOODate(GNode *);
+void Arch_Init(void);
+void Arch_End(void);
/* compat.c */
-void Compat_Run __P((Lst));
+void Compat_Run(Lst);
/* cond.c */
-int Cond_Eval __P((char *));
-void Cond_End __P((void));
+int Cond_Eval(char *);
+void Cond_End(void);
/* for.c */
-int For_Eval __P((char *));
-void For_Run __P((void));
+int For_Eval(char *);
+void For_Run(void);
/* main.c */
-void Main_ParseArgLine __P((char *));
-int main __P((int, char **));
-char *Cmd_Exec __P((char *, char **));
-void Error __P((char *, ...));
-void Fatal __P((char *, ...));
-void Punt __P((char *, ...));
-void DieHorribly __P((void));
-int PrintAddr __P((void *, void *));
-void Finish __P((int));
-char *estrdup __P((const char *));
-void *emalloc __P((size_t));
+void Main_ParseArgLine(char *);
+int main(int, char **);
+char *Cmd_Exec(char *, char **);
+void Error(char *, ...);
+void Fatal(char *, ...);
+void Punt(char *, ...);
+void DieHorribly(void);
+int PrintAddr(void *, void *);
+void Finish(int);
+char *estrdup(const char *);
+void *emalloc(size_t);
/* efree(x) works when x==NULL. STDC behavior, may need some different
* definition for cross-builds on deficient systems */
#define efree free
-void *erealloc __P((void *, size_t));
-void enomem __P((void));
-int eunlink __P((const char *));
+void *erealloc(void *, size_t);
+void enomem(void);
+int eunlink(const char *);
/* parse.c */
-void Parse_Error __P((int, char *, ...));
-Boolean Parse_AnyExport __P((void));
-Boolean Parse_IsVar __P((char *));
-void Parse_DoVar __P((char *, GNode *));
-void Parse_AddIncludeDir __P((char *));
-void Parse_File __P((char *, FILE *));
-void Parse_Init __P((void));
-void Parse_End __P((void));
-void Parse_FromString __P((char *));
-Lst Parse_MainName __P((void));
+void Parse_Error(int, char *, ...);
+Boolean Parse_AnyExport(void);
+Boolean Parse_IsVar(char *);
+void Parse_DoVar(char *, GNode *);
+void Parse_AddIncludeDir(char *);
+void Parse_File(char *, FILE *);
+void Parse_Init(void);
+void Parse_End(void);
+void Parse_FromString(char *);
+Lst Parse_MainName(void);
/* str.c */
-void str_init __P((void));
-void str_end __P((void));
-char *str_concat __P((char *, char *, int));
-char **brk_string __P((char *, int *, Boolean));
-char *Str_FindSubstring __P((char *, char *));
-int Str_Match __P((char *, char *));
-char *Str_SYSVMatch __P((char *, char *, int *len));
-void Str_SYSVSubst __P((Buffer, char *, char *, int));
+void str_init(void);
+void str_end(void);
+char *str_concat(char *, char *, int);
+char **brk_string(char *, int *, Boolean);
+char *Str_FindSubstring(char *, char *);
+int Str_Match(char *, char *);
+char *Str_SYSVMatch(char *, char *, int *len);
+void Str_SYSVSubst(Buffer, char *, char *, int);
/* suff.c */
-void Suff_ClearSuffixes __P((void));
-Boolean Suff_IsTransform __P((char *));
-GNode *Suff_AddTransform __P((char *));
-int Suff_EndTransform __P((void *, void *));
-void Suff_AddSuffix __P((char *));
-Lst Suff_GetPath __P((char *));
-void Suff_DoPaths __P((void));
-void Suff_AddInclude __P((char *));
-void Suff_AddLib __P((char *));
-void Suff_FindDeps __P((GNode *));
-void Suff_SetNull __P((char *));
-void Suff_Init __P((void));
-void Suff_End __P((void));
-void Suff_PrintAll __P((void));
+void Suff_ClearSuffixes(void);
+Boolean Suff_IsTransform(char *);
+GNode *Suff_AddTransform(char *);
+int Suff_EndTransform(void *, void *);
+void Suff_AddSuffix(char *);
+Lst Suff_GetPath(char *);
+void Suff_DoPaths(void);
+void Suff_AddInclude(char *);
+void Suff_AddLib(char *);
+void Suff_FindDeps(GNode *);
+void Suff_SetNull(char *);
+void Suff_Init(void);
+void Suff_End(void);
+void Suff_PrintAll(void);
/* targ.c */
-void Targ_Init __P((void));
-void Targ_End __P((void));
-GNode *Targ_NewGN __P((char *));
-GNode *Targ_FindNode __P((char *, int));
-Lst Targ_FindList __P((Lst, int));
-Boolean Targ_Ignore __P((GNode *));
-Boolean Targ_Silent __P((GNode *));
-Boolean Targ_Precious __P((GNode *));
-void Targ_SetMain __P((GNode *));
-int Targ_PrintCmd __P((void *, void *));
-char *Targ_FmtTime __P((time_t));
-void Targ_PrintType __P((int));
-void Targ_PrintGraph __P((int));
+void Targ_Init(void);
+void Targ_End(void);
+GNode *Targ_NewGN(char *);
+GNode *Targ_FindNode(char *, int);
+Lst Targ_FindList(Lst, int);
+Boolean Targ_Ignore(GNode *);
+Boolean Targ_Silent(GNode *);
+Boolean Targ_Precious(GNode *);
+void Targ_SetMain(GNode *);
+int Targ_PrintCmd(void *, void *);
+char *Targ_FmtTime(time_t);
+void Targ_PrintType(int);
+void Targ_PrintGraph(int);
/* var.c */
-void Var_Delete __P((char *, GNode *));
-void Var_Set __P((char *, char *, GNode *));
-void Var_Append __P((char *, char *, GNode *));
-Boolean Var_Exists __P((char *, GNode *));
-char *Var_Value __P((char *, GNode *, char **));
-char *Var_Parse __P((char *, GNode *, Boolean, int *, Boolean *));
-char *Var_Subst __P((char *, char *, GNode *, Boolean));
-char *Var_GetTail __P((char *));
-char *Var_GetHead __P((char *));
-void Var_Init __P((void));
-void Var_End __P((void));
-void Var_Dump __P((GNode *));
+void Var_Delete(char *, GNode *);
+void Var_Set(char *, char *, GNode *);
+void Var_Append(char *, char *, GNode *);
+Boolean Var_Exists(char *, GNode *);
+char *Var_Value(char *, GNode *, char **);
+char *Var_Parse(char *, GNode *, Boolean, int *, Boolean *);
+char *Var_Subst(char *, char *, GNode *, Boolean);
+char *Var_GetTail(char *);
+char *Var_GetHead(char *);
+void Var_Init(void);
+void Var_End(void);
+void Var_Dump(GNode *);
diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c
index 7dc9e61..7a6bc4a 100644
--- a/usr.bin/make/parse.c
+++ b/usr.bin/make/parse.c
@@ -236,28 +236,28 @@ static struct {
{ ".WAIT", Wait, 0 },
};
-static int ParseFindKeyword __P((char *));
-static int ParseLinkSrc __P((void *, void *));
-static int ParseDoOp __P((void *, void *));
-static int ParseAddDep __P((void *, void *));
-static void ParseDoSrc __P((int, char *, Lst));
-static int ParseFindMain __P((void *, void *));
-static int ParseAddDir __P((void *, void *));
-static int ParseClearPath __P((void *, void *));
-static void ParseDoDependency __P((char *));
-static int ParseAddCmd __P((void *, void *));
-static int ParseReadc __P((void));
-static void ParseUnreadc __P((int));
-static void ParseHasCommands __P((void *));
-static void ParseDoInclude __P((char *));
-static void ParseDoError __P((char *));
+static int ParseFindKeyword(char *);
+static int ParseLinkSrc(void *, void *);
+static int ParseDoOp(void *, void *);
+static int ParseAddDep(void *, void *);
+static void ParseDoSrc(int, char *, Lst);
+static int ParseFindMain(void *, void *);
+static int ParseAddDir(void *, void *);
+static int ParseClearPath(void *, void *);
+static void ParseDoDependency(char *);
+static int ParseAddCmd(void *, void *);
+static int ParseReadc(void);
+static void ParseUnreadc(int);
+static void ParseHasCommands(void *);
+static void ParseDoInclude(char *);
+static void ParseDoError(char *);
#ifdef SYSVINCLUDE
-static void ParseTraditionalInclude __P((char *));
+static void ParseTraditionalInclude(char *);
#endif
-static int ParseEOF __P((int));
-static char *ParseReadLine __P((void));
-static char *ParseSkipLine __P((int));
-static void ParseFinishLine __P((void));
+static int ParseEOF(int);
+static char *ParseReadLine(void);
+static char *ParseSkipLine(int);
+static void ParseFinishLine(void);
/*-
*----------------------------------------------------------------------
@@ -2588,7 +2588,7 @@ Parse_Init ()
void
Parse_End()
{
- Lst_Destroy(targCmds, (void (*) __P((void *))) free);
+ Lst_Destroy(targCmds, (void (*)(void *)) free);
if (targets)
Lst_Destroy(targets, NOFREE);
Lst_Destroy(sysIncPath, Dir_Destroy);
diff --git a/usr.bin/make/suff.c b/usr.bin/make/suff.c
index 8ade95e..01e42c3 100644
--- a/usr.bin/make/suff.c
+++ b/usr.bin/make/suff.c
@@ -155,30 +155,30 @@ static Suff *emptySuff; /* The empty suffix required for POSIX
* single-suffix transformation rules */
-static char *SuffStrIsPrefix __P((char *, char *));
-static char *SuffSuffIsSuffix __P((Suff *, char *));
-static int SuffSuffIsSuffixP __P((void *, void *));
-static int SuffSuffHasNameP __P((void *, void *));
-static int SuffSuffIsPrefix __P((void *, void *));
-static int SuffGNHasNameP __P((void *, void *));
-static void SuffFree __P((void *));
-static void SuffInsert __P((Lst, Suff *));
-static void SuffRemove __P((Lst, Suff *));
-static Boolean SuffParseTransform __P((char *, Suff **, Suff **));
-static int SuffRebuildGraph __P((void *, void *));
-static int SuffAddSrc __P((void *, void *));
-static int SuffRemoveSrc __P((Lst));
-static void SuffAddLevel __P((Lst, Src *));
-static Src *SuffFindThem __P((Lst, Lst));
-static Src *SuffFindCmds __P((Src *, Lst));
-static int SuffExpandChildren __P((void *, void *));
-static Boolean SuffApplyTransform __P((GNode *, GNode *, Suff *, Suff *));
-static void SuffFindDeps __P((GNode *, Lst));
-static void SuffFindArchiveDeps __P((GNode *, Lst));
-static void SuffFindNormalDeps __P((GNode *, Lst));
-static int SuffPrintName __P((void *, void *));
-static int SuffPrintSuff __P((void *, void *));
-static int SuffPrintTrans __P((void *, void *));
+static char *SuffStrIsPrefix(char *, char *);
+static char *SuffSuffIsSuffix(Suff *, char *);
+static int SuffSuffIsSuffixP(void *, void *);
+static int SuffSuffHasNameP(void *, void *);
+static int SuffSuffIsPrefix(void *, void *);
+static int SuffGNHasNameP(void *, void *);
+static void SuffFree(void *);
+static void SuffInsert(Lst, Suff *);
+static void SuffRemove(Lst, Suff *);
+static Boolean SuffParseTransform(char *, Suff **, Suff **);
+static int SuffRebuildGraph(void *, void *);
+static int SuffAddSrc(void *, void *);
+static int SuffRemoveSrc(Lst);
+static void SuffAddLevel(Lst, Src *);
+static Src *SuffFindThem(Lst, Lst);
+static Src *SuffFindCmds(Src *, Lst);
+static int SuffExpandChildren(void *, void *);
+static Boolean SuffApplyTransform(GNode *, GNode *, Suff *, Suff *);
+static void SuffFindDeps(GNode *, Lst);
+static void SuffFindArchiveDeps(GNode *, Lst);
+static void SuffFindNormalDeps(GNode *, Lst);
+static int SuffPrintName(void *, void *);
+static int SuffPrintSuff(void *, void *);
+static int SuffPrintTrans(void *, void *);
/*************** Lst Predicates ****************/
/*-
diff --git a/usr.bin/make/targ.c b/usr.bin/make/targ.c
index 57b6b80..30de628 100644
--- a/usr.bin/make/targ.c
+++ b/usr.bin/make/targ.c
@@ -96,10 +96,10 @@ static Hash_Table targets; /* a hash table of same */
#define HTSIZE 191 /* initial size of hash table */
-static int TargPrintOnlySrc __P((void *, void *));
-static int TargPrintName __P((void *, void *));
-static int TargPrintNode __P((void *, void *));
-static void TargFreeGN __P((void *));
+static int TargPrintOnlySrc(void *, void *);
+static int TargPrintName(void *, void *);
+static int TargPrintNode(void *, void *);
+static void TargFreeGN(void *);
/*-
*-----------------------------------------------------------------------
diff --git a/usr.bin/make/var.c b/usr.bin/make/var.c
index 0b88650..fb7f901 100644
--- a/usr.bin/make/var.c
+++ b/usr.bin/make/var.c
@@ -168,29 +168,28 @@ typedef struct {
int flags;
} VarREPattern;
-static int VarCmp __P((void *, void *));
-static Var *VarFind __P((char *, GNode *, int));
-static void VarAdd __P((char *, char *, GNode *));
-static void VarDelete __P((void *));
-static Boolean VarHead __P((char *, Boolean, Buffer, void *));
-static Boolean VarTail __P((char *, Boolean, Buffer, void *));
-static Boolean VarSuffix __P((char *, Boolean, Buffer, void *));
-static Boolean VarRoot __P((char *, Boolean, Buffer, void *));
-static Boolean VarMatch __P((char *, Boolean, Buffer, void *));
+static int VarCmp(void *, void *);
+static Var *VarFind(char *, GNode *, int);
+static void VarAdd(char *, char *, GNode *);
+static void VarDelete(void *);
+static Boolean VarHead(char *, Boolean, Buffer, void *);
+static Boolean VarTail(char *, Boolean, Buffer, void *);
+static Boolean VarSuffix(char *, Boolean, Buffer, void *);
+static Boolean VarRoot(char *, Boolean, Buffer, void *);
+static Boolean VarMatch(char *, Boolean, Buffer, void *);
#ifdef SYSVVARSUB
-static Boolean VarSYSVMatch __P((char *, Boolean, Buffer, void *));
+static Boolean VarSYSVMatch(char *, Boolean, Buffer, void *);
#endif
-static Boolean VarNoMatch __P((char *, Boolean, Buffer, void *));
-static void VarREError __P((int, regex_t *, const char *));
-static Boolean VarRESubstitute __P((char *, Boolean, Buffer, void *));
-static Boolean VarSubstitute __P((char *, Boolean, Buffer, void *));
-static char *VarGetPattern __P((GNode *, int, char **, int, int *, int *,
- VarPattern *));
-static char *VarQuote __P((char *));
-static char *VarModify __P((char *, Boolean (*)(char *, Boolean, Buffer,
- void *),
- void *));
-static int VarPrintVar __P((void *, void *));
+static Boolean VarNoMatch(char *, Boolean, Buffer, void *);
+static void VarREError(int, regex_t *, const char *);
+static Boolean VarRESubstitute(char *, Boolean, Buffer, void *);
+static Boolean VarSubstitute(char *, Boolean, Buffer, void *);
+static char *VarGetPattern(GNode *, int, char **, int, int *, int *,
+ VarPattern *);
+static char *VarQuote(char *);
+static char *VarModify(char *, Boolean (*)(char *, Boolean, Buffer, void *),
+ void *);
+static int VarPrintVar(void *, void *);
/*-
*-----------------------------------------------------------------------
@@ -1243,7 +1242,7 @@ static char *
VarModify (str, modProc, datum)
char *str; /* String whose words should be trimmed */
/* Function to use to modify them */
- Boolean (*modProc) __P((char *, Boolean, Buffer, void *));
+ Boolean (*modProc)(char *, Boolean, Buffer, void *);
void * datum; /* Datum to pass it */
{
Buffer buf; /* Buffer for the new string */
OpenPOWER on IntegriCloud