Ruby
2.4.2p198(2017-09-14revision59899)
|
#include "ruby.h"
#include "ruby/encoding.h"
#include "ruby/io.h"
#include <sys/types.h>
#include <errno.h>
#include "constdefs.h"
Go to the source code of this file.
Macros | |
#define | numberof(array) (sizeof(array) / sizeof(*(array))) |
#define | etc_uname rb_f_notimplement |
#define | etc_sysconf rb_f_notimplement |
#define | etc_confstr rb_f_notimplement |
#define | io_pathconf rb_f_notimplement |
#define | etc_nprocessors rb_f_notimplement |
Functions | |
char * | getenv () |
char * | getlogin () |
static VALUE | etc_getlogin (VALUE obj) |
static VALUE | etc_getpwuid (int argc, VALUE *argv, VALUE obj) |
static VALUE | etc_getpwnam (VALUE obj, VALUE nam) |
static VALUE | etc_passwd (VALUE obj) |
static VALUE | etc_each_passwd (VALUE obj) |
static VALUE | etc_setpwent (VALUE obj) |
static VALUE | etc_endpwent (VALUE obj) |
static VALUE | etc_getpwent (VALUE obj) |
static VALUE | etc_getgrgid (int argc, VALUE *argv, VALUE obj) |
static VALUE | etc_getgrnam (VALUE obj, VALUE nam) |
static VALUE | etc_group (VALUE obj) |
static VALUE | etc_setgrent (VALUE obj) |
static VALUE | etc_endgrent (VALUE obj) |
static VALUE | etc_getgrent (VALUE obj) |
static VALUE | etc_sysconfdir (VALUE obj) |
static VALUE | etc_systmpdir (void) |
void | Init_etc (void) |
Variables | |
static VALUE | sPasswd |
#define etc_confstr rb_f_notimplement |
Definition at line 881 of file etc.c.
Referenced by Init_etc().
#define etc_nprocessors rb_f_notimplement |
Definition at line 1033 of file etc.c.
Referenced by Init_etc().
#define etc_sysconf rb_f_notimplement |
Definition at line 834 of file etc.c.
Referenced by Init_etc().
#define etc_uname rb_f_notimplement |
Definition at line 800 of file etc.c.
Referenced by etc_systmpdir(), and Init_etc().
#define io_pathconf rb_f_notimplement |
Definition at line 920 of file etc.c.
Referenced by Init_etc().
#define numberof | ( | array | ) | (sizeof(array) / sizeof(*(array))) |
Definition at line 616 of file etc.c.
Referenced by absint_numwords_generic(), big_shift2(), compile_massign_opt(), constat_parse(), convert_type(), distance_value(), dupfd(), etc_systmpdir(), features_index_add_single(), for_self_aset(), get_device_once(), init_env(), init_seed(), inject_op_i(), map_position_value(), mark_current_machine_context(), math_gamma(), mt_state(), numeric_getaddrinfo(), onigenc_ascii_apply_all_case_fold(), onigenc_minimum_property_name_to_ctype(), parse_posix_bracket(), parser_magic_comment(), poll_child_status(), rand_init(), random_copy(), random_load(), rb_absint_singlebit_p(), rb_absint_size(), rb_ary_sample(), rb_big_bit_length(), rb_binding_add_dynavars(), rb_builtin_type_name(), rb_exec_fillarg(), rb_f_select(), rb_feature_p(), rb_freopen(), rb_insns_name_array(), rb_integer_pack(), rb_integer_unpack(), rb_io_each_codepoint(), rb_iseq_defined_string(), rb_struct_new(), rb_throw_obj(), rb_w32_special_folder(), rb_w32_system_tmpdir(), ripper_token2eventid(), ruby_cleanup(), select_end(), str_upto_each(), usage(), winnt_lstat(), and winnt_stat().
Definition at line 419 of file etc.c.
References getgid(), id, NUM2GIDT, Qnil, rb_eArgError, rb_raise(), and rb_scan_args().
Referenced by Init_etc().
Definition at line 457 of file etc.c.
References PRIsVALUE, Qfalse, Qnil, Qtrue, rb_eArgError, rb_ensure(), rb_eRuntimeError, rb_raise(), rb_yield(), RSTRING_PTR, and SafeStringValue.
Referenced by Init_etc().
Definition at line 73 of file etc.c.
References getenv(), getlogin(), GIDT2NUM, INT2NUM, Qnil, rb_external_str_new_with_enc(), rb_filesystem_str_new_cstr(), rb_locale_encoding(), rb_locale_str_new_cstr(), rb_struct_new(), rb_sys_fail(), rb_tainted_str_new2, rb_utf8_encoding(), sPasswd, strlen(), and UIDT2NUM.
Referenced by Init_etc().
Definition at line 367 of file etc.c.
References GIDT2NUM, Qnil, rb_ary_new(), rb_ary_push(), and rb_struct_new().
Referenced by Init_etc().
Definition at line 214 of file etc.c.
References endpwent, PRIsVALUE, Qfalse, Qnil, Qtrue, rb_eArgError, rb_ensure(), rb_eRuntimeError, rb_raise(), rb_yield(), RSTRING_PTR, and SafeStringValue.
Referenced by Init_etc().
Definition at line 177 of file etc.c.
References getuid(), id, NUM2UIDT, Qnil, rb_eArgError, rb_raise(), and rb_scan_args().
Referenced by Init_etc().
Definition at line 522 of file etc.c.
References Qnil, rb_block_given_p(), and RETURN_ENUMERATOR.
Referenced by Init_etc().
Definition at line 282 of file etc.c.
References Qnil, and rb_block_given_p().
Referenced by Init_etc().
Definition at line 632 of file etc.c.
References CSIDL_COMMON_APPDATA, rb_filesystem_str_new_cstr(), and rb_w32_special_folder().
Referenced by Init_etc().
|
static |
Definition at line 645 of file etc.c.
References ALLOCV_END, ALLOCV_N, buf, etc_uname, FL_TAINT, FL_UNSET, ID2SYM, len, MAXPATHLEN, NIL_P, NULL, numberof, PRIsVALUE, Qnil, rb_filesystem_encoding(), rb_filesystem_str_new(), rb_hash_aset(), rb_hash_new(), rb_intern, rb_sprintf(), rb_str_new(), rb_str_new_cstr(), rb_sys_fail(), rb_utf8_encoding(), rb_w32_conv_from_wchar(), rb_w32_system_tmpdir(), result, RSTRING_PTR, strlen(), and version.
Referenced by Init_etc().
char* getenv | ( | ) |
Referenced by etc_getlogin().
char* getlogin | ( | ) |
Definition at line 867 of file win32.c.
References NTLoginName.
Referenced by establishShell(), etc_getlogin(), rb_default_home_dir(), and rb_home_dir_of().
void Init_etc | ( | void | ) |
Definition at line 1063 of file etc.c.
References etc_confstr, etc_each_passwd(), etc_endgrent(), etc_endpwent(), etc_getgrent(), etc_getgrgid(), etc_getgrnam(), etc_getlogin(), etc_getpwent(), etc_getpwnam(), etc_getpwuid(), etc_group(), etc_nprocessors, etc_passwd(), etc_setgrent(), etc_setpwent(), etc_sysconf, etc_sysconfdir(), etc_systmpdir(), etc_uname, init_constants(), io_pathconf, NULL, rb_cIO, rb_cStruct, rb_define_const(), rb_define_method(), rb_define_module(), rb_define_module_function(), rb_define_singleton_method(), rb_extend_object(), rb_mEnumerable, rb_struct_define_under(), and sPasswd.
|
static |
Definition at line 37 of file etc.c.
Referenced by etc_getlogin(), and Init_etc().