1
0
mirror of https://github.com/golang/go synced 2024-10-04 15:21:22 -06:00
Commit Graph

1970 Commits

Author SHA1 Message Date
Rob Pike
30ab8cf792 template: retain leading space if the line is not an action.
R=rsc
CC=golang-dev
https://golang.org/cl/1985042
2010-08-17 09:44:16 +10:00
Rob Pike
316961c172 fmt/print: remove a TODO regarding printing renamed byte slices.
the solution must work around a weakness in the reflection library:
there is no way to do type-safe conversions under reflection.

R=rsc
CC=golang-dev
https://golang.org/cl/2000041
2010-08-17 08:34:40 +10:00
Rob Pike
69fe3dd754 regexp: grow slices dynamically in the 'All' routines.
R=rsc
CC=golang-dev
https://golang.org/cl/1953044
2010-08-16 15:17:34 -07:00
Mikkel Krautz
c47123d07b crypto/tls: client certificate support.
This changeset implements client certificate support in crypto/tls
for both handshake_server.go and handshake_client.go

The updated server implementation sends an empty CertificateAuthorities
field in the CertificateRequest, thus allowing clients to send any
certificates they wish. Likewise, the client code will only respond
with its certificate when the server requests a certificate with this
field empty.

R=agl, rsc, agl1
CC=golang-dev
https://golang.org/cl/1975042
2010-08-16 11:22:22 -04:00
Nigel Tao
07053ac6e4 image/png: support 16-bit color.
R=r, mpl
CC=golang-dev
https://golang.org/cl/1944043
2010-08-16 23:33:20 +10:00
Rob Pike
b21611b963 fmt/print: give %p priority, analogous to %T
Fixes #1024.

R=rsc
CC=golang-dev
https://golang.org/cl/1961042
2010-08-14 07:37:03 +10:00
Robert Griesemer
1f9dfa294f go AST: First step towards augmenting AST with full type information.
- change ast.Ident back to contain the name and adjust all dependent code
- identifier object information will be added again through an optional
  typechecker phase (in the works).
- remove tracking of scopes in parser - it's easier to do this in a separate
  phase (in the works)
- in godoc, generate popup info table directly instead of through a formatter
  for simpler data flow (at the expense of a little bit more code)

Runs all tests.

As a result of this change, the currently shown popup information
(const, var, type, func, followed by identifier name) will not be
shown anymore temporarily.

R=rsc
CC=golang-dev
https://golang.org/cl/1994041
2010-08-13 10:42:18 -07:00
Rob Pike
be97fa4c79 fmt/print: honor Formatter in Print, Println.
Rearrange code to clarify handling of %T, Formatter, GoStringer, and Stringer.

R=rsc
CC=golang-dev
https://golang.org/cl/1973043
2010-08-13 17:26:32 +10:00
Russ Cox
e2bde5cf9b runtime: fix another stack split bug
Makes godoc --http=:1234 not crash on linux/amd64.

R=r
CC=golang-dev
https://golang.org/cl/1975044
2010-08-12 23:26:54 -07:00
Alex Brainman
79c62aaa99 os: implement env using native windows api.
Fixes #864.

R=rsc
CC=golang-dev
https://golang.org/cl/1975043
2010-08-13 14:29:23 +10:00
Rob Pike
a621a7ef74 delete pkg/once
R=rsc
CC=golang-dev
https://golang.org/cl/1995041
2010-08-13 12:53:27 +10:00
Robert Griesemer
10ae88f4ab partial correction for CL 1983043: fix various godoc-related regexp calls
R=rsc
CC=golang-dev
https://golang.org/cl/1987041
2010-08-12 11:28:50 -07:00
Rob Pike
079a117469 regexp: delete the deprecated methods and tests.
R=golang-dev
CC=golang-dev
https://golang.org/cl/1956044
2010-08-12 17:16:37 +10:00
Mikio Hara
e41987c821 net: make IPv6 String method standards compliant
draft-ietf-6man-text-addr-representation-07 will introduce
a canonical textual representation format for IPv6 address.

R=rsc
CC=golang-dev
https://golang.org/cl/1856047
2010-08-12 00:03:01 -07:00
Rob Pike
d31ee536e8 update the tree to use the new regexp methods
R=rsc
CC=golang-dev
https://golang.org/cl/1983043
2010-08-12 16:48:41 +10:00
Rob Pike
4fb5883253 testing: delete the less useful methods in the testing regexp package
We can add them back using the new naming scheme should it become important.

R=rsc
CC=golang-dev
https://golang.org/cl/1968042
2010-08-12 16:47:52 +10:00
Russ Cox
1d77ff5b6b 6g, 8g: handle slice by sub-word-sized index (uint8, int8, uint16, int16)
R=ken2
CC=golang-dev
https://golang.org/cl/1960042
2010-08-11 22:27:47 -07:00
Rob Pike
6610d79eda regexp: new regularized methods for matching.
The previous set was spotty, incomplete, and confusing.
This CL proposes a regular, clean set with clearer names.
It's also complete.  Many existing methods will be deprecated,
but not in this CL.  Ditto for the tests.

R=rsc, gri
CC=golang-dev, rog
https://golang.org/cl/1946041
2010-08-12 14:41:52 +10:00
Robert Griesemer
d75074974a gofmt: if a semicolon is found unexpectedly, report detailed cause
go/scanner: return information on semicolon (real or inserted) when
	    found in source
go/parser:  better error message when a semicolon is found unexpectedly

For instance, if an unexpected semicolon is found that was automatically
inserted, the parser error message is now:

    "expected '}', found newline"

Fixes #1006.

R=rsc
CC=golang-dev
https://golang.org/cl/1936044
2010-08-11 21:25:52 -07:00
Rob Pike
32a81fa8bb sync.once: document that Do cannot be invoked recursively.
documentation change only.

R=rsc
CC=golang-dev
https://golang.org/cl/1964043
2010-08-12 12:59:37 +10:00
Kyle Consalus
8fcdc6a1e2 Small performance improvements to the HTML tokenizer based on your 'TODO's.
R=nigeltao_golang
CC=golang-dev
https://golang.org/cl/1941042
2010-08-12 09:45:34 +10:00
Scott Lawrence
bca3151042 template: added ParseFile method for template.Template
Fixes #971.

Parse/ParseFile methods of Template now match template.Parse and .ParseFile methods.
Also made tests being run on Parse and ParseFile be run on Template.ParseFile as well.

R=r
CC=golang-dev
https://golang.org/cl/1741059
2010-08-11 14:04:03 +10:00
Nigel Tao
753c9b5710 exp/draw: fix drawRGBA when x0 > x1 and we have to draw right-to-left.
R=r
CC=golang-dev
https://golang.org/cl/1940042
2010-08-11 10:10:17 +10:00
Rob Pike
2bf8741c0f rpc: catch errors from ReadResponseBody.
Fixes #1014.

R=rsc
CC=golang-dev
https://golang.org/cl/1941041
2010-08-10 16:55:02 -07:00
Robert Griesemer
b0d0de59a1 fix build: update exp/draw/draw_test.go
R=nigeltao
CC=golang-dev
https://golang.org/cl/1962041
2010-08-10 10:11:28 -07:00
Robert Griesemer
9714c2208b asn1: remove superfluous if's, unused function
R=adg
CC=golang-dev
https://golang.org/cl/1743059
2010-08-10 09:50:21 -07:00
Nigel Tao
7d3173fc1d exp/draw: remove the Color, Point and Rectangle types.
image: introduce Transparent and Opaque.

R=r
CC=golang-dev
https://golang.org/cl/1947042
2010-08-10 22:05:11 +10:00
Nigel Tao
d4e23b7e37 image: fix comment typo.
R=adg
CC=golang-dev
https://golang.org/cl/1952041
2010-08-10 17:56:57 +10:00
Nigel Tao
b50a3d95e1 image: change image representation from slice-of-slices to linear buffer,
stride and rect.

R=r
CC=golang-dev, rog
https://golang.org/cl/1849041
2010-08-10 16:34:57 +10:00
Nigel Tao
56b989f1b9 First cut of an HTML tokenizer (and eventually a parser).
R=r, rsc, gri, rsc1
CC=golang-dev
https://golang.org/cl/1814044
2010-08-10 16:08:21 +10:00
Nigel Tao
96d7c8d4a8 exp/draw/x11: temporarily workaround compiler bug 1011.
R=r
CC=golang-dev
https://golang.org/cl/1951041
2010-08-10 15:53:19 +10:00
Mathieu Lonjaret
90a6c91890 png: grayscale support.
R=nigeltao_golang, r
CC=golang-dev
https://golang.org/cl/1897049
2010-08-10 12:25:08 +10:00
Nigel Tao
5eb35e4247 image: replace Width and Height by Bounds, and introduce the Point and
Rect types.

The actual image representation is unchanged. A future change will
replace the {[][]color} with {[]color, stride int, r Rectangle} and
possibly a clip region.

The draw.Color, draw.Point and draw.Rect types will be removed in a
future change. Trying to do it in this one polluted the diff with
trivia.

R=r, rsc
CC=golang-dev
https://golang.org/cl/1918047
2010-08-10 12:08:52 +10:00
Rob Pike
46db2e3c25 regexp: document that backslashes are the escape character.
Fixes #1013.

R=rsc, gri
CC=golang-dev
https://golang.org/cl/1938041
2010-08-09 15:11:02 -07:00
Evan Shaw
28a0971caf big: Several fixes to bitwise functions
Fixed:
* SetString calls in bitwise tests
* Aliasing problem with self bitwise test
* One test case that was just flat out wrong
* Slice panics in nat.or and nat.xor
* Aliasing problems in Int.And, Int.AndNot, Int.Or, Int.Xor

Fixes #1007.

R=gri
CC=golang-dev
https://golang.org/cl/1895049
2010-08-09 10:21:54 -07:00
Nicholas Waples
e2c7e53dcf asn1 incorrectly encoded signed integers. When determining the
encoded length it was not taking into account the sign bit.

Fixes #997.

R=agl1, gri
CC=golang-dev
https://golang.org/cl/1870047
2010-08-09 10:25:54 -04:00
Alex Brainman
bc4a9caa41 runtime: free memory returned by windows GetEnvironmentStrings
R=golang-dev
CC=golang-dev
https://golang.org/cl/1917048
2010-08-09 11:30:33 +10:00
Alex Brainman
dbef0711d4 os: fix ForkExec() handling of envv == nil
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/1913047
2010-08-09 11:21:20 +10:00
Nigel Tao
893fdbbe5d image: introduce Decode and RegisterFormat.
R=r, rsc
CC=golang-dev
https://golang.org/cl/1849054
2010-08-09 10:44:38 +10:00
Russ Cox
844a86317d net/textproto: new package, with example net/dict
Generic text-based network protcol library for SMTP-like protocols.
HTTP and NNTP should be changed to use this package,
and I expect that SMTP and POP3 will be able to use it too.

R=cemeyer, nigeltao_golang, r
CC=golang-dev, petar-m
https://golang.org/cl/889041
2010-08-06 17:37:45 -07:00
Rob Pike
18063d4686 fmt.Scan: empty strings are errors
Fixes #1002.

R=rsc
CC=golang-dev
https://golang.org/cl/1882046
2010-08-07 10:02:04 +10:00
Kai Backman
df88fc6109 arm: bugfixes and syscall
- integer divide by zero raises panic
- float comparisons involving NaNs work
- syscall interface actually handles return
  values and errno correctly.

R=rsc, bradfitzpatrick
CC=golang-dev
https://golang.org/cl/1847047
2010-08-06 16:57:49 -07:00
Charles L. Dorian
c8c2bdbc59 math: fix amd64 Hypot.
Underflow/overflow tests for exp_amd64.s

Fixes #957.

R=rsc
CC=golang-dev
https://golang.org/cl/1817041
2010-08-06 16:50:48 -07:00
Roger Peppe
b92db49c26 encoding/binary: add complex
R=rsc
CC=golang-dev
https://golang.org/cl/1879043
2010-08-06 16:44:38 -07:00
Anschel Schaffer-Cohen
8055f47029 exp/iterable: add UintArray
all other basic types seem to be represented.

R=rsc
CC=golang-dev
https://golang.org/cl/1919042
2010-08-06 16:39:18 -07:00
Alex Brainman
e96b6835a9 fix windows build
R=rsc
CC=golang-dev
https://golang.org/cl/1890045
2010-08-06 09:42:55 +10:00
Rob Pike
c78be462a0 once: replace all uses of package once with sync.Once.
package once remains for now; will be deleted after next release.

R=golang-dev, brainman
CC=golang-dev
https://golang.org/cl/1914046
2010-08-06 06:14:41 +10:00
Christian Himpel
75f6a0c759 bytes: add IndexRune, FieldsFunc and To*Special
Basically these functions are implemented the same way as the
corresponding functions in the strings package.  Test functions
are implemented for IndexRune and FieldsFunc.

Additionally two typos are fixed in packages bytes and strings.

R=r
CC=golang-dev
https://golang.org/cl/1696062
2010-08-05 23:11:06 +10:00
Rob Pike
895c5db6df sync: add sync.Once, a proposed replacement for package once.
This implementation is simpler and more useful, since it can work
with methods.

R=rsc
CC=golang-dev
https://golang.org/cl/1864051
2010-08-05 13:31:10 +10:00
Alex Brainman
8251e72aea path: fix comment for Split()
R=golang-dev
CC=golang-dev
https://golang.org/cl/1905050
2010-08-05 11:43:53 +10:00
Robert Griesemer
d9e2631b53 go/parser.ParseFiles: don't override error (to nil) if there is one
Also: Return first instead of last error as that seems more useful.

R=r
CC=golang-dev
https://golang.org/cl/1897050
2010-08-04 18:02:43 -07:00
Robert Griesemer
ed8c23149f fix build: literal types cannot be parenthesized anymore
R=rsc
CC=golang-dev
https://golang.org/cl/1849055
2010-08-04 17:58:56 -07:00
Russ Cox
e473f42b2d amd64: use segment memory for thread-local storage
Returns R14 and R15 to the available register pool.
Plays more nicely with ELF ABI C code.
In particular, our signal handlers will no longer crash
when a signal arrives during execution of a cgo C call.

Fixes #720.

R=ken2, r
CC=golang-dev
https://golang.org/cl/1847051
2010-08-04 17:50:22 -07:00
Robert Griesemer
03f42934c1 gofmt/go/parser: strengthen syntax checks
- don't allow parenthesized receiver base types or anonymous fields
- fixed a couple of other omissions
- adjusted gofmt test script
- removed several TODOs

R=rsc
CC=golang-dev
https://golang.org/cl/1897043
2010-08-04 17:21:02 -07:00
Scott Lawrence
99aab8bacb bytes: added test case for explode with blank string.
Tests for the equivalent of the strings.explode("") panic bug (issue 980).

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/1850052
2010-08-04 13:33:24 +10:00
Anthony Martin
2db4c3d779 json: object members must have a value
R=rsc
CC=golang-dev
https://golang.org/cl/1847050
2010-08-03 17:05:00 -07:00
Nigel Tao
27e249049e bufio: introduce Peek.
I'll leave whether or not this obsoletes UnreadByte for a future CL.

R=r, rsc
CC=golang-dev
https://golang.org/cl/1912042
2010-08-04 09:44:02 +10:00
Rob Pike
e45b58fe96 os: change the type of permissions argument for Open etc. to uint32.
Besides being more correct, it protects against people accidentally
exchanging the permission and open mode arguments to Open.

R=rsc
CC=golang-dev
https://golang.org/cl/1904045
2010-08-04 08:34:52 +10:00
Tarmigan Casebolt
1badb46313 websocket: correct challenge response
Tested against latest Chrome.

R=ukai, rsc
CC=golang-dev
https://golang.org/cl/1743053
2010-08-03 14:34:44 -07:00
Peter Mundy
12befd063b os: Null device
R=rsc, cw
CC=golang-dev
https://golang.org/cl/1854042
2010-08-03 13:03:50 -07:00
Adam Langley
7748a7f159 crypto/x509: unwrap Subject Key Identifier
RFC 5280, 4.2.1.2 says:
  SubjectKeyIdentifier ::= KeyIdentifier
  KeyIdentifier ::= OCTET STRING

Previously, we were failing to unwrap the second level of OCTET STRING
encoding.

Fixes #993.

R=rsc
CC=golang-dev
https://golang.org/cl/1917044
2010-08-03 12:26:48 -04:00
Russ Cox
3f19d8ae8d gc: empty select
R=ken2
CC=golang-dev
https://golang.org/cl/1871057
2010-08-03 01:07:57 -07:00
Russ Cox
c6cb303a8a gc: bug299, bug300
R=ken2
CC=golang-dev
https://golang.org/cl/1731057
2010-08-03 00:53:32 -07:00
Russ Cox
9bac9d23d3 gc: index bounds tests and fixes
move constant index checking to front end
x[2:1] is a compile-time error now too

R=ken2
CC=golang-dev
https://golang.org/cl/1848056
2010-08-03 00:26:02 -07:00
Scott Lawrence
0cd8777255 strings: fix Split("", "", -1)
Fixes #980.

Made it return an empty array, rather than crash.
Added relevant test cases to strings.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/1914041
2010-08-03 13:35:14 +10:00
Alex Brainman
a79a9098da syscall: make sure go error numbers do not clash with windows system errors
R=rsc
CC=golang-dev
https://golang.org/cl/1857049
2010-08-03 12:04:41 +10:00
Nigel Tao
244b6583b7 image: introduce Gray and Gray16 types, and remove the named colors
except for Black and White.

R=rsc
CC=golang-dev, mpl, r
https://golang.org/cl/1903049
2010-08-03 10:57:53 +10:00
Rob Pike
3f5966dcc0 io: consolidate multi_reader and multi_writer into a single file, multi.go
R=rsc
CC=golang-dev
https://golang.org/cl/1860046
2010-08-03 08:04:33 +10:00
Nigel Tao
55badd474b image/png: use image-specific methods for checking opacity.
R=rsc
CC=golang-dev, mpl
https://golang.org/cl/1894047
2010-08-02 09:52:15 +10:00
Bill Neubauer
6d37724c15 websocket: fix bug involving spaces in header keys
R=rsc, ukai
CC=golang-dev
https://golang.org/cl/1669056
2010-07-30 12:27:03 -07:00
Russ Cox
68b0a87966 runtime: do not fall through in SIGBUS/SIGSEGV
Faults beyond the first page are not expected
and should fail loudly.  They are not subject to recover.

R=r
CC=golang-dev
https://golang.org/cl/1915042
2010-07-30 11:32:55 -07:00
Yuusei Kuwana
c21e2f3925 mime: add AddExtensionType
For example:
mime.AddExtensionType(".m3u8", "application/x-mpegURL")
mime.AddExtensionType(".ts", "video/MP2T")

R=rsc, rsc1
CC=golang-dev
https://golang.org/cl/1698046
2010-07-29 14:12:04 -07:00
Robert Griesemer
bc0a1c61f7 scanner: better comment
R=rsc
CC=golang-dev
https://golang.org/cl/1900044
2010-07-29 13:02:27 -07:00
Rob Pike
2c0bbf99b9 fmt.Print: fix bug in placement of spaces introduced when ...T went in.
Fixes #976.

R=rsc, chris tighe, r
CC=golang-dev
https://golang.org/cl/1697057
2010-07-29 10:50:09 -07:00
Alex Brainman
45e12c7cd3 runtime: fix bug introduced in revision 4a01b8d28570
R=rsc
CC=golang-dev
https://golang.org/cl/1874046
2010-07-29 16:54:01 +10:00
Wei Guangjing
adc13b1e48 net: implement windows version of LookupHost/Port/SRV
R=brainman, rsc
CC=golang-dev
https://golang.org/cl/1748042
2010-07-29 14:58:28 +10:00
Fazlul Shahriar
4f64ecfdda http: add https client support
Fixes #851.

R=rsc
CC=golang-dev
https://golang.org/cl/1729052
2010-07-28 18:13:56 -07:00
Rob Pike
518df525d8 fmt: move comment into doc.go.
Fix the documentation of newline handling in *f routines
to match the implementation.

R=rsc
CC=golang-dev
https://golang.org/cl/1899042
2010-07-28 13:11:22 -07:00
Brad Fitzpatrick
719cde2c47 io: MultiReader and MultiWriter
Little helpers I've found useful.

R=adg, rsc, r, gri
CC=golang-dev
https://golang.org/cl/1764043
2010-07-28 11:30:00 -07:00
Kai Backman
fa4da33315 arm: minor bugfixes.
R=rsc
CC=golang-dev
https://golang.org/cl/1692057
2010-07-28 15:58:35 +03:00
Andrew Gerrand
4501e18aa5 bufio: fix optimisation test
Fixes #949.

R=rsc
CC=golang-dev
https://golang.org/cl/1886046
2010-07-27 17:22:45 +10:00
Andrew Gerrand
fc4ba1546c net: add nil checks to several String methods to avoid panics
Fixes #945.

R=r
CC=golang-dev
https://golang.org/cl/1848049
2010-07-27 17:22:22 +10:00
Andrew Gerrand
8b821696cc bytes, strings: mention the n < 0 case in Split/SplitAfter doc comment
R=r, rsc
CC=golang-dev
https://golang.org/cl/1669055
2010-07-27 15:06:08 +10:00
Rob Pike
a59e113fcb fmt.Scanf: handle trailing spaces.
Fixes #954.

R=rsc
CC=golang-dev
https://golang.org/cl/1864046
2010-07-26 16:38:35 -07:00
Peter Mundy
036584395d runtime: fix goc2c for rename to goc2c and *.goc
Release 2010-04-27. runtime: rename cgo2c, *.cgo to goc2c, *.goc
to avoid confusion with real cgo.

R=rsc
CC=golang-dev
https://golang.org/cl/1868047
2010-07-26 16:21:27 -07:00
Russ Cox
5ee02eef4c net: TCPConn.SetNoDelay, back by popular demand
R=r
CC=golang-dev
https://golang.org/cl/1880047
2010-07-26 16:19:39 -07:00
Wei Guangjing
ad4f95d365 syscall: add windows version of Pipe()
R=brainman, rsc
CC=golang-dev
https://golang.org/cl/1715046
2010-07-26 15:55:01 +10:00
Alex Brainman
4d87e8ab08 net: fix crashing Read/Write when passed empty slice on windows
Fixes #921.

R=rsc
CC=golang-dev
https://golang.org/cl/1862043
2010-07-26 12:50:03 +10:00
Alex Brainman
eee095399f syscall: improve windows errno handling
R=rsc, Joe Poirier, PeterGo
CC=golang-dev
https://golang.org/cl/1872045
2010-07-26 10:24:48 +10:00
Daniel Theophanes
7f9e247489 syscall: add ForkExec, Syscall12 on Windows
R=brainman, rsc
CC=golang-dev
https://golang.org/cl/1578041
2010-07-26 09:43:35 +10:00
Vinu Rajashekhar
e57657683f runtime/extern.go: clear a small error in a comment.
R=iant, rsc
CC=golang-dev
https://golang.org/cl/1741058
2010-07-24 19:10:21 -07:00
Fazlul Shahriar
e356f1d88f bytes: port IndexFunc and LastIndexFunc from strings package
This CL basically applies the same changes as

	http://code.google.com/p/go/source/detail?r=5e0a29014e8e

but for bytes package.

R=r, rog
CC=golang-dev
https://golang.org/cl/1670052
2010-07-23 12:34:35 -07:00
Andrey Mirtchovski
8629e5a648 strings.Bytes: fix typo in comment
R=adg, rsc
CC=golang-dev
https://golang.org/cl/1886042
2010-07-21 12:01:15 -07:00
Ian Lance Taylor
9a2f0029bc io: Avoid another race condition in pipes.
Goroutine 1:
  Call Read on read half of pipe, entering pipeHalf.rw.
  Check ioclosed field, which is false.
  Send data to p.c1
  Wait for response on p.c2.

Goroutine 2:
  Call Close on read half of pipe, entering pipeHalf.close.
  Set closed field.
  Send error to p.cclose.
  Set ioclosed field.
  Send 1 to p.done.
  Return and exit goroutine.

Goroutine 3:
  This is the goroutine running pipe.run, and for some reason
  it has started late.
  Read error from p.rclose; set rerr and continue.
  Read 1 from p.done; increment ndone and continue.
  Read data from r1 (sent by goroutine 1); set r1 = nil and continue

Now goroutine 1 is waiting for a response, and goroutine 3 is
waiting for something else to happen.

This patch fixes the race by having the runner check whether
the read half is closed when it is asked for read data, and
similarly for the corresponding race on the write half.

This patch also fixes the similar race in which ndone gets
bumped up to 2 while there is a reader or writer waiting.

There is still another race to fix.  It is possible for the
read half and the write half to both be closed, and for the
runner goroutine to exit, all before the runner goroutine sees
the request from a reader.  E.g., in the above, have goroutine
2 also close the write half, and have goroutine 3 see both
done messages before it sees the request from goroutine 1.

R=rsc
CC=golang-dev
https://golang.org/cl/1862045
2010-07-21 10:57:46 -07:00
Peter Mundy
6a6d8fdcd3 syscall: On Windows, Errstr FormatMessage has no values to insert.
For the Windows version of syscall Errstr, set the
FORMAT_MESSAGE_IGNORE_INSERTS value of the FormatMessage
Flags argument when there are no values to insert.

R=rsc, brainman
CC=golang-dev
https://golang.org/cl/1868043
2010-07-21 09:40:08 -07:00
Adam Langley
7be849d4a6 crypto/tls: add client-side SNI support and PeerCertificates.
SNI (Server Name Indication) is a way for a TLS client to
indicate to the server which name it knows the server by. This
allows the server to have several names and return the correct
certificate for each (virtual hosting).

PeerCertificates returns the list of certificates presented by
server.

R=r
CC=golang-dev
https://golang.org/cl/1741053
2010-07-21 11:36:01 -04:00
Adam Langley
8286ee4c5b crypto/ocsp: add package to parse OCSP responses.
OCSP is the preferred X.509 revocation mechanism. X.509 certificates
        can contain a URL from which can be fetched a signed response saying
        "this certificate is valid until $x" (where $x is usually 7 days in the
        future). These are called OCSP responses and they can also be included
        in the TLS handshake itself ("OCSP stapling")

R=rsc, r
CC=golang-dev
https://golang.org/cl/1875043
2010-07-21 10:07:22 -04:00
Andrew Gerrand
61fb9ccc8d os: change comment on O_APPEND to be more accurate
R=rsc
CC=golang-dev
https://golang.org/cl/1870042
2010-07-21 17:11:28 +10:00
Alex Brainman
42dd7a6dae net(windows): properly handle EOF in (*netFD).Read().
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/1848045
2010-07-20 23:51:07 -07:00
Rob Pike
de228c0e0c bytes: add Title
R=rsc
CC=golang-dev
https://golang.org/cl/1872042
2010-07-20 19:53:59 -07:00
Rob Pike
a0d1c9263e gobs: fix bug in singleton arrays
Fixes #934.

R=rsc
CC=golang-dev
https://golang.org/cl/1869043
2010-07-20 19:53:28 -07:00
Robert Griesemer
8f9aeb5a66 gofmt: fix some linebreak issues
- don't lose empty lines after labels
- canonicalize number of line breaks
- gofmt src misc, fixes a couple of irregular breaks

R=rsc
CC=golang-dev
https://golang.org/cl/1843044
2010-07-20 09:29:31 -07:00
Kai Backman
36057e721e more soft float support. passes several basic tests
but with less precision than hardware counterparts.

fixed a number of tests to output BUG when they failed.
changed the runner to distinghuish between output
and output containing ^BUG

R=rsc
CC=dho, golang-dev
https://golang.org/cl/1778041
2010-07-20 15:53:16 +03:00
Rob Pike
8684a08989 strings: add Title
strings.ToTitle converts all characters to title case, which for consistency with the
other To* functions it should continue to do.  This CL adds string.Title, which
does a proper title-casing of the string.
A similar function for package bytes will follow once this is settled.
Fixes #933.

R=rsc
CC=golang-dev
https://golang.org/cl/1869042
2010-07-20 00:03:59 -07:00
Robert Griesemer
a5fe54aa2b tabwriter: fix a comment to fix godoc output
R=r
CC=golang-dev
https://golang.org/cl/1857043
2010-07-19 11:33:11 -07:00
Adam Langley
9929ee92e7 asn1: Enumerated, Flag and GeneralizedTime support.
Add support for ASN.1 ENUMERATED types.

        Add a magic type, asn1.Flag, for the cases where the presence of an
        empty explicit tag is semantically meaningful.

        Add support for GeneralizedTime.

R=rsc
CC=golang-dev
https://golang.org/cl/1684055
2010-07-19 11:11:40 -04:00
Adam Langley
02786d263c time: fix parsing of minutes in time zones.
R=r
CC=golang-dev
https://golang.org/cl/1830041
2010-07-19 11:08:04 -04:00
James Whitehead
18d8c7dac6 http/transferWriter: Write body when content length unknown
Fixes #923.

R=adg, rsc
CC=golang-dev
https://golang.org/cl/1846043
2010-07-19 14:05:27 +10:00
Russ Cox
2d6ae385e1 linux/386: use Xen-friendly ELF TLS instruction sequence
Fixes #465.

R=iant
CC=golang-dev
https://golang.org/cl/1665051
2010-07-17 16:54:03 -07:00
Peter Mundy
bc2ee6b8c6 utf16: fix cyclic dependency when testing on Windows
(on Windows, syscall depends on utf16)

R=rsc
CC=golang-dev
https://golang.org/cl/1664053
2010-07-17 16:52:53 -07:00
Russ Cox
d1e2f73b1d big: attempt to fix arm build
R=gri
CC=golang-dev
https://golang.org/cl/1752043
2010-07-16 11:18:45 -07:00
Ian Lance Taylor
385bfd4ca0 Remove unused declaration.
R=rsc
CC=golang-dev
https://golang.org/cl/1686054
2010-07-16 11:05:38 -07:00
Robert Griesemer
496a935376 bignum: delete package - functionality subsumed by package big
R=rsc
CC=golang-dev
https://golang.org/cl/1742045
2010-07-15 16:08:53 -07:00
Ian Lance Taylor
5958fd7f89 Clarify that a new goroutine is not started for each finalizer.
R=rsc
CC=golang-dev
https://golang.org/cl/1698051
2010-07-15 12:32:38 -07:00
Brad Fitzpatrick
9b64fef71a mime/multipart and HTTP multipart/form-data support
Somewhat of a work-in-progress (in that MIME is a large spec), but this is
functional and enough for discussion and/or code review.

In addition to the unit tests, I've tested with curl and Chrome with
a variety of test files, making sure the digests of files are unaltered
when read via a multipart Part.

R=rsc, adg, dsymonds1, agl1
CC=golang-dev
https://golang.org/cl/1681049
2010-07-14 17:26:14 -07:00
Russ Cox
e9bcbc5398 os: use /tmp again
R=adg
CC=golang-dev
https://golang.org/cl/1823041
2010-07-14 17:25:46 -07:00
Robert Griesemer
a3855235cd fix build: reverting exp/eval Makefile to old form
(gofmt doesn't exist when this is built)

R=rsc
CC=golang-dev
https://golang.org/cl/1838041
2010-07-14 10:11:12 -07:00
Evan Shaw
b97292791b exp/eval: Converted from bignum to big
Also in this CL:
* Removed util.go, as its functionality is in big
* Removed some semicolons from the code generated by gen.go
* Added a generate target to Makefile
* Removed an outdated TODO from value.go

R=gri
CC=golang-dev
https://golang.org/cl/1780042
2010-07-14 09:39:59 -07:00
Adam Langley
c9406f930d crypto/tls: add client OCSP stapling support.
R=r, rsc
CC=golang-dev
https://golang.org/cl/1750042
2010-07-14 10:40:15 -04:00
Russ Cox
cec007d3d2 runtime: better error for send/recv on nil channel
R=ken2
CC=golang-dev
https://golang.org/cl/1835041
2010-07-13 17:27:26 -07:00
Russ Cox
2e3dc2cc35 crypto/rand: add missing Unlock
R=r
CC=golang-dev
https://golang.org/cl/1812043
2010-07-13 12:37:47 -07:00
Andrew Gerrand
da795fcefc runtime/tiny: style and doc tweaks
R=r, rsc
CC=golang-dev
https://golang.org/cl/1821041
2010-07-13 10:47:52 +10:00
Russ Cox
11f9c03986 fix build
R=gri
CC=golang-dev
https://golang.org/cl/1813042
2010-07-12 17:46:03 -07:00
Peter Mundy
b6850fe739 os: Use TempFile with default TempDir for temp test files
Use io/ioutil.TempFile with default os.TempDir for temporary test files.
For os_test.go temporary test files, use a local file system and OS
independent directory names. Avoid problems with NFS.

Fixes #848.

R=adg
CC=golang-dev
https://golang.org/cl/1806043
2010-07-13 10:31:51 +10:00
Andrew Gerrand
48e4d67b23 websocket: fix comment indentation
To make code samples formatted correctly by godoc.

R=r, ukai, rsc
CC=golang-dev, gri
https://golang.org/cl/1738048
2010-07-13 10:29:41 +10:00
Robert Griesemer
d9c47cd8c8 container/vector: rename Data() -> Copy()
R=rsc
CC=golang-dev
https://golang.org/cl/1814043
2010-07-12 17:22:21 -07:00
Rob Pike
18d78dd7b1 tweak comment for %#X
Fixes #904.

R=rsc
CC=golang-dev
https://golang.org/cl/1803043
2010-07-12 16:57:11 -07:00
Russ Cox
36560d2b4a pem: print \n after 1 header line too
rearrange to make reason for if clear.

Fixes #911.

R=agl1
CC=golang-dev
https://golang.org/cl/1774044
2010-07-12 16:48:49 -07:00
Peter Mundy
ccd28e8eb6 crypto/rand for Windows
R=rsc, brainman
CC=golang-dev
https://golang.org/cl/1773041
2010-07-12 16:37:53 -07:00
Andrew Gerrand
880beafc9f http: fix ParseURL to handle //relative_path properly
Fixes #900.

R=rsc
CC=golang-dev
https://golang.org/cl/1756042
2010-07-13 09:21:42 +10:00
Robert Griesemer
97bcf049f7 big: added a few missing functions:
- sign to determine if a value is < 0, == 0, > 0
- abs to compute absolute value
- Rat.IsInt to test if a rational number is representable as an integer

R=rsc
CC=golang-dev
https://golang.org/cl/1761042
2010-07-12 16:09:27 -07:00
Robert Griesemer
345f9c9eb2 container/vector: remove Iter() from interface
(Iter() is almost never the right mechanism to call.
Per discussion with rsc.)

R=rsc
CC=golang-dev
https://golang.org/cl/1771043
2010-07-12 13:51:42 -07:00
Charles L. Dorian
c28bd5445c math: amd64 version of log
Benchmarks 25ns/op (was 58ns/op) on 2.53GHz Intel Core 2 Duo.

R=rsc
CC=golang-dev
https://golang.org/cl/1740043
2010-07-12 11:30:11 -07:00
Micah Stetson
b5b6ce0804 json: Add HTMLEscape
R=rsc
CC=golang-dev
https://golang.org/cl/1496042
2010-07-12 11:26:41 -07:00
Vinu Rajashekhar
a9a24d4d8a Corrected a print statement from printing netfd to fd.
R=iant
CC=golang-dev
https://golang.org/cl/1805041
2010-07-10 14:40:48 -07:00
Robert Griesemer
71ed4eb7a5 fix build: adjustest a few tests that I missed before
R=r
CC=golang-dev
https://golang.org/cl/1762044
2010-07-09 13:11:20 -07:00
Robert Griesemer
7529d32ee1 go/parser: require that '...' parameters are followed by a type
(matching latest syntax changes)

R=r
CC=golang-dev
https://golang.org/cl/1762042
2010-07-09 13:02:32 -07:00
Evan Shaw
2e00bf9877 big: Improvements to Rat.SetString
* Allow an exponent part. This is necessary for exp/eval.
* Fix a bug for input that had no numbers after the decimal.
* In Int.SetString, allow a leading + sign.
* In Int.SetString, error if the input is "-" with no number.
* In nat.scan, normalize the resulting nat.

R=gri
CC=golang-dev
https://golang.org/cl/1733045
2010-07-09 11:24:31 -07:00
Peter Mundy
56b3e5d644 io: fix SectionReader Seek to seek backwards
Fixes #899.

R=golang-dev, rminnich, adg
CC=golang-dev
https://golang.org/cl/1749041
2010-07-08 16:57:07 +10:00
Markus Duft
d49c0d71f6 runtime/tiny: add destroyLock stub, and docs for additional VMs
updated thread.c to provide destroylock, which seems to be
	      required to link.
        updated README with different virtualization programs.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/1746047
2010-07-08 00:15:47 +10:00
Adam Langley
a169e6cc6a http, crypto/tls: followup fixes from 1684051.
(TBR because this is just addressing previous review comments.)

R=r
CC=golang-dev
https://golang.org/cl/1697048
2010-07-02 16:43:48 -04:00
Adam Langley
fc23def67f crypto/tls, http: Make HTTPS servers easier.
R=r, adg, rsc
CC=golang-dev
https://golang.org/cl/1684051
2010-07-02 13:00:18 -04:00
Russ Cox
971a04f1dc implications of len spec change
R=r
CC=golang-dev
https://golang.org/cl/1712048
2010-07-01 17:49:28 -07:00
Rob Pike
dc6a95e979 strconv.Uitob64: allow conversion of 64-bit binaries (buffer was too small).
panic if base is invalid.

R=rsc
CC=golang-dev
https://golang.org/cl/1702050
2010-07-01 14:44:21 -07:00
Rob Pike
38f1231f3e strings and bytes.Split: make count of 0 mean 0, not infinite.
Use a count of -1 for infinity.  Ditto for Replace.

R=rsc
CC=golang-dev
https://golang.org/cl/1704044
2010-07-01 14:08:14 -07:00
Charles L. Dorian
9038de0373 cmath: correct IsNaN for argument cmplx(Inf, NaN)
R=rsc
CC=golang-dev
https://golang.org/cl/1705041
2010-06-30 23:34:33 -07:00
Daniel Fleischman
040f081842 template: fix typo in doc comment
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/1665047
2010-06-30 19:57:26 -07:00
Russ Cox
0bf413ab8e bytes, strings: add Replace
This is the Replace I suggested in the review of CL 1114041.
It's true that we already have

	regexp.MustCompile(regexp.QuoteMeta(old)).ReplaceAll(s, new)

but because this Replace is doing a simpler job it is
simpler to call and inherently more efficient.

I will add the bytes implementation and tests to the
CL after the strings one has been reviewed.

R=r, cw
CC=golang-dev
https://golang.org/cl/1731048
2010-06-30 18:03:09 -07:00
Adam Langley
269df58270 x509: fix English.
(addressing comments from 1741045)

R=r
CC=golang-dev
https://golang.org/cl/1678047
2010-06-30 18:05:38 -04:00
Adam Langley
9c09ed13d2 x509: support non-self-signed certs.
For generating non-self-signed certs we need to be able to specify a
public key (for the signee) which is different from the private key (of
the signer).

R=rsc
CC=golang-dev
https://golang.org/cl/1741045
2010-06-30 18:02:31 -04:00
Ivan Krasin
400f7a6ba5 syscall: add socketpair
R=rsc
CC=golang-dev
https://golang.org/cl/1319042
2010-06-30 14:58:21 -07:00
Charles L. Dorian
a0117bafa0 math: amd64 versions of exp and fabs
Benchmark of exp to 28 ns/op from 64 ns/op,
on 2.53GHz Intel Core 2 Duo.

R=rsc
CC=golang-dev
https://golang.org/cl/1594041
2010-06-30 14:44:27 -07:00
Peter Mundy
0e25775518 io/ioutil.TempFile for Windows
Fixes #834.

R=rsc, brainman
CC=golang-dev
https://golang.org/cl/1686047
2010-06-30 13:52:34 -07:00
Ian Lance Taylor
7c1be45f58 io: Avoid race condition in pipe.
One goroutine started up and was waiting in rw.  Then another
goroutine decided to close the pipe.  The closing goroutine
stalled calling p.io.Lock() in pipeHalf.close.  (This happened
in gccgo).  If the closing goroutine had been able to set the
ioclosed flag, it would have gone on to tell the runner that
the pipe was closed, which would then send an EINVAL to the
goroutine sleeping in rw.  Unlocking p.io before sleeping in
rw avoids the race.

R=rsc, rsc1
CC=golang-dev
https://golang.org/cl/1682048
2010-06-30 13:14:46 -07:00
Andrew Gerrand
d3c3c15b17 http: client_test nil pointer fix
Fixes #893.

R=rsc
CC=golang-dev
https://golang.org/cl/1687045
2010-06-30 18:57:27 +10:00
Alex Brainman
9d5f80b0c6 time: implement timezones for windows
Fixes #761.

R=PeterGo, adg, rsc
CC=golang-dev
https://golang.org/cl/1121042
2010-06-29 22:29:09 -07:00
Alex Brainman
bb9261bf3b net: initial attempt to implement windows version
R=rsc, Mateusz Czaplinski
CC=golang-dev
https://golang.org/cl/1600041
2010-06-29 20:23:39 -07:00
Kirklin McDonald
0046d51e06 net: add support for DNS SRV requests.
Fixes #758.

R=rsc, adg
CC=golang-dev
https://golang.org/cl/1078041
2010-06-30 10:54:24 +10:00
Russ Cox
774333685e runtime: fix scheduling bug - world wasn't stopping
Fixes #886.

R=r
CC=golang-dev
https://golang.org/cl/1667051
2010-06-29 17:47:27 -07:00
Rob Pike
64b6a789a1 strconv: fix %.1f, 0.09
Fixes #822.
Credit to https://golang.org/cl/1442041 by danielfleischman

R=rsc
CC=golang-dev
https://golang.org/cl/1738047
2010-06-29 16:51:56 -07:00
Rob Pike
21f8ae8fec strconv: fix %.2g, 40
Fixes #845.

R=rsc
CC=golang-dev
https://golang.org/cl/1673049
2010-06-29 16:39:17 -07:00
Vinu Rajashekhar
00ad47f906 Move the function Run() back into fd.go.
R=iant
CC=golang-dev, rsc
https://golang.org/cl/1748041
2010-06-29 12:04:04 -07:00
Rob Pike
da69685ee5 gob: a couple of tiny simplifications using Kind()
R=rsc
CC=golang-dev
https://golang.org/cl/1695046
2010-06-29 10:14:32 -07:00
Alex Brainman
059c7ba996 runtime: fix windows build
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/1747041
2010-06-29 07:12:14 -07:00
Nigel Tao
715425bf6f exp/draw/x11: implement the mapping from keycodes to keysyms.
R=rsc
CC=golang-dev, rog
https://golang.org/cl/1739042
2010-06-29 10:54:41 +10:00
Ian Lance Taylor
807605d0fc Only catch all signals if os/signal package imported.
Fixes #776.

R=rsc
CC=golang-dev
https://golang.org/cl/1745041
2010-06-28 17:14:17 -07:00
Rob Pike
d4384ff7f5 netchan: use gob DecodeValue to eliminate the need for a pointer value
in Import and Export.

R=rsc
CC=golang-dev
https://golang.org/cl/1707047
2010-06-28 17:12:09 -07:00
Rob Pike
12a4d84371 gob: add DecodeValue and EncodeValue
R=rsc
CC=golang-dev
https://golang.org/cl/1698045
2010-06-28 17:11:54 -07:00
Peter Mundy
ea88de805e syscall: Add syscall_bsd.go to zsycall_freebsd_386.go
Revision: 5885c9d10f created syscall_bsd.go for code used
by Darwin and other *BSDs, which should have included
FreeBSD. mksyscall.sh to generate new zsyscall_freebsd_386.go.

Fixes #862.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/1701048
2010-06-29 09:11:02 +10:00
Rob Pike
08483defac rpc: allow non-struct args and reply (they must still be pointers)
R=rsc
CC=golang-dev
https://golang.org/cl/1722046
2010-06-28 16:05:54 -07:00
Rob Pike
eb20ba6d01 netchan: allow chan of basic types now that gob can handle such
R=rsc
CC=golang-dev
https://golang.org/cl/1741041
2010-06-28 15:59:54 -07:00
Rob Pike
5245ea771d fmt.Printf: fix bug in handling of %#v.
nice side effect: slices now obey their format verb. example:
	fmt.Printf("%q\n", []string{"a"})

R=rsc
CC=golang-dev
https://golang.org/cl/1729045
2010-06-28 14:11:38 -07:00
Rob Pike
a26ab29ab8 gob: allow transmission of things other than structs at the top level.
also fix a bug handling nil maps: before, would needlessly send empty map

R=rsc
CC=golang-dev
https://golang.org/cl/1739043
2010-06-28 14:09:47 -07:00
Vinu Rajashekhar
e0334ab798 Move the functions, newPollServer and Run, from fd.go
to a new source file.

R=iant, rsc
CC=golang-dev
https://golang.org/cl/1670046
2010-06-28 13:58:56 -07:00
Rob Pike
56f3c70111 fmt.Scan: fix handling of EOFs.
Fixes #876.

R=rsc
CC=golang-dev
https://golang.org/cl/1675048
2010-06-24 15:24:25 -07:00
Rob Pike
37a6bc838b gob: add support for complex numbers
R=rsc
CC=golang-dev
https://golang.org/cl/1708048
2010-06-24 15:07:28 -07:00
Christopher Wedgwood
57e1888741 Build draw/x11. Skip for test.
R=nigeltao_golang
CC=golang-dev, r, rsc
https://golang.org/cl/1690043
2010-06-23 15:08:27 +10:00
Rob Pike
e05c3668d2 regexp: restore accidentally deleted test item.
R=rsc
CC=golang-dev
https://golang.org/cl/1714044
2010-06-22 16:11:21 -07:00
Rob Pike
a8cd6c2012 regexp: bug fix: need to track whether match begins with fixed prefix.
Fixes #872.

R=rsc
CC=golang-dev
https://golang.org/cl/1731043
2010-06-22 16:02:14 -07:00
Rob Pike
537e5f4b7e debug/dwarf: update PDF link.
Fixes #881.

R=iant
CC=golang-dev
https://golang.org/cl/1696044
2010-06-22 14:56:16 -07:00
Russ Cox
e63ae242e6 runtime: split extern.go into debug.go, extern.go, sig.go.
move mal next to the other malloc functions.

R=r
CC=golang-dev
https://golang.org/cl/1701045
2010-06-21 20:53:49 -07:00
Russ Cox
44ca04d3d6 big, bytes: move assembly externs to separate file
to make it easier to build package without assembly.

R=r, r2
CC=golang-dev
https://golang.org/cl/1680045
2010-06-21 19:53:08 -07:00
Russ Cox
f374575fb7 net: move Dial, Listen out of net.go.
now net.go is only type definitions, not active code.

R=r
CC=golang-dev
https://golang.org/cl/1708046
2010-06-21 19:52:30 -07:00
Russ Cox
121a16fa95 runtime: delete old types
R=r
CC=golang-dev
https://golang.org/cl/1715043
2010-06-21 18:03:25 -07:00
Christopher Wedgwood
7edd49614c net: Fix ICMP test.
Ping IDs should be limited to 16-bits.  Fix failure printing.

R=rsc
CC=golang-dev, jean-christophe smith <jeanchristophe.smith
https://golang.org/cl/1682043
2010-06-21 16:40:44 -07:00
Russ Cox
226b5fc666 syslog: use local network for tests
R=r
CC=golang-dev
https://golang.org/cl/1724042
2010-06-21 13:48:49 -07:00
Russ Cox
fc090a3a54 reflect: add Type.Bits method, add tags to prohibit conversions
gob: substitute slice for map

R=r
CC=golang-dev
https://golang.org/cl/1699045
2010-06-21 13:19:29 -07:00
Russ Cox
96d35c6984 pkg/Makefile: allow DISABLE_NET_TESTS=1 to disable network tests
netchan, rpc, websocket: run test servers on 127.0.0.1,
to avoid conflict with OS X firewall.

TBR=r
CC=golang-dev
https://golang.org/cl/1689046
2010-06-21 13:05:38 -07:00
Russ Cox
1b79cd2e71 undo changes accidentally included in 09c5add99d50
R=ken2
CC=golang-dev
https://golang.org/cl/1736042
2010-06-20 12:45:39 -07:00
Russ Cox
45bdf0367e reflect: add Kind, remove Int8Type, Int8Value, etc.
update other code to match.

R=r
CC=golang-dev
https://golang.org/cl/1680044
2010-06-20 12:16:25 -07:00
Russ Cox
a212d174ac gc: better error messages for interface failures, conversions
x.go:13: cannot use t (type T) as type Reader in assignment:
	T does not implement Reader (Read method requires pointer receiver)
x.go:19: cannot use q (type Q) as type Reader in assignment:
	Q does not implement Reader (missing Read method)
		have read()
		want Read()
x.go:22: cannot use z (type int) as type Reader in assignment:
	int does not implement Reader (missing Read method)

x.go:24: too many arguments to conversion to complex: complex(1, 3)

R=ken2
CC=golang-dev
https://golang.org/cl/1736041
2010-06-20 11:45:53 -07:00
Russ Cox
a674c024c7 nacl: fix build
TBR=r
CC=golang-dev
https://golang.org/cl/1706044
2010-06-18 22:45:42 -07:00
Russ Cox
2d3e47ca10 strconv: add AtofN, FtoaN
R=r
CC=golang-dev
https://golang.org/cl/1700043
2010-06-18 22:43:37 -07:00
Rob Pike
3748d22672 fmt.Scanf: improve error message when input does not match format
R=rsc
CC=golang-dev
https://golang.org/cl/1693043
2010-06-18 20:37:03 -07:00
Russ Cox
21ff75bc0e complex divide: match C99 implementation
R=iant, ken2, r, r2, ken3
CC=golang-dev
https://golang.org/cl/1686044
2010-06-18 15:46:00 -07:00
Brad Fitzpatrick
743f818218 http: reply to Expect 100-continue requests automatically
This CL replaces my earlier https://golang.org/cl/1640044/show
in which Continue handling was explicit.  Instead, this CL makes
it automatic.  Reading from Body() is an implicit acknowledgement
that the request headers were fine and the body is wanted.  In that
case, the 100 Continue response is written automatically when the
request continues the "Expect: 100-continue" header.

R=rsc, adg
CC=golang-dev
https://golang.org/cl/1610042
2010-06-16 10:15:39 -07:00
Nigel Tao
6de79ee0ef image: add an Alpha16 type, for completeness.
R=rsc
CC=golang-dev, rog
https://golang.org/cl/1707042
2010-06-16 12:36:07 +10:00
Rob Pike
d60312c4c0 fmt.Scan: fix %c in the case where the input does not implement ReadRune itself.
While we're at it, clean up and test the code to guarantee we see every byte when
the text is erroneous UTF-8.

Fixes #866.

R=rsc
CC=golang-dev
https://golang.org/cl/1712042
2010-06-15 17:41:11 -07:00
Rob Pike
9baa7a51ba bytes.Buffer.ReadFrom: fix bug.
Fixes #852.

R=rsc
CC=golang-dev
https://golang.org/cl/1680042
2010-06-15 17:40:47 -07:00
Russ Cox
c9172fb2a3 runtime: correct fault for 16-bit divide on Leopard
R=r
CC=golang-dev
https://golang.org/cl/1703041
2010-06-14 18:07:17 -07:00