diff options
author | Russ Cox <rsc@golang.org> | 2011-05-02 11:24:32 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2011-05-02 11:24:32 -0400 |
commit | c1c234739365bb0798e7e70aed39d53ee3ef1bb1 (patch) | |
tree | af57d4f9c74e47e377a7d77561817d50ef6e0967 /src/cmd/5a | |
parent | 8689eb9ffdea0a4531d253f409135fcd285f94ec (diff) | |
download | go-c1c234739365bb0798e7e70aed39d53ee3ef1bb1.tar.gz |
5a, 6a, 8a, cc: remove old environment variables
Uses of $INCLUDE and $NPROC are left over from Plan 9.
Remove them to avoid causing confusion.
R=golang-dev, r2
CC=golang-dev
http://codereview.appspot.com/4445079
Diffstat (limited to 'src/cmd/5a')
-rw-r--r-- | src/cmd/5a/lex.c | 53 |
1 files changed, 4 insertions, 49 deletions
diff --git a/src/cmd/5a/lex.c b/src/cmd/5a/lex.c index dbee3657f..a04cda220 100644 --- a/src/cmd/5a/lex.c +++ b/src/cmd/5a/lex.c @@ -50,7 +50,7 @@ void main(int argc, char *argv[]) { char *p; - int nout, nproc, i, c; + int c; thechar = '5'; thestring = "arm"; @@ -94,46 +94,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); @@ -142,7 +106,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) @@ -167,15 +131,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) { |