summaryrefslogtreecommitdiffstats
path: root/usr.bin/make/make.c
diff options
context:
space:
mode:
authorjmallett <jmallett@FreeBSD.org>2002-10-09 03:42:10 +0000
committerjmallett <jmallett@FreeBSD.org>2002-10-09 03:42:10 +0000
commitd466dc0ec0161f8be4cf293b8d7fd03e016b837f (patch)
tree01c9d3cf78c3c46802e6e4ca2a65cce497a23515 /usr.bin/make/make.c
parent6b6ba96b60d9de6b157e3a804963854cde6eec5b (diff)
downloadFreeBSD-src-d466dc0ec0161f8be4cf293b8d7fd03e016b837f.zip
FreeBSD-src-d466dc0ec0161f8be4cf293b8d7fd03e016b837f.tar.gz
Convert make(1) to use ANSI style function declarations. Variable
documentation already adequatedly existed in the description in most cases. Where it did not, it was added. If no documentation existed beforehand, then none was added. Some unused dummies for use in the traversal functions were marked as __unused during the conversion. Occasionally, local style fixes were applied to lines already being modified or influenced. Now make(1) should always build with WARNS=3.
Diffstat (limited to 'usr.bin/make/make.c')
-rw-r--r--usr.bin/make/make.c49
1 files changed, 15 insertions, 34 deletions
diff --git a/usr.bin/make/make.c b/usr.bin/make/make.c
index 4017f6c..653bd21 100644
--- a/usr.bin/make/make.c
+++ b/usr.bin/make/make.c
@@ -108,9 +108,7 @@ static int MakePrintStatus(void *, void *);
*-----------------------------------------------------------------------
*/
int
-Make_TimeStamp (pgn, cgn)
- GNode *pgn; /* the current parent */
- GNode *cgn; /* the child we've just examined */
+Make_TimeStamp (GNode *pgn, GNode *cgn)
{
if (cgn->mtime > pgn->cmtime) {
pgn->cmtime = cgn->mtime;
@@ -119,9 +117,7 @@ Make_TimeStamp (pgn, cgn)
}
static int
-MakeTimeStamp (pgn, cgn)
- void * pgn; /* the current parent */
- void * cgn; /* the child we've just examined */
+MakeTimeStamp (void *pgn, void *cgn)
{
return Make_TimeStamp((GNode *) pgn, (GNode *) cgn);
}
@@ -145,8 +141,7 @@ MakeTimeStamp (pgn, cgn)
*-----------------------------------------------------------------------
*/
Boolean
-Make_OODate (gn)
- GNode *gn; /* the node to check */
+Make_OODate (GNode *gn)
{
Boolean oodate;
@@ -263,9 +258,7 @@ Make_OODate (gn)
*-----------------------------------------------------------------------
*/
static int
-MakeAddChild (gnp, lp)
- void * gnp; /* the node to add */
- void * lp; /* the list to which to add it */
+MakeAddChild (void *gnp, void *lp)
{
GNode *gn = (GNode *) gnp;
Lst l = (Lst) lp;
@@ -300,9 +293,7 @@ MakeAddChild (gnp, lp)
*-----------------------------------------------------------------------
*/
int
-Make_HandleUse (cgn, pgn)
- GNode *cgn; /* The .USE node */
- GNode *pgn; /* The target of the .USE node */
+Make_HandleUse (GNode *cgn, GNode *pgn)
{
GNode *gn; /* A child of the .USE node */
LstNode ln; /* An element in the children list */
@@ -345,9 +336,7 @@ Make_HandleUse (cgn, pgn)
return (0);
}
static int
-MakeHandleUse (pgn, cgn)
- void * pgn; /* the current parent */
- void * cgn; /* the child we've just examined */
+MakeHandleUse (void *pgn, void *cgn)
{
return Make_HandleUse((GNode *) pgn, (GNode *) cgn);
}
@@ -378,8 +367,7 @@ MakeHandleUse (pgn, cgn)
*-----------------------------------------------------------------------
*/
void
-Make_Update (cgn)
- GNode *cgn; /* the child node */
+Make_Update (GNode *cgn)
{
GNode *pgn; /* the parent node */
char *cname; /* the child's name */
@@ -540,10 +528,7 @@ Make_Update (cgn)
*-----------------------------------------------------------------------
*/
static int
-MakeAddAllSrc (cgnp, pgnp)
- void * cgnp; /* The child to add */
- void * pgnp; /* The parent to whose ALLSRC variable it should be */
- /* added */
+MakeAddAllSrc (void *cgnp, void *pgnp)
{
GNode *cgn = (GNode *) cgnp;
GNode *pgn = (GNode *) pgnp;
@@ -613,8 +598,7 @@ MakeAddAllSrc (cgnp, pgnp)
*-----------------------------------------------------------------------
*/
void
-Make_DoAllVar (gn)
- GNode *gn;
+Make_DoAllVar (GNode *gn)
{
Lst_ForEach (gn->children, MakeAddAllSrc, (void *) gn);
@@ -649,7 +633,7 @@ Make_DoAllVar (gn)
*-----------------------------------------------------------------------
*/
static Boolean
-MakeStartJobs ()
+MakeStartJobs (void)
{
GNode *gn;
@@ -714,7 +698,9 @@ MakeStartJobs ()
* MakePrintStatus --
* Print the status of a top-level node, viz. it being up-to-date
* already or not created due to an error in a lower level.
- * Callback function for Make_Run via Lst_ForEach.
+ * Callback function for Make_Run via Lst_ForEach. If gn->unmade is
+ * nonzero and that is meant to imply a cycle in the graph, then
+ * cycle is TRUE.
*
* Results:
* Always returns 0.
@@ -725,11 +711,7 @@ MakeStartJobs ()
*-----------------------------------------------------------------------
*/
static int
-MakePrintStatus(gnp, cyclep)
- void * gnp; /* Node to examine */
- void * cyclep; /* True if gn->unmade being non-zero implies
- * a cycle in the graph, not an error in an
- * inferior */
+MakePrintStatus(void *gnp, void *cyclep)
{
GNode *gn = (GNode *) gnp;
Boolean cycle = *(Boolean *) cyclep;
@@ -786,8 +768,7 @@ MakePrintStatus(gnp, cyclep)
*-----------------------------------------------------------------------
*/
Boolean
-Make_Run (targs)
- Lst targs; /* the initial list of targets */
+Make_Run (Lst targs)
{
GNode *gn; /* a temporary pointer */
Lst examine; /* List of targets to examine */
OpenPOWER on IntegriCloud