summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-io
AgeCommit message (Collapse)Author
2020-05-07Should not use `assert` with expressions with side-effect; ref #49812.1.1-rc2Yukihiro "Matz" Matsumoto
`assert()` can be completely removed when `NDEBUG` is set.
2020-05-07Fixed wrong condition in #4981.Yukihiro "Matz" Matsumoto
2020-05-07Add `#include <string.h>` on all platforms for `strncpy`; #4981Yukihiro "Matz" Matsumoto
2020-05-07Remove unused local variable if `MRB_UTF8_STRING` is not set.Yukihiro "Matz" Matsumoto
Ref #4982 #4983
2020-05-07Avoid `snprintf` in `mruby-io` test; ref #4981Yukihiro "Matz" Matsumoto
2020-05-07Remove the temporary file from the `AF_UNIX` socket test; #4981Yukihiro "Matz" Matsumoto
2020-05-07Fix `IO#readchar` to return broken UTF-8 rather than `EOF` error.Yukihiro "Matz" Matsumoto
The behavior is different from CRuby, but we believe this is a right behavior for mruby, which only supports either ASCII or UTF-8 exclusively; fix #4983, ref #4982 ``` $ printf '\xe3\x81' | ruby -e 'p STDIN.readchar' "\xE3\x81" ``` ``` $ printf '\xe3\x81' | mruby -e 'p STDIN.readchar' "\xE3" ```
2020-05-07Fix `IO#readchar` to support UTF-8 char reading; fix #4712Yukihiro "Matz" Matsumoto
This fix only effective when `MRB_UTF8_STRING` is set.
2020-05-01Fix `_read_buf` to be more efficient; fix #4982Yukihiro "Matz" Matsumoto
The bug was introduced by #4712. The `getc' problem resurrected. It should be addressed soon.
2020-05-01Fix `IO#sysread` to update buffer string on `EOF`; ref #4982Yukihiro "Matz" Matsumoto
2020-05-01Update `IO#ungetc` to keep `@buf` string; ref #4982Yukihiro "Matz" Matsumoto
2020-05-01Fix typo and include locationUchio Kondo
2020-05-01Skip socket check on windowsUchio Kondo
2020-05-01Follow C90 styleUchio Kondo
2020-05-01Test mruby-io in tmpdir when AF_UNIX cannot be created on cwdUchio Kondo
2020-04-04Unused library folderReckordp
2020-04-04Correct naming file from MingwReckordp
2020-04-03Helper for link window's libraryReckordp
2020-03-08Add configuration guard for `MRB_DISABLE_STDIO`dearblue
ref #4576 and ref #4947 * Need MRBAPI functions without `MRB_DISABLE_STDIO`: * mrbgems/mruby-bin-debugger * mrbgems/mruby-bin-mirb * mrbgems/mruby-bin-mrbc * mrbgems/mruby-bin-mruby * mrbgems/mruby-bin-strip * Need `stdio.h`: * mrbgems/mruby-io * mrbgems/mruby-print * Need `snprintf()` in `stdio.h`: * mrbgems/mruby-pack * mrbgems/mruby-sprintf
2020-03-08Remove unnecessary 'stdio.h'; ref #4947dearblue
'stdio.h' is included in 'mruby.h' ('mrbconf.h'). However, keep 'stdio.h' used by mruby-test.
2020-03-08Merge branch 'master' into BuildAndroidYukihiro "Matz" Matsumoto
2020-03-08Small refactoring on #4952Yukihiro "Matz" Matsumoto
Fix the argument of `mrb_file_is_absolute_path()`.
2020-03-08Increase flexibility of CrossBuildReckordp
2020-03-08Traditional, UNC, and Device Is Absolute?Reckordp
2020-03-08Commit from remoteReckordp
2020-03-08Evaluate all type pathReckordp
2020-03-07Small refactoring on #4939Yukihiro "Matz" Matsumoto
2020-03-07Use in-house macro `ISALPHA` instead of `isalpha`; ref #4950Yukihiro "Matz" Matsumoto
2020-03-07Merge branch 'io-pread-pwrite' of https://github.com/dearblue/mruby into ↵Yukihiro "Matz" Matsumoto
dearblue-io-pread-pwrite
2020-03-07Add absolute path for UNCReckordp
2020-03-07Fix typoReckordp
2020-03-07Merge the update suggested by @mattn; ref #4950Yukihiro "Matz" Matsumoto
2020-03-07Merge pull request #4950 from Reckordp/masterYukihiro "Matz" Matsumoto
Absolute path for windows
2020-03-07Absolute path for windowsReckordp
2020-02-05Merge pull request #4941 from davidsiaw/mac-compatYukihiro "Matz" Matsumoto
Include time.h for ios
2020-02-02Implement `IO#pread` and `IO#pwrite`dearblue
It is available by default in environments where `__unix__` is defined. Other environments are enabled by defining `MRB_WITH_IO_PREAD_PWRITE` (requires an implementation of `pread()` and `pwrite()` functions). In any case, you can disable it by defining `MRB_WITHOUT_IO_PREAD_PWRITE`.
2020-02-01Fix builds for old mingw in mruby-socket; ref #4914dearblue
2020-01-31Add explicit casting in `file.c` to silence warnings.Yukihiro "Matz" Matsumoto
2020-01-31Avoid casting warning from `mrb_int` to `int` in `io.c`.Yukihiro "Matz" Matsumoto
2020-01-28Merge pull request #4873 from dearblue/open-flagsYukihiro "Matz" Matsumoto
Support bit flags for `IO.open`
2020-01-28include time.h for iosDavid Siaw
2020-01-06Avoid Boxing/Unboxing of file descriptors; ref #4872Yukihiro "Matz" Matsumoto
2020-01-06Merge branch 'file-size-truncate' of https://github.com/dearblue/mruby into ↵Yukihiro "Matz" Matsumoto
dearblue-file-size-truncate
2020-01-01Rename `mrb_num_args_error` to `mrb_argnum_error`; ref #4863Yukihiro "Matz" Matsumoto
2020-01-01Merge pull request #4863 from ↵Yukihiro "Matz" Matsumoto
shuujii/add-mrb_num_args_error-for-wrong-number-of-arguments-error Add `mrb_num_args_error()` for "wrong number of arguments" error
2019-12-31Fix builds for modern mingw; fix #4869dearblue
What I intended to fix in #4869 was a patch for an old MinGW. Recent MinGWs have their own `mkstemp()` function. I knew this after checking the patch #4903.
2019-12-20Merge pull request #4871 from dearblue/method-in-methodYukihiro "Matz" Matsumoto
Avoid method in method
2019-12-20Merge pull request #4870 from dearblue/unnessesary-branchYukihiro "Matz" Matsumoto
Remove unnessesary branches
2019-12-17Merge pull request #4869 from dearblue/mingw32-io-testYukihiro "Matz" Matsumoto
Fix mruby-io test for mingw32
2019-12-14Support bit flags for `IO.open`dearblue
Note that this bit flags are not compatible with the native flags defined in `#include <fcntl.h>`.