Support rastport clipping rectangle for layerless rastports
[tangerine.git] / rom / dos / vprintf.c
blobf2d56f0f30336875de028957975033b9b91dc934
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: English
7 */
9 #include <proto/exec.h>
10 #include <dos/dos.h>
11 #include <aros/asmcall.h>
12 #include "dos_intern.h"
14 AROS_UFP2(void, vfp_hook,
15 AROS_UFPA(UBYTE, chr, D0),
16 AROS_UFPA(struct vfp *, vfp, A3)
19 /*****************************************************************************
21 NAME */
22 #include <proto/dos.h>
24 AROS_LH2(LONG, VPrintf,
26 /* SYNOPSIS */
27 AROS_LHA(CONST_STRPTR, format, D1),
28 AROS_LHA(IPTR *, argarray, D2),
30 /* LOCATION */
31 struct DosLibrary *, DOSBase, 159, Dos)
33 /* FUNCTION
35 INPUTS
37 RESULT
39 NOTES
41 EXAMPLE
43 BUGS
45 SEE ALSO
47 INTERNALS
49 *****************************************************************************/
51 AROS_LIBFUNC_INIT
52 AROS_LIBBASE_EXT_DECL(struct DosLibrary *,DOSBase)
54 struct vfp vfp;
55 BPTR file = ((struct Process *)FindTask(NULL))->pr_COS;
57 vfp.file = file;
58 vfp.count = 0;
59 vfp.DOSBase = DOSBase;
61 (void)RawDoFmt(format, argarray,
62 (VOID_FUNC)AROS_ASMSYMNAME(vfp_hook), &vfp);
64 /* Remove the last character (which is a NUL character) */
66 if (vfp.count > 0)
68 vfp.count--;
69 ((struct FileHandle *)BADDR(file))->fh_Pos--;
73 return vfp.count;
74 AROS_LIBFUNC_EXIT
75 } /* VPrintf */