Listtree.mcc: use internal inherited class of NListtree
[AROS.git] / compiler / posixc / puts.c
blobc873d05f4879a8e6568c911e62593f604559d857
1 /*
2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 $Id$
5 C99 function puts().
6 */
8 #include <libraries/posixc.h>
10 /*****************************************************************************
12 NAME */
13 #include <stdio.h>
15 int puts (
17 /* SYNOPSIS */
18 const char * str)
20 /* FUNCTION
21 Print a string to stdout. A newline ('\n') is emmitted after the
22 string.
24 INPUTS
25 str - Print this string
27 RESULT
28 > 0 on success and EOF on error. On error, the reason is put in
29 errno.
31 NOTES
33 EXAMPLE
34 #include <errno.h>
36 if (puts ("Hello World.") != EOF)
37 fprintf (stderr, "Success");
38 else
39 fprintf (stderr, "Failure: errno=%d", errno);
41 BUGS
43 SEE ALSO
44 fputs(), printf(), fprintf(), putc(), fputc()
46 INTERNALS
48 ******************************************************************************/
50 struct PosixCBase *PosixCBase = __aros_getbase_PosixCBase();
54 fputs (str, PosixCBase->_stdout) == EOF ||
55 fputs ("\n", PosixCBase->_stdout) == EOF ||
56 fflush (PosixCBase->_stdout) == EOF
59 return EOF;
62 return 1;
63 } /* puts */