changeset 106:547c20b052dc

tweak
author anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Thu, 21 Nov 2019 14:49:52 +0900
parents f1be2d5abc8a
children 5f01480e8f12
files src/context.h src/impl/PipeRead.cbc src/interface/SysRead.h
diffstat 3 files changed, 10 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/src/context.h	Thu Nov 21 14:45:01 2019 +0900
+++ b/src/context.h	Thu Nov 21 14:49:52 2019 +0900
@@ -472,14 +472,6 @@
     struct String {
       char* string;
     } String;
-    struct SysRead {
-        union Data* sys_read;
-        struct UInteger* num;
-        struct String* str;
-        enum Code next;
-        enum Code read;
-        enum Code ret;
-    } SysRead;
     struct SysFileRead {
         struct file *f;
     } SysFileRead;
@@ -491,6 +483,14 @@
         struct String *addr; 
         struct Integer* i;
     } PipeRead;
+    struct SysRead {
+        union  Data* sys_read;
+        struct UInteger* num;
+        int n;
+        struct String *p;
+        enum Code read;
+        enum Code next;
+    } SysRead;
 }; // union Data end       this is necessary for cbc_context generator
 
 /*
--- a/src/impl/PipeRead.cbc	Thu Nov 21 14:45:01 2019 +0900
+++ b/src/impl/PipeRead.cbc	Thu Nov 21 14:49:52 2019 +0900
@@ -15,7 +15,6 @@
     sys_read->sys_read = (union Data*)pipe_read;
     pipe_read->num = NULL;
     sys_read->read = C_readPipeRead;
-    sys_read->ret = C_retPipeRead;
     sys_read->next = C_nextPipeRead;
     return sys_read;
 }
@@ -24,10 +23,6 @@
   goto next(...);
 }
 
-__code retPipeRead(PipeRead* cbc_sys_file, UInteger* num) {
-
-}
-
 __code nextPipeRead(...) {
 
 }
--- a/src/interface/SysRead.h	Thu Nov 21 14:45:01 2019 +0900
+++ b/src/interface/SysRead.h	Thu Nov 21 14:49:52 2019 +0900
@@ -2,8 +2,8 @@
    union  Data* sys_read;
    struct UInteger* num;
    int n;
-   char *p;
+   struct String *p;
    __code read(__code next(...));
-   __code ret(Impl* cbc_sys_file, UInteger* num);
+   //__code ret(Impl* cbc_sys_file, UInteger* num);
    __code next(...);
 } SysRead;