mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
convert non-low-level non-google pkg code
to whole-package compilation. R=r OCL=33070 CL=33101
This commit is contained in:
parent
5b62b19d43
commit
b04ac108fd
166 changed files with 305 additions and 2917 deletions
|
|
@ -2,69 +2,12 @@
|
||||||
# Use of this source code is governed by a BSD-style
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
|
||||||
# DO NOT EDIT. Automatically generated by gobuild.
|
|
||||||
# gobuild -m >Makefile
|
|
||||||
|
|
||||||
D=/archive/
|
|
||||||
|
|
||||||
include $(GOROOT)/src/Make.$(GOARCH)
|
include $(GOROOT)/src/Make.$(GOARCH)
|
||||||
AR=gopack
|
|
||||||
|
|
||||||
default: packages
|
TARG=archive/tar
|
||||||
|
GOFILES=\
|
||||||
|
common.go\
|
||||||
|
reader.go\
|
||||||
|
writer.go\
|
||||||
|
|
||||||
clean:
|
include $(GOROOT)/src/Make.pkg
|
||||||
rm -rf *.[$(OS)] *.a [$(OS)].out _obj
|
|
||||||
|
|
||||||
test: packages
|
|
||||||
gotest
|
|
||||||
|
|
||||||
coverage: packages
|
|
||||||
gotest
|
|
||||||
6cov -g $$(pwd) | grep -v '_test\.go:'
|
|
||||||
|
|
||||||
%.$O: %.go
|
|
||||||
$(GC) -I_obj $*.go
|
|
||||||
|
|
||||||
%.$O: %.c
|
|
||||||
$(CC) $*.c
|
|
||||||
|
|
||||||
%.$O: %.s
|
|
||||||
$(AS) $*.s
|
|
||||||
|
|
||||||
O1=\
|
|
||||||
common.$O\
|
|
||||||
|
|
||||||
O2=\
|
|
||||||
reader.$O\
|
|
||||||
writer.$O\
|
|
||||||
|
|
||||||
|
|
||||||
phases: a1 a2
|
|
||||||
_obj$D/tar.a: phases
|
|
||||||
|
|
||||||
a1: $(O1)
|
|
||||||
$(AR) grc _obj$D/tar.a common.$O
|
|
||||||
rm -f $(O1)
|
|
||||||
|
|
||||||
a2: $(O2)
|
|
||||||
$(AR) grc _obj$D/tar.a reader.$O writer.$O
|
|
||||||
rm -f $(O2)
|
|
||||||
|
|
||||||
|
|
||||||
newpkg: clean
|
|
||||||
mkdir -p _obj$D
|
|
||||||
$(AR) grc _obj$D/tar.a
|
|
||||||
|
|
||||||
$(O1): newpkg
|
|
||||||
$(O2): a1
|
|
||||||
$(O3): a2
|
|
||||||
|
|
||||||
nuke: clean
|
|
||||||
rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/tar.a
|
|
||||||
|
|
||||||
packages: _obj$D/tar.a
|
|
||||||
|
|
||||||
install: packages
|
|
||||||
test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
|
|
||||||
cp _obj$D/tar.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/tar.a
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ package tar
|
||||||
// - pax extensions
|
// - pax extensions
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"archive/tar";
|
|
||||||
"bytes";
|
"bytes";
|
||||||
"io";
|
"io";
|
||||||
"os";
|
"os";
|
||||||
|
|
@ -25,8 +24,8 @@ var (
|
||||||
// and then it can be treated as an io.Reader to access the file's data.
|
// and then it can be treated as an io.Reader to access the file's data.
|
||||||
//
|
//
|
||||||
// Example:
|
// Example:
|
||||||
// tr := tar.NewReader(r);
|
// tr := tar.NewReader(r);
|
||||||
// for {
|
// for {
|
||||||
// hdr, err := tr.Next();
|
// hdr, err := tr.Next();
|
||||||
// if err != nil {
|
// if err != nil {
|
||||||
// // handle error
|
// // handle error
|
||||||
|
|
@ -36,7 +35,7 @@ var (
|
||||||
// break
|
// break
|
||||||
// }
|
// }
|
||||||
// io.Copy(tr, data);
|
// io.Copy(tr, data);
|
||||||
// }
|
// }
|
||||||
type Reader struct {
|
type Reader struct {
|
||||||
r io.Reader;
|
r io.Reader;
|
||||||
err os.Error;
|
err os.Error;
|
||||||
|
|
@ -44,9 +43,6 @@ type Reader struct {
|
||||||
pad int64; // amount of padding (ignored) after current file entry
|
pad int64; // amount of padding (ignored) after current file entry
|
||||||
}
|
}
|
||||||
|
|
||||||
func (tr *Reader) skipUnread()
|
|
||||||
func (tr *Reader) readHeader() *Header
|
|
||||||
|
|
||||||
// NewReader creates a new Reader reading from r.
|
// NewReader creates a new Reader reading from r.
|
||||||
func NewReader(r io.Reader) *Reader {
|
func NewReader(r io.Reader) *Reader {
|
||||||
return &Reader{ r: r }
|
return &Reader{ r: r }
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
package tar
|
package tar
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"archive/tar";
|
|
||||||
"bytes";
|
"bytes";
|
||||||
"fmt";
|
"fmt";
|
||||||
"io";
|
"io";
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ package tar
|
||||||
// - catch more errors (no first header, write after close, etc.)
|
// - catch more errors (no first header, write after close, etc.)
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"archive/tar";
|
|
||||||
"bytes";
|
"bytes";
|
||||||
"io";
|
"io";
|
||||||
"os";
|
"os";
|
||||||
|
|
@ -28,7 +27,7 @@ var (
|
||||||
// writing at most hdr.Size bytes in total.
|
// writing at most hdr.Size bytes in total.
|
||||||
//
|
//
|
||||||
// Example:
|
// Example:
|
||||||
// tw := tar.NewWriter(w);
|
// tw := tar.NewWriter(w);
|
||||||
// hdr := new(Header);
|
// hdr := new(Header);
|
||||||
// hdr.Size = length of data in bytes;
|
// hdr.Size = length of data in bytes;
|
||||||
// // populate other hdr fields as desired
|
// // populate other hdr fields as desired
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
package tar
|
package tar
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"archive/tar";
|
|
||||||
"bytes";
|
"bytes";
|
||||||
"fmt";
|
"fmt";
|
||||||
"io";
|
"io";
|
||||||
|
|
|
||||||
|
|
@ -2,60 +2,10 @@
|
||||||
# Use of this source code is governed by a BSD-style
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
|
||||||
# DO NOT EDIT. Automatically generated by gobuild.
|
|
||||||
# gobuild -m >Makefile
|
|
||||||
|
|
||||||
D=
|
|
||||||
|
|
||||||
include $(GOROOT)/src/Make.$(GOARCH)
|
include $(GOROOT)/src/Make.$(GOARCH)
|
||||||
AR=gopack
|
|
||||||
|
|
||||||
default: packages
|
TARG=base64
|
||||||
|
GOFILES=\
|
||||||
|
base64.go\
|
||||||
|
|
||||||
clean:
|
include $(GOROOT)/src/Make.pkg
|
||||||
rm -rf *.[$(OS)] *.a [$(OS)].out _obj
|
|
||||||
|
|
||||||
test: packages
|
|
||||||
gotest
|
|
||||||
|
|
||||||
coverage: packages
|
|
||||||
gotest
|
|
||||||
6cov -g $$(pwd) | grep -v '_test\.go:'
|
|
||||||
|
|
||||||
%.$O: %.go
|
|
||||||
$(GC) -I_obj $*.go
|
|
||||||
|
|
||||||
%.$O: %.c
|
|
||||||
$(CC) $*.c
|
|
||||||
|
|
||||||
%.$O: %.s
|
|
||||||
$(AS) $*.s
|
|
||||||
|
|
||||||
O1=\
|
|
||||||
base64.$O\
|
|
||||||
|
|
||||||
|
|
||||||
phases: a1
|
|
||||||
_obj$D/base64.a: phases
|
|
||||||
|
|
||||||
a1: $(O1)
|
|
||||||
$(AR) grc _obj$D/base64.a base64.$O
|
|
||||||
rm -f $(O1)
|
|
||||||
|
|
||||||
|
|
||||||
newpkg: clean
|
|
||||||
mkdir -p _obj$D
|
|
||||||
$(AR) grc _obj$D/base64.a
|
|
||||||
|
|
||||||
$(O1): newpkg
|
|
||||||
$(O2): a1
|
|
||||||
|
|
||||||
nuke: clean
|
|
||||||
rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/base64.a
|
|
||||||
|
|
||||||
packages: _obj$D/base64.a
|
|
||||||
|
|
||||||
install: packages
|
|
||||||
test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
|
|
||||||
cp _obj$D/base64.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/base64.a
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
package base64
|
package base64
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"base64";
|
|
||||||
"bytes";
|
"bytes";
|
||||||
"io";
|
"io";
|
||||||
"os";
|
"os";
|
||||||
|
|
|
||||||
|
|
@ -2,84 +2,13 @@
|
||||||
# Use of this source code is governed by a BSD-style
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
|
||||||
# DO NOT EDIT. Automatically generated by gobuild.
|
|
||||||
# gobuild -m arith.go bignum.go integer.go rational.go >Makefile
|
|
||||||
|
|
||||||
D=
|
|
||||||
|
|
||||||
include $(GOROOT)/src/Make.$(GOARCH)
|
include $(GOROOT)/src/Make.$(GOARCH)
|
||||||
AR=gopack
|
|
||||||
|
|
||||||
default: packages
|
TARG=bignum
|
||||||
|
GOFILES=\
|
||||||
|
arith.go\
|
||||||
|
bignum.go\
|
||||||
|
integer.go\
|
||||||
|
rational.go\
|
||||||
|
|
||||||
clean:
|
include $(GOROOT)/src/Make.pkg
|
||||||
rm -rf *.[$(OS)] *.a [$(OS)].out _obj
|
|
||||||
|
|
||||||
test: packages
|
|
||||||
gotest
|
|
||||||
|
|
||||||
coverage: packages
|
|
||||||
gotest
|
|
||||||
6cov -g $$(pwd) | grep -v '_test\.go:'
|
|
||||||
|
|
||||||
%.$O: %.go
|
|
||||||
$(GC) -I_obj $*.go
|
|
||||||
|
|
||||||
%.$O: %.c
|
|
||||||
$(CC) $*.c
|
|
||||||
|
|
||||||
%.$O: %.s
|
|
||||||
$(AS) $*.s
|
|
||||||
|
|
||||||
O1=\
|
|
||||||
arith.$O\
|
|
||||||
|
|
||||||
O2=\
|
|
||||||
bignum.$O\
|
|
||||||
|
|
||||||
O3=\
|
|
||||||
integer.$O\
|
|
||||||
|
|
||||||
O4=\
|
|
||||||
rational.$O\
|
|
||||||
|
|
||||||
|
|
||||||
phases: a1 a2 a3 a4
|
|
||||||
_obj$D/bignum.a: phases
|
|
||||||
|
|
||||||
a1: $(O1)
|
|
||||||
$(AR) grc _obj$D/bignum.a arith.$O
|
|
||||||
rm -f $(O1)
|
|
||||||
|
|
||||||
a2: $(O2)
|
|
||||||
$(AR) grc _obj$D/bignum.a bignum.$O
|
|
||||||
rm -f $(O2)
|
|
||||||
|
|
||||||
a3: $(O3)
|
|
||||||
$(AR) grc _obj$D/bignum.a integer.$O
|
|
||||||
rm -f $(O3)
|
|
||||||
|
|
||||||
a4: $(O4)
|
|
||||||
$(AR) grc _obj$D/bignum.a rational.$O
|
|
||||||
rm -f $(O4)
|
|
||||||
|
|
||||||
|
|
||||||
newpkg: clean
|
|
||||||
mkdir -p _obj$D
|
|
||||||
$(AR) grc _obj$D/bignum.a
|
|
||||||
|
|
||||||
$(O1): newpkg
|
|
||||||
$(O2): a1
|
|
||||||
$(O3): a2
|
|
||||||
$(O4): a3
|
|
||||||
$(O5): a4
|
|
||||||
|
|
||||||
nuke: clean
|
|
||||||
rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/bignum.a
|
|
||||||
|
|
||||||
packages: _obj$D/bignum.a
|
|
||||||
|
|
||||||
install: packages
|
|
||||||
test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
|
|
||||||
cp _obj$D/bignum.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/bignum.a
|
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@
|
||||||
package bignum
|
package bignum
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bignum";
|
|
||||||
"fmt";
|
"fmt";
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -308,9 +307,6 @@ func (x Natural) Sub(y Natural) Natural {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// MulAdd128 is defined in arith.go and arith.s .
|
|
||||||
func MulAdd128(x, y, c uint64) (z1, z0 uint64)
|
|
||||||
|
|
||||||
// Returns z1 = (x*y + c) div B, z0 = (x*y + c) mod B.
|
// Returns z1 = (x*y + c) div B, z0 = (x*y + c) mod B.
|
||||||
//
|
//
|
||||||
func muladd11(x, y, c digit) (digit, digit) {
|
func muladd11(x, y, c digit) (digit, digit) {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
package bignum
|
package bignum
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bignum";
|
|
||||||
"fmt";
|
"fmt";
|
||||||
"testing";
|
"testing";
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@
|
||||||
package bignum
|
package bignum
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bignum";
|
|
||||||
"fmt";
|
"fmt";
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -352,7 +351,7 @@ func (x *Integer) Shr(s uint) *Integer {
|
||||||
// (-x) >> s == ^(x-1) >> s == ^((x-1) >> s) == -(((x-1) >> s) + 1)
|
// (-x) >> s == ^(x-1) >> s == ^((x-1) >> s) == -(((x-1) >> s) + 1)
|
||||||
return MakeInt(true, x.mant.Sub(Nat(1)).Shr(s).Add(Nat(1)));
|
return MakeInt(true, x.mant.Sub(Nat(1)).Shr(s).Add(Nat(1)));
|
||||||
}
|
}
|
||||||
|
|
||||||
return MakeInt(false, x.mant.Shr(s));
|
return MakeInt(false, x.mant.Shr(s));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@
|
||||||
|
|
||||||
package bignum
|
package bignum
|
||||||
|
|
||||||
import "bignum"
|
|
||||||
import "fmt"
|
import "fmt"
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -179,7 +178,7 @@ func (x *Rational) Format(h fmt.State, c int) {
|
||||||
// of the numerator is returned. If the mantissa contains a decimal point,
|
// of the numerator is returned. If the mantissa contains a decimal point,
|
||||||
// the base for the fractional part is the same as for the part before the
|
// the base for the fractional part is the same as for the part before the
|
||||||
// decimal point and the fractional part does not accept a base prefix.
|
// decimal point and the fractional part does not accept a base prefix.
|
||||||
// The base for the exponent is always 10.
|
// The base for the exponent is always 10.
|
||||||
//
|
//
|
||||||
func RatFromString(s string, base uint) (*Rational, uint, int) {
|
func RatFromString(s string, base uint) (*Rational, uint, int) {
|
||||||
// read numerator
|
// read numerator
|
||||||
|
|
|
||||||
|
|
@ -2,59 +2,10 @@
|
||||||
# Use of this source code is governed by a BSD-style
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
# DO NOT EDIT. Automatically generated by gobuild.
|
|
||||||
# gobuild -m >Makefile
|
|
||||||
|
|
||||||
D=
|
|
||||||
|
|
||||||
include $(GOROOT)/src/Make.$(GOARCH)
|
include $(GOROOT)/src/Make.$(GOARCH)
|
||||||
AR=gopack
|
|
||||||
|
|
||||||
default: packages
|
TARG=bufio
|
||||||
|
GOFILES=\
|
||||||
|
bufio.go\
|
||||||
|
|
||||||
clean:
|
include $(GOROOT)/src/Make.pkg
|
||||||
rm -rf *.[$(OS)] *.a [$(OS)].out _obj
|
|
||||||
|
|
||||||
test: packages
|
|
||||||
gotest
|
|
||||||
|
|
||||||
coverage: packages
|
|
||||||
gotest
|
|
||||||
6cov -g `pwd` | grep -v '_test\.go:'
|
|
||||||
|
|
||||||
%.$O: %.go
|
|
||||||
$(GC) -I_obj $*.go
|
|
||||||
|
|
||||||
%.$O: %.c
|
|
||||||
$(CC) $*.c
|
|
||||||
|
|
||||||
%.$O: %.s
|
|
||||||
$(AS) $*.s
|
|
||||||
|
|
||||||
O1=\
|
|
||||||
bufio.$O\
|
|
||||||
|
|
||||||
|
|
||||||
phases: a1
|
|
||||||
_obj$D/bufio.a: phases
|
|
||||||
|
|
||||||
a1: $(O1)
|
|
||||||
$(AR) grc _obj$D/bufio.a bufio.$O
|
|
||||||
rm -f $(O1)
|
|
||||||
|
|
||||||
|
|
||||||
newpkg: clean
|
|
||||||
mkdir -p _obj$D
|
|
||||||
$(AR) grc _obj$D/bufio.a
|
|
||||||
|
|
||||||
$(O1): newpkg
|
|
||||||
$(O2): a1
|
|
||||||
|
|
||||||
nuke: clean
|
|
||||||
rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/bufio.a
|
|
||||||
|
|
||||||
packages: _obj$D/bufio.a
|
|
||||||
|
|
||||||
install: packages
|
|
||||||
test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
|
|
||||||
cp _obj$D/bufio.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/bufio.a
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ package bufio
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes";
|
"bytes";
|
||||||
"bufio";
|
|
||||||
"fmt";
|
"fmt";
|
||||||
"io";
|
"io";
|
||||||
"os";
|
"os";
|
||||||
|
|
@ -191,7 +190,7 @@ func (r *StringReader) Read (p []byte) (n int, err os.Error) {
|
||||||
func readRuneSegments(t *testing.T, segments []string) {
|
func readRuneSegments(t *testing.T, segments []string) {
|
||||||
got := "";
|
got := "";
|
||||||
want := strings.Join(segments, "");
|
want := strings.Join(segments, "");
|
||||||
r := bufio.NewReader(&StringReader{data: segments});
|
r := NewReader(&StringReader{data: segments});
|
||||||
for {
|
for {
|
||||||
rune, size, err := r.ReadRune();
|
rune, size, err := r.ReadRune();
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
|
|
@ -2,59 +2,10 @@
|
||||||
# Use of this source code is governed by a BSD-style
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
# DO NOT EDIT. Automatically generated by gobuild.
|
|
||||||
# gobuild -m >Makefile
|
|
||||||
|
|
||||||
D=/compress/
|
|
||||||
|
|
||||||
include $(GOROOT)/src/Make.$(GOARCH)
|
include $(GOROOT)/src/Make.$(GOARCH)
|
||||||
AR=gopack
|
|
||||||
|
|
||||||
default: packages
|
TARG=compress/flate
|
||||||
|
GOFILES=\
|
||||||
|
inflate.go\
|
||||||
|
|
||||||
clean:
|
include $(GOROOT)/src/Make.pkg
|
||||||
rm -rf *.[$(OS)] *.a [$(OS)].out _obj
|
|
||||||
|
|
||||||
test: packages
|
|
||||||
gotest
|
|
||||||
|
|
||||||
coverage: packages
|
|
||||||
gotest
|
|
||||||
6cov -g `pwd` | grep -v '_test\.go:'
|
|
||||||
|
|
||||||
%.$O: %.go
|
|
||||||
$(GC) -I_obj $*.go
|
|
||||||
|
|
||||||
%.$O: %.c
|
|
||||||
$(CC) $*.c
|
|
||||||
|
|
||||||
%.$O: %.s
|
|
||||||
$(AS) $*.s
|
|
||||||
|
|
||||||
O1=\
|
|
||||||
inflate.$O\
|
|
||||||
|
|
||||||
|
|
||||||
phases: a1
|
|
||||||
_obj$D/flate.a: phases
|
|
||||||
|
|
||||||
a1: $(O1)
|
|
||||||
$(AR) grc _obj$D/flate.a inflate.$O
|
|
||||||
rm -f $(O1)
|
|
||||||
|
|
||||||
|
|
||||||
newpkg: clean
|
|
||||||
mkdir -p _obj$D
|
|
||||||
$(AR) grc _obj$D/flate.a
|
|
||||||
|
|
||||||
$(O1): newpkg
|
|
||||||
$(O2): a1
|
|
||||||
|
|
||||||
nuke: clean
|
|
||||||
rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/flate.a
|
|
||||||
|
|
||||||
packages: _obj$D/flate.a
|
|
||||||
|
|
||||||
install: packages
|
|
||||||
test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
|
|
||||||
cp _obj$D/flate.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/flate.a
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ package flate
|
||||||
import (
|
import (
|
||||||
"bytes";
|
"bytes";
|
||||||
"bufio";
|
"bufio";
|
||||||
"compress/flate";
|
|
||||||
"io";
|
"io";
|
||||||
"os";
|
"os";
|
||||||
"reflect";
|
"reflect";
|
||||||
|
|
@ -102,7 +101,7 @@ var initDecoderTests = []*InitDecoderTest{
|
||||||
fixedHuffmanDecoder,
|
fixedHuffmanDecoder,
|
||||||
true,
|
true,
|
||||||
},
|
},
|
||||||
|
|
||||||
// Illegal input.
|
// Illegal input.
|
||||||
&InitDecoderTest{
|
&InitDecoderTest{
|
||||||
[]int{ },
|
[]int{ },
|
||||||
|
|
|
||||||
|
|
@ -263,13 +263,6 @@ type inflater struct {
|
||||||
buf [4]byte;
|
buf [4]byte;
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *inflater) dataBlock() os.Error
|
|
||||||
func (f *inflater) readHuffman() os.Error
|
|
||||||
func (f *inflater) decodeBlock(hl, hd *huffmanDecoder) os.Error
|
|
||||||
func (f *inflater) moreBits() os.Error
|
|
||||||
func (f *inflater) huffSym(h *huffmanDecoder) (int, os.Error)
|
|
||||||
func (f *inflater) flush() os.Error
|
|
||||||
|
|
||||||
func (f *inflater) inflate() (err os.Error) {
|
func (f *inflater) inflate() (err os.Error) {
|
||||||
final := false;
|
final := false;
|
||||||
for err == nil && !final {
|
for err == nil && !final {
|
||||||
|
|
|
||||||
|
|
@ -2,59 +2,10 @@
|
||||||
# Use of this source code is governed by a BSD-style
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
# DO NOT EDIT. Automatically generated by gobuild.
|
|
||||||
# gobuild -m >Makefile
|
|
||||||
|
|
||||||
D=/compress/
|
|
||||||
|
|
||||||
include $(GOROOT)/src/Make.$(GOARCH)
|
include $(GOROOT)/src/Make.$(GOARCH)
|
||||||
AR=gopack
|
|
||||||
|
|
||||||
default: packages
|
TARG=compress/gzip
|
||||||
|
GOFILES=\
|
||||||
|
gunzip.go\
|
||||||
|
|
||||||
clean:
|
include $(GOROOT)/src/Make.pkg
|
||||||
rm -rf *.[$(OS)] *.a [$(OS)].out _obj
|
|
||||||
|
|
||||||
test: packages
|
|
||||||
gotest
|
|
||||||
|
|
||||||
coverage: packages
|
|
||||||
gotest
|
|
||||||
6cov -g `pwd` | grep -v '_test\.go:'
|
|
||||||
|
|
||||||
%.$O: %.go
|
|
||||||
$(GC) -I_obj $*.go
|
|
||||||
|
|
||||||
%.$O: %.c
|
|
||||||
$(CC) $*.c
|
|
||||||
|
|
||||||
%.$O: %.s
|
|
||||||
$(AS) $*.s
|
|
||||||
|
|
||||||
O1=\
|
|
||||||
gunzip.$O\
|
|
||||||
|
|
||||||
|
|
||||||
phases: a1
|
|
||||||
_obj$D/gzip.a: phases
|
|
||||||
|
|
||||||
a1: $(O1)
|
|
||||||
$(AR) grc _obj$D/gzip.a gunzip.$O
|
|
||||||
rm -f $(O1)
|
|
||||||
|
|
||||||
|
|
||||||
newpkg: clean
|
|
||||||
mkdir -p _obj$D
|
|
||||||
$(AR) grc _obj$D/gzip.a
|
|
||||||
|
|
||||||
$(O1): newpkg
|
|
||||||
$(O2): a1
|
|
||||||
|
|
||||||
nuke: clean
|
|
||||||
rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/gzip.a
|
|
||||||
|
|
||||||
packages: _obj$D/gzip.a
|
|
||||||
|
|
||||||
install: packages
|
|
||||||
test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
|
|
||||||
cp _obj$D/gzip.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/gzip.a
|
|
||||||
|
|
|
||||||
|
|
@ -71,8 +71,6 @@ type GzipInflater struct {
|
||||||
eof bool;
|
eof bool;
|
||||||
}
|
}
|
||||||
|
|
||||||
func (z *GzipInflater) readHeader(save bool) os.Error
|
|
||||||
|
|
||||||
// NewGzipInflater creates a new GzipInflater reading the given reader.
|
// NewGzipInflater creates a new GzipInflater reading the given reader.
|
||||||
// The implementation buffers input and may read more data than necessary from r.
|
// The implementation buffers input and may read more data than necessary from r.
|
||||||
func NewGzipInflater(r io.Reader) (*GzipInflater, os.Error) {
|
func NewGzipInflater(r io.Reader) (*GzipInflater, os.Error) {
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ package gzip
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes";
|
"bytes";
|
||||||
"compress/gzip";
|
|
||||||
"fmt";
|
"fmt";
|
||||||
"io";
|
"io";
|
||||||
"testing";
|
"testing";
|
||||||
|
|
|
||||||
|
|
@ -2,59 +2,10 @@
|
||||||
# Use of this source code is governed by a BSD-style
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
# DO NOT EDIT. Automatically generated by gobuild.
|
|
||||||
# gobuild -m >Makefile
|
|
||||||
|
|
||||||
D=/container/
|
|
||||||
|
|
||||||
include $(GOROOT)/src/Make.$(GOARCH)
|
include $(GOROOT)/src/Make.$(GOARCH)
|
||||||
AR=gopack
|
|
||||||
|
|
||||||
default: packages
|
TARG=container/list
|
||||||
|
GOFILES=\
|
||||||
|
list.go\
|
||||||
|
|
||||||
clean:
|
include $(GOROOT)/src/Make.pkg
|
||||||
rm -rf *.[$(OS)] *.a [$(OS)].out _obj
|
|
||||||
|
|
||||||
test: packages
|
|
||||||
gotest
|
|
||||||
|
|
||||||
coverage: packages
|
|
||||||
gotest
|
|
||||||
6cov -g `pwd` | grep -v '_test\.go:'
|
|
||||||
|
|
||||||
%.$O: %.go
|
|
||||||
$(GC) -I_obj $*.go
|
|
||||||
|
|
||||||
%.$O: %.c
|
|
||||||
$(CC) $*.c
|
|
||||||
|
|
||||||
%.$O: %.s
|
|
||||||
$(AS) $*.s
|
|
||||||
|
|
||||||
O1=\
|
|
||||||
list.$O\
|
|
||||||
|
|
||||||
|
|
||||||
phases: a1
|
|
||||||
_obj$D/list.a: phases
|
|
||||||
|
|
||||||
a1: $(O1)
|
|
||||||
$(AR) grc _obj$D/list.a list.$O
|
|
||||||
rm -f $(O1)
|
|
||||||
|
|
||||||
|
|
||||||
newpkg: clean
|
|
||||||
mkdir -p _obj$D
|
|
||||||
$(AR) grc _obj$D/list.a
|
|
||||||
|
|
||||||
$(O1): newpkg
|
|
||||||
$(O2): a1
|
|
||||||
|
|
||||||
nuke: clean
|
|
||||||
rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/list.a
|
|
||||||
|
|
||||||
packages: _obj$D/list.a
|
|
||||||
|
|
||||||
install: packages
|
|
||||||
test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
|
|
||||||
cp _obj$D/list.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/list.a
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
package list
|
package list
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"container/list";
|
|
||||||
"testing";
|
"testing";
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,60 +2,10 @@
|
||||||
# Use of this source code is governed by a BSD-style
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
|
||||||
# DO NOT EDIT. Automatically generated by gobuild.
|
|
||||||
# gobuild -m >Makefile
|
|
||||||
|
|
||||||
D=/container/
|
|
||||||
|
|
||||||
include $(GOROOT)/src/Make.$(GOARCH)
|
include $(GOROOT)/src/Make.$(GOARCH)
|
||||||
AR=gopack
|
|
||||||
|
|
||||||
default: packages
|
TARG=container/ring
|
||||||
|
GOFILES=\
|
||||||
|
ring.go\
|
||||||
|
|
||||||
clean:
|
include $(GOROOT)/src/Make.pkg
|
||||||
rm -rf *.[$(OS)] *.a [$(OS)].out _obj
|
|
||||||
|
|
||||||
test: packages
|
|
||||||
gotest
|
|
||||||
|
|
||||||
coverage: packages
|
|
||||||
gotest
|
|
||||||
6cov -g $$(pwd) | grep -v '_test\.go:'
|
|
||||||
|
|
||||||
%.$O: %.go
|
|
||||||
$(GC) -I_obj $*.go
|
|
||||||
|
|
||||||
%.$O: %.c
|
|
||||||
$(CC) $*.c
|
|
||||||
|
|
||||||
%.$O: %.s
|
|
||||||
$(AS) $*.s
|
|
||||||
|
|
||||||
O1=\
|
|
||||||
ring.$O\
|
|
||||||
|
|
||||||
|
|
||||||
phases: a1
|
|
||||||
_obj$D/ring.a: phases
|
|
||||||
|
|
||||||
a1: $(O1)
|
|
||||||
$(AR) grc _obj$D/ring.a ring.$O
|
|
||||||
rm -f $(O1)
|
|
||||||
|
|
||||||
|
|
||||||
newpkg: clean
|
|
||||||
mkdir -p _obj$D
|
|
||||||
$(AR) grc _obj$D/ring.a
|
|
||||||
|
|
||||||
$(O1): newpkg
|
|
||||||
$(O2): a1
|
|
||||||
|
|
||||||
nuke: clean
|
|
||||||
rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/ring.a
|
|
||||||
|
|
||||||
packages: _obj$D/ring.a
|
|
||||||
|
|
||||||
install: packages
|
|
||||||
test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
|
|
||||||
cp _obj$D/ring.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/ring.a
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
package ring
|
package ring
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"container/ring";
|
|
||||||
"fmt";
|
"fmt";
|
||||||
"testing";
|
"testing";
|
||||||
)
|
)
|
||||||
|
|
@ -90,7 +89,7 @@ func verify(t *testing.T, r *Ring, N int, sum int) {
|
||||||
if r.Prev() != r.prev {
|
if r.Prev() != r.prev {
|
||||||
t.Errorf("r.Prev() != r.prev");
|
t.Errorf("r.Prev() != r.prev");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Move
|
// Move
|
||||||
if r.Move(0) != r {
|
if r.Move(0) != r {
|
||||||
t.Errorf("r.Move(0) != r");
|
t.Errorf("r.Move(0) != r");
|
||||||
|
|
|
||||||
|
|
@ -2,68 +2,12 @@
|
||||||
# Use of this source code is governed by a BSD-style
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
# DO NOT EDIT. Automatically generated by gobuild.
|
|
||||||
# gobuild -m >Makefile
|
|
||||||
|
|
||||||
D=/container/
|
|
||||||
|
|
||||||
include $(GOROOT)/src/Make.$(GOARCH)
|
include $(GOROOT)/src/Make.$(GOARCH)
|
||||||
AR=gopack
|
|
||||||
|
|
||||||
default: packages
|
TARG=container/vector
|
||||||
|
GOFILES=\
|
||||||
|
intvector.go\
|
||||||
|
stringvector.go\
|
||||||
|
vector.go\
|
||||||
|
|
||||||
clean:
|
include $(GOROOT)/src/Make.pkg
|
||||||
rm -rf *.[$(OS)] *.a [$(OS)].out _obj
|
|
||||||
|
|
||||||
test: packages
|
|
||||||
gotest
|
|
||||||
|
|
||||||
coverage: packages
|
|
||||||
gotest
|
|
||||||
6cov -g `pwd` | grep -v '_test\.go:'
|
|
||||||
|
|
||||||
%.$O: %.go
|
|
||||||
$(GC) -I_obj $*.go
|
|
||||||
|
|
||||||
%.$O: %.c
|
|
||||||
$(CC) $*.c
|
|
||||||
|
|
||||||
%.$O: %.s
|
|
||||||
$(AS) $*.s
|
|
||||||
|
|
||||||
O1=\
|
|
||||||
vector.$O\
|
|
||||||
|
|
||||||
O2=\
|
|
||||||
intvector.$O\
|
|
||||||
stringvector.$O\
|
|
||||||
|
|
||||||
|
|
||||||
phases: a1 a2
|
|
||||||
_obj$D/vector.a: phases
|
|
||||||
|
|
||||||
a1: $(O1)
|
|
||||||
$(AR) grc _obj$D/vector.a vector.$O
|
|
||||||
rm -f $(O1)
|
|
||||||
|
|
||||||
a2: $(O2)
|
|
||||||
$(AR) grc _obj$D/vector.a intvector.$O stringvector.$O
|
|
||||||
rm -f $(O2)
|
|
||||||
|
|
||||||
|
|
||||||
newpkg: clean
|
|
||||||
mkdir -p _obj$D
|
|
||||||
$(AR) grc _obj$D/vector.a
|
|
||||||
|
|
||||||
$(O1): newpkg
|
|
||||||
$(O2): a1
|
|
||||||
$(O3): a2
|
|
||||||
|
|
||||||
nuke: clean
|
|
||||||
rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/vector.a
|
|
||||||
|
|
||||||
packages: _obj$D/vector.a
|
|
||||||
|
|
||||||
install: packages
|
|
||||||
test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
|
|
||||||
cp _obj$D/vector.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/vector.a
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@
|
||||||
|
|
||||||
package vector
|
package vector
|
||||||
|
|
||||||
import "container/vector"
|
|
||||||
|
|
||||||
// IntVector is a specialization of Vector that hides the wrapping of Elements around ints.
|
// IntVector is a specialization of Vector that hides the wrapping of Elements around ints.
|
||||||
type IntVector struct {
|
type IntVector struct {
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,6 @@
|
||||||
|
|
||||||
package vector
|
package vector
|
||||||
|
|
||||||
import "container/vector"
|
|
||||||
|
|
||||||
// StringVector is a specialization of Vector that hides the wrapping of Elements around strings.
|
// StringVector is a specialization of Vector that hides the wrapping of Elements around strings.
|
||||||
type StringVector struct {
|
type StringVector struct {
|
||||||
Vector;
|
Vector;
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@
|
||||||
|
|
||||||
package vector
|
package vector
|
||||||
|
|
||||||
import "container/vector"
|
|
||||||
import "testing"
|
import "testing"
|
||||||
import "sort"
|
import "sort"
|
||||||
import "fmt"
|
import "fmt"
|
||||||
|
|
|
||||||
|
|
@ -2,75 +2,12 @@
|
||||||
# Use of this source code is governed by a BSD-style
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
# DO NOT EDIT. Automatically generated by gobuild.
|
|
||||||
# gobuild -m >Makefile
|
|
||||||
|
|
||||||
D=/crypto/
|
|
||||||
|
|
||||||
include $(GOROOT)/src/Make.$(GOARCH)
|
include $(GOROOT)/src/Make.$(GOARCH)
|
||||||
AR=gopack
|
|
||||||
|
|
||||||
default: packages
|
TARG=crypto/aes
|
||||||
|
GOFILES=\
|
||||||
|
block.go\
|
||||||
|
cipher.go\
|
||||||
|
const.go\
|
||||||
|
|
||||||
clean:
|
include $(GOROOT)/src/Make.pkg
|
||||||
rm -rf *.[$(OS)] *.a [$(OS)].out _obj
|
|
||||||
|
|
||||||
test: packages
|
|
||||||
gotest
|
|
||||||
|
|
||||||
coverage: packages
|
|
||||||
gotest
|
|
||||||
6cov -g `pwd` | grep -v '_test\.go:'
|
|
||||||
|
|
||||||
%.$O: %.go
|
|
||||||
$(GC) -I_obj $*.go
|
|
||||||
|
|
||||||
%.$O: %.c
|
|
||||||
$(CC) $*.c
|
|
||||||
|
|
||||||
%.$O: %.s
|
|
||||||
$(AS) $*.s
|
|
||||||
|
|
||||||
O1=\
|
|
||||||
const.$O\
|
|
||||||
|
|
||||||
O2=\
|
|
||||||
block.$O\
|
|
||||||
|
|
||||||
O3=\
|
|
||||||
cipher.$O\
|
|
||||||
|
|
||||||
|
|
||||||
phases: a1 a2 a3
|
|
||||||
_obj$D/aes.a: phases
|
|
||||||
|
|
||||||
a1: $(O1)
|
|
||||||
$(AR) grc _obj$D/aes.a const.$O
|
|
||||||
rm -f $(O1)
|
|
||||||
|
|
||||||
a2: $(O2)
|
|
||||||
$(AR) grc _obj$D/aes.a block.$O
|
|
||||||
rm -f $(O2)
|
|
||||||
|
|
||||||
a3: $(O3)
|
|
||||||
$(AR) grc _obj$D/aes.a cipher.$O
|
|
||||||
rm -f $(O3)
|
|
||||||
|
|
||||||
|
|
||||||
newpkg: clean
|
|
||||||
mkdir -p _obj$D
|
|
||||||
$(AR) grc _obj$D/aes.a
|
|
||||||
|
|
||||||
$(O1): newpkg
|
|
||||||
$(O2): a1
|
|
||||||
$(O3): a2
|
|
||||||
$(O4): a3
|
|
||||||
|
|
||||||
nuke: clean
|
|
||||||
rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/aes.a
|
|
||||||
|
|
||||||
packages: _obj$D/aes.a
|
|
||||||
|
|
||||||
install: packages
|
|
||||||
test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
|
|
||||||
cp _obj$D/aes.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/aes.a
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
package aes
|
package aes
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/aes";
|
|
||||||
"fmt";
|
"fmt";
|
||||||
"testing";
|
"testing";
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -36,8 +36,6 @@
|
||||||
|
|
||||||
package aes
|
package aes
|
||||||
|
|
||||||
import "crypto/aes"
|
|
||||||
|
|
||||||
// Encrypt one block from src into dst, using the expanded key xk.
|
// Encrypt one block from src into dst, using the expanded key xk.
|
||||||
func encryptBlock(xk []uint32, src, dst []byte) {
|
func encryptBlock(xk []uint32, src, dst []byte) {
|
||||||
var s0, s1, s2, s3, t0, t1, t2, t3 uint32;
|
var s0, s1, s2, s3, t0, t1, t2, t3 uint32;
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
package aes
|
package aes
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/aes";
|
|
||||||
"os";
|
"os";
|
||||||
"strconv";
|
"strconv";
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -2,81 +2,18 @@
|
||||||
# Use of this source code is governed by a BSD-style
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
# DO NOT EDIT. Automatically generated by gobuild.
|
|
||||||
# gobuild -m >Makefile
|
|
||||||
|
|
||||||
D=/crypto/
|
|
||||||
|
|
||||||
include $(GOROOT)/src/Make.$(GOARCH)
|
include $(GOROOT)/src/Make.$(GOARCH)
|
||||||
AR=gopack
|
|
||||||
|
|
||||||
default: packages
|
TARG=crypto/block
|
||||||
|
GOFILES=\
|
||||||
|
cbc.go\
|
||||||
|
cfb.go\
|
||||||
|
cipher.go\
|
||||||
|
cmac.go\
|
||||||
|
ctr.go\
|
||||||
|
eax.go\
|
||||||
|
ecb.go\
|
||||||
|
ofb.go\
|
||||||
|
xor.go\
|
||||||
|
|
||||||
clean:
|
include $(GOROOT)/src/Make.pkg
|
||||||
rm -rf *.[$(OS)] *.a [$(OS)].out _obj
|
|
||||||
|
|
||||||
test: packages
|
|
||||||
gotest
|
|
||||||
|
|
||||||
coverage: packages
|
|
||||||
gotest
|
|
||||||
6cov -g `pwd` | grep -v '_test\.go:'
|
|
||||||
|
|
||||||
%.$O: %.go
|
|
||||||
$(GC) -I_obj $*.go
|
|
||||||
|
|
||||||
%.$O: %.c
|
|
||||||
$(CC) $*.c
|
|
||||||
|
|
||||||
%.$O: %.s
|
|
||||||
$(AS) $*.s
|
|
||||||
|
|
||||||
O1=\
|
|
||||||
cipher.$O\
|
|
||||||
xor.$O\
|
|
||||||
|
|
||||||
O2=\
|
|
||||||
cmac.$O\
|
|
||||||
ctr.$O\
|
|
||||||
ecb.$O\
|
|
||||||
ofb.$O\
|
|
||||||
|
|
||||||
O3=\
|
|
||||||
cbc.$O\
|
|
||||||
cfb.$O\
|
|
||||||
eax.$O\
|
|
||||||
|
|
||||||
|
|
||||||
phases: a1 a2 a3
|
|
||||||
_obj$D/block.a: phases
|
|
||||||
|
|
||||||
a1: $(O1)
|
|
||||||
$(AR) grc _obj$D/block.a cipher.$O xor.$O
|
|
||||||
rm -f $(O1)
|
|
||||||
|
|
||||||
a2: $(O2)
|
|
||||||
$(AR) grc _obj$D/block.a cmac.$O ctr.$O ecb.$O ofb.$O
|
|
||||||
rm -f $(O2)
|
|
||||||
|
|
||||||
a3: $(O3)
|
|
||||||
$(AR) grc _obj$D/block.a cbc.$O cfb.$O eax.$O
|
|
||||||
rm -f $(O3)
|
|
||||||
|
|
||||||
|
|
||||||
newpkg: clean
|
|
||||||
mkdir -p _obj$D
|
|
||||||
$(AR) grc _obj$D/block.a
|
|
||||||
|
|
||||||
$(O1): newpkg
|
|
||||||
$(O2): a1
|
|
||||||
$(O3): a2
|
|
||||||
$(O4): a3
|
|
||||||
|
|
||||||
nuke: clean
|
|
||||||
rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/block.a
|
|
||||||
|
|
||||||
packages: _obj$D/block.a
|
|
||||||
|
|
||||||
install: packages
|
|
||||||
test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
|
|
||||||
cp _obj$D/block.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/block.a
|
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@
|
||||||
package block
|
package block
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/block";
|
|
||||||
"io";
|
"io";
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,17 +10,12 @@
|
||||||
|
|
||||||
package block
|
package block
|
||||||
|
|
||||||
// gobuild: $GC ecb_aes_test.go
|
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes";
|
"bytes";
|
||||||
"crypto/aes";
|
"crypto/aes";
|
||||||
"crypto/block";
|
|
||||||
"io";
|
"io";
|
||||||
"os";
|
"os";
|
||||||
"testing";
|
"testing";
|
||||||
|
|
||||||
"./ecb_aes_test";
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type cbcTest struct {
|
type cbcTest struct {
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@
|
||||||
package block
|
package block
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/block";
|
|
||||||
"io";
|
"io";
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,17 +10,12 @@
|
||||||
|
|
||||||
package block
|
package block
|
||||||
|
|
||||||
// gobuild: $GC ecb_aes_test.go
|
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes";
|
"bytes";
|
||||||
"crypto/aes";
|
"crypto/aes";
|
||||||
"crypto/block";
|
|
||||||
"io";
|
"io";
|
||||||
"os";
|
"os";
|
||||||
"testing";
|
"testing";
|
||||||
|
|
||||||
"./ecb_aes_test";
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type cfbTest struct {
|
type cfbTest struct {
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@
|
||||||
package block
|
package block
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/block";
|
|
||||||
"io";
|
"io";
|
||||||
"os";
|
"os";
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -6,14 +6,9 @@
|
||||||
|
|
||||||
package block
|
package block
|
||||||
|
|
||||||
// gobuild: $GC ecb_aes_test.go
|
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/aes";
|
"crypto/aes";
|
||||||
"crypto/block";
|
|
||||||
"testing";
|
"testing";
|
||||||
|
|
||||||
"./ecb_aes_test";
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type cmacAESTest struct {
|
type cmacAESTest struct {
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@
|
||||||
package block
|
package block
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/block";
|
|
||||||
"io";
|
"io";
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,12 +13,9 @@ package block
|
||||||
import (
|
import (
|
||||||
"bytes";
|
"bytes";
|
||||||
"crypto/aes";
|
"crypto/aes";
|
||||||
"crypto/block";
|
|
||||||
"io";
|
"io";
|
||||||
"os";
|
"os";
|
||||||
"testing";
|
"testing";
|
||||||
|
|
||||||
"./ecb_aes_test";
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type ctrTest struct {
|
type ctrTest struct {
|
||||||
|
|
@ -86,7 +83,7 @@ func TestCTR_AES(t *testing.T) {
|
||||||
for j := 0; j <= 5; j += 5 {
|
for j := 0; j <= 5; j += 5 {
|
||||||
var crypt bytes.Buffer;
|
var crypt bytes.Buffer;
|
||||||
in := tt.in[0:len(tt.in) - j];
|
in := tt.in[0:len(tt.in) - j];
|
||||||
w := block.NewCTRWriter(c, tt.iv, &crypt);
|
w := NewCTRWriter(c, tt.iv, &crypt);
|
||||||
var r io.Reader = io.NewByteReader(in);
|
var r io.Reader = io.NewByteReader(in);
|
||||||
n, err := io.Copy(r, w);
|
n, err := io.Copy(r, w);
|
||||||
if n != int64(len(in)) || err != nil {
|
if n != int64(len(in)) || err != nil {
|
||||||
|
|
@ -99,7 +96,7 @@ func TestCTR_AES(t *testing.T) {
|
||||||
for j := 0; j <= 7; j += 7 {
|
for j := 0; j <= 7; j += 7 {
|
||||||
var plain bytes.Buffer;
|
var plain bytes.Buffer;
|
||||||
out := tt.out[0:len(tt.out) - j];
|
out := tt.out[0:len(tt.out) - j];
|
||||||
r := block.NewCTRReader(c, tt.iv, io.NewByteReader(out));
|
r := NewCTRReader(c, tt.iv, io.NewByteReader(out));
|
||||||
w := &plain;
|
w := &plain;
|
||||||
n, err := io.Copy(r, w);
|
n, err := io.Copy(r, w);
|
||||||
if n != int64(len(out)) || err != nil {
|
if n != int64(len(out)) || err != nil {
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@
|
||||||
package block
|
package block
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/block";
|
|
||||||
"fmt";
|
"fmt";
|
||||||
"io";
|
"io";
|
||||||
"os";
|
"os";
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ package block
|
||||||
import (
|
import (
|
||||||
"bytes";
|
"bytes";
|
||||||
"crypto/aes";
|
"crypto/aes";
|
||||||
"crypto/block";
|
|
||||||
"fmt";
|
"fmt";
|
||||||
"io";
|
"io";
|
||||||
"testing";
|
"testing";
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@
|
||||||
package block
|
package block
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/block";
|
|
||||||
"io";
|
"io";
|
||||||
"os";
|
"os";
|
||||||
"strconv";
|
"strconv";
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ package block
|
||||||
import (
|
import (
|
||||||
"bytes";
|
"bytes";
|
||||||
"crypto/aes";
|
"crypto/aes";
|
||||||
"crypto/block";
|
|
||||||
"io";
|
"io";
|
||||||
"os";
|
"os";
|
||||||
"testing";
|
"testing";
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ package block
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes";
|
"bytes";
|
||||||
"crypto/block";
|
|
||||||
"fmt";
|
"fmt";
|
||||||
"io";
|
"io";
|
||||||
"testing";
|
"testing";
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@
|
||||||
package block
|
package block
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/block";
|
|
||||||
"io";
|
"io";
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,17 +10,12 @@
|
||||||
|
|
||||||
package block
|
package block
|
||||||
|
|
||||||
// gotest: $GC ecb_aes_test.go
|
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes";
|
"bytes";
|
||||||
"crypto/aes";
|
"crypto/aes";
|
||||||
"crypto/block";
|
|
||||||
"io";
|
"io";
|
||||||
"os";
|
"os";
|
||||||
"testing";
|
"testing";
|
||||||
|
|
||||||
"./ecb_aes_test";
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type ofbTest struct {
|
type ofbTest struct {
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@
|
||||||
package block
|
package block
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/block";
|
|
||||||
"io";
|
"io";
|
||||||
"os";
|
"os";
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ package block
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes";
|
"bytes";
|
||||||
"crypto/block";
|
|
||||||
"fmt";
|
"fmt";
|
||||||
"io";
|
"io";
|
||||||
"testing";
|
"testing";
|
||||||
|
|
|
||||||
|
|
@ -2,59 +2,10 @@
|
||||||
# Use of this source code is governed by a BSD-style
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
# DO NOT EDIT. Automatically generated by gobuild.
|
|
||||||
# gobuild -m >Makefile
|
|
||||||
|
|
||||||
D=/crypto/
|
|
||||||
|
|
||||||
include $(GOROOT)/src/Make.$(GOARCH)
|
include $(GOROOT)/src/Make.$(GOARCH)
|
||||||
AR=gopack
|
|
||||||
|
|
||||||
default: packages
|
TARG=crypto/hmac
|
||||||
|
GOFILES=\
|
||||||
|
hmac.go\
|
||||||
|
|
||||||
clean:
|
include $(GOROOT)/src/Make.pkg
|
||||||
rm -rf *.[$(OS)] *.a [$(OS)].out _obj
|
|
||||||
|
|
||||||
test: packages
|
|
||||||
gotest
|
|
||||||
|
|
||||||
coverage: packages
|
|
||||||
gotest
|
|
||||||
6cov -g `pwd` | grep -v '_test\.go:'
|
|
||||||
|
|
||||||
%.$O: %.go
|
|
||||||
$(GC) -I_obj $*.go
|
|
||||||
|
|
||||||
%.$O: %.c
|
|
||||||
$(CC) $*.c
|
|
||||||
|
|
||||||
%.$O: %.s
|
|
||||||
$(AS) $*.s
|
|
||||||
|
|
||||||
O1=\
|
|
||||||
hmac.$O\
|
|
||||||
|
|
||||||
|
|
||||||
phases: a1
|
|
||||||
_obj$D/hmac.a: phases
|
|
||||||
|
|
||||||
a1: $(O1)
|
|
||||||
$(AR) grc _obj$D/hmac.a hmac.$O
|
|
||||||
rm -f $(O1)
|
|
||||||
|
|
||||||
|
|
||||||
newpkg: clean
|
|
||||||
mkdir -p _obj$D
|
|
||||||
$(AR) grc _obj$D/hmac.a
|
|
||||||
|
|
||||||
$(O1): newpkg
|
|
||||||
$(O2): a1
|
|
||||||
|
|
||||||
nuke: clean
|
|
||||||
rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/hmac.a
|
|
||||||
|
|
||||||
packages: _obj$D/hmac.a
|
|
||||||
|
|
||||||
install: packages
|
|
||||||
test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
|
|
||||||
cp _obj$D/hmac.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/hmac.a
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ package hmac
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"hash";
|
"hash";
|
||||||
"crypto/hmac";
|
|
||||||
"fmt";
|
"fmt";
|
||||||
"strings";
|
"strings";
|
||||||
"testing";
|
"testing";
|
||||||
|
|
|
||||||
|
|
@ -2,67 +2,11 @@
|
||||||
# Use of this source code is governed by a BSD-style
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
# DO NOT EDIT. Automatically generated by gobuild.
|
|
||||||
# gobuild -m >Makefile
|
|
||||||
|
|
||||||
D=/crypto/
|
|
||||||
|
|
||||||
include $(GOROOT)/src/Make.$(GOARCH)
|
include $(GOROOT)/src/Make.$(GOARCH)
|
||||||
AR=gopack
|
|
||||||
|
|
||||||
default: packages
|
TARG=crypto/md5
|
||||||
|
GOFILES=\
|
||||||
|
md5.go\
|
||||||
|
md5block.go\
|
||||||
|
|
||||||
clean:
|
include $(GOROOT)/src/Make.pkg
|
||||||
rm -rf *.[$(OS)] *.a [$(OS)].out _obj
|
|
||||||
|
|
||||||
test: packages
|
|
||||||
gotest
|
|
||||||
|
|
||||||
coverage: packages
|
|
||||||
gotest
|
|
||||||
6cov -g `pwd` | grep -v '_test\.go:'
|
|
||||||
|
|
||||||
%.$O: %.go
|
|
||||||
$(GC) -I_obj $*.go
|
|
||||||
|
|
||||||
%.$O: %.c
|
|
||||||
$(CC) $*.c
|
|
||||||
|
|
||||||
%.$O: %.s
|
|
||||||
$(AS) $*.s
|
|
||||||
|
|
||||||
O1=\
|
|
||||||
md5.$O\
|
|
||||||
|
|
||||||
O2=\
|
|
||||||
md5block.$O\
|
|
||||||
|
|
||||||
|
|
||||||
phases: a1 a2
|
|
||||||
_obj$D/md5.a: phases
|
|
||||||
|
|
||||||
a1: $(O1)
|
|
||||||
$(AR) grc _obj$D/md5.a md5.$O
|
|
||||||
rm -f $(O1)
|
|
||||||
|
|
||||||
a2: $(O2)
|
|
||||||
$(AR) grc _obj$D/md5.a md5block.$O
|
|
||||||
rm -f $(O2)
|
|
||||||
|
|
||||||
|
|
||||||
newpkg: clean
|
|
||||||
mkdir -p _obj$D
|
|
||||||
$(AR) grc _obj$D/md5.a
|
|
||||||
|
|
||||||
$(O1): newpkg
|
|
||||||
$(O2): a1
|
|
||||||
$(O3): a2
|
|
||||||
|
|
||||||
nuke: clean
|
|
||||||
rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/md5.a
|
|
||||||
|
|
||||||
packages: _obj$D/md5.a
|
|
||||||
|
|
||||||
install: packages
|
|
||||||
test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
|
|
||||||
cp _obj$D/md5.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/md5.a
|
|
||||||
|
|
|
||||||
|
|
@ -50,8 +50,6 @@ func (d *digest) Size() int {
|
||||||
return Size;
|
return Size;
|
||||||
}
|
}
|
||||||
|
|
||||||
func _Block(dig *digest, p []byte) int
|
|
||||||
|
|
||||||
func (d *digest) Write(p []byte) (nn int, err os.Error) {
|
func (d *digest) Write(p []byte) (nn int, err os.Error) {
|
||||||
nn = len(p);
|
nn = len(p);
|
||||||
d.len += uint64(nn);
|
d.len += uint64(nn);
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ package md5
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt";
|
"fmt";
|
||||||
"crypto/md5";
|
|
||||||
"io";
|
"io";
|
||||||
"testing";
|
"testing";
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,6 @@
|
||||||
|
|
||||||
package md5
|
package md5
|
||||||
|
|
||||||
import "crypto/md5"
|
|
||||||
|
|
||||||
// table[i] = int((1<<32) * abs(sin(i+1 radians))).
|
// table[i] = int((1<<32) * abs(sin(i+1 radians))).
|
||||||
var table = []uint32 {
|
var table = []uint32 {
|
||||||
// round 1
|
// round 1
|
||||||
|
|
|
||||||
|
|
@ -2,67 +2,11 @@
|
||||||
# Use of this source code is governed by a BSD-style
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
# DO NOT EDIT. Automatically generated by gobuild.
|
|
||||||
# gobuild -m >Makefile
|
|
||||||
|
|
||||||
D=/crypto/
|
|
||||||
|
|
||||||
include $(GOROOT)/src/Make.$(GOARCH)
|
include $(GOROOT)/src/Make.$(GOARCH)
|
||||||
AR=gopack
|
|
||||||
|
|
||||||
default: packages
|
TARG=crypto/sha1
|
||||||
|
GOFILES=\
|
||||||
|
sha1.go\
|
||||||
|
sha1block.go\
|
||||||
|
|
||||||
clean:
|
include $(GOROOT)/src/Make.pkg
|
||||||
rm -rf *.[$(OS)] *.a [$(OS)].out _obj
|
|
||||||
|
|
||||||
test: packages
|
|
||||||
gotest
|
|
||||||
|
|
||||||
coverage: packages
|
|
||||||
gotest
|
|
||||||
6cov -g `pwd` | grep -v '_test\.go:'
|
|
||||||
|
|
||||||
%.$O: %.go
|
|
||||||
$(GC) -I_obj $*.go
|
|
||||||
|
|
||||||
%.$O: %.c
|
|
||||||
$(CC) $*.c
|
|
||||||
|
|
||||||
%.$O: %.s
|
|
||||||
$(AS) $*.s
|
|
||||||
|
|
||||||
O1=\
|
|
||||||
sha1.$O\
|
|
||||||
|
|
||||||
O2=\
|
|
||||||
sha1block.$O\
|
|
||||||
|
|
||||||
|
|
||||||
phases: a1 a2
|
|
||||||
_obj$D/sha1.a: phases
|
|
||||||
|
|
||||||
a1: $(O1)
|
|
||||||
$(AR) grc _obj$D/sha1.a sha1.$O
|
|
||||||
rm -f $(O1)
|
|
||||||
|
|
||||||
a2: $(O2)
|
|
||||||
$(AR) grc _obj$D/sha1.a sha1block.$O
|
|
||||||
rm -f $(O2)
|
|
||||||
|
|
||||||
|
|
||||||
newpkg: clean
|
|
||||||
mkdir -p _obj$D
|
|
||||||
$(AR) grc _obj$D/sha1.a
|
|
||||||
|
|
||||||
$(O1): newpkg
|
|
||||||
$(O2): a1
|
|
||||||
$(O3): a2
|
|
||||||
|
|
||||||
nuke: clean
|
|
||||||
rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/sha1.a
|
|
||||||
|
|
||||||
packages: _obj$D/sha1.a
|
|
||||||
|
|
||||||
install: packages
|
|
||||||
test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
|
|
||||||
cp _obj$D/sha1.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/sha1.a
|
|
||||||
|
|
|
||||||
|
|
@ -52,8 +52,6 @@ func (d *digest) Size() int {
|
||||||
return Size;
|
return Size;
|
||||||
}
|
}
|
||||||
|
|
||||||
func _Block(dig *digest, p []byte) int
|
|
||||||
|
|
||||||
func (d *digest) Write(p []byte) (nn int, err os.Error) {
|
func (d *digest) Write(p []byte) (nn int, err os.Error) {
|
||||||
nn = len(p);
|
nn = len(p);
|
||||||
d.len += uint64(nn);
|
d.len += uint64(nn);
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ package sha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt";
|
"fmt";
|
||||||
"crypto/sha1";
|
|
||||||
"io";
|
"io";
|
||||||
"testing";
|
"testing";
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,6 @@
|
||||||
|
|
||||||
package sha1
|
package sha1
|
||||||
|
|
||||||
import "crypto/sha1"
|
|
||||||
|
|
||||||
const (
|
const (
|
||||||
_K0 = 0x5A827999;
|
_K0 = 0x5A827999;
|
||||||
_K1 = 0x6ED9EBA1;
|
_K1 = 0x6ED9EBA1;
|
||||||
|
|
|
||||||
|
|
@ -2,67 +2,11 @@
|
||||||
# Use of this source code is governed by a BSD-style
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
# DO NOT EDIT. Automatically generated by gobuild.
|
|
||||||
# gobuild -m >Makefile
|
|
||||||
|
|
||||||
D=
|
|
||||||
|
|
||||||
include $(GOROOT)/src/Make.$(GOARCH)
|
include $(GOROOT)/src/Make.$(GOARCH)
|
||||||
AR=gopack
|
|
||||||
|
|
||||||
default: packages
|
TARG=datafmt
|
||||||
|
GOFILES=\
|
||||||
|
datafmt.go\
|
||||||
|
parser.go\
|
||||||
|
|
||||||
clean:
|
include $(GOROOT)/src/Make.pkg
|
||||||
rm -rf *.[$(OS)] *.a [$(OS)].out _obj
|
|
||||||
|
|
||||||
test: packages
|
|
||||||
gotest
|
|
||||||
|
|
||||||
coverage: packages
|
|
||||||
gotest
|
|
||||||
6cov -g `pwd` | grep -v '_test\.go:'
|
|
||||||
|
|
||||||
%.$O: %.go
|
|
||||||
$(GC) -I_obj $*.go
|
|
||||||
|
|
||||||
%.$O: %.c
|
|
||||||
$(CC) $*.c
|
|
||||||
|
|
||||||
%.$O: %.s
|
|
||||||
$(AS) $*.s
|
|
||||||
|
|
||||||
O1=\
|
|
||||||
datafmt.$O\
|
|
||||||
|
|
||||||
O2=\
|
|
||||||
parser.$O\
|
|
||||||
|
|
||||||
|
|
||||||
phases: a1 a2
|
|
||||||
_obj$D/datafmt.a: phases
|
|
||||||
|
|
||||||
a1: $(O1)
|
|
||||||
$(AR) grc _obj$D/datafmt.a datafmt.$O
|
|
||||||
rm -f $(O1)
|
|
||||||
|
|
||||||
a2: $(O2)
|
|
||||||
$(AR) grc _obj$D/datafmt.a parser.$O
|
|
||||||
rm -f $(O2)
|
|
||||||
|
|
||||||
|
|
||||||
newpkg: clean
|
|
||||||
mkdir -p _obj$D
|
|
||||||
$(AR) grc _obj$D/datafmt.a
|
|
||||||
|
|
||||||
$(O1): newpkg
|
|
||||||
$(O2): a1
|
|
||||||
$(O3): a2
|
|
||||||
|
|
||||||
nuke: clean
|
|
||||||
rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/datafmt.a
|
|
||||||
|
|
||||||
packages: _obj$D/datafmt.a
|
|
||||||
|
|
||||||
install: packages
|
|
||||||
test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
|
|
||||||
cp _obj$D/datafmt.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/datafmt.a
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ package datafmt
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt";
|
"fmt";
|
||||||
"datafmt";
|
|
||||||
"os";
|
"os";
|
||||||
"strings";
|
"strings";
|
||||||
"testing";
|
"testing";
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ package datafmt
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"container/vector";
|
"container/vector";
|
||||||
"datafmt";
|
|
||||||
"fmt";
|
"fmt";
|
||||||
"go/scanner";
|
"go/scanner";
|
||||||
"go/token";
|
"go/token";
|
||||||
|
|
@ -203,8 +202,6 @@ func (p *parser) parseField() expr {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func (p *parser) parseExpression() expr
|
|
||||||
|
|
||||||
func (p *parser) parseOperand() (x expr) {
|
func (p *parser) parseOperand() (x expr) {
|
||||||
switch p.tok {
|
switch p.tok {
|
||||||
case token.STRING:
|
case token.STRING:
|
||||||
|
|
|
||||||
|
|
@ -2,68 +2,11 @@
|
||||||
# Use of this source code is governed by a BSD-style
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
|
||||||
# DO NOT EDIT. Automatically generated by gobuild.
|
|
||||||
# gobuild -m ebnf.go parser.go >Makefile
|
|
||||||
|
|
||||||
D=
|
|
||||||
|
|
||||||
include $(GOROOT)/src/Make.$(GOARCH)
|
include $(GOROOT)/src/Make.$(GOARCH)
|
||||||
AR=gopack
|
|
||||||
|
|
||||||
default: packages
|
TARG=ebnf
|
||||||
|
GOFILES=\
|
||||||
|
ebnf.go\
|
||||||
|
parser.go\
|
||||||
|
|
||||||
clean:
|
include $(GOROOT)/src/Make.pkg
|
||||||
rm -rf *.[$(OS)] *.a [$(OS)].out _obj
|
|
||||||
|
|
||||||
test: packages
|
|
||||||
gotest
|
|
||||||
|
|
||||||
coverage: packages
|
|
||||||
gotest
|
|
||||||
6cov -g $$(pwd) | grep -v '_test\.go:'
|
|
||||||
|
|
||||||
%.$O: %.go
|
|
||||||
$(GC) -I_obj $*.go
|
|
||||||
|
|
||||||
%.$O: %.c
|
|
||||||
$(CC) $*.c
|
|
||||||
|
|
||||||
%.$O: %.s
|
|
||||||
$(AS) $*.s
|
|
||||||
|
|
||||||
O1=\
|
|
||||||
ebnf.$O\
|
|
||||||
|
|
||||||
O2=\
|
|
||||||
parser.$O\
|
|
||||||
|
|
||||||
|
|
||||||
phases: a1 a2
|
|
||||||
_obj$D/ebnf.a: phases
|
|
||||||
|
|
||||||
a1: $(O1)
|
|
||||||
$(AR) grc _obj$D/ebnf.a ebnf.$O
|
|
||||||
rm -f $(O1)
|
|
||||||
|
|
||||||
a2: $(O2)
|
|
||||||
$(AR) grc _obj$D/ebnf.a parser.$O
|
|
||||||
rm -f $(O2)
|
|
||||||
|
|
||||||
|
|
||||||
newpkg: clean
|
|
||||||
mkdir -p _obj$D
|
|
||||||
$(AR) grc _obj$D/ebnf.a
|
|
||||||
|
|
||||||
$(O1): newpkg
|
|
||||||
$(O2): a1
|
|
||||||
$(O3): a2
|
|
||||||
|
|
||||||
nuke: clean
|
|
||||||
rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/ebnf.a
|
|
||||||
|
|
||||||
packages: _obj$D/ebnf.a
|
|
||||||
|
|
||||||
install: packages
|
|
||||||
test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
|
|
||||||
cp _obj$D/ebnf.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/ebnf.a
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
package ebnf
|
package ebnf
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"ebnf";
|
|
||||||
"io";
|
"io";
|
||||||
"strings";
|
"strings";
|
||||||
"testing";
|
"testing";
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ package ebnf
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"container/vector";
|
"container/vector";
|
||||||
"ebnf";
|
|
||||||
"fmt";
|
"fmt";
|
||||||
"go/scanner";
|
"go/scanner";
|
||||||
"go/token";
|
"go/token";
|
||||||
|
|
@ -86,8 +85,6 @@ func (p *parser) parseToken() *Token {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func (p *parser) parseExpression() Expression
|
|
||||||
|
|
||||||
func (p *parser) parseTerm() (x Expression) {
|
func (p *parser) parseTerm() (x Expression) {
|
||||||
pos := p.pos;
|
pos := p.pos;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,59 +2,10 @@
|
||||||
# Use of this source code is governed by a BSD-style
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
# DO NOT EDIT. Automatically generated by gobuild.
|
|
||||||
# gobuild -m >Makefile
|
|
||||||
|
|
||||||
D=
|
|
||||||
|
|
||||||
include $(GOROOT)/src/Make.$(GOARCH)
|
include $(GOROOT)/src/Make.$(GOARCH)
|
||||||
AR=gopack
|
|
||||||
|
|
||||||
default: packages
|
TARG=exec
|
||||||
|
GOFILES=\
|
||||||
|
exec.go\
|
||||||
|
|
||||||
clean:
|
include $(GOROOT)/src/Make.pkg
|
||||||
rm -rf *.[$(OS)] *.a [$(OS)].out _obj
|
|
||||||
|
|
||||||
test: packages
|
|
||||||
gotest
|
|
||||||
|
|
||||||
coverage: packages
|
|
||||||
gotest
|
|
||||||
6cov -g `pwd` | grep -v '_test\.go:'
|
|
||||||
|
|
||||||
%.$O: %.go
|
|
||||||
$(GC) -I_obj $*.go
|
|
||||||
|
|
||||||
%.$O: %.c
|
|
||||||
$(CC) $*.c
|
|
||||||
|
|
||||||
%.$O: %.s
|
|
||||||
$(AS) $*.s
|
|
||||||
|
|
||||||
O1=\
|
|
||||||
exec.$O\
|
|
||||||
|
|
||||||
|
|
||||||
phases: a1
|
|
||||||
_obj$D/exec.a: phases
|
|
||||||
|
|
||||||
a1: $(O1)
|
|
||||||
$(AR) grc _obj$D/exec.a exec.$O
|
|
||||||
rm -f $(O1)
|
|
||||||
|
|
||||||
|
|
||||||
newpkg: clean
|
|
||||||
mkdir -p _obj$D
|
|
||||||
$(AR) grc _obj$D/exec.a
|
|
||||||
|
|
||||||
$(O1): newpkg
|
|
||||||
$(O2): a1
|
|
||||||
|
|
||||||
nuke: clean
|
|
||||||
rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/exec.a
|
|
||||||
|
|
||||||
packages: _obj$D/exec.a
|
|
||||||
|
|
||||||
install: packages
|
|
||||||
test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
|
|
||||||
cp _obj$D/exec.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/exec.a
|
|
||||||
|
|
|
||||||
|
|
@ -5,14 +5,13 @@
|
||||||
package exec
|
package exec
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"exec";
|
|
||||||
"io";
|
"io";
|
||||||
"testing";
|
"testing";
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestRunCat(t *testing.T) {
|
func TestRunCat(t *testing.T) {
|
||||||
cmd, err := exec.Run("/bin/cat", []string{"cat"}, nil,
|
cmd, err := Run("/bin/cat", []string{"cat"}, nil,
|
||||||
exec.Pipe, exec.Pipe, exec.DevNull);
|
Pipe, Pipe, DevNull);
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("opencmd /bin/cat: %v", err);
|
t.Fatalf("opencmd /bin/cat: %v", err);
|
||||||
}
|
}
|
||||||
|
|
@ -32,7 +31,7 @@ func TestRunCat(t *testing.T) {
|
||||||
|
|
||||||
func TestRunEcho(t *testing.T) {
|
func TestRunEcho(t *testing.T) {
|
||||||
cmd, err := Run("/bin/echo", []string{"echo", "hello", "world"}, nil,
|
cmd, err := Run("/bin/echo", []string{"echo", "hello", "world"}, nil,
|
||||||
exec.DevNull, exec.Pipe, exec.DevNull);
|
DevNull, Pipe, DevNull);
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("opencmd /bin/echo: %v", err);
|
t.Fatalf("opencmd /bin/echo: %v", err);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,59 +2,10 @@
|
||||||
# Use of this source code is governed by a BSD-style
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
# DO NOT EDIT. Automatically generated by gobuild.
|
|
||||||
# gobuild -m >Makefile
|
|
||||||
|
|
||||||
D=
|
|
||||||
|
|
||||||
include $(GOROOT)/src/Make.$(GOARCH)
|
include $(GOROOT)/src/Make.$(GOARCH)
|
||||||
AR=gopack
|
|
||||||
|
|
||||||
default: packages
|
TARG=exvar
|
||||||
|
GOFILES=\
|
||||||
|
exvar.go\
|
||||||
|
|
||||||
clean:
|
include $(GOROOT)/src/Make.pkg
|
||||||
rm -rf *.[$(OS)] *.a [$(OS)].out _obj
|
|
||||||
|
|
||||||
test: packages
|
|
||||||
gotest
|
|
||||||
|
|
||||||
coverage: packages
|
|
||||||
gotest
|
|
||||||
6cov -g `pwd` | grep -v '_test\.go:'
|
|
||||||
|
|
||||||
%.$O: %.go
|
|
||||||
$(GC) -I_obj $*.go
|
|
||||||
|
|
||||||
%.$O: %.c
|
|
||||||
$(CC) $*.c
|
|
||||||
|
|
||||||
%.$O: %.s
|
|
||||||
$(AS) $*.s
|
|
||||||
|
|
||||||
O1=\
|
|
||||||
exvar.$O\
|
|
||||||
|
|
||||||
|
|
||||||
phases: a1
|
|
||||||
_obj$D/exvar.a: phases
|
|
||||||
|
|
||||||
a1: $(O1)
|
|
||||||
$(AR) grc _obj$D/exvar.a exvar.$O
|
|
||||||
rm -f $(O1)
|
|
||||||
|
|
||||||
|
|
||||||
newpkg: clean
|
|
||||||
mkdir -p _obj$D
|
|
||||||
$(AR) grc _obj$D/exvar.a
|
|
||||||
|
|
||||||
$(O1): newpkg
|
|
||||||
$(O2): a1
|
|
||||||
|
|
||||||
nuke: clean
|
|
||||||
rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/exvar.a
|
|
||||||
|
|
||||||
packages: _obj$D/exvar.a
|
|
||||||
|
|
||||||
install: packages
|
|
||||||
test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
|
|
||||||
cp _obj$D/exvar.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/exvar.a
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
package exvar
|
package exvar
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"exvar";
|
|
||||||
"fmt";
|
"fmt";
|
||||||
"json";
|
"json";
|
||||||
"testing";
|
"testing";
|
||||||
|
|
|
||||||
|
|
@ -2,68 +2,11 @@
|
||||||
# Use of this source code is governed by a BSD-style
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
|
||||||
# DO NOT EDIT. Automatically generated by gobuild.
|
|
||||||
# gobuild -m ast.go filter.go >Makefile
|
|
||||||
|
|
||||||
D=/go/
|
|
||||||
|
|
||||||
include $(GOROOT)/src/Make.$(GOARCH)
|
include $(GOROOT)/src/Make.$(GOARCH)
|
||||||
AR=gopack
|
|
||||||
|
|
||||||
default: packages
|
TARG=go/ast
|
||||||
|
GOFILES=\
|
||||||
|
ast.go\
|
||||||
|
filter.go\
|
||||||
|
|
||||||
clean:
|
include $(GOROOT)/src/Make.pkg
|
||||||
rm -rf *.[$(OS)] *.a [$(OS)].out _obj
|
|
||||||
|
|
||||||
test: packages
|
|
||||||
gotest
|
|
||||||
|
|
||||||
coverage: packages
|
|
||||||
gotest
|
|
||||||
6cov -g $$(pwd) | grep -v '_test\.go:'
|
|
||||||
|
|
||||||
%.$O: %.go
|
|
||||||
$(GC) -I_obj $*.go
|
|
||||||
|
|
||||||
%.$O: %.c
|
|
||||||
$(CC) $*.c
|
|
||||||
|
|
||||||
%.$O: %.s
|
|
||||||
$(AS) $*.s
|
|
||||||
|
|
||||||
O1=\
|
|
||||||
ast.$O\
|
|
||||||
|
|
||||||
O2=\
|
|
||||||
filter.$O\
|
|
||||||
|
|
||||||
|
|
||||||
phases: a1 a2
|
|
||||||
_obj$D/ast.a: phases
|
|
||||||
|
|
||||||
a1: $(O1)
|
|
||||||
$(AR) grc _obj$D/ast.a ast.$O
|
|
||||||
rm -f $(O1)
|
|
||||||
|
|
||||||
a2: $(O2)
|
|
||||||
$(AR) grc _obj$D/ast.a filter.$O
|
|
||||||
rm -f $(O2)
|
|
||||||
|
|
||||||
|
|
||||||
newpkg: clean
|
|
||||||
mkdir -p _obj$D
|
|
||||||
$(AR) grc _obj$D/ast.a
|
|
||||||
|
|
||||||
$(O1): newpkg
|
|
||||||
$(O2): a1
|
|
||||||
$(O3): a2
|
|
||||||
|
|
||||||
nuke: clean
|
|
||||||
rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/ast.a
|
|
||||||
|
|
||||||
packages: _obj$D/ast.a
|
|
||||||
|
|
||||||
install: packages
|
|
||||||
test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
|
|
||||||
cp _obj$D/ast.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/ast.a
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
package ast
|
package ast
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go/ast";
|
|
||||||
"go/token";
|
"go/token";
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -39,8 +38,6 @@ func isExportedType(typ Expr) bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func filterType(typ Expr)
|
|
||||||
|
|
||||||
func filterFieldList(list []*Field) []*Field {
|
func filterFieldList(list []*Field) []*Field {
|
||||||
j := 0;
|
j := 0;
|
||||||
for _, f := range list {
|
for _, f := range list {
|
||||||
|
|
|
||||||
|
|
@ -2,67 +2,11 @@
|
||||||
# Use of this source code is governed by a BSD-style
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
# DO NOT EDIT. Automatically generated by gobuild.
|
|
||||||
# gobuild -m >Makefile
|
|
||||||
|
|
||||||
D=/go/
|
|
||||||
|
|
||||||
include $(GOROOT)/src/Make.$(GOARCH)
|
include $(GOROOT)/src/Make.$(GOARCH)
|
||||||
AR=gopack
|
|
||||||
|
|
||||||
default: packages
|
TARG=go/doc
|
||||||
|
GOFILES=\
|
||||||
|
comment.go\
|
||||||
|
doc.go\
|
||||||
|
|
||||||
clean:
|
include $(GOROOT)/src/Make.pkg
|
||||||
rm -rf *.[$(OS)] *.a [$(OS)].out _obj
|
|
||||||
|
|
||||||
test: packages
|
|
||||||
gotest
|
|
||||||
|
|
||||||
coverage: packages
|
|
||||||
gotest
|
|
||||||
6cov -g `pwd` | grep -v '_test\.go:'
|
|
||||||
|
|
||||||
%.$O: %.go
|
|
||||||
$(GC) -I_obj $*.go
|
|
||||||
|
|
||||||
%.$O: %.c
|
|
||||||
$(CC) $*.c
|
|
||||||
|
|
||||||
%.$O: %.s
|
|
||||||
$(AS) $*.s
|
|
||||||
|
|
||||||
O1=\
|
|
||||||
comment.$O\
|
|
||||||
|
|
||||||
O2=\
|
|
||||||
doc.$O\
|
|
||||||
|
|
||||||
|
|
||||||
phases: a1 a2
|
|
||||||
_obj$D/doc.a: phases
|
|
||||||
|
|
||||||
a1: $(O1)
|
|
||||||
$(AR) grc _obj$D/doc.a comment.$O
|
|
||||||
rm -f $(O1)
|
|
||||||
|
|
||||||
a2: $(O2)
|
|
||||||
$(AR) grc _obj$D/doc.a doc.$O
|
|
||||||
rm -f $(O2)
|
|
||||||
|
|
||||||
|
|
||||||
newpkg: clean
|
|
||||||
mkdir -p _obj$D
|
|
||||||
$(AR) grc _obj$D/doc.a
|
|
||||||
|
|
||||||
$(O1): newpkg
|
|
||||||
$(O2): a1
|
|
||||||
$(O3): a2
|
|
||||||
|
|
||||||
nuke: clean
|
|
||||||
rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/doc.a
|
|
||||||
|
|
||||||
packages: _obj$D/doc.a
|
|
||||||
|
|
||||||
install: packages
|
|
||||||
test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
|
|
||||||
cp _obj$D/doc.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/doc.a
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ import (
|
||||||
"container/vector";
|
"container/vector";
|
||||||
"fmt";
|
"fmt";
|
||||||
"go/ast";
|
"go/ast";
|
||||||
"go/doc";
|
|
||||||
"go/token";
|
"go/token";
|
||||||
"io";
|
"io";
|
||||||
"regexp";
|
"regexp";
|
||||||
|
|
@ -237,9 +236,6 @@ func (doc *docReader) addFile(src *ast.File) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
type PackageDoc struct
|
|
||||||
func (doc *docReader) newDoc(pkgname, importpath, filepath string, filenames []string) *PackageDoc
|
|
||||||
|
|
||||||
func NewFileDoc(file *ast.File) *PackageDoc {
|
func NewFileDoc(file *ast.File) *PackageDoc {
|
||||||
var r docReader;
|
var r docReader;
|
||||||
r.init();
|
r.init();
|
||||||
|
|
|
||||||
|
|
@ -2,68 +2,11 @@
|
||||||
# Use of this source code is governed by a BSD-style
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
|
||||||
# DO NOT EDIT. Automatically generated by gobuild.
|
|
||||||
# gobuild -m parser.go interface.go >Makefile
|
|
||||||
|
|
||||||
D=/go/
|
|
||||||
|
|
||||||
include $(GOROOT)/src/Make.$(GOARCH)
|
include $(GOROOT)/src/Make.$(GOARCH)
|
||||||
AR=gopack
|
|
||||||
|
|
||||||
default: packages
|
TARG=go/parser
|
||||||
|
GOFILES=\
|
||||||
|
interface.go\
|
||||||
|
parser.go\
|
||||||
|
|
||||||
clean:
|
include $(GOROOT)/src/Make.pkg
|
||||||
rm -rf *.[$(OS)] *.a [$(OS)].out _obj
|
|
||||||
|
|
||||||
test: packages
|
|
||||||
gotest
|
|
||||||
|
|
||||||
coverage: packages
|
|
||||||
gotest
|
|
||||||
6cov -g $$(pwd) | grep -v '_test\.go:'
|
|
||||||
|
|
||||||
%.$O: %.go
|
|
||||||
$(GC) -I_obj $*.go
|
|
||||||
|
|
||||||
%.$O: %.c
|
|
||||||
$(CC) $*.c
|
|
||||||
|
|
||||||
%.$O: %.s
|
|
||||||
$(AS) $*.s
|
|
||||||
|
|
||||||
O1=\
|
|
||||||
parser.$O\
|
|
||||||
|
|
||||||
O2=\
|
|
||||||
interface.$O\
|
|
||||||
|
|
||||||
|
|
||||||
phases: a1 a2
|
|
||||||
_obj$D/parser.a: phases
|
|
||||||
|
|
||||||
a1: $(O1)
|
|
||||||
$(AR) grc _obj$D/parser.a parser.$O
|
|
||||||
rm -f $(O1)
|
|
||||||
|
|
||||||
a2: $(O2)
|
|
||||||
$(AR) grc _obj$D/parser.a interface.$O
|
|
||||||
rm -f $(O2)
|
|
||||||
|
|
||||||
|
|
||||||
newpkg: clean
|
|
||||||
mkdir -p _obj$D
|
|
||||||
$(AR) grc _obj$D/parser.a
|
|
||||||
|
|
||||||
$(O1): newpkg
|
|
||||||
$(O2): a1
|
|
||||||
$(O3): a2
|
|
||||||
|
|
||||||
nuke: clean
|
|
||||||
rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/parser.a
|
|
||||||
|
|
||||||
packages: _obj$D/parser.a
|
|
||||||
|
|
||||||
install: packages
|
|
||||||
test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
|
|
||||||
cp _obj$D/parser.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/parser.a
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ import (
|
||||||
"bytes";
|
"bytes";
|
||||||
"fmt";
|
"fmt";
|
||||||
"go/ast";
|
"go/ast";
|
||||||
"go/parser";
|
|
||||||
"go/scanner";
|
"go/scanner";
|
||||||
"io";
|
"io";
|
||||||
"os";
|
"os";
|
||||||
|
|
|
||||||
|
|
@ -74,8 +74,6 @@ func scannerMode(mode uint) uint {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func (p *parser) next()
|
|
||||||
|
|
||||||
func (p *parser) init(filename string, src []byte, mode uint) {
|
func (p *parser) init(filename string, src []byte, mode uint) {
|
||||||
p.ErrorVector.Init();
|
p.ErrorVector.Init();
|
||||||
p.scanner.Init(filename, src, p, scannerMode(mode));
|
p.scanner.Init(filename, src, p, scannerMode(mode));
|
||||||
|
|
@ -267,13 +265,6 @@ func (p *parser) expect(tok token.Token) token.Position {
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Common productions
|
// Common productions
|
||||||
|
|
||||||
func (p *parser) tryType() ast.Expr
|
|
||||||
func (p *parser) parseStringList(x *ast.StringLit) []*ast.StringLit
|
|
||||||
func (p *parser) parseExpr() ast.Expr
|
|
||||||
func (p *parser) parseStmt() ast.Stmt
|
|
||||||
func (p *parser) parseDecl(getSemi bool) (decl ast.Decl, gotSemi bool)
|
|
||||||
|
|
||||||
|
|
||||||
func (p *parser) parseIdent() *ast.Ident {
|
func (p *parser) parseIdent() *ast.Ident {
|
||||||
if p.tok == token.IDENT {
|
if p.tok == token.IDENT {
|
||||||
x := &ast.Ident{p.pos, string(p.lit)};
|
x := &ast.Ident{p.pos, string(p.lit)};
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ package parser
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go/ast";
|
"go/ast";
|
||||||
"go/parser";
|
|
||||||
"os";
|
"os";
|
||||||
"testing";
|
"testing";
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -2,60 +2,10 @@
|
||||||
# Use of this source code is governed by a BSD-style
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
|
||||||
# DO NOT EDIT. Automatically generated by gobuild.
|
|
||||||
# gobuild -m >Makefile
|
|
||||||
|
|
||||||
D=/go/
|
|
||||||
|
|
||||||
include $(GOROOT)/src/Make.$(GOARCH)
|
include $(GOROOT)/src/Make.$(GOARCH)
|
||||||
AR=gopack
|
|
||||||
|
|
||||||
default: packages
|
TARG=go/printer
|
||||||
|
GOFILES=\
|
||||||
|
printer.go\
|
||||||
|
|
||||||
clean:
|
include $(GOROOT)/src/Make.pkg
|
||||||
rm -rf *.[$(OS)] *.a [$(OS)].out _obj
|
|
||||||
|
|
||||||
test: packages
|
|
||||||
gotest
|
|
||||||
|
|
||||||
coverage: packages
|
|
||||||
gotest
|
|
||||||
6cov -g $$(pwd) | grep -v '_test\.go:'
|
|
||||||
|
|
||||||
%.$O: %.go
|
|
||||||
$(GC) -I_obj $*.go
|
|
||||||
|
|
||||||
%.$O: %.c
|
|
||||||
$(CC) $*.c
|
|
||||||
|
|
||||||
%.$O: %.s
|
|
||||||
$(AS) $*.s
|
|
||||||
|
|
||||||
O1=\
|
|
||||||
printer.$O\
|
|
||||||
|
|
||||||
|
|
||||||
phases: a1
|
|
||||||
_obj$D/printer.a: phases
|
|
||||||
|
|
||||||
a1: $(O1)
|
|
||||||
$(AR) grc _obj$D/printer.a printer.$O
|
|
||||||
rm -f $(O1)
|
|
||||||
|
|
||||||
|
|
||||||
newpkg: clean
|
|
||||||
mkdir -p _obj$D
|
|
||||||
$(AR) grc _obj$D/printer.a
|
|
||||||
|
|
||||||
$(O1): newpkg
|
|
||||||
$(O2): a1
|
|
||||||
|
|
||||||
nuke: clean
|
|
||||||
rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/printer.a
|
|
||||||
|
|
||||||
packages: _obj$D/printer.a
|
|
||||||
|
|
||||||
install: packages
|
|
||||||
test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
|
|
||||||
cp _obj$D/printer.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/printer.a
|
|
||||||
|
|
|
||||||
|
|
@ -457,8 +457,6 @@ func (p *printer) lineComment(d *ast.CommentGroup) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func (p *printer) expr(x ast.Expr) bool
|
|
||||||
|
|
||||||
func (p *printer) identList(list []*ast.Ident) {
|
func (p *printer) identList(list []*ast.Ident) {
|
||||||
for i, x := range list {
|
for i, x := range list {
|
||||||
if i > 0 {
|
if i > 0 {
|
||||||
|
|
@ -595,8 +593,6 @@ func (p *printer) fieldList(lbrace token.Position, list []*ast.Field, rbrace tok
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Expressions
|
// Expressions
|
||||||
|
|
||||||
func (p *printer) stmt(s ast.Stmt) (optSemi bool)
|
|
||||||
|
|
||||||
// Returns true if a separating semicolon is optional.
|
// Returns true if a separating semicolon is optional.
|
||||||
func (p *printer) expr1(expr ast.Expr, prec1 int) (optSemi bool) {
|
func (p *printer) expr1(expr ast.Expr, prec1 int) (optSemi bool) {
|
||||||
p.print(expr.Pos());
|
p.print(expr.Pos());
|
||||||
|
|
@ -781,8 +777,6 @@ func (p *printer) expr(x ast.Expr) bool {
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Statements
|
// Statements
|
||||||
|
|
||||||
func (p *printer) decl(decl ast.Decl) (comment *ast.CommentGroup, optSemi bool)
|
|
||||||
|
|
||||||
// Print the statement list indented, but without a newline after the last statement.
|
// Print the statement list indented, but without a newline after the last statement.
|
||||||
func (p *printer) stmtList(list []ast.Stmt) {
|
func (p *printer) stmtList(list []ast.Stmt) {
|
||||||
if len(list) > 0 {
|
if len(list) > 0 {
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ import (
|
||||||
"io";
|
"io";
|
||||||
"go/ast";
|
"go/ast";
|
||||||
"go/parser";
|
"go/parser";
|
||||||
"go/printer";
|
|
||||||
"os";
|
"os";
|
||||||
"path";
|
"path";
|
||||||
"testing";
|
"testing";
|
||||||
|
|
|
||||||
|
|
@ -2,68 +2,11 @@
|
||||||
# Use of this source code is governed by a BSD-style
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
|
||||||
# DO NOT EDIT. Automatically generated by gobuild.
|
|
||||||
# gobuild -m scanner.go errors.go >Makefile
|
|
||||||
|
|
||||||
D=/go/
|
|
||||||
|
|
||||||
include $(GOROOT)/src/Make.$(GOARCH)
|
include $(GOROOT)/src/Make.$(GOARCH)
|
||||||
AR=gopack
|
|
||||||
|
|
||||||
default: packages
|
TARG=go/scanner
|
||||||
|
GOFILES=\
|
||||||
|
errors.go\
|
||||||
|
scanner.go\
|
||||||
|
|
||||||
clean:
|
include $(GOROOT)/src/Make.pkg
|
||||||
rm -rf *.[$(OS)] *.a [$(OS)].out _obj
|
|
||||||
|
|
||||||
test: packages
|
|
||||||
gotest
|
|
||||||
|
|
||||||
coverage: packages
|
|
||||||
gotest
|
|
||||||
6cov -g $$(pwd) | grep -v '_test\.go:'
|
|
||||||
|
|
||||||
%.$O: %.go
|
|
||||||
$(GC) -I_obj $*.go
|
|
||||||
|
|
||||||
%.$O: %.c
|
|
||||||
$(CC) $*.c
|
|
||||||
|
|
||||||
%.$O: %.s
|
|
||||||
$(AS) $*.s
|
|
||||||
|
|
||||||
O1=\
|
|
||||||
errors.$O\
|
|
||||||
|
|
||||||
O2=\
|
|
||||||
scanner.$O\
|
|
||||||
|
|
||||||
|
|
||||||
phases: a1 a2
|
|
||||||
_obj$D/scanner.a: phases
|
|
||||||
|
|
||||||
a1: $(O1)
|
|
||||||
$(AR) grc _obj$D/scanner.a errors.$O
|
|
||||||
rm -f $(O1)
|
|
||||||
|
|
||||||
a2: $(O2)
|
|
||||||
$(AR) grc _obj$D/scanner.a scanner.$O
|
|
||||||
rm -f $(O2)
|
|
||||||
|
|
||||||
|
|
||||||
newpkg: clean
|
|
||||||
mkdir -p _obj$D
|
|
||||||
$(AR) grc _obj$D/scanner.a
|
|
||||||
|
|
||||||
$(O1): newpkg
|
|
||||||
$(O2): a1
|
|
||||||
$(O3): a2
|
|
||||||
|
|
||||||
nuke: clean
|
|
||||||
rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/scanner.a
|
|
||||||
|
|
||||||
packages: _obj$D/scanner.a
|
|
||||||
|
|
||||||
install: packages
|
|
||||||
test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
|
|
||||||
cp _obj$D/scanner.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/scanner.a
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ package scanner
|
||||||
import (
|
import (
|
||||||
"bytes";
|
"bytes";
|
||||||
"go/token";
|
"go/token";
|
||||||
"go/scanner";
|
|
||||||
"strconv";
|
"strconv";
|
||||||
"unicode";
|
"unicode";
|
||||||
"utf8";
|
"utf8";
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
package scanner
|
package scanner
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go/scanner";
|
|
||||||
"go/token";
|
"go/token";
|
||||||
"os";
|
"os";
|
||||||
"strings";
|
"strings";
|
||||||
|
|
@ -207,7 +206,7 @@ func TestScan(t *testing.T) {
|
||||||
// verify scan
|
// verify scan
|
||||||
index := 0;
|
index := 0;
|
||||||
epos := token.Position{"", 0, 1, 1};
|
epos := token.Position{"", 0, 1, 1};
|
||||||
nerrors := scanner.Tokenize("", strings.Bytes(src), &TestErrorHandler{t}, scanner.ScanComments,
|
nerrors := Tokenize("", strings.Bytes(src), &TestErrorHandler{t}, ScanComments,
|
||||||
func (pos token.Position, tok token.Token, litb []byte) bool {
|
func (pos token.Position, tok token.Token, litb []byte) bool {
|
||||||
e := elt{token.EOF, "", special};
|
e := elt{token.EOF, "", special};
|
||||||
if index < len(tokens) {
|
if index < len(tokens) {
|
||||||
|
|
@ -280,7 +279,7 @@ func TestLineComments(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify scan
|
// verify scan
|
||||||
var S scanner.Scanner;
|
var S Scanner;
|
||||||
S.Init("TestLineComments", strings.Bytes(src), nil, 0);
|
S.Init("TestLineComments", strings.Bytes(src), nil, 0);
|
||||||
for _, s := range segments {
|
for _, s := range segments {
|
||||||
pos, tok, lit := S.Scan();
|
pos, tok, lit := S.Scan();
|
||||||
|
|
@ -295,7 +294,7 @@ func TestLineComments(t *testing.T) {
|
||||||
|
|
||||||
// Verify that initializing the same scanner more then once works correctly.
|
// Verify that initializing the same scanner more then once works correctly.
|
||||||
func TestInit(t *testing.T) {
|
func TestInit(t *testing.T) {
|
||||||
var s scanner.Scanner;
|
var s Scanner;
|
||||||
|
|
||||||
// 1st init
|
// 1st init
|
||||||
s.Init("", strings.Bytes("if true { }"), nil, 0);
|
s.Init("", strings.Bytes("if true { }"), nil, 0);
|
||||||
|
|
@ -320,10 +319,10 @@ func TestInit(t *testing.T) {
|
||||||
|
|
||||||
|
|
||||||
func TestIllegalChars(t *testing.T) {
|
func TestIllegalChars(t *testing.T) {
|
||||||
var s scanner.Scanner;
|
var s Scanner;
|
||||||
|
|
||||||
const src = "*?*$*@*";
|
const src = "*?*$*@*";
|
||||||
s.Init("", strings.Bytes(src), &TestErrorHandler{t}, scanner.AllowIllegalChars);
|
s.Init("", strings.Bytes(src), &TestErrorHandler{t}, AllowIllegalChars);
|
||||||
for offs, ch := range src {
|
for offs, ch := range src {
|
||||||
pos, tok, lit := s.Scan();
|
pos, tok, lit := s.Scan();
|
||||||
if pos.Offset != offs {
|
if pos.Offset != offs {
|
||||||
|
|
@ -352,9 +351,9 @@ func TestStdErrorHander(t *testing.T) {
|
||||||
"@ @ @" // original file, line 1 again
|
"@ @ @" // original file, line 1 again
|
||||||
;
|
;
|
||||||
|
|
||||||
var s scanner.Scanner;
|
var s Scanner;
|
||||||
v := NewErrorVector();
|
v := NewErrorVector();
|
||||||
nerrors := scanner.Tokenize("File1", strings.Bytes(src), v, 0,
|
nerrors := Tokenize("File1", strings.Bytes(src), v, 0,
|
||||||
func (pos token.Position, tok token.Token, litb []byte) bool {
|
func (pos token.Position, tok token.Token, litb []byte) bool {
|
||||||
return tok != token.EOF;
|
return tok != token.EOF;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,59 +2,10 @@
|
||||||
# Use of this source code is governed by a BSD-style
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
# DO NOT EDIT. Automatically generated by gobuild.
|
|
||||||
# gobuild -m >Makefile
|
|
||||||
|
|
||||||
D=/go/
|
|
||||||
|
|
||||||
include $(GOROOT)/src/Make.$(GOARCH)
|
include $(GOROOT)/src/Make.$(GOARCH)
|
||||||
AR=gopack
|
|
||||||
|
|
||||||
default: packages
|
TARG=go/token
|
||||||
|
GOFILES=\
|
||||||
|
token.go\
|
||||||
|
|
||||||
clean:
|
include $(GOROOT)/src/Make.pkg
|
||||||
rm -rf *.[$(OS)] *.a [$(OS)].out _obj
|
|
||||||
|
|
||||||
test: packages
|
|
||||||
gotest
|
|
||||||
|
|
||||||
coverage: packages
|
|
||||||
gotest
|
|
||||||
6cov -g `pwd` | grep -v '_test\.go:'
|
|
||||||
|
|
||||||
%.$O: %.go
|
|
||||||
$(GC) -I_obj $*.go
|
|
||||||
|
|
||||||
%.$O: %.c
|
|
||||||
$(CC) $*.c
|
|
||||||
|
|
||||||
%.$O: %.s
|
|
||||||
$(AS) $*.s
|
|
||||||
|
|
||||||
O1=\
|
|
||||||
token.$O\
|
|
||||||
|
|
||||||
|
|
||||||
phases: a1
|
|
||||||
_obj$D/token.a: phases
|
|
||||||
|
|
||||||
a1: $(O1)
|
|
||||||
$(AR) grc _obj$D/token.a token.$O
|
|
||||||
rm -f $(O1)
|
|
||||||
|
|
||||||
|
|
||||||
newpkg: clean
|
|
||||||
mkdir -p _obj$D
|
|
||||||
$(AR) grc _obj$D/token.a
|
|
||||||
|
|
||||||
$(O1): newpkg
|
|
||||||
$(O2): a1
|
|
||||||
|
|
||||||
nuke: clean
|
|
||||||
rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/token.a
|
|
||||||
|
|
||||||
packages: _obj$D/token.a
|
|
||||||
|
|
||||||
install: packages
|
|
||||||
test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
|
|
||||||
cp _obj$D/token.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/token.a
|
|
||||||
|
|
|
||||||
|
|
@ -2,59 +2,10 @@
|
||||||
# Use of this source code is governed by a BSD-style
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
# DO NOT EDIT. Automatically generated by gobuild.
|
|
||||||
# gobuild -m >Makefile
|
|
||||||
|
|
||||||
D=
|
|
||||||
|
|
||||||
include $(GOROOT)/src/Make.$(GOARCH)
|
include $(GOROOT)/src/Make.$(GOARCH)
|
||||||
AR=gopack
|
|
||||||
|
|
||||||
default: packages
|
TARG=hash
|
||||||
|
GOFILES=\
|
||||||
|
hash.go\
|
||||||
|
|
||||||
clean:
|
include $(GOROOT)/src/Make.pkg
|
||||||
rm -rf *.[$(OS)] *.a [$(OS)].out _obj
|
|
||||||
|
|
||||||
test: packages
|
|
||||||
gotest
|
|
||||||
|
|
||||||
coverage: packages
|
|
||||||
gotest
|
|
||||||
6cov -g `pwd` | grep -v '_test\.go:'
|
|
||||||
|
|
||||||
%.$O: %.go
|
|
||||||
$(GC) -I_obj $*.go
|
|
||||||
|
|
||||||
%.$O: %.c
|
|
||||||
$(CC) $*.c
|
|
||||||
|
|
||||||
%.$O: %.s
|
|
||||||
$(AS) $*.s
|
|
||||||
|
|
||||||
O1=\
|
|
||||||
hash.$O\
|
|
||||||
|
|
||||||
|
|
||||||
phases: a1
|
|
||||||
_obj$D/hash.a: phases
|
|
||||||
|
|
||||||
a1: $(O1)
|
|
||||||
$(AR) grc _obj$D/hash.a hash.$O
|
|
||||||
rm -f $(O1)
|
|
||||||
|
|
||||||
|
|
||||||
newpkg: clean
|
|
||||||
mkdir -p _obj$D
|
|
||||||
$(AR) grc _obj$D/hash.a
|
|
||||||
|
|
||||||
$(O1): newpkg
|
|
||||||
$(O2): a1
|
|
||||||
|
|
||||||
nuke: clean
|
|
||||||
rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/hash.a
|
|
||||||
|
|
||||||
packages: _obj$D/hash.a
|
|
||||||
|
|
||||||
install: packages
|
|
||||||
test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
|
|
||||||
cp _obj$D/hash.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/hash.a
|
|
||||||
|
|
|
||||||
|
|
@ -2,59 +2,10 @@
|
||||||
# Use of this source code is governed by a BSD-style
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
# DO NOT EDIT. Automatically generated by gobuild.
|
|
||||||
# gobuild -m >Makefile
|
|
||||||
|
|
||||||
D=/hash/
|
|
||||||
|
|
||||||
include $(GOROOT)/src/Make.$(GOARCH)
|
include $(GOROOT)/src/Make.$(GOARCH)
|
||||||
AR=gopack
|
|
||||||
|
|
||||||
default: packages
|
TARG=hash/adler32
|
||||||
|
GOFILES=\
|
||||||
|
adler32.go\
|
||||||
|
|
||||||
clean:
|
include $(GOROOT)/src/Make.pkg
|
||||||
rm -rf *.[$(OS)] *.a [$(OS)].out _obj
|
|
||||||
|
|
||||||
test: packages
|
|
||||||
gotest
|
|
||||||
|
|
||||||
coverage: packages
|
|
||||||
gotest
|
|
||||||
6cov -g `pwd` | grep -v '_test\.go:'
|
|
||||||
|
|
||||||
%.$O: %.go
|
|
||||||
$(GC) -I_obj $*.go
|
|
||||||
|
|
||||||
%.$O: %.c
|
|
||||||
$(CC) $*.c
|
|
||||||
|
|
||||||
%.$O: %.s
|
|
||||||
$(AS) $*.s
|
|
||||||
|
|
||||||
O1=\
|
|
||||||
adler32.$O\
|
|
||||||
|
|
||||||
|
|
||||||
phases: a1
|
|
||||||
_obj$D/adler32.a: phases
|
|
||||||
|
|
||||||
a1: $(O1)
|
|
||||||
$(AR) grc _obj$D/adler32.a adler32.$O
|
|
||||||
rm -f $(O1)
|
|
||||||
|
|
||||||
|
|
||||||
newpkg: clean
|
|
||||||
mkdir -p _obj$D
|
|
||||||
$(AR) grc _obj$D/adler32.a
|
|
||||||
|
|
||||||
$(O1): newpkg
|
|
||||||
$(O2): a1
|
|
||||||
|
|
||||||
nuke: clean
|
|
||||||
rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/adler32.a
|
|
||||||
|
|
||||||
packages: _obj$D/adler32.a
|
|
||||||
|
|
||||||
install: packages
|
|
||||||
test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
|
|
||||||
cp _obj$D/adler32.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/adler32.a
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
package adler32
|
package adler32
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"hash/adler32";
|
|
||||||
"io";
|
"io";
|
||||||
"testing";
|
"testing";
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -2,59 +2,10 @@
|
||||||
# Use of this source code is governed by a BSD-style
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
# DO NOT EDIT. Automatically generated by gobuild.
|
|
||||||
# gobuild -m >Makefile
|
|
||||||
|
|
||||||
D=/hash/
|
|
||||||
|
|
||||||
include $(GOROOT)/src/Make.$(GOARCH)
|
include $(GOROOT)/src/Make.$(GOARCH)
|
||||||
AR=gopack
|
|
||||||
|
|
||||||
default: packages
|
TARG=hash/crc32
|
||||||
|
GOFILES=\
|
||||||
|
crc32.go\
|
||||||
|
|
||||||
clean:
|
include $(GOROOT)/src/Make.pkg
|
||||||
rm -rf *.[$(OS)] *.a [$(OS)].out _obj
|
|
||||||
|
|
||||||
test: packages
|
|
||||||
gotest
|
|
||||||
|
|
||||||
coverage: packages
|
|
||||||
gotest
|
|
||||||
6cov -g `pwd` | grep -v '_test\.go:'
|
|
||||||
|
|
||||||
%.$O: %.go
|
|
||||||
$(GC) -I_obj $*.go
|
|
||||||
|
|
||||||
%.$O: %.c
|
|
||||||
$(CC) $*.c
|
|
||||||
|
|
||||||
%.$O: %.s
|
|
||||||
$(AS) $*.s
|
|
||||||
|
|
||||||
O1=\
|
|
||||||
crc32.$O\
|
|
||||||
|
|
||||||
|
|
||||||
phases: a1
|
|
||||||
_obj$D/crc32.a: phases
|
|
||||||
|
|
||||||
a1: $(O1)
|
|
||||||
$(AR) grc _obj$D/crc32.a crc32.$O
|
|
||||||
rm -f $(O1)
|
|
||||||
|
|
||||||
|
|
||||||
newpkg: clean
|
|
||||||
mkdir -p _obj$D
|
|
||||||
$(AR) grc _obj$D/crc32.a
|
|
||||||
|
|
||||||
$(O1): newpkg
|
|
||||||
$(O2): a1
|
|
||||||
|
|
||||||
nuke: clean
|
|
||||||
rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/crc32.a
|
|
||||||
|
|
||||||
packages: _obj$D/crc32.a
|
|
||||||
|
|
||||||
install: packages
|
|
||||||
test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
|
|
||||||
cp _obj$D/crc32.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/crc32.a
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
package crc32
|
package crc32
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"hash/crc32";
|
|
||||||
"io";
|
"io";
|
||||||
"testing";
|
"testing";
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -2,85 +2,15 @@
|
||||||
# Use of this source code is governed by a BSD-style
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
# DO NOT EDIT. Automatically generated by gobuild.
|
|
||||||
# gobuild -m >Makefile
|
|
||||||
|
|
||||||
D=
|
|
||||||
|
|
||||||
include $(GOROOT)/src/Make.$(GOARCH)
|
include $(GOROOT)/src/Make.$(GOARCH)
|
||||||
AR=gopack
|
|
||||||
|
|
||||||
default: packages
|
TARG=http
|
||||||
|
GOFILES=\
|
||||||
|
client.go\
|
||||||
|
fs.go\
|
||||||
|
request.go\
|
||||||
|
server.go\
|
||||||
|
status.go\
|
||||||
|
url.go\
|
||||||
|
|
||||||
clean:
|
include $(GOROOT)/src/Make.pkg
|
||||||
rm -rf *.[$(OS)] *.a [$(OS)].out _obj
|
|
||||||
|
|
||||||
test: packages
|
|
||||||
gotest
|
|
||||||
|
|
||||||
coverage: packages
|
|
||||||
gotest
|
|
||||||
6cov -g `pwd` | grep -v '_test\.go:'
|
|
||||||
|
|
||||||
%.$O: %.go
|
|
||||||
$(GC) -I_obj $*.go
|
|
||||||
|
|
||||||
%.$O: %.c
|
|
||||||
$(CC) $*.c
|
|
||||||
|
|
||||||
%.$O: %.s
|
|
||||||
$(AS) $*.s
|
|
||||||
|
|
||||||
O1=\
|
|
||||||
status.$O\
|
|
||||||
url.$O\
|
|
||||||
|
|
||||||
O2=\
|
|
||||||
request.$O\
|
|
||||||
|
|
||||||
O3=\
|
|
||||||
client.$O\
|
|
||||||
server.$O\
|
|
||||||
|
|
||||||
O4=\
|
|
||||||
fs.$O\
|
|
||||||
|
|
||||||
|
|
||||||
phases: a1 a2 a3 a4
|
|
||||||
_obj$D/http.a: phases
|
|
||||||
|
|
||||||
a1: $(O1)
|
|
||||||
$(AR) grc _obj$D/http.a status.$O url.$O
|
|
||||||
rm -f $(O1)
|
|
||||||
|
|
||||||
a2: $(O2)
|
|
||||||
$(AR) grc _obj$D/http.a request.$O
|
|
||||||
rm -f $(O2)
|
|
||||||
|
|
||||||
a3: $(O3)
|
|
||||||
$(AR) grc _obj$D/http.a client.$O server.$O
|
|
||||||
rm -f $(O3)
|
|
||||||
|
|
||||||
a4: $(O4)
|
|
||||||
$(AR) grc _obj$D/http.a fs.$O
|
|
||||||
rm -f $(O4)
|
|
||||||
|
|
||||||
|
|
||||||
newpkg: clean
|
|
||||||
mkdir -p _obj$D
|
|
||||||
$(AR) grc _obj$D/http.a
|
|
||||||
|
|
||||||
$(O1): newpkg
|
|
||||||
$(O2): a1
|
|
||||||
$(O3): a2
|
|
||||||
$(O4): a3
|
|
||||||
$(O5): a4
|
|
||||||
|
|
||||||
nuke: clean
|
|
||||||
rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/http.a
|
|
||||||
|
|
||||||
packages: _obj$D/http.a
|
|
||||||
|
|
||||||
install: packages
|
|
||||||
test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
|
|
||||||
cp _obj$D/http.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/http.a
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@ package http
|
||||||
import (
|
import (
|
||||||
"bufio";
|
"bufio";
|
||||||
"fmt";
|
"fmt";
|
||||||
"http";
|
|
||||||
"io";
|
"io";
|
||||||
"log";
|
"log";
|
||||||
"net";
|
"net";
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ package http
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt";
|
"fmt";
|
||||||
"http";
|
|
||||||
"io";
|
"io";
|
||||||
"strings";
|
"strings";
|
||||||
"testing";
|
"testing";
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ package http
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt";
|
"fmt";
|
||||||
"http";
|
|
||||||
"io";
|
"io";
|
||||||
"os";
|
"os";
|
||||||
"path";
|
"path";
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@ import (
|
||||||
"bytes";
|
"bytes";
|
||||||
"container/vector";
|
"container/vector";
|
||||||
"fmt";
|
"fmt";
|
||||||
"http";
|
|
||||||
"io";
|
"io";
|
||||||
"os";
|
"os";
|
||||||
"strconv";
|
"strconv";
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ package http
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt";
|
"fmt";
|
||||||
"http";
|
|
||||||
"os";
|
"os";
|
||||||
"testing";
|
"testing";
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@ package http
|
||||||
import (
|
import (
|
||||||
"bufio";
|
"bufio";
|
||||||
"fmt";
|
"fmt";
|
||||||
"http";
|
|
||||||
"io";
|
"io";
|
||||||
"log";
|
"log";
|
||||||
"net";
|
"net";
|
||||||
|
|
@ -70,8 +69,6 @@ func newConn(rwc io.ReadWriteCloser, raddr string, handler Handler) (c *Conn, er
|
||||||
return c, nil
|
return c, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Conn) SetHeader(hdr, val string)
|
|
||||||
|
|
||||||
// Read next request from connection.
|
// Read next request from connection.
|
||||||
func (c *Conn) readRequest() (req *Request, err os.Error) {
|
func (c *Conn) readRequest() (req *Request, err os.Error) {
|
||||||
if c.hijacked {
|
if c.hijacked {
|
||||||
|
|
@ -547,7 +544,6 @@ func Serve(l net.Listener, handler Handler) os.Error {
|
||||||
// package main
|
// package main
|
||||||
//
|
//
|
||||||
// import (
|
// import (
|
||||||
// "http";
|
|
||||||
// "io";
|
// "io";
|
||||||
// )
|
// )
|
||||||
//
|
//
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ import (
|
||||||
"exvar";
|
"exvar";
|
||||||
"flag";
|
"flag";
|
||||||
"fmt";
|
"fmt";
|
||||||
"http";
|
|
||||||
"io";
|
"io";
|
||||||
"log";
|
"log";
|
||||||
"net";
|
"net";
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ package http
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt";
|
"fmt";
|
||||||
"http";
|
|
||||||
"os";
|
"os";
|
||||||
"reflect";
|
"reflect";
|
||||||
"testing";
|
"testing";
|
||||||
|
|
@ -14,7 +13,7 @@ import (
|
||||||
|
|
||||||
// TODO(rsc):
|
// TODO(rsc):
|
||||||
// test URLUnescape
|
// test URLUnescape
|
||||||
// test URLEscape
|
// test URLEscape
|
||||||
// test ParseURL
|
// test ParseURL
|
||||||
|
|
||||||
type URLTest struct {
|
type URLTest struct {
|
||||||
|
|
|
||||||
|
|
@ -2,68 +2,12 @@
|
||||||
# Use of this source code is governed by a BSD-style
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
# DO NOT EDIT. Automatically generated by gobuild.
|
|
||||||
# gobuild -m >Makefile
|
|
||||||
|
|
||||||
D=
|
|
||||||
|
|
||||||
include $(GOROOT)/src/Make.$(GOARCH)
|
include $(GOROOT)/src/Make.$(GOARCH)
|
||||||
AR=gopack
|
|
||||||
|
|
||||||
default: packages
|
TARG=json
|
||||||
|
GOFILES=\
|
||||||
|
generic.go\
|
||||||
|
parse.go\
|
||||||
|
struct.go\
|
||||||
|
|
||||||
clean:
|
include $(GOROOT)/src/Make.pkg
|
||||||
rm -rf *.[$(OS)] *.a [$(OS)].out _obj
|
|
||||||
|
|
||||||
test: packages
|
|
||||||
gotest
|
|
||||||
|
|
||||||
coverage: packages
|
|
||||||
gotest
|
|
||||||
6cov -g `pwd` | grep -v '_test\.go:'
|
|
||||||
|
|
||||||
%.$O: %.go
|
|
||||||
$(GC) -I_obj $*.go
|
|
||||||
|
|
||||||
%.$O: %.c
|
|
||||||
$(CC) $*.c
|
|
||||||
|
|
||||||
%.$O: %.s
|
|
||||||
$(AS) $*.s
|
|
||||||
|
|
||||||
O1=\
|
|
||||||
parse.$O\
|
|
||||||
|
|
||||||
O2=\
|
|
||||||
generic.$O\
|
|
||||||
struct.$O\
|
|
||||||
|
|
||||||
|
|
||||||
phases: a1 a2
|
|
||||||
_obj$D/json.a: phases
|
|
||||||
|
|
||||||
a1: $(O1)
|
|
||||||
$(AR) grc _obj$D/json.a parse.$O
|
|
||||||
rm -f $(O1)
|
|
||||||
|
|
||||||
a2: $(O2)
|
|
||||||
$(AR) grc _obj$D/json.a generic.$O struct.$O
|
|
||||||
rm -f $(O2)
|
|
||||||
|
|
||||||
|
|
||||||
newpkg: clean
|
|
||||||
mkdir -p _obj$D
|
|
||||||
$(AR) grc _obj$D/json.a
|
|
||||||
|
|
||||||
$(O1): newpkg
|
|
||||||
$(O2): a1
|
|
||||||
$(O3): a2
|
|
||||||
|
|
||||||
nuke: clean
|
|
||||||
rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/json.a
|
|
||||||
|
|
||||||
packages: _obj$D/json.a
|
|
||||||
|
|
||||||
install: packages
|
|
||||||
test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
|
|
||||||
cp _obj$D/json.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/json.a
|
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue