cp = JobOutput(job, inLine, endp, FALSE);
cp = JobOutput(job, inLine, endp, false);
JobDoOutput(job, finish)    Job 	  *job;   /* the job whose output needs printing */    Boolean	   finish;	  /* TRUE if this is the last time we'll be				   * called for this job */{    Boolean	  gotNL = FALSE;  /* true if got a newline */    Boolean	  fbuf; 	  /* true if our buffer filled up */    int 	  nr;		  /* number of bytes read */    int 	  i;		  /* auxiliary index into outBuf */    int 	  max;		  /* limit for i (end of current data) */    int 	  nRead;	  /* (Temporary) number of bytes read */    FILE	  *oFILE;	  /* Stream pointer to shell's output file */    char	  inLine[132];    if (usePipes) {	/*	 * Read as many bytes as will fit in the buffer.	 */end_loop:	gotNL = FALSE;	fbuf = FALSE;	nRead = read(job->inPipe, &job->outBuf[job->curPos],			 JOB_BUFSIZE - job->curPos);	if (nRead == -1) {	    if (DEBUG(JOB)) {		perror("JobDoOutput(piperead)");	    }	    nr = 0;	} else {	    nr = nRead;	}	/*	 * If we hit the end-of-file (the job is dead), we must flush its	 * remaining output, so pretend we read a newline if there's any	 * output remaining in the buffer.	 * Also clear the 'finish' flag so we stop looping.	 */	if (nr == 0 && job->curPos != 0) {	    job->outBuf[job->curPos] = '\n';	    nr = 1;	    finish = FALSE;	} else if (nr == 0) {	    finish = FALSE;	}	/*	 * Look for the last newline in the bytes we just got. If there is	 * one, break out of the loop with 'i' as its index and gotNL set	 * TRUE.	 */	max = job->curPos + nr;	for (i = job->curPos + nr - 1; i >= job->curPos; i--) {	    if (job->outBuf[i] == '\n') {		gotNL = TRUE;		break;	    } else if (job->outBuf[i] == '\0') {		/*		 * Why?		 */		job->outBuf[i] = ' ';	    }	}	if (!gotNL) {	    job->curPos += nr;	    if (job->curPos == JOB_BUFSIZE) {		/*		 * If we've run out of buffer space, we have no choice		 * but to print the stuff. sigh.		 */		fbuf = TRUE;		i = job->curPos;	    }	}	if (gotNL || fbuf) {	    /*	     * Need to send the output to the screen. Null terminate it	     * first, overwriting the newline character if there was one.	     * So long as the line isn't one we should filter (according	     * to the shell description), we print the line, preceeded	     * by a target banner if this target isn't the same as the	     * one for which we last printed something.	     * The rest of the data in the buffer are then shifted down	     * to the start of the buffer and curPos is set accordingly.	     */	    job->outBuf[i] = '\0';	    if (i >= job->curPos) {		char *cp;		cp = JobOutput(job, job->outBuf, &job->outBuf[i], FALSE);		/*		 * There's still more in that thar buffer. This time, though,		 * we know there's no newline at the end, so we add one of		 * our own free will.		 */		if (*cp != '\0') {		    if (job->node != lastNode) {			MESSAGE(stdout, job->node);			lastNode = job->node;		    }		    (void)fprintf(stdout, "%s%s", cp, gotNL ? "\n" : "");		    (void)fflush(stdout);		}	    }	    if (i < max - 1) {		/* shift the remaining characters down */		(void)memcpy(job->outBuf, &job->outBuf[i + 1], max - (i + 1));		job->curPos = max - (i + 1);	    } else {		/*		 * We have written everything out, so we just start over		 * from the start of the buffer. No copying. No nothing.		 */		job->curPos = 0;	    }	}	if (finish) {	    /*	     * If the finish flag is true, we must loop until we hit	     * end-of-file on the pipe. This is guaranteed to happen	     * eventually since the other end of the pipe is now closed	     * (we closed it explicitly and the child has exited). When	     * we do get an EOF, finish will be set FALSE and we'll fall	     * through and out.	     */	    goto end_loop;	}    } else {	/*	 * We've been called to retrieve the output of the job from the	 * temporary file where it's been squirreled away. This consists of	 * opening the file, reading the output line by line, being sure not	 * to print the noPrint line for the shell we used, then close and	 * remove the temporary file. Very simple.	 *	 * Change to read in blocks and do FindSubString type things as for	 * pipes? That would allow for "@echo -n..."	 */	oFILE = fopen(job->outFile, "r");	if (oFILE != NULL) {	    (void)fprintf(stdout, "Results of making %s:\n", job->node->name);	    (void)fflush(stdout);	    while (fgets(inLine, sizeof(inLine), oFILE) != NULL) {		char	*cp, *endp, *oendp;		cp = inLine;		oendp = endp = inLine + strlen(inLine);		if (endp[-1] == '\n') {		    *--endp = '\0';		}		cp = JobOutput(job, inLine, endp, FALSE);		/*		 * There's still more in that thar buffer. This time, though,		 * we know there's no newline at the end, so we add one of		 * our own free will.		 */		(void)fprintf(stdout, "%s", cp);		(void)fflush(stdout);		if (endp != oendp) {		    (void)fprintf(stdout, "\n");		    (void)fflush(stdout);		}	    }	    (void)fclose(oFILE);	    (void)eunlink(job->outFile);	}    }}