#include "../../context.h" #interface "file.h" #interface "inode_impl.h" // ---- // typedef struct inode_impl impl file { // // } inode_impl; // ---- file* createinode(struct Context* cbc_context) { struct file* file = new file(); struct inode_impl* inode_impl = new inode_impl(); file->file = (union Data*)inode_impl; inode_impl->st = NULL; inode_impl->ip = NULL; file->statinode = C_statinode_impl; inode_impl->cbc_statinode = C_cbc_statinode_impl; file->read = C_readinode_impl; file->write = C_writeinode_impl; file->close = C_closeinode_impl; return file; } __code statinode(struct inode* ip, struct stat* st, __code next(int ret, ...)) { //:skip goto cbc_statinode(ip, st, next(ret, ...)); } __code cbc_statinode((struct inode* ip, struct stat* st, __code next(int ret, ...)){ goto next(...); } __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(...); }