blob: 0e6509f82eaf7b59cd122a0c880f00f17bbf1f66 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#include <stdarg.h>
#include <stdio.h>
#include "_stdio.h"
/** write formatted output to a file stream **/
int fprintf(FILE * restrict stream, const char * restrict format, ...)
{
int ret = 0;
va_list ap;
struct io_options opt = {0};
opt.fnname = "fprintf";
opt.stream = stream;
va_start(ap, format);
ret = __printf(&opt, format, ap);
va_end(ap);
/*
RETURN_SUCCESS(the number of characters written);
RETURN_FAILURE(NEGATIVE());
*/
return ret;
}
/***
writes a formatted string to ARGUMENT(stream). The format of ARGUMENT(format)
and the variadic arguments is the same as that for FUNCTION(printf).
***/
/*
STDC(1)
*/
|