Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
915f176f
Commit
915f176f
authored
Mar 11, 2009
by
Robert Griesemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- fixing (internal) capitalization
R=rsc DELTA=7 (0 added, 0 deleted, 7 changed) OCL=26080 CL=26080
parent
d671daf7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
tabwriter.go
src/lib/tabwriter/tabwriter.go
+7
-7
No files found.
src/lib/tabwriter/tabwriter.go
View file @
915f176f
...
...
@@ -25,12 +25,12 @@ type byteArray struct {
}
func
(
b
*
byteArray
)
I
nit
(
initial_size
int
)
{
func
(
b
*
byteArray
)
i
nit
(
initial_size
int
)
{
b
.
a
=
make
([]
byte
,
initial_size
)[
0
:
0
];
}
func
(
b
*
byteArray
)
L
en
()
int
{
func
(
b
*
byteArray
)
l
en
()
int
{
return
len
(
b
.
a
);
}
...
...
@@ -188,7 +188,7 @@ func (b *Writer) Init(output io.Write, cellwidth, padding int, padchar byte, fla
}
b
.
flags
=
flags
;
b
.
buf
.
I
nit
(
1024
);
b
.
buf
.
i
nit
(
1024
);
b
.
lines_size
.
Init
(
0
);
b
.
lines_width
.
Init
(
0
);
b
.
widths
.
Init
(
0
);
...
...
@@ -424,8 +424,8 @@ func (b *Writer) Write(buf []byte) (written int, err *os.Error) {
case
'\t'
,
'\n'
:
b
.
append
(
buf
[
i0
:
i
]);
i0
=
i
+
1
;
// exclude ch from (next) cell
b
.
width
+=
unicodeLen
(
b
.
buf
.
slice
(
b
.
pos
,
b
.
buf
.
L
en
()));
b
.
pos
=
b
.
buf
.
L
en
();
b
.
width
+=
unicodeLen
(
b
.
buf
.
slice
(
b
.
pos
,
b
.
buf
.
l
en
()));
b
.
pos
=
b
.
buf
.
l
en
();
// terminate cell
last_size
,
last_width
:=
b
.
line
(
b
.
lines_size
.
Len
()
-
1
);
...
...
@@ -451,7 +451,7 @@ func (b *Writer) Write(buf []byte) (written int, err *os.Error) {
if
b
.
flags
&
FilterHTML
!=
0
{
b
.
append
(
buf
[
i0
:
i
]);
i0
=
i
;
b
.
width
+=
unicodeLen
(
b
.
buf
.
slice
(
b
.
pos
,
b
.
buf
.
L
en
()));
b
.
width
+=
unicodeLen
(
b
.
buf
.
slice
(
b
.
pos
,
b
.
buf
.
l
en
()));
b
.
pos
=
-
1
;
// preventative - should not be used (will cause index out of bounds)
if
ch
==
'<'
{
b
.
html_char
=
'>'
;
...
...
@@ -470,7 +470,7 @@ func (b *Writer) Write(buf []byte) (written int, err *os.Error) {
if
b
.
html_char
==
';'
{
b
.
width
++
;
// count as one char
}
b
.
pos
=
b
.
buf
.
L
en
();
b
.
pos
=
b
.
buf
.
l
en
();
b
.
html_char
=
0
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment