Robert Griesemer [Thu, 5 Nov 2009 00:50:13 +0000 (16:50 -0800)]
rename testfiles from .go -> .orig so that they won't be
picked up by gofmt (they should not be modified) or godoc
(testdata should not be considered a potential package
directory)
Russ Cox [Wed, 4 Nov 2009 23:17:01 +0000 (15:17 -0800)]
avoid infinite recursion in matcher.
after sync (or sync --local), clean up repository:
* look for and close CLs submitted on our behalf
* remove unmodified files from CLs
* warn about empty CLs
Robert Griesemer [Wed, 4 Nov 2009 21:31:20 +0000 (13:31 -0800)]
- always format blocks with closing } on a new line, even if empty
- at the moment this also affects single-line function declarations
because we have disabled them at the moment (but not single-line
function literals)
Russ Cox [Wed, 4 Nov 2009 11:15:24 +0000 (03:15 -0800)]
various tweaks to code review.
main one is to check at submit time that
user name being used in checkin message
is listed in the CONTRIBUTORS file.
this should catch misconfigurations.
another is to cut the @domain part
from the R= and CC= lines on checkin
messages, so that cc'ing someone on
a change does not mean their email
address is recorded for all time.
Adam Langley [Wed, 4 Nov 2009 01:23:50 +0000 (17:23 -0800)]
crypto/rsa: fix blinding when using a null random source.
For testing it can be useful to use a null random source (one which
always returns zero) to remove non-determinism from the tests.
However, when performing RSA blinding, the random blind ends up being
zero and it's hard to reverse a multiplication by zero.
Rob Pike [Wed, 4 Nov 2009 00:05:47 +0000 (16:05 -0800)]
First steps at command documentation: C compilers and linkers.
Each command gets a doc.go file for godoc to analyze. Its main
element is a package comment.
Robert Griesemer [Tue, 3 Nov 2009 21:40:11 +0000 (13:40 -0800)]
- don't loose extra line breaks in struct/interface declarations
- start new sections if a field/method declaration spans multiple lines;
this avoids tabs from the previous line affecting the next field/method
Robert Griesemer [Tue, 3 Nov 2009 18:00:57 +0000 (10:00 -0800)]
use default styler when there is no other given
(No visual change yet since the comments for
exported code snippets - as shown on the pkg
page - are not yet formatted using the standard
comment intersperse mechanism in the printer.
This is a TODO in the printer.)
Robert Griesemer [Tue, 3 Nov 2009 04:55:40 +0000 (20:55 -0800)]
split printer.go into two files; it has become too large:
- nodes.go implements ast node formatting
- printer.go implements the core printing functionality
and public interface
No code changes except for updating the import clauses
and adding a top-level comment to nodes.go.
Russ Cox [Tue, 3 Nov 2009 02:37:30 +0000 (18:37 -0800)]
package net cleanup
added ReadFrom/WriteTo for packet protocols like UDP.
simplified the net.Conn interface.
added new net.PacketConn interface for packet protocols.
implemented proper UDP listener.
cleaned up LocalAddr/RemoteAddr methods - cache in netFD.
threw away various unused methods.
an interface change:
introduced net.Addr as a network address interface,
to avoid conversion of UDP host:port to string and
back for every ReadFrom/WriteTo sequence.
another interface change:
since signature of Listener.Accept was changing anyway,
dropped the middle return value, because it is available
as c.RemoteAddr(). (the Accept signature predates the
existence of that method.)
Dial and Listen still accept strings, but the proto-specific
versions DialTCP, ListenUDP, etc. take net.Addr instead.
because the generic Dial didn't change and because
no one calls Accept directly (only indirectly via the http
server), very little code will be affected by these interface
changes.
Ian Lance Taylor [Mon, 2 Nov 2009 21:17:12 +0000 (13:17 -0800)]
Set LANG to control sorting. This affects the order in which
tests are processed, and thus the run.out output. The default
LANG on Fedora 10, en_US.utf8, causes the tests to be sorted
differently--e.g., arrayindex1.go and arrayindex.go are sorted
in the opposite order.
Adam Langley [Mon, 2 Nov 2009 20:02:16 +0000 (12:02 -0800)]
Fix cgo for GCC 4.4
Firstly, with -Werror, GCC switched to printing warnings starting
with "error:". Widening the string matches solves this as the messages
are otherwise unchanged.
Secondly, GCC 4.4 outputs DWARF sections with with NUL bytes in all
the offsets and requires the relocation section for .debug_info to be
processed in order to result in valid DWARF data. Thus we add minimal
handling for relocation sections, which is sufficient for our needs.
Robert Griesemer [Mon, 2 Nov 2009 17:25:39 +0000 (09:25 -0800)]
- initial steps towards showing directory tree instead of
just a single directory
- all pieces present but not well integrated
- directory tree served at the moment under /tree
Robert Griesemer [Mon, 2 Nov 2009 17:18:02 +0000 (09:18 -0800)]
- collect line comments for methods in interfaces
(previously not shown in godoc)
- simplify parsing of struct types (match code structure for parsing interface types)
Robert Griesemer [Sun, 1 Nov 2009 23:27:10 +0000 (15:27 -0800)]
enable all (but one) test cases in test.sh that
were excluded before because of incorrect comment
formatting (comment formatting is mostly idempotent
at this point)
Russ Cox [Sun, 1 Nov 2009 19:13:27 +0000 (11:13 -0800)]
syscall cleanup.
* rename PORT.sh -> mkall.sh (hopefully more obvious),
change behavior: run commands by default.
* pull more constants out of #defines automatically,
instead of editing large lists by hand.
* add Recvfrom, Sendto
Russ Cox [Sun, 1 Nov 2009 13:49:35 +0000 (05:49 -0800)]
code review fixes
* clean up error handling: show Exception info
* white space fixes
* clean up output when creating CL
* simplify hg change command; add hg file
* fix stale cookie bug (thanks iant)
* in LoadAllCL, load each CL in a different thread,
to parallelize the slow web fetches
* throw away support for Mercurial before version 1.3
* add @CL-number file pattern for commands like diff
* make hg sync show files being sync'ed
Russ Cox [Sun, 1 Nov 2009 13:43:26 +0000 (05:43 -0800)]
Make.pkg: add DEPS= support
allow Makefiles using Make.pkg to specify a
list of directories that should be installed
before trying to build the package.
this is a stopgap for small package trees
maintained outside the standard tree.
Robert Griesemer [Fri, 30 Oct 2009 20:17:14 +0000 (13:17 -0700)]
improved comment formatting:
- print comments line by line, strip common prefix but do not
modify comment contents otherwise
- align comments with subsequent keyword if indicated (e.g. case labels)
- terminate "column section" after multi-line expressions for better alignment