Annotation of researchv10no/cmd/mk/src/job.c, revision 1.1.1.1

1.1       root        1: #include       "mk.h"
                      2: 
                      3: Job *
                      4: newjob(r, nlist, stem, match, pre, npre, tar, atar)
                      5:        Rule *r;
                      6:        Node *nlist;
                      7:        char *stem;
                      8:        regsubexp *match;
                      9:        Word *pre, *npre, *tar, *atar;
                     10: {
                     11:        register Job *j;
                     12: 
                     13:        j = (Job *)Malloc(sizeof(Job));
                     14:        j->r = r;
                     15:        j->n = nlist;
                     16:        j->stem = stem;
                     17:        j->match = match;
                     18:        j->p = pre;
                     19:        j->np = npre;
                     20:        j->t = tar;
                     21:        j->at = atar;
                     22:        j->nproc = -1;
                     23:        j->fd = -1;
                     24:        j->next = 0;
                     25:        return(j);
                     26: }
                     27: 
                     28: dumpj(s, j, all)
                     29:        char *s;
                     30:        Job *j;
                     31: {
                     32:        Fprint(1, "%s\n", s);
                     33:        while(j){
                     34:                Fprint(1, "job@%ld: r=%ld n=%ld stem='%s' nproc=%d\n",
                     35:                        j, j->r, j->n, j->stem, j->nproc);
                     36:                Fprint(1, "\ttarget='%s' alltarget='%s' prereq='%s' nprereq='%s'\n",
                     37:                        wtos(j->t), wtos(j->at), wtos(j->p), wtos(j->np));
                     38:                j = all? j->next : 0;
                     39:        }
                     40: }

unix.superglobalmegacorp.com

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