annotate src/sys_read_impl.cbc @ 132:8e93917ce4be

add sys_read_impl.cbc (incomplete)
author anatofuz
date Thu, 05 Dec 2019 10:59:27 +0900
parents
children 0c24464a66d8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
132
8e93917ce4be add sys_read_impl.cbc (incomplete)
anatofuz
parents:
diff changeset
1 #include "../context.h"
8e93917ce4be add sys_read_impl.cbc (incomplete)
anatofuz
parents:
diff changeset
2 #interface "SysRead.h"
8e93917ce4be add sys_read_impl.cbc (incomplete)
anatofuz
parents:
diff changeset
3 //data_gear "file.dg"
8e93917ce4be add sys_read_impl.cbc (incomplete)
anatofuz
parents:
diff changeset
4
8e93917ce4be add sys_read_impl.cbc (incomplete)
anatofuz
parents:
diff changeset
5 // ----
8e93917ce4be add sys_read_impl.cbc (incomplete)
anatofuz
parents:
diff changeset
6 // typedef struct SysReadImpl <Type, Isa> impl SysRead {
8e93917ce4be add sys_read_impl.cbc (incomplete)
anatofuz
parents:
diff changeset
7 //
8e93917ce4be add sys_read_impl.cbc (incomplete)
anatofuz
parents:
diff changeset
8 // } SysReadImpl;
8e93917ce4be add sys_read_impl.cbc (incomplete)
anatofuz
parents:
diff changeset
9 // ----
8e93917ce4be add sys_read_impl.cbc (incomplete)
anatofuz
parents:
diff changeset
10
8e93917ce4be add sys_read_impl.cbc (incomplete)
anatofuz
parents:
diff changeset
11 SysRead* createSysReadImpl(struct Context* cbc_context) {
8e93917ce4be add sys_read_impl.cbc (incomplete)
anatofuz
parents:
diff changeset
12 struct SysRead* sys_read = new SysRead();
8e93917ce4be add sys_read_impl.cbc (incomplete)
anatofuz
parents:
diff changeset
13 struct SysReadImpl* sys_read_impl = new SysReadImpl();
8e93917ce4be add sys_read_impl.cbc (incomplete)
anatofuz
parents:
diff changeset
14 sys_read->sys_read = (union Data*)sys_read_impl;
8e93917ce4be add sys_read_impl.cbc (incomplete)
anatofuz
parents:
diff changeset
15 sys_read->num = 0;
8e93917ce4be add sys_read_impl.cbc (incomplete)
anatofuz
parents:
diff changeset
16 sys_read->addr = NULL;
8e93917ce4be add sys_read_impl.cbc (incomplete)
anatofuz
parents:
diff changeset
17 sys_read->file = NULL;
8e93917ce4be add sys_read_impl.cbc (incomplete)
anatofuz
parents:
diff changeset
18 sys_read->read = C_readSysReadImpl;
8e93917ce4be add sys_read_impl.cbc (incomplete)
anatofuz
parents:
diff changeset
19 sys_read->next = C_nextSysReadImpl;
8e93917ce4be add sys_read_impl.cbc (incomplete)
anatofuz
parents:
diff changeset
20 return sys_read;
8e93917ce4be add sys_read_impl.cbc (incomplete)
anatofuz
parents:
diff changeset
21 }
8e93917ce4be add sys_read_impl.cbc (incomplete)
anatofuz
parents:
diff changeset
22 __code readSysReadImpl(struct SysReadImpl* sys_read, __code next(...)) {
8e93917ce4be add sys_read_impl.cbc (incomplete)
anatofuz
parents:
diff changeset
23
8e93917ce4be add sys_read_impl.cbc (incomplete)
anatofuz
parents:
diff changeset
24 goto next(...);
8e93917ce4be add sys_read_impl.cbc (incomplete)
anatofuz
parents:
diff changeset
25 }
8e93917ce4be add sys_read_impl.cbc (incomplete)
anatofuz
parents:
diff changeset
26
8e93917ce4be add sys_read_impl.cbc (incomplete)
anatofuz
parents:
diff changeset
27 __code nextSysReadImpl(...) {
8e93917ce4be add sys_read_impl.cbc (incomplete)
anatofuz
parents:
diff changeset
28
8e93917ce4be add sys_read_impl.cbc (incomplete)
anatofuz
parents:
diff changeset
29 }
8e93917ce4be add sys_read_impl.cbc (incomplete)
anatofuz
parents:
diff changeset
30