# HG changeset patch # User menikon # Date 1579938129 -32400 # Node ID 696c6bdc10740c977c32b73c2362864c7f15f405 # Parent e2520f609094c3fc0585307fa5327cc04ca15a1c tweak diff -r e2520f609094 -r 696c6bdc1074 src/impl/file_impl_inode.cbc --- a/src/impl/file_impl_inode.cbc Fri Jan 24 21:19:48 2020 +0900 +++ b/src/impl/file_impl_inode.cbc Sat Jan 25 16:42:09 2020 +0900 @@ -1,4 +1,4 @@ -#include "../context.h" +#include "../../context.h" #interface "file.h" // ---- @@ -9,17 +9,27 @@ file* createinode(struct Context* cbc_context) { struct file* file = new file(); - struct inode* inode = new inode(); + struct inode* ip = new ip(); file->file = (union Data*)inode; file->st = NULL; file->addr = NULL; file->n = 0; file->fd = 0; + file->stat = C_statinode; file->read = C_readinode; file->write = C_writeinode; file->close = C_closeinode; return file; } + +__code statinode(struct inode* ip, struct stat* st, __code next(...)) { //:skip + + goto cbc_statinode(ip, st, next(...)); +} + +__code cbc_statinode((struct inode* ip, struct stat* st, __code next(...)){ +} + __code readinode(struct inode* file, char* addr, __code next(...)) { goto next(...); diff -r e2520f609094 -r 696c6bdc1074 src/impl/inode.h --- a/src/impl/inode.h Fri Jan 24 21:19:48 2020 +0900 +++ b/src/impl/inode.h Sat Jan 25 16:42:09 2020 +0900 @@ -1,3 +1,8 @@ typedef struct inode impl file { + + + + +__code cbc_statinode((struct inode* ip, struct stat* st, __code next(...)); } inode;