use same location as .configured, etc, to store .files-touched
[AROS.git] / compiler / clib / fputs.c
blobb69567a9d8bad60f7dc3ce2bb4cb14fa57065da4
1 /*
2 Copyright © 1995-2003, The AROS Development Team. All rights reserved.
3 $Id$
5 ANSI C function fputs().
6 */
8 #include <proto/dos.h>
9 #include <errno.h>
10 #include "__errno.h"
11 #include "__fdesc.h"
13 /*****************************************************************************
15 NAME */
16 #include <stdio.h>
18 int fputs (
20 /* SYNOPSIS */
21 const char * str,
22 FILE * stream)
24 /* FUNCTION
25 Write a string to the specified stream.
27 INPUTS
28 str - Output this string...
29 fh - ...to this stream
31 RESULT
32 > 0 on success and EOF on error.
34 NOTES
36 EXAMPLE
38 BUGS
40 SEE ALSO
41 puts(), fputc(), putc()
43 INTERNALS
45 ******************************************************************************/
47 fdesc *fdesc = __getfdesc(stream->fd);
49 if (!fdesc)
51 errno = EBADF;
52 return EOF;
55 if (!str) str = "(null)";
57 if (FPuts((BPTR)fdesc->fcb->fh, str) == -1)
59 errno = IoErr2errno(IoErr());
60 return EOF;
63 return 0;
64 } /* fputs */