OLD | NEW |
1 // Copyright 2012 The Go Authors. All rights reserved. | 1 // Copyright 2012 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 #include "a.h" | 5 #include "a.h" |
6 #include "arg.h" | 6 #include "arg.h" |
7 | 7 |
8 /* | 8 /* |
9 * Initialization for any invocation. | 9 * Initialization for any invocation. |
10 */ | 10 */ |
(...skipping 1194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1205 usage(); | 1205 usage(); |
1206 }ARGEND | 1206 }ARGEND |
1207 | 1207 |
1208 if(argc > 0) | 1208 if(argc > 0) |
1209 usage(); | 1209 usage(); |
1210 ········ | 1210 ········ |
1211 xprintf(format, "GOROOT", goroot); | 1211 xprintf(format, "GOROOT", goroot); |
1212 xprintf(format, "GOBIN", gobin); | 1212 xprintf(format, "GOBIN", gobin); |
1213 xprintf(format, "GOARCH", goarch); | 1213 xprintf(format, "GOARCH", goarch); |
1214 xprintf(format, "GOOS", goos); | 1214 xprintf(format, "GOOS", goos); |
| 1215 xprintf(format, "GOCHAR", gochar); |
1215 if(pflag) { | 1216 if(pflag) { |
1216 sep = ":"; | 1217 sep = ":"; |
1217 if(streq(gohostos, "windows")) | 1218 if(streq(gohostos, "windows")) |
1218 sep = ";"; | 1219 sep = ";"; |
1219 xgetenv(&b, "PATH"); | 1220 xgetenv(&b, "PATH"); |
1220 bprintf(&b1, "%s%s%s", gobin, sep, bstr(&b)); | 1221 bprintf(&b1, "%s%s%s", gobin, sep, bstr(&b)); |
1221 xprintf(format, "PATH", bstr(&b1)); | 1222 xprintf(format, "PATH", bstr(&b1)); |
1222 } | 1223 } |
1223 | 1224 |
1224 bfree(&b); | 1225 bfree(&b); |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1380 break; | 1381 break; |
1381 default: | 1382 default: |
1382 usage(); | 1383 usage(); |
1383 }ARGEND | 1384 }ARGEND |
1384 | 1385 |
1385 if(argc > 0) | 1386 if(argc > 0) |
1386 usage(); | 1387 usage(); |
1387 | 1388 |
1388 xprintf("%s\n", goversion); | 1389 xprintf("%s\n", goversion); |
1389 } | 1390 } |
OLD | NEW |