define __KERNEL_STRICT_NAMES to avoid inclusion of kernel types on systems that carry...
[cake.git] / compiler / clib / puts.c
blob5da595e9e8ac5d031842999d6dc29f858253ce1e
1 /*
2 Copyright © 1995-2003, The AROS Development Team. All rights reserved.
3 $Id$
5 ANSI C function puts().
6 */
8 /*****************************************************************************
10 NAME */
11 #include <stdio.h>
13 int puts (
15 /* SYNOPSIS */
16 const char * str)
18 /* FUNCTION
19 Print a string to stdout. A newline ('\n') is emmitted after the
20 string.
22 INPUTS
23 str - Print this string
25 RESULT
26 > 0 on success and EOF on error. On error, the reason is put in
27 errno.
29 NOTES
31 EXAMPLE
32 #include <errno.h>
34 if (puts ("Hello World.") != EOF)
35 fprintf (stderr, "Success");
36 else
37 fprintf (stderr, "Failure: errno=%d", errno);
39 BUGS
41 SEE ALSO
42 fputs(), printf(), fprintf(), putc(), fputc()
44 INTERNALS
46 ******************************************************************************/
50 fputs (str, stdout) == EOF ||
51 fputs ("\n", stdout) == EOF ||
52 fflush (stdout) == EOF
55 return EOF;
58 return 1;
59 } /* puts */