File:  [Research Unix] / researchv10no / cmd / mk / src / job.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:34 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv10, HEAD
researchv10 Norman

#include	"mk.h"

Job *
newjob(r, nlist, stem, match, pre, npre, tar, atar)
	Rule *r;
	Node *nlist;
	char *stem;
	regsubexp *match;
	Word *pre, *npre, *tar, *atar;
{
	register Job *j;

	j = (Job *)Malloc(sizeof(Job));
	j->r = r;
	j->n = nlist;
	j->stem = stem;
	j->match = match;
	j->p = pre;
	j->np = npre;
	j->t = tar;
	j->at = atar;
	j->nproc = -1;
	j->fd = -1;
	j->next = 0;
	return(j);
}

dumpj(s, j, all)
	char *s;
	Job *j;
{
	Fprint(1, "%s\n", s);
	while(j){
		Fprint(1, "job@%ld: r=%ld n=%ld stem='%s' nproc=%d\n",
			j, j->r, j->n, j->stem, j->nproc);
		Fprint(1, "\ttarget='%s' alltarget='%s' prereq='%s' nprereq='%s'\n",
			wtos(j->t), wtos(j->at), wtos(j->p), wtos(j->np));
		j = all? j->next : 0;
	}
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.