1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* include/ruby/io.h (FMODE_TRUNC): new constant.

* io.c (rb_io_mode_flags): set FMODE_TRUNC for "w".
  (rb_io_modenum_flags): set FMODE_TRUNC for O_TRUNC.
  (rb_io_flags_modenum): new function.
  (rb_io_mode_modenum): just use rb_io_mode_flags and
  rb_io_flags_modenum.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2008-08-19 18:38:32 +00:00
parent 77ba9a5f56
commit b929da2a1e
3 changed files with 51 additions and 37 deletions

View file

@ -81,6 +81,7 @@ typedef struct rb_io_t {
#define FMODE_DUPLEX 0x0020
#define FMODE_APPEND 0x0040
#define FMODE_CREATE 0x0080
#define FMODE_TRUNC 0x0100
#define FMODE_WSPLIT 0x0200
#define FMODE_WSPLIT_INITIALIZED 0x0400