ARGF 1136 io.c if (io == ARGF.current_file) { ARGF 1137 io.c ARGF.gets_lineno -= fptr->lineno; ARGF 2156 io.c ARGF.lineno = INT2FIX(fptr->lineno); ARGF 2291 io.c ARGF.lineno = INT2FIX(fptr->lineno); ARGF 6077 io.c memset(&ARGF, 0, sizeof(ARGF)); ARGF 6078 io.c argf_init(&ARGF, argv); ARGF 6086 io.c ARGF = argf_of(orig); ARGF 6087 io.c ARGF.argv = rb_obj_dup(ARGF.argv); ARGF 6088 io.c if (ARGF.inplace) { ARGF 6089 io.c const char *inplace = ARGF.inplace; ARGF 6090 io.c ARGF.inplace = 0; ARGF 6091 io.c ARGF.inplace = ruby_strdup(inplace); ARGF 6099 io.c ARGF.gets_lineno = NUM2INT(val); ARGF 6100 io.c ARGF.lineno = INT2FIX(ARGF.gets_lineno); ARGF 6107 io.c return ARGF.lineno; ARGF 6113 io.c return rb_funcall3(ARGF.current_file, rb_frame_this_func(), argc, argv); ARGF 6118 io.c (ARGF.current_file == rb_stdin && TYPE(ARGF.current_file) != T_FILE) ARGF 6147 io.c if (ARGF.init_p == 0) { ARGF 6148 io.c if (!NIL_P(ARGF.argv) && RARRAY_LEN(ARGF.argv) > 0) { ARGF 6149 io.c ARGF.next_p = 1; ARGF 6152 io.c ARGF.next_p = -1; ARGF 6154 io.c ARGF.init_p = 1; ARGF 6155 io.c ARGF.gets_lineno = 0; ARGF 6158 io.c if (ARGF.next_p == 1) { ARGF 6159 io.c ARGF.next_p = 0; ARGF 6161 io.c if (RARRAY_LEN(ARGF.argv) > 0) { ARGF 6162 io.c ARGF.filename = rb_ary_shift(ARGF.argv); ARGF 6163 io.c fn = StringValueCStr(ARGF.filename); ARGF 6165 io.c ARGF.current_file = rb_stdin; ARGF 6166 io.c if (ARGF.inplace) { ARGF 6174 io.c if (ARGF.inplace) { ARGF 6186 io.c if (*ARGF.inplace) { ARGF 6189 io.c ruby_add_suffix(str, ARGF.inplace); ARGF 6191 io.c rb_str_cat2(str, ARGF.inplace); ARGF 6234 io.c ARGF.current_file = prep_io(fr, FMODE_READABLE, rb_cFile, fn); ARGF 6236 io.c if (ARGF.binmode) rb_io_binmode(ARGF.current_file); ARGF 6237 io.c if (ARGF.encs.enc) { ARGF 6240 io.c GetOpenFile(ARGF.current_file, fptr); ARGF 6241 io.c fptr->encs = ARGF.encs; ARGF 6246 io.c ARGF.next_p = 1; ARGF 6250 io.c else if (ARGF.next_p == -1) { ARGF 6251 io.c ARGF.current_file = rb_stdin; ARGF 6252 io.c ARGF.filename = rb_str_new2("-"); ARGF 6253 io.c if (ARGF.inplace) { ARGF 6269 io.c line = rb_funcall3(ARGF.current_file, rb_intern("gets"), argc, argv); ARGF 6273 io.c line = rb_io_gets(ARGF.current_file); ARGF 6276 io.c line = rb_io_getline(argc, argv, ARGF.current_file); ARGF 6278 io.c if (NIL_P(line) && ARGF.next_p != -1) { ARGF 6279 io.c argf_close(ARGF.current_file); ARGF 6280 io.c ARGF.next_p = 1; ARGF 6285 io.c ARGF.gets_lineno++; ARGF 6286 io.c ARGF.lineno = INT2FIX(ARGF.gets_lineno); ARGF 6295 io.c return ARGF.lineno; ARGF 6303 io.c ARGF.gets_lineno = n; ARGF 6304 io.c ARGF.lineno = INT2FIX(n); ARGF 6372 io.c line = rb_io_gets(ARGF.current_file); ARGF 6373 io.c if (NIL_P(line) && ARGF.next_p != -1) { ARGF 6374 io.c rb_io_close(ARGF.current_file); ARGF 6375 io.c ARGF.next_p = 1; ARGF 6380 io.c ARGF.gets_lineno++; ARGF 6381 io.c ARGF.lineno = INT2FIX(ARGF.gets_lineno); ARGF 7936 io.c if (!RTEST(ARGF.current_file)) { ARGF 7939 io.c return rb_io_external_encoding(rb_io_check_io(ARGF.current_file)); ARGF 7945 io.c if (!RTEST(ARGF.current_file)) { ARGF 7948 io.c return rb_io_internal_encoding(rb_io_check_io(ARGF.current_file)); ARGF 7959 io.c rb_io_set_encoding(argc, argv, ARGF.current_file); ARGF 7960 io.c GetOpenFile(ARGF.current_file, fptr); ARGF 7961 io.c ARGF.encs = fptr->encs; ARGF 7972 io.c return rb_io_tell(ARGF.current_file); ARGF 7982 io.c return rb_io_seek_m(argc, argv, ARGF.current_file); ARGF 7992 io.c return rb_io_set_pos(ARGF.current_file, offset); ARGF 8002 io.c return rb_io_rewind(ARGF.current_file); ARGF 8012 io.c return rb_io_fileno(ARGF.current_file); ARGF 8020 io.c return ARGF.current_file; ARGF 8026 io.c if (ARGF.current_file) { ARGF 8027 io.c if (ARGF.init_p == 0) return Qtrue; ARGF 8029 io.c if (rb_io_eof(ARGF.current_file)) { ARGF 8060 io.c tmp = io_read(argc, argv, ARGF.current_file); ARGF 8065 io.c if (ARGF.next_p != -1) { ARGF 8066 io.c argf_close(ARGF.current_file); ARGF 8067 io.c ARGF.next_p = 1; ARGF 8119 io.c tmp = io_getpartial(argc, argv, ARGF.current_file, 0); ARGF 8122 io.c if (ARGF.next_p == -1) { ARGF 8125 io.c argf_close(ARGF.current_file); ARGF 8126 io.c ARGF.next_p = 1; ARGF 8127 io.c if (RARRAY_LEN(ARGF.argv) == 0) ARGF 8144 io.c ch = rb_funcall3(ARGF.current_file, rb_intern("getc"), 0, 0); ARGF 8147 io.c ch = rb_io_getc(ARGF.current_file); ARGF 8149 io.c if (NIL_P(ch) && ARGF.next_p != -1) { ARGF 8150 io.c argf_close(ARGF.current_file); ARGF 8151 io.c ARGF.next_p = 1; ARGF 8165 io.c if (TYPE(ARGF.current_file) != T_FILE) { ARGF 8166 io.c ch = rb_funcall3(ARGF.current_file, rb_intern("getbyte"), 0, 0); ARGF 8169 io.c ch = rb_io_getbyte(ARGF.current_file); ARGF 8171 io.c if (NIL_P(ch) && ARGF.next_p != -1) { ARGF 8172 io.c argf_close(ARGF.current_file); ARGF 8173 io.c ARGF.next_p = 1; ARGF 8187 io.c if (TYPE(ARGF.current_file) != T_FILE) { ARGF 8188 io.c ch = rb_funcall3(ARGF.current_file, rb_intern("getc"), 0, 0); ARGF 8191 io.c ch = rb_io_getc(ARGF.current_file); ARGF 8193 io.c if (NIL_P(ch) && ARGF.next_p != -1) { ARGF 8194 io.c argf_close(ARGF.current_file); ARGF 8195 io.c ARGF.next_p = 1; ARGF 8221 io.c rb_block_call(ARGF.current_file, rb_intern("each_line"), argc, argv, rb_yield, 0); ARGF 8222 io.c ARGF.next_p = 1; ARGF 8233 io.c rb_block_call(ARGF.current_file, rb_intern("each_byte"), 0, 0, rb_yield, 0); ARGF 8234 io.c ARGF.next_p = 1; ARGF 8244 io.c rb_block_call(ARGF.current_file, rb_intern("each_char"), 0, 0, rb_yield, 0); ARGF 8245 io.c ARGF.next_p = 1; ARGF 8253 io.c return ARGF.filename; ARGF 8266 io.c return ARGF.current_file; ARGF 8272 io.c ARGF.binmode = 1; ARGF 8275 io.c rb_io_binmode(ARGF.current_file); ARGF 8282 io.c return ARGF.binmode ? Qtrue : Qfalse; ARGF 8288 io.c if (ARGF.next_p != -1) { ARGF 8289 io.c argf_close(ARGF.current_file); ARGF 8290 io.c ARGF.next_p = 1; ARGF 8299 io.c argf_close(ARGF.current_file); ARGF 8300 io.c if (ARGF.next_p != -1) { ARGF 8301 io.c ARGF.next_p = 1; ARGF 8303 io.c ARGF.gets_lineno = 0; ARGF 8312 io.c return rb_io_closed(ARGF.current_file); ARGF 8324 io.c if (!ARGF.inplace) return Qnil; ARGF 8325 io.c return rb_str_new2(ARGF.inplace); ARGF 8338 io.c if (ARGF.inplace) free(ARGF.inplace); ARGF 8339 io.c ARGF.inplace = 0; ARGF 8343 io.c if (ARGF.inplace) free(ARGF.inplace); ARGF 8344 io.c ARGF.inplace = 0; ARGF 8345 io.c ARGF.inplace = strdup(RSTRING_PTR(val)); ARGF 8359 io.c return ARGF.inplace; ARGF 8365 io.c if (ARGF.inplace) free(ARGF.inplace); ARGF 8366 io.c ARGF.inplace = 0; ARGF 8367 io.c if (suffix) ARGF.inplace = strdup(suffix); ARGF 8373 io.c return ARGF.argv; ARGF 8385 io.c return ARGF.argv; ARGF 8717 io.c ARGF.filename = rb_str_new2("-");