[gofmt
strick**20110515015029
 Ignore-this: d0f537c6afc4fcc33d500ca71e005c06
] hunk ./gobak.go 14
-  println("Creat: " + filename)
-  z, err := os.Create(filename)
-  if err != nil {panic(err)}
-  return bufio.NewWriter(z)
+	println("Creat: " + filename)
+	z, err := os.Create(filename)
+	if err != nil {
+		panic(err)
+	}
+	return bufio.NewWriter(z)
hunk ./gobak.go 23
-func Skidify(s string) string {return NonIdent.ReplaceAllString(s, "_")}
-func Fmt(s string, aa... interface{}) string {return fmt.Sprintf(s, aa...)}
+
+func Skidify(s string) string                { return NonIdent.ReplaceAllString(s, "_") }
+func Fmt(s string, aa ...interface{}) string { return fmt.Sprintf(s, aa...) }
hunk ./gobak.go 28
-  Up *BScope
-  Gs *ast.Scope   // go Scope map
-  Cmap map[string]string      // lookup C name
+	Up   *BScope
+	Gs   *ast.Scope        // go Scope map
+	Cmap map[string]string // lookup C name
hunk ./gobak.go 34
-  return &BScope{Up: up, Gs: gs, Cmap: make(map[string]string, 4)}
+	return &BScope{Up: up, Gs: gs, Cmap: make(map[string]string, 4)}
hunk ./gobak.go 38
-  bs = p
-  for bs != nil{
-    _, ok := bs.Gs.Objects[k]
-    if ok {
-      cname, _ = bs.Cmap[k]
-      return 
-    }
-    bs = bs.Up
-  }
-  panic("cannot Lookup: " + k)
-  return
+	bs = p
+	for bs != nil {
+		_, ok := bs.Gs.Objects[k]
+		if ok {
+			cname, _ = bs.Cmap[k]
+			return
+		}
+		bs = bs.Up
+	}
+	panic("cannot Lookup: " + k)
+	return
hunk ./gobak.go 52
-  return Fmt("BScope(%#v) ", p.Cmap)
+	return Fmt("BScope(%#v) ", p.Cmap)
hunk ./gobak.go 56
-	cw	*bufio.Writer
-	hw	*bufio.Writer
-	iw	*bufio.Writer
-	jw	*bufio.Writer
-	c	func(f string, aa... interface{})
-	h	func(f string, aa... interface{})
-	i	func(f string, aa... interface{})
-	j	func(f string, aa... interface{})
-	file	*ast.File
-	fset	*token.FileSet
-	indent	int
-	Top	*BScope
-	Builtin	*BScope
+	cw      *bufio.Writer
+	hw      *bufio.Writer
+	iw      *bufio.Writer
+	jw      *bufio.Writer
+	c       func(f string, aa ...interface{})
+	h       func(f string, aa ...interface{})
+	i       func(f string, aa ...interface{})
+	j       func(f string, aa ...interface{})
+	file    *ast.File
+	fset    *token.FileSet
+	indent  int
+	Top     *BScope
+	Builtin *BScope
hunk ./gobak.go 70
+
hunk ./gobak.go 72
-  z := &Bak{
-      file: file,
-      fset: fset,
-      cw: Creat("__."+file.Name.Name+".gobak.cc"),
-      hw: Creat("__."+file.Name.Name+".gobak.h"),
-      iw: Creat("__."+file.Name.Name+".gobak.i"),
-      jw: Creat("__."+file.Name.Name+".gobak.j"),
-  }
-  z.c = func(f string, aa... interface{}) {z.WriteSmartCw(f, aa...)}
-  z.h = func(f string, aa... interface{}) {z.hw.WriteString(fmt.Sprintf(f+"\n", aa...))}
-  z.i = func(f string, aa... interface{}) {z.iw.WriteString(fmt.Sprintf(f+"\n", aa...))}
-  z.j = func(f string, aa... interface{}) {z.jw.WriteString(fmt.Sprintf(f+"\n", aa...))}
-  builtinScope := ast.NewScope(nil)
-  builtinScope.Objects = types.Universe.Objects
-  z.Builtin = NewBScope(nil, builtinScope)
-  z.Top = NewBScope(z.Builtin, z.file.Scope)
-  return z
+	z := &Bak{
+		file: file,
+		fset: fset,
+		cw:   Creat("__." + file.Name.Name + ".gobak.cc"),
+		hw:   Creat("__." + file.Name.Name + ".gobak.h"),
+		iw:   Creat("__." + file.Name.Name + ".gobak.i"),
+		jw:   Creat("__." + file.Name.Name + ".gobak.j"),
+	}
+	z.c = func(f string, aa ...interface{}) { z.WriteSmartCw(f, aa...) }
+	z.h = func(f string, aa ...interface{}) { z.hw.WriteString(fmt.Sprintf(f+"\n", aa...)) }
+	z.i = func(f string, aa ...interface{}) { z.iw.WriteString(fmt.Sprintf(f+"\n", aa...)) }
+	z.j = func(f string, aa ...interface{}) { z.jw.WriteString(fmt.Sprintf(f+"\n", aa...)) }
+	builtinScope := ast.NewScope(nil)
+	builtinScope.Objects = types.Universe.Objects
+	z.Builtin = NewBScope(nil, builtinScope)
+	z.Top = NewBScope(z.Builtin, z.file.Scope)
+	return z
hunk ./gobak.go 91
-  for i := 0; i < b.indent; i++ {
-    s = "    " + s
-  }
-  b.cw.WriteString(s)
+	for i := 0; i < b.indent; i++ {
+		s = "    " + s
+	}
+	b.cw.WriteString(s)
hunk ./gobak.go 97
-func (b *Bak) WriteSmartCw(f string, aa... interface{}) {
-  s := Fmt(f+"\n", aa...)
+func (b *Bak) WriteSmartCw(f string, aa ...interface{}) {
+	s := Fmt(f+"\n", aa...)
hunk ./gobak.go 100
-  if len(s)>2 && s[0]=='/' && s[1]=='/' {
-    // It's a comment
-  } else if len(s)>1 && s[len(s)-2]=='{' && s[0] == '}' {
-    b.indent --
-    b.WriteIndentedCw(s)
-    b.indent ++
-  } else if len(s)>1 && s[len(s)-2]=='{' {
-    b.WriteIndentedCw(s)
-    b.indent ++
-  } else if len(s)>1 && s[0] == '}' {
-    b.indent --
-    b.WriteIndentedCw(s)
-  } else {
-    b.WriteIndentedCw(s)
-  }  
+	if len(s) > 2 && s[0] == '/' && s[1] == '/' {
+		// It's a comment
+	} else if len(s) > 1 && s[len(s)-2] == '{' && s[0] == '}' {
+		b.indent--
+		b.WriteIndentedCw(s)
+		b.indent++
+	} else if len(s) > 1 && s[len(s)-2] == '{' {
+		b.WriteIndentedCw(s)
+		b.indent++
+	} else if len(s) > 1 && s[0] == '}' {
+		b.indent--
+		b.WriteIndentedCw(s)
+	} else {
+		b.WriteIndentedCw(s)
+	}
hunk ./gobak.go 117
-  return b.MangleObj(i.Obj)
+	return b.MangleObj(i.Obj)
hunk ./gobak.go 120
-  for k, v := range types.Universe.Objects {
-    if v == obj { return k + "_Go" }
-  }
-  for _, v := range b.file.Scope.Objects {
-    if v == obj {
-      return Fmt("%s__%s", b.file.Name.Name, obj.Name)
-    }
-  }
-  return Fmt("%s_", obj.Name)  // Just add _ to avoid C reserved words.
+	for k, v := range types.Universe.Objects {
+		if v == obj {
+			return k + "_Go"
+		}
+	}
+	for _, v := range b.file.Scope.Objects {
+		if v == obj {
+			return Fmt("%s__%s", b.file.Name.Name, obj.Name)
+		}
+	}
+	return Fmt("%s_", obj.Name) // Just add _ to avoid C reserved words.
hunk ./gobak.go 133
-  guard := Skidify(b.file.Name.Name+".gobak.h")
-  b.h(`#include <stdio.h>`)
-  b.h(`#include "gobak_rt.h"`)
-  b.h(`#ifndef %s`, guard)
-  b.h(`#define %s`, guard)
-  b.c(`#include "%s"`, "__."+b.file.Name.Name+".gobak.h")
-  b.c(`#include "%s"`, "__."+b.file.Name.Name+".gobak.i")
-  b.j(`void main__init() {`);
+	guard := Skidify(b.file.Name.Name + ".gobak.h")
+	b.h(`#include <stdio.h>`)
+	b.h(`#include "gobak_rt.h"`)
+	b.h(`#ifndef %s`, guard)
+	b.h(`#define %s`, guard)
+	b.c(`#include "%s"`, "__."+b.file.Name.Name+".gobak.h")
+	b.c(`#include "%s"`, "__."+b.file.Name.Name+".gobak.i")
+	b.j(`void main__init() {`)
hunk ./gobak.go 142
-  b.Top = NewBScope(nil, b.file.Scope)
-  for k, v := range b.file.Scope.Objects {
-    b.Top.Cmap[k] = b.MangleObj(v)
-  }
-  println("TOP SCOPE: " + b.Top.String())
+	b.Top = NewBScope(nil, b.file.Scope)
+	for k, v := range b.file.Scope.Objects {
+		b.Top.Cmap[k] = b.MangleObj(v)
+	}
+	println("TOP SCOPE: " + b.Top.String())
hunk ./gobak.go 149
-  guard := Skidify(b.file.Name.Name+".gobak.h")
-  b.c(`#include "%s"`, "__."+b.file.Name.Name+".gobak.j")
-  b.h(`#endif  // %s`, guard)
-  b.j(`}  // end main__init()`);
-  b.cw.Flush();
-  b.hw.Flush();
-  b.iw.Flush();
-  b.jw.Flush();
+	guard := Skidify(b.file.Name.Name + ".gobak.h")
+	b.c(`#include "%s"`, "__."+b.file.Name.Name+".gobak.j")
+	b.h(`#endif  // %s`, guard)
+	b.j(`}  // end main__init()`)
+	b.cw.Flush()
+	b.hw.Flush()
+	b.iw.Flush()
+	b.jw.Flush()
hunk ./gobak.go 159
-  b.Init()
-  decls := b.file.Decls
-  for i, decl := range decls {
-    Say("Decl", i, decl)
-    switch d := decl.(type) {
-      case *ast.FuncDecl: b.doFuncDecl(d)
-        
-      case *ast.GenDecl: b.doGenDecl(d)
+	b.Init()
+	decls := b.file.Decls
+	for i, decl := range decls {
+		Say("Decl", i, decl)
+		switch d := decl.(type) {
+		case *ast.FuncDecl:
+			b.doFuncDecl(d)
+
+		case *ast.GenDecl:
+			b.doGenDecl(d)
hunk ./gobak.go 170
-      default:
-        Say("TODO", decl)
-    }
+		default:
+			Say("TODO", decl)
+		}
hunk ./gobak.go 174
-  }
+	}
hunk ./gobak.go 177
-  Say("TODO: doGenDecl");
-  for i, x := range decl.Specs {
-    Say(i, x)
-    switch xx := x.(type) {
-      case *ast.ValueSpec:
-        b.doValueSpec(xx)
-      default:
-        Say("TODO", x)
-        panic(x)
-    }
-  }
+	Say("TODO: doGenDecl")
+	for i, x := range decl.Specs {
+		Say(i, x)
+		switch xx := x.(type) {
+		case *ast.ValueSpec:
+			b.doValueSpec(xx)
+		default:
+			Say("TODO", x)
+			panic(x)
+		}
+	}
hunk ./gobak.go 190
-  Say("doValueSpec: Type", p.Type)
-  for i, x := range p.Names {
-    Say("doValueSpec: Names !", i, x)
-  }
-  for i, x := range p.Values {
-    Say("doValueSpec: Values !", i, x)
-  }
-  Say(p)
+	Say("doValueSpec: Type", p.Type)
+	for i, x := range p.Names {
+		Say("doValueSpec: Names !", i, x)
+	}
+	for i, x := range p.Values {
+		Say("doValueSpec: Values !", i, x)
+	}
+	Say(p)
hunk ./gobak.go 199
-  if p.Type == nil {
-    // TODO const
-    panic(0)
-  }
+	if p.Type == nil {
+		// TODO const
+		panic(0)
+	}
hunk ./gobak.go 204
-  // do var
-  for i, name := range p.Names {
-    // TODO: this BScope thing needs to handle consts, types, imports?...
-    cname := b.Mangle(name)
-    ctype := b.Mangle(p.Type.(*ast.Ident))
-    b.h("extern %s %s;", ctype, cname);
-    b.i("%s %s;", ctype, cname);
-    b.j("%s = %s;", cname, b.doExpr(p.Values[i]));
-  }
+	// do var
+	for i, name := range p.Names {
+		// TODO: this BScope thing needs to handle consts, types, imports?...
+		cname := b.Mangle(name)
+		ctype := b.Mangle(p.Type.(*ast.Ident))
+		b.h("extern %s %s;", ctype, cname)
+		b.i("%s %s;", ctype, cname)
+		b.j("%s = %s;", cname, b.doExpr(p.Values[i]))
+	}
hunk ./gobak.go 215
-  Say("doFuncDecl", d)
-  Say("Doc", d.Doc)
-  name := d.Name.Name
-  ttype := d.Type
-  body := d.Body
-  Say("name", name)
-  Say("ttype", ttype)
-  Say("body", body)
-  params := d.Type.Params
-  results := d.Type.Results
-  stmts := d.Body.List
-  Say("params", params)
-  Say("results", results)
-  Say("stmts", stmts)
+	Say("doFuncDecl", d)
+	Say("Doc", d.Doc)
+	name := d.Name.Name
+	ttype := d.Type
+	body := d.Body
+	Say("name", name)
+	Say("ttype", ttype)
+	Say("body", body)
+	params := d.Type.Params
+	results := d.Type.Results
+	stmts := d.Body.List
+	Say("params", params)
+	Say("results", results)
+	Say("stmts", stmts)
hunk ./gobak.go 230
-  ret_t := "void"
-  if results != nil {
-    // The *last* Go result is the C function return value.
-    nr := len(results.List)
-    // There may be more than on ename, but we only do this for the *last* one.
-    ret_t = b.Mangle(results.List[nr-1].Type.(*ast.Ident))
-  }
+	ret_t := "void"
+	if results != nil {
+		// The *last* Go result is the C function return value.
+		nr := len(results.List)
+		// There may be more than on ename, but we only do this for the *last* one.
+		ret_t = b.Mangle(results.List[nr-1].Type.(*ast.Ident))
+	}
hunk ./gobak.go 238
-  Say(params)
+	Say(params)
hunk ./gobak.go 240
-  p_list := b.MangledFuncParams(params, results)
-  b.h("%s %s(%s);", ret_t, b.Mangle(d.Name), p_list)
-  b.c("")
-  b.c("")
-  b.c("%s %s(%s) {", ret_t, b.Mangle(d.Name), p_list)
-  for _, x := range stmts {
-    b.doStmt(x)
-    b.c("")
-  }
-  b.c("}  //  end %s()", b.Mangle(d.Name))
+	p_list := b.MangledFuncParams(params, results)
+	b.h("%s %s(%s);", ret_t, b.Mangle(d.Name), p_list)
+	b.c("")
+	b.c("")
+	b.c("%s %s(%s) {", ret_t, b.Mangle(d.Name), p_list)
+	for _, x := range stmts {
+		b.doStmt(x)
+		b.c("")
+	}
+	b.c("}  //  end %s()", b.Mangle(d.Name))
hunk ./gobak.go 253
-func Gen(prefix string) string { 
-  nextGen ++
-  return Fmt("%s_%d", prefix, nextGen)
+
+func Gen(prefix string) string {
+	nextGen++
+	return Fmt("%s_%d", prefix, nextGen)
hunk ./gobak.go 260
-  b.c("//==stmt// %#v", stmt)
-  if stmt == nil {return}
-  switch x := stmt.(type) {
-    case *ast.ExprStmt:
-      b.c(b.doExpr(x.X) + ";")
-    case *ast.ReturnStmt:
-      z := ""
-      for i, y := range x.Results {
-	if i < len(x.Results) - 1 {
-	  // if not the last one, set the C out argument.
-	  z += Fmt(" *_r_%d = ", i+1)
+	b.c("//==stmt// %#v", stmt)
+	if stmt == nil {
+		return
hunk ./gobak.go 264
-        z += Fmt(" (%s),", b.doExpr(y))
-      }
-      z = Chomp(z, ',')
-      b.c(`return %s;`, z)
-    case *ast.BlockStmt:
-      for _, y := range x.List {
-        b.doStmt(y);
-      }
-    case *ast.IfStmt:
-      b.doStmt(x.Init);
-      b.c("if (%s) {", b.doExpr(x.Cond))
-      b.doStmt(x.Body);
-      b.c("} else {")
-      b.doStmt(x.Else);
-      b.c("}  // end if")
-    case *ast.ForStmt:
-      b.doStmt(x.Init);
-      b.c("while (%s) {", b.doExpr(x.Cond))
-      b.doStmt(x.Body);
-      b.c("post:");
-      b.doStmt(x.Post);
-      b.c("}  // end while")
-    case *ast.IncDecStmt:
-      b.c("%s %s;", b.doExpr(x.X), x.Tok);
+	switch x := stmt.(type) {
+	case *ast.ExprStmt:
+		b.c(b.doExpr(x.X) + ";")
+	case *ast.ReturnStmt:
+		z := ""
+		for i, y := range x.Results {
+			if i < len(x.Results)-1 {
+				// if not the last one, set the C out argument.
+				z += Fmt(" *_r_%d = ", i+1)
+			}
+			z += Fmt(" (%s),", b.doExpr(y))
+		}
+		z = Chomp(z, ',')
+		b.c(`return %s;`, z)
+	case *ast.BlockStmt:
+		for _, y := range x.List {
+			b.doStmt(y)
+		}
+	case *ast.IfStmt:
+		b.doStmt(x.Init)
+		b.c("if (%s) {", b.doExpr(x.Cond))
+		b.doStmt(x.Body)
+		b.c("} else {")
+		b.doStmt(x.Else)
+		b.c("}  // end if")
+	case *ast.ForStmt:
+		b.doStmt(x.Init)
+		b.c("while (%s) {", b.doExpr(x.Cond))
+		b.doStmt(x.Body)
+		b.c("post:")
+		b.doStmt(x.Post)
+		b.c("}  // end while")
+	case *ast.IncDecStmt:
+		b.c("%s %s;", b.doExpr(x.X), x.Tok)
hunk ./gobak.go 299
-    case *ast.AssignStmt:
-      for k_, v_ := range x.Lhs {
-        b.c("//LHS[%d]: %#v", k_, v_)
-      }
-      for k_, v_ := range x.Rhs {
-        b.c("//RHS[%d]: %#v", k_, v_)
-      }
+	case *ast.AssignStmt:
+		for k_, v_ := range x.Lhs {
+			b.c("//LHS[%d]: %#v", k_, v_)
+		}
+		for k_, v_ := range x.Rhs {
+			b.c("//RHS[%d]: %#v", k_, v_)
+		}
hunk ./gobak.go 307
-      if x.Tok == 47 {  // ":="
-        for _, l := range x.Lhs {
-          b.c("int %s = 0;", b.Mangle(l.(*ast.Ident)))
-        }
-      }
+		if x.Tok == 47 { // ":="
+			for _, l := range x.Lhs {
+				b.c("int %s = 0;", b.Mangle(l.(*ast.Ident)))
+			}
+		}
hunk ./gobak.go 313
-      // Temp place to hold multi-return results.
-      temp := make([]string, len(x.Lhs))
-      if len(x.Lhs) > 1 {
-        for i, lhs := range x.Lhs {
-	  temp[i] = Gen("lhs");
-	  // Declare vars and init them.
-	  b.c("%s %s = 0;", CTypeOfIdent(lhs.(*ast.Ident)), temp[i])
-	}
+		// Temp place to hold multi-return results.
+		temp := make([]string, len(x.Lhs))
+		if len(x.Lhs) > 1 {
+			for i, lhs := range x.Lhs {
+				temp[i] = Gen("lhs")
+				// Declare vars and init them.
+				b.c("%s %s = 0;", CTypeOfIdent(lhs.(*ast.Ident)), temp[i])
+			}
hunk ./gobak.go 322
-	if len(x.Rhs) == len(x.Lhs) {
-	  // Pairwise assignments.
-          for i, r := range x.Rhs {
-            rhs := b.doExpr(r)
-	    b.c("%s = (%s);", temp[i], rhs)
-	  }
-          for i, l := range x.Lhs {
-            lhs := b.doExpr(l)
-	    b.c("%s = (%s);", lhs, temp[i])
-	  }
-	} else if len(x.Rhs) == 1 {
-	  // Many lhs, One rhs:  must be function call on rhs.
-	  switch rhx := x.Rhs[0].(type) {
-	    case *ast.CallExpr:
-	      b.c("%s = %s;", temp[len(temp)-1], b.doCallExpr(rhx, temp))
-	    default:
-	      Say(rhx);
-	      panic(rhx);
-	  }
-          for i, l := range x.Lhs {
-            lhs := b.doExpr(l)
-	    b.c("%s = (%s);", lhs, temp[i])
-	  }
+			if len(x.Rhs) == len(x.Lhs) {
+				// Pairwise assignments.
+				for i, r := range x.Rhs {
+					rhs := b.doExpr(r)
+					b.c("%s = (%s);", temp[i], rhs)
+				}
+				for i, l := range x.Lhs {
+					lhs := b.doExpr(l)
+					b.c("%s = (%s);", lhs, temp[i])
+				}
+			} else if len(x.Rhs) == 1 {
+				// Many lhs, One rhs:  must be function call on rhs.
+				switch rhx := x.Rhs[0].(type) {
+				case *ast.CallExpr:
+					b.c("%s = %s;", temp[len(temp)-1], b.doCallExpr(rhx, temp))
+				default:
+					Say(rhx)
+					panic(rhx)
+				}
+				for i, l := range x.Lhs {
+					lhs := b.doExpr(l)
+					b.c("%s = (%s);", lhs, temp[i])
+				}
hunk ./gobak.go 346
-	} else {
-	  panic(Fmt("len(lhs)=%d len(rhs)=%d", len(x.Lhs), len(x.Rhs)))
-	}
-      } else if len(x.Rhs) == 1 {
-        lhs := b.doExpr(x.Lhs[0])
-        rhs := b.doExpr(x.Rhs[0])
-        b.c("(%s) = (%s);", lhs, rhs)
-      } else {
-        panic(Fmt("len(lhs)=%d len(rhs)=%d", len(x.Lhs), len(x.Rhs)))
-      }
+			} else {
+				panic(Fmt("len(lhs)=%d len(rhs)=%d", len(x.Lhs), len(x.Rhs)))
+			}
+		} else if len(x.Rhs) == 1 {
+			lhs := b.doExpr(x.Lhs[0])
+			rhs := b.doExpr(x.Rhs[0])
+			b.c("(%s) = (%s);", lhs, rhs)
+		} else {
+			panic(Fmt("len(lhs)=%d len(rhs)=%d", len(x.Lhs), len(x.Rhs)))
+		}
hunk ./gobak.go 357
-      
-/*
-      for i, _ := range x.Lhs {
-        lhs := b.doExpr(x.Lhs[i])
-        rhs := b.doExpr(x.Rhs[i])
-	if x.Tok == 47 {  // ":="
-	  switch lhx := x.Lhs[i].(type) {
-	    case *ast.Ident:
-	      switch rhx := x.Rhs[i].(type) {
-	        case *ast.BasicLit:
-		  switch rhx.Kind {
-		    case token.INT:
-	              b.c("int_Go %s = 0;", lhs)
-		  }
-	      }
-	  }
+		/*
+		      for i, _ := range x.Lhs {
+		        lhs := b.doExpr(x.Lhs[i])
+		        rhs := b.doExpr(x.Rhs[i])
+			if x.Tok == 47 {  // ":="
+			  switch lhx := x.Lhs[i].(type) {
+			    case *ast.Ident:
+			      switch rhx := x.Rhs[i].(type) {
+			        case *ast.BasicLit:
+				  switch rhx.Kind {
+				    case token.INT:
+			              b.c("int_Go %s = 0;", lhs)
+				  }
+			      }
+			  }
+			}
+		        b.c("(%s) = (%s);", lhs, rhs)
+		      }
+		*/
+	default:
+		b.c("STATEMENT ???<%#v>??? ", stmt)
hunk ./gobak.go 379
-        b.c("(%s) = (%s);", lhs, rhs)
-      }
-*/
-    default:
-      b.c("STATEMENT ???<%#v>??? ", stmt)
-  }
hunk ./gobak.go 381
-  switch kind := id.Obj.Kind ; kind {
-    default:
-      Say(id.Obj)
-      return "int"
-  }
-  return "int"
+	switch kind := id.Obj.Kind; kind {
+	default:
+		Say(id.Obj)
+		return "int"
+	}
+	return "int"
hunk ./gobak.go 390
-      b.c("//==::::: %#v", x.Fun)
-      b.c("//==::::: %#v", x.Args)
-      funStr := b.doExpr(x.Fun)
-      argsStr := ""
-      for _, y := range x.Args {
-        argsStr += b.doExpr(y) + ","
-      }
-      for i, t := range temp {
-        if i < len(temp)-1 {
-          argsStr += Fmt(" &%s,", t)
+	b.c("//==::::: %#v", x.Fun)
+	b.c("//==::::: %#v", x.Args)
+	funStr := b.doExpr(x.Fun)
+	argsStr := ""
+	for _, y := range x.Args {
+		argsStr += b.doExpr(y) + ","
hunk ./gobak.go 397
-      }
-      argsStr = Chomp(argsStr, ',')
-      b.c("//==::::: %#v", funStr)
-      return Fmt(`(%s)(%s)`, funStr, argsStr)
+	for i, t := range temp {
+		if i < len(temp)-1 {
+			argsStr += Fmt(" &%s,", t)
+		}
+	}
+	argsStr = Chomp(argsStr, ',')
+	b.c("//==::::: %#v", funStr)
+	return Fmt(`(%s)(%s)`, funStr, argsStr)
hunk ./gobak.go 409
-  b.c("//==expr: %#v", expr)
-  switch x := expr.(type) {
-    case *ast.CallExpr:
-      return b.doCallExpr(x, nil)
-    case *ast.Ident:
-      return b.Mangle(x)
-    case *ast.BasicLit:
-      return x.Value
-    case *ast.BinaryExpr:
-      xx := b.doExpr(x.X)
-      yy := b.doExpr(x.Y)
-      return Fmt(`(%s)%s(%s)`, xx, x.Op, yy)
-  }
-  return Fmt(" ???<%#v>??? ", expr)
+	b.c("//==expr: %#v", expr)
+	switch x := expr.(type) {
+	case *ast.CallExpr:
+		return b.doCallExpr(x, nil)
+	case *ast.Ident:
+		return b.Mangle(x)
+	case *ast.BasicLit:
+		return x.Value
+	case *ast.BinaryExpr:
+		xx := b.doExpr(x.X)
+		yy := b.doExpr(x.Y)
+		return Fmt(`(%s)%s(%s)`, xx, x.Op, yy)
+	}
+	return Fmt(" ???<%#v>??? ", expr)
hunk ./gobak.go 426
-  z := ""
-  if params != nil {
-	  for _, p := range params.List {
-	    names := p.Names
-	    if names == nil {
-	      z += b.MangleTypeOfField(p) + " "
-	      z += "_" + ","  // TODO -- does anonymous happen?
-	    } else {
-	      for _, name := range names {
-		z += b.MangleTypeOfField(p) + " "
-		z += b.Mangle(name) + ","
-	      }
-	    }
-	  }
-  }
-  if results != nil {
-          n := 1
-	  for i, p := range results.List {
-	    names := p.Names
-	    if names == nil {
-	      if i == len(results.List) - 1 {
-		break  // Don't do the last one, it's the C return value.
-	      }
-              z += Fmt("%s* _r_%d,", b.MangleTypeOfField(p), n)
-	      n ++
-	    } else {
-	      for j, name := range names {
-		if i == len(results.List) - 1 && j == len(names) - 1 {
-		  break  // Don't do the last one, it's the C return value.
+	z := ""
+	if params != nil {
+		for _, p := range params.List {
+			names := p.Names
+			if names == nil {
+				z += b.MangleTypeOfField(p) + " "
+				z += "_" + "," // TODO -- does anonymous happen?
+			} else {
+				for _, name := range names {
+					z += b.MangleTypeOfField(p) + " "
+					z += b.Mangle(name) + ","
+				}
+			}
hunk ./gobak.go 440
-		// TODO: support setting return values by name.
-                z += Fmt("%s* /*%s*/ _r_%d,", b.MangleTypeOfField(p), name, n)
-	        n ++
-	      }
-	    }
-	  }
-  }
-  return Chomp(z, ',')
+	}
+	if results != nil {
+		n := 1
+		for i, p := range results.List {
+			names := p.Names
+			if names == nil {
+				if i == len(results.List)-1 {
+					break // Don't do the last one, it's the C return value.
+				}
+				z += Fmt("%s* _r_%d,", b.MangleTypeOfField(p), n)
+				n++
+			} else {
+				for j, name := range names {
+					if i == len(results.List)-1 && j == len(names)-1 {
+						break // Don't do the last one, it's the C return value.
+					}
+					// TODO: support setting return values by name.
+					z += Fmt("%s* /*%s*/ _r_%d,", b.MangleTypeOfField(p), name, n)
+					n++
+				}
+			}
+		}
+	}
+	return Chomp(z, ',')
hunk ./gobak.go 466
-  slen := len(s)
-  if slen > 1 && s[slen-1] == c { s = s[:slen-1] } // chomp final c
-  return s
+	slen := len(s)
+	if slen > 1 && s[slen-1] == c {
+		s = s[:slen-1]
+	} // chomp final c
+	return s
hunk ./gobak.go 474
-  z := "void"
-  if f != nil {
-    z = b.Mangle(f.Type.(*ast.Ident))
-  }
-  return z
+	z := "void"
+	if f != nil {
+		z = b.Mangle(f.Type.(*ast.Ident))
+	}
+	return z
hunk ./gobak.go 481
-        flag.Parse()
-        fset := token.NewFileSet()
-        files := make(map[string]*ast.File)
+	flag.Parse()
+	fset := token.NewFileSet()
+	files := make(map[string]*ast.File)
hunk ./gobak.go 485
-        for _, filename := range flag.Args() {
+	for _, filename := range flag.Args() {
hunk ./gobak.go 487
-                tree, err := parser.ParseFile(fset, filename, nil, 0)
-                if err != nil {
-                        panic(err)
-                }
-                //
-                   println("## Universe");
-                   for k, v := range types.Universe.Objects {
-                     println("k=", k, "  v=", v)
-                   }
-                   println("## Unsafe");
-                   for k, v := range types.Unsafe.Objects {
-                     println("k=", k, "  v=", v)
-                   }
-                //
-                println("#####################################")
-                importer := types.GcImporter
-                univ := types.Universe
+		tree, err := parser.ParseFile(fset, filename, nil, 0)
+		if err != nil {
+			panic(err)
+		}
+		//
+		println("## Universe")
+		for k, v := range types.Universe.Objects {
+			println("k=", k, "  v=", v)
+		}
+		println("## Unsafe")
+		for k, v := range types.Unsafe.Objects {
+			println("k=", k, "  v=", v)
+		}
+		//
+		println("#####################################")
+		importer := types.GcImporter
+		univ := types.Universe
hunk ./gobak.go 505
-                files[filename] = tree
-                pkg, err := ast.NewPackage(fset, files, importer, univ)
-                if err != nil {
-                        panic(err)
-                }
-                _ = pkg
+		files[filename] = tree
+		pkg, err := ast.NewPackage(fset, files, importer, univ)
+		if err != nil {
+			panic(err)
+		}
+		_ = pkg
hunk ./gobak.go 512
-                //n, err := ast.Fprint(os.Stdout, fset, tree, nil)
-                //println("n=", n)
-        }
+		//n, err := ast.Fprint(os.Stdout, fset, tree, nil)
+		//println("n=", n)
+	}
hunk ./gobak.go 516
-        for name, tree := range files {
-                println("#####################################")
-                println("#######################")
-                println("#######################   ", name)
-                println("#######################")
-                n, err := ast.Fprint(os.Stdout, fset, tree, nil)
-                if err != nil {
-                        panic(err)
-                }
-                println("n=", n)
-                println("")
+	for name, tree := range files {
+		println("#####################################")
+		println("#######################")
+		println("#######################   ", name)
+		println("#######################")
+		n, err := ast.Fprint(os.Stdout, fset, tree, nil)
+		if err != nil {
+			panic(err)
+		}
+		println("n=", n)
+		println("")
hunk ./gobak.go 530
-        }
+	}
hunk ./gobak.go 532
-func Say(a... interface{}) {
-  for _, x := range a {
-    print(fmt.Sprintf(" %#v =====", x))
-  }
+func Say(a ...interface{}) {
+	for _, x := range a {
+		print(fmt.Sprintf(" %#v =====", x))
+	}
hunk ./test1.go 8
-  if x < 1 {return 0}
-  return x + tri(x-1)
+	if x < 1 {
+		return 0
+	}
+	return x + tri(x-1)
hunk ./test1.go 15
-  if x < 1 {return 1}
-  return x * factorial(x-1)
+	if x < 1 {
+		return 1
+	}
+	return x * factorial(x-1)
hunk ./test1.go 22
-  if x < 1 {return 1}
-  return x * floating_factorial(x-1)
+	if x < 1 {
+		return 1
+	}
+	return x * floating_factorial(x-1)
hunk ./test1.go 29
-  if x < 2 {return 1}
-  return fib(x-2) + fib(x-1)
+	if x < 2 {
+		return 1
+	}
+	return fib(x-2) + fib(x-1)
hunk ./test1.go 36
-  for i := 2; i < x ; i++ {
-    if x % i == 0 {
-      return i, x / i
-    }
-  }
-  return 0, 0
+	for i := 2; i < x; i++ {
+		if x%i == 0 {
+			return i, x / i
+		}
+	}
+	return 0, 0
hunk ./test1.go 45
-  println(23)
-  println(tri(5))
-  println(factorial(5))
-  println(floating_factorial(6.0))
+	println(23)
+	println(tri(5))
+	println(factorial(5))
+	println(floating_factorial(6.0))
hunk ./test1.go 50
-  // See: // case *ast.AssignStmt:: TODO NEXT:  len x.Lhs != len x.Rhs
-  a, b := factors(12)
-  println(a, b)
+	// See: // case *ast.AssignStmt:: TODO NEXT:  len x.Lhs != len x.Rhs
+	a, b := factors(12)
+	println(a, b)
hunk ./test1.go 54
-  for i := 0; i < 10 ; i++ {
-    println(i, fib(i));
-  }
+	for i := 0; i < 10; i++ {
+		println(i, fib(i))
+	}