2 Copyright © 1995-2012, The AROS Development Team. All rights reserved.
5 Format a string and call a usercallback to output each char.
7 /* Original source from libnix */
10 #include <proto/dos.h>
14 static int __putc(int c
, void *fh
);
16 /*****************************************************************************
30 Format a list of arguments and print them on the specified stream.
33 stream - A stream on which one can write
34 format - A printf() format string.
35 args - A list of arguments for the format string.
38 The number of characters written.
50 ******************************************************************************/
52 fdesc
*fdesc
= __getfdesc(stream
->fd
);
60 return __vcformat ((void *)BADDR(fdesc
->fcb
->fh
), __putc
, format
, args
);
64 static int __putc(int c
, void *fhp
)
66 BPTR fh
= MKBADDR(fhp
);
67 if (FPutC(fh
, c
) == EOF
)
69 errno
= __arosc_ioerr2errno(IoErr());