repo.or.cz
/
minix.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
panic() cleanup.
[minix.git]
/
lib
/
libc
/
stdio
/
puts.c
blob
56248b37f0416a35381111b3e927b712573bf4d2
1
/*
2
* puts.c - print a string onto the standard output stream
3
*/
4
/* $Header$ */
5
6
#include <stdio.h>
7
8
int
9
puts
(
register
const char
*
s
)
10
{
11
register
FILE
*
file
=
stdout
;
12
register
int
i
=
0
;
13
14
while
(*
s
) {
15
if
(
putc
(*
s
++,
file
) ==
EOF
)
return
EOF
;
16
else
i
++;
17
}
18
if
(
putc
(
'
\n
'
,
file
) ==
EOF
)
return
EOF
;
19
return
i
+
1
;
20
}