# HG changeset patch # User menikon # Date 1579621606 -32400 # Node ID 4cfff673e1f644bf1f57643c3ede17e397fbbb84 # Parent a961a33781748be148f58e0c368591440a100e8d add inodefiles diff -r a961a3378174 -r 4cfff673e1f6 src/impl/file_impl_inode.cbc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/impl/file_impl_inode.cbc Wed Jan 22 00:46:46 2020 +0900 @@ -0,0 +1,36 @@ +#include "../context.h" +#interface "file.h" + +// ---- +// typedef struct inode impl file { +// +// } inode; +// ---- + +file* createinode(struct Context* cbc_context) { + struct file* file = new file(); + struct inode* inode = new inode(); + file->file = (union Data*)inode; + file->st = NULL; + file->addr = NULL; + file->n = 0; + file->fd = 0; + file->read = C_readinode; + file->write = C_writeinode; + file->close = C_closeinode; + return file; +} +__code readinode(struct inode* file, char* addr, __code next(...)) { + + goto next(...); +} + +__code writeinode(struct inode* file, char* addr, int n, __code next(...)) { + + goto next(...); +} + +__code closeinode(struct inode* file,int fd, __code next(...)) { + + goto next(...); +} diff -r a961a3378174 -r 4cfff673e1f6 src/impl/inode.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/impl/inode.h Wed Jan 22 00:46:46 2020 +0900 @@ -0,0 +1,3 @@ +typedef struct inode impl file { + +} inode;