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

Delta Between Two Patch Sets: src/cmd/gc/lex.c

Issue 4964046: code review 4964046: src/cmd/gc/*: Adjustments for compilation using Plan 9 ... (Closed)
Left Patch Set: diff -r 88744261dd47 https://go.googlecode.com/hg/ Created 13 years, 7 months ago
Right Patch Set: diff -r 5e1053337103 https://go.googlecode.com/hg/ Created 13 years, 7 months 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:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « src/cmd/gc/go.h ('k') | src/cmd/gc/mparith2.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
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 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 Biobuf *imp; 448 Biobuf *imp;
449 char *file, *p, *q; 449 char *file, *p, *q;
450 int32 c; 450 int32 c;
451 int len; 451 int len;
452 Strlit *path; 452 Strlit *path;
453 char *cleanbuf; 453 char *cleanbuf;
454 454
455 USED(line); 455 USED(line);
456 456
457 // TODO(rsc): don't bother reloading imports more than once? 457 // TODO(rsc): don't bother reloading imports more than once?
458
458 if(f->ctype != CTSTR) { 459 if(f->ctype != CTSTR) {
459 yyerror("import statement not a string"); 460 yyerror("import statement not a string");
460 return; 461 return;
461 } 462 }
462 463
463 if(strlen(f->u.sval->s) != f->u.sval->len) { 464 if(strlen(f->u.sval->s) != f->u.sval->len) {
464 yyerror("import path contains NUL"); 465 yyerror("import path contains NUL");
465 errorexit(); 466 errorexit();
466 } 467 }
467 468
(...skipping 1489 matching lines...) Expand 10 before | Expand all | Expand 10 after
1957 p = infile; 1958 p = infile;
1958 else 1959 else
1959 p = p+1; 1960 p = p+1;
1960 snprint(namebuf, sizeof(namebuf), "%s", p); 1961 snprint(namebuf, sizeof(namebuf), "%s", p);
1961 p = strrchr(namebuf, '.'); 1962 p = strrchr(namebuf, '.');
1962 if(p != nil) 1963 if(p != nil)
1963 *p = 0; 1964 *p = 0;
1964 outfile = smprint("%s.%c", namebuf, thechar); 1965 outfile = smprint("%s.%c", namebuf, thechar);
1965 } 1966 }
1966 } 1967 }
LEFTRIGHT

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