2020-03-31 16:21:07 +01:00
|
|
|
#include "__fio.h"
|
2020-03-31 18:36:58 +01:00
|
|
|
#include "__syscall.h"
|
2020-03-31 16:21:07 +01:00
|
|
|
|
|
|
|
|
struct __io_file __stdin = {};
|
|
|
|
|
struct __io_file __stdout = {};
|
|
|
|
|
struct __io_file __stderr = {};
|
|
|
|
|
|
|
|
|
|
struct __io_file *stdin = &__stdin;
|
|
|
|
|
struct __io_file *stdout = &__stdout;
|
|
|
|
|
struct __io_file *stderr = &__stderr;
|
|
|
|
|
|
|
|
|
|
void __fio_init()
|
|
|
|
|
{
|
|
|
|
|
__stdin.fd = 0;
|
|
|
|
|
__stdout.fd = 1;
|
|
|
|
|
__stderr.fd = 2;
|
|
|
|
|
}
|
2020-03-31 18:36:58 +01:00
|
|
|
|
|
|
|
|
int __fileno(struct __io_file *f)
|
|
|
|
|
{
|
|
|
|
|
return f->fd;
|
|
|
|
|
}
|