📄 stdio.h
字号:
#ifndef _STDIO_H
#define _STDIO_H
#define EOF (-1)
#define SEEK_CUR 1
#define SEEK_END 2
#define SEEK_SET 0
#define O_CREAT 0x1
#define O_EXCL 0x2
#define O_APPEND 0x4
#define O_TRUNC 0x8
#define O_RDONLY 0x10
#define O_WRONLY 0x20
#define O_RDWR 0x40
typedef struct
{
byte dir_name[11];
byte dir_attr;
byte dir_NTres;
byte crt_time_tenth;
ushort dir_crt_time;
ushort dir_crt_date;
ushort dir_lst_acc_date;
ushort dir_fst_clusHI;
ushort dir_wrt_time;
ushort dir_wrt_date;
ushort dir_fst_clusLO;
uint dir_file_size;
}fdir;
typedef struct
{
int type;
char name[255];
ushort crt_date;
ushort crt_time;
uint file_size;
}stat;
typedef struct
{
int rc;
char drive;
fdir dir;
void *buf;
uint size;
}finode;
typedef struct
{
int fd;
int rc;
int mode;
ulong rw_ptr;
finode *p_finode;
}FILE;
#define fileno(f) ((f)->fd)
FILE* fopen(const char *__path,const char *__mode);
int fclose(FILE* __stream);
size_t fread(void *__ptr,size_t __size,size_t __n,FILE *__stream);
char* fgets(char *__s, int __n, FILE *__stream);
int fscanf(FILE *__stream, const char *__format, ...);
size_t fwrite(const void *__ptr, size_t __size, size_t __n,FILE *__stream);
int fputs(const char *__s, FILE *__stream);
int fprintf(FILE *__stream, const char *__format, ...);
int fseek(FILE *__stream, long __offset, int __whence);
long ftell(FILE *__stream);
FILE* freopen(const char *__path, const char *__mode,FILE *__stream);
FILE* fdopen(int __handle, char *__type);
int feof(FILE *__fp);
int ferror(FILE *__fp);
void clearerr(FILE *__stream);
int printf(char *arg);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -