summaryrefslogtreecommitdiff
path: root/usr.bin/make/job.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/make/job.c')
-rw-r--r--usr.bin/make/job.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/usr.bin/make/job.c b/usr.bin/make/job.c
index 584f0d836a3..7362f787d00 100644
--- a/usr.bin/make/job.c
+++ b/usr.bin/make/job.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: job.c,v 1.17 1999/12/18 02:11:26 espie Exp $ */
+/* $OpenBSD: job.c,v 1.18 1999/12/18 21:53:32 espie Exp $ */
/* $NetBSD: job.c,v 1.16 1996/11/06 17:59:08 christos Exp $ */
/*
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)job.c 8.2 (Berkeley) 3/19/94";
#else
-static char rcsid[] = "$OpenBSD: job.c,v 1.17 1999/12/18 02:11:26 espie Exp $";
+static char rcsid[] = "$OpenBSD: job.c,v 1.18 1999/12/18 21:53:32 espie Exp $";
#endif
#endif /* not lint */
@@ -967,7 +967,7 @@ JobFinish(job, status)
* the parents. In addition, any saved commands for the node are placed
* on the .END target.
*/
- if (job->tailCmds != NILLNODE) {
+ if (job->tailCmds != NULL) {
Lst_ForEachFrom(job->node->commands, job->tailCmds,
JobSaveCommand,
(ClientData)job->node);
@@ -1101,7 +1101,7 @@ Job_CheckCommands(gn, abortProc)
* No commands. Look for .DEFAULT rule from which we might infer
* commands
*/
- if ((DEFAULT != NILGNODE) && !Lst_IsEmpty(DEFAULT->commands)) {
+ if ((DEFAULT != NULL) && !Lst_IsEmpty(DEFAULT->commands)) {
/*
* Make only looks for a .DEFAULT if the node was never the
* target of an operator, so that's what we do too. If
@@ -1692,7 +1692,7 @@ JobStart(gn, flags, previous)
}
job->node = gn;
- job->tailCmds = NILLNODE;
+ job->tailCmds = NULL;
/*
* Set the initial value of the flags for this job based on the global
@@ -1762,7 +1762,7 @@ JobStart(gn, flags, previous)
} else {
LstNode ln = Lst_Next(gn->commands);
- if ((ln == NILLNODE) ||
+ if ((ln == NULL) ||
JobPrintCommand((ClientData) Lst_Datum(ln),
(ClientData) job))
{
@@ -1854,7 +1854,7 @@ JobStart(gn, flags, previous)
*/
if (cmdsOK) {
if (aborting == 0) {
- if (job->tailCmds != NILLNODE) {
+ if (job->tailCmds != NULL) {
Lst_ForEachFrom(job->node->commands, job->tailCmds,
JobSaveCommand,
(ClientData)job->node);
@@ -2255,10 +2255,10 @@ Job_CatchChildren(block)
jnode = Lst_Find(jobs, (ClientData)&pid, JobCmpPid);
- if (jnode == NILLNODE) {
+ if (jnode == NULL) {
if (WIFSIGNALED(status) && (WTERMSIG(status) == SIGCONT)) {
jnode = Lst_Find(stoppedJobs, (ClientData) &pid, JobCmpPid);
- if (jnode == NILLNODE) {
+ if (jnode == NULL) {
Error("Resumed child (%d) not in table", pid);
continue;
}
@@ -2365,7 +2365,7 @@ Job_CatchOutput()
free(readfdsp);
Punt("Cannot open job table");
}
- while (nfds && (ln = Lst_Next(jobs)) != NILLNODE) {
+ while (nfds && (ln = Lst_Next(jobs)) != NULL) {
job = (Job *) Lst_Datum(ln);
if (FD_ISSET(job->inPipe, readfdsp)) {
JobDoOutput(job, FALSE);
@@ -2439,7 +2439,7 @@ Job_Init(maxproc, maxlocal)
aborting = 0;
errors = 0;
- lastNode = NILGNODE;
+ lastNode = NULL;
if (maxJobs == 1
#ifdef REMOTE
@@ -2513,7 +2513,7 @@ Job_Init(maxproc, maxlocal)
begin = Targ_FindNode(".BEGIN", TARG_NOCREATE);
- if (begin != NILGNODE) {
+ if (begin != NULL) {
JobStart(begin, JOB_SPECIAL, (Job *)0);
while (nJobs) {
Job_CatchOutput();
@@ -2817,7 +2817,7 @@ JobInterrupt(runINTERRUPT, signo)
aborting = ABORT_INTERRUPT;
(void) Lst_Open(jobs);
- while ((ln = Lst_Next(jobs)) != NILLNODE) {
+ while ((ln = Lst_Next(jobs)) != NULL) {
job = (Job *) Lst_Datum(ln);
if (!Targ_Precious(job->node)) {
@@ -2862,7 +2862,7 @@ JobInterrupt(runINTERRUPT, signo)
#ifdef REMOTE
(void)Lst_Open(stoppedJobs);
- while ((ln = Lst_Next(stoppedJobs)) != NILLNODE) {
+ while ((ln = Lst_Next(stoppedJobs)) != NULL) {
job = (Job *) Lst_Datum(ln);
if (job->flags & JOB_RESTART) {
@@ -2923,7 +2923,7 @@ JobInterrupt(runINTERRUPT, signo)
if (runINTERRUPT && !touchFlag) {
interrupt = Targ_FindNode(".INTERRUPT", TARG_NOCREATE);
- if (interrupt != NILGNODE) {
+ if (interrupt != NULL) {
ignoreErrors = FALSE;
JobStart(interrupt, JOB_IGNDOTS, (Job *)0);
@@ -2956,7 +2956,7 @@ JobInterrupt(runINTERRUPT, signo)
int
Job_Finish()
{
- if (postCommands != NILGNODE && !Lst_IsEmpty(postCommands->commands)) {
+ if (postCommands != NULL && !Lst_IsEmpty(postCommands->commands)) {
if (errors) {
Error("Errors reported so .END ignored");
} else {
@@ -3047,7 +3047,7 @@ Job_AbortAll()
if (nJobs) {
(void) Lst_Open(jobs);
- while ((ln = Lst_Next(jobs)) != NILLNODE) {
+ while ((ln = Lst_Next(jobs)) != NULL) {
job = (Job *) Lst_Datum(ln);
/*
@@ -3105,9 +3105,9 @@ JobFlagForMigration(hostID)
}
jnode = Lst_Find(jobs, (ClientData)hostID, JobCmpRmtID);
- if (jnode == NILLNODE) {
+ if (jnode == NULL) {
jnode = Lst_Find(stoppedJobs, (ClientData)hostID, JobCmpRmtID);
- if (jnode == NILLNODE) {
+ if (jnode == NULL) {
if (DEBUG(JOB)) {
Error("Evicting host(%d) not in table", hostID);
}