Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
ec2c7255
Commit
ec2c7255
authored
Dec 09, 2011
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
runtime: make print() built-in write to stderr.
Fixes issue 2294. From-SVN: r182167
parent
7de61209
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
libgo/runtime/go-print.c
+12
-12
No files found.
libgo/runtime/go-print.c
View file @
ec2c7255
...
...
@@ -18,43 +18,43 @@
void
__go_print_space
()
{
putc
har
(
' '
);
putc
(
' '
,
stderr
);
}
void
__go_print_nl
()
{
putc
har
(
'\n'
);
putc
(
'\n'
,
stderr
);
}
void
__go_print_string
(
struct
__go_string
val
)
{
printf
(
"%.*s"
,
(
int
)
val
.
__length
,
(
const
char
*
)
val
.
__data
);
fprintf
(
stderr
,
"%.*s"
,
(
int
)
val
.
__length
,
(
const
char
*
)
val
.
__data
);
}
void
__go_print_uint64
(
uint64_t
val
)
{
printf
(
"%llu"
,
(
unsigned
long
long
)
val
);
fprintf
(
stderr
,
"%llu"
,
(
unsigned
long
long
)
val
);
}
void
__go_print_int64
(
int64_t
val
)
{
printf
(
"%lld"
,
(
long
long
)
val
);
fprintf
(
stderr
,
"%lld"
,
(
long
long
)
val
);
}
void
__go_print_double
(
double
val
)
{
printf
(
"%.24g"
,
val
);
fprintf
(
stderr
,
"%.24g"
,
val
);
}
void
__go_print_complex
(
__complex
double
val
)
{
printf
(
"(%.24g%s%.24gi)"
,
fprintf
(
stderr
,
"(%.24g%s%.24gi)"
,
__builtin_creal
(
val
),
(
__builtin_cimag
(
val
)
>=
0
||
__builtin_isnan
(
__builtin_cimag
(
val
))
?
"+"
...
...
@@ -65,29 +65,29 @@ __go_print_complex (__complex double val)
void
__go_print_bool
(
_Bool
val
)
{
fputs
(
val
?
"true"
:
"false"
,
std
out
);
fputs
(
val
?
"true"
:
"false"
,
std
err
);
}
void
__go_print_pointer
(
void
*
val
)
{
printf
(
"%p"
,
val
);
fprintf
(
stderr
,
"%p"
,
val
);
}
void
__go_print_empty_interface
(
struct
__go_empty_interface
e
)
{
printf
(
"(%p,%p)"
,
e
.
__type_descriptor
,
e
.
__object
);
fprintf
(
stderr
,
"(%p,%p)"
,
e
.
__type_descriptor
,
e
.
__object
);
}
void
__go_print_interface
(
struct
__go_interface
i
)
{
printf
(
"(%p,%p)"
,
i
.
__methods
,
i
.
__object
);
fprintf
(
stderr
,
"(%p,%p)"
,
i
.
__methods
,
i
.
__object
);
}
void
__go_print_slice
(
struct
__go_open_array
val
)
{
printf
(
"[%d/%d]%p"
,
val
.
__count
,
val
.
__capacity
,
val
.
__values
);
fprintf
(
stderr
,
"[%d/%d]%p"
,
val
.
__count
,
val
.
__capacity
,
val
.
__values
);
}
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