mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
9e6e39c351
Split ruby.h
70 lines
2.8 KiB
C++
70 lines
2.8 KiB
C++
/** \noop-*-C++-*-vi:ft=cpp
|
|
* @file
|
|
* @author Ruby developers <ruby-core@ruby-lang.org>
|
|
* @copyright This file is a part of the programming language Ruby.
|
|
* Permission is hereby granted, to either redistribute and/or
|
|
* modify this file, provided that the conditions mentioned in the
|
|
* file COPYING are met. Consult the file for details.
|
|
* @warning Symbols prefixed with either `RUBY3` or `ruby3` are
|
|
* implementation details. Don't take them as canon. They could
|
|
* rapidly appear then vanish. The name (path) of this header file
|
|
* is also an implementation detail. Do not expect it to persist
|
|
* at the place it is now. Developers are free to move it anywhere
|
|
* anytime at will.
|
|
* @note To ruby-core: remember that this header can be possibly
|
|
* recursively included from extension libraries written in C++.
|
|
* Do not expect for instance `__VA_ARGS__` is always available.
|
|
* We assume C99 for ruby itself but we don't assume languages of
|
|
* extension libraries. They could be written in C++98.
|
|
* @brief Public APIs related to ::rb_cIO.
|
|
*/
|
|
#ifndef RUBY3_INTERN_IO_H
|
|
#define RUBY3_INTERN_IO_H
|
|
#include "ruby/3/dllexport.h"
|
|
#include "ruby/3/value.h"
|
|
|
|
RUBY3_SYMBOL_EXPORT_BEGIN()
|
|
|
|
/* io.c */
|
|
#define rb_defout rb_stdout
|
|
RUBY_EXTERN VALUE rb_fs;
|
|
RUBY_EXTERN VALUE rb_output_fs;
|
|
RUBY_EXTERN VALUE rb_rs;
|
|
RUBY_EXTERN VALUE rb_default_rs;
|
|
RUBY_EXTERN VALUE rb_output_rs;
|
|
VALUE rb_io_write(VALUE, VALUE);
|
|
VALUE rb_io_gets(VALUE);
|
|
VALUE rb_io_getbyte(VALUE);
|
|
VALUE rb_io_ungetc(VALUE, VALUE);
|
|
VALUE rb_io_ungetbyte(VALUE, VALUE);
|
|
VALUE rb_io_close(VALUE);
|
|
VALUE rb_io_flush(VALUE);
|
|
VALUE rb_io_eof(VALUE);
|
|
VALUE rb_io_binmode(VALUE);
|
|
VALUE rb_io_ascii8bit_binmode(VALUE);
|
|
VALUE rb_io_addstr(VALUE, VALUE);
|
|
VALUE rb_io_printf(int, const VALUE*, VALUE);
|
|
VALUE rb_io_print(int, const VALUE*, VALUE);
|
|
VALUE rb_io_puts(int, const VALUE*, VALUE);
|
|
VALUE rb_io_fdopen(int, int, const char*);
|
|
VALUE rb_io_get_io(VALUE);
|
|
VALUE rb_file_open(const char*, const char*);
|
|
VALUE rb_file_open_str(VALUE, const char*);
|
|
VALUE rb_gets(void);
|
|
void rb_write_error(const char*);
|
|
void rb_write_error2(const char*, long);
|
|
void rb_close_before_exec(int lowfd, int maxhint, VALUE noclose_fds);
|
|
int rb_pipe(int *pipes);
|
|
int rb_reserved_fd_p(int fd);
|
|
int rb_cloexec_open(const char *pathname, int flags, mode_t mode);
|
|
int rb_cloexec_dup(int oldfd);
|
|
int rb_cloexec_dup2(int oldfd, int newfd);
|
|
int rb_cloexec_pipe(int fildes[2]);
|
|
int rb_cloexec_fcntl_dupfd(int fd, int minfd);
|
|
#define RB_RESERVED_FD_P(fd) rb_reserved_fd_p(fd)
|
|
void rb_update_max_fd(int fd);
|
|
void rb_fd_fix_cloexec(int fd);
|
|
|
|
RUBY3_SYMBOL_EXPORT_END()
|
|
|
|
#endif /* RUBY3_INTERN_IO_H */
|