Commit 40621d5c authored by Robert Griesemer's avatar Robert Griesemer

remove semis after statements in one-statement statement lists

R=rsc, r
http://go/go-review/1025029
parent 18ccbc69
......@@ -22,7 +22,7 @@ func fibber(c chan *big.Int, out chan string, n int64) {
i := big.NewInt(n);
if n == 0 {
c <- i;
c <- i
}
for {
j := <-c;
......@@ -38,6 +38,6 @@ func main() {
go fibber(c, out, 0);
go fibber(c, out, 1);
for i := 0; i < 200; i++ {
println(<-out);
println(<-out)
}
}
......@@ -130,7 +130,7 @@ func NewInt(x int64) *Int { return new(Int).SetInt64(x) }
// making zero values useful and gmp's decision not to.
func (z *Int) doinit() {
if z.init {
return;
return
}
z.init = true;
C.mpz_init(&z.i[0]);
......@@ -162,9 +162,9 @@ func (z *Int) Set(x *Int) *Int {
func (z *Int) SetBytes(b []byte) *Int {
z.doinit();
if len(b) == 0 {
z.SetInt64(0);
z.SetInt64(0)
} else {
C.mpz_import(&z.i[0], C.size_t(len(b)), 1, 1, 1, 0, unsafe.Pointer(&b[0]));
C.mpz_import(&z.i[0], C.size_t(len(b)), 1, 1, 1, 0, unsafe.Pointer(&b[0]))
}
return z;
}
......@@ -183,12 +183,12 @@ func (z *Int) SetInt64(x int64) *Int {
func (z *Int) SetString(s string, base int) os.Error {
z.doinit();
if base < 2 || base > 36 {
return os.EINVAL;
return os.EINVAL
}
p := C.CString(s);
defer C.free(unsafe.Pointer(p));
if C.mpz_set_str(&z.i[0], p, C.int(base)) < 0 {
return os.EINVAL;
return os.EINVAL
}
return z;
}
......@@ -196,7 +196,7 @@ func (z *Int) SetString(s string, base int) os.Error {
// String returns the decimal representation of z.
func (z *Int) String() string {
if z == nil {
return "nil";
return "nil"
}
z.doinit();
p := C.mpz_get_str(nil, 10, &z.i[0]);
......@@ -207,7 +207,7 @@ func (z *Int) String() string {
func (z *Int) destroy() {
if z.init {
C.mpz_clear(&z.i[0]);
C.mpz_clear(&z.i[0])
}
z.init = false;
}
......@@ -287,16 +287,16 @@ func (z *Int) Exp(x, y, m *Int) *Int {
y.doinit();
z.doinit();
if m == nil {
C.mpz_pow_ui(&z.i[0], &x.i[0], C.mpz_get_ui(&y.i[0]));
C.mpz_pow_ui(&z.i[0], &x.i[0], C.mpz_get_ui(&y.i[0]))
} else {
C.mpz_powm(&z.i[0], &x.i[0], &y.i[0], &m.i[0]);
C.mpz_powm(&z.i[0], &x.i[0], &y.i[0], &m.i[0])
}
return z;
}
func (z *Int) Int64() int64 {
if !z.init {
return 0;
return 0
}
return int64(C.mpz_get_si(&z.i[0]));
}
......@@ -334,9 +334,9 @@ func CmpInt(x, y *Int) int {
y.doinit();
switch cmp := C.mpz_cmp(&x.i[0], &y.i[0]); {
case cmp < 0:
return -1;
return -1
case cmp == 0:
return 0;
return 0
}
return +1;
}
......
......@@ -54,13 +54,13 @@ var (
func extractDigit() int64 {
if big.CmpInt(numer, accum) > 0 {
return -1;
return -1
}
tmp1.Lsh(numer, 1).Add(tmp1, numer).Add(tmp1, accum);
big.DivModInt(tmp1, tmp2, tmp1, denom);
tmp2.Add(tmp2, numer);
if big.CmpInt(tmp2, denom) >= 0 {
return -1;
return -1
}
return tmp1.Int64();
}
......@@ -95,7 +95,7 @@ func main() {
if i++; i%50 == 0 {
fmt.Printf("\n");
if i >= 1000 {
break;
break
}
}
}
......
......@@ -22,7 +22,7 @@ func fibber(c, out chan int64, i int64) {
runtime.LockOSThread();
if i == 0 {
c <- i;
c <- i
}
for {
j := <-c;
......
......@@ -8,5 +8,5 @@ import "stdio"
func main() {
// stdio.Stdout.WriteString("hello, world\n");
stdio.Puts("hello, world");
stdio.Puts("hello, world")
}
......@@ -65,7 +65,7 @@ func openProg(name string) *Prog {
// Instead, turn it into a new Error that will return
// details for all the errors.
for _, e := range list {
fmt.Fprintln(os.Stderr, e);
fmt.Fprintln(os.Stderr, e)
}
os.Exit(2);
}
......@@ -94,16 +94,16 @@ func openProg(name string) *Prog {
}
sawC = true;
if s.Name != nil {
error(s.Path[0].Pos(), `cannot rename import "C"`);
error(s.Path[0].Pos(), `cannot rename import "C"`)
}
if s.Doc != nil {
p.Preamble += doc.CommentText(s.Doc) + "\n";
p.Preamble += doc.CommentText(s.Doc) + "\n"
} else if len(d.Specs) == 1 && d.Doc != nil {
p.Preamble += doc.CommentText(d.Doc) + "\n";
p.Preamble += doc.CommentText(d.Doc) + "\n"
}
}
if ws == 0 {
continue;
continue
}
d.Specs = d.Specs[0:ws];
p.AST.Decls[w] = d;
......@@ -112,7 +112,7 @@ func openProg(name string) *Prog {
p.AST.Decls = p.AST.Decls[0:w];
if !sawC {
error(noPos, `cannot find import "C"`);
error(noPos, `cannot find import "C"`)
}
// Accumulate pointers to uses of C.x.
......@@ -135,7 +135,7 @@ func walk(x interface{}, p *Prog, context string) {
if i >= cap(p.Crefs) {
new := make([]*Cref, 2*i);
for j, v := range p.Crefs {
new[j] = v;
new[j] = v
}
p.Crefs = new;
}
......@@ -159,7 +159,7 @@ func walk(x interface{}, p *Prog, context string) {
// These are ordered and grouped to match ../../pkg/go/ast/ast.go
case *ast.Field:
walk(&n.Type, p, "type");
walk(&n.Type, p, "type")
case *ast.BadExpr:
case *ast.Ident:
case *ast.Ellipsis:
......@@ -172,14 +172,14 @@ func walk(x interface{}, p *Prog, context string) {
walk(&n.Type, p, "type");
walk(n.Elts, p, "expr");
case *ast.ParenExpr:
walk(&n.X, p, context);
walk(&n.X, p, context)
case *ast.SelectorExpr:
walk(&n.X, p, "selector");
walk(&n.X, p, "selector")
case *ast.IndexExpr:
walk(&n.X, p, "expr");
walk(&n.Index, p, "expr");
if n.End != nil {
walk(&n.End, p, "expr");
walk(&n.End, p, "expr")
}
case *ast.TypeAssertExpr:
walk(&n.X, p, "expr");
......@@ -188,9 +188,9 @@ func walk(x interface{}, p *Prog, context string) {
walk(&n.Fun, p, "call");
walk(n.Args, p, "expr");
case *ast.StarExpr:
walk(&n.X, p, context);
walk(&n.X, p, context)
case *ast.UnaryExpr:
walk(&n.X, p, "expr");
walk(&n.X, p, "expr")
case *ast.BinaryExpr:
walk(&n.X, p, "expr");
walk(&n.Y, p, "expr");
......@@ -202,40 +202,40 @@ func walk(x interface{}, p *Prog, context string) {
walk(&n.Len, p, "expr");
walk(&n.Elt, p, "type");
case *ast.StructType:
walk(n.Fields, p, "field");
walk(n.Fields, p, "field")
case *ast.FuncType:
walk(n.Params, p, "field");
walk(n.Results, p, "field");
case *ast.InterfaceType:
walk(n.Methods, p, "field");
walk(n.Methods, p, "field")
case *ast.MapType:
walk(&n.Key, p, "type");
walk(&n.Value, p, "type");
case *ast.ChanType:
walk(&n.Value, p, "type");
walk(&n.Value, p, "type")
case *ast.BadStmt:
case *ast.DeclStmt:
walk(n.Decl, p, "decl");
walk(n.Decl, p, "decl")
case *ast.EmptyStmt:
case *ast.LabeledStmt:
walk(n.Stmt, p, "stmt");
walk(n.Stmt, p, "stmt")
case *ast.ExprStmt:
walk(&n.X, p, "expr");
walk(&n.X, p, "expr")
case *ast.IncDecStmt:
walk(&n.X, p, "expr");
walk(&n.X, p, "expr")
case *ast.AssignStmt:
walk(n.Lhs, p, "expr");
walk(n.Rhs, p, "expr");
case *ast.GoStmt:
walk(n.Call, p, "expr");
walk(n.Call, p, "expr")
case *ast.DeferStmt:
walk(n.Call, p, "expr");
walk(n.Call, p, "expr")
case *ast.ReturnStmt:
walk(n.Results, p, "expr");
walk(n.Results, p, "expr")
case *ast.BranchStmt:
case *ast.BlockStmt:
walk(n.List, p, "stmt");
walk(n.List, p, "stmt")
case *ast.IfStmt:
walk(n.Init, p, "stmt");
walk(&n.Cond, p, "expr");
......@@ -260,7 +260,7 @@ func walk(x interface{}, p *Prog, context string) {
walk(n.Rhs, p, "expr");
walk(n.Body, p, "stmt");
case *ast.SelectStmt:
walk(n.Body, p, "stmt");
walk(n.Body, p, "stmt")
case *ast.ForStmt:
walk(n.Init, p, "stmt");
walk(&n.Cond, p, "expr");
......@@ -277,47 +277,47 @@ func walk(x interface{}, p *Prog, context string) {
walk(&n.Type, p, "type");
walk(n.Values, p, "expr");
case *ast.TypeSpec:
walk(&n.Type, p, "type");
walk(&n.Type, p, "type")
case *ast.BadDecl:
case *ast.GenDecl:
walk(n.Specs, p, "spec");
walk(n.Specs, p, "spec")
case *ast.FuncDecl:
if n.Recv != nil {
walk(n.Recv, p, "field");
walk(n.Recv, p, "field")
}
walk(n.Type, p, "type");
if n.Body != nil {
walk(n.Body, p, "stmt");
walk(n.Body, p, "stmt")
}
case *ast.File:
walk(n.Decls, p, "decl");
walk(n.Decls, p, "decl")
case *ast.Package:
for _, f := range n.Files {
walk(f, p, "file");
walk(f, p, "file")
}
case []ast.Decl:
for _, d := range n {
walk(d, p, context);
walk(d, p, context)
}
case []ast.Expr:
for i := range n {
walk(&n[i], p, context);
walk(&n[i], p, context)
}
case []*ast.Field:
for _, f := range n {
walk(f, p, context);
walk(f, p, context)
}
case []ast.Stmt:
for _, s := range n {
walk(s, p, context);
walk(s, p, context)
}
case []ast.Spec:
for _, s := range n {
walk(s, p, context);
walk(s, p, context)
}
}
}
This diff is collapsed.
......@@ -45,18 +45,18 @@ func main() {
arch := os.Getenv("GOARCH");
if arch == "" {
fatal("$GOARCH is not set");
fatal("$GOARCH is not set")
}
ptrSize, ok := ptrSizeMap[arch];
if !ok {
fatal("unknown architecture %s", arch);
fatal("unknown architecture %s", arch)
}
p := openProg(input);
for _, cref := range p.Crefs {
// Convert C.ulong to C.unsigned long, etc.
if expand, ok := expandName[cref.Name]; ok {
cref.Name = expand;
cref.Name = expand
}
}
......@@ -79,7 +79,7 @@ func main() {
*cref.Expr = cref.Type.Go;
case "expr":
if cref.TypeName {
error((*cref.Expr).Pos(), "type C.%s used as expression", cref.Name);
error((*cref.Expr).Pos(), "type C.%s used as expression", cref.Name)
}
// Reference to C variable.
// We declare a pointer and arrange to have it filled in.
......@@ -87,13 +87,13 @@ func main() {
p.Vardef[cref.Name] = cref.Type;
case "type":
if !cref.TypeName {
error((*cref.Expr).Pos(), "expression C.%s used as type", cref.Name);
error((*cref.Expr).Pos(), "expression C.%s used as type", cref.Name)
}
*cref.Expr = cref.Type.Go;
}
}
if nerrors > 0 {
os.Exit(2);
os.Exit(2)
}
p.PackagePath = p.Package;
......
......@@ -15,7 +15,7 @@ import (
func creat(name string) *os.File {
f, err := os.Open(name, os.O_WRONLY | os.O_CREAT | os.O_TRUNC, 0666);
if err != nil {
fatal("%s", err);
fatal("%s", err)
}
return f;
}
......@@ -27,7 +27,7 @@ func (p *Prog) writeOutput(srcfile string) {
base := srcfile;
if strings.HasSuffix(base, ".go") {
base = base[0 : len(base)-3];
base = base[0 : len(base)-3]
}
fgo1 := creat(base + ".cgo1.go");
fgo2 := creat(base + ".cgo2.go");
......@@ -80,7 +80,7 @@ func (p *Prog) writeOutput(srcfile string) {
if name == "CString" || name == "GoString" {
// The builtins are already defined in the C prolog.
continue;
continue
}
// Construct a gcc struct matching the 6c argument frame.
......@@ -150,12 +150,12 @@ func (p *Prog) writeOutput(srcfile string) {
fmt.Fprintf(fgcc, "\t%s *a = v;\n", structType);
fmt.Fprintf(fgcc, "\t");
if def.Result != nil {
fmt.Fprintf(fgcc, "a->r = ");
fmt.Fprintf(fgcc, "a->r = ")
}
fmt.Fprintf(fgcc, "%s(", name);
for i := range def.Params {
if i > 0 {
fmt.Fprintf(fgcc, ", ");
fmt.Fprintf(fgcc, ", ")
}
fmt.Fprintf(fgcc, "a->p%d", i);
}
......
......@@ -18,7 +18,7 @@ type ByteReaderAt []byte
func (r ByteReaderAt) ReadAt(p []byte, off int64) (n int, err os.Error) {
if off >= int64(len(r)) || off < 0 {
return 0, os.EOF;
return 0, os.EOF
}
return bytes.Copy(p, r[off:len(r)]), nil;
}
......@@ -29,23 +29,23 @@ func (r ByteReaderAt) ReadAt(p []byte, off int64) (n int, err os.Error) {
func run(stdin []byte, argv []string) (stdout, stderr []byte, ok bool) {
cmd, err := exec.LookPath(argv[0]);
if err != nil {
fatal("exec %s: %s", argv[0], err);
fatal("exec %s: %s", argv[0], err)
}
r0, w0, err := os.Pipe();
if err != nil {
fatal("%s", err);
fatal("%s", err)
}
r1, w1, err := os.Pipe();
if err != nil {
fatal("%s", err);
fatal("%s", err)
}
r2, w2, err := os.Pipe();
if err != nil {
fatal("%s", err);
fatal("%s", err)
}
pid, err := os.ForkExec(cmd, argv, os.Environ(), "", []*os.File{r0, w1, w2});
if err != nil {
fatal("%s", err);
fatal("%s", err)
}
r0.Close();
w1.Close();
......@@ -70,7 +70,7 @@ func run(stdin []byte, argv []string) (stdout, stderr []byte, ok bool) {
w, err := os.Wait(pid, 0);
if err != nil {
fatal("%s", err);
fatal("%s", err)
}
ok = w.Exited() && w.ExitStatus() == 0;
return;
......@@ -88,7 +88,7 @@ var noPos token.Position
func error(pos token.Position, msg string, args ...) {
nerrors++;
if pos.IsValid() {
fmt.Fprintf(os.Stderr, "%s: ", pos);
fmt.Fprintf(os.Stderr, "%s: ", pos)
}
fmt.Fprintf(os.Stderr, msg, args);
fmt.Fprintf(os.Stderr, "\n");
......
......@@ -41,7 +41,7 @@ func extractEBNF(src []byte) []byte {
// i = beginning of EBNF text
i := bytes.Index(src, open);
if i < 0 {
break; // no EBNF found - we are done
break // no EBNF found - we are done
}
i += len(open);
......@@ -49,14 +49,14 @@ func extractEBNF(src []byte) []byte {
// to maintain correct line numbers in error messages
for _, ch := range src[0:i] {
if ch == '\n' {
buf.WriteByte('\n');
buf.WriteByte('\n')
}
}
// j = end of EBNF text (or end of source)
j := bytes.Index(src[i:len(src)], close); // close marker
if j < 0 {
j = len(src)-i;
j = len(src)-i
}
j += i;
......@@ -77,28 +77,28 @@ func main() {
var filename string;
switch flag.NArg() {
case 0:
filename = "/dev/stdin";
filename = "/dev/stdin"
case 1:
filename = flag.Arg(0);
filename = flag.Arg(0)
default:
usage();
usage()
}
src, err := io.ReadFile(filename);
if err != nil {
scanner.PrintError(os.Stderr, err);
scanner.PrintError(os.Stderr, err)
}
if path.Ext(filename) == ".html" {
src = extractEBNF(src);
src = extractEBNF(src)
}
grammar, err := ebnf.Parse(filename, src);
if err != nil {
scanner.PrintError(os.Stderr, err);
scanner.PrintError(os.Stderr, err)
}
if err = ebnf.Verify(grammar, *start); err != nil {
scanner.PrintError(os.Stderr, err);
scanner.PrintError(os.Stderr, err)
}
}
This diff is collapsed.
......@@ -77,7 +77,7 @@ func (h *RunList) reduce(less func(x, y interface{}) bool, newRun func(h *RunLis
}
// add final run, if any
if i < h.Len() {
hh.Push(newRun(h, i, h.Len()));
hh.Push(newRun(h, i, h.Len()))
}
return &hh;
......@@ -119,7 +119,7 @@ func init() {
// sanity check: if nKinds is too large, the SpotInfo
// accessor functions may need to be updated
if nKinds > 8 {
panic();
panic()
}
}
......@@ -132,13 +132,13 @@ func makeSpotInfo(kind SpotKind, lori int, isIndex bool) SpotInfo {
// lori value doesn't fit - since snippet indices are
// most certainly always smaller then 1<<28, this can
// only happen for line numbers; give it no line number (= 0)
x = 0;
x = 0
}
// encode kind: bits [1..4)
x |= SpotInfo(kind)<<1;
// encode isIndex: bit 0
if isIndex {
x |= 1;
x |= 1
}
return x;
}
......@@ -220,7 +220,7 @@ type Pak struct {
// Paks are sorted by name (primary key) and by import path (secondary key).
func (p *Pak) less(q *Pak) bool {
return p.Name < q.Name || p.Name == q.Name && p.Path < q.Path;
return p.Name < q.Name || p.Name == q.Name && p.Path < q.Path
}
......@@ -266,7 +266,7 @@ func newFileRun(h0 *RunList, i, j int) interface{} {
// create the FileRun
groups := make([]*KindRun, h2.Len());
for i := 0; i < h2.Len(); i++ {
groups[i] = h2.At(i).(*KindRun);
groups[i] = h2.At(i).(*KindRun)
}
return &FileRun{file, groups};
}
......@@ -289,7 +289,7 @@ func (p *PakRun) Swap(i, j int) { p.Files[i], p.Files[j] = p.Files[j], p.Files[
// FileRuns are sorted by package for the reduction into PakRuns.
func lessFileRun(x, y interface{}) bool {
return x.(*FileRun).File.Pak.less(&y.(*FileRun).File.Pak);
return x.(*FileRun).File.Pak.less(&y.(*FileRun).File.Pak)
}
......@@ -329,7 +329,7 @@ func reduce(h0 *RunList) HitList {
// create a HitList
h := make(HitList, h2.Len());
for i := 0; i < h2.Len(); i++ {
h[i] = h2.At(i).(*PakRun);
h[i] = h2.At(i).(*PakRun)
}
return h;
}
......@@ -340,7 +340,7 @@ func (h HitList) filter(pakname string) HitList {
n := 0;
for _, p := range h {
if p.Pak.Name == pakname {
n++;
n++
}
}
// create filtered HitList
......@@ -393,7 +393,7 @@ func newAltWords(h *RunList, i, j int) interface{} {
func (a *AltWords) filter(s string) *AltWords {
if len(a.Alts) == 1 && a.Alts[0] == s {
// there are no different alternatives
return nil;
return nil
}
// make a new AltWords with the current spelling removed
......@@ -445,7 +445,7 @@ func (x *Indexer) addSnippet(s *Snippet) int {
func (x *Indexer) visitComment(c *ast.CommentGroup) {
if c != nil {
ast.Walk(x, c);
ast.Walk(x, c)
}
}
......@@ -480,7 +480,7 @@ func (x *Indexer) visitSpec(spec ast.Spec, isVarDecl bool) {
x.visitComment(n.Doc);
x.visitIdent(ImportDecl, n.Name);
for _, s := range n.Path {
ast.Walk(x, s);
ast.Walk(x, s)
}
x.visitComment(n.Comment);
......@@ -488,14 +488,14 @@ func (x *Indexer) visitSpec(spec ast.Spec, isVarDecl bool) {
x.visitComment(n.Doc);
kind := ConstDecl;
if isVarDecl {
kind = VarDecl;
kind = VarDecl
}
for _, n := range n.Names {
x.visitIdent(kind, n);
x.visitIdent(kind, n)
}
ast.Walk(x, n.Type);
for _, v := range n.Values {
ast.Walk(x, v);
ast.Walk(x, v)
}
x.visitComment(n.Comment);
......@@ -512,17 +512,17 @@ func (x *Indexer) Visit(node interface{}) bool {
// TODO(gri): methods in interface types are categorized as VarDecl
switch n := node.(type) {
case *ast.Ident:
x.visitIdent(Use, n);
x.visitIdent(Use, n)
case *ast.Field:
x.decl = nil; // no snippets for fields
x.visitComment(n.Doc);
for _, m := range n.Names {
x.visitIdent(VarDecl, m);
x.visitIdent(VarDecl, m)
}
ast.Walk(x, n.Type);
for _, s := range n.Tag {
ast.Walk(x, s);
ast.Walk(x, s)
}
x.visitComment(n.Comment);
......@@ -532,18 +532,18 @@ func (x *Indexer) Visit(node interface{}) bool {
x.decl = nil; // no snippets for local declarations
x.visitComment(decl.Doc);
for _, s := range decl.Specs {
x.visitSpec(s, decl.Tok == token.VAR);
x.visitSpec(s, decl.Tok == token.VAR)
}
} else {
// handle error case gracefully
ast.Walk(x, n.Decl);
ast.Walk(x, n.Decl)
}
case *ast.GenDecl:
x.decl = n;
x.visitComment(n.Doc);
for _, s := range n.Specs {
x.visitSpec(s, n.Tok == token.VAR);
x.visitSpec(s, n.Tok == token.VAR)
}
case *ast.FuncDecl:
......@@ -557,7 +557,7 @@ func (x *Indexer) Visit(node interface{}) bool {
x.visitIdent(kind, n.Name);
ast.Walk(x, n.Type);
if n.Body != nil {
ast.Walk(x, n.Type);
ast.Walk(x, n.Type)
}
case *ast.File:
......@@ -565,14 +565,14 @@ func (x *Indexer) Visit(node interface{}) bool {
x.decl = nil;
x.visitIdent(PackageClause, n.Name);
for _, d := range n.Decls {
ast.Walk(x, d);
ast.Walk(x, d)
}
// don't visit package level comments for now
// to avoid duplicate visiting from individual
// nodes
default:
return true;
return true
}
return false;
......@@ -580,26 +580,26 @@ func (x *Indexer) Visit(node interface{}) bool {
func (x *Indexer) VisitDir(path string, d *os.Dir) bool {
return true;
return true
}
func (x *Indexer) VisitFile(path string, d *os.Dir) {
if !isGoFile(d) {
return;
return
}
if excludeTestFiles && (!isPkgFile(d) || strings.HasPrefix(path, "test/")) {
return;
return
}
if excludeMainPackages && pkgName(path) == "main" {
return;
return
}
file, err := parser.ParseFile(path, nil, parser.ParseComments);
if err != nil {
return; // ignore files with (parse) errors
return // ignore files with (parse) errors
}
dir, _ := pathutil.Split(path);
......@@ -668,7 +668,7 @@ func NewIndex(root string) *Index {
// convert snippet vector into a list
snippets := make([]*Snippet, x.snippets.Len());
for i := 0; i < x.snippets.Len(); i++ {
snippets[i] = x.snippets.At(i).(*Snippet);
snippets[i] = x.snippets.At(i).(*Snippet)
}
return &Index{words, alts, snippets, x.nspots};
......@@ -678,7 +678,7 @@ func NewIndex(root string) *Index {
// Size returns the number of different words and
// spots indexed as a measure for the index size.
func (x *Index) Size() (nwords int, nspots int) {
return len(x.words), x.nspots;
return len(x.words), x.nspots
}
......@@ -689,7 +689,7 @@ func (x *Index) LookupWord(w string) (match *LookupResult, alt *AltWords) {
// (if there is no match, the alternatives do
// not contain the current spelling)
if match != nil && alt != nil {
alt = alt.filter(w);
alt = alt.filter(w)
}
return;
}
......@@ -722,7 +722,7 @@ func (x *Index) Lookup(query string) (match *LookupResult, alt *AltWords, illega
switch len(ss) {
case 1:
match, alt = x.LookupWord(ss[0]);
match, alt = x.LookupWord(ss[0])
case 2:
pakname := ss[0];
......@@ -735,7 +735,7 @@ func (x *Index) Lookup(query string) (match *LookupResult, alt *AltWords, illega
}
default:
illegal = true;
illegal = true
}
return;
......@@ -745,7 +745,7 @@ func (x *Index) Lookup(query string) (match *LookupResult, alt *AltWords, illega
func (x *Index) Snippet(i int) *Snippet {
// handle illegal snippet indices gracefully
if 0 <= i && i < len(x.snippets) {
return x.snippets[i];
return x.snippets[i]
}
return nil;
}
......@@ -60,7 +60,7 @@ func exec(c *http.Conn, args []string) (status int) {
bin := args[0];
fds := []*os.File{nil, w, w};
if *verbose {
log.Stderrf("executing %v", args);
log.Stderrf("executing %v", args)
}
pid, err := os.ForkExec(bin, args, os.Environ(), goroot, fds);
defer r.Close();
......@@ -86,7 +86,7 @@ func exec(c *http.Conn, args []string) (status int) {
}
if *verbose {
os.Stderr.Write(buf.Bytes());
os.Stderr.Write(buf.Bytes())
}
if c != nil {
c.SetHeader("content-type", "text/plain; charset=utf-8");
......@@ -114,10 +114,10 @@ func dosync(c *http.Conn, r *http.Request) {
case 1:
// sync failed because no files changed;
// don't change the package tree
syncDelay.set(*syncMin); // revert to regular sync schedule
syncDelay.set(*syncMin) // revert to regular sync schedule
default:
// sync failed because of an error - back off exponentially, but try at least once a day
syncDelay.backoff(24*60);
syncDelay.backoff(24*60)
}
}
......@@ -135,7 +135,7 @@ func loggingHandler(h http.Handler) http.Handler {
return http.HandlerFunc(func(c *http.Conn, req *http.Request) {
log.Stderrf("%s\t%s", c.RemoteAddr, req.URL);
h.ServeHTTP(c, req);
});
})
}
......@@ -145,15 +145,15 @@ func main() {
// Check usage: either server and no args, or command line and args
if (*httpaddr != "") != (flag.NArg() == 0) {
usage();
usage()
}
if *tabwidth < 0 {
log.Exitf("negative tabwidth %d", *tabwidth);
log.Exitf("negative tabwidth %d", *tabwidth)
}
if err := os.Chdir(goroot); err != nil {
log.Exitf("chdir %s: %v", goroot, err);
log.Exitf("chdir %s: %v", goroot, err)
}
readTemplates();
......@@ -174,7 +174,7 @@ func main() {
registerPublicHandlers(http.DefaultServeMux);
if *syncCmd != "" {
http.Handle("/debug/sync", http.HandlerFunc(dosync));
http.Handle("/debug/sync", http.HandlerFunc(dosync))
}
// Initialize directory tree with corresponding timestamp.
......@@ -192,7 +192,7 @@ func main() {
dosync(nil, nil);
delay, _ := syncDelay.get();
if *verbose {
log.Stderrf("next sync in %dmin", delay.(int));
log.Stderrf("next sync in %dmin", delay.(int))
}
time.Sleep(int64(delay.(int))*60e9);
}
......@@ -210,7 +210,7 @@ func main() {
// Start http server.
if err := http.ListenAndServe(*httpaddr, handler); err != nil {
log.Exitf("ListenAndServe %s: %v", *httpaddr, err);
log.Exitf("ListenAndServe %s: %v", *httpaddr, err)
}
return;
}
......@@ -225,7 +225,7 @@ func main() {
if info.PDoc == nil && info.Dirs == nil {
// try again, this time assume it's a command
info = cmdHandler.getPageInfo(flag.Arg(0));
info = cmdHandler.getPageInfo(flag.Arg(0))
}
if info.PDoc != nil && flag.NArg() > 1 {
......@@ -234,6 +234,6 @@ func main() {
}
if err := packageText.Execute(info, os.Stdout); err != nil {
log.Stderrf("packageText.Execute: %s", err);
log.Stderrf("packageText.Execute: %s", err)
}
}
......@@ -31,14 +31,14 @@ type snippetStyler struct {
func (s *snippetStyler) LineTag(line int) (text []uint8, tag printer.HTMLTag) {
return; // no LineTag for snippets
return // no LineTag for snippets
}
func (s *snippetStyler) Ident(id *ast.Ident) (text []byte, tag printer.HTMLTag) {
text = strings.Bytes(id.Value);
if s.highlight == id {
tag = printer.HTMLTag{"<span class=highlight>", "</span>"};
tag = printer.HTMLTag{"<span class=highlight>", "</span>"}
}
return;
}
......@@ -56,17 +56,17 @@ func findSpec(list []ast.Spec, id *ast.Ident) ast.Spec {
switch s := spec.(type) {
case *ast.ImportSpec:
if s.Name == id {
return s;
return s
}
case *ast.ValueSpec:
for _, n := range s.Names {
if n == id {
return s;
return s
}
}
case *ast.TypeSpec:
if s.Name == id {
return s;
return s
}
}
}
......@@ -77,7 +77,7 @@ func findSpec(list []ast.Spec, id *ast.Ident) ast.Spec {
func genSnippet(d *ast.GenDecl, id *ast.Ident) *Snippet {
s := findSpec(d.Specs, id);
if s == nil {
return nil; // declaration doesn't contain id - exit gracefully
return nil // declaration doesn't contain id - exit gracefully
}
// only use the spec containing the id for the snippet
......@@ -89,7 +89,7 @@ func genSnippet(d *ast.GenDecl, id *ast.Ident) *Snippet {
func funcSnippet(d *ast.FuncDecl, id *ast.Ident) *Snippet {
if d.Name != id {
return nil; // declaration doesn't contain id - exit gracefully
return nil // declaration doesn't contain id - exit gracefully
}
// only use the function signature for the snippet
......@@ -106,9 +106,9 @@ func funcSnippet(d *ast.FuncDecl, id *ast.Ident) *Snippet {
func NewSnippet(decl ast.Decl, id *ast.Ident) (s *Snippet) {
switch d := decl.(type) {
case *ast.GenDecl:
s = genSnippet(d, id);
s = genSnippet(d, id)
case *ast.FuncDecl:
s = funcSnippet(d, id);
s = funcSnippet(d, id)
}
// handle failure gracefully
......@@ -116,7 +116,7 @@ func NewSnippet(decl ast.Decl, id *ast.Ident) (s *Snippet) {
s = &Snippet{
id.Pos().Line,
fmt.Sprintf(`could not generate a snippet for <span class="highlight">%s</span>`, id.Value),
};
}
}
return;
}
......@@ -43,13 +43,13 @@ func (p *ebnfParser) next() {
if p.tok.IsKeyword() {
// TODO Should keyword mapping always happen outside scanner?
// Or should there be a flag to scanner to enable keyword mapping?
p.tok = token.IDENT;
p.tok = token.IDENT
}
}
func (p *ebnfParser) Error(pos token.Position, msg string) {
fmt.Fprintf(p.out, `<span class="alert">error: %s</span>`, msg);
fmt.Fprintf(p.out, `<span class="alert">error: %s</span>`, msg)
}
......@@ -60,7 +60,7 @@ func (p *ebnfParser) errorExpected(pos token.Position, msg string) {
// make the error message more specific
msg += ", found '" + p.tok.String() + "'";
if p.tok.IsLiteral() {
msg += " "+string(p.lit);
msg += " "+string(p.lit)
}
}
p.Error(pos, msg);
......@@ -70,7 +70,7 @@ func (p *ebnfParser) errorExpected(pos token.Position, msg string) {
func (p *ebnfParser) expect(tok token.Token) token.Position {
pos := p.pos;
if p.tok != tok {
p.errorExpected(pos, "'" + tok.String() + "'");
p.errorExpected(pos, "'" + tok.String() + "'")
}
p.next(); // make progress in any case
return pos;
......@@ -81,9 +81,9 @@ func (p *ebnfParser) parseIdentifier(def bool) {
name := string(p.lit);
p.expect(token.IDENT);
if def {
fmt.Fprintf(p.out, `<a id="%s">%s</a>`, name, name);
fmt.Fprintf(p.out, `<a id="%s">%s</a>`, name, name)
} else {
fmt.Fprintf(p.out, `<a href="#%s" class="noline">%s</a>`, name, name);
fmt.Fprintf(p.out, `<a href="#%s" class="noline">%s</a>`, name, name)
}
p.prev += len(name); // skip identifier when calling flush
}
......@@ -92,7 +92,7 @@ func (p *ebnfParser) parseIdentifier(def bool) {
func (p *ebnfParser) parseTerm() bool {
switch p.tok {
case token.IDENT:
p.parseIdentifier(false);
p.parseIdentifier(false)
case token.STRING:
p.next();
......@@ -117,7 +117,7 @@ func (p *ebnfParser) parseTerm() bool {
p.expect(token.RBRACE);
default:
return false;
return false
}
return true;
......@@ -134,7 +134,7 @@ func (p *ebnfParser) parseExpression() {
for {
p.parseSequence();
if p.tok != token.OR {
break;
break
}
p.next();
}
......@@ -158,7 +158,7 @@ func (p *ebnfParser) parse(out io.Writer, src []byte) {
// process source
for p.tok != token.EOF {
p.parseProduction();
p.parseProduction()
}
p.flush();
}
......@@ -178,14 +178,14 @@ func linkify(out io.Writer, src []byte) {
// i: beginning of EBNF text (or end of source)
i := bytes.Index(src, openTag);
if i < 0 {
i = n-len(openTag);
i = n-len(openTag)
}
i += len(openTag);
// j: end of EBNF text (or end of source)
j := bytes.Index(src[i:n], closeTag); // close marker
if j < 0 {
j = n-i;
j = n-i
}
j += i;
......
......@@ -52,10 +52,10 @@ func usage() {
func parserMode() uint {
mode := uint(0);
if *comments {
mode |= parser.ParseComments;
mode |= parser.ParseComments
}
if *trace {
mode |= parser.Trace;
mode |= parser.Trace
}
return mode;
}
......@@ -64,10 +64,10 @@ func parserMode() uint {
func printerMode() uint {
mode := uint(0);
if !*align {
mode |= printer.RawFormat;
mode |= printer.RawFormat
}
if *usespaces {
mode |= printer.UseSpaces;
mode |= printer.UseSpaces
}
return mode;
}
......@@ -75,42 +75,42 @@ func printerMode() uint {
func isGoFile(d *os.Dir) bool {
// ignore non-Go files
return d.IsRegular() && !strings.HasPrefix(d.Name, ".") && strings.HasSuffix(d.Name, ".go");
return d.IsRegular() && !strings.HasPrefix(d.Name, ".") && strings.HasSuffix(d.Name, ".go")
}
func processFile(filename string) os.Error {
src, err := io.ReadFile(filename);
if err != nil {
return err;
return err
}
file, err := parser.ParseFile(filename, src, parserMode());
if err != nil {
return err;
return err
}
var res bytes.Buffer;
_, err = (&printer.Config{printerMode(), *tabwidth, nil}).Fprint(&res, file);
if err != nil {
return err;
return err
}
if bytes.Compare(src, res.Bytes()) != 0 {
// formatting has changed
if *list {
fmt.Fprintln(os.Stdout, filename);
fmt.Fprintln(os.Stdout, filename)
}
if *write {
err = io.WriteFile(filename, res.Bytes(), 0);
if err != nil {
return err;
return err
}
}
}
if !*list && !*write {
_, err = os.Stdout.Write(res.Bytes());
_, err = os.Stdout.Write(res.Bytes())
}
return err;
......@@ -120,7 +120,7 @@ func processFile(filename string) os.Error {
type fileVisitor chan os.Error
func (v fileVisitor) VisitDir(path string, d *os.Dir) bool {
return true;
return true
}
......@@ -128,7 +128,7 @@ func (v fileVisitor) VisitFile(path string, d *os.Dir) {
if isGoFile(d) {
v <- nil; // synchronize error handler
if err := processFile(path); err != nil {
v <- err;
v <- err
}
}
}
......@@ -140,7 +140,7 @@ func walkDir(path string) {
go func() {
for err := range v {
if err != nil {
report(err);
report(err)
}
}
}();
......@@ -160,7 +160,7 @@ func main() {
if flag.NArg() == 0 {
if err := processFile("/dev/stdin"); err != nil {
report(err);
report(err)
}
}
......@@ -168,13 +168,13 @@ func main() {
path := flag.Arg(i);
switch dir, err := os.Stat(path); {
case err != nil:
report(err);
report(err)
case dir.IsRegular():
if err := processFile(path); err != nil {
report(err);
report(err)
}
case dir.IsDirectory():
walkDir(path);
walkDir(path)
}
}
......
This diff is collapsed.
......@@ -35,11 +35,11 @@ func main() {
var err os.Error;
switch len(args) {
case 0:
data, err = io.ReadAll(os.Stdin);
data, err = io.ReadAll(os.Stdin)
case 1:
data, err = io.ReadFile(args[0]);
data, err = io.ReadFile(args[0])
default:
usage();
usage()
}
chk(err);
......@@ -63,25 +63,25 @@ func main() {
chk(err);
dirty := make(map[string]int);
for _, f := range dirtylist {
dirty[f] = 1;
dirty[f] = 1
}
conflict := make(map[string]int);
for _, f := range pset.File {
if f.Verb == patch.Delete || f.Verb == patch.Rename {
if _, ok := dirty[f.Src]; ok {
conflict[f.Src] = 1;
conflict[f.Src] = 1
}
}
if f.Verb != patch.Delete {
if _, ok := dirty[f.Dst]; ok {
conflict[f.Dst] = 1;
conflict[f.Dst] = 1
}
}
}
if len(conflict) > 0 {
fmt.Fprintf(os.Stderr, "cannot apply patch to locally modified files:\n");
for name := range conflict {
fmt.Fprintf(os.Stderr, "\t%s\n", name);
fmt.Fprintf(os.Stderr, "\t%s\n", name)
}
os.Exit(2);
}
......@@ -136,7 +136,7 @@ func main() {
for i := range op {
o := &op[i];
if o.Verb == patch.Delete {
continue;
continue
}
if o.Verb == patch.Add {
makeParent(o.Dst);
......@@ -145,9 +145,9 @@ func main() {
if o.Data != nil {
chk(io.WriteFile(o.Dst, o.Data, 0644));
if o.Verb == patch.Add {
undoRm(o.Dst);
undoRm(o.Dst)
} else {
undoRevert(o.Dst);
undoRevert(o.Dst)
}
changed[o.Dst] = 1;
}
......@@ -178,7 +178,7 @@ func main() {
}
sort.SortStrings(list);
for _, f := range list {
fmt.Printf("%s\n", f);
fmt.Printf("%s\n", f)
}
}
......@@ -195,25 +195,25 @@ func mkdirAll(path string, perm int) os.Error {
dir, err := os.Lstat(path);
if err == nil {
if dir.IsDirectory() {
return nil;
return nil
}
return &os.PathError{"mkdir", path, os.ENOTDIR};
}
i := len(path);
for i > 0 && path[i-1] == '/' { // Skip trailing slashes.
i--;
i--
}
j := i;
for j > 0 && path[j-1] != '/' { // Scan backward over element.
j--;
j--
}
if j > 0 {
err = mkdirAll(path[0 : j-1], perm);
if err != nil {
return err;
return err
}
}
......@@ -223,7 +223,7 @@ func mkdirAll(path string, perm int) os.Error {
// double-checking that directory doesn't exist.
dir, err1 := os.Lstat(path);
if err1 == nil && dir.IsDirectory() {
return nil;
return nil
}
return err;
}
......@@ -253,7 +253,7 @@ func undoRm(name string) { undoLog.Push(undo(func() os.Error { return os.Remove(
func runUndo() {
for i := undoLog.Len() - 1; i >= 0; i-- {
if err := undoLog.At(i).(undo)(); err != nil {
fmt.Fprintf(os.Stderr, "%s\n", err);
fmt.Fprintf(os.Stderr, "%s\n", err)
}
}
}
......@@ -263,7 +263,7 @@ func runUndo() {
func hgRoot() (string, os.Error) {
out, err := run([]string{"hg", "root"}, nil);
if err != nil {
return "", err;
return "", err
}
return strings.TrimSpace(out), nil;
}
......@@ -280,7 +280,7 @@ func hgIncoming() bool {
func hgModified() ([]string, os.Error) {
out, err := run([]string{"hg", "status", "-n"}, nil);
if err != nil {
return nil, err;
return nil, err
}
return strings.Split(strings.TrimSpace(out), "\n", 0), nil;
}
......@@ -320,7 +320,7 @@ func hgRename(dst, src string) os.Error {
func copy(a []string) []string {
b := make([]string, len(a));
for i, s := range a {
b[i] = s;
b[i] = s
}
return b;
}
......@@ -338,7 +338,7 @@ func run(argv []string, input []byte) (out string, err os.Error) {
if !ok {
prog, err = exec.LookPath(argv[0]);
if err != nil {
goto Error;
goto Error
}
lookPathCache[argv[0]] = prog;
}
......@@ -347,12 +347,12 @@ func run(argv []string, input []byte) (out string, err os.Error) {
if len(input) == 0 {
cmd, err = exec.Run(prog, argv, os.Environ(), exec.DevNull, exec.Pipe, exec.MergeWithStdout);
if err != nil {
goto Error;
goto Error
}
} else {
cmd, err = exec.Run(prog, argv, os.Environ(), exec.Pipe, exec.Pipe, exec.MergeWithStdout);
if err != nil {
goto Error;
goto Error
}
go func() {
cmd.Stdin.Write(input);
......@@ -369,7 +369,7 @@ func run(argv []string, input []byte) (out string, err os.Error) {
}
w, err := cmd.Wait(0);
if err != nil {
goto Error;
goto Error
}
if !w.Exited() || w.ExitStatus() != 0 {
err = w;
......
......@@ -50,10 +50,10 @@ func NewReader(r io.Reader) *Reader { return &Reader{r: r} }
func (tr *Reader) Next() (*Header, os.Error) {
var hdr *Header;
if tr.err == nil {
tr.skipUnread();
tr.skipUnread()
}
if tr.err == nil {
hdr = tr.readHeader();
hdr = tr.readHeader()
}
return hdr, tr.err;
}
......@@ -63,7 +63,7 @@ func (tr *Reader) Next() (*Header, os.Error) {
func cString(b []byte) string {
n := 0;
for n < len(b) && b[n] != 0 {
n++;
n++
}
return string(b[0:n]);
}
......@@ -71,15 +71,15 @@ func cString(b []byte) string {
func (tr *Reader) octal(b []byte) int64 {
// Removing leading spaces.
for len(b) > 0 && b[0] == ' ' {
b = b[1:len(b)];
b = b[1:len(b)]
}
// Removing trailing NULs and spaces.
for len(b) > 0 && (b[len(b)-1] == ' ' || b[len(b)-1] == '\x00') {
b = b[0 : len(b)-1];
b = b[0 : len(b)-1]
}
x, err := strconv.Btoui64(cString(b), 8);
if err != nil {
tr.err = err;
tr.err = err
}
return int64(x);
}
......@@ -87,7 +87,7 @@ func (tr *Reader) octal(b []byte) int64 {
type ignoreWriter struct{}
func (ignoreWriter) Write(b []byte) (n int, err os.Error) {
return len(b), nil;
return len(b), nil
}
// Skip any unread bytes in the existing file entry, as well as any alignment padding.
......@@ -95,16 +95,16 @@ func (tr *Reader) skipUnread() {
nr := tr.nb + tr.pad; // number of bytes to skip
if sr, ok := tr.r.(io.Seeker); ok {
_, tr.err = sr.Seek(nr, 1);
_, tr.err = sr.Seek(nr, 1)
} else {
_, tr.err = io.Copyn(ignoreWriter{}, tr.r, nr);
_, tr.err = io.Copyn(ignoreWriter{}, tr.r, nr)
}
tr.nb, tr.pad = 0, 0;
}
func (tr *Reader) verifyChecksum(header []byte) bool {
if tr.err != nil {
return false;
return false
}
given := tr.octal(header[148:156]);
......@@ -115,16 +115,16 @@ func (tr *Reader) verifyChecksum(header []byte) bool {
func (tr *Reader) readHeader() *Header {
header := make([]byte, blockSize);
if _, tr.err = io.ReadFull(tr.r, header); tr.err != nil {
return nil;
return nil
}
// Two blocks of zero bytes marks the end of the archive.
if bytes.Equal(header, zeroBlock[0 : blockSize]) {
if _, tr.err = io.ReadFull(tr.r, header); tr.err != nil {
return nil;
return nil
}
if !bytes.Equal(header, zeroBlock[0 : blockSize]) {
tr.err = HeaderError;
tr.err = HeaderError
}
return nil;
}
......@@ -156,12 +156,12 @@ func (tr *Reader) readHeader() *Header {
switch magic {
case "ustar\x0000": // POSIX tar (1003.1-1988)
if string(header[508:512]) == "tar\x00" {
format = "star";
format = "star"
} else {
format = "posix";
format = "posix"
}
case "ustar \x00": // old GNU tar
format = "gnu";
format = "gnu"
}
switch format {
......@@ -177,14 +177,14 @@ func (tr *Reader) readHeader() *Header {
var prefix string;
switch format {
case "posix", "gnu":
prefix = cString(s.next(155));
prefix = cString(s.next(155))
case "star":
prefix = cString(s.next(131));
hdr.Atime = tr.octal(s.next(12));
hdr.Ctime = tr.octal(s.next(12));
}
if len(prefix) > 0 {
hdr.Name = prefix + "/" + hdr.Name;
hdr.Name = prefix + "/" + hdr.Name
}
}
......@@ -206,7 +206,7 @@ func (tr *Reader) readHeader() *Header {
// until Next is called to advance to the next entry.
func (tr *Reader) Read(b []uint8) (n int, err os.Error) {
if int64(len(b)) > tr.nb {
b = b[0 : tr.nb];
b = b[0 : tr.nb]
}
n, err = tr.r.Read(b);
tr.nb -= int64(n);
......
......@@ -120,12 +120,12 @@ testLoop:
}
if !reflect.DeepEqual(hdr, header) {
t.Errorf("test %d, entry %d: Incorrect header:\nhave %+v\nwant %+v",
i, j, *hdr, *header);
i, j, *hdr, *header)
}
}
hdr, err := tr.Next();
if hdr != nil || err != nil {
t.Errorf("test %d: Unexpected entry or error: hdr=%v err=%v", i, err);
t.Errorf("test %d: Unexpected entry or error: hdr=%v err=%v", i, err)
}
f.Close();
}
......@@ -134,7 +134,7 @@ testLoop:
func TestPartialRead(t *testing.T) {
f, err := os.Open("testdata/gnu.tar", os.O_RDONLY, 0444);
if err != nil {
t.Fatalf("Unexpected error: %v", err);
t.Fatalf("Unexpected error: %v", err)
}
defer f.Close();
......@@ -143,26 +143,26 @@ func TestPartialRead(t *testing.T) {
// Read the first four bytes; Next() should skip the last byte.
hdr, err := tr.Next();
if err != nil || hdr == nil {
t.Fatalf("Didn't get first file: %v", err);
t.Fatalf("Didn't get first file: %v", err)
}
buf := make([]byte, 4);
if _, err := io.ReadFull(tr, buf); err != nil {
t.Fatalf("Unexpected error: %v", err);
t.Fatalf("Unexpected error: %v", err)
}
if expected := strings.Bytes("Kilt"); !bytes.Equal(buf, expected) {
t.Errorf("Contents = %v, want %v", buf, expected);
t.Errorf("Contents = %v, want %v", buf, expected)
}
// Second file
hdr, err = tr.Next();
if err != nil || hdr == nil {
t.Fatalf("Didn't get second file: %v", err);
t.Fatalf("Didn't get second file: %v", err)
}
buf = make([]byte, 6);
if _, err := io.ReadFull(tr, buf); err != nil {
t.Fatalf("Unexpected error: %v", err);
t.Fatalf("Unexpected error: %v", err)
}
if expected := strings.Bytes("Google"); !bytes.Equal(buf, expected) {
t.Errorf("Contents = %v, want %v", buf, expected);
t.Errorf("Contents = %v, want %v", buf, expected)
}
}
......@@ -53,7 +53,7 @@ func (tw *Writer) Flush() os.Error {
for n > 0 && tw.err == nil {
nr := n;
if nr > blockSize {
nr = blockSize;
nr = blockSize
}
var nw int;
nw, tw.err = tw.w.Write(zeroBlock[0:nr]);
......@@ -68,15 +68,15 @@ func (tw *Writer) Flush() os.Error {
func (tw *Writer) cString(b []byte, s string) {
if len(s) > len(b) {
if tw.err == nil {
tw.err = ErrFieldTooLong;
tw.err = ErrFieldTooLong
}
return;
}
for i, ch := range strings.Bytes(s) {
b[i] = ch;
b[i] = ch
}
if len(s) < len(b) {
b[len(s)] = 0;
b[len(s)] = 0
}
}
......@@ -85,7 +85,7 @@ func (tw *Writer) octal(b []byte, x int64) {
s := strconv.Itob64(x, 8);
// leading zeros, but leave room for a NUL.
for len(s)+1 < len(b) {
s = "0"+s;
s = "0"+s
}
tw.cString(b, s);
}
......@@ -111,10 +111,10 @@ func (tw *Writer) numeric(b []byte, x int64) {
// WriteHeader calls Flush if it is not the first header.
func (tw *Writer) WriteHeader(hdr *Header) os.Error {
if tw.err == nil {
tw.Flush();
tw.Flush()
}
if tw.err != nil {
return tw.err;
return tw.err
}
tw.nb = int64(hdr.Size);
......@@ -142,7 +142,7 @@ func (tw *Writer) WriteHeader(hdr *Header) os.Error {
// Use the GNU magic instead of POSIX magic if we used any GNU extensions.
if tw.usedBinary {
bytes.Copy(header[257:265], strings.Bytes("ustar \x00"));
bytes.Copy(header[257:265], strings.Bytes("ustar \x00"))
}
// The chksum field is terminated by a NUL and a space.
......@@ -153,7 +153,7 @@ func (tw *Writer) WriteHeader(hdr *Header) os.Error {
if tw.err != nil {
// problem with header; probably integer too big for a field.
return tw.err;
return tw.err
}
_, tw.err = tw.w.Write(header);
......@@ -173,7 +173,7 @@ func (tw *Writer) Write(b []uint8) (n int, err os.Error) {
n, err = tw.w.Write(b);
tw.nb -= int64(n);
if err == nil && overwrite {
err = ErrWriteTooLong;
err = ErrWriteTooLong
}
tw.err = err;
return;
......@@ -181,7 +181,7 @@ func (tw *Writer) Write(b []uint8) (n int, err os.Error) {
func (tw *Writer) Close() os.Error {
if tw.err != nil || tw.closed {
return tw.err;
return tw.err
}
tw.Flush();
tw.closed = true;
......@@ -190,7 +190,7 @@ func (tw *Writer) Close() os.Error {
for i := 0; i < 2; i++ {
_, tw.err = tw.w.Write(zeroBlock);
if tw.err != nil {
break;
break
}
}
return tw.err;
......
......@@ -87,9 +87,9 @@ func bytestr(offset int, b []byte) string {
for _, ch := range b {
switch {
case '0' <= ch && ch <= '9', 'A' <= ch && ch <= 'Z', 'a' <= ch && ch <= 'z':
s += fmt.Sprintf(" %c", ch);
s += fmt.Sprintf(" %c", ch)
default:
s += fmt.Sprintf(" %02x", ch);
s += fmt.Sprintf(" %02x", ch)
}
}
return s;
......@@ -102,15 +102,15 @@ func bytediff(a []byte, b []byte) string {
for offset := 0; len(a)+len(b) > 0; offset += rowLen {
na, nb := rowLen, rowLen;
if na > len(a) {
na = len(a);
na = len(a)
}
if nb > len(b) {
nb = len(b);
nb = len(b)
}
sa := bytestr(offset, a[0:na]);
sb := bytestr(offset, b[0:nb]);
if sa != sb {
s += fmt.Sprintf("-%v\n+%v\n", sa, sb);
s += fmt.Sprintf("-%v\n+%v\n", sa, sb)
}
a = a[na:len(a)];
b = b[nb:len(b)];
......@@ -147,7 +147,7 @@ testLoop:
actual := buf.Bytes();
if !bytes.Equal(expected, actual) {
t.Errorf("test %d: Incorrect result: (-=expected, +=actual)\n%v",
i, bytediff(expected, actual));
i, bytediff(expected, actual))
}
}
}
This diff is collapsed.
......@@ -35,10 +35,10 @@ func TestParseInt64(t *testing.T) {
for i, test := range int64TestData {
ret, err := parseInt64(test.in);
if (err == nil) != test.ok {
t.Errorf("#%d: Incorrect error result (did fail? %v, expected: %v)", i, err == nil, test.ok);
t.Errorf("#%d: Incorrect error result (did fail? %v, expected: %v)", i, err == nil, test.ok)
}
if test.ok && ret != test.out {
t.Errorf("#%d: Bad result: %v (expected %v)", i, ret, test.out);
t.Errorf("#%d: Bad result: %v (expected %v)", i, ret, test.out)
}
}
}
......@@ -63,11 +63,11 @@ func TestBitString(t *testing.T) {
for i, test := range bitStringTestData {
ret, err := parseBitString(test.in);
if (err == nil) != test.ok {
t.Errorf("#%d: Incorrect error result (did fail? %v, expected: %v)", i, err == nil, test.ok);
t.Errorf("#%d: Incorrect error result (did fail? %v, expected: %v)", i, err == nil, test.ok)
}
if err == nil {
if test.bitLength != ret.BitLength || bytes.Compare(ret.Bytes, test.out) != 0 {
t.Errorf("#%d: Bad result: %v (expected %v %v)", i, ret, test.out, test.bitLength);
t.Errorf("#%d: Bad result: %v (expected %v %v)", i, ret, test.out, test.bitLength)
}
}
}
......@@ -76,16 +76,16 @@ func TestBitString(t *testing.T) {
func TestBitStringAt(t *testing.T) {
bs := BitString{[]byte{0x82, 0x40}, 16};
if bs.At(0) != 1 {
t.Error("#1: Failed");
t.Error("#1: Failed")
}
if bs.At(1) != 0 {
t.Error("#2: Failed");
t.Error("#2: Failed")
}
if bs.At(6) != 1 {
t.Error("#3: Failed");
t.Error("#3: Failed")
}
if bs.At(9) != 1 {
t.Error("#4: Failed");
t.Error("#4: Failed")
}
}
......@@ -107,11 +107,11 @@ func TestObjectIdentifier(t *testing.T) {
for i, test := range objectIdentifierTestData {
ret, err := parseObjectIdentifier(test.in);
if (err == nil) != test.ok {
t.Errorf("#%d: Incorrect error result (did fail? %v, expected: %v)", i, err == nil, test.ok);
t.Errorf("#%d: Incorrect error result (did fail? %v, expected: %v)", i, err == nil, test.ok)
}
if err == nil {
if !reflect.DeepEqual(test.out, ret) {
t.Errorf("#%d: Bad result: %v (expected %v)", i, ret, test.out);
t.Errorf("#%d: Bad result: %v (expected %v)", i, ret, test.out)
}
}
}
......@@ -142,11 +142,11 @@ func TestTime(t *testing.T) {
for i, test := range timeTestData {
ret, err := parseUTCTime(strings.Bytes(test.in));
if (err == nil) != test.ok {
t.Errorf("#%d: Incorrect error result (did fail? %v, expected: %v)", i, err == nil, test.ok);
t.Errorf("#%d: Incorrect error result (did fail? %v, expected: %v)", i, err == nil, test.ok)
}
if err == nil {
if !reflect.DeepEqual(test.out, ret) {
t.Errorf("#%d: Bad result: %v (expected %v)", i, ret, test.out);
t.Errorf("#%d: Bad result: %v (expected %v)", i, ret, test.out)
}
}
}
......@@ -177,10 +177,10 @@ func TestParseTagAndLength(t *testing.T) {
for i, test := range tagAndLengthData {
tagAndLength, _, err := parseTagAndLength(test.in, 0);
if (err == nil) != test.ok {
t.Errorf("#%d: Incorrect error result (did pass? %v, expected: %v)", i, err == nil, test.ok);
t.Errorf("#%d: Incorrect error result (did pass? %v, expected: %v)", i, err == nil, test.ok)
}
if err == nil && !reflect.DeepEqual(test.out, tagAndLength) {
t.Errorf("#%d: Bad result: %v (expected %v)", i, tagAndLength, test.out);
t.Errorf("#%d: Bad result: %v (expected %v)", i, tagAndLength, test.out)
}
}
}
......@@ -213,7 +213,7 @@ func TestParseFieldParameters(t *testing.T) {
for i, test := range parseFieldParametersTestData {
f := parseFieldParameters(test.in);
if !reflect.DeepEqual(f, test.out) {
t.Errorf("#%d: Bad result: %v (expected %v)", i, f, test.out);
t.Errorf("#%d: Bad result: %v (expected %v)", i, f, test.out)
}
}
}
......@@ -260,10 +260,10 @@ func TestUnmarshal(t *testing.T) {
val := pv.Interface();
err := Unmarshal(val, test.in);
if err != nil {
t.Errorf("Unmarshal failed at index %d %v", i, err);
t.Errorf("Unmarshal failed at index %d %v", i, err)
}
if !reflect.DeepEqual(val, test.out) {
t.Errorf("#%d:\nhave %#v\nwant %#v", i, val, test.out);
t.Errorf("#%d:\nhave %#v\nwant %#v", i, val, test.out)
}
}
}
......@@ -310,10 +310,10 @@ func TestCertificate(t *testing.T) {
// This is a minimal, self-signed certificate that should parse correctly.
var cert Certificate;
if err := Unmarshal(&cert, derEncodedSelfSignedCertBytes); err != nil {
t.Errorf("Unmarshal failed: %v", err);
t.Errorf("Unmarshal failed: %v", err)
}
if !reflect.DeepEqual(cert, derEncodedSelfSignedCert) {
t.Errorf("Bad result:\ngot: %+v\nwant: %+v\n", cert, derEncodedSelfSignedCert);
t.Errorf("Bad result:\ngot: %+v\nwant: %+v\n", cert, derEncodedSelfSignedCert)
}
}
......@@ -323,7 +323,7 @@ func TestCertificateWithNUL(t *testing.T) {
var cert Certificate;
if err := Unmarshal(&cert, derEncodedPaypalNULCertBytes); err == nil {
t.Error("Unmarshal succeeded, should not have");
t.Error("Unmarshal succeeded, should not have")
}
}
......
......@@ -33,7 +33,7 @@ func addWW_g(x, y, c Word) (z1, z0 Word) {
yc := y+c;
z0 = x+yc;
if z0 < x || yc < y {
z1 = 1;
z1 = 1
}
return;
}
......@@ -44,7 +44,7 @@ func subWW_g(x, y, c Word) (z1, z0 Word) {
yc := y+c;
z0 = x-yc;
if z0 > x || yc < y {
z1 = 1;
z1 = 1
}
return;
}
......@@ -57,7 +57,7 @@ func mulWW_g(x, y Word) (z1, z0 Word) {
// and return the product as 2 Words.
if x < y {
x, y = y, x;
x, y = y, x
}
if x < _B2 {
......@@ -100,7 +100,7 @@ func mulWW_g(x, y Word) (z1, z0 Word) {
t1a := t1;
t1 += x0*y1;
if t1 < t1a {
c++;
c++
}
t2 := x1*y1 + c*_B2;
......@@ -114,7 +114,7 @@ func mulWW_g(x, y Word) (z1, z0 Word) {
var c3 Word;
z1 = t1 + t0>>_W2;
if z1 < t1 {
c3++;
c3++
}
z1 >>= _W2;
z1 += c3*_B2;
......@@ -149,7 +149,7 @@ func mulAddWWW_g(x, y, c Word) (z1, z0 Word) {
t1a := t1;
t1 += x0*y1;
if t1 < t1a { // If the number got smaller then we overflowed.
c2++;
c2++
}
t2 := x1*y1 + c2*_B2;
......@@ -164,7 +164,7 @@ func mulAddWWW_g(x, y, c Word) (z1, z0 Word) {
var c3 Word;
z1 = t1 + t0>>_W2;
if z1 < t1 {
c3++;
c3++
}
z1 >>= _W2;
z1 += t2 + c3*_B2;
......@@ -213,7 +213,7 @@ func divStep(x1, x0, y Word) (q, r Word) {
// Number of leading zeros in x.
func leadingZeros(x Word) (n uint) {
if x == 0 {
return uint(_W);
return uint(_W)
}
for x&(1<<(_W-1)) == 0 {
n++;
......@@ -259,7 +259,7 @@ func divWW_g(x1, x0, y Word) (q, r Word) {
r = x0>>z;
if q1 != 0 {
panic("div out of range");
panic("div out of range")
}
return q0, r;
......@@ -315,14 +315,14 @@ func init() {
func (p *Word) at(i int) *Word {
return (*Word)(unsafe.Pointer(uintptr(unsafe.Pointer(p)) + uintptr(i)*_S));
return (*Word)(unsafe.Pointer(uintptr(unsafe.Pointer(p)) + uintptr(i)*_S))
}
func addVV_s(z, x, y *Word, n int) (c Word)
func addVV_g(z, x, y *Word, n int) (c Word) {
for i := 0; i < n; i++ {
c, *z.at(i) = addWW_g(*x.at(i), *y.at(i), c);
c, *z.at(i) = addWW_g(*x.at(i), *y.at(i), c)
}
return;
}
......@@ -331,7 +331,7 @@ func addVV_g(z, x, y *Word, n int) (c Word) {
func subVV_s(z, x, y *Word, n int) (c Word)
func subVV_g(z, x, y *Word, n int) (c Word) {
for i := 0; i < n; i++ {
c, *z.at(i) = subWW_g(*x.at(i), *y.at(i), c);
c, *z.at(i) = subWW_g(*x.at(i), *y.at(i), c)
}
return;
}
......@@ -341,7 +341,7 @@ func addVW_s(z, x *Word, y Word, n int) (c Word)
func addVW_g(z, x *Word, y Word, n int) (c Word) {
c = y;
for i := 0; i < n; i++ {
c, *z.at(i) = addWW_g(*x.at(i), c, 0);
c, *z.at(i) = addWW_g(*x.at(i), c, 0)
}
return;
}
......@@ -351,7 +351,7 @@ func subVW_s(z, x *Word, y Word, n int) (c Word)
func subVW_g(z, x *Word, y Word, n int) (c Word) {
c = y;
for i := 0; i < n; i++ {
c, *z.at(i) = subWW_g(*x.at(i), c, 0);
c, *z.at(i) = subWW_g(*x.at(i), c, 0)
}
return;
}
......@@ -361,7 +361,7 @@ func mulAddVWW_s(z, x *Word, y, r Word, n int) (c Word)
func mulAddVWW_g(z, x *Word, y, r Word, n int) (c Word) {
c = r;
for i := 0; i < n; i++ {
c, *z.at(i) = mulAddWWW_g(*x.at(i), y, c);
c, *z.at(i) = mulAddWWW_g(*x.at(i), y, c)
}
return;
}
......@@ -382,7 +382,7 @@ func divWVW_s(z *Word, xn Word, x *Word, y Word, n int) (r Word)
func divWVW_g(z *Word, xn Word, x *Word, y Word, n int) (r Word) {
r = xn;
for i := n-1; i >= 0; i-- {
*z.at(i), r = divWW_g(r, *x.at(i), y);
*z.at(i), r = divWW_g(r, *x.at(i), y)
}
return;
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -25,7 +25,7 @@ func Mul128(x, y uint64) (z1, z0 uint64) {
)
if x < y {
x, y = y, x;
x, y = y, x
}
if x < B2 {
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -121,7 +121,7 @@ func TestInitDecoder(t *testing.T) {
continue;
}
if !reflect.DeepEqual(&h, &tt.out) {
t.Errorf("test %d:\nhave %v\nwant %v", i, h, tt.out);
t.Errorf("test %d:\nhave %v\nwant %v", i, h, tt.out)
}
}
}
......@@ -131,9 +131,9 @@ func TestUncompressedSource(t *testing.T) {
output := make([]byte, 1);
n, error := decoder.Read(output);
if n != 1 || error != nil {
t.Fatalf("decoder.Read() = %d, %v, want 1, nil", n, error);
t.Fatalf("decoder.Read() = %d, %v, want 1, nil", n, error)
}
if output[0] != 0x11 {
t.Errorf("output[0] = %x, want 0x11", output[0]);
t.Errorf("output[0] = %x, want 0x11", output[0])
}
}
This diff is collapsed.
This diff is collapsed.
......@@ -40,9 +40,9 @@ var reverseByte = [256]byte{
}
func reverseUint16(v uint16) uint16 {
return uint16(reverseByte[v>>8]) | uint16(reverseByte[v&0xFF])<<8;
return uint16(reverseByte[v>>8]) | uint16(reverseByte[v&0xFF])<<8
}
func reverseBits(number uint16, bitLength byte) uint16 {
return reverseUint16(number<<uint8(16 - bitLength));
return reverseUint16(number<<uint8(16 - bitLength))
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment