Use more appropriate types for pt_regs struct, e.g. 16-bit types for 16-bit
[cake.git] / rom / dos / fputs.c
blob639e500a397b0cb5d962fe15192a100c86ba0c3c
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: english
7 */
8 #include <dos/dosextens.h>
10 #include "dos_intern.h"
12 #include <aros/debug.h>
15 /*****************************************************************************
17 NAME */
18 #include <proto/dos.h>
20 AROS_LH2(LONG, FPuts,
21 /* FPuts -- Writes a string the the specified output (buffered) */
23 /* SYNOPSIS */
24 AROS_LHA(BPTR, file, D1),
25 AROS_LHA(CONST_STRPTR, string, D2),
27 /* LOCATION */
29 struct DosLibrary *, DOSBase, 57, Dos)
31 /* FUNCTION
32 This routine writes an unformatted string to the filehandle. No
33 newline is appended to the string. This routine is buffered.
35 INPUTS
36 file - Filehandle to write to.
37 string - String to write.
39 RESULT
40 0 if all went well or EOF in case of an error.
41 IoErr() gives additional information in that case.
43 SEE ALSO
44 FGetC(), IoErr()
46 *****************************************************************************/
48 AROS_LIBFUNC_INIT
50 ASSERT_VALID_PTR(BADDR(file));
51 ASSERT_VALID_PTR(string);
53 ULONG
54 len = strlen(string);
56 return(FWriteChars(file, string, len, DOSBase) == len
57 ? 0
58 : -1);
60 AROS_LIBFUNC_EXIT
61 } /* FPuts */