Check for SYS/GL during library init. Reason is that
[AROS.git] / test / clib / stdin4.c
blobaac5e51191d017ea9e90d54be4a05243ec15bcb1
1 /*
2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <proto/dos.h>
7 #include <dos/stdio.h>
8 #include <errno.h>
9 #include <stdio.h>
11 int main(void)
13 FPuts(Output(), "The command line arguments should be printed on next line\n");
15 LONG c;
16 BPTR in = Input(), out = Output();
17 for (c = FGetC(in);
18 c != '\n' && c != ENDSTREAMCH;
19 c = FGetC(in)
21 FPutC(out, c);
22 FPutC(out, '\n');
24 puts("Type a line and it should be repeated");
26 char c2;
27 for (c2 = getc(stdin);
28 c2 != '\n' && c2 != EOF && errno == 0;
29 c2 = getc(stdin)
31 putc(c2, stdout);
32 putc('\n', stdout);
34 return 0;