X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fio%2Fconsole.cpp;h=abb872d12e41c915a3876250abe340ddec13bf52;hb=9b38e20254913629a0db40e8eb8e1c42e1728e41;hp=e70f31d6a4aa21e8d8498559200423fc3a667f5c;hpb=e9899d5300a1bf3ef72c16b307638dd0a43e11c0;p=libs%2Fcore.git diff --git a/source/io/console.cpp b/source/io/console.cpp index e70f31d..abb872d 100644 --- a/source/io/console.cpp +++ b/source/io/console.cpp @@ -22,18 +22,24 @@ void Console::set_block(bool b) sys_set_blocking(handle, b); } -unsigned Console::do_write(const char *buf, unsigned len) +void Console::set_inherit(bool i) +{ + adjust_mode(mode, M_INHERIT, i); + sys_set_inherit(handle, i); +} + +size_t Console::do_write(const char *buf, size_t len) { check_access(M_WRITE); return sys_write(handle, buf, len); } -unsigned Console::do_read(char *buf, unsigned len) +size_t Console::do_read(char *buf, size_t len) { check_access(M_READ); - unsigned ret = sys_read(handle, buf, len); + size_t ret = sys_read(handle, buf, len); if(ret==0) set_eof();