LEFT | RIGHT |
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 typedef int bool; | 5 typedef int bool; |
6 | 6 |
7 // The Time unit is unspecified; we just need to | 7 // The Time unit is unspecified; we just need to |
8 // be able to compare whether t1 is older than t2 with t1 < t2. | 8 // be able to compare whether t1 is older than t2 with t1 < t2. |
9 typedef long long Time; | 9 typedef long long Time; |
10 | 10 |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 | 98 |
99 // goc2c.c | 99 // goc2c.c |
100 void goc2c(char*, char*); | 100 void goc2c(char*, char*); |
101 | 101 |
102 // main.c | 102 // main.c |
103 extern int vflag; | 103 extern int vflag; |
104 void usage(void); | 104 void usage(void); |
105 void xmain(int argc, char **argv); | 105 void xmain(int argc, char **argv); |
106 | 106 |
107 // portability layer (plan9.c, unix.c, windows.c) | 107 // portability layer (plan9.c, unix.c, windows.c) |
108 int chmod(const char *, unsigned int); | |
109 bool contains(char *p, char *sep); | 108 bool contains(char *p, char *sep); |
110 void fatal(char *msg, ...); | 109 void fatal(char *msg, ...); |
111 bool hasprefix(char *p, char *prefix); | 110 bool hasprefix(char *p, char *prefix); |
112 bool hassuffix(char *p, char *suffix); | 111 bool hassuffix(char *p, char *suffix); |
113 bool isabs(char*); | 112 bool isabs(char*); |
114 bool isdir(char *p); | 113 bool isdir(char *p); |
115 bool isfile(char *p); | 114 bool isfile(char *p); |
116 char* lastelem(char*); | 115 char* lastelem(char*); |
117 Time mtime(char*); | 116 Time mtime(char*); |
118 void readfile(Buf*, char*); | 117 void readfile(Buf*, char*); |
119 void run(Buf *b, char *dir, int mode, char *cmd, ...); | 118 void run(Buf *b, char *dir, int mode, char *cmd, ...); |
120 void runv(Buf *b, char *dir, int mode, Vec *argv); | 119 void runv(Buf *b, char *dir, int mode, Vec *argv); |
121 void bgrunv(char *dir, int mode, Vec *argv); | 120 void bgrunv(char *dir, int mode, Vec *argv); |
122 void bgwait(void); | 121 void bgwait(void); |
123 bool streq(char*, char*); | 122 bool streq(char*, char*); |
124 void» writefile(Buf*, char*); | 123 void» writefile(Buf*, char*, int); |
125 void xatexit(void (*f)(void)); | 124 void xatexit(void (*f)(void)); |
126 void xexit(int); | 125 void xexit(int); |
127 void xfree(void*); | 126 void xfree(void*); |
128 void xgetenv(Buf *b, char *name); | 127 void xgetenv(Buf *b, char *name); |
129 void xgetwd(Buf *b); | 128 void xgetwd(Buf *b); |
130 void* xmalloc(int n); | 129 void* xmalloc(int n); |
131 void* xmalloc(int); | 130 void* xmalloc(int); |
132 int xmemcmp(void*, void*, int); | 131 int xmemcmp(void*, void*, int); |
133 void xmemmove(void*, void*, int); | 132 void xmemmove(void*, void*, int); |
134 void xmkdir(char *p); | 133 void xmkdir(char *p); |
135 void xmkdirall(char*); | 134 void xmkdirall(char*); |
136 Time xmtime(char *p); | 135 Time xmtime(char *p); |
137 void xprintf(char*, ...); | 136 void xprintf(char*, ...); |
138 void xqsort(void*, int, int, int(*)(const void*, const void*)); | 137 void xqsort(void*, int, int, int(*)(const void*, const void*)); |
139 void xreaddir(Vec *dst, char *dir); | 138 void xreaddir(Vec *dst, char *dir); |
140 void* xrealloc(void*, int); | 139 void* xrealloc(void*, int); |
141 void xrealwd(Buf *b, char *path); | 140 void xrealwd(Buf *b, char *path); |
142 void xremove(char *p); | 141 void xremove(char *p); |
143 void xremoveall(char *p); | 142 void xremoveall(char *p); |
144 void xsetenv(char*, char*); | 143 void xsetenv(char*, char*); |
145 int xstrcmp(char*, char*); | 144 int xstrcmp(char*, char*); |
146 char* xstrdup(char *p); | 145 char* xstrdup(char *p); |
147 int xstrlen(char*); | 146 int xstrlen(char*); |
148 char* xstrrchr(char*, int); | 147 char* xstrrchr(char*, int); |
149 char* xstrstr(char*, char*); | 148 char* xstrstr(char*, char*); |
150 char* xworkdir(void); | 149 char* xworkdir(void); |
LEFT | RIGHT |