diff src/impl/file_impl_inode.cbc @ 231:08cd784ddbc0

rename inode.h
author menikon
date Sat, 25 Jan 2020 20:37:53 +0900
parents 4265c6e825af
children a7fc5edea925
line wrap: on
line diff
--- a/src/impl/file_impl_inode.cbc	Sat Jan 25 19:02:35 2020 +0900
+++ b/src/impl/file_impl_inode.cbc	Sat Jan 25 20:37:53 2020 +0900
@@ -1,28 +1,26 @@
 #include "../../context.h"
 #interface "file.h"
+#interface "inode_impl.h"
 
 // ----
-// typedef struct inode<Impl, Isa> impl file {
+// typedef struct inode_impl<Impl, Isa> impl file {
 //
-// } inode;
+// } inode_impl;
 // ----
 
 file* createinode(struct Context* cbc_context) {
     struct file* file  = new file();
-    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->cbc_stat = C_cbc_statinode;
-    file->read = C_readinode;
-    file->write = C_writeinode;
-    file->close = C_closeinode;
+    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, ...));