aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
Commit message (Collapse)AuthorAgeFilesLines
* fix some documents.akr2005-01-251-11/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix IO#read docment.akr2005-01-241-5/+13
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (remain_size): use buffered data instead of unreading to avoidnobu2005-01-111-3/+7
| | | | | | | inconsistency of text mode. fixed: [ruby-dev:25446] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_f_select): IO list could be altered. [ruby-dev:25312]nobu2005-01-091-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* update readpartial document.akr2005-01-081-6/+6
| | | | | | | don't try read timeout on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (argf_readpartial): new method ARGF.readpartial.akr2005-01-011-49/+105
| | | | | | | | (io_getpartial): extracted from io_readpartial. (io_readpartial): call io_getpartial. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * rubyio.h: don't deprecate rb_read_check.akr2004-12-301-12/+25
| | | | | | | | | | | * io.c (STDIO_READ_DATA_PENDING): reverted from old READ_DATA_PENDING to check stdio read buffer. (rb_read_check): use STDIO_READ_DATA_PENDING. (rb_read_pending): ditto. (rb_getc): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (next_argv): reduce use of stdio.nobu2004-12-231-25/+37
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (io_reopen, rb_io_reopen): prohibit to change access mode fornobu2004-12-231-28/+34
| | | | | | | special IO ports. [ruby-dev:25225] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * rubyio.h: rename FMODE_UNSEEKABLE to FMODE_DUPLEX.akr2004-12-231-13/+15
| | | | | | | | * io.c (io_check_tty): extracted function to set FMODE_LINEBUF and FMODE_DUPLEX. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_mode_modenum): replace O_ACCMODE with O_RDWR.nobu2004-12-221-1/+5
| | | | | | | fixed: [ruby-dev:25273] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (pipe_open): should set prog if argc != 0.eban2004-12-091-1/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * rubyio.h, io.c, ext/dl/dl.c, ext/pty/pty.c, ext/socket/socket.c:akr2004-12-081-89/+80
| | | | | | | | | | create FILE object only when required: popen(3) and DL's IO#to_ptr. [ruby-dev:25122] * io.c (rb_io_binmode): use setmode for Human68k. [ruby-dev:25121] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (pipe_open): win32 bidirectional pipe support.usa2004-12-071-6/+5
| | | | | | | | | | | | * win32/win32.[ch] (rb_w32_pipe_exec): ditto. * win32/win32.[ch] (socketpair): new function. POSIX socketpair emulation. * win32/win32.c (socketpair_internal): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (io_fwrite): avoid context switch before writing to stderr.akr2004-12-071-8/+4
| | | | | | | | | | | [ruby-dev:25080] * rubyio.h: refine deprecated declaration. * configure.in, file.c, io.c: remove useless check: fseeko, etc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (proc_setgroups): [ruby-dev:25081]matz2004-12-061-31/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * re.c (rb_reg_eqq): document fix. [ruby-talk:122541] * io.c (io_fread): take VALUE argument. * ext/socket/socket.c (sock_connect): use rb_str_new4(). [ruby-dev:25052] * eval.c (rb_yield_0): [ruby-dev:25051] * io.c (io_write): remove rb_str_locktmp(). [ruby-dev:25050] * io.c (io_fwrite): takes VALUE string as an argument. [ruby-dev:25050] * ext/socket/socket.c (sock_connect): remove rb_str_locktmp(). [ruby-dev:25050] * ext/socket/socket.c (udp_connect): [ruby-dev:25045] * ext/socket/socket.c (udp_bind): ditto. * ext/socket/socket.c (udp_send): ditto. * ext/socket/socket.c (bsock_send): ditto. * ext/socket/socket.c (s_recvfrom): ditto. * hash.c (rb_hash_hash): should provide "hash" method where "eql?" is redefined. [ruby-talk:122482] * ext/socket/socket.c (bsock_setsockopt): [ruby-dev:25039] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in (ac_cv_sizeof_rlim_t): setup for DJGPP.eban2004-12-061-1/+4
| | | | | | | | | * io.c (is_socket, shutdown): define dummy macros for DJGPP. * process.c: use SIZEOF_RLIM_T instead of HAVE_RLIM_T for DJGPP. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (is_socket): fix typos. [ruby-core:03900]usa2004-12-061-6/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (is_socket): new function.usa2004-12-061-13/+36
| | | | | | | | | | | | | | | | | * io.c (rb_io_close_read, rb_io_close_write): use is_socket(). * io.c (rb_io_fptr_finalize): need to check fptr->f before calling rb_io_fptr_cleanup(). * io.c (pipe_open): win32 pipe support (experimental). * win32/win32.[ch] (rb_w32_pipe_exec): return file descripters instead of FILE structure. * win32/win32.[ch] (rb_w32_is_socket): new function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * rubyio.h, intern.h, io.c, file.c, process.c, ext/socket/socket.c,akr2004-12-061-517/+412
| | | | | | | | | | | ext/pty/pty.c, ext/io/wait/wait.c, ext/openssl/ossl_ssl.c: Use own buffering mechanism instead of stdio. * io.c, ext/stringio/stringio.c, test/ruby/ut_eof.rb: EOF flag removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_file_initialize): [ruby-dev:25032]matz2004-12-021-3/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_ctl): [ruby-dev:25019]matz2004-12-021-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7435 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (pipe_open): errno should be preserved for rb_sys_fail() whennobu2004-11-301-0/+2
| | | | | | | fork failed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (io_fread): need not to null terminate. [ruby-dev:24998]matz2004-11-301-8/+6
| | | | | | | | | | | | * io.c (read_all): remove unnecessary rb_str_resize(). [ruby-dev:24996] * io.c (io_readpartial): ditto. * io.c (io_read): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_sysread): use temporary lock. [ruby-dev:24992]matz2004-11-291-1/+7
| | | | | | | | | | * lib/ostruct.rb (OpenStruct::method_missing): check method duplication for -d. * lib/ostruct.rb (OpenStruct::initialize): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * object.c (convert_type): [ruby-core:03845]matz2004-11-291-5/+5
| | | | | | | | | | | | | | | * eval.c (rb_funcall_rescue): new function. * object.c (rb_Array): avoid using rb_respond_to(). * object.c (rb_Integer): ditto. * eval.c (get_backtrace): no conversion for nil. * parse.y (reduce_nodes): empty body should return nil. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (fptr_finalize): must not use FILE after fclose().nobu2004-11-291-5/+12
| | | | | | | [ruby-dev:24985] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* don't use READ_DATA_PENDING in previous changeakr2004-11-281-2/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_check_writable): restrict io_seek byakr2004-11-281-3/+2
| | | | | | | | | READ_DATA_PENDING because io_seek(fptr, 0, SEEK_CUR) is meaningful only if read buffer is not empty. call io_seek regardless of NEED_IO_SEEK_BETWEEN_RW. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7404 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c (rb_io_fwrite): set path to NULLakr2004-11-271-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c: avoid avoid data loss with nonblocking fd andakr2004-11-271-13/+40
| | | | | | | | | | | | stdio buffering in sync mode. [ruby-dev:24966] based on matz's patch [ruby-dev:24967] (io_fwrite): new primitive writing function which writes directly if sync mode. (rb_io_fwrite): wrapper for io_fwrite now. (io_write): call io_fwrite instead of rb_io_fwrite. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7392 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (io_fread): [ruby-dev:24964]matz2004-11-271-10/+25
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_initialize): [ruby-dev:24963]matz2004-11-261-17/+13
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_initialize): [ruby-dev:24962]matz2004-11-261-10/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_initialize): should retrieve flags from copying filematz2004-11-261-5/+7
| | | | | | | | | | | | descriptor. [ruby-dev:24961] * eval.c (method_missing): raise TypeError for classes do not have allocators. [ruby-core:03752] * lib/erb.rb: [ruby-core:03786] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (io_read): move StringValue() check before GetOpenFile().matz2004-11-251-1/+1
| | | | | | | [ruby-dev:24959] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in: AC_PREREQ(2.53) [ruby-core:03800]matz2004-11-251-2/+4
| | | | | | | * io.c (read_all): [ruby-dev:24955] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (io_read): [ruby-dev:24952]matz2004-11-231-58/+53
| | | | | | | * configure.in, io.c: cancel [ ruby-Patches-1074 ]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (io_read): [ruby-dev:24952]matz2004-11-231-6/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_getline): f.gets("") did not work. [ruby-core:03771]aamine2004-11-201-4/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (__fpending): commit miss.eban2004-11-201-0/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (io_reopen): work around problem with Cygwin fseekoeban2004-11-201-3/+4
| | | | | | | returning ESPIPE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7335 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (str_gsub): internal buffer should not be listed bymatz2004-11-191-0/+3
| | | | | | | | | | | ObjectSpace.each_object() by String#gsub. [ruby-dev:24931] * lib/cgi/session.rb (CGI::Session::FileStore::initialize): raise exception if data corresponding to session specified from the client does not exist. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c, rubyio.h (rb_io_modenum_flags): exported.nobu2004-11-181-1/+1
| | | | | | | | * ext/stringio/stringio.c (strio_initialize): allow Fixnum as mode as well as IO.new does. [ruby-dev:24896] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * dir.c (rb_glob2): do not allocate buffer from heap to avoidmatz2004-11-101-0/+5
| | | | | | | | | | | | | | | memory leaks. use string object for buffering instead. [ruby-dev:24738] * dir.c (join_path): ditto. * io.c (io_read): external input buffer may be modified even after rb_str_locktmp(). [ruby-dev:24735] * dir.c (fnmatch): p or s may be NULL. [ruby-dev:24749] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (pipe_open): need to set cmd if argc == 0 (win32).usa2004-11-021-0/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (pipe_open): IO.popen should take array as 1st argument formatz2004-11-021-27/+25
| | | | | | | | | a command line. [ruby-dev:24678] * io.c (rb_io_s_popen): do not expand argv array. [ruby-dev:24670] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (proc_invoke): nail down dyna_var node when Proc objectmatz2004-11-011-16/+12
| | | | | | | | | or continuation is created. [ruby-dev:24671] * io.c (rb_io_s_popen): do not expand argv array. [ruby-dev:24670] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (pipe_open): avoid conflict of variable name. [ruby-dev:24662]usa2004-11-011-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_f_open): create copy of popen specifier. [ruby-dev:24656]matz2004-10-311-63/+26
| | | | | | | | | | | | | | | | * string.c (rb_str_locktmp): lock string temporarily. * string.c (str_independent): add tmplock check. * io.c (io_write): lock output string temporarily. [ruby-dev:24649] * io.c (io_write): use rb_str_locktmp(). * io.c (read_all): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e