OLD | NEW |
1 // Copyright 2009 The Go Authors. All rights reserved. | 1 // Copyright 2009 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 <u.h> | 5 #include <u.h> |
6 #include <libc.h> | 6 #include <libc.h> |
7 #include "go.h" | 7 #include "go.h" |
8 #include "y.tab.h" | 8 #include "y.tab.h" |
9 #include <ar.h> | 9 #include <ar.h> |
10 | 10 |
(...skipping 13 matching lines...) Expand all Loading... |
24 static void yytinit(void); | 24 static void yytinit(void); |
25 static int getc(void); | 25 static int getc(void); |
26 static void ungetc(int); | 26 static void ungetc(int); |
27 static int32 getr(void); | 27 static int32 getr(void); |
28 static int escchar(int, int*, vlong*); | 28 static int escchar(int, int*, vlong*); |
29 static void addidir(char*); | 29 static void addidir(char*); |
30 static int getlinepragma(void); | 30 static int getlinepragma(void); |
31 static char *goos, *goarch, *goroot; | 31 static char *goos, *goarch, *goroot; |
32 | 32 |
33 // Compiler experiments. | 33 // Compiler experiments. |
34 // These are controlled by the GCEXPERIMENT environment | 34 // These are controlled by the GOEXPERIMENT environment |
35 // variable recorded when the compiler is built. | 35 // variable recorded when the compiler is built. |
36 static struct { | 36 static struct { |
37 char *name; | 37 char *name; |
38 int *val; | 38 int *val; |
39 } exper[] = { | 39 } exper[] = { |
40 {"rune32", &rune32}, | 40 {"rune32", &rune32}, |
41 }; | 41 }; |
42 | 42 |
43 static void | 43 static void |
44 addexp(char *s) | 44 addexp(char *s) |
(...skipping 2051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2096 p = infile; | 2096 p = infile; |
2097 else | 2097 else |
2098 p = p+1; | 2098 p = p+1; |
2099 snprint(namebuf, sizeof(namebuf), "%s", p); | 2099 snprint(namebuf, sizeof(namebuf), "%s", p); |
2100 p = strrchr(namebuf, '.'); | 2100 p = strrchr(namebuf, '.'); |
2101 if(p != nil) | 2101 if(p != nil) |
2102 *p = 0; | 2102 *p = 0; |
2103 outfile = smprint("%s.%c", namebuf, thechar); | 2103 outfile = smprint("%s.%c", namebuf, thechar); |
2104 } | 2104 } |
2105 } | 2105 } |
OLD | NEW |