2 Copyright © 1995-2008, The AROS Development Team. All rights reserved.
8 #include <proto/exec.h>
9 #include <dos/dosextens.h>
10 #include <proto/dos.h>
11 #include <aros/asmcall.h>
12 #include "dos_intern.h"
14 AROS_UFH2(void,vfp_hook
,
15 AROS_UFHA(UBYTE
, chr
, D0
),
16 AROS_UFHA(struct vfp
*, vfp
, A3
))
20 struct DosLibrary
*DOSBase
= vfp
->DOSBase
;
22 if (vfp
->count
>= 0 && chr
!= '\0')
24 if (FPutC(vfp
->file
, chr
) < 0)
37 /*****************************************************************************
40 #include <proto/dos.h>
42 AROS_LH3(LONG
, VFPrintf
,
45 AROS_LHA(BPTR
, file
, D1
),
46 AROS_LHA(CONST_STRPTR
, format
, D2
),
47 AROS_LHA(const IPTR
*, argarray
, D3
),
50 struct DosLibrary
*, DOSBase
, 59, Dos
)
53 Write a formatted (RawDoFmt) string to a specified file (buffered).
56 file - Filehandle to write to
57 format - RawDoFmt() style formatting string
58 argarray - Pointer to array of formatting values
61 Number of bytes written or -1 for an error
73 *****************************************************************************/
81 vfp
.DOSBase
= DOSBase
;
83 (void)RawDoFmt(format
, (APTR
)argarray
,
84 (VOID_FUNC
)AROS_ASMSYMNAME(vfp_hook
), &vfp
);
86 /* Remove the last character (which is a NUL character) */
91 ((struct FileHandle *)BADDR(file))->fh_Pos--;