diff options
author | Russ Cox <rsc@golang.org> | 2009-08-12 13:19:17 -0700 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2009-08-12 13:19:17 -0700 |
commit | 2ee4549f599ed214693abf75163176f178b4188c (patch) | |
tree | c9dbc55a8447806706f8ae757a04c3c41b815835 /src/pkg/archive | |
parent | 5ff5b6823c8a023da5c9d6ccc2effe7fad8447f6 (diff) | |
download | golang-2ee4549f599ed214693abf75163176f178b4188c.tar.gz |
convert non-low-level non-google pkg code
to whole-package compilation.
R=r
OCL=33070
CL=33101
Diffstat (limited to 'src/pkg/archive')
-rw-r--r-- | src/pkg/archive/tar/Makefile | 69 | ||||
-rw-r--r-- | src/pkg/archive/tar/reader.go | 10 | ||||
-rw-r--r-- | src/pkg/archive/tar/reader_test.go | 1 | ||||
-rw-r--r-- | src/pkg/archive/tar/writer.go | 3 | ||||
-rw-r--r-- | src/pkg/archive/tar/writer_test.go | 1 |
5 files changed, 10 insertions, 74 deletions
diff --git a/src/pkg/archive/tar/Makefile b/src/pkg/archive/tar/Makefile index 78734ef58..debe06284 100644 --- a/src/pkg/archive/tar/Makefile +++ b/src/pkg/archive/tar/Makefile @@ -2,69 +2,12 @@ # Use of this source code is governed by a BSD-style # 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) -AR=gopack - -default: packages - -clean: - 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 +TARG=archive/tar +GOFILES=\ + common.go\ + reader.go\ + writer.go\ -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 +include $(GOROOT)/src/Make.pkg diff --git a/src/pkg/archive/tar/reader.go b/src/pkg/archive/tar/reader.go index 56b840448..044d5ab2e 100644 --- a/src/pkg/archive/tar/reader.go +++ b/src/pkg/archive/tar/reader.go @@ -8,7 +8,6 @@ package tar // - pax extensions import ( - "archive/tar"; "bytes"; "io"; "os"; @@ -25,8 +24,8 @@ var ( // and then it can be treated as an io.Reader to access the file's data. // // Example: -// tr := tar.NewReader(r); -// for { +// tr := tar.NewReader(r); +// for { // hdr, err := tr.Next(); // if err != nil { // // handle error @@ -36,7 +35,7 @@ var ( // break // } // io.Copy(tr, data); -// } +// } type Reader struct { r io.Reader; err os.Error; @@ -44,9 +43,6 @@ type Reader struct { 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. func NewReader(r io.Reader) *Reader { return &Reader{ r: r } diff --git a/src/pkg/archive/tar/reader_test.go b/src/pkg/archive/tar/reader_test.go index 428f73e60..cc3f8feb4 100644 --- a/src/pkg/archive/tar/reader_test.go +++ b/src/pkg/archive/tar/reader_test.go @@ -5,7 +5,6 @@ package tar import ( - "archive/tar"; "bytes"; "fmt"; "io"; diff --git a/src/pkg/archive/tar/writer.go b/src/pkg/archive/tar/writer.go index fbb0031fc..b3ce6b5c1 100644 --- a/src/pkg/archive/tar/writer.go +++ b/src/pkg/archive/tar/writer.go @@ -8,7 +8,6 @@ package tar // - catch more errors (no first header, write after close, etc.) import ( - "archive/tar"; "bytes"; "io"; "os"; @@ -28,7 +27,7 @@ var ( // writing at most hdr.Size bytes in total. // // Example: -// tw := tar.NewWriter(w); +// tw := tar.NewWriter(w); // hdr := new(Header); // hdr.Size = length of data in bytes; // // populate other hdr fields as desired diff --git a/src/pkg/archive/tar/writer_test.go b/src/pkg/archive/tar/writer_test.go index 5ada36b53..775882c10 100644 --- a/src/pkg/archive/tar/writer_test.go +++ b/src/pkg/archive/tar/writer_test.go @@ -5,7 +5,6 @@ package tar import ( - "archive/tar"; "bytes"; "fmt"; "io"; |