Embedded Artistry libc
C Standard Library Support for Bare-metal Systems
Main Page
Related Pages
+
Classes
Class List
Class Index
+
Class Members
+
All
_
c
d
e
f
g
i
k
l
m
n
p
q
r
s
t
w
x
+
Variables
_
c
d
e
f
g
i
k
l
m
n
p
q
r
s
t
w
x
+
Files
File List
+
File Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
+
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
p
q
r
s
t
u
v
w
+
Variables
_
b
c
d
e
f
h
i
l
n
p
t
v
w
+
Typedefs
_
a
b
c
d
f
i
j
n
s
t
u
v
w
Enumerator
+
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
y
•
All
Classes
Files
Functions
Variables
Typedefs
Enumerator
Macros
Pages
puts.c
Go to the documentation of this file.
1
#include <
stdio.h
>
2
3
int
puts
(
const
char
* str)
4
{
5
int
r = 0;
6
7
for
(
const
char
* c = str; *c != 0; c++)
8
{
9
putchar
((
int
)*c);
10
r++;
11
}
12
13
// puts adds a newline
14
if
(r)
15
{
16
putchar
(
'\n'
);
17
r++;
18
}
19
20
return
r ? r :
EOF
;
21
}
putchar
int putchar(int c)
Requires a definition of _putchar() for your platform.
Definition:
putchar.c:4
puts
int puts(const char *str)
Definition:
puts.c:3
EOF
#define EOF
Definition:
stdio.h:23
stdio.h
src
stdio
puts.c
Generated by
1.8.15