📄 file.c
字号:
#include <osdef.h>
#include <stdio.h>
EXPORT FILE _iob[4];
EXPORT int fflush(
FILE *stream
){
dprintf("fflush 0x%X\n", stream );
}
EXPORT int _setmode (
int fd,
int mode
){
dprintf("set file %d mode to %d failed\n", fd, mode );
return 0;
}
//写文件
EXPORT int fwrite( const char* buf, int len, int count, FILE *fp )
{
dprintf("fwrite not implemented\n");
}
EXPORT int open( const char* fname, int mode, int flag )
{
return KOpenFile( (char*)fname, mode, flag );
}
EXPORT int close( int i )
{
KCloseFile( i);
}
EXPORT int read( int i, char* buf, int count )
{
return KReadFile( i, buf, count );
}
EXPORT int write( int i, const char* buf, int count )
{
return KWriteFile( i, buf, count );
}
EXPORT int lseek( int i, int step, int pos )
{
return KSeekFile( i, step, pos );
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -