Last change
on this file since 331 was 321, checked in by coas-nagasima, 7 years ago |
文字コードを設定
|
-
Property svn:eol-style
set to
native
-
Property svn:mime-type
set to
text/x-chdr;charset=UTF-8
|
File size:
981 bytes
|
Line | |
---|
1 | /*
|
---|
2 | ** io.h - IO class
|
---|
3 | */
|
---|
4 |
|
---|
5 | #ifndef MRUBY_IO_H
|
---|
6 | #define MRUBY_IO_H
|
---|
7 |
|
---|
8 | #if defined(__cplusplus)
|
---|
9 | extern "C" {
|
---|
10 | #endif
|
---|
11 |
|
---|
12 | struct mrb_io {
|
---|
13 | int fd; /* file descriptor, or -1 */
|
---|
14 | int fd2; /* file descriptor to write if it's different from fd, or -1 */
|
---|
15 | int pid; /* child's pid (for pipes) */
|
---|
16 | unsigned int readable:1,
|
---|
17 | writable:1,
|
---|
18 | sync:1;
|
---|
19 | };
|
---|
20 |
|
---|
21 | #define FMODE_READABLE 0x00000001
|
---|
22 | #define FMODE_WRITABLE 0x00000002
|
---|
23 | #define FMODE_READWRITE (FMODE_READABLE|FMODE_WRITABLE)
|
---|
24 | #define FMODE_BINMODE 0x00000004
|
---|
25 | #define FMODE_APPEND 0x00000040
|
---|
26 | #define FMODE_CREATE 0x00000080
|
---|
27 | #define FMODE_TRUNC 0x00000800
|
---|
28 |
|
---|
29 | #define E_IO_ERROR (mrb_class_get(mrb, "IOError"))
|
---|
30 | #define E_EOF_ERROR (mrb_class_get(mrb, "EOFError"))
|
---|
31 |
|
---|
32 | mrb_value mrb_io_fileno(mrb_state *mrb, mrb_value io);
|
---|
33 |
|
---|
34 | #if defined(__cplusplus)
|
---|
35 | } /* extern "C" { */
|
---|
36 | #endif
|
---|
37 | #endif /* MRUBY_IO_H */
|
---|
Note:
See
TracBrowser
for help on using the repository browser.