#include <stdio.h>
#include <errno.h>
Go to the source code of this file.
Data Structures | |
| struct | OpenFile |
Defines | |
| #define | FMODE_READABLE 1 |
| #define | FMODE_WRITABLE 2 |
| #define | FMODE_READWRITE 3 |
| #define | FMODE_APPEND 64 |
| #define | FMODE_CREATE 128 |
| #define | FMODE_BINMODE 4 |
| #define | FMODE_SYNC 8 |
| #define | FMODE_WBUF 16 |
| #define | FMODE_RBUF 32 |
| #define | FMODE_WSPLIT 0x200 |
| #define | FMODE_WSPLIT_INITIALIZED 0x400 |
| #define | GetOpenFile(obj, fp) rb_io_check_closed((fp) = RFILE(rb_io_taint_check(obj))->fptr) |
| #define | MakeOpenFile(obj, fp) |
| #define | GetReadFile(fptr) ((fptr)->f) |
| #define | GetWriteFile(fptr) (((fptr)->f2) ? (fptr)->f2 : (fptr)->f) |
Typedefs | |
| typedef OpenFile | OpenFile |
Functions | |
| FILE * | rb_fopen (const char *, const char *) |
| FILE * | rb_fdopen (int, const char *) |
| int | rb_getc (FILE *) |
| long | rb_io_fread (char *, long, FILE *) |
| long | rb_io_fwrite (const char *, long, FILE *) |
| int | rb_io_mode_flags (const char *) |
| int | rb_io_modenum_flags (int) |
| void | rb_io_check_writable (OpenFile *) |
| void | rb_io_check_readable (OpenFile *) |
| void | rb_io_fptr_finalize (OpenFile *) |
| void | rb_io_synchronized (OpenFile *) |
| void | rb_io_check_initialized (OpenFile *) |
| void | rb_io_check_closed (OpenFile *) |
| int | rb_io_wait_readable (int) |
| int | rb_io_wait_writable (int) |
| VALUE | rb_io_taint_check (VALUE) |
| void | rb_eof_error (void) |
| void | rb_read_check (FILE *) |
| int | rb_read_pending (FILE *) |
|
|
Definition at line 36 of file rubyio.h. Referenced by rb_io_flags_mode(), rb_io_mode_flags(), and rb_io_modenum_flags(). |
|
|
Definition at line 38 of file rubyio.h. Referenced by io_reopen(), next_argv(), rb_io_binmode(), rb_io_init_copy(), rb_io_mode_flags(), and rb_io_modenum_flags(). |
|
|
Definition at line 37 of file rubyio.h. Referenced by rb_io_flags_mode(), rb_io_mode_flags(), and rb_io_modenum_flags(). |
|
|
Definition at line 41 of file rubyio.h. Referenced by rb_io_check_readable(), rb_io_check_writable(), and rb_io_ungetc(). |
|
|
Definition at line 33 of file rubyio.h. Referenced by Init_IO(), io_reopen(), next_argv(), pipe_open(), rb_io_check_readable(), rb_io_close_read(), rb_io_close_write(), rb_io_flags_mode(), rb_io_init_copy(), rb_io_mode_flags(), rb_io_mode_string(), rb_io_modenum_flags(), and rb_io_sysseek(). |
|
|
Definition at line 35 of file rubyio.h. Referenced by rb_io_flags_mode(), rb_io_init_copy(), rb_io_mode_flags(), rb_io_mode_string(), and rb_io_modenum_flags(). |
|
|
Definition at line 39 of file rubyio.h. Referenced by io_fwrite(), io_write(), pipe_open(), rb_io_set_sync(), rb_io_sync(), and rb_io_synchronized(). |
|
|
Definition at line 40 of file rubyio.h. Referenced by flush_before_seek(), fptr_finalize(), io_fflush(), io_write(), rb_io_check_readable(), rb_io_sysseek(), and rb_io_syswrite(). |
|
|
Definition at line 34 of file rubyio.h. Referenced by Init_IO(), io_reopen(), next_argv(), pipe_open(), rb_file_flock(), rb_file_truncate(), rb_io_check_writable(), rb_io_close_read(), rb_io_close_write(), rb_io_flags_mode(), rb_io_fwrite(), rb_io_init_copy(), rb_io_mode_flags(), rb_io_mode_string(), rb_io_modenum_flags(), and rb_io_sysseek(). |
|
|
Definition at line 42 of file rubyio.h. Referenced by rb_io_ctl(), and wsplit_p(). |
|
|
Definition at line 43 of file rubyio.h. Referenced by rb_io_ctl(), and wsplit_p(). |
|
|
|
|
|
|
Definition at line 64 of file rubyio.h. Referenced by flush_before_seek(), io_fwrite(), io_reopen(), rb_file_flock(), rb_file_truncate(), rb_io_flush(), rb_io_fsync(), rb_io_syswrite(), and wsplit_p(). |
|
|
Value: do {\ if (RFILE(obj)->fptr) {\ rb_io_close(obj);\ free(RFILE(obj)->fptr);\ RFILE(obj)->fptr = 0;\ }\ fp = 0;\ fp = RFILE(obj)->fptr = ALLOC(OpenFile);\ fp->f = fp->f2 = NULL;\ fp->mode = 0;\ fp->pid = 0;\ fp->lineno = 0;\ fp->path = NULL;\ fp->finalize = 0;\ } while (0) Definition at line 47 of file rubyio.h. Referenced by pipe_open(), prep_stdio(), rb_file_open_internal(), rb_file_sysopen_internal(), rb_io_init_copy(), and rb_io_initialize(). |
|
|
|
|
|
This function does not return. Definition at line 188 of file io.c. References rb_eEOFError, and rb_raise(). Referenced by argf_readchar(), io_readpartial(), r_byte(), rb_f_readline(), rb_io_readchar(), rb_io_readline(), and rb_io_sysread(). |
|
||||||||||||
|
Definition at line 2686 of file io.c. References NULL, rb_gc(), rb_sys_fail(), rb_warn(), and VALUE. Referenced by io_reopen(), pipe_open(), rb_file_sysopen_internal(), rb_io_init_copy(), and rb_io_initialize(). |
|
||||||||||||
|
Referenced by next_argv(), rb_file_open_internal(), and rb_io_reopen(). |
|
|
Definition at line 1931 of file io.c. References rb_thread_wait_fd(), READ_DATA_PENDING, TRAP_BEG, and TRAP_END. |
|
|
Definition at line 213 of file io.c. References rb_eIOError, rb_io_check_initialized(), and rb_raise(). Referenced by appendline(), io_fflush(), io_fread(), io_fwrite(), rb_io_check_readable(), rb_io_check_writable(), rb_io_close_m(), rb_io_eof(), rb_io_sysread(), rb_io_syswrite(), rb_thread_flock(), and swallow(). |
|
|
Definition at line 204 of file io.c. References rb_eIOError, and rb_raise(). Referenced by rb_file_path(), rb_io_check_closed(), and rb_io_closed(). |
|
|
Definition at line 246 of file io.c. References FMODE_RBUF, FMODE_READABLE, FMODE_SYNCWRITE, FMODE_WBUF, io_seek, rb_eIOError, rb_io_check_closed(), rb_raise(), and SEEK_CUR. Referenced by io_getpartial(), io_read(), rb_io_each_byte(), rb_io_eof(), rb_io_getc(), rb_io_getline(), rb_io_gets(), rb_io_lineno(), rb_io_set_lineno(), rb_io_sysread(), and rb_io_ungetc(). |
|
|
Definition at line 265 of file io.c. References FMODE_RBUF, FMODE_WRITABLE, io_seek, rb_eIOError, rb_io_check_closed(), rb_raise(), and SEEK_CUR. Referenced by io_write(), rb_io_flush(), and rb_io_syswrite(). |
|
|
Definition at line 2083 of file io.c. References free, Qtrue, and rb_io_fptr_cleanup(). Referenced by obj_free(), and rb_gc_call_finalizer_at_exit(). |
|
||||||||||||||||
|
Definition at line 1093 of file io.c. References OpenFile::f, OpenFile::f2, io_fread(), and NULL. |
|
||||||||||||||||
|
|
|
|
Referenced by pipe_open(), rb_file_open_internal(), rb_io_reopen(), and rb_io_s_popen(). |
|
|
Definition at line 2536 of file io.c. References FMODE_APPEND, FMODE_BINMODE, FMODE_CREATE, FMODE_READABLE, FMODE_READWRITE, and FMODE_WRITABLE. Referenced by rb_file_sysopen_internal(), and rb_io_initialize(). |
|
|
Definition at line 2862 of file io.c. References FMODE_SYNC. Referenced by pipe_open(), rb_io_s_pipe(), and rb_io_unbuffered(). |
|
|
Definition at line 194 of file io.c. References OBJ_TAINTED, rb_check_frozen(), rb_eSecurityError, rb_raise(), rb_safe_level, and VALUE. Referenced by rb_file_path(), rb_io_inspect(), and rb_io_reopen(). |
|
|
Definition at line 350 of file io.c. References NULL, Qfalse, Qtrue, rb_thread_select(), and rb_thread_wait_fd(). Referenced by appendline(), io_getpartial(), rb_io_each_byte(), and rb_io_getc(). |
|
|
Definition at line 378 of file io.c. References NULL, Qfalse, Qtrue, rb_thread_fd_writable(), and rb_thread_select(). Referenced by fptr_finalize(), io_fflush(), and io_fwrite(). |
|
|
Definition at line 288 of file io.c. References rb_thread_wait_fd(), and READ_DATA_PENDING. |
|
|
Definition at line 281 of file io.c. References READ_DATA_PENDING. |
1.3.5