Plan 9 from Bell Labs’s /usr/web/sources/patch/sorry/mkfmtq/job.c

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#include	"mk.h"

Job *
newjob(Rule *r, Node *nlist, char *stem, char **match, Word *pre, Word *npre, Word *tar, Word *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->next = 0;
	return(j);
}

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

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.