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
2cda191a
Commit
2cda191a
authored
Sep 10, 2010
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
6c, 8c: show line numbers in -S output
R=ken2 CC=golang-dev
https://golang.org/cl/2107047
parent
82ee481d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
16 deletions
+29
-16
list.c
src/cmd/6c/list.c
+8
-7
list.c
src/cmd/8c/list.c
+21
-9
No files found.
src/cmd/6c/list.c
View file @
2cda191a
...
...
@@ -78,22 +78,23 @@ Pconv(Fmt *fp)
p
=
va_arg
(
fp
->
args
,
Prog
*
);
switch
(
p
->
as
)
{
case
ADATA
:
sprint
(
str
,
" %A %D/%d,%D"
,
p
->
as
,
&
p
->
from
,
p
->
from
.
scale
,
&
p
->
to
);
sprint
(
str
,
"
(%L)
%A %D/%d,%D"
,
p
->
lineno
,
p
->
as
,
&
p
->
from
,
p
->
from
.
scale
,
&
p
->
to
);
break
;
case
ATEXT
:
if
(
p
->
from
.
scale
)
{
sprint
(
str
,
" %A %D,%d,%lD"
,
p
->
as
,
&
p
->
from
,
p
->
from
.
scale
,
&
p
->
to
);
sprint
(
str
,
"
(%L)
%A %D,%d,%lD"
,
p
->
lineno
,
p
->
as
,
&
p
->
from
,
p
->
from
.
scale
,
&
p
->
to
);
break
;
}
sprint
(
str
,
" %A %D,%lD"
,
p
->
as
,
&
p
->
from
,
&
p
->
to
);
sprint
(
str
,
"
(%L)
%A %D,%lD"
,
p
->
lineno
,
p
->
as
,
&
p
->
from
,
&
p
->
to
);
break
;
default:
sprint
(
str
,
" %A %D,%lD"
,
p
->
as
,
&
p
->
from
,
&
p
->
to
);
sprint
(
str
,
"(%L) %A %D,%lD"
,
p
->
lineno
,
p
->
as
,
&
p
->
from
,
&
p
->
to
);
break
;
}
return
fmtstrcpy
(
fp
,
str
);
...
...
src/cmd/8c/list.c
View file @
2cda191a
...
...
@@ -76,15 +76,27 @@ Pconv(Fmt *fp)
Prog
*
p
;
p
=
va_arg
(
fp
->
args
,
Prog
*
);
if
(
p
->
as
==
ADATA
)
sprint
(
str
,
" %A %D/%d,%D"
,
p
->
as
,
&
p
->
from
,
p
->
from
.
scale
,
&
p
->
to
);
else
if
(
p
->
as
==
ATEXT
)
sprint
(
str
,
" %A %D,%d,%D"
,
p
->
as
,
&
p
->
from
,
p
->
from
.
scale
,
&
p
->
to
);
else
sprint
(
str
,
" %A %D,%D"
,
p
->
as
,
&
p
->
from
,
&
p
->
to
);
switch
(
p
->
as
)
{
case
ADATA
:
sprint
(
str
,
"(%L) %A %D/%d,%D"
,
p
->
lineno
,
p
->
as
,
&
p
->
from
,
p
->
from
.
scale
,
&
p
->
to
);
break
;
case
ATEXT
:
if
(
p
->
from
.
scale
)
{
sprint
(
str
,
"(%L) %A %D,%d,%lD"
,
p
->
lineno
,
p
->
as
,
&
p
->
from
,
p
->
from
.
scale
,
&
p
->
to
);
break
;
}
sprint
(
str
,
"(%L) %A %D,%lD"
,
p
->
lineno
,
p
->
as
,
&
p
->
from
,
&
p
->
to
);
break
;
default:
sprint
(
str
,
"(%L) %A %D,%lD"
,
p
->
lineno
,
p
->
as
,
&
p
->
from
,
&
p
->
to
);
break
;
}
return
fmtstrcpy
(
fp
,
str
);
}
...
...
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