Russ Cox
839a68469b
delete export
...
TBR=r
OCL=23121
CL=23127
2009-01-20 14:40:40 -08:00
Rob Pike
b74e3b95cf
add a couple of helper methods to io.ByteBuffer
...
R=rsc
DELTA=456 (9 added, 2 deleted, 445 changed)
OCL=23107
CL=23107
2009-01-20 12:57:25 -08:00
Russ Cox
f48cbfdf56
convert tests; nothing interesting.
...
R=r
OCL=23012
CL=23014
2009-01-16 16:12:14 -08:00
Russ Cox
aedf121e30
casify struct fields in entire tree.
...
TBR=r
OCL=22997
CL=22997
2009-01-16 15:28:33 -08:00
Ian Lance Taylor
03c40f5122
Change malloc.Lookup to return the size as uintptr rather than
...
uint64. This changes the Go code to be consistent with the C
code.
R=rsc
DELTA=6 (0 added, 0 deleted, 6 changed)
OCL=22983
CL=22987
2009-01-16 15:03:22 -08:00
Ian Lance Taylor
6e4b9c696f
Remove types from constants, since they didn't match what
...
Tick() expected.
R=rsc
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=22979
CL=22986
2009-01-16 14:59:27 -08:00
Russ Cox
360962420c
casify, cleanup sys
...
R=r
OCL=22978
CL=22984
2009-01-16 14:58:14 -08:00
Rob Pike
ec9f2b0cd4
casify linux syscall dependents, plus a few stragglers
...
R=rsc
DELTA=97 (0 added, 0 deleted, 97 changed)
OCL=22971
CL=22973
2009-01-16 14:16:31 -08:00
Rob Pike
605ee5a3ef
s/split/Split/ to get compiling again
...
R=rsc
OCL=22967
CL=22967
2009-01-16 13:55:55 -08:00
Rob Pike
db1656f3e6
two more casifications in fmt
...
R=rsc
DELTA=14 (0 added, 0 deleted, 14 changed)
OCL=22960
CL=22962
2009-01-16 13:29:43 -08:00
Rob Pike
55ebef615b
casify flag.
...
R=rsc
DELTA=16 (0 added, 9 deleted, 7 changed)
OCL=22959
CL=22961
2009-01-16 13:19:43 -08:00
Rob Pike
ed2ac9b8b0
casify reflect.
...
R=rsc
DELTA=513 (0 added, 2 deleted, 511 changed)
OCL=22954
CL=22956
2009-01-16 12:48:07 -08:00
Russ Cox
aedfb397ae
casify misc
...
R=r
DELTA=247 (20 added, 50 deleted, 177 changed)
OCL=22951
CL=22955
2009-01-16 12:47:24 -08:00
Robert Griesemer
116a6e9c9c
- more bignum_test letter case fixes
...
R=r
OCL=22952
CL=22952
2009-01-16 12:04:40 -08:00
Rob Pike
1a91b9a8a9
casify syscall and sequelae
...
R=rsc
DELTA=337 (0 added, 1 deleted, 336 changed)
OCL=22950
CL=22950
2009-01-16 11:36:44 -08:00
Russ Cox
5d41f55acc
casify http
...
R=r
DELTA=33 (0 added, 0 deleted, 33 changed)
OCL=22947
CL=22949
2009-01-16 11:06:42 -08:00
Russ Cox
c840657fe1
casify DNS
...
R=r
DELTA=221 (0 added, 0 deleted, 221 changed)
OCL=22946
CL=22948
2009-01-16 11:04:44 -08:00
Rob Pike
794efd7e78
recasify regexp to use underscores and clean up the tests more
...
R=rsc
DELTA=174 (0 added, 0 deleted, 174 changed)
OCL=22917
CL=22942
2009-01-16 10:34:36 -08:00
Rob Pike
4b590bf985
casify a few more
...
R=rsc
DELTA=72 (0 added, 9 deleted, 63 changed)
OCL=22918
CL=22941
2009-01-16 10:34:21 -08:00
Russ Cox
393df07914
casify json
...
R=r
DELTA=163 (0 added, 0 deleted, 163 changed)
OCL=22910
CL=22939
2009-01-16 10:14:38 -08:00
Russ Cox
d2cdcfc1c8
casify hash
...
R=r
DELTA=235 (6 added, 26 deleted, 203 changed)
OCL=22907
CL=22938
2009-01-16 10:14:28 -08:00
Russ Cox
e83c85accb
casify time
...
R=r
DELTA=103 (1 added, 0 deleted, 102 changed)
OCL=22914
CL=22937
2009-01-16 10:14:12 -08:00
Russ Cox
2c8d9a5619
redo and clean up math.
...
R=r
DELTA=243 (60 added, 72 deleted, 111 changed)
OCL=22909
CL=22912
2009-01-15 19:11:32 -08:00
Russ Cox
8a7cbadbbe
convert strconv
...
R=r
DELTA=568 (0 added, 9 deleted, 559 changed)
OCL=22898
CL=22901
2009-01-15 17:22:17 -08:00
Rob Pike
74a60ed08a
casify lib/regexp
...
R=rsc
DELTA=259 (0 added, 0 deleted, 259 changed)
OCL=22897
CL=22900
2009-01-15 17:22:15 -08:00
Rob Pike
33f3ed7710
casify fixup for bufio
...
R=rsc
DELTA=88 (0 added, 12 deleted, 76 changed)
OCL=22884
CL=22890
2009-01-15 16:22:57 -08:00
Russ Cox
b54133d200
make safe for new package local defaults
...
R=r
DELTA=462 (9 added, 33 deleted, 420 changed)
OCL=22879
CL=22885
2009-01-15 16:16:42 -08:00
Rob Pike
1d74892178
more casifying fixups
...
R=rsc
DELTA=213 (0 added, 0 deleted, 213 changed)
OCL=22878
CL=22882
2009-01-15 16:03:27 -08:00
Rob Pike
497bb9c07d
casify fmt and its dependents.
...
R=rsc
DELTA=224 (0 added, 2 deleted, 222 changed)
OCL=22875
CL=22875
2009-01-15 15:40:27 -08:00
Robert Griesemer
e28692f07d
- converted tabwriter to new naming scheme
...
R=r
OCL=22870
CL=22870
2009-01-15 15:10:46 -08:00
Robert Griesemer
f4babf6931
- missed a few identifiers
...
R=r
OCL=22864
CL=22864
2009-01-15 14:49:40 -08:00
Robert Griesemer
364a852027
- lowercase non-exported functions in bignum
...
R=r
DELTA=117 (1 added, 0 deleted, 116 changed)
OCL=22764
CL=22863
2009-01-15 14:46:31 -08:00
Rob Pike
61f3302044
printf->Printf etc.
...
the raw fmt routines will be another, smaller but subtler pass.
R=rsc
DELTA=157 (0 added, 0 deleted, 157 changed)
OCL=22851
CL=22851
2009-01-15 13:48:11 -08:00
Russ Cox
5ea8ac78a8
add unicode library stub with just
...
IsUpper and IsLetter.
R=r
DELTA=746 (746 added, 0 deleted, 0 changed)
OCL=22743
CL=22750
2009-01-14 14:05:00 -08:00
Rob Pike
c45d2a767c
simplify flag interface. no more BVal etc. you just get a pointer.
...
fixed everything except the tutorial.
R=rsc
DELTA=404 (94 added, 139 deleted, 171 changed)
OCL=22414
CL=22422
2009-01-09 13:42:46 -08:00
Russ Cox
863dafb9ae
typo
...
R=r
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=22411
CL=22411
2009-01-09 11:17:13 -08:00
Russ Cox
484ba939d2
update sys.reflect and sys.unreflect to accomodate
...
the possibility of large objects in interface values.
R=r
DELTA=171 (97 added, 22 deleted, 52 changed)
OCL=22382
CL=22382
2009-01-09 00:17:46 -08:00
Robert Griesemer
8b8a862da8
- removed temporary work-arounds from bignum_test, not needed anymore
...
R=r
DELTA=93 (0 added, 61 deleted, 32 changed)
OCL=22348
CL=22366
2009-01-08 17:38:24 -08:00
Rob Pike
ab331f7a7d
new sort interface - no structs, just slices.
...
R=rsc
DELTA=37 (0 added, 7 deleted, 30 changed)
OCL=22330
CL=22342
2009-01-08 15:12:00 -08:00
Rob Pike
289ff7d0e4
Cache *os.Error values across all users.
...
R=rsc
DELTA=27 (23 added, 0 deleted, 4 changed)
OCL=22245
CL=22245
2009-01-07 16:37:43 -08:00
Rob Pike
344b16512c
update utf8_test.go
...
R=rsc
OCL=22170
CL=22170
2009-01-06 15:30:07 -08:00
Russ Cox
5564504507
new new & make
...
R=r
OCL=22166
CL=22166
2009-01-06 15:19:02 -08:00
Rob Pike
1da03aaef7
A richer interface for regexps. Simple boolean matcher, a vector of strings rather than
...
indexes, and a global boolean function for quick action.
R=rsc
DELTA=152 (127 added, 12 deleted, 13 changed)
OCL=22140
CL=22142
2009-01-06 13:54:53 -08:00
Russ Cox
be76898cb3
change time.Tick test to use 100ms intervals.
...
now passes even under loaded conditions on r45.
R=r
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=22019
CL=22022
2009-01-05 11:18:20 -08:00
Ken Thompson
4991f20b3f
one bignum test fails
...
has to do with printing
patched it out
R=r
OCL=21921
CL=21923
2008-12-30 14:03:54 -08:00
Ken Thompson
b2dfd787d7
allow slices (open arrays) to be
...
receivers in methods.
put back original code for hilbert/bignum
R=r
OCL=21910
CL=21920
2008-12-30 14:02:20 -08:00
Ken Thompson
85815fe0ad
diagnostic to catch pointer to
...
rvalue promoted to method receiver.
fixes to bignum that failed.
R=r
OCL=21827
CL=21827
2008-12-26 14:42:20 -08:00
Rob Pike
b90b4157d1
put array test in table, with TODO to fix when arrays work in interfaces.
...
TBR=rsc
OCL=21766
CL=21766
2008-12-23 09:34:38 -08:00
Rob Pike
b0d62676d2
print array (not just *array) using %v
...
TBR=rsc
DELTA=34 (33 added, 0 deleted, 1 changed)
OCL=21718
CL=21718
2008-12-22 11:04:17 -08:00
Rob Pike
eb32228627
hilbert now runs.
...
it's 25% faster and runs with 40% less memory allocation than before
R=rsc
DELTA=20 (15 added, 0 deleted, 5 changed)
OCL=21690
CL=21690
2008-12-20 18:15:34 -08:00
Rob Pike
9ccf39bd68
update to new regime.
...
lines marked BUG are rewrites working around 6g bug.
R=rsc
DELTA=161 (42 added, 2 deleted, 117 changed)
OCL=21689
CL=21689
2008-12-20 17:25:43 -08:00
Russ Cox
c3077f7606
[] and struct in interfaces.
...
other [] cleanup.
convert() is gone.
R=r
DELTA=352 (144 added, 68 deleted, 140 changed)
OCL=21660
CL=21662
2008-12-19 17:11:54 -08:00
Russ Cox
33907d1346
allow Listen on ":9999" as an alias for "0.0.0.0:9999"
...
R=r
DELTA=21 (12 added, 0 deleted, 9 changed)
OCL=21653
CL=21653
2008-12-19 15:52:21 -08:00
Russ Cox
da0a7d7b8f
malloc bug fixes.
...
use malloc by default.
free stacks.
R=r
DELTA=424 (333 added, 29 deleted, 62 changed)
OCL=21553
CL=21584
2008-12-19 03:13:39 -08:00
Russ Cox
ba882f9940
fmt and reflect updates for recent changes
...
TBR=r
OCL=21580
CL=21583
2008-12-19 03:06:19 -08:00
Russ Cox
08ca30bbfa
change *map to map; *chan to chan; new(T) to new(*T)
...
fix bugs left over from *[] to [] conversion.
TBR=r
OCL=21576
CL=21581
2008-12-19 03:05:37 -08:00
Russ Cox
d47d888ba6
convert *[] to [].
...
R=r
OCL=21563
CL=21571
2008-12-18 22:37:22 -08:00
Russ Cox
83348f956e
host and port name lookup
...
R=r,presotto
DELTA=1239 (935 added, 281 deleted, 23 changed)
OCL=21041
CL=21539
2008-12-18 15:42:39 -08:00
Russ Cox
e29ce175ed
malloc in runtime (not used by default)
...
R=r
DELTA=1551 (1550 added, 0 deleted, 1 changed)
OCL=21404
CL=21538
2008-12-18 15:42:28 -08:00
Robert Griesemer
ab0d2582b4
- fixed a bug in Natural.And()
...
- removed some non-beneficial factorization and reduced number of array slices per
operations significantly
- reduced line count
- benchhil benchmark time reduced by ~2%
R=r
DELTA=313 (106 added, 163 deleted, 44 changed)
OCL=21473
CL=21497
2008-12-18 09:55:33 -08:00
Russ Cox
67a7abad7f
clear flags so that %+v does not pass the +
...
to the first field it prints.
R=r
DELTA=2 (1 added, 0 deleted, 1 changed)
OCL=21324
CL=21328
2008-12-16 14:39:29 -08:00
Rob Pike
a10267adcd
If ByteBuffer has never been used, b.buf is nil but Data() should still work.
...
Fix the bug using a (safe) shared global empty array.
R=rsc
DELTA=8 (8 added, 0 deleted, 0 changed)
OCL=21303
CL=21303
2008-12-16 13:01:39 -08:00
Ken Thompson
ae5a475e20
range clause must have = or :=
...
:= illegal in for-increment
R=r
OCL=21204
CL=21204
2008-12-15 13:44:27 -08:00
Russ Cox
8fb837d96d
add test for once
...
R=r
DELTA=31 (31 added, 0 deleted, 0 changed)
OCL=21043
CL=21175
2008-12-15 08:56:17 -08:00
Russ Cox
a3155bdb09
remove implicit int -> string
...
R=ken
OCL=21020
CL=21020
2008-12-11 17:04:12 -08:00
Russ Cox
bf67afc84e
print field names on struct members.
...
also don't concatenate strings next
to each other in the struct,
like p.doprint does.
expose additional print flags to formatters
R=r
DELTA=128 (111 added, 11 deleted, 6 changed)
OCL=20991
CL=21018
2008-12-11 16:53:33 -08:00
Rob Pike
9ba97ca308
add uintptr to reflect and print
...
R=rsc
DELTA=70 (35 added, 4 deleted, 31 changed)
OCL=20993
CL=20998
2008-12-11 14:41:12 -08:00
Rob Pike
546f269c3b
if the typestring gives a field name of "?", drop it.
...
R=rsc
DELTA=11 (7 added, 0 deleted, 4 changed)
OCL=20988
CL=20988
2008-12-11 13:24:04 -08:00
Rob Pike
ac09eb4f49
handle the nil interface better in reflect and print
...
R=rsc
DELTA=25 (19 added, 0 deleted, 6 changed)
OCL=20985
CL=20985
2008-12-11 12:59:49 -08:00
Russ Cox
793a6effcf
add JSON library
...
R=r
DELTA=1127 (1127 added, 0 deleted, 0 changed)
OCL=20975
CL=20983
2008-12-11 12:25:58 -08:00
Russ Cox
a9e890d5cf
looks like i broke the build
...
TBR=r
OCL=20963
CL=20963
2008-12-10 21:20:48 -08:00
Russ Cox
b927ad8835
DNS messages
...
R=r
DELTA=685 (683 added, 0 deleted, 2 changed)
OCL=20926
CL=20951
2008-12-10 17:17:59 -08:00
Russ Cox
d0e30cdaa9
assorted cleanup and fixes
...
R=r
DELTA=209 (109 added, 79 deleted, 21 changed)
OCL=20930
CL=20934
2008-12-10 15:55:59 -08:00
Rob Pike
a238087aa2
StringBytes help routine, common functionality put into package io for sharing.
...
R=rsc
DELTA=10 (10 added, 0 deleted, 0 changed)
OCL=20928
CL=20931
2008-12-10 15:46:45 -08:00
Ken Thompson
57bd0da375
bug126
...
R=r
OCL=20879
CL=20879
2008-12-09 18:31:31 -08:00
Rob Pike
436fcc68e0
fix historical editing glitch
...
R=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=20871
CL=20873
2008-12-09 17:43:11 -08:00
Rob Pike
f5cfadde47
implement two TODOs in reflect:
...
- delete vestigial SetString method
- make type map use interface instead of *interface
R=rsc
DELTA=31 (0 added, 7 deleted, 24 changed)
OCL=20861
CL=20863
2008-12-09 16:33:02 -08:00
Rob Pike
50d0695ccf
use unsafe.pointer in reflection objects
...
R=rsc
DELTA=326 (4 added, 259 deleted, 63 changed)
OCL=20853
CL=20856
2008-12-09 15:41:21 -08:00
Robert Griesemer
6cbdeb3f88
- fixed bug with unicode text formatting: the number of bytes
...
per rune cannot be computed correctly if we have only parts
of a rune - delay computation
- added html filtering mode: html tags and entities are ignored
for width computations
- expanded tests:
- extra tests for html text
- extra tests that write text in various portions
R=r
DELTA=227 (126 added, 20 deleted, 81 changed)
OCL=20833
CL=20835
2008-12-09 13:03:15 -08:00
Russ Cox
0d9c1abb58
replace assembly casts with unsafe.pointer
...
R=r
DELTA=178 (18 added, 101 deleted, 59 changed)
OCL=20822
CL=20826
2008-12-09 10:57:55 -08:00
Russ Cox
f58567d6e2
more impossible time errors
...
R=r
DELTA=4 (0 added, 0 deleted, 4 changed)
OCL=20788
CL=20818
2008-12-09 10:27:30 -08:00
Russ Cox
6478df1c41
avoid skew in time.Tick; remove errors from time.Seconds, time.Nanoseconds
...
R=r
DELTA=46 (21 added, 10 deleted, 15 changed)
OCL=20785
CL=20787
2008-12-08 17:45:50 -08:00
Rob Pike
73120ee81d
use sync.Mutex instead of a channel for locking
...
R=rsc
DELTA=12 (3 added, 1 deleted, 8 changed)
OCL=20631
CL=20634
2008-12-05 15:18:07 -08:00
Robert Griesemer
8aeb8647c5
- handle UTF-8 text in tabwriter
...
R=r
DELTA=84 (27 added, 3 deleted, 54 changed)
OCL=20539
CL=20584
2008-12-05 09:22:13 -08:00
Russ Cox
0d1cbaf225
strings.utflen -> utf8.RuneCount, RuneCountInString
...
R=r
DELTA=94 (52 added, 33 deleted, 9 changed)
OCL=20547
CL=20552
2008-12-04 21:00:34 -08:00
Ian Lance Taylor
1a19cb8ec0
Make run.bash run all the current tests.
...
R=r,rsc
DELTA=8 (8 added, 0 deleted, 0 changed)
OCL=20468
CL=20473
2008-12-04 13:14:09 -08:00
Russ Cox
bf3dd3f0ef
add mutex.Mutex
...
R=r
DELTA=349 (348 added, 0 deleted, 1 changed)
OCL=20380
CL=20472
2008-12-04 12:51:36 -08:00
Russ Cox
3e8faa640f
fix build - forgot these files
...
TBR=r
OCL=20448
CL=20448
2008-12-04 10:18:53 -08:00
Russ Cox
c7bab46d0f
add time.Tick()
...
R=r
DELTA=130 (115 added, 1 deleted, 14 changed)
OCL=20376
CL=20385
2008-12-03 16:40:00 -08:00
Russ Cox
dfa5893d4f
preparation for exec.
...
* syscall:
add syscall.RawSyscall, which doesn't use sys.entersyscall/sys.exitsyscall
add syscall.dup2
add syscall.BytePtrPtr
add syscall.Rusage, RusagePtr
add syscall.F_GETFD, F_SETFD, FD_CLOEXEC
* runtime:
clean up, correct signal handling.
can now survive (continue running after) a signal.
R=r
DELTA=394 (286 added, 51 deleted, 57 changed)
OCL=20351
CL=20369
2008-12-03 14:21:28 -08:00
Russ Cox
32a1ee85b1
Make strconv.atof("-0") return -0
...
and update test.
R=iant
DELTA=11 (3 added, 1 deleted, 7 changed)
OCL=20350
CL=20362
2008-12-03 13:29:13 -08:00
Russ Cox
5486096543
be more precise in ftoa_test.
...
R=ken
OCL=20173
CL=20173
2008-12-01 16:03:09 -08:00
Russ Cox
d154f8a9e2
add blank line (response to post-submit review of CL 19422)
...
TBR=r
OCL=20127
CL=20127
2008-12-01 10:26:23 -08:00
Russ Cox
efc86a74e4
change meaning of $GOMAXPROCS to number of cpus to use,
...
not number of threads. can still starve all the other threads,
but only by looping, not by waiting in a system call.
fix darwin syscall.Syscall6 bug.
fix chanclient bug.
delete $GOMAXPROCS from network tests.
add stripped down printf, sys.printhex to runtime.
R=r
DELTA=355 (217 added, 36 deleted, 102 changed)
OCL=20017
CL=20019
2008-11-25 16:48:10 -08:00
Robert Griesemer
7cfa7eebf3
- fixed a problem with flushing
...
- added extra tests
R=r
DELTA=164 (107 added, 20 deleted, 37 changed)
OCL=20002
CL=20004
2008-11-25 14:06:59 -08:00
Russ Cox
92cff8557e
gotest: change pattern to Test([^a-z].*)?
...
warn about files with no tests
be clear about where testing warnings come from
R=r
DELTA=18 (12 added, 3 deleted, 3 changed)
OCL=19988
CL=19993
2008-11-25 12:49:17 -08:00
Robert Griesemer
480b962df5
- delete vector.go - not needed anymore
...
- runs all.bash
R=r
DELTA=121 (0 added, 121 deleted, 0 changed)
OCL=19960
CL=19983
2008-11-25 10:08:49 -08:00
Rob Pike
5f9254c11a
make a (rudimentary) ByteBuffer and put it in package "io".
...
fix up protocol buffers to use it.
R=rsc
DELTA=1232 (612 added, 572 deleted, 48 changed)
OCL=19964
CL=19981
2008-11-25 09:41:58 -08:00
Russ Cox
afff0ff1b8
% x inserts spaces between hex bytes in string/*[]byte
...
R=r
DELTA=7 (7 added, 0 deleted, 0 changed)
OCL=19967
CL=19978
2008-11-25 09:23:13 -08:00
Russ Cox
ed490dbed8
add author lines
...
R=r
DELTA=150 (147 added, 0 deleted, 3 changed)
OCL=19968
CL=19977
2008-11-25 09:22:58 -08:00
Russ Cox
bbe9bb65c7
add hash to build; rm pkg/* in clean.bash
...
R=r
DELTA=3 (3 added, 0 deleted, 0 changed)
OCL=19935
CL=19937
2008-11-24 15:18:29 -08:00
Russ Cox
0f83fa3a0c
convert tests.
...
refine gotest's test selection criteria.
R=r
DELTA=1590 (745 added, 844 deleted, 1 changed)
OCL=19903
CL=19936
2008-11-24 15:17:47 -08:00
Russ Cox
387df5e176
replay CL 19916 and CL 19913 now that the build can handle them
...
TBR=r
OCL=19924
CL=19934
2008-11-24 14:51:33 -08:00
Russ Cox
0a20746cac
remove old .6 after install,
...
so that compilation of other .6
will use the copy in goroot/pkg
R=r
DELTA=3 (1 added, 0 deleted, 2 changed)
OCL=19931
CL=19933
2008-11-24 14:51:01 -08:00
Rob Pike
2a874603ae
add missing file
...
R=rsc
OCL=19926
CL=19926
2008-11-24 13:47:52 -08:00
Russ Cox
c00295d115
Automated g4 rollback of changelist 19913.
...
*** Reason for rollback ***
broke build
*** Original change description ***
bufio.ReadRune
TBR=r
OCL=19923
CL=19923
2008-11-24 13:29:59 -08:00
Russ Cox
85fea81d70
Automated g4 rollback of changelist 19916.
...
*** Reason for rollback ***
broke build
*** Original change description ***
utf8: add InString routines for decoding in strings
reflect: add InterfaceValue.Get(), remove Empty
strconv: add Quote, CanBackquote
fmt:
* %q go-quoted " string
* %#q go-quoted ` string if possible, " string otherwise
* %x hexadecimal string
* anywhere a string is okay, *[]byte is okay
* flags # 0 - + space
* print value inside interface, not interface itself
* tests
TBR=r
OCL=19920
CL=19920
2008-11-24 13:24:15 -08:00
Russ Cox
b65a930453
utf8: add InString routines for decoding in strings
...
reflect: add InterfaceValue.Get(), remove Empty
strconv: add Quote, CanBackquote
fmt:
* %q go-quoted " string
* %#q go-quoted ` string if possible, " string otherwise
* %x hexadecimal string
* anywhere a string is okay, *[]byte is okay
* flags # 0 - + space
* print value inside interface, not interface itself
* tests
R=r
DELTA=756 (597 added, 121 deleted, 38 changed)
OCL=19888
CL=19916
2008-11-24 13:04:27 -08:00
Robert Griesemer
508277debe
bufio.ReadRune
...
R=rsc
DELTA=32 (29 added, 0 deleted, 3 changed)
OCL=19809
CL=19913
2008-11-24 12:35:07 -08:00
Russ Cox
0432a34383
make bignum_test a test
...
R=gri
DELTA=967 (468 added, 499 deleted, 0 changed)
OCL=19906
CL=19912
2008-11-24 12:32:31 -08:00
Russ Cox
e3b793004f
hash writers: adler32, crc32, md5, sha1.
...
all could probably be made faster.
R=r
DELTA=929 (929 added, 0 deleted, 0 changed)
OCL=19879
CL=19911
2008-11-24 12:30:40 -08:00
Russ Cox
0e198da634
fix %g 20 -> "2e+01" want "20"
...
R=r
DELTA=11 (10 added, 0 deleted, 1 changed)
OCL=19885
CL=19887
2008-11-23 17:27:44 -08:00
Russ Cox
5169bb44e6
utf8 routines in go; a start.
...
also:
* parse flags in testing.Main.
* add make test in src/lib.
R=r
DELTA=323 (323 added, 0 deleted, 0 changed)
OCL=19831
CL=19850
2008-11-21 16:13:31 -08:00
Russ Cox
c4bba4b1fd
fix build - missed update that added tabwriter
...
TBR=r
OCL=19804
CL=19804
2008-11-21 13:05:09 -08:00
Russ Cox
5a863a4ece
convert lib to a Makefile,
...
mainly for "make bufio.install".
R=r
DELTA=144 (80 added, 62 deleted, 2 changed)
OCL=19760
CL=19799
2008-11-21 12:36:16 -08:00
Robert Griesemer
130e6f42f1
- implemented arbitrary padding char for tabwriter
...
- implemented right-to-left alignment (numerical results)
- better comments and error handling
- added more tests
- updated dependent files
R=r
DELTA=232 (175 added, 11 deleted, 46 changed)
OCL=19761
CL=19780
2008-11-21 09:35:49 -08:00
Rob Pike
0444d697c1
automatically add tabs after newlines
...
R=gri
DELTA=12 (10 added, 0 deleted, 2 changed)
OCL=19758
CL=19758
2008-11-20 18:10:46 -08:00
Robert Griesemer
01b44bbfc8
- move tabwriter into library
...
- added preliminary tests (more to do)
- renamed type from TabWriter -> Writer
- adjusted my code where necessary
R=r
DELTA=825 (474 added, 346 deleted, 5 changed)
OCL=19744
CL=19753
2008-11-20 17:39:41 -08:00
Russ Cox
2e7e76073a
slightly simpler math.Pow per gri's suggestion
...
R=gri
DELTA=28 (2 added, 9 deleted, 17 changed)
OCL=19707
CL=19707
2008-11-20 11:56:48 -08:00
Russ Cox
f379ea0b07
more accurate Log, Exp, Pow.
...
move test.go to alll_test.go.
R=r
DELTA=1024 (521 added, 425 deleted, 78 changed)
OCL=19687
CL=19695
2008-11-20 10:54:02 -08:00
Rob Pike
c0a01e9665
refine gobuild: the files must be *_test.go not *test.go
...
this causes complications
R=rsc
DELTA=1724 (849 added, 856 deleted, 19 changed)
OCL=19667
CL=19667
2008-11-19 19:43:32 -08:00
Rob Pike
12254b6c0b
change naming convention for tests from
...
test*.go
to
*test.go
R=rsc
DELTA=1747 (864 added, 855 deleted, 28 changed)
OCL=19666
CL=19666
2008-11-19 19:11:01 -08:00
Rob Pike
64023e7b7d
a few Errorfs should have been Error
...
R=rsc
DELTA=6 (0 added, 0 deleted, 6 changed)
OCL=19662
CL=19664
2008-11-19 18:43:04 -08:00
Robert Griesemer
9af3ee5471
- full support for sorting (assumes array elements implement LessInterface
...
- better test reporting
R=r
DELTA=43 (24 added, 0 deleted, 19 changed)
OCL=19641
CL=19645
2008-11-19 16:23:45 -08:00
Russ Cox
88daac7862
gotestify & gostylify math.
...
R=r
DELTA=682 (275 added, 301 deleted, 106 changed)
OCL=19638
CL=19642
2008-11-19 16:14:31 -08:00
Rob Pike
be7e0f8160
gotestify regexp
...
R=rsc
DELTA=101 (53 added, 25 deleted, 23 changed)
OCL=19635
CL=19637
2008-11-19 15:38:46 -08:00
Robert Griesemer
9195c22e7c
use new test framework in array test
...
R=r
DELTA=30 (2 added, 5 deleted, 23 changed)
OCL=19627
CL=19632
2008-11-19 15:17:58 -08:00
Robert Griesemer
bef9b1713a
- removed uses of vector in favor of array in a few places
...
- fixed make.bash
R=r
DELTA=21 (1 added, 3 deleted, 17 changed)
OCL=19624
CL=19629
2008-11-19 15:16:20 -08:00
Rob Pike
6d30efc772
add a type testing.T and use it in tests.
...
update uses of gotest.
minor tweak to testing structure for protobuf.
R=rsc
DELTA=276 (71 added, 75 deleted, 130 changed)
OCL=19614
CL=19621
2008-11-19 14:38:05 -08:00
Robert Griesemer
165d78717d
- adjust sort.go to use new naming conventions
...
R=rsc
DELTA=31 (0 added, 0 deleted, 31 changed)
OCL=19618
CL=19620
2008-11-19 14:32:15 -08:00
Robert Griesemer
93dcc2c248
new Makefile generated by gobuild
...
R=rsc
DELTA=9 (7 added, 0 deleted, 2 changed)
OCL=19613
CL=19613
2008-11-19 14:24:53 -08:00
Robert Griesemer
b548e73460
- array lib (essentially vector, more complete)
...
- TODO replace vector
R=r
DELTA=314 (313 added, 0 deleted, 1 changed)
OCL=19592
CL=19609
2008-11-19 14:05:21 -08:00
Russ Cox
87b1124407
gobuild: add coverage rule, ignore files in package main.
...
R=r
DELTA=55 (41 added, 11 deleted, 3 changed)
OCL=19594
CL=19598
2008-11-19 12:52:30 -08:00
Russ Cox
cf9b7f7534
essentially 100% coverage of strconv in tests.
...
fix a few bugs.
R=r
DELTA=294 (275 added, 9 deleted, 10 changed)
OCL=19595
CL=19595
2008-11-19 12:50:34 -08:00
Rob Pike
572cad8719
gotest, via testing.go, should warn you if you failed to create any tests.
...
when chatty, it should tell you how many there are.
R=rsc
DELTA=5 (5 added, 0 deleted, 0 changed)
OCL=19590
CL=19590
2008-11-19 11:50:58 -08:00
Robert Griesemer
60ee27d96c
saving 2 lines :-)
...
R=rsc
DELTA=5 (0 added, 2 deleted, 3 changed)
OCL=19562
CL=19585
2008-11-19 10:20:52 -08:00
Russ Cox
f1547e511b
leave 6.out around after gotest;
...
delete it in make clean.
R=r
DELTA=10 (0 added, 0 deleted, 10 changed)
OCL=19542
CL=19581
2008-11-19 09:40:54 -08:00
Rob Pike
addd6fa846
read and write never return -1 now: error return is through the error variable only
...
R=rsc
DELTA=13 (9 added, 0 deleted, 4 changed)
OCL=19538
CL=19570
2008-11-18 22:32:01 -08:00
Ken Thompson
497e648e7e
perm is [] instead of map
...
R=r
OCL=19569
CL=19569
2008-11-18 19:59:56 -08:00
Russ Cox
9dc4b1ca90
make Copyn take and return int64.
...
add Copy.
R=gri
DELTA=52 (37 added, 1 deleted, 14 changed)
OCL=19557
CL=19559
2008-11-18 18:45:51 -08:00
Robert Griesemer
79d94d504f
Copyn
...
R=rsc
DELTA=34 (34 added, 0 deleted, 0 changed)
OCL=19541
CL=19545
2008-11-18 18:08:05 -08:00
Russ Cox
23bd1298f7
add -chatty flag to test.
...
was supposed to be in some other cl but got dropped.
R=r
DELTA=21 (16 added, 2 deleted, 3 changed)
OCL=19531
CL=19539
2008-11-18 17:52:05 -08:00
Russ Cox
c5f4867ffa
stop flag reading before lone - arg.
...
R=r
DELTA=5 (3 added, 0 deleted, 2 changed)
OCL=19520
CL=19529
2008-11-18 17:23:11 -08:00
Russ Cox
92a4fe1dd5
more tests for strconv; convert to gotest.
...
R=r
DELTA=219 (186 added, 32 deleted, 1 changed)
OCL=19508
CL=19523
2008-11-18 17:12:14 -08:00
Russ Cox
6cc001c312
return *os.Error instead of bool from strconv.ato*
...
R=r
DELTA=137 (56 added, 4 deleted, 77 changed)
OCL=19505
CL=19522
2008-11-18 17:12:07 -08:00
Russ Cox
360151d4e2
gobuild changes.
...
* handles multiple packages per directory
* scans directory for files if given no arguments
* infers package name
* includes test rule invoking gotest
R=r
DELTA=746 (444 added, 150 deleted, 152 changed)
OCL=19504
CL=19521
2008-11-18 17:11:56 -08:00
Russ Cox
c1efd7d6e5
roll tests into one binary
...
R=r
DELTA=145 (27 added, 27 deleted, 91 changed)
OCL=19423
CL=19502
2008-11-18 16:13:25 -08:00
Rob Pike
7969860126
testing support library
...
R=rsc
OCL=19496
CL=19496
2008-11-18 15:29:10 -08:00
Rob Pike
d495372509
new gotest shell script (will be a proper command some day, probably)
...
automates construction and execution of unit tests.
R=rsc
DELTA=60 (58 added, 0 deleted, 2 changed)
OCL=19482
CL=19484
2008-11-18 14:12:14 -08:00
Russ Cox
ed628ca79b
* faster atof for common cases
...
(gets 3x speedup in go; got 40x in c)
* handle and test overflow
R=r
DELTA=217 (200 added, 0 deleted, 17 changed)
OCL=19399
CL=19422
2008-11-17 17:22:51 -08:00
Russ Cox
079c00a475
correctly rounded floating-point conversions
...
in new package strconv.
move atoi etc to strconv too.
update fmt, etc to use strconv.
R=r
DELTA=2232 (1691 added, 424 deleted, 117 changed)
OCL=19286
CL=19380
2008-11-17 12:34:03 -08:00
Russ Cox
5aa7dc5daf
adopt suggestions from Bentley and McIlroy (SP&E Nov 1993)
...
to make qsort more robust:
* use "ninther" to choose pivot.
* use three-way partition to avoid quadratic
behavior on all-one-value arrays.
also add tests suggested in that paper.
the immediate cause of the slowness we observed was
in fact none of these: the recursive call was sorting
data[0:m] instead of data[a:m].
also rename package to "sort" to match convention.
R=r,gri
DELTA=358 (255 added, 21 deleted, 82 changed)
OCL=19341
CL=19373
2008-11-17 11:51:34 -08:00
Ken Thompson
2567c073ea
random permutation function
...
func perm(n int) *map[int]int
R=r
OCL=19340
CL=19340
2008-11-16 13:02:47 -08:00
Robert Griesemer
23c8faaf85
buf fix: make FD.Read, FD.Write work for empty buffers
...
R=r
DELTA=8 (6 added, 0 deleted, 2 changed)
OCL=19273
CL=19275
2008-11-14 15:13:29 -08:00
Rob Pike
f3e354ec26
clean up make script
...
reorder pieces so io is earlier
R=rsc
DELTA=66 (27 added, 24 deleted, 15 changed)
OCL=19248
CL=19255
2008-11-14 12:53:44 -08:00
Robert Griesemer
0c4c842eb0
- added Init() function so that vectors can be used w/o New():
...
var v Vector.Vector;
v.Init();
...
- clear vector elements in Reset
- removed some comments that seem redundant
R=r
DELTA=16 (9 added, 5 deleted, 2 changed)
OCL=19247
CL=19247
2008-11-14 11:22:39 -08:00
Russ Cox
f8b20e4083
add cov, prof to default build; clean up compiler warnings
...
R=r
DELTA=8 (1 added, 0 deleted, 7 changed)
OCL=19245
CL=19245
2008-11-14 10:57:48 -08:00
Rob Pike
2355395550
handle nils safely
...
R=rsc
DELTA=38 (14 added, 10 deleted, 14 changed)
OCL=19242
CL=19242
2008-11-14 10:42:45 -08:00
Rob Pike
e2621b8037
add a %v format to print an arbitrary value in its "println" form.
...
also add code to print (pointers to) arrays, through %v.
R=rsc
DELTA=108 (70 added, 33 deleted, 5 changed)
OCL=19184
CL=19192
2008-11-13 15:20:52 -08:00
Russ Cox
e4f4ab0b8d
more array methods
...
R=r
OCL=19172
CL=19172
2008-11-13 13:42:59 -08:00
Russ Cox
c5f21c0dc2
* 6l:
...
if an object in an archive tries to refer
to a file in its original source directory,
ignore it.
* 6ar:
fix bug if archive is empty.
* gobuild:
build archive in current directory.
* math:
use new gobuild Makefile.
* test/math.go:
rename to mathest.go, add // run line, make it run.
R=r
DELTA=494 (277 added, 203 deleted, 14 changed)
OCL=19090
CL=19171
2008-11-13 13:42:26 -08:00
Rob Pike
419e1e05a1
add some support for modifying what pointers point to
...
R=rsc
DELTA=27 (16 added, 11 deleted, 0 changed)
OCL=19130
CL=19132
2008-11-12 19:05:05 -08:00
Rob Pike
6e70c2c74f
fix bug in FullyReader
...
R=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=19131
CL=19131
2008-11-12 19:04:56 -08:00
Rob Pike
b1d37b74d9
reflect.PtrValue.SetSub() to set pointers
...
R=rsc
OCL=19101
CL=19101
2008-11-12 14:19:39 -08:00
Robert Griesemer
2727abe4fc
- lowercased package name (Bignum -> bignum)
...
- implemented some missing functionality (and, or, xor of positive ints)
R=r
OCL=19087
CL=19087
2008-11-12 11:00:11 -08:00
Rob Pike
6ee7fe5808
Implement a "full reader" wrapper for io.Read, guaranteeing that
...
either the buffer is full, zero bytes were read, or an error is returned.
R=rsc
DELTA=44 (42 added, 0 deleted, 2 changed)
OCL=19027
CL=19047
2008-11-11 17:28:36 -08:00
Rob Pike
842e1a9aa7
Add a cache to avoid unnecessary parsing of type strings when constructing values
...
R=rsc
DELTA=12 (9 added, 0 deleted, 3 changed)
OCL=18916
CL=18921
2008-11-10 14:53:40 -08:00
Rob Pike
091fb779a1
Protocol buffer encoding.
...
R=rsc
DELTA=1075 (1028 added, 31 deleted, 16 changed)
OCL=18865
CL=18918
2008-11-10 14:47:28 -08:00
Robert Griesemer
176e256b26
Added missing Set method for Vector
...
BUG=1474670
TBR=r
DELTA=6 (6 added, 0 deleted, 0 changed)
OCL=18839
CL=18843
2008-11-07 18:31:50 -08:00
Rob Pike
4328d44254
wrong system call number for stat
...
TBR=rsc
OCL=18833
CL=18833
2008-11-07 16:17:42 -08:00
Robert Griesemer
483e031525
- binomial implementation (fixing broken build)
...
R=r
OCL=18738
CL=18738
2008-11-06 17:29:07 -08:00
Rob Pike
175dd773e6
simpleminded ascii to floating point conversion
...
R=rsc
DELTA=111 (107 added, 0 deleted, 4 changed)
OCL=18720
CL=18725
2008-11-06 16:32:28 -08:00
Robert Griesemer
66c6b13b03
- implemented String() and Format functionality in Bignum
...
- added a test
R=r
OCL=18687
CL=18687
2008-11-06 12:13:52 -08:00
Robert Griesemer
3a2c0a9615
- fixes to sprintf (by rob)
...
R=r
OCL=18685
CL=18685
2008-11-06 11:56:08 -08:00
Rob Pike
91212bd1ad
If a value implements String(), use that in fmt.print (not fmt.printf)
...
R=rsc
DELTA=13 (9 added, 0 deleted, 4 changed)
OCL=18682
CL=18684
2008-11-06 11:38:44 -08:00
Rob Pike
f15dfa7802
Polymorphic printing.
...
R=rsc
DELTA=100 (70 added, 10 deleted, 20 changed)
OCL=18663
CL=18669
2008-11-06 10:40:57 -08:00
Rob Pike
5a1cbe8b64
trim tags from type strings for structure fields.
...
R=rsc
DELTA=28 (14 added, 4 deleted, 10 changed)
OCL=18561
CL=18563
2008-11-05 13:01:33 -08:00
Rob Pike
44a82746a1
minor tweak to still non-portable alignment calculation
...
R=rsc
DELTA=4 (1 added, 1 deleted, 2 changed)
OCL=18528
CL=18533
2008-11-05 11:02:55 -08:00
Rob Pike
554d0aa589
make sizes and offsets int, not uint64
...
add Value.Interface, to extract an empty interface
that can be converted to a regular Go value of the
appropriate type, if known.
R=rsc
DELTA=49 (2 added, 0 deleted, 47 changed)
OCL=18526
CL=18526
2008-11-05 10:17:38 -08:00
Rob Pike
bdbb958895
fix bugs parsing functions in reflect library.
...
parsed interfaces wrong.
could not handle a function with a single type as a return value.
R=rsc
DELTA=34 (20 added, 2 deleted, 12 changed)
OCL=18511
CL=18520
2008-11-05 08:17:01 -08:00
Rob Pike
a45f947c34
type strings through the reflection library.
...
R=rsc
DELTA=187 (107 added, 28 deleted, 52 changed)
OCL=18510
CL=18510
2008-11-04 22:54:11 -08:00
Rob Pike
3200b06b14
prepare for recursive printfs
...
R=rsc
DELTA=31 (9 added, 6 deleted, 16 changed)
OCL=18470
CL=18472
2008-11-04 13:57:21 -08:00
Robert Griesemer
e2eccf3bd0
install bignum as library
...
R=r
DELTA=3501 (1752 added, 1749 deleted, 0 changed)
OCL=18460
CL=18471
2008-11-04 13:55:18 -08:00
Russ Cox
bcd6403cc9
remove unnecessary 6g workaround
...
R=r
DELTA=51 (0 added, 0 deleted, 51 changed)
OCL=18399
CL=18402
2008-11-03 16:00:08 -08:00
Rob Pike
1ff61cefaa
move DotDotDot into next case - hit submit too fast last time.
...
R=rsc
DELTA=5 (1 added, 2 deleted, 2 changed)
OCL=18395
CL=18398
2008-11-03 15:57:12 -08:00
Rob Pike
730fd707cb
support ... as a special type in the reflection library.
...
R=rsc
DELTA=17 (17 added, 0 deleted, 0 changed)
OCL=18386
CL=18393
2008-11-03 15:50:11 -08:00
Russ Cox
c4969a3b93
update names after 6g change
...
TBR=r
OCL=18381
CL=18383
2008-11-03 15:38:27 -08:00
Rob Pike
6524b82fed
ascii to unsigned integer
...
R=rsc
DELTA=60 (35 added, 17 deleted, 8 changed)
OCL=18339
CL=18343
2008-11-03 11:40:33 -08:00
Rob Pike
2d4f7ba0cd
printf as we know and love it.
...
Plus print[ln] with the ability to print struct values.
Note for language mavens: if a "..." function passes its argument
to another "..." function, the argument is not wrapped again. This
allows printf to call fprintf without extra manipulation. It's good
but needs to go in the spec.
This code works:
///
package main
import fmt "fmt"
import os "os"
type T struct { s string; a, b int }
func main() {
P := fmt.Printer();
P.printf("%s = %d with float value %.4f\n", "hi there", 7, 123.456);
P.println("hi there", 7, 123.456);
P.fprintf(os.Stdout, "%s = %d with float value %.4f\n", "hi there", 7, 123.456);
P.println(T{"x", 7, 234}, "end of struct", 8, 9);
}
R=rsc
DELTA=28 (7 added, 3 deleted, 18 changed)
OCL=18321
CL=18324
2008-11-02 12:33:02 -08:00
Rob Pike
178e37e766
add creator for missing types, to avoid crashes when
...
signature is absent from object file.
R=rsc
DELTA=18 (18 added, 0 deleted, 0 changed)
OCL=18315
CL=18323
2008-11-02 12:32:14 -08:00
Rob Pike
59f029cbf2
a couple of bugs in print.
...
1) bool wasn't handled (added '%t' for 'truth').
2) float64 had a typo.
TBR=rsc
DELTA=11 (10 added, 0 deleted, 1 changed)
OCL=18314
CL=18318
2008-11-01 16:37:53 -07:00
Ian Lance Taylor
16fd356679
Add support for the basic type "bool".
...
R=r
DELTA=51 (51 added, 0 deleted, 0 changed)
OCL=18283
CL=18290
2008-10-31 16:34:47 -07:00
Rob Pike
613a5c8bc6
\x00 for NUL in type string.
...
R=rsc
DELTA=14 (9 added, 0 deleted, 5 changed)
OCL=18281
CL=18281
2008-10-31 15:26:14 -07:00
Rob Pike
15fa1e4033
add mention of tag string to grammar comment
...
R=rsc
DELTA=3 (2 added, 0 deleted, 1 changed)
OCL=18232
CL=18232
2008-10-31 09:59:29 -07:00
Rob Pike
12a3435869
reflection support for tag strings
...
R=rsc
DELTA=86 (77 added, 0 deleted, 9 changed)
OCL=18201
CL=18203
2008-10-30 17:29:53 -07:00
Russ Cox
d0abe4cbb2
./6.out
...
R=ken
OCL=18079
CL=18079
2008-10-29 16:41:01 -07:00
Rob Pike
fe79e436b6
update fmt to int/int32 etc split
...
R=rsc
DELTA=9 (6 added, 0 deleted, 3 changed)
OCL=18072
CL=18075
2008-10-29 16:05:10 -07:00
Rob Pike
282493bbf6
update reflection library to int/int32 etc. split
...
fmt still to come
R=rsc
DELTA=168 (141 added, 19 deleted, 8 changed)
OCL=18064
CL=18071
2008-10-29 15:31:02 -07:00
Russ Cox
c5e7e19604
update linux for int/int32
...
R=r
DELTA=7 (0 added, 0 deleted, 7 changed)
OCL=18050
CL=18069
2008-10-29 15:23:36 -07:00
Russ Cox
cc5a382802
update Fmt interface: d=int, ud=uint, d32=int32, d64=int64, etc.
...
R=r
DELTA=202 (60 added, 24 deleted, 118 changed)
OCL=18029
CL=18038
2008-10-29 14:28:19 -07:00
Russ Cox
9d20756dde
fix strings bug from CL 18024
...
R=r
OCL=18026
CL=18026
2008-10-29 13:17:04 -07:00
Russ Cox
bc67ea4f8f
adapt to new compiler types
...
R=r
OCL=18024
CL=18024
2008-10-29 13:09:39 -07:00
Ken Thompson
c21d9a1ec9
the end of life as we know it
...
int is new type
R=r
OCL=18023
CL=18023
2008-10-29 12:46:44 -07:00
Rob Pike
c4af3e7c2a
use embedded types to save boilerplate - almost 300 lines' worth
...
R=rsc
DELTA=427 (53 added, 302 deleted, 72 changed)
OCL=17857
CL=17868
2008-10-26 08:28:33 -07:00
Rob Pike
db25e787fe
fix top-level comments
...
R=rsc
DELTA=14 (13 added, 0 deleted, 1 changed)
OCL=17858
CL=17867
2008-10-26 08:27:50 -07:00
Rob Pike
a785e8ac6d
replaced baked-in address with @ so test passes on linux
...
R=rsc
OCL=17841
CL=17841
2008-10-24 21:02:51 -07:00
Rob Pike
418b97c670
add printf to fmt.
...
uses reflection to determine arguments.
for now, the arguments must be provided as a struct; the compiler
will soon do the packaging automatically for "..." parameters.
R=rsc
DELTA=1436 (909 added, 520 deleted, 7 changed)
OCL=17823
CL=17831
2008-10-24 16:33:29 -07:00
Robert Griesemer
ad863046f8
- set initial value in flag variable if provided
...
R=r
DELTA=10 (9 added, 0 deleted, 1 changed)
OCL=17806
CL=17812
2008-10-24 14:05:42 -07:00
Rob Pike
7466b61ba4
make fmt a directory
...
some build dependencies need rearrangement because fmt will depend on reflect
R=rsc
DELTA=1091 (567 added, 521 deleted, 3 changed)
OCL=17792
CL=17796
2008-10-24 10:42:54 -07:00
Rob Pike
8327b54169
make reflect compile again
...
R=rsc
DELTA=9 (4 added, 4 deleted, 1 changed)
OCL=17753
CL=17755
2008-10-23 17:39:15 -07:00
Rob Pike
536b1f2e98
add reflect to build, clean up test
...
R=rsc
DELTA=341 (188 added, 151 deleted, 2 changed)
OCL=17678
CL=17750
2008-10-23 17:13:34 -07:00
Russ Cox
de13727f0f
use &T{1,2,3} constructor for simple new cases
...
R=r
OCL=17691
CL=17719
2008-10-23 12:41:06 -07:00
Rob Pike
5d30161ca7
move reflection code into final place.
...
this is just a branch.
next cl will update and add to build
R=rsc
DELTA=4528 (2264 added, 2264 deleted, 0 changed)
OCL=17670
CL=17672
2008-10-22 17:12:07 -07:00
Rob Pike
f0e93e8cc5
fix a couple of inconsequential glitches in regexp code.
...
R=rsc
DELTA=2 (0 added, 1 deleted, 1 changed)
OCL=17589
CL=17595
2008-10-21 17:18:34 -07:00
Russ Cox
aff914c6ec
add nuke
...
R=r
DELTA=3 (3 added, 0 deleted, 0 changed)
OCL=17497
CL=17500
2008-10-20 15:21:52 -07:00
Rob Pike
03a9872fe3
add primitive ftoa, dtoa to strings library.
...
R=rsc
DELTA=72 (69 added, 0 deleted, 3 changed)
OCL=17478
CL=17480
2008-10-20 13:53:20 -07:00
Russ Cox
7c7a525d18
add io.ReadWriteClose and use it in http
...
R=r
DELTA=15 (6 added, 7 deleted, 2 changed)
OCL=17447
CL=17461
2008-10-20 12:37:07 -07:00
Rob Pike
35eebcacc8
fix typo causing infinite recursion
...
R=rsc
OCL=17398
CL=17398
2008-10-17 17:59:27 -07:00
Rob Pike
d378321b6e
add atol and ltoa. probably want unsigned at some point too.
...
R=rsc
DELTA=14 (10 added, 0 deleted, 4 changed)
OCL=17387
CL=17390
2008-10-17 17:28:09 -07:00
Russ Cox
7cb6b6788c
new convert code found error
...
R=r
OCL=17327
CL=17327
2008-10-16 16:51:12 -07:00
Rob Pike
801f542b0f
remove hack now that vector of int works.
...
R=rsc
DELTA=9 (0 added, 3 deleted, 6 changed)
OCL=17248
CL=17250
2008-10-15 17:20:37 -07:00
Rob Pike
84523402fc
Make regexp build and install officially
...
R=rsc
DELTA=335 (172 added, 156 deleted, 7 changed)
OCL=17167
CL=17180
2008-10-14 22:16:45 -07:00
Rob Pike
69baaa9751
move regexp to lib
...
next cl will update names and add to build
R=rsc
DELTA=1876 (938 added, 938 deleted, 0 changed)
OCL=17149
CL=17166
2008-10-14 19:22:17 -07:00
Cary Hull
f960840a0e
Adding Mkdir.
...
R=rsc
APPROVED=rsc
DELTA=21 (21 added, 0 deleted, 0 changed)
OCL=16794
CL=16803
2008-10-09 00:15:37 -07:00
Russ Cox
103fec0455
add http to lib build
...
R=r
OCL=16721
CL=16727
2008-10-08 09:46:31 -07:00
Cary Hull
f4a8db667b
Fixes breakage caused by semicolon restriction.
...
R=rsc
APPROVED=rsc
DELTA=50 (4 added, 0 deleted, 46 changed)
OCL=16707
CL=16725
2008-10-08 09:34:50 -07:00
Cary Hull
38c2472609
Unterminated declaration breaks build.
...
R=rsc
APPROVED=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=16688
CL=16690
2008-10-07 17:25:32 -07:00
Russ Cox
e6cd1e445b
remove uses of *T as an implicit forward declaration of T
...
R=gri,r
OCL=16648
CL=16652
2008-10-07 12:59:54 -07:00
Russ Cox
983f06bdb6
update code to follow new semicolon rules:
...
* 1. all statements and declarations are terminated by semicolons
* 2. semicolons can be omitted at top level.
* 3. semicolons can be omitted before and after the closing ) or }
* on a list of statements or declarations.
/home/rsc/bin/addsemi and then diff+tweak.
R=r,gri
OCL=16620
CL=16643
2008-10-07 12:31:31 -07:00
Russ Cox
a4f15640aa
i can import "net" in package net
...
and still have a variable named "net"
R=r
DELTA=18 (0 added, 0 deleted, 18 changed)
OCL=16220
CL=16222
2008-09-30 14:03:13 -07:00
Ian Lance Taylor
489b5001e2
Use unsigned int in itoa to avoid relying on the behaviour of
...
signed integer overflow when negating the most negative
integer.
R=rsc
DELTA=11 (0 added, 7 deleted, 4 changed)
OCL=16105
CL=16120
2008-09-29 13:40:23 -07:00
Russ Cox
e4a61c6524
* implement Linux epoll for polling i/o
...
* isolate OS-specific polling goop in Pollster type
* move generic poll loop out of fd_darwin.go into fd.go
R=r
DELTA=782 (448 added, 281 deleted, 53 changed)
OCL=16108
CL=16119
2008-09-29 13:37:00 -07:00
Russ Cox
878fe69bc1
delete unused files
...
R=r
DELTA=494 (0 added, 494 deleted, 0 changed)
OCL=16109
CL=16115
2008-09-29 13:16:28 -07:00
Ian Lance Taylor
2fb4edd3e1
Correct zoneinfo version number: it's not 2, it's '2'.
...
R=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=16032
CL=16040
2008-09-27 09:39:37 -07:00
Russ Cox
43c5e63c00
Darwin kqueue/kevent-based network FDs
...
R=r
OCL=15998
CL=16004
2008-09-26 14:46:28 -07:00
Russ Cox
5267db394c
add os.Pipe
...
R=r
OCL=15989
CL=16001
2008-09-26 14:31:17 -07:00
Russ Cox
185a309737
fix build: new net Makefile
...
TBR=r
OCL=15996
CL=15996
2008-09-26 14:18:34 -07:00
Russ Cox
6201a963f1
move src/syscall to src/lib/syscall.
...
enforce rule: all kernel data structures and constants
go in syscall module.
move things that should be in syscall out of net.
make net a single package.
R=r
OCL=15985
CL=15994
2008-09-26 14:11:26 -07:00
Ian Lance Taylor
f023b7a997
Change the name of the result variable so that it does not
...
hide the package "ip".
R=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=15914
CL=15914
2008-09-25 17:36:37 -07:00
Ian Lance Taylor
99ec031391
To get an empty string, return an empty string, not 0.
...
R=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=15858
CL=15860
2008-09-25 10:51:23 -07:00
Russ Cox
42b7789a92
early HTTP library and trivial server
...
R=r
OCL=15777
CL=15791
2008-09-24 15:26:55 -07:00
Rob Pike
4d12c0e170
add os.Getenv()
...
R=rsc
DELTA=51 (50 added, 0 deleted, 1 changed)
OCL=15665
CL=15667
2008-09-22 17:31:41 -07:00
Russ Cox
c14924bcc8
implement zoneinfo reader
...
R=r
DELTA=348 (338 added, 0 deleted, 10 changed)
OCL=15648
CL=15660
2008-09-22 16:41:14 -07:00
Russ Cox
3c17ee69d9
add "once" package
...
R=r
DELTA=79 (79 added, 0 deleted, 0 changed)
OCL=15656
CL=15656
2008-09-22 16:26:57 -07:00
Russ Cox
0e81bba1fe
export an os.Error constructor
...
R=r
DELTA=20 (6 added, 7 deleted, 7 changed)
OCL=15569
CL=15571
2008-09-19 15:23:16 -07:00
Rob Pike
995f938ae3
more nuanced handling of usage message to allow user control.
...
also print argv(0) in default message
R=gri
DELTA=37 (21 added, 9 deleted, 7 changed)
OCL=15540
CL=15554
2008-09-19 12:52:00 -07:00
Russ Cox
72e3b204e4
add gobuild.
...
use gobuild-generated Makefile for math and os.
other makefile tweaks.
move math/main.go to test/math.go
R=r
OCL=15529
CL=15537
2008-09-19 11:55:46 -07:00
Russ Cox
76036192b9
make Makefiles safe for parallel make
...
use -j4 (4-way parallel) in make.bash.
halves time for make.bash on r45
also add libregexp, acid to default build
R=r
DELTA=90 (39 added, 37 deleted, 14 changed)
OCL=15485
CL=15487
2008-09-18 15:06:43 -07:00
Russ Cox
9f35e8b227
time & date.
...
rename AddrToInt, StatToInt, etc -> BytePtr, StatPtr, ...
R=r
OCL=15450
CL=15456
2008-09-17 16:20:00 -07:00
Russ Cox
9350ef4eea
add network listening & tests
...
R=r,presotto
OCL=15410
CL=15440
2008-09-17 13:49:23 -07:00