Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(52)

Delta Between Two Patch Sets: src/cmd/dist/buildgc.c

Issue 5675095: code review 5675095: cmd/dist: fix pprof permissions
Left Patch Set: diff -r 459d037686be https://go.googlecode.com/hg/ Created 13 years, 1 month ago
Right Patch Set: diff -r 459d037686be https://go.googlecode.com/hg/ Created 13 years, 1 month ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « src/cmd/dist/build.c ('k') | src/cmd/dist/buildruntime.c » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
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 <stdio.h> 6 #include <stdio.h>
7 7
8 /* 8 /*
9 * Helpers for building cmd/gc. 9 * Helpers for building cmd/gc.
10 */ 10 */
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 q++; 48 q++;
49 p = q+xstrlen(q)-1; 49 p = q+xstrlen(q)-1;
50 if(*p == ',') 50 if(*p == ',')
51 *p = '\0'; 51 *p = '\0';
52 bwritestr(&out, bprintf(&b, " [O%s] = \"%s\",\n", q, q )); 52 bwritestr(&out, bprintf(&b, " [O%s] = \"%s\",\n", q, q ));
53 } 53 }
54 } 54 }
55 ········ 55 ········
56 bwritestr(&out, bprintf(&b, "};\n")); 56 bwritestr(&out, bprintf(&b, "};\n"));
57 57
58 » writefile(&out, file); 58 » writefile(&out, file, 0);
59 59
60 bfree(&in); 60 bfree(&in);
61 bfree(&b); 61 bfree(&b);
62 bfree(&out); 62 bfree(&out);
63 vfree(&lines); 63 vfree(&lines);
64 vfree(&fields); 64 vfree(&fields);
65 } 65 }
66 66
67 // mkenam reads [568].out.h and writes enam.c 67 // mkenam reads [568].out.h and writes enam.c
68 // The format is much the same as the Go opcodes above. 68 // The format is much the same as the Go opcodes above.
(...skipping 21 matching lines...) Expand all
90 if(p) 90 if(p)
91 *p = '\0'; 91 *p = '\0';
92 p = xstrstr(lines.p[i], "\n"); 92 p = xstrstr(lines.p[i], "\n");
93 if(p) 93 if(p)
94 *p = '\0'; 94 *p = '\0';
95 p = lines.p[i] + 2; 95 p = lines.p[i] + 2;
96 bwritestr(&out, bprintf(&b, "\t\"%s\",\n", p)); 96 bwritestr(&out, bprintf(&b, "\t\"%s\",\n", p));
97 } 97 }
98 } 98 }
99 bwritestr(&out, "};\n"); 99 bwritestr(&out, "};\n");
100 » writefile(&out, file); 100 » writefile(&out, file, 0);
101 101
102 bfree(&b); 102 bfree(&b);
103 bfree(&in); 103 bfree(&in);
104 bfree(&out); 104 bfree(&out);
105 vfree(&lines); 105 vfree(&lines);
106 } 106 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b