LEFT | RIGHT |
(no file at all) | |
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 <bio.h> | 7 #include <bio.h> |
8 | 8 |
9 enum | 9 enum |
10 { | 10 { |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 { | 68 { |
69 char *name; | 69 char *name; |
70 vlong value; | 70 vlong value; |
71 }; | 71 }; |
72 | 72 |
73 // Recorded constants and types, to be printed. | 73 // Recorded constants and types, to be printed. |
74 extern Const *con; | 74 extern Const *con; |
75 extern int ncon; | 75 extern int ncon; |
76 extern Type **typ; | 76 extern Type **typ; |
77 extern int ntyp; | 77 extern int ntyp; |
| 78 extern int kindsize[]; |
78 | 79 |
79 // Language output | 80 // Language output |
80 typedef struct Lang Lang; | 81 typedef struct Lang Lang; |
81 struct Lang | 82 struct Lang |
82 { | 83 { |
83 char *constbegin; | 84 char *constbegin; |
84 char *constfmt; | 85 char *constfmt; |
85 char *constend; | 86 char *constend; |
86 | 87 |
87 char *typdef; | 88 char *typdef; |
88 char *typdefend; | 89 char *typdefend; |
89 | 90 |
90 char *structbegin; | 91 char *structbegin; |
91 char *unionbegin; | 92 char *unionbegin; |
92 char *structpadfmt; | 93 char *structpadfmt; |
93 char *structend; | 94 char *structend; |
94 | 95 |
95 int (*typefmt)(Fmt*); | 96 int (*typefmt)(Fmt*); |
96 }; | 97 }; |
97 | 98 |
98 extern Lang go, c; | 99 extern Lang go, c; |
99 | 100 |
100 void* emalloc(int); | 101 void* emalloc(int); |
101 char* estrdup(char*); | 102 char* estrdup(char*); |
102 void* erealloc(void*, int); | 103 void* erealloc(void*, int); |
103 void parsestabtype(char*); | 104 void parsestabtype(char*); |
LEFT | RIGHT |