repo.or.cz
/
AROS.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fixed compatibility of output.
[AROS.git]
/
test
/
clib
/
stdin3.c
blob
12e38a0fff02c657a0a7cef21715a851182e6154
1
/*
2
Copyright © 1995-2014, The AROS Development Team. All rights reserved.
3
$Id$
4
*/
5
6
#include <errno.h>
7
#include <stdio.h>
8
9
int
main
(
void
)
10
{
11
puts
(
"Type a line and it should be repeated"
);
12
13
char
c
;
14
for
(
c
=
getc
(
stdin
);
15
c
!=
'
\n
'
&&
c
!=
EOF
&&
errno
==
0
;
16
c
=
getc
(
stdin
)
17
)
18
putc
(
c
,
stdout
);
19
putc
(
'
\n
'
,
stdout
);
20
21
return
0
;
22
}