Ruby: include/ruby/internal/intern/io.h Source File

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

io.h
Go to the documentation of this file.
1#ifndef RBIMPL_INTERN_IO_H /*-*-C++-*-vi:se ft=cpp:*/
2#define RBIMPL_INTERN_IO_H
23#include "ruby/internal/dllexport.h"
24#include "ruby/internal/value.h"
25
26 RBIMPL_SYMBOL_EXPORT_BEGIN()
27
28/* io.c */
29#define rb_defout rb_stdout
30 RUBY_EXTERN VALUE rb_fs;
31 RUBY_EXTERN VALUE rb_output_fs;
32 RUBY_EXTERN VALUE rb_rs;
33 RUBY_EXTERN VALUE rb_default_rs;
34 RUBY_EXTERN VALUE rb_output_rs;
35 VALUE rb_io_write(VALUE, VALUE);
36 VALUE rb_io_gets(VALUE);
37 VALUE rb_io_getbyte(VALUE);
38 VALUE rb_io_ungetc(VALUE, VALUE);
39 VALUE rb_io_ungetbyte(VALUE, VALUE);
40 VALUE rb_io_close(VALUE);
41 VALUE rb_io_flush(VALUE);
42 VALUE rb_io_eof(VALUE);
43 VALUE rb_io_binmode(VALUE);
44 VALUE rb_io_ascii8bit_binmode(VALUE);
45 VALUE rb_io_addstr(VALUE, VALUE);
46 VALUE rb_io_printf(int, const VALUE*, VALUE);
47 VALUE rb_io_print(int, const VALUE*, VALUE);
48 VALUE rb_io_puts(int, const VALUE*, VALUE);
49 VALUE rb_io_fdopen(int, int, const char*);
50 VALUE rb_io_get_io(VALUE);
51 VALUE rb_file_open(const char*, const char*);
52 VALUE rb_file_open_str(VALUE, const char*);
53 VALUE rb_gets(void);
54void rb_write_error(const char*);
55void rb_write_error2(const char*, long);
56 void rb_close_before_exec(int lowfd, int maxhint, VALUE noclose_fds);
57int rb_pipe(int *pipes);
58 int rb_reserved_fd_p(int fd);
59int rb_cloexec_open(const char *pathname, int flags, mode_t mode);
60int rb_cloexec_dup(int oldfd);
61int rb_cloexec_dup2(int oldfd, int newfd);
62int rb_cloexec_pipe(int fildes[2]);
63int rb_cloexec_fcntl_dupfd(int fd, int minfd);
64#define RB_RESERVED_FD_P(fd) rb_reserved_fd_p(fd)
65void rb_update_max_fd(int fd);
66void rb_fd_fix_cloexec(int fd);
67
68 RBIMPL_SYMBOL_EXPORT_END()
69
70#endif /* RBIMPL_INTERN_IO_H */
dllexport.h
Tewaking visibility of C variables/functions.
RUBY_EXTERN
#define RUBY_EXTERN
Definition: dllexport.h:36
RBIMPL_SYMBOL_EXPORT_END
#define RBIMPL_SYMBOL_EXPORT_END()
Counterpart of RBIMPL_SYMBOL_EXPORT_BEGIN.
Definition: dllexport.h:86
RBIMPL_SYMBOL_EXPORT_BEGIN
#define RBIMPL_SYMBOL_EXPORT_BEGIN()
Shortcut macro equivalent to RUBY_SYMBOL_EXPORT_BEGIN extern "C" {.
Definition: dllexport.h:77
rb_cloexec_pipe
int rb_cloexec_pipe(int fildes[2])
Definition: io.c:406
rb_rs
VALUE rb_rs
Definition: io.c:200
rb_io_getbyte
VALUE rb_io_getbyte(VALUE)
Definition: io.c:4331
rb_io_eof
VALUE rb_io_eof(VALUE)
Definition: io.c:2298
rb_file_open
VALUE rb_file_open(const char *, const char *)
Definition: io.c:6389
rb_cloexec_dup2
int rb_cloexec_dup2(int oldfd, int newfd)
Definition: io.c:353
rb_io_printf
VALUE rb_io_printf(int, const VALUE *, VALUE)
Definition: io.c:7649
rb_io_close
VALUE rb_io_close(VALUE)
Definition: io.c:4935
rb_io_fdopen
VALUE rb_io_fdopen(int, int, const char *)
Definition: io.c:8183
rb_io_ungetc
VALUE rb_io_ungetc(VALUE, VALUE)
Definition: io.c:4432
rb_io_gets
VALUE rb_io_gets(VALUE)
Definition: io.c:3738
rb_io_write
VALUE rb_io_write(VALUE, VALUE)
Definition: io.c:1953
rb_io_ascii8bit_binmode
VALUE rb_io_ascii8bit_binmode(VALUE)
Definition: io.c:5495
rb_update_max_fd
void rb_update_max_fd(int fd)
Definition: io.c:233
rb_file_open_str
VALUE rb_file_open_str(VALUE, const char *)
Definition: io.c:6382
rb_cloexec_open
int rb_cloexec_open(const char *pathname, int flags, mode_t mode)
Definition: io.c:307
rb_io_flush
VALUE rb_io_flush(VALUE)
Definition: io.c:2052
rb_fs
VALUE rb_fs
Definition: string.c:502
rb_output_rs
VALUE rb_output_rs
Definition: io.c:201
rb_close_before_exec
void rb_close_before_exec(int lowfd, int maxhint, VALUE noclose_fds)
rb_io_addstr
VALUE rb_io_addstr(VALUE, VALUE)
Definition: io.c:1992
rb_reserved_fd_p
int rb_reserved_fd_p(int fd)
rb_fd_fix_cloexec
void rb_fd_fix_cloexec(int fd)
Definition: io.c:283
rb_write_error
void rb_write_error(const char *)
Definition: io.c:8077
rb_io_puts
VALUE rb_io_puts(int, const VALUE *, VALUE)
Definition: io.c:7895
rb_pipe
int rb_pipe(int *pipes)
Definition: io.c:6499
rb_io_get_io
VALUE rb_io_get_io(VALUE)
Definition: io.c:790
rb_write_error2
void rb_write_error2(const char *, long)
Definition: io.c:8058
rb_io_print
VALUE rb_io_print(int, const VALUE *, VALUE)
Definition: io.c:7720
rb_gets
VALUE rb_gets(void)
Definition: io.c:9104
rb_cloexec_fcntl_dupfd
int rb_cloexec_fcntl_dupfd(int fd, int minfd)
Definition: io.c:440
rb_output_fs
VALUE rb_output_fs
Definition: io.c:199
rb_io_ungetbyte
VALUE rb_io_ungetbyte(VALUE, VALUE)
Definition: io.c:4393
rb_io_binmode
VALUE rb_io_binmode(VALUE)
Definition: io.c:5449
rb_cloexec_dup
int rb_cloexec_dup(int oldfd)
Definition: io.c:346
rb_default_rs
VALUE rb_default_rs
Definition: io.c:202
mode
const char int mode
Definition: ioapi.h:137
value.h
Defines VALUE and ID.
VALUE
unsigned long VALUE
Definition: value.h:38
mode_t
#define mode_t
Definition: win32.h:119