]> Cypherpunks repositories - gostls13.git/commitdiff
gofmt -w misc
authorRobert Griesemer <gri@golang.org>
Fri, 6 Nov 2009 07:18:06 +0000 (23:18 -0800)
committerRobert Griesemer <gri@golang.org>
Fri, 6 Nov 2009 07:18:06 +0000 (23:18 -0800)
R=rsc
http://go/go-review/1025004

misc/cgo/gmp/gmp.go
misc/cgo/gmp/pi.go
misc/cgo/stdio/file.go
misc/cgo/stdio/hello.go

index a31f7407cd014be2b13d8751fc078017eaabbcbf..d26bb4a73e9b17d55fcea4e9ac22c2c23b6b9fa3 100644 (file)
@@ -115,8 +115,8 @@ import (
 // An Int represents a signed multi-precision integer.
 // The zero value for an Int represents the value 0.
 type Int struct {
-       i C.mpz_t;
-       init bool;
+       i       C.mpz_t;
+       init    bool;
 }
 
 // NewInt returns a new Int initialized to x.
@@ -140,7 +140,7 @@ func (z *Int) doinit() {
 
 // Bytes returns z's representation as a big-endian byte array.
 func (z *Int) Bytes() []byte {
-       b := make([]byte, (z.Len() + 7) / 8);
+       b := make([]byte, (z.Len() + 7)/8);
        n := C.size_t(len(b));
        C.mpz_export(unsafe.Pointer(&b[0]), &n, 1, 1, 1, 0, &z.i[0]);
        return b[0:n];
index d22bbc653de603a56401914d12409aad338ab45d..b03fa2c1121996ec2fe4c874fe1620bd0a428a54 100644 (file)
@@ -44,12 +44,12 @@ import (
 )
 
 var (
-       tmp1 = big.NewInt(0);
-       tmp2 = big.NewInt(0);
-       numer = big.NewInt(1);
-       accum = big.NewInt(0);
-       denom = big.NewInt(1);
-       ten = big.NewInt(10);
+       tmp1    = big.NewInt(0);
+       tmp2    = big.NewInt(0);
+       numer   = big.NewInt(1);
+       accum   = big.NewInt(0);
+       denom   = big.NewInt(1);
+       ten     = big.NewInt(10);
 )
 
 func extractDigit() int64 {
@@ -90,7 +90,7 @@ func main() {
                        d = extractDigit();
                }
                eliminateDigit(d);
-               fmt.Printf("%c", d + '0');
+               fmt.Printf("%c", d+'0');
 
                if i++; i%50 == 0 {
                        fmt.Printf("\n");
index 7935f8f4db2d135fa33defbe268cf1eba40b4a46..c8493a0e38e1028b4873fac51881f0c234975474 100644 (file)
@@ -40,4 +40,3 @@ func Puts(s string) {
        C.free(unsafe.Pointer(p));
        C.fflushstdout();
 }
-
index 8809c9a9cb275bfccf01bcdd9651ebe6bbfe3b7d..c2555d008614d8a8743c5d3f6b93752354c2e7f0 100644 (file)
@@ -7,6 +7,6 @@ package main
 import "stdio"
 
 func main() {
-//     stdio.Stdout.WriteString("hello, world\n");
+       //      stdio.Stdout.WriteString("hello, world\n");
        stdio.Puts("hello, world");
 }