tools/genmodule: Fix error in tests/clib/execl; should also fix gcc
[AROS.git] / rom / kernel / formatstr.c
blob1a10ac5908c6d2460e38f692fc1c544516e3c759
1 #include <aros/kernel.h>
2 #include <aros/libcall.h>
4 #include <stdarg.h>
5 #include <stdio.h>
7 /*****************************************************************************
9 NAME */
10 #include <proto/kernel.h>
12 AROS_LH3(int, KrnFormatStr,
14 /* SYNOPSIS */
15 AROS_LHA(void *, putch, A0),
16 AROS_LHA(const char *, format, A1),
17 AROS_LHA(va_list, args, A2),
19 /* LOCATION */
20 APTR, KernelBase, 30, Kernel)
22 /* FUNCTION
23 Format a string using C printf() convention, using 'putch'
24 as character output function.
26 INPUTS
27 putch - A pointer to the output function
28 format - A format string
29 args - A list of arguments
31 A character output function needs to be declared as:
33 int myPutCh(int char, void *KernelBase)
35 It is expected to return 1 on success and 0 on failure.
37 RESULT
38 Number of succesfully printed characters
40 NOTES
42 EXAMPLE
44 BUGS
46 SEE ALSO
48 INTERNALS
50 ******************************************************************************/
52 AROS_LIBFUNC_INIT
54 return __vcformat(KernelBase, putch, format, args);
56 AROS_LIBFUNC_EXIT