mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-05-31 16:57:58 +00:00
userspace/libc: implement fprintf function
Signed-off-by: EnderIce2 <enderice2@protonmail.com>
This commit is contained in:
parent
24fd486764
commit
b05868d120
@ -97,7 +97,7 @@ extern "C"
|
|||||||
void flockfile(FILE *);
|
void flockfile(FILE *);
|
||||||
FILE *fmemopen(void *restrict, size_t, const char *restrict);
|
FILE *fmemopen(void *restrict, size_t, const char *restrict);
|
||||||
FILE *fopen(const char *restrict pathname, const char *restrict mode);
|
FILE *fopen(const char *restrict pathname, const char *restrict mode);
|
||||||
int fprintf(FILE *restrict, const char *restrict, ...);
|
int fprintf(FILE *restrict stream, const char *restrict format, ...);
|
||||||
int fputc(int c, FILE *stream);
|
int fputc(int c, FILE *stream);
|
||||||
int fputs(const char *restrict s, FILE *restrict stream);
|
int fputs(const char *restrict s, FILE *restrict stream);
|
||||||
size_t fread(void *restrict ptr, size_t size, size_t nitems, FILE *restrict stream);
|
size_t fread(void *restrict ptr, size_t size, size_t nitems, FILE *restrict stream);
|
||||||
|
@ -214,7 +214,14 @@ export FILE *fopen(const char *restrict pathname, const char *restrict mode)
|
|||||||
return file;
|
return file;
|
||||||
}
|
}
|
||||||
|
|
||||||
export int fprintf(FILE *restrict, const char *restrict, ...);
|
export int fprintf(FILE *restrict stream, const char *restrict format, ...)
|
||||||
|
{
|
||||||
|
va_list args;
|
||||||
|
va_start(args, format);
|
||||||
|
int ret = vfprintf(stream, format, args);
|
||||||
|
va_end(args);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
export int fputc(int c, FILE *stream)
|
export int fputc(int c, FILE *stream)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user