some missing stdio stuff
This commit is contained in:
parent
89d107374c
commit
b9419c756b
@ -37,10 +37,13 @@ extern int printf(const char *fmt, ...);
|
||||
extern int snprintf(char * buf, size_t size, const char * fmt, ...);
|
||||
extern int vsprintf(char * buf, const char *fmt, va_list args);
|
||||
extern int vsnprintf(char * buf, size_t size, const char *fmt, va_list args);
|
||||
extern int vfprintf(FILE * device, const char *format, va_list ap);
|
||||
|
||||
extern int puts(const char *s);
|
||||
extern int fputs(const char *s, FILE *stream);
|
||||
extern int fputc(int c, FILE *stream);
|
||||
#define putc(c,s) fputc((c),(s))
|
||||
#define putchar(c) fputc((c),stdout)
|
||||
extern int fgetc(FILE *stream);
|
||||
extern char *fgets(char *s, int size, FILE *stream);
|
||||
|
||||
|
@ -265,6 +265,15 @@ int vsnprintf(char * buf, size_t size, const char *fmt, va_list args) {
|
||||
return xvasprintf(buf, fmt, args);
|
||||
}
|
||||
|
||||
int vfprintf(FILE * device, const char *fmt, va_list args) {
|
||||
char * buffer;
|
||||
vasprintf(&buffer, fmt, args);
|
||||
|
||||
int out = fwrite(buffer, 1, strlen(buffer), device);
|
||||
free(buffer);
|
||||
return out;
|
||||
}
|
||||
|
||||
|
||||
int fprintf(FILE * device, const char *fmt, ...) {
|
||||
va_list args;
|
||||
|
Loading…
Reference in New Issue
Block a user