use path.Clean in web server to sanitize URLs.
http://triv/go/../../../etc/passwd
no longer serves the password file.
it redirects to
http://triv/etc/passwd
which then gets a 404.
R=r
DELTA=288 (286 added, 0 deleted, 2 changed)
OCL=27142
CL=27152
string(b)[0:n]
instead of the more direct string(b[0:n]).
convert to the more direct form.
R=r
DELTA=5 (0 added, 0 deleted, 5 changed)
OCL=27082
CL=27140
* make([100]int) was being compiled to
make([]int), kind of.
* []this = [100]that was working for any this, that.
turned up a typo in pipe_test.go
R=ken
OCL=27081
CL=27081
- godoc now supports the following url prefixes:
/doc/ for package documentation
/file/ for files (directories, html, and .go files)
/spec for the spec
/mem for the memory model
- formatting of comments has been fixed
- tons of minor cleanups (still more to do)
Still missing:
- pretty printing of source is not as pretty as it used to be
(still a relict from the massive AST cleanup which has't quite made it's way everywhere)
- documentation entries should be sorted
- comments in code is not printed or not properly printed
TBR=r
DELTA=416 (182 added, 100 deleted, 134 changed)
OCL=27078
CL=27078
- use /src and /doc prefix in URL to distinguish output type (per rsc)
- fixed a bug in an internal string function
- ignore files ending in _test.go (consider them test files)
R=rsc
OCL=27054
CL=27054
was copying a bit too much about t into n,
like whether the signature was queued to be printed.
(bug reported by anton)
was also editing t, meaning you could do
type T int;
func (p int) Meth() { }
both fixed.
R=ken
OCL=27052
CL=27052
this avoids problems people have run into with
multiple closures in the same package.
when preparing filename, only cut off .go, not .anything.
this fixes a bug tgs ran into with foo.pb.go and foo.go
in the same package.
also turn bad identifier chars from filename into
underscores: a-b.pb.go => a_b_pb
R=ken
OCL=27050
CL=27050
first round of cleanups:
- removed extra .html templates (reduced to one)
- removed dependencies on various local files
- minor fixes throughout
Basic docserver is now operational: Automatically finds all
(multi-file) packages under a root and serves either file
or package documentation.
R=r
OCL=27049
CL=27049
- renamed gds -> godoc
- functionality to find and serve packages
(to get a list of packages provide dir path + "?p")
Next steps: cleanups, better formatting, fine-tuning of output
R=r
OCL=27037
CL=27039
(this removes a lot of string() conversions down the road)
- a few minor adjustments
R=rsc
DELTA=11 (0 added, 0 deleted, 11 changed)
OCL=27029
CL=27038
- have explicit XSpec nodes for declarations
- have a general GenDecl node instead of DeclList
R=rsc
DELTA=164 (52 added, 52 deleted, 60 changed)
OCL=27005
CL=27027
160 - 75 was just barely not enough for deferproc + morestack.
added enum names and bumped to 256 - 128.
added explanation.
changed a few mal() (garbage-collected) to
malloc()/free() (manually collected).
R=ken
OCL=26981
CL=26981
- adjustments to match new ast/parser interface
- removed printer.go; functionality now in astprinter.go and docprinter.go
(more cleanups pending)
- enabled new doc printing in gds
(lots of fine tuning missing, but pieces falling into place; e.g. methods
associated with types. Consts, Vars, to come. Collection of all files
belonging to a package to come)
R=r
OCL=26970
CL=26972
- minor adjustments as suggested by rsc
2) Added parser_test fragment
3) Renamed some types in AST.go per rsc request
R=rsc
DELTA=2053 (2027 added, 0 deleted, 26 changed)
OCL=26963
CL=26971
remove use of _subv in vlrt.c
darwin/386/signal.c
darwin/386/*
linux/386/* (forgotten before)
can run empty program on darwin/386 now.
R=r
DELTA=1140 (1021 added, 114 deleted, 5 changed)
OCL=26942
CL=26968
into gc directory, where it gets included as ../gc/ldbody
this is similar to the assemblers including ../cc/lexbody
and ../cc/macbody.
* hook go-specific loader code into 8l.
* make current 8.out.h and 6.out.h backward compatible
with plan 9's versions. i had added some constants in
the middle of enums and have now moved them to the end.
this keeps us from invalidating old .8 and .6 files.
not sure how much it really matters, but easy to do.
R=r
DELTA=1314 (667 added, 623 deleted, 24 changed)
OCL=26938
CL=26941
type of the field. Use the field alignment to compute the
size of a structure.
This may help 8g but is mainly for gccgo. gccgo maintains the
standard C/C++ ABI for structure field alignment. For the
i386, this requires that a float64 field in a struct be
aligned on a 32-bit boundary, although for efficiency a
variable of type float64 or []float64 should be aligned on a
64-bit boundary.
I also removed the unused size field from structField.
R=r
DELTA=117 (75 added, 2 deleted, 40 changed)
OCL=26842
CL=26936