Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/AnonR/smanonr..../opt/alt/ruby27/include/ruby
File: io.h
/**********************************************************************
[0] Fix | Delete
[1] Fix | Delete
rubyio.h -
[2] Fix | Delete
[3] Fix | Delete
$Author$
[4] Fix | Delete
created at: Fri Nov 12 16:47:09 JST 1993
[5] Fix | Delete
[6] Fix | Delete
Copyright (C) 1993-2007 Yukihiro Matsumoto
[7] Fix | Delete
[8] Fix | Delete
**********************************************************************/
[9] Fix | Delete
[10] Fix | Delete
#ifndef RUBY_IO_H
[11] Fix | Delete
#define RUBY_IO_H 1
[12] Fix | Delete
[13] Fix | Delete
#ifdef RUBY_INTERNAL_H
[14] Fix | Delete
#error "Include this file before internal.h"
[15] Fix | Delete
#endif
[16] Fix | Delete
[17] Fix | Delete
#if defined(__cplusplus)
[18] Fix | Delete
extern "C" {
[19] Fix | Delete
#if 0
[20] Fix | Delete
} /* satisfy cc-mode */
[21] Fix | Delete
#endif
[22] Fix | Delete
#endif
[23] Fix | Delete
[24] Fix | Delete
#include <stdio.h>
[25] Fix | Delete
#include "ruby/encoding.h"
[26] Fix | Delete
[27] Fix | Delete
#if defined(HAVE_STDIO_EXT_H)
[28] Fix | Delete
#include <stdio_ext.h>
[29] Fix | Delete
#endif
[30] Fix | Delete
[31] Fix | Delete
#include "ruby/config.h"
[32] Fix | Delete
#include <errno.h>
[33] Fix | Delete
#if defined(HAVE_POLL)
[34] Fix | Delete
# ifdef _AIX
[35] Fix | Delete
# define reqevents events
[36] Fix | Delete
# define rtnevents revents
[37] Fix | Delete
# endif
[38] Fix | Delete
# include <poll.h>
[39] Fix | Delete
# ifdef _AIX
[40] Fix | Delete
# undef reqevents
[41] Fix | Delete
# undef rtnevents
[42] Fix | Delete
# undef events
[43] Fix | Delete
# undef revents
[44] Fix | Delete
# endif
[45] Fix | Delete
# define RB_WAITFD_IN POLLIN
[46] Fix | Delete
# define RB_WAITFD_PRI POLLPRI
[47] Fix | Delete
# define RB_WAITFD_OUT POLLOUT
[48] Fix | Delete
#else
[49] Fix | Delete
# define RB_WAITFD_IN 0x001
[50] Fix | Delete
# define RB_WAITFD_PRI 0x002
[51] Fix | Delete
# define RB_WAITFD_OUT 0x004
[52] Fix | Delete
#endif
[53] Fix | Delete
[54] Fix | Delete
RUBY_SYMBOL_EXPORT_BEGIN
[55] Fix | Delete
[56] Fix | Delete
PACKED_STRUCT_UNALIGNED(struct rb_io_buffer_t {
[57] Fix | Delete
char *ptr; /* off + len <= capa */
[58] Fix | Delete
int off;
[59] Fix | Delete
int len;
[60] Fix | Delete
int capa;
[61] Fix | Delete
});
[62] Fix | Delete
typedef struct rb_io_buffer_t rb_io_buffer_t;
[63] Fix | Delete
[64] Fix | Delete
typedef struct rb_io_t {
[65] Fix | Delete
FILE *stdio_file; /* stdio ptr for read/write if available */
[66] Fix | Delete
int fd; /* file descriptor */
[67] Fix | Delete
int mode; /* mode flags: FMODE_XXXs */
[68] Fix | Delete
rb_pid_t pid; /* child's pid (for pipes) */
[69] Fix | Delete
int lineno; /* number of lines read */
[70] Fix | Delete
VALUE pathv; /* pathname for file */
[71] Fix | Delete
void (*finalize)(struct rb_io_t*,int); /* finalize proc */
[72] Fix | Delete
[73] Fix | Delete
rb_io_buffer_t wbuf, rbuf;
[74] Fix | Delete
[75] Fix | Delete
VALUE tied_io_for_writing;
[76] Fix | Delete
[77] Fix | Delete
/*
[78] Fix | Delete
* enc enc2 read action write action
[79] Fix | Delete
* NULL NULL force_encoding(default_external) write the byte sequence of str
[80] Fix | Delete
* e1 NULL force_encoding(e1) convert str.encoding to e1
[81] Fix | Delete
* e1 e2 convert from e2 to e1 convert str.encoding to e2
[82] Fix | Delete
*/
[83] Fix | Delete
struct rb_io_enc_t {
[84] Fix | Delete
rb_encoding *enc;
[85] Fix | Delete
rb_encoding *enc2;
[86] Fix | Delete
int ecflags;
[87] Fix | Delete
VALUE ecopts;
[88] Fix | Delete
} encs;
[89] Fix | Delete
[90] Fix | Delete
rb_econv_t *readconv;
[91] Fix | Delete
rb_io_buffer_t cbuf;
[92] Fix | Delete
[93] Fix | Delete
rb_econv_t *writeconv;
[94] Fix | Delete
VALUE writeconv_asciicompat;
[95] Fix | Delete
int writeconv_initialized;
[96] Fix | Delete
int writeconv_pre_ecflags;
[97] Fix | Delete
VALUE writeconv_pre_ecopts;
[98] Fix | Delete
[99] Fix | Delete
VALUE write_lock;
[100] Fix | Delete
} rb_io_t;
[101] Fix | Delete
[102] Fix | Delete
typedef struct rb_io_enc_t rb_io_enc_t;
[103] Fix | Delete
[104] Fix | Delete
#define HAVE_RB_IO_T 1
[105] Fix | Delete
[106] Fix | Delete
#define FMODE_READABLE 0x00000001
[107] Fix | Delete
#define FMODE_WRITABLE 0x00000002
[108] Fix | Delete
#define FMODE_READWRITE (FMODE_READABLE|FMODE_WRITABLE)
[109] Fix | Delete
#define FMODE_BINMODE 0x00000004
[110] Fix | Delete
#define FMODE_SYNC 0x00000008
[111] Fix | Delete
#define FMODE_TTY 0x00000010
[112] Fix | Delete
#define FMODE_DUPLEX 0x00000020
[113] Fix | Delete
#define FMODE_APPEND 0x00000040
[114] Fix | Delete
#define FMODE_CREATE 0x00000080
[115] Fix | Delete
/* #define FMODE_NOREVLOOKUP 0x00000100 */
[116] Fix | Delete
#define FMODE_EXCL 0x00000400
[117] Fix | Delete
#define FMODE_TRUNC 0x00000800
[118] Fix | Delete
#define FMODE_TEXTMODE 0x00001000
[119] Fix | Delete
/* #define FMODE_PREP 0x00010000 */
[120] Fix | Delete
#define FMODE_SETENC_BY_BOM 0x00100000
[121] Fix | Delete
/* #define FMODE_UNIX 0x00200000 */
[122] Fix | Delete
/* #define FMODE_INET 0x00400000 */
[123] Fix | Delete
/* #define FMODE_INET6 0x00800000 */
[124] Fix | Delete
[125] Fix | Delete
#define GetOpenFile(obj,fp) rb_io_check_closed((fp) = RFILE(rb_io_taint_check(obj))->fptr)
[126] Fix | Delete
[127] Fix | Delete
#define MakeOpenFile(obj, fp) do {\
[128] Fix | Delete
(fp) = rb_io_make_open_file(obj);\
[129] Fix | Delete
} while (0)
[130] Fix | Delete
[131] Fix | Delete
rb_io_t *rb_io_make_open_file(VALUE obj);
[132] Fix | Delete
[133] Fix | Delete
FILE *rb_io_stdio_file(rb_io_t *fptr);
[134] Fix | Delete
[135] Fix | Delete
FILE *rb_fdopen(int, const char*);
[136] Fix | Delete
int rb_io_modestr_fmode(const char *modestr);
[137] Fix | Delete
int rb_io_modestr_oflags(const char *modestr);
[138] Fix | Delete
CONSTFUNC(int rb_io_oflags_fmode(int oflags));
[139] Fix | Delete
void rb_io_check_writable(rb_io_t*);
[140] Fix | Delete
void rb_io_check_readable(rb_io_t*);
[141] Fix | Delete
void rb_io_check_char_readable(rb_io_t *fptr);
[142] Fix | Delete
void rb_io_check_byte_readable(rb_io_t *fptr);
[143] Fix | Delete
int rb_io_fptr_finalize(rb_io_t*);
[144] Fix | Delete
void rb_io_synchronized(rb_io_t*);
[145] Fix | Delete
void rb_io_check_initialized(rb_io_t*);
[146] Fix | Delete
void rb_io_check_closed(rb_io_t*);
[147] Fix | Delete
VALUE rb_io_get_io(VALUE io);
[148] Fix | Delete
VALUE rb_io_check_io(VALUE io);
[149] Fix | Delete
VALUE rb_io_get_write_io(VALUE io);
[150] Fix | Delete
VALUE rb_io_set_write_io(VALUE io, VALUE w);
[151] Fix | Delete
int rb_io_wait_readable(int);
[152] Fix | Delete
int rb_io_wait_writable(int);
[153] Fix | Delete
int rb_wait_for_single_fd(int fd, int events, struct timeval *tv);
[154] Fix | Delete
void rb_io_set_nonblock(rb_io_t *fptr);
[155] Fix | Delete
int rb_io_extract_encoding_option(VALUE opt, rb_encoding **enc_p, rb_encoding **enc2_p, int *fmode_p);
[156] Fix | Delete
void rb_io_extract_modeenc(VALUE *vmode_p, VALUE *vperm_p, VALUE opthash, int *oflags_p, int *fmode_p, rb_io_enc_t *convconfig_p);
[157] Fix | Delete
ssize_t rb_io_bufwrite(VALUE io, const void *buf, size_t size);
[158] Fix | Delete
[159] Fix | Delete
/* compatibility for ruby 1.8 and older */
[160] Fix | Delete
#define rb_io_mode_flags(modestr) [<"rb_io_mode_flags() is obsolete; use rb_io_modestr_fmode()">]
[161] Fix | Delete
#define rb_io_modenum_flags(oflags) [<"rb_io_modenum_flags() is obsolete; use rb_io_oflags_fmode()">]
[162] Fix | Delete
[163] Fix | Delete
VALUE rb_io_taint_check(VALUE);
[164] Fix | Delete
NORETURN(void rb_eof_error(void));
[165] Fix | Delete
[166] Fix | Delete
void rb_io_read_check(rb_io_t*);
[167] Fix | Delete
int rb_io_read_pending(rb_io_t*);
[168] Fix | Delete
[169] Fix | Delete
struct stat;
[170] Fix | Delete
VALUE rb_stat_new(const struct stat *);
[171] Fix | Delete
[172] Fix | Delete
/* gc.c */
[173] Fix | Delete
[174] Fix | Delete
RUBY_SYMBOL_EXPORT_END
[175] Fix | Delete
[176] Fix | Delete
#if defined(__cplusplus)
[177] Fix | Delete
#if 0
[178] Fix | Delete
{ /* satisfy cc-mode */
[179] Fix | Delete
#endif
[180] Fix | Delete
} /* extern "C" { */
[181] Fix | Delete
#endif
[182] Fix | Delete
[183] Fix | Delete
#endif /* RUBY_IO_H */
[184] Fix | Delete
[185] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function