Added VFS and Ext2 support. Optimized attributes of methods to improve code highlighting. Printf attribute, malloc attribute, etc.
49 lines
889 B
C
49 lines
889 B
C
//
|
|
// Created by rick on 10-03-21.
|
|
//
|
|
|
|
#ifndef NEW_KERNEL_STDIO_H
|
|
#define NEW_KERNEL_STDIO_H
|
|
|
|
#include <stdarg.h>
|
|
#include <stddef.h>
|
|
|
|
#define SEEK_SET 0
|
|
|
|
// todo
|
|
typedef struct {
|
|
int unused;
|
|
} FILE;
|
|
extern FILE *stderr;
|
|
// todo
|
|
#define stderr stderr
|
|
|
|
void fclose(FILE *);
|
|
|
|
void fflush(FILE *);
|
|
|
|
FILE *fopen(const char *, const char *);
|
|
|
|
void __attribute__((format (printf, 2, 3))) fprintf(FILE *, const char *, ...);
|
|
|
|
size_t fread(void *, size_t, size_t, FILE *);
|
|
|
|
int fseek(FILE *, long, int);
|
|
|
|
long ftell(FILE *);
|
|
|
|
size_t fwrite(const void *, size_t, size_t, FILE *);
|
|
|
|
void setbuf(FILE *, char *);
|
|
|
|
int vfprintf(FILE *, const char *, va_list);
|
|
|
|
int vprintf(const char *fmt, va_list args);
|
|
|
|
int __attribute__((format (printf, 1, 2))) printf(const char *fmt, ...);
|
|
|
|
int __attribute__((format (printf, 2, 3))) sprintf(char *target, const char *fmt, ...);
|
|
|
|
|
|
#endif //NEW_KERNEL_STDIO_H
|