Module Name: othersrc
Committed By: dholland
Date: Sat Mar 23 22:08:21 UTC 2013
Modified Files:
othersrc/usr.bin/dholland-make2: job.c
Log Message:
Use real types.
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 othersrc/usr.bin/dholland-make2/job.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: othersrc/usr.bin/dholland-make2/job.c
diff -u othersrc/usr.bin/dholland-make2/job.c:1.5 othersrc/usr.bin/dholland-make2/job.c:1.6
--- othersrc/usr.bin/dholland-make2/job.c:1.5 Sat Mar 23 21:35:44 2013
+++ othersrc/usr.bin/dholland-make2/job.c Sat Mar 23 22:08:21 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: job.c,v 1.5 2013/03/23 21:35:44 dholland Exp $ */
+/* $NetBSD: job.c,v 1.6 2013/03/23 22:08:21 dholland Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -149,7 +149,7 @@
#include "trace.h"
# define STATIC static
-MAKE_RCSID("$NetBSD: job.c,v 1.5 2013/03/23 21:35:44 dholland Exp $");
+MAKE_RCSID("$NetBSD: job.c,v 1.6 2013/03/23 22:08:21 dholland Exp $");
/*
* error handling variables
@@ -337,7 +337,7 @@ static sigset_t caught_signals; /* Set o
static void JobChildSig(int);
static void JobContinueSig(int);
static Job *JobFindPid(int, int, Boolean);
-static int JobPrintCommand(void *, void *);
+static int JobPrintCommand(char *, Job *);
static void JobClose(Job *);
static void JobExec(Job *, char **);
static void JobMakeArgv(Job *, char **);
@@ -637,7 +637,7 @@ JobFindPid(int pid, int status, Boolean
* made and return non-zero to signal that the end of the commands
* was reached. These commands are later attached to the postCommands
* node and executed by Job_End when all things are done.
- * This function is called from JobStart via Lst_ForEach.
+ * This function is called from JobStart.
*
* Input:
* cmdp command string to print
@@ -655,7 +655,7 @@ JobFindPid(int pid, int status, Boolean
*-----------------------------------------------------------------------
*/
static int
-JobPrintCommand(void *cmdp, void *jobp)
+JobPrintCommand(char *cmd, Job *job)
{
Boolean noSpecials; /* true if we shouldn't worry about
* inserting special commands into
@@ -669,9 +669,10 @@ JobPrintCommand(void *cmdp, void *jobp)
* command */
char *cmdStart; /* Start of expanded command */
char *escCmd = NULL; /* Command with quotes/backticks escaped */
- char *cmd = (char *)cmdp;
- Job *job = (Job *)jobp;
int i, j;
+ char *origcmd;
+
+ origcmd = cmd;
noSpecials = NoExecute(job->node);
@@ -716,8 +717,8 @@ JobPrintCommand(void *cmdp, void *jobp)
*/
unsigned cmdindex;
- cmdindex = stringarray_find(&job->node->commands, cmdp);
- CompatRunCommand(cmdp, cmdindex, job->node);
+ cmdindex = stringarray_find(&job->node->commands, origcmd);
+ CompatRunCommand(origcmd, cmdindex, job->node);
return 0;
}
break;