2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
7 #include <libraries/stdcio.h>
10 /*****************************************************************************
21 Read one line of characters from the standard input stream into
22 the buffer. Reading will stop, when a newline ('\n') is encountered,
23 EOF or when the buffer is full. If a newline is read, then it is
24 replaced by '\0'. The last character in the buffer is always '\0'.
27 buffer - Write characters into this buffer
30 buffer when succesfull. NULL in case of an error or when EOF without any
31 characters read. In the latter case buffer array is unchanged.
38 Never use this function. gets() does not know how large the buffer
39 is and will continue to store characters past the end of the buffer
40 if it has not encountered a newline or EOF yet. Use fgets() instead.
47 ******************************************************************************/
49 struct StdCIOBase
*StdCIOBase
= __aros_getbase_StdCIOBase();
54 while(c
!= '\n' && c
!= EOF
)
61 if (ferror(StdCIOBase
->_stdin
))
66 else if (c
== EOF
&& s
== buffer
)