diff options
Diffstat (limited to 'src/cmd/8a/lex.c')
-rw-r--r-- | src/cmd/8a/lex.c | 53 |
1 files changed, 4 insertions, 49 deletions
diff --git a/src/cmd/8a/lex.c b/src/cmd/8a/lex.c index ca18b69ce..078861877 100644 --- a/src/cmd/8a/lex.c +++ b/src/cmd/8a/lex.c @@ -56,7 +56,7 @@ void main(int argc, char *argv[]) { char *p; - int nout, nproc, i, c; + int c; thechar = '8'; thestring = "386"; @@ -96,46 +96,10 @@ main(int argc, char *argv[]) print("usage: %ca [-options] file.s\n", thechar); errorexit(); } - if(argc > 1 && systemtype(Windows)){ - print("can't assemble multiple files on windows\n"); + if(argc > 1){ + print("can't assemble multiple files\n"); errorexit(); } - if(argc > 1 && !systemtype(Windows)) { - nproc = 1; - if(p = getenv("NPROC")) - nproc = atol(p); /* */ - c = 0; - nout = 0; - for(;;) { - Waitmsg *w; - - while(nout < nproc && argc > 0) { - i = fork(); - if(i < 0) { - fprint(2, "fork: %r\n"); - errorexit(); - } - if(i == 0) { - print("%s:\n", *argv); - if(assemble(*argv)) - errorexit(); - exits(0); - } - nout++; - argc--; - argv++; - } - w = wait(); - if(w == nil) { - if(c) - errorexit(); - exits(0); - } - if(w->msg[0]) - c++; - nout--; - } - } if(assemble(argv[0])) errorexit(); exits(0); @@ -144,7 +108,7 @@ main(int argc, char *argv[]) int assemble(char *file) { - char *ofile, incfile[20], *p; + char *ofile, *p; int i, of; ofile = alloc(strlen(file)+3); // +3 for .x\0 (x=thechar) @@ -169,15 +133,6 @@ assemble(char *file) } else outfile = "/dev/null"; } - p = getenv("INCLUDE"); - if(p) { - setinclude(p); - } else { - if(systemtype(Plan9)) { - sprint(incfile,"/%s/include", thestring); - setinclude(strdup(incfile)); - } - } of = create(outfile, OWRITE, 0664); if(of < 0) { |