2 Copyright © 1995-2008, The AROS Development Team. All rights reserved.
8 #include <proto/exec.h>
9 #include <dos/dosextens.h>
10 #include <dos/filesystem.h>
11 #include <proto/dos.h>
12 #include <aros/asmcall.h>
13 #include "dos_intern.h"
15 AROS_UFH2(void,vfp_hook
,
16 AROS_UFHA(UBYTE
, chr
, D0
),
17 AROS_UFHA(struct vfp
*, vfp
, A3
))
21 struct DosLibrary
*DOSBase
= vfp
->DOSBase
;
23 if (vfp
->count
>= 0 && chr
!= '\0')
25 if (FPutC(vfp
->file
, chr
) < 0)
38 /*****************************************************************************
41 #include <proto/dos.h>
43 AROS_LH3(LONG
, VFPrintf
,
46 AROS_LHA(BPTR
, file
, D1
),
47 AROS_LHA(CONST_STRPTR
, format
, D2
),
48 AROS_LHA(const IPTR
*, argarray
, D3
),
51 struct DosLibrary
*, DOSBase
, 59, Dos
)
54 Write a formatted (RawDoFmt) string to a specified file (buffered).
57 file - Filehandle to write to
58 format - RawDoFmt() style formatting string
59 argarray - Pointer to array of formatting values
62 Number of bytes written or -1 for an error
74 *****************************************************************************/
82 vfp
.DOSBase
= DOSBase
;
84 (void)RawDoFmt(format
, argarray
,
85 (VOID_FUNC
)AROS_ASMSYMNAME(vfp_hook
), &vfp
);
87 /* Remove the last character (which is a NUL character) */
92 ((struct FileHandle *)BADDR(file))->fh_Pos--;